Skip to content

Commit

Permalink
3.6.6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Feb 5, 2019
1 parent 8d03854 commit 58c6f45
Show file tree
Hide file tree
Showing 54 changed files with 490 additions and 347 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,18 @@

# Change Log

# [v3.6.6](https://github.com/framework7io/framework7/compare/v3.6.5...v3.6.6) - February 5, 2019
* Core
* App `data` and `methods` now available before app initialization. Useful when you delay app initialization (like on `deviceready` event in Cordova app) and need to access data before
* Pull To Refresh
* Support for `ptr-watch-scroll` that should be added on scollable elements inside of `ptr-content`, so pull to refresh won't trigger during their scrolling
* Panel
* Fixed issue when panel backdrop not removed for routable panel
* Template7 update to latest 1.4.1:
* Relaxed `escape` helper to escape only `<>&"'` characters
* Improved variables parsing in `js` and `js_if` helpers
* Minor fixes

# [v3.6.5](https://github.com/framework7io/framework7/compare/v3.6.3...v3.6.5) - January 4, 2019
* Core
* Router
Expand Down
6 changes: 3 additions & 3 deletions 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 package.json
Expand Up @@ -52,7 +52,7 @@
"dom7": "^2.1.2",
"path-to-regexp": "^3.0.0",
"ssr-window": "^1.0.1",
"template7": "^1.4.0"
"template7": "^1.4.1"
},
"devDependencies": {
"@babel/core": "^7.2.0",
Expand Down
38 changes: 23 additions & 15 deletions packages/core/components/app/app-class.js
Expand Up @@ -75,6 +75,9 @@ class Framework7 extends Framework7Class {
// Install Modules
app.useModules();

// Init Data & Methods
app.initData();

// Init
if (app.params.init) {
if (Device.cordova && app.params.initOnDeviceReady) {
Expand All @@ -89,22 +92,8 @@ class Framework7 extends Framework7Class {
return app;
}

init() {
initData() {
const app = this;
if (app.initialized) return app;

app.root.addClass('framework7-initializing');

// RTL attr
if (app.rtl) {
$('html').attr('dir', 'rtl');
}

// Root class
app.root.addClass('framework7-root');

// Theme class
$('html').removeClass('ios md').addClass(app.theme);

// Data
app.data = {};
Expand All @@ -124,6 +113,25 @@ class Framework7 extends Framework7Class {
}
});
}
}

init() {
const app = this;
if (app.initialized) return app;

app.root.addClass('framework7-initializing');

// RTL attr
if (app.rtl) {
$('html').attr('dir', 'rtl');
}

// Root class
app.root.addClass('framework7-root');

// Theme class
$('html').removeClass('ios md').addClass(app.theme);

// Init class
Utils.nextFrame(() => {
app.root.removeClass('framework7-initializing');
Expand Down
2 changes: 1 addition & 1 deletion packages/core/components/app/app-ios.less
@@ -1,7 +1,7 @@
.ios {
@import (multiple) '../../less/colors-ios.less';
body {
font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif;
font-family: -apple-system, SF Pro Text, SF UI Text, system-ui, Helvetica Neue, Helvetica, Arial, sans-serif;
color: #000;
line-height: 1.4;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/components/app/app-md.less
@@ -1,7 +1,7 @@
.md {
@import (multiple) '../../less/colors-md.less';
body {
font-family: Roboto, Noto, Helvetica, Arial, sans-serif;
font-family: Roboto, system-ui, Noto, Helvetica, Arial, sans-serif;
color: #212121;
line-height: 1.5;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/core/components/autocomplete/autocomplete.d.ts
Expand Up @@ -50,7 +50,7 @@ export namespace Autocomplete {
/** Defines how to open Autocomplete, can be page or popup (for Standalone) or dropdown. (default page) */
openIn?: string
/** Function which accepts search query and render function where you need to pass array with matched items. */
source: (query : string, render : unknown[]) => unknown
source: (query: string, render: (items: any[]) => void) => void
/** Limit number of maximum displayed items in autocomplete per query. */
limit?: number
/** Set to true to include Preloader to autocomplete layout. (default false) */
Expand Down Expand Up @@ -133,7 +133,7 @@ export namespace Autocomplete {

interface Events {
/** Event will be triggered when Autocomplete value changed. Returned value is an array with selected items */
change : (autocomplete : Autocomplete, value : unknown) => void
change : (values : any[]) => void
/** Event will be triggered when Autocomplete starts its opening animation. As an argument event handler receives autocomplete instance */
open : (autocomplete : Autocomplete) => void
/** Event will be triggered after Autocomplete completes its opening animation. As an argument event handler receives autocomplete instance */
Expand Down Expand Up @@ -181,4 +181,4 @@ export namespace Autocomplete {
}
declare const AutcompleteComponent: Framework7Plugin;

export default AutcompleteComponent;
export default AutcompleteComponent;
4 changes: 3 additions & 1 deletion packages/core/components/dialog/dialog.d.ts
Expand Up @@ -178,6 +178,8 @@ export namespace Dialog {
destroyPredefinedDialogs?: boolean
/** Enables keyboard shortcuts (Enter and Esc) keys for predefined dialogs (Alert, Confirm, Prompt, Login, Password) "Ok" and "Cancel" buttons. (default true) */
keyboardActions?: boolean
/** When enabled, dialog will be closed on backdrop click. (default true) */
closeByBackdropClick?: boolean
} | undefined
}
interface AppEvents {
Expand All @@ -195,4 +197,4 @@ export namespace Dialog {
}
declare const DialogComponent: Framework7Plugin;

export default DialogComponent;
export default DialogComponent;
16 changes: 14 additions & 2 deletions packages/core/components/panel/panel-class.js
Expand Up @@ -177,7 +177,7 @@ class Panel extends Framework7Class {
const $panelParentEl = $el.parent();
const wasInDom = $el.parents(document).length > 0;

if (!$panelParentEl.is(app.root)) {
if (!$panelParentEl.is(app.root) || $el.prevAll('.views, .view').length) {
const $insertBeforeEl = app.root.children('.panel, .views, .view').eq(0);
const $insertAfterEl = app.root.children('.statusbar').eq(0);

Expand All @@ -189,7 +189,19 @@ class Panel extends Framework7Class {
app.root.prepend($el);
}

if ($backdropEl && $backdropEl.length && !$backdropEl.parent().is(app.root) && $backdropEl.nextAll('.panel').length === 0) {
if ($backdropEl
&& $backdropEl.length
&& (
(
!$backdropEl.parent().is(app.root)
&& $backdropEl.nextAll('.panel').length === 0
)
|| (
$backdropEl.parent().is(app.root)
&& $backdropEl.nextAll('.panel').length === 0
)
)
) {
$backdropEl.insertBefore($el);
}

Expand Down
30 changes: 18 additions & 12 deletions packages/core/components/pull-to-refresh/pull-to-refresh-class.js
Expand Up @@ -128,19 +128,25 @@ class PullToRefresh extends Framework7Class {

if (!isMoved) {
$el.removeClass('ptr-transitioning');
let targetIsEl;
let targetIsScrollable;
$(e.target).parents().each((index, targetEl) => {
if (targetEl === el) {
targetIsEl = true;
}
if (targetIsEl) return;
if (targetEl.scrollHeight > targetEl.offsetHeight) {
targetIsScrollable = true;
}
});

if (targetIsScrollable || scrollTop > $el[0].offsetHeight) {
if (scrollTop > $el[0].offsetHeight) {
isTouched = false;
return;
}
const $ptrWatchScrollable = $(e.target).closest('.ptr-watch-scroll');
if ($ptrWatchScrollable.length) {
$ptrWatchScrollable.each((ptrScrollableIndex, ptrScrollableEl) => {
if (ptrScrollableEl === el) return;
if (
(ptrScrollableEl.scrollHeight > ptrScrollableEl.offsetHeight)
&& $(ptrScrollableEl).css('overflow') === 'auto'
&& ptrScrollableEl.scrollTop > 0
) {
targetIsScrollable = true;
}
});
}
if (targetIsScrollable) {
isTouched = false;
return;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/core/components/tooltip/tooltip.d.ts
Expand Up @@ -59,7 +59,7 @@ export namespace Tooltip {
destroy(): void
}
interface AppMethods {
tootlip: {
tooltip: {
/** create Tooltip instance */
create(parameters: Parameters): Tooltip
/** destroy Tooltip instance */
Expand Down Expand Up @@ -88,4 +88,4 @@ export namespace Tooltip {
}

declare const TooltipComponent: Framework7Plugin;
export default TooltipComponent;
export default TooltipComponent;
8 changes: 4 additions & 4 deletions packages/core/css/framework7-lazy.css
@@ -1,13 +1,13 @@
/**
* Framework7 3.6.5
* Framework7 3.6.6
* Full featured mobile HTML framework for building iOS & Android apps
* http://framework7.io/
*
* Copyright 2014-2019 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: January 4, 2019
* Released on: February 5, 2019
*/
html,
body,
Expand Down Expand Up @@ -80,7 +80,7 @@ p {
pointer-events: none !important;
}
.ios body {
font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif;
font-family: -apple-system, SF Pro Text, SF UI Text, system-ui, Helvetica Neue, Helvetica, Arial, sans-serif;
color: #000;
line-height: 1.4;
}
Expand Down Expand Up @@ -163,7 +163,7 @@ p {
color: #000000;
}
.md body {
font-family: Roboto, Noto, Helvetica, Arial, sans-serif;
font-family: Roboto, system-ui, Noto, Helvetica, Arial, sans-serif;
color: #212121;
line-height: 1.5;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/core/css/framework7-lazy.min.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/core/css/framework7-lazy.rtl.css
@@ -1,13 +1,13 @@
/**
* Framework7 3.6.5
* Framework7 3.6.6
* Full featured mobile HTML framework for building iOS & Android apps
* http://framework7.io/
*
* Copyright 2014-2019 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: January 4, 2019
* Released on: February 5, 2019
*/
html {
direction: rtl;
Expand Down Expand Up @@ -83,7 +83,7 @@ p {
pointer-events: none !important;
}
.ios body {
font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif;
font-family: -apple-system, SF Pro Text, SF UI Text, system-ui, Helvetica Neue, Helvetica, Arial, sans-serif;
color: #000;
line-height: 1.4;
}
Expand Down Expand Up @@ -166,7 +166,7 @@ p {
color: #000000;
}
.md body {
font-family: Roboto, Noto, Helvetica, Arial, sans-serif;
font-family: Roboto, system-ui, Noto, Helvetica, Arial, sans-serif;
color: #212121;
line-height: 1.5;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/core/css/framework7-lazy.rtl.min.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/core/css/framework7.css
@@ -1,13 +1,13 @@
/**
* Framework7 3.6.5
* Framework7 3.6.6
* Full featured mobile HTML framework for building iOS & Android apps
* http://framework7.io/
*
* Copyright 2014-2019 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: January 4, 2019
* Released on: February 5, 2019
*/
html,
body,
Expand Down Expand Up @@ -80,7 +80,7 @@ p {
pointer-events: none !important;
}
.ios body {
font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif;
font-family: -apple-system, SF Pro Text, SF UI Text, system-ui, Helvetica Neue, Helvetica, Arial, sans-serif;
color: #000;
line-height: 1.4;
}
Expand Down Expand Up @@ -163,7 +163,7 @@ p {
color: #000000;
}
.md body {
font-family: Roboto, Noto, Helvetica, Arial, sans-serif;
font-family: Roboto, system-ui, Noto, Helvetica, Arial, sans-serif;
color: #212121;
line-height: 1.5;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/core/css/framework7.ios.css
@@ -1,13 +1,13 @@
/**
* Framework7 3.6.5
* Framework7 3.6.6
* Full featured mobile HTML framework for building iOS & Android apps
* http://framework7.io/
*
* Copyright 2014-2019 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: January 4, 2019
* Released on: February 5, 2019
*/
html,
body,
Expand Down Expand Up @@ -80,7 +80,7 @@ p {
pointer-events: none !important;
}
.ios body {
font-family: -apple-system, SF UI Text, Helvetica Neue, Helvetica, Arial, sans-serif;
font-family: -apple-system, SF Pro Text, SF UI Text, system-ui, Helvetica Neue, Helvetica, Arial, sans-serif;
color: #000;
line-height: 1.4;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/core/css/framework7.ios.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/core/css/framework7.md.css
@@ -1,13 +1,13 @@
/**
* Framework7 3.6.5
* Framework7 3.6.6
* Full featured mobile HTML framework for building iOS & Android apps
* http://framework7.io/
*
* Copyright 2014-2019 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: January 4, 2019
* Released on: February 5, 2019
*/
html,
body,
Expand Down Expand Up @@ -80,7 +80,7 @@ p {
pointer-events: none !important;
}
.md body {
font-family: Roboto, Noto, Helvetica, Arial, sans-serif;
font-family: Roboto, system-ui, Noto, Helvetica, Arial, sans-serif;
color: #212121;
line-height: 1.5;
}
Expand Down

0 comments on commit 58c6f45

Please sign in to comment.