@cpsoft13/z-agent-ui 0.2.1 → 0.3.0
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/bin/lines-baseline.json +1 -15
- package/bin/text-baseline.json +1 -2
- package/dist/build-info.json +2 -2
- package/dist/components/context-menu/ContextMenu.js +7 -7
- package/dist/components/context-menu/ContextMenu.js.map +1 -1
- package/dist/components/date-range/DateRange.js +4 -4
- package/dist/components/date-range/DateRange.js.map +1 -1
- package/dist/components/datepicker/Datepicker.js +207 -332
- package/dist/components/datepicker/Datepicker.js.map +1 -1
- package/dist/components/datepicker/datepicker-keyboard.js +66 -0
- package/dist/components/datepicker/datepicker-keyboard.js.map +1 -0
- package/dist/components/datepicker/datepicker-panel-render.js +78 -0
- package/dist/components/datepicker/datepicker-panel-render.js.map +1 -0
- package/dist/components/form/Form.js +69 -47
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/form/form-context.js +9 -0
- package/dist/components/form/form-context.js.map +1 -0
- package/dist/components/form.js +2 -0
- package/dist/components/form.js.map +1 -1
- package/dist/components/menu/Menu.js +27 -27
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/popover/Popover.js.map +1 -1
- package/dist/components/select/Select.js +235 -351
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/option-search.js +49 -0
- package/dist/components/select/option-search.js.map +1 -0
- package/dist/components/select/select-render.js +75 -0
- package/dist/components/select/select-render.js.map +1 -0
- package/dist/components/select/selection-strategy.js +151 -0
- package/dist/components/select/selection-strategy.js.map +1 -0
- package/dist/components/time-picker/TimePicker.js +1 -1
- package/dist/components/time-picker/TimePicker.js.map +1 -1
- package/dist/components/tooltip/Tooltip.js +16 -16
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/core/BaseElement.js +96 -77
- package/dist/core/BaseElement.js.map +1 -1
- package/dist/core/context.js +68 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/controller.js +2 -0
- package/dist/core/controller.js.map +1 -0
- package/dist/core/public.js +35 -30
- package/dist/core/public.js.map +1 -1
- package/dist/core.js +95 -90
- package/dist/core.js.map +1 -1
- package/dist/doc/doc-template-editor-core.js +12 -11
- package/dist/doc/doc-template-editor-core.js.map +1 -1
- package/dist/doc/doc-template-editor-panel.css.js +202 -0
- package/dist/doc/doc-template-editor-panel.css.js.map +1 -0
- package/dist/doc/doc-template-editor.css.js +1 -200
- package/dist/doc/doc-template-editor.css.js.map +1 -1
- package/dist/flow/Flow.js +104 -195
- package/dist/flow/Flow.js.map +1 -1
- package/dist/flow/flow-keyboard-controller.js +101 -0
- package/dist/flow/flow-keyboard-controller.js.map +1 -0
- package/dist/primitives/overlay/floatingPanel.js +6 -2
- package/dist/primitives/overlay/floatingPanel.js.map +1 -1
- package/dist/report/chart/Chart.js +271 -761
- package/dist/report/chart/Chart.js.map +1 -1
- package/dist/report/chart/chart-brush-controller.js +187 -0
- package/dist/report/chart/chart-brush-controller.js.map +1 -0
- package/dist/report/chart/chart-layout-pipeline.js +158 -0
- package/dist/report/chart/chart-layout-pipeline.js.map +1 -0
- package/dist/report/chart/chart-zoom.js +79 -0
- package/dist/report/chart/chart-zoom.js.map +1 -0
- package/dist/report/chart/geometry/build.js +41 -26
- package/dist/report/chart/geometry/build.js.map +1 -1
- package/dist/report/chart/geometry/extra-flow-dist.js +283 -0
- package/dist/report/chart/geometry/extra-flow-dist.js.map +1 -0
- package/dist/report/chart/geometry/extra-radial-grid.js +280 -0
- package/dist/report/chart/geometry/extra-radial-grid.js.map +1 -0
- package/dist/report/chart/geometry/extra-shared.js +36 -0
- package/dist/report/chart/geometry/extra-shared.js.map +1 -0
- package/dist/report/chart/geometry/extra.js +20 -583
- package/dist/report/chart/geometry/extra.js.map +1 -1
- package/dist/report/chart/geometry/registry.js +20 -0
- package/dist/report/chart/geometry/registry.js.map +1 -0
- package/dist/report/chart.js +12 -6
- package/dist/report/chart.js.map +1 -1
- package/dist/report/gantt/Gantt.js +199 -308
- package/dist/report/gantt/Gantt.js.map +1 -1
- package/dist/report/gantt/gantt-bars.css.js +247 -0
- package/dist/report/gantt/gantt-bars.css.js.map +1 -0
- package/dist/report/gantt/gantt-edit-controller.js +94 -0
- package/dist/report/gantt/gantt-edit-controller.js.map +1 -0
- package/dist/report/gantt/gantt.css.js +0 -272
- package/dist/report/gantt/gantt.css.js.map +1 -1
- package/dist/report/table/ReportTable.js +336 -493
- package/dist/report/table/ReportTable.js.map +1 -1
- package/dist/report/table/report-table-config.css.js +172 -0
- package/dist/report/table/report-table-config.css.js.map +1 -0
- package/dist/report/table/report-table-types.js.map +1 -1
- package/dist/report/table/report-table.css.js +0 -176
- package/dist/report/table/report-table.css.js.map +1 -1
- package/dist/report/table/table-cell-registry.js +29 -0
- package/dist/report/table/table-cell-registry.js.map +1 -0
- package/dist/report/table/table-keyboard-controller.js +96 -0
- package/dist/report/table/table-keyboard-controller.js.map +1 -0
- package/dist/report/table/table-pipeline.js +36 -0
- package/dist/report/table/table-pipeline.js.map +1 -0
- package/dist/report/table/table-render.js +97 -96
- package/dist/report/table/table-render.js.map +1 -1
- package/dist/report/table/table-scroll-controller.js +33 -0
- package/dist/report/table/table-scroll-controller.js.map +1 -0
- package/dist/report/table.js +7 -2
- package/dist/report/table.js.map +1 -1
- package/dist/report.js +39 -28
- package/dist/report.js.map +1 -1
- package/dist/types/components/datepicker/Datepicker.d.ts +1 -109
- package/dist/types/components/datepicker/datepicker-keyboard.d.ts +21 -0
- package/dist/types/components/datepicker/datepicker-panel-render.d.ts +25 -0
- package/dist/types/components/form/Form.d.ts +7 -2
- package/dist/types/components/form/form-context.d.ts +11 -0
- package/dist/types/components/form/index.d.ts +1 -1
- package/dist/types/components/select/Select.d.ts +7 -110
- package/dist/types/components/select/option-search.d.ts +38 -0
- package/dist/types/components/select/select-render.d.ts +39 -0
- package/dist/types/components/select/selection-strategy.d.ts +86 -0
- package/dist/types/core/BaseElement.d.ts +7 -1
- package/dist/types/core/context.d.ts +66 -0
- package/dist/types/core/controller.d.ts +22 -0
- package/dist/types/core/public.d.ts +2 -0
- package/dist/types/flow/Flow.d.ts +3 -76
- package/dist/types/flow/flow-keyboard-controller.d.ts +35 -0
- package/dist/types/primitives/overlay/floatingPanel.d.ts +2 -0
- package/dist/types/report/chart/Chart.d.ts +2 -245
- package/dist/types/report/chart/chart-brush-controller.d.ts +59 -0
- package/dist/types/report/chart/chart-layout-pipeline.d.ts +42 -0
- package/dist/types/report/chart/chart-zoom.d.ts +12 -0
- package/dist/types/report/chart/geometry/build.d.ts +2 -0
- package/dist/types/report/chart/geometry/extra-flow-dist.d.ts +6 -0
- package/dist/types/report/chart/geometry/extra-radial-grid.d.ts +6 -0
- package/dist/types/report/chart/geometry/extra-shared.d.ts +24 -0
- package/dist/types/report/chart/geometry/extra.d.ts +2 -34
- package/dist/types/report/chart/geometry/registry.d.ts +26 -0
- package/dist/types/report/chart/index.d.ts +1 -0
- package/dist/types/report/gantt/Gantt.d.ts +7 -97
- package/dist/types/report/gantt/gantt-edit-controller.d.ts +34 -0
- package/dist/types/report/table/ReportTable.d.ts +9 -180
- package/dist/types/report/table/index.d.ts +1 -0
- package/dist/types/report/table/report-table-types.d.ts +2 -0
- package/dist/types/report/table/table-cell-registry.d.ts +17 -0
- package/dist/types/report/table/table-keyboard-controller.d.ts +30 -0
- package/dist/types/report/table/table-pipeline.d.ts +33 -0
- package/dist/types/report/table/table-scroll-controller.d.ts +25 -0
- package/dist/z-agent-ui.js +35 -30
- package/dist/z-agent-ui.js.map +1 -1
- package/package.json +1 -1
- package/registry/component-manifest.json +39 -7
- package/src/components/context-menu/ContextMenu.ts +1 -1
- package/src/components/date-range/DateRange.ts +1 -1
- package/src/components/datepicker/Datepicker.ts +99 -417
- package/src/components/datepicker/datepicker-keyboard.ts +94 -0
- package/src/components/datepicker/datepicker-panel-render.ts +169 -0
- package/src/components/form/Form.ts +39 -11
- package/src/components/form/form-context.ts +11 -0
- package/src/components/form/index.ts +1 -1
- package/src/components/menu/Menu.ts +1 -1
- package/src/components/popover/Popover.ts +1 -1
- package/src/components/select/Select.ts +140 -525
- package/src/components/select/option-search.ts +114 -0
- package/src/components/select/select-render.ts +161 -0
- package/src/components/select/selection-strategy.ts +245 -0
- package/src/components/time-picker/TimePicker.ts +1 -1
- package/src/components/tooltip/Tooltip.ts +1 -1
|
@@ -1,150 +1,124 @@
|
|
|
1
|
-
import { BaseElement as
|
|
2
|
-
import { property as
|
|
3
|
-
import { html as
|
|
4
|
-
import { injectGlobalStyles as
|
|
5
|
-
import
|
|
6
|
-
import { isISOInRange as
|
|
7
|
-
import { presetRangeOf as
|
|
8
|
-
import { COPY as
|
|
9
|
-
import { defineElement as
|
|
10
|
-
import { bindTriggerAria as
|
|
1
|
+
import { BaseElement as S } from "../../core/BaseElement.js";
|
|
2
|
+
import { property as o } from "../../core/decorators.js";
|
|
3
|
+
import { html as y } from "../../core/template.js";
|
|
4
|
+
import { injectGlobalStyles as O } from "../../core/styleInjection.js";
|
|
5
|
+
import "../../core/i18n.js";
|
|
6
|
+
import { isISOInRange as v, parseISO as _, dayOf as l, todayISO as k, formatISO as C, composeDateTime as c, compareISO as T } from "../../core/date/calendar.js";
|
|
7
|
+
import { presetRangeOf as w, clampPresetRange as M } from "../../core/date/presets.js";
|
|
8
|
+
import { COPY as m } from "../../core/copy.js";
|
|
9
|
+
import { defineElement as I } from "../../core/define.js";
|
|
10
|
+
import { bindTriggerAria as E, isEditableElement as b } from "../../core/a11y.js";
|
|
11
11
|
import "../../primitives/portal/Portal.js";
|
|
12
12
|
import "../../primitives/position/Position.js";
|
|
13
|
-
import { FloatingPanelController as
|
|
14
|
-
import
|
|
15
|
-
import { DATEPICKER_PANEL_CSS as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
import { FloatingPanelController as L } from "../../primitives/overlay/floatingPanel.js";
|
|
14
|
+
import x from "./datepicker.css.js";
|
|
15
|
+
import { DATEPICKER_PANEL_CSS as z } from "./panel-styles.js";
|
|
16
|
+
import { readTimeSide as Y } from "./time-row.js";
|
|
17
|
+
import { renderDatepickerPanel as D, resolveTimePart as d } from "./datepicker-panel-render.js";
|
|
18
|
+
import { handleDatepickerPanelKey as R, computeShiftedFocus as F } from "./datepicker-keyboard.js";
|
|
19
|
+
var K = Object.defineProperty, h = (f, t, e, i) => {
|
|
20
|
+
for (var s = void 0, n = f.length - 1, r; n >= 0; n--)
|
|
21
|
+
(r = f[n]) && (s = r(t, e, s) || s);
|
|
22
|
+
return s && K(t, e, s), s;
|
|
22
23
|
};
|
|
23
|
-
function
|
|
24
|
-
|
|
24
|
+
function P() {
|
|
25
|
+
O("z-datepicker", z);
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
+
const g = class g extends S {
|
|
27
28
|
constructor() {
|
|
28
|
-
super(...arguments), this.mode = "single", this.value = "", this.start = "", this.end = "", this.min = "", this.max = "", this.locale = "", this.open = !1, this.precision = "day", this.clearable = !1, this.presets = "", this.prevMonthLabel =
|
|
29
|
+
super(...arguments), this.mode = "single", this.value = "", this.start = "", this.end = "", this.min = "", this.max = "", this.locale = "", this.open = !1, this.precision = "day", this.clearable = !1, this.presets = "", this.prevMonthLabel = m.prevMonth, this.nextMonthLabel = m.nextMonth, this._floating = this.addController(new L(this)), this._viewYear = 0, this._viewMonth = 0, this._focusISO = null, this._hoverISO = null, this._pendingStart = null, this._pendingTime = "", this._pendingTimeEnd = "", this._lastPanelProps = "", this._triggerAria = E(
|
|
29
30
|
() => {
|
|
30
|
-
var
|
|
31
|
-
return ((
|
|
31
|
+
var t;
|
|
32
|
+
return ((t = this.shadowRoot) == null ? void 0 : t.querySelector('slot[name="trigger"]')) ?? null;
|
|
32
33
|
},
|
|
33
34
|
() => ({ hasPopup: "dialog", expanded: this.open })
|
|
34
35
|
), this._onTriggerClick = () => {
|
|
35
36
|
this.toggle();
|
|
36
|
-
}, this._onClearClick = (
|
|
37
|
-
var
|
|
38
|
-
const
|
|
39
|
-
(s =
|
|
40
|
-
}, this._onHostKey = (
|
|
37
|
+
}, this._onClearClick = (t) => {
|
|
38
|
+
var i, s;
|
|
39
|
+
const e = ((i = t.composedPath) == null ? void 0 : i.call(t)[0]) ?? t.target;
|
|
40
|
+
(s = e == null ? void 0 : e.closest) != null && s.call(e, ".z-datepicker__clear") && (t.preventDefault(), t.stopPropagation(), this._clearValue());
|
|
41
|
+
}, this._onHostKey = (t) => {
|
|
41
42
|
var n;
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
const s = ((n =
|
|
45
|
-
|
|
46
|
-
}, this._onPanelClick = (
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
if (
|
|
50
|
-
this._applyPreset(
|
|
43
|
+
const e = t;
|
|
44
|
+
if (e.key !== "Delete" || this.open || !this.clearable || !(this.mode === "range" ? !!(this.start || this.end) : !!this.value)) return;
|
|
45
|
+
const s = ((n = t.composedPath) == null ? void 0 : n.call(t)[0]) ?? t.target;
|
|
46
|
+
b(s) || (e.preventDefault(), this._clearValue());
|
|
47
|
+
}, this._onPanelClick = (t) => {
|
|
48
|
+
const e = t.target, i = e.closest("[data-preset]");
|
|
49
|
+
if (i) {
|
|
50
|
+
if (t.preventDefault(), i.disabled) return;
|
|
51
|
+
this._applyPreset(i.dataset.preset ?? "");
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
|
-
const s =
|
|
54
|
+
const s = e.closest("[data-nav]");
|
|
54
55
|
if (s) {
|
|
55
|
-
|
|
56
|
+
t.preventDefault(), this._navMonth(s.dataset.nav === "next" ? 1 : -1, !1);
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
58
|
-
if (
|
|
59
|
-
|
|
59
|
+
if (e.closest("[data-time-done]")) {
|
|
60
|
+
t.preventDefault(), this._commitTime(), this._closePanel();
|
|
60
61
|
return;
|
|
61
62
|
}
|
|
62
|
-
if (
|
|
63
|
-
const n =
|
|
63
|
+
if (e.closest("[data-time-part]")) return;
|
|
64
|
+
const n = e.closest("[data-iso]");
|
|
64
65
|
if (!n) return;
|
|
65
66
|
const r = n.dataset.iso;
|
|
66
|
-
if (
|
|
67
|
+
if (v(r, this.min, this.max)) {
|
|
67
68
|
if (n.classList.contains("z-datepicker__cell--out")) {
|
|
68
|
-
const
|
|
69
|
-
|
|
69
|
+
const p = _(r);
|
|
70
|
+
p && (this._viewYear = p.getFullYear(), this._viewMonth = p.getMonth());
|
|
70
71
|
}
|
|
71
72
|
this._selectISO(r);
|
|
72
73
|
}
|
|
73
|
-
}, this._onPanelChange = (
|
|
74
|
-
var
|
|
75
|
-
(s = (
|
|
76
|
-
}, this._onPanelMouseOver = (
|
|
74
|
+
}, this._onPanelChange = (t) => {
|
|
75
|
+
var i, s;
|
|
76
|
+
(s = (i = t.target) == null ? void 0 : i.closest) != null && s.call(i, "[data-time-part]") && this._commitTime();
|
|
77
|
+
}, this._onPanelMouseOver = (t) => {
|
|
77
78
|
if (this.mode !== "range" || !this._pendingStart) return;
|
|
78
|
-
const
|
|
79
|
-
if (!
|
|
80
|
-
const
|
|
81
|
-
|
|
79
|
+
const e = t.target.closest("[data-iso]");
|
|
80
|
+
if (!e) return;
|
|
81
|
+
const i = e.dataset.iso;
|
|
82
|
+
i !== this._hoverISO && (this._hoverISO = i, this._repaintPanel());
|
|
82
83
|
}, this._onPanelMouseLeave = () => {
|
|
83
84
|
this._hoverISO && (this._hoverISO = null, this._repaintPanel());
|
|
84
|
-
}, this._onPanelKey = (
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
break;
|
|
96
|
-
case "ArrowDown":
|
|
97
|
-
e.preventDefault(), this._moveFocus(t, 7);
|
|
98
|
-
break;
|
|
99
|
-
case "Home":
|
|
100
|
-
e.preventDefault(), this._moveFocusToWeekBoundary(t, !1);
|
|
101
|
-
break;
|
|
102
|
-
case "End":
|
|
103
|
-
e.preventDefault(), this._moveFocusToWeekBoundary(t, !0);
|
|
104
|
-
break;
|
|
105
|
-
case "PageUp":
|
|
106
|
-
e.preventDefault(), i.shiftKey ? this._navYear(-1) : this._navMonth(-1, !0);
|
|
107
|
-
break;
|
|
108
|
-
case "PageDown":
|
|
109
|
-
e.preventDefault(), i.shiftKey ? this._navYear(1) : this._navMonth(1, !0);
|
|
110
|
-
break;
|
|
111
|
-
case "Enter":
|
|
112
|
-
case " ":
|
|
113
|
-
e.preventDefault(), t && this._isSelectable(t) && this._selectISO(t);
|
|
114
|
-
break;
|
|
115
|
-
case "Escape":
|
|
116
|
-
e.preventDefault(), this._closePanel();
|
|
117
|
-
break;
|
|
118
|
-
case "Tab":
|
|
119
|
-
this._closePanel();
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
85
|
+
}, this._onPanelKey = (t) => {
|
|
86
|
+
R(t, {
|
|
87
|
+
getFocusISO: () => this._focusISO,
|
|
88
|
+
getLocale: () => this._locale,
|
|
89
|
+
isSelectable: (e) => _(e) !== null && v(e, this.min, this.max),
|
|
90
|
+
moveFocus: (e, i) => this._moveFocus(e, i),
|
|
91
|
+
navMonth: (e, i) => this._navMonth(e, i),
|
|
92
|
+
navYear: (e) => this._navYear(e),
|
|
93
|
+
selectISO: (e) => this._selectISO(e),
|
|
94
|
+
closePanel: () => this._closePanel()
|
|
95
|
+
});
|
|
122
96
|
};
|
|
123
97
|
}
|
|
124
98
|
get _locale() {
|
|
125
99
|
return this.locale || navigator.language || "en-US";
|
|
126
100
|
}
|
|
101
|
+
get _timed() {
|
|
102
|
+
return this.precision === "minute";
|
|
103
|
+
}
|
|
127
104
|
render() {
|
|
128
|
-
const
|
|
129
|
-
return
|
|
105
|
+
const t = this.mode === "range" ? !!(this.start || this.end) : !!this.value, e = this.clearable && t ? `<span class="z-datepicker__clear" part="clear" role="button" tabindex="-1" aria-label="${m.clear}"><svg width="10" height="10" viewBox="0 0 10 10" fill="none" aria-hidden="true"><path d="M2 2l6 6M8 2l-6 6" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/></svg></span>` : "";
|
|
106
|
+
return y`
|
|
130
107
|
<span
|
|
131
108
|
class="z-datepicker__trigger ${this.open ? "z-datepicker__trigger--open" : ""}"
|
|
132
109
|
part="trigger"
|
|
133
110
|
>
|
|
134
111
|
<slot name="trigger"></slot>
|
|
135
|
-
${
|
|
112
|
+
${e}
|
|
136
113
|
</span>
|
|
137
114
|
`;
|
|
138
115
|
}
|
|
139
116
|
connectedCallback() {
|
|
140
|
-
|
|
141
|
-
super.connectedCallback(), z(), (e = this.shadowRoot) == null || e.addEventListener("click", this._onClearClick), this.addEventListener("click", this._onTriggerClick), this.addEventListener("keydown", this._onHostKey);
|
|
117
|
+
super.connectedCallback(), P(), this.shadowRoot && this.listen(this.shadowRoot, "click", this._onClearClick), this.listen(this, "click", this._onTriggerClick), this.listen(this, "keydown", this._onHostKey);
|
|
142
118
|
}
|
|
143
119
|
disconnectedCallback() {
|
|
144
|
-
|
|
145
|
-
this._closePanel(), this._triggerAria.dispose(), (e = this.shadowRoot) == null || e.removeEventListener("click", this._onClearClick), this.removeEventListener("click", this._onTriggerClick), this.removeEventListener("keydown", this._onHostKey), super.disconnectedCallback();
|
|
120
|
+
this._closePanel(), this._triggerAria.dispose(), super.disconnectedCallback();
|
|
146
121
|
}
|
|
147
|
-
// 外部属性变更(min/max/mode/locale/value/start/end)时重渲染打开中的面板
|
|
148
122
|
updated() {
|
|
149
123
|
this._triggerAria.sync(), this.open && this._floating.panel && !this._panelPropsCurrent() && (this._renderPanelTo(this._floating.panel), this._focusCell());
|
|
150
124
|
}
|
|
@@ -157,13 +131,6 @@ const k = class k extends x {
|
|
|
157
131
|
toggle() {
|
|
158
132
|
this.open ? this._closePanel() : this._openPanel();
|
|
159
133
|
}
|
|
160
|
-
/**
|
|
161
|
-
* 清空当前值并通知宿主。
|
|
162
|
-
*
|
|
163
|
-
* 与 `z-select` 走同一条出口(`z-change` + 空值),不再发明 `z-clear`:
|
|
164
|
-
* 消费方(PageView)已经按「值变化」处理,多一个事件名就多一处要记得接的地方。
|
|
165
|
-
* 清空后立刻关面板:面板还开着、框里已经没值,用户会以为没点中。
|
|
166
|
-
*/
|
|
167
134
|
_clearValue() {
|
|
168
135
|
if (this.mode === "range") {
|
|
169
136
|
if (!this.start && !this.end) return;
|
|
@@ -173,275 +140,183 @@ const k = class k extends x {
|
|
|
173
140
|
this.value && (this.value = "", this._pendingTime = "", this._closePanel(), this.emit("z-change", { value: "" }));
|
|
174
141
|
}
|
|
175
142
|
_getTriggerEl() {
|
|
176
|
-
const
|
|
177
|
-
return
|
|
143
|
+
const t = this.shadowRoot.querySelector('slot[name="trigger"]'), e = t == null ? void 0 : t.assignedElements();
|
|
144
|
+
return e && e[0] || null;
|
|
178
145
|
}
|
|
179
146
|
_resolveSeedISO() {
|
|
180
|
-
return this.value &&
|
|
147
|
+
return this.value && _(l(this.value)) ? l(this.value) : this.start && _(l(this.start)) ? l(this.start) : this.end && _(l(this.end)) ? l(this.end) : k();
|
|
181
148
|
}
|
|
182
149
|
_openPanel() {
|
|
183
150
|
if (this.open) return;
|
|
184
|
-
|
|
185
|
-
const
|
|
186
|
-
this._viewYear =
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
151
|
+
P();
|
|
152
|
+
const t = _(this._resolveSeedISO()) ?? /* @__PURE__ */ new Date();
|
|
153
|
+
this._viewYear = t.getFullYear(), this._viewMonth = t.getMonth(), this._focusISO = C(t), this._pendingStart = this.mode === "range" && this.start && !this.end ? l(this.start) : null, this._hoverISO = null, this._pendingTime = "", this._pendingTimeEnd = "";
|
|
154
|
+
const e = this._floating.open(
|
|
155
|
+
{
|
|
156
|
+
panelClass: "z-datepicker__panel",
|
|
157
|
+
hidingClass: "z-datepicker__panel--hiding",
|
|
158
|
+
ariaLabel: "Datepicker",
|
|
159
|
+
anchor: () => this.shadowRoot.querySelector(".z-datepicker__trigger"),
|
|
160
|
+
onOutsideClose: () => this._closePanel()
|
|
161
|
+
},
|
|
162
|
+
(i) => this._renderPanelTo(i)
|
|
163
|
+
);
|
|
164
|
+
e.addEventListener("click", this._onPanelClick), e.addEventListener("mouseover", this._onPanelMouseOver), e.addEventListener("mouseleave", this._onPanelMouseLeave), e.addEventListener("keydown", this._onPanelKey), e.addEventListener("change", this._onPanelChange), this.open = !0, this._focusCell(), this.emit("z-datepicker-open");
|
|
197
165
|
}
|
|
198
166
|
_closePanel() {
|
|
199
|
-
var
|
|
167
|
+
var e;
|
|
200
168
|
if (!this.open) return;
|
|
201
|
-
const
|
|
202
|
-
|
|
169
|
+
const t = this._floating.panel;
|
|
170
|
+
t == null || t.removeEventListener("click", this._onPanelClick), t == null || t.removeEventListener("mouseover", this._onPanelMouseOver), t == null || t.removeEventListener("mouseleave", this._onPanelMouseLeave), t == null || t.removeEventListener("keydown", this._onPanelKey), t == null || t.removeEventListener("change", this._onPanelChange), this._floating.close(), this.open = !1, this._hoverISO = null, this._pendingStart = null, this._pendingTime = "", this._pendingTimeEnd = "", this._focusISO = null, (e = this._getTriggerEl()) == null || e.focus(), this.emit("z-datepicker-close");
|
|
203
171
|
}
|
|
204
172
|
_panelPropsSnapshot() {
|
|
205
|
-
return [
|
|
173
|
+
return [
|
|
174
|
+
this.mode,
|
|
175
|
+
this.value,
|
|
176
|
+
this.start,
|
|
177
|
+
this.end,
|
|
178
|
+
this.min,
|
|
179
|
+
this.max,
|
|
180
|
+
this._locale,
|
|
181
|
+
this.presets,
|
|
182
|
+
this.precision
|
|
183
|
+
].join("|");
|
|
206
184
|
}
|
|
207
185
|
_panelPropsCurrent() {
|
|
208
186
|
return this._panelPropsSnapshot() === this._lastPanelProps;
|
|
209
187
|
}
|
|
210
|
-
_renderPanelTo(
|
|
211
|
-
|
|
188
|
+
_renderPanelTo(t) {
|
|
189
|
+
t.innerHTML = D({
|
|
190
|
+
mode: this.mode,
|
|
191
|
+
precision: this.precision,
|
|
192
|
+
value: this.value,
|
|
193
|
+
start: this.start,
|
|
194
|
+
end: this.end,
|
|
195
|
+
min: this.min,
|
|
196
|
+
max: this.max,
|
|
197
|
+
locale: this._locale,
|
|
198
|
+
presets: this.presets,
|
|
199
|
+
prevMonthLabel: this.prevMonthLabel,
|
|
200
|
+
nextMonthLabel: this.nextMonthLabel,
|
|
201
|
+
viewYear: this._viewYear,
|
|
202
|
+
viewMonth: this._viewMonth,
|
|
203
|
+
focusISO: this._focusISO,
|
|
204
|
+
hoverISO: this._hoverISO,
|
|
205
|
+
pendingStart: this._pendingStart,
|
|
206
|
+
pendingTime: this._pendingTime,
|
|
207
|
+
pendingTimeEnd: this._pendingTimeEnd
|
|
208
|
+
}), this._lastPanelProps = this._panelPropsSnapshot();
|
|
212
209
|
}
|
|
213
210
|
_focusCell() {
|
|
214
|
-
var
|
|
215
|
-
const
|
|
216
|
-
|
|
211
|
+
var e;
|
|
212
|
+
const t = (e = this._floating.panel) == null ? void 0 : e.querySelector(".z-datepicker__cell--focus");
|
|
213
|
+
t == null || t.focus();
|
|
217
214
|
}
|
|
218
|
-
/**
|
|
219
|
-
* 重渲染打开中的面板。
|
|
220
|
-
*
|
|
221
|
-
* [WHY] 修复 Gitee IKRAOS:宿主常在 `z-change` 里同步 `close()`("选完立刻收起"),
|
|
222
|
-
* 而 `floatingPanel.close()` 会把内部 `_panel` 置 null。此时 `this._floating.panel!`
|
|
223
|
-
* 的非空断言只骗过 TS —— 运行时就是 `null.innerHTML`。
|
|
224
|
-
* 面板已经关掉就无需重渲染,直接跳过;这里统一收口,避免每处各写一遍判断。
|
|
225
|
-
*/
|
|
226
215
|
_repaintPanel() {
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
_renderPanel() {
|
|
231
|
-
const e = this._locale, i = O(e), t = Y(this._viewYear, this._viewMonth, i), s = T(), n = G(e, this._viewYear, this._viewMonth);
|
|
232
|
-
return v`
|
|
233
|
-
${this._presetsHTML()}
|
|
234
|
-
<div class="z-datepicker__header" part="header">
|
|
235
|
-
<button type="button" class="z-datepicker__nav" data-nav="prev" part="nav-prev" aria-label="${u(this.prevMonthLabel)}">‹</button>
|
|
236
|
-
<div class="z-datepicker__label" part="label">${n}</div>
|
|
237
|
-
<button type="button" class="z-datepicker__nav" data-nav="next" part="nav-next" aria-label="${u(this.nextMonthLabel)}">›</button>
|
|
238
|
-
</div>
|
|
239
|
-
${U({
|
|
240
|
-
prefix: "z-datepicker",
|
|
241
|
-
locale: e,
|
|
242
|
-
weekStart: i,
|
|
243
|
-
cells: t,
|
|
244
|
-
today: s,
|
|
245
|
-
ariaLabel: n,
|
|
246
|
-
cellHTML: (r, a) => this._cellHTML(r, a)
|
|
247
|
-
})}
|
|
248
|
-
${this._timeHTML()}
|
|
249
|
-
`;
|
|
250
|
-
}
|
|
251
|
-
/** 时间行的 HTML(渲染在 `time-row.ts`,这里只补上当前值)。 */
|
|
252
|
-
_timeHTML() {
|
|
253
|
-
return this._timed ? this.mode === "range" ? L({
|
|
254
|
-
mode: "range",
|
|
255
|
-
time: this._timeOf(this.start, this._pendingTime, "00:00"),
|
|
256
|
-
timeTo: this._timeOf(this.end, this._pendingTimeEnd, "23:59")
|
|
257
|
-
}) : L({
|
|
258
|
-
mode: "single",
|
|
259
|
-
time: this._timeOf(this.value, this._pendingTime, "00:00"),
|
|
260
|
-
timeTo: ""
|
|
261
|
-
}) : "";
|
|
216
|
+
const t = this._floating.panel;
|
|
217
|
+
t && this._renderPanelTo(t);
|
|
262
218
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* 快捷区间那一排 chip(issue IKUE1G)。
|
|
269
|
-
*
|
|
270
|
-
* 三条规则写在这里,别处不要再算:
|
|
271
|
-
* ① 只认 `presets=` 里写到的名字,拼错的不画按钮(不猜同义词);
|
|
272
|
-
* ② 区间被 `min` / `max` 夹完为空 ⇒ 按钮置灰(点下去也不会有反应的东西不该可点);
|
|
273
|
-
* ③ 只有**完全等于**某个预设时才高亮 —— 手选的自定义区间不许点亮预设,
|
|
274
|
-
* 否则用户点它想复位时值没变化 ⇒ 组件不发事件 ⇒ 看着像按钮坏了。
|
|
275
|
-
*/
|
|
276
|
-
_presetsHTML() {
|
|
277
|
-
if (this.mode !== "range" || !this.presets.trim()) return "";
|
|
278
|
-
const e = /* @__PURE__ */ new Date(), i = this.presets.split(/[,,]/).map((t) => t.trim()).filter(Boolean).map((t) => {
|
|
279
|
-
const s = M(t, e);
|
|
280
|
-
if (!s) return "";
|
|
281
|
-
const n = C(s, this.min, this.max) !== null, r = H(t, o(this.start), o(this.end), e, this.min, this.max);
|
|
282
|
-
return `<button type="button" class="z-datepicker__preset${r ? " is-active" : ""}" data-preset="${u(t)}" aria-pressed="${r ? "true" : "false"}"` + (n ? "" : ` disabled aria-disabled="true" title="${u(b("dateOutOfRange"))}"`) + `>${D(t)}</button>`;
|
|
283
|
-
}).filter(Boolean).join("");
|
|
284
|
-
return i ? `<div class="z-datepicker__presets" part="presets" role="group" aria-label="${u(b("quickRanges"))}">${i}</div>` : "";
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* 点一个预设:写入两端、emit、关面板。
|
|
288
|
-
*
|
|
289
|
-
* [WHY 与手选走同一条出口] 值的分发只有 `z-change {start,end}` 这一条(PageView 的
|
|
290
|
-
* `applyFilters` 也只认它)。预设另发一个事件名的话,宿主得接两套 —— 而漏接的那一套
|
|
291
|
-
* 表现为「点了按钮日期变了、数据没变」。
|
|
292
|
-
*/
|
|
293
|
-
_applyPreset(e) {
|
|
294
|
-
const t = M(e, /* @__PURE__ */ new Date());
|
|
295
|
-
if (!t) return;
|
|
296
|
-
const s = C(t, this.min, this.max);
|
|
219
|
+
_applyPreset(t) {
|
|
220
|
+
const i = w(t, /* @__PURE__ */ new Date());
|
|
221
|
+
if (!i) return;
|
|
222
|
+
const s = M(i, this.min, this.max);
|
|
297
223
|
if (!s) return;
|
|
298
|
-
const n = this._timed ?
|
|
224
|
+
const n = this._timed ? c(s.start, "00:00") : s.start, r = this._timed ? c(s.end, "23:59") : s.end;
|
|
299
225
|
this.start = n, this.end = r, this._pendingStart = null, this._focusISO = s.start, this._hoverISO = null, this.emit("z-change", { start: n, end: r }), this._closePanel();
|
|
300
226
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
_cellHTML(e, i) {
|
|
306
|
-
const { iso: t, day: s, inMonth: n } = e, r = this.mode === "range", a = ["z-datepicker__cell"], d = !n || !g(t, this.min, this.max);
|
|
307
|
-
n ? g(t, this.min, this.max) || a.push("z-datepicker__cell--disabled") : a.push("z-datepicker__cell--out"), t === i && a.push("z-datepicker__cell--today");
|
|
308
|
-
let f = "false";
|
|
309
|
-
if (r) {
|
|
310
|
-
this.start && t === o(this.start) && (a.push("z-datepicker__cell--range-start"), f = "true"), this.end && t === o(this.end) && (a.push("z-datepicker__cell--range-end"), f = "true");
|
|
311
|
-
const E = !!(this.start && this.end && m(t, o(this.start)) > 0 && m(t, o(this.end)) < 0), I = !!(this._pendingStart && this._hoverISO && m(t, this._pendingStart) >= 0 && m(t, this._hoverISO) <= 0);
|
|
312
|
-
(E || I) && a.push("z-datepicker__cell--range-in");
|
|
313
|
-
} else
|
|
314
|
-
this.value && t === o(this.value) && (a.push("z-datepicker__cell--selected"), f = "true");
|
|
315
|
-
const y = t === this._focusISO;
|
|
316
|
-
return y && a.push("z-datepicker__cell--focus"), v`<td
|
|
317
|
-
class="${a.join(" ")}"
|
|
318
|
-
role="gridcell"
|
|
319
|
-
data-iso="${t}"
|
|
320
|
-
tabindex="${y ? 0 : -1}"
|
|
321
|
-
aria-selected="${f}"
|
|
322
|
-
aria-disabled="${K(d)}"
|
|
323
|
-
${t === i ? 'aria-current="date"' : ""}
|
|
324
|
-
part="cell"
|
|
325
|
-
>${s}</td>`;
|
|
326
|
-
}
|
|
327
|
-
_selectISO(e) {
|
|
328
|
-
if (this._focusISO = e, this.mode === "single") {
|
|
329
|
-
const i = this._timed ? _(e, this._timeOf(this.value, this._pendingTime, "00:00")) : e;
|
|
330
|
-
if (this.value !== i && (this.value = i), this.emit("z-change", { value: i }), !this._timed) {
|
|
227
|
+
_selectISO(t) {
|
|
228
|
+
if (this._focusISO = t, this.mode === "single") {
|
|
229
|
+
const e = this._timed ? c(t, d(this.value, this._pendingTime, "00:00")) : t;
|
|
230
|
+
if (this.value !== e && (this.value = e), this.emit("z-change", { value: e }), !this._timed) {
|
|
331
231
|
this._closePanel();
|
|
332
232
|
return;
|
|
333
233
|
}
|
|
334
234
|
this._repaintPanel(), this._focusCell();
|
|
335
235
|
return;
|
|
336
236
|
}
|
|
337
|
-
!this.start || this.end ? (this.start = this._timed ?
|
|
237
|
+
!this.start || this.end ? (this.start = this._timed ? c(t, d("", this._pendingTime, "00:00")) : t, this.end = "", this._pendingStart = t, this._repaintPanel()) : T(t, l(this.start)) >= 0 ? (this.end = this._timed ? c(t, d("", this._pendingTimeEnd, "23:59")) : t, this._pendingStart = null, this.emit("z-change", { start: this.start, end: this.end }), this._repaintPanel()) : (this.start = this._timed ? c(t, d("", this._pendingTime, "00:00")) : t, this._pendingStart = t, this._repaintPanel()), this._focusCell();
|
|
338
238
|
}
|
|
339
|
-
/**
|
|
340
|
-
* 读时间框、写回值、发事件。
|
|
341
|
-
*
|
|
342
|
-
* 三条口径:
|
|
343
|
-
* ① **非法值不写入**(`25` / 空)—— 只标红。写一个非法值进去,它会被当成参数下推,
|
|
344
|
-
* 后端把不认识的值当没写 ⇒ 查询静默退回全量;
|
|
345
|
-
* ② **没有日期时只暂存**:时间单独存在没有意义,等选了日期才拼成一个值;
|
|
346
|
-
* ③ **提交后不重画面板**:重画会重建输入框,用户正在里面打字,焦点与光标一起丢。
|
|
347
|
-
* 快照同步一次即可(见 `_lastPanelProps` 那行的注释)。
|
|
348
|
-
*/
|
|
349
239
|
_commitTime() {
|
|
350
|
-
const
|
|
351
|
-
if (!
|
|
352
|
-
const
|
|
240
|
+
const t = this._floating.panel;
|
|
241
|
+
if (!t) return;
|
|
242
|
+
const e = (n) => Y(t, n);
|
|
353
243
|
if (this.mode === "range") {
|
|
354
|
-
const n =
|
|
244
|
+
const n = e("start"), r = e("end");
|
|
355
245
|
if (n === null || r === null || (this._pendingTime = n, this._pendingTimeEnd = r, !this.start || !this.end)) return;
|
|
356
|
-
const
|
|
357
|
-
if (
|
|
358
|
-
this.start =
|
|
246
|
+
const p = c(l(this.start), n), u = c(l(this.end), r);
|
|
247
|
+
if (p === this.start && u === this.end) return;
|
|
248
|
+
this.start = p, this.end = u, this._lastPanelProps = this._panelPropsSnapshot(), this.emit("z-change", { start: p, end: u });
|
|
359
249
|
return;
|
|
360
250
|
}
|
|
361
|
-
const
|
|
362
|
-
if (
|
|
363
|
-
const s =
|
|
251
|
+
const i = e("value");
|
|
252
|
+
if (i === null || (this._pendingTime = i, !l(this.value))) return;
|
|
253
|
+
const s = c(l(this.value), i);
|
|
364
254
|
s !== this.value && (this.value = s, this._lastPanelProps = this._panelPropsSnapshot(), this.emit("z-change", { value: s }));
|
|
365
255
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
_moveFocus(e, i) {
|
|
370
|
-
if (!e) return;
|
|
371
|
-
const t = p(e);
|
|
372
|
-
if (!t) return;
|
|
373
|
-
const s = new Date(t);
|
|
374
|
-
s.setDate(s.getDate() + i);
|
|
375
|
-
const n = w(s);
|
|
376
|
-
p(n) !== null && ((s.getFullYear() !== this._viewYear || s.getMonth() !== this._viewMonth) && (this._viewYear = s.getFullYear(), this._viewMonth = s.getMonth()), this._focusISO = n, this._renderPanelTo(this._floating.panel), this._focusCell());
|
|
377
|
-
}
|
|
378
|
-
_moveFocusToWeekBoundary(e, i) {
|
|
379
|
-
if (!e) return;
|
|
380
|
-
const t = p(e);
|
|
381
|
-
if (!t) return;
|
|
382
|
-
const s = O(this._locale), n = (t.getDay() - s + 7) % 7;
|
|
383
|
-
this._moveFocus(e, i ? 6 - n : -n);
|
|
256
|
+
_moveFocus(t, e) {
|
|
257
|
+
const i = F(t, e);
|
|
258
|
+
i && ((i.year !== this._viewYear || i.month !== this._viewMonth) && (this._viewYear = i.year, this._viewMonth = i.month), this._focusISO = i.iso, this._repaintPanel(), this._focusCell());
|
|
384
259
|
}
|
|
385
|
-
_navMonth(
|
|
260
|
+
_navMonth(t, e) {
|
|
386
261
|
var r;
|
|
387
|
-
let
|
|
388
|
-
|
|
262
|
+
let i = this._viewMonth + t, s = this._viewYear;
|
|
263
|
+
i < 0 && (i = 11, s -= 1), i > 11 && (i = 0, s += 1), this._viewMonth = i, this._viewYear = s, this._repaintPanel();
|
|
389
264
|
const n = this._floating.panel;
|
|
390
265
|
if (n)
|
|
391
|
-
if (
|
|
266
|
+
if (e)
|
|
392
267
|
this._focusCell();
|
|
393
268
|
else {
|
|
394
|
-
const
|
|
395
|
-
(r = n.querySelector(
|
|
269
|
+
const p = t === 1 ? '[data-nav="next"]' : '[data-nav="prev"]';
|
|
270
|
+
(r = n.querySelector(p)) == null || r.focus();
|
|
396
271
|
}
|
|
397
272
|
}
|
|
398
|
-
_navYear(
|
|
399
|
-
this._viewYear +=
|
|
273
|
+
_navYear(t) {
|
|
274
|
+
this._viewYear += t, this._repaintPanel(), this._focusCell();
|
|
400
275
|
}
|
|
401
276
|
};
|
|
402
|
-
|
|
403
|
-
let
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
],
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
],
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
],
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
],
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
],
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
],
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
],
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
],
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
],
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
],
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
],
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
],
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
],
|
|
443
|
-
|
|
277
|
+
g.styles = x;
|
|
278
|
+
let a = g;
|
|
279
|
+
h([
|
|
280
|
+
o({ type: String })
|
|
281
|
+
], a.prototype, "mode");
|
|
282
|
+
h([
|
|
283
|
+
o({ type: String })
|
|
284
|
+
], a.prototype, "value");
|
|
285
|
+
h([
|
|
286
|
+
o({ type: String })
|
|
287
|
+
], a.prototype, "start");
|
|
288
|
+
h([
|
|
289
|
+
o({ type: String })
|
|
290
|
+
], a.prototype, "end");
|
|
291
|
+
h([
|
|
292
|
+
o({ type: String })
|
|
293
|
+
], a.prototype, "min");
|
|
294
|
+
h([
|
|
295
|
+
o({ type: String })
|
|
296
|
+
], a.prototype, "max");
|
|
297
|
+
h([
|
|
298
|
+
o({ type: String })
|
|
299
|
+
], a.prototype, "locale");
|
|
300
|
+
h([
|
|
301
|
+
o({ type: Boolean })
|
|
302
|
+
], a.prototype, "open");
|
|
303
|
+
h([
|
|
304
|
+
o({ type: String })
|
|
305
|
+
], a.prototype, "precision");
|
|
306
|
+
h([
|
|
307
|
+
o({ type: Boolean })
|
|
308
|
+
], a.prototype, "clearable");
|
|
309
|
+
h([
|
|
310
|
+
o({ type: String })
|
|
311
|
+
], a.prototype, "presets");
|
|
312
|
+
h([
|
|
313
|
+
o({ type: String })
|
|
314
|
+
], a.prototype, "prevMonthLabel");
|
|
315
|
+
h([
|
|
316
|
+
o({ type: String })
|
|
317
|
+
], a.prototype, "nextMonthLabel");
|
|
318
|
+
I("z-datepicker", a);
|
|
444
319
|
export {
|
|
445
|
-
|
|
320
|
+
a as ZDatepicker
|
|
446
321
|
};
|
|
447
322
|
//# sourceMappingURL=Datepicker.js.map
|