stellar-ui-plus 1.17.18 → 1.17.20

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.
@@ -174,10 +174,10 @@ defineExpose({
174
174
  <view class="icon-box" v-if="icon">
175
175
  <ste-icon :code="cmpIconCode" color="#999999" size="45"></ste-icon>
176
176
  </view>
177
- <view class="ste-message-title">{{ title }}</view>
177
+ <text class="ste-message-title">{{ title }}</text>
178
178
  <view class="msg" v-if="!icon">
179
179
  <slot>
180
- <view class="text" v-if="!editable">{{ content }}</view>
180
+ <text class="text" v-if="!editable">{{ content }}</text>
181
181
  <view v-else class="input-box">
182
182
  <text class="placeholder-text" v-show="showInputPlaceholder">
183
183
  {{ placeholderText }}
@@ -269,6 +269,7 @@ defineExpose({
269
269
  font-weight: bold;
270
270
  font-size: var(--font-size-32, 32rpx);
271
271
  text-align: center;
272
+ display: block;
272
273
  }
273
274
 
274
275
  .msg {
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { ref, computed, watch, nextTick, type PropType } from 'vue';
2
+ import { ref, watch, nextTick, type PropType } from 'vue';
3
3
  import { getDateOptions, getNowDate, type DateMode } from './defaultDate';
4
4
  import utils from '../../utils/utils';
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stellar-ui-plus",
3
- "version": "1.17.18",
3
+ "version": "1.17.20",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "MIT",
@@ -13,8 +13,5 @@
13
13
  "test": "echo \"Error: no test specified\" && exit 1",
14
14
  "publish-vscode-plugin": "cd ../../../plugins/ste-helper & pnpm run publish",
15
15
  "prepublishOnly": "pnpm run publish-vscode-plugin"
16
- },
17
- "dependencies": {
18
- "dayjs": "^1.11.11"
19
16
  }
20
17
  }
package/types/index.d.ts CHANGED
@@ -1,112 +1,113 @@
1
- import type { InputType } from '@uni-helper/uni-app-types'
2
- import type dayjs from 'dayjs'
1
+ import type { InputType } from '@uni-helper/uni-app-types';
2
+ import type dayjs from 'dayjs';
3
+ import type dayjs from '../utils/dayjs';
3
4
 
4
5
  export type UniImageMode =
5
- | 'scaleToFill'
6
- | 'aspectFit'
7
- | 'aspectFill'
8
- | 'widthFix'
9
- | 'heightFix'
10
- | 'top'
11
- | 'bottom'
12
- | 'center'
13
- | 'left'
14
- | 'right'
15
- | 'top left'
16
- | 'top right'
17
- | 'bottom left'
18
- | 'bottom right'
6
+ | 'scaleToFill'
7
+ | 'aspectFit'
8
+ | 'aspectFill'
9
+ | 'widthFix'
10
+ | 'heightFix'
11
+ | 'top'
12
+ | 'bottom'
13
+ | 'center'
14
+ | 'left'
15
+ | 'right'
16
+ | 'top left'
17
+ | 'top right'
18
+ | 'bottom left'
19
+ | 'bottom right';
19
20
 
20
- export type ImgType = 'png' | 'jpg' | 'jpeg' | 'svg' | 'webp'
21
+ export type ImgType = 'png' | 'jpg' | 'jpeg' | 'svg' | 'webp';
21
22
 
22
- export type DisplayType = 'flex' | 'block' | 'inline-flex' | 'inline-block' | 'none' | 'inherit' | 'inline'
23
+ export type DisplayType = 'flex' | 'block' | 'inline-flex' | 'inline-block' | 'none' | 'inherit' | 'inline';
23
24
 
24
- export type SizeType = number | string
25
+ export type SizeType = number | string;
25
26
 
26
- export type PositionType = 'top' | 'bottom' | 'left' | 'right' | 'center'
27
+ export type PositionType = 'top' | 'bottom' | 'left' | 'right' | 'center';
27
28
 
28
- export type AroundPositionType = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
29
+ export type AroundPositionType = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
29
30
 
30
- export type ModeType = 100 | 200 | 300 | 400 | 450
31
+ export type ModeType = 100 | 200 | 300 | 400 | 450;
31
32
 
32
33
  export interface Obj {
33
- [key: string]: any
34
+ [key: string]: any;
34
35
  }
35
36
 
36
37
  export interface UploadFileType {
37
- url: string
38
- type?: string
39
- size?: number
40
- name?: string
41
- status?: 'uploading' | 'error' | 'success'
42
- path?: string
43
- thumbPath?: string
44
- duration?: number
45
- height?: number
46
- width?: number
38
+ url: string;
39
+ type?: string;
40
+ size?: number;
41
+ name?: string;
42
+ status?: 'uploading' | 'error' | 'success';
43
+ path?: string;
44
+ thumbPath?: string;
45
+ duration?: number;
46
+ height?: number;
47
+ width?: number;
47
48
  }
48
49
 
49
50
  export interface ReadFileOptions {
50
- // #ifdef MP-WEIXIN
51
- accept?: 'image' | 'video' | 'mix'
52
- // #endif
53
- // #ifndef MP-WEIXIN
54
- accept?: 'image' | 'video' | 'media'
55
- // #endif
56
- capture?: ('album' | 'camera')[]
57
- camera?: 'back' | 'front'
58
- compressed?: boolean
59
- maxDuration?: number
60
- multiple?: boolean
61
- count?: number
51
+ // #ifdef MP-WEIXIN
52
+ accept?: 'image' | 'video' | 'mix';
53
+ // #endif
54
+ // #ifndef MP-WEIXIN
55
+ accept?: 'image' | 'video' | 'media';
56
+ // #endif
57
+ capture?: ('album' | 'camera')[];
58
+ camera?: 'back' | 'front';
59
+ compressed?: boolean;
60
+ maxDuration?: number;
61
+ multiple?: boolean;
62
+ count?: number;
62
63
  }
63
64
 
64
- export type InputAccept = 'image' | 'video' | 'all' | 'file' | 'media'
65
+ export type InputAccept = 'image' | 'video' | 'all' | 'file' | 'media';
65
66
 
66
- export type InputCapture = 'back' | 'front'
67
+ export type InputCapture = 'back' | 'front';
67
68
 
68
- export type WxInputAccept = 'image' | 'video' | 'mix'
69
+ export type WxInputAccept = 'image' | 'video' | 'mix';
69
70
 
70
- export type DirectionType = 'horizontal' | 'vertical'
71
+ export type DirectionType = 'horizontal' | 'vertical';
71
72
 
72
- export type AlignType = 'left' | 'right' | 'center'
73
+ export type AlignType = 'left' | 'right' | 'center';
73
74
 
74
- export type SteInputType = InputType | 'password' | 'textarea'
75
+ export type SteInputType = InputType | 'password' | 'textarea';
75
76
 
76
77
  export interface TreeNode {
77
- [key: string]: any
78
- [tiileKey: string]: string
79
- [valueKey: string]: string | number
80
- [childrenKey: string]: TreeNode[]
78
+ [key: string]: any;
79
+ [tiileKey: string]: string;
80
+ [valueKey: string]: string | number;
81
+ [childrenKey: string]: TreeNode[];
81
82
  }
82
83
 
83
- export type inputConfirmType = 'done' | 'go' | 'next' | 'search' | 'send'
84
+ export type inputConfirmType = 'done' | 'go' | 'next' | 'search' | 'send';
84
85
 
85
86
  export interface SearchSuggestion {
86
- label: string
87
- value?: any
87
+ label: string;
88
+ value?: any;
88
89
  }
89
90
 
90
91
  export interface MessageBoxOptions {
91
- show?: boolean
92
- title?: string
93
- content?: string
94
- icon?: MessageBoxIcon
95
- cancelText?: string
96
- confirmText?: string
97
- confirmColor?: string
98
- showCancel?: boolean
99
- showClose?: boolean
100
- cancelColor?: string
101
- editable?: boolean
102
- placeholderText?: string
103
- confirm?: (value?: string) => void
104
- cancel?: (value?: string) => void
105
- complete?: (value?: string) => void
106
-
107
- closeOnClickOverlay?: boolean
108
- closeOnPressEscape?: boolean
109
- closeOnBackdropClick?: boolean
92
+ show?: boolean;
93
+ title?: string;
94
+ content?: string;
95
+ icon?: MessageBoxIcon;
96
+ cancelText?: string;
97
+ confirmText?: string;
98
+ confirmColor?: string;
99
+ showCancel?: boolean;
100
+ showClose?: boolean;
101
+ cancelColor?: string;
102
+ editable?: boolean;
103
+ placeholderText?: string;
104
+ confirm?: (value?: string) => void;
105
+ cancel?: (value?: string) => void;
106
+ complete?: (value?: string) => void;
107
+
108
+ closeOnClickOverlay?: boolean;
109
+ closeOnPressEscape?: boolean;
110
+ closeOnBackdropClick?: boolean;
110
111
  }
111
112
 
112
113
  export interface Dayjs extends dayjs.Dayjs {}
package/utils/dayjs.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.37.0.
3
+ * Original file: /npm/dayjs@1.11.13/dayjs.min.js
4
+ *
5
+ * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
6
+ */
7
+ "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self; var t = { exports: {} }, e = t.exports = function () { var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", s = "second", i = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function (t) { var e = ["th", "st", "nd", "rd"], n = t % 100; return "[" + t + (e[(n - 20) % 10] || e[n] || e[0]) + "]" } }, g = function (t, e, n) { var r = String(t); return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t }, v = { s: g, z: function (t) { var e = -t.utcOffset(), n = Math.abs(e), r = Math.floor(n / 60), s = n % 60; return (e <= 0 ? "+" : "-") + g(r, 2, "0") + ":" + g(s, 2, "0") }, m: function t(e, n) { if (e.date() < n.date()) return -t(n, e); var r = 12 * (n.year() - e.year()) + (n.month() - e.month()), s = e.clone().add(r, c), i = n - s < 0, u = e.clone().add(r + (i ? -1 : 1), c); return +(-(r + (n - s) / (i ? s - u : u - s)) || 0) }, a: function (t) { return t < 0 ? Math.ceil(t) || 0 : Math.floor(t) }, p: function (t) { return { M: c, y: h, w: o, d: a, D: d, h: u, m: i, s: s, ms: r, Q: f }[t] || String(t || "").toLowerCase().replace(/s$/, "") }, u: function (t) { return void 0 === t } }, m = "en", D = {}; D[m] = M; var p = "$isDayjsObject", S = function (t) { return t instanceof _ || !(!t || !t[p]) }, w = function t(e, n, r) { var s; if (!e) return m; if ("string" == typeof e) { var i = e.toLowerCase(); D[i] && (s = i), n && (D[i] = n, s = i); var u = e.split("-"); if (!s && u.length > 1) return t(u[0]) } else { var a = e.name; D[a] = e, s = a } return !r && s && (m = s), s || !r && m }, b = function (t, e) { if (S(t)) return t.clone(); var n = "object" == typeof e ? e : {}; return n.date = t, n.args = arguments, new _(n) }, O = v; O.l = w, O.i = S, O.w = function (t, e) { return b(t, { locale: e.$L, utc: e.$u, x: e.$x, $offset: e.$offset }) }; var _ = function () { function M(t) { this.$L = w(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[p] = !0 } var g = M.prototype; return g.parse = function (t) { this.$d = function (t) { var e = t.date, n = t.utc; if (null === e) return new Date(NaN); if (O.u(e)) return new Date; if (e instanceof Date) return new Date(e); if ("string" == typeof e && !/Z$/i.test(e)) { var r = e.match($); if (r) { var s = r[2] - 1 || 0, i = (r[7] || "0").substring(0, 3); return n ? new Date(Date.UTC(r[1], s, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, i)) : new Date(r[1], s, r[3] || 1, r[4] || 0, r[5] || 0, r[6] || 0, i) } } return new Date(e) }(t), this.init() }, g.init = function () { var t = this.$d; this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds() }, g.$utils = function () { return O }, g.isValid = function () { return !(this.$d.toString() === l) }, g.isSame = function (t, e) { var n = b(t); return this.startOf(e) <= n && n <= this.endOf(e) }, g.isAfter = function (t, e) { return b(t) < this.startOf(e) }, g.isBefore = function (t, e) { return this.endOf(e) < b(t) }, g.$g = function (t, e, n) { return O.u(t) ? this[e] : this.set(n, t) }, g.unix = function () { return Math.floor(this.valueOf() / 1e3) }, g.valueOf = function () { return this.$d.getTime() }, g.startOf = function (t, e) { var n = this, r = !!O.u(e) || e, f = O.p(t), l = function (t, e) { var s = O.w(n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t), n); return r ? s : s.endOf(a) }, $ = function (t, e) { return O.w(n.toDate()[t].apply(n.toDate("s"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)), n) }, y = this.$W, M = this.$M, g = this.$D, v = "set" + (this.$u ? "UTC" : ""); switch (f) { case h: return r ? l(1, 0) : l(31, 11); case c: return r ? l(1, M) : l(0, M + 1); case o: var m = this.$locale().weekStart || 0, D = (y < m ? y + 7 : y) - m; return l(r ? g - D : g + (6 - D), M); case a: case d: return $(v + "Hours", 0); case u: return $(v + "Minutes", 1); case i: return $(v + "Seconds", 2); case s: return $(v + "Milliseconds", 3); default: return this.clone() } }, g.endOf = function (t) { return this.startOf(t, !1) }, g.$set = function (t, e) { var n, o = O.p(t), f = "set" + (this.$u ? "UTC" : ""), l = (n = {}, n[a] = f + "Date", n[d] = f + "Date", n[c] = f + "Month", n[h] = f + "FullYear", n[u] = f + "Hours", n[i] = f + "Minutes", n[s] = f + "Seconds", n[r] = f + "Milliseconds", n)[o], $ = o === a ? this.$D + (e - this.$W) : e; if (o === c || o === h) { var y = this.clone().set(d, 1); y.$d[l]($), y.init(), this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d } else l && this.$d[l]($); return this.init(), this }, g.set = function (t, e) { return this.clone().$set(t, e) }, g.get = function (t) { return this[O.p(t)]() }, g.add = function (r, f) { var d, l = this; r = Number(r); var $ = O.p(f), y = function (t) { var e = b(l); return O.w(e.date(e.date() + Math.round(t * r)), l) }; if ($ === c) return this.set(c, this.$M + r); if ($ === h) return this.set(h, this.$y + r); if ($ === a) return y(1); if ($ === o) return y(7); var M = (d = {}, d[i] = e, d[u] = n, d[s] = t, d)[$] || 1, g = this.$d.getTime() + r * M; return O.w(g, this) }, g.subtract = function (t, e) { return this.add(-1 * t, e) }, g.format = function (t) { var e = this, n = this.$locale(); if (!this.isValid()) return n.invalidDate || l; var r = t || "YYYY-MM-DDTHH:mm:ssZ", s = O.z(this), i = this.$H, u = this.$m, a = this.$M, o = n.weekdays, c = n.months, f = n.meridiem, h = function (t, n, s, i) { return t && (t[n] || t(e, r)) || s[n].slice(0, i) }, d = function (t) { return O.s(i % 12 || 12, t, "0") }, $ = f || function (t, e, n) { var r = t < 12 ? "AM" : "PM"; return n ? r.toLowerCase() : r }; return r.replace(y, (function (t, r) { return r || function (t) { switch (t) { case "YY": return String(e.$y).slice(-2); case "YYYY": return O.s(e.$y, 4, "0"); case "M": return a + 1; case "MM": return O.s(a + 1, 2, "0"); case "MMM": return h(n.monthsShort, a, c, 3); case "MMMM": return h(c, a); case "D": return e.$D; case "DD": return O.s(e.$D, 2, "0"); case "d": return String(e.$W); case "dd": return h(n.weekdaysMin, e.$W, o, 2); case "ddd": return h(n.weekdaysShort, e.$W, o, 3); case "dddd": return o[e.$W]; case "H": return String(i); case "HH": return O.s(i, 2, "0"); case "h": return d(1); case "hh": return d(2); case "a": return $(i, u, !0); case "A": return $(i, u, !1); case "m": return String(u); case "mm": return O.s(u, 2, "0"); case "s": return String(e.$s); case "ss": return O.s(e.$s, 2, "0"); case "SSS": return O.s(e.$ms, 3, "0"); case "Z": return s }return null }(t) || s.replace(":", "") })) }, g.utcOffset = function () { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15) }, g.diff = function (r, d, l) { var $, y = this, M = O.p(d), g = b(r), v = (g.utcOffset() - this.utcOffset()) * e, m = this - g, D = function () { return O.m(y, g) }; switch (M) { case h: $ = D() / 12; break; case c: $ = D(); break; case f: $ = D() / 3; break; case o: $ = (m - v) / 6048e5; break; case a: $ = (m - v) / 864e5; break; case u: $ = m / n; break; case i: $ = m / e; break; case s: $ = m / t; break; default: $ = m }return l ? $ : O.a($) }, g.daysInMonth = function () { return this.endOf(c).$D }, g.$locale = function () { return D[this.$L] }, g.locale = function (t, e) { if (!t) return this.$L; var n = this.clone(), r = w(t, e, !0); return r && (n.$L = r), n }, g.clone = function () { return O.w(this.$d, this) }, g.toDate = function () { return new Date(this.valueOf()) }, g.toJSON = function () { return this.isValid() ? this.toISOString() : null }, g.toISOString = function () { return this.$d.toISOString() }, g.toString = function () { return this.$d.toUTCString() }, M }(), k = _.prototype; return b.prototype = k, [["$ms", r], ["$s", s], ["$m", i], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function (t) { k[t[1]] = function (e) { return this.$g(e, t[0], t[1]) } })), b.extend = function (t, e) { return t.$i || (t(e, _, b), t.$i = !0), b }, b.locale = w, b.isDayjs = S, b.unix = function (t) { return b(1e3 * t) }, b.en = D[m], b.Ls = D, b.p = {}, b }(); export { e as default };
8
+ //# sourceMappingURL=/sm/7f8378e86150ba7e67ec7a5d3b95ee94ad0759c2660a61ddbadb7a80a9f754a1.map
package/utils/utils.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as dayjs from 'dayjs';
1
+ import * as dayjs from './dayjs';
2
2
  import type { TreeNode } from '../types';
3
3
  import config from '../config';
4
4
  import System from './System';