@opentinyvue/vue-dropdown-menu 3.21.0 → 3.22.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/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
  }
@@ -96,7 +92,7 @@ var DropdownMenu = defineComponent({
96
92
  });
97
93
  }
98
94
  });
99
- var version = "3.21.0";
95
+ var version = "3.undefined";
100
96
  DropdownMenu.install = function(Vue) {
101
97
  Vue.component(DropdownMenu.name, DropdownMenu);
102
98
  };
package/package.json CHANGED
@@ -1,19 +1,17 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-dropdown-menu",
3
- "version": "3.21.0",
3
+ "version": "3.22.1",
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-renderless": "~3.21.0",
11
- "@opentinyvue/vue-common": "~3.21.0",
12
- "@opentinyvue/vue-icon": "~3.21.0",
13
- "@opentinyvue/vue-tooltip": "~3.21.0",
14
- "@opentinyvue/vue-theme-mobile": "~3.21.0",
15
- "@opentinyvue/vue-dropdown-item": "~3.21.0",
16
- "@opentinyvue/vue-theme": "~3.21.0"
10
+ "@opentinyvue/vue-renderless": "~3.22.0",
11
+ "@opentinyvue/vue-common": "~3.22.0",
12
+ "@opentinyvue/vue-tooltip": "~3.22.0",
13
+ "@opentinyvue/vue-dropdown-item": "~3.22.0",
14
+ "@opentinyvue/vue-theme": "~3.22.0"
17
15
  },
18
16
  "license": "MIT",
19
17
  "types": "index.d.ts",
package/src/index.d.ts CHANGED
@@ -193,6 +193,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
193
193
  tiny_theme: StringConstructor;
194
194
  tiny_chart_theme: ObjectConstructor;
195
195
  }>>, {
196
+ options: unknown[];
196
197
  tiny_mode_root: boolean;
197
198
  multiStage: boolean;
198
199
  checkedStatus: boolean;
@@ -205,7 +206,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
205
206
  duration: string | number;
206
207
  overlay: boolean;
207
208
  maxHeight: string | number;
208
- options: unknown[];
209
209
  textField: string;
210
210
  }, {}>;
211
211
  export default _default;
@@ -1,4 +1,5 @@
1
1
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ placement?: any;
2
3
  tiny_mode?: any;
3
4
  tiny_mode_root?: any;
4
5
  tiny_template?: any;
@@ -10,11 +11,11 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
10
11
  checkedStatus?: any;
11
12
  visibleArrow?: any;
12
13
  arrowOffset?: any;
13
- placement?: any;
14
14
  popperClass?: any;
15
15
  popperAppendToBody?: any;
16
16
  maxHeight?: any;
17
17
  }>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("created" | "menu-item-click")[], "created" | "menu-item-click", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
18
+ placement?: any;
18
19
  tiny_mode?: any;
19
20
  tiny_mode_root?: any;
20
21
  tiny_template?: any;
@@ -26,7 +27,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
26
27
  checkedStatus?: any;
27
28
  visibleArrow?: any;
28
29
  arrowOffset?: any;
29
- placement?: any;
30
30
  popperClass?: any;
31
31
  popperAppendToBody?: any;
32
32
  maxHeight?: any;
@@ -34,6 +34,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
34
34
  onCreated?: ((...args: any[]) => any) | undefined;
35
35
  "onMenu-item-click"?: ((...args: any[]) => any) | undefined;
36
36
  }, {
37
+ readonly placement?: any;
37
38
  readonly tiny_mode?: any;
38
39
  readonly tiny_mode_root?: any;
39
40
  readonly tiny_template?: any;
@@ -45,7 +46,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
45
46
  readonly checkedStatus?: any;
46
47
  readonly visibleArrow?: any;
47
48
  readonly arrowOffset?: any;
48
- readonly placement?: any;
49
49
  readonly popperClass?: any;
50
50
  readonly popperAppendToBody?: any;
51
51
  readonly maxHeight?: any;
package/src/pc.vue.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import type { IDropdownMenuApi } from '@opentinyvue/vue-renderless/types/dropdown-menu.type';
2
2
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
+ options?: any;
4
+ placement?: any;
3
5
  tiny_mode?: any;
4
6
  tiny_mode_root?: any;
5
7
  tiny_template?: any;
@@ -10,12 +12,12 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
10
12
  checkedStatus?: any;
11
13
  visibleArrow?: any;
12
14
  arrowOffset?: any;
13
- placement?: any;
14
15
  popperClass?: any;
15
16
  popperAppendToBody?: any;
16
- options?: any;
17
17
  textField?: any;
18
- }>, IDropdownMenuApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("click" | "mouseenter" | "mouseleave" | "update:modelValue" | "created")[], "click" | "mouseenter" | "mouseleave" | "update:modelValue" | "created", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
18
+ }>, IDropdownMenuApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("click" | "mouseenter" | "mouseleave" | "created" | "update:modelValue")[], "click" | "mouseenter" | "mouseleave" | "created" | "update:modelValue", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
19
+ options?: any;
20
+ placement?: any;
19
21
  tiny_mode?: any;
20
22
  tiny_mode_root?: any;
21
23
  tiny_template?: any;
@@ -26,10 +28,8 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
26
28
  checkedStatus?: any;
27
29
  visibleArrow?: any;
28
30
  arrowOffset?: any;
29
- placement?: any;
30
31
  popperClass?: any;
31
32
  popperAppendToBody?: any;
32
- options?: any;
33
33
  textField?: any;
34
34
  }>>> & {
35
35
  onClick?: ((...args: any[]) => any) | undefined;
@@ -38,6 +38,8 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
38
38
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
39
39
  onCreated?: ((...args: any[]) => any) | undefined;
40
40
  }, {
41
+ readonly options?: any;
42
+ readonly placement?: any;
41
43
  readonly tiny_mode?: any;
42
44
  readonly tiny_mode_root?: any;
43
45
  readonly tiny_template?: any;
@@ -48,10 +50,8 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
48
50
  readonly checkedStatus?: any;
49
51
  readonly visibleArrow?: any;
50
52
  readonly arrowOffset?: any;
51
- readonly placement?: any;
52
53
  readonly popperClass?: any;
53
54
  readonly popperAppendToBody?: any;
54
- readonly options?: any;
55
55
  readonly textField?: any;
56
56
  }, {}>;
57
57
  export default _default;
package/lib/mobile.js DELETED
@@ -1,147 +0,0 @@
1
- import { renderless, api } from '@opentinyvue/vue-renderless/dropdown-menu/vue';
2
- import { defineComponent, props, directive, setup } from '@opentinyvue/vue-common';
3
- import { iconUp, iconDown, iconUnfilter, iconSort, iconDeltaDown, iconDeltaUp } from '@opentinyvue/vue-icon';
4
- import Clickoutside from '@opentinyvue/vue-renderless/common/deps/clickoutside';
5
- import '@opentinyvue/vue-theme-mobile/dropdown-menu/index.css';
6
- import { resolveComponent, resolveDirective, openBlock, createElementBlock, createElementVNode, Fragment, renderList, withDirectives, normalizeClass, normalizeStyle, toDisplayString, createVNode, createBlock, resolveDynamicComponent, renderSlot } from 'vue';
7
-
8
- function _createForOfIteratorHelperLoose(r, e) {
9
- var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
10
- if (t) return (t = t.call(r)).next.bind(t);
11
- if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
12
- t && (r = t);
13
- var o = 0;
14
- return function() {
15
- return o >= r.length ? { done: true } : { done: false, value: r[o++] };
16
- };
17
- }
18
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
19
- }
20
- function _unsupportedIterableToArray(r, a) {
21
- if (r) {
22
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
23
- var t = {}.toString.call(r).slice(8, -1);
24
- 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;
25
- }
26
- }
27
- function _arrayLikeToArray(r, a) {
28
- (null == a || a > r.length) && (a = r.length);
29
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
30
- return n;
31
- }
32
- var _export_sfc = function _export_sfc2(sfc, props) {
33
- var target = sfc.__vccOpts || sfc;
34
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
35
- var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
36
- target[key] = val;
37
- }
38
- return target;
39
- };
40
-
41
- var _sfc_main = defineComponent({
42
- props: [].concat(props, ["activeColor", "closeOnClickOutside", "closeOnClickOverlay", "direction", "duration", "overlay", "zIndex"]),
43
- components: {
44
- IconUp: iconUp(),
45
- IconDown: iconDown(),
46
- IconUnfilter: iconUnfilter(),
47
- IconSort: iconSort(),
48
- IconDeltaDown: iconDeltaDown(),
49
- IconDeltaUp: iconDeltaUp()
50
- },
51
- directives: directive({
52
- Clickoutside
53
- }),
54
- emits: ["open", "created"],
55
- setup: function setup$1(props2, context) {
56
- return setup({
57
- props: props2,
58
- context,
59
- renderless,
60
- api
61
- });
62
- }
63
- });
64
- var _hoisted_1 = {
65
- ref: "menu",
66
- class: "tiny-mobile-dropdown-menu"
67
- };
68
- var _hoisted_2 = {
69
- class: "tiny-mobile-dropdown-menu__bar tiny-mobile-dropdown-menu__bar--opened"
70
- };
71
- var _hoisted_3 = ["tabindex", "onClick"];
72
- var _hoisted_4 = {
73
- class: "tiny-mobile-dropdown-menu__title-wrap"
74
- };
75
- var _hoisted_5 = {
76
- key: 0
77
- };
78
- var _hoisted_6 = {
79
- class: "tiny-mobile-dropdown-menu__title-text"
80
- };
81
- var _hoisted_7 = {
82
- key: 0,
83
- class: "tiny-mobile-dropdown-menu__title-icon"
84
- };
85
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
86
- var _component_icon_delta_up = resolveComponent("icon-delta-up");
87
- var _component_icon_delta_down = resolveComponent("icon-delta-down");
88
- var _directive_clickoutside = resolveDirective("clickoutside");
89
- return openBlock(), createElementBlock(
90
- "div",
91
- _hoisted_1,
92
- [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(
93
- Fragment,
94
- null,
95
- renderList(_ctx.state.children, function(item, index) {
96
- return withDirectives((openBlock(), createElementBlock("div", {
97
- key: index,
98
- role: "button",
99
- tabindex: item.disabled ? -1 : 0,
100
- class: normalizeClass(["tiny-mobile-dropdown-menu__item", [item.disabled ? "is-disabled" : "", item.titleClass]]),
101
- onClick: function onClick($event) {
102
- return _ctx.toggleItem(index, item);
103
- }
104
- }, [createElementVNode(
105
- "div",
106
- {
107
- class: normalizeClass(["tiny-mobile-dropdown-menu__title", {
108
- "is-active": item.state.showPopup,
109
- "is-down": item.state.showPopup === (_ctx.direction === "down")
110
- }]),
111
- style: normalizeStyle({
112
- color: item.state.showPopup ? _ctx.activeColor : ""
113
- })
114
- },
115
- [createElementVNode("div", _hoisted_4, [!_ctx.slots.title ? (openBlock(), createElementBlock("span", _hoisted_5, [createElementVNode(
116
- "span",
117
- _hoisted_6,
118
- toDisplayString(item.state.displayTitle),
119
- 1
120
- /* TEXT */
121
- ), item.type === "sort" ? (openBlock(), createElementBlock("span", _hoisted_7, [createVNode(_component_icon_delta_up, {
122
- class: "up",
123
- fill: item.state.sort === "asc" ? _ctx.activeColor ? _ctx.activeColor : "#f36f64" : "#ccc"
124
- }, null, 8, ["fill"]), createVNode(_component_icon_delta_down, {
125
- class: "down",
126
- fill: item.state.sort === "desc" ? _ctx.activeColor ? _ctx.activeColor : "#f36f64" : "#ccc"
127
- }, null, 8, ["fill"])])) : (openBlock(), createBlock(resolveDynamicComponent(item.type === "filter" ? "IconUnfilter" : item.type === "selection" && item.state.showPopup ? "IconUp" : "IconDown"), {
128
- key: 1,
129
- fill: item.state.showPopup ? _ctx.activeColor ? _ctx.activeColor : "#f36f64" : "#ccc",
130
- class: normalizeClass([item.type === "filter" ? "filter-icon" : ""])
131
- }, null, 8, ["fill", "class"]))])) : renderSlot(_ctx.$slots, "title", {
132
- key: 1
133
- })])],
134
- 6
135
- /* CLASS, STYLE */
136
- )], 10, _hoisted_3)), [[_directive_clickoutside, _ctx.clickOutside]]);
137
- }),
138
- 128
139
- /* KEYED_FRAGMENT */
140
- ))]), renderSlot(_ctx.$slots, "default")],
141
- 512
142
- /* NEED_PATCH */
143
- );
144
- }
145
- var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
146
-
147
- export { mobile as default };
@@ -1,59 +0,0 @@
1
- declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- tiny_mode?: any;
3
- tiny_mode_root?: any;
4
- tiny_template?: any;
5
- tiny_renderless?: any;
6
- _constants?: any;
7
- tiny_theme?: any;
8
- tiny_chart_theme?: any;
9
- activeColor?: any;
10
- closeOnClickOutside?: any;
11
- closeOnClickOverlay?: any;
12
- direction?: any;
13
- duration?: any;
14
- overlay?: any;
15
- zIndex?: 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, ("created" | "open")[], "created" | "open", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
26
- tiny_mode?: any;
27
- tiny_mode_root?: any;
28
- tiny_template?: any;
29
- tiny_renderless?: any;
30
- _constants?: any;
31
- tiny_theme?: any;
32
- tiny_chart_theme?: any;
33
- activeColor?: any;
34
- closeOnClickOutside?: any;
35
- closeOnClickOverlay?: any;
36
- direction?: any;
37
- duration?: any;
38
- overlay?: any;
39
- zIndex?: any;
40
- }>>> & {
41
- onCreated?: ((...args: any[]) => any) | undefined;
42
- onOpen?: ((...args: any[]) => any) | undefined;
43
- }, {
44
- readonly tiny_mode?: any;
45
- readonly tiny_mode_root?: any;
46
- readonly tiny_template?: any;
47
- readonly tiny_renderless?: any;
48
- readonly _constants?: any;
49
- readonly tiny_theme?: any;
50
- readonly tiny_chart_theme?: any;
51
- readonly activeColor?: any;
52
- readonly closeOnClickOutside?: any;
53
- readonly closeOnClickOverlay?: any;
54
- readonly direction?: any;
55
- readonly duration?: any;
56
- readonly overlay?: any;
57
- readonly zIndex?: any;
58
- }, {}>;
59
- export default _default;