framework7-vue 7.1.5 → 8.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion-content.js +2 -5
- package/components/accordion-item.js +0 -13
- package/components/accordion-toggle.js +2 -5
- package/components/accordion.js +0 -4
- package/components/actions-button.d.ts +1 -1
- package/components/actions-button.js +2 -9
- package/components/actions-group.js +2 -5
- package/components/actions-label.d.ts +1 -1
- package/components/actions-label.js +2 -8
- package/components/actions.js +2 -14
- package/components/app.d.ts +7 -12
- package/components/app.js +11 -24
- package/components/appbar.js +0 -4
- package/components/area-chart.js +4 -41
- package/components/badge.js +0 -4
- package/components/block-footer.js +2 -5
- package/components/block-header.js +2 -5
- package/components/block-title.js +0 -4
- package/components/block.d.ts +61 -9
- package/components/block.js +52 -17
- package/components/breadcrumbs-collapsed.js +0 -5
- package/components/breadcrumbs-item.js +0 -4
- package/components/breadcrumbs-separator.js +0 -4
- package/components/breadcrumbs.js +0 -4
- package/components/button.d.ts +9 -25
- package/components/button.js +9 -25
- package/components/card-content.js +0 -4
- package/components/card-footer.js +2 -5
- package/components/card-header.js +2 -5
- package/components/card.d.ts +17 -5
- package/components/card.js +10 -20
- package/components/checkbox.js +0 -7
- package/components/chip.d.ts +0 -4
- package/components/chip.js +0 -7
- package/components/col.js +0 -6
- package/components/fab-backdrop.js +2 -5
- package/components/fab-button.js +0 -6
- package/components/fab-buttons.js +0 -4
- package/components/fab.js +0 -9
- package/components/gauge.js +0 -4
- package/components/icon.d.ts +0 -4
- package/components/icon.js +1 -18
- package/components/input.js +0 -56
- package/components/link.d.ts +0 -4
- package/components/link.js +4 -13
- package/components/list-button.js +0 -6
- package/components/list-group.js +0 -4
- package/components/list-index.d.ts +0 -5
- package/components/list-index.js +0 -14
- package/components/list-input.d.ts +0 -4
- package/components/list-input.js +0 -53
- package/components/list-item-cell.js +2 -5
- package/components/list-item-row.js +2 -5
- package/components/list-item.d.ts +4 -4
- package/components/list-item.js +12 -52
- package/components/list.d.ts +71 -23
- package/components/list.js +42 -33
- package/components/login-screen-title.js +2 -5
- package/components/login-screen.js +2 -17
- package/components/menu-dropdown-item.js +0 -6
- package/components/menu-dropdown.js +0 -4
- package/components/menu-item.js +0 -14
- package/components/menu.js +2 -5
- package/components/message.js +0 -16
- package/components/messagebar-attachment.js +0 -7
- package/components/messagebar-attachments.js +2 -5
- package/components/messagebar-sheet-image.js +7 -15
- package/components/messagebar-sheet-item.js +2 -5
- package/components/messagebar-sheet.js +2 -5
- package/components/messagebar.js +0 -16
- package/components/messages-title.js +2 -5
- package/components/messages.js +0 -13
- package/components/nav-left.js +0 -9
- package/components/nav-right.js +0 -4
- package/components/nav-title-large.js +2 -5
- package/components/nav-title.js +0 -4
- package/components/navbar.d.ts +5 -8
- package/components/navbar.js +6 -29
- package/components/page-content.js +0 -16
- package/components/page.d.ts +0 -4
- package/components/page.js +2 -67
- package/components/panel.d.ts +4 -0
- package/components/panel.js +2 -23
- package/components/photo-browser.js +2 -18
- package/components/pie-chart.js +4 -20
- package/components/popover.d.ts +5 -0
- package/components/popover.js +8 -16
- package/components/popup.js +3 -19
- package/components/preloader.js +4 -23
- package/components/progressbar.js +0 -6
- package/components/radio.js +0 -7
- package/components/range.js +0 -7
- package/components/routable-modals.js +0 -7
- package/components/row.js +0 -6
- package/components/searchbar.d.ts +5 -8
- package/components/searchbar.js +7 -28
- package/components/segmented.d.ts +0 -12
- package/components/segmented.js +2 -12
- package/components/sheet.js +2 -18
- package/components/stepper.d.ts +0 -20
- package/components/stepper.js +1 -27
- package/components/subnavbar.js +0 -4
- package/components/swipeout-actions.js +0 -6
- package/components/swipeout-button.js +0 -6
- package/components/tab.js +2 -15
- package/components/tabs.js +0 -4
- package/components/text-editor.js +0 -17
- package/components/toggle.js +0 -9
- package/components/toolbar.d.ts +4 -21
- package/components/toolbar.js +12 -34
- package/components/treeview-item.d.ts +0 -4
- package/components/treeview-item.js +0 -13
- package/components/treeview.js +2 -5
- package/components/use-icon.js +0 -4
- package/components/view.d.ts +0 -28
- package/components/view.js +7 -51
- package/components/views.js +0 -4
- package/framework7-vue-bundle.js +1 -34
- package/framework7-vue-web-types.json +1 -1
- package/framework7-vue.d.ts +2 -14
- package/framework7-vue.js +3 -14
- package/package.json +1 -1
- package/shared/components-router.js +0 -32
- package/shared/f7.js +5 -19
- package/shared/get-router-initial-component.js +0 -4
- package/shared/mixins.js +3 -15
- package/shared/plugin.js +2 -8
- package/shared/router-open-in.js +4 -13
- package/shared/use-icon.js +1 -6
- package/shared/use-smart-select.js +0 -1
- package/shared/use-store.js +2 -6
- package/shared/use-tab.js +0 -2
- package/shared/use-theme.js +0 -2
- package/shared/use-tooltip.js +0 -2
- package/shared/utils.js +0 -14
- package/components/appbar.d.ts +0 -67
- package/components/col.d.ts +0 -94
- package/components/list-item-cell.d.ts +0 -46
- package/components/list-item-row.d.ts +0 -46
- package/components/menu-dropdown-item.d.ts +0 -223
- package/components/menu-dropdown.d.ts +0 -66
- package/components/menu-item.d.ts +0 -267
- package/components/menu.d.ts +0 -46
- package/components/row.d.ts +0 -73
- package/components/swiper-slide.d.ts +0 -5
- package/components/swiper.d.ts +0 -5
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
class: _normalizeClass(_ctx.classes)
|
|
6
5
|
}, [_renderSlot(_ctx.$slots, "default")], 2);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
import { computed } from 'vue';
|
|
10
8
|
import { classNames } from '../shared/utils.js';
|
|
11
9
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
12
10
|
export default {
|
|
13
11
|
name: 'f7-login-screen-title',
|
|
14
12
|
render,
|
|
15
|
-
props: {
|
|
13
|
+
props: {
|
|
14
|
+
...colorProps
|
|
16
15
|
},
|
|
17
|
-
|
|
18
16
|
setup(props) {
|
|
19
17
|
const classes = computed(() => classNames('login-screen-title', colorClasses(props)));
|
|
20
18
|
return {
|
|
21
19
|
classes
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
ref: "elRef",
|
|
6
5
|
class: _normalizeClass(_ctx.classes)
|
|
7
6
|
}, [_renderSlot(_ctx.$slots, "default")], 2);
|
|
8
7
|
}
|
|
9
|
-
|
|
10
8
|
import { computed, ref, watch, onMounted, onBeforeUnmount } from 'vue';
|
|
11
9
|
import { classNames } from '../shared/utils.js';
|
|
12
10
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -28,43 +26,36 @@ export default {
|
|
|
28
26
|
...colorProps
|
|
29
27
|
},
|
|
30
28
|
emits: ['loginscreen:open', 'loginscreen:opened', 'loginscreen:close', 'loginscreen:closed', 'update:opened'],
|
|
31
|
-
|
|
32
29
|
setup(props, _ref) {
|
|
33
30
|
let {
|
|
34
31
|
emit
|
|
35
32
|
} = _ref;
|
|
36
|
-
const f7LoginScreen = ref(null);
|
|
37
|
-
|
|
33
|
+
const f7LoginScreen = ref(null);
|
|
34
|
+
// eslint-disable-next-line
|
|
38
35
|
let isOpened = props.opened;
|
|
39
36
|
let isClosing = false;
|
|
40
37
|
const elRef = ref(null);
|
|
41
|
-
|
|
42
38
|
const onOpen = instance => {
|
|
43
39
|
isOpened = true;
|
|
44
40
|
isClosing = false;
|
|
45
41
|
emit('loginscreen:open', instance);
|
|
46
42
|
emit('update:opened', true);
|
|
47
43
|
};
|
|
48
|
-
|
|
49
44
|
const onOpened = instance => {
|
|
50
45
|
emit('loginscreen:opened', instance);
|
|
51
46
|
};
|
|
52
|
-
|
|
53
47
|
const onClose = instance => {
|
|
54
48
|
isOpened = false;
|
|
55
49
|
isClosing = true;
|
|
56
50
|
emit('loginscreen:close', instance);
|
|
57
51
|
};
|
|
58
|
-
|
|
59
52
|
const onClosed = instance => {
|
|
60
53
|
isClosing = false;
|
|
61
54
|
emit('loginscreen:closed', instance);
|
|
62
55
|
emit('update:opened', false);
|
|
63
56
|
};
|
|
64
|
-
|
|
65
57
|
watch(() => props.opened, value => {
|
|
66
58
|
if (!f7LoginScreen.value) return;
|
|
67
|
-
|
|
68
59
|
if (value) {
|
|
69
60
|
f7LoginScreen.value.open();
|
|
70
61
|
} else {
|
|
@@ -83,17 +74,13 @@ export default {
|
|
|
83
74
|
closed: onClosed
|
|
84
75
|
}
|
|
85
76
|
};
|
|
86
|
-
|
|
87
77
|
if (typeof props.animate !== 'undefined') {
|
|
88
78
|
loginScreenParams.animate = props.animate;
|
|
89
79
|
}
|
|
90
|
-
|
|
91
80
|
if (typeof props.containerEl !== 'undefined') {
|
|
92
81
|
loginScreenParams.containerEl = props.containerEl;
|
|
93
82
|
}
|
|
94
|
-
|
|
95
83
|
f7LoginScreen.value = f7.loginScreen.create(loginScreenParams);
|
|
96
|
-
|
|
97
84
|
if (props.opened) {
|
|
98
85
|
f7LoginScreen.value.open(false);
|
|
99
86
|
}
|
|
@@ -103,7 +90,6 @@ export default {
|
|
|
103
90
|
if (f7LoginScreen.value) {
|
|
104
91
|
f7LoginScreen.value.destroy();
|
|
105
92
|
}
|
|
106
|
-
|
|
107
93
|
f7LoginScreen.value = null;
|
|
108
94
|
});
|
|
109
95
|
const classes = computed(() => classNames('login-screen', modalStateClasses({
|
|
@@ -115,5 +101,4 @@ export default {
|
|
|
115
101
|
classes
|
|
116
102
|
};
|
|
117
103
|
}
|
|
118
|
-
|
|
119
104
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { toDisplayString as _toDisplayString, renderSlot as _renderSlot, createTextVNode as _createTextVNode, mergeProps as _mergeProps, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", _mergeProps({
|
|
5
4
|
ref: "elRef",
|
|
@@ -10,7 +9,6 @@ function render(_ctx, _cache) {
|
|
|
10
9
|
})
|
|
11
10
|
}), [_createTextVNode(_toDisplayString(_ctx.text) + " ", 1), _renderSlot(_ctx.$slots, "default")], 16);
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
import { computed, ref } from 'vue';
|
|
15
13
|
import { classNames } from '../shared/utils.js';
|
|
16
14
|
import { colorClasses, colorProps, routerProps, routerAttrs, routerClasses, actionsProps, actionsAttrs, actionsClasses } from '../shared/mixins.js';
|
|
@@ -29,17 +27,14 @@ export default {
|
|
|
29
27
|
...actionsProps
|
|
30
28
|
},
|
|
31
29
|
emits: ['click'],
|
|
32
|
-
|
|
33
30
|
setup(props, _ref) {
|
|
34
31
|
let {
|
|
35
32
|
emit
|
|
36
33
|
} = _ref;
|
|
37
34
|
const elRef = ref(null);
|
|
38
|
-
|
|
39
35
|
const onClick = e => {
|
|
40
36
|
emit('click', e);
|
|
41
37
|
};
|
|
42
|
-
|
|
43
38
|
useRouteProps(elRef, props);
|
|
44
39
|
const isLink = computed(() => props.link || props.href || props.href === '');
|
|
45
40
|
const tag = computed(() => isLink.value ? 'a' : 'div');
|
|
@@ -70,5 +65,4 @@ export default {
|
|
|
70
65
|
elRef
|
|
71
66
|
};
|
|
72
67
|
}
|
|
73
|
-
|
|
74
68
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
class: _normalizeClass(_ctx.classes)
|
|
@@ -10,7 +9,6 @@ function render(_ctx, _cache) {
|
|
|
10
9
|
})
|
|
11
10
|
}, [_renderSlot(_ctx.$slots, "default")], 4)], 2);
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
import { computed } from 'vue';
|
|
15
13
|
import { classNames } from '../shared/utils.js';
|
|
16
14
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -25,7 +23,6 @@ export default {
|
|
|
25
23
|
right: Boolean,
|
|
26
24
|
...colorProps
|
|
27
25
|
},
|
|
28
|
-
|
|
29
26
|
setup(props) {
|
|
30
27
|
const classes = computed(() => {
|
|
31
28
|
let positionComputed = props.position || 'left';
|
|
@@ -38,5 +35,4 @@ export default {
|
|
|
38
35
|
classes
|
|
39
36
|
};
|
|
40
37
|
}
|
|
41
|
-
|
|
42
38
|
};
|
package/components/menu-item.js
CHANGED
|
@@ -3,10 +3,8 @@ const _hoisted_1 = {
|
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "menu-item-content"
|
|
5
5
|
};
|
|
6
|
-
|
|
7
6
|
function render(_ctx, _cache) {
|
|
8
7
|
const _component_f7_use_icon = _resolveComponent("f7-use-icon");
|
|
9
|
-
|
|
10
8
|
return _openBlock(), _createBlock(_resolveDynamicComponent(_ctx.tag), _mergeProps({
|
|
11
9
|
ref: "elRef",
|
|
12
10
|
class: _ctx.classes
|
|
@@ -20,7 +18,6 @@ function render(_ctx, _cache) {
|
|
|
20
18
|
_: 3
|
|
21
19
|
}, 16, ["class", "onClick"]);
|
|
22
20
|
}
|
|
23
|
-
|
|
24
21
|
import { ref, computed, onMounted, onBeforeUnmount } from 'vue';
|
|
25
22
|
import { classNames } from '../shared/utils.js';
|
|
26
23
|
import { colorClasses, colorProps, routerProps, routerAttrs, routerClasses, actionsProps, actionsClasses, actionsAttrs, iconProps } from '../shared/mixins.js';
|
|
@@ -50,7 +47,6 @@ export default {
|
|
|
50
47
|
...iconProps
|
|
51
48
|
},
|
|
52
49
|
emits: ['click', 'menu:opened', 'menu:closed'],
|
|
53
|
-
|
|
54
50
|
setup(props, _ref) {
|
|
55
51
|
let {
|
|
56
52
|
slots,
|
|
@@ -58,35 +54,28 @@ export default {
|
|
|
58
54
|
} = _ref;
|
|
59
55
|
const elRef = ref(null);
|
|
60
56
|
useTooltip(elRef, props);
|
|
61
|
-
|
|
62
57
|
const onClick = e => {
|
|
63
58
|
emit('click', e);
|
|
64
59
|
};
|
|
65
|
-
|
|
66
60
|
const onOpened = el => {
|
|
67
61
|
if (elRef.value !== el) return;
|
|
68
62
|
emit('menu:opened', el);
|
|
69
63
|
};
|
|
70
|
-
|
|
71
64
|
const onClosed = el => {
|
|
72
65
|
if (elRef.value !== el) return;
|
|
73
66
|
emit('menu:closed', el);
|
|
74
67
|
};
|
|
75
|
-
|
|
76
68
|
useRouteProps(elRef, props);
|
|
77
|
-
|
|
78
69
|
const attachEvents = () => {
|
|
79
70
|
f7ready(() => {
|
|
80
71
|
f7.on('menuOpened', onOpened);
|
|
81
72
|
f7.on('menuClosed', onClosed);
|
|
82
73
|
});
|
|
83
74
|
};
|
|
84
|
-
|
|
85
75
|
const detachEvents = () => {
|
|
86
76
|
f7.off('menuOpened', onOpened);
|
|
87
77
|
f7.off('menuClosed', onOpened);
|
|
88
78
|
};
|
|
89
|
-
|
|
90
79
|
onMounted(() => attachEvents());
|
|
91
80
|
onBeforeUnmount(() => detachEvents());
|
|
92
81
|
const icon = computed(() => useIcon(props));
|
|
@@ -96,13 +85,11 @@ export default {
|
|
|
96
85
|
});
|
|
97
86
|
const classes = computed(() => {
|
|
98
87
|
let iconOnlyComputed;
|
|
99
|
-
|
|
100
88
|
if (props.iconOnly || !props.text && !slots.text) {
|
|
101
89
|
iconOnlyComputed = true;
|
|
102
90
|
} else {
|
|
103
91
|
iconOnlyComputed = false;
|
|
104
92
|
}
|
|
105
|
-
|
|
106
93
|
const isDropdown = props.dropdown || props.dropdown === '';
|
|
107
94
|
return classNames({
|
|
108
95
|
'menu-item': true,
|
|
@@ -129,5 +116,4 @@ export default {
|
|
|
129
116
|
elRef
|
|
130
117
|
};
|
|
131
118
|
}
|
|
132
|
-
|
|
133
119
|
};
|
package/components/menu.js
CHANGED
|
@@ -2,27 +2,24 @@ import { renderSlot as _renderSlot, createElementVNode as _createElementVNode, n
|
|
|
2
2
|
const _hoisted_1 = {
|
|
3
3
|
class: "menu-inner"
|
|
4
4
|
};
|
|
5
|
-
|
|
6
5
|
function render(_ctx, _cache) {
|
|
7
6
|
return _openBlock(), _createElementBlock("div", {
|
|
8
7
|
class: _normalizeClass(_ctx.classes)
|
|
9
8
|
}, [_createElementVNode("div", _hoisted_1, [_renderSlot(_ctx.$slots, "default")])], 2);
|
|
10
9
|
}
|
|
11
|
-
|
|
12
10
|
import { computed } from 'vue';
|
|
13
11
|
import { classNames } from '../shared/utils.js';
|
|
14
12
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
15
13
|
export default {
|
|
16
14
|
name: 'f7-menu',
|
|
17
15
|
render,
|
|
18
|
-
props: {
|
|
16
|
+
props: {
|
|
17
|
+
...colorProps
|
|
19
18
|
},
|
|
20
|
-
|
|
21
19
|
setup(props) {
|
|
22
20
|
const classes = computed(() => classNames('menu', colorClasses(props)));
|
|
23
21
|
return {
|
|
24
22
|
classes
|
|
25
23
|
};
|
|
26
24
|
}
|
|
27
|
-
|
|
28
25
|
};
|
package/components/message.js
CHANGED
|
@@ -15,19 +15,14 @@ const _hoisted_5 = {
|
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "message-typing-indicator"
|
|
17
17
|
};
|
|
18
|
-
|
|
19
18
|
const _hoisted_6 = /*#__PURE__*/_createElementVNode("div", null, null, -1);
|
|
20
|
-
|
|
21
19
|
const _hoisted_7 = /*#__PURE__*/_createElementVNode("div", null, null, -1);
|
|
22
|
-
|
|
23
20
|
const _hoisted_8 = /*#__PURE__*/_createElementVNode("div", null, null, -1);
|
|
24
|
-
|
|
25
21
|
const _hoisted_9 = [_hoisted_6, _hoisted_7, _hoisted_8];
|
|
26
22
|
const _hoisted_10 = {
|
|
27
23
|
key: 3,
|
|
28
24
|
class: "message-text-footer"
|
|
29
25
|
};
|
|
30
|
-
|
|
31
26
|
function render(_ctx, _cache) {
|
|
32
27
|
return _openBlock(), _createElementBlock("div", {
|
|
33
28
|
class: _normalizeClass(_ctx.classes),
|
|
@@ -76,7 +71,6 @@ function render(_ctx, _cache) {
|
|
|
76
71
|
})
|
|
77
72
|
}, [_createTextVNode(_toDisplayString(_ctx.footer) + " ", 1), _renderSlot(_ctx.$slots, "footer")])) : _createCommentVNode("", true), _renderSlot(_ctx.$slots, "content-end")]), _renderSlot(_ctx.$slots, "end")], 2);
|
|
78
73
|
}
|
|
79
|
-
|
|
80
74
|
import { computed } from 'vue';
|
|
81
75
|
import { classNames } from '../shared/utils.js';
|
|
82
76
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -107,41 +101,32 @@ export default {
|
|
|
107
101
|
...colorProps
|
|
108
102
|
},
|
|
109
103
|
emits: ['click', 'click:name', 'click:text', 'click:avatar', 'click:header', 'click:footer', 'click:bubble'],
|
|
110
|
-
|
|
111
104
|
setup(props, _ref) {
|
|
112
105
|
let {
|
|
113
106
|
emit,
|
|
114
107
|
slots
|
|
115
108
|
} = _ref;
|
|
116
|
-
|
|
117
109
|
const onClick = event => {
|
|
118
110
|
emit('click', event);
|
|
119
111
|
};
|
|
120
|
-
|
|
121
112
|
const onNameClick = event => {
|
|
122
113
|
emit('click:name', event);
|
|
123
114
|
};
|
|
124
|
-
|
|
125
115
|
const onTextClick = event => {
|
|
126
116
|
emit('click:text', event);
|
|
127
117
|
};
|
|
128
|
-
|
|
129
118
|
const onAvatarClick = event => {
|
|
130
119
|
emit('click:avatar', event);
|
|
131
120
|
};
|
|
132
|
-
|
|
133
121
|
const onHeaderClick = event => {
|
|
134
122
|
emit('click:header', event);
|
|
135
123
|
};
|
|
136
|
-
|
|
137
124
|
const onFooterClick = event => {
|
|
138
125
|
emit('click:footer', event);
|
|
139
126
|
};
|
|
140
|
-
|
|
141
127
|
const onBubbleClick = event => {
|
|
142
128
|
emit('click:bubble', event);
|
|
143
129
|
};
|
|
144
|
-
|
|
145
130
|
const classes = computed(() => classNames('message', {
|
|
146
131
|
'message-sent': props.type === 'sent',
|
|
147
132
|
'message-received': props.type === 'received',
|
|
@@ -181,5 +166,4 @@ export default {
|
|
|
181
166
|
hasFooter
|
|
182
167
|
};
|
|
183
168
|
}
|
|
184
|
-
|
|
185
169
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass } from "vue";
|
|
2
2
|
const _hoisted_1 = ["src"];
|
|
3
|
-
|
|
4
3
|
function render(_ctx, _cache) {
|
|
5
4
|
return _openBlock(), _createElementBlock("div", {
|
|
6
5
|
class: _normalizeClass(_ctx.classes),
|
|
@@ -18,7 +17,6 @@ function render(_ctx, _cache) {
|
|
|
18
17
|
})
|
|
19
18
|
})) : _createCommentVNode("", true), _renderSlot(_ctx.$slots, "default")], 2);
|
|
20
19
|
}
|
|
21
|
-
|
|
22
20
|
import { computed } from 'vue';
|
|
23
21
|
import { classNames } from '../shared/utils.js';
|
|
24
22
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -34,20 +32,16 @@ export default {
|
|
|
34
32
|
...colorProps
|
|
35
33
|
},
|
|
36
34
|
emits: ['attachment:click', 'attachment:delete'],
|
|
37
|
-
|
|
38
35
|
setup(props, _ref) {
|
|
39
36
|
let {
|
|
40
37
|
emit
|
|
41
38
|
} = _ref;
|
|
42
|
-
|
|
43
39
|
const onClick = event => {
|
|
44
40
|
emit('attachment:click', event);
|
|
45
41
|
};
|
|
46
|
-
|
|
47
42
|
const onDeleteClick = event => {
|
|
48
43
|
emit('attachment:delete', event);
|
|
49
44
|
};
|
|
50
|
-
|
|
51
45
|
const classes = computed(() => classNames('messagebar-attachment', colorClasses(props)));
|
|
52
46
|
return {
|
|
53
47
|
classes,
|
|
@@ -55,5 +49,4 @@ export default {
|
|
|
55
49
|
onDeleteClick
|
|
56
50
|
};
|
|
57
51
|
}
|
|
58
|
-
|
|
59
52
|
};
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
class: _normalizeClass(_ctx.classes)
|
|
6
5
|
}, [_renderSlot(_ctx.$slots, "default")], 2);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
import { computed } from 'vue';
|
|
10
8
|
import { classNames } from '../shared/utils.js';
|
|
11
9
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
12
10
|
export default {
|
|
13
11
|
name: 'f7-messagebar-attachments',
|
|
14
12
|
render,
|
|
15
|
-
props: {
|
|
13
|
+
props: {
|
|
14
|
+
...colorProps
|
|
16
15
|
},
|
|
17
|
-
|
|
18
16
|
setup(props) {
|
|
19
17
|
const classes = computed(() => classNames('messagebar-attachments', colorClasses(props)));
|
|
20
18
|
return {
|
|
21
19
|
classes
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { createElementVNode as _createElementVNode,
|
|
1
|
+
import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass } from "vue";
|
|
2
2
|
const _hoisted_1 = ["checked"];
|
|
3
|
-
|
|
4
3
|
const _hoisted_2 = /*#__PURE__*/_createElementVNode("i", {
|
|
5
4
|
class: "icon icon-checkbox"
|
|
6
5
|
}, null, -1);
|
|
7
|
-
|
|
6
|
+
const _hoisted_3 = ["src"];
|
|
8
7
|
function render(_ctx, _cache) {
|
|
9
8
|
return _openBlock(), _createElementBlock("label", {
|
|
10
|
-
class: _normalizeClass(_ctx.classes)
|
|
11
|
-
style: _normalizeStyle(_ctx.styles)
|
|
9
|
+
class: _normalizeClass(_ctx.classes)
|
|
12
10
|
}, [_createElementVNode("input", {
|
|
13
11
|
type: "checkbox",
|
|
14
12
|
checked: _ctx.checked,
|
|
15
13
|
onChange: _cache[0] || (_cache[0] = function () {
|
|
16
14
|
return _ctx.onChange && _ctx.onChange(...arguments);
|
|
17
15
|
})
|
|
18
|
-
}, null, 40, _hoisted_1), _hoisted_2,
|
|
16
|
+
}, null, 40, _hoisted_1), _hoisted_2, _ctx.image ? (_openBlock(), _createElementBlock("img", {
|
|
17
|
+
key: 0,
|
|
18
|
+
src: _ctx.image
|
|
19
|
+
}, null, 8, _hoisted_3)) : _createCommentVNode("", true), _renderSlot(_ctx.$slots, "default")], 2);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
21
|
import { computed } from 'vue';
|
|
22
22
|
import { classNames } from '../shared/utils.js';
|
|
23
23
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
@@ -30,27 +30,19 @@ export default {
|
|
|
30
30
|
...colorProps
|
|
31
31
|
},
|
|
32
32
|
emits: ['checked', 'unchecked', 'change', 'update:checked'],
|
|
33
|
-
|
|
34
33
|
setup(props, _ref) {
|
|
35
34
|
let {
|
|
36
35
|
emit
|
|
37
36
|
} = _ref;
|
|
38
|
-
|
|
39
37
|
const onChange = event => {
|
|
40
38
|
if (event.target.checked) emit('checked', event);else emit('unchecked', event);
|
|
41
39
|
emit('update:checked', event.target.checked);
|
|
42
40
|
emit('change', event);
|
|
43
41
|
};
|
|
44
|
-
|
|
45
42
|
const classes = computed(() => classNames('messagebar-sheet-image', 'checkbox', colorClasses(props)));
|
|
46
|
-
const styles = computed(() => ({
|
|
47
|
-
backgroundImage: props.image && `url(${props.image})`
|
|
48
|
-
}));
|
|
49
43
|
return {
|
|
50
44
|
classes,
|
|
51
|
-
styles,
|
|
52
45
|
onChange
|
|
53
46
|
};
|
|
54
47
|
}
|
|
55
|
-
|
|
56
48
|
};
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
class: _normalizeClass(_ctx.classes)
|
|
6
5
|
}, [_renderSlot(_ctx.$slots, "default")], 2);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
import { computed } from 'vue';
|
|
10
8
|
import { classNames } from '../shared/utils.js';
|
|
11
9
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
12
10
|
export default {
|
|
13
11
|
name: 'f7-messagebar-sheet-item',
|
|
14
12
|
render,
|
|
15
|
-
props: {
|
|
13
|
+
props: {
|
|
14
|
+
...colorProps
|
|
16
15
|
},
|
|
17
|
-
|
|
18
16
|
setup(props) {
|
|
19
17
|
const classes = computed(() => classNames('messagebar-sheet-item', colorClasses(props)));
|
|
20
18
|
return {
|
|
21
19
|
classes
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
};
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
class: _normalizeClass(_ctx.classes)
|
|
6
5
|
}, [_renderSlot(_ctx.$slots, "default")], 2);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
import { computed } from 'vue';
|
|
10
8
|
import { classNames } from '../shared/utils.js';
|
|
11
9
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
12
10
|
export default {
|
|
13
11
|
name: 'f7-messagebar-sheet',
|
|
14
12
|
render,
|
|
15
|
-
props: {
|
|
13
|
+
props: {
|
|
14
|
+
...colorProps
|
|
16
15
|
},
|
|
17
|
-
|
|
18
16
|
setup(props) {
|
|
19
17
|
const classes = computed(() => classNames('messagebar-sheet', colorClasses(props)));
|
|
20
18
|
return {
|
|
21
19
|
classes
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
};
|
package/components/messagebar.js
CHANGED
|
@@ -44,7 +44,6 @@ export default {
|
|
|
44
44
|
...colorProps
|
|
45
45
|
},
|
|
46
46
|
emits: ['change', 'input', 'focus', 'blur', 'submit', 'send', 'click', 'messagebar:attachmentdelete', 'messagebar:attachmentclick', 'messagebar:resizepage', 'update:value'],
|
|
47
|
-
|
|
48
47
|
setup(props, _ref) {
|
|
49
48
|
let {
|
|
50
49
|
emit,
|
|
@@ -55,24 +54,19 @@ export default {
|
|
|
55
54
|
let f7Messagebar = null;
|
|
56
55
|
let updateSheetVisible = false;
|
|
57
56
|
let updateAttachmentsVisible = false;
|
|
58
|
-
|
|
59
57
|
const onChange = event => {
|
|
60
58
|
emit('change', event);
|
|
61
59
|
};
|
|
62
|
-
|
|
63
60
|
const onInput = event => {
|
|
64
61
|
emit('input', event);
|
|
65
62
|
emit('update:value', event.target.value);
|
|
66
63
|
};
|
|
67
|
-
|
|
68
64
|
const onFocus = event => {
|
|
69
65
|
emit('focus', event);
|
|
70
66
|
};
|
|
71
|
-
|
|
72
67
|
const onBlur = event => {
|
|
73
68
|
emit('blur', event);
|
|
74
69
|
};
|
|
75
|
-
|
|
76
70
|
const onClick = event => {
|
|
77
71
|
const inputValue = areaElRef.value.$el;
|
|
78
72
|
const clear = f7Messagebar ? () => {
|
|
@@ -82,19 +76,15 @@ export default {
|
|
|
82
76
|
emit('send', inputValue, clear);
|
|
83
77
|
emit('click', event);
|
|
84
78
|
};
|
|
85
|
-
|
|
86
79
|
const onAttachmentDelete = (instance, attachmentEl, attachmentElIndex) => {
|
|
87
80
|
emit('messagebar:attachmentdelete', instance, attachmentEl, attachmentElIndex);
|
|
88
81
|
};
|
|
89
|
-
|
|
90
82
|
const onAttachmentClick = (instance, attachmentEl, attachmentElIndex) => {
|
|
91
83
|
emit('messagebar:attachmentclick', instance, attachmentEl, attachmentElIndex);
|
|
92
84
|
};
|
|
93
|
-
|
|
94
85
|
const onResizePage = instance => {
|
|
95
86
|
emit('messagebar:resizepage', instance);
|
|
96
87
|
};
|
|
97
|
-
|
|
98
88
|
watch(() => props.sheetVisible, () => {
|
|
99
89
|
if (!props.resizable || !f7Messagebar) return;
|
|
100
90
|
updateSheetVisible = true;
|
|
@@ -125,13 +115,11 @@ export default {
|
|
|
125
115
|
});
|
|
126
116
|
onUpdated(() => {
|
|
127
117
|
if (!f7Messagebar) return;
|
|
128
|
-
|
|
129
118
|
if (updateSheetVisible) {
|
|
130
119
|
updateSheetVisible = false;
|
|
131
120
|
f7Messagebar.sheetVisible = props.sheetVisible;
|
|
132
121
|
f7Messagebar.resizePage();
|
|
133
122
|
}
|
|
134
|
-
|
|
135
123
|
if (updateAttachmentsVisible) {
|
|
136
124
|
updateAttachmentsVisible = false;
|
|
137
125
|
f7Messagebar.attachmentsVisible = props.attachmentsVisible;
|
|
@@ -162,12 +150,10 @@ export default {
|
|
|
162
150
|
const innerEndEls = [];
|
|
163
151
|
let messagebarAttachmentsEl;
|
|
164
152
|
let messagebarSheetEl;
|
|
165
|
-
|
|
166
153
|
if (slotsDefault) {
|
|
167
154
|
slotsDefault().forEach(vnode => {
|
|
168
155
|
if (typeof vnode === 'undefined') return;
|
|
169
156
|
const tag = vnode.type && vnode.type.name ? vnode.type.name : vnode.type;
|
|
170
|
-
|
|
171
157
|
if (tag && (tag.indexOf('messagebar-attachments') >= 0 || tag === 'F7MessagebarAttachments' || tag === 'f7-messagebar-attachments')) {
|
|
172
158
|
messagebarAttachmentsEl = vnode;
|
|
173
159
|
} else if (tag && (tag.indexOf('messagebar-sheet') >= 0 || tag === 'F7MessagebarSheet' || tag === 'f7-messagebar-sheet')) {
|
|
@@ -177,7 +163,6 @@ export default {
|
|
|
177
163
|
}
|
|
178
164
|
});
|
|
179
165
|
}
|
|
180
|
-
|
|
181
166
|
return h('div', {
|
|
182
167
|
class: classes.value,
|
|
183
168
|
ref: elRef
|
|
@@ -205,5 +190,4 @@ export default {
|
|
|
205
190
|
}, [slotsSendLink ? slotsSendLink() : props.sendLink]), slotsInnerEnd && slotsInnerEnd(), innerEndEls]), slotsAfterInner && slotsAfterInner(), messagebarSheetEl]);
|
|
206
191
|
};
|
|
207
192
|
}
|
|
208
|
-
|
|
209
193
|
};
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
-
|
|
3
2
|
function render(_ctx, _cache) {
|
|
4
3
|
return _openBlock(), _createElementBlock("div", {
|
|
5
4
|
class: _normalizeClass(_ctx.classes)
|
|
6
5
|
}, [_renderSlot(_ctx.$slots, "default")], 2);
|
|
7
6
|
}
|
|
8
|
-
|
|
9
7
|
import { computed } from 'vue';
|
|
10
8
|
import { classNames } from '../shared/utils.js';
|
|
11
9
|
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
12
10
|
export default {
|
|
13
11
|
name: 'f7-messages-title',
|
|
14
12
|
render,
|
|
15
|
-
props: {
|
|
13
|
+
props: {
|
|
14
|
+
...colorProps
|
|
16
15
|
},
|
|
17
|
-
|
|
18
16
|
setup(props) {
|
|
19
17
|
const classes = computed(() => classNames('messages-title', colorClasses(props)));
|
|
20
18
|
return {
|
|
21
19
|
classes
|
|
22
20
|
};
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
};
|