Skip to content

Commit

Permalink
Merge 4.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dioslaska committed Oct 28, 2019
1 parent f4da7da commit 9319278
Show file tree
Hide file tree
Showing 63 changed files with 830 additions and 547 deletions.
53 changes: 32 additions & 21 deletions examples/angular/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions examples/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
"@angular/platform-browser": "~8.2.4",
"@angular/platform-browser-dynamic": "~8.2.4",
"@angular/router": "~8.2.4",
"@mobiscroll/angular-lite": "4.8.1",
"@mobiscroll/angular-lite": "4.8.4",
"rxjs": "~6.5.3",
"rxjs-compat": "^6.5.2",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
Expand Down
10 changes: 5 additions & 5 deletions examples/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@mobiscroll/react-lite": "4.8.1",
"@mobiscroll/react-lite": "4.8.4",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.4",
"@types/react": "^16.9.2",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobiscroll",
"version": "4.8.1",
"version": "4.8.4",
"description": "Cross platform UI controls for progressive web an hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/angular-lite",
"version": "4.8.1",
"version": "4.8.4",
"description": "Angular UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/angularjs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/angularjs-lite",
"version": "4.8.1",
"version": "4.8.4",
"description": "AngularJS UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/javascript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/javascript-lite",
"version": "4.8.1",
"version": "4.8.4",
"description": "Framework agnostic UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/jquery/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/jquery-lite",
"version": "4.8.1",
"version": "4.8.4",
"description": "jQuery and jQuery Mobile UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mobiscroll/react-lite",
"version": "4.8.1",
"version": "4.8.4",
"description": "React UI library for progressive web and hybrid apps",
"homepage": "https://mobiscroll.com/",
"license": "Apache-2.0",
Expand Down
21 changes: 17 additions & 4 deletions src/js/classes/form-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ function addIconToggle(that, $parent, $control) {

function wrapLabel($parent, type, inputStyle, labelStyle, elm) {
// Wrap non-empty text nodes in span with mbsc-label class
if (type != 'button' && type != 'submit' && type != 'segmented') {
if (type == 'segmented') {
$parent.closest('.mbsc-segmented')
.addClass(inputStyle == 'box' ? 'mbsc-input-box' : '')
.addClass(inputStyle == 'outline' ? 'mbsc-input-outline' : '');
} else if (type != 'button' && type != 'submit') {
$parent
.addClass('mbsc-control-w')
.addClass(inputStyle == 'box' ? 'mbsc-input-box' : '')
Expand Down Expand Up @@ -132,6 +136,10 @@ export class FormControl {
const inputStyle = getAttr($elm, 'data-input-style', s.inputStyle);
const labelStyle = getAttr($elm, 'data-label-style', s.labelStyle);

if (elm.mbscInst) {
elm.mbscInst.destroy();
}

if ($frame) {
$frame.insertAfter($parent);
}
Expand All @@ -155,9 +163,10 @@ export class FormControl {
$elm.addClass('mbsc-control');

// Attach events
this._handle = this._handle.bind(this);
// Prevent 300ms click latency
events.forEach(ev => {
elm.addEventListener(ev, this);
$elm.on(ev, this._handle);
});

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

destroy() {
this._$elm.removeClass('mbsc-control');
this.getClassElm().removeClass(this.cssClass);
events.forEach(ev => {
this._elm.removeEventListener(ev, this);
this._$elm.off(ev, this._handle);
});
delete this._elm.mbscInst;
}
Expand All @@ -202,7 +212,7 @@ export class FormControl {
this._ripple = getRipple(this.settings.theme);
}

handleEvent(ev) {
_handle(ev) {
switch (ev.type) {
case 'touchstart':
case 'mousedown':
Expand Down Expand Up @@ -287,8 +297,11 @@ export class FormControl {
}
}

mobiscroll.themes.form.mobiscroll = {};

export {
addIcon,
addIconToggle,
getCssClass,
wrapLabel
};
4 changes: 1 addition & 3 deletions src/js/classes/forms.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import '../util/notifications';

export { MbscFormOptions };

export class Form extends Base {
settings: MbscFormOptions;
constructor(element: any, settings: MbscFormOptions);
export class Form extends Base<MbscFormOptions> {
refresh(shallow?: boolean): void;
}
2 changes: 0 additions & 2 deletions src/js/classes/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ Form.prototype = {
}
};

mobiscroll.themes.form.mobiscroll = {};

classes.Form = Form;

// Init mbsc-form elements on page load
Expand Down
8 changes: 1 addition & 7 deletions src/js/classes/frame.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export interface MbscDataControlOptions {

export type MbscDataFrameOptions = MbscDataControlOptions & MbscFrameOptions;

export class Frame extends Base {
settings: MbscFrameOptions;
export class Frame<T extends MbscFrameOptions> extends Base<T> {
buttons: object;
handlers: {
set: () => void,
Expand All @@ -52,8 +51,6 @@ export class Frame extends Base {
_isValid: boolean;
_isVisible: boolean;

constructor(element: any, settings: MbscFrameOptions);

position(check?: boolean): void;
attachShow(elm: any, beforeShow?: () => void): void;
select(): void;
Expand All @@ -64,7 +61,4 @@ export class Frame extends Base {
show(prevAnim?: boolean, prevFocus?: boolean): void;
hide(prevAnim?: boolean, btn?: string, force?: boolean, callback?: () => void): void;
isVisible(): boolean;

// type overrides
option(options: string | MbscFrameOptions, value?: any): void;
}
Loading

0 comments on commit 9319278

Please sign in to comment.