@opentiny/vue-dropdown-item 3.10.0 → 3.11.0-alpha.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
@@ -12,7 +12,7 @@ function _extends() {
12
12
  };
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
- import { defineComponent, $prefix, $props, $setup } from "@opentiny/vue-common";
15
+ import { defineComponent, $prefix, $setup, $props } from "@opentiny/vue-common";
16
16
  import PcTemplate from "./pc.js";
17
17
  import MobileTemplate from "./mobile.js";
18
18
  import MobileFirstTemplate from "./mobile-first.js";
@@ -33,75 +33,76 @@ var $constants = {
33
33
  leftWardArrow: "icon-delta-left"
34
34
  }
35
35
  };
36
+ var dropdownItemProps = _extends({}, $props, {
37
+ _constants: {
38
+ type: Object,
39
+ default: function _default() {
40
+ return $constants;
41
+ }
42
+ },
43
+ icon: [String, Object],
44
+ disabled: Boolean,
45
+ divided: Boolean,
46
+ itemData: {
47
+ type: [String, Object],
48
+ default: ""
49
+ },
50
+ title: String,
51
+ label: {
52
+ type: String,
53
+ default: ""
54
+ },
55
+ level: String,
56
+ titleClass: String,
57
+ options: {
58
+ type: Array,
59
+ default: function _default2() {
60
+ return [];
61
+ }
62
+ },
63
+ type: {
64
+ type: String,
65
+ default: "selection"
66
+ },
67
+ selected: {
68
+ type: Boolean,
69
+ default: false
70
+ },
71
+ selectedField: {
72
+ type: String,
73
+ default: "selected"
74
+ },
75
+ multiStage: {
76
+ type: Boolean,
77
+ default: false
78
+ },
79
+ currentIndex: {
80
+ type: Number,
81
+ default: function _default3() {
82
+ return -1;
83
+ }
84
+ },
85
+ appendToBody: {
86
+ type: Boolean,
87
+ default: true
88
+ },
89
+ textField: {
90
+ type: String,
91
+ default: "label"
92
+ },
93
+ tip: {
94
+ type: [String, Function],
95
+ default: ""
96
+ },
97
+ tipPosition: {
98
+ type: String,
99
+ default: "right"
100
+ }
101
+ });
36
102
  var DropdownItem = defineComponent({
37
103
  name: $prefix + "DropdownItem",
38
104
  componentName: "TinyDropdownItem",
39
- props: _extends({}, $props, {
40
- _constants: {
41
- type: Object,
42
- default: function _default() {
43
- return $constants;
44
- }
45
- },
46
- icon: [String, Object],
47
- disabled: Boolean,
48
- divided: Boolean,
49
- itemData: {
50
- type: [String, Object],
51
- default: ""
52
- },
53
- title: String,
54
- label: {
55
- type: String,
56
- default: ""
57
- },
58
- level: String,
59
- titleClass: String,
60
- options: {
61
- type: Array,
62
- default: function _default2() {
63
- return [];
64
- }
65
- },
66
- type: {
67
- type: String,
68
- default: "selection"
69
- },
70
- selected: {
71
- type: Boolean,
72
- default: false
73
- },
74
- selectedField: {
75
- type: String,
76
- default: "selected"
77
- },
78
- multiStage: {
79
- type: Boolean,
80
- default: false
81
- },
82
- currentIndex: {
83
- type: Number,
84
- default: function _default3() {
85
- return -1;
86
- }
87
- },
88
- appendToBody: {
89
- type: Boolean,
90
- default: true
91
- },
92
- textField: {
93
- type: String,
94
- default: "label"
95
- },
96
- tip: {
97
- type: [String, Function],
98
- default: ""
99
- },
100
- tipPosition: {
101
- type: String,
102
- default: "right"
103
- }
104
- }),
105
+ props: dropdownItemProps,
105
106
  setup: function setup(props, context) {
106
107
  return $setup({
107
108
  props,
@@ -110,7 +111,7 @@ var DropdownItem = defineComponent({
110
111
  });
111
112
  }
112
113
  });
113
- var version = "3.10.0";
114
+ var version = "3.11.0-alpha.0";
114
115
  DropdownItem.model = {
115
116
  prop: "modelValue",
116
117
  event: "update:modelValue"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";
2
2
  import { renderless, api } from "@opentiny/vue-renderless/dropdown-item/mf";
3
3
  import { openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, createBlock, resolveDynamicComponent, createCommentVNode, renderSlot } from "vue";
4
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
4
+ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
5
5
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
6
6
  if (it)
7
7
  return (it = it.call(o)).next.bind(it);
@@ -39,7 +39,7 @@ function _arrayLikeToArray(arr, len) {
39
39
  }
40
40
  var _export_sfc = function _export_sfc2(sfc, props) {
41
41
  var target = sfc.__vccOpts || sfc;
42
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
42
+ for (var _iterator = _createForOfIteratorHelperLoose_tiny(props), _step; !(_step = _iterator()).done; ) {
43
43
  var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
44
44
  target[key] = val;
45
45
  }
package/lib/mobile.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { renderless, api } from "@opentiny/vue-renderless/dropdown-item/vue";
2
- import { defineComponent, props, setup as _setup } from "@opentiny/vue-common";
2
+ import { defineComponent, directive, props, setup as _setup } from "@opentiny/vue-common";
3
3
  import { iconYes } from "@opentiny/vue-icon";
4
4
  import Popup from "@opentiny/vue-popup";
5
5
  import Button from "@opentiny/vue-button";
6
6
  import Clickoutside from "@opentiny/vue-renderless/common/deps/clickoutside";
7
7
  import "@opentiny/vue-theme-mobile/dropdown-item/index.css";
8
8
  import { resolveComponent, resolveDirective, withDirectives, openBlock, createElementBlock, normalizeClass, normalizeStyle, createVNode, withCtx, renderSlot, Fragment, renderList, createElementVNode, createBlock, resolveDynamicComponent, toDisplayString, createCommentVNode, createTextVNode, vShow } from "vue";
9
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
9
+ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
10
10
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
11
11
  if (it)
12
12
  return (it = it.call(o)).next.bind(it);
@@ -44,7 +44,7 @@ function _arrayLikeToArray(arr, len) {
44
44
  }
45
45
  var _export_sfc = function _export_sfc2(sfc, props) {
46
46
  var target = sfc.__vccOpts || sfc;
47
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
47
+ for (var _iterator = _createForOfIteratorHelperLoose_tiny(props), _step; !(_step = _iterator()).done; ) {
48
48
  var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
49
49
  target[key] = val;
50
50
  }
@@ -52,9 +52,9 @@ var _export_sfc = function _export_sfc2(sfc, props) {
52
52
  };
53
53
 
54
54
  var _sfc_main = defineComponent({
55
- directives: {
55
+ directives: directive({
56
56
  Clickoutside
57
- },
57
+ }),
58
58
  props: [].concat(props, ["modelValue", "title", "disabled", "titleClass", "options", "icon", "type"]),
59
59
  components: {
60
60
  IconYes: iconYes(),
package/lib/pc.js CHANGED
@@ -4,7 +4,7 @@ import { iconDeltaLeft } from "@opentiny/vue-icon";
4
4
  import Tooltip from "@opentiny/vue-tooltip";
5
5
  import "@opentiny/vue-theme/dropdown-item/index.css";
6
6
  import { resolveComponent, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, renderSlot, toDisplayString, Fragment, renderList } from "vue";
7
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
7
+ function _createForOfIteratorHelperLoose_tiny(o, allowArrayLike) {
8
8
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
9
9
  if (it)
10
10
  return (it = it.call(o)).next.bind(it);
@@ -42,7 +42,7 @@ function _arrayLikeToArray(arr, len) {
42
42
  }
43
43
  var _export_sfc = function _export_sfc2(sfc, props) {
44
44
  var target = sfc.__vccOpts || sfc;
45
- for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
45
+ for (var _iterator = _createForOfIteratorHelperLoose_tiny(props), _step; !(_step = _iterator()).done; ) {
46
46
  var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
47
47
  target[key] = val;
48
48
  }
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@opentiny/vue-dropdown-item",
3
- "version": "3.10.0",
3
+ "version": "3.11.0-alpha.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
- "@opentiny/vue-common": "~3.10.0",
11
- "@opentiny/vue-icon": "~3.10.0",
12
- "@opentiny/vue-renderless": "~3.10.0",
13
- "@opentiny/vue-popup": "~3.10.0",
14
- "@opentiny/vue-button": "~3.10.0",
15
- "@opentiny/vue-tooltip": "~3.10.0"
10
+ "@opentiny/vue-common": "~3.11.0-alpha.0",
11
+ "@opentiny/vue-icon": "~3.11.0-alpha.0",
12
+ "@opentiny/vue-renderless": "~3.11.0-alpha.0",
13
+ "@opentiny/vue-popup": "~3.11.0-alpha.0",
14
+ "@opentiny/vue-button": "~3.11.0-alpha.0",
15
+ "@opentiny/vue-tooltip": "~3.11.0-alpha.0"
16
16
  },
17
17
  "license": "MIT",
18
18
  "types": "index.d.ts",
package/src/index.d.ts CHANGED
@@ -9,6 +9,81 @@
9
9
  * A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
10
10
  *
11
11
  */
12
+ export declare const $constants: {
13
+ ICON_MAP: {
14
+ leftWardArrow: string;
15
+ };
16
+ };
17
+ export declare const dropdownItemProps: {
18
+ _constants: {
19
+ type: ObjectConstructor;
20
+ default: () => {
21
+ ICON_MAP: {
22
+ leftWardArrow: string;
23
+ };
24
+ };
25
+ };
26
+ icon: (ObjectConstructor | StringConstructor)[];
27
+ disabled: BooleanConstructor;
28
+ divided: BooleanConstructor;
29
+ itemData: {
30
+ type: (ObjectConstructor | StringConstructor)[];
31
+ default: string;
32
+ };
33
+ title: StringConstructor;
34
+ label: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ level: StringConstructor;
39
+ titleClass: StringConstructor;
40
+ options: {
41
+ type: ArrayConstructor;
42
+ default: () => never[];
43
+ };
44
+ type: {
45
+ type: StringConstructor;
46
+ default: string;
47
+ };
48
+ selected: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ selectedField: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ multiStage: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ currentIndex: {
61
+ type: NumberConstructor;
62
+ default: () => number;
63
+ };
64
+ appendToBody: {
65
+ type: BooleanConstructor;
66
+ default: boolean;
67
+ };
68
+ textField: {
69
+ type: StringConstructor;
70
+ default: string;
71
+ };
72
+ tip: {
73
+ type: (StringConstructor | FunctionConstructor)[];
74
+ default: string;
75
+ };
76
+ tipPosition: {
77
+ type: StringConstructor;
78
+ default: string;
79
+ };
80
+ tiny_mode: StringConstructor;
81
+ tiny_mode_root: BooleanConstructor;
82
+ tiny_template: (ObjectConstructor | FunctionConstructor)[];
83
+ tiny_renderless: FunctionConstructor;
84
+ tiny_theme: StringConstructor;
85
+ tiny_chart_theme: ObjectConstructor;
86
+ };
12
87
  declare const _default: import("@vue/runtime-core").DefineComponent<{
13
88
  _constants: {
14
89
  type: ObjectConstructor;
@@ -156,15 +231,15 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
156
231
  disabled: boolean;
157
232
  tiny_mode_root: boolean;
158
233
  _constants: Record<string, any>;
234
+ multiStage: boolean;
159
235
  options: unknown[];
160
236
  textField: string;
161
- appendToBody: boolean;
162
- tip: string | Function;
163
- multiStage: boolean;
164
237
  divided: boolean;
165
238
  itemData: string | Record<string, any>;
166
239
  selectedField: string;
167
240
  currentIndex: number;
241
+ appendToBody: boolean;
242
+ tip: string | Function;
168
243
  tipPosition: string;
169
244
  }, {}>;
170
245
  export default _default;
@@ -1,8 +1,47 @@
1
1
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- [x: string]: any;
2
+ label?: any;
3
+ selected?: any;
4
+ disabled?: any;
5
+ tiny_mode?: any;
6
+ tiny_mode_root?: any;
7
+ tiny_template?: any;
8
+ tiny_renderless?: any;
9
+ _constants?: any;
10
+ tiny_theme?: any;
11
+ tiny_chart_theme?: any;
12
+ icon?: any;
13
+ itemData?: any;
14
+ level?: any;
15
+ currentIndex?: any;
3
16
  }>, any, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
4
- [x: string]: any;
17
+ label?: any;
18
+ selected?: any;
19
+ disabled?: any;
20
+ tiny_mode?: any;
21
+ tiny_mode_root?: any;
22
+ tiny_template?: any;
23
+ tiny_renderless?: any;
24
+ _constants?: any;
25
+ tiny_theme?: any;
26
+ tiny_chart_theme?: any;
27
+ icon?: any;
28
+ itemData?: any;
29
+ level?: any;
30
+ currentIndex?: any;
5
31
  }>>>, {
6
- [x: string]: any;
32
+ readonly label?: any;
33
+ readonly selected?: any;
34
+ readonly disabled?: any;
35
+ readonly tiny_mode?: any;
36
+ readonly tiny_mode_root?: any;
37
+ readonly tiny_template?: any;
38
+ readonly tiny_renderless?: any;
39
+ readonly _constants?: any;
40
+ readonly tiny_theme?: any;
41
+ readonly tiny_chart_theme?: any;
42
+ readonly icon?: any;
43
+ readonly itemData?: any;
44
+ readonly level?: any;
45
+ readonly currentIndex?: any;
7
46
  }, {}>;
8
47
  export default _default;
@@ -1,2 +1,67 @@
1
- declare const _default: (props: Record<string, any> & {}) => any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
+ type?: any;
3
+ title?: any;
4
+ disabled?: any;
5
+ tiny_mode?: any;
6
+ tiny_mode_root?: any;
7
+ tiny_template?: any;
8
+ tiny_renderless?: any;
9
+ _constants?: any;
10
+ tiny_theme?: any;
11
+ tiny_chart_theme?: any;
12
+ modelValue?: any;
13
+ options?: any;
14
+ icon?: 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, ("confirm" | "item-click" | "update:modelValue" | "close" | "click" | "change" | "reset" | "open" | "closed" | "opened")[], "confirm" | "item-click" | "update:modelValue" | "close" | "click" | "change" | "reset" | "open" | "closed" | "opened", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
26
+ type?: any;
27
+ title?: any;
28
+ disabled?: any;
29
+ tiny_mode?: any;
30
+ tiny_mode_root?: any;
31
+ tiny_template?: any;
32
+ tiny_renderless?: any;
33
+ _constants?: any;
34
+ tiny_theme?: any;
35
+ tiny_chart_theme?: any;
36
+ modelValue?: any;
37
+ options?: any;
38
+ icon?: any;
39
+ titleClass?: any;
40
+ }>>> & {
41
+ "onItem-click"?: ((...args: any[]) => any) | undefined;
42
+ onChange?: ((...args: any[]) => any) | undefined;
43
+ onReset?: ((...args: any[]) => any) | undefined;
44
+ onClick?: ((...args: any[]) => any) | undefined;
45
+ onClose?: ((...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 type?: any;
53
+ readonly title?: any;
54
+ readonly disabled?: any;
55
+ readonly tiny_mode?: any;
56
+ readonly tiny_mode_root?: any;
57
+ readonly tiny_template?: any;
58
+ readonly tiny_renderless?: any;
59
+ readonly _constants?: any;
60
+ readonly tiny_theme?: any;
61
+ readonly tiny_chart_theme?: any;
62
+ readonly modelValue?: any;
63
+ readonly options?: any;
64
+ readonly icon?: any;
65
+ readonly titleClass?: any;
66
+ }, {}>;
2
67
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -1,19 +1,80 @@
1
+ import type { IDropdownItemApi } from '@opentiny/vue-renderless/types/dropdown-item.type';
1
2
  declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- [x: string]: any;
3
- }>, {
4
- t: (this: any, path: any, options?: any) => any;
5
- vm: any;
6
- f: (props: any, attrs?: {}) => {};
7
- a: (attrs: any, filters: any, include: any) => {};
8
- d: (props: any) => void;
9
- dp: (props: any) => void;
10
- gcls: (key: any) => any;
11
- m: (...cssClasses: any[]) => string;
12
- }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "item-click"[], "item-click", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
13
- [x: string]: any;
3
+ type?: any;
4
+ label?: any;
5
+ title?: any;
6
+ selected?: any;
7
+ disabled?: any;
8
+ tiny_mode?: any;
9
+ tiny_mode_root?: any;
10
+ tiny_template?: any;
11
+ tiny_renderless?: any;
12
+ _constants?: any;
13
+ tiny_theme?: any;
14
+ tiny_chart_theme?: any;
15
+ multiStage?: any;
16
+ options?: any;
17
+ textField?: any;
18
+ icon?: any;
19
+ divided?: any;
20
+ itemData?: any;
21
+ titleClass?: any;
22
+ selectedField?: any;
23
+ currentIndex?: any;
24
+ appendToBody?: any;
25
+ tip?: any;
26
+ tipPosition?: any;
27
+ }>, IDropdownItemApi, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "item-click"[], "item-click", import("@vue/runtime-core").VNodeProps & import("@vue/runtime-core").AllowedComponentProps & import("@vue/runtime-core").ComponentCustomProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
28
+ type?: any;
29
+ label?: any;
30
+ title?: any;
31
+ selected?: any;
32
+ disabled?: any;
33
+ tiny_mode?: any;
34
+ tiny_mode_root?: any;
35
+ tiny_template?: any;
36
+ tiny_renderless?: any;
37
+ _constants?: any;
38
+ tiny_theme?: any;
39
+ tiny_chart_theme?: any;
40
+ multiStage?: any;
41
+ options?: any;
42
+ textField?: any;
43
+ icon?: any;
44
+ divided?: any;
45
+ itemData?: any;
46
+ titleClass?: any;
47
+ selectedField?: any;
48
+ currentIndex?: any;
49
+ appendToBody?: any;
50
+ tip?: any;
51
+ tipPosition?: any;
14
52
  }>>> & {
15
53
  "onItem-click"?: ((...args: any[]) => any) | undefined;
16
54
  }, {
17
- [x: string]: any;
55
+ readonly type?: any;
56
+ readonly label?: any;
57
+ readonly title?: any;
58
+ readonly selected?: any;
59
+ readonly disabled?: any;
60
+ readonly tiny_mode?: any;
61
+ readonly tiny_mode_root?: any;
62
+ readonly tiny_template?: any;
63
+ readonly tiny_renderless?: any;
64
+ readonly _constants?: any;
65
+ readonly tiny_theme?: any;
66
+ readonly tiny_chart_theme?: any;
67
+ readonly multiStage?: any;
68
+ readonly options?: any;
69
+ readonly textField?: any;
70
+ readonly icon?: any;
71
+ readonly divided?: any;
72
+ readonly itemData?: any;
73
+ readonly titleClass?: any;
74
+ readonly selectedField?: any;
75
+ readonly currentIndex?: any;
76
+ readonly appendToBody?: any;
77
+ readonly tip?: any;
78
+ readonly tipPosition?: any;
18
79
  }, {}>;
19
80
  export default _default;