@gez/date-time-kit 2.0.0-alpha.3 → 2.0.0-alpha.5
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/dist/assets/index.d.ts +9 -0
- package/dist/assets/index.mjs +13 -0
- package/dist/components/calendar/index.css.d.ts +2 -0
- package/dist/components/calendar/index.css.mjs +11 -0
- package/dist/components/calendar/index.d.ts +2 -3
- package/dist/components/calendar/index.html.d.ts +2 -0
- package/dist/components/calendar/index.html.mjs +13 -0
- package/dist/components/calendar/index.mjs +6 -27
- package/dist/components/calendar/weeks.d.ts +3 -0
- package/dist/components/calendar/weeks.mjs +15 -0
- package/dist/components/date-time-selector/index.d.ts +14 -6
- package/dist/components/date-time-selector/index.html.d.ts +2 -0
- package/dist/components/date-time-selector/index.html.mjs +14 -0
- package/dist/components/date-time-selector/index.mjs +41 -86
- package/dist/components/date-time-selector/styleStr.mjs +1 -1
- package/dist/components/hhmmss-ms-list-grp/base.d.ts +51 -0
- package/dist/components/hhmmss-ms-list-grp/base.mjs +207 -0
- package/dist/components/hhmmss-ms-list-grp/css.d.ts +3 -0
- package/dist/components/hhmmss-ms-list-grp/css.mjs +9 -0
- package/dist/components/hhmmss-ms-list-grp/html.d.ts +2 -0
- package/dist/components/hhmmss-ms-list-grp/html.mjs +11 -0
- package/dist/components/hhmmss-ms-list-grp/index.d.ts +6 -41
- package/dist/components/hhmmss-ms-list-grp/index.mjs +8 -214
- package/dist/components/hhmmss-ms-list-grp/selector.d.ts +37 -0
- package/dist/components/hhmmss-ms-list-grp/selector.mjs +98 -0
- package/dist/components/i18n/index.d.ts +2 -1
- package/dist/components/i18n/index.mjs +8 -5
- package/dist/components/num-list/index.css.d.ts +2 -0
- package/dist/components/num-list/index.css.mjs +6 -0
- package/dist/components/num-list/index.mjs +8 -8
- package/dist/components/period-selector/index.css.d.ts +2 -0
- package/dist/components/period-selector/index.css.mjs +6 -0
- package/dist/components/period-selector/index.d.ts +10 -7
- package/dist/components/period-selector/index.html.d.ts +2 -0
- package/dist/components/period-selector/index.html.mjs +16 -0
- package/dist/components/period-selector/index.mjs +88 -102
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/index.mjs +4 -3
- package/dist/components/quick-selector/index.css.d.ts +2 -0
- package/dist/components/quick-selector/index.css.mjs +7 -0
- package/dist/components/quick-selector/index.d.ts +4 -3
- package/dist/components/quick-selector/index.html.d.ts +5 -0
- package/dist/components/quick-selector/index.html.mjs +69 -0
- package/dist/components/quick-selector/index.mjs +41 -94
- package/dist/components/quick-selector/quick-key.d.ts +2 -0
- package/dist/components/quick-selector/quick-key.mjs +0 -0
- package/dist/components/web-component-base/css.d.ts +2 -0
- package/dist/components/web-component-base/css.mjs +12 -0
- package/dist/components/web-component-base/index.d.ts +3 -1
- package/dist/components/web-component-base/index.mjs +4 -8
- package/dist/components/yyyymm-nav/index.css.d.ts +2 -0
- package/dist/components/yyyymm-nav/index.css.mjs +14 -0
- package/dist/components/yyyymm-nav/index.html.d.ts +2 -0
- package/dist/components/yyyymm-nav/index.html.mjs +10 -0
- package/dist/components/yyyymm-nav/index.mjs +4 -9
- package/dist/components/yyyymmdd-list-grp/index.css.d.ts +2 -0
- package/dist/components/yyyymmdd-list-grp/index.css.mjs +6 -0
- package/dist/components/yyyymmdd-list-grp/index.html.d.ts +2 -0
- package/dist/components/yyyymmdd-list-grp/index.html.mjs +8 -0
- package/dist/components/yyyymmdd-list-grp/index.mjs +15 -17
- package/dist/i18n.d.ts +14 -0
- package/dist/i18n.mjs +153 -27
- package/dist/utils.d.ts +5 -0
- package/dist/utils.mjs +5 -0
- package/package.json +2 -2
- package/src/assets/index.ts +23 -0
- package/src/components/calendar/index.css.ts +175 -0
- package/src/components/calendar/index.html.ts +20 -0
- package/src/components/calendar/index.ts +6 -147
- package/src/components/calendar/weeks.ts +17 -0
- package/src/components/date-time-selector/index.html.ts +23 -0
- package/src/components/date-time-selector/index.ts +53 -111
- package/src/components/date-time-selector/styleStr.ts +17 -104
- package/src/components/hhmmss-ms-list-grp/base.ts +252 -0
- package/src/components/hhmmss-ms-list-grp/css.ts +172 -0
- package/src/components/hhmmss-ms-list-grp/html.ts +59 -0
- package/src/components/hhmmss-ms-list-grp/index.ts +11 -350
- package/src/components/hhmmss-ms-list-grp/selector.ts +131 -0
- package/src/components/i18n/index.ts +10 -3
- package/{dist/components/num-list/index.css → src/components/num-list/index.css.ts} +5 -2
- package/src/components/num-list/index.ts +2 -39
- package/src/components/period-selector/index.css.ts +82 -0
- package/src/components/period-selector/index.html.ts +38 -0
- package/src/components/period-selector/index.ts +90 -283
- package/src/components/popover/index.ts +10 -1
- package/{dist/components/quick-selector/index.css → src/components/quick-selector/index.css.ts} +40 -32
- package/src/components/quick-selector/index.html.ts +90 -0
- package/src/components/quick-selector/index.ts +25 -266
- package/src/components/quick-selector/quick-key.ts +3 -0
- package/src/components/web-component-base/css.ts +56 -0
- package/src/components/web-component-base/index.ts +13 -51
- package/{dist/components/yyyymm-nav/index.css → src/components/yyyymm-nav/index.css.ts} +53 -10
- package/src/components/yyyymm-nav/index.html.ts +25 -0
- package/src/components/yyyymm-nav/index.ts +5 -118
- package/{dist/components/yyyymmdd-list-grp/index.css → src/components/yyyymmdd-list-grp/index.css.ts} +5 -1
- package/src/components/yyyymmdd-list-grp/index.html.ts +20 -0
- package/src/components/yyyymmdd-list-grp/index.ts +4 -52
- package/src/i18n.ts +167 -27
- package/src/utils.ts +7 -0
- package/dist/components/calendar/index.css +0 -108
- package/dist/components/hhmmss-ms-list-grp/index.css +0 -60
- package/dist/components/period-selector/index.css +0 -153
- package/dist/components/web-component-base/index.css +0 -9
- package/dist/components/web-component-base/scrollbar.css +0 -25
- package/src/components/calendar/index.scss +0 -128
- package/src/components/hhmmss-ms-list-grp/index.scss +0 -61
- package/src/components/num-list/index.scss +0 -38
- package/src/components/period-selector/index.scss +0 -161
- package/src/components/quick-selector/index.scss +0 -183
- package/src/components/web-component-base/index.scss +0 -11
- package/src/components/web-component-base/scrollbar.scss +0 -30
- package/src/components/yyyymm-nav/index.scss +0 -108
- package/src/components/yyyymmdd-list-grp/index.scss +0 -33
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const svg2url: (svg: string) => string;
|
|
2
|
+
export declare const svg2cssUrl: (svg: string) => string;
|
|
3
|
+
export declare const arrowLeftSvg = "<svg class=\"bidirectional-flip\" width=\"16\" height=\"17\" fill=\"currentColor\"><path d=\"M11.687 1.703a.5.5 0 0 0-.707 0L4.852 7.83a.505.505 0 0 0-.045.05.5.5 0 0 0-.051.752l6.128 6.128a.5.5 0 0 0 .707-.707L5.817 8.28l5.87-5.87a.5.5 0 0 0 0-.707Z\"/></svg>";
|
|
4
|
+
export declare const arrowRightSvg = "<svg class=\"bidirectional-flip\" width=\"17\" height=\"17\" fill=\"currentColor\"><path d=\"M5.256 1.703a.5.5 0 0 1 .707 0l6.128 6.128a.493.493 0 0 1 .045.05.5.5 0 0 1 .051.752l-6.128 6.128a.5.5 0 0 1-.707-.707l5.774-5.774-5.87-5.87a.5.5 0 0 1 0-.707Z\"/></svg>";
|
|
5
|
+
export declare const arrowLeftDoubleSvg = "<svg class=\"bidirectional-flip\" width=\"16\" height=\"17\" fill=\"currentColor\"><path d=\"M9.037 1.98a.5.5 0 1 1 .707.707l-5.87 5.87 5.774 5.774a.5.5 0 1 1-.707.707L2.813 8.911a.5.5 0 0 1 .051-.752.505.505 0 0 1 .045-.051L9.037 1.98ZM13.037 1.98a.5.5 0 0 1 .707.707l-5.87 5.87 5.774 5.774a.5.5 0 1 1-.707.707L6.813 8.911a.5.5 0 0 1 .051-.752.505.505 0 0 1 .045-.051l6.128-6.128Z\"/></svg>";
|
|
6
|
+
export declare const arrowRightDoubleSvg = "<svg class=\"bidirectional-flip\" width=\"17\" height=\"17\" fill=\"currentColor\"><path d=\"M7.963 1.703a.5.5 0 0 0-.707.707l5.87 5.87-5.774 5.774a.5.5 0 0 0 .707.707l6.128-6.128a.5.5 0 0 0-.051-.751.493.493 0 0 0-.045-.051L7.963 1.703ZM3.963 1.703a.5.5 0 0 0-.707.707l5.87 5.87-5.774 5.774a.5.5 0 0 0 .707.707l6.128-6.128a.5.5 0 0 0-.051-.751.493.493 0 0 0-.045-.051L3.963 1.703Z\"/></svg>";
|
|
7
|
+
export declare const arrowDownSvg = "<svg class=\"bidirectional-flip\" width=\"15\" height=\"15\" fill=\"currentColor\"><path d=\"m8.02 10.54 3.96-4.4a.583.583 0 0 0-.433-.973h-7.88a.583.583 0 0 0-.434.973l3.94 4.378c.216.24.585.26.824.044l.022-.021Z\"/></svg>";
|
|
8
|
+
export declare const backArrowSvg = "<svg class=\"bidirectional-flip\" width=\"24\" height=\"24\" fill=\"currentColor\"><path d=\"M9.894 5.106a.75.75 0 0 1 0 1.06L4.811 11.25 21 11.25a.75.75 0 0 1 0 1.5l-16.191-.001 5.085 5.085a.75.75 0 0 1-1.06 1.06L2.47 12.53a.75.75 0 0 1 0-1.06l6.364-6.364a.75.75 0 0 1 1.06 0Z\"/></svg>";
|
|
9
|
+
export declare const timeSvg = "<svg width=\"14\" height=\"15\" fill=\"currentColor\"><path d=\"M7.4335 4.241a.4376.4376 0 0 0-.871.0594v3.783l.0044.0622a.4375.4375 0 0 0 .1921.3029L8.9242 9.877l.0566.0317a.4376.4376 0 0 0 .5495-.1559l.0317-.0566a.4376.4376 0 0 0-.1559-.5495L7.4375 7.8471V4.3004l-.004-.0593ZM7 1.6667c-3.2217 0-5.8333 2.6116-5.8333 5.8333 0 3.2217 2.6116 5.8333 5.8333 5.8333 3.2217 0 5.8333-2.6116 5.8333-5.8333 0-3.2217-2.6116-5.8333-5.8333-5.8333Zm0 .814c2.7721 0 5.0194 2.2472 5.0194 5.0193 0 2.7721-2.2473 5.0194-5.0194 5.0194S1.9806 10.2721 1.9806 7.5 4.228 2.4806 7 2.4806Z\"/></svg>";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const symbols = /[\r\n%#()<>?[\\\]^`{|}]/g;
|
|
2
|
+
export const svg2url = (svg) => "data:image/svg+xml," + svg.replace(
|
|
3
|
+
"<svg",
|
|
4
|
+
~svg.indexOf("xmlns") ? "<svg" : '<svg xmlns="http://www.w3.org/2000/svg"'
|
|
5
|
+
).replace(/"/g, "'").replace(/>\s{1,}</g, "><").replace(/\s{2,}/g, " ").replace(symbols, encodeURIComponent);
|
|
6
|
+
export const svg2cssUrl = (svg) => 'url("'.concat(svg2url(svg), '")');
|
|
7
|
+
export const arrowLeftSvg = '<svg class="bidirectional-flip" width="16" height="17" fill="currentColor"><path d="M11.687 1.703a.5.5 0 0 0-.707 0L4.852 7.83a.505.505 0 0 0-.045.05.5.5 0 0 0-.051.752l6.128 6.128a.5.5 0 0 0 .707-.707L5.817 8.28l5.87-5.87a.5.5 0 0 0 0-.707Z"/></svg>';
|
|
8
|
+
export const arrowRightSvg = '<svg class="bidirectional-flip" width="17" height="17" fill="currentColor"><path d="M5.256 1.703a.5.5 0 0 1 .707 0l6.128 6.128a.493.493 0 0 1 .045.05.5.5 0 0 1 .051.752l-6.128 6.128a.5.5 0 0 1-.707-.707l5.774-5.774-5.87-5.87a.5.5 0 0 1 0-.707Z"/></svg>';
|
|
9
|
+
export const arrowLeftDoubleSvg = '<svg class="bidirectional-flip" width="16" height="17" fill="currentColor"><path d="M9.037 1.98a.5.5 0 1 1 .707.707l-5.87 5.87 5.774 5.774a.5.5 0 1 1-.707.707L2.813 8.911a.5.5 0 0 1 .051-.752.505.505 0 0 1 .045-.051L9.037 1.98ZM13.037 1.98a.5.5 0 0 1 .707.707l-5.87 5.87 5.774 5.774a.5.5 0 1 1-.707.707L6.813 8.911a.5.5 0 0 1 .051-.752.505.505 0 0 1 .045-.051l6.128-6.128Z"/></svg>';
|
|
10
|
+
export const arrowRightDoubleSvg = '<svg class="bidirectional-flip" width="17" height="17" fill="currentColor"><path d="M7.963 1.703a.5.5 0 0 0-.707.707l5.87 5.87-5.774 5.774a.5.5 0 0 0 .707.707l6.128-6.128a.5.5 0 0 0-.051-.751.493.493 0 0 0-.045-.051L7.963 1.703ZM3.963 1.703a.5.5 0 0 0-.707.707l5.87 5.87-5.774 5.774a.5.5 0 0 0 .707.707l6.128-6.128a.5.5 0 0 0-.051-.751.493.493 0 0 0-.045-.051L3.963 1.703Z"/></svg>';
|
|
11
|
+
export const arrowDownSvg = '<svg class="bidirectional-flip" width="15" height="15" fill="currentColor"><path d="m8.02 10.54 3.96-4.4a.583.583 0 0 0-.433-.973h-7.88a.583.583 0 0 0-.434.973l3.94 4.378c.216.24.585.26.824.044l.022-.021Z"/></svg>';
|
|
12
|
+
export const backArrowSvg = '<svg class="bidirectional-flip" width="24" height="24" fill="currentColor"><path d="M9.894 5.106a.75.75 0 0 1 0 1.06L4.811 11.25 21 11.25a.75.75 0 0 1 0 1.5l-16.191-.001 5.085 5.085a.75.75 0 0 1-1.06 1.06L2.47 12.53a.75.75 0 0 1 0-1.06l6.364-6.364a.75.75 0 0 1 1.06 0Z"/></svg>';
|
|
13
|
+
export const timeSvg = '<svg width="14" height="15" fill="currentColor"><path d="M7.4335 4.241a.4376.4376 0 0 0-.871.0594v3.783l.0044.0622a.4375.4375 0 0 0 .1921.3029L8.9242 9.877l.0566.0317a.4376.4376 0 0 0 .5495-.1559l.0317-.0566a.4376.4376 0 0 0-.1559-.5495L7.4375 7.8471V4.3004l-.004-.0593ZM7 1.6667c-3.2217 0-5.8333 2.6116-5.8333 5.8333 0 3.2217 2.6116 5.8333 5.8333 5.8333 3.2217 0 5.8333-2.6116 5.8333-5.8333 0-3.2217-2.6116-5.8333-5.8333-5.8333Zm0 .814c2.7721 0 5.0194 2.2472 5.0194 5.0193 0 2.7721-2.2473 5.0194-5.0194 5.0194S1.9806 10.2721 1.9806 7.5 4.228 2.4806 7 2.4806Z"/></svg>';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var __freeze = Object.freeze;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
|
|
4
|
+
var _a;
|
|
5
|
+
import {
|
|
6
|
+
css,
|
|
7
|
+
cssDirLtrSelector1,
|
|
8
|
+
cssDirLtrSelector2,
|
|
9
|
+
cssDirLtrSelector3
|
|
10
|
+
} from "../../utils.mjs";
|
|
11
|
+
export default css(_a || (_a = __template(["\n:host {\n --gap: var(--calendar-item-gap, 10px 0);\n --item-size: var(--calendar-item-size, 30px);\n --color-disabled-text: var(--calendar-item-disabled-text, #aaa);\n --color-active-bg: var(--calendar-item-active-bg, #002BE7);\n --color-active-text: var(--calendar-item-active-text, #fff);\n --color-in-range-bg: var(--calendar-item-in-range-bg, #002BE726);\n --color-in-range-text: var(--calendar-item-in-range-text, #002BE7);\n --color-hover-bg: var(--calendar-item-hover-bg, #0000000D);\n --color-hover-text: var(--calendar-item-hover-text, #000);\n --color-active-hover-bg: var(--calendar-item-active-hover-bg, var(--color-active-bg));\n --color-active-hover-text: var(--calendar-item-active-hover-text, var(--color-active-text));\n}\n\n.wrapper {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: var(--gap);\n width: 100%;\n height: 100%;\n justify-content: space-between;\n text-align: center;\n}\n\n.week {\n min-width: var(--item-size);\n display: inline-block;\n}\n\n.item {\n min-width: var(--item-size);\n line-height: var(--item-size);\n height: var(--item-size);\n position: relative;\n --half-period-bg-w: calc(50% + var(--item-size) / 2);\n}\n.item span {\n position: relative;\n z-index: 2;\n}\n.item:not(.disabled) {\n cursor: pointer;\n}\n:host([show-other-month]) .item.prev.disabled, :host([show-other-month]) .item.next.disabled, .item.disabled:not(.prev, .next) {\n cursor: not-allowed;\n color: var(--color-disabled-text);\n}\n.item:hover {\n color: var(--color-hover-text);\n}\n.item.in-range {\n color: var(--color-in-range-text);\n}\n.item:not(.disabled) .highlight {\n display: block;\n border-radius: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n width: var(--item-size);\n height: var(--item-size);\n transform: translate(-50%, -50%);\n}\n.item.start, .item.end {\n color: var(--color-active-text);\n}\n.item.start .highlight, .item.end .highlight {\n background-color: var(--color-active-bg);\n}\n.item:hover .highlight {\n background-color: var(--color-hover-bg);\n}\n.item.start:hover .highlight, .item.end:hover .highlight {\n background-color: var(--color-active-hover-bg);\n}\n.item.start:hover, .item.end:hover {\n color: var(--color-active-hover-text);\n}\n.item.in-range .bg {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 43, 231, 0.1490196078);\n}\n.item:nth-of-type(7n + 1) .bg {\n border-radius: var(--item-size) 0 0 var(--item-size);\n width: var(--half-period-bg-w);\n left: calc(50% - var(--item-size) / 2);\n}\n.item:nth-of-type(7n) .bg {\n border-radius: 0 var(--item-size) var(--item-size) 0;\n width: var(--half-period-bg-w);\n}\n.item:nth-of-type(7n).range-start .bg {\n width: var(--item-size);\n left: calc(50% - var(--item-size) / 2);\n}\n.item.range-start .bg {\n border-top-left-radius: var(--item-size);\n border-bottom-left-radius: var(--item-size);\n width: var(--half-period-bg-w);\n left: calc(50% - var(--item-size) / 2);\n}\n.item.range-end .bg {\n border-top-right-radius: var(--item-size);\n border-bottom-right-radius: var(--item-size);\n width: var(--half-period-bg-w);\n}\n.item.range-start.range-end .bg {\n width: var(--item-size);\n}\n.item:nth-of-type(7n).range-start .bg, .item:nth-of-type(7n + 1).range-end .bg {\n width: var(--item-size);\n}\n\n.item .bg", " { border-radius: 0; }\n.item .bg", " { border-radius: 0; }\n.item .bg", " { border-radius: 0; }\n.item.in-range .bg", " { left: auto; right: 0; }\n.item.in-range .bg", " { left: auto; right: 0; }\n.item.in-range .bg", " { left: auto; right: 0; }\n.item:nth-of-type(7n + 1) .bg", " { left: auto; right: calc(50% - var(--item-size) / 2); border-radius: 0 var(--item-size) var(--item-size) 0; }\n.item:nth-of-type(7n + 1) .bg", " { left: auto; right: calc(50% - var(--item-size) / 2); border-radius: 0 var(--item-size) var(--item-size) 0; }\n.item:nth-of-type(7n + 1) .bg", " { left: auto; right: calc(50% - var(--item-size) / 2); border-radius: 0 var(--item-size) var(--item-size) 0; }\n.item:nth-of-type(7n) .bg", " { border-radius: var(--item-size) 0 0 var(--item-size); }\n.item:nth-of-type(7n) .bg", " { border-radius: var(--item-size) 0 0 var(--item-size); }\n.item:nth-of-type(7n) .bg", " { border-radius: var(--item-size) 0 0 var(--item-size); }\n.item:nth-of-type(7n).range-start .bg", " { left: auto; right: calc(50% - var(--item-size) / 2); }\n.item:nth-of-type(7n).range-start .bg", " { left: auto; right: calc(50% - var(--item-size) / 2); }\n.item:nth-of-type(7n).range-start .bg", " { left: auto; right: calc(50% - var(--item-size) / 2); }\n.item.range-start .bg", " {\n border-top-right-radius: var(--item-size);\n border-bottom-right-radius: var(--item-size);\n left: auto;\n right: calc(50% - var(--item-size) / 2);\n}\n.item.range-start .bg", " {\n border-top-right-radius: var(--item-size);\n border-bottom-right-radius: var(--item-size);\n left: auto;\n right: calc(50% - var(--item-size) / 2);\n}\n.item.range-start .bg", " {\n border-top-right-radius: var(--item-size);\n border-bottom-right-radius: var(--item-size);\n left: auto;\n right: calc(50% - var(--item-size) / 2);\n}\n.item.range-end .bg", " {\n border-top-left-radius: var(--item-size);\n border-bottom-left-radius: var(--item-size);\n}\n.item.range-end .bg", " {\n border-top-left-radius: var(--item-size);\n border-bottom-left-radius: var(--item-size);\n}\n.item.range-end .bg", " {\n border-top-left-radius: var(--item-size);\n border-bottom-left-radius: var(--item-size);\n}\n"])), cssDirLtrSelector1, cssDirLtrSelector2, cssDirLtrSelector3, cssDirLtrSelector1, cssDirLtrSelector2, cssDirLtrSelector3, cssDirLtrSelector1, cssDirLtrSelector2, cssDirLtrSelector3, cssDirLtrSelector1, cssDirLtrSelector2, cssDirLtrSelector3, cssDirLtrSelector1, cssDirLtrSelector2, cssDirLtrSelector3, cssDirLtrSelector1, cssDirLtrSelector2, cssDirLtrSelector3, cssDirLtrSelector1, cssDirLtrSelector2, cssDirLtrSelector3);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type BaseAttrs, type Emit2EventMap, UiBase } from '../web-component-base';
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export declare const getWeekInOrder: (startAt?: Weeks | null) => Weeks[];
|
|
2
|
+
import { type Weeks } from './weeks';
|
|
3
|
+
export { type Weeks, weekKey, getWeekInOrder } from './weeks';
|
|
5
4
|
export interface Attrs extends BaseAttrs {
|
|
6
5
|
/**
|
|
7
6
|
* The showing time, used to determine the month to show on calendar.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var __freeze = Object.freeze;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
|
|
4
|
+
var _a, _b, _c;
|
|
5
|
+
import { html } from "../../utils.mjs";
|
|
6
|
+
import { Ele as I18nEle } from "../i18n/index.mjs";
|
|
7
|
+
I18nEle.define();
|
|
8
|
+
import { weekKey } from "./weeks.mjs";
|
|
9
|
+
export default html(_c || (_c = __template(['\n<div class="wrapper">', "</div>"])), weekKey.map(
|
|
10
|
+
(key) => html(_a || (_a = __template(['<dt-i18n class="week" i18n-key="date.', '" part="week"></dt-i18n>'])), key)
|
|
11
|
+
).join("") + [...Array(7 * 6)].map(
|
|
12
|
+
(_, i) => html(_b || (_b = __template(['<div class="item" part="item"><i class="bg"></i><i class="highlight"></i><span>', "</span></div>"])), i % 31 + 1)
|
|
13
|
+
).join(""));
|
|
@@ -1,40 +1,19 @@
|
|
|
1
|
-
var __freeze = Object.freeze;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
|
|
6
|
-
var _a, _b, _c, _d;
|
|
7
|
-
import { closestByEvent, css, debounce, html } from "../../utils.mjs";
|
|
8
|
-
import { Ele as I18nEle } from "../i18n/index.mjs";
|
|
9
|
-
I18nEle.define();
|
|
4
|
+
import { closestByEvent, debounce } from "../../utils.mjs";
|
|
10
5
|
import {
|
|
11
6
|
UiBase
|
|
12
7
|
} from "../web-component-base/index.mjs";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"tue",
|
|
18
|
-
"wed",
|
|
19
|
-
"thu",
|
|
20
|
-
"fri",
|
|
21
|
-
"sat"
|
|
22
|
-
];
|
|
23
|
-
export const getWeekInOrder = (startAt) => {
|
|
24
|
-
if (!startAt) startAt = "sun";
|
|
25
|
-
const index = weekKey.indexOf(startAt);
|
|
26
|
-
if (index === -1) return weekKey;
|
|
27
|
-
return [...weekKey.slice(index), ...weekKey.slice(0, index)];
|
|
28
|
-
};
|
|
8
|
+
import styleStr from "./index.css.mjs";
|
|
9
|
+
import html from "./index.html.mjs";
|
|
10
|
+
import { getWeekInOrder, weekKey } from "./weeks.mjs";
|
|
11
|
+
export { weekKey, getWeekInOrder } from "./weeks.mjs";
|
|
29
12
|
export class Ele extends UiBase {
|
|
30
13
|
constructor() {
|
|
31
14
|
super();
|
|
32
15
|
__publicField(this, "_style", styleStr);
|
|
33
|
-
__publicField(this, "_template", html
|
|
34
|
-
(key) => html(_b || (_b = __template(['<dt-i18n class="week" i18n-key="date.', '" part="week"></dt-i18n>'])), key)
|
|
35
|
-
).join("") + [...Array(7 * 6)].map(
|
|
36
|
-
(_, i) => html(_c || (_c = __template(['<div class="item" part="item"><i class="bg"></i><i class="highlight"></i><span>', "</span></div>"])), i % 31 + 1)
|
|
37
|
-
).join("")));
|
|
16
|
+
__publicField(this, "_template", html);
|
|
38
17
|
__publicField(this, "_onWeekStartAtChange", debounce(() => {
|
|
39
18
|
if (!this.isConnected) return;
|
|
40
19
|
const weekOrder = getWeekInOrder(this.weekStartAt);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const weekKey = [
|
|
2
|
+
"sun",
|
|
3
|
+
"mon",
|
|
4
|
+
"tue",
|
|
5
|
+
"wed",
|
|
6
|
+
"thu",
|
|
7
|
+
"fri",
|
|
8
|
+
"sat"
|
|
9
|
+
];
|
|
10
|
+
export const getWeekInOrder = (startAt) => {
|
|
11
|
+
if (!startAt) startAt = "sun";
|
|
12
|
+
const index = weekKey.indexOf(startAt);
|
|
13
|
+
if (index === -1) return weekKey;
|
|
14
|
+
return [...weekKey.slice(index), ...weekKey.slice(0, index)];
|
|
15
|
+
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { type BaseAttrs, type Emit2EventMap, UiBase } from '../web-component-base';
|
|
2
1
|
import { type Weeks } from '../calendar';
|
|
2
|
+
import { type Granularity as TimeGranularity } from '../hhmmss-ms-list-grp/selector';
|
|
3
|
+
import { type BaseAttrs, type Emit2EventMap, UiBase } from '../web-component-base';
|
|
4
|
+
export declare const granularityList: readonly ["day", "hour", "minute", "second", "millisecond"];
|
|
5
|
+
export type Granularity = (typeof granularityList)[number];
|
|
3
6
|
export interface Attrs extends BaseAttrs {
|
|
4
7
|
/**
|
|
5
8
|
* Set which day of the week is the first day.
|
|
@@ -23,13 +26,19 @@ export interface Attrs extends BaseAttrs {
|
|
|
23
26
|
* 选择器的粒度,表示最小可选的时间单位。默认为 millisecond。
|
|
24
27
|
* 例如设置为 'minute',则表示只能选择到分钟,秒和毫秒将被忽略。
|
|
25
28
|
*/
|
|
26
|
-
'min-granularity'?:
|
|
29
|
+
'min-granularity'?: Granularity;
|
|
27
30
|
}
|
|
28
31
|
export interface Emits {
|
|
29
32
|
'select-time': Date;
|
|
30
33
|
'open-change': boolean;
|
|
31
34
|
}
|
|
32
35
|
export type EventMap = Emit2EventMap<Emits>;
|
|
36
|
+
/**
|
|
37
|
+
* 日期时间选择器(单个时间点)
|
|
38
|
+
* 包括日历和时分秒毫秒选择。
|
|
39
|
+
*
|
|
40
|
+
* 存在一个 timeFormatter 方法,用于格式化时分秒毫秒显示时间。
|
|
41
|
+
*/
|
|
33
42
|
export declare class Ele extends UiBase<Attrs, Emits> {
|
|
34
43
|
static readonly tagName: "dt-date-time-selector";
|
|
35
44
|
static get observedAttributes(): string[];
|
|
@@ -46,7 +55,6 @@ export declare class Ele extends UiBase<Attrs, Emits> {
|
|
|
46
55
|
private get _navEle();
|
|
47
56
|
private get _calendar();
|
|
48
57
|
private get _timeSelector();
|
|
49
|
-
private get _timePopover();
|
|
50
58
|
constructor();
|
|
51
59
|
connectedCallback(): void;
|
|
52
60
|
disconnectedCallback(): void;
|
|
@@ -54,8 +62,8 @@ export declare class Ele extends UiBase<Attrs, Emits> {
|
|
|
54
62
|
private _render;
|
|
55
63
|
private _onCalendarSelect;
|
|
56
64
|
private _onNavChange;
|
|
57
|
-
private _onTimePopoverOpenChange;
|
|
58
65
|
private _onNavOpenToggle;
|
|
59
|
-
private
|
|
60
|
-
timeFormatter: (time: Date, minGranularity:
|
|
66
|
+
private _onTimeSelectorChange;
|
|
67
|
+
get timeFormatter(): (time: Date, minGranularity: TimeGranularity) => string;
|
|
68
|
+
set timeFormatter(fn: (time: Date, minGranularity: TimeGranularity) => string);
|
|
61
69
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __freeze = Object.freeze;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
|
|
4
|
+
var _a;
|
|
5
|
+
import { html } from "../../utils.mjs";
|
|
6
|
+
import { Ele as PopoverEle } from "../popover/index.mjs";
|
|
7
|
+
PopoverEle.define();
|
|
8
|
+
import { Ele as YyyyMmNavEle } from "../yyyymm-nav/index.mjs";
|
|
9
|
+
YyyyMmNavEle.define();
|
|
10
|
+
import { Ele as CalendarBaseEle } from "../calendar/index.mjs";
|
|
11
|
+
CalendarBaseEle.define();
|
|
12
|
+
import { Ele as HhMmSsMsSelector } from "../hhmmss-ms-list-grp/selector.mjs";
|
|
13
|
+
HhMmSsMsSelector.define();
|
|
14
|
+
export default 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" 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-hhmmss-ms-selector></dt-hhmmss-ms-selector>\n </div>\n</dt-popover>\n'])));
|
|
@@ -1,56 +1,40 @@
|
|
|
1
|
-
var __freeze = Object.freeze;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { closestByEvent, debounce } from "../../utils.mjs";
|
|
5
|
+
import {
|
|
6
|
+
weekKey
|
|
7
|
+
} from "../calendar/index.mjs";
|
|
8
|
+
import {
|
|
9
|
+
granularityList as timeGranularityList
|
|
10
|
+
} from "../hhmmss-ms-list-grp/selector.mjs";
|
|
8
11
|
import {
|
|
9
12
|
UiBase
|
|
10
13
|
} from "../web-component-base/index.mjs";
|
|
11
14
|
import {
|
|
12
15
|
Ele as YyyyMmNavEle
|
|
13
16
|
} from "../yyyymm-nav/index.mjs";
|
|
17
|
+
import html from "./index.html.mjs";
|
|
14
18
|
import { styleStr } from "./styleStr.mjs";
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
Ele as CalendarBaseEle,
|
|
18
|
-
weekKey
|
|
19
|
-
} from "../calendar/index.mjs";
|
|
20
|
-
CalendarBaseEle.define();
|
|
21
|
-
import { Ele as HhMmSsMsListGrpEle } from "../hhmmss-ms-list-grp/index.mjs";
|
|
22
|
-
HhMmSsMsListGrpEle.define();
|
|
23
|
-
import { Ele as PopoverEle } from "../popover/index.mjs";
|
|
24
|
-
PopoverEle.define();
|
|
25
|
-
const granularityList = [
|
|
26
|
-
"day",
|
|
27
|
-
"hour",
|
|
28
|
-
"minute",
|
|
29
|
-
"second",
|
|
30
|
-
"millisecond"
|
|
31
|
-
];
|
|
19
|
+
export const granularityList = ["day", ...timeGranularityList];
|
|
32
20
|
export class Ele extends UiBase {
|
|
33
21
|
constructor() {
|
|
34
22
|
super();
|
|
35
23
|
__publicField(this, "_style", styleStr);
|
|
36
|
-
__publicField(this, "_template", html
|
|
24
|
+
__publicField(this, "_template", html);
|
|
37
25
|
__publicField(this, "_render", debounce(() => {
|
|
38
26
|
if (!this.isConnected) return;
|
|
39
27
|
const currentTime = this.currentTime;
|
|
40
28
|
this._calendar.weekStartAt = this.weekStartAt;
|
|
41
|
-
const tz = (/* @__PURE__ */ new Date()).getTimezoneOffset() * 60 * 1e3;
|
|
42
29
|
this._navEle.millisecond = this._calendar.timeStart = this._calendar.timeEnd = +currentTime;
|
|
43
30
|
this._calendar.showingTime = this.showingTime;
|
|
44
|
-
const selectorWrapper = this.shadowRoot.querySelector(".time-selector");
|
|
45
31
|
if (this.minGranularity === "day") {
|
|
46
|
-
this._timeSelector.
|
|
47
|
-
selectorWrapper.style.display = "none";
|
|
32
|
+
this._timeSelector.style.display = "none";
|
|
48
33
|
return;
|
|
49
34
|
}
|
|
50
|
-
|
|
35
|
+
this._timeSelector.style.display = "";
|
|
51
36
|
this._timeSelector.minGranularity = this.minGranularity;
|
|
52
|
-
this._timeSelector.
|
|
53
|
-
this.shadowRoot.querySelector(".wrapper .time-echo").textContent = this.timeFormatter(currentTime, this.minGranularity);
|
|
37
|
+
this._timeSelector.currentTime = currentTime;
|
|
54
38
|
}, 0));
|
|
55
39
|
__publicField(this, "_onCalendarSelect", (e) => {
|
|
56
40
|
e.stopPropagation();
|
|
@@ -63,40 +47,14 @@ export class Ele extends UiBase {
|
|
|
63
47
|
const { newTime } = e.detail;
|
|
64
48
|
this._calendar.showingTime = +newTime;
|
|
65
49
|
});
|
|
66
|
-
__publicField(this, "_onTimePopoverOpenChange", (e) => {
|
|
67
|
-
var _a2;
|
|
68
|
-
if (!(e.target instanceof PopoverEle)) return;
|
|
69
|
-
e.stopPropagation();
|
|
70
|
-
if (!e.detail) return this._render();
|
|
71
|
-
(_a2 = e.target.querySelector("dt-hhmmss-ms-list-grp")) == null ? void 0 : _a2.scrollToCurrentItem();
|
|
72
|
-
});
|
|
73
50
|
__publicField(this, "_onNavOpenToggle", (e) => {
|
|
74
|
-
var
|
|
51
|
+
var _a;
|
|
75
52
|
if (!(e.target instanceof YyyyMmNavEle)) return;
|
|
76
53
|
e.stopPropagation();
|
|
77
|
-
(
|
|
54
|
+
(_a = e.target.nextElementSibling) == null ? void 0 : _a.classList.toggle("hide", e.detail);
|
|
78
55
|
});
|
|
79
|
-
__publicField(this, "
|
|
80
|
-
|
|
81
|
-
if (!btn) return;
|
|
82
|
-
const calcTime = (time, ms) => {
|
|
83
|
-
time.setHours(0, 0, 0, 0);
|
|
84
|
-
time.setMilliseconds(ms);
|
|
85
|
-
return time;
|
|
86
|
-
};
|
|
87
|
-
this.currentTime = calcTime(
|
|
88
|
-
this.currentTime,
|
|
89
|
-
this._timeSelector.millisecond
|
|
90
|
-
);
|
|
91
|
-
this._timePopover.open = false;
|
|
92
|
-
});
|
|
93
|
-
__publicField(this, "timeFormatter", (time, minGranularity) => {
|
|
94
|
-
const t = new Date(+time - (/* @__PURE__ */ new Date()).getTimezoneOffset() * 60 * 1e3).toISOString().slice(11, 23);
|
|
95
|
-
if (minGranularity === "day") return "";
|
|
96
|
-
if (minGranularity === "hour") return t.slice(0, 2);
|
|
97
|
-
if (minGranularity === "minute") return t.slice(0, 5);
|
|
98
|
-
if (minGranularity === "second") return t.slice(0, 8);
|
|
99
|
-
return t;
|
|
56
|
+
__publicField(this, "_onTimeSelectorChange", (e) => {
|
|
57
|
+
this.currentTime = e.detail;
|
|
100
58
|
});
|
|
101
59
|
this._applyTemplate();
|
|
102
60
|
}
|
|
@@ -142,63 +100,53 @@ export class Ele extends UiBase {
|
|
|
142
100
|
this.setAttribute("min-granularity", val);
|
|
143
101
|
}
|
|
144
102
|
get _navEle() {
|
|
145
|
-
var
|
|
146
|
-
return (
|
|
103
|
+
var _a;
|
|
104
|
+
return (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("dt-yyyymm-nav");
|
|
147
105
|
}
|
|
148
106
|
get _calendar() {
|
|
149
|
-
var
|
|
150
|
-
return (
|
|
107
|
+
var _a;
|
|
108
|
+
return (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
|
|
151
109
|
"dt-calendar-base"
|
|
152
110
|
);
|
|
153
111
|
}
|
|
154
112
|
get _timeSelector() {
|
|
155
|
-
var
|
|
156
|
-
return (
|
|
157
|
-
"dt-hhmmss-ms-
|
|
113
|
+
var _a;
|
|
114
|
+
return (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
|
|
115
|
+
"dt-hhmmss-ms-selector"
|
|
158
116
|
);
|
|
159
117
|
}
|
|
160
|
-
get _timePopover() {
|
|
161
|
-
var _a2;
|
|
162
|
-
return (_a2 = this.shadowRoot) == null ? void 0 : _a2.querySelector("#time-popover");
|
|
163
|
-
}
|
|
164
118
|
connectedCallback() {
|
|
165
|
-
var _a2;
|
|
166
119
|
if (!super.connectedCallback()) return;
|
|
167
120
|
this._calendar.formatter = (i) => String(i).padStart(2, "0");
|
|
168
121
|
this._render();
|
|
169
122
|
this._calendar.addEventListener("select-time", this._onCalendarSelect);
|
|
170
123
|
this._navEle.addEventListener("change", this._onNavChange);
|
|
171
|
-
this._timePopover.addEventListener(
|
|
172
|
-
"open-change",
|
|
173
|
-
this._onTimePopoverOpenChange
|
|
174
|
-
);
|
|
175
124
|
this._navEle.addEventListener(
|
|
176
125
|
"popover-open-change",
|
|
177
126
|
this._onNavOpenToggle
|
|
178
127
|
);
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
128
|
+
this._timeSelector.addEventListener(
|
|
129
|
+
"select-time",
|
|
130
|
+
this._onTimeSelectorChange
|
|
131
|
+
);
|
|
132
|
+
this._timeSelector.addEventListener("open-change", this._stopEvent);
|
|
182
133
|
}
|
|
183
134
|
disconnectedCallback() {
|
|
184
|
-
var _a2;
|
|
185
135
|
if (!super.disconnectedCallback()) return;
|
|
186
136
|
this._calendar.removeEventListener(
|
|
187
137
|
"select-time",
|
|
188
138
|
this._onCalendarSelect
|
|
189
139
|
);
|
|
190
140
|
this._navEle.removeEventListener("change", this._onNavChange);
|
|
191
|
-
this._timePopover.removeEventListener(
|
|
192
|
-
"open-change",
|
|
193
|
-
this._onTimePopoverOpenChange
|
|
194
|
-
);
|
|
195
141
|
this._navEle.removeEventListener(
|
|
196
142
|
"popover-open-change",
|
|
197
143
|
this._onNavOpenToggle
|
|
198
144
|
);
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
145
|
+
this._timeSelector.removeEventListener(
|
|
146
|
+
"select-time",
|
|
147
|
+
this._onTimeSelectorChange
|
|
148
|
+
);
|
|
149
|
+
this._timeSelector.removeEventListener("open-change", this._stopEvent);
|
|
202
150
|
}
|
|
203
151
|
_onAttrChanged(name, oldValue, newValue) {
|
|
204
152
|
super._onAttrChanged(name, oldValue, newValue);
|
|
@@ -207,6 +155,13 @@ export class Ele extends UiBase {
|
|
|
207
155
|
this.dispatchEvent("select-time", this.currentTime);
|
|
208
156
|
}
|
|
209
157
|
}
|
|
158
|
+
get timeFormatter() {
|
|
159
|
+
return this._timeSelector.timeFormatter;
|
|
160
|
+
}
|
|
161
|
+
set timeFormatter(fn) {
|
|
162
|
+
if (typeof fn !== "function") return;
|
|
163
|
+
this._timeSelector.timeFormatter = fn;
|
|
164
|
+
}
|
|
210
165
|
}
|
|
211
166
|
__publicField(Ele, "tagName", "dt-date-time-selector");
|
|
212
167
|
Ele.define();
|
|
@@ -3,4 +3,4 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", { value: __freeze(raw || cooked.slice()) }));
|
|
4
4
|
var _a;
|
|
5
5
|
import { css } from "../../utils.mjs";
|
|
6
|
-
export const styleStr = css(_a || (_a = __template(["\n
|
|
6
|
+
export const styleStr = css(_a || (_a = __template(["\n:host {\n font-size: 14px;\n}\n.wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 15px;\n position: fixed;\n width: 285px;\n}\n.wrapper > * {\n width: 100%;\n}\n\ndt-calendar-base {\n // 254 = item height 6 * 30 + week 14 + gap 10 * 6\n height: 254px;\n}\ndt-calendar-base::part(week) {\n font-size: 12px;\n line-height: 14px;\n}\ndt-calendar-base::part(item) {\n font-size: 14px;\n}\ndt-calendar-base.hide {\n display: none;\n}\n\ndt-yyyymm-nav::part(list-grp) {\n height: 254px;\n margin-top: 15px;\n}\n"])));
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type BaseAttrs, UiBase } from '../web-component-base';
|
|
2
|
+
export declare const granularityList: readonly ["hour", "minute", "second", "millisecond"];
|
|
3
|
+
export type Granularity = (typeof granularityList)[number];
|
|
4
|
+
export declare const colOrderList: readonly ["hms", "hsm", "mhs", "msh", "shm", "smh"];
|
|
5
|
+
export type ColOrder = (typeof colOrderList)[number];
|
|
6
|
+
export interface Attrs extends BaseAttrs {
|
|
7
|
+
millisecond: number;
|
|
8
|
+
/**
|
|
9
|
+
* 选择器的粒度,表示最大可选的时间单位。默认为 hour。
|
|
10
|
+
* 例如设置为 'minute',则表示最大只能选择到分钟,小时将被忽略。
|
|
11
|
+
*/
|
|
12
|
+
'max-granularity'?: Granularity;
|
|
13
|
+
/**
|
|
14
|
+
* 选择器的粒度,表示最小可选的时间单位。默认为 millisecond。
|
|
15
|
+
* 例如设置为 'minute',则表示只能选择到分钟,秒和毫秒将被忽略。
|
|
16
|
+
*/
|
|
17
|
+
'min-granularity'?: Granularity;
|
|
18
|
+
'col-order'?: ColOrder;
|
|
19
|
+
}
|
|
20
|
+
export interface BaseEmits {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* 时分秒毫秒选择器
|
|
24
|
+
*/
|
|
25
|
+
export declare class BaseEle<A extends Attrs, E extends BaseEmits> extends UiBase<A, E> {
|
|
26
|
+
static get observedAttributes(): string[];
|
|
27
|
+
protected _style: string;
|
|
28
|
+
protected _template: string;
|
|
29
|
+
private get _listEleHour();
|
|
30
|
+
private get _listEleMinute();
|
|
31
|
+
private get _listEleSecond();
|
|
32
|
+
private get _msInputEle();
|
|
33
|
+
get millisecond(): number;
|
|
34
|
+
set millisecond(v: number);
|
|
35
|
+
get maxGranularity(): Granularity;
|
|
36
|
+
set maxGranularity(v: Granularity);
|
|
37
|
+
get minGranularity(): Granularity;
|
|
38
|
+
set minGranularity(v: Granularity);
|
|
39
|
+
get colOrder(): ColOrder;
|
|
40
|
+
set colOrder(v: ColOrder);
|
|
41
|
+
scrollToCurrentItem(): void;
|
|
42
|
+
connectedCallback(): boolean | void;
|
|
43
|
+
disconnectedCallback(): boolean | void;
|
|
44
|
+
protected _onAttrChanged(name: string, oldValue: string, newValue: string): void;
|
|
45
|
+
private _renderCols;
|
|
46
|
+
private _updateGranularity;
|
|
47
|
+
private _updateColsValue;
|
|
48
|
+
private _getMsFromEle;
|
|
49
|
+
private _onMsInput;
|
|
50
|
+
private _onColsSelect;
|
|
51
|
+
}
|