@composy/keyboard-vue 0.0.1
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/README.md +46 -0
- package/dist/index.css +797 -0
- package/dist/index.js +1250 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.css +1 -0
- package/dist/index.min.js +1 -0
- package/es/components/KeyboardKey.js +17 -0
- package/es/components/KeyboardKey.js.map +1 -0
- package/es/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js +131 -0
- package/es/components/KeyboardKey.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/es/components/KeyboardPopup.js +17 -0
- package/es/components/KeyboardPopup.js.map +1 -0
- package/es/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js +164 -0
- package/es/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/es/components/LicensePlateKeyboard.js +17 -0
- package/es/components/LicensePlateKeyboard.js.map +1 -0
- package/es/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js +97 -0
- package/es/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/es/components/VirtualKeyboard.js +17 -0
- package/es/components/VirtualKeyboard.js.map +1 -0
- package/es/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js +127 -0
- package/es/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/es/components/index.d.ts +9 -0
- package/es/components/index.d.ts.map +1 -0
- package/es/components/index.js +15 -0
- package/es/composables/index.d.ts +7 -0
- package/es/composables/index.d.ts.map +1 -0
- package/es/composables/index.js +13 -0
- package/es/composables/useKeyboard.d.ts +113 -0
- package/es/composables/useKeyboard.d.ts.map +1 -0
- package/es/composables/useKeyboard.js +75 -0
- package/es/composables/useKeyboard.js.map +1 -0
- package/es/composables/useKeyboardPopup.d.ts +73 -0
- package/es/composables/useKeyboardPopup.d.ts.map +1 -0
- package/es/composables/useKeyboardPopup.js +119 -0
- package/es/composables/useKeyboardPopup.js.map +1 -0
- package/es/directives/index.d.ts +6 -0
- package/es/directives/index.d.ts.map +1 -0
- package/es/directives/index.js +12 -0
- package/es/directives/v-keyboard.d.ts +36 -0
- package/es/directives/v-keyboard.d.ts.map +1 -0
- package/es/directives/v-keyboard.js +65 -0
- package/es/directives/v-keyboard.js.map +1 -0
- package/es/index.d.ts +42 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +34 -0
- package/es/index.js.map +1 -0
- package/es/plugins/engine-plugin.d.ts +37 -0
- package/es/plugins/engine-plugin.d.ts.map +1 -0
- package/es/plugins/engine-plugin.js +37 -0
- package/es/plugins/engine-plugin.js.map +1 -0
- package/es/plugins/index.d.ts +6 -0
- package/es/plugins/index.d.ts.map +1 -0
- package/es/plugins/index.js +12 -0
- package/es/style/css.js +1 -0
- package/es/style/index.js +1 -0
- package/es/style/index.less +1 -0
- package/es/styles/index.less +267 -0
- package/es/styles/keyboard.less +399 -0
- package/es/styles/themes.less +233 -0
- package/lib/components/KeyboardKey.cjs +21 -0
- package/lib/components/KeyboardKey.cjs.map +1 -0
- package/lib/components/KeyboardKey.vue_vue_type_script_setup_true_lang.cjs +131 -0
- package/lib/components/KeyboardKey.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/lib/components/KeyboardPopup.cjs +21 -0
- package/lib/components/KeyboardPopup.cjs.map +1 -0
- package/lib/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.cjs +164 -0
- package/lib/components/KeyboardPopup.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/lib/components/LicensePlateKeyboard.cjs +21 -0
- package/lib/components/LicensePlateKeyboard.cjs.map +1 -0
- package/lib/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.cjs +97 -0
- package/lib/components/LicensePlateKeyboard.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/lib/components/VirtualKeyboard.cjs +21 -0
- package/lib/components/VirtualKeyboard.cjs.map +1 -0
- package/lib/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.cjs +127 -0
- package/lib/components/VirtualKeyboard.vue_vue_type_script_setup_true_lang.cjs.map +1 -0
- package/lib/components/index.cjs +19 -0
- package/lib/components/index.d.ts +9 -0
- package/lib/composables/index.cjs +15 -0
- package/lib/composables/index.d.ts +7 -0
- package/lib/composables/useKeyboard.cjs +76 -0
- package/lib/composables/useKeyboard.cjs.map +1 -0
- package/lib/composables/useKeyboard.d.ts +113 -0
- package/lib/composables/useKeyboardPopup.cjs +120 -0
- package/lib/composables/useKeyboardPopup.cjs.map +1 -0
- package/lib/composables/useKeyboardPopup.d.ts +73 -0
- package/lib/directives/index.cjs +13 -0
- package/lib/directives/index.d.ts +6 -0
- package/lib/directives/v-keyboard.cjs +66 -0
- package/lib/directives/v-keyboard.cjs.map +1 -0
- package/lib/directives/v-keyboard.d.ts +36 -0
- package/lib/index.cjs +537 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.ts +42 -0
- package/lib/package.json +3 -0
- package/lib/plugins/engine-plugin.cjs +37 -0
- package/lib/plugins/engine-plugin.cjs.map +1 -0
- package/lib/plugins/engine-plugin.d.ts +37 -0
- package/lib/plugins/index.cjs +13 -0
- package/lib/plugins/index.d.ts +6 -0
- package/lib/style/css.js +1 -0
- package/lib/style/index.css +2 -0
- package/lib/style/index.js +1 -0
- package/lib/styles/index.css +229 -0
- package/lib/styles/keyboard.css +346 -0
- package/lib/styles/themes.css +213 -0
- package/package.json +141 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1250 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* ***********************************
|
|
3
|
+
* @composy/keyboard-vue v0.0.1 *
|
|
4
|
+
* Built with rollup *
|
|
5
|
+
* Build time: 2024-08-17 11:42:14 *
|
|
6
|
+
* Build mode: production *
|
|
7
|
+
* Minified: No *
|
|
8
|
+
* ***********************************
|
|
9
|
+
*/
|
|
10
|
+
(function(global, factory) {
|
|
11
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("@composy/keyboard-core")) : typeof define === "function" && define.amd ? define([
|
|
12
|
+
"exports",
|
|
13
|
+
"vue",
|
|
14
|
+
"@composy/keyboard-core"
|
|
15
|
+
], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.LDesignPackagesVue3 = {}, global.Vue, global.ComposyKeyboardCore));
|
|
16
|
+
})(this, function(exports, vue, _composy_keyboard_core) {
|
|
17
|
+
Object.defineProperties(exports, {
|
|
18
|
+
__esModule: { value: true },
|
|
19
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
20
|
+
});
|
|
21
|
+
//#region src/components/KeyboardKey.vue?vue&type=script&setup=true&lang.ts
|
|
22
|
+
const _hoisted_1$2 = ["disabled"];
|
|
23
|
+
const _hoisted_2$2 = ["innerHTML"];
|
|
24
|
+
const _hoisted_3$2 = {
|
|
25
|
+
key: 1,
|
|
26
|
+
class: "keyboard-key__label"
|
|
27
|
+
};
|
|
28
|
+
const _hoisted_4$2 = {
|
|
29
|
+
key: 2,
|
|
30
|
+
class: "keyboard-key__arrow-inline"
|
|
31
|
+
};
|
|
32
|
+
var KeyboardKey_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
33
|
+
__name: "KeyboardKey",
|
|
34
|
+
props: {
|
|
35
|
+
keyDef: {
|
|
36
|
+
type: Object,
|
|
37
|
+
required: true
|
|
38
|
+
},
|
|
39
|
+
isUpperCase: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
required: false
|
|
42
|
+
},
|
|
43
|
+
baseWidth: {
|
|
44
|
+
type: Number,
|
|
45
|
+
required: false
|
|
46
|
+
},
|
|
47
|
+
useFlex: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
required: false
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
emits: ["press", "showOptions"],
|
|
53
|
+
setup(__props, { emit: __emit }) {
|
|
54
|
+
const props = __props;
|
|
55
|
+
const emit = __emit;
|
|
56
|
+
const label = (0, vue.computed)(() => {
|
|
57
|
+
const keyLabel = props.keyDef.label;
|
|
58
|
+
if (typeof keyLabel === "string") return keyLabel;
|
|
59
|
+
return props.isUpperCase ? keyLabel.upper : keyLabel.lower;
|
|
60
|
+
});
|
|
61
|
+
const keyWidth = (0, vue.computed)(() => {
|
|
62
|
+
if (props.useFlex) return;
|
|
63
|
+
const base = props.baseWidth ?? 36;
|
|
64
|
+
const width = props.keyDef.width ?? 1;
|
|
65
|
+
return `${base * width + (width - 1) * 6}px`;
|
|
66
|
+
});
|
|
67
|
+
const keyFlex = (0, vue.computed)(() => {
|
|
68
|
+
if (!props.useFlex) return;
|
|
69
|
+
return props.keyDef.width ?? 1;
|
|
70
|
+
});
|
|
71
|
+
const keyClass = (0, vue.computed)(() => {
|
|
72
|
+
const classes = ["keyboard-key", `keyboard-key--${props.keyDef.type}`];
|
|
73
|
+
if (props.keyDef.className) classes.push(props.keyDef.className);
|
|
74
|
+
if (props.keyDef.disabled) classes.push("keyboard-key--disabled");
|
|
75
|
+
if (props.keyDef.type === "shift" && props.isUpperCase) classes.push("keyboard-key--active");
|
|
76
|
+
return classes;
|
|
77
|
+
});
|
|
78
|
+
const hasOptions = (0, vue.computed)(() => {
|
|
79
|
+
return props.keyDef.options && props.keyDef.options.length > 0;
|
|
80
|
+
});
|
|
81
|
+
const isOptionsOnly = (0, vue.computed)(() => {
|
|
82
|
+
return hasOptions.value && !props.keyDef.value;
|
|
83
|
+
});
|
|
84
|
+
const handlePress = (event) => {
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
event.stopPropagation();
|
|
87
|
+
if (props.keyDef.disabled) return;
|
|
88
|
+
if (isOptionsOnly.value) {
|
|
89
|
+
emit("showOptions", props.keyDef.options);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
emit("press", props.keyDef);
|
|
93
|
+
};
|
|
94
|
+
const handleArrowClick = (event) => {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
event.stopPropagation();
|
|
97
|
+
if (props.keyDef.disabled) return;
|
|
98
|
+
if (hasOptions.value) emit("showOptions", props.keyDef.options);
|
|
99
|
+
};
|
|
100
|
+
return (_ctx, _cache) => {
|
|
101
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
102
|
+
class: "keyboard-key-wrapper",
|
|
103
|
+
style: (0, vue.normalizeStyle)({
|
|
104
|
+
width: keyWidth.value,
|
|
105
|
+
flex: keyFlex.value
|
|
106
|
+
})
|
|
107
|
+
}, [
|
|
108
|
+
(0, vue.createElementVNode)("button", {
|
|
109
|
+
class: (0, vue.normalizeClass)([keyClass.value, {
|
|
110
|
+
"has-options": hasOptions.value && !isOptionsOnly.value,
|
|
111
|
+
"is-options-only": isOptionsOnly.value
|
|
112
|
+
}]),
|
|
113
|
+
disabled: __props.keyDef.disabled,
|
|
114
|
+
type: "button",
|
|
115
|
+
onMousedown: (0, vue.withModifiers)(handlePress, ["prevent"]),
|
|
116
|
+
onTouchstart: (0, vue.withModifiers)(handlePress, ["prevent"])
|
|
117
|
+
}, [
|
|
118
|
+
(0, vue.createCommentVNode)(" SVG 图标支持 "),
|
|
119
|
+
__props.keyDef.icon ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
120
|
+
key: 0,
|
|
121
|
+
class: "keyboard-key__icon",
|
|
122
|
+
innerHTML: __props.keyDef.icon
|
|
123
|
+
}, null, 8, _hoisted_2$2)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$2, (0, vue.toDisplayString)(label.value), 1)),
|
|
124
|
+
(0, vue.createCommentVNode)(" 纯选项按钮内嵌下拉箭头 "),
|
|
125
|
+
isOptionsOnly.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_4$2, "▼")) : (0, vue.createCommentVNode)("v-if", true)
|
|
126
|
+
], 42, _hoisted_1$2),
|
|
127
|
+
(0, vue.createCommentVNode)(" 有value又有options的按钮:单独可点击的下拉箭头 "),
|
|
128
|
+
hasOptions.value && !isOptionsOnly.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
129
|
+
key: 0,
|
|
130
|
+
class: "keyboard-key__arrow",
|
|
131
|
+
onMousedown: (0, vue.withModifiers)(handleArrowClick, ["prevent"]),
|
|
132
|
+
onTouchstart: (0, vue.withModifiers)(handleArrowClick, ["prevent"])
|
|
133
|
+
}, "▼", 32)) : (0, vue.createCommentVNode)("v-if", true)
|
|
134
|
+
], 4);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/components/KeyboardKey.vue
|
|
140
|
+
KeyboardKey_vue_vue_type_script_setup_true_lang_default.__file = "src/components/KeyboardKey.vue";
|
|
141
|
+
var KeyboardKey_default = KeyboardKey_vue_vue_type_script_setup_true_lang_default;
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region src/components/VirtualKeyboard.vue?vue&type=script&setup=true&lang.ts
|
|
144
|
+
const _hoisted_1$1 = { class: "virtual-keyboard" };
|
|
145
|
+
const _hoisted_2$1 = {
|
|
146
|
+
key: 1,
|
|
147
|
+
class: "virtual-keyboard__empty"
|
|
148
|
+
};
|
|
149
|
+
const _hoisted_3$1 = {
|
|
150
|
+
key: 0,
|
|
151
|
+
class: "keyboard-options-panel"
|
|
152
|
+
};
|
|
153
|
+
const _hoisted_4$1 = { class: "keyboard-options-panel__header" };
|
|
154
|
+
const _hoisted_5 = { class: "keyboard-options-panel__grid" };
|
|
155
|
+
const _hoisted_6 = ["onMousedown", "onTouchstart"];
|
|
156
|
+
var VirtualKeyboard_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
157
|
+
__name: "VirtualKeyboard",
|
|
158
|
+
props: {
|
|
159
|
+
type: {
|
|
160
|
+
type: String,
|
|
161
|
+
required: false,
|
|
162
|
+
default: "qwerty"
|
|
163
|
+
},
|
|
164
|
+
isUpperCase: {
|
|
165
|
+
type: Boolean,
|
|
166
|
+
required: false,
|
|
167
|
+
default: false
|
|
168
|
+
},
|
|
169
|
+
layout: {
|
|
170
|
+
type: Object,
|
|
171
|
+
required: false
|
|
172
|
+
},
|
|
173
|
+
keyWidth: {
|
|
174
|
+
type: Number,
|
|
175
|
+
required: false,
|
|
176
|
+
default: 36
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
emits: ["keypress", "selectOption"],
|
|
180
|
+
setup(__props, { emit: __emit }) {
|
|
181
|
+
const props = __props;
|
|
182
|
+
const emit = __emit;
|
|
183
|
+
const showOptionsPanel = (0, vue.ref)(false);
|
|
184
|
+
const currentOptions = (0, vue.ref)([]);
|
|
185
|
+
const currentLayout = (0, vue.computed)(() => {
|
|
186
|
+
if (props.layout) return props.layout;
|
|
187
|
+
return (0, _composy_keyboard_core.getLayout)(props.type) ?? null;
|
|
188
|
+
});
|
|
189
|
+
const handleKeyPress = (key) => {
|
|
190
|
+
emit("keypress", key);
|
|
191
|
+
};
|
|
192
|
+
const handleShowOptions = (options) => {
|
|
193
|
+
currentOptions.value = options;
|
|
194
|
+
showOptionsPanel.value = true;
|
|
195
|
+
};
|
|
196
|
+
const handleSelectOption = (option, event) => {
|
|
197
|
+
event.preventDefault();
|
|
198
|
+
event.stopPropagation();
|
|
199
|
+
showOptionsPanel.value = false;
|
|
200
|
+
emit("selectOption", option);
|
|
201
|
+
};
|
|
202
|
+
const closeOptionsPanel = () => {
|
|
203
|
+
showOptionsPanel.value = false;
|
|
204
|
+
};
|
|
205
|
+
const getRowStyle = (rowIndex) => {
|
|
206
|
+
return {};
|
|
207
|
+
};
|
|
208
|
+
return (_ctx, _cache) => {
|
|
209
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$1, [
|
|
210
|
+
currentLayout.value ? ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, (0, vue.renderList)(currentLayout.value.rows, (row, rowIndex) => {
|
|
211
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
212
|
+
key: rowIndex,
|
|
213
|
+
class: (0, vue.normalizeClass)(["virtual-keyboard__row", row.className]),
|
|
214
|
+
style: (0, vue.normalizeStyle)(getRowStyle(rowIndex))
|
|
215
|
+
}, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(row.keys, (key) => {
|
|
216
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(KeyboardKey_default, {
|
|
217
|
+
key: key.id,
|
|
218
|
+
"key-def": key,
|
|
219
|
+
"is-upper-case": __props.isUpperCase,
|
|
220
|
+
"base-width": __props.keyWidth,
|
|
221
|
+
"use-flex": row.className === "numpad-row",
|
|
222
|
+
onPress: handleKeyPress,
|
|
223
|
+
onShowOptions: handleShowOptions
|
|
224
|
+
}, null, 8, [
|
|
225
|
+
"key-def",
|
|
226
|
+
"is-upper-case",
|
|
227
|
+
"base-width",
|
|
228
|
+
"use-flex"
|
|
229
|
+
]);
|
|
230
|
+
}), 128))], 6);
|
|
231
|
+
}), 128)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$1, " 键盘布局未找到 ")),
|
|
232
|
+
(0, vue.createCommentVNode)(" 选项面板 "),
|
|
233
|
+
(0, vue.createVNode)(vue.Transition, { name: "options-panel" }, {
|
|
234
|
+
default: (0, vue.withCtx)(() => [showOptionsPanel.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$1, [(0, vue.createElementVNode)("div", _hoisted_4$1, [_cache[0] || (_cache[0] = (0, vue.createElementVNode)("span", { class: "keyboard-options-panel__title" }, "选择邮箱后缀", -1)), (0, vue.createElementVNode)("button", {
|
|
235
|
+
class: "keyboard-options-panel__close",
|
|
236
|
+
type: "button",
|
|
237
|
+
onClick: closeOptionsPanel,
|
|
238
|
+
onTouchstart: (0, vue.withModifiers)(closeOptionsPanel, ["prevent"])
|
|
239
|
+
}, " × ", 32)]), (0, vue.createElementVNode)("div", _hoisted_5, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(currentOptions.value, (option) => {
|
|
240
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
241
|
+
key: option,
|
|
242
|
+
class: "keyboard-options-panel__item",
|
|
243
|
+
type: "button",
|
|
244
|
+
onMousedown: (0, vue.withModifiers)((e) => handleSelectOption(option, e), ["prevent"]),
|
|
245
|
+
onTouchstart: (0, vue.withModifiers)((e) => handleSelectOption(option, e), ["prevent"])
|
|
246
|
+
}, (0, vue.toDisplayString)(option), 41, _hoisted_6);
|
|
247
|
+
}), 128))])])) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
248
|
+
_: 1
|
|
249
|
+
})
|
|
250
|
+
]);
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/components/VirtualKeyboard.vue
|
|
256
|
+
VirtualKeyboard_vue_vue_type_script_setup_true_lang_default.__file = "src/components/VirtualKeyboard.vue";
|
|
257
|
+
var VirtualKeyboard_default = VirtualKeyboard_vue_vue_type_script_setup_true_lang_default;
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/composables/useKeyboard.ts
|
|
260
|
+
function useKeyboard(options = {}) {
|
|
261
|
+
const { immediate = false, ...keyboardOptions } = options;
|
|
262
|
+
const manager = (0, _composy_keyboard_core.createKeyboardManager)(keyboardOptions);
|
|
263
|
+
const visible = (0, vue.ref)(false);
|
|
264
|
+
const type = (0, vue.ref)(keyboardOptions.type ?? "qwerty");
|
|
265
|
+
const isUpperCase = (0, vue.ref)(keyboardOptions.defaultUpperCase ?? false);
|
|
266
|
+
const value = (0, vue.ref)(keyboardOptions.value ?? "");
|
|
267
|
+
const cursorPosition = (0, vue.ref)(keyboardOptions.value?.length ?? 0);
|
|
268
|
+
const layout = (0, vue.shallowRef)(manager.getLayout());
|
|
269
|
+
const state = (0, vue.reactive)({
|
|
270
|
+
visible: false,
|
|
271
|
+
type: keyboardOptions.type ?? "qwerty",
|
|
272
|
+
isUpperCase: keyboardOptions.defaultUpperCase ?? false,
|
|
273
|
+
value: keyboardOptions.value ?? "",
|
|
274
|
+
cursorPosition: keyboardOptions.value?.length ?? 0,
|
|
275
|
+
maxLength: keyboardOptions.maxLength,
|
|
276
|
+
inputElement: null
|
|
277
|
+
});
|
|
278
|
+
const syncState = (newState) => {
|
|
279
|
+
visible.value = newState.visible;
|
|
280
|
+
type.value = newState.type;
|
|
281
|
+
isUpperCase.value = newState.isUpperCase;
|
|
282
|
+
value.value = newState.value;
|
|
283
|
+
cursorPosition.value = newState.cursorPosition;
|
|
284
|
+
Object.assign(state, newState);
|
|
285
|
+
};
|
|
286
|
+
manager.on("stateChange", syncState);
|
|
287
|
+
manager.on("switch", () => {
|
|
288
|
+
layout.value = manager.getLayout();
|
|
289
|
+
});
|
|
290
|
+
if (immediate) manager.show();
|
|
291
|
+
(0, vue.onBeforeUnmount)(() => {
|
|
292
|
+
manager.destroy();
|
|
293
|
+
});
|
|
294
|
+
return {
|
|
295
|
+
visible,
|
|
296
|
+
type,
|
|
297
|
+
isUpperCase,
|
|
298
|
+
value,
|
|
299
|
+
cursorPosition,
|
|
300
|
+
layout,
|
|
301
|
+
state,
|
|
302
|
+
show: (input) => manager.show(input),
|
|
303
|
+
hide: () => manager.hide(),
|
|
304
|
+
toggle: (input) => manager.toggle(input),
|
|
305
|
+
switchType: (t) => manager.switchType(t),
|
|
306
|
+
toggleShift: () => manager.toggleShift(),
|
|
307
|
+
handleKey: (key) => manager.handleKey(key),
|
|
308
|
+
getKeyLabel: (key) => manager.getKeyLabel(key),
|
|
309
|
+
setValue: (v) => manager.setValue(v),
|
|
310
|
+
appendValue: (text) => manager.appendValue(text),
|
|
311
|
+
setMaxLength: (maxLength) => manager.setMaxLength(maxLength),
|
|
312
|
+
bindInput: (input) => manager.bindInput(input),
|
|
313
|
+
unbindInput: () => manager.unbindInput(),
|
|
314
|
+
on: (event, handler) => manager.on(event, handler),
|
|
315
|
+
once: (event, handler) => manager.once(event, handler),
|
|
316
|
+
destroy: () => manager.destroy()
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region src/composables/useKeyboardPopup.ts
|
|
321
|
+
function useKeyboardPopup(options = {}) {
|
|
322
|
+
const { visible = (0, vue.ref)(false), target = (0, vue.ref)(null), popup = (0, vue.ref)(null), closeOnClickOutside = true, onClose, ...positionConfig } = options;
|
|
323
|
+
const positionManager = (0, _composy_keyboard_core.createPositionManager)(positionConfig);
|
|
324
|
+
const popupStyles = (0, vue.ref)({});
|
|
325
|
+
const maskStyles = (0, vue.ref)({});
|
|
326
|
+
const placement = (0, vue.ref)("bottom");
|
|
327
|
+
const isMobileDevice = (0, vue.ref)((0, _composy_keyboard_core.isMobile)());
|
|
328
|
+
const showMask = (0, vue.ref)(false);
|
|
329
|
+
const isAnimating = (0, vue.ref)(false);
|
|
330
|
+
let cleanupClickOutside = null;
|
|
331
|
+
let cleanupViewportChange = null;
|
|
332
|
+
let cleanupScroll = null;
|
|
333
|
+
const updatePosition = () => {
|
|
334
|
+
if (!popup.value) return;
|
|
335
|
+
const popupRect = popup.value.getBoundingClientRect();
|
|
336
|
+
const result = positionManager.calculate(target.value, {
|
|
337
|
+
width: popupRect.width || 300,
|
|
338
|
+
height: popupRect.height || 260
|
|
339
|
+
});
|
|
340
|
+
placement.value = result.placement;
|
|
341
|
+
showMask.value = positionManager.shouldShowMask();
|
|
342
|
+
if (result.placement === "bottom-sheet") popupStyles.value = {
|
|
343
|
+
position: "fixed",
|
|
344
|
+
left: "0",
|
|
345
|
+
right: "0",
|
|
346
|
+
bottom: "0",
|
|
347
|
+
maxHeight: `${result.maxHeight}px`,
|
|
348
|
+
zIndex: 1e3
|
|
349
|
+
};
|
|
350
|
+
else popupStyles.value = {
|
|
351
|
+
position: "fixed",
|
|
352
|
+
left: `${result.position.x}px`,
|
|
353
|
+
top: `${result.position.y}px`,
|
|
354
|
+
maxHeight: result.maxHeight ? `${result.maxHeight}px` : void 0,
|
|
355
|
+
maxWidth: result.maxWidth ? `${result.maxWidth}px` : void 0,
|
|
356
|
+
zIndex: 1e3
|
|
357
|
+
};
|
|
358
|
+
if (showMask.value) maskStyles.value = {
|
|
359
|
+
position: "fixed",
|
|
360
|
+
top: "0",
|
|
361
|
+
left: "0",
|
|
362
|
+
right: "0",
|
|
363
|
+
bottom: "0",
|
|
364
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
365
|
+
zIndex: 999
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
const close = () => {
|
|
369
|
+
onClose?.();
|
|
370
|
+
};
|
|
371
|
+
(0, vue.watch)(visible, (newVisible) => {
|
|
372
|
+
if (newVisible) {
|
|
373
|
+
isMobileDevice.value = (0, _composy_keyboard_core.isMobile)();
|
|
374
|
+
requestAnimationFrame(() => {
|
|
375
|
+
updatePosition();
|
|
376
|
+
if (closeOnClickOutside && popup.value) cleanupClickOutside = (0, _composy_keyboard_core.onClickOutside)(popup.value, (event) => {
|
|
377
|
+
if (target.value && target.value.contains(event.target)) return;
|
|
378
|
+
close();
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
cleanupViewportChange = (0, _composy_keyboard_core.onViewportChange)(() => {
|
|
382
|
+
isMobileDevice.value = (0, _composy_keyboard_core.isMobile)();
|
|
383
|
+
updatePosition();
|
|
384
|
+
});
|
|
385
|
+
if (!isMobileDevice.value) {
|
|
386
|
+
const handleScroll = () => {
|
|
387
|
+
requestAnimationFrame(() => {
|
|
388
|
+
updatePosition();
|
|
389
|
+
});
|
|
390
|
+
};
|
|
391
|
+
window.addEventListener("scroll", handleScroll, true);
|
|
392
|
+
cleanupScroll = () => {
|
|
393
|
+
window.removeEventListener("scroll", handleScroll, true);
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
} else {
|
|
397
|
+
cleanupClickOutside?.();
|
|
398
|
+
cleanupClickOutside = null;
|
|
399
|
+
cleanupViewportChange?.();
|
|
400
|
+
cleanupViewportChange = null;
|
|
401
|
+
cleanupScroll?.();
|
|
402
|
+
cleanupScroll = null;
|
|
403
|
+
}
|
|
404
|
+
}, { immediate: true });
|
|
405
|
+
(0, vue.watch)(target, () => {
|
|
406
|
+
if (visible.value) updatePosition();
|
|
407
|
+
});
|
|
408
|
+
(0, vue.onBeforeUnmount)(() => {
|
|
409
|
+
cleanupClickOutside?.();
|
|
410
|
+
cleanupViewportChange?.();
|
|
411
|
+
cleanupScroll?.();
|
|
412
|
+
});
|
|
413
|
+
return {
|
|
414
|
+
popupStyles,
|
|
415
|
+
maskStyles,
|
|
416
|
+
placement,
|
|
417
|
+
isMobileDevice,
|
|
418
|
+
showMask,
|
|
419
|
+
isAnimating,
|
|
420
|
+
updatePosition,
|
|
421
|
+
close
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region src/components/KeyboardPopup.vue?vue&type=script&setup=true&lang.ts
|
|
426
|
+
var KeyboardPopup_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
427
|
+
__name: "KeyboardPopup",
|
|
428
|
+
props: {
|
|
429
|
+
modelValue: {
|
|
430
|
+
type: Boolean,
|
|
431
|
+
required: false,
|
|
432
|
+
default: false
|
|
433
|
+
},
|
|
434
|
+
type: {
|
|
435
|
+
type: String,
|
|
436
|
+
required: false,
|
|
437
|
+
default: "qwerty"
|
|
438
|
+
},
|
|
439
|
+
value: {
|
|
440
|
+
type: String,
|
|
441
|
+
required: false,
|
|
442
|
+
default: ""
|
|
443
|
+
},
|
|
444
|
+
target: {
|
|
445
|
+
type: null,
|
|
446
|
+
required: false,
|
|
447
|
+
default: null
|
|
448
|
+
},
|
|
449
|
+
maxLength: {
|
|
450
|
+
type: Number,
|
|
451
|
+
required: false
|
|
452
|
+
},
|
|
453
|
+
closeOnClickOutside: {
|
|
454
|
+
type: Boolean,
|
|
455
|
+
required: false,
|
|
456
|
+
default: true
|
|
457
|
+
},
|
|
458
|
+
enableVibrate: {
|
|
459
|
+
type: Boolean,
|
|
460
|
+
required: false,
|
|
461
|
+
default: true
|
|
462
|
+
},
|
|
463
|
+
teleportTo: {
|
|
464
|
+
type: null,
|
|
465
|
+
required: false,
|
|
466
|
+
default: "body"
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
emits: [
|
|
470
|
+
"update:modelValue",
|
|
471
|
+
"update:value",
|
|
472
|
+
"confirm",
|
|
473
|
+
"keypress"
|
|
474
|
+
],
|
|
475
|
+
setup(__props, { emit: __emit }) {
|
|
476
|
+
const props = __props;
|
|
477
|
+
const emit = __emit;
|
|
478
|
+
const popupRef = (0, vue.ref)(null);
|
|
479
|
+
const targetRef = (0, vue.computed)(() => props.target);
|
|
480
|
+
const isMobileDevice = (0, vue.ref)((0, _composy_keyboard_core.isMobile)());
|
|
481
|
+
const keyboard = useKeyboard({
|
|
482
|
+
type: props.type,
|
|
483
|
+
value: props.value,
|
|
484
|
+
maxLength: props.maxLength || (props.type.startsWith("license-plate") ? 7 : void 0),
|
|
485
|
+
enableVibrate: props.enableVibrate
|
|
486
|
+
});
|
|
487
|
+
const { popupStyles, maskStyles, placement, showMask, updatePosition, close: closePopup } = useKeyboardPopup({
|
|
488
|
+
visible: (0, vue.computed)(() => props.modelValue),
|
|
489
|
+
target: targetRef,
|
|
490
|
+
popup: popupRef,
|
|
491
|
+
closeOnClickOutside: props.closeOnClickOutside,
|
|
492
|
+
onClose: () => {
|
|
493
|
+
emit("update:modelValue", false);
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
(0, vue.watch)(() => props.type, (newType) => {
|
|
497
|
+
keyboard.switchType(newType);
|
|
498
|
+
if (newType.startsWith("license-plate") && !props.maxLength) keyboard.setMaxLength(7);
|
|
499
|
+
});
|
|
500
|
+
(0, vue.watch)(() => props.value, (newValue) => {
|
|
501
|
+
if (newValue !== keyboard.value.value) keyboard.setValue(newValue);
|
|
502
|
+
});
|
|
503
|
+
(0, vue.watch)(keyboard.value, (newValue) => {
|
|
504
|
+
emit("update:value", newValue);
|
|
505
|
+
});
|
|
506
|
+
(0, vue.watch)(() => props.modelValue, (visible) => {
|
|
507
|
+
if (visible) {
|
|
508
|
+
isMobileDevice.value = (0, _composy_keyboard_core.isMobile)();
|
|
509
|
+
if (props.target) keyboard.bindInput(props.target);
|
|
510
|
+
keyboard.show(props.target ?? void 0);
|
|
511
|
+
(0, vue.nextTick)(() => {
|
|
512
|
+
updatePosition();
|
|
513
|
+
});
|
|
514
|
+
} else keyboard.hide();
|
|
515
|
+
});
|
|
516
|
+
keyboard.on("confirm", ({ value }) => {
|
|
517
|
+
emit("confirm", value);
|
|
518
|
+
emit("update:modelValue", false);
|
|
519
|
+
});
|
|
520
|
+
const handleKeyPress = (key) => {
|
|
521
|
+
keyboard.handleKey(key);
|
|
522
|
+
emit("keypress", key);
|
|
523
|
+
};
|
|
524
|
+
const handleSelectOption = (option) => {
|
|
525
|
+
let valueToAppend = option;
|
|
526
|
+
if (option.startsWith("@") && keyboard.value.value.endsWith("@")) valueToAppend = option.slice(1);
|
|
527
|
+
keyboard.appendValue(valueToAppend);
|
|
528
|
+
};
|
|
529
|
+
const handleMaskClick = () => {
|
|
530
|
+
if (props.closeOnClickOutside) emit("update:modelValue", false);
|
|
531
|
+
};
|
|
532
|
+
const popupClass = (0, vue.computed)(() => {
|
|
533
|
+
return [
|
|
534
|
+
"keyboard-popup",
|
|
535
|
+
`keyboard-popup--${placement.value}`,
|
|
536
|
+
{
|
|
537
|
+
"keyboard-popup--mobile": isMobileDevice.value,
|
|
538
|
+
"keyboard-popup--desktop": !isMobileDevice.value
|
|
539
|
+
}
|
|
540
|
+
];
|
|
541
|
+
});
|
|
542
|
+
return (_ctx, _cache) => {
|
|
543
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(vue.Teleport, { to: __props.teleportTo }, [(0, vue.createVNode)(vue.Transition, { name: "keyboard-mask" }, {
|
|
544
|
+
default: (0, vue.withCtx)(() => [__props.modelValue && (0, vue.unref)(showMask) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
545
|
+
key: 0,
|
|
546
|
+
class: "keyboard-mask",
|
|
547
|
+
style: (0, vue.normalizeStyle)((0, vue.unref)(maskStyles)),
|
|
548
|
+
onClick: handleMaskClick
|
|
549
|
+
}, null, 4)) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
550
|
+
_: 1
|
|
551
|
+
}), (0, vue.createVNode)(vue.Transition, { name: isMobileDevice.value ? "keyboard-slide" : "keyboard-fade" }, {
|
|
552
|
+
default: (0, vue.withCtx)(() => [__props.modelValue ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
553
|
+
key: 0,
|
|
554
|
+
ref_key: "popupRef",
|
|
555
|
+
ref: popupRef,
|
|
556
|
+
class: (0, vue.normalizeClass)(popupClass.value),
|
|
557
|
+
style: (0, vue.normalizeStyle)((0, vue.unref)(popupStyles)),
|
|
558
|
+
onMousedown: _cache[0] || (_cache[0] = (0, vue.withModifiers)(() => {}, ["prevent"])),
|
|
559
|
+
onTouchstart: _cache[1] || (_cache[1] = (0, vue.withModifiers)(() => {}, ["prevent"]))
|
|
560
|
+
}, [(0, vue.createVNode)(VirtualKeyboard_default, {
|
|
561
|
+
type: (0, vue.unref)(keyboard).type.value,
|
|
562
|
+
"is-upper-case": (0, vue.unref)(keyboard).isUpperCase.value,
|
|
563
|
+
onKeypress: handleKeyPress,
|
|
564
|
+
onSelectOption: handleSelectOption
|
|
565
|
+
}, null, 8, ["type", "is-upper-case"])], 38)) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
566
|
+
_: 1
|
|
567
|
+
}, 8, ["name"])], 8, ["to"]);
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
//#endregion
|
|
572
|
+
//#region src/components/KeyboardPopup.vue
|
|
573
|
+
KeyboardPopup_vue_vue_type_script_setup_true_lang_default.__file = "src/components/KeyboardPopup.vue";
|
|
574
|
+
var KeyboardPopup_default = KeyboardPopup_vue_vue_type_script_setup_true_lang_default;
|
|
575
|
+
//#endregion
|
|
576
|
+
//#region src/components/LicensePlateKeyboard.vue?vue&type=script&setup=true&lang.ts
|
|
577
|
+
const _hoisted_1 = { class: "license-plate-keyboard" };
|
|
578
|
+
const _hoisted_2 = { class: "license-plate-keyboard__display" };
|
|
579
|
+
const _hoisted_3 = { class: "license-plate-keyboard__value" };
|
|
580
|
+
const _hoisted_4 = { class: "license-plate-keyboard__hint" };
|
|
581
|
+
var LicensePlateKeyboard_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
582
|
+
__name: "LicensePlateKeyboard",
|
|
583
|
+
props: {
|
|
584
|
+
modelValue: {
|
|
585
|
+
type: String,
|
|
586
|
+
required: false,
|
|
587
|
+
default: ""
|
|
588
|
+
},
|
|
589
|
+
newEnergy: {
|
|
590
|
+
type: Boolean,
|
|
591
|
+
required: false,
|
|
592
|
+
default: false
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
emits: ["update:modelValue", "done"],
|
|
596
|
+
setup(__props, { emit: __emit }) {
|
|
597
|
+
const props = __props;
|
|
598
|
+
const emit = __emit;
|
|
599
|
+
const maxLength = (0, vue.computed)(() => props.newEnergy ? 8 : 7);
|
|
600
|
+
const keyboard = useKeyboard({
|
|
601
|
+
type: "license-plate-province",
|
|
602
|
+
value: props.modelValue,
|
|
603
|
+
maxLength: maxLength.value,
|
|
604
|
+
enableVibrate: true
|
|
605
|
+
});
|
|
606
|
+
(0, vue.watch)(() => props.modelValue, (newValue) => {
|
|
607
|
+
if (newValue !== keyboard.value.value) keyboard.setValue(newValue);
|
|
608
|
+
});
|
|
609
|
+
(0, vue.watch)(keyboard.value, (newValue) => {
|
|
610
|
+
emit("update:modelValue", newValue);
|
|
611
|
+
});
|
|
612
|
+
(0, vue.watch)(maxLength, (newMaxLength) => {
|
|
613
|
+
keyboard.setMaxLength(newMaxLength);
|
|
614
|
+
if (props.modelValue.length > newMaxLength) {
|
|
615
|
+
const truncated = props.modelValue.slice(0, newMaxLength);
|
|
616
|
+
keyboard.setValue(truncated);
|
|
617
|
+
emit("update:modelValue", truncated);
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
keyboard.on("confirm", ({ value }) => {
|
|
621
|
+
emit("done", value);
|
|
622
|
+
});
|
|
623
|
+
const handleKeyPress = (key) => {
|
|
624
|
+
keyboard.handleKey(key);
|
|
625
|
+
};
|
|
626
|
+
const positionHint = (0, vue.computed)(() => {
|
|
627
|
+
const len = props.modelValue.length;
|
|
628
|
+
if (len === 0) return "请选择省份";
|
|
629
|
+
if (len === 1) return "请输入字母";
|
|
630
|
+
if (len < maxLength.value) return `\u7B2C${len + 1}\u4F4D`;
|
|
631
|
+
return "已完成";
|
|
632
|
+
});
|
|
633
|
+
return (_ctx, _cache) => {
|
|
634
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [
|
|
635
|
+
(0, vue.createCommentVNode)(" 输入显示区 "),
|
|
636
|
+
(0, vue.createElementVNode)("div", _hoisted_2, [(0, vue.createElementVNode)("div", _hoisted_3, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.modelValue.padEnd(maxLength.value, " ").split(""), (char, index) => {
|
|
637
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
638
|
+
key: index,
|
|
639
|
+
class: (0, vue.normalizeClass)(["license-plate-keyboard__char", {
|
|
640
|
+
"license-plate-keyboard__char--filled": char !== " ",
|
|
641
|
+
"license-plate-keyboard__char--current": index === __props.modelValue.length,
|
|
642
|
+
"license-plate-keyboard__char--province": index === 0,
|
|
643
|
+
"license-plate-keyboard__char--new-energy": __props.newEnergy && index === 7
|
|
644
|
+
}])
|
|
645
|
+
}, (0, vue.toDisplayString)(char === " " ? "" : char), 3);
|
|
646
|
+
}), 128))]), (0, vue.createElementVNode)("div", _hoisted_4, (0, vue.toDisplayString)(positionHint.value), 1)]),
|
|
647
|
+
(0, vue.createCommentVNode)(" 键盘区 - 由 core 的 KeyboardManager 自动切换布局 "),
|
|
648
|
+
(0, vue.createVNode)(VirtualKeyboard_default, {
|
|
649
|
+
type: (0, vue.unref)(keyboard).type.value,
|
|
650
|
+
"is-upper-case": (0, vue.unref)(keyboard).isUpperCase.value,
|
|
651
|
+
onKeypress: handleKeyPress
|
|
652
|
+
}, null, 8, ["type", "is-upper-case"])
|
|
653
|
+
]);
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
//#endregion
|
|
658
|
+
//#region src/components/LicensePlateKeyboard.vue
|
|
659
|
+
LicensePlateKeyboard_vue_vue_type_script_setup_true_lang_default.__file = "src/components/LicensePlateKeyboard.vue";
|
|
660
|
+
var LicensePlateKeyboard_default = LicensePlateKeyboard_vue_vue_type_script_setup_true_lang_default;
|
|
661
|
+
//#endregion
|
|
662
|
+
//#region src/directives/v-keyboard.ts
|
|
663
|
+
const KEYBOARD_ATTR = "__v_keyboard__";
|
|
664
|
+
const vKeyboard = {
|
|
665
|
+
mounted(el, binding) {
|
|
666
|
+
const options = parseBinding(binding);
|
|
667
|
+
if (!options.enabled) return;
|
|
668
|
+
const handleFocus = () => {
|
|
669
|
+
el.blur();
|
|
670
|
+
options.onOpen?.(el);
|
|
671
|
+
};
|
|
672
|
+
el.addEventListener("focus", handleFocus);
|
|
673
|
+
el.setAttribute("inputmode", "none");
|
|
674
|
+
el[KEYBOARD_ATTR] = { cleanup: () => {
|
|
675
|
+
el.removeEventListener("focus", handleFocus);
|
|
676
|
+
el.removeAttribute("inputmode");
|
|
677
|
+
} };
|
|
678
|
+
},
|
|
679
|
+
updated(el, binding) {
|
|
680
|
+
const oldCleanup = el[KEYBOARD_ATTR]?.cleanup;
|
|
681
|
+
if (oldCleanup) oldCleanup();
|
|
682
|
+
const options = parseBinding(binding);
|
|
683
|
+
if (!options.enabled) return;
|
|
684
|
+
const handleFocus = () => {
|
|
685
|
+
el.blur();
|
|
686
|
+
options.onOpen?.(el);
|
|
687
|
+
};
|
|
688
|
+
el.addEventListener("focus", handleFocus);
|
|
689
|
+
el.setAttribute("inputmode", "none");
|
|
690
|
+
el[KEYBOARD_ATTR] = { cleanup: () => {
|
|
691
|
+
el.removeEventListener("focus", handleFocus);
|
|
692
|
+
el.removeAttribute("inputmode");
|
|
693
|
+
} };
|
|
694
|
+
},
|
|
695
|
+
unmounted(el) {
|
|
696
|
+
const data = el[KEYBOARD_ATTR];
|
|
697
|
+
if (data?.cleanup) data.cleanup();
|
|
698
|
+
delete el[KEYBOARD_ATTR];
|
|
699
|
+
}
|
|
700
|
+
};
|
|
701
|
+
function parseBinding(binding) {
|
|
702
|
+
const value = binding.value;
|
|
703
|
+
if (value === false) return { enabled: false };
|
|
704
|
+
if (value === true || value === void 0) return { enabled: true };
|
|
705
|
+
if (typeof value === "string") return {
|
|
706
|
+
enabled: true,
|
|
707
|
+
type: value
|
|
708
|
+
};
|
|
709
|
+
return {
|
|
710
|
+
enabled: value.enabled !== false,
|
|
711
|
+
...value
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
//#endregion
|
|
715
|
+
//#region src/plugins/engine-plugin.ts
|
|
716
|
+
const KeyboardEnginePlugin = {
|
|
717
|
+
name: "keyboard",
|
|
718
|
+
version: "0.1.0",
|
|
719
|
+
async install(context, options) {
|
|
720
|
+
const prefix = options?.prefix ?? "L";
|
|
721
|
+
const app = context?.framework?.app;
|
|
722
|
+
if (app) {
|
|
723
|
+
app.component(`${prefix}Keyboard`, VirtualKeyboard_default);
|
|
724
|
+
app.component(`${prefix}KeyboardPopup`, KeyboardPopup_default);
|
|
725
|
+
app.component(`${prefix}LicensePlateKeyboard`, LicensePlateKeyboard_default);
|
|
726
|
+
app.directive("keyboard", vKeyboard);
|
|
727
|
+
}
|
|
728
|
+
if (context?.container?.singleton) context.container.singleton("keyboard", {
|
|
729
|
+
name: "keyboard",
|
|
730
|
+
version: "0.1.0"
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
//#endregion
|
|
735
|
+
//#region src/index.ts
|
|
736
|
+
const KeyboardVuePlugin = { install(app, options = {}) {
|
|
737
|
+
const prefix = options.prefix ?? "L";
|
|
738
|
+
app.component(`${prefix}Keyboard`, VirtualKeyboard_default);
|
|
739
|
+
app.component(`${prefix}KeyboardPopup`, KeyboardPopup_default);
|
|
740
|
+
app.component(`${prefix}LicensePlateKeyboard`, LicensePlateKeyboard_default);
|
|
741
|
+
app.directive("keyboard", vKeyboard);
|
|
742
|
+
} };
|
|
743
|
+
const KeyboardPlugin = KeyboardVuePlugin;
|
|
744
|
+
//#endregion
|
|
745
|
+
Object.defineProperty(exports, "EMAIL_SUFFIXES", {
|
|
746
|
+
enumerable: true,
|
|
747
|
+
get: function() {
|
|
748
|
+
return _composy_keyboard_core.EMAIL_SUFFIXES;
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
Object.defineProperty(exports, "EventEmitter", {
|
|
752
|
+
enumerable: true,
|
|
753
|
+
get: function() {
|
|
754
|
+
return _composy_keyboard_core.EventEmitter;
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
exports.KeyboardEnginePlugin = KeyboardEnginePlugin;
|
|
758
|
+
exports.KeyboardKey = KeyboardKey_default;
|
|
759
|
+
Object.defineProperty(exports, "KeyboardManager", {
|
|
760
|
+
enumerable: true,
|
|
761
|
+
get: function() {
|
|
762
|
+
return _composy_keyboard_core.KeyboardManager;
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
exports.KeyboardPlugin = KeyboardPlugin;
|
|
766
|
+
exports.KeyboardPopup = KeyboardPopup_default;
|
|
767
|
+
Object.defineProperty(exports, "KeyboardRenderer", {
|
|
768
|
+
enumerable: true,
|
|
769
|
+
get: function() {
|
|
770
|
+
return _composy_keyboard_core.KeyboardRenderer;
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
exports.KeyboardVuePlugin = KeyboardVuePlugin;
|
|
774
|
+
exports.default = KeyboardVuePlugin;
|
|
775
|
+
exports.LicensePlateKeyboard = LicensePlateKeyboard_default;
|
|
776
|
+
Object.defineProperty(exports, "PLATE_LETTERS", {
|
|
777
|
+
enumerable: true,
|
|
778
|
+
get: function() {
|
|
779
|
+
return _composy_keyboard_core.PLATE_LETTERS;
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
Object.defineProperty(exports, "PROVINCES", {
|
|
783
|
+
enumerable: true,
|
|
784
|
+
get: function() {
|
|
785
|
+
return _composy_keyboard_core.PROVINCES;
|
|
786
|
+
}
|
|
787
|
+
});
|
|
788
|
+
Object.defineProperty(exports, "PositionManager", {
|
|
789
|
+
enumerable: true,
|
|
790
|
+
get: function() {
|
|
791
|
+
return _composy_keyboard_core.PositionManager;
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
exports.VirtualKeyboard = VirtualKeyboard_default;
|
|
795
|
+
Object.defineProperty(exports, "amountLayout", {
|
|
796
|
+
enumerable: true,
|
|
797
|
+
get: function() {
|
|
798
|
+
return _composy_keyboard_core.amountLayout;
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
Object.defineProperty(exports, "amountSimpleLayout", {
|
|
802
|
+
enumerable: true,
|
|
803
|
+
get: function() {
|
|
804
|
+
return _composy_keyboard_core.amountSimpleLayout;
|
|
805
|
+
}
|
|
806
|
+
});
|
|
807
|
+
Object.defineProperty(exports, "applyFormatter", {
|
|
808
|
+
enumerable: true,
|
|
809
|
+
get: function() {
|
|
810
|
+
return _composy_keyboard_core.applyFormatter;
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
Object.defineProperty(exports, "applyTheme", {
|
|
814
|
+
enumerable: true,
|
|
815
|
+
get: function() {
|
|
816
|
+
return _composy_keyboard_core.applyTheme;
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
Object.defineProperty(exports, "bankcardLayout", {
|
|
820
|
+
enumerable: true,
|
|
821
|
+
get: function() {
|
|
822
|
+
return _composy_keyboard_core.bankcardLayout;
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
Object.defineProperty(exports, "createKeyboardManager", {
|
|
826
|
+
enumerable: true,
|
|
827
|
+
get: function() {
|
|
828
|
+
return _composy_keyboard_core.createKeyboardManager;
|
|
829
|
+
}
|
|
830
|
+
});
|
|
831
|
+
Object.defineProperty(exports, "createKeyboardRenderer", {
|
|
832
|
+
enumerable: true,
|
|
833
|
+
get: function() {
|
|
834
|
+
return _composy_keyboard_core.createKeyboardRenderer;
|
|
835
|
+
}
|
|
836
|
+
});
|
|
837
|
+
Object.defineProperty(exports, "createPositionManager", {
|
|
838
|
+
enumerable: true,
|
|
839
|
+
get: function() {
|
|
840
|
+
return _composy_keyboard_core.createPositionManager;
|
|
841
|
+
}
|
|
842
|
+
});
|
|
843
|
+
Object.defineProperty(exports, "createRandomLetterLayout", {
|
|
844
|
+
enumerable: true,
|
|
845
|
+
get: function() {
|
|
846
|
+
return _composy_keyboard_core.createRandomLetterLayout;
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
Object.defineProperty(exports, "createRandomMixedLayout", {
|
|
850
|
+
enumerable: true,
|
|
851
|
+
get: function() {
|
|
852
|
+
return _composy_keyboard_core.createRandomMixedLayout;
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
Object.defineProperty(exports, "createRandomNumberLayout", {
|
|
856
|
+
enumerable: true,
|
|
857
|
+
get: function() {
|
|
858
|
+
return _composy_keyboard_core.createRandomNumberLayout;
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
Object.defineProperty(exports, "createRandomPinLayout", {
|
|
862
|
+
enumerable: true,
|
|
863
|
+
get: function() {
|
|
864
|
+
return _composy_keyboard_core.createRandomPinLayout;
|
|
865
|
+
}
|
|
866
|
+
});
|
|
867
|
+
Object.defineProperty(exports, "createTheme", {
|
|
868
|
+
enumerable: true,
|
|
869
|
+
get: function() {
|
|
870
|
+
return _composy_keyboard_core.createTheme;
|
|
871
|
+
}
|
|
872
|
+
});
|
|
873
|
+
Object.defineProperty(exports, "darkTheme", {
|
|
874
|
+
enumerable: true,
|
|
875
|
+
get: function() {
|
|
876
|
+
return _composy_keyboard_core.darkTheme;
|
|
877
|
+
}
|
|
878
|
+
});
|
|
879
|
+
Object.defineProperty(exports, "defaultTheme", {
|
|
880
|
+
enumerable: true,
|
|
881
|
+
get: function() {
|
|
882
|
+
return _composy_keyboard_core.defaultTheme;
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
Object.defineProperty(exports, "deleteCharBeforeCursor", {
|
|
886
|
+
enumerable: true,
|
|
887
|
+
get: function() {
|
|
888
|
+
return _composy_keyboard_core.deleteCharBeforeCursor;
|
|
889
|
+
}
|
|
890
|
+
});
|
|
891
|
+
Object.defineProperty(exports, "emailLayout", {
|
|
892
|
+
enumerable: true,
|
|
893
|
+
get: function() {
|
|
894
|
+
return _composy_keyboard_core.emailLayout;
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
Object.defineProperty(exports, "formatAmount", {
|
|
898
|
+
enumerable: true,
|
|
899
|
+
get: function() {
|
|
900
|
+
return _composy_keyboard_core.formatAmount;
|
|
901
|
+
}
|
|
902
|
+
});
|
|
903
|
+
Object.defineProperty(exports, "formatBankCard", {
|
|
904
|
+
enumerable: true,
|
|
905
|
+
get: function() {
|
|
906
|
+
return _composy_keyboard_core.formatBankCard;
|
|
907
|
+
}
|
|
908
|
+
});
|
|
909
|
+
Object.defineProperty(exports, "formatIdCard", {
|
|
910
|
+
enumerable: true,
|
|
911
|
+
get: function() {
|
|
912
|
+
return _composy_keyboard_core.formatIdCard;
|
|
913
|
+
}
|
|
914
|
+
});
|
|
915
|
+
Object.defineProperty(exports, "formatLicensePlate", {
|
|
916
|
+
enumerable: true,
|
|
917
|
+
get: function() {
|
|
918
|
+
return _composy_keyboard_core.formatLicensePlate;
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
Object.defineProperty(exports, "formatPhone", {
|
|
922
|
+
enumerable: true,
|
|
923
|
+
get: function() {
|
|
924
|
+
return _composy_keyboard_core.formatPhone;
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
Object.defineProperty(exports, "formatVerifyCode", {
|
|
928
|
+
enumerable: true,
|
|
929
|
+
get: function() {
|
|
930
|
+
return _composy_keyboard_core.formatVerifyCode;
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
Object.defineProperty(exports, "generateThemeStyle", {
|
|
934
|
+
enumerable: true,
|
|
935
|
+
get: function() {
|
|
936
|
+
return _composy_keyboard_core.generateThemeStyle;
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
Object.defineProperty(exports, "getAllThemes", {
|
|
940
|
+
enumerable: true,
|
|
941
|
+
get: function() {
|
|
942
|
+
return _composy_keyboard_core.getAllThemes;
|
|
943
|
+
}
|
|
944
|
+
});
|
|
945
|
+
Object.defineProperty(exports, "getAvailableLayouts", {
|
|
946
|
+
enumerable: true,
|
|
947
|
+
get: function() {
|
|
948
|
+
return _composy_keyboard_core.getAvailableLayouts;
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
Object.defineProperty(exports, "getAvailableThemes", {
|
|
952
|
+
enumerable: true,
|
|
953
|
+
get: function() {
|
|
954
|
+
return _composy_keyboard_core.getAvailableThemes;
|
|
955
|
+
}
|
|
956
|
+
});
|
|
957
|
+
Object.defineProperty(exports, "getBoundingRect", {
|
|
958
|
+
enumerable: true,
|
|
959
|
+
get: function() {
|
|
960
|
+
return _composy_keyboard_core.getBoundingRect;
|
|
961
|
+
}
|
|
962
|
+
});
|
|
963
|
+
Object.defineProperty(exports, "getCurrentTheme", {
|
|
964
|
+
enumerable: true,
|
|
965
|
+
get: function() {
|
|
966
|
+
return _composy_keyboard_core.getCurrentTheme;
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
Object.defineProperty(exports, "getDeviceType", {
|
|
970
|
+
enumerable: true,
|
|
971
|
+
get: function() {
|
|
972
|
+
return _composy_keyboard_core.getDeviceType;
|
|
973
|
+
}
|
|
974
|
+
});
|
|
975
|
+
Object.defineProperty(exports, "getFormatter", {
|
|
976
|
+
enumerable: true,
|
|
977
|
+
get: function() {
|
|
978
|
+
return _composy_keyboard_core.getFormatter;
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
Object.defineProperty(exports, "getLayout", {
|
|
982
|
+
enumerable: true,
|
|
983
|
+
get: function() {
|
|
984
|
+
return _composy_keyboard_core.getLayout;
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
Object.defineProperty(exports, "getRandomAlphanumeric", {
|
|
988
|
+
enumerable: true,
|
|
989
|
+
get: function() {
|
|
990
|
+
return _composy_keyboard_core.getRandomAlphanumeric;
|
|
991
|
+
}
|
|
992
|
+
});
|
|
993
|
+
Object.defineProperty(exports, "getRandomLetters", {
|
|
994
|
+
enumerable: true,
|
|
995
|
+
get: function() {
|
|
996
|
+
return _composy_keyboard_core.getRandomLetters;
|
|
997
|
+
}
|
|
998
|
+
});
|
|
999
|
+
Object.defineProperty(exports, "getRandomNumbers", {
|
|
1000
|
+
enumerable: true,
|
|
1001
|
+
get: function() {
|
|
1002
|
+
return _composy_keyboard_core.getRandomNumbers;
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
Object.defineProperty(exports, "getTheme", {
|
|
1006
|
+
enumerable: true,
|
|
1007
|
+
get: function() {
|
|
1008
|
+
return _composy_keyboard_core.getTheme;
|
|
1009
|
+
}
|
|
1010
|
+
});
|
|
1011
|
+
Object.defineProperty(exports, "getViewportInfo", {
|
|
1012
|
+
enumerable: true,
|
|
1013
|
+
get: function() {
|
|
1014
|
+
return _composy_keyboard_core.getViewportInfo;
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
Object.defineProperty(exports, "hasLayout", {
|
|
1018
|
+
enumerable: true,
|
|
1019
|
+
get: function() {
|
|
1020
|
+
return _composy_keyboard_core.hasLayout;
|
|
1021
|
+
}
|
|
1022
|
+
});
|
|
1023
|
+
Object.defineProperty(exports, "idcardLayout", {
|
|
1024
|
+
enumerable: true,
|
|
1025
|
+
get: function() {
|
|
1026
|
+
return _composy_keyboard_core.idcardLayout;
|
|
1027
|
+
}
|
|
1028
|
+
});
|
|
1029
|
+
Object.defineProperty(exports, "insertTextAtCursor", {
|
|
1030
|
+
enumerable: true,
|
|
1031
|
+
get: function() {
|
|
1032
|
+
return _composy_keyboard_core.insertTextAtCursor;
|
|
1033
|
+
}
|
|
1034
|
+
});
|
|
1035
|
+
Object.defineProperty(exports, "integerLayout", {
|
|
1036
|
+
enumerable: true,
|
|
1037
|
+
get: function() {
|
|
1038
|
+
return _composy_keyboard_core.integerLayout;
|
|
1039
|
+
}
|
|
1040
|
+
});
|
|
1041
|
+
Object.defineProperty(exports, "iosTheme", {
|
|
1042
|
+
enumerable: true,
|
|
1043
|
+
get: function() {
|
|
1044
|
+
return _composy_keyboard_core.iosTheme;
|
|
1045
|
+
}
|
|
1046
|
+
});
|
|
1047
|
+
Object.defineProperty(exports, "isMobile", {
|
|
1048
|
+
enumerable: true,
|
|
1049
|
+
get: function() {
|
|
1050
|
+
return _composy_keyboard_core.isMobile;
|
|
1051
|
+
}
|
|
1052
|
+
});
|
|
1053
|
+
Object.defineProperty(exports, "isTouchDevice", {
|
|
1054
|
+
enumerable: true,
|
|
1055
|
+
get: function() {
|
|
1056
|
+
return _composy_keyboard_core.isTouchDevice;
|
|
1057
|
+
}
|
|
1058
|
+
});
|
|
1059
|
+
Object.defineProperty(exports, "licensePlateAlphanumericLayout", {
|
|
1060
|
+
enumerable: true,
|
|
1061
|
+
get: function() {
|
|
1062
|
+
return _composy_keyboard_core.licensePlateAlphanumericLayout;
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1065
|
+
Object.defineProperty(exports, "licensePlateLayout", {
|
|
1066
|
+
enumerable: true,
|
|
1067
|
+
get: function() {
|
|
1068
|
+
return _composy_keyboard_core.licensePlateLayout;
|
|
1069
|
+
}
|
|
1070
|
+
});
|
|
1071
|
+
Object.defineProperty(exports, "licensePlateLetterLayout", {
|
|
1072
|
+
enumerable: true,
|
|
1073
|
+
get: function() {
|
|
1074
|
+
return _composy_keyboard_core.licensePlateLetterLayout;
|
|
1075
|
+
}
|
|
1076
|
+
});
|
|
1077
|
+
Object.defineProperty(exports, "licensePlateProvinceLayout", {
|
|
1078
|
+
enumerable: true,
|
|
1079
|
+
get: function() {
|
|
1080
|
+
return _composy_keyboard_core.licensePlateProvinceLayout;
|
|
1081
|
+
}
|
|
1082
|
+
});
|
|
1083
|
+
Object.defineProperty(exports, "materialTheme", {
|
|
1084
|
+
enumerable: true,
|
|
1085
|
+
get: function() {
|
|
1086
|
+
return _composy_keyboard_core.materialTheme;
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
Object.defineProperty(exports, "mergeTheme", {
|
|
1090
|
+
enumerable: true,
|
|
1091
|
+
get: function() {
|
|
1092
|
+
return _composy_keyboard_core.mergeTheme;
|
|
1093
|
+
}
|
|
1094
|
+
});
|
|
1095
|
+
Object.defineProperty(exports, "minimalTheme", {
|
|
1096
|
+
enumerable: true,
|
|
1097
|
+
get: function() {
|
|
1098
|
+
return _composy_keyboard_core.minimalTheme;
|
|
1099
|
+
}
|
|
1100
|
+
});
|
|
1101
|
+
Object.defineProperty(exports, "miuiTheme", {
|
|
1102
|
+
enumerable: true,
|
|
1103
|
+
get: function() {
|
|
1104
|
+
return _composy_keyboard_core.miuiTheme;
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
Object.defineProperty(exports, "numberLayout", {
|
|
1108
|
+
enumerable: true,
|
|
1109
|
+
get: function() {
|
|
1110
|
+
return _composy_keyboard_core.numberLayout;
|
|
1111
|
+
}
|
|
1112
|
+
});
|
|
1113
|
+
Object.defineProperty(exports, "onClickOutside", {
|
|
1114
|
+
enumerable: true,
|
|
1115
|
+
get: function() {
|
|
1116
|
+
return _composy_keyboard_core.onClickOutside;
|
|
1117
|
+
}
|
|
1118
|
+
});
|
|
1119
|
+
Object.defineProperty(exports, "onViewportChange", {
|
|
1120
|
+
enumerable: true,
|
|
1121
|
+
get: function() {
|
|
1122
|
+
return _composy_keyboard_core.onViewportChange;
|
|
1123
|
+
}
|
|
1124
|
+
});
|
|
1125
|
+
Object.defineProperty(exports, "phoneLayout", {
|
|
1126
|
+
enumerable: true,
|
|
1127
|
+
get: function() {
|
|
1128
|
+
return _composy_keyboard_core.phoneLayout;
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
Object.defineProperty(exports, "phoneSimpleLayout", {
|
|
1132
|
+
enumerable: true,
|
|
1133
|
+
get: function() {
|
|
1134
|
+
return _composy_keyboard_core.phoneSimpleLayout;
|
|
1135
|
+
}
|
|
1136
|
+
});
|
|
1137
|
+
Object.defineProperty(exports, "presetThemes", {
|
|
1138
|
+
enumerable: true,
|
|
1139
|
+
get: function() {
|
|
1140
|
+
return _composy_keyboard_core.presetThemes;
|
|
1141
|
+
}
|
|
1142
|
+
});
|
|
1143
|
+
Object.defineProperty(exports, "punctLayout", {
|
|
1144
|
+
enumerable: true,
|
|
1145
|
+
get: function() {
|
|
1146
|
+
return _composy_keyboard_core.punctLayout;
|
|
1147
|
+
}
|
|
1148
|
+
});
|
|
1149
|
+
Object.defineProperty(exports, "qwertyLayout", {
|
|
1150
|
+
enumerable: true,
|
|
1151
|
+
get: function() {
|
|
1152
|
+
return _composy_keyboard_core.qwertyLayout;
|
|
1153
|
+
}
|
|
1154
|
+
});
|
|
1155
|
+
Object.defineProperty(exports, "refreshRandomLayout", {
|
|
1156
|
+
enumerable: true,
|
|
1157
|
+
get: function() {
|
|
1158
|
+
return _composy_keyboard_core.refreshRandomLayout;
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
Object.defineProperty(exports, "registerFormatter", {
|
|
1162
|
+
enumerable: true,
|
|
1163
|
+
get: function() {
|
|
1164
|
+
return _composy_keyboard_core.registerFormatter;
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
Object.defineProperty(exports, "registerLayout", {
|
|
1168
|
+
enumerable: true,
|
|
1169
|
+
get: function() {
|
|
1170
|
+
return _composy_keyboard_core.registerLayout;
|
|
1171
|
+
}
|
|
1172
|
+
});
|
|
1173
|
+
Object.defineProperty(exports, "registerLayouts", {
|
|
1174
|
+
enumerable: true,
|
|
1175
|
+
get: function() {
|
|
1176
|
+
return _composy_keyboard_core.registerLayouts;
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
Object.defineProperty(exports, "registerTheme", {
|
|
1180
|
+
enumerable: true,
|
|
1181
|
+
get: function() {
|
|
1182
|
+
return _composy_keyboard_core.registerTheme;
|
|
1183
|
+
}
|
|
1184
|
+
});
|
|
1185
|
+
Object.defineProperty(exports, "searchLayout", {
|
|
1186
|
+
enumerable: true,
|
|
1187
|
+
get: function() {
|
|
1188
|
+
return _composy_keyboard_core.searchLayout;
|
|
1189
|
+
}
|
|
1190
|
+
});
|
|
1191
|
+
Object.defineProperty(exports, "setCurrentTheme", {
|
|
1192
|
+
enumerable: true,
|
|
1193
|
+
get: function() {
|
|
1194
|
+
return _composy_keyboard_core.setCurrentTheme;
|
|
1195
|
+
}
|
|
1196
|
+
});
|
|
1197
|
+
Object.defineProperty(exports, "shuffleArray", {
|
|
1198
|
+
enumerable: true,
|
|
1199
|
+
get: function() {
|
|
1200
|
+
return _composy_keyboard_core.shuffleArray;
|
|
1201
|
+
}
|
|
1202
|
+
});
|
|
1203
|
+
Object.defineProperty(exports, "symbolLayout", {
|
|
1204
|
+
enumerable: true,
|
|
1205
|
+
get: function() {
|
|
1206
|
+
return _composy_keyboard_core.symbolLayout;
|
|
1207
|
+
}
|
|
1208
|
+
});
|
|
1209
|
+
Object.defineProperty(exports, "symbolLayout2", {
|
|
1210
|
+
enumerable: true,
|
|
1211
|
+
get: function() {
|
|
1212
|
+
return _composy_keyboard_core.symbolLayout2;
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
Object.defineProperty(exports, "themeToCSS", {
|
|
1216
|
+
enumerable: true,
|
|
1217
|
+
get: function() {
|
|
1218
|
+
return _composy_keyboard_core.themeToCSS;
|
|
1219
|
+
}
|
|
1220
|
+
});
|
|
1221
|
+
Object.defineProperty(exports, "unregisterLayout", {
|
|
1222
|
+
enumerable: true,
|
|
1223
|
+
get: function() {
|
|
1224
|
+
return _composy_keyboard_core.unregisterLayout;
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
Object.defineProperty(exports, "urlLayout", {
|
|
1228
|
+
enumerable: true,
|
|
1229
|
+
get: function() {
|
|
1230
|
+
return _composy_keyboard_core.urlLayout;
|
|
1231
|
+
}
|
|
1232
|
+
});
|
|
1233
|
+
exports.useKeyboard = useKeyboard;
|
|
1234
|
+
exports.useKeyboardPopup = useKeyboardPopup;
|
|
1235
|
+
exports.vKeyboard = vKeyboard;
|
|
1236
|
+
Object.defineProperty(exports, "verifycodeLayout", {
|
|
1237
|
+
enumerable: true,
|
|
1238
|
+
get: function() {
|
|
1239
|
+
return _composy_keyboard_core.verifycodeLayout;
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1242
|
+
Object.defineProperty(exports, "vibrate", {
|
|
1243
|
+
enumerable: true,
|
|
1244
|
+
get: function() {
|
|
1245
|
+
return _composy_keyboard_core.vibrate;
|
|
1246
|
+
}
|
|
1247
|
+
});
|
|
1248
|
+
});
|
|
1249
|
+
/*! End of @composy/keyboard-vue | Powered by @composy/builder */
|
|
1250
|
+
//# sourceMappingURL=index.js.map
|