@opentinyvue/vue-date-picker 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,21 +7,14 @@ function _extends() {
7
7
  return n;
8
8
  }, _extends.apply(null, arguments);
9
9
  }
10
- import { defineComponent, $prefix, $setup } from "@opentinyvue/vue-common";
10
+ import { defineComponent, $setup, $prefix } from "@opentinyvue/vue-common";
11
11
  import { iconClose } from "@opentinyvue/vue-icon";
12
12
  import { api } from "@opentinyvue/vue-renderless/picker/vue";
13
13
  import PcTemplate from "./pc.js";
14
- import MobileTemplate from "./mobile.js";
15
14
  import "@opentinyvue/vue-theme/date-picker/index.css";
16
15
  var template = function template2(mode) {
17
16
  var _process$env;
18
- var tinyMode = typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null;
19
- if ("pc" === (tinyMode || mode)) {
20
- return PcTemplate;
21
- }
22
- if ("mobile" === (tinyMode || mode)) {
23
- return MobileTemplate;
24
- }
17
+ typeof process === "object" ? (_process$env = process.env) == null ? void 0 : _process$env.TINY_MODE : null;
25
18
  return PcTemplate;
26
19
  };
27
20
  var currentYear = (/* @__PURE__ */ new Date()).getFullYear();
@@ -252,7 +245,7 @@ var DatePicker = defineComponent({
252
245
  });
253
246
  }
254
247
  });
255
- var version = "3.21.0";
248
+ var version = "3.undefined";
256
249
  DatePicker.model = {
257
250
  prop: "modelValue",
258
251
  event: "update:modelValue"
package/lib/pc.js CHANGED
@@ -9,7 +9,7 @@ function _extends() {
9
9
  }
10
10
  import Picker from "@opentinyvue/vue-picker";
11
11
  import { $props } from "@opentinyvue/vue-common";
12
- import { extend } from "@opentinyvue/vue-renderless/common/object";
12
+ import { extend } from "@opentinyvue/utils";
13
13
  var DatePicker = extend(true, {
14
14
  props: _extends({}, $props, {
15
15
  _constants: {
package/package.json CHANGED
@@ -1,21 +1,20 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-date-picker",
3
- "version": "3.21.0",
3
+ "type": "module",
4
+ "version": "3.22.1",
4
5
  "description": "",
6
+ "license": "MIT",
7
+ "sideEffects": false,
5
8
  "main": "./lib/index.js",
6
9
  "module": "./lib/index.js",
7
- "sideEffects": false,
8
- "type": "module",
9
10
  "dependencies": {
10
- "@opentinyvue/vue-renderless": "~3.21.0",
11
- "@opentinyvue/vue-common": "~3.21.0",
12
- "@opentinyvue/vue-picker": "~3.21.0",
13
- "@opentinyvue/vue-mini-picker": "~3.21.0",
14
- "@opentinyvue/vue-input": "~3.21.0",
15
- "@opentinyvue/vue-icon": "~3.21.0",
16
- "@opentinyvue/vue-theme": "~3.21.0"
11
+ "@opentinyvue/utils": "~3.22.0",
12
+ "@opentinyvue/vue-common": "~3.22.0",
13
+ "@opentinyvue/vue-icon": "~3.22.0",
14
+ "@opentinyvue/vue-picker": "~3.22.0",
15
+ "@opentinyvue/vue-renderless": "~3.22.0",
16
+ "@opentinyvue/vue-theme": "~3.22.0"
17
17
  },
18
- "license": "MIT",
19
18
  "types": "index.d.ts",
20
19
  "scripts": {
21
20
  "build": "pnpm -w build:ui $npm_package_name",
package/src/index.d.ts CHANGED
@@ -561,12 +561,13 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
561
561
  name: string;
562
562
  disabled: boolean;
563
563
  type: "date" | "year" | "month" | "dates" | "years" | "yearrange" | "week" | "daterange" | "datetimerange" | "monthrange" | "datetime";
564
+ id: string;
565
+ visible: boolean;
564
566
  tiny_mode_root: boolean;
565
567
  _constants: Record<string, any>;
566
568
  componentName: string;
567
569
  tabindex: string;
568
570
  popperAppendToBody: boolean;
569
- visible: boolean;
570
571
  readonly: boolean;
571
572
  clearable: boolean;
572
573
  validateEvent: boolean;
@@ -574,7 +575,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<{
574
575
  iso8601: boolean;
575
576
  isutc8: boolean;
576
577
  rangeSeparator: string | Record<string, any>;
577
- id: string;
578
578
  changeOnConfirm: boolean;
579
579
  autoFormat: boolean;
580
580
  blank: boolean;
package/lib/mobile.js DELETED
@@ -1,95 +0,0 @@
1
- import { defineComponent, props, setup } from '@opentinyvue/vue-common';
2
- import { renderless, api } from '@opentinyvue/vue-renderless/date-picker/vue';
3
- import MiniPicker from '@opentinyvue/vue-mini-picker';
4
- import Input from '@opentinyvue/vue-input';
5
- import { iconCloseCircle } from '@opentinyvue/vue-icon';
6
- import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createBlock, createCommentVNode } 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
- components: {
43
- TinyMiniPicker: MiniPicker,
44
- TinyInput: Input,
45
- IconClose: iconCloseCircle()
46
- },
47
- props: [].concat(props, ["modelValue", "type", "clearable", "visible", "minDate", "maxDate", "formatter"]),
48
- setup: function setup$1(props2, context) {
49
- return setup({
50
- props: props2,
51
- context,
52
- renderless,
53
- api
54
- });
55
- }
56
- });
57
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
58
- var _component_icon_close = resolveComponent("icon-close");
59
- var _component_tiny_input = resolveComponent("tiny-input");
60
- var _component_tiny_mini_picker = resolveComponent("tiny-mini-picker");
61
- return openBlock(), createElementBlock("div", null, [createVNode(_component_tiny_input, {
62
- onHookMounted: _ctx.hookMounted,
63
- modelValue: _ctx.state.displayValue,
64
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
65
- return _ctx.state.displayValue = $event;
66
- }),
67
- ref: "refrence",
68
- onFocus: _ctx.showPickerAndLockScroll,
69
- readOnly: "true",
70
- _mode: _ctx._mode
71
- }, {
72
- default: withCtx(function() {
73
- return [!_ctx.state.clearable ? (openBlock(), createBlock(_component_icon_close, {
74
- key: 0,
75
- slot: "suffix",
76
- onClick: _ctx.clearDisplayValue
77
- }, null, 8, ["onClick"])) : createCommentVNode("v-if", true)];
78
- }),
79
- _: 1
80
- /* STABLE */
81
- }, 8, ["onHookMounted", "modelValue", "onFocus", "_mode"]), createVNode(_component_tiny_mini_picker, {
82
- visible: _ctx.state.visible,
83
- "onUpdate:visible": _cache[1] || (_cache[1] = function($event) {
84
- return _ctx.state.visible = $event;
85
- }),
86
- ref: "picker",
87
- columns: _ctx.state.columns,
88
- onChange: _ctx.onChange,
89
- onConfirm: _ctx.onConfirm,
90
- onCancel: _ctx.onCancel
91
- }, null, 8, ["visible", "columns", "onChange", "onConfirm", "onCancel"])]);
92
- }
93
- var mobile = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
94
-
95
- export { mobile as default };
@@ -1,56 +0,0 @@
1
- declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
2
- type?: any;
3
- tiny_mode?: any;
4
- tiny_mode_root?: any;
5
- tiny_template?: any;
6
- tiny_renderless?: any;
7
- _constants?: any;
8
- tiny_theme?: any;
9
- tiny_chart_theme?: any;
10
- modelValue?: any;
11
- visible?: any;
12
- clearable?: any;
13
- minDate?: any;
14
- maxDate?: any;
15
- formatter?: 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, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<Readonly<{
26
- type?: any;
27
- tiny_mode?: any;
28
- tiny_mode_root?: any;
29
- tiny_template?: any;
30
- tiny_renderless?: any;
31
- _constants?: any;
32
- tiny_theme?: any;
33
- tiny_chart_theme?: any;
34
- modelValue?: any;
35
- visible?: any;
36
- clearable?: any;
37
- minDate?: any;
38
- maxDate?: any;
39
- formatter?: any;
40
- }>>>, {
41
- readonly type?: any;
42
- readonly tiny_mode?: any;
43
- readonly tiny_mode_root?: any;
44
- readonly tiny_template?: any;
45
- readonly tiny_renderless?: any;
46
- readonly _constants?: any;
47
- readonly tiny_theme?: any;
48
- readonly tiny_chart_theme?: any;
49
- readonly modelValue?: any;
50
- readonly visible?: any;
51
- readonly clearable?: any;
52
- readonly minDate?: any;
53
- readonly maxDate?: any;
54
- readonly formatter?: any;
55
- }, {}>;
56
- export default _default;