From 0b954cb0dbf3d72d7e7d6677e12900d49909e118 Mon Sep 17 00:00:00 2001 From: Kevin Chappell Date: Thu, 21 Mar 2019 17:07:21 -0700 Subject: [PATCH] fix(*): make editorContainer optional, fix imports (#176) * fix(*): make editorContainer optional, fix imports update documentation, remove mkdocs, remove bower.json add commitlint add .npmignore, dont need to include src files in npm dist Update readme fix: typo in readme BREAKING CHANGE: window.Formeo is now window.FormeoEditor --- .npmignore | 2 + CHANGELOG.md | 6 +- README.md | 75 ++---- bower.json | 29 --- docs/css/site.css | 24 -- docs/demos/basic.md | 4 - docs/index.md | 46 ++-- docs/js/scripts.js | 5 - docs/license.md | 25 -- docs/options.md | 31 --- docs/options/actions/index.md | 43 ++++ docs/options/config/index.md | 57 +++++ docs/options/events/index.md | 9 + docs/options/i18n/index.md | 29 +++ docs/options/index.md | 27 +++ mkdocs.yml | 21 -- now.json | 8 - package.json | 30 ++- src/demo/index.html | 1 - src/demo/js/demo.js | 1 - src/demo/js/options/config.js | 9 + src/js/common/actions.js | 26 +- src/js/components/controls/index.js | 2 +- src/js/components/fields/field.js | 2 +- src/js/config.js | 4 +- src/js/editor.js | 14 +- src/sass/components/_field-edit.scss | 2 + src/sass/components/_field.scss | 3 +- src/sass/components/_group-actions.scss | 2 +- tools/webpack.config.js | 1 + yarn.lock | 304 ++++++++++++++++++++++-- 31 files changed, 567 insertions(+), 275 deletions(-) create mode 100755 .npmignore delete mode 100644 bower.json delete mode 100644 docs/css/site.css delete mode 100644 docs/demos/basic.md delete mode 100644 docs/js/scripts.js delete mode 100644 docs/license.md delete mode 100644 docs/options.md create mode 100644 docs/options/actions/index.md create mode 100644 docs/options/config/index.md create mode 100644 docs/options/events/index.md create mode 100644 docs/options/i18n/index.md create mode 100644 docs/options/index.md delete mode 100644 mkdocs.yml delete mode 100644 now.json diff --git a/.npmignore b/.npmignore new file mode 100755 index 00000000..942cf866 --- /dev/null +++ b/.npmignore @@ -0,0 +1,2 @@ +src/ +tools/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f4e443f..345190f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,11 @@ * **i18n:** embed english in editor config ([#158](https://github.com/Draggable/formeo/issues/158)) ([ba5bd1e](https://github.com/Draggable/formeo/commit/ba5bd1e)) * **travis:** config needs to run on pro because its not a personal repo- this should really be documented somewhere ([85b1260](https://github.com/Draggable/formeo/commit/85b1260)) -# Changelog +### Old changelog - v0.7.17 - Update Tag script [#83](http://github.com/draggable/formeo/pulls/83) -* Update tag script - +* Update tag script + * Improve semver regex, Add full PR gitlog to release description and changelog - v0.7.16 - Add release script shortcuts - v0.7.15 - Reduce bundle [#80](http://github.com/draggable/formeo/pulls/80) diff --git a/README.md b/README.md index aa162c4d..8348b39b 100644 --- a/README.md +++ b/README.md @@ -1,76 +1,29 @@ -Formeo -=========== +# Formeo A zero dependency JavaScript module for drag and drop form creation. +## [Demo](https://draggable.github.io/formeo/) +[![formeo-demo](https://user-images.githubusercontent.com/1457540/54792239-84986d80-4bfa-11e9-8924-20a83c2694ab.gif)](https://draggable.github.io/formeo/) + ## Features + +- Drag & drop editing - Extensible builder with plethora of options -- Simple drag & drop interface -- Column layouts +- Column/inline fields - Custom fields - Preview mode - i18n support -## Usage -To start building forms with this module include formeo.min.js and formeo.min.css in your project and call: -``` -new Formeo({ container: '.build-form' }); -``` +## [Docs](https://github.com/Draggable/formeo/blob/master/docs/index.md) -## Options -### General -| Option | Type | Value(s) | Default | Description | -| ------------- | ------------- | ------------- | ------------- | ------------- | -| [allowEdit](#) | {Bool} | `true` \| `false` | `false` | When set to false, formData can only be rendered. | -| [debug](#) | {Bool} | `true` \| `false` | `false` | debug mode | -| [container](#) | {String\|Node} | '.editor-wrap' | '.formeo-wrap' | Define where this instance of Formeo will be added. | -| [svgSprite](#) | {String} | 'path/to/svsprite' | `null` | loads an svg sprite, leave blank if your sprite is already included in page. -| [style](#) | {String} | 'path/to/stylesheet' | `null` | loads a stylesheet to the page | -| [sessionStorage](#) | {Bool} | `true` \| `false` | `null` | loads a stylesheet to the page | -| [iconFontFallback](#) | {String} | 'glyphicons' | `null` | uses an existing font-icon when svg icon is not available | -| [config](#) | {Object} | {...} | {...} | disable, add, reorder and modify row, column and field action buttons | +## Usage -### Events +To start building forms with this module include formeo.min.js and formeo.min.css in your project and call: -| Option | Type | Value(s) | Default | Description | -| ------------- | ------------- | ------------- | ------------- | ------------- | -| [onAdd](#) | {Function} | `Event` | evt => {} | Fires when element is added to another element, returns evt details | -| [onSave](#) | {Function} | `Event` | evt => {} | Fires on full form save, returns full formData | -| [onUpdate](#) | {Function} | `Event` | evt => {} | Fires on individual updates, returns updated data | -| [confirmClearAll](#) | {Function} | `Event` | evt => {} | Fires when form clear button is clicked, returns evt details and `clearAllAction()` | +```javascript +import { FormeoEditor } from 'formeo' -### Actions -unlike events, action usually take place before an event has fired allowing you to modify how an action will complete. For example the default callback for adding an attribute is: -``` -evt => { - let attr = window.prompt(evt.message.attr); - let val; - if (attr) { - val = String(window.prompt(evt.message.value, '')); - evt.addAction(attr, val); - } -} +const editor = new FormeoEditor() ``` -By replacing the default callback you could use your own modal or prompt dialog and do some additional validation before calling `evt.addAction()`. - -| Option | Type | Value(s) | Default | Description | -| ------------- | ------------- | ------------- | ------------- | ------------- | -| [add.attr](#) | {Function} | `Event` | evt => {} | Fires when adding an attribute to an element, returns evt details and `addAction()` | -| [add.option](#) | {Function} | `Event` | evt => {} | Fires when adding nd option to a field, returns evt details and `addAction()` | -| [click.button](#) | {Function} | `Event` | evt => {} | Called when clicking a form action button | -| [save](#) | {Function} | `Event` | evt => {} | Fires on individual updates, returns updated data | - -### i18N -| Option | Type | Value(s) | Default | -| ------------- | ------------- |------------- | ------------- | -| [extension](#) | {String} | '' | '.lang' | -| [locale](#) | {String} | 'de-DE' | 'en-US' | -| [location](#) | {String} | 'path/to/language/files' | 'assets/lang/' | -| [langs](#) | {Array} | array of available locales | ['en-US'] | -| [preloaded](#) | {Object} | key/value pairs of strings | {en-US: {...}} | - - -## [Demo](https://Draggable.github.io/formeo) ## -[![formeo](https://cloud.githubusercontent.com/assets/1457540/15781593/c054681e-299e-11e6-823c-d5ec4b2c03dd.png)](https://draggable.github.io/formeo/) -## [Changelog](https://github.com/Draggable/formeo/blob/master/CHANGELOG.md) ## +## [Changelog](https://github.com/Draggable/formeo/blob/master/CHANGELOG.md) diff --git a/bower.json b/bower.json deleted file mode 100644 index e22b5be2..00000000 --- a/bower.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "formeo", - "version": "0.7.17", - "main": "dist/formeo.min.js", - "description": "A zero dependency JavaScript module for drag and drop form creation.", - "authors": [ - "Kevin Chappell " - ], - "keywords": [ - "drag and drop", - "form builder", - "form maker", - "forms" - ], - "license": "MIT", - "moduleType": [ - "javascript" - ], - "ignore": [ - "*", - "!dist", - "!dist/**/*" - ], - "repository": { - "url": "http://github.com/draggable/formeo", - "type": "git" - }, - "author": "Kevin Chappell " -} diff --git a/docs/css/site.css b/docs/css/site.css deleted file mode 100644 index aa665f5a..00000000 --- a/docs/css/site.css +++ /dev/null @@ -1,24 +0,0 @@ -.wy-nav-content { - max-width: 1010px; -} - -pre { - color: #f8f8f2 !important; - background-color: #23241f !important; -} - -code { - padding: 3px 5px !important; -} - -p { - line-height: 1.7em !important; -} - -.wy-menu-vertical ul { - padding-left: 0; -} - -.wy-side-nav-search > a { - font-size: 200%; -} diff --git a/docs/demos/basic.md b/docs/demos/basic.md deleted file mode 100644 index a22c59a4..00000000 --- a/docs/demos/basic.md +++ /dev/null @@ -1,4 +0,0 @@ -# Basic - -A basic Formeo instance. Click or drag an input to the stage. -

diff --git a/docs/index.md b/docs/index.md index 21b43b8f..24e67b81 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,32 +1,28 @@ # Formeo -A highly configurable drag & drop form building module written in pure JavaScript. -

+A highly configurable drag & drop form building module. + +
## Introduction -Formeo is the much hyped version 2.0 of the popular jQuery form building plug-in aptly titled "[jQuery formBuilder](https://formbuilder.online)". More than just a re-branding, Formeo is a 100% rewrite with focus on configuration extensibility. +Formeo is an extensible form editor written in vanilla Javascript. It builds on years of experience in creating [formBuilder](https://formbuilder.online/) and implements many of the feature requests received for that plug-in. A great deal a focus went into API development for Formeo to make almost every part of it pluggable. ### Features -* coming soon -## Project layout -```bash - demo/ # Website for http://formbuilder.online - dist/ # Compiled files for distribution - docs/ - index.md # The documentation homepage. - ... # Other markdown pages, images and other files. - src/ # Source files for editing the plugin - .gitignore - .jsbeautifyrc # Config file for jsbeautify - .jscsrc # Code quality and style - CHANGELOG.md - CONTRIBUTING.md # Contributor guidelines - LICENSE - README.md - bower.json - build-icons.sh # SVG icon build script - jquery-formeo.js # jQuery wrapper for Formeo module. - package.json # Module config. Files in build process are stored in the `"config"` property. - webpack.config.babel.js # config for webpack -``` +- Column/inline field support + - generate layouts for your form's fields + - numerous presets for common layouts and resizable for custom layouts +- Conditional fields + - programmatically hide/show or change row, column or field values + - works with external data +- Controls API + - create forms with signature pads, interactive maps and more + - extend or clone the built-in controls +- External Data + - User session information in your forms such as name + - Dynamic data like remotely loaded select options +- Rendering + - render your form template using the same renderer used to generate the Formeo UI + - or BYOR (Bring Your Own Renderer) to render form template data using third-party libraries. + + diff --git a/docs/js/scripts.js b/docs/js/scripts.js deleted file mode 100644 index 9b1dabbd..00000000 --- a/docs/js/scripts.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -((window.gitter = {}).chat = {}).options = { - room: 'draggable/formeo' -}; diff --git a/docs/license.md b/docs/license.md deleted file mode 100644 index dd0961ae..00000000 --- a/docs/license.md +++ /dev/null @@ -1,25 +0,0 @@ -The MIT License (MIT) -===================== - -**Copyright © 2016 Draggable LLC** - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the “Software”), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “**AS IS**”, WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/docs/options.md b/docs/options.md deleted file mode 100644 index 04a45402..00000000 --- a/docs/options.md +++ /dev/null @@ -1,31 +0,0 @@ -# Options - -Formeo is one of the most configurable form building modules of them all and this done mostly through the module's options. - -

-  const defaults = {
-    dataType: 'json',
-    debug: false,
-    className: 'formeo',
-    container: '.formeo',
-    prefix: 'formeo-',
-    svgSprite: 'assets/img/formeo-sprite.svg',
-    events: {},
-    actions: {
-      debug: false
-    },
-    i18n: {
-      langsDir: 'assets/lang/',
-      langs: [
-        'en-US'
-      ]
-    }
-  };
-
- -| Option | Type | Value(s) | Default | -| ------------- | ------------- |------------- |------------- | -| debug | {Bool} | (true,false) | `false` | -| svgSprite | {String} | 'path/to/icon/file.svg' | none | -| events | {Object} | Pass callbacks for specific events like `onFieldAdd`, `onColumnRemove` etc. | `{}` | -| actions | {Object} | Pass handlers for specific actions such as `add.attr`, `click.btn` etc. | `{}` | diff --git a/docs/options/actions/index.md b/docs/options/actions/index.md new file mode 100644 index 00000000..d3fec80c --- /dev/null +++ b/docs/options/actions/index.md @@ -0,0 +1,43 @@ +# Actions + +| Option | Type | Description | +| ----------------- | -------- | ---------------------------------------------- | +| [add.attr](#) | Function | Called when adding an attribute to an element | +| [add.option](#) | Function | Called when adding an option to a field | +| [click.button](#) | Function | Called when clicking a [form action](#) button | +| [save](#) | Function | Called when saving | + +With Actions you can modify or completely replace some editor functions. For example the default action for adding an attribute will use `window.prompt` to get info from the user, if you want your application to use a custom modal or extend attribute validation with custom rules, you could do so by defining an action handler for `add.attr`. + +**Full Example** + +```javascript +function addAttribute(evt) { + const addAttributeForm = document.getElementById('add-attribute-form') + const attrName = addAttributeForm.querySelector('.attr-name') + const attrVal = addAttributeForm.querySelector('.attr-value') + + const dialog = $(addAttributeForm).dialog({ + autoOpen: true, + height: 400, + width: 350, + modal: true, + buttons: { + 'Add Attribute': () => evt.addAction(attrName, attrVal), + Cancel: () => dialog.dialog('close'), + }, + close: addAttributeForm.reset, + }) +} +``` + +```javascript +// formeo options +{ + actions: { + add: { + attr: addAttribute, + }, + }, +} +``` diff --git a/docs/options/config/index.md b/docs/options/config/index.md new file mode 100644 index 00000000..ab51e2bb --- /dev/null +++ b/docs/options/config/index.md @@ -0,0 +1,57 @@ +# Config + +The `config` option enables fine tuning of the editor's UI. With it you can disable, add, reorder and modify rows, columns, fields and their action buttons. Here are a few things you can do with the `config` option. + +**Examples** + +
Annoy your users with an alert every time they add a row to the form. + +```javascript +{ + rows: { + all: { // "all" is a catch-all type that will be applied + events: { + onRender: element => { + window.alert(`You just added a new row with the id "${element.id}"`) + }, + }, + }, + } +} +``` + +
+ +
Show only the "Edit" button for checkbox fields + +```javascript +{ + fields: { + checkbox: { // checkbox is a registereed type, configurations will only be applied to checkbox + actionButtons: { + buttons: ['edit'] + } + } + } +} +``` + +
+ +
Disable the conditions panel for a specific field + +```javascript +{ + fields: { + 'a33bcc32-c54c-46ed-9609-7cdb5b3dc511': { // apply to a specific field + panels: { + disabled: [ + 'conditions' + ] + } + } + } +} +``` + +
**** diff --git a/docs/options/events/index.md b/docs/options/events/index.md new file mode 100644 index 00000000..ed5efacf --- /dev/null +++ b/docs/options/events/index.md @@ -0,0 +1,9 @@ +# Events +Events are emitted by interacting with the form. Below are a list of built-in events. + +| Option | Type | Description | +| -------------------- | -------- | --------------------------- | +| [onAdd](#) | Function | Fires when element is added | +| [onSave](#) | Function | Fires when form is saved | +| [onUpdate](#) | Function | Fires when form is updated | +| [confirmClearAll](#) | Function | Fires when form is cleared | diff --git a/docs/options/i18n/index.md b/docs/options/i18n/index.md new file mode 100644 index 00000000..80d1a905 --- /dev/null +++ b/docs/options/i18n/index.md @@ -0,0 +1,29 @@ +# i18N +Configure Formeo to use any language. + +| Option | Type | Description | Example | Default | +| -------------- | ------ | ------------------------------ | -------------------------------------- | ---------------- | +| [extension](#) | String | language file extension | `'.txt'` | `'.lang'` | +| [locale](#) | String | starting locale | `'de-DE'` | `'en-US'` | +| [location](#) | String | fetchable path | `'path/to/language/files'` | `'assets/lang/'` | +| [langs](#) | Array | array of available locales | `['en-US', 'pt-PT']` | `['en-US']` | +| [override](#) | Object | entire dictionary or overrides | `{'en-US': {textInput: 'Short Text'}}` | `{en-US: {...}}` | + +Full Example + +```javascript +// formeo options +{ + i18n: { + extension: '.lang', + location: 'assets/lang/', + langs: ['hu-HU', 'en-US'], + locale: 'hu-HU', + override: { + 'hu-HU': { + success: 'Siker' + } + } + } +} +``` diff --git a/docs/options/index.md b/docs/options/index.md new file mode 100644 index 00000000..50f24ef8 --- /dev/null +++ b/docs/options/index.md @@ -0,0 +1,27 @@ +# Options + +| Option | Type | Description | Example | Default | +| ----------------------- | ------------ | ------------------------------------------------------------------------------- | ---------------------- | --------------------------------- | +| [allowEdit](#allowEdit) | Boolean | When set to false, formData can only be rendered. | `true` \| `false` | `true` | +| [debug](#debug) | Boolean | debug mode | `true` \| `false` | `false` | +| [editorContainer](#) | String\|Node | Define where this instance of Formeo will be added. | `'.editor-wrap'` | `'.formeo-wrap'` | +| [svgSprite](#) | String | loads an svg sprite | `'path/to/svsprite'` | `'https://.../formeo-sprite.svg'` | +| [style](#) | String | loads a stylesheet to the page | `'path/to/stylesheet'` | `null` | +| [sessionStorage](#) | Boolean | save form template state in sessionStorage | `true` \| `false` | `null` | +| [iconFontFallback](#) | String | use existing icon font as fallback | `'glyphicons'` | `null` | +| [events](events/) | Object | define callbacks for specific events | `{onAdd: ...}` | `null` | +| [actions](actions/) | Object | define handlers for specific actions | `{add: {option: ...}}` | `null` | +| [config](config/) | Object | disable, add, reorder and modify rows, columns, fields and their action buttons | `{}` | `{}` | + +## allowEdit +Set whether you want to allow editing on the current instance of Formeo. *deprecated* + +## debug +Sets the editor in debug mode for verbose logging + +## editorContainer +Attach the Formeo editor to an existing DOM element + +## svgSprite +Formeo ships with its own svg sprite for icons. With this option you can load a different one or use an existing sprite on the page. To avoid loading the default option of `'https://draggable.github.io/formeo/assets/img/formeo-sprite.svg'`, set to `null`. Note* be sure there is an svg sprite with the id "formeo-sprite" in your document at the time Formeo is instantiated. + diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index 38a71692..00000000 --- a/mkdocs.yml +++ /dev/null @@ -1,21 +0,0 @@ -site_name: Formeo -site_url: http://draggable.github.io/formeo/ -repo_url: https://github.com/Draggable/formeo.git -repo_name: 'GitHub' -site_description: A highly configurable drag & drop form building module written in pure JavaScript. -site_favicon: favicon.ico -theme: readthedocs -pages: -- Introduction: index.md -- Options: options.md -- Demos: - - Basic: demos/basic.md -- About: - - License: license.md -extra_css: - - 'css/site.css' - - '//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/styles/monokai-sublime.min.css' -extra_javascript: - - 'js/scripts.js' - - '//assets.codepen.io/assets/embed/ei.js' - - '//sidecar.gitter.im/dist/sidecar.v1.js' diff --git a/now.json b/now.json deleted file mode 100644 index ef511074..00000000 --- a/now.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "formeo", - "alias": "formeo", - "type": "static", - "files": [ - "demo" - ] -} diff --git a/package.json b/package.json index 3ce076c1..962090f3 100644 --- a/package.json +++ b/package.json @@ -117,6 +117,8 @@ "defaults": "webpack-defaults" }, "devDependencies": { + "@commitlint/cli": "^7.5.2", + "@commitlint/config-angular": "^7.5.0", "@semantic-release/changelog": "3.0.0", "@semantic-release/git": "7.0.1", "@semantic-release/npm": "5.0.2", @@ -225,7 +227,33 @@ }, "husky": { "hooks": { - "pre-commit": "lint-staged" + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", + "pre-commit": "lint-staged", + "pre-push": "npm run lint" + } + }, + "commitlint": { + "extends": [ + "@commitlint/config-angular" + ], + "rules": { + "type-enum": [ + 2, + "always", + [ + "build", + "chore", + "ci", + "docs", + "feat", + "fix", + "perf", + "refactor", + "revert", + "style", + "test" + ] + ] } } } diff --git a/src/demo/index.html b/src/demo/index.html index dabc527a..791fc7aa 100644 --- a/src/demo/index.html +++ b/src/demo/index.html @@ -14,7 +14,6 @@ <% } %> Formeo | Drag & Drop Form Creation -
diff --git a/src/demo/js/demo.js b/src/demo/js/demo.js index 0bdc566a..c686ebc3 100644 --- a/src/demo/js/demo.js +++ b/src/demo/js/demo.js @@ -6,7 +6,6 @@ import { editorEvents } from './events' import FormeoEditor from '../../js/editor' import FormeoRenderer from '../../js/renderer' - const editor = new FormeoEditor(editorOptions) const renderer = new FormeoRenderer(renderOptions) diff --git a/src/demo/js/options/config.js b/src/demo/js/options/config.js index f8bf3acf..3cf6d845 100644 --- a/src/demo/js/options/config.js +++ b/src/demo/js/options/config.js @@ -1,4 +1,13 @@ const config = { + rows: { + all: { + events: { + onRender: element => { + console.log(`You just added a new row with the id "${element.id}"`) + }, + }, + }, + }, fields: { checkbox: { actionButtons: { diff --git a/src/js/common/actions.js b/src/js/common/actions.js index 2fd6b9ae..2164a1a0 100644 --- a/src/js/common/actions.js +++ b/src/js/common/actions.js @@ -35,15 +35,21 @@ const defaultActions = { evt.action() }, }, - save: identity, + save: { + form: identity, + }, } /** - * Events class is used to register actions and throttle their callbacks + * @todo refactor to handle multiple instances of formeo */ const actions = { init: function(options) { - this.opts = Object.assign({}, defaultActions, options) + const actionKeys = Object.keys(defaultActions) + this.opts = actionKeys.reduce((acc, key) => { + acc[key] = Object.assign({}, defaultActions[key], options[key]) + return acc + }, options) return this }, add: { @@ -64,13 +70,15 @@ const actions = { return actions.opts.click.btn(evt) }, }, - save: formData => { - if (actions.opts.sessionStorage) { - sessionStorage.set(SESSION_FORMDATA_KEY, formData) - } + save: { + form: formData => { + if (actions.opts.sessionStorage) { + sessionStorage.set(SESSION_FORMDATA_KEY, formData) + } - events.formeoSaved({ formData }) - return actions.opts.save(formData) + events.formeoSaved({ formData }) + return actions.opts.save.form(formData) + }, }, } diff --git a/src/js/components/controls/index.js b/src/js/components/controls/index.js index 9a7c64dc..f3def280 100644 --- a/src/js/components/controls/index.js +++ b/src/js/components/controls/index.js @@ -249,7 +249,7 @@ export class Controls { } actions.click.btn(saveEvt) - return actions.save(formData) + return actions.save.form(formData) }, }, } diff --git a/src/js/components/fields/field.js b/src/js/components/fields/field.js index 24911f1c..dce93ba1 100644 --- a/src/js/components/fields/field.js +++ b/src/js/components/fields/field.js @@ -306,7 +306,7 @@ export default class Field extends Component { } /** - * Checks if attribute is allowed to be removed + * Checks if property can be removed * @param {String} propName * @return {Boolean} */ diff --git a/src/js/config.js b/src/js/config.js index 2ae4421d..5d0e8298 100644 --- a/src/js/config.js +++ b/src/js/config.js @@ -1,6 +1,6 @@ import mi18n from 'mi18n' import { isIE } from './common/helpers' -import { FALLBACK_SVG_SPRITE, PACKAGE_NAME } from './constants' +import { FALLBACK_SVG_SPRITE } from './constants' // eslint-disable-next-line no-undef mi18n.addLanguage('en-US', EN_US) @@ -12,7 +12,7 @@ export const defaults = { dataType: 'json', debug: false, sessionStorage: false, - editorContainer: `.${PACKAGE_NAME}-wrap`, + editorContainer: null, // element or selector to attach editor to external: {}, // assign external data to be used in conditions autolinker svgSprite: FALLBACK_SVG_SPRITE, // change to null iconFont: null, // 'glyphicons' || 'font-awesome' || 'fontello' diff --git a/src/js/editor.js b/src/js/editor.js index 5b6f3dc9..b4f5d5f3 100644 --- a/src/js/editor.js +++ b/src/js/editor.js @@ -25,8 +25,10 @@ export class FormeoEditor { const mergedOptions = merge(defaults.editor, options) const { actions, events, debug, config, editorContainer, ...opts } = mergedOptions - this.editorContainer = - typeof editorContainer === 'string' ? document.querySelector(editorContainer) : editorContainer + if (editorContainer) { + this.editorContainer = + typeof editorContainer === 'string' ? document.querySelector(editorContainer) : editorContainer + } this.opts = opts dom.setOptions = opts Components.config = config @@ -126,10 +128,12 @@ export class FormeoEditor { dom.dir = i18n.current.dir } - const formeoEditor = dom.create(elemConfig) + this.editor = dom.create(elemConfig) - dom.empty(_this.editorContainer) - _this.editorContainer.appendChild(formeoEditor) + if (_this.editorContainer) { + dom.empty(_this.editorContainer) + _this.editorContainer.appendChild(this.editor) + } Events.formeoLoaded = new window.CustomEvent('formeoLoaded', { detail: { diff --git a/src/sass/components/_field-edit.scss b/src/sass/components/_field-edit.scss index 758085bc..87aef32b 100644 --- a/src/sass/components/_field-edit.scss +++ b/src/sass/components/_field-edit.scss @@ -103,6 +103,8 @@ .prop-wrap { position: relative; margin-bottom: space(1); + list-style: none; + margin-left: 0; } .field-edit-group { diff --git a/src/sass/components/_field.scss b/src/sass/components/_field.scss index da48b89b..26759ab2 100644 --- a/src/sass/components/_field.scss +++ b/src/sass/components/_field.scss @@ -3,7 +3,8 @@ position: relative; padding: space(); transition: background-color $animation-speed-base ease-in-out, box-shadow $animation-speed-base ease-in-out; - + list-style: none; + margin: 0; will-change: box-shadow; // for highlight &:last-child { diff --git a/src/sass/components/_group-actions.scss b/src/sass/components/_group-actions.scss index 40332023..6812d672 100644 --- a/src/sass/components/_group-actions.scss +++ b/src/sass/components/_group-actions.scss @@ -6,7 +6,7 @@ position: absolute; top: 0; line-height: 0; - z-index: 1; + z-index: 2; button { width: $action-btn-width; diff --git a/tools/webpack.config.js b/tools/webpack.config.js index fad1b65c..7c53c278 100644 --- a/tools/webpack.config.js +++ b/tools/webpack.config.js @@ -29,6 +29,7 @@ const copyPatterns = [ context: require.resolve('formeo-i18n').replace(/main.min.js$/, 'lang/'), }, ] + const plugins = [ new CleanWebpackPlugin(['dist/*', 'demo/*'], { root: projectRoot }), new DefinePlugin({ diff --git a/yarn.lock b/yarn.lock index 0612b21c..d7b3f104 100644 --- a/yarn.lock +++ b/yarn.lock @@ -698,6 +698,153 @@ lodash "^4.17.11" to-fast-properties "^2.0.0" +"@commitlint/cli@^7.5.2": + version "7.5.2" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-7.5.2.tgz#2475cd8f7ed3b2f9c2ab96c06bc24d61d23f8716" + integrity sha512-UQdW/wNb+XeANoYYLyuKEDIfWKSzdhJkPQZ8ie/IjfMNnsP+B23bkX4Ati+6U8zgz0yyngoxWl+3lfExiIL4hQ== + dependencies: + "@commitlint/format" "^7.5.0" + "@commitlint/lint" "^7.5.2" + "@commitlint/load" "^7.5.0" + "@commitlint/read" "^7.5.0" + babel-polyfill "6.26.0" + chalk "2.3.1" + get-stdin "5.0.1" + lodash "4.17.11" + meow "5.0.0" + resolve-from "4.0.0" + resolve-global "0.1.0" + +"@commitlint/config-angular-type-enum@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-angular-type-enum/-/config-angular-type-enum-7.5.0.tgz#fde0d0696c4a8886e39fa67daa76c38e8f68fecb" + integrity sha512-dpwnDaqda5gYY9U1XUHpOrtTi4YrlRLoSY1QYj44sCc1Bdi0k1fKi3IPPtLASlbxILP/O9qEGygCHBnC68mOnw== + +"@commitlint/config-angular@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-angular/-/config-angular-7.5.0.tgz#dcc869593c6201c74fe9aa8114f56f8e48b80332" + integrity sha512-aNchHhm/fVmkH0AI9dtOuYLs74Pum95Bp7PUGBk1+pMOy2Jb/NW095qDMfFS1Hmc2+FCQ8AmgNO2NulZDoTyOw== + dependencies: + "@commitlint/config-angular-type-enum" "^7.5.0" + +"@commitlint/ensure@^7.5.2": + version "7.5.2" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-7.5.2.tgz#57bb7dcbf1e9913e27c3b294325d0d68dd14cebf" + integrity sha512-ZMJKHhSJC789chKy0kWp8EWbCpLPy6vKa+fopUVx+tWL7H8AeBbibXlqAnybg+HWNcb/RD7ORROx0IsgrK4IYA== + dependencies: + lodash "4.17.11" + +"@commitlint/execute-rule@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-7.5.0.tgz#c9cfbab71eb962e1c46e78d76375e32754ab1e38" + integrity sha512-K66aoly8mxSHmBA/Y8bKSPPcCAR4GpJEsvHaLDYOG7GsyChu8NgCD53L8GUqPW8lBCWwnmCiSL+RlOkNHJ0Gag== + dependencies: + babel-runtime "6.26.0" + +"@commitlint/format@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-7.5.0.tgz#57a2b92dc58a3409b2be67c4c8c10bd1b28e9fe8" + integrity sha512-DEeQXfTLUm9kARliCBfw3SlQRAYjK2aXeRAUMs1HPhLA2tjNFFGv6LOpFFNdiu/WV+o1ojcgIvBBjpHaVT+Tvw== + dependencies: + babel-runtime "^6.23.0" + chalk "^2.0.1" + +"@commitlint/is-ignored@^7.5.1": + version "7.5.1" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-7.5.1.tgz#c4f7ffc1c8b4cf9dc3204d22ef8e78ff82536d67" + integrity sha512-8JZCgy6bWSnjOT5cTTiyEAGp+Y4+5CUknhVbyiPxTRbjy6yF0aMKs1gMTfHrNHTKsasgmkCyPQd4C2eOPceuKA== + dependencies: + semver "5.6.0" + +"@commitlint/lint@^7.5.2": + version "7.5.2" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-7.5.2.tgz#26cb819c74f8770413c4f6ef1e7abf1b739eda77" + integrity sha512-DY/UfGFDquMno+5c6+tE50rMxpjdQK3CRG+nktgYlVz1UAqeUD+bRc3pvX5HwAsuGvyDrWAjtszHtEDeYJKcjw== + dependencies: + "@commitlint/is-ignored" "^7.5.1" + "@commitlint/parse" "^7.5.0" + "@commitlint/rules" "^7.5.2" + babel-runtime "^6.23.0" + lodash "4.17.11" + +"@commitlint/load@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-7.5.0.tgz#2b225b97d631c2235d8b2084bc2fefb4d4d66719" + integrity sha512-fhBER/rzPsteM6zq5qqMiOi+A2bHKCE/0PKmOzYgaqTKcG9c1SsOle9phPemW85to8Gxd2YgUOVLsZkCMltLtA== + dependencies: + "@commitlint/execute-rule" "^7.5.0" + "@commitlint/resolve-extends" "^7.5.0" + babel-runtime "^6.23.0" + cosmiconfig "^4.0.0" + lodash "4.17.11" + resolve-from "^4.0.0" + +"@commitlint/message@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-7.5.0.tgz#2572fad648c769dd210374c8b95fb37124302bc5" + integrity sha512-5YOhsqy/MgHH7vyDsmmzO6Jr3ygr1pXbCm9NR3XB51wjg55Kd6/6dVlkhS/FmDp99pfwTdHb0TyeDFEjP98waw== + +"@commitlint/parse@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-7.5.0.tgz#d9374266493e5229ec61d92316d28e02419c600f" + integrity sha512-hWASM8SBFTBtlFkKrEtD1qW6yTe2BsfoRiMKuYyRCTd+739TUF17og5vgQVuWttbGP0gXaciW44NygS2YjZmfA== + dependencies: + conventional-changelog-angular "^1.3.3" + conventional-commits-parser "^2.1.0" + lodash "^4.17.11" + +"@commitlint/read@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-7.5.0.tgz#35d563b0f3075da2ce6945978996b16fb4acb0f8" + integrity sha512-uqGFCKZGnBUCTkxoCCJp4MfWUkegXkyT0T0RVM9diyG6uNWPWlMH1509sjLFlyeJKG+cSyYGG/d6T103ScMb4Q== + dependencies: + "@commitlint/top-level" "^7.5.0" + "@marionebl/sander" "^0.6.0" + babel-runtime "^6.23.0" + git-raw-commits "^1.3.0" + +"@commitlint/resolve-extends@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-7.5.0.tgz#d95a3058e83ddbaef5e3045835b9a3a1fba3422c" + integrity sha512-FRIyPuqGvGa03OT4VgOHakizcw8YR5rdm77JsZff1rSnpxk6i+025I6qMeHqCIr5FaVIA0kR3FlC+MJFUs165A== + dependencies: + babel-runtime "6.26.0" + import-fresh "^3.0.0" + lodash "4.17.11" + resolve-from "^4.0.0" + resolve-global "^0.1.0" + +"@commitlint/rules@^7.5.2": + version "7.5.2" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-7.5.2.tgz#da03d754625b2e67c0a6b8b9ab89eae1952a4f2e" + integrity sha512-eDN1UFPcBOjdnlI3syuo7y99SjGH/dUV6S9NvBocAye8ln5dfKiI2shhWochJhl36r/kYWU8Wrvl2NZJL3c52g== + dependencies: + "@commitlint/ensure" "^7.5.2" + "@commitlint/message" "^7.5.0" + "@commitlint/to-lines" "^7.5.0" + babel-runtime "^6.23.0" + +"@commitlint/to-lines@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-7.5.0.tgz#a24410d25bb85a5fff3b8d610277b3145f899766" + integrity sha512-ZQ3LxPNuQ/J7q42hkiPWN5fUIjWae85H2HHoBB+/Rw1fo+oehvr4Xyt+Oa9Mx5WbBnev/wXnUFjXgoadv1RZ5A== + +"@commitlint/top-level@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-7.5.0.tgz#01e740167e3d15110794192cd754f49f27d4a16d" + integrity sha512-oTu185GufTYHjTXPHu6k6HL7iuASOvDOtQizZWRSxj0VXuoki6e0HzvGZsRsycDTOn04Q9hVu+PhF83IUwRpeg== + dependencies: + find-up "^2.1.0" + +"@marionebl/sander@^0.6.0": + version "0.6.1" + resolved "https://registry.yarnpkg.com/@marionebl/sander/-/sander-0.6.1.tgz#1958965874f24bc51be48875feb50d642fc41f7b" + integrity sha1-GViWWHTyS8Ub5Ih1/rUNZC/EH3s= + dependencies: + graceful-fs "^4.1.3" + mkdirp "^0.5.1" + rimraf "^2.5.2" + "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" @@ -2063,7 +2210,7 @@ babel-plugin-transform-strict-mode@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-polyfill@^6.26.0: +babel-polyfill@6.26.0, babel-polyfill@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" integrity sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM= @@ -2142,7 +2289,7 @@ babel-register@^6.26.0: mkdirp "^0.5.1" source-map-support "^0.4.15" -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: +babel-runtime@6.26.0, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= @@ -2657,6 +2804,11 @@ callsites@^2.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= +callsites@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.0.0.tgz#fb7eb569b72ad7a45812f93fd9430a3e410b3dd3" + integrity sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw== + camel-case@3.0.x: version "3.0.0" resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" @@ -2757,6 +2909,15 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +chalk@2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" + integrity sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g== + dependencies: + ansi-styles "^3.2.0" + escape-string-regexp "^1.0.5" + supports-color "^5.2.0" + chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -3307,6 +3468,14 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== +conventional-changelog-angular@^1.3.3: + version "1.6.6" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz#b27f2b315c16d0a1f23eb181309d0e6a4698ea0f" + integrity sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg== + dependencies: + compare-func "^1.3.1" + q "^1.5.1" + conventional-changelog-angular@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.3.tgz#299fdd43df5a1f095283ac16aeedfb0a682ecab0" @@ -3339,6 +3508,19 @@ conventional-commits-filter@^2.0.0, conventional-commits-filter@^2.0.1: is-subset "^0.1.1" modify-values "^1.0.0" +conventional-commits-parser@^2.1.0: + version "2.1.7" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz#eca45ed6140d72ba9722ee4132674d639e644e8e" + integrity sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ== + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^4.0.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + conventional-commits-parser@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz#fe1c49753df3f98edb2285a5e485e11ffa7f2e4c" @@ -3423,6 +3605,16 @@ cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: parse-json "^2.2.0" require-from-string "^1.1.0" +cosmiconfig@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" + integrity sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ== + dependencies: + is-directory "^0.3.1" + js-yaml "^3.9.0" + parse-json "^4.0.0" + require-from-string "^2.0.1" + cosmiconfig@^5.0.0, cosmiconfig@^5.0.1, cosmiconfig@^5.0.2: version "5.1.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.1.0.tgz#6c5c35e97f37f985061cdf653f114784231185cf" @@ -3798,6 +3990,13 @@ cyclist@~0.2.2: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= +dargs@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= + dependencies: + number-is-nan "^1.0.0" + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -5386,16 +5585,16 @@ get-own-enumerable-property-symbols@^3.0.0: resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203" integrity sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg== +get-stdin@5.0.1, get-stdin@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + integrity sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g= + get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= -get-stdin@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" - integrity sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g= - get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -5432,6 +5631,17 @@ git-log-parser@^1.2.0: through2 "~2.0.0" traverse "~0.6.6" +git-raw-commits@^1.3.0: + version "1.3.6" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.6.tgz#27c35a32a67777c1ecd412a239a6c19d71b95aff" + integrity sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg== + dependencies: + dargs "^4.0.1" + lodash.template "^4.0.2" + meow "^4.0.0" + split2 "^2.0.0" + through2 "^2.0.0" + glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" @@ -5593,7 +5803,7 @@ got@^9.1.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.4, graceful-fs@^4.1.6, graceful-fs@^4.1.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.4, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== @@ -6049,6 +6259,14 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" +import-fresh@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390" + integrity sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-from@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1" @@ -7773,6 +7991,11 @@ lodash._getnative@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= +lodash._reinterpolate@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + lodash._root@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" @@ -7917,6 +8140,21 @@ lodash.tail@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.tail/-/lodash.tail-4.1.1.tgz#d2333a36d9e7717c8ad2f7cacafec7c32b444664" integrity sha1-0jM6NtnncXyK0vfKyv7HwytERmQ= +lodash.template@^4.0.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= + dependencies: + lodash._reinterpolate "~3.0.0" + lodash.toarray@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" @@ -7942,7 +8180,7 @@ lodash.without@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= -lodash@^4.0.0, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.10: +lodash@4.17.11, lodash@^4.0.0, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@~4.17.10: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== @@ -8187,6 +8425,21 @@ memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: errno "^0.1.3" readable-stream "^2.0.1" +meow@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" + integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== + dependencies: + camelcase-keys "^4.0.0" + decamelize-keys "^1.0.0" + loud-rejection "^1.0.0" + minimist-options "^3.0.1" + normalize-package-data "^2.3.4" + read-pkg-up "^3.0.0" + redent "^2.0.0" + trim-newlines "^2.0.0" + yargs-parser "^10.0.0" + meow@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" @@ -9681,6 +9934,13 @@ param-case@2.1.x: dependencies: no-case "^2.2.0" +parent-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5" + integrity sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA== + dependencies: + callsites "^3.0.0" + parse-asn1@^5.0.0: version "5.1.4" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.4.tgz#37f6628f823fbdeb2273b4d540434a22f3ef1fcc" @@ -11325,6 +11585,11 @@ require-from-string@^1.1.0: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= +require-from-string@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -11355,6 +11620,11 @@ resolve-cwd@^2.0.0: dependencies: resolve-from "^3.0.0" +resolve-from@4.0.0, resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" @@ -11365,10 +11635,12 @@ resolve-from@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" integrity sha1-six699nWiBvItuZTM17rywoYh0g= -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-global@0.1.0, resolve-global@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/resolve-global/-/resolve-global-0.1.0.tgz#8fb02cfd5b7db20118e886311f15af95bd15fbd9" + integrity sha1-j7As/Vt9sgEY6IYxHxWvlb0V+9k= + dependencies: + global-dirs "^0.1.0" resolve-url@^0.2.1: version "0.2.1" @@ -11633,7 +11905,7 @@ semver-regex@^2.0.0: resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== -"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: +"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@5.6.0, "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== @@ -12379,7 +12651,7 @@ supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^5.0.0, supports-color@^5.3.0, supports-color@^5.4.0: +supports-color@^5.0.0, supports-color@^5.2.0, supports-color@^5.3.0, supports-color@^5.4.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -13526,7 +13798,7 @@ yallist@^3.0.0, yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== -yargs-parser@^10.1.0: +yargs-parser@^10.0.0, yargs-parser@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==