Skip to content

Commit edbe6f3

Browse files
committed
5.3.2 release
1 parent fc24f8d commit edbe6f3

Some content is hidden

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

65 files changed

+526
-313
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
# Change Log
44

5+
# [v5.3.2](https://github.com/framework7io/framework7/compare/v5.3.0...v5.3.2) - January 18, 2019
6+
* Core
7+
* Component
8+
* Now main app component will be created on app init respecting cordova's deviceready event
9+
* Toolbar
10+
* Fixed Tabbar init when it used in main app component
11+
* Picker
12+
* Added `backdrop` parameter support
13+
* Swiper updated to latest 5.3.0
14+
* Core
15+
* New `slidesPerGroupSkip` behavior (#3361)
16+
* New ratio-based breakpoints (#3389)
17+
* Added SCSS interpolation (#3373, #3374)
18+
* Mousehweel
19+
* Fixed issue when it can fail on load (#3383)
20+
* Touch
21+
* Fixed issue when it could prevent Leaflet map controls on iOS 12.x
22+
* Vue/React
23+
* Navbar - fixed issue when it could disappear with custom transitions
24+
* Minor fixes
25+
526
# [v5.3.0](https://github.com/framework7io/framework7/compare/v5.2.0...v5.3.0) - January 3, 2019
627
* Core
728
* Card

packages/core/components/app/app-class.js

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -109,30 +109,14 @@ class Framework7 extends Framework7Class {
109109
html.classList.remove('theme-dark');
110110
}
111111
};
112+
112113
// Init
113-
function init() {
114-
if (Device.cordova && app.params.initOnDeviceReady) {
115-
$(document).on('deviceready', () => {
116-
app.init();
117-
});
118-
} else {
114+
if (Device.cordova && app.params.initOnDeviceReady) {
115+
$(document).on('deviceready', () => {
119116
app.init();
120-
}
121-
}
122-
if (app.params.component || app.params.componentUrl) {
123-
app.router.componentLoader(
124-
app.params.component,
125-
app.params.componentUrl,
126-
{ componentOptions: { el: app.root[0] } },
127-
(el) => {
128-
app.root = $(el);
129-
app.root[0].f7 = app;
130-
app.rootComponent = el.f7Component;
131-
if (app.params.init) init();
132-
}
133-
);
134-
} else if (app.params.init) {
135-
init();
117+
});
118+
} else {
119+
app.init();
136120
}
137121

138122
// Return app instance
@@ -184,7 +168,24 @@ class Framework7 extends Framework7Class {
184168
if (app.mq.light) app.mq.light.removeListener(app.colorSchemeListener);
185169
}
186170

187-
init() {
171+
initAppComponent(callback) {
172+
const app = this;
173+
app.router.componentLoader(
174+
app.params.component,
175+
app.params.componentUrl,
176+
{ componentOptions: { el: app.root[0] } },
177+
(el) => {
178+
app.root = $(el);
179+
app.root[0].f7 = app;
180+
app.rootComponent = el.f7Component;
181+
if (callback) callback();
182+
},
183+
() => {}
184+
);
185+
}
186+
187+
// eslint-disable-next-line
188+
_init() {
188189
const app = this;
189190
if (app.initialized) return app;
190191

@@ -237,6 +238,17 @@ class Framework7 extends Framework7Class {
237238
return app;
238239
}
239240

241+
init() {
242+
const app = this;
243+
if (app.params.component || app.params.componentUrl) {
244+
app.initAppComponent(() => {
245+
app._init(); // eslint-disable-line
246+
});
247+
} else {
248+
app._init(); // eslint-disable-line
249+
}
250+
}
251+
240252
// eslint-disable-next-line
241253
loadModule(...args) {
242254
return Framework7.loadModule(...args);

packages/core/components/dialog/dialog.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export namespace Dialog {
6060
backdrop?: boolean
6161
/** When enabled, dialog will be closed on backdrop click. (default true) */
6262
closeByBackdropClick?: boolean
63-
/** Whether the Dialog should be opened/closed with animation or not. Can be overwritten in .open() and .close() methods. (default true) */
63+
/** Whether the Dialog should be opened/closed with animation or not. Can be overwritten in .open() and .close() methods. (default false) */
6464
animate?: boolean
6565
/** Dialog title. */
6666
title?: string
@@ -132,9 +132,9 @@ export namespace Dialog {
132132
confirm(text : string, callbackOk?: () => void, callbackCancel?: () => void) : Dialog
133133

134134
/** create Prompt Dialog and open it */
135-
prompt(text : string, title : string, callbackOk?: (value : string) => void, callbackCancel?: (value : string) => void) : Dialog
135+
prompt(text : string, title : string, callbackOk?: (value : string) => void, callbackCancel?: (value : string) => void, defaultValue?: string) : Dialog
136136
/** create Prompt Dialog with default title and open it */
137-
prompt(text : string, callbackOk?: (value : string) => void, callbackCancel?: (value : string) => void) : Dialog
137+
prompt(text : string, callbackOk?: (value : string) => void, callbackCancel?: (value : string) => void, defaultValue?: string) : Dialog
138138

139139
/** create Login Dialog and open it */
140140
login(text : string, title : string, callbackOk?: (username : string, password : string) => void, callbackCancel?: (username : string, password : string) => void) : Dialog

packages/core/components/picker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/components/picker/picker-class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ class Picker extends Framework7Class {
454454
targetEl: $inputEl,
455455
scrollToEl: params.scrollToInput ? $inputEl : undefined,
456456
content: picker.render(),
457-
backdrop: isPopover,
457+
backdrop: typeof params.backdrop !== 'undefined' ? params.backdrop : isPopover,
458458
on: {
459459
open() {
460460
const modal = this;

packages/core/components/picker/picker.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ export namespace Picker {
121121
sheetPush?: boolean
122122
/** Enables ability to close Picker sheet with swipe (default false) */
123123
sheetSwipeToClose?: boolean | undefined
124+
/** Enables backdrop (dark semi transparent layer behind). (default undefined - based on Popover or Sheet defaults) */
125+
backdrop?: boolean
124126
/** String with CSS selector or HTMLElement with related input element. */
125127
inputEl?: HTMLElement | CSSSelector
126128
/** Scroll viewport (page-content) to input when picker opened. (default true) */

packages/core/components/picker/picker.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default {
3939
openIn: 'auto', // or 'popover' or 'sheet'
4040
sheetPush: false,
4141
sheetSwipeToClose: undefined,
42+
backdrop: undefined, // uses Popover or Sheet defaults
4243
formatValue: null,
4344
inputEl: null,
4445
inputReadOnly: true,

packages/core/components/swiper.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/components/swiper/swiper-src/components/core/breakpoints/getBreakpoint.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@ export default function (breakpoints) {
44
// Get breakpoint for window width
55
if (!breakpoints) return undefined;
66
let breakpoint = false;
7-
const points = [];
8-
Object.keys(breakpoints).forEach((point) => {
9-
points.push(point);
7+
8+
const points = Object.keys(breakpoints).map((point) => {
9+
if (typeof point === 'string' && point.startsWith('@')) {
10+
const minRatio = parseFloat(point.substr(1));
11+
const value = window.innerHeight * minRatio;
12+
return { value, point };
13+
}
14+
return { value: point, point };
1015
});
11-
points.sort((a, b) => parseInt(a, 10) - parseInt(b, 10));
16+
17+
points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));
1218
for (let i = 0; i < points.length; i += 1) {
13-
const point = points[i];
14-
if (point <= window.innerWidth) {
19+
const { point, value } = points[i];
20+
if (value <= window.innerWidth) {
1521
breakpoint = point;
1622
}
1723
}

packages/core/components/swiper/swiper-src/components/core/breakpoints/setBreakpoint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function () {
1414
if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
1515
const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
1616
if (breakpointOnlyParams) {
17-
['slidesPerView', 'spaceBetween', 'slidesPerGroup', 'slidesPerColumn'].forEach((param) => {
17+
['slidesPerView', 'spaceBetween', 'slidesPerGroup', 'slidesPerGroupSkip', 'slidesPerColumn'].forEach((param) => {
1818
const paramValue = breakpointOnlyParams[param];
1919
if (typeof paramValue === 'undefined') return;
2020
if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) {

0 commit comments

Comments
 (0)