@opentinyvue/vue-country 2.21.0 → 3.21.0
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/lib/index.js +1 -1
- package/lib/pc.js +72 -75
- package/package.json +4 -4
- package/src/index.d.ts +65 -1
- package/src/pc.vue.d.ts +66 -1
package/lib/index.js
CHANGED
package/lib/pc.js
CHANGED
|
@@ -2,38 +2,42 @@ import { renderless, api } from '@opentinyvue/vue-renderless/country/vue';
|
|
|
2
2
|
import { defineComponent, props, setup } from '@opentinyvue/vue-common';
|
|
3
3
|
import Select from '@opentinyvue/vue-select';
|
|
4
4
|
import Option from '@opentinyvue/vue-option';
|
|
5
|
+
import { resolveComponent, openBlock, createBlock, mergeProps, withCtx, createElementBlock, Fragment, renderList } from 'vue';
|
|
5
6
|
|
|
6
|
-
function
|
|
7
|
-
var
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function _createForOfIteratorHelperLoose(r, e) {
|
|
8
|
+
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
9
|
+
if (t) return (t = t.call(r)).next.bind(t);
|
|
10
|
+
if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
|
|
11
|
+
t && (r = t);
|
|
12
|
+
var o = 0;
|
|
13
|
+
return function() {
|
|
14
|
+
return o >= r.length ? { done: true } : { done: false, value: r[o++] };
|
|
15
|
+
};
|
|
12
16
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var originalRender = options.render;
|
|
21
|
-
options.render = function renderWithStyleInjection(h, context) {
|
|
22
|
-
hook.call(context);
|
|
23
|
-
return originalRender(h, context);
|
|
24
|
-
};
|
|
25
|
-
} else {
|
|
26
|
-
var existing = options.beforeCreate;
|
|
27
|
-
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
28
|
-
}
|
|
17
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
18
|
+
}
|
|
19
|
+
function _unsupportedIterableToArray(r, a) {
|
|
20
|
+
if (r) {
|
|
21
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
22
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
23
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
29
24
|
}
|
|
30
|
-
return {
|
|
31
|
-
exports: scriptExports,
|
|
32
|
-
options
|
|
33
|
-
};
|
|
34
25
|
}
|
|
26
|
+
function _arrayLikeToArray(r, a) {
|
|
27
|
+
(null == a || a > r.length) && (a = r.length);
|
|
28
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
var _export_sfc = function _export_sfc2(sfc, props) {
|
|
32
|
+
var target = sfc.__vccOpts || sfc;
|
|
33
|
+
for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
|
|
34
|
+
var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
|
|
35
|
+
target[key] = val;
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
35
39
|
|
|
36
|
-
var
|
|
40
|
+
var _sfc_main = defineComponent({
|
|
37
41
|
inheritAttrs: false,
|
|
38
42
|
components: {
|
|
39
43
|
TinySelect: Select,
|
|
@@ -50,54 +54,47 @@ var __vue2_script = defineComponent({
|
|
|
50
54
|
});
|
|
51
55
|
}
|
|
52
56
|
});
|
|
53
|
-
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
94
|
-
function __vue2_injectStyles(context) {
|
|
95
|
-
for (var o in __cssModules) {
|
|
96
|
-
this[o] = __cssModules[o];
|
|
97
|
-
}
|
|
57
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
58
|
+
var _component_tiny_option = resolveComponent("tiny-option");
|
|
59
|
+
var _component_tiny_select = resolveComponent("tiny-select");
|
|
60
|
+
return openBlock(), createBlock(_component_tiny_select, mergeProps({
|
|
61
|
+
modelValue: _ctx.state.selectedValue,
|
|
62
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
|
|
63
|
+
return _ctx.state.selectedValue = $event;
|
|
64
|
+
}),
|
|
65
|
+
filterable: "",
|
|
66
|
+
size: _ctx.size,
|
|
67
|
+
clearable: _ctx.clearable,
|
|
68
|
+
disabled: _ctx.disabled,
|
|
69
|
+
placeholder: _ctx.placeholder,
|
|
70
|
+
onChange: _ctx.change
|
|
71
|
+
}, _ctx.a(_ctx.$attrs, ["^on[A-Z]"]), {
|
|
72
|
+
onClear: _cache[1] || (_cache[1] = function($event) {
|
|
73
|
+
return _ctx.emit("clear");
|
|
74
|
+
}),
|
|
75
|
+
onVisibleChange: _cache[2] || (_cache[2] = function($event) {
|
|
76
|
+
return _ctx.emit("visible-change", $event);
|
|
77
|
+
})
|
|
78
|
+
}), {
|
|
79
|
+
default: withCtx(function() {
|
|
80
|
+
return [(openBlock(true), createElementBlock(
|
|
81
|
+
Fragment,
|
|
82
|
+
null,
|
|
83
|
+
renderList(_ctx.state.options, function(item) {
|
|
84
|
+
return openBlock(), createBlock(_component_tiny_option, {
|
|
85
|
+
key: item.value,
|
|
86
|
+
label: item.label,
|
|
87
|
+
value: item.value
|
|
88
|
+
}, null, 8, ["label", "value"]);
|
|
89
|
+
}),
|
|
90
|
+
128
|
|
91
|
+
/* KEYED_FRAGMENT */
|
|
92
|
+
))];
|
|
93
|
+
}),
|
|
94
|
+
_: 1
|
|
95
|
+
/* STABLE */
|
|
96
|
+
}, 16, ["modelValue", "size", "clearable", "disabled", "placeholder", "onChange"]);
|
|
98
97
|
}
|
|
99
|
-
var pc = /* @__PURE__ */
|
|
100
|
-
return __component__.exports;
|
|
101
|
-
}();
|
|
98
|
+
var pc = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
102
99
|
|
|
103
100
|
export { pc as default };
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-country",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.21.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@opentinyvue/vue-common": "~
|
|
10
|
+
"@opentinyvue/vue-common": "~3.21.0",
|
|
11
11
|
"@opentinyvue/vue-renderless": "~3.21.0",
|
|
12
|
-
"@opentinyvue/vue-select": "~
|
|
13
|
-
"@opentinyvue/vue-option": "~
|
|
12
|
+
"@opentinyvue/vue-select": "~3.21.0",
|
|
13
|
+
"@opentinyvue/vue-option": "~3.21.0",
|
|
14
14
|
"@opentinyvue/vue-theme": "~3.21.0"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,66 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<{
|
|
2
|
+
disabled: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
clearable: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: () => boolean;
|
|
9
|
+
};
|
|
10
|
+
fetchCountry: FunctionConstructor;
|
|
11
|
+
fields: ObjectConstructor;
|
|
12
|
+
placeholder: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: () => string;
|
|
15
|
+
};
|
|
16
|
+
modelValue: {};
|
|
17
|
+
popperClass: StringConstructor;
|
|
18
|
+
popperAppendToBody: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: () => boolean;
|
|
21
|
+
};
|
|
22
|
+
size: StringConstructor;
|
|
23
|
+
tiny_mode: StringConstructor;
|
|
24
|
+
tiny_mode_root: BooleanConstructor;
|
|
25
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
26
|
+
tiny_renderless: FunctionConstructor;
|
|
27
|
+
tiny_theme: StringConstructor;
|
|
28
|
+
tiny_chart_theme: ObjectConstructor;
|
|
29
|
+
}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}>, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
32
|
+
disabled: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: () => boolean;
|
|
35
|
+
};
|
|
36
|
+
clearable: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: () => boolean;
|
|
39
|
+
};
|
|
40
|
+
fetchCountry: FunctionConstructor;
|
|
41
|
+
fields: ObjectConstructor;
|
|
42
|
+
placeholder: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
default: () => string;
|
|
45
|
+
};
|
|
46
|
+
modelValue: {};
|
|
47
|
+
popperClass: StringConstructor;
|
|
48
|
+
popperAppendToBody: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: () => boolean;
|
|
51
|
+
};
|
|
52
|
+
size: StringConstructor;
|
|
53
|
+
tiny_mode: StringConstructor;
|
|
54
|
+
tiny_mode_root: BooleanConstructor;
|
|
55
|
+
tiny_template: (ObjectConstructor | FunctionConstructor)[];
|
|
56
|
+
tiny_renderless: FunctionConstructor;
|
|
57
|
+
tiny_theme: StringConstructor;
|
|
58
|
+
tiny_chart_theme: ObjectConstructor;
|
|
59
|
+
}>>, {
|
|
60
|
+
disabled: boolean;
|
|
61
|
+
tiny_mode_root: boolean;
|
|
62
|
+
popperAppendToBody: boolean;
|
|
63
|
+
clearable: boolean;
|
|
64
|
+
placeholder: string;
|
|
65
|
+
}, {}>;
|
|
2
66
|
export default _default;
|
package/src/pc.vue.d.ts
CHANGED
|
@@ -1,2 +1,67 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
|
|
2
|
+
disabled?: any;
|
|
3
|
+
size?: any;
|
|
4
|
+
tiny_mode?: any;
|
|
5
|
+
tiny_mode_root?: any;
|
|
6
|
+
tiny_template?: any;
|
|
7
|
+
tiny_renderless?: any;
|
|
8
|
+
_constants?: any;
|
|
9
|
+
tiny_theme?: any;
|
|
10
|
+
tiny_chart_theme?: any;
|
|
11
|
+
modelValue?: any;
|
|
12
|
+
popperClass?: any;
|
|
13
|
+
popperAppendToBody?: any;
|
|
14
|
+
clearable?: any;
|
|
15
|
+
fields?: any;
|
|
16
|
+
placeholder?: any;
|
|
17
|
+
fetchCountry?: any;
|
|
18
|
+
}>, {
|
|
19
|
+
t: (this: any, path: any, options?: any) => any;
|
|
20
|
+
vm: any;
|
|
21
|
+
f: (props: any, attrs?: {}) => {};
|
|
22
|
+
a: (attrs: any, filters: any, include: any) => {};
|
|
23
|
+
d: (props: any) => void;
|
|
24
|
+
dp: (props: any) => void;
|
|
25
|
+
gcls: (key: any) => any;
|
|
26
|
+
m: (...cssClasses: any[]) => string;
|
|
27
|
+
}, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("visible-change" | "change" | "clear" | "update:modelValue")[], "visible-change" | "change" | "clear" | "update:modelValue", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
|
|
28
|
+
disabled?: any;
|
|
29
|
+
size?: any;
|
|
30
|
+
tiny_mode?: any;
|
|
31
|
+
tiny_mode_root?: any;
|
|
32
|
+
tiny_template?: any;
|
|
33
|
+
tiny_renderless?: any;
|
|
34
|
+
_constants?: any;
|
|
35
|
+
tiny_theme?: any;
|
|
36
|
+
tiny_chart_theme?: any;
|
|
37
|
+
modelValue?: any;
|
|
38
|
+
popperClass?: any;
|
|
39
|
+
popperAppendToBody?: any;
|
|
40
|
+
clearable?: any;
|
|
41
|
+
fields?: any;
|
|
42
|
+
placeholder?: any;
|
|
43
|
+
fetchCountry?: any;
|
|
44
|
+
}>>> & {
|
|
45
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
"onVisible-change"?: ((...args: any[]) => any) | undefined;
|
|
47
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
readonly disabled?: any;
|
|
51
|
+
readonly size?: any;
|
|
52
|
+
readonly tiny_mode?: any;
|
|
53
|
+
readonly tiny_mode_root?: any;
|
|
54
|
+
readonly tiny_template?: any;
|
|
55
|
+
readonly tiny_renderless?: any;
|
|
56
|
+
readonly _constants?: any;
|
|
57
|
+
readonly tiny_theme?: any;
|
|
58
|
+
readonly tiny_chart_theme?: any;
|
|
59
|
+
readonly modelValue?: any;
|
|
60
|
+
readonly popperClass?: any;
|
|
61
|
+
readonly popperAppendToBody?: any;
|
|
62
|
+
readonly clearable?: any;
|
|
63
|
+
readonly fields?: any;
|
|
64
|
+
readonly placeholder?: any;
|
|
65
|
+
readonly fetchCountry?: any;
|
|
66
|
+
}, {}>;
|
|
2
67
|
export default _default;
|