toggle-components-library 1.28.5-beta.0 → 1.28.5-beta.1

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/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.28.5-beta.0",
3
+ "version": "1.28.5-beta.1",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toggle-components-library",
3
- "version": "1.28.5-beta.0",
3
+ "version": "1.28.5-beta.1",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -88,13 +88,27 @@ export default {
88
88
  return this.inputType == 'email' ? 'Enter contact email address' : 'Enter contact mobile number';
89
89
  },
90
90
  iconSrc() {
91
- return this.inputType == 'email' ? require('../../assets/icons/email-icon.svg') : require('../../assets/icons/mobile-icon.svg');
91
+ return this.inputType == 'email' ? this.emailIconSrc : this.mobileIconSrc;
92
+ },
93
+ emailIconSrc() {
94
+ const emailIcon = new Image();
95
+ emailIcon.src = require('../../assets/icons/email-icon.svg');
96
+ return emailIcon.src;
97
+ },
98
+ mobileIconSrc() {
99
+ const mobileIcon = new Image();
100
+ mobileIcon.src = require('../../assets/icons/mobile-icon.svg');
101
+ return mobileIcon.src;
92
102
  },
93
103
  arrowIconSrc() {
94
- return require('../../assets/icons/arrow-icon.svg');
104
+ const arrowIcon = new Image();
105
+ arrowIcon.src = require('../../assets/icons/arrow-icon.svg');
106
+ return arrowIcon.src;
95
107
  },
96
108
  searchIconSrc() {
97
- return require('../../assets/icons/magnifying-glass-icon.svg');
109
+ const searchIcon = new Image();
110
+ searchIcon.src = require('../../assets/icons/magnifying-glass-icon.svg');
111
+ return searchIcon.src;
98
112
  }
99
113
  },
100
114
  methods: {
@@ -111,11 +125,11 @@ export default {
111
125
  iconForType(type) {
112
126
  switch (type) {
113
127
  case 'email':
114
- return require('../../assets/icons/email-icon.svg');
128
+ return this.emailIconSrc;
115
129
  case 'mobile':
116
- return require('../../assets/icons/mobile-icon.svg');
130
+ return this.mobileIconSrc;
117
131
  default:
118
- return require('../../assets/icons/email-icon.svg');
132
+ return this.emailIconSrc;
119
133
  }
120
134
  },
121
135
  onEnter(e) {