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.
- package/Readme.md +1 -1
- package/build/css/my-account-main-v2.css +1 -1
- package/build/css/pages/my-account-v2.css +1 -1
- package/build/css/pages/page_discount.css +1 -1
- package/build/js/basket.min.js +1 -1
- package/build/js/bundle.min.js +1 -1
- package/build/js/checkout.min.js +1 -1
- package/build/js/merged-checkout.min.js +1 -1
- package/build/js/my-account.min.js +1 -1
- package/build/js/page/my-account.js +32 -47
- package/build/js/project-list.min.js +1 -1
- package/build/js/share-project-list.min.js +1 -0
- package/package.json +2 -2
- package/src/components/my-account/barcode.hbs +1 -3
- package/src/components/my-account/cards-swap.hbs +10 -0
- package/src/components/my-account/clipboard-code-card.hbs +3 -3
- package/src/components/my-account/discount.hbs +1 -1
- package/src/components/my-account/greetings.hbs +1 -1
- package/src/data/my-account/data_my-account.json +9 -0
- package/src/js/components/cards-swap.js +74 -0
- package/src/js/components/share-project-list.js +56 -0
- package/src/js/page/my-account.js +32 -47
- package/src/page_my-account-installer.html +1 -1
- package/src/page_my-account-trade-pro-carousel-double.html +127 -0
- package/src/page_my-account-trade-pro-carousel.html +134 -0
- package/src/page_my-account-trade-pro.html +1 -1
- package/src/page_tradepro-discount-app.html +1 -1
- package/src/page_tradepro-discount-double.html +109 -0
- package/src/page_tradepro-discount.html +36 -2
- package/src/scss/components/my-account/_barcode.scss +9 -1
- package/src/scss/components/my-account/_cards-swap.scss +60 -0
- package/src/scss/components/my-account/_clipboard-code.scss +11 -3
- package/src/scss/components/my-account/_discount.scss +12 -2
- package/src/scss/pages/my-account-v2.scss +42 -5
- package/src/scss/pages/page_discount.scss +8 -4
- 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"},
|
|
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
|
|
2
|
-
import {isApp} from
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
47
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
if (!Wick.MyAccount.el.$clipboardCode.length) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
56
41
|
|
|
57
|
-
|
|
42
|
+
Wick.MyAccount.init();
|
|
58
43
|
});
|