wickes-css2 2.105.0-develop.7 → 2.105.0-develop.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/Readme.md +1 -1
  2. package/build/css/my-account-main-v2.css +1 -1
  3. package/build/css/pages/my-account-v2.css +1 -1
  4. package/build/css/pages/page_discount.css +1 -1
  5. package/build/js/basket.min.js +1 -1
  6. package/build/js/bundle.min.js +1 -1
  7. package/build/js/checkout.min.js +1 -1
  8. package/build/js/merged-checkout.min.js +1 -1
  9. package/build/js/my-account.min.js +1 -1
  10. package/build/js/page/my-account.js +32 -47
  11. package/build/js/project-list.min.js +1 -1
  12. package/build/js/share-project-list.min.js +1 -0
  13. package/package.json +2 -2
  14. package/src/components/my-account/barcode.hbs +1 -3
  15. package/src/components/my-account/cards-swap.hbs +10 -0
  16. package/src/components/my-account/clipboard-code-card.hbs +3 -3
  17. package/src/components/my-account/discount.hbs +1 -1
  18. package/src/components/my-account/greetings.hbs +1 -1
  19. package/src/data/my-account/data_my-account.json +9 -0
  20. package/src/js/components/cards-swap.js +74 -0
  21. package/src/js/components/share-project-list.js +56 -0
  22. package/src/js/page/my-account.js +32 -47
  23. package/src/page_my-account-installer.html +1 -1
  24. package/src/page_my-account-trade-pro-carousel-double.html +127 -0
  25. package/src/page_my-account-trade-pro-carousel.html +134 -0
  26. package/src/page_my-account-trade-pro.html +1 -1
  27. package/src/page_tradepro-discount-app.html +1 -1
  28. package/src/page_tradepro-discount-double.html +109 -0
  29. package/src/page_tradepro-discount.html +36 -2
  30. package/src/scss/components/my-account/_barcode.scss +9 -1
  31. package/src/scss/components/my-account/_cards-swap.scss +60 -0
  32. package/src/scss/components/my-account/_clipboard-code.scss +11 -3
  33. package/src/scss/components/my-account/_discount.scss +12 -2
  34. package/src/scss/pages/my-account-v2.scss +42 -5
  35. package/src/scss/pages/page_discount.scss +8 -4
  36. package/src/sitemap.html +3 -0
@@ -1 +1 @@
1
- !function n(r,i,c){function l(o,e){if(!i[o]){if(!r[o]){var t="function"==typeof require&&require;if(!e&&t)return t(o,!0);if(a)return a(o,!0);throw(e=new Error("Cannot find module '"+o+"'")).code="MODULE_NOT_FOUND",e}t=i[o]={exports:{}},r[o][0].call(t.exports,function(e){return l(r[o][1][e]||e)},t,t.exports,n,r,i,c)}return i[o].exports}for(var a="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,o,t){"use strict";var n=e("./utils/copy-to-clipboard"),r=e("./utils/helpers"),i=window.Wick||{};i.MyAccount={el:{$clipboardCode:$(".clipboard-code"),appInfo:".app-info",hideAppInfo:"app-info--hide"},clipboardCodes:{tradeProId:{titleEl:".clipboard-code.trade-pro-id .title",subtitleEl:".clipboard-code.trade-pro-id .subtitle",btnCopy:".btn--trade-pro-id"},discountCode:{titleEl:".clipboard-code.discount-code .title",subtitleEl:".clipboard-code.discount-code .subtitle",btnCopy:".btn--discount-code"}},copyCode:function(e){var e=i.MyAccount.clipboardCodes[e],o=e.titleEl,t=e.subtitleEl,e=e.btnCopy,t=$(t).text().trim(),o=$(o).text().trim();(0,n.copyToClipboard)(t,e),i.SnackBar.show({text:"".concat(o," copied to clipboard"),type:i.SnackBar.types.SUCCESS,withCloseButton:!1,autoClose:!0,delayBeforeClose:1500})},init:function(){Object.keys(i.MyAccount.clipboardCodes).forEach(function(e){var o=i.MyAccount.clipboardCodes[e].btnCopy;$(o).on("click",function(){return i.MyAccount.copyCode(e)})}),$(i.MyAccount.el.appInfo).length&&(0,r.isApp)()&&$(i.MyAccount.el.appInfo).addClass(i.MyAccount.el.hideAppInfo)}},$(document).ready(function(){i.MyAccount.el.$clipboardCode.length&&i.MyAccount.init()})},{"./utils/copy-to-clipboard":2,"./utils/helpers":3}],2:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copyToClipboard=function(e,o){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e=function(e,o){e=null==e?"":e+"";return(o.noUpperCase?e:e.replace(/(^\w|\s\w)/g,function(e){return e.toUpperCase()})).split(" ").filter(function(e){return""!==e}).join(" ").trim()}(e,t);if(!e)return Promise.reject(new Error("Empty text"));if(null!=(t=window.webkit)&&null!=(t=t.messageHandlers)&&t.copy)try{return window.webkit.messageHandlers.copy.postMessage(e),Promise.resolve(!0)}catch(e){console.error(e)}if(null!=(t=window.Android)&&t.copyToClipboard&&"function"==typeof window.Android.copyToClipboard)try{return window.Android.copyToClipboard(e),Promise.resolve(!0)}catch(e){console.error(e)}if(null!=(t=navigator.clipboard)&&t.writeText)return navigator.clipboard.writeText(e).then(function(){return!0});return function(a,u){return new Promise(function(e,o){try{var t,n=$(u).parent(),r=$("<textarea>").val(a).attr("readonly","readonly").css({position:"fixed",top:0,left:"-9999px",opacity:0,width:"1px",height:"1px",padding:0,border:0,margin:0}),i=(n.append(r),r.get(0)),c=(i.focus(),(i.value||"").length),l=("function"==typeof i.setSelectionRange?i.setSelectionRange(0,c):r.select(),document.execCommand("copy"));r.remove(),window.getSelection&&(t=window.getSelection())&&t.removeAllRanges&&t.removeAllRanges(),l?e(!0):o(new Error("execCommand failed"))}catch(e){o(e)}})}(e,o)}},{}],3:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.countLetters=function(e){e=e.match(/[a-zA-Z]/g);return e?e.length:0},t.createImageElements=function(e,o){return e.map(function(e){return $("<img>").attr("src",e).attr("alt",o)})},t.highlightCharacter=function(e,o,t){return e.includes(o)?(o=new RegExp("\\".concat(o,"+"),"g"),t='<span class="'.concat(t,'">$&</span>'),e.replace(o,t)):e},t.isApp=function(){return navigator.userAgent.match(/TradeProMobile_iOS|TradeProMobile_Android|DIYMobile_iOS|DIYMobile_Android|DIYApp_Guest_Mobile_iOS|DIYApp_Guest_Mobile_Android|AGENT_PLACEHOLDER/i)},t.isHasSymbol=function(e,o){return e.includes(o)},t.isKeyboardOpen=function(){var e=window.innerHeight,o=window.visualViewport.height;return e!==o},t.isTouchDevice=function(){return"ontouchstart"in window},t.scrollToElement=function(e){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:20,e=$(e);0<e.length&&$("html, body").animate({scrollTop:e.offset().top-o},300)},t.scrollToTop=function(e){e.scrollTop(0)},t.trimFields=function(){Wick.AddressBook.getFieldsConfigurations().forEach(function(e){var o=e.input.val().trim();e.input.val(o)})}},{}]},{},[1]);
1
+ !function n(r,i,c){function l(o,e){if(!i[o]){if(!r[o]){var t="function"==typeof require&&require;if(!e&&t)return t(o,!0);if(a)return a(o,!0);throw(e=new Error("Cannot find module '"+o+"'")).code="MODULE_NOT_FOUND",e}t=i[o]={exports:{}},r[o][0].call(t.exports,function(e){return l(r[o][1][e]||e)},t,t.exports,n,r,i,c)}return i[o].exports}for(var a="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,o,t){"use strict";var n=e("./utils/copy-to-clipboard"),r=e("./utils/helpers"),i=window.Wick||{};i.MyAccount={el:{$clipboardCode:$(".clipboard-code"),appInfo:".app-info",hideAppInfo:"app-info--hide"},copyCode:function(e){var o=e.closest(".clipboard-code"),t=o.find(".subtitle").text().trim(),o=o.find(".title").text().trim();(0,n.copyToClipboard)(t,e),i.SnackBar.show({text:"".concat(o," copied to clipboard"),type:i.SnackBar.types.SUCCESS,withCloseButton:!1,autoClose:!0,delayBeforeClose:1500})},init:function(){i.MyAccount.el.$clipboardCode.find(".copy-code").on("click",function(){i.MyAccount.copyCode($(this))}),$(i.MyAccount.el.appInfo).length&&(0,r.isApp)()&&$(i.MyAccount.el.appInfo).addClass(i.MyAccount.el.hideAppInfo)}},$(document).ready(function(){i.MyAccount.el.$clipboardCode.length&&i.MyAccount.init()})},{"./utils/copy-to-clipboard":2,"./utils/helpers":3}],2:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.copyToClipboard=function(e,o){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e=function(e,o){e=null==e?"":e+"";return(o.noUpperCase?e:e.replace(/(^\w|\s\w)/g,function(e){return e.toUpperCase()})).split(" ").filter(function(e){return""!==e}).join(" ").trim()}(e,t);if(!e)return Promise.reject(new Error("Empty text"));if(null!=(t=window.webkit)&&null!=(t=t.messageHandlers)&&t.copy)try{return window.webkit.messageHandlers.copy.postMessage(e),Promise.resolve(!0)}catch(e){console.error(e)}if(null!=(t=window.Android)&&t.copyToClipboard&&"function"==typeof window.Android.copyToClipboard)try{return window.Android.copyToClipboard(e),Promise.resolve(!0)}catch(e){console.error(e)}if(null!=(t=navigator.clipboard)&&t.writeText)return navigator.clipboard.writeText(e).then(function(){return!0});return function(a,u){return new Promise(function(e,o){try{var t,n=$(u).parent(),r=$("<textarea>").val(a).attr("readonly","readonly").css({position:"fixed",top:0,left:"-9999px",opacity:0,width:"1px",height:"1px",padding:0,border:0,margin:0}),i=(n.append(r),r.get(0)),c=(i.focus(),(i.value||"").length),l=("function"==typeof i.setSelectionRange?i.setSelectionRange(0,c):r.select(),document.execCommand("copy"));r.remove(),window.getSelection&&(t=window.getSelection())&&t.removeAllRanges&&t.removeAllRanges(),l?e(!0):o(new Error("execCommand failed"))}catch(e){o(e)}})}(e,o)}},{}],3:[function(e,o,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.countLetters=function(e){e=e.match(/[a-zA-Z]/g);return e?e.length:0},t.createImageElements=function(e,o){return e.map(function(e){return $("<img>").attr("src",e).attr("alt",o)})},t.highlightCharacter=function(e,o,t){return e.includes(o)?(o=new RegExp("\\".concat(o,"+"),"g"),t='<span class="'.concat(t,'">$&</span>'),e.replace(o,t)):e},t.isApp=function(){return navigator.userAgent.match(/TradeProMobile_iOS|TradeProMobile_Android|DIYMobile_iOS|DIYMobile_Android|DIYApp_Guest_Mobile_iOS|DIYApp_Guest_Mobile_Android|AGENT_PLACEHOLDER/i)},t.isHasSymbol=function(e,o){return e.includes(o)},t.isKeyboardOpen=function(){var e=window.innerHeight,o=window.visualViewport.height;return e!==o},t.isTouchDevice=function(){return"ontouchstart"in window},t.scrollToElement=function(e){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:20,e=$(e);0<e.length&&$("html, body").animate({scrollTop:e.offset().top-o},300)},t.scrollToTop=function(e){e.scrollTop(0)},t.trimFields=function(){Wick.AddressBook.getFieldsConfigurations().forEach(function(e){var o=e.input.val().trim();e.input.val(o)})}},{}]},{},[1]);
@@ -1,58 +1,43 @@
1
- import {copyToClipboard} from "./utils/copy-to-clipboard";
2
- import {isApp} from "./utils/helpers";
1
+ import { copyToClipboard } from './utils/copy-to-clipboard';
2
+ import { isApp } from './utils/helpers';
3
3
 
4
4
  var Wick = window.Wick || {};
5
5
 
6
6
  Wick.MyAccount = {
7
- el: {
8
- $clipboardCode: $('.clipboard-code'),
9
- appInfo: '.app-info',
10
- hideAppInfo: 'app-info--hide'
11
- },
12
- clipboardCodes: {
13
- tradeProId: {
14
- titleEl: '.clipboard-code.trade-pro-id .title',
15
- subtitleEl: '.clipboard-code.trade-pro-id .subtitle',
16
- btnCopy: '.btn--trade-pro-id',
7
+ el: {
8
+ $clipboardCode: $('.clipboard-code'),
9
+ appInfo: '.app-info',
10
+ hideAppInfo: 'app-info--hide',
17
11
  },
18
- discountCode: {
19
- titleEl: '.clipboard-code.discount-code .title',
20
- subtitleEl: '.clipboard-code.discount-code .subtitle',
21
- btnCopy: '.btn--discount-code',
22
- },
23
- },
24
- copyCode(codeType) {
25
- const { titleEl, subtitleEl, btnCopy } = Wick.MyAccount.clipboardCodes[codeType];
26
- const value = $(subtitleEl).text().trim();
27
- const title = $(titleEl).text().trim();
12
+ copyCode($btn) {
13
+ const $container = $btn.closest('.clipboard-code');
14
+ const value = $container.find('.subtitle').text().trim();
15
+ const title = $container.find('.title').text().trim();
28
16
 
29
- copyToClipboard(value, btnCopy);
30
- Wick.SnackBar.show(
31
- {
32
- text: `${title} copied to clipboard`,
33
- type: Wick.SnackBar.types.SUCCESS,
34
- withCloseButton: false,
35
- autoClose: true,
36
- delayBeforeClose: 1500
37
- }
38
- );
39
- },
40
- init() {
41
- Object.keys(Wick.MyAccount.clipboardCodes).forEach((codeType) => {
42
- const { btnCopy } = Wick.MyAccount.clipboardCodes[codeType];
43
- $(btnCopy).on('click', () => Wick.MyAccount.copyCode(codeType));
44
- });
17
+ copyToClipboard(value, $btn);
18
+ Wick.SnackBar.show({
19
+ text: `${title} copied to clipboard`,
20
+ type: Wick.SnackBar.types.SUCCESS,
21
+ withCloseButton: false,
22
+ autoClose: true,
23
+ delayBeforeClose: 1500,
24
+ });
25
+ },
26
+ init() {
27
+ Wick.MyAccount.el.$clipboardCode.find('.copy-code').on('click', function () {
28
+ Wick.MyAccount.copyCode($(this));
29
+ });
45
30
 
46
- if($(Wick.MyAccount.el.appInfo).length && isApp()) {
47
- $(Wick.MyAccount.el.appInfo).addClass(Wick.MyAccount.el.hideAppInfo);
48
- }
49
- }
50
- }
31
+ if ($(Wick.MyAccount.el.appInfo).length && isApp()) {
32
+ $(Wick.MyAccount.el.appInfo).addClass(Wick.MyAccount.el.hideAppInfo);
33
+ }
34
+ },
35
+ };
51
36
 
52
37
  $(document).ready(function () {
53
- if (!Wick.MyAccount.el.$clipboardCode.length) {
54
- return;
55
- }
38
+ if (!Wick.MyAccount.el.$clipboardCode.length) {
39
+ return;
40
+ }
56
41
 
57
- Wick.MyAccount.init();
42
+ Wick.MyAccount.init();
58
43
  });