@opentinyvue/vue-dropdown-item 3.21.0 → 3.22.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 CHANGED
@@ -7,9 +7,8 @@ function _extends() {
7
7
  return n;
8
8
  }, _extends.apply(null, arguments);
9
9
  }
10
- import { defineComponent, $prefix, $setup, $props } from "@opentinyvue/vue-common";
10
+ import { defineComponent, $props, $setup, $prefix } from "@opentinyvue/vue-common";
11
11
  import PcTemplate from "./pc.js";
12
- import MobileTemplate from "./mobile.js";
13
12
  import MobileFirstTemplate from "./mobile-first.js";
14
13
  var template = function template2(mode) {
15
14
  var _process$env;
@@ -17,9 +16,6 @@ var template = function template2(mode) {
17
16
  if ("pc" === (tinyMode || mode)) {
18
17
  return PcTemplate;
19
18
  }
20
- if ("mobile" === (tinyMode || mode)) {
21
- return MobileTemplate;
22
- }
23
19
  if ("mobile-first" === (tinyMode || mode)) {
24
20
  return MobileFirstTemplate;
25
21
  }
@@ -118,7 +114,7 @@ var DropdownItem = defineComponent({
118
114
  });
119
115
  }
120
116
  });
121
- var version = "3.21.0";
117
+ var version = "3.22.0";
122
118
  DropdownItem.model = {
123
119
  prop: "modelValue",
124
120
  event: "update:modelValue"
package/package.json CHANGED
@@ -1,21 +1,18 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-dropdown-item",
3
3
  "type": "module",
4
- "version": "3.21.0",
4
+ "version": "3.22.0",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
8
8
  "main": "./lib/index.js",
9
9
  "module": "./lib/index.js",
10
10
  "dependencies": {
11
- "@opentinyvue/vue-button": "~3.21.0",
12
- "@opentinyvue/vue-common": "~3.21.0",
13
- "@opentinyvue/vue-directive": "~3.21.0",
14
- "@opentinyvue/vue-icon": "~3.21.0",
15
- "@opentinyvue/vue-popup": "~3.21.0",
16
- "@opentinyvue/vue-renderless": "~3.21.0",
17
- "@opentinyvue/vue-theme": "~3.21.0",
18
- "@opentinyvue/vue-theme-mobile": "~3.21.0"
11
+ "@opentinyvue/vue-common": "~3.22.0",
12
+ "@opentinyvue/vue-directive": "~3.22.0",
13
+ "@opentinyvue/vue-icon": "~3.22.0",
14
+ "@opentinyvue/vue-renderless": "~3.22.0",
15
+ "@opentinyvue/vue-theme": "~3.22.0"
19
16
  },
20
17
  "types": "index.d.ts",
21
18
  "scripts": {
package/src/index.d.ts CHANGED
@@ -244,17 +244,17 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
244
244
  divided: boolean;
245
245
  type: string;
246
246
  selected: boolean;
247
+ options: unknown[];
248
+ appendToBody: boolean;
247
249
  tiny_mode_root: boolean;
248
250
  _constants: Record<string, any>;
249
251
  effect: string;
250
252
  multiStage: boolean;
251
- options: unknown[];
252
253
  textField: string;
253
254
  itemData: string | Record<string, any>;
254
255
  selectedField: string;
255
256
  currentIndex: number;
256
257
  tooltipContent: string;
257
- appendToBody: boolean;
258
258
  tip: string | Function;
259
259
  tipPosition: string;
260
260
  }, {}>;
@@ -3,6 +3,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
3
  disabled?: any;
4
4
  icon?: any;
5
5
  selected?: any;
6
+ level?: any;
6
7
  tiny_mode?: any;
7
8
  tiny_mode_root?: any;
8
9
  tiny_template?: any;
@@ -11,7 +12,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
11
12
  tiny_theme?: any;
12
13
  tiny_chart_theme?: any;
13
14
  itemData?: any;
14
- level?: any;
15
15
  currentIndex?: any;
16
16
  tooltipContent?: any;
17
17
  }>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("change" | "close" | "reset" | "update:modelValue" | "confirm" | "open" | "closed" | "opened")[], "change" | "close" | "reset" | "update:modelValue" | "confirm" | "open" | "closed" | "opened", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
@@ -19,6 +19,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
19
19
  disabled?: any;
20
20
  icon?: any;
21
21
  selected?: any;
22
+ level?: any;
22
23
  tiny_mode?: any;
23
24
  tiny_mode_root?: any;
24
25
  tiny_template?: any;
@@ -27,7 +28,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
27
28
  tiny_theme?: any;
28
29
  tiny_chart_theme?: any;
29
30
  itemData?: any;
30
- level?: any;
31
31
  currentIndex?: any;
32
32
  tooltipContent?: any;
33
33
  }>>> & {
@@ -44,6 +44,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
44
44
  readonly disabled?: any;
45
45
  readonly icon?: any;
46
46
  readonly selected?: any;
47
+ readonly level?: any;
47
48
  readonly tiny_mode?: any;
48
49
  readonly tiny_mode_root?: any;
49
50
  readonly tiny_template?: any;
@@ -52,7 +53,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
52
53
  readonly tiny_theme?: any;
53
54
  readonly tiny_chart_theme?: any;
54
55
  readonly itemData?: any;
55
- readonly level?: any;
56
56
  readonly currentIndex?: any;
57
57
  readonly tooltipContent?: any;
58
58
  }, {}>;
package/src/pc.vue.d.ts CHANGED
@@ -7,6 +7,8 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
7
7
  type?: any;
8
8
  title?: any;
9
9
  selected?: any;
10
+ options?: any;
11
+ appendToBody?: any;
10
12
  tiny_mode?: any;
11
13
  tiny_mode_root?: any;
12
14
  tiny_template?: any;
@@ -16,13 +18,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
16
18
  tiny_chart_theme?: any;
17
19
  effect?: any;
18
20
  multiStage?: any;
19
- options?: any;
20
21
  textField?: any;
21
22
  itemData?: any;
22
23
  titleClass?: any;
23
24
  selectedField?: any;
24
25
  currentIndex?: any;
25
- appendToBody?: any;
26
26
  tip?: any;
27
27
  tipPosition?: any;
28
28
  isMono?: any;
@@ -34,6 +34,8 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
34
34
  type?: any;
35
35
  title?: any;
36
36
  selected?: any;
37
+ options?: any;
38
+ appendToBody?: any;
37
39
  tiny_mode?: any;
38
40
  tiny_mode_root?: any;
39
41
  tiny_template?: any;
@@ -43,13 +45,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
43
45
  tiny_chart_theme?: any;
44
46
  effect?: any;
45
47
  multiStage?: any;
46
- options?: any;
47
48
  textField?: any;
48
49
  itemData?: any;
49
50
  titleClass?: any;
50
51
  selectedField?: any;
51
52
  currentIndex?: any;
52
- appendToBody?: any;
53
53
  tip?: any;
54
54
  tipPosition?: any;
55
55
  isMono?: any;
@@ -71,6 +71,8 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
71
71
  readonly type?: any;
72
72
  readonly title?: any;
73
73
  readonly selected?: any;
74
+ readonly options?: any;
75
+ readonly appendToBody?: any;
74
76
  readonly tiny_mode?: any;
75
77
  readonly tiny_mode_root?: any;
76
78
  readonly tiny_template?: any;
@@ -80,13 +82,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
80
82
  readonly tiny_chart_theme?: any;
81
83
  readonly effect?: any;
82
84
  readonly multiStage?: any;
83
- readonly options?: any;
84
85
  readonly textField?: any;
85
86
  readonly itemData?: any;
86
87
  readonly titleClass?: any;
87
88
  readonly selectedField?: any;
88
89
  readonly currentIndex?: any;
89
- readonly appendToBody?: any;
90
90
  readonly tip?: any;
91
91
  readonly tipPosition?: any;
92
92
  readonly isMono?: any;
package/lib/mobile.js DELETED
@@ -1,219 +0,0 @@
1
- import { renderless, api } from '@opentinyvue/vue-renderless/dropdown-item/vue';
2
- import { defineComponent, directive, props, setup } from '@opentinyvue/vue-common';
3
- import { iconYes } from '@opentinyvue/vue-icon';
4
- import Popup from '@opentinyvue/vue-popup';
5
- import Button from '@opentinyvue/vue-button';
6
- import Clickoutside from '@opentinyvue/vue-renderless/common/deps/clickoutside';
7
- import '@opentinyvue/vue-theme-mobile/dropdown-item/index.css';
8
- import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, withCtx, renderSlot, Fragment, renderList, createElementVNode, createBlock, resolveDynamicComponent, toDisplayString, createCommentVNode, createTextVNode, vShow } from 'vue';
9
-
10
- function _createForOfIteratorHelperLoose(r, e) {
11
- var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
12
- if (t) return (t = t.call(r)).next.bind(t);
13
- if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
14
- t && (r = t);
15
- var o = 0;
16
- return function() {
17
- return o >= r.length ? { done: true } : { done: false, value: r[o++] };
18
- };
19
- }
20
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
21
- }
22
- function _unsupportedIterableToArray(r, a) {
23
- if (r) {
24
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
25
- var t = {}.toString.call(r).slice(8, -1);
26
- 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;
27
- }
28
- }
29
- function _arrayLikeToArray(r, a) {
30
- (null == a || a > r.length) && (a = r.length);
31
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
32
- return n;
33
- }
34
- var _export_sfc = function _export_sfc2(sfc, props) {
35
- var target = sfc.__vccOpts || sfc;
36
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
37
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
38
- target[key] = val;
39
- }
40
- return target;
41
- };
42
-
43
- var _sfc_main = defineComponent({
44
- directives: directive({
45
- Clickoutside
46
- }),
47
- props: [].concat(props, ["modelValue", "title", "disabled", "titleClass", "options", "icon", "type"]),
48
- components: {
49
- IconYes: iconYes(),
50
- TinyPopup: Popup,
51
- TinyButton: Button
52
- },
53
- emits: ["update:modelValue", "open", "opened", "click", "change", "closed", "close", "reset", "confirm", "item-click"],
54
- setup: function setup$1(props2, context) {
55
- return setup({
56
- props: props2,
57
- context,
58
- renderless,
59
- api
60
- });
61
- }
62
- });
63
- var _hoisted_1 = {
64
- key: 0,
65
- class: "tiny-mobile-dropdown-item__options"
66
- };
67
- var _hoisted_2 = ["onClick"];
68
- var _hoisted_3 = {
69
- class: "tiny-mobile-dropdown-item__option-icon"
70
- };
71
- var _hoisted_4 = {
72
- class: "tiny-mobile-dropdown-item__option-title"
73
- };
74
- var _hoisted_5 = {
75
- class: "tiny-mobile-dropdown-item__option-value"
76
- };
77
- var _hoisted_6 = {
78
- key: 1,
79
- class: "tiny-mobile-dropdown-item__filter"
80
- };
81
- var _hoisted_7 = {
82
- class: "tiny-mobile-dropdown-item__filter-wrap"
83
- };
84
- var _hoisted_8 = {
85
- class: "tiny-mobile-dropdown-item__filter-title"
86
- };
87
- var _hoisted_9 = ["onClick"];
88
- var _hoisted_10 = {
89
- class: "tiny-mobile-dropdown-item__filter-operate"
90
- };
91
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
92
- var _component_icon_yes = resolveComponent("icon-yes");
93
- var _component_tiny_button = resolveComponent("tiny-button");
94
- var _component_tiny_popup = resolveComponent("tiny-popup");
95
- var _directive_clickoutside = resolveDirective("clickoutside");
96
- return withDirectives((openBlock(), createElementBlock(
97
- "div",
98
- {
99
- ref: "wrapper",
100
- class: normalizeClass(["tiny-mobile-dropdown-item--" + _ctx.state.direction, "tiny-mobile-dropdown-item"]),
101
- onClick: _cache[1] || (_cache[1] = function() {
102
- return _ctx.clickWrapper && _ctx.clickWrapper.apply(_ctx, arguments);
103
- }),
104
- style: normalizeStyle(_ctx.state.itemStyle)
105
- },
106
- [createVNode(_component_tiny_popup, {
107
- modelValue: _ctx.state.showPopup,
108
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
109
- return _ctx.state.showPopup = $event;
110
- }),
111
- "popup-class": "tiny-mobile-dropdown-item__content",
112
- overlay: _ctx.state.overlay,
113
- "close-on-click-overlay": _ctx.state.closeOnClickOverlay,
114
- closeable: false,
115
- position: _ctx.state.direction === "down" ? "top" : "bottom",
116
- duration: _ctx.state.transition ? _ctx.state.duration : 0,
117
- onOpen: _ctx.open,
118
- onClose: _ctx.close,
119
- onOpened: _ctx.opened,
120
- onClosed: _ctx.closed
121
- }, {
122
- default: withCtx(function() {
123
- return [renderSlot(_ctx.$slots, "default", {}, function() {
124
- return [_ctx.type === "selection" ? (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(
125
- Fragment,
126
- null,
127
- renderList(_ctx.options, function(item, index) {
128
- return openBlock(), createElementBlock("div", {
129
- class: normalizeClass(["tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__option", item.value === _ctx.modelValue ? "is-active" : ""]),
130
- key: index,
131
- tabindex: "0",
132
- onClick: function onClick($event) {
133
- return _ctx.clickItem(item.value);
134
- }
135
- }, [createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "icon", {}, function() {
136
- return [(openBlock(), createBlock(resolveDynamicComponent(_ctx.icon)))];
137
- })]), createElementVNode("div", _hoisted_4, [renderSlot(_ctx.$slots, "title", {
138
- titleData: item
139
- }, function() {
140
- return [createElementVNode(
141
- "span",
142
- {
143
- style: normalizeStyle({
144
- color: item.value === _ctx.modelValue && _ctx.state.activeColor ? _ctx.state.activeColor : ""
145
- })
146
- },
147
- toDisplayString(item.text),
148
- 5
149
- /* TEXT, STYLE */
150
- )];
151
- })]), createElementVNode("div", _hoisted_5, [item.value === _ctx.modelValue ? (openBlock(), createBlock(_component_icon_yes, {
152
- key: 0,
153
- fill: _ctx.state.activeColor ? _ctx.state.activeColor : "#f36f64"
154
- }, null, 8, ["fill"])) : createCommentVNode("v-if", true)])], 10, _hoisted_2);
155
- }),
156
- 128
157
- /* KEYED_FRAGMENT */
158
- ))])) : createCommentVNode("v-if", true), _ctx.type === "filter" ? withDirectives((openBlock(), createElementBlock("div", _hoisted_6, [createElementVNode("div", _hoisted_7, [(openBlock(true), createElementBlock(
159
- Fragment,
160
- null,
161
- renderList(_ctx.options, function(item, key) {
162
- return openBlock(), createElementBlock("div", {
163
- key,
164
- class: "tiny-mobile-dropdown-item__cell tiny-mobile-dropdown-item__filter-item"
165
- }, [createElementVNode(
166
- "span",
167
- _hoisted_8,
168
- toDisplayString(item.title),
169
- 1
170
- /* TEXT */
171
- ), createElementVNode("ul", null, [(openBlock(true), createElementBlock(
172
- Fragment,
173
- null,
174
- renderList(_ctx.options.length === 0 ? item.data = [] : item.data, function(tag, tagkey) {
175
- return openBlock(), createElementBlock("li", {
176
- class: normalizeClass(["tiny-mobile-dropdown-item__filter-li", [_ctx.modelValue[key].indexOf(tag.value) > -1 ? "checked" : ""]]),
177
- style: normalizeStyle(_ctx.getOptionStyle(tag, _ctx.modelValue[key])),
178
- onClick: function onClick($event) {
179
- return _ctx.tagClick(key, tag, $event);
180
- },
181
- key: tagkey
182
- }, toDisplayString(tag.text), 15, _hoisted_9);
183
- }),
184
- 128
185
- /* KEYED_FRAGMENT */
186
- ))])]);
187
- }),
188
- 128
189
- /* KEYED_FRAGMENT */
190
- ))]), createElementVNode("div", _hoisted_10, [createVNode(_component_tiny_button, {
191
- onClick: _ctx.reset
192
- }, {
193
- default: withCtx(function() {
194
- return [createTextVNode(" Reset ")];
195
- }),
196
- _: 1
197
- /* STABLE */
198
- }, 8, ["onClick"]), createVNode(_component_tiny_button, {
199
- type: "primary",
200
- onClick: _ctx.confirm
201
- }, {
202
- default: withCtx(function() {
203
- return [createTextVNode(" OK ")];
204
- }),
205
- _: 1
206
- /* STABLE */
207
- }, 8, ["onClick"])])])), [[_directive_clickoutside, _ctx.clickOutside]]) : createCommentVNode("v-if", true)];
208
- })];
209
- }),
210
- _: 3
211
- /* FORWARDED */
212
- }, 8, ["modelValue", "overlay", "close-on-click-overlay", "position", "duration", "onOpen", "onClose", "onOpened", "onClosed"])],
213
- 6
214
- /* CLASS, STYLE */
215
- )), [[vShow, _ctx.state.showWrapper]]);
216
- }
217
- var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
218
-
219
- export { mobile as default };
@@ -1,67 +0,0 @@
1
- declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- disabled?: any;
3
- icon?: any;
4
- type?: any;
5
- title?: any;
6
- tiny_mode?: any;
7
- tiny_mode_root?: any;
8
- tiny_template?: any;
9
- tiny_renderless?: any;
10
- _constants?: any;
11
- tiny_theme?: any;
12
- tiny_chart_theme?: any;
13
- modelValue?: any;
14
- options?: any;
15
- titleClass?: any;
16
- }>, {
17
- t: (this: any, path: any, options?: any) => any;
18
- vm: any;
19
- f: (props: any, attrs?: {}) => {};
20
- a: (attrs: any, filters: any, include: any) => {};
21
- d: (props: any) => void;
22
- dp: (props: any) => void;
23
- gcls: (key: any) => any;
24
- m: (...cssClasses: any[]) => string;
25
- }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("item-click" | "change" | "click" | "close" | "reset" | "update:modelValue" | "confirm" | "open" | "closed" | "opened")[], "item-click" | "change" | "click" | "close" | "reset" | "update:modelValue" | "confirm" | "open" | "closed" | "opened", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
26
- disabled?: any;
27
- icon?: any;
28
- type?: any;
29
- title?: 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
- options?: any;
39
- titleClass?: any;
40
- }>>> & {
41
- onChange?: ((...args: any[]) => any) | undefined;
42
- onClick?: ((...args: any[]) => any) | undefined;
43
- onClose?: ((...args: any[]) => any) | undefined;
44
- onReset?: ((...args: any[]) => any) | undefined;
45
- "onItem-click"?: ((...args: any[]) => any) | undefined;
46
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
47
- onConfirm?: ((...args: any[]) => any) | undefined;
48
- onOpen?: ((...args: any[]) => any) | undefined;
49
- onClosed?: ((...args: any[]) => any) | undefined;
50
- onOpened?: ((...args: any[]) => any) | undefined;
51
- }, {
52
- readonly disabled?: any;
53
- readonly icon?: any;
54
- readonly type?: any;
55
- readonly title?: any;
56
- readonly tiny_mode?: any;
57
- readonly tiny_mode_root?: any;
58
- readonly tiny_template?: any;
59
- readonly tiny_renderless?: any;
60
- readonly _constants?: any;
61
- readonly tiny_theme?: any;
62
- readonly tiny_chart_theme?: any;
63
- readonly modelValue?: any;
64
- readonly options?: any;
65
- readonly titleClass?: any;
66
- }, {}>;
67
- export default _default;