Skip to content

Commit

Permalink
MC-17868: Break jQuery UI into widgets and make a prototype
Browse files Browse the repository at this point in the history
- Update require js config for jquery ui in Theme module;
- Swap jquery UI for separate jquery ui widgets in all frontend jquery ui usages;
  • Loading branch information
adifucan committed Jul 16, 2019
1 parent cde48a0 commit c0f31fb
Show file tree
Hide file tree
Showing 83 changed files with 63 additions and 106 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Bundle/view/frontend/web/js/float.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
define([
'jquery',
'mage/template',
'jquery/ui',
'jquery-ui-modules/widget',
'Magento_Bundle/js/price-bundle'
], function ($, mageTemplate) {
'use strict';
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Bundle/view/frontend/web/js/slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/Captcha/view/frontend/web/js/captcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

define([
'jquery',
'jquery-ui-modules/widget',
'jquery-ui-modules/core'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/base/web/js/price-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ define([
'Magento_Catalog/js/price-utils',
'underscore',
'mage/template',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($, utils, _, mageTemplate) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define([
'jquery',
'priceUtils',
'priceOptions',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($, utils) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/base/web/js/price-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define([
'mage/template',
'priceUtils',
'priceBox',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($, _, mageTemplate, utils) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ define([
'mage/translate',
'underscore',
'Magento_Catalog/js/product/view/product-ids-resolver',
'jquery-ui-modules/core',
'jquery-ui-modules/widget'
], function ($, $t, _, idsResolver) {
'use strict';
Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/Catalog/view/frontend/web/js/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
if (typeof define === 'function' && define.amd) {
define([
'jquery',
'jquery-ui-modules/widget',
'jquery-ui-modules/core'
'jquery-ui-modules/widget'
], factory);
} else {
factory(jQuery);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/frontend/web/js/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
define([
'jquery',
'mage/translate',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($, $t) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/translate'
], function ($) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/view/frontend/web/js/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
define([
'jquery',
'jquery-ui-modules/widget',
'jquery-ui-modules/core',
'mage/validation/validation'
], factory);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
define([
'Magento_Ui/js/modal/alert',
'jquery',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/validation'
], function (alert, $) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define([
'jquery',
'mage/template',
'underscore',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/validation'
], function ($, mageTemplate, _) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ define([
'Magento_Ui/js/modal/confirm',
'underscore',
'jquery-ui-modules/widget',
'jquery-ui-modules/core',
'mage/decorate',
'mage/collapsible',
'mage/cookies'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ define([
'mage/translate',
'priceUtils',
'priceBox',
'jquery/ui',
'jquery-ui-modules/widget',
'jquery/jquery.parsequery'
], function ($, _, mageTemplate, $t, priceUtils) {
'use strict';
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Cookie/view/frontend/web/js/notices.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
define([
'jquery',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/cookies'
], function ($) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
*/
define([
'jquery',
'jquery-ui-modules/widget',
'jquery-ui-modules/core'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Customer/view/frontend/web/js/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ define([
'jquery',
'Magento_Ui/js/modal/confirm',
'jquery-ui-modules/widget',
'jquery-ui-modules/core',
'mage/translate'
], function ($, confirm) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ define([
'mage/translate',
'Magento_Checkout/js/model/postcode-validator',
'jquery-ui-modules/widget',
'jquery-ui-modules/core',
'validation'
], function ($, __, utils, $t, postCodeValidator) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
*/
define([
'jquery',
'jquery-ui-modules/widget',
'jquery-ui-modules/core'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

define([
'jquery',
'jquery-ui-modules/widget',
'jquery-ui-modules/core'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
define([
'jquery',
'jquery-ui-modules/widget',
'jquery-ui-modules/core',
'Magento_Catalog/js/price-box'
], function ($) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Msrp/view/base/web/js/msrp.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ define([
'jquery',
'Magento_Catalog/js/price-utils',
'underscore',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/dropdown',
'mage/template'
], function ($, priceUtils, _) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

define([
'jquery',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/translate'
], function ($) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define([
'jquery',
'mage/template',
'Magento_Ui/js/modal/alert',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/translate'
], function ($, mageTemplate, alert) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ define([
'domReady',
'consoleLogger',
'jquery-ui-modules/widget',
'jquery-ui-modules/core',
'mage/cookies'
], function ($, domReady, consoleLogger) {
'use strict';
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Payment/view/frontend/web/js/cc-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/* @api */
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ define([
'jquery',
'mage/template',
'Magento_Ui/js/modal/alert',
'jquery/ui',
'jquery-ui-modules/widget',
'Magento_Payment/js/model/credit-card-validation/validator',
'Magento_Checkout/js/model/full-screen-loader'
], function ($, mageTemplate, alert, ui, validator, fullScreenLoader) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
define([
'jquery',
'Magento_Ui/js/modal/alert',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/translate',
'mage/mage',
'mage/validation'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ define([
'jquery',
'Magento_Ui/js/modal/confirm',
'Magento_Customer/js/customer-data',
'jquery/ui',
'jquery-ui-modules/widget',
'mage/mage'
], function ($, confirm, customerData) {
'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
define([
'jquery',
'jquery-ui-modules/widget',
'jquery-ui-modules/core',
'catalogGallery',
'loadPlayer'
], function ($) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
define([
'jquery',
'jquery-ui-modules/widget',
'jquery-ui-modules/core'
], function ($) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
define([
'jquery',
'jquery/ui'
'jquery-ui-modules/widget'
], function ($) {
'use strict';

Expand Down
Loading

0 comments on commit c0f31fb

Please sign in to comment.