@nivaro/react 0.3.47 → 0.3.49
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/shared/components/CellCopyLayer.js +81 -44
- package/dist/shared/components/CollectionBrowserView.js +306 -297
- package/dist/shared/components/DataTable.js +3 -3
- package/dist/shared/components/FulfilmentPill.js +98 -78
- package/dist/shared/components/ItemEditForm.js +2830 -2815
- package/dist/shared/components/NotificationSourcesCard.js +151 -147
- package/dist/shared/components/ProfileView.js +72 -70
- package/dist/shared/components/QueryTable.js +3 -3
- package/dist/shared/components/imports/ImportConsole.js +4 -4
- package/dist/shared/components/integrations/console/IntegrationsConsole.js +58 -50
- package/dist/shared/components/item-edit/HeaderTools.js +118 -113
- package/dist/shared/components/item-edit/InlineTableField.js +874 -868
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +65 -65
- package/dist/shared/components/layout-editor/settings/settings-registry.js +4 -4
- package/dist/shared/components/notifications/DeliveryChips.js +9 -9
- package/dist/shared/components/panels/PipelinePanel.js +73 -71
- package/dist/shared/components/panels/SlaBreachBanner.js +2 -2
- package/dist/shared/components/panels/TransitionRequirementsDialog.js +384 -380
- package/dist/shared/components/profile/PersonProfile.js +23 -21
- package/dist/shared/components/profile/SignedInDevices.js +126 -0
- package/dist/shared/components/queue/QueueItemSheet.js +38 -37
- package/dist/shared/components/support/SupportView.js +1 -1
- package/dist/shared/lib/edit-lock-fields.js +7 -0
- package/dist/shared/lib/reimport-visibility.js +10 -0
- package/package.json +1 -1
|
@@ -1808,341 +1808,350 @@ function Ic({
|
|
|
1808
1808
|
{ value: "_starts_with", label: "Starts with" },
|
|
1809
1809
|
{ value: "_ends_with", label: "Ends with" }
|
|
1810
1810
|
];
|
|
1811
|
-
return
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
/* @__PURE__ */ n(
|
|
1821
|
-
"input",
|
|
1822
|
-
{
|
|
1823
|
-
value: b,
|
|
1824
|
-
onChange: (k) => i(k.target.value),
|
|
1825
|
-
placeholder: "Search…",
|
|
1826
|
-
"aria-label": `Search ${a}`,
|
|
1827
|
-
className: "h-8 w-48 rounded-md border border-slate-200 bg-white pl-8 pr-3 text-[13px] outline-none focus:border-nvr-cyan/50 focus:ring-2 focus:ring-nvr-cyan/30 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100"
|
|
1828
|
-
}
|
|
1829
|
-
)
|
|
1830
|
-
] }),
|
|
1831
|
-
v.map((k) => {
|
|
1832
|
-
const I = Ac(k);
|
|
1833
|
-
return /* @__PURE__ */ c(
|
|
1834
|
-
"span",
|
|
1835
|
-
{
|
|
1836
|
-
className: "nvr-pop-in inline-flex items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2 py-1 text-[12px] transition-colors hover:border-nvr-cyan/40 dark:border-slate-700 dark:bg-slate-900",
|
|
1837
|
-
children: [
|
|
1838
|
-
/* @__PURE__ */ n(
|
|
1839
|
-
"button",
|
|
1840
|
-
{
|
|
1841
|
-
type: "button",
|
|
1842
|
-
onClick: () => w(v.map((se) => se.id === k.id ? { ...se, not: !se.not } : se)),
|
|
1843
|
-
"data-tip": k.not ? "Negated — click to restore" : "Click to negate (NOT)",
|
|
1844
|
-
className: k.not ? "rounded bg-amber-100 px-1 text-[10.5px] font-bold text-amber-700 dark:bg-amber-400/15 dark:text-amber-400" : "rounded px-1 text-[10.5px] font-bold text-slate-300 hover:text-slate-500",
|
|
1845
|
-
children: "NOT"
|
|
1846
|
-
}
|
|
1847
|
-
),
|
|
1848
|
-
/* @__PURE__ */ c(
|
|
1849
|
-
"button",
|
|
1850
|
-
{
|
|
1851
|
-
type: "button",
|
|
1852
|
-
onClick: () => R(k),
|
|
1853
|
-
className: "inline-flex items-center gap-1.5",
|
|
1854
|
-
children: [
|
|
1855
|
-
/* @__PURE__ */ n("span", { className: "text-slate-500", children: I.field }),
|
|
1856
|
-
/* @__PURE__ */ n("span", { className: "font-semibold text-slate-700 dark:text-slate-200", children: I.op }),
|
|
1857
|
-
I.value && /* @__PURE__ */ n("span", { className: "text-[#00a5cc] dark:text-nvr-cyan", children: I.value })
|
|
1858
|
-
]
|
|
1859
|
-
}
|
|
1860
|
-
),
|
|
1861
|
-
/* @__PURE__ */ n(
|
|
1862
|
-
"button",
|
|
1863
|
-
{
|
|
1864
|
-
type: "button",
|
|
1865
|
-
onClick: () => w(v.filter((se) => se.id !== k.id)),
|
|
1866
|
-
"aria-label": "Remove filter",
|
|
1867
|
-
className: "text-slate-400 hover:text-red-500",
|
|
1868
|
-
children: "✕"
|
|
1869
|
-
}
|
|
1870
|
-
)
|
|
1871
|
-
]
|
|
1872
|
-
},
|
|
1873
|
-
k.id
|
|
1874
|
-
);
|
|
1875
|
-
}),
|
|
1876
|
-
/* @__PURE__ */ c("div", { className: "relative", ref: De, children: [
|
|
1877
|
-
/* @__PURE__ */ n(
|
|
1878
|
-
"button",
|
|
1879
|
-
{
|
|
1880
|
-
type: "button",
|
|
1881
|
-
onClick: () => C ? L(!1) : we(),
|
|
1882
|
-
className: "inline-flex h-8 items-center gap-1 rounded-md border border-dashed border-slate-300 px-2.5 text-[12.5px] text-slate-500 hover:border-slate-400 hover:text-slate-700 dark:border-slate-600 dark:text-slate-400",
|
|
1883
|
-
children: "+ Add Filter"
|
|
1884
|
-
}
|
|
1885
|
-
),
|
|
1886
|
-
C && /* @__PURE__ */ n("div", { className: "nvr-pop-in absolute left-0 top-full z-50 mt-1 w-80 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-xl dark:border-slate-700 dark:bg-slate-900", children: F == null ? /* @__PURE__ */ c(Be, { children: [
|
|
1887
|
-
j.path.length > 0 && /* @__PURE__ */ c(
|
|
1888
|
-
"button",
|
|
1889
|
-
{
|
|
1890
|
-
type: "button",
|
|
1891
|
-
onClick: () => W({ collection: a, path: [], pathLabels: [] }),
|
|
1892
|
-
className: "flex w-full items-center gap-1 border-b border-slate-100 px-3 py-2 text-left text-[12px] font-medium text-slate-500 hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-800",
|
|
1893
|
-
children: [
|
|
1894
|
-
"‹ ",
|
|
1895
|
-
j.pathLabels.join(" › ")
|
|
1896
|
-
]
|
|
1897
|
-
}
|
|
1898
|
-
),
|
|
1899
|
-
/* @__PURE__ */ n("div", { className: "p-2 pb-1", children: /* @__PURE__ */ n(
|
|
1900
|
-
"input",
|
|
1901
|
-
{
|
|
1902
|
-
autoFocus: !0,
|
|
1903
|
-
value: N,
|
|
1904
|
-
onChange: (k) => S(k.target.value),
|
|
1905
|
-
placeholder: "Find field…",
|
|
1906
|
-
className: "h-8 w-full rounded-lg border-2 border-nvr-cyan/50 bg-white px-2.5 text-[12.5px] outline-none placeholder:text-slate-400 focus:ring-2 focus:ring-nvr-cyan/20 dark:border-nvr-cyan/40 dark:bg-slate-800 dark:text-slate-100"
|
|
1907
|
-
}
|
|
1908
|
-
) }),
|
|
1909
|
-
/* @__PURE__ */ c("div", { className: "max-h-80 overflow-y-auto py-1", children: [
|
|
1910
|
-
j.path.length === 0 && !N && /* @__PURE__ */ n("div", { className: "mb-1 border-b border-slate-100 pb-1 dark:border-slate-800", children: [
|
|
1911
|
-
["$has_files", "Has attachments"],
|
|
1912
|
-
["$has_comments", "Has comments"],
|
|
1913
|
-
["$has_tasks", "Has open tasks"],
|
|
1914
|
-
["$has_failed_push", "Has a failed integration push"],
|
|
1915
|
-
["$missing_required", "Missing required fields"],
|
|
1916
|
-
["$unseen", "Changed since I last looked"]
|
|
1917
|
-
].map(([k, I]) => /* @__PURE__ */ c(
|
|
1918
|
-
"button",
|
|
1919
|
-
{
|
|
1920
|
-
type: "button",
|
|
1921
|
-
onClick: () => {
|
|
1922
|
-
w([
|
|
1923
|
-
...v.filter((se) => se.path[0] !== k),
|
|
1924
|
-
{
|
|
1925
|
-
id: `${k}-${Date.now()}`,
|
|
1926
|
-
path: [k],
|
|
1927
|
-
pathLabels: [I],
|
|
1928
|
-
fieldType: "boolean",
|
|
1929
|
-
op: "_eq",
|
|
1930
|
-
value: "true"
|
|
1931
|
-
}
|
|
1932
|
-
]), L(!1);
|
|
1933
|
-
},
|
|
1934
|
-
className: "flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12.5px] text-slate-600 hover:bg-slate-50 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
1935
|
-
children: [
|
|
1936
|
-
/* @__PURE__ */ n("span", { className: "text-[#00a5cc] dark:text-nvr-cyan", children: "◈" }),
|
|
1937
|
-
I
|
|
1938
|
-
]
|
|
1939
|
-
},
|
|
1940
|
-
k
|
|
1941
|
-
)) }),
|
|
1811
|
+
return (
|
|
1812
|
+
// Min width = search + Add Filter on one line: on a narrow toolbar the bar wraps to a row of
|
|
1813
|
+
// its own instead of being squeezed to the search box's width. Search and Add Filter are one
|
|
1814
|
+
// non-wrapping pair (Add Filter always right of search; the search box gives way first), the
|
|
1815
|
+
// applied chips follow. No basis / responsive width pairs here: hosts load their own CSS after
|
|
1816
|
+
// full.css, so a host's plain flex-1 or w-full would win over them.
|
|
1817
|
+
/* @__PURE__ */ c("div", { className: "flex min-w-[min(19rem,100%)] flex-1 flex-wrap items-center gap-2", children: [
|
|
1818
|
+
/* @__PURE__ */ c("div", { className: "flex min-w-0 max-w-[24rem] flex-1 items-center gap-2", children: [
|
|
1819
|
+
/* @__PURE__ */ c("div", { className: "relative min-w-0 flex-1", children: [
|
|
1942
1820
|
/* @__PURE__ */ n(
|
|
1943
|
-
|
|
1821
|
+
vs,
|
|
1944
1822
|
{
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
pathLabels: j.pathLabels,
|
|
1948
|
-
search: N,
|
|
1949
|
-
depth: j.path.length,
|
|
1950
|
-
onDrill: (k, I, se) => {
|
|
1951
|
-
W({ collection: k, path: I, pathLabels: se }), S("");
|
|
1952
|
-
},
|
|
1953
|
-
onPick: (k) => {
|
|
1954
|
-
p(k), B(
|
|
1955
|
-
k.fieldType === "integer" || k.fieldType === "decimal" || k.fieldType === "float" ? "_eq" : "_contains"
|
|
1956
|
-
);
|
|
1957
|
-
}
|
|
1823
|
+
"aria-hidden": !0,
|
|
1824
|
+
className: "pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-slate-400"
|
|
1958
1825
|
}
|
|
1959
|
-
)
|
|
1960
|
-
] })
|
|
1961
|
-
] }) : /* @__PURE__ */ c(Be, { children: [
|
|
1962
|
-
/* @__PURE__ */ c(
|
|
1963
|
-
"button",
|
|
1964
|
-
{
|
|
1965
|
-
type: "button",
|
|
1966
|
-
onClick: () => {
|
|
1967
|
-
p(null), z([]), m(""), $("");
|
|
1968
|
-
},
|
|
1969
|
-
className: "flex w-full items-center gap-1 border-b border-slate-100 px-3 py-2 text-left text-[12px] font-medium text-slate-500 hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-800",
|
|
1970
|
-
children: [
|
|
1971
|
-
"‹ ",
|
|
1972
|
-
F.pathLabels.join(" › ")
|
|
1973
|
-
]
|
|
1974
|
-
}
|
|
1975
|
-
),
|
|
1976
|
-
X === "relation" && F.relTarget ? /* @__PURE__ */ c("div", { className: "pt-2", children: [
|
|
1826
|
+
),
|
|
1977
1827
|
/* @__PURE__ */ n(
|
|
1978
|
-
|
|
1828
|
+
"input",
|
|
1979
1829
|
{
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
(se) => se.map(String).includes(String(k)) ? se.filter((ot) => String(ot) !== String(k)) : [...se, k]
|
|
1986
|
-
), Z((se) => ({ ...se, [String(k)]: I }));
|
|
1987
|
-
}
|
|
1830
|
+
value: b,
|
|
1831
|
+
onChange: (k) => i(k.target.value),
|
|
1832
|
+
placeholder: "Search…",
|
|
1833
|
+
"aria-label": `Search ${a}`,
|
|
1834
|
+
className: "h-8 w-full rounded-md border border-slate-200 bg-white pl-8 pr-3 text-[13px] outline-none focus:border-nvr-cyan/50 focus:ring-2 focus:ring-nvr-cyan/30 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100"
|
|
1988
1835
|
}
|
|
1989
|
-
)
|
|
1990
|
-
|
|
1836
|
+
)
|
|
1837
|
+
] }),
|
|
1838
|
+
/* @__PURE__ */ c("div", { className: "relative shrink-0", ref: De, children: [
|
|
1839
|
+
/* @__PURE__ */ n(
|
|
1991
1840
|
"button",
|
|
1992
1841
|
{
|
|
1993
1842
|
type: "button",
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
children: [
|
|
1998
|
-
"Apply",
|
|
1999
|
-
O.length > 0 ? ` (${O.length})` : ""
|
|
2000
|
-
]
|
|
1843
|
+
onClick: () => C ? L(!1) : we(),
|
|
1844
|
+
className: "inline-flex h-8 items-center gap-1 whitespace-nowrap rounded-md border border-dashed border-slate-300 px-2.5 text-[12.5px] text-slate-500 hover:border-slate-400 hover:text-slate-700 dark:border-slate-600 dark:text-slate-400",
|
|
1845
|
+
children: "+ Add Filter"
|
|
2001
1846
|
}
|
|
2002
|
-
)
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
{ label: "Empty", op: "_null" }
|
|
2007
|
-
].map((k) => /* @__PURE__ */ n(
|
|
2008
|
-
"button",
|
|
2009
|
-
{
|
|
2010
|
-
type: "button",
|
|
2011
|
-
onClick: () => be(
|
|
2012
|
-
k.op.includes(":") ? k.op.split(":")[0] : k.op,
|
|
2013
|
-
k.op.includes(":") ? k.op.split(":")[1] : ""
|
|
2014
|
-
),
|
|
2015
|
-
className: "h-8 flex-1 rounded-md border border-slate-200 text-[12.5px] text-slate-600 hover:border-nvr-cyan/40 hover:bg-nvr-cyan/5 dark:border-slate-700 dark:text-slate-300",
|
|
2016
|
-
children: k.label
|
|
2017
|
-
},
|
|
2018
|
-
k.op
|
|
2019
|
-
)) }) : X === "date" ? /* @__PURE__ */ c("div", { className: "space-y-2 p-3", children: [
|
|
2020
|
-
/* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children: ga.filter((k) => k.value).map((k) => /* @__PURE__ */ n(
|
|
2021
|
-
"button",
|
|
2022
|
-
{
|
|
2023
|
-
type: "button",
|
|
2024
|
-
onClick: () => {
|
|
2025
|
-
be("_preset", k.value);
|
|
2026
|
-
},
|
|
2027
|
-
className: "rounded-md border border-slate-200 px-2 py-1 text-[11.5px] text-slate-600 hover:border-nvr-cyan/40 hover:bg-nvr-cyan/5 dark:border-slate-700 dark:text-slate-300",
|
|
2028
|
-
children: k.label
|
|
2029
|
-
},
|
|
2030
|
-
k.value
|
|
2031
|
-
)) }),
|
|
2032
|
-
/* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
|
|
2033
|
-
/* @__PURE__ */ n(
|
|
2034
|
-
"input",
|
|
1847
|
+
),
|
|
1848
|
+
C && /* @__PURE__ */ n("div", { className: "nvr-pop-in absolute left-0 top-full z-50 mt-1 w-80 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-xl dark:border-slate-700 dark:bg-slate-900", children: F == null ? /* @__PURE__ */ c(Be, { children: [
|
|
1849
|
+
j.path.length > 0 && /* @__PURE__ */ c(
|
|
1850
|
+
"button",
|
|
2035
1851
|
{
|
|
2036
|
-
type: "
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
1852
|
+
type: "button",
|
|
1853
|
+
onClick: () => W({ collection: a, path: [], pathLabels: [] }),
|
|
1854
|
+
className: "flex w-full items-center gap-1 border-b border-slate-100 px-3 py-2 text-left text-[12px] font-medium text-slate-500 hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-800",
|
|
1855
|
+
children: [
|
|
1856
|
+
"‹ ",
|
|
1857
|
+
j.pathLabels.join(" › ")
|
|
1858
|
+
]
|
|
2041
1859
|
}
|
|
2042
1860
|
),
|
|
2043
|
-
/* @__PURE__ */ n("
|
|
2044
|
-
/* @__PURE__ */ n(
|
|
1861
|
+
/* @__PURE__ */ n("div", { className: "p-2 pb-1", children: /* @__PURE__ */ n(
|
|
2045
1862
|
"input",
|
|
2046
1863
|
{
|
|
2047
|
-
|
|
2048
|
-
value:
|
|
2049
|
-
onChange: (k) =>
|
|
2050
|
-
|
|
2051
|
-
className: "h-8
|
|
1864
|
+
autoFocus: !0,
|
|
1865
|
+
value: N,
|
|
1866
|
+
onChange: (k) => S(k.target.value),
|
|
1867
|
+
placeholder: "Find field…",
|
|
1868
|
+
className: "h-8 w-full rounded-lg border-2 border-nvr-cyan/50 bg-white px-2.5 text-[12.5px] outline-none placeholder:text-slate-400 focus:ring-2 focus:ring-nvr-cyan/20 dark:border-nvr-cyan/40 dark:bg-slate-800 dark:text-slate-100"
|
|
2052
1869
|
}
|
|
2053
|
-
)
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
{
|
|
2079
|
-
type: "button",
|
|
2080
|
-
onClick: () => B(k.value),
|
|
2081
|
-
className: `rounded-md border px-2 py-1 text-[11.5px] ${_ === k.value ? "border-nvr-cyan/40 bg-nvr-cyan/[0.08] font-medium text-slate-800 dark:text-slate-100" : "border-slate-200 text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400"}`,
|
|
2082
|
-
children: k.label
|
|
1870
|
+
) }),
|
|
1871
|
+
/* @__PURE__ */ c("div", { className: "max-h-80 overflow-y-auto py-1", children: [
|
|
1872
|
+
j.path.length === 0 && !N && /* @__PURE__ */ n("div", { className: "mb-1 border-b border-slate-100 pb-1 dark:border-slate-800", children: [
|
|
1873
|
+
["$has_files", "Has attachments"],
|
|
1874
|
+
["$has_comments", "Has comments"],
|
|
1875
|
+
["$has_tasks", "Has open tasks"],
|
|
1876
|
+
["$has_failed_push", "Has a failed integration push"],
|
|
1877
|
+
["$missing_required", "Missing required fields"],
|
|
1878
|
+
["$unseen", "Changed since I last looked"]
|
|
1879
|
+
].map(([k, I]) => /* @__PURE__ */ c(
|
|
1880
|
+
"button",
|
|
1881
|
+
{
|
|
1882
|
+
type: "button",
|
|
1883
|
+
onClick: () => {
|
|
1884
|
+
w([
|
|
1885
|
+
...v.filter((se) => se.path[0] !== k),
|
|
1886
|
+
{
|
|
1887
|
+
id: `${k}-${Date.now()}`,
|
|
1888
|
+
path: [k],
|
|
1889
|
+
pathLabels: [I],
|
|
1890
|
+
fieldType: "boolean",
|
|
1891
|
+
op: "_eq",
|
|
1892
|
+
value: "true"
|
|
1893
|
+
}
|
|
1894
|
+
]), L(!1);
|
|
2083
1895
|
},
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
1896
|
+
className: "flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12.5px] text-slate-600 hover:bg-slate-50 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
1897
|
+
children: [
|
|
1898
|
+
/* @__PURE__ */ n("span", { className: "text-[#00a5cc] dark:text-nvr-cyan", children: "◈" }),
|
|
1899
|
+
I
|
|
1900
|
+
]
|
|
1901
|
+
},
|
|
1902
|
+
k
|
|
1903
|
+
)) }),
|
|
1904
|
+
/* @__PURE__ */ n(
|
|
1905
|
+
Mc,
|
|
1906
|
+
{
|
|
1907
|
+
collection: j.collection,
|
|
1908
|
+
path: j.path,
|
|
1909
|
+
pathLabels: j.pathLabels,
|
|
1910
|
+
search: N,
|
|
1911
|
+
depth: j.path.length,
|
|
1912
|
+
onDrill: (k, I, se) => {
|
|
1913
|
+
W({ collection: k, path: I, pathLabels: se }), S("");
|
|
1914
|
+
},
|
|
1915
|
+
onPick: (k) => {
|
|
1916
|
+
p(k), B(
|
|
1917
|
+
k.fieldType === "integer" || k.fieldType === "decimal" || k.fieldType === "float" ? "_eq" : "_contains"
|
|
1918
|
+
);
|
|
2093
1919
|
}
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
1920
|
+
}
|
|
1921
|
+
)
|
|
1922
|
+
] })
|
|
1923
|
+
] }) : /* @__PURE__ */ c(Be, { children: [
|
|
1924
|
+
/* @__PURE__ */ c(
|
|
1925
|
+
"button",
|
|
1926
|
+
{
|
|
1927
|
+
type: "button",
|
|
1928
|
+
onClick: () => {
|
|
1929
|
+
p(null), z([]), m(""), $("");
|
|
1930
|
+
},
|
|
1931
|
+
className: "flex w-full items-center gap-1 border-b border-slate-100 px-3 py-2 text-left text-[12px] font-medium text-slate-500 hover:bg-slate-50 dark:border-slate-800 dark:hover:bg-slate-800",
|
|
1932
|
+
children: [
|
|
1933
|
+
"‹ ",
|
|
1934
|
+
F.pathLabels.join(" › ")
|
|
1935
|
+
]
|
|
1936
|
+
}
|
|
1937
|
+
),
|
|
1938
|
+
X === "relation" && F.relTarget ? /* @__PURE__ */ c("div", { className: "pt-2", children: [
|
|
1939
|
+
/* @__PURE__ */ n(
|
|
1940
|
+
Oc,
|
|
1941
|
+
{
|
|
1942
|
+
target: F.relTarget,
|
|
1943
|
+
selected: O,
|
|
1944
|
+
labels: le,
|
|
1945
|
+
onToggle: (k, I) => {
|
|
1946
|
+
z(
|
|
1947
|
+
(se) => se.map(String).includes(String(k)) ? se.filter((ot) => String(ot) !== String(k)) : [...se, k]
|
|
1948
|
+
), Z((se) => ({ ...se, [String(k)]: I }));
|
|
2102
1949
|
}
|
|
2103
|
-
|
|
2104
|
-
|
|
1950
|
+
}
|
|
1951
|
+
),
|
|
1952
|
+
/* @__PURE__ */ n("div", { className: "border-t border-slate-100 p-2 dark:border-slate-800", children: /* @__PURE__ */ c(
|
|
1953
|
+
"button",
|
|
1954
|
+
{
|
|
1955
|
+
type: "button",
|
|
1956
|
+
disabled: O.length === 0,
|
|
1957
|
+
onClick: st,
|
|
1958
|
+
className: "h-8 w-full rounded-md bg-nvr-cyan text-[13px] font-medium text-white disabled:opacity-40",
|
|
1959
|
+
children: [
|
|
1960
|
+
"Apply",
|
|
1961
|
+
O.length > 0 ? ` (${O.length})` : ""
|
|
1962
|
+
]
|
|
1963
|
+
}
|
|
1964
|
+
) })
|
|
1965
|
+
] }) : X === "boolean" ? /* @__PURE__ */ n("div", { className: "flex gap-1.5 p-3", children: [
|
|
1966
|
+
{ label: "Yes", op: "_eq:true" },
|
|
1967
|
+
{ label: "No", op: "_eq:false" },
|
|
1968
|
+
{ label: "Empty", op: "_null" }
|
|
1969
|
+
].map((k) => /* @__PURE__ */ n(
|
|
1970
|
+
"button",
|
|
1971
|
+
{
|
|
1972
|
+
type: "button",
|
|
1973
|
+
onClick: () => be(
|
|
1974
|
+
k.op.includes(":") ? k.op.split(":")[0] : k.op,
|
|
1975
|
+
k.op.includes(":") ? k.op.split(":")[1] : ""
|
|
1976
|
+
),
|
|
1977
|
+
className: "h-8 flex-1 rounded-md border border-slate-200 text-[12.5px] text-slate-600 hover:border-nvr-cyan/40 hover:bg-nvr-cyan/5 dark:border-slate-700 dark:text-slate-300",
|
|
1978
|
+
children: k.label
|
|
1979
|
+
},
|
|
1980
|
+
k.op
|
|
1981
|
+
)) }) : X === "date" ? /* @__PURE__ */ c("div", { className: "space-y-2 p-3", children: [
|
|
1982
|
+
/* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1", children: ga.filter((k) => k.value).map((k) => /* @__PURE__ */ n(
|
|
1983
|
+
"button",
|
|
1984
|
+
{
|
|
1985
|
+
type: "button",
|
|
1986
|
+
onClick: () => {
|
|
1987
|
+
be("_preset", k.value);
|
|
1988
|
+
},
|
|
1989
|
+
className: "rounded-md border border-slate-200 px-2 py-1 text-[11.5px] text-slate-600 hover:border-nvr-cyan/40 hover:bg-nvr-cyan/5 dark:border-slate-700 dark:text-slate-300",
|
|
1990
|
+
children: k.label
|
|
1991
|
+
},
|
|
1992
|
+
k.value
|
|
1993
|
+
)) }),
|
|
2105
1994
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
|
|
2106
1995
|
/* @__PURE__ */ n(
|
|
2107
1996
|
"input",
|
|
2108
1997
|
{
|
|
2109
|
-
|
|
2110
|
-
type: X === "number" ? "number" : "text",
|
|
1998
|
+
type: "date",
|
|
2111
1999
|
value: q,
|
|
2112
2000
|
onChange: (k) => m(k.target.value),
|
|
2113
|
-
|
|
2114
|
-
className: "h-8 min-w-0 flex-1 rounded-md border border-slate-200 bg-white px-2
|
|
2001
|
+
"aria-label": "From date",
|
|
2002
|
+
className: "h-8 min-w-0 flex-1 rounded-md border border-slate-200 bg-white px-2 text-[12px] dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
|
|
2115
2003
|
}
|
|
2116
2004
|
),
|
|
2117
|
-
|
|
2118
|
-
|
|
2005
|
+
/* @__PURE__ */ n("span", { className: "text-[11px] text-slate-400", children: "to" }),
|
|
2006
|
+
/* @__PURE__ */ n(
|
|
2007
|
+
"input",
|
|
2008
|
+
{
|
|
2009
|
+
type: "date",
|
|
2010
|
+
value: M,
|
|
2011
|
+
onChange: (k) => $(k.target.value),
|
|
2012
|
+
"aria-label": "To date",
|
|
2013
|
+
className: "h-8 min-w-0 flex-1 rounded-md border border-slate-200 bg-white px-2 text-[12px] dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
|
|
2014
|
+
}
|
|
2015
|
+
)
|
|
2016
|
+
] }),
|
|
2017
|
+
/* @__PURE__ */ n(
|
|
2018
|
+
"button",
|
|
2019
|
+
{
|
|
2020
|
+
type: "button",
|
|
2021
|
+
disabled: !q && !M,
|
|
2022
|
+
onClick: () => {
|
|
2023
|
+
q && M ? be("_between", `${q}..${M}`) : q ? be("_gte", q) : M && be("_lte", M);
|
|
2024
|
+
},
|
|
2025
|
+
className: "h-8 w-full rounded-md bg-nvr-cyan text-[13px] font-medium text-white disabled:opacity-40",
|
|
2026
|
+
children: "Apply"
|
|
2027
|
+
}
|
|
2028
|
+
)
|
|
2029
|
+
] }) : /* @__PURE__ */ c(
|
|
2030
|
+
"form",
|
|
2031
|
+
{
|
|
2032
|
+
className: "space-y-2 p-3",
|
|
2033
|
+
onSubmit: (k) => {
|
|
2034
|
+
k.preventDefault(), X === "number" && _ === "_between" ? q !== "" && M !== "" && be("_between", `${q}..${M}`) : q.trim() && be(_, q.trim());
|
|
2035
|
+
},
|
|
2036
|
+
children: [
|
|
2037
|
+
/* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: [
|
|
2038
|
+
(X === "number" ? [..._e, { value: "_between", label: "Between" }] : Ce).map((k) => /* @__PURE__ */ n(
|
|
2039
|
+
"button",
|
|
2040
|
+
{
|
|
2041
|
+
type: "button",
|
|
2042
|
+
onClick: () => B(k.value),
|
|
2043
|
+
className: `rounded-md border px-2 py-1 text-[11.5px] ${_ === k.value ? "border-nvr-cyan/40 bg-nvr-cyan/[0.08] font-medium text-slate-800 dark:text-slate-100" : "border-slate-200 text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400"}`,
|
|
2044
|
+
children: k.label
|
|
2045
|
+
},
|
|
2046
|
+
k.value
|
|
2047
|
+
)),
|
|
2048
|
+
/* @__PURE__ */ n(
|
|
2049
|
+
"button",
|
|
2050
|
+
{
|
|
2051
|
+
type: "button",
|
|
2052
|
+
onClick: () => be("_null", ""),
|
|
2053
|
+
className: "rounded-md border border-slate-200 px-2 py-1 text-[11.5px] text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400",
|
|
2054
|
+
children: "Empty"
|
|
2055
|
+
}
|
|
2056
|
+
),
|
|
2057
|
+
/* @__PURE__ */ n(
|
|
2058
|
+
"button",
|
|
2059
|
+
{
|
|
2060
|
+
type: "button",
|
|
2061
|
+
onClick: () => be("_nnull", ""),
|
|
2062
|
+
className: "rounded-md border border-slate-200 px-2 py-1 text-[11.5px] text-slate-500 hover:text-slate-700 dark:border-slate-700 dark:text-slate-400",
|
|
2063
|
+
children: "Not empty"
|
|
2064
|
+
}
|
|
2065
|
+
)
|
|
2066
|
+
] }),
|
|
2067
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-1.5", children: [
|
|
2068
|
+
/* @__PURE__ */ n(
|
|
2069
|
+
"input",
|
|
2070
|
+
{
|
|
2071
|
+
autoFocus: !0,
|
|
2072
|
+
type: X === "number" ? "number" : "text",
|
|
2073
|
+
value: q,
|
|
2074
|
+
onChange: (k) => m(k.target.value),
|
|
2075
|
+
placeholder: "Value…",
|
|
2076
|
+
className: "h-8 min-w-0 flex-1 rounded-md border border-slate-200 bg-white px-2.5 text-[13px] outline-none focus:border-nvr-cyan/50 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
|
|
2077
|
+
}
|
|
2078
|
+
),
|
|
2079
|
+
X === "number" && _ === "_between" && /* @__PURE__ */ c(Be, { children: [
|
|
2080
|
+
/* @__PURE__ */ n("span", { className: "text-[11px] text-slate-400", children: "to" }),
|
|
2081
|
+
/* @__PURE__ */ n(
|
|
2082
|
+
"input",
|
|
2083
|
+
{
|
|
2084
|
+
type: "number",
|
|
2085
|
+
value: M,
|
|
2086
|
+
onChange: (k) => $(k.target.value),
|
|
2087
|
+
placeholder: "To…",
|
|
2088
|
+
className: "h-8 min-w-0 flex-1 rounded-md border border-slate-200 bg-white px-2.5 text-[13px] outline-none focus:border-nvr-cyan/50 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
|
|
2089
|
+
}
|
|
2090
|
+
)
|
|
2091
|
+
] })
|
|
2092
|
+
] }),
|
|
2119
2093
|
/* @__PURE__ */ n(
|
|
2120
|
-
"
|
|
2094
|
+
"button",
|
|
2121
2095
|
{
|
|
2122
|
-
type: "
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
className: "h-8 min-w-0 flex-1 rounded-md border border-slate-200 bg-white px-2.5 text-[13px] outline-none focus:border-nvr-cyan/50 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100"
|
|
2096
|
+
type: "submit",
|
|
2097
|
+
disabled: _ === "_between" ? q === "" || M === "" : !q.trim(),
|
|
2098
|
+
className: "h-8 w-full rounded-md bg-nvr-cyan text-[13px] font-medium text-white disabled:opacity-40",
|
|
2099
|
+
children: K ? "Update" : "Apply"
|
|
2127
2100
|
}
|
|
2128
2101
|
)
|
|
2129
|
-
]
|
|
2130
|
-
|
|
2102
|
+
]
|
|
2103
|
+
}
|
|
2104
|
+
)
|
|
2105
|
+
] }) })
|
|
2106
|
+
] })
|
|
2107
|
+
] }),
|
|
2108
|
+
v.map((k) => {
|
|
2109
|
+
const I = Ac(k);
|
|
2110
|
+
return /* @__PURE__ */ c(
|
|
2111
|
+
"span",
|
|
2112
|
+
{
|
|
2113
|
+
className: "nvr-pop-in inline-flex items-center gap-1.5 rounded-md border border-slate-200 bg-white px-2 py-1 text-[12px] transition-colors hover:border-nvr-cyan/40 dark:border-slate-700 dark:bg-slate-900",
|
|
2114
|
+
children: [
|
|
2131
2115
|
/* @__PURE__ */ n(
|
|
2132
2116
|
"button",
|
|
2133
2117
|
{
|
|
2134
|
-
type: "
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2118
|
+
type: "button",
|
|
2119
|
+
onClick: () => w(v.map((se) => se.id === k.id ? { ...se, not: !se.not } : se)),
|
|
2120
|
+
"data-tip": k.not ? "Negated — click to restore" : "Click to negate (NOT)",
|
|
2121
|
+
className: k.not ? "rounded bg-amber-100 px-1 text-[10.5px] font-bold text-amber-700 dark:bg-amber-400/15 dark:text-amber-400" : "rounded px-1 text-[10.5px] font-bold text-slate-300 hover:text-slate-500",
|
|
2122
|
+
children: "NOT"
|
|
2123
|
+
}
|
|
2124
|
+
),
|
|
2125
|
+
/* @__PURE__ */ c(
|
|
2126
|
+
"button",
|
|
2127
|
+
{
|
|
2128
|
+
type: "button",
|
|
2129
|
+
onClick: () => R(k),
|
|
2130
|
+
className: "inline-flex items-center gap-1.5",
|
|
2131
|
+
children: [
|
|
2132
|
+
/* @__PURE__ */ n("span", { className: "text-slate-500", children: I.field }),
|
|
2133
|
+
/* @__PURE__ */ n("span", { className: "font-semibold text-slate-700 dark:text-slate-200", children: I.op }),
|
|
2134
|
+
I.value && /* @__PURE__ */ n("span", { className: "text-[#00a5cc] dark:text-nvr-cyan", children: I.value })
|
|
2135
|
+
]
|
|
2136
|
+
}
|
|
2137
|
+
),
|
|
2138
|
+
/* @__PURE__ */ n(
|
|
2139
|
+
"button",
|
|
2140
|
+
{
|
|
2141
|
+
type: "button",
|
|
2142
|
+
onClick: () => w(v.filter((se) => se.id !== k.id)),
|
|
2143
|
+
"aria-label": "Remove filter",
|
|
2144
|
+
className: "text-slate-400 hover:text-red-500",
|
|
2145
|
+
children: "✕"
|
|
2138
2146
|
}
|
|
2139
2147
|
)
|
|
2140
2148
|
]
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
|
|
2149
|
+
},
|
|
2150
|
+
k.id
|
|
2151
|
+
);
|
|
2152
|
+
})
|
|
2144
2153
|
] })
|
|
2145
|
-
|
|
2154
|
+
);
|
|
2146
2155
|
}
|
|
2147
2156
|
function jc({
|
|
2148
2157
|
collection: a,
|