@nongt/visql 0.4.2 → 0.6.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.
Files changed (31) hide show
  1. package/README.md +233 -715
  2. package/dist/MuiTimePicker-BjywwrRm.js +112 -0
  3. package/dist/{PipelineEditor-BoFPDUmi.js → PipelineEditor-6fohlut2.js} +3247 -3209
  4. package/dist/{core-api-BRJV9MUQ.js → core-api-Bg_I2ak0.js} +437 -426
  5. package/dist/core.js +2 -2
  6. package/dist/index.js +4 -4
  7. package/dist/{issueLocation-CWUdTtCh.js → issueLocation-CD9XckYv.js} +1276 -1193
  8. package/dist/mui-date-pickers-host.js +20 -0
  9. package/dist/mui-date-pickers.js +14 -113
  10. package/dist/mui.js +161 -155
  11. package/dist/style.css +1 -1
  12. package/dist/types/adapters/mui/MuiDatePicker.d.ts +2 -3
  13. package/dist/types/adapters/mui/QueryBuilder.d.ts +2 -2
  14. package/dist/types/adapters/mui/components.d.ts +2 -2
  15. package/dist/types/adapters/mui/hostPickers.d.ts +8 -0
  16. package/dist/types/adapters/mui/muiPickers.d.ts +6 -5
  17. package/dist/types/core/JoinKeysContext.d.ts +6 -0
  18. package/dist/types/core/components/flow/GroupByFlowNode.d.ts +3 -0
  19. package/dist/types/core/components/flow/SelectFlowNode.d.ts +3 -0
  20. package/dist/types/core/i18n/defaultMessages.d.ts +2 -0
  21. package/dist/types/core/i18n/messages.d.ts +2 -0
  22. package/dist/types/core/joinOnly.d.ts +9 -0
  23. package/dist/types/core/queryValidation.d.ts +5 -2
  24. package/dist/types/core/schema.d.ts +7 -0
  25. package/dist/types/core/ui/index.d.ts +2 -2
  26. package/dist/types/core/ui/types.d.ts +5 -4
  27. package/dist/types/features/queryEditor/PipelineEditor.d.ts +1 -4
  28. package/dist/types/features/queryEditor/SubFlowPanel.d.ts +5 -1
  29. package/dist/types/mui-date-pickers-host.d.ts +12 -0
  30. package/dist/types/mui-date-pickers.d.ts +12 -3
  31. package/package.json +36 -11
@@ -0,0 +1,20 @@
1
+ import { M as o, a as s, b as a } from "./MuiTimePicker-BjywwrRm.js";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import { useContext as m } from "react";
4
+ import { MuiPickersAdapterContext as c } from "@mui/x-date-pickers/LocalizationProvider";
5
+ function e(i) {
6
+ const t = (r) => {
7
+ if (!m(c))
8
+ throw new Error(
9
+ "@nongt/visql/mui-date-pickers/host: wrap the editor in MUI X's LocalizationProvider (with a date-fns adapter), or use @nongt/visql/mui-date-pickers, which brings one."
10
+ );
11
+ return /* @__PURE__ */ n(i, { ...r });
12
+ };
13
+ return t.displayName = `WithHostPickers(${i.displayName ?? i.name})`, t;
14
+ }
15
+ const M = e(o), h = e(s), P = e(a);
16
+ export {
17
+ M as MuiDatePicker,
18
+ h as MuiDateTimePicker,
19
+ P as MuiTimePicker
20
+ };
@@ -1,117 +1,18 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { useContext as x, useCallback as a, useMemo as s } from "react";
3
- import { DatePicker as h } from "@mui/x-date-pickers/DatePicker";
4
- import { c as g } from "./calendarDate-CYlr9TvX.js";
5
- import { AdapterDateFns as F } from "@mui/x-date-pickers/AdapterDateFns";
6
- import { MuiPickersAdapterContext as U, LocalizationProvider as w } from "@mui/x-date-pickers/LocalizationProvider";
7
- import { t as p } from "./tokens-BTaVMSOx.js";
8
- import { DateTimePicker as S } from "@mui/x-date-pickers/DateTimePicker";
9
- import { TimePicker as b } from "@mui/x-date-pickers/TimePicker";
10
- function f({ children: o }) {
11
- return x(U) ? o : /* @__PURE__ */ n(w, { dateAdapter: F, children: o });
12
- }
13
- const D = ".MuiPickersOutlinedInput-notchedOutline";
14
- function P(o, i = !1) {
15
- return {
16
- width: "fit-content",
17
- ...i ? { "& .MuiPickersSectionList-root": { width: "auto" } } : {},
18
- "& .MuiPickersOutlinedInput-root": {
19
- ...o ? { height: 38, borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : {},
20
- [`& ${D}`]: { borderColor: p("fieldBorder") },
21
- [`&:hover:not(.Mui-focused):not(.Mui-disabled) ${D}`]: {
22
- borderColor: p("fieldBorderHover")
23
- }
24
- },
25
- // The calendar/clock button: the size of the other fields' arrows.
26
- "& .MuiInputAdornment-root .MuiIconButton-root": { padding: "4px" },
27
- "& .MuiInputAdornment-root .MuiSvgIcon-root": { fontSize: 20 }
1
+ import { M as m, a as n, b as s } from "./MuiTimePicker-BjywwrRm.js";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import { useContext as c } from "react";
4
+ import { AdapterDateFns as p } from "@mui/x-date-pickers/AdapterDateFns";
5
+ import { MuiPickersAdapterContext as u, LocalizationProvider as d } from "@mui/x-date-pickers/LocalizationProvider";
6
+ function t(e) {
7
+ const i = (o) => {
8
+ const r = /* @__PURE__ */ a(e, { ...o });
9
+ return c(u) ? r : /* @__PURE__ */ a(d, { dateAdapter: p, children: r });
28
10
  };
11
+ return i.displayName = `WithDateFns(${e.displayName ?? e.name})`, i;
29
12
  }
30
- const O = ({
31
- className: o,
32
- grouped: i,
33
- value: t,
34
- onChange: r,
35
- disabled: l
36
- }) => {
37
- const c = a((d) => {
38
- r == null || r(d ? g(d.getFullYear(), d.getMonth() + 1, d.getDate()) : void 0);
39
- }, [r]), m = s(() => t ? new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()) : null, [t]), u = s(() => ({
40
- className: o,
41
- sx: P(i, !0),
42
- size: "small"
43
- }), [o, i]), e = s(() => ({
44
- textField: u
45
- }), [u]);
46
- return /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(
47
- h,
48
- {
49
- disabled: l,
50
- value: m,
51
- slotProps: e,
52
- onChange: c
53
- }
54
- ) });
55
- }, Y = ({
56
- className: o,
57
- grouped: i,
58
- value: t,
59
- onChange: r,
60
- disabled: l
61
- }) => {
62
- const c = a((e) => {
63
- r == null || r(e ? new Date(Date.UTC(
64
- e.getFullYear(),
65
- e.getMonth(),
66
- e.getDate(),
67
- e.getHours(),
68
- e.getMinutes()
69
- )) : void 0);
70
- }, [r]), m = s(() => t ? new Date(
71
- t.getUTCFullYear(),
72
- t.getUTCMonth(),
73
- t.getUTCDate(),
74
- t.getUTCHours(),
75
- t.getUTCMinutes()
76
- ) : null, [t]), u = s(() => ({
77
- textField: { className: o, sx: P(i), size: "small" }
78
- }), [o, i]);
79
- return /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(
80
- S,
81
- {
82
- disabled: l,
83
- value: m,
84
- slotProps: u,
85
- onChange: c
86
- }
87
- ) });
88
- }, M = (o) => String(o).padStart(2, "0"), R = ({
89
- className: o,
90
- grouped: i,
91
- value: t,
92
- onChange: r,
93
- disabled: l
94
- }) => {
95
- const c = a((e) => {
96
- r == null || r(e ? `${M(e.getHours())}:${M(e.getMinutes())}:${M(e.getSeconds())}` : void 0);
97
- }, [r]), m = s(() => {
98
- const [e, d, T] = (t ?? "").split(":").map(Number);
99
- return t ? new Date(2e3, 0, 1, e, d, T || 0) : null;
100
- }, [t]), u = s(() => ({
101
- textField: { className: o, sx: P(i, !0), size: "small" }
102
- }), [o, i]);
103
- return /* @__PURE__ */ n(f, { children: /* @__PURE__ */ n(
104
- b,
105
- {
106
- disabled: l,
107
- value: m,
108
- slotProps: u,
109
- onChange: c
110
- }
111
- ) });
112
- };
13
+ const l = t(m), x = t(n), T = t(s);
113
14
  export {
114
- O as MuiDatePicker,
115
- Y as MuiDateTimePicker,
116
- R as MuiTimePicker
15
+ l as MuiDatePicker,
16
+ x as MuiDateTimePicker,
17
+ T as MuiTimePicker
117
18
  };