Skip to content

Commit 9319278

Browse files
committed
Merge 4.8.4
1 parent f4da7da commit 9319278

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+830
-547
lines changed

examples/angular/package-lock.json

+32-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/angular/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
"@angular/platform-browser": "~8.2.4",
2020
"@angular/platform-browser-dynamic": "~8.2.4",
2121
"@angular/router": "~8.2.4",
22-
"@mobiscroll/angular-lite": "4.8.1",
22+
"@mobiscroll/angular-lite": "4.8.4",
2323
"rxjs": "~6.5.3",
24-
"rxjs-compat": "^6.5.2",
2524
"tslib": "^1.9.0",
2625
"zone.js": "~0.9.1"
2726
},

examples/react/package-lock.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@mobiscroll/react-lite": "4.8.1",
6+
"@mobiscroll/react-lite": "4.8.4",
77
"@types/jest": "^24.0.18",
88
"@types/node": "^12.7.4",
99
"@types/react": "^16.9.2",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mobiscroll",
3-
"version": "4.8.1",
3+
"version": "4.8.4",
44
"description": "Cross platform UI controls for progressive web an hybrid apps",
55
"homepage": "https://mobiscroll.com/",
66
"license": "Apache-2.0",

packages/angular/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mobiscroll/angular-lite",
3-
"version": "4.8.1",
3+
"version": "4.8.4",
44
"description": "Angular UI library for progressive web and hybrid apps",
55
"homepage": "https://mobiscroll.com/",
66
"license": "Apache-2.0",

packages/angularjs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mobiscroll/angularjs-lite",
3-
"version": "4.8.1",
3+
"version": "4.8.4",
44
"description": "AngularJS UI library for progressive web and hybrid apps",
55
"homepage": "https://mobiscroll.com/",
66
"license": "Apache-2.0",

packages/javascript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mobiscroll/javascript-lite",
3-
"version": "4.8.1",
3+
"version": "4.8.4",
44
"description": "Framework agnostic UI library for progressive web and hybrid apps",
55
"homepage": "https://mobiscroll.com/",
66
"license": "Apache-2.0",

packages/jquery/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mobiscroll/jquery-lite",
3-
"version": "4.8.1",
3+
"version": "4.8.4",
44
"description": "jQuery and jQuery Mobile UI library for progressive web and hybrid apps",
55
"homepage": "https://mobiscroll.com/",
66
"license": "Apache-2.0",

packages/react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mobiscroll/react-lite",
3-
"version": "4.8.1",
3+
"version": "4.8.4",
44
"description": "React UI library for progressive web and hybrid apps",
55
"homepage": "https://mobiscroll.com/",
66
"license": "Apache-2.0",

src/js/classes/form-control.js

+17-4
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ function addIconToggle(that, $parent, $control) {
8282

8383
function wrapLabel($parent, type, inputStyle, labelStyle, elm) {
8484
// Wrap non-empty text nodes in span with mbsc-label class
85-
if (type != 'button' && type != 'submit' && type != 'segmented') {
85+
if (type == 'segmented') {
86+
$parent.closest('.mbsc-segmented')
87+
.addClass(inputStyle == 'box' ? 'mbsc-input-box' : '')
88+
.addClass(inputStyle == 'outline' ? 'mbsc-input-outline' : '');
89+
} else if (type != 'button' && type != 'submit') {
8690
$parent
8791
.addClass('mbsc-control-w')
8892
.addClass(inputStyle == 'box' ? 'mbsc-input-box' : '')
@@ -132,6 +136,10 @@ export class FormControl {
132136
const inputStyle = getAttr($elm, 'data-input-style', s.inputStyle);
133137
const labelStyle = getAttr($elm, 'data-label-style', s.labelStyle);
134138

139+
if (elm.mbscInst) {
140+
elm.mbscInst.destroy();
141+
}
142+
135143
if ($frame) {
136144
$frame.insertAfter($parent);
137145
}
@@ -155,9 +163,10 @@ export class FormControl {
155163
$elm.addClass('mbsc-control');
156164

157165
// Attach events
166+
this._handle = this._handle.bind(this);
158167
// Prevent 300ms click latency
159168
events.forEach(ev => {
160-
elm.addEventListener(ev, this);
169+
$elm.on(ev, this._handle);
161170
});
162171

163172
this.settings = s;
@@ -182,8 +191,9 @@ export class FormControl {
182191

183192
destroy() {
184193
this._$elm.removeClass('mbsc-control');
194+
this.getClassElm().removeClass(this.cssClass);
185195
events.forEach(ev => {
186-
this._elm.removeEventListener(ev, this);
196+
this._$elm.off(ev, this._handle);
187197
});
188198
delete this._elm.mbscInst;
189199
}
@@ -202,7 +212,7 @@ export class FormControl {
202212
this._ripple = getRipple(this.settings.theme);
203213
}
204214

205-
handleEvent(ev) {
215+
_handle(ev) {
206216
switch (ev.type) {
207217
case 'touchstart':
208218
case 'mousedown':
@@ -287,8 +297,11 @@ export class FormControl {
287297
}
288298
}
289299

300+
mobiscroll.themes.form.mobiscroll = {};
301+
290302
export {
291303
addIcon,
292304
addIconToggle,
305+
getCssClass,
293306
wrapLabel
294307
};

src/js/classes/forms.d.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import '../util/notifications';
44

55
export { MbscFormOptions };
66

7-
export class Form extends Base {
8-
settings: MbscFormOptions;
9-
constructor(element: any, settings: MbscFormOptions);
7+
export class Form extends Base<MbscFormOptions> {
108
refresh(shallow?: boolean): void;
119
}

src/js/classes/forms.js

-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ Form.prototype = {
9595
}
9696
};
9797

98-
mobiscroll.themes.form.mobiscroll = {};
99-
10098
classes.Form = Form;
10199

102100
// Init mbsc-form elements on page load

src/js/classes/frame.d.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ export interface MbscDataControlOptions {
4040

4141
export type MbscDataFrameOptions = MbscDataControlOptions & MbscFrameOptions;
4242

43-
export class Frame extends Base {
44-
settings: MbscFrameOptions;
43+
export class Frame<T extends MbscFrameOptions> extends Base<T> {
4544
buttons: object;
4645
handlers: {
4746
set: () => void,
@@ -52,8 +51,6 @@ export class Frame extends Base {
5251
_isValid: boolean;
5352
_isVisible: boolean;
5453

55-
constructor(element: any, settings: MbscFrameOptions);
56-
5754
position(check?: boolean): void;
5855
attachShow(elm: any, beforeShow?: () => void): void;
5956
select(): void;
@@ -64,7 +61,4 @@ export class Frame extends Base {
6461
show(prevAnim?: boolean, prevFocus?: boolean): void;
6562
hide(prevAnim?: boolean, btn?: string, force?: boolean, callback?: () => void): void;
6663
isVisible(): boolean;
67-
68-
// type overrides
69-
option(options: string | MbscFrameOptions, value?: any): void;
7064
}

0 commit comments

Comments
 (0)