Skip to content

Commit 39a7deb

Browse files
committed
3.6.3 release
1 parent 0c2b6b7 commit 39a7deb

File tree

84 files changed

+1033
-583
lines changed

Some content is hidden

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

84 files changed

+1033
-583
lines changed

CHANGELOG.md

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

33
# Change Log
44

5+
# [v3.6.3](https://github.com/framework7io/framework7/compare/v3.6.2...v3.6.3) - December 27, 2018
6+
* Core
7+
* Range
8+
* New `formatLabel` parameter that allows to pass function and return formatted value for range knob label
9+
* Tabs
10+
* Fixes issue when routable swipeable tabs don't emit `tab:show` events
11+
* Dialog
12+
* Now it is possible to specify default value for Prompt dialog by adding it as last parameter to `app.dialog.prompt()` method
13+
* Phenome
14+
* New `routeProps` prop for Link, Button, ListItem, ListButton components that allows to pass props directly to target route component. For example, `<f7-link :props="{foo: 'bar'}">`
15+
* New `formatLabel` prop for Range component that allows to pass function and return formatted value for range knob label
16+
* Lost of minor fixes
17+
518
# [v3.6.2](https://github.com/framework7io/framework7/compare/v3.6.1...v3.6.2) - December 11, 2018
619
* Core
720
* View

package-lock.json

Lines changed: 13 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/components/dialog/dialog.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,15 @@ export default {
5454
}).open();
5555
},
5656
prompt(...args) {
57-
let [text, title, callbackOk, callbackCancel] = args;
57+
let [text, title, callbackOk, callbackCancel, defaultValue] = args;
5858
if (typeof args[1] === 'function') {
59-
[text, callbackOk, callbackCancel, title] = args;
59+
[text, callbackOk, callbackCancel, defaultValue, title] = args;
6060
}
61+
defaultValue = typeof defaultValue === 'undefined' ? '' : defaultValue;
6162
return new Dialog(app, {
6263
title: typeof title === 'undefined' ? defaultDialogTitle() : title,
6364
text,
64-
content: '<div class="dialog-input-field item-input"><div class="item-input-wrap"><input type="text" class="dialog-input"></div></div>',
65+
content: `<div class="dialog-input-field item-input"><div class="item-input-wrap"><input type="text" value="${defaultValue}" class="dialog-input"></div></div>`,
6566
buttons: [
6667
{
6768
text: app.params.dialog.buttonCancel,

packages/core/components/popover/popover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
params: {
99
popover: {
1010
closeByBackdropClick: true,
11-
closeByOutsideClick: false,
11+
closeByOutsideClick: true,
1212
backdrop: true,
1313
},
1414
},

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class Range extends Framework7Class {
88
super(params, [app]);
99

1010
const range = this;
11+
1112
const defaults = {
1213
el: null,
1314
inputEl: null,
@@ -18,6 +19,7 @@ class Range extends Framework7Class {
1819
max: 100,
1920
value: 0,
2021
draggableBar: true,
22+
formatLabel: null,
2123
};
2224

2325
// Extend defaults with modules params
@@ -355,7 +357,7 @@ class Range extends Framework7Class {
355357
if (realLeft < 0) leftPos = knobWidth / 2;
356358
if ((realLeft + knobWidth) > rangeWidth) leftPos = rangeWidth - (knobWidth / 2);
357359
$knobEl.css(positionProperty, `${leftPos}px`);
358-
if (label) labels[knobIndex].text(value[knobIndex]);
360+
if (label) labels[knobIndex].text(range.formatLabel(value[knobIndex], labels[knobIndex][0]));
359361
});
360362
} else {
361363
const progress = ((value - min) / (max - min));
@@ -366,7 +368,7 @@ class Range extends Framework7Class {
366368
if (realLeft < 0) leftPos = knobWidth / 2;
367369
if ((realLeft + knobWidth) > rangeWidth) leftPos = rangeWidth - (knobWidth / 2);
368370
knobs[0].css(positionProperty, `${leftPos}px`);
369-
if (label) labels[0].text(value);
371+
if (label) labels[0].text(range.formatLabel(value, labels[0][0]));
370372
}
371373
if ((range.dual && value.indexOf(min) >= 0) || (!range.dual && value === min)) {
372374
range.$el.addClass('range-slider-min');
@@ -435,6 +437,12 @@ class Range extends Framework7Class {
435437
return this.value;
436438
}
437439

440+
formatLabel(value, labelEl) {
441+
const range = this;
442+
if (range.params.formatLabel) return range.params.formatLabel.call(range, value, labelEl);
443+
return value;
444+
}
445+
438446
init() {
439447
const range = this;
440448
range.calcSize();
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default function () {
22
const swiper = this;
33
const { $wrapperEl, params, slides } = swiper;
4-
$wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
4+
$wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove();
55
slides.removeAttr('data-swiper-slide-index');
66
}

0 commit comments

Comments
 (0)