Gutentor – Gutenberg Blocks – Page Builder for Gutenberg Editor - Version 1.0.4

Version Description

  • 2019-09-09 =
  • Fixed : Countup JS
  • Fixed : Blog Mobile Issue
  • Fixed : Advanced Column
  • Added : Agency templates
  • Update : Minor change and fixes
Download this release

Release Info

Developer gutentor
Plugin Icon 128x128 Gutentor – Gutenberg Blocks – Page Builder for Gutenberg Editor
Version 1.0.4
Comparing to
See all releases

Code changes from version 1.0.3 to 1.0.4

assets/library/countUp/countUp.js CHANGED
@@ -1,248 +1,246 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  };
12
- // playground: stackblitz.com/edit/countup-typescript
13
- var CountUp = /** @class */ (function () {
14
- function CountUp(target, endVal, options) {
15
- var _this = this;
16
- this.target = target;
17
- this.endVal = endVal;
18
- this.options = options;
19
- this.version = '2.0.4';
20
- this.defaults = {
21
- startVal: 0,
22
- decimalPlaces: 0,
23
- duration: 2,
24
- useEasing: true,
25
- useGrouping: true,
26
- smartEasingThreshold: 999,
27
- smartEasingAmount: 333,
28
- separator: ',',
29
- decimal: '.',
30
- prefix: '',
31
- suffix: ''
32
- };
33
- this.finalEndVal = null; // for smart easing
34
- this.useEasing = true;
35
- this.countDown = false;
36
- this.error = '';
37
- this.startVal = 0;
38
- this.paused = true;
39
- this.count = function (timestamp) {
40
- if (!_this.startTime) {
41
- _this.startTime = timestamp;
42
- }
43
- var progress = timestamp - _this.startTime;
44
- _this.remaining = _this.duration - progress;
45
- // to ease or not to ease
46
- if (_this.useEasing) {
47
- if (_this.countDown) {
48
- _this.frameVal = _this.startVal - _this.easingFn(progress, 0, _this.startVal - _this.endVal, _this.duration);
49
- }
50
- else {
51
- _this.frameVal = _this.easingFn(progress, _this.startVal, _this.endVal - _this.startVal, _this.duration);
52
- }
53
- }
54
- else {
55
- if (_this.countDown) {
56
- _this.frameVal = _this.startVal - ((_this.startVal - _this.endVal) * (progress / _this.duration));
57
- }
58
- else {
59
- _this.frameVal = _this.startVal + (_this.endVal - _this.startVal) * (progress / _this.duration);
60
- }
61
- }
62
- // don't go past endVal since progress can exceed duration in the last frame
63
- if (_this.countDown) {
64
- _this.frameVal = (_this.frameVal < _this.endVal) ? _this.endVal : _this.frameVal;
65
- }
66
- else {
67
- _this.frameVal = (_this.frameVal > _this.endVal) ? _this.endVal : _this.frameVal;
68
- }
69
- // decimal
70
- _this.frameVal = Math.round(_this.frameVal * _this.decimalMult) / _this.decimalMult;
71
- // format and print value
72
- _this.printValue(_this.frameVal);
73
- // whether to continue
74
- if (progress < _this.duration) {
75
- _this.rAF = requestAnimationFrame(_this.count);
76
- }
77
- else if (_this.finalEndVal !== null) {
78
- // smart easing
79
- _this.update(_this.finalEndVal);
80
- }
81
- else {
82
- if (_this.callback) {
83
- _this.callback();
84
- }
85
- }
86
- };
87
- // default format and easing functions
88
- this.formatNumber = function (num) {
89
- var neg = (num < 0) ? '-' : '';
90
- var result, x, x1, x2, x3;
91
- result = Math.abs(num).toFixed(_this.options.decimalPlaces);
92
- result += '';
93
- x = result.split('.');
94
- x1 = x[0];
95
- x2 = x.length > 1 ? _this.options.decimal + x[1] : '';
96
- if (_this.options.useGrouping) {
97
- x3 = '';
98
- for (var i = 0, len = x1.length; i < len; ++i) {
99
- if (i !== 0 && (i % 3) === 0) {
100
- x3 = _this.options.separator + x3;
101
- }
102
- x3 = x1[len - i - 1] + x3;
103
- }
104
- x1 = x3;
105
- }
106
- // optional numeral substitution
107
- if (_this.options.numerals && _this.options.numerals.length) {
108
- x1 = x1.replace(/[0-9]/g, function (w) { return _this.options.numerals[+w]; });
109
- x2 = x2.replace(/[0-9]/g, function (w) { return _this.options.numerals[+w]; });
110
- }
111
- return neg + _this.options.prefix + x1 + x2 + _this.options.suffix;
112
- };
113
- this.easeOutExpo = function (t, b, c, d) {
114
- return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
115
- };
116
- this.options = __assign({}, this.defaults, options);
117
- this.formattingFn = (this.options.formattingFn) ?
118
- this.options.formattingFn : this.formatNumber;
119
- this.easingFn = (this.options.easingFn) ?
120
- this.options.easingFn : this.easeOutExpo;
121
- this.startVal = this.validateValue(this.options.startVal);
122
- this.frameVal = this.startVal;
123
- this.endVal = this.validateValue(endVal);
124
- this.options.decimalPlaces = Math.max(0 || this.options.decimalPlaces);
125
- this.decimalMult = Math.pow(10, this.options.decimalPlaces);
126
- this.resetDuration();
127
- this.options.separator = String(this.options.separator);
128
- this.useEasing = this.options.useEasing;
129
- if (this.options.separator === '') {
130
- this.options.useGrouping = false;
131
- }
132
- this.el = (typeof target === 'string') ? document.getElementById(target) : target;
133
- if (this.el) {
134
- this.printValue(this.startVal);
135
- }
136
- else {
137
- this.error = '[CountUp] target is null or undefined';
138
- }
139
- }
140
- // determines where easing starts and whether to count down or up
141
- CountUp.prototype.determineDirectionAndSmartEasing = function () {
142
- var end = (this.finalEndVal) ? this.finalEndVal : this.endVal;
143
- this.countDown = (this.startVal > end);
144
- var animateAmount = end - this.startVal;
145
- if (Math.abs(animateAmount) > this.options.smartEasingThreshold) {
146
- this.finalEndVal = end;
147
- var up = (this.countDown) ? 1 : -1;
148
- this.endVal = end + (up * this.options.smartEasingAmount);
149
- this.duration = this.duration / 2;
150
- }
151
- else {
152
- this.endVal = end;
153
- this.finalEndVal = null;
154
- }
155
- if (this.finalEndVal) {
156
- this.useEasing = false;
157
- }
158
- else {
159
- this.useEasing = this.options.useEasing;
160
- }
161
- };
162
- // start animation
163
- CountUp.prototype.start = function (callback) {
164
- if (this.error) {
165
- return;
166
- }
167
- this.callback = callback;
168
- if (this.duration > 0) {
169
- this.determineDirectionAndSmartEasing();
170
- this.paused = false;
171
- this.rAF = requestAnimationFrame(this.count);
172
- }
173
- else {
174
- this.printValue(this.endVal);
175
- }
176
- };
177
- // pause/resume animation
178
- CountUp.prototype.pauseResume = function () {
179
- if (!this.paused) {
180
- cancelAnimationFrame(this.rAF);
181
- }
182
- else {
183
- this.startTime = null;
184
- this.duration = this.remaining;
185
- this.startVal = this.frameVal;
186
- this.determineDirectionAndSmartEasing();
187
- this.rAF = requestAnimationFrame(this.count);
188
- }
189
- this.paused = !this.paused;
190
- };
191
- // reset to startVal so animation can be run again
192
- CountUp.prototype.reset = function () {
193
- cancelAnimationFrame(this.rAF);
194
- this.paused = true;
195
- this.resetDuration();
196
- this.startVal = this.validateValue(this.options.startVal);
197
- this.frameVal = this.startVal;
198
- this.printValue(this.startVal);
199
- };
200
- // pass a new endVal and start animation
201
- CountUp.prototype.update = function (newEndVal) {
202
- cancelAnimationFrame(this.rAF);
203
- this.startTime = null;
204
- this.endVal = this.validateValue(newEndVal);
205
- if (this.endVal === this.frameVal) {
206
- return;
207
- }
208
- this.startVal = this.frameVal;
209
- if (!this.finalEndVal) {
210
- this.resetDuration();
211
- }
212
- this.determineDirectionAndSmartEasing();
213
- this.rAF = requestAnimationFrame(this.count);
214
- };
215
- CountUp.prototype.printValue = function (val) {
216
- var result = this.formattingFn(val);
217
- if (this.el.tagName === 'INPUT') {
218
- var input = this.el;
219
- input.value = result;
220
- }
221
- else if (this.el.tagName === 'text' || this.el.tagName === 'tspan') {
222
- this.el.textContent = result;
223
- }
224
- else {
225
- this.el.innerHTML = result;
226
- }
227
- };
228
- CountUp.prototype.ensureNumber = function (n) {
229
- return (typeof n === 'number' && !isNaN(n));
230
- };
231
- CountUp.prototype.validateValue = function (value) {
232
- var newValue = Number(value);
233
- if (!this.ensureNumber(newValue)) {
234
- this.error = "[CountUp] invalid start or end value: " + value;
235
- return null;
236
- }
237
- else {
238
- return newValue;
239
- }
240
- };
241
- CountUp.prototype.resetDuration = function () {
242
- this.startTime = null;
243
- this.duration = Number(this.options.duration) * 1000;
244
- this.remaining = this.duration;
245
- };
246
- return CountUp;
247
- }());
248
- export { CountUp };
1
+ /*
2
+
3
+ countUp.js
4
+ by @inorganik
5
+
6
+ */
7
+
8
+ // target = id of html element or var of previously selected html element where counting occurs
9
+ // startVal = the value you want to begin at
10
+ // endVal = the value you want to arrive at
11
+ // decimals = number of decimal places, default 0
12
+ // duration = duration of animation in seconds, default 2
13
+ // options = optional object of options (see below)
14
+
15
+ var CountUp = function(target, startVal, endVal, decimals, duration, options) {
16
+
17
+ var self = this;
18
+ self.version = function () { return '1.9.3'; };
19
+
20
+ // default options
21
+ self.options = {
22
+ useEasing: true, // toggle easing
23
+ useGrouping: true, // 1,000,000 vs 1000000
24
+ separator: ',', // character to use as a separator
25
+ decimal: '.', // character to use as a decimal
26
+ easingFn: easeOutExpo, // optional custom easing function, default is Robert Penner's easeOutExpo
27
+ formattingFn: formatNumber, // optional custom formatting function, default is formatNumber above
28
+ prefix: '', // optional text before the result
29
+ suffix: '', // optional text after the result
30
+ numerals: [] // optionally pass an array of custom numerals for 0-9
31
+ };
32
+
33
+ // extend default options with passed options object
34
+ if (options && typeof options === 'object') {
35
+ for (var key in self.options) {
36
+ if (options.hasOwnProperty(key) && options[key] !== null) {
37
+ self.options[key] = options[key];
38
+ }
39
+ }
40
+ }
41
+
42
+ if (self.options.separator === '') {
43
+ self.options.useGrouping = false;
44
+ }
45
+ else {
46
+ // ensure the separator is a string (formatNumber assumes this)
47
+ self.options.separator = '' + self.options.separator;
48
+ }
49
+
50
+ // make sure requestAnimationFrame and cancelAnimationFrame are defined
51
+ // polyfill for browsers without native support
52
+ // by Opera engineer Erik Möller
53
+ var lastTime = 0;
54
+ var vendors = ['webkit', 'moz', 'ms', 'o'];
55
+ for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
56
+ window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
57
+ window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
58
+ }
59
+ if (!window.requestAnimationFrame) {
60
+ window.requestAnimationFrame = function(callback, element) {
61
+ var currTime = new Date().getTime();
62
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
63
+ var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall);
64
+ lastTime = currTime + timeToCall;
65
+ return id;
66
+ };
67
+ }
68
+ if (!window.cancelAnimationFrame) {
69
+ window.cancelAnimationFrame = function(id) {
70
+ clearTimeout(id);
71
+ };
72
+ }
73
+
74
+ function formatNumber(num) {
75
+ var neg = (num < 0),
76
+ x, x1, x2, x3, i, len;
77
+ num = Math.abs(num).toFixed(self.decimals);
78
+ num += '';
79
+ x = num.split('.');
80
+ x1 = x[0];
81
+ x2 = x.length > 1 ? self.options.decimal + x[1] : '';
82
+ if (self.options.useGrouping) {
83
+ x3 = '';
84
+ for (i = 0, len = x1.length; i < len; ++i) {
85
+ if (i !== 0 && ((i % 3) === 0)) {
86
+ x3 = self.options.separator + x3;
87
+ }
88
+ x3 = x1[len - i - 1] + x3;
89
+ }
90
+ x1 = x3;
91
+ }
92
+ // optional numeral substitution
93
+ if (self.options.numerals.length) {
94
+ x1 = x1.replace(/[0-9]/g, function(w) {
95
+ return self.options.numerals[+w];
96
+ })
97
+ x2 = x2.replace(/[0-9]/g, function(w) {
98
+ return self.options.numerals[+w];
99
+ })
100
+ }
101
+ return (neg ? '-' : '') + self.options.prefix + x1 + x2 + self.options.suffix;
102
+ }
103
+ // Robert Penner's easeOutExpo
104
+ function easeOutExpo(t, b, c, d) {
105
+ return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
106
+ }
107
+ function ensureNumber(n) {
108
+ return (typeof n === 'number' && !isNaN(n));
109
+ }
110
+
111
+ self.initialize = function() {
112
+ if (self.initialized) return true;
113
+
114
+ self.error = '';
115
+ self.d = (typeof target === 'string') ? document.getElementById(target) : target;
116
+ if (!self.d) {
117
+ self.error = '[CountUp] target is null or undefined'
118
+ return false;
119
+ }
120
+ self.startVal = Number(startVal);
121
+ self.endVal = Number(endVal);
122
+ // error checks
123
+ if (ensureNumber(self.startVal) && ensureNumber(self.endVal)) {
124
+ self.decimals = Math.max(0, decimals || 0);
125
+ self.dec = Math.pow(10, self.decimals);
126
+ self.duration = Number(duration) * 1000 || 2000;
127
+ self.countDown = (self.startVal > self.endVal);
128
+ self.frameVal = self.startVal;
129
+ self.initialized = true;
130
+ return true;
131
+ }
132
+ else {
133
+ self.error = '[CountUp] startVal ('+startVal+') or endVal ('+endVal+') is not a number';
134
+ return false;
135
+ }
136
+ };
137
+
138
+ // Print value to target
139
+ self.printValue = function(value) {
140
+ var result = self.options.formattingFn(value);
141
+
142
+ if (self.d.tagName === 'INPUT') {
143
+ this.d.value = result;
144
+ }
145
+ else if (self.d.tagName === 'text' || self.d.tagName === 'tspan') {
146
+ this.d.textContent = result;
147
+ }
148
+ else {
149
+ this.d.innerHTML = result;
150
+ }
151
+ };
152
+
153
+ self.count = function(timestamp) {
154
+
155
+ if (!self.startTime) { self.startTime = timestamp; }
156
+
157
+ self.timestamp = timestamp;
158
+ var progress = timestamp - self.startTime;
159
+ self.remaining = self.duration - progress;
160
+
161
+ // to ease or not to ease
162
+ if (self.options.useEasing) {
163
+ if (self.countDown) {
164
+ self.frameVal = self.startVal - self.options.easingFn(progress, 0, self.startVal - self.endVal, self.duration);
165
+ } else {
166
+ self.frameVal = self.options.easingFn(progress, self.startVal, self.endVal - self.startVal, self.duration);
167
+ }
168
+ } else {
169
+ if (self.countDown) {
170
+ self.frameVal = self.startVal - ((self.startVal - self.endVal) * (progress / self.duration));
171
+ } else {
172
+ self.frameVal = self.startVal + (self.endVal - self.startVal) * (progress / self.duration);
173
+ }
174
+ }
175
+
176
+ // don't go past endVal since progress can exceed duration in the last frame
177
+ if (self.countDown) {
178
+ self.frameVal = (self.frameVal < self.endVal) ? self.endVal : self.frameVal;
179
+ } else {
180
+ self.frameVal = (self.frameVal > self.endVal) ? self.endVal : self.frameVal;
181
+ }
182
+
183
+ // decimal
184
+ self.frameVal = Math.round(self.frameVal*self.dec)/self.dec;
185
+
186
+ // format and print value
187
+ self.printValue(self.frameVal);
188
+
189
+ // whether to continue
190
+ if (progress < self.duration) {
191
+ self.rAF = requestAnimationFrame(self.count);
192
+ } else {
193
+ if (self.callback) self.callback();
194
+ }
195
+ };
196
+ // start your animation
197
+ self.start = function(callback) {
198
+ if (!self.initialize()) return;
199
+ self.callback = callback;
200
+ self.rAF = requestAnimationFrame(self.count);
201
+ };
202
+ // toggles pause/resume animation
203
+ self.pauseResume = function() {
204
+ if (!self.paused) {
205
+ self.paused = true;
206
+ cancelAnimationFrame(self.rAF);
207
+ } else {
208
+ self.paused = false;
209
+ delete self.startTime;
210
+ self.duration = self.remaining;
211
+ self.startVal = self.frameVal;
212
+ requestAnimationFrame(self.count);
213
+ }
214
+ };
215
+ // reset to startVal so animation can be run again
216
+ self.reset = function() {
217
+ self.paused = false;
218
+ delete self.startTime;
219
+ self.initialized = false;
220
+ if (self.initialize()) {
221
+ cancelAnimationFrame(self.rAF);
222
+ self.printValue(self.startVal);
223
+ }
224
+ };
225
+ // pass a new endVal and start animation
226
+ self.update = function (newEndVal) {
227
+ if (!self.initialize()) return;
228
+ newEndVal = Number(newEndVal);
229
+ if (!ensureNumber(newEndVal)) {
230
+ self.error = '[CountUp] update() - new endVal is not a number: '+newEndVal;
231
+ return;
232
+ }
233
+ self.error = '';
234
+ if (newEndVal === self.frameVal) return;
235
+ cancelAnimationFrame(self.rAF);
236
+ self.paused = false;
237
+ delete self.startTime;
238
+ self.startVal = self.frameVal;
239
+ self.endVal = newEndVal;
240
+ self.countDown = (self.startVal > self.endVal);
241
+ self.rAF = requestAnimationFrame(self.count);
242
+ };
243
+
244
+ // format startVal on initialization
245
+ if (self.initialize()) self.printValue(self.startVal);
246
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/library/countUp/countUp.min.js CHANGED
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(t){for(var i,a=1,s=arguments.length;a<s;a++)for(var n in i=arguments[a])Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);return t}).apply(this,arguments)},CountUp=function(){function t(t,i,a){var s=this;this.target=t,this.endVal=i,this.options=a,this.version="2.0.4",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:""},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.count=function(t){s.startTime||(s.startTime=t);var i=t-s.startTime;s.remaining=s.duration-i,s.useEasing?s.countDown?s.frameVal=s.startVal-s.easingFn(i,0,s.startVal-s.endVal,s.duration):s.frameVal=s.easingFn(i,s.startVal,s.endVal-s.startVal,s.duration):s.countDown?s.frameVal=s.startVal-(s.startVal-s.endVal)*(i/s.duration):s.frameVal=s.startVal+(s.endVal-s.startVal)*(i/s.duration),s.countDown?s.frameVal=s.frameVal<s.endVal?s.endVal:s.frameVal:s.frameVal=s.frameVal>s.endVal?s.endVal:s.frameVal,s.frameVal=Math.round(s.frameVal*s.decimalMult)/s.decimalMult,s.printValue(s.frameVal),i<s.duration?s.rAF=requestAnimationFrame(s.count):null!==s.finalEndVal?s.update(s.finalEndVal):s.callback&&s.callback()},this.formatNumber=function(t){var i,a,n,e,r,o=t<0?"-":"";if(i=Math.abs(t).toFixed(s.options.decimalPlaces),n=(a=(i+="").split("."))[0],e=a.length>1?s.options.decimal+a[1]:"",s.options.useGrouping){r="";for(var l=0,h=n.length;l<h;++l)0!==l&&l%3==0&&(r=s.options.separator+r),r=n[h-l-1]+r;n=r}return s.options.numerals&&s.options.numerals.length&&(n=n.replace(/[0-9]/g,function(t){return s.options.numerals[+t]}),e=e.replace(/[0-9]/g,function(t){return s.options.numerals[+t]})),o+s.options.prefix+n+e+s.options.suffix},this.easeOutExpo=function(t,i,a,s){return a*(1-Math.pow(2,-10*t/s))*1024/1023+i},this.options=__assign({},this.defaults,a),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(i),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.decimalMult=Math.pow(10,this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el="string"==typeof t?document.getElementById(t):t,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined"}return t.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var i=t-this.startVal;if(Math.abs(i)>this.options.smartEasingThreshold){this.finalEndVal=t;var a=this.countDown?1:-1;this.endVal=t+a*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},t.prototype.start=function(t){this.error||(this.callback=t,this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},t.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},t.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},t.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,this.finalEndVal||this.resetDuration(),this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},t.prototype.printValue=function(t){var i=this.formattingFn(t);"INPUT"===this.el.tagName?this.el.value=i:"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=i:this.el.innerHTML=i},t.prototype.ensureNumber=function(t){return"number"==typeof t&&!isNaN(t)},t.prototype.validateValue=function(t){var i=Number(t);return this.ensureNumber(i)?i:(this.error="[CountUp] invalid start or end value: "+t,null)},t.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},t}();export{CountUp};
1
+ var CountUp=function(a,n,t,e,i,r){var o=this;if(o.version=function(){return"1.9.3"},o.options={useEasing:!0,useGrouping:!0,separator:",",decimal:".",easingFn:function(a,n,t,e){return t*(1-Math.pow(2,-10*a/e))*1024/1023+n},formattingFn:function(a){var n,t,e,i,r,s,l=a<0;if(a=Math.abs(a).toFixed(o.decimals),n=(a+="").split("."),t=n[0],e=n.length>1?o.options.decimal+n[1]:"",o.options.useGrouping){for(i="",r=0,s=t.length;r<s;++r)0!==r&&r%3==0&&(i=o.options.separator+i),i=t[s-r-1]+i;t=i}o.options.numerals.length&&(t=t.replace(/[0-9]/g,function(a){return o.options.numerals[+a]}),e=e.replace(/[0-9]/g,function(a){return o.options.numerals[+a]}));return(l?"-":"")+o.options.prefix+t+e+o.options.suffix},prefix:"",suffix:"",numerals:[]},r&&"object"==typeof r)for(var s in o.options)r.hasOwnProperty(s)&&null!==r[s]&&(o.options[s]=r[s]);""===o.options.separator?o.options.useGrouping=!1:o.options.separator=""+o.options.separator;for(var l=0,u=["webkit","moz","ms","o"],m=0;m<u.length&&!window.requestAnimationFrame;++m)window.requestAnimationFrame=window[u[m]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[u[m]+"CancelAnimationFrame"]||window[u[m]+"CancelRequestAnimationFrame"];function d(a){return"number"==typeof a&&!isNaN(a)}window.requestAnimationFrame||(window.requestAnimationFrame=function(a,n){var t=(new Date).getTime(),e=Math.max(0,16-(t-l)),i=window.setTimeout(function(){a(t+e)},e);return l=t+e,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)}),o.initialize=function(){return!!o.initialized||(o.error="",o.d="string"==typeof a?document.getElementById(a):a,o.d?(o.startVal=Number(n),o.endVal=Number(t),d(o.startVal)&&d(o.endVal)?(o.decimals=Math.max(0,e||0),o.dec=Math.pow(10,o.decimals),o.duration=1e3*Number(i)||2e3,o.countDown=o.startVal>o.endVal,o.frameVal=o.startVal,o.initialized=!0,!0):(o.error="[CountUp] startVal ("+n+") or endVal ("+t+") is not a number",!1)):(o.error="[CountUp] target is null or undefined",!1))},o.printValue=function(a){var n=o.options.formattingFn(a);"INPUT"===o.d.tagName?this.d.value=n:"text"===o.d.tagName||"tspan"===o.d.tagName?this.d.textContent=n:this.d.innerHTML=n},o.count=function(a){o.startTime||(o.startTime=a),o.timestamp=a;var n=a-o.startTime;o.remaining=o.duration-n,o.options.useEasing?o.countDown?o.frameVal=o.startVal-o.options.easingFn(n,0,o.startVal-o.endVal,o.duration):o.frameVal=o.options.easingFn(n,o.startVal,o.endVal-o.startVal,o.duration):o.countDown?o.frameVal=o.startVal-(o.startVal-o.endVal)*(n/o.duration):o.frameVal=o.startVal+(o.endVal-o.startVal)*(n/o.duration),o.countDown?o.frameVal=o.frameVal<o.endVal?o.endVal:o.frameVal:o.frameVal=o.frameVal>o.endVal?o.endVal:o.frameVal,o.frameVal=Math.round(o.frameVal*o.dec)/o.dec,o.printValue(o.frameVal),n<o.duration?o.rAF=requestAnimationFrame(o.count):o.callback&&o.callback()},o.start=function(a){o.initialize()&&(o.callback=a,o.rAF=requestAnimationFrame(o.count))},o.pauseResume=function(){o.paused?(o.paused=!1,delete o.startTime,o.duration=o.remaining,o.startVal=o.frameVal,requestAnimationFrame(o.count)):(o.paused=!0,cancelAnimationFrame(o.rAF))},o.reset=function(){o.paused=!1,delete o.startTime,o.initialized=!1,o.initialize()&&(cancelAnimationFrame(o.rAF),o.printValue(o.startVal))},o.update=function(a){o.initialize()&&(d(a=Number(a))?(o.error="",a!==o.frameVal&&(cancelAnimationFrame(o.rAF),o.paused=!1,delete o.startTime,o.startVal=o.frameVal,o.endVal=a,o.countDown=o.startVal>o.endVal,o.rAF=requestAnimationFrame(o.count))):o.error="[CountUp] update() - new endVal is not a number: "+a)},o.initialize()&&o.printValue(o.startVal)};
gutentor.php CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'WPINC' ) ) {
14
  * @wordpress-plugin
15
  * Plugin Name: Gutentor : WordPress Page Building Blocks with Unlimited Possibilities to Design
16
  * Description: The most advanced yet easy drag & drop block page builder. Create masterpiece, pixel perfect websites using modern WordPress way. Work with any theme, create any design.
17
- * Version: 1.0.3
18
  * Author: Gutentor
19
  * Author URI: https://www.gutentor.com/
20
  * License: GPL-2.0+
@@ -24,7 +24,7 @@ if ( ! defined( 'WPINC' ) ) {
24
  */
25
 
26
  /*Define Constants for this plugin*/
27
- define( 'GUTENTOR_VERSION', '1.0.3' );
28
  define( 'GUTENTOR_PATH', plugin_dir_path( __FILE__ ) );
29
  define( 'GUTENTOR_URL', plugin_dir_url( __FILE__ ) );
30
  define( 'GUTENTOR_SCRIPT_PREFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min' );
14
  * @wordpress-plugin
15
  * Plugin Name: Gutentor : WordPress Page Building Blocks with Unlimited Possibilities to Design
16
  * Description: The most advanced yet easy drag & drop block page builder. Create masterpiece, pixel perfect websites using modern WordPress way. Work with any theme, create any design.
17
+ * Version: 1.0.4
18
  * Author: Gutentor
19
  * Author URI: https://www.gutentor.com/
20
  * License: GPL-2.0+
24
  */
25
 
26
  /*Define Constants for this plugin*/
27
+ define( 'GUTENTOR_VERSION', '1.0.4' );
28
  define( 'GUTENTOR_PATH', plugin_dir_path( __FILE__ ) );
29
  define( 'GUTENTOR_URL', plugin_dir_url( __FILE__ ) );
30
  define( 'GUTENTOR_SCRIPT_PREFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min' );
includes/blocks/class-blog-post.php CHANGED
@@ -914,28 +914,26 @@ if ( ! class_exists( 'Gutentor_Blog_Post' ) ) {
914
  $entry_meta_typography = (isset($attributes['blockEntryMetaTypography']) && $attributes['blockEntryMetaTypography']) ? $attributes['blockEntryMetaTypography'] : false;
915
  $entry_meta_margin = (isset($attributes['blockEntryMetaMargin']) && $attributes['blockEntryMetaMargin']) ? $attributes['blockEntryMetaMargin'] : false;
916
  $entry_meta_padding = (isset($attributes['blockEntryMetaPadding']) && $attributes['blockEntryMetaPadding']) ? $attributes['blockEntryMetaPadding'] : false;
917
- $local_dynamic_css['all'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div,
918
- #section-' . $attributes['blockID'] . ' .entry-meta div a{
919
- ' . gutentor_generate_css('color', ($meta_color_enable && $attributes['entryMetaColor']['normal']) ? $attributes['entryMetaColor']['normal']['hex'] : null) . '
920
  '.gutentor_typography_options_css($entry_meta_typography).'
921
-
 
922
  }';
923
  $local_dynamic_css['all'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div:hover,
924
  #section-' . $attributes['blockID'] . ' .entry-meta div a:hover{
925
  ' . gutentor_generate_css('color', ($meta_color_enable && $attributes['entryMetaColor']['hover']) ? $attributes['entryMetaColor']['hover']['hex'] : null) . '
926
  }';
927
 
928
- $local_dynamic_css['tablet'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div,
929
- #section-' . $attributes['blockID'] . ' .entry-meta div a{
930
- ' . gutentor_typography_options_responsive_css($entry_meta_typography,'tablet') . '
931
  '.gutentor_box_four_device_options_css('margin',$entry_meta_margin,'tablet').'
932
- '.gutentor_box_four_device_options_css('padding',$entry_meta_padding,'tablet').'
933
  }';
934
- $local_dynamic_css['desktop'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div,
935
- #section-' . $attributes['blockID'] . ' .entry-meta div a{
936
- ' . gutentor_typography_options_responsive_css($entry_meta_typography,'desktop') . '
937
- '.gutentor_box_four_device_options_css('margin',$entry_meta_margin,'desktop').'
938
- '.gutentor_box_four_device_options_css('padding',$entry_meta_padding,'desktop').'
939
  }';
940
 
941
  /*Image overlay css*/
914
  $entry_meta_typography = (isset($attributes['blockEntryMetaTypography']) && $attributes['blockEntryMetaTypography']) ? $attributes['blockEntryMetaTypography'] : false;
915
  $entry_meta_margin = (isset($attributes['blockEntryMetaMargin']) && $attributes['blockEntryMetaMargin']) ? $attributes['blockEntryMetaMargin'] : false;
916
  $entry_meta_padding = (isset($attributes['blockEntryMetaPadding']) && $attributes['blockEntryMetaPadding']) ? $attributes['blockEntryMetaPadding'] : false;
917
+ $local_dynamic_css['all'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div {
918
+ '. gutentor_generate_css('color', ($meta_color_enable && $attributes['entryMetaColor']['normal']) ? $attributes['entryMetaColor']['normal']['hex'] : null) . '
 
919
  '.gutentor_typography_options_css($entry_meta_typography).'
920
+ '.gutentor_box_four_device_options_css('margin',$entry_meta_margin).'
921
+ '.gutentor_box_four_device_options_css('padding',$entry_meta_padding).'
922
  }';
923
  $local_dynamic_css['all'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div:hover,
924
  #section-' . $attributes['blockID'] . ' .entry-meta div a:hover{
925
  ' . gutentor_generate_css('color', ($meta_color_enable && $attributes['entryMetaColor']['hover']) ? $attributes['entryMetaColor']['hover']['hex'] : null) . '
926
  }';
927
 
928
+ $local_dynamic_css['tablet'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div{
929
+ '. gutentor_typography_options_responsive_css($entry_meta_typography,'tablet') . '
 
930
  '.gutentor_box_four_device_options_css('margin',$entry_meta_margin,'tablet').'
931
+ '.gutentor_box_four_device_options_css('padding',$entry_meta_padding,'tablet').'
932
  }';
933
+ $local_dynamic_css['desktop'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div{
934
+ '. gutentor_typography_options_responsive_css($entry_meta_typography,'desktop') . '
935
+ '.gutentor_box_four_device_options_css('margin',$entry_meta_margin,'desktop').'
936
+ '.gutentor_box_four_device_options_css('padding',$entry_meta_padding,'desktop').'
 
937
  }';
938
 
939
  /*Image overlay css*/
includes/hooks.php CHANGED
@@ -281,7 +281,7 @@ class Gutentor_Hooks {
281
  'countUp', // Handle.
282
  GUTENTOR_URL . '/assets/library/countUp/countUp' . GUTENTOR_SCRIPT_PREFIX . '.js',
283
  array('jquery'), // Dependencies, defined above.
284
- '2.0.4', // Version: File modification time.
285
  true // Enqueue the script in the footer.
286
  );
287
 
281
  'countUp', // Handle.
282
  GUTENTOR_URL . '/assets/library/countUp/countUp' . GUTENTOR_SCRIPT_PREFIX . '.js',
283
  array('jquery'), // Dependencies, defined above.
284
+ '1.9.3', // Version: File modification time.
285
  true // Enqueue the script in the footer.
286
  );
287
 
includes/tools/class-advanced-import.php CHANGED
@@ -570,6 +570,17 @@ if ( ! class_exists( 'Gutentor_Advanced_Import_Server' ) ) {
570
  'screenshot_url' => 'https://raw.githubusercontent.com/gutentor/template-library/master/templates/education/education-1/education-template.jpg',
571
  'demo_url' => 'https://www.demo.gutentor.com/templates/education-1/',
572
  ),
 
 
 
 
 
 
 
 
 
 
 
573
  );
574
 
575
  $templates = apply_filters( 'gutentor_advanced_import_templates', $templates_list );
570
  'screenshot_url' => 'https://raw.githubusercontent.com/gutentor/template-library/master/templates/education/education-1/education-template.jpg',
571
  'demo_url' => 'https://www.demo.gutentor.com/templates/education-1/',
572
  ),
573
+
574
+ array(
575
+ 'title' => __( 'Agency', 'gutentor' ),
576
+ 'type' => 'template',
577
+ 'author' => __( 'Gutentor', 'gutentor' ),
578
+ 'keywords' => array( 'agency', 'agency 1' ),
579
+ 'categories' => array( 'agency' ),
580
+ 'template_url' => 'https://raw.githubusercontent.com/gutentor/template-library/master/templates/agency/agency-1/template.json',
581
+ 'screenshot_url' => 'https://raw.githubusercontent.com/gutentor/template-library/master/templates/agency/agency-1/agency-template.jpg',
582
+ 'demo_url' => 'https://www.demo.gutentor.com/templates/agency-1/',
583
+ ),
584
  );
585
 
586
  $templates = apply_filters( 'gutentor_advanced_import_templates', $templates_list );
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: blocks, block, block editor, drag-and-drop, landing page, website builder,
6
  Requires at least: 5.0
7
  Tested up to: 5.2.3
8
  Requires PHP: 5.6.20
9
- Stable tag: 1.0.3
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -158,6 +158,13 @@ Yes We provide Free Support via WordPress Support Forum https://wordpress.org/su
158
 
159
  == Changelog ==
160
 
 
 
 
 
 
 
 
161
  = 1.0.3 - 2019-09-06 =
162
  * Fixed : Gallery Design
163
  * Fixed : Advanced Column on Editor
6
  Requires at least: 5.0
7
  Tested up to: 5.2.3
8
  Requires PHP: 5.6.20
9
+ Stable tag: 1.0.4
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
158
 
159
  == Changelog ==
160
 
161
+ = 1.0.4 - 2019-09-09 =
162
+ * Fixed : Countup JS
163
+ * Fixed : Blog Mobile Issue
164
+ * Fixed : Advanced Column
165
+ * Added : Agency templates
166
+ * Update : Minor change and fixes
167
+
168
  = 1.0.3 - 2019-09-06 =
169
  * Fixed : Gallery Design
170
  * Fixed : Advanced Column on Editor