mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-15 01:20:59 +00:00
Use rollup to bundle JS (ES6 modules)
This commit is contained in:
parent
f49ff38cff
commit
72bda8f3cb
47 changed files with 2330 additions and 1673 deletions
5
.babelrc
5
.babelrc
|
|
@ -10,11 +10,6 @@
|
||||||
"plugins": [
|
"plugins": [
|
||||||
["transform-object-rest-spread", {
|
["transform-object-rest-spread", {
|
||||||
"useBuiltIns": true
|
"useBuiltIns": true
|
||||||
}],
|
|
||||||
["transform-runtime", {
|
|
||||||
"helpers": true,
|
|
||||||
"polyfill": true,
|
|
||||||
"regenerator": true
|
|
||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
82
.editorconfig
Normal file
82
.editorconfig
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
# EditorConfig helps developers define and maintain consistent
|
||||||
|
# coding styles between different editors and IDEs
|
||||||
|
# editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
# Change these settings to your own preference
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
# We recommend you to keep these unchanged
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.feature]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.js]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.json]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.neon]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.php]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.sh]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.{yaml,yml}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[.babelrc]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[.gitmodules]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[.php_cs{,.dist}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[composer.json]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[package.json]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[phpspec.yml{,.dist}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[phpstan.neon]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[phpunit.xml{,.dist}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
extends: 'airbnb-base',
|
extends: 'airbnb-base',
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
'object-shorthand': ['error', 'always', {
|
||||||
|
avoidQuotes: true,
|
||||||
|
avoidExplicitReturnArrows: true,
|
||||||
|
}],
|
||||||
'function-paren-newline': ['error', 'consistent'],
|
'function-paren-newline': ['error', 'consistent'],
|
||||||
'max-len': ['warn', 120, 2, {
|
'max-len': ['warn', 120, 2, {
|
||||||
ignoreUrls: true,
|
ignoreUrls: true,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
{
|
{
|
||||||
// Other registrered bundles
|
// Other registrered bundles
|
||||||
|
|
||||||
if (in_array($this->getEnvironment(), ['prod']))
|
if (in_array($this->getEnvironment(), ['prod']))
|
||||||
{
|
{
|
||||||
$bundles[] = new \Symfony\Bundle\WebServerBundle\WebServerBundle();
|
$bundles[] = new \Symfony\Bundle\WebServerBundle\WebServerBundle();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const config = [
|
||||||
|
|
||||||
export const buildAdmin = function buildAdmin() {
|
export const buildAdmin = function buildAdmin() {
|
||||||
return gulp.src('src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
|
return gulp.src('src/Sylius/Bundle/AdminBundle/gulpfile.babel.js', { read: false })
|
||||||
.pipe(chug({ args: config }));
|
.pipe(chug({ args: config, tasks: 'build' }));
|
||||||
};
|
};
|
||||||
buildAdmin.description = 'Build admin assets.';
|
buildAdmin.description = 'Build admin assets.';
|
||||||
|
|
||||||
|
|
@ -39,7 +39,7 @@ watchAdmin.description = 'Watch admin asset sources and rebuild on changes.';
|
||||||
|
|
||||||
export const buildShop = function buildShop() {
|
export const buildShop = function buildShop() {
|
||||||
return gulp.src('src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
|
return gulp.src('src/Sylius/Bundle/ShopBundle/gulpfile.babel.js', { read: false })
|
||||||
.pipe(chug({ args: config }));
|
.pipe(chug({ args: config, tasks: 'build' }));
|
||||||
};
|
};
|
||||||
buildShop.description = 'Build shop assets.';
|
buildShop.description = 'Build shop assets.';
|
||||||
|
|
||||||
|
|
|
||||||
22
package.json
22
package.json
|
|
@ -1,18 +1,23 @@
|
||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-runtime": "^6.26.0",
|
"babel-polyfill": "^6.26.0",
|
||||||
"jquery": "^3.2.0",
|
"jquery": "^3.2.0",
|
||||||
"lightbox2": "^2.9.0",
|
"lightbox2": "^2.9.0",
|
||||||
"semantic-ui-css": "^2.2.0"
|
"semantic-ui-css": "^2.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"babel-core": "^6.26.3",
|
||||||
|
"babel-plugin-external-helpers": "^6.22.0",
|
||||||
|
"babel-plugin-module-resolver": "^3.1.1",
|
||||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||||
"babel-plugin-transform-runtime": "^6.23.0",
|
|
||||||
"babel-preset-env": "^1.7.0",
|
"babel-preset-env": "^1.7.0",
|
||||||
"babel-register": "^6.26.0",
|
"babel-register": "^6.26.0",
|
||||||
|
"dedent": "^0.7.0",
|
||||||
"eslint": "^4.19.1",
|
"eslint": "^4.19.1",
|
||||||
"eslint-config-airbnb-base": "^12.1.0",
|
"eslint-config-airbnb-base": "^12.1.0",
|
||||||
|
"eslint-import-resolver-babel-module": "^4.0.0",
|
||||||
"eslint-plugin-import": "^2.11.0",
|
"eslint-plugin-import": "^2.11.0",
|
||||||
|
"fast-async": "^6.3.7",
|
||||||
"gulp": "^4.0.0",
|
"gulp": "^4.0.0",
|
||||||
"gulp-chug": "^0.5",
|
"gulp-chug": "^0.5",
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-concat": "^2.6.0",
|
||||||
|
|
@ -22,17 +27,22 @@
|
||||||
"gulp-order": "^1.1.1",
|
"gulp-order": "^1.1.1",
|
||||||
"gulp-sass": "^4.0.1",
|
"gulp-sass": "^4.0.1",
|
||||||
"gulp-sourcemaps": "^1.6.0",
|
"gulp-sourcemaps": "^1.6.0",
|
||||||
"gulp-uglify": "^1.5.1",
|
|
||||||
"gulp-uglifycss": "^1.0.5",
|
"gulp-uglifycss": "^1.0.5",
|
||||||
"merge-stream": "^1.0.0",
|
"merge-stream": "^1.0.0",
|
||||||
|
"rollup": "^0.60.2",
|
||||||
|
"rollup-plugin-babel": "^3.0.4",
|
||||||
|
"rollup-plugin-commonjs": "^9.1.3",
|
||||||
|
"rollup-plugin-inject": "^2.0.0",
|
||||||
|
"rollup-plugin-node-resolve": "^3.3.0",
|
||||||
|
"rollup-plugin-uglify": "^4.0.0",
|
||||||
"upath": "^1.1.0",
|
"upath": "^1.1.0",
|
||||||
"yargs": "^6.4.0"
|
"yargs": "^6.4.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp",
|
"build": "gulp build",
|
||||||
"gulp": "gulp",
|
"gulp": "gulp build",
|
||||||
"lint": "yarn lint:js",
|
"lint": "yarn lint:js",
|
||||||
"lint:js": "eslint gulpfile.babel.js src/Sylius/Bundle/AdminBundle/gulpfile.babel.js src/Sylius/Bundle/ShopBundle/gulpfile.babel.js"
|
"lint:js": "eslint gulpfile.babel.js src/Sylius/Bundle/AdminBundle/gulpfile.babel.js src/Sylius/Bundle/ShopBundle/gulpfile.babel.js src/Sylius/Bundle/UiBundle/Resources/private/js src/Sylius/Bundle/AdminBundle/Resources/private/js src/Sylius/Bundle/ShopBundle/Resources/private/js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
||||||
29
src/Sylius/Bundle/AdminBundle/Resources/private/.eslintrc.js
Normal file
29
src/Sylius/Bundle/AdminBundle/Resources/private/.eslintrc.js
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: 'airbnb-base',
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'object-shorthand': ['error', 'always', {
|
||||||
|
avoidQuotes: true,
|
||||||
|
avoidExplicitReturnArrows: true,
|
||||||
|
}],
|
||||||
|
'function-paren-newline': ['error', 'consistent'],
|
||||||
|
'max-len': ['warn', 120, 2, {
|
||||||
|
ignoreUrls: true,
|
||||||
|
ignoreComments: false,
|
||||||
|
ignoreRegExpLiterals: true,
|
||||||
|
ignoreStrings: true,
|
||||||
|
ignoreTemplateLiterals: true,
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
'import/resolver': {
|
||||||
|
'babel-module': {
|
||||||
|
alias: {
|
||||||
|
'sylius/ui': './src/Sylius/Bundle/UiBundle/Resources/private/js',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
@ -7,77 +7,97 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function($) {
|
import 'semantic-ui-css/components/accordion';
|
||||||
$(document).ready(function () {
|
import $ from 'jquery';
|
||||||
$('#sylius_product_variant_pricingCalculator').handlePrototypes({
|
|
||||||
'prototypePrefix': 'sylius_product_variant_pricingCalculator',
|
|
||||||
'containerSelector': '#sylius_calculator_container'
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#sylius_customer_createUser').change(function () {
|
import 'sylius/ui/app';
|
||||||
$('#user-form').toggle();
|
import 'sylius/ui/sylius-auto-complete';
|
||||||
});
|
import 'sylius/ui/sylius-product-attributes';
|
||||||
|
import 'sylius/ui/sylius-product-auto-complete';
|
||||||
|
import 'sylius/ui/sylius-prototype-handler';
|
||||||
|
|
||||||
$('.sylius-autocomplete').autoComplete();
|
import './sylius-compound-form-errors';
|
||||||
|
import './sylius-lazy-choice-tree';
|
||||||
|
import './sylius-move-product';
|
||||||
|
import './sylius-move-product-variant';
|
||||||
|
import './sylius-move-taxon';
|
||||||
|
import './sylius-notification';
|
||||||
|
import './sylius-product-images-preview';
|
||||||
|
import './sylius-product-slug';
|
||||||
|
import './sylius-taxon-slug';
|
||||||
|
|
||||||
$('.product-select.ui.fluid.multiple.search.selection.dropdown').productAutoComplete();
|
$(document).ready(() => {
|
||||||
$('div#attributeChoice > .ui.dropdown.search').productAttributes();
|
$('#sylius_product_variant_pricingCalculator').handlePrototypes({
|
||||||
|
prototypePrefix: 'sylius_product_variant_pricingCalculator',
|
||||||
|
containerSelector: '#sylius_calculator_container',
|
||||||
|
});
|
||||||
|
|
||||||
$('table thead th.sortable').on('click', function () {
|
$('#sylius_customer_createUser').change(() => {
|
||||||
window.location = $(this).find('a').attr('href');
|
$('#user-form').toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.sylius-update-product-taxons').moveProduct($('.sylius-product-taxon-position'));
|
$('.sylius-autocomplete').autoComplete();
|
||||||
$('.sylius-update-product-variants').moveProductVariant($('.sylius-product-variant-position'));
|
|
||||||
$('.sylius-taxon-move-up').taxonMoveUp();
|
|
||||||
$('.sylius-taxon-move-down').taxonMoveDown();
|
|
||||||
|
|
||||||
$('#sylius_shipping_method_calculator').handlePrototypes({
|
$('.product-select.ui.fluid.multiple.search.selection.dropdown').productAutoComplete();
|
||||||
'prototypePrefix': 'sylius_shipping_method_calculator_calculators',
|
$('div#attributeChoice > .ui.dropdown.search').productAttributes();
|
||||||
'containerSelector': '.configuration'
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#actions a[data-form-collection="add"]').on('click', function () {
|
$('table thead th.sortable').on('click', (event) => {
|
||||||
setTimeout(function(){
|
window.location = $(event.currentTarget).find('a').attr('href');
|
||||||
$('select[name^="sylius_promotion[actions]"][name$="[type]"]').last().change();
|
});
|
||||||
}, 50);
|
|
||||||
});
|
|
||||||
$('#rules a[data-form-collection="add"]').on('click', function () {
|
|
||||||
setTimeout(function(){
|
|
||||||
$('select[name^="sylius_promotion[rules]"][name$="[type]"]').last().change();
|
|
||||||
}, 50);
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('collection-form-add', function () {
|
$('.sylius-update-product-taxons').moveProduct($('.sylius-product-taxon-position'));
|
||||||
$.each($('.sylius-autocomplete'), function (index, element) {
|
$('.sylius-update-product-variants').moveProductVariant($('.sylius-product-variant-position'));
|
||||||
if ($._data($(element).get(0), 'events') == undefined) {
|
$('.sylius-taxon-move-up').taxonMoveUp();
|
||||||
$(element).autoComplete();
|
$('.sylius-taxon-move-down').taxonMoveDown();
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$(document).on('collection-form-update', function () {
|
|
||||||
$.each($('.sylius-autocomplete'), function (index, element) {
|
|
||||||
if ($._data($(element).get(0), 'events') == undefined) {
|
|
||||||
$(element).autoComplete();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.sylius-tabular-form').addTabErrors();
|
$('#sylius_shipping_method_calculator').handlePrototypes({
|
||||||
$('.ui.accordion').addAccordionErrors();
|
prototypePrefix: 'sylius_shipping_method_calculator_calculators',
|
||||||
$('#sylius-product-taxonomy-tree').choiceTree('productTaxon', true, 1);
|
containerSelector: '.configuration',
|
||||||
|
});
|
||||||
|
|
||||||
$(document).notification();
|
$('#actions a[data-form-collection="add"]').on('click', () => {
|
||||||
$(document).productSlugGenerator();
|
setTimeout(() => {
|
||||||
$(document).taxonSlugGenerator();
|
$('select[name^="sylius_promotion[actions]"][name$="[type]"]').last().change();
|
||||||
|
}, 50);
|
||||||
|
});
|
||||||
|
$('#rules a[data-form-collection="add"]').on('click', () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
$('select[name^="sylius_promotion[rules]"][name$="[type]"]').last().change();
|
||||||
|
}, 50);
|
||||||
|
});
|
||||||
|
|
||||||
$(document).previewUploadedImage('#sylius_product_images');
|
$(document).on('collection-form-add', () => {
|
||||||
$(document).previewUploadedImage('#sylius_taxon_images');
|
$('.sylius-autocomplete').each((index, element) => {
|
||||||
|
if ($._data($(element).get(0), 'events') == undefined) {
|
||||||
$('body').on('DOMNodeInserted', '[data-form-collection="item"]', function() {
|
$(element).autoComplete();
|
||||||
if ($(this).find('.accordion').length > 0) {
|
}
|
||||||
$(this).find('.accordion').accordion();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
})(jQuery);
|
});
|
||||||
|
$(document).on('collection-form-update', () => {
|
||||||
|
$('.sylius-autocomplete').each((index, element) => {
|
||||||
|
if ($._data($(element).get(0), 'events') == undefined) {
|
||||||
|
$(element).autoComplete();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.sylius-tabular-form').addTabErrors();
|
||||||
|
$('.ui.accordion').addAccordionErrors();
|
||||||
|
$('#sylius-product-taxonomy-tree').choiceTree('productTaxon', true, 1);
|
||||||
|
|
||||||
|
$(document).notification();
|
||||||
|
$(document).productSlugGenerator();
|
||||||
|
$(document).taxonSlugGenerator();
|
||||||
|
|
||||||
|
$(document).previewUploadedImage('#sylius_product_images');
|
||||||
|
$(document).previewUploadedImage('#sylius_taxon_images');
|
||||||
|
|
||||||
|
$('body').on('DOMNodeInserted', '[data-form-collection="item"]', (event) => {
|
||||||
|
if ($(event.relatedNode).find('.accordion').length > 0) {
|
||||||
|
$(event.relatedNode).find('.accordion').accordion();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
window.$ = $;
|
||||||
|
window.jQuery = $;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
import $ from 'jquery';
|
||||||
|
|
||||||
|
window.$ = $;
|
||||||
|
window.jQuery = $;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
import 'babel-polyfill';
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import 'semantic-ui-css/components/accordion';
|
||||||
|
import 'semantic-ui-css/components/api';
|
||||||
|
import 'semantic-ui-css/components/checkbox';
|
||||||
|
import 'semantic-ui-css/components/colorize';
|
||||||
|
import 'semantic-ui-css/components/dimmer';
|
||||||
|
import 'semantic-ui-css/components/dropdown';
|
||||||
|
import 'semantic-ui-css/components/embed';
|
||||||
|
import 'semantic-ui-css/components/form';
|
||||||
|
import 'semantic-ui-css/components/modal';
|
||||||
|
import 'semantic-ui-css/components/nag';
|
||||||
|
import 'semantic-ui-css/components/popup';
|
||||||
|
import 'semantic-ui-css/components/progress';
|
||||||
|
import 'semantic-ui-css/components/rating';
|
||||||
|
import 'semantic-ui-css/components/search';
|
||||||
|
import 'semantic-ui-css/components/shape';
|
||||||
|
import 'semantic-ui-css/components/sidebar';
|
||||||
|
import 'semantic-ui-css/components/site';
|
||||||
|
import 'semantic-ui-css/components/state';
|
||||||
|
import 'semantic-ui-css/components/sticky';
|
||||||
|
import 'semantic-ui-css/components/tab';
|
||||||
|
import 'semantic-ui-css/components/transition';
|
||||||
|
import 'semantic-ui-css/components/video';
|
||||||
|
import 'semantic-ui-css/components/visibility';
|
||||||
|
import 'semantic-ui-css/components/visit';
|
||||||
|
|
@ -7,40 +7,39 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($) {
|
import $ from 'jquery';
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
addTabErrors: function () {
|
addTabErrors() {
|
||||||
var element = $(this);
|
const element = this;
|
||||||
|
|
||||||
$('.ui.segment > .ui.tab').each(function () {
|
$('.ui.segment > .ui.tab').each((idx, el) => {
|
||||||
var errors = $(this).find('.sylius-validation-error');
|
const errors = $(el).find('.sylius-validation-error');
|
||||||
|
|
||||||
if(0 !== errors.length) {
|
if (errors.length !== 0) {
|
||||||
var tabName = $(this).attr('data-tab');
|
const tabName = $(el).attr('data-tab');
|
||||||
var tabWithErrors = $(element).find('a.item[data-tab="' + tabName + '"]');
|
const tabWithErrors = $(element).find(`a.item[data-tab="${tabName}"]`);
|
||||||
|
|
||||||
var label = tabWithErrors.html();
|
const label = tabWithErrors.html();
|
||||||
var newLabel = label + '<span class="ui small horizontal circular label" style="background-color: #DB2828">' + errors.length + '</span>';
|
const newLabel = `${label}<span class="ui small horizontal circular label" style="background-color: #DB2828">${errors.length}</span>`;
|
||||||
|
|
||||||
tabWithErrors.html(newLabel);
|
tabWithErrors.html(newLabel);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
addAccordionErrors: function () {
|
|
||||||
var element = $(this);
|
|
||||||
var accordionElements = element.find('.ui.content');
|
|
||||||
|
|
||||||
$(accordionElements).each(function () {
|
addAccordionErrors() {
|
||||||
var errors = $(this).find('.sylius-validation-error');
|
const element = this;
|
||||||
|
const accordionElements = element.find('.ui.content');
|
||||||
|
|
||||||
if(0 !== errors.length) {
|
$(accordionElements).each((idx, el) => {
|
||||||
var ribWithErrors = $(this).closest('[data-locale]').find('.title');
|
const errors = $(el).find('.sylius-validation-error');
|
||||||
|
|
||||||
ribWithErrors.css('color', '#DB2828');
|
if (errors.length !== 0) {
|
||||||
}
|
const ribWithErrors = $(el).closest('[data-locale]').find('.title');
|
||||||
});
|
|
||||||
}
|
ribWithErrors.css('color', '#DB2828');
|
||||||
})
|
}
|
||||||
})( jQuery );
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,166 +7,169 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($) {
|
import 'semantic-ui-css/components/api';
|
||||||
'use strict';
|
import 'semantic-ui-css/components/checkbox';
|
||||||
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
const createRootContainer = function createRootContainer() {
|
||||||
choiceTree: function (type, multiple, defaultLevel) {
|
return $('<div class="ui list"></div>');
|
||||||
var tree = $(this);
|
};
|
||||||
var loader = $(this).find('.dimmer');
|
|
||||||
var loadedLeafs = [];
|
|
||||||
var $input = $(this).find('input[type="hidden"]');
|
|
||||||
|
|
||||||
tree.api({
|
const createLeafContainerElement = function createLeafContainerElement() {
|
||||||
on: 'now',
|
return $('<div class="list"></div>');
|
||||||
method: 'GET',
|
};
|
||||||
url: tree.data('taxon-root-nodes-url'),
|
|
||||||
cache: false,
|
|
||||||
beforeSend: function(settings) {
|
|
||||||
loader.addClass('active');
|
|
||||||
|
|
||||||
return settings;
|
const createLeafIconElement = function createLeafIconElement() {
|
||||||
},
|
return $('<i class="folder icon"></i>');
|
||||||
onSuccess: function (response) {
|
};
|
||||||
var rootContainer = createRootContainer();
|
|
||||||
$.each(response, function (rootNodeIndex, rootNode) {
|
const createLeafTitleElement = function createLeafTitleElement() {
|
||||||
rootContainer.append(createLeaf(rootNode.name, rootNode.code, rootNode.hasChildren, multiple, rootNode.level));
|
return $('<div class="header"></div>');
|
||||||
});
|
};
|
||||||
tree.append(rootContainer);
|
|
||||||
loader.removeClass('active');
|
const createLeafTitleSpan = function createLeafTitleSpan(displayName) {
|
||||||
}
|
return $(`<span style="margin-right: 5px; cursor: pointer;">${displayName}</span>`);
|
||||||
|
};
|
||||||
|
|
||||||
|
const createLeafContentElement = function createLeafContentElement() {
|
||||||
|
return $('<div class="content"></div>');
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.extend({
|
||||||
|
choiceTree(type, multiple, defaultLevel) {
|
||||||
|
const tree = this;
|
||||||
|
const loader = tree.find('.dimmer');
|
||||||
|
const loadedLeafs = [];
|
||||||
|
const $input = tree.find('input[type="hidden"]');
|
||||||
|
|
||||||
|
const createCheckboxElement = function createCheckboxElement(name, code, multi) {
|
||||||
|
const chosenNodes = $input.val().split(',');
|
||||||
|
let checked = '';
|
||||||
|
if (chosenNodes.some(chosenCode => chosenCode === code)) {
|
||||||
|
checked = 'checked="checked"';
|
||||||
|
}
|
||||||
|
if (multi) {
|
||||||
|
return $(`<div class="ui checkbox" data-value="${code}"><input ${checked} type="checkbox" name="${type}"></div>`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $(`<div class="ui radio checkbox" data-value="${code}"><input ${checked} type="radio" name="${type}"></div>`);
|
||||||
|
};
|
||||||
|
|
||||||
|
const isLeafLoaded = function isLeafLoaded(code) {
|
||||||
|
return loadedLeafs.some(leafCode => leafCode === code);
|
||||||
|
};
|
||||||
|
|
||||||
|
let createLeafFunc;
|
||||||
|
|
||||||
|
const loadLeafAction = function loadLeafAction(parentCode, expandButton, content, icon, leafContainerElement) {
|
||||||
|
icon.toggleClass('open');
|
||||||
|
|
||||||
|
if (!isLeafLoaded(parentCode)) {
|
||||||
|
expandButton.api({
|
||||||
|
on: 'now',
|
||||||
|
url: tree.data('taxon-leafs-url'),
|
||||||
|
method: 'GET',
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
parentCode,
|
||||||
|
},
|
||||||
|
beforeSend(settings) {
|
||||||
|
loader.addClass('active');
|
||||||
|
|
||||||
|
return settings;
|
||||||
|
},
|
||||||
|
onSuccess(response) {
|
||||||
|
response.forEach((leafNode) => {
|
||||||
|
leafContainerElement.append((
|
||||||
|
createLeafFunc(leafNode.name, leafNode.code, leafNode.hasChildren, multiple, leafNode.level)
|
||||||
|
));
|
||||||
});
|
});
|
||||||
|
content.append(leafContainerElement);
|
||||||
|
loader.removeClass('active');
|
||||||
|
loadedLeafs.push(parentCode);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var createLeaf = function (name, code, hasChildren, multipleChoice, level) {
|
leafContainerElement.toggle();
|
||||||
var displayNameElement = createLeafTitleSpan(name);
|
};
|
||||||
var titleElement = createLeafTitleElement();
|
|
||||||
var iconElement = createLeafIconElement();
|
|
||||||
var checkboxElement = createCheckboxElement(name, code, multipleChoice);
|
|
||||||
|
|
||||||
bindCheckboxAction(checkboxElement);
|
const bindExpandLeafAction = function bindExpandLeafAction(parentCode, expandButton, content, icon, level) {
|
||||||
|
const leafContainerElement = createLeafContainerElement();
|
||||||
|
if (defaultLevel > level) {
|
||||||
|
loadLeafAction(parentCode, expandButton, content, icon, leafContainerElement);
|
||||||
|
}
|
||||||
|
|
||||||
var leafElement = $('<div class="item"></div>');
|
expandButton.click(() => {
|
||||||
var leafContentElement = createLeafContentElement();
|
loadLeafAction(parentCode, expandButton, content, icon, leafContainerElement);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
leafElement.append(iconElement);
|
const bindCheckboxAction = function bindCheckboxAction(checkboxElement) {
|
||||||
titleElement.append(displayNameElement);
|
checkboxElement.checkbox({
|
||||||
titleElement.append(checkboxElement);
|
onChange() {
|
||||||
leafContentElement.append(titleElement);
|
const $checkboxes = tree.find('.checkbox');
|
||||||
|
const checkedValues = [];
|
||||||
|
|
||||||
if (!hasChildren) {
|
$checkboxes.each((index, element) => {
|
||||||
iconElement.addClass('outline');
|
if ($(element).checkbox('is checked')) {
|
||||||
}
|
checkedValues.push($(element).data('value'));
|
||||||
if (hasChildren) {
|
}
|
||||||
bindExpandLeafAction(code, displayNameElement, leafContentElement, iconElement, level);
|
});
|
||||||
}
|
|
||||||
leafElement.append(leafContentElement);
|
|
||||||
|
|
||||||
return leafElement;
|
$input.val(checkedValues.join());
|
||||||
};
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
var createRootContainer = function () {
|
const createLeaf = function createLeaf(name, code, hasChildren, multipleChoice, level) {
|
||||||
return $('<div class="ui list"></div>');
|
const displayNameElement = createLeafTitleSpan(name);
|
||||||
};
|
const titleElement = createLeafTitleElement();
|
||||||
|
const iconElement = createLeafIconElement();
|
||||||
|
const checkboxElement = createCheckboxElement(name, code, multipleChoice);
|
||||||
|
|
||||||
var createLeafContainerElement = function () {
|
bindCheckboxAction(checkboxElement);
|
||||||
return $('<div class="list"></div>');
|
|
||||||
};
|
|
||||||
|
|
||||||
var createLeafIconElement = function () {
|
const leafElement = $('<div class="item"></div>');
|
||||||
return $('<i class="folder icon"></i>');
|
const leafContentElement = createLeafContentElement();
|
||||||
};
|
|
||||||
|
|
||||||
var createLeafTitleElement = function () {
|
leafElement.append(iconElement);
|
||||||
return $('<div class="header"></div>');
|
titleElement.append(displayNameElement);
|
||||||
};
|
titleElement.append(checkboxElement);
|
||||||
|
leafContentElement.append(titleElement);
|
||||||
|
|
||||||
var createLeafTitleSpan = function (displayName) {
|
if (!hasChildren) {
|
||||||
return $('<span style="margin-right: 5px; cursor: pointer;">'+displayName+'</span>')
|
iconElement.addClass('outline');
|
||||||
};
|
}
|
||||||
|
if (hasChildren) {
|
||||||
|
bindExpandLeafAction(code, displayNameElement, leafContentElement, iconElement, level);
|
||||||
|
}
|
||||||
|
leafElement.append(leafContentElement);
|
||||||
|
|
||||||
var createLeafContentElement = function () {
|
return leafElement;
|
||||||
return $('<div class="content"></div>');
|
};
|
||||||
};
|
createLeafFunc = createLeaf;
|
||||||
|
|
||||||
var createCheckboxElement = function (name, code, multiple) {
|
tree.api({
|
||||||
var chosenNodes = $input.val().split(',');
|
on: 'now',
|
||||||
var checked = '';
|
method: 'GET',
|
||||||
if (chosenNodes.some(function (chosenCode) {return chosenCode === code})) {
|
url: tree.data('taxon-root-nodes-url'),
|
||||||
checked = 'checked="checked"';
|
cache: false,
|
||||||
}
|
beforeSend(settings) {
|
||||||
if (multiple) {
|
loader.addClass('active');
|
||||||
return $('<div class="ui checkbox" data-value="'+code+'"><input '+checked+' type="checkbox" name="'+type+'"></div>');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $('<div class="ui radio checkbox" data-value="'+code+'"><input '+checked+' type="radio" name="'+type+'"></div>');
|
return settings;
|
||||||
};
|
},
|
||||||
|
onSuccess(response) {
|
||||||
var isLeafLoaded = function (code) {
|
const rootContainer = createRootContainer();
|
||||||
return loadedLeafs.some(function (leafCode) {
|
response.forEach((rootNode) => {
|
||||||
return leafCode === code;
|
rootContainer.append((
|
||||||
})
|
createLeaf(rootNode.name, rootNode.code, rootNode.hasChildren, multiple, rootNode.level)
|
||||||
};
|
));
|
||||||
|
});
|
||||||
var bindExpandLeafAction = function (parentCode, expandButton, content, icon, level) {
|
tree.append(rootContainer);
|
||||||
var leafContainerElement = createLeafContainerElement();
|
loader.removeClass('active');
|
||||||
if (defaultLevel > level) {
|
},
|
||||||
loadLeafAction(parentCode, expandButton, content, icon, leafContainerElement);
|
|
||||||
}
|
|
||||||
|
|
||||||
expandButton.click(function () {
|
|
||||||
loadLeafAction(parentCode, expandButton, content, icon, leafContainerElement);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
var loadLeafAction = function (parentCode, expandButton, content, icon, leafContainerElement) {
|
|
||||||
icon.toggleClass('open');
|
|
||||||
|
|
||||||
if (!isLeafLoaded(parentCode)) {
|
|
||||||
expandButton.api({
|
|
||||||
on: 'now',
|
|
||||||
url: tree.data('taxon-leafs-url'),
|
|
||||||
method: 'GET',
|
|
||||||
cache: false,
|
|
||||||
data: {
|
|
||||||
parentCode: parentCode
|
|
||||||
},
|
|
||||||
beforeSend: function(settings) {
|
|
||||||
loader.addClass('active');
|
|
||||||
|
|
||||||
return settings;
|
|
||||||
},
|
|
||||||
onSuccess: function (response) {
|
|
||||||
$.each(response, function (leafIndex, leafNode) {
|
|
||||||
leafContainerElement.append(createLeaf(leafNode.name, leafNode.code, leafNode.hasChildren, multiple, leafNode.level));
|
|
||||||
});
|
|
||||||
content.append(leafContainerElement);
|
|
||||||
loader.removeClass('active');
|
|
||||||
loadedLeafs.push(parentCode);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
leafContainerElement.toggle();
|
|
||||||
};
|
|
||||||
|
|
||||||
var bindCheckboxAction = function (checkboxElement) {
|
|
||||||
checkboxElement.checkbox({
|
|
||||||
onChange: function () {
|
|
||||||
var $checkboxes = tree.find('.checkbox');
|
|
||||||
var checkedValues = [];
|
|
||||||
|
|
||||||
$checkboxes.each(function () {
|
|
||||||
if ($(this).checkbox('is checked')) {
|
|
||||||
checkedValues.push($(this).data('value'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$input.val(checkedValues.join());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})(jQuery);
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,44 +7,43 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/api';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
moveProductVariant: function (positionInput) {
|
moveProductVariant(positionInput) {
|
||||||
var productVariantIds = [];
|
const productVariantRows = [];
|
||||||
var element = $(this);
|
const element = this;
|
||||||
|
|
||||||
element.api({
|
element.api({
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
beforeSend: function (settings) {
|
beforeSend(settings) {
|
||||||
settings.data = {
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
productVariants: productVariantIds,
|
settings.data = {
|
||||||
_csrf_token: element.data('csrf-token')
|
productVariants: productVariantRows,
|
||||||
};
|
_csrf_token: element.data('csrf-token'),
|
||||||
|
};
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
},
|
},
|
||||||
onSuccess: function (response) {
|
onSuccess() {
|
||||||
location.reload();
|
window.location.reload();
|
||||||
}
|
},
|
||||||
});
|
|
||||||
|
|
||||||
positionInput.on('input', function () {
|
|
||||||
var id = $(this).data('id');
|
|
||||||
var rowToEdit = productVariantIds.filter(function (productVariant){
|
|
||||||
return productVariant.id == id;
|
|
||||||
});
|
|
||||||
|
|
||||||
if(rowToEdit.length == 0) {
|
|
||||||
productVariantIds.push({
|
|
||||||
id: $(this).data('id'),
|
|
||||||
position: $(this).val()
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
rowToEdit[0].position = $(this).val();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})(jQuery);
|
|
||||||
|
positionInput.on('input', (event) => {
|
||||||
|
const input = $(event.currentTarget);
|
||||||
|
const productVariantId = input.data('id');
|
||||||
|
const row = productVariantRows.find(({ id }) => id === productVariantId);
|
||||||
|
|
||||||
|
if (!row) {
|
||||||
|
productVariantRows.push({
|
||||||
|
id: productVariantId,
|
||||||
|
position: input.val(),
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
row.position = input.val();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,44 +7,43 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/api';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
moveProduct: function (positionInput) {
|
moveProduct(positionInput) {
|
||||||
var productIds = [];
|
const productIds = [];
|
||||||
var element = $(this);
|
const element = this;
|
||||||
|
|
||||||
element.api({
|
element.api({
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
beforeSend: function (settings) {
|
beforeSend(settings) {
|
||||||
settings.data = {
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
productTaxons: productIds,
|
settings.data = {
|
||||||
_csrf_token: element.data('csrf-token')
|
productTaxons: productIds,
|
||||||
};
|
_csrf_token: element.data('csrf-token'),
|
||||||
|
};
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
},
|
},
|
||||||
onSuccess: function (response) {
|
onSuccess() {
|
||||||
location.reload();
|
window.location.reload();
|
||||||
}
|
},
|
||||||
});
|
|
||||||
|
|
||||||
positionInput.on('input', function () {
|
|
||||||
var id = $(this).data('id');
|
|
||||||
var rowToEdit = productIds.filter(function (productTaxon){
|
|
||||||
return productTaxon.id == id;
|
|
||||||
});
|
|
||||||
|
|
||||||
if(rowToEdit.length == 0) {
|
|
||||||
productIds.push({
|
|
||||||
id: $(this).data('id'),
|
|
||||||
position: $(this).val()
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
rowToEdit[0].position = $(this).val();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})(jQuery);
|
|
||||||
|
positionInput.on('input', (event) => {
|
||||||
|
const input = $(event.currentTarget);
|
||||||
|
const id = input.data('id');
|
||||||
|
const rowToEdit = productIds.filter(productTaxon => productTaxon.id == id);
|
||||||
|
|
||||||
|
if (rowToEdit.length === 0) {
|
||||||
|
productIds.push({
|
||||||
|
id: input.data('id'),
|
||||||
|
position: input.val(),
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
rowToEdit[0].position = input.val();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,41 +7,47 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($) {
|
import 'semantic-ui-css/components/api';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
taxonMoveUp: function () {
|
taxonMoveUp() {
|
||||||
$(this).api({
|
const element = this;
|
||||||
method: 'PUT',
|
|
||||||
on: 'click',
|
|
||||||
beforeSend: function (settings) {
|
|
||||||
settings.data = {
|
|
||||||
position: $(this).data('position') - 1
|
|
||||||
};
|
|
||||||
|
|
||||||
return settings;
|
element.api({
|
||||||
},
|
method: 'PUT',
|
||||||
onSuccess: function (response) {
|
on: 'click',
|
||||||
location.reload();
|
beforeSend(settings) {
|
||||||
}
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
});
|
settings.data = {
|
||||||
},
|
position: element.data('position') - 1,
|
||||||
taxonMoveDown: function () {
|
};
|
||||||
$(this).api({
|
|
||||||
method: 'PUT',
|
|
||||||
on: 'click',
|
|
||||||
beforeSend: function (settings) {
|
|
||||||
settings.data = {
|
|
||||||
position: $(this).data('position') + 1
|
|
||||||
};
|
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
},
|
},
|
||||||
onSuccess: function (response) {
|
onSuccess() {
|
||||||
location.reload();
|
window.location.reload();
|
||||||
}
|
},
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})(jQuery);
|
},
|
||||||
|
|
||||||
|
taxonMoveDown() {
|
||||||
|
const element = this;
|
||||||
|
|
||||||
|
element.api({
|
||||||
|
method: 'PUT',
|
||||||
|
on: 'click',
|
||||||
|
beforeSend(settings) {
|
||||||
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
|
settings.data = {
|
||||||
|
position: element.data('position') + 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
return settings;
|
||||||
|
},
|
||||||
|
onSuccess() {
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,109 +7,96 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($) {
|
import $ from 'jquery';
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.fn.extend({
|
const HUB_REQUEST_TIME = 'hub_request_time';
|
||||||
notification: function () {
|
const LAST_SYLIUS_VERSION = 'last_sylius_version';
|
||||||
var HUB_REQUEST_TIME = 'hub_request_time';
|
const SYLIUS_VERSION_DISMISSED = 'sylius_version_dismissed';
|
||||||
var LAST_SYLIUS_VERSION = 'last_sylius_version';
|
const MILISECONDS_MULTIPLIER = 1000;
|
||||||
var SYLIUS_VERSION_DISMISSED = 'sylius_version_dismissed';
|
|
||||||
var MILISECONDS_MULTIPLIER = 1000;
|
|
||||||
|
|
||||||
var notificationMenu = $('#sylius-version-notification');
|
const store = function store(key, value) {
|
||||||
var askFrequency = notificationMenu.attr('data-frequency') * MILISECONDS_MULTIPLIER;
|
localStorage.setItem(key, value);
|
||||||
|
};
|
||||||
|
|
||||||
$(notificationMenu).find('i[data-dismiss]').on('click', function () {
|
const retrieve = function retrieve(key) {
|
||||||
store(SYLIUS_VERSION_DISMISSED, getLatestSyliusVersion());
|
return localStorage.getItem(key);
|
||||||
|
};
|
||||||
|
|
||||||
updateNotification();
|
const milisecondsSinceLastRequest = function milisecondsSinceLastRequest() {
|
||||||
});
|
return new Date().getTime() - parseInt(retrieve(HUB_REQUEST_TIME), 10);
|
||||||
|
};
|
||||||
|
|
||||||
updateNotification();
|
const getDismissedSyliusVersion = function getDismissedSyliusVersion() {
|
||||||
|
return retrieve(SYLIUS_VERSION_DISMISSED);
|
||||||
|
};
|
||||||
|
|
||||||
function updateNotification() {
|
$.fn.extend({
|
||||||
if (isLatest() || isDismissed()) {
|
notification() {
|
||||||
hideNotification();
|
const notificationMenu = $('#sylius-version-notification');
|
||||||
|
const askFrequency = notificationMenu.attr('data-frequency') * MILISECONDS_MULTIPLIER;
|
||||||
|
|
||||||
return;
|
const getCurrentSyliusVersion = function getCurrentSyliusVersion() {
|
||||||
}
|
return notificationMenu.data('current-version');
|
||||||
|
};
|
||||||
|
|
||||||
showNotification();
|
const getLatestSyliusVersion = function getLatestSyliusVersion() {
|
||||||
}
|
if (retrieve(HUB_REQUEST_TIME) !== undefined && milisecondsSinceLastRequest() < askFrequency) {
|
||||||
|
return retrieve(LAST_SYLIUS_VERSION);
|
||||||
|
}
|
||||||
|
|
||||||
function showNotification()
|
$.ajax({
|
||||||
{
|
type: 'GET',
|
||||||
var notificationMenu = $('#sylius-version-notification');
|
url: notificationMenu.attr('data-url'),
|
||||||
|
accept: 'application/json',
|
||||||
|
success(response) {
|
||||||
|
if (undefined !== response && response.version !== retrieve(LAST_SYLIUS_VERSION)) {
|
||||||
|
store(LAST_SYLIUS_VERSION, response.version.toString());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
complete() {
|
||||||
|
store(HUB_REQUEST_TIME, new Date().getTime().toString());
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
$('#notifications').css('display', 'block');
|
return retrieve(LAST_SYLIUS_VERSION);
|
||||||
$('#no-notifications').css('display', 'none');
|
};
|
||||||
notificationMenu.find('.bell.icon').removeClass('outline').addClass('yellow');
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideNotification()
|
const isLatest = function isLatest() {
|
||||||
{
|
return getCurrentSyliusVersion() === getLatestSyliusVersion();
|
||||||
var notificationMenu = $('#sylius-version-notification');
|
};
|
||||||
|
|
||||||
$('#notifications').css('display', 'none');
|
const isDismissed = function isDismissed() {
|
||||||
$('#no-notifications').css('display', 'block');
|
return getLatestSyliusVersion() === getDismissedSyliusVersion();
|
||||||
notificationMenu.find('.bell.icon').removeClass('yellow').addClass('outline');
|
};
|
||||||
}
|
|
||||||
|
|
||||||
function getCurrentSyliusVersion()
|
const showNotification = function showNotification() {
|
||||||
{
|
$('#notifications').css('display', 'block');
|
||||||
return notificationMenu.data('current-version');
|
$('#no-notifications').css('display', 'none');
|
||||||
}
|
notificationMenu.find('.bell.icon').removeClass('outline').addClass('yellow');
|
||||||
|
};
|
||||||
|
|
||||||
function getLatestSyliusVersion()
|
const hideNotification = function hideNotification() {
|
||||||
{
|
$('#notifications').css('display', 'none');
|
||||||
if (retrieve(HUB_REQUEST_TIME) !== undefined && milisecondsSinceLastRequest() < askFrequency) {
|
$('#no-notifications').css('display', 'block');
|
||||||
return retrieve(LAST_SYLIUS_VERSION);
|
notificationMenu.find('.bell.icon').removeClass('yellow').addClass('outline');
|
||||||
}
|
};
|
||||||
|
|
||||||
$.ajax({
|
const updateNotification = function updateNotification() {
|
||||||
type: "GET",
|
if (isLatest() || isDismissed()) {
|
||||||
url: notificationMenu.attr('data-url'),
|
hideNotification();
|
||||||
accept: "application/json",
|
|
||||||
success: function (data) {
|
|
||||||
if (undefined !== data && data.version !== retrieve(LAST_SYLIUS_VERSION)) {
|
|
||||||
store(LAST_SYLIUS_VERSION, data.version.toString());
|
|
||||||
}
|
|
||||||
},
|
|
||||||
complete: function () {
|
|
||||||
store(HUB_REQUEST_TIME, new Date().getTime().toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return retrieve(LAST_SYLIUS_VERSION);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDismissedSyliusVersion()
|
showNotification();
|
||||||
{
|
};
|
||||||
return retrieve(SYLIUS_VERSION_DISMISSED);
|
|
||||||
}
|
|
||||||
|
|
||||||
function isLatest()
|
$(notificationMenu).find('i[data-dismiss]').on('click', () => {
|
||||||
{
|
store(SYLIUS_VERSION_DISMISSED, getLatestSyliusVersion());
|
||||||
return getCurrentSyliusVersion() === getLatestSyliusVersion();
|
|
||||||
}
|
|
||||||
|
|
||||||
function isDismissed()
|
updateNotification();
|
||||||
{
|
|
||||||
return getLatestSyliusVersion() === getDismissedSyliusVersion();
|
|
||||||
}
|
|
||||||
|
|
||||||
function milisecondsSinceLastRequest() {
|
|
||||||
return new Date().getTime() - parseInt(retrieve(HUB_REQUEST_TIME));
|
|
||||||
}
|
|
||||||
|
|
||||||
function store(key, value) {
|
|
||||||
localStorage.setItem(key, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function retrieve(key) {
|
|
||||||
return localStorage.getItem(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})(jQuery);
|
|
||||||
|
updateNotification();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,43 +1,50 @@
|
||||||
(function ( $ ) {
|
/*
|
||||||
'use strict';
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
$.fn.extend({
|
import $ from 'jquery';
|
||||||
previewUploadedImage: function (root) {
|
|
||||||
$(root + ' input[type="file"]').each(function() {
|
|
||||||
$(this).change(function() {
|
|
||||||
displayUploadedImage(this);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$(root + ' [data-form-collection="add"]').on('click', function() {
|
const displayUploadedImage = function displayUploadedImage(input) {
|
||||||
var self = $(this);
|
if (input.files && input.files[0]) {
|
||||||
|
const reader = new FileReader();
|
||||||
|
|
||||||
setTimeout(function() {
|
reader.onload = (event) => {
|
||||||
self.parent().find('.column:last-child input[type="file"]').on('change', function() {
|
const image = $(input).parent().siblings('.image');
|
||||||
displayUploadedImage(this);
|
|
||||||
});
|
if (image.length > 0) {
|
||||||
}, 500);
|
image.attr('src', event.target.result);
|
||||||
});
|
} else {
|
||||||
}
|
const img = $('<img class="ui small bordered image"/>');
|
||||||
|
img.attr('src', event.target.result);
|
||||||
|
$(input).parent().before(img);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
reader.readAsDataURL(input.files[0]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.extend({
|
||||||
|
previewUploadedImage(root) {
|
||||||
|
$(`${root} input[type="file"]`).each((idx, el) => {
|
||||||
|
$(el).change((event) => {
|
||||||
|
displayUploadedImage(event.currentTarget);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})( jQuery );
|
|
||||||
|
|
||||||
function displayUploadedImage(input) {
|
$(`${root} [data-form-collection="add"]`).on('click', (evt) => {
|
||||||
if (input.files && input.files[0]) {
|
const self = $(evt.currentTarget);
|
||||||
var reader = new FileReader();
|
|
||||||
|
|
||||||
reader.onload = function (e) {
|
setTimeout(() => {
|
||||||
var image = $(input).parent().siblings('.image');
|
self.parent().find('.column:last-child input[type="file"]').on('change', (event) => {
|
||||||
|
displayUploadedImage(event.currentTarget);
|
||||||
if (image.length > 0) {
|
});
|
||||||
image.attr('src', e.target.result);
|
}, 500);
|
||||||
} else {
|
});
|
||||||
var img = $('<img class="ui small bordered image"/>');
|
},
|
||||||
img.attr('src', e.target.result);
|
});
|
||||||
$(input).parent().before(img);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
reader.readAsDataURL(input.files[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -7,63 +7,61 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($) {
|
import $ from 'jquery';
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.fn.extend({
|
const updateSlug = function updateSlug(element) {
|
||||||
productSlugGenerator: function () {
|
const slugInput = element.parents('.content').find('[name*="[slug]"]');
|
||||||
var timeout;
|
const loadableParent = slugInput.parents('.field.loadable');
|
||||||
|
|
||||||
$('[name*="sylius_product[translations]"][name*="[name]"]').on('input', function() {
|
if (slugInput.attr('readonly') === 'readonly') {
|
||||||
clearTimeout(timeout);
|
return;
|
||||||
var element = $(this);
|
}
|
||||||
|
|
||||||
timeout = setTimeout(function() {
|
loadableParent.addClass('loading');
|
||||||
updateSlug(element);
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.toggle-product-slug-modification').on('click', function(e) {
|
$.ajax({
|
||||||
e.preventDefault();
|
type: 'GET',
|
||||||
toggleSlugModification($(this), $(this).siblings('input'));
|
url: slugInput.attr('data-url'),
|
||||||
});
|
data: { name: element.val() },
|
||||||
|
dataType: 'json',
|
||||||
|
accept: 'application/json',
|
||||||
|
success(response) {
|
||||||
|
slugInput.val(response.slug);
|
||||||
|
if (slugInput.parents('.field').hasClass('error')) {
|
||||||
|
slugInput.parents('.field').removeClass('error');
|
||||||
|
slugInput.parents('.field').find('.sylius-validation-error').remove();
|
||||||
|
}
|
||||||
|
loadableParent.removeClass('loading');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
function updateSlug(element) {
|
const toggleSlugModification = function toggleSlugModification(button, slugInput) {
|
||||||
var slugInput = element.parents('.content').find('[name*="[slug]"]');
|
if (slugInput.attr('readonly')) {
|
||||||
var loadableParent = slugInput.parents('.field.loadable');
|
slugInput.removeAttr('readonly');
|
||||||
|
button.html('<i class="unlock icon"></i>');
|
||||||
|
} else {
|
||||||
|
slugInput.attr('readonly', 'readonly');
|
||||||
|
button.html('<i class="lock icon"></i>');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if ('readonly' == slugInput.attr('readonly')) {
|
$.fn.extend({
|
||||||
return;
|
productSlugGenerator() {
|
||||||
}
|
let timeout;
|
||||||
|
|
||||||
loadableParent.addClass('loading');
|
$('[name*="sylius_product[translations]"][name*="[name]"]').on('input', (event) => {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
const element = $(event.currentTarget);
|
||||||
|
|
||||||
$.ajax({
|
timeout = setTimeout(() => {
|
||||||
type: "GET",
|
updateSlug(element);
|
||||||
url: slugInput.attr('data-url'),
|
}, 1000);
|
||||||
data: { name: element.val() },
|
|
||||||
dataType: "json",
|
|
||||||
accept: "application/json",
|
|
||||||
success: function(data) {
|
|
||||||
slugInput.val(data.slug);
|
|
||||||
if (slugInput.parents('.field').hasClass('error')) {
|
|
||||||
slugInput.parents('.field').removeClass('error');
|
|
||||||
slugInput.parents('.field').find('.sylius-validation-error').remove();
|
|
||||||
}
|
|
||||||
loadableParent.removeClass('loading');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleSlugModification(button, slugInput) {
|
|
||||||
if (slugInput.attr('readonly')) {
|
|
||||||
slugInput.removeAttr('readonly');
|
|
||||||
button.html('<i class="unlock icon"></i>');
|
|
||||||
} else {
|
|
||||||
slugInput.attr('readonly', 'readonly');
|
|
||||||
button.html('<i class="lock icon"></i>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})(jQuery);
|
|
||||||
|
$('.toggle-product-slug-modification').on('click', (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
toggleSlugModification($(event.currentTarget), $(event.currentTarget).siblings('input'));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,73 +7,81 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($) {
|
import $ from 'jquery';
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.fn.extend({
|
const updateSlug = function updateSlug(element) {
|
||||||
taxonSlugGenerator: function () {
|
const slugInput = element.parents('.content').find('[name*="[slug]"]');
|
||||||
var timeout;
|
const loadableParent = slugInput.parents('.field.loadable');
|
||||||
|
|
||||||
$('[name*="sylius_taxon[translations]"][name*="[name]"]').on('input', function() {
|
if (slugInput.attr('readonly') === 'readonly') {
|
||||||
clearTimeout(timeout);
|
return;
|
||||||
var element = $(this);
|
}
|
||||||
|
|
||||||
timeout = setTimeout(function() {
|
loadableParent.addClass('loading');
|
||||||
updateSlug(element);
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.toggle-taxon-slug-modification').on('click', function(e) {
|
let data;
|
||||||
e.preventDefault();
|
if (slugInput.attr('data-parent') != '' && slugInput.attr('data-parent') != undefined) {
|
||||||
toggleSlugModification($(this), $(this).siblings('input'));
|
data = {
|
||||||
});
|
name: element.val(),
|
||||||
|
locale: element.closest('[data-locale]').data('locale'),
|
||||||
|
parentId: slugInput.attr('data-parent'),
|
||||||
|
};
|
||||||
|
} else if ($('#sylius_taxon_parent').length > 0 && $('#sylius_taxon_parent').is(':visible') && $('#sylius_taxon_parent').val() != '') {
|
||||||
|
data = {
|
||||||
|
name: element.val(),
|
||||||
|
locale: element.closest('[data-locale]').data('locale'),
|
||||||
|
parentId: $('#sylius_taxon_parent').val(),
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
data = {
|
||||||
|
name: element.val(),
|
||||||
|
locale: element.closest('[data-locale]').data('locale'),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function updateSlug(element) {
|
$.ajax({
|
||||||
var slugInput = element.parents('.content').find('[name*="[slug]"]');
|
type: 'GET',
|
||||||
var loadableParent = slugInput.parents('.field.loadable');
|
url: slugInput.attr('data-url'),
|
||||||
|
data,
|
||||||
|
dataType: 'json',
|
||||||
|
accept: 'application/json',
|
||||||
|
success(response) {
|
||||||
|
slugInput.val(response.slug);
|
||||||
|
if (slugInput.parents('.field').hasClass('error')) {
|
||||||
|
slugInput.parents('.field').removeClass('error');
|
||||||
|
slugInput.parents('.field').find('.sylius-validation-error').remove();
|
||||||
|
}
|
||||||
|
loadableParent.removeClass('loading');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
if ('readonly' == slugInput.attr('readonly')) {
|
const toggleSlugModification = function toggleSlugModification(button, slugInput) {
|
||||||
return;
|
if (slugInput.attr('readonly')) {
|
||||||
}
|
slugInput.removeAttr('readonly');
|
||||||
|
button.html('<i class="unlock icon"></i>');
|
||||||
|
} else {
|
||||||
|
slugInput.attr('readonly', 'readonly');
|
||||||
|
button.html('<i class="lock icon"></i>');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
loadableParent.addClass('loading');
|
$.fn.extend({
|
||||||
|
taxonSlugGenerator() {
|
||||||
|
let timeout;
|
||||||
|
|
||||||
var data;
|
$('[name*="sylius_taxon[translations]"][name*="[name]"]').on('input', (event) => {
|
||||||
if ('' != slugInput.attr('data-parent') && undefined != slugInput.attr('data-parent')) {
|
clearTimeout(timeout);
|
||||||
data = { name: element.val(), locale: element.closest('[data-locale]').data('locale'), parentId: slugInput.attr('data-parent') };
|
const element = $(event.currentTarget);
|
||||||
} else if ($('#sylius_taxon_parent').length > 0 && $('#sylius_taxon_parent').is(':visible') && '' != $('#sylius_taxon_parent').val()) {
|
|
||||||
data = { name: element.val(), locale: element.closest('[data-locale]').data('locale'), parentId: $('#sylius_taxon_parent').val() };
|
|
||||||
} else {
|
|
||||||
data = { name: element.val(), locale: element.closest('[data-locale]').data('locale') };
|
|
||||||
}
|
|
||||||
|
|
||||||
$.ajax({
|
timeout = setTimeout(() => {
|
||||||
type: "GET",
|
updateSlug(element);
|
||||||
url: slugInput.attr('data-url'),
|
}, 1000);
|
||||||
data: data,
|
|
||||||
dataType: "json",
|
|
||||||
accept: "application/json",
|
|
||||||
success: function(data) {
|
|
||||||
slugInput.val(data.slug);
|
|
||||||
if (slugInput.parents('.field').hasClass('error')) {
|
|
||||||
slugInput.parents('.field').removeClass('error');
|
|
||||||
slugInput.parents('.field').find('.sylius-validation-error').remove();
|
|
||||||
}
|
|
||||||
loadableParent.removeClass('loading');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleSlugModification(button, slugInput) {
|
|
||||||
if (slugInput.attr('readonly')) {
|
|
||||||
slugInput.removeAttr('readonly');
|
|
||||||
button.html('<i class="unlock icon"></i>');
|
|
||||||
} else {
|
|
||||||
slugInput.attr('readonly', 'readonly');
|
|
||||||
button.html('<i class="lock icon"></i>');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery);
|
$('.toggle-taxon-slug-modification').on('click', (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
toggleSlugModification($(event.currentTarget), $(event.currentTarget).siblings('input'));
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,18 @@
|
||||||
|
import { rollup } from 'rollup';
|
||||||
|
import { uglify } from 'rollup-plugin-uglify';
|
||||||
|
import babel from 'rollup-plugin-babel';
|
||||||
|
import commonjs from 'rollup-plugin-commonjs';
|
||||||
import concat from 'gulp-concat';
|
import concat from 'gulp-concat';
|
||||||
|
import dedent from 'dedent';
|
||||||
import gulp from 'gulp';
|
import gulp from 'gulp';
|
||||||
import gulpif from 'gulp-if';
|
import gulpif from 'gulp-if';
|
||||||
|
import inject from 'rollup-plugin-inject';
|
||||||
import livereload from 'gulp-livereload';
|
import livereload from 'gulp-livereload';
|
||||||
import merge from 'merge-stream';
|
import merge from 'merge-stream';
|
||||||
import order from 'gulp-order';
|
import order from 'gulp-order';
|
||||||
|
import resolve from 'rollup-plugin-node-resolve';
|
||||||
import sass from 'gulp-sass';
|
import sass from 'gulp-sass';
|
||||||
import sourcemaps from 'gulp-sourcemaps';
|
import sourcemaps from 'gulp-sourcemaps';
|
||||||
import uglify from 'gulp-uglify';
|
|
||||||
import uglifycss from 'gulp-uglifycss';
|
import uglifycss from 'gulp-uglifycss';
|
||||||
import upath from 'upath';
|
import upath from 'upath';
|
||||||
import yargs from 'yargs';
|
import yargs from 'yargs';
|
||||||
|
|
@ -34,6 +40,11 @@ const { argv } = yargs
|
||||||
});
|
});
|
||||||
|
|
||||||
const env = process.env.GULP_ENV;
|
const env = process.env.GULP_ENV;
|
||||||
|
const options = {
|
||||||
|
minify: env === 'prod',
|
||||||
|
sourcemaps: env !== 'prod',
|
||||||
|
};
|
||||||
|
|
||||||
const rootPath = upath.normalizeSafe(argv.rootPath);
|
const rootPath = upath.normalizeSafe(argv.rootPath);
|
||||||
const adminRootPath = upath.joinSafe(rootPath, 'admin');
|
const adminRootPath = upath.joinSafe(rootPath, 'admin');
|
||||||
const vendorPath = upath.normalizeSafe(argv.vendorPath || '.');
|
const vendorPath = upath.normalizeSafe(argv.vendorPath || '.');
|
||||||
|
|
@ -44,8 +55,6 @@ const nodeModulesPath = upath.normalizeSafe(argv.nodeModulesPath);
|
||||||
const paths = {
|
const paths = {
|
||||||
admin: {
|
admin: {
|
||||||
js: [
|
js: [
|
||||||
upath.joinSafe(nodeModulesPath, 'jquery/dist/jquery.min.js'),
|
|
||||||
upath.joinSafe(nodeModulesPath, 'semantic-ui-css/semantic.min.js'),
|
|
||||||
upath.joinSafe(vendorUiPath, 'Resources/private/js/**'),
|
upath.joinSafe(vendorUiPath, 'Resources/private/js/**'),
|
||||||
upath.joinSafe(vendorAdminPath, 'Resources/private/js/**'),
|
upath.joinSafe(vendorAdminPath, 'Resources/private/js/**'),
|
||||||
],
|
],
|
||||||
|
|
@ -80,7 +89,7 @@ const sourcePathMap = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const mapSourcePath = function mapSourcePath(sourcePath /* , file */) {
|
const mapSourcePath = function mapSourcePath(sourcePath) {
|
||||||
const match = sourcePathMap.find(({ sourceDir }) => (
|
const match = sourcePathMap.find(({ sourceDir }) => (
|
||||||
sourcePath.substring(0, sourceDir.length) === sourceDir
|
sourcePath.substring(0, sourceDir.length) === sourceDir
|
||||||
));
|
));
|
||||||
|
|
@ -94,15 +103,88 @@ const mapSourcePath = function mapSourcePath(sourcePath /* , file */) {
|
||||||
return upath.joinSafe(destPath, sourcePath.substring(sourceDir.length));
|
return upath.joinSafe(destPath, sourcePath.substring(sourceDir.length));
|
||||||
};
|
};
|
||||||
|
|
||||||
export const buildAdminJs = function buildAdminJs() {
|
export const buildAdminJs = async function buildAdminJs() {
|
||||||
return gulp.src(paths.admin.js, { base: './' })
|
const bundle = await rollup({
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.init()))
|
input: upath.joinSafe(vendorAdminPath, 'Resources/private/js/app.js'),
|
||||||
.pipe(concat('app.js'))
|
plugins: [
|
||||||
.pipe(gulpif(env === 'prod', uglify()))
|
{
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.mapSources(mapSourcePath)))
|
name: 'shim-app',
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.write('./')))
|
|
||||||
.pipe(gulp.dest(upath.joinSafe(adminRootPath, 'js')))
|
transform(code, id) {
|
||||||
.pipe(livereload());
|
if (upath.relative('', id) === upath.relative('', upath.joinSafe(vendorAdminPath, 'Resources/private/js/app.js'))) {
|
||||||
|
return {
|
||||||
|
code: dedent`
|
||||||
|
import './shim/shim-polyfill';
|
||||||
|
import './shim/shim-jquery';
|
||||||
|
import './shim/shim-semantic-ui';
|
||||||
|
|
||||||
|
${code}
|
||||||
|
`,
|
||||||
|
map: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inject({
|
||||||
|
include: `${nodeModulesPath}/**`,
|
||||||
|
modules: {
|
||||||
|
$: 'jquery',
|
||||||
|
jQuery: 'jquery',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
resolve({
|
||||||
|
jail: upath.resolve(nodeModulesPath),
|
||||||
|
}),
|
||||||
|
commonjs({
|
||||||
|
include: `${nodeModulesPath}/**`,
|
||||||
|
}),
|
||||||
|
babel({
|
||||||
|
babelrc: false,
|
||||||
|
exclude: `${nodeModulesPath}/**`,
|
||||||
|
presets: [
|
||||||
|
['env', {
|
||||||
|
targets: {
|
||||||
|
browsers: [
|
||||||
|
'last 2 versions',
|
||||||
|
'Firefox ESR',
|
||||||
|
'IE >= 9',
|
||||||
|
'Android >= 4.0',
|
||||||
|
'iOS >= 7',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
modules: false,
|
||||||
|
exclude: [
|
||||||
|
'transform-async-to-generator',
|
||||||
|
'transform-regenerator',
|
||||||
|
],
|
||||||
|
useBuiltIns: true,
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
['external-helpers'],
|
||||||
|
['fast-async'],
|
||||||
|
['module-resolver', {
|
||||||
|
alias: {
|
||||||
|
'sylius/ui': upath.relative('', upath.joinSafe(vendorUiPath, 'Resources/private/js')),
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
['transform-object-rest-spread', {
|
||||||
|
useBuiltIns: false,
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
options.minify && uglify(),
|
||||||
|
],
|
||||||
|
treeshake: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
await bundle.write({
|
||||||
|
file: upath.joinSafe(adminRootPath, 'js/app.js'),
|
||||||
|
format: 'iife',
|
||||||
|
sourcemap: options.sourcemaps,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
buildAdminJs.description = 'Build admin js assets.';
|
buildAdminJs.description = 'Build admin js assets.';
|
||||||
|
|
||||||
|
|
@ -113,11 +195,11 @@ export const buildAdminCss = function buildAdminCss() {
|
||||||
);
|
);
|
||||||
|
|
||||||
const cssStream = gulp.src(paths.admin.css, { base: './' })
|
const cssStream = gulp.src(paths.admin.css, { base: './' })
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.init()))
|
.pipe(gulpif(options.sourcemaps, sourcemaps.init()))
|
||||||
.pipe(concat('css-files.css'));
|
.pipe(concat('css-files.css'));
|
||||||
|
|
||||||
const sassStream = gulp.src(paths.admin.sass, { base: './' })
|
const sassStream = gulp.src(paths.admin.sass, { base: './' })
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.init()))
|
.pipe(gulpif(options.sourcemaps, sourcemaps.init()))
|
||||||
.pipe(sass())
|
.pipe(sass())
|
||||||
.pipe(concat('sass-files.scss'));
|
.pipe(concat('sass-files.scss'));
|
||||||
|
|
||||||
|
|
@ -126,9 +208,9 @@ export const buildAdminCss = function buildAdminCss() {
|
||||||
merge(cssStream, sassStream)
|
merge(cssStream, sassStream)
|
||||||
.pipe(order(['css-files.css', 'sass-files.scss']))
|
.pipe(order(['css-files.css', 'sass-files.scss']))
|
||||||
.pipe(concat('style.css'))
|
.pipe(concat('style.css'))
|
||||||
.pipe(gulpif(env === 'prod', uglifycss()))
|
.pipe(gulpif(options.minify, uglifycss()))
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.mapSources(mapSourcePath)))
|
.pipe(gulpif(options.sourcemaps, sourcemaps.mapSources(mapSourcePath)))
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.write('./')))
|
.pipe(gulpif(options.sourcemaps, sourcemaps.write('./')))
|
||||||
.pipe(gulp.dest(upath.joinSafe(adminRootPath, 'css')))
|
.pipe(gulp.dest(upath.joinSafe(adminRootPath, 'css')))
|
||||||
.pipe(livereload()),
|
.pipe(livereload()),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
29
src/Sylius/Bundle/ShopBundle/Resources/private/.eslintrc.js
Normal file
29
src/Sylius/Bundle/ShopBundle/Resources/private/.eslintrc.js
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: 'airbnb-base',
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'object-shorthand': ['error', 'always', {
|
||||||
|
avoidQuotes: true,
|
||||||
|
avoidExplicitReturnArrows: true,
|
||||||
|
}],
|
||||||
|
'function-paren-newline': ['error', 'consistent'],
|
||||||
|
'max-len': ['warn', 120, 2, {
|
||||||
|
ignoreUrls: true,
|
||||||
|
ignoreComments: false,
|
||||||
|
ignoreRegExpLiterals: true,
|
||||||
|
ignoreStrings: true,
|
||||||
|
ignoreTemplateLiterals: true,
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
'import/resolver': {
|
||||||
|
'babel-module': {
|
||||||
|
alias: {
|
||||||
|
'sylius/ui': './src/Sylius/Bundle/UiBundle/Resources/private/js',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
@ -7,60 +7,72 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import 'semantic-ui-css/components/popup';
|
||||||
|
import 'semantic-ui-css/components/rating';
|
||||||
|
import $ from 'jquery';
|
||||||
|
|
||||||
(function($) {
|
import 'sylius/ui/app';
|
||||||
$(document).ready(function () {
|
import 'sylius/ui/sylius-api-login';
|
||||||
$('.cart.button')
|
import 'sylius/ui/sylius-api-toggle';
|
||||||
.popup({
|
|
||||||
popup: $('.cart.popup'),
|
|
||||||
on: 'click',
|
|
||||||
})
|
|
||||||
;
|
|
||||||
|
|
||||||
$('.star.rating').rating({
|
import './sylius-add-to-cart';
|
||||||
fireOnInit: true,
|
import './sylius-address-book';
|
||||||
onRate: function(value) {
|
import './sylius-province-field';
|
||||||
$("[name='sylius_product_review[rating]']:checked").removeAttr('checked');
|
import './sylius-remove-from-cart';
|
||||||
$("#sylius_product_review_rating_"+(value-1)).attr('checked', 'checked');
|
import './sylius-variant-images';
|
||||||
}
|
import './sylius-variants-prices';
|
||||||
});
|
|
||||||
|
|
||||||
$('#sylius_checkout_address_customer_email').apiToggle({
|
$(document).ready(() => {
|
||||||
dataType: 'json',
|
$('.cart.button')
|
||||||
method: 'GET',
|
.popup({
|
||||||
throttle: 1500,
|
popup: $('.cart.popup'),
|
||||||
|
on: 'click',
|
||||||
beforeSend: function (settings) {
|
|
||||||
var email = $('#sylius_checkout_address_customer_email').val();
|
|
||||||
|
|
||||||
if (email.length < 3) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
settings.data = {
|
|
||||||
email: email
|
|
||||||
};
|
|
||||||
|
|
||||||
return settings;
|
|
||||||
},
|
|
||||||
|
|
||||||
successTest: function (response) {
|
|
||||||
return $('#sylius_checkout_address_customer_email').val() === response.username;
|
|
||||||
}
|
|
||||||
}, $('#sylius-api-login-form'));
|
|
||||||
|
|
||||||
$('#sylius-api-login').apiLogin({
|
|
||||||
method: 'POST',
|
|
||||||
throttle: 500
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.sylius-cart-remove-button').removeFromCart();
|
|
||||||
$('#sylius-product-adding-to-cart').addToCart();
|
|
||||||
|
|
||||||
$('#sylius-shipping-address').addressBook();
|
|
||||||
$('#sylius-billing-address').addressBook();
|
|
||||||
$(document).provinceField();
|
|
||||||
$(document).variantPrices();
|
|
||||||
$(document).variantImages();
|
|
||||||
});
|
});
|
||||||
})(jQuery);
|
|
||||||
|
$('.star.rating').rating({
|
||||||
|
fireOnInit: true,
|
||||||
|
onRate(value) {
|
||||||
|
$('[name="sylius_product_review[rating]"]:checked').removeAttr('checked');
|
||||||
|
$(`#sylius_product_review_rating_${value - 1}`).attr('checked', 'checked');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#sylius_checkout_address_customer_email').apiToggle({
|
||||||
|
dataType: 'json',
|
||||||
|
method: 'GET',
|
||||||
|
throttle: 1500,
|
||||||
|
|
||||||
|
beforeSend(settings) {
|
||||||
|
const email = $('#sylius_checkout_address_customer_email').val();
|
||||||
|
|
||||||
|
if (email.length < 3) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
|
settings.data = {
|
||||||
|
email,
|
||||||
|
};
|
||||||
|
|
||||||
|
return settings;
|
||||||
|
},
|
||||||
|
|
||||||
|
successTest(response) {
|
||||||
|
return $('#sylius_checkout_address_customer_email').val() === response.username;
|
||||||
|
},
|
||||||
|
}, $('#sylius-api-login-form'));
|
||||||
|
|
||||||
|
$('#sylius-api-login').apiLogin({
|
||||||
|
method: 'POST',
|
||||||
|
throttle: 500,
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.sylius-cart-remove-button').removeFromCart();
|
||||||
|
$('#sylius-product-adding-to-cart').addToCart();
|
||||||
|
|
||||||
|
$('#sylius-shipping-address').addressBook();
|
||||||
|
$('#sylius-billing-address').addressBook();
|
||||||
|
$(document).provinceField();
|
||||||
|
$(document).variantPrices();
|
||||||
|
$(document).variantImages();
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
import $ from 'jquery';
|
||||||
|
|
||||||
|
window.$ = $;
|
||||||
|
window.jQuery = $;
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import lightbox from 'lightbox2';
|
||||||
|
|
||||||
|
window.lightbox = lightbox;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
import 'babel-polyfill';
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import 'semantic-ui-css/components/accordion';
|
||||||
|
import 'semantic-ui-css/components/api';
|
||||||
|
import 'semantic-ui-css/components/checkbox';
|
||||||
|
import 'semantic-ui-css/components/colorize';
|
||||||
|
import 'semantic-ui-css/components/dimmer';
|
||||||
|
import 'semantic-ui-css/components/dropdown';
|
||||||
|
import 'semantic-ui-css/components/embed';
|
||||||
|
import 'semantic-ui-css/components/form';
|
||||||
|
import 'semantic-ui-css/components/modal';
|
||||||
|
import 'semantic-ui-css/components/nag';
|
||||||
|
import 'semantic-ui-css/components/popup';
|
||||||
|
import 'semantic-ui-css/components/progress';
|
||||||
|
import 'semantic-ui-css/components/rating';
|
||||||
|
import 'semantic-ui-css/components/search';
|
||||||
|
import 'semantic-ui-css/components/shape';
|
||||||
|
import 'semantic-ui-css/components/sidebar';
|
||||||
|
import 'semantic-ui-css/components/site';
|
||||||
|
import 'semantic-ui-css/components/state';
|
||||||
|
import 'semantic-ui-css/components/sticky';
|
||||||
|
import 'semantic-ui-css/components/tab';
|
||||||
|
import 'semantic-ui-css/components/transition';
|
||||||
|
import 'semantic-ui-css/components/video';
|
||||||
|
import 'semantic-ui-css/components/visibility';
|
||||||
|
import 'semantic-ui-css/components/visit';
|
||||||
|
|
@ -7,41 +7,41 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/api';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
addToCart: function () {
|
addToCart() {
|
||||||
var element = $(this);
|
const element = this;
|
||||||
var href = $(element).attr('action');
|
const url = $(element).attr('action');
|
||||||
var redirectUrl = $(element).data('redirect');
|
const redirectUrl = $(element).data('redirect');
|
||||||
var validationElement = $('#sylius-cart-validation-error');
|
const validationElement = $('#sylius-cart-validation-error');
|
||||||
|
|
||||||
$(element).api({
|
element.api({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
on: 'submit',
|
on: 'submit',
|
||||||
cache: false,
|
cache: false,
|
||||||
url: href,
|
url,
|
||||||
beforeSend: function (settings) {
|
beforeSend(settings) {
|
||||||
settings.data = $(this).serialize();
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
|
settings.data = element.serialize();
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
},
|
},
|
||||||
onSuccess: function (response) {
|
onSuccess() {
|
||||||
validationElement.addClass('hidden');
|
validationElement.addClass('hidden');
|
||||||
window.location.href = redirectUrl;
|
window.location.href = redirectUrl;
|
||||||
},
|
},
|
||||||
onFailure: function (response) {
|
onFailure(response) {
|
||||||
validationElement.removeClass('hidden');
|
validationElement.removeClass('hidden');
|
||||||
var validationMessage = '';
|
let validationMessage = '';
|
||||||
|
|
||||||
$.each(response.errors.errors, function (key, message) {
|
Object.entries(response.errors.errors).forEach(([, message]) => {
|
||||||
validationMessage += message;
|
validationMessage += message;
|
||||||
});
|
});
|
||||||
validationElement.html(validationMessage);
|
validationElement.html(validationMessage);
|
||||||
$(element).removeClass('loading');
|
$(element).removeClass('loading');
|
||||||
},
|
},
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})( jQuery );
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,61 +7,59 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/dropdown';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
const parseKey = function parseKey(key) {
|
||||||
addressBook: function () {
|
return key.replace(/(_\w)/g, words => words[1].toUpperCase());
|
||||||
var element = $(this);
|
};
|
||||||
var select = element.find('.address-book-select');
|
|
||||||
|
|
||||||
select.dropdown({
|
$.fn.extend({
|
||||||
forceSelection: false,
|
addressBook() {
|
||||||
|
const element = this;
|
||||||
|
const select = element.find('.address-book-select');
|
||||||
|
const findByName = function findByName(name) {
|
||||||
|
return element.find(`[name*=${parseKey(name)}]`);
|
||||||
|
};
|
||||||
|
|
||||||
onChange: function (name, text, choice) {
|
select.dropdown({
|
||||||
var provinceCode = choice.data()['provinceCode'],
|
forceSelection: false,
|
||||||
provinceName = choice.data()['provinceName'],
|
|
||||||
provinceContainer = $(this).parent().find(".province-container").get(0);
|
|
||||||
|
|
||||||
$.each(element.find('input, select'), function (key, input) {
|
onChange(name, text, choice) {
|
||||||
$(input).val('');
|
const { provinceCode, provinceName } = choice.data();
|
||||||
});
|
const provinceContainer = select.parent().find('.province-container').get(0);
|
||||||
|
|
||||||
$.each(choice.data(), function (property, value) {
|
element.find('input, select').each((index, input) => {
|
||||||
var field = findByName(property);
|
$(input).val('');
|
||||||
|
});
|
||||||
|
|
||||||
if (-1 !== property.indexOf('countryCode')) {
|
Object.entries(choice.data()).forEach(([property, value]) => {
|
||||||
field.val(value).change();
|
const field = findByName(property);
|
||||||
|
|
||||||
var exists = setInterval(function () {
|
if (property.indexOf('countryCode') !== -1) {
|
||||||
var provinceCodeField = findByName('provinceCode');
|
field.val(value).change();
|
||||||
var provinceNameField = findByName('provinceName');
|
|
||||||
|
|
||||||
if (!provinceContainer.hasAttribute("data-loading")) {
|
const exists = setInterval(() => {
|
||||||
if (0 !== provinceCodeField.length && ('' !== provinceCode || undefined != provinceCode)) {
|
const provinceCodeField = findByName('provinceCode');
|
||||||
provinceCodeField.val(provinceCode);
|
const provinceNameField = findByName('provinceName');
|
||||||
|
|
||||||
clearInterval(exists);
|
if (!provinceContainer.hasAttribute('data-loading')) {
|
||||||
} else if (0 !== provinceNameField.length && ('' !== provinceName || undefined != provinceName)) {
|
if (provinceCodeField.length !== 0 && (provinceCode !== '' || provinceCode != undefined)) {
|
||||||
provinceNameField.val(provinceName);
|
provinceCodeField.val(provinceCode);
|
||||||
|
|
||||||
clearInterval(exists);
|
clearInterval(exists);
|
||||||
}
|
} else if (provinceNameField.length !== 0 && (provinceName !== '' || provinceName != undefined)) {
|
||||||
}
|
provinceNameField.val(provinceName);
|
||||||
}, 100);
|
|
||||||
} else {
|
clearInterval(exists);
|
||||||
field.val(value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
}, 100);
|
||||||
var parseKey = function (key) {
|
} else {
|
||||||
return key.replace(/(_\w)/g, function (words) {return words[1].toUpperCase()});
|
field.val(value);
|
||||||
};
|
}
|
||||||
var findByName = function (name) {
|
});
|
||||||
return element.find('[name*=' + parseKey(name) + ']');
|
},
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})( jQuery );
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,98 +7,88 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import $ from 'jquery';
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.fn.extend({
|
const getProvinceInputValue = function getProvinceInputValue(valueSelector) {
|
||||||
provinceField: function () {
|
return valueSelector == undefined ? '' : `value="${valueSelector}"`;
|
||||||
var countrySelect = $('select[name$="[countryCode]"]');
|
};
|
||||||
|
|
||||||
countrySelect.on('change', function(event) {
|
$.fn.extend({
|
||||||
var select = $(event.currentTarget);
|
provinceField() {
|
||||||
var provinceContainer = select.parents('.field').next('div.province-container');
|
const countrySelect = $('select[name$="[countryCode]"]');
|
||||||
|
|
||||||
var provinceSelectFieldName = select.attr('name').replace('country', 'province');
|
countrySelect.on('change', (event) => {
|
||||||
var provinceInputFieldName = select.attr('name').replace('countryCode', 'provinceName');
|
const select = $(event.currentTarget);
|
||||||
|
const provinceContainer = select.parents('.field').next('div.province-container');
|
||||||
|
|
||||||
if ('' === select.val() || undefined == select.val()) {
|
const provinceSelectFieldName = select.attr('name').replace('country', 'province');
|
||||||
provinceContainer.fadeOut('slow', function () {
|
const provinceInputFieldName = select.attr('name').replace('countryCode', 'provinceName');
|
||||||
provinceContainer.html('');
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
if (select.val() === '' || select.val() == undefined) {
|
||||||
}
|
provinceContainer.fadeOut('slow', () => {
|
||||||
|
provinceContainer.html('');
|
||||||
|
});
|
||||||
|
|
||||||
provinceContainer.attr('data-loading', true);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$.get(provinceContainer.attr('data-url'), {countryCode: $(this).val()}, function (response) {
|
provinceContainer.attr('data-loading', true);
|
||||||
if (!response.content) {
|
|
||||||
provinceContainer.fadeOut('slow', function () {
|
|
||||||
provinceContainer.html('');
|
|
||||||
|
|
||||||
provinceContainer.removeAttr('data-loading');
|
$.get(provinceContainer.attr('data-url'), { countryCode: select.val() }, (response) => {
|
||||||
});
|
if (!response.content) {
|
||||||
} else if (-1 !== response.content.indexOf('select')) {
|
provinceContainer.fadeOut('slow', () => {
|
||||||
provinceContainer.fadeOut('slow', function () {
|
provinceContainer.html('');
|
||||||
|
|
||||||
var provinceSelectValue = getProvinceInputValue(
|
provinceContainer.removeAttr('data-loading');
|
||||||
$(provinceContainer).find('select > option[selected$="selected"]').val()
|
});
|
||||||
);
|
} else if (response.content.indexOf('select') !== -1) {
|
||||||
|
provinceContainer.fadeOut('slow', () => {
|
||||||
|
const provinceSelectValue = getProvinceInputValue((
|
||||||
|
$(provinceContainer).find('select > option[selected$="selected"]').val()
|
||||||
|
));
|
||||||
|
|
||||||
provinceContainer.html(response.content.replace(
|
provinceContainer.html((
|
||||||
'name="sylius_address_province"',
|
response.content
|
||||||
'name="' + provinceSelectFieldName + '"' + provinceSelectValue
|
.replace('name="sylius_address_province"', `name="${provinceSelectFieldName}"${provinceSelectValue}`)
|
||||||
)
|
.replace('option value="" selected="selected"', 'option value=""')
|
||||||
.replace(
|
.replace(`option ${provinceSelectValue}`, `option ${provinceSelectValue}" selected="selected"`)
|
||||||
'option value="" selected="selected"',
|
));
|
||||||
'option value=""'
|
|
||||||
)
|
|
||||||
.replace(
|
|
||||||
'option ' + provinceSelectValue,
|
|
||||||
'option ' + provinceSelectValue + '" selected="selected"'
|
|
||||||
));
|
|
||||||
|
|
||||||
provinceContainer.removeAttr('data-loading');
|
provinceContainer.removeAttr('data-loading');
|
||||||
|
|
||||||
provinceContainer.fadeIn();
|
provinceContainer.fadeIn();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
provinceContainer.fadeOut('slow', function () {
|
provinceContainer.fadeOut('slow', () => {
|
||||||
|
const provinceInputValue = getProvinceInputValue($(provinceContainer).find('input').val());
|
||||||
|
|
||||||
var provinceInputValue = getProvinceInputValue($(provinceContainer).find('input').val());
|
provinceContainer.html((
|
||||||
|
response.content
|
||||||
|
.replace('name="sylius_address_province"', `name="${provinceInputFieldName}"${provinceInputValue}`)
|
||||||
|
));
|
||||||
|
|
||||||
provinceContainer.html(response.content.replace(
|
provinceContainer.removeAttr('data-loading');
|
||||||
'name="sylius_address_province"',
|
|
||||||
'name="' + provinceInputFieldName + '"' + provinceInputValue
|
|
||||||
));
|
|
||||||
|
|
||||||
provinceContainer.removeAttr('data-loading');
|
provinceContainer.fadeIn();
|
||||||
|
});
|
||||||
provinceContainer.fadeIn();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
if('' !== countrySelect.val()) {
|
|
||||||
countrySelect.trigger('change');
|
|
||||||
}
|
|
||||||
|
|
||||||
if('' === $.trim($('div.province-container').text())) {
|
|
||||||
$('select.country-select').trigger('change');
|
|
||||||
}
|
|
||||||
|
|
||||||
var billingAddressCheckbox = $('input[type="checkbox"][name$="[differentBillingAddress]"]');
|
|
||||||
var billingAddressContainer = $('#sylius-billing-address-container');
|
|
||||||
var toggleBillingAddress = function() {
|
|
||||||
billingAddressContainer.toggle(billingAddressCheckbox.prop('checked'));
|
|
||||||
};
|
|
||||||
toggleBillingAddress();
|
|
||||||
billingAddressCheckbox.on('change', toggleBillingAddress);
|
|
||||||
|
|
||||||
var getProvinceInputValue = function (valueSelector) {
|
|
||||||
return undefined == valueSelector ? '' : 'value="'+ valueSelector +'"';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})( jQuery );
|
|
||||||
|
if (countrySelect.val() !== '') {
|
||||||
|
countrySelect.trigger('change');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($.trim($('div.province-container').text()) === '') {
|
||||||
|
$('select.country-select').trigger('change');
|
||||||
|
}
|
||||||
|
|
||||||
|
const billingAddressCheckbox = $('input[type="checkbox"][name$="[differentBillingAddress]"]');
|
||||||
|
const billingAddressContainer = $('#sylius-billing-address-container');
|
||||||
|
const toggleBillingAddress = function toggleBillingAddress() {
|
||||||
|
billingAddressContainer.toggle(billingAddressCheckbox.prop('checked'));
|
||||||
|
};
|
||||||
|
toggleBillingAddress();
|
||||||
|
billingAddressCheckbox.on('change', toggleBillingAddress);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,31 +7,30 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/api';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
removeFromCart: function () {
|
removeFromCart() {
|
||||||
$.each($(this), function (index, element) {
|
this.each((index, element) => {
|
||||||
var redirectUrl = $(element).data('redirect');
|
const redirectUrl = $(element).data('redirect');
|
||||||
var csrfToken = $(element).data('csrf-token');
|
const csrfToken = $(element).data('csrf-token');
|
||||||
|
|
||||||
$(element).api({
|
$(element).api({
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
on: 'click',
|
on: 'click',
|
||||||
beforeSend: function (settings) {
|
beforeSend(settings) {
|
||||||
settings.data = {
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
_csrf_token: csrfToken
|
settings.data = {
|
||||||
};
|
_csrf_token: csrfToken,
|
||||||
|
};
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
},
|
},
|
||||||
onSuccess: function (response) {
|
onSuccess() {
|
||||||
window.location.replace(redirectUrl);
|
window.location.replace(redirectUrl);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
},
|
||||||
})( jQuery );
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,83 +7,79 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import $ from 'jquery';
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.fn.extend({
|
const changeMainImage = function changeMainImage(newImageDiv) {
|
||||||
variantImages: function () {
|
const mainImageLink = $('a.ui.fluid.image');
|
||||||
if ($('[data-variant-options]').length > 0) {
|
const mainImage = $('a.ui.fluid.image > img');
|
||||||
handleProductOptionImages();
|
|
||||||
handleProductOptionChange();
|
|
||||||
} else if ($('[data-variant-code]').length > 0) {
|
|
||||||
handleProductVariantImages($('[name="sylius_add_to_cart[cartItem][variant]"]'));
|
|
||||||
handleProductVariantChange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})( jQuery );
|
|
||||||
|
|
||||||
function handleProductOptionChange() {
|
const newImage = $(newImageDiv).find('img');
|
||||||
$('[name*="sylius_add_to_cart[cartItem][variant]"]').on('change', function () {
|
const newImageLink = $(newImageDiv).find('a');
|
||||||
handleProductOptionImages();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleProductVariantChange() {
|
if (newImage.length === 0 && newImageLink.length === 0) {
|
||||||
$('[name="sylius_add_to_cart[cartItem][variant]"]').on('change', function () {
|
mainImage.attr('src', $('div[data-product-image]').attr('data-product-image'));
|
||||||
handleProductVariantImages($(this))
|
newImageLink.attr('href', $('div[data-product-link]').attr('data-product-link'));
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleProductOptionImages() {
|
return;
|
||||||
var options = '';
|
}
|
||||||
|
|
||||||
$('#sylius-product-adding-to-cart select').each(function() {
|
mainImageLink.attr('href', newImageLink.attr('href'));
|
||||||
options += $(this).find('option:selected').val() + ' ';
|
mainImage.attr('src', newImage.attr('data-large-thumbnail'));
|
||||||
});
|
};
|
||||||
|
|
||||||
var imagesWithOptions = [];
|
const handleProductOptionImages = function handleProductOptionImages() {
|
||||||
var optionsArray = options.trim().split(' ');
|
let options = '';
|
||||||
|
|
||||||
$('[data-variant-options]').each(function () {
|
$('#sylius-product-adding-to-cart select').each((index, select) => {
|
||||||
var imageOptions = $(this).attr('data-variant-options');
|
options += `${$(select).find('option:selected').val()} `;
|
||||||
var imageHasOptions = optionsArray.every(function(option) {
|
});
|
||||||
return imageOptions.indexOf(option) > -1;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (imageHasOptions) {
|
const imagesWithOptions = [];
|
||||||
imagesWithOptions.push($(this).closest('div.ui.image'));
|
const optionsArray = options.trim().split(' ');
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
changeMainImage(imagesWithOptions.shift());
|
$('[data-variant-options]').each((index, element) => {
|
||||||
}
|
const imageOptions = $(element).attr('data-variant-options');
|
||||||
|
const imageHasOptions = optionsArray.every(option => imageOptions.indexOf(option) > -1);
|
||||||
|
|
||||||
function handleProductVariantImages(element) {
|
if (imageHasOptions) {
|
||||||
var variantCode = $(element).attr('value');
|
imagesWithOptions.push($(element).closest('div.ui.image'));
|
||||||
var imagesWithVariantCode = [];
|
|
||||||
|
|
||||||
$('[data-variant-code*="'+ variantCode +'"]').each(function () {
|
|
||||||
imagesWithVariantCode.push($(this).closest('div.ui.image'));
|
|
||||||
});
|
|
||||||
|
|
||||||
changeMainImage(imagesWithVariantCode.shift());
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeMainImage(newImageDiv) {
|
|
||||||
var mainImageLink = $('a.ui.fluid.image');
|
|
||||||
var mainImage = $('a.ui.fluid.image > img');
|
|
||||||
|
|
||||||
var newImage = $(newImageDiv).find('img');
|
|
||||||
var newImageLink = $(newImageDiv).find('a');
|
|
||||||
|
|
||||||
if (newImage.length == 0 && newImageLink.length == 0) {
|
|
||||||
mainImage.attr('src', $('div[data-product-image]').attr('data-product-image'));
|
|
||||||
newImageLink.attr('href', $('div[data-product-link]').attr('data-product-link'));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
mainImageLink.attr('href', newImageLink.attr('href'));
|
changeMainImage(imagesWithOptions.shift());
|
||||||
mainImage.attr('src', newImage.attr('data-large-thumbnail'));
|
};
|
||||||
}
|
|
||||||
|
const handleProductOptionChange = function handleProductOptionChange() {
|
||||||
|
$('[name*="sylius_add_to_cart[cartItem][variant]"]').on('change', () => {
|
||||||
|
handleProductOptionImages();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleProductVariantImages = function handleProductVariantImages(variantElement) {
|
||||||
|
const variantCode = $(variantElement).attr('value');
|
||||||
|
const imagesWithVariantCode = [];
|
||||||
|
|
||||||
|
$(`[data-variant-code*="${variantCode}"]`).each((index, element) => {
|
||||||
|
imagesWithVariantCode.push($(element).closest('div.ui.image'));
|
||||||
|
});
|
||||||
|
|
||||||
|
changeMainImage(imagesWithVariantCode.shift());
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleProductVariantChange = function handleProductVariantChange() {
|
||||||
|
$('[name="sylius_add_to_cart[cartItem][variant]"]').on('change', (event) => {
|
||||||
|
handleProductVariantImages($(event.currentTarget));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.extend({
|
||||||
|
variantImages() {
|
||||||
|
if ($('[data-variant-options]').length > 0) {
|
||||||
|
handleProductOptionImages();
|
||||||
|
handleProductOptionChange();
|
||||||
|
} else if ($('[data-variant-code]').length > 0) {
|
||||||
|
handleProductVariantImages($('[name="sylius_add_to_cart[cartItem][variant]"]'));
|
||||||
|
handleProductVariantChange();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,44 +7,43 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import $ from 'jquery';
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.fn.extend({
|
const handleProductOptionsChange = function handleProductOptionsChange() {
|
||||||
variantPrices: function () {
|
$('[name*="sylius_add_to_cart[cartItem][variant]"]').on('change', () => {
|
||||||
if ($('#sylius-variants-pricing').length > 0) {
|
let selector = '';
|
||||||
handleProductOptionsChange();
|
|
||||||
} else if ($("#sylius-product-variants").length > 0) {
|
$('#sylius-product-adding-to-cart select[data-option]').each((index, element) => {
|
||||||
handleProductVariantsChange();
|
const select = $(element);
|
||||||
}
|
const option = select.find('option:selected').val();
|
||||||
}
|
selector += `[data-${select.attr('data-option')}="${option}"]`;
|
||||||
});
|
});
|
||||||
})( jQuery );
|
|
||||||
|
|
||||||
function handleProductOptionsChange() {
|
const price = $('#sylius-variants-pricing').find(selector).attr('data-value');
|
||||||
$('[name*="sylius_add_to_cart[cartItem][variant]"]').on('change', function() {
|
|
||||||
var $selector = '';
|
|
||||||
|
|
||||||
$('#sylius-product-adding-to-cart select[data-option]').each(function() {
|
if (price !== undefined) {
|
||||||
var option = $(this).find('option:selected').val();
|
$('#product-price').text(price);
|
||||||
$selector += '[data-' + $(this).attr('data-option') + '="' + option + '"]';
|
$('button[type=submit]').removeAttr('disabled');
|
||||||
});
|
} else {
|
||||||
|
$('#product-price').text($('#sylius-variants-pricing').attr('data-unavailable-text'));
|
||||||
|
$('button[type=submit]').attr('disabled', 'disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
var $price = $('#sylius-variants-pricing').find($selector).attr('data-value');
|
const handleProductVariantsChange = function handleProductVariantsChange() {
|
||||||
|
$('[name="sylius_add_to_cart[cartItem][variant]"]').on('change', (event) => {
|
||||||
|
const price = $(event.currentTarget).parents('tr').find('.sylius-product-variant-price').text();
|
||||||
|
$('#product-price').text(price);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
if ($price !== undefined) {
|
$.fn.extend({
|
||||||
$('#product-price').text($price);
|
variantPrices() {
|
||||||
$('button[type=submit]').removeAttr('disabled');
|
if ($('#sylius-variants-pricing').length > 0) {
|
||||||
} else {
|
handleProductOptionsChange();
|
||||||
$('#product-price').text($('#sylius-variants-pricing').attr('data-unavailable-text'));
|
} else if ($('#sylius-product-variants').length > 0) {
|
||||||
$('button[type=submit]').attr('disabled', 'disabled');
|
handleProductVariantsChange();
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
}
|
});
|
||||||
|
|
||||||
function handleProductVariantsChange() {
|
|
||||||
$('[name="sylius_add_to_cart[cartItem][variant]"]').on('change', function() {
|
|
||||||
var $price = $(this).parents('tr').find('.sylius-product-variant-price').text();
|
|
||||||
$('#product-price').text($price);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,18 @@
|
||||||
|
import { rollup } from 'rollup';
|
||||||
|
import { uglify } from 'rollup-plugin-uglify';
|
||||||
|
import babel from 'rollup-plugin-babel';
|
||||||
|
import commonjs from 'rollup-plugin-commonjs';
|
||||||
import concat from 'gulp-concat';
|
import concat from 'gulp-concat';
|
||||||
|
import dedent from 'dedent';
|
||||||
import gulp from 'gulp';
|
import gulp from 'gulp';
|
||||||
import gulpif from 'gulp-if';
|
import gulpif from 'gulp-if';
|
||||||
|
import inject from 'rollup-plugin-inject';
|
||||||
import livereload from 'gulp-livereload';
|
import livereload from 'gulp-livereload';
|
||||||
import merge from 'merge-stream';
|
import merge from 'merge-stream';
|
||||||
import order from 'gulp-order';
|
import order from 'gulp-order';
|
||||||
|
import resolve from 'rollup-plugin-node-resolve';
|
||||||
import sass from 'gulp-sass';
|
import sass from 'gulp-sass';
|
||||||
import sourcemaps from 'gulp-sourcemaps';
|
import sourcemaps from 'gulp-sourcemaps';
|
||||||
import uglify from 'gulp-uglify';
|
|
||||||
import uglifycss from 'gulp-uglifycss';
|
import uglifycss from 'gulp-uglifycss';
|
||||||
import upath from 'upath';
|
import upath from 'upath';
|
||||||
import yargs from 'yargs';
|
import yargs from 'yargs';
|
||||||
|
|
@ -34,6 +40,11 @@ const { argv } = yargs
|
||||||
});
|
});
|
||||||
|
|
||||||
const env = process.env.GULP_ENV;
|
const env = process.env.GULP_ENV;
|
||||||
|
const options = {
|
||||||
|
minify: env === 'prod',
|
||||||
|
sourcemaps: env !== 'prod',
|
||||||
|
};
|
||||||
|
|
||||||
const rootPath = upath.normalizeSafe(argv.rootPath);
|
const rootPath = upath.normalizeSafe(argv.rootPath);
|
||||||
const shopRootPath = upath.joinSafe(rootPath, 'shop');
|
const shopRootPath = upath.joinSafe(rootPath, 'shop');
|
||||||
const vendorPath = upath.normalizeSafe(argv.vendorPath || '.');
|
const vendorPath = upath.normalizeSafe(argv.vendorPath || '.');
|
||||||
|
|
@ -44,9 +55,6 @@ const nodeModulesPath = upath.normalizeSafe(argv.nodeModulesPath);
|
||||||
const paths = {
|
const paths = {
|
||||||
shop: {
|
shop: {
|
||||||
js: [
|
js: [
|
||||||
upath.joinSafe(nodeModulesPath, 'jquery/dist/jquery.min.js'),
|
|
||||||
upath.joinSafe(nodeModulesPath, 'semantic-ui-css/semantic.min.js'),
|
|
||||||
upath.joinSafe(nodeModulesPath, 'lightbox2/dist/js/lightbox.js'),
|
|
||||||
upath.joinSafe(vendorUiPath, 'Resources/private/js/**'),
|
upath.joinSafe(vendorUiPath, 'Resources/private/js/**'),
|
||||||
upath.joinSafe(vendorShopPath, 'Resources/private/js/**'),
|
upath.joinSafe(vendorShopPath, 'Resources/private/js/**'),
|
||||||
],
|
],
|
||||||
|
|
@ -83,7 +91,7 @@ const sourcePathMap = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const mapSourcePath = function mapSourcePath(sourcePath /* , file */) {
|
const mapSourcePath = function mapSourcePath(sourcePath) {
|
||||||
const match = sourcePathMap.find(({ sourceDir }) => (
|
const match = sourcePathMap.find(({ sourceDir }) => (
|
||||||
sourcePath.substring(0, sourceDir.length) === sourceDir
|
sourcePath.substring(0, sourceDir.length) === sourceDir
|
||||||
));
|
));
|
||||||
|
|
@ -97,15 +105,89 @@ const mapSourcePath = function mapSourcePath(sourcePath /* , file */) {
|
||||||
return upath.joinSafe(destPath, sourcePath.substring(sourceDir.length));
|
return upath.joinSafe(destPath, sourcePath.substring(sourceDir.length));
|
||||||
};
|
};
|
||||||
|
|
||||||
export const buildShopJs = function buildShopJs() {
|
export const buildShopJs = async function buildShopJs() {
|
||||||
return gulp.src(paths.shop.js, { base: './' })
|
const bundle = await rollup({
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.init()))
|
input: upath.joinSafe(vendorShopPath, 'Resources/private/js/app.js'),
|
||||||
.pipe(concat('app.js'))
|
plugins: [
|
||||||
.pipe(gulpif(env === 'prod', uglify()))
|
{
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.mapSources(mapSourcePath)))
|
name: 'shim-app',
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.write('./')))
|
|
||||||
.pipe(gulp.dest(upath.joinSafe(shopRootPath, 'js')))
|
transform(code, id) {
|
||||||
.pipe(livereload());
|
if (upath.relative('', id) === upath.relative('', upath.joinSafe(vendorShopPath, 'Resources/private/js/app.js'))) {
|
||||||
|
return {
|
||||||
|
code: dedent`
|
||||||
|
import './shim/shim-polyfill';
|
||||||
|
import './shim/shim-jquery';
|
||||||
|
import './shim/shim-semantic-ui';
|
||||||
|
import './shim/shim-lightbox';
|
||||||
|
|
||||||
|
${code}
|
||||||
|
`,
|
||||||
|
map: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inject({
|
||||||
|
include: `${nodeModulesPath}/**`,
|
||||||
|
modules: {
|
||||||
|
$: 'jquery',
|
||||||
|
jQuery: 'jquery',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
resolve({
|
||||||
|
jail: upath.resolve(nodeModulesPath),
|
||||||
|
}),
|
||||||
|
commonjs({
|
||||||
|
include: `${nodeModulesPath}/**`,
|
||||||
|
}),
|
||||||
|
babel({
|
||||||
|
babelrc: false,
|
||||||
|
exclude: `${nodeModulesPath}/**`,
|
||||||
|
presets: [
|
||||||
|
['env', {
|
||||||
|
targets: {
|
||||||
|
browsers: [
|
||||||
|
'last 2 versions',
|
||||||
|
'Firefox ESR',
|
||||||
|
'IE >= 9',
|
||||||
|
'Android >= 4.0',
|
||||||
|
'iOS >= 7',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
modules: false,
|
||||||
|
exclude: [
|
||||||
|
'transform-async-to-generator',
|
||||||
|
'transform-regenerator',
|
||||||
|
],
|
||||||
|
useBuiltIns: true,
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
['external-helpers'],
|
||||||
|
['fast-async'],
|
||||||
|
['module-resolver', {
|
||||||
|
alias: {
|
||||||
|
'sylius/ui': upath.relative('', upath.joinSafe(vendorUiPath, 'Resources/private/js')),
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
['transform-object-rest-spread', {
|
||||||
|
useBuiltIns: false,
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
options.minify && uglify(),
|
||||||
|
],
|
||||||
|
treeshake: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
await bundle.write({
|
||||||
|
file: upath.joinSafe(shopRootPath, 'js/app.js'),
|
||||||
|
format: 'iife',
|
||||||
|
sourcemap: options.sourcemaps,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
buildShopJs.description = 'Build shop js assets.';
|
buildShopJs.description = 'Build shop js assets.';
|
||||||
|
|
||||||
|
|
@ -116,11 +198,11 @@ export const buildShopCss = function buildShopCss() {
|
||||||
);
|
);
|
||||||
|
|
||||||
const cssStream = gulp.src(paths.shop.css, { base: './' })
|
const cssStream = gulp.src(paths.shop.css, { base: './' })
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.init()))
|
.pipe(gulpif(options.sourcemaps, sourcemaps.init()))
|
||||||
.pipe(concat('css-files.css'));
|
.pipe(concat('css-files.css'));
|
||||||
|
|
||||||
const sassStream = gulp.src(paths.shop.sass, { base: './' })
|
const sassStream = gulp.src(paths.shop.sass, { base: './' })
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.init()))
|
.pipe(gulpif(options.sourcemaps, sourcemaps.init()))
|
||||||
.pipe(sass())
|
.pipe(sass())
|
||||||
.pipe(concat('sass-files.scss'));
|
.pipe(concat('sass-files.scss'));
|
||||||
|
|
||||||
|
|
@ -129,9 +211,9 @@ export const buildShopCss = function buildShopCss() {
|
||||||
merge(cssStream, sassStream)
|
merge(cssStream, sassStream)
|
||||||
.pipe(order(['css-files.css', 'sass-files.scss']))
|
.pipe(order(['css-files.css', 'sass-files.scss']))
|
||||||
.pipe(concat('style.css'))
|
.pipe(concat('style.css'))
|
||||||
.pipe(gulpif(env === 'prod', uglifycss()))
|
.pipe(gulpif(options.minify, uglifycss()))
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.mapSources(mapSourcePath)))
|
.pipe(gulpif(options.sourcemaps, sourcemaps.mapSources(mapSourcePath)))
|
||||||
.pipe(gulpif(env !== 'prod', sourcemaps.write('./')))
|
.pipe(gulpif(options.sourcemaps, sourcemaps.write('./')))
|
||||||
.pipe(gulp.dest(upath.joinSafe(shopRootPath, 'css')))
|
.pipe(gulp.dest(upath.joinSafe(shopRootPath, 'css')))
|
||||||
.pipe(livereload()),
|
.pipe(livereload()),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
20
src/Sylius/Bundle/UiBundle/Resources/private/.eslintrc.js
Normal file
20
src/Sylius/Bundle/UiBundle/Resources/private/.eslintrc.js
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: 'airbnb-base',
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'object-shorthand': ['error', 'always', {
|
||||||
|
avoidQuotes: true,
|
||||||
|
avoidExplicitReturnArrows: true,
|
||||||
|
}],
|
||||||
|
'function-paren-newline': ['error', 'consistent'],
|
||||||
|
'max-len': ['warn', 120, 2, {
|
||||||
|
ignoreUrls: true,
|
||||||
|
ignoreComments: false,
|
||||||
|
ignoreRegExpLiterals: true,
|
||||||
|
ignoreStrings: true,
|
||||||
|
ignoreTemplateLiterals: true,
|
||||||
|
}],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
@ -7,45 +7,57 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function($) {
|
import 'semantic-ui-css/components/accordion';
|
||||||
$(document).ready(function() {
|
import 'semantic-ui-css/components/checkbox';
|
||||||
$('#sidebar').addClass('visible');
|
import 'semantic-ui-css/components/dimmer';
|
||||||
$('#sidebar').sidebar('attach events', '#sidebar-toggle', 'toggle');
|
import 'semantic-ui-css/components/dropdown';
|
||||||
$('#sidebar').sidebar('setting', {
|
import 'semantic-ui-css/components/rating';
|
||||||
dimPage: false,
|
import 'semantic-ui-css/components/sidebar';
|
||||||
closable: false
|
import 'semantic-ui-css/components/tab';
|
||||||
});
|
import 'semantic-ui-css/components/transition';
|
||||||
|
import $ from 'jquery';
|
||||||
|
|
||||||
$('.ui.checkbox').checkbox();
|
import './sylius-bulk-action-require-confirmation';
|
||||||
$('.ui.accordion').accordion();
|
import './sylius-form-collection';
|
||||||
$('.ui.menu .dropdown').dropdown({action: 'hide'});
|
import './sylius-require-confirmation';
|
||||||
$('.ui.inline.dropdown').dropdown();
|
import './sylius-toggle';
|
||||||
$('.link.ui.dropdown').dropdown({action: 'hide'});
|
|
||||||
$('.button.ui.dropdown').dropdown({action: 'hide'});
|
|
||||||
$('.ui.fluid.search.selection.ui.dropdown').dropdown();
|
|
||||||
$('.menu .item').tab();
|
|
||||||
$('.card .image').dimmer({on: 'hover'});
|
|
||||||
$('.ui.rating').rating('disable');
|
|
||||||
|
|
||||||
$('form.loadable button').on('click', function() {
|
|
||||||
return $(this).closest('form').addClass('loading');
|
|
||||||
});
|
|
||||||
$('.loadable.button').on('click', function() {
|
|
||||||
return $(this).addClass('loading');
|
|
||||||
});
|
|
||||||
$('.message .close').on('click', function() {
|
|
||||||
return $(this).closest('.message').transition('fade');
|
|
||||||
});
|
|
||||||
|
|
||||||
$('[data-requires-confirmation]').requireConfirmation();
|
|
||||||
$('[data-bulk-action-requires-confirmation]').bulkActionRequireConfirmation();
|
|
||||||
$('[data-toggles]').toggleElement();
|
|
||||||
|
|
||||||
$('.special.cards .image').dimmer({
|
|
||||||
on: 'hover'
|
|
||||||
});
|
|
||||||
|
|
||||||
$('[data-form-type="collection"]').CollectionForm();
|
|
||||||
|
|
||||||
|
$(document).ready(() => {
|
||||||
|
$('#sidebar').addClass('visible');
|
||||||
|
$('#sidebar').sidebar('attach events', '#sidebar-toggle', 'toggle');
|
||||||
|
$('#sidebar').sidebar('setting', {
|
||||||
|
dimPage: false,
|
||||||
|
closable: false,
|
||||||
});
|
});
|
||||||
})(jQuery);
|
|
||||||
|
$('.ui.checkbox').checkbox();
|
||||||
|
$('.ui.accordion').accordion();
|
||||||
|
$('.ui.menu .dropdown').dropdown({ action: 'hide' });
|
||||||
|
$('.ui.inline.dropdown').dropdown();
|
||||||
|
$('.link.ui.dropdown').dropdown({ action: 'hide' });
|
||||||
|
$('.button.ui.dropdown').dropdown({ action: 'hide' });
|
||||||
|
$('.ui.fluid.search.selection.ui.dropdown').dropdown();
|
||||||
|
$('.menu .item').tab();
|
||||||
|
$('.card .image').dimmer({ on: 'hover' });
|
||||||
|
$('.ui.rating').rating('disable');
|
||||||
|
|
||||||
|
$('form.loadable button').on('click', (event) => {
|
||||||
|
$(event.currentTarget).closest('form').addClass('loading');
|
||||||
|
});
|
||||||
|
$('.loadable.button').on('click', (event) => {
|
||||||
|
$(event.currentTarget).addClass('loading');
|
||||||
|
});
|
||||||
|
$('.message .close').on('click', (event) => {
|
||||||
|
$(event.currentTarget).closest('.message').transition('fade');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('[data-requires-confirmation]').requireConfirmation();
|
||||||
|
$('[data-bulk-action-requires-confirmation]').bulkActionRequireConfirmation();
|
||||||
|
$('[data-toggles]').toggleElement();
|
||||||
|
|
||||||
|
$('.special.cards .image').dimmer({
|
||||||
|
on: 'hover',
|
||||||
|
});
|
||||||
|
|
||||||
|
$('[data-form-type="collection"]').CollectionForm();
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,50 +7,53 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/api';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
apiLogin: function (apiSettings) {
|
apiLogin({
|
||||||
var element = $(this);
|
method,
|
||||||
var apiSettings = apiSettings;
|
dataType = 'json',
|
||||||
var passwordField = element.find('input[type=\'password\']');
|
throttle = 0,
|
||||||
var emailField = element.find('input[type=\'email\']');
|
debug = false,
|
||||||
var csrfTokenField = element.find('input[type=\'hidden\']');
|
}) {
|
||||||
var signInButton = element.find('.button');
|
const element = this;
|
||||||
var validationField = element.find('.red.label');
|
const passwordField = element.find('input[type="password"]');
|
||||||
|
const emailField = element.find('input[type="email"]');
|
||||||
|
const csrfTokenField = element.find('input[type="hidden"]');
|
||||||
|
const signInButton = element.find('.button');
|
||||||
|
const validationField = element.find('.red.label');
|
||||||
|
|
||||||
signInButton.api({
|
signInButton.api({
|
||||||
method: apiSettings.method,
|
method,
|
||||||
dataType: apiSettings.dataType || 'json',
|
dataType,
|
||||||
throttle: apiSettings.throttle || 0,
|
throttle,
|
||||||
debug: apiSettings.debug || false,
|
debug,
|
||||||
|
|
||||||
beforeSend: function (settings) {
|
beforeSend(settings) {
|
||||||
settings.data = {
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
_username: emailField.val(),
|
settings.data = {
|
||||||
_password: passwordField.val()
|
_username: emailField.val(),
|
||||||
};
|
_password: passwordField.val(),
|
||||||
settings.data[csrfTokenField.attr('name')] = csrfTokenField.val();
|
[csrfTokenField.attr('name')]: csrfTokenField.val(),
|
||||||
|
};
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
},
|
},
|
||||||
|
|
||||||
successTest: function (response) {
|
successTest(response) {
|
||||||
return response.success;
|
return response.success;
|
||||||
},
|
},
|
||||||
|
|
||||||
onSuccess: function (response) {
|
onSuccess() {
|
||||||
element.remove();
|
element.remove();
|
||||||
location.reload();
|
window.location.reload();
|
||||||
},
|
},
|
||||||
|
|
||||||
onFailure: function (response) {
|
onFailure(response) {
|
||||||
validationField.removeClass('hidden');
|
validationField.removeClass('hidden');
|
||||||
validationField.html(response.message);
|
validationField.html(response.message);
|
||||||
}
|
},
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})( jQuery );
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,38 +7,40 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/api';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
apiToggle: function (apiSettings, toggleableElement, isHidden) {
|
apiToggle({
|
||||||
var element = $(this);
|
method,
|
||||||
var apiSettings = apiSettings;
|
dataType = 'json',
|
||||||
var toggleableElement = toggleableElement;
|
throttle = 0,
|
||||||
var isHidden = isHidden || true;
|
debug = false,
|
||||||
|
beforeSend,
|
||||||
|
successTest,
|
||||||
|
}, toggleableElement, isHidden = true) {
|
||||||
|
const element = this;
|
||||||
|
|
||||||
if (isHidden) {
|
if (isHidden) {
|
||||||
toggleableElement.hide();
|
toggleableElement.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
element.api({
|
element.api({
|
||||||
method: apiSettings.method,
|
method,
|
||||||
dataType: apiSettings.dataType || 'json',
|
dataType,
|
||||||
throttle: apiSettings.throttle || 0,
|
throttle,
|
||||||
debug: apiSettings.debug || false,
|
debug,
|
||||||
|
|
||||||
beforeSend: apiSettings.beforeSend,
|
beforeSend,
|
||||||
successTest: apiSettings.successTest,
|
successTest,
|
||||||
|
|
||||||
onSuccess: function (response) {
|
onSuccess() {
|
||||||
toggleableElement.show();
|
toggleableElement.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
onFailure: function (response) {
|
onFailure() {
|
||||||
toggleableElement.hide();
|
toggleableElement.hide();
|
||||||
}
|
},
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})( jQuery );
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,77 +7,71 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/dropdown';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
autoComplete: function () {
|
autoComplete() {
|
||||||
$(this).each(function () {
|
this.each((idx, el) => {
|
||||||
var element = $(this);
|
const element = $(el);
|
||||||
var criteriaName = $(this).data('criteria-name');
|
const criteriaName = element.data('criteria-name');
|
||||||
var choiceName = $(this).data('choice-name');
|
const choiceName = element.data('choice-name');
|
||||||
var choiceValue = $(this).data('choice-value');
|
const choiceValue = element.data('choice-value');
|
||||||
var autocompleteValue = $(this).find('input.autocomplete').val();
|
const autocompleteValue = element.find('input.autocomplete').val();
|
||||||
var loadForEditUrl = $(this).data('load-edit-url');
|
const loadForEditUrl = element.data('load-edit-url');
|
||||||
|
|
||||||
element.dropdown({
|
element.dropdown({
|
||||||
delay: {
|
delay: {
|
||||||
search: 250
|
search: 250,
|
||||||
},
|
},
|
||||||
forceSelection: false,
|
forceSelection: false,
|
||||||
apiSettings: {
|
apiSettings: {
|
||||||
dataType: 'JSON',
|
dataType: 'JSON',
|
||||||
cache: false,
|
cache: false,
|
||||||
beforeSend: function(settings) {
|
beforeSend(settings) {
|
||||||
settings.data[criteriaName] = settings.urlData.query;
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
|
settings.data[criteriaName] = settings.urlData.query;
|
||||||
|
|
||||||
return settings;
|
return settings;
|
||||||
},
|
},
|
||||||
onResponse: function (response) {
|
onResponse(response) {
|
||||||
var choiceName = element.data('choice-name');
|
return {
|
||||||
var choiceValue = element.data('choice-value');
|
success: true,
|
||||||
var myResults = [];
|
results: response.map(item => ({
|
||||||
$.each(response, function (index, item) {
|
name: item[choiceName],
|
||||||
myResults.push({
|
value: item[choiceValue],
|
||||||
name: item[choiceName],
|
})),
|
||||||
value: item[choiceValue]
|
};
|
||||||
});
|
},
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
|
||||||
return {
|
if (autocompleteValue.split(',').filter(String).length > 0) {
|
||||||
success: true,
|
const menuElement = element.find('div.menu');
|
||||||
results: myResults
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (0 < autocompleteValue.split(',').filter(String).length) {
|
menuElement.api({
|
||||||
var menuElement = element.find('div.menu');
|
on: 'now',
|
||||||
|
method: 'GET',
|
||||||
|
url: loadForEditUrl,
|
||||||
|
beforeSend(settings) {
|
||||||
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
|
settings.data[choiceValue] = autocompleteValue.split(',').filter(String);
|
||||||
|
|
||||||
menuElement.api({
|
return settings;
|
||||||
on: 'now',
|
},
|
||||||
method: 'GET',
|
onSuccess(response) {
|
||||||
url: loadForEditUrl,
|
response.forEach((item) => {
|
||||||
beforeSend: function (settings) {
|
menuElement.append((
|
||||||
settings.data[choiceValue] = autocompleteValue.split(',').filter(String);
|
$(`<div class="item" data-value="${item[choiceValue]}">${item[choiceName]}</div>`)
|
||||||
|
));
|
||||||
return settings;
|
});
|
||||||
},
|
},
|
||||||
onSuccess: function (response) {
|
|
||||||
$.each(response, function (index, item) {
|
|
||||||
menuElement.append(
|
|
||||||
$('<div class="item" data-value="'+item[choiceValue]+'">'+item[choiceName]+'</div>')
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.setTimeout(function () {
|
|
||||||
element.dropdown('set selected', element.find('input.autocomplete').val().split(',').filter(String));
|
|
||||||
}, 5000);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
})( jQuery );
|
}
|
||||||
|
|
||||||
|
window.setTimeout(() => {
|
||||||
|
element.dropdown('set selected', element.find('input.autocomplete').val().split(',').filter(String));
|
||||||
|
}, 5000);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,37 +7,36 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/modal';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
bulkActionRequireConfirmation: function() {
|
bulkActionRequireConfirmation() {
|
||||||
return this.each(function() {
|
this.each((idx, el) => {
|
||||||
return $(this).on('click', function(event) {
|
$(el).on('click', (evt) => {
|
||||||
event.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
||||||
var actionButton = $(this);
|
const actionButton = $(evt.currentTarget);
|
||||||
|
|
||||||
if (actionButton.is('a')) {
|
if (actionButton.is('a')) {
|
||||||
$('#confirmation-button').attr('href', actionButton.attr('href'));
|
$('#confirmation-button').attr('href', actionButton.attr('href'));
|
||||||
}
|
|
||||||
|
|
||||||
if (actionButton.is('button')) {
|
|
||||||
$('#confirmation-button').on('click', function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
var form = actionButton.closest('form');
|
|
||||||
$('input.bulk-select-checkbox:checked').each(function() {
|
|
||||||
$('<input type="hidden" name="ids[]" value="' + this.value + '">').appendTo(form);
|
|
||||||
});
|
|
||||||
|
|
||||||
return form.submit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return $('#confirmation-modal').modal('show');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (actionButton.is('button')) {
|
||||||
|
$('#confirmation-button').on('click', (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
const form = actionButton.closest('form');
|
||||||
|
$('input.bulk-select-checkbox:checked').each((index, element) => {
|
||||||
|
$(`<input type="hidden" name="ids[]" value="${element.value}">`).appendTo(form);
|
||||||
|
});
|
||||||
|
|
||||||
|
form.submit();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#confirmation-modal').modal('show');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})( jQuery );
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,158 +7,126 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
!function($){
|
import $ from 'jquery';
|
||||||
|
|
||||||
"use strict";
|
/**
|
||||||
|
* Collection Form plugin
|
||||||
|
*
|
||||||
|
* @param element
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
class CollectionForm {
|
||||||
|
constructor(element) {
|
||||||
|
this.addItem = this.addItem.bind(this);
|
||||||
|
this.updateItem = this.updateItem.bind(this);
|
||||||
|
this.deleteItem = this.constructor.deleteItem;
|
||||||
|
this.updatePrototype = this.updatePrototype.bind(this);
|
||||||
|
|
||||||
/**
|
this.$element = $(element);
|
||||||
* Collection Form plugin
|
this.$list = this.$element.find('[data-form-collection="list"]:first');
|
||||||
*
|
this.count = this.$list.children().length;
|
||||||
* @param element
|
this.lastChoice = null;
|
||||||
* @constructor
|
this.$element.on('click', '[data-form-collection="add"]:last', this.addItem);
|
||||||
*/
|
this.$element.on('click', '[data-form-collection="delete"]', this.deleteItem);
|
||||||
var CollectionForm = function (element) {
|
this.$element.on('change', '[data-form-collection="update"]', this.updateItem);
|
||||||
this.$element = $(element);
|
$(document).on('change', '[data-form-prototype="update"]', this.updatePrototype);
|
||||||
this.$list = this.$element.find('[data-form-collection="list"]:first');
|
$(document).on('collection-form-add', (event, addedElement) => {
|
||||||
this.count = this.$list.children().length;
|
$(addedElement).find('[data-form-type="collection"]').CollectionForm();
|
||||||
this.lastChoice = null;
|
$(document).trigger('dom-node-inserted', [$(addedElement)]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.$element.on(
|
/**
|
||||||
'click',
|
* Add a item to the collection.
|
||||||
'[data-form-collection="add"]:last',
|
* @param event
|
||||||
$.proxy(this.addItem, this)
|
*/
|
||||||
);
|
addItem(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
this.$element.on(
|
let prototype = this.$element.data('prototype');
|
||||||
'click',
|
|
||||||
'[data-form-collection="delete"]',
|
|
||||||
$.proxy(this.deleteItem, this)
|
|
||||||
);
|
|
||||||
|
|
||||||
this.$element.on(
|
prototype = prototype.replace(/__name__/g, this.count);
|
||||||
'change',
|
|
||||||
'[data-form-collection="update"]',
|
|
||||||
$.proxy(this.updateItem, this)
|
|
||||||
);
|
|
||||||
|
|
||||||
$(document).on(
|
this.$list.append(prototype);
|
||||||
'change',
|
this.count = this.count + 1;
|
||||||
'[data-form-prototype="update"]',
|
|
||||||
$.proxy(this.updatePrototype, this)
|
|
||||||
);
|
|
||||||
|
|
||||||
$(document).on('collection-form-add', function(e, addedElement) {
|
$(document).trigger('collection-form-add', [this.$list.children().last()]);
|
||||||
$(addedElement).find('[data-form-type="collection"]').CollectionForm();
|
}
|
||||||
$(document).trigger('dom-node-inserted', [$(addedElement)]);
|
|
||||||
});
|
/**
|
||||||
|
* Update item from the collection
|
||||||
|
*/
|
||||||
|
updateItem(event) {
|
||||||
|
event.preventDefault();
|
||||||
|
const $element = $(event.currentTarget);
|
||||||
|
const url = $element.data('form-url');
|
||||||
|
const value = $element.val();
|
||||||
|
const $container = $element.closest('[data-form-collection="item"]');
|
||||||
|
const index = $container.data('form-collection-index');
|
||||||
|
const position = $container.data('form-collection-index');
|
||||||
|
|
||||||
|
if (url) {
|
||||||
|
$container.load(url, { id: value, position });
|
||||||
|
} else {
|
||||||
|
let prototype = this.$element.find(`[data-form-prototype="${value}"]`).val();
|
||||||
|
|
||||||
|
prototype = prototype.replace(/__name__/g, index);
|
||||||
|
|
||||||
|
$container.replaceWith(prototype);
|
||||||
}
|
}
|
||||||
CollectionForm.prototype = {
|
$(document).trigger('collection-form-update', [$(event.currentTarget)]);
|
||||||
constructor : CollectionForm,
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a item to the collection.
|
* Delete item from the collection
|
||||||
* @param event
|
* @param event
|
||||||
*/
|
*/
|
||||||
addItem: function (event) {
|
static deleteItem(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var prototype = this.$element.data('prototype');
|
$(event.currentTarget)
|
||||||
|
.closest('[data-form-collection="item"]')
|
||||||
|
.remove();
|
||||||
|
|
||||||
prototype = prototype.replace(
|
$(document).trigger('collection-form-delete', [$(event.currentTarget)]);
|
||||||
/__name__/g,
|
}
|
||||||
this.count
|
|
||||||
);
|
|
||||||
|
|
||||||
this.$list.append(prototype);
|
/**
|
||||||
this.count = this.count + 1;
|
* Update the prototype
|
||||||
|
* @param event
|
||||||
|
*/
|
||||||
|
updatePrototype(event) {
|
||||||
|
const $target = $(event.currentTarget);
|
||||||
|
let prototypeName = $target.val();
|
||||||
|
|
||||||
$(document).trigger('collection-form-add', [this.$list.children().last()]);
|
if ($target.data('form-prototype-prefix') !== undefined) {
|
||||||
},
|
prototypeName = $target.data('form-prototype-prefix') + prototypeName;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
if (this.lastChoice !== null && this.lastChoice !== prototypeName) {
|
||||||
* Update item from the collection
|
this.$list.html('');
|
||||||
*/
|
}
|
||||||
updateItem: function (event) {
|
|
||||||
event.preventDefault();
|
|
||||||
var $element = $(event.currentTarget),
|
|
||||||
url = $element.data('form-url'),
|
|
||||||
value = $element.val(),
|
|
||||||
$container = $element.closest('[data-form-collection="item"]'),
|
|
||||||
index = $container.data('form-collection-index'),
|
|
||||||
position = $container.data('form-collection-index');
|
|
||||||
if (url) {
|
|
||||||
$container.load(url, {'id' : value, 'position' : position});
|
|
||||||
} else {
|
|
||||||
var prototype = this.$element.find('[data-form-prototype="'+ value +'"]').val();
|
|
||||||
|
|
||||||
prototype = prototype.replace(
|
this.lastChoice = prototypeName;
|
||||||
/__name__/g,
|
|
||||||
index
|
|
||||||
);
|
|
||||||
|
|
||||||
$container.replaceWith(prototype);
|
this.$element.data('prototype', this.$element.find(`[data-form-prototype="${prototypeName}"]`).val());
|
||||||
}
|
}
|
||||||
$(document).trigger('collection-form-update', [$(event.currentTarget)]);
|
}
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Delete item from the collection
|
* Plugin definition
|
||||||
* @param event
|
*/
|
||||||
*/
|
|
||||||
deleteItem: function (event) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
$(event.currentTarget)
|
$.fn.CollectionForm = function CollectionFormPlugin(option) {
|
||||||
.closest('[data-form-collection="item"]')
|
this.each((idx, el) => {
|
||||||
.remove();
|
const $element = $(el);
|
||||||
|
const data = $element.data('collectionForm');
|
||||||
|
const options = typeof option === 'object' && option;
|
||||||
|
|
||||||
$(document).trigger('collection-form-delete', [$(event.currentTarget)]);
|
if (!data) {
|
||||||
},
|
$element.data('collectionForm', new CollectionForm(el, options));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
$.fn.CollectionForm.Constructor = CollectionForm;
|
||||||
* Update the prototype
|
|
||||||
* @param event
|
|
||||||
*/
|
|
||||||
updatePrototype: function (event) {
|
|
||||||
var $target = $(event.currentTarget);
|
|
||||||
var prototypeName = $target.val();
|
|
||||||
|
|
||||||
if (undefined !== $target.data('form-prototype-prefix')) {
|
|
||||||
prototypeName = $target.data('form-prototype-prefix') + prototypeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null !== this.lastChoice && this.lastChoice !== prototypeName) {
|
|
||||||
this.$list.html('');
|
|
||||||
}
|
|
||||||
|
|
||||||
this.lastChoice = prototypeName;
|
|
||||||
|
|
||||||
this.$element.data(
|
|
||||||
'prototype',
|
|
||||||
this.$element.find('[data-form-prototype="'+ prototypeName +'"]').val()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Plugin definition
|
|
||||||
*/
|
|
||||||
|
|
||||||
$.fn.CollectionForm = function (option) {
|
|
||||||
return this.each(function () {
|
|
||||||
var $this = $(this);
|
|
||||||
var data = $this.data('collectionForm');
|
|
||||||
var options = typeof option == 'object' && option;
|
|
||||||
|
|
||||||
if (!data) {
|
|
||||||
$this.data(
|
|
||||||
'collectionForm',
|
|
||||||
(data = new CollectionForm(this, options))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
};
|
|
||||||
|
|
||||||
$.fn.CollectionForm.Constructor = CollectionForm;
|
|
||||||
|
|
||||||
}(jQuery);
|
|
||||||
|
|
|
||||||
|
|
@ -7,118 +7,117 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($) {
|
import 'semantic-ui-css/components/dropdown';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
const getNextIndex = function getNextIndex() {
|
||||||
productAttributes: function () {
|
return $('#attributesContainer').attr('data-count');
|
||||||
setAttributeChoiceListener();
|
};
|
||||||
|
|
||||||
$(this).dropdown({
|
const addAttributesNumber = function addAttributesNumber(number) {
|
||||||
onRemove: function(removedValue, removedText, $removedChoice) {
|
const currentIndex = parseInt(getNextIndex(), 10);
|
||||||
modifyAttributesListOnSelectorElementDelete(removedValue);
|
$('#attributesContainer').attr('data-count', currentIndex + number);
|
||||||
},
|
};
|
||||||
forceSelection: false
|
|
||||||
});
|
|
||||||
|
|
||||||
controlAttributesList();
|
const controlAttributesList = function controlAttributesList() {
|
||||||
modifySelectorOnAttributesListElementDelete();
|
$('#attributesContainer .attribute').each((index, element) => {
|
||||||
|
const value = $(element).attr('data-id');
|
||||||
|
$('#sylius_product_attribute_choice').dropdown('set selected', value);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const modifyAttributesListOnSelectorElementDelete = function modifyAttributesListOnSelectorElementDelete(removedValue) {
|
||||||
|
$(`#attributesContainer .attribute[data-id="${removedValue}"]`).remove();
|
||||||
|
};
|
||||||
|
|
||||||
|
const modifySelectorOnAttributesListElementDelete = function modifySelectorOnAttributesListElementDelete() {
|
||||||
|
$('.attribute button').off('click').on('click', (event) => {
|
||||||
|
const attributeId = $(event.currentTarget).parents('.attribute').attr('data-id');
|
||||||
|
|
||||||
|
$('div#attributeChoice > .ui.dropdown.search').dropdown('remove selected', attributeId);
|
||||||
|
modifyAttributesListOnSelectorElementDelete(attributeId);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const modifyAttributeFormElements = function modifyAttributeFormElements($response) {
|
||||||
|
$response.find('input,select,textarea').each((index, element) => {
|
||||||
|
if ($(element).attr('data-name') != null) {
|
||||||
|
$(element).attr('name', $(element).attr('data-name'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
};
|
||||||
|
|
||||||
|
const isInTheAttributesContainer = function isInTheAttributesContainer(attributeId) {
|
||||||
|
let result = false;
|
||||||
|
$('#attributesContainer .attribute').each((index, element) => {
|
||||||
|
const dataId = $(element).attr('data-id');
|
||||||
|
if (dataId === attributeId) {
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
const setAttributeChoiceListener = function setAttributeChoiceListener() {
|
||||||
|
const $attributeChoice = $('#attributeChoice');
|
||||||
|
$attributeChoice.find('button').on('click', (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
const $attributeChoiceSelect = $attributeChoice.find('select');
|
||||||
|
let queryData = '';
|
||||||
|
const $newAttributes = $attributeChoiceSelect.val();
|
||||||
|
|
||||||
|
if ($newAttributes != null) {
|
||||||
|
$attributeChoiceSelect.val().forEach((item) => {
|
||||||
|
if (!isInTheAttributesContainer(item)) {
|
||||||
|
queryData += `${$attributeChoiceSelect.prop('name')}=${item}&`;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
queryData += `count=${getNextIndex()}`;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: 'GET',
|
||||||
|
url: $(event.currentTarget).parent().attr('data-action'),
|
||||||
|
data: queryData,
|
||||||
|
dataType: 'html',
|
||||||
|
error() {
|
||||||
|
$('form').removeClass('loading');
|
||||||
|
},
|
||||||
|
success(response) {
|
||||||
|
const attributeFormElements = modifyAttributeFormElements($(response));
|
||||||
|
|
||||||
|
attributeFormElements.each((index, element) => {
|
||||||
|
const localeCode = $(element).find('input[type="hidden"]').last().val();
|
||||||
|
$(`#attributesContainer > div[data-tab="${localeCode}"]`).append(element);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#sylius_product_attribute_choice').val('');
|
||||||
|
|
||||||
|
addAttributesNumber($.grep(attributeFormElements, a => $(a).hasClass('attribute')).length);
|
||||||
|
modifySelectorOnAttributesListElementDelete();
|
||||||
|
|
||||||
|
$('form').removeClass('loading');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.extend({
|
||||||
|
productAttributes() {
|
||||||
|
setAttributeChoiceListener();
|
||||||
|
|
||||||
|
this.dropdown({
|
||||||
|
onRemove(removedValue) {
|
||||||
|
modifyAttributesListOnSelectorElementDelete(removedValue);
|
||||||
|
},
|
||||||
|
forceSelection: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
function addAttributesNumber(number) {
|
controlAttributesList();
|
||||||
var currentIndex = parseInt(getNextIndex());
|
modifySelectorOnAttributesListElementDelete();
|
||||||
$('#attributesContainer').attr('data-count', currentIndex+number);
|
},
|
||||||
}
|
});
|
||||||
|
|
||||||
function getNextIndex() {
|
|
||||||
return $('#attributesContainer').attr('data-count');
|
|
||||||
}
|
|
||||||
|
|
||||||
function controlAttributesList() {
|
|
||||||
$('#attributesContainer .attribute').each(function() {
|
|
||||||
var value = $(this).attr('data-id');
|
|
||||||
$('#sylius_product_attribute_choice').dropdown('set selected', value);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function modifyAttributesListOnSelectorElementDelete(removedValue) {
|
|
||||||
$('#attributesContainer .attribute[data-id="'+removedValue+'"]').remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
function modifySelectorOnAttributesListElementDelete() {
|
|
||||||
$('.attribute button').off('click').on('click', function() {
|
|
||||||
var attributeId = $(this).parents('.attribute').attr('data-id');
|
|
||||||
|
|
||||||
$('div#attributeChoice > .ui.dropdown.search').dropdown('remove selected', attributeId);
|
|
||||||
modifyAttributesListOnSelectorElementDelete(attributeId)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function modifyAttributeForms(data) {
|
|
||||||
$.each($(data).find('input,select,textarea'), function() {
|
|
||||||
if ($(this).attr('data-name') != null) {
|
|
||||||
$(this).attr('name', $(this).attr('data-name'));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setAttributeChoiceListener() {
|
|
||||||
var $attributeChoice = $('#attributeChoice');
|
|
||||||
$attributeChoice.find('button').on('click', function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
var $attributeChoiceSelect = $attributeChoice.find('select');
|
|
||||||
var data = '';
|
|
||||||
var $newAttributes = $attributeChoiceSelect.val();
|
|
||||||
|
|
||||||
if (null != $newAttributes) {
|
|
||||||
$attributeChoiceSelect.val().forEach(function(item) {
|
|
||||||
if (!isInTheAttributesContainer(item)) {
|
|
||||||
data += $attributeChoiceSelect.prop('name') + '=' + item + "&";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
data += "count=" + getNextIndex();
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: 'GET',
|
|
||||||
url: $(this).parent().attr('data-action'),
|
|
||||||
data: data,
|
|
||||||
dataType: 'html',
|
|
||||||
error: function() {
|
|
||||||
$('form').removeClass('loading');
|
|
||||||
},
|
|
||||||
success: function(data) {
|
|
||||||
var finalData = modifyAttributeForms($(data));
|
|
||||||
|
|
||||||
$(finalData).each(function() {
|
|
||||||
var localeCode = $(this).find('input[type="hidden"]').last().val();
|
|
||||||
$('#attributesContainer > div[data-tab="'+localeCode+'"]').append(this);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#sylius_product_attribute_choice').val('');
|
|
||||||
|
|
||||||
addAttributesNumber($.grep($(finalData), function (a) { return $(a).hasClass('attribute'); }).length);
|
|
||||||
modifySelectorOnAttributesListElementDelete();
|
|
||||||
|
|
||||||
$('form').removeClass('loading');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function isInTheAttributesContainer(attributeId) {
|
|
||||||
var result = false;
|
|
||||||
$('#attributesContainer .attribute').each(function() {
|
|
||||||
var dataId = $(this).attr('data-id');
|
|
||||||
if (dataId === attributeId) {
|
|
||||||
result = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
})( jQuery );
|
|
||||||
|
|
|
||||||
|
|
@ -7,65 +7,60 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/dropdown';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
productAutoComplete: function () {
|
productAutoComplete() {
|
||||||
$(this).each(function() {
|
this.each((index, element) => {
|
||||||
$(this).dropdown('set selected', $(this).find('input[name*="[associations]"]').val().split(',').filter(String));
|
const $element = $(element);
|
||||||
});
|
$element.dropdown('set selected', $element.find('input[name*="[associations]"]').val().split(',').filter(String));
|
||||||
|
|
||||||
$(this).dropdown({
|
|
||||||
delay: {
|
|
||||||
search: 250,
|
|
||||||
},
|
|
||||||
forceSelection: false,
|
|
||||||
apiSettings: {
|
|
||||||
dataType: 'JSON',
|
|
||||||
cache: false,
|
|
||||||
data: {
|
|
||||||
criteria: { search: { type: 'contains', value: '' } }
|
|
||||||
},
|
|
||||||
beforeSend: function(settings) {
|
|
||||||
settings.data.criteria.search.value = settings.urlData.query;
|
|
||||||
|
|
||||||
return settings;
|
|
||||||
},
|
|
||||||
onResponse: function (response) {
|
|
||||||
var myResults = [];
|
|
||||||
$.each(response._embedded.items, function (index, item) {
|
|
||||||
myResults.push({
|
|
||||||
name: item.name,
|
|
||||||
value: item.code
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
success: true,
|
|
||||||
results: myResults
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onAdd: function(addedValue, addedText, $addedChoice) {
|
|
||||||
var inputAssociation = $addedChoice.parents('.product-select').find('input[name*="[associations]"]');
|
|
||||||
var associatedProductCodes = 0 < inputAssociation.val().length ? inputAssociation.val().split(',').filter(String) : [];
|
|
||||||
|
|
||||||
associatedProductCodes.push(addedValue);
|
|
||||||
$.unique(associatedProductCodes.sort());
|
|
||||||
|
|
||||||
inputAssociation.attr('value', associatedProductCodes.join());
|
|
||||||
},
|
|
||||||
onRemove: function(removedValue, removedText, $removedChoice) {
|
|
||||||
var inputAssociation = $removedChoice.parents('.product-select').find('input[name*="[associations]"]');
|
|
||||||
var associatedProductCodes = 0 < inputAssociation.val().length ? inputAssociation.val().split(',').filter(String) : [];
|
|
||||||
|
|
||||||
associatedProductCodes.splice($.inArray(removedValue, associatedProductCodes), 1);
|
|
||||||
|
|
||||||
inputAssociation.attr('value', associatedProductCodes.join());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})( jQuery );
|
this.dropdown({
|
||||||
|
delay: {
|
||||||
|
search: 250,
|
||||||
|
},
|
||||||
|
forceSelection: false,
|
||||||
|
apiSettings: {
|
||||||
|
dataType: 'JSON',
|
||||||
|
cache: false,
|
||||||
|
data: {
|
||||||
|
criteria: { search: { type: 'contains', value: '' } },
|
||||||
|
},
|
||||||
|
beforeSend(settings) {
|
||||||
|
/* eslint-disable-next-line no-param-reassign */
|
||||||
|
settings.data.criteria.search.value = settings.urlData.query;
|
||||||
|
|
||||||
|
return settings;
|
||||||
|
},
|
||||||
|
onResponse(response) {
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
results: response._embedded.items.map(item => ({
|
||||||
|
name: item.name,
|
||||||
|
value: item.code,
|
||||||
|
})),
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
onAdd(addedValue, addedText, $addedChoice) {
|
||||||
|
const inputAssociation = $addedChoice.parents('.product-select').find('input[name*="[associations]"]');
|
||||||
|
const associatedProductCodes = inputAssociation.val().length > 0 ? inputAssociation.val().split(',').filter(String) : [];
|
||||||
|
|
||||||
|
associatedProductCodes.push(addedValue);
|
||||||
|
$.unique(associatedProductCodes.sort());
|
||||||
|
|
||||||
|
inputAssociation.attr('value', associatedProductCodes.join());
|
||||||
|
},
|
||||||
|
onRemove(removedValue, removedText, $removedChoice) {
|
||||||
|
const inputAssociation = $removedChoice.parents('.product-select').find('input[name*="[associations]"]');
|
||||||
|
const associatedProductCodes = inputAssociation.val().length > 0 ? inputAssociation.val().split(',').filter(String) : [];
|
||||||
|
|
||||||
|
associatedProductCodes.splice($.inArray(removedValue, associatedProductCodes), 1);
|
||||||
|
|
||||||
|
inputAssociation.attr('value', associatedProductCodes.join());
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,68 @@
|
||||||
(function ($) {
|
/*
|
||||||
'use strict';
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Paweł Jędrzejewski
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
var methods = {
|
import $ from 'jquery';
|
||||||
init: function(options) {
|
|
||||||
var settings = $.extend({
|
|
||||||
'prototypePrefix': false,
|
|
||||||
'containerSelector': false
|
|
||||||
}, options);
|
|
||||||
|
|
||||||
return this.each(function() {
|
const methods = {
|
||||||
show($(this), false);
|
init(options) {
|
||||||
$(this).change(function() {
|
const settings = $.extend({
|
||||||
show($(this), true);
|
prototypePrefix: false,
|
||||||
});
|
containerSelector: false,
|
||||||
|
}, options);
|
||||||
|
|
||||||
function show(element, replace) {
|
const show = function show(element, replace) {
|
||||||
var selectedValue = element.val();
|
const selectedValue = element.val();
|
||||||
var prototypePrefix = element.attr('id');
|
let prototypePrefix = element.attr('id');
|
||||||
if (false != settings.prototypePrefix) {
|
if (settings.prototypePrefix != false) {
|
||||||
prototypePrefix = settings.prototypePrefix;
|
({ prototypePrefix } = settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
var prototypeElement = $('#' + prototypePrefix + '_' + selectedValue);
|
const prototypeElement = $(`#${prototypePrefix}_${selectedValue}`);
|
||||||
var container;
|
let container;
|
||||||
|
|
||||||
if (settings.containerSelector) {
|
if (settings.containerSelector) {
|
||||||
container = $(settings.containerSelector);
|
container = $(settings.containerSelector);
|
||||||
} else {
|
} else {
|
||||||
container = $(prototypeElement.data('container'));
|
container = $(prototypeElement.data('container'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!container.length) {
|
if (!container.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!prototypeElement.length) {
|
if (!prototypeElement.length) {
|
||||||
container.empty();
|
container.empty();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (replace || !container.html().trim()) {
|
if (replace || !container.html().trim()) {
|
||||||
container.html(prototypeElement.data('prototype'));
|
container.html(prototypeElement.data('prototype'));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn.handlePrototypes = function(method) {
|
return this.each((index, element) => {
|
||||||
if (methods[method]) {
|
show($(element), false);
|
||||||
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
$(element).change((event) => {
|
||||||
} else if (typeof method === 'object' || !method) {
|
show($(event.currentTarget), true);
|
||||||
return methods.init.apply(this, arguments);
|
});
|
||||||
} else {
|
});
|
||||||
$.error( 'Method ' + method + ' does not exist on jQuery.handlePrototypes' );
|
},
|
||||||
}
|
};
|
||||||
};
|
|
||||||
})(jQuery);
|
$.fn.handlePrototypes = function handlePrototypes(method, ...args) {
|
||||||
|
if (methods[method]) {
|
||||||
|
return methods[method].apply(this, args);
|
||||||
|
} else if (typeof method === 'object' || !method) {
|
||||||
|
return methods.init.apply(this, [method, ...args]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$.error(`Method ${method} does not exist on jQuery.handlePrototypes`);
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,32 +7,31 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import 'semantic-ui-css/components/modal';
|
||||||
'use strict';
|
import $ from 'jquery';
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
requireConfirmation: function() {
|
requireConfirmation() {
|
||||||
return this.each(function() {
|
this.each((idx, el) => {
|
||||||
return $(this).on('click', function(event) {
|
$(el).on('click', (evt) => {
|
||||||
event.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
||||||
var actionButton = $(this);
|
const actionButton = $(evt.currentTarget);
|
||||||
|
|
||||||
if (actionButton.is('a')) {
|
if (actionButton.is('a')) {
|
||||||
$('#confirmation-button').attr('href', actionButton.attr('href'));
|
$('#confirmation-button').attr('href', actionButton.attr('href'));
|
||||||
}
|
|
||||||
|
|
||||||
if (actionButton.is('button')) {
|
|
||||||
$('#confirmation-button').on('click', function(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
return actionButton.closest('form').submit();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return $('#confirmation-modal').modal('show');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (actionButton.is('button')) {
|
||||||
|
$('#confirmation-button').on('click', (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
actionButton.closest('form').submit();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#confirmation-modal').modal('show');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})( jQuery );
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -7,27 +7,25 @@
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ( $ ) {
|
import $ from 'jquery';
|
||||||
'use strict';
|
|
||||||
|
|
||||||
$.fn.extend({
|
$.fn.extend({
|
||||||
toggleElement: function() {
|
toggleElement() {
|
||||||
return this.each(function() {
|
this.each((idx, el) => {
|
||||||
$(this).on('change', function(event) {
|
$(el).on('change', (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
var toggleElement = $(this);
|
const toggle = $(event.currentTarget);
|
||||||
var targetElement = $('#' + toggleElement.data('toggles'));
|
const targetElement = $(`#${toggle.data('toggles')}`);
|
||||||
|
|
||||||
if (toggleElement.is(':checked')) {
|
if (toggle.is(':checked')) {
|
||||||
targetElement.show();
|
targetElement.show();
|
||||||
} else {
|
} else {
|
||||||
targetElement.hide();
|
targetElement.hide();
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return $(this).trigger('change');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(el).trigger('change');
|
||||||
});
|
});
|
||||||
})( jQuery );
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
486
yarn.lock
486
yarn.lock
|
|
@ -2,6 +2,20 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@babel/code-frame@^7.0.0-beta.47":
|
||||||
|
version "7.0.0-beta.49"
|
||||||
|
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.49.tgz#becd805482734440c9d137e46d77340e64d7f51b"
|
||||||
|
dependencies:
|
||||||
|
"@babel/highlight" "7.0.0-beta.49"
|
||||||
|
|
||||||
|
"@babel/highlight@7.0.0-beta.49":
|
||||||
|
version "7.0.0-beta.49"
|
||||||
|
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.49.tgz#96bdc6b43e13482012ba6691b1018492d39622cc"
|
||||||
|
dependencies:
|
||||||
|
chalk "^2.0.0"
|
||||||
|
esutils "^2.0.2"
|
||||||
|
js-tokens "^3.0.0"
|
||||||
|
|
||||||
"@gulp-sourcemaps/map-sources@1.X":
|
"@gulp-sourcemaps/map-sources@1.X":
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
|
resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
|
||||||
|
|
@ -9,28 +23,40 @@
|
||||||
normalize-path "^2.0.1"
|
normalize-path "^2.0.1"
|
||||||
through2 "^2.0.3"
|
through2 "^2.0.3"
|
||||||
|
|
||||||
|
"@types/estree@0.0.39":
|
||||||
|
version "0.0.39"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
|
||||||
|
|
||||||
|
"@types/node@*":
|
||||||
|
version "10.3.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.3.2.tgz#3840ec6c12556fdda6e0e6d036df853101d732a4"
|
||||||
|
|
||||||
abbrev@1:
|
abbrev@1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||||
|
|
||||||
|
acorn-es7-plugin@^1.1.7:
|
||||||
|
version "1.1.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/acorn-es7-plugin/-/acorn-es7-plugin-1.1.7.tgz#f2ee1f3228a90eead1245f9ab1922eb2e71d336b"
|
||||||
|
|
||||||
acorn-jsx@^3.0.0:
|
acorn-jsx@^3.0.0:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
|
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
|
||||||
dependencies:
|
dependencies:
|
||||||
acorn "^3.0.4"
|
acorn "^3.0.4"
|
||||||
|
|
||||||
acorn@4.X:
|
acorn@4.X, acorn@^4.0.3:
|
||||||
version "4.0.13"
|
version "4.0.13"
|
||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
|
||||||
|
|
||||||
|
acorn@>=2.5.2, acorn@^5.5.0:
|
||||||
|
version "5.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.6.2.tgz#b1da1d7be2ac1b4a327fb9eab851702c5045b4e7"
|
||||||
|
|
||||||
acorn@^3.0.4:
|
acorn@^3.0.4:
|
||||||
version "3.3.0"
|
version "3.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
|
||||||
|
|
||||||
acorn@^5.5.0:
|
|
||||||
version "5.6.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.6.2.tgz#b1da1d7be2ac1b4a327fb9eab851702c5045b4e7"
|
|
||||||
|
|
||||||
ajv-keywords@^2.1.0:
|
ajv-keywords@^2.1.0:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762"
|
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762"
|
||||||
|
|
@ -51,14 +77,6 @@ ajv@^5.2.3, ajv@^5.3.0:
|
||||||
fast-json-stable-stringify "^2.0.0"
|
fast-json-stable-stringify "^2.0.0"
|
||||||
json-schema-traverse "^0.3.0"
|
json-schema-traverse "^0.3.0"
|
||||||
|
|
||||||
align-text@^0.1.1, align-text@^0.1.3:
|
|
||||||
version "0.1.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
|
|
||||||
dependencies:
|
|
||||||
kind-of "^3.0.2"
|
|
||||||
longest "^1.0.1"
|
|
||||||
repeat-string "^1.5.2"
|
|
||||||
|
|
||||||
amdefine@>=0.0.4:
|
amdefine@>=0.0.4:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
|
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
|
||||||
|
|
@ -143,6 +161,12 @@ argparse@^1.0.7:
|
||||||
dependencies:
|
dependencies:
|
||||||
sprintf-js "~1.0.2"
|
sprintf-js "~1.0.2"
|
||||||
|
|
||||||
|
arr-diff@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
|
||||||
|
dependencies:
|
||||||
|
arr-flatten "^1.0.1"
|
||||||
|
|
||||||
arr-diff@^4.0.0:
|
arr-diff@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
|
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
|
||||||
|
|
@ -214,6 +238,10 @@ array-uniq@^1.0.1, array-uniq@^1.0.2:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
|
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
|
||||||
|
|
||||||
|
array-unique@^0.2.1:
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
|
||||||
|
|
||||||
array-unique@^0.3.2:
|
array-unique@^0.3.2:
|
||||||
version "0.3.2"
|
version "0.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
|
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
|
||||||
|
|
@ -261,10 +289,6 @@ async-settle@^1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
async-done "^1.2.2"
|
async-done "^1.2.2"
|
||||||
|
|
||||||
async@~0.2.6:
|
|
||||||
version "0.2.10"
|
|
||||||
resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
|
|
||||||
|
|
||||||
asynckit@^0.4.0:
|
asynckit@^0.4.0:
|
||||||
version "0.4.0"
|
version "0.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
||||||
|
|
@ -289,7 +313,7 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
|
||||||
esutils "^2.0.2"
|
esutils "^2.0.2"
|
||||||
js-tokens "^3.0.2"
|
js-tokens "^3.0.2"
|
||||||
|
|
||||||
babel-core@^6.26.0:
|
babel-core@^6.26.0, babel-core@^6.26.3:
|
||||||
version "6.26.3"
|
version "6.26.3"
|
||||||
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
|
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -439,6 +463,22 @@ babel-plugin-check-es2015-constants@^6.22.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
babel-runtime "^6.22.0"
|
babel-runtime "^6.22.0"
|
||||||
|
|
||||||
|
babel-plugin-external-helpers@^6.22.0:
|
||||||
|
version "6.22.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/babel-plugin-external-helpers/-/babel-plugin-external-helpers-6.22.0.tgz#2285f48b02bd5dede85175caf8c62e86adccefa1"
|
||||||
|
dependencies:
|
||||||
|
babel-runtime "^6.22.0"
|
||||||
|
|
||||||
|
babel-plugin-module-resolver@^3.1.1:
|
||||||
|
version "3.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-3.1.1.tgz#881cf67e3d4b8400d5eaaefc1be44d2dc1fe404f"
|
||||||
|
dependencies:
|
||||||
|
find-babel-config "^1.1.0"
|
||||||
|
glob "^7.1.2"
|
||||||
|
pkg-up "^2.0.0"
|
||||||
|
reselect "^3.0.1"
|
||||||
|
resolve "^1.4.0"
|
||||||
|
|
||||||
babel-plugin-syntax-async-functions@^6.8.0:
|
babel-plugin-syntax-async-functions@^6.8.0:
|
||||||
version "6.13.0"
|
version "6.13.0"
|
||||||
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
|
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
|
||||||
|
|
@ -652,12 +692,6 @@ babel-plugin-transform-regenerator@^6.22.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
regenerator-transform "^0.10.0"
|
regenerator-transform "^0.10.0"
|
||||||
|
|
||||||
babel-plugin-transform-runtime@^6.23.0:
|
|
||||||
version "6.23.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz#88490d446502ea9b8e7efb0fe09ec4d99479b1ee"
|
|
||||||
dependencies:
|
|
||||||
babel-runtime "^6.22.0"
|
|
||||||
|
|
||||||
babel-plugin-transform-strict-mode@^6.24.1:
|
babel-plugin-transform-strict-mode@^6.24.1:
|
||||||
version "6.24.1"
|
version "6.24.1"
|
||||||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
|
resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758"
|
||||||
|
|
@ -665,6 +699,14 @@ babel-plugin-transform-strict-mode@^6.24.1:
|
||||||
babel-runtime "^6.22.0"
|
babel-runtime "^6.22.0"
|
||||||
babel-types "^6.24.1"
|
babel-types "^6.24.1"
|
||||||
|
|
||||||
|
babel-polyfill@^6.26.0:
|
||||||
|
version "6.26.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
|
||||||
|
dependencies:
|
||||||
|
babel-runtime "^6.26.0"
|
||||||
|
core-js "^2.5.0"
|
||||||
|
regenerator-runtime "^0.10.5"
|
||||||
|
|
||||||
babel-preset-env@^1.7.0:
|
babel-preset-env@^1.7.0:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a"
|
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a"
|
||||||
|
|
@ -834,6 +876,14 @@ brace-expansion@^1.1.7:
|
||||||
balanced-match "^1.0.0"
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
|
braces@^1.8.2:
|
||||||
|
version "1.8.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
|
||||||
|
dependencies:
|
||||||
|
expand-range "^1.8.1"
|
||||||
|
preserve "^0.2.0"
|
||||||
|
repeat-element "^1.1.2"
|
||||||
|
|
||||||
braces@^2.3.0, braces@^2.3.1:
|
braces@^2.3.0, braces@^2.3.1:
|
||||||
version "2.3.2"
|
version "2.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
|
resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729"
|
||||||
|
|
@ -868,6 +918,10 @@ builtin-modules@^1.0.0:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
|
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
|
||||||
|
|
||||||
|
builtin-modules@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-2.0.0.tgz#60b7ef5ae6546bd7deefa74b08b62a43a232648e"
|
||||||
|
|
||||||
bytes@2.2.0:
|
bytes@2.2.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.2.0.tgz#fd35464a403f6f9117c2de3609ecff9cae000588"
|
resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.2.0.tgz#fd35464a403f6f9117c2de3609ecff9cae000588"
|
||||||
|
|
@ -907,10 +961,6 @@ camelcase-keys@^2.0.0:
|
||||||
camelcase "^2.0.0"
|
camelcase "^2.0.0"
|
||||||
map-obj "^1.0.0"
|
map-obj "^1.0.0"
|
||||||
|
|
||||||
camelcase@^1.0.2:
|
|
||||||
version "1.2.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
|
|
||||||
|
|
||||||
camelcase@^2.0.0:
|
camelcase@^2.0.0:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
|
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
|
||||||
|
|
@ -931,13 +981,6 @@ caseless@~0.12.0:
|
||||||
version "0.12.0"
|
version "0.12.0"
|
||||||
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
|
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
|
||||||
|
|
||||||
center-align@^0.1.1:
|
|
||||||
version "0.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
|
|
||||||
dependencies:
|
|
||||||
align-text "^0.1.3"
|
|
||||||
lazy-cache "^1.0.3"
|
|
||||||
|
|
||||||
chalk@^0.5.1:
|
chalk@^0.5.1:
|
||||||
version "0.5.1"
|
version "0.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174"
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.5.1.tgz#663b3a648b68b55d04690d49167aa837858f2174"
|
||||||
|
|
@ -1015,14 +1058,6 @@ cli-width@^2.0.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
|
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
|
||||||
|
|
||||||
cliui@^2.1.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
|
|
||||||
dependencies:
|
|
||||||
center-align "^0.1.1"
|
|
||||||
right-align "^0.1.1"
|
|
||||||
wordwrap "0.0.2"
|
|
||||||
|
|
||||||
cliui@^3.2.0:
|
cliui@^3.2.0:
|
||||||
version "3.2.0"
|
version "3.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
|
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
|
||||||
|
|
@ -1102,7 +1137,7 @@ combined-stream@^1.0.5, combined-stream@~1.0.5:
|
||||||
dependencies:
|
dependencies:
|
||||||
delayed-stream "~1.0.0"
|
delayed-stream "~1.0.0"
|
||||||
|
|
||||||
commander@^2.9.0:
|
commander@^2.9.0, commander@~2.15.0:
|
||||||
version "2.15.1"
|
version "2.15.1"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
|
||||||
|
|
||||||
|
|
@ -1216,10 +1251,6 @@ dateformat@^2.0.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
|
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
|
||||||
|
|
||||||
deap@^1.0.0:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/deap/-/deap-1.0.1.tgz#0646e9e1a095ffe8a9e404d68d1f76dcf57e66fb"
|
|
||||||
|
|
||||||
debug-fabulous@0.0.X:
|
debug-fabulous@0.0.X:
|
||||||
version "0.0.4"
|
version "0.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.0.4.tgz#fa071c5d87484685424807421ca4b16b0b1a0763"
|
resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.0.4.tgz#fa071c5d87484685424807421ca4b16b0b1a0763"
|
||||||
|
|
@ -1246,7 +1277,7 @@ debug@~2.2.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
ms "0.7.1"
|
ms "0.7.1"
|
||||||
|
|
||||||
decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
|
decamelize@^1.1.1, decamelize@^1.1.2:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
|
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
|
||||||
|
|
||||||
|
|
@ -1254,6 +1285,10 @@ decode-uri-component@^0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
|
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
|
||||||
|
|
||||||
|
dedent@^0.7.0:
|
||||||
|
version "0.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
|
||||||
|
|
||||||
deep-extend@^0.6.0:
|
deep-extend@^0.6.0:
|
||||||
version "0.6.0"
|
version "0.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
|
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
|
||||||
|
|
@ -1447,6 +1482,13 @@ eslint-config-airbnb-base@^12.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint-restricted-globals "^0.1.1"
|
eslint-restricted-globals "^0.1.1"
|
||||||
|
|
||||||
|
eslint-import-resolver-babel-module@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/eslint-import-resolver-babel-module/-/eslint-import-resolver-babel-module-4.0.0.tgz#1c596f7fb9815050292c8750d523b27a5444b4bf"
|
||||||
|
dependencies:
|
||||||
|
pkg-up "^2.0.0"
|
||||||
|
resolve "^1.4.0"
|
||||||
|
|
||||||
eslint-import-resolver-node@^0.3.1:
|
eslint-import-resolver-node@^0.3.1:
|
||||||
version "0.3.2"
|
version "0.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a"
|
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a"
|
||||||
|
|
@ -1561,6 +1603,14 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1:
|
||||||
version "4.2.0"
|
version "4.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
|
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
|
||||||
|
|
||||||
|
estree-walker@^0.2.0, estree-walker@^0.2.1:
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"
|
||||||
|
|
||||||
|
estree-walker@^0.5.1, estree-walker@^0.5.2:
|
||||||
|
version "0.5.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39"
|
||||||
|
|
||||||
esutils@^2.0.2:
|
esutils@^2.0.2:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
|
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
|
||||||
|
|
@ -1577,6 +1627,12 @@ event-stream@^3.1.7:
|
||||||
stream-combiner "~0.0.4"
|
stream-combiner "~0.0.4"
|
||||||
through "~2.3.1"
|
through "~2.3.1"
|
||||||
|
|
||||||
|
expand-brackets@^0.1.4:
|
||||||
|
version "0.1.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
|
||||||
|
dependencies:
|
||||||
|
is-posix-bracket "^0.1.0"
|
||||||
|
|
||||||
expand-brackets@^2.1.4:
|
expand-brackets@^2.1.4:
|
||||||
version "2.1.4"
|
version "2.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
|
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622"
|
||||||
|
|
@ -1589,6 +1645,12 @@ expand-brackets@^2.1.4:
|
||||||
snapdragon "^0.8.1"
|
snapdragon "^0.8.1"
|
||||||
to-regex "^3.0.1"
|
to-regex "^3.0.1"
|
||||||
|
|
||||||
|
expand-range@^1.8.1:
|
||||||
|
version "1.8.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
|
||||||
|
dependencies:
|
||||||
|
fill-range "^2.1.0"
|
||||||
|
|
||||||
expand-tilde@^2.0.0, expand-tilde@^2.0.2:
|
expand-tilde@^2.0.0, expand-tilde@^2.0.2:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
|
resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
|
||||||
|
|
@ -1620,6 +1682,12 @@ external-editor@^2.0.4:
|
||||||
iconv-lite "^0.4.17"
|
iconv-lite "^0.4.17"
|
||||||
tmp "^0.0.33"
|
tmp "^0.0.33"
|
||||||
|
|
||||||
|
extglob@^0.3.1:
|
||||||
|
version "0.3.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
|
||||||
|
dependencies:
|
||||||
|
is-extglob "^1.0.0"
|
||||||
|
|
||||||
extglob@^2.0.4:
|
extglob@^2.0.4:
|
||||||
version "2.0.4"
|
version "2.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
|
resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543"
|
||||||
|
|
@ -1641,7 +1709,7 @@ extsprintf@^1.2.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
|
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
|
||||||
|
|
||||||
fancy-log@^1.0.0, fancy-log@^1.1.0, fancy-log@^1.3.2:
|
fancy-log@^1.1.0, fancy-log@^1.3.2:
|
||||||
version "1.3.2"
|
version "1.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1"
|
resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -1649,6 +1717,13 @@ fancy-log@^1.0.0, fancy-log@^1.1.0, fancy-log@^1.3.2:
|
||||||
color-support "^1.1.3"
|
color-support "^1.1.3"
|
||||||
time-stamp "^1.0.0"
|
time-stamp "^1.0.0"
|
||||||
|
|
||||||
|
fast-async@^6.3.7:
|
||||||
|
version "6.3.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/fast-async/-/fast-async-6.3.7.tgz#b4a406f2c59890b8b1b4c8468a36bd7f1a57e47f"
|
||||||
|
dependencies:
|
||||||
|
nodent-compiler "^3.2.4"
|
||||||
|
nodent-runtime ">=3.2.1"
|
||||||
|
|
||||||
fast-deep-equal@^1.0.0:
|
fast-deep-equal@^1.0.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
|
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
|
||||||
|
|
@ -1680,6 +1755,20 @@ file-entry-cache@^2.0.0:
|
||||||
flat-cache "^1.2.1"
|
flat-cache "^1.2.1"
|
||||||
object-assign "^4.0.1"
|
object-assign "^4.0.1"
|
||||||
|
|
||||||
|
filename-regex@^2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
|
||||||
|
|
||||||
|
fill-range@^2.1.0:
|
||||||
|
version "2.2.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
|
||||||
|
dependencies:
|
||||||
|
is-number "^2.1.0"
|
||||||
|
isobject "^2.0.0"
|
||||||
|
randomatic "^3.0.0"
|
||||||
|
repeat-element "^1.1.2"
|
||||||
|
repeat-string "^1.5.2"
|
||||||
|
|
||||||
fill-range@^4.0.0:
|
fill-range@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
|
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7"
|
||||||
|
|
@ -1689,6 +1778,13 @@ fill-range@^4.0.0:
|
||||||
repeat-string "^1.6.1"
|
repeat-string "^1.6.1"
|
||||||
to-regex-range "^2.1.0"
|
to-regex-range "^2.1.0"
|
||||||
|
|
||||||
|
find-babel-config@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.1.0.tgz#acc01043a6749fec34429be6b64f542ebb5d6355"
|
||||||
|
dependencies:
|
||||||
|
json5 "^0.5.1"
|
||||||
|
path-exists "^3.0.0"
|
||||||
|
|
||||||
find-up@^1.0.0:
|
find-up@^1.0.0:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
|
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
|
||||||
|
|
@ -1696,7 +1792,7 @@ find-up@^1.0.0:
|
||||||
path-exists "^2.0.0"
|
path-exists "^2.0.0"
|
||||||
pinkie-promise "^2.0.0"
|
pinkie-promise "^2.0.0"
|
||||||
|
|
||||||
find-up@^2.0.0:
|
find-up@^2.0.0, find-up@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
|
resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
@ -1745,6 +1841,12 @@ for-in@^1.0.1, for-in@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
|
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
|
||||||
|
|
||||||
|
for-own@^0.1.4:
|
||||||
|
version "0.1.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
|
||||||
|
dependencies:
|
||||||
|
for-in "^1.0.1"
|
||||||
|
|
||||||
for-own@^1.0.0:
|
for-own@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b"
|
resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b"
|
||||||
|
|
@ -1869,6 +1971,19 @@ getpass@^0.1.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
assert-plus "^1.0.0"
|
assert-plus "^1.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"
|
||||||
|
dependencies:
|
||||||
|
glob-parent "^2.0.0"
|
||||||
|
is-glob "^2.0.0"
|
||||||
|
|
||||||
|
glob-parent@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
|
||||||
|
dependencies:
|
||||||
|
is-glob "^2.0.0"
|
||||||
|
|
||||||
glob-parent@^3.1.0:
|
glob-parent@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
|
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
|
||||||
|
|
@ -2089,19 +2204,6 @@ gulp-sourcemaps@^1.6.0:
|
||||||
through2 "2.X"
|
through2 "2.X"
|
||||||
vinyl "1.X"
|
vinyl "1.X"
|
||||||
|
|
||||||
gulp-uglify@^1.5.1:
|
|
||||||
version "1.5.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-1.5.4.tgz#524788d87666d09f9d0c21fb2177f90039a658c9"
|
|
||||||
dependencies:
|
|
||||||
deap "^1.0.0"
|
|
||||||
fancy-log "^1.0.0"
|
|
||||||
gulp-util "^3.0.0"
|
|
||||||
isobject "^2.0.0"
|
|
||||||
through2 "^2.0.0"
|
|
||||||
uglify-js "2.6.4"
|
|
||||||
uglify-save-license "^0.4.1"
|
|
||||||
vinyl-sourcemaps-apply "^0.2.0"
|
|
||||||
|
|
||||||
gulp-uglifycss@^1.0.5:
|
gulp-uglifycss@^1.0.5:
|
||||||
version "1.0.9"
|
version "1.0.9"
|
||||||
resolved "https://registry.yarnpkg.com/gulp-uglifycss/-/gulp-uglifycss-1.0.9.tgz#4d58cca04251c3f1e0140fb2a5dcbe8bebb21244"
|
resolved "https://registry.yarnpkg.com/gulp-uglifycss/-/gulp-uglifycss-1.0.9.tgz#4d58cca04251c3f1e0140fb2a5dcbe8bebb21244"
|
||||||
|
|
@ -2433,6 +2535,16 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2:
|
||||||
is-data-descriptor "^1.0.0"
|
is-data-descriptor "^1.0.0"
|
||||||
kind-of "^6.0.2"
|
kind-of "^6.0.2"
|
||||||
|
|
||||||
|
is-dotfile@^1.0.0:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
|
||||||
|
|
||||||
|
is-equal-shallow@^0.1.3:
|
||||||
|
version "0.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
|
||||||
|
dependencies:
|
||||||
|
is-primitive "^2.0.0"
|
||||||
|
|
||||||
is-extendable@^0.1.0, is-extendable@^0.1.1:
|
is-extendable@^0.1.0, is-extendable@^0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
|
resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
|
||||||
|
|
@ -2443,6 +2555,10 @@ is-extendable@^1.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-plain-object "^2.0.4"
|
is-plain-object "^2.0.4"
|
||||||
|
|
||||||
|
is-extglob@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
|
||||||
|
|
||||||
is-extglob@^2.1.0, is-extglob@^2.1.1:
|
is-extglob@^2.1.0, is-extglob@^2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
|
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
|
||||||
|
|
@ -2463,6 +2579,12 @@ is-fullwidth-code-point@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
|
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
|
||||||
|
|
||||||
|
is-glob@^2.0.0, is-glob@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
|
||||||
|
dependencies:
|
||||||
|
is-extglob "^1.0.0"
|
||||||
|
|
||||||
is-glob@^3.1.0:
|
is-glob@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
|
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a"
|
||||||
|
|
@ -2475,6 +2597,10 @@ is-glob@^4.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-extglob "^2.1.1"
|
is-extglob "^2.1.1"
|
||||||
|
|
||||||
|
is-module@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
|
||||||
|
|
||||||
is-my-ip-valid@^1.0.0:
|
is-my-ip-valid@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824"
|
resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824"
|
||||||
|
|
@ -2493,6 +2619,12 @@ is-negated-glob@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2"
|
resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2"
|
||||||
|
|
||||||
|
is-number@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
|
||||||
|
dependencies:
|
||||||
|
kind-of "^3.0.2"
|
||||||
|
|
||||||
is-number@^3.0.0:
|
is-number@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
|
resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
|
||||||
|
|
@ -2535,6 +2667,14 @@ is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4:
|
||||||
dependencies:
|
dependencies:
|
||||||
isobject "^3.0.1"
|
isobject "^3.0.1"
|
||||||
|
|
||||||
|
is-posix-bracket@^0.1.0:
|
||||||
|
version "0.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
|
||||||
|
|
||||||
|
is-primitive@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
|
||||||
|
|
||||||
is-promise@^2.1.0:
|
is-promise@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
|
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
|
||||||
|
|
@ -2710,10 +2850,6 @@ last-run@^1.1.0:
|
||||||
default-resolution "^2.0.0"
|
default-resolution "^2.0.0"
|
||||||
es6-weak-map "^2.0.1"
|
es6-weak-map "^2.0.1"
|
||||||
|
|
||||||
lazy-cache@^1.0.3:
|
|
||||||
version "1.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
|
|
||||||
|
|
||||||
lazy-debug-legacy@0.0.X:
|
lazy-debug-legacy@0.0.X:
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz#537716c0776e4cf79e3ed1b621f7658c2911b1b1"
|
resolved "https://registry.yarnpkg.com/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz#537716c0776e4cf79e3ed1b621f7658c2911b1b1"
|
||||||
|
|
@ -2916,10 +3052,6 @@ lodash@^4.0.0, lodash@^4.17.4, lodash@^4.3.0, lodash@~4.17.10:
|
||||||
version "4.17.10"
|
version "4.17.10"
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
|
||||||
|
|
||||||
longest@^1.0.1:
|
|
||||||
version "1.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
|
|
||||||
|
|
||||||
loose-envify@^1.0.0:
|
loose-envify@^1.0.0:
|
||||||
version "1.3.1"
|
version "1.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
|
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
|
||||||
|
|
@ -2944,6 +3076,18 @@ lru-cache@^4.0.1:
|
||||||
pseudomap "^1.0.2"
|
pseudomap "^1.0.2"
|
||||||
yallist "^2.1.2"
|
yallist "^2.1.2"
|
||||||
|
|
||||||
|
magic-string@^0.16.0:
|
||||||
|
version "0.16.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.16.0.tgz#970ebb0da7193301285fb1aa650f39bdd81eb45a"
|
||||||
|
dependencies:
|
||||||
|
vlq "^0.2.1"
|
||||||
|
|
||||||
|
magic-string@^0.22.4:
|
||||||
|
version "0.22.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e"
|
||||||
|
dependencies:
|
||||||
|
vlq "^0.2.2"
|
||||||
|
|
||||||
make-iterator@^1.0.0:
|
make-iterator@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6"
|
resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6"
|
||||||
|
|
@ -2977,6 +3121,10 @@ matchdep@^2.0.0:
|
||||||
resolve "^1.4.0"
|
resolve "^1.4.0"
|
||||||
stack-trace "0.0.10"
|
stack-trace "0.0.10"
|
||||||
|
|
||||||
|
math-random@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
|
||||||
|
|
||||||
media-typer@0.3.0:
|
media-typer@0.3.0:
|
||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
||||||
|
|
@ -3002,6 +3150,24 @@ merge-stream@^1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
readable-stream "^2.0.1"
|
readable-stream "^2.0.1"
|
||||||
|
|
||||||
|
micromatch@^2.3.11:
|
||||||
|
version "2.3.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
|
||||||
|
dependencies:
|
||||||
|
arr-diff "^2.0.0"
|
||||||
|
array-unique "^0.2.1"
|
||||||
|
braces "^1.8.2"
|
||||||
|
expand-brackets "^0.1.4"
|
||||||
|
extglob "^0.3.1"
|
||||||
|
filename-regex "^2.0.0"
|
||||||
|
is-extglob "^1.0.0"
|
||||||
|
is-glob "^2.0.1"
|
||||||
|
kind-of "^3.0.2"
|
||||||
|
normalize-path "^2.0.1"
|
||||||
|
object.omit "^2.0.0"
|
||||||
|
parse-glob "^3.0.4"
|
||||||
|
regex-cache "^0.4.2"
|
||||||
|
|
||||||
micromatch@^3.0.4, micromatch@^3.1.4:
|
micromatch@^3.0.4, micromatch@^3.1.4:
|
||||||
version "3.1.10"
|
version "3.1.10"
|
||||||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
|
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
|
||||||
|
|
@ -3207,6 +3373,23 @@ node-sass@^4.8.3:
|
||||||
stdout-stream "^1.4.0"
|
stdout-stream "^1.4.0"
|
||||||
"true-case-path" "^1.0.2"
|
"true-case-path" "^1.0.2"
|
||||||
|
|
||||||
|
nodent-compiler@^3.2.4:
|
||||||
|
version "3.2.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/nodent-compiler/-/nodent-compiler-3.2.6.tgz#ce53314bce7b18f136601068886b0379b8d372a8"
|
||||||
|
dependencies:
|
||||||
|
acorn ">=2.5.2"
|
||||||
|
acorn-es7-plugin "^1.1.7"
|
||||||
|
nodent-transform "^3.2.6"
|
||||||
|
source-map "^0.5.7"
|
||||||
|
|
||||||
|
nodent-runtime@>=3.2.1:
|
||||||
|
version "3.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/nodent-runtime/-/nodent-runtime-3.2.1.tgz#9e2755d85e39f764288f0d4752ebcfe3e541e00e"
|
||||||
|
|
||||||
|
nodent-transform@^3.2.6:
|
||||||
|
version "3.2.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/nodent-transform/-/nodent-transform-3.2.6.tgz#b782edc0e2aafa6d29df0333b36cd00af757c36d"
|
||||||
|
|
||||||
"nopt@2 || 3":
|
"nopt@2 || 3":
|
||||||
version "3.0.6"
|
version "3.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
|
resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9"
|
||||||
|
|
@ -3324,6 +3507,13 @@ object.map@^1.0.0:
|
||||||
for-own "^1.0.0"
|
for-own "^1.0.0"
|
||||||
make-iterator "^1.0.0"
|
make-iterator "^1.0.0"
|
||||||
|
|
||||||
|
object.omit@^2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
|
||||||
|
dependencies:
|
||||||
|
for-own "^0.1.4"
|
||||||
|
is-extendable "^0.1.1"
|
||||||
|
|
||||||
object.pick@^1.2.0, object.pick@^1.3.0:
|
object.pick@^1.2.0, object.pick@^1.3.0:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
|
resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
|
||||||
|
|
@ -3417,6 +3607,15 @@ parse-filepath@^1.0.1:
|
||||||
map-cache "^0.2.0"
|
map-cache "^0.2.0"
|
||||||
path-root "^0.1.1"
|
path-root "^0.1.1"
|
||||||
|
|
||||||
|
parse-glob@^3.0.4:
|
||||||
|
version "3.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
|
||||||
|
dependencies:
|
||||||
|
glob-base "^0.3.0"
|
||||||
|
is-dotfile "^1.0.0"
|
||||||
|
is-extglob "^1.0.0"
|
||||||
|
is-glob "^2.0.0"
|
||||||
|
|
||||||
parse-json@^2.2.0:
|
parse-json@^2.2.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
|
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
|
||||||
|
|
@ -3515,6 +3714,12 @@ pkg-dir@^1.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
find-up "^1.0.0"
|
find-up "^1.0.0"
|
||||||
|
|
||||||
|
pkg-up@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f"
|
||||||
|
dependencies:
|
||||||
|
find-up "^2.1.0"
|
||||||
|
|
||||||
plugin-error@^1.0.1:
|
plugin-error@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c"
|
resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c"
|
||||||
|
|
@ -3542,6 +3747,10 @@ prelude-ls@~1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||||
|
|
||||||
|
preserve@^0.2.0:
|
||||||
|
version "0.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||||
|
|
||||||
pretty-hrtime@^1.0.0:
|
pretty-hrtime@^1.0.0:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
|
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
|
||||||
|
|
@ -3601,6 +3810,14 @@ qs@~6.4.0:
|
||||||
version "6.4.0"
|
version "6.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
|
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
|
||||||
|
|
||||||
|
randomatic@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923"
|
||||||
|
dependencies:
|
||||||
|
is-number "^4.0.0"
|
||||||
|
kind-of "^6.0.0"
|
||||||
|
math-random "^1.0.1"
|
||||||
|
|
||||||
raw-body@~2.1.5:
|
raw-body@~2.1.5:
|
||||||
version "2.1.7"
|
version "2.1.7"
|
||||||
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774"
|
resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.1.7.tgz#adfeace2e4fb3098058014d08c072dcc59758774"
|
||||||
|
|
@ -3695,6 +3912,10 @@ regenerate@^1.2.1:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
|
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
|
||||||
|
|
||||||
|
regenerator-runtime@^0.10.5:
|
||||||
|
version "0.10.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658"
|
||||||
|
|
||||||
regenerator-runtime@^0.11.0:
|
regenerator-runtime@^0.11.0:
|
||||||
version "0.11.1"
|
version "0.11.1"
|
||||||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
|
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
|
||||||
|
|
@ -3707,6 +3928,12 @@ regenerator-transform@^0.10.0:
|
||||||
babel-types "^6.19.0"
|
babel-types "^6.19.0"
|
||||||
private "^0.1.6"
|
private "^0.1.6"
|
||||||
|
|
||||||
|
regex-cache@^0.4.2:
|
||||||
|
version "0.4.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
|
||||||
|
dependencies:
|
||||||
|
is-equal-shallow "^0.1.3"
|
||||||
|
|
||||||
regex-not@^1.0.0, regex-not@^1.0.2:
|
regex-not@^1.0.0, regex-not@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
|
resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c"
|
||||||
|
|
@ -3852,6 +4079,10 @@ require-uncached@^1.0.3:
|
||||||
caller-path "^0.1.0"
|
caller-path "^0.1.0"
|
||||||
resolve-from "^1.0.0"
|
resolve-from "^1.0.0"
|
||||||
|
|
||||||
|
reselect@^3.0.1:
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/reselect/-/reselect-3.0.1.tgz#efdaa98ea7451324d092b2b2163a6a1d7a9a2147"
|
||||||
|
|
||||||
resolve-dir@^1.0.0, resolve-dir@^1.0.1:
|
resolve-dir@^1.0.0, resolve-dir@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43"
|
resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43"
|
||||||
|
|
@ -3890,18 +4121,72 @@ ret@~0.1.10:
|
||||||
version "0.1.15"
|
version "0.1.15"
|
||||||
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
|
||||||
|
|
||||||
right-align@^0.1.1:
|
|
||||||
version "0.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
|
|
||||||
dependencies:
|
|
||||||
align-text "^0.1.1"
|
|
||||||
|
|
||||||
rimraf@2, rimraf@^2.2.8, rimraf@^2.6.1:
|
rimraf@2, rimraf@^2.2.8, rimraf@^2.6.1:
|
||||||
version "2.6.2"
|
version "2.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
|
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
|
||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.0.5"
|
glob "^7.0.5"
|
||||||
|
|
||||||
|
rollup-plugin-babel@^3.0.4:
|
||||||
|
version "3.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-3.0.4.tgz#41b3e762fe64450dd61da3105a2cf7ad76be4edc"
|
||||||
|
dependencies:
|
||||||
|
rollup-pluginutils "^1.5.0"
|
||||||
|
|
||||||
|
rollup-plugin-commonjs@^9.1.3:
|
||||||
|
version "9.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.3.tgz#37bfbf341292ea14f512438a56df8f9ca3ba4d67"
|
||||||
|
dependencies:
|
||||||
|
estree-walker "^0.5.1"
|
||||||
|
magic-string "^0.22.4"
|
||||||
|
resolve "^1.5.0"
|
||||||
|
rollup-pluginutils "^2.0.1"
|
||||||
|
|
||||||
|
rollup-plugin-inject@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/rollup-plugin-inject/-/rollup-plugin-inject-2.0.0.tgz#8934d98a5b0db2d05efcee2ac06a170a4c70b044"
|
||||||
|
dependencies:
|
||||||
|
acorn "^4.0.3"
|
||||||
|
estree-walker "^0.2.0"
|
||||||
|
magic-string "^0.16.0"
|
||||||
|
rollup-pluginutils "^1.2.0"
|
||||||
|
|
||||||
|
rollup-plugin-node-resolve@^3.3.0:
|
||||||
|
version "3.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz#c26d110a36812cbefa7ce117cadcd3439aa1c713"
|
||||||
|
dependencies:
|
||||||
|
builtin-modules "^2.0.0"
|
||||||
|
is-module "^1.0.0"
|
||||||
|
resolve "^1.1.6"
|
||||||
|
|
||||||
|
rollup-plugin-uglify@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-4.0.0.tgz#6eb471738f1ce9ba7d9d4bc43b71cba02417c8fb"
|
||||||
|
dependencies:
|
||||||
|
"@babel/code-frame" "^7.0.0-beta.47"
|
||||||
|
uglify-js "^3.3.25"
|
||||||
|
|
||||||
|
rollup-pluginutils@^1.2.0, rollup-pluginutils@^1.5.0:
|
||||||
|
version "1.5.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
|
||||||
|
dependencies:
|
||||||
|
estree-walker "^0.2.1"
|
||||||
|
minimatch "^3.0.2"
|
||||||
|
|
||||||
|
rollup-pluginutils@^2.0.1:
|
||||||
|
version "2.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.0.tgz#478ace04bd7f6da2e724356ca798214884738fc4"
|
||||||
|
dependencies:
|
||||||
|
estree-walker "^0.5.2"
|
||||||
|
micromatch "^2.3.11"
|
||||||
|
|
||||||
|
rollup@^0.60.2:
|
||||||
|
version "0.60.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.60.2.tgz#9635fea3c2f32095c35cda7bfc2816c675de2da4"
|
||||||
|
dependencies:
|
||||||
|
"@types/estree" "0.0.39"
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
run-async@^2.2.0:
|
run-async@^2.2.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
|
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
|
||||||
|
|
@ -4091,11 +4376,11 @@ source-map@^0.4.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
amdefine ">=0.0.4"
|
amdefine ">=0.0.4"
|
||||||
|
|
||||||
source-map@^0.5.1, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
|
source-map@^0.5.1, source-map@^0.5.6, source-map@^0.5.7:
|
||||||
version "0.5.7"
|
version "0.5.7"
|
||||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
||||||
|
|
||||||
source-map@^0.6.1, source-map@~0.6.0:
|
source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
|
||||||
version "0.6.1"
|
version "0.6.1"
|
||||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||||
|
|
||||||
|
|
@ -4454,22 +4739,12 @@ typedarray@^0.0.6:
|
||||||
version "0.0.6"
|
version "0.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||||
|
|
||||||
uglify-js@2.6.4:
|
uglify-js@^3.3.25:
|
||||||
version "2.6.4"
|
version "3.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.6.4.tgz#65ea2fb3059c9394692f15fed87c2b36c16b9adf"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.0.tgz#796762282b5b5f0eafe7d5c8c708d1d7bd5ba11d"
|
||||||
dependencies:
|
dependencies:
|
||||||
async "~0.2.6"
|
commander "~2.15.0"
|
||||||
source-map "~0.5.1"
|
source-map "~0.6.1"
|
||||||
uglify-to-browserify "~1.0.0"
|
|
||||||
yargs "~3.10.0"
|
|
||||||
|
|
||||||
uglify-save-license@^0.4.1:
|
|
||||||
version "0.4.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1"
|
|
||||||
|
|
||||||
uglify-to-browserify@~1.0.0:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
|
|
||||||
|
|
||||||
uglifycss@^0.0.25:
|
uglifycss@^0.0.25:
|
||||||
version "0.0.25"
|
version "0.0.25"
|
||||||
|
|
@ -4638,6 +4913,10 @@ vinyl@^2.0.0:
|
||||||
remove-trailing-separator "^1.0.1"
|
remove-trailing-separator "^1.0.1"
|
||||||
replace-ext "^1.0.0"
|
replace-ext "^1.0.0"
|
||||||
|
|
||||||
|
vlq@^0.2.1, vlq@^0.2.2:
|
||||||
|
version "0.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"
|
||||||
|
|
||||||
websocket-driver@>=0.3.6:
|
websocket-driver@>=0.3.6:
|
||||||
version "0.7.0"
|
version "0.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb"
|
resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb"
|
||||||
|
|
@ -4665,14 +4944,6 @@ wide-align@^1.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
string-width "^1.0.2 || 2"
|
string-width "^1.0.2 || 2"
|
||||||
|
|
||||||
window-size@0.1.0:
|
|
||||||
version "0.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
|
|
||||||
|
|
||||||
wordwrap@0.0.2:
|
|
||||||
version "0.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
|
|
||||||
|
|
||||||
wordwrap@~1.0.0:
|
wordwrap@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
||||||
|
|
@ -4757,12 +5028,3 @@ yargs@^7.0.0, yargs@^7.1.0:
|
||||||
which-module "^1.0.0"
|
which-module "^1.0.0"
|
||||||
y18n "^3.2.1"
|
y18n "^3.2.1"
|
||||||
yargs-parser "^5.0.0"
|
yargs-parser "^5.0.0"
|
||||||
|
|
||||||
yargs@~3.10.0:
|
|
||||||
version "3.10.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
|
|
||||||
dependencies:
|
|
||||||
camelcase "^1.0.2"
|
|
||||||
cliui "^2.1.0"
|
|
||||||
decamelize "^1.0.0"
|
|
||||||
window-size "0.1.0"
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue