@gez/date-time-kit 2.0.0-alpha.2 → 2.0.0-alpha.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.
|
@@ -39,8 +39,8 @@ export declare class Ele extends UiBase<Attrs, Emits> {
|
|
|
39
39
|
set showingTime(val: number | string | Date);
|
|
40
40
|
get weekStartAt(): Weeks;
|
|
41
41
|
set weekStartAt(val: Weeks);
|
|
42
|
-
get minGranularity(): "
|
|
43
|
-
set minGranularity(val: '
|
|
42
|
+
get minGranularity(): NonNullable<Attrs["min-granularity"]>;
|
|
43
|
+
set minGranularity(val: NonNullable<Attrs['min-granularity']>);
|
|
44
44
|
protected _style: string;
|
|
45
45
|
protected _template: string;
|
|
46
46
|
private get _navEle();
|
|
@@ -33,7 +33,7 @@ export class Ele extends UiBase {
|
|
|
33
33
|
constructor() {
|
|
34
34
|
super();
|
|
35
35
|
__publicField(this, "_style", styleStr);
|
|
36
|
-
__publicField(this, "_template", html(_a || (_a = __template(['\n<dt-popover>\n <slot slot="trigger" name="trigger"><button>select date and time</button></slot>\n <div slot="pop" class="wrapper menu">\n <dt-yyyymm-nav\n show-ctrl-btn-month-add\n show-ctrl-btn-month-sub\n ></dt-yyyymm-nav>\n <dt-calendar-base></dt-calendar-base>\n <dt-popover id="time-popover">\n <div slot="trigger" class="time-echo-wrapper">\n <i class="time-icon"></i>\n <span class="time-echo">hh:mm:ss.sss</span>\n </div>\n <div slot="pop" class="time-selector">\n <h3 class="title">Select Time</h3>\n <dt-hhmmss-ms-list-grp></dt-hhmmss-ms-list-grp>\n <button id="time-selector-done-btn">Done</button>\n </div>\n </dt-popover>\n </div>\n</dt-popover>\n']))));
|
|
36
|
+
__publicField(this, "_template", html(_a || (_a = __template(['\n<dt-popover part="popover">\n <slot slot="trigger" name="trigger"><button>select date and time</button></slot>\n <div slot="pop" class="wrapper menu" part="pop">\n <dt-yyyymm-nav\n show-ctrl-btn-month-add\n show-ctrl-btn-month-sub\n ></dt-yyyymm-nav>\n <dt-calendar-base></dt-calendar-base>\n <dt-popover id="time-popover" part="popover time">\n <div slot="trigger" class="time-echo-wrapper">\n <i class="time-icon"></i>\n <span class="time-echo">hh:mm:ss.sss</span>\n </div>\n <div slot="pop" class="time-selector">\n <h3 class="title">Select Time</h3>\n <dt-hhmmss-ms-list-grp></dt-hhmmss-ms-list-grp>\n <button id="time-selector-done-btn">Done</button>\n </div>\n </dt-popover>\n </div>\n</dt-popover>\n']))));
|
|
37
37
|
__publicField(this, "_render", debounce(() => {
|
|
38
38
|
if (!this.isConnected) return;
|
|
39
39
|
const currentTime = this.currentTime;
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"unbuild": "3.6.0",
|
|
18
18
|
"vitest": "3.2.4"
|
|
19
19
|
},
|
|
20
|
-
"version": "2.0.0-alpha.
|
|
20
|
+
"version": "2.0.0-alpha.3",
|
|
21
21
|
"type": "module",
|
|
22
22
|
"private": false,
|
|
23
23
|
"exports": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"template",
|
|
37
37
|
"public"
|
|
38
38
|
],
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "6c4121d2ee7b8e2730e379a8c8855009e6cab2b8"
|
|
40
40
|
}
|
|
@@ -101,27 +101,22 @@ export class Ele extends UiBase<Attrs, Emits> {
|
|
|
101
101
|
public get minGranularity() {
|
|
102
102
|
return this._getAttr('min-granularity', 'millisecond');
|
|
103
103
|
}
|
|
104
|
-
public set minGranularity(val:
|
|
105
|
-
| 'day'
|
|
106
|
-
| 'hour'
|
|
107
|
-
| 'minute'
|
|
108
|
-
| 'second'
|
|
109
|
-
| 'millisecond') {
|
|
104
|
+
public set minGranularity(val: NonNullable<Attrs['min-granularity']>) {
|
|
110
105
|
if (!granularityList.includes(val)) return;
|
|
111
106
|
this.setAttribute('min-granularity', val);
|
|
112
107
|
}
|
|
113
108
|
|
|
114
109
|
protected _style = styleStr;
|
|
115
110
|
protected _template = html`
|
|
116
|
-
<dt-popover>
|
|
111
|
+
<dt-popover part="popover">
|
|
117
112
|
<slot slot="trigger" name="trigger"><button>select date and time</button></slot>
|
|
118
|
-
<div slot="pop" class="wrapper menu">
|
|
113
|
+
<div slot="pop" class="wrapper menu" part="pop">
|
|
119
114
|
<dt-yyyymm-nav
|
|
120
115
|
show-ctrl-btn-month-add
|
|
121
116
|
show-ctrl-btn-month-sub
|
|
122
117
|
></dt-yyyymm-nav>
|
|
123
118
|
<dt-calendar-base></dt-calendar-base>
|
|
124
|
-
<dt-popover id="time-popover">
|
|
119
|
+
<dt-popover id="time-popover" part="popover time">
|
|
125
120
|
<div slot="trigger" class="time-echo-wrapper">
|
|
126
121
|
<i class="time-icon"></i>
|
|
127
122
|
<span class="time-echo">hh:mm:ss.sss</span>
|