@xenknight/framework7-vue 0.0.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/LICENSE +20 -0
- package/README.md +33 -0
- package/components/accordion-content.d.ts +46 -0
- package/components/accordion-content.js +22 -0
- package/components/accordion-item.d.ts +51 -0
- package/components/accordion-item.js +77 -0
- package/components/accordion-toggle.d.ts +46 -0
- package/components/accordion-toggle.js +22 -0
- package/components/accordion.d.ts +50 -0
- package/components/accordion.js +23 -0
- package/components/actions-button.d.ts +56 -0
- package/components/actions-button.js +58 -0
- package/components/actions-group.d.ts +46 -0
- package/components/actions-group.js +22 -0
- package/components/actions-label.d.ts +51 -0
- package/components/actions-label.js +36 -0
- package/components/actions.d.ts +109 -0
- package/components/actions.js +157 -0
- package/components/app.d.ts +310 -0
- package/components/app.js +267 -0
- package/components/area-chart.d.ts +88 -0
- package/components/area-chart.js +364 -0
- package/components/badge.d.ts +54 -0
- package/components/badge.js +29 -0
- package/components/block-footer.d.ts +46 -0
- package/components/block-footer.js +22 -0
- package/components/block-header.d.ts +46 -0
- package/components/block-header.js +22 -0
- package/components/block-title.d.ts +54 -0
- package/components/block-title.js +35 -0
- package/components/block.d.ts +163 -0
- package/components/block.js +123 -0
- package/components/breadcrumbs-collapsed.d.ts +19 -0
- package/components/breadcrumbs-collapsed.js +21 -0
- package/components/breadcrumbs-item.d.ts +22 -0
- package/components/breadcrumbs-item.js +24 -0
- package/components/breadcrumbs-separator.d.ts +19 -0
- package/components/breadcrumbs-separator.js +20 -0
- package/components/breadcrumbs.d.ts +19 -0
- package/components/breadcrumbs.js +20 -0
- package/components/button.d.ts +371 -0
- package/components/button.js +182 -0
- package/components/card-content.d.ts +51 -0
- package/components/card-content.js +28 -0
- package/components/card-footer.d.ts +46 -0
- package/components/card-footer.js +22 -0
- package/components/card-header.d.ts +46 -0
- package/components/card-header.js +22 -0
- package/components/card.d.ts +145 -0
- package/components/card.js +192 -0
- package/components/checkbox.d.ts +72 -0
- package/components/checkbox.js +70 -0
- package/components/chip.d.ts +107 -0
- package/components/chip.js +81 -0
- package/components/fab-backdrop.d.ts +46 -0
- package/components/fab-backdrop.js +22 -0
- package/components/fab-button.d.ts +67 -0
- package/components/fab-button.js +52 -0
- package/components/fab-buttons.d.ts +51 -0
- package/components/fab-buttons.js +26 -0
- package/components/fab.d.ts +76 -0
- package/components/fab.js +78 -0
- package/components/gauge.d.ts +91 -0
- package/components/gauge.js +151 -0
- package/components/icon.d.ts +78 -0
- package/components/icon.js +100 -0
- package/components/input.d.ts +226 -0
- package/components/input.js +409 -0
- package/components/link.d.ts +287 -0
- package/components/link.js +129 -0
- package/components/list-button.d.ts +239 -0
- package/components/list-button.js +71 -0
- package/components/list-group.d.ts +71 -0
- package/components/list-group.js +53 -0
- package/components/list-index.d.ts +81 -0
- package/components/list-index.js +96 -0
- package/components/list-input.d.ts +245 -0
- package/components/list-input.js +415 -0
- package/components/list-item.d.ts +370 -0
- package/components/list-item.js +451 -0
- package/components/list.d.ts +236 -0
- package/components/list.js +222 -0
- package/components/login-screen-title.d.ts +46 -0
- package/components/login-screen-title.js +22 -0
- package/components/login-screen.d.ts +61 -0
- package/components/login-screen.js +104 -0
- package/components/message.d.ts +116 -0
- package/components/message.js +169 -0
- package/components/messagebar-attachment.d.ts +56 -0
- package/components/messagebar-attachment.js +52 -0
- package/components/messagebar-attachments.d.ts +46 -0
- package/components/messagebar-attachments.js +22 -0
- package/components/messagebar-sheet-image.d.ts +55 -0
- package/components/messagebar-sheet-image.js +48 -0
- package/components/messagebar-sheet-item.d.ts +46 -0
- package/components/messagebar-sheet-item.js +22 -0
- package/components/messagebar-sheet.d.ts +46 -0
- package/components/messagebar-sheet.js +22 -0
- package/components/messagebar.d.ts +117 -0
- package/components/messagebar.js +193 -0
- package/components/messages-title.d.ts +46 -0
- package/components/messages-title.js +22 -0
- package/components/messages.d.ts +116 -0
- package/components/messages.js +134 -0
- package/components/nav-left.d.ts +68 -0
- package/components/nav-left.js +66 -0
- package/components/nav-right.d.ts +50 -0
- package/components/nav-right.js +25 -0
- package/components/nav-title-large.d.ts +46 -0
- package/components/nav-title-large.js +25 -0
- package/components/nav-title.d.ts +58 -0
- package/components/nav-title.js +31 -0
- package/components/navbar.d.ts +110 -0
- package/components/navbar.js +248 -0
- package/components/page-content.d.ts +113 -0
- package/components/page-content.js +147 -0
- package/components/page.d.ts +150 -0
- package/components/page.js +331 -0
- package/components/panel.d.ts +139 -0
- package/components/panel.js +198 -0
- package/components/photo-browser.d.ts +164 -0
- package/components/photo-browser.js +181 -0
- package/components/pie-chart.d.ts +37 -0
- package/components/pie-chart.js +172 -0
- package/components/popover.d.ts +101 -0
- package/components/popover.js +157 -0
- package/components/popup.d.ts +99 -0
- package/components/popup.js +161 -0
- package/components/preloader.d.ts +50 -0
- package/components/preloader.js +65 -0
- package/components/progressbar.d.ts +54 -0
- package/components/progressbar.js +44 -0
- package/components/radio.d.ts +68 -0
- package/components/radio.js +59 -0
- package/components/range.d.ts +141 -0
- package/components/range.js +139 -0
- package/components/routable-modals.d.ts +19 -0
- package/components/routable-modals.js +58 -0
- package/components/searchbar.d.ts +182 -0
- package/components/searchbar.js +285 -0
- package/components/segmented.d.ts +87 -0
- package/components/segmented.js +53 -0
- package/components/sheet.d.ts +132 -0
- package/components/sheet.js +213 -0
- package/components/skeleton-avatar.d.ts +6 -0
- package/components/skeleton-avatar.js +3 -0
- package/components/skeleton-block.d.ts +6 -0
- package/components/skeleton-block.js +3 -0
- package/components/skeleton-image.d.ts +6 -0
- package/components/skeleton-image.js +3 -0
- package/components/skeleton-text.d.ts +6 -0
- package/components/skeleton-text.js +3 -0
- package/components/stepper.d.ts +197 -0
- package/components/stepper.js +230 -0
- package/components/subnavbar.d.ts +59 -0
- package/components/subnavbar.js +40 -0
- package/components/swipeout-actions.d.ts +58 -0
- package/components/swipeout-actions.js +33 -0
- package/components/swipeout-button.d.ts +75 -0
- package/components/swipeout-button.js +48 -0
- package/components/tab.d.ts +51 -0
- package/components/tab.js +128 -0
- package/components/tabs.d.ts +63 -0
- package/components/tabs.js +59 -0
- package/components/text-editor.d.ts +95 -0
- package/components/text-editor.js +147 -0
- package/components/toggle.d.ts +80 -0
- package/components/toggle.js +89 -0
- package/components/toolbar.d.ts +108 -0
- package/components/toolbar.js +135 -0
- package/components/treeview-item.d.ts +265 -0
- package/components/treeview-item.js +140 -0
- package/components/treeview.d.ts +46 -0
- package/components/treeview.js +22 -0
- package/components/use-icon.d.ts +19 -0
- package/components/use-icon.js +27 -0
- package/components/view.d.ts +296 -0
- package/components/view.js +373 -0
- package/components/views.d.ts +50 -0
- package/components/views.js +25 -0
- package/framework7-vue-bundle.js +190 -0
- package/framework7-vue.d.ts +121 -0
- package/framework7-vue.js +108 -0
- package/package.json +65 -0
- package/shared/components-router.js +203 -0
- package/shared/f7.js +71 -0
- package/shared/get-router-initial-component.js +35 -0
- package/shared/mixins.js +233 -0
- package/shared/modal-state-classes.js +10 -0
- package/shared/plugin.js +37 -0
- package/shared/router-open-in.js +105 -0
- package/shared/use-icon.js +37 -0
- package/shared/use-route-props.js +18 -0
- package/shared/use-smart-select.js +24 -0
- package/shared/use-store.js +24 -0
- package/shared/use-tab.js +24 -0
- package/shared/use-theme.js +11 -0
- package/shared/use-tooltip.js +43 -0
- package/shared/utils.js +110 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { createElementVNode as _createElementVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
2
|
+
const _hoisted_1 = ["name", "value", "disabled", "readonly", "checked"];
|
|
3
|
+
const _hoisted_2 = /*#__PURE__*/_createElementVNode("i", {
|
|
4
|
+
class: "icon-radio"
|
|
5
|
+
}, null, -1);
|
|
6
|
+
function render(_ctx, _cache) {
|
|
7
|
+
return _openBlock(), _createElementBlock("label", {
|
|
8
|
+
class: _normalizeClass(_ctx.classes)
|
|
9
|
+
}, [_createElementVNode("input", {
|
|
10
|
+
ref: "inputElRef",
|
|
11
|
+
type: "radio",
|
|
12
|
+
name: _ctx.name,
|
|
13
|
+
value: _ctx.value,
|
|
14
|
+
disabled: _ctx.disabled,
|
|
15
|
+
readonly: _ctx.readonly,
|
|
16
|
+
checked: _ctx.checked,
|
|
17
|
+
onChange: _cache[0] || (_cache[0] = function () {
|
|
18
|
+
return _ctx.onChange && _ctx.onChange(...arguments);
|
|
19
|
+
})
|
|
20
|
+
}, null, 40, _hoisted_1), _hoisted_2, _renderSlot(_ctx.$slots, "default")], 2);
|
|
21
|
+
}
|
|
22
|
+
import { ref, computed } from 'vue';
|
|
23
|
+
import { classNames } from '../shared/utils.js';
|
|
24
|
+
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
25
|
+
export default {
|
|
26
|
+
name: 'f7-radio',
|
|
27
|
+
render,
|
|
28
|
+
props: {
|
|
29
|
+
checked: Boolean,
|
|
30
|
+
name: [Number, String],
|
|
31
|
+
value: {
|
|
32
|
+
type: [Number, String, Boolean],
|
|
33
|
+
default: undefined
|
|
34
|
+
},
|
|
35
|
+
disabled: Boolean,
|
|
36
|
+
readonly: Boolean,
|
|
37
|
+
...colorProps
|
|
38
|
+
},
|
|
39
|
+
emits: ['update:checked', 'change'],
|
|
40
|
+
setup(props, _ref) {
|
|
41
|
+
let {
|
|
42
|
+
emit
|
|
43
|
+
} = _ref;
|
|
44
|
+
const inputElRef = ref(null);
|
|
45
|
+
const onChange = event => {
|
|
46
|
+
emit('update:checked', event.target.checked);
|
|
47
|
+
emit('change', event);
|
|
48
|
+
};
|
|
49
|
+
const classes = computed(() => classNames({
|
|
50
|
+
radio: true,
|
|
51
|
+
disabled: props.disabled
|
|
52
|
+
}, colorClasses(props)));
|
|
53
|
+
return {
|
|
54
|
+
inputElRef,
|
|
55
|
+
classes,
|
|
56
|
+
onChange
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare const Range: DefineComponent<
|
|
6
|
+
{
|
|
7
|
+
|
|
8
|
+
formatLabel: {
|
|
9
|
+
type: FunctionConstructor;
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
formatScaleLabel: {
|
|
13
|
+
type: FunctionConstructor;
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
name: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
input: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
inputId: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
disabled: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
init: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
value: {
|
|
38
|
+
type: NumberConstructor | ArrayConstructor | StringConstructor;
|
|
39
|
+
default: number;
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
min: {
|
|
43
|
+
type: NumberConstructor | StringConstructor;
|
|
44
|
+
default: number;
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
max: {
|
|
48
|
+
type: NumberConstructor | StringConstructor;
|
|
49
|
+
default: number;
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
step: {
|
|
53
|
+
type: NumberConstructor | StringConstructor;
|
|
54
|
+
default: number;
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
label: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
dual: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
vertical: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
verticalReversed: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: boolean;
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
draggableBar: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
scale: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
default: boolean;
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
scaleSteps: {
|
|
88
|
+
type: NumberConstructor;
|
|
89
|
+
default: number;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
scaleSubSteps: {
|
|
93
|
+
type: NumberConstructor;
|
|
94
|
+
default: number;
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
limitKnobPosition: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
default: undefined;
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
color: {
|
|
103
|
+
type: StringConstructor;
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
colorTheme: {
|
|
107
|
+
type: StringConstructor;
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
textColor: {
|
|
111
|
+
type: StringConstructor;
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
bgColor: {
|
|
115
|
+
type: StringConstructor;
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
borderColor: {
|
|
119
|
+
type: StringConstructor;
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
rippleColor: {
|
|
123
|
+
type: StringConstructor;
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
dark: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
() => JSX.Element,
|
|
131
|
+
unknown,
|
|
132
|
+
{},
|
|
133
|
+
{},
|
|
134
|
+
ComponentOptionsMixin,
|
|
135
|
+
ComponentOptionsMixin,
|
|
136
|
+
("range:change" | "range:changed" | "rangeChange" | "rangeChanged" | "update:value")[],
|
|
137
|
+
"range:change" | "range:changed" | "rangeChange" | "rangeChanged" | "update:value"
|
|
138
|
+
>;
|
|
139
|
+
|
|
140
|
+
export default Range;
|
|
141
|
+
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass } from "vue";
|
|
2
|
+
const _hoisted_1 = ["name"];
|
|
3
|
+
function render(_ctx, _cache) {
|
|
4
|
+
return _openBlock(), _createElementBlock("div", {
|
|
5
|
+
ref: "elRef",
|
|
6
|
+
class: _normalizeClass(_ctx.classes)
|
|
7
|
+
}, [_ctx.input ? (_openBlock(), _createElementBlock("input", {
|
|
8
|
+
key: 0,
|
|
9
|
+
id: "inputId",
|
|
10
|
+
type: "range",
|
|
11
|
+
name: _ctx.name
|
|
12
|
+
}, null, 8, _hoisted_1)) : _createCommentVNode("", true), _renderSlot(_ctx.$slots, "default")], 2);
|
|
13
|
+
}
|
|
14
|
+
import { computed, ref, onMounted, onBeforeUnmount, watch } from 'vue';
|
|
15
|
+
import { classNames, noUndefinedProps } from '../shared/utils.js';
|
|
16
|
+
import { colorClasses, colorProps } from '../shared/mixins.js';
|
|
17
|
+
import { f7ready, f7 } from '../shared/f7.js';
|
|
18
|
+
export default {
|
|
19
|
+
name: 'f7-range',
|
|
20
|
+
render,
|
|
21
|
+
props: {
|
|
22
|
+
init: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: true
|
|
25
|
+
},
|
|
26
|
+
value: {
|
|
27
|
+
type: [Number, Array, String],
|
|
28
|
+
default: 0
|
|
29
|
+
},
|
|
30
|
+
min: {
|
|
31
|
+
type: [Number, String],
|
|
32
|
+
default: 0
|
|
33
|
+
},
|
|
34
|
+
max: {
|
|
35
|
+
type: [Number, String],
|
|
36
|
+
default: 100
|
|
37
|
+
},
|
|
38
|
+
step: {
|
|
39
|
+
type: [Number, String],
|
|
40
|
+
default: 1
|
|
41
|
+
},
|
|
42
|
+
label: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
dual: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
50
|
+
vertical: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false
|
|
53
|
+
},
|
|
54
|
+
verticalReversed: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false
|
|
57
|
+
},
|
|
58
|
+
draggableBar: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: true
|
|
61
|
+
},
|
|
62
|
+
formatLabel: Function,
|
|
63
|
+
scale: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
scaleSteps: {
|
|
68
|
+
type: Number,
|
|
69
|
+
default: 5
|
|
70
|
+
},
|
|
71
|
+
scaleSubSteps: {
|
|
72
|
+
type: Number,
|
|
73
|
+
default: 0
|
|
74
|
+
},
|
|
75
|
+
formatScaleLabel: Function,
|
|
76
|
+
limitKnobPosition: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: undefined
|
|
79
|
+
},
|
|
80
|
+
name: String,
|
|
81
|
+
input: Boolean,
|
|
82
|
+
inputId: String,
|
|
83
|
+
disabled: Boolean,
|
|
84
|
+
...colorProps
|
|
85
|
+
},
|
|
86
|
+
emits: ['range:change', 'range:changed', 'rangeChange', 'rangeChanged', 'update:value'],
|
|
87
|
+
setup(props, _ref) {
|
|
88
|
+
let {
|
|
89
|
+
emit
|
|
90
|
+
} = _ref;
|
|
91
|
+
let f7Range = null;
|
|
92
|
+
const elRef = ref(null);
|
|
93
|
+
watch(() => props.value, newValue => {
|
|
94
|
+
if (!f7Range) return;
|
|
95
|
+
const rangeValue = f7Range.value;
|
|
96
|
+
if (Array.isArray(newValue) && Array.isArray(rangeValue)) {
|
|
97
|
+
if (rangeValue[0] !== newValue[0] || rangeValue[1] !== newValue[1]) {
|
|
98
|
+
f7Range.setValue(newValue);
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
f7Range.setValue(newValue);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
onMounted(() => {
|
|
105
|
+
f7ready(() => {
|
|
106
|
+
if (!props.init || !elRef.value) return;
|
|
107
|
+
f7Range = f7.range.create(noUndefinedProps({
|
|
108
|
+
el: elRef.value,
|
|
109
|
+
...props,
|
|
110
|
+
on: {
|
|
111
|
+
change(range, val) {
|
|
112
|
+
emit('range:change', val);
|
|
113
|
+
emit('rangeChange', val);
|
|
114
|
+
},
|
|
115
|
+
changed(range, val) {
|
|
116
|
+
emit('range:changed', val);
|
|
117
|
+
emit('rangeChanged', val);
|
|
118
|
+
emit('update:value', val);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
onBeforeUnmount(() => {
|
|
125
|
+
if (f7Range && f7Range.destroy) f7Range.destroy();
|
|
126
|
+
f7Range = null;
|
|
127
|
+
});
|
|
128
|
+
const classes = computed(() => classNames('range-slider', {
|
|
129
|
+
'range-slider-horizontal': !props.vertical,
|
|
130
|
+
'range-slider-vertical': props.vertical,
|
|
131
|
+
'range-slider-vertical-reversed': props.vertical && props.verticalReversed,
|
|
132
|
+
disabled: props.disabled
|
|
133
|
+
}, colorClasses(props)));
|
|
134
|
+
return {
|
|
135
|
+
elRef,
|
|
136
|
+
classes
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare const RoutableModals: DefineComponent<
|
|
6
|
+
{
|
|
7
|
+
|
|
8
|
+
},
|
|
9
|
+
() => JSX.Element,
|
|
10
|
+
unknown,
|
|
11
|
+
{},
|
|
12
|
+
{},
|
|
13
|
+
ComponentOptionsMixin,
|
|
14
|
+
ComponentOptionsMixin,
|
|
15
|
+
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export default RoutableModals;
|
|
19
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ref, onMounted, onBeforeUnmount, onUpdated, toRaw, h } from 'vue';
|
|
2
|
+
import { f7events, f7routers, f7 } from '../shared/f7.js';
|
|
3
|
+
export default {
|
|
4
|
+
name: 'f7-routable-modals',
|
|
5
|
+
setup() {
|
|
6
|
+
const elRef = ref(null);
|
|
7
|
+
const modals = ref([]);
|
|
8
|
+
const routerData = ref(null);
|
|
9
|
+
onMounted(() => {
|
|
10
|
+
routerData.value = {
|
|
11
|
+
modals,
|
|
12
|
+
el: elRef.value,
|
|
13
|
+
setModals(newModals) {
|
|
14
|
+
newModals.forEach(modal => {
|
|
15
|
+
// eslint-disable-next-line
|
|
16
|
+
modal.component = toRaw(modal.component);
|
|
17
|
+
});
|
|
18
|
+
modals.value = [...newModals];
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
f7routers.modals = routerData.value;
|
|
22
|
+
});
|
|
23
|
+
onUpdated(() => {
|
|
24
|
+
if (!routerData.value || !f7) return;
|
|
25
|
+
f7events.emit('modalsRouterDidUpdate', routerData.value);
|
|
26
|
+
});
|
|
27
|
+
onBeforeUnmount(() => {
|
|
28
|
+
if (!routerData.value) return;
|
|
29
|
+
f7routers.modals = null;
|
|
30
|
+
routerData.value = null;
|
|
31
|
+
});
|
|
32
|
+
const getComponent = modal => toRaw(modal.component);
|
|
33
|
+
const getProps = modal => {
|
|
34
|
+
const {
|
|
35
|
+
component: modalComponent,
|
|
36
|
+
props: modalProps
|
|
37
|
+
} = modal;
|
|
38
|
+
let keys = [];
|
|
39
|
+
const passProps = {};
|
|
40
|
+
if (modalComponent && modalComponent.props) keys = Object.keys(modalComponent.props);
|
|
41
|
+
keys.forEach(key => {
|
|
42
|
+
if (key in modalProps) passProps[key] = modalProps[key];
|
|
43
|
+
});
|
|
44
|
+
return passProps;
|
|
45
|
+
};
|
|
46
|
+
return () => {
|
|
47
|
+
return h('div', {
|
|
48
|
+
ref: elRef,
|
|
49
|
+
class: 'framework7-modals'
|
|
50
|
+
}, [...modals.value.map(modal => {
|
|
51
|
+
return h(getComponent(modal), {
|
|
52
|
+
key: modal.id,
|
|
53
|
+
...getProps(modal)
|
|
54
|
+
});
|
|
55
|
+
})]);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentOptionsMixin, DefineComponent, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare const Searchbar: DefineComponent<
|
|
6
|
+
{
|
|
7
|
+
|
|
8
|
+
value: {
|
|
9
|
+
type: StringConstructor | NumberConstructor | ArrayConstructor;
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
expandable: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
inline: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
searchContainer: {
|
|
21
|
+
type: StringConstructor | ObjectConstructor;
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
backdropEl: {
|
|
25
|
+
type: StringConstructor | ObjectConstructor;
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
outline: {
|
|
29
|
+
type: any;
|
|
30
|
+
default: boolean;
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
form: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
placeholder: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
default: string;
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
spellcheck: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: undefined;
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
disableButton: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
disableButtonText: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
default: string;
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
clearButton: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
default: boolean;
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
inputEvents: {
|
|
64
|
+
type: StringConstructor;
|
|
65
|
+
default: string;
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
searchIn: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: string;
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
searchItem: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: string;
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
searchGroup: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
default: string;
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
searchGroupTitle: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
default: string;
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
foundEl: {
|
|
89
|
+
type: StringConstructor | ObjectConstructor;
|
|
90
|
+
default: string;
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
notFoundEl: {
|
|
94
|
+
type: StringConstructor | ObjectConstructor;
|
|
95
|
+
default: string;
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
backdrop: {
|
|
99
|
+
type: BooleanConstructor;
|
|
100
|
+
default: undefined;
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
hideOnEnableEl: {
|
|
104
|
+
type: StringConstructor | ObjectConstructor;
|
|
105
|
+
default: string;
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
hideOnSearchEl: {
|
|
109
|
+
type: StringConstructor | ObjectConstructor;
|
|
110
|
+
default: string;
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
ignore: {
|
|
114
|
+
type: StringConstructor;
|
|
115
|
+
default: string;
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
customSearch: {
|
|
119
|
+
type: BooleanConstructor;
|
|
120
|
+
default: boolean;
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
removeDiacritics: {
|
|
124
|
+
type: BooleanConstructor;
|
|
125
|
+
default: boolean;
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
hideGroupTitles: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: boolean;
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
hideGroups: {
|
|
134
|
+
type: BooleanConstructor;
|
|
135
|
+
default: boolean;
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
init: {
|
|
139
|
+
type: BooleanConstructor;
|
|
140
|
+
default: boolean;
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
color: {
|
|
144
|
+
type: StringConstructor;
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
colorTheme: {
|
|
148
|
+
type: StringConstructor;
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
textColor: {
|
|
152
|
+
type: StringConstructor;
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
bgColor: {
|
|
156
|
+
type: StringConstructor;
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
borderColor: {
|
|
160
|
+
type: StringConstructor;
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
rippleColor: {
|
|
164
|
+
type: StringConstructor;
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
dark: {
|
|
168
|
+
type: BooleanConstructor;
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
() => JSX.Element,
|
|
172
|
+
unknown,
|
|
173
|
+
{},
|
|
174
|
+
{},
|
|
175
|
+
ComponentOptionsMixin,
|
|
176
|
+
ComponentOptionsMixin,
|
|
177
|
+
("change" | "input" | "focus" | "blur" | "submit" | "click:clear" | "click:disable" | "searchbar:search" | "searchbar:clear" | "searchbar:enable" | "searchbar:disable" | "update:value")[],
|
|
178
|
+
"change" | "input" | "focus" | "blur" | "submit" | "click:clear" | "click:disable" | "searchbar:search" | "searchbar:clear" | "searchbar:enable" | "searchbar:disable" | "update:value"
|
|
179
|
+
>;
|
|
180
|
+
|
|
181
|
+
export default Searchbar;
|
|
182
|
+
|