@blueking/date-picker 2.0.0-beta.10 → 2.0.0-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueking/date-picker",
3
- "version": "2.0.0-beta.10",
3
+ "version": "2.0.0-beta.3",
4
4
  "description": "蓝鲸监控平台日期时间选择",
5
5
  "license": "MIT",
6
6
  "author": "Tencent BlueKing",
@@ -19,9 +19,7 @@
19
19
  "types": "./typings/vue2.d.ts",
20
20
  "import": "./vue2/index.es.min.js",
21
21
  "default": "./vue2/index.es.min.js"
22
- },
23
- "./vue3/*": "./vue3/*",
24
- "./vue2/*": "./vue2/*"
22
+ }
25
23
  },
26
24
  "typesVersions": {
27
25
  "*": {
@@ -48,11 +46,9 @@
48
46
  "access": "public",
49
47
  "registry": "https://registry.npmjs.org/"
50
48
  },
51
- "peerDependencies": {
52
- "@blueking/bkui-library": "latest",
53
- "bkui-vue": "latest",
54
- "dayjs": "^1.11.10",
55
- "vue": "latest"
49
+ "dependencies": {
50
+ "@blueking/bkui-library": "0.0.0-beta.2",
51
+ "dayjs": "^1.11.10"
56
52
  },
57
53
  "devDependencies": {
58
54
  "@types/node": "^20.12.3",
@@ -61,6 +57,7 @@
61
57
  "@typescript-eslint/eslint-plugin": "^7.5.0",
62
58
  "@typescript-eslint/parser": "^7.5.0",
63
59
  "@vitejs/plugin-vue": "^5.0.4",
60
+ "bkui-vue": "1.0.3-beta.25",
64
61
  "eslint": "^8.57.0",
65
62
  "eslint-config-prettier": "^9.1.0",
66
63
  "eslint-config-tencent": "^1.0.4",
@@ -95,6 +92,7 @@
95
92
  "vite-bundle-visualizer": "^1.1.0",
96
93
  "vite-plugin-css-injected-by-js": "^3.5.0",
97
94
  "vite-plugin-inspect": "^0.8.3",
95
+ "vue": "^3.4.21",
98
96
  "vue-eslint-parser": "^9.4.2",
99
97
  "vue-tsc": "^2.0.7",
100
98
  "zip-a-folder": "^3.1.6"
@@ -116,7 +114,7 @@
116
114
  "*.{js,json}": [
117
115
  "prettier --write"
118
116
  ],
119
- "*.{ts?(x),vue}": [
117
+ "*.ts?(x)": [
120
118
  "eslint --fix"
121
119
  ]
122
120
  },
@@ -4,7 +4,7 @@ import { type DateValue, type IDatePickerProps } from './utils';
4
4
  import { type ITimezoneItem } from './utils/timezone';
5
5
  declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<IDatePickerProps>, {
6
6
  behavior: string;
7
- commonUseList: () => DateValue[];
7
+ commonUseList: any;
8
8
  format: string;
9
9
  needTimezone: boolean;
10
10
  version: string;
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
19
19
  "update:timezone": (value: string, timezoneInfo: ITimezoneItem) => void;
20
20
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<IDatePickerProps>, {
21
21
  behavior: string;
22
- commonUseList: () => DateValue[];
22
+ commonUseList: any;
23
23
  format: string;
24
24
  needTimezone: boolean;
25
25
  version: string;
package/typings/vue2.d.ts CHANGED
@@ -2,4 +2,3 @@ declare const _default: any;
2
2
  export default _default;
3
3
  export * from './utils/date';
4
4
  export * from './utils/constant';
5
- export type * from './utils/types';
package/typings/vue3.d.ts CHANGED
@@ -4,4 +4,3 @@ export { DatePicker, dayjs };
4
4
  export default DatePicker;
5
5
  export * from './utils/date';
6
6
  export * from './utils/constant';
7
- export type * from './utils/types';
@@ -19352,10 +19352,7 @@ const gj = (t) => {
19352
19352
  近: "Last",
19353
19353
  "(至今)": " so far"
19354
19354
  };
19355
- Object.keys(Iu).reduce(
19356
- (t, e) => (t[Iu[e]] = e, t),
19357
- {}
19358
- );
19355
+ Object.keys(Iu).reduce((t, e) => (t[Iu[e]] = e, t), {});
19359
19356
  const Vl = gj("blueking_language") || "zh-cn", ye = (t) => Vl !== "en" ? va[t] || t : va[t] || hj[t] || yj[t] || Iu[t] || t;
19360
19357
  var $e = /* @__PURE__ */ ((t) => (t.Date = "date", t.FUTURE = "now+", t.NATURAL = "natural", t.RECENT = "now-", t))($e || {});
19361
19358
  const Cf = [
@@ -21250,10 +21247,10 @@ const ju = (t, e = "start", r) => {
21250
21247
  }, g = (l) => {
21251
21248
  r.minDate && l.isBefore(r.minDate, "day") || n("update:modelValue", l);
21252
21249
  };
21253
- let c;
21250
+ let c = 0;
21254
21251
  const d = (l) => {
21255
21252
  l.preventDefault(), !r.diableNow && (c || (n("update:isNow", !r.isNow), c = setTimeout(() => {
21256
- clearTimeout(c), c = null;
21253
+ clearTimeout(c), c = 0;
21257
21254
  }, 500)));
21258
21255
  };
21259
21256
  return (l, u) => (Qe(), nt("div", kj, [
@@ -21436,17 +21433,17 @@ const ju = (t, e = "start", r) => {
21436
21433
  if (F.length) {
21437
21434
  let V = !0;
21438
21435
  const X = (F[7] || "0").substring(0, 3), he = F[6] || 0;
21439
- V = +he < 60;
21436
+ V = he < 60;
21440
21437
  const _ = F[5] || 0;
21441
- V = V && +_ < 60;
21438
+ V = V && _ < 60;
21442
21439
  const C = F[4] || 0;
21443
- V = V && +C < 24;
21440
+ V = V && C < 24;
21444
21441
  const N = F[3] || 1;
21445
- V = V && +N < 32;
21446
- const O = +F[2] - 1 || 0;
21442
+ V = V && N < 32;
21443
+ const O = F[2] - 1 || 0;
21447
21444
  V = V && O < 12;
21448
21445
  const J = F[1];
21449
- V = V && J.length < 5, ae = V ? Ne(new Date(+J, O, +N, +C, +_, +he, +X)) : Q;
21446
+ V = V && J.length < 5, ae = V ? Ne(new Date(J, O, N, C, _, he, X)) : Q;
21450
21447
  }
21451
21448
  }
21452
21449
  ae || (ae = Ne(E)), ae.isValid() && (Q != null && Q.isSame(ae) || (H.value = E === ft, Z === "start" ? S(f ? ae : ae.startOf("d")) : R(p ? ae : ae.endOf("d")))), K.value = Z === "start" ? ((T = f.value) == null ? void 0 : T.format(d.value)) || "" : ((D = p.value) == null ? void 0 : D.format(d.value)) || "";
@@ -22310,7 +22307,7 @@ const ju = (t, e = "start", r) => {
22310
22307
  __name: "date-picker",
22311
22308
  props: {
22312
22309
  behavior: { default: "normal" },
22313
- commonUseList: { default: () => Cu },
22310
+ commonUseList: { default: Cu },
22314
22311
  disabled: { type: Boolean },
22315
22312
  format: { default: "YYYY-MM-DD HH:mm:ss" },
22316
22313
  modelValue: {},
@@ -22563,7 +22560,7 @@ const ZN = {
22563
22560
  },
22564
22561
  created() {
22565
22562
  const t = this.$props, e = this.$emit.bind(this);
22566
- let r;
22563
+ let r = null;
22567
22564
  this.app = k3({
22568
22565
  render() {
22569
22566
  return r = this, A3(xN, {