@clyrex-digital/clyrex-controls-dev 0.8.1-dev.20260924115534 → 0.8.1-dev.20260926063530
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/DataBindingControls-VSLL4WV2.mjs +882 -0
- package/dist/DataBindingControls-Z2AHWFYX.mjs +880 -0
- package/dist/{InputControlClient-A3V5YRWH.mjs → InputControlClient-K6GXQEJD.mjs} +4 -6
- package/dist/{LinkNodeButton-WXAW3ZD6.mjs → LinkNodeButton-U6AJUMFA.mjs} +1 -1
- package/dist/{Pagination-STOHS3LO.mjs → Pagination-6R4XZLF6.mjs} +3 -5
- package/dist/{Pagination-V53JCR6P.mjs → Pagination-RMAXCIL7.mjs} +71 -27
- package/dist/{chunk-4WMSS6CE.mjs → chunk-3IMICDQR.mjs} +0 -1
- package/dist/{chunk-N57RANHY.mjs → chunk-LDS5ZLVG.mjs} +1 -1
- package/dist/{chunk-GCG4OYDJ.mjs → chunk-N3EYMPAJ.mjs} +31 -0
- package/dist/{chunk-I3ND2ZRE.mjs → chunk-Q4AFJYT5.mjs} +32 -2
- package/dist/{chunk-K6GGVJCI.mjs → chunk-RSUG2VPX.mjs} +1 -1
- package/dist/index.js +512 -113
- package/dist/index.mjs +30 -28
- package/dist/server.js +709 -2314
- package/dist/server.mjs +6 -9
- package/package.json +1 -1
- package/dist/DataBindingControls-5H5K5GVR.mjs +0 -477
- package/dist/DataBindingControls-G5TRSVEU.mjs +0 -481
- package/dist/InputControlClient-NHXG4QBU.mjs +0 -1836
- package/dist/chunk-2R26M6CK.mjs +0 -30
- package/dist/chunk-6PW2RLUJ.mjs +0 -52
- package/dist/chunk-F4DNLPFN.mjs +0 -36
- package/dist/chunk-HRDHAIZF.mjs +0 -33
- package/dist/chunk-XDTWUEVR.mjs +0 -13
package/dist/index.js
CHANGED
|
@@ -4601,19 +4601,6 @@ var init_InputControlClient = __esm({
|
|
|
4601
4601
|
}
|
|
4602
4602
|
});
|
|
4603
4603
|
|
|
4604
|
-
// src/components/controls/edit/InputControl.tsx
|
|
4605
|
-
var import_dynamic7, InputControl2, InputControl_default;
|
|
4606
|
-
var init_InputControl = __esm({
|
|
4607
|
-
"src/components/controls/edit/InputControl.tsx"() {
|
|
4608
|
-
"use strict";
|
|
4609
|
-
import_dynamic7 = __toESM(require("next/dynamic"));
|
|
4610
|
-
InputControl2 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_InputControlClient(), InputControlClient_exports)), {
|
|
4611
|
-
ssr: false
|
|
4612
|
-
});
|
|
4613
|
-
InputControl_default = InputControl2;
|
|
4614
|
-
}
|
|
4615
|
-
});
|
|
4616
|
-
|
|
4617
4604
|
// src/clients/CacheManage.tsx
|
|
4618
4605
|
var import_node_cache, CacheManager;
|
|
4619
4606
|
var init_CacheManage = __esm({
|
|
@@ -5686,7 +5673,7 @@ var DataBindingControls_exports = {};
|
|
|
5686
5673
|
__export(DataBindingControls_exports, {
|
|
5687
5674
|
default: () => DataBindingControls_default
|
|
5688
5675
|
});
|
|
5689
|
-
var import_react59, import_navigation, import_jsx_runtime86, humanize, escapeODataString, parseFacetSelections, buildFacetFilter, parseODataSearch, SearchIcon, ResetIcon, FilterSlidersIcon, ChevronDownIcon, CheckIcon, CloseIcon, normalizeSortOption, DataBindingControls, DataBindingControls_default;
|
|
5676
|
+
var import_react59, import_navigation, import_jsx_runtime86, humanize, escapeODataString, parseFacetSelections, buildFacetFilter, parseODataSearch, SearchIcon, ResetIcon, FilterSlidersIcon, ChevronDownIcon, CheckIcon, CloseIcon, MapPinIcon, BriefcaseIcon, FileTextIcon, TagIcon, getCategoryIcon, normalizeSortOption, DataBindingControls, DataBindingControls_default;
|
|
5690
5677
|
var init_DataBindingControls = __esm({
|
|
5691
5678
|
"src/components/pageRenderingEngine/nodes/DataBindingControls.tsx"() {
|
|
5692
5679
|
"use strict";
|
|
@@ -5694,8 +5681,6 @@ var init_DataBindingControls = __esm({
|
|
|
5694
5681
|
import_react59 = require("react");
|
|
5695
5682
|
import_navigation = require("next/navigation");
|
|
5696
5683
|
init_Button();
|
|
5697
|
-
init_InputControl();
|
|
5698
|
-
init_InputControlType();
|
|
5699
5684
|
init_StyleTypes();
|
|
5700
5685
|
import_jsx_runtime86 = require("react/jsx-runtime");
|
|
5701
5686
|
humanize = (value) => value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim();
|
|
@@ -5810,10 +5795,110 @@ var init_DataBindingControls = __esm({
|
|
|
5810
5795
|
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
5811
5796
|
}
|
|
5812
5797
|
);
|
|
5798
|
+
MapPinIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5799
|
+
"svg",
|
|
5800
|
+
{
|
|
5801
|
+
"aria-hidden": "true",
|
|
5802
|
+
className,
|
|
5803
|
+
fill: "none",
|
|
5804
|
+
viewBox: "0 0 24 24",
|
|
5805
|
+
stroke: "currentColor",
|
|
5806
|
+
strokeWidth: "2",
|
|
5807
|
+
children: [
|
|
5808
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5809
|
+
"path",
|
|
5810
|
+
{
|
|
5811
|
+
strokeLinecap: "round",
|
|
5812
|
+
strokeLinejoin: "round",
|
|
5813
|
+
d: "M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
5814
|
+
}
|
|
5815
|
+
),
|
|
5816
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5817
|
+
"path",
|
|
5818
|
+
{
|
|
5819
|
+
strokeLinecap: "round",
|
|
5820
|
+
strokeLinejoin: "round",
|
|
5821
|
+
d: "M15 11a3 3 0 11-6 0 3 3 0 016 0z"
|
|
5822
|
+
}
|
|
5823
|
+
)
|
|
5824
|
+
]
|
|
5825
|
+
}
|
|
5826
|
+
);
|
|
5827
|
+
BriefcaseIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5828
|
+
"svg",
|
|
5829
|
+
{
|
|
5830
|
+
"aria-hidden": "true",
|
|
5831
|
+
className,
|
|
5832
|
+
fill: "none",
|
|
5833
|
+
viewBox: "0 0 24 24",
|
|
5834
|
+
stroke: "currentColor",
|
|
5835
|
+
strokeWidth: "2",
|
|
5836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5837
|
+
"path",
|
|
5838
|
+
{
|
|
5839
|
+
strokeLinecap: "round",
|
|
5840
|
+
strokeLinejoin: "round",
|
|
5841
|
+
d: "M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
|
|
5842
|
+
}
|
|
5843
|
+
)
|
|
5844
|
+
}
|
|
5845
|
+
);
|
|
5846
|
+
FileTextIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5847
|
+
"svg",
|
|
5848
|
+
{
|
|
5849
|
+
"aria-hidden": "true",
|
|
5850
|
+
className,
|
|
5851
|
+
fill: "none",
|
|
5852
|
+
viewBox: "0 0 24 24",
|
|
5853
|
+
stroke: "currentColor",
|
|
5854
|
+
strokeWidth: "2",
|
|
5855
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5856
|
+
"path",
|
|
5857
|
+
{
|
|
5858
|
+
strokeLinecap: "round",
|
|
5859
|
+
strokeLinejoin: "round",
|
|
5860
|
+
d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
5861
|
+
}
|
|
5862
|
+
)
|
|
5863
|
+
}
|
|
5864
|
+
);
|
|
5865
|
+
TagIcon = ({ className = "" }) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5866
|
+
"svg",
|
|
5867
|
+
{
|
|
5868
|
+
"aria-hidden": "true",
|
|
5869
|
+
className,
|
|
5870
|
+
fill: "none",
|
|
5871
|
+
viewBox: "0 0 24 24",
|
|
5872
|
+
stroke: "currentColor",
|
|
5873
|
+
strokeWidth: "2",
|
|
5874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5875
|
+
"path",
|
|
5876
|
+
{
|
|
5877
|
+
strokeLinecap: "round",
|
|
5878
|
+
strokeLinejoin: "round",
|
|
5879
|
+
d: "M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"
|
|
5880
|
+
}
|
|
5881
|
+
)
|
|
5882
|
+
}
|
|
5883
|
+
);
|
|
5884
|
+
getCategoryIcon = (category) => {
|
|
5885
|
+
const lower = category.toLowerCase();
|
|
5886
|
+
if (lower.includes("location") || lower.includes("city") || lower.includes("country") || lower.includes("state") || lower.includes("address")) {
|
|
5887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(MapPinIcon, { className: "h-4 w-4" });
|
|
5888
|
+
}
|
|
5889
|
+
if (lower.includes("type") || lower.includes("work") || lower.includes("employment") || lower.includes("experience")) {
|
|
5890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(BriefcaseIcon, { className: "h-4 w-4" });
|
|
5891
|
+
}
|
|
5892
|
+
if (lower.includes("department") || lower.includes("category") || lower.includes("role") || lower.includes("industry")) {
|
|
5893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(FileTextIcon, { className: "h-4 w-4" });
|
|
5894
|
+
}
|
|
5895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TagIcon, { className: "h-4 w-4" });
|
|
5896
|
+
};
|
|
5813
5897
|
normalizeSortOption = (option) => {
|
|
5814
5898
|
const direction = option.direction.trim();
|
|
5899
|
+
const title = option.title || humanize(option.name);
|
|
5815
5900
|
return {
|
|
5816
|
-
label:
|
|
5901
|
+
label: title,
|
|
5817
5902
|
value: [option.name, direction].filter(Boolean).join(" ")
|
|
5818
5903
|
};
|
|
5819
5904
|
};
|
|
@@ -5830,6 +5915,23 @@ var init_DataBindingControls = __esm({
|
|
|
5830
5915
|
const router = (0, import_navigation.useRouter)();
|
|
5831
5916
|
const searchParams = (0, import_navigation.useSearchParams)();
|
|
5832
5917
|
const [collapsedCategories, setCollapsedCategories] = (0, import_react59.useState)({});
|
|
5918
|
+
const [isSortOpen, setIsSortOpen] = (0, import_react59.useState)(false);
|
|
5919
|
+
const [isMobileFiltersOpen, setIsMobileFiltersOpen] = (0, import_react59.useState)(false);
|
|
5920
|
+
const [facetCategorySearch, setFacetCategorySearch] = (0, import_react59.useState)({});
|
|
5921
|
+
const desktopSortDropdownRef = (0, import_react59.useRef)(null);
|
|
5922
|
+
const mobileSortDropdownRef = (0, import_react59.useRef)(null);
|
|
5923
|
+
(0, import_react59.useEffect)(() => {
|
|
5924
|
+
const handleClickOutside = (event) => {
|
|
5925
|
+
const target = event.target;
|
|
5926
|
+
const clickedInsideDesktop = desktopSortDropdownRef.current?.contains(target);
|
|
5927
|
+
const clickedInsideMobile = mobileSortDropdownRef.current?.contains(target);
|
|
5928
|
+
if (!clickedInsideDesktop && !clickedInsideMobile) {
|
|
5929
|
+
setIsSortOpen(false);
|
|
5930
|
+
}
|
|
5931
|
+
};
|
|
5932
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
5933
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
5934
|
+
}, []);
|
|
5833
5935
|
const toggleCategory = (field) => {
|
|
5834
5936
|
setCollapsedCategories((prev) => ({
|
|
5835
5937
|
...prev,
|
|
@@ -5852,18 +5954,54 @@ var init_DataBindingControls = __esm({
|
|
|
5852
5954
|
() => parseFacetSelections(currentFilter),
|
|
5853
5955
|
[currentFilter]
|
|
5854
5956
|
);
|
|
5957
|
+
(0, import_react59.useEffect)(() => {
|
|
5958
|
+
if (isMobileFiltersOpen) {
|
|
5959
|
+
document.body.style.overflow = "hidden";
|
|
5960
|
+
} else {
|
|
5961
|
+
document.body.style.overflow = "";
|
|
5962
|
+
}
|
|
5963
|
+
return () => {
|
|
5964
|
+
document.body.style.overflow = "";
|
|
5965
|
+
};
|
|
5966
|
+
}, [isMobileFiltersOpen]);
|
|
5855
5967
|
const activeFacets = (0, import_react59.useMemo)(() => {
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5968
|
+
const facetMap = /* @__PURE__ */ new Map();
|
|
5969
|
+
if (facets) {
|
|
5970
|
+
Object.entries(facets).forEach(([field, values]) => {
|
|
5971
|
+
if (!Array.isArray(values)) return;
|
|
5972
|
+
const filteredValues = values.filter(
|
|
5973
|
+
(item) => item.count > 0 || selectedFacetValues.get(field) === item.value
|
|
5974
|
+
);
|
|
5975
|
+
if (filteredValues.length > 0) {
|
|
5976
|
+
facetMap.set(field, filteredValues);
|
|
5977
|
+
}
|
|
5978
|
+
});
|
|
5979
|
+
}
|
|
5980
|
+
selectedFacetValues.forEach((val, field) => {
|
|
5981
|
+
if (!facetMap.has(field)) {
|
|
5982
|
+
facetMap.set(field, [{ value: val, count: 0 }]);
|
|
5983
|
+
} else {
|
|
5984
|
+
const existing = facetMap.get(field);
|
|
5985
|
+
if (!existing.some((item) => item.value === val)) {
|
|
5986
|
+
existing.push({ value: val, count: 0 });
|
|
5987
|
+
}
|
|
5988
|
+
}
|
|
5989
|
+
});
|
|
5990
|
+
return Array.from(facetMap.entries());
|
|
5865
5991
|
}, [facets, selectedFacetValues]);
|
|
5866
|
-
const normalizedSortOptions = (
|
|
5992
|
+
const normalizedSortOptions = (0, import_react59.useMemo)(
|
|
5993
|
+
() => (sortOptions ?? []).filter((option) => option?.name && option?.direction).map(normalizeSortOption).filter((option) => option.value),
|
|
5994
|
+
[sortOptions]
|
|
5995
|
+
);
|
|
5996
|
+
const selectedSortOption = (0, import_react59.useMemo)(() => {
|
|
5997
|
+
if (!normalizedSortOptions.length) return null;
|
|
5998
|
+
const trimmedCurrentSort = currentSort.trim().toLowerCase();
|
|
5999
|
+
if (!trimmedCurrentSort) return normalizedSortOptions[0];
|
|
6000
|
+
return normalizedSortOptions.find(
|
|
6001
|
+
(opt) => opt.value.trim().toLowerCase() === trimmedCurrentSort
|
|
6002
|
+
) || normalizedSortOptions[0];
|
|
6003
|
+
}, [normalizedSortOptions, currentSort]);
|
|
6004
|
+
const selectedSortLabel = selectedSortOption?.label || "";
|
|
5867
6005
|
const getQueryUrl = (0, import_react59.useCallback)(
|
|
5868
6006
|
(updates) => {
|
|
5869
6007
|
const initialParams = searchParams ? searchParams.toString() : "";
|
|
@@ -5877,9 +6015,7 @@ var init_DataBindingControls = __esm({
|
|
|
5877
6015
|
});
|
|
5878
6016
|
params.delete("$skip");
|
|
5879
6017
|
params.delete("skip");
|
|
5880
|
-
const queryString = Array.from(params.entries()).map(
|
|
5881
|
-
([key, value]) => key === "$filter" || key === "filter" ? `${key}=${encodeURIComponent(value)}` : `${key}=${value}`
|
|
5882
|
-
).join("&");
|
|
6018
|
+
const queryString = Array.from(params.entries()).map(([key, value]) => `${key}=${encodeURIComponent(value)}`).join("&");
|
|
5883
6019
|
return queryString ? `${path}?${queryString}` : path;
|
|
5884
6020
|
},
|
|
5885
6021
|
[path, query, searchParams]
|
|
@@ -5888,7 +6024,7 @@ var init_DataBindingControls = __esm({
|
|
|
5888
6024
|
(url) => {
|
|
5889
6025
|
if (typeof window !== "undefined") {
|
|
5890
6026
|
const targetUrl = new URL(url, window.location.origin);
|
|
5891
|
-
if (targetUrl.pathname === window.location.pathname && targetUrl.search === window.location.search) {
|
|
6027
|
+
if (targetUrl.pathname === window.location.pathname && decodeURIComponent(targetUrl.search) === decodeURIComponent(window.location.search)) {
|
|
5892
6028
|
return;
|
|
5893
6029
|
}
|
|
5894
6030
|
}
|
|
@@ -5896,6 +6032,18 @@ var init_DataBindingControls = __esm({
|
|
|
5896
6032
|
},
|
|
5897
6033
|
[router]
|
|
5898
6034
|
);
|
|
6035
|
+
const handleSelectSort = (0, import_react59.useCallback)(
|
|
6036
|
+
(sortValue) => {
|
|
6037
|
+
setIsSortOpen(false);
|
|
6038
|
+
navigateWithoutReload(
|
|
6039
|
+
getQueryUrl({
|
|
6040
|
+
$orderby: sortValue || void 0,
|
|
6041
|
+
orderBy: void 0
|
|
6042
|
+
})
|
|
6043
|
+
);
|
|
6044
|
+
},
|
|
6045
|
+
[getQueryUrl, navigateWithoutReload]
|
|
6046
|
+
);
|
|
5899
6047
|
const getFacetUrl = (field, value) => {
|
|
5900
6048
|
const updatedSelections = new Map(selectedFacetValues);
|
|
5901
6049
|
if (value) {
|
|
@@ -5947,15 +6095,15 @@ var init_DataBindingControls = __esm({
|
|
|
5947
6095
|
);
|
|
5948
6096
|
return { isSuccessful: true };
|
|
5949
6097
|
}, [getQueryUrl, navigateWithoutReload]);
|
|
5950
|
-
const hasFacetControls = showFacets && activeFacets.length > 0;
|
|
5951
|
-
const hasSortControls = showSortOptions && normalizedSortOptions.length > 0;
|
|
6098
|
+
const hasFacetControls = Boolean(showFacets && (activeFacets.length > 0 || selectedFacetValues.size > 0));
|
|
6099
|
+
const hasSortControls = Boolean(showSortOptions && normalizedSortOptions.length > 0);
|
|
5952
6100
|
const hasActiveFiltersOrSort = Boolean(
|
|
5953
6101
|
currentFilter.trim() || currentSort.trim()
|
|
5954
6102
|
);
|
|
5955
6103
|
const selectedFacetCount = selectedFacetValues.size;
|
|
5956
6104
|
const shouldShowToolbarClearAll = hasActiveFiltersOrSort && !hasFacetControls;
|
|
5957
|
-
const shouldShowToolbar = mode === "toolbar" && (showSearchBar || hasSortControls || shouldShowToolbarClearAll);
|
|
5958
|
-
const shouldShowFacets = mode === "facets" && hasFacetControls;
|
|
6105
|
+
const shouldShowToolbar = mode === "toolbar" && (showSearchBar || hasSortControls || showFacets || shouldShowToolbarClearAll);
|
|
6106
|
+
const shouldShowFacets = mode === "facets" && (hasFacetControls || showFacets && activeFacets.length > 0);
|
|
5959
6107
|
if (!shouldShowToolbar && !shouldShowFacets) {
|
|
5960
6108
|
return null;
|
|
5961
6109
|
}
|
|
@@ -5967,13 +6115,13 @@ var init_DataBindingControls = __esm({
|
|
|
5967
6115
|
type: "button",
|
|
5968
6116
|
onClick: () => navigateWithoutReload(getFacetUrl(field, facet.value)),
|
|
5969
6117
|
"aria-pressed": isSelected,
|
|
5970
|
-
className: `group flex w-full cursor-pointer items-center justify-between gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base ${isSelected ? "bg-neutral-soft font-medium border " : "hover:bg-neutral-weak border border-transparent"}`,
|
|
6118
|
+
className: `group flex w-full cursor-pointer items-center justify-between gap-2.5 rounded-md px-2 py-1.5 text-left text-sm transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base ${isSelected ? "bg-neutral-soft font-medium border border-neutral-soft" : "hover:bg-neutral-weak border border-transparent"}`,
|
|
5971
6119
|
children: [
|
|
5972
6120
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
5973
6121
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
5974
6122
|
"span",
|
|
5975
6123
|
{
|
|
5976
|
-
className: `flex h-4 w-4 shrink-0 items-center justify-center rounded-[3px] border transition-colors duration-150 ${isSelected ? "bg-primary-base border-primary-base" : " group-hover:border-neutral-strong bg-default"}`,
|
|
6124
|
+
className: `flex h-4 w-4 shrink-0 items-center justify-center rounded-[3px] border transition-colors duration-150 ${isSelected ? "bg-primary-base border-primary-base" : " group-hover:border-neutral-strong bg-default border-neutral-soft"}`,
|
|
5977
6125
|
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CheckIcon, { className: "h-3 w-3" })
|
|
5978
6126
|
}
|
|
5979
6127
|
),
|
|
@@ -5994,93 +6142,338 @@ var init_DataBindingControls = __esm({
|
|
|
5994
6142
|
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
5995
6143
|
"div",
|
|
5996
6144
|
{
|
|
5997
|
-
className: mode === "toolbar" ? "my-6" : "flex flex-col rounded-md border
|
|
6145
|
+
className: mode === "toolbar" ? "my-4 sm:my-6" : "flex flex-col rounded-md border border-neutral-soft bg-default p-4 shadow-sm",
|
|
5998
6146
|
children: [
|
|
5999
|
-
shouldShowToolbar && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col gap-3
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6147
|
+
shouldShowToolbar && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
6148
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "hidden lg:flex lg:items-center lg:justify-between lg:gap-4", children: [
|
|
6149
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6150
|
+
"form",
|
|
6151
|
+
{
|
|
6152
|
+
role: "search",
|
|
6153
|
+
className: "flex w-full items-center gap-2 md:min-w-0 md:flex-1",
|
|
6154
|
+
onSubmit: (event) => {
|
|
6155
|
+
event.preventDefault();
|
|
6156
|
+
void handleSearch();
|
|
6157
|
+
},
|
|
6158
|
+
children: [
|
|
6159
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "relative min-w-0 flex-1", children: [
|
|
6160
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3.5 top-1/2 z-10 h-4 w-4 -translate-y-1/2 opacity-60" }),
|
|
6161
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6162
|
+
"input",
|
|
6163
|
+
{
|
|
6164
|
+
type: "text",
|
|
6165
|
+
name: "searchText",
|
|
6166
|
+
value: searchText,
|
|
6167
|
+
onChange: (e) => setSearchText(e.target.value),
|
|
6168
|
+
placeholder: "Search discussions, topics, or keywords...",
|
|
6169
|
+
className: "h-10 w-full rounded-md border border-neutral-soft bg-default py-2 pl-10 pr-4 text-sm shadow-sm transition-colors focus:border-primary-base focus:outline-none focus:ring-1 focus:ring-primary-base"
|
|
6170
|
+
}
|
|
6171
|
+
)
|
|
6172
|
+
] }),
|
|
6173
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6174
|
+
Button_default,
|
|
6175
|
+
{
|
|
6176
|
+
ButtonType: "Primary" /* Solid */,
|
|
6177
|
+
onClick: handleSearch,
|
|
6178
|
+
className: "!h-10 !rounded-md !px-5 !py-0 flex items-center justify-center gap-1.5 shrink-0",
|
|
6179
|
+
children: [
|
|
6180
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SearchIcon, { className: "h-4 w-4" }),
|
|
6181
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: "Search" })
|
|
6182
|
+
]
|
|
6183
|
+
}
|
|
6184
|
+
)
|
|
6185
|
+
]
|
|
6186
|
+
}
|
|
6187
|
+
),
|
|
6188
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "relative shrink-0", ref: desktopSortDropdownRef, children: [
|
|
6189
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6190
|
+
"button",
|
|
6191
|
+
{
|
|
6192
|
+
type: "button",
|
|
6193
|
+
onClick: () => setIsSortOpen((prev) => !prev),
|
|
6194
|
+
"aria-expanded": isSortOpen,
|
|
6195
|
+
className: "inline-flex h-10 items-center justify-between gap-2.5 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-normal shadow-sm transition-all hover:bg-neutral-weak focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-base cursor-pointer whitespace-nowrap",
|
|
6196
|
+
children: [
|
|
6197
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "whitespace-nowrap", children: [
|
|
6198
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "opacity-70", children: "Sort by: " }),
|
|
6199
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "font-semibold", children: selectedSortLabel })
|
|
6200
|
+
] }),
|
|
6201
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6202
|
+
ChevronDownIcon,
|
|
6203
|
+
{
|
|
6204
|
+
className: `h-4 w-4 shrink-0 transition-transform duration-200 ${isSortOpen ? "rotate-180" : ""}`
|
|
6205
|
+
}
|
|
6206
|
+
)
|
|
6207
|
+
]
|
|
6208
|
+
}
|
|
6209
|
+
),
|
|
6210
|
+
isSortOpen && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "absolute right-0 z-50 mt-1.5 w-max min-w-full max-h-80 overflow-y-auto rounded-md border border-neutral-soft bg-default p-1 shadow-lg", children: normalizedSortOptions.map((option) => {
|
|
6211
|
+
const isSelected = selectedSortOption?.value === option.value;
|
|
6212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6213
|
+
"button",
|
|
6214
|
+
{
|
|
6215
|
+
type: "button",
|
|
6216
|
+
onClick: () => handleSelectSort(option.value),
|
|
6217
|
+
className: `flex w-full items-center justify-between gap-4 rounded-md px-3 py-1.5 text-left text-sm transition-colors cursor-pointer whitespace-nowrap ${isSelected ? "bg-primary-base font-semibold" : "hover:bg-neutral-soft font-normal"}`,
|
|
6218
|
+
children: [
|
|
6219
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
|
|
6220
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CheckIcon, { className: "h-4 w-4 shrink-0" })
|
|
6221
|
+
]
|
|
6222
|
+
},
|
|
6223
|
+
option.value
|
|
6224
|
+
);
|
|
6225
|
+
}) })
|
|
6226
|
+
] })
|
|
6227
|
+
] }),
|
|
6228
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col gap-2.5 lg:hidden", children: [
|
|
6229
|
+
showSearchBar && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6230
|
+
"form",
|
|
6231
|
+
{
|
|
6232
|
+
role: "search",
|
|
6233
|
+
className: "relative w-full",
|
|
6234
|
+
onSubmit: (event) => {
|
|
6235
|
+
event.preventDefault();
|
|
6236
|
+
void handleSearch();
|
|
6237
|
+
},
|
|
6238
|
+
children: [
|
|
6239
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3.5 top-1/2 z-10 h-4 w-4 -translate-y-1/2 opacity-50" }),
|
|
6020
6240
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6021
|
-
|
|
6241
|
+
"input",
|
|
6022
6242
|
{
|
|
6023
|
-
|
|
6024
|
-
|
|
6243
|
+
type: "text",
|
|
6244
|
+
name: "searchTextMobile",
|
|
6025
6245
|
value: searchText,
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
},
|
|
6030
|
-
inputClasses: "!mt-0 !rounded-md !py-3 !pl-11 !pr-4 !shadow-sm"
|
|
6246
|
+
onChange: (e) => setSearchText(e.target.value),
|
|
6247
|
+
placeholder: "Search jobs, skills, or keywords...",
|
|
6248
|
+
className: "h-11 w-full rounded-md border border-neutral-soft bg-default py-2.5 pl-10 pr-4 text-sm shadow-sm transition-colors focus:border-primary-base focus:outline-none focus:ring-1 focus:ring-primary-base"
|
|
6031
6249
|
}
|
|
6032
6250
|
)
|
|
6033
|
-
]
|
|
6251
|
+
]
|
|
6252
|
+
}
|
|
6253
|
+
),
|
|
6254
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center justify-between gap-2.5 pt-0.5", children: [
|
|
6255
|
+
showFacets && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6256
|
+
"button",
|
|
6257
|
+
{
|
|
6258
|
+
type: "button",
|
|
6259
|
+
onClick: () => setIsMobileFiltersOpen(true),
|
|
6260
|
+
className: "inline-flex h-10 items-center justify-center gap-2 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-medium shadow-sm transition-all hover:bg-neutral-weak cursor-pointer active:scale-95",
|
|
6261
|
+
children: [
|
|
6262
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(FilterSlidersIcon, { className: "h-4 w-4" }),
|
|
6263
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { children: [
|
|
6264
|
+
"Filters",
|
|
6265
|
+
selectedFacetCount > 0 ? ` (${selectedFacetCount})` : ""
|
|
6266
|
+
] }),
|
|
6267
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "relative flex h-2 w-2", children: [
|
|
6268
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-primary-base opacity-75" }),
|
|
6269
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-primary-base" })
|
|
6270
|
+
] })
|
|
6271
|
+
]
|
|
6272
|
+
}
|
|
6273
|
+
),
|
|
6274
|
+
hasSortControls && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "relative shrink-0 ml-auto", ref: mobileSortDropdownRef, children: [
|
|
6034
6275
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6035
|
-
|
|
6276
|
+
"button",
|
|
6036
6277
|
{
|
|
6037
|
-
|
|
6038
|
-
onClick:
|
|
6039
|
-
|
|
6278
|
+
type: "button",
|
|
6279
|
+
onClick: () => setIsSortOpen((prev) => !prev),
|
|
6280
|
+
"aria-expanded": isSortOpen,
|
|
6281
|
+
className: "inline-flex h-10 items-center justify-between gap-2 rounded-md border border-neutral-soft bg-default px-3.5 text-sm font-medium shadow-sm transition-all hover:bg-neutral-weak cursor-pointer whitespace-nowrap",
|
|
6040
6282
|
children: [
|
|
6041
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6042
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6283
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "whitespace-nowrap font-medium", children: selectedSortLabel }),
|
|
6284
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6285
|
+
ChevronDownIcon,
|
|
6286
|
+
{
|
|
6287
|
+
className: `h-4 w-4 shrink-0 transition-transform duration-200 ${isSortOpen ? "rotate-180" : ""}`
|
|
6288
|
+
}
|
|
6289
|
+
)
|
|
6043
6290
|
]
|
|
6044
6291
|
}
|
|
6045
|
-
)
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6292
|
+
),
|
|
6293
|
+
isSortOpen && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "absolute right-0 z-50 mt-1.5 w-max min-w-[160px] max-h-80 overflow-y-auto rounded-md border border-neutral-soft bg-default p-1 shadow-xl", children: normalizedSortOptions.map((option) => {
|
|
6294
|
+
const isSelected = selectedSortOption?.value === option.value;
|
|
6295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6296
|
+
"button",
|
|
6297
|
+
{
|
|
6298
|
+
type: "button",
|
|
6299
|
+
onClick: () => handleSelectSort(option.value),
|
|
6300
|
+
className: `flex w-full items-center justify-between gap-3 rounded-md px-3 py-2 text-left text-sm transition-colors cursor-pointer whitespace-nowrap ${isSelected ? "bg-primary-base font-semibold" : "hover:bg-neutral-soft font-normal"}`,
|
|
6301
|
+
children: [
|
|
6302
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
|
|
6303
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CheckIcon, { className: "h-4 w-4 shrink-0" })
|
|
6304
|
+
]
|
|
6305
|
+
},
|
|
6306
|
+
option.value
|
|
6307
|
+
);
|
|
6308
|
+
}) })
|
|
6309
|
+
] })
|
|
6310
|
+
] }),
|
|
6311
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-wrap items-center gap-1.5 pt-1", children: [
|
|
6312
|
+
Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6313
|
+
"button",
|
|
6314
|
+
{
|
|
6315
|
+
type: "button",
|
|
6316
|
+
onClick: () => clearFacetField(field),
|
|
6317
|
+
className: "group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-md border border-neutral-soft bg-neutral-weak px-2.5 py-1 text-xs transition-colors hover:bg-neutral-soft",
|
|
6318
|
+
title: `Remove filter: ${value}`,
|
|
6319
|
+
children: [
|
|
6320
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "font-medium truncate max-w-[140px]", children: value }),
|
|
6321
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CloseIcon, { className: "h-3 w-3 shrink-0 opacity-60 group-hover:opacity-100" })
|
|
6322
|
+
]
|
|
6323
|
+
},
|
|
6324
|
+
`mobile-chip-${field}`
|
|
6325
|
+
)),
|
|
6326
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6327
|
+
"button",
|
|
6328
|
+
{
|
|
6329
|
+
type: "button",
|
|
6330
|
+
onClick: () => void handleClearAll(),
|
|
6331
|
+
className: "inline-flex cursor-pointer items-center rounded-md px-2 py-1 text-xs font-semibold underline underline-offset-2 hover:bg-neutral-weak transition-colors ml-auto",
|
|
6332
|
+
children: "Clear all"
|
|
6333
|
+
}
|
|
6334
|
+
)
|
|
6335
|
+
] })
|
|
6336
|
+
] }),
|
|
6337
|
+
isMobileFiltersOpen && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "fixed inset-0 z-50 flex flex-col justify-end lg:hidden", children: [
|
|
6050
6338
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6051
|
-
"
|
|
6339
|
+
"div",
|
|
6052
6340
|
{
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6341
|
+
className: "fixed inset-0 bg-neutral-stronger/60 backdrop-blur-xs transition-opacity duration-300",
|
|
6342
|
+
onClick: () => setIsMobileFiltersOpen(false),
|
|
6343
|
+
"aria-hidden": "true"
|
|
6056
6344
|
}
|
|
6057
6345
|
),
|
|
6058
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.
|
|
6059
|
-
|
|
6060
|
-
{
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6346
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "relative z-10 flex h-[85vh] max-h-[85vh] w-full flex-col rounded-t-xl border-t border-neutral-soft bg-default shadow-2xl transition-transform duration-300 animate-in slide-in-from-bottom", children: [
|
|
6347
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "pt-2.5 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "mx-auto h-1.5 w-12 rounded-full bg-neutral-soft" }) }),
|
|
6348
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center justify-between px-5 py-3 border-b border-neutral-soft", children: [
|
|
6349
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h2", { className: "text-lg font-bold tracking-tight", children: "Filters" }),
|
|
6350
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6351
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6352
|
+
"button",
|
|
6353
|
+
{
|
|
6354
|
+
type: "button",
|
|
6355
|
+
onClick: () => void handleClearAll(),
|
|
6356
|
+
className: "text-xs font-semibold cursor-pointer underline underline-offset-2 hover:opacity-80",
|
|
6357
|
+
children: "Clear all"
|
|
6358
|
+
}
|
|
6359
|
+
),
|
|
6360
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6361
|
+
"button",
|
|
6362
|
+
{
|
|
6363
|
+
type: "button",
|
|
6364
|
+
onClick: () => setIsMobileFiltersOpen(false),
|
|
6365
|
+
className: "p-1 rounded-full hover:bg-neutral-weak transition-colors cursor-pointer",
|
|
6366
|
+
"aria-label": "Close filters",
|
|
6367
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CloseIcon, { className: "h-5 w-5 opacity-70" })
|
|
6368
|
+
}
|
|
6369
|
+
)
|
|
6370
|
+
] })
|
|
6371
|
+
] }),
|
|
6372
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex-1 overflow-y-auto px-5 py-3 space-y-3 divide-y divide-neutral-soft", children: activeFacets.map(([field, values]) => {
|
|
6373
|
+
const isOpen = !collapsedCategories[field];
|
|
6374
|
+
const selectedValue = selectedFacetValues.get(field);
|
|
6375
|
+
const categorySearch = facetCategorySearch[field]?.toLowerCase() || "";
|
|
6376
|
+
const filteredValues = categorySearch ? values.filter((v) => v.value.toLowerCase().includes(categorySearch)) : values;
|
|
6377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "pt-3 first:pt-0", children: [
|
|
6378
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6379
|
+
"button",
|
|
6380
|
+
{
|
|
6381
|
+
type: "button",
|
|
6382
|
+
onClick: () => toggleCategory(field),
|
|
6383
|
+
className: "flex w-full cursor-pointer items-center justify-between rounded-md py-2 text-left transition-colors",
|
|
6384
|
+
children: [
|
|
6385
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
6386
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-neutral-soft bg-neutral-weak", children: getCategoryIcon(field) }),
|
|
6387
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "font-semibold text-sm", children: humanize(field) })
|
|
6388
|
+
] }),
|
|
6389
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6390
|
+
selectedValue && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary-base text-xs font-bold leading-none", children: "1" }),
|
|
6391
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6392
|
+
ChevronDownIcon,
|
|
6393
|
+
{
|
|
6394
|
+
className: `h-4 w-4 transition-transform duration-200 ${isOpen ? "rotate-180" : ""}`
|
|
6395
|
+
}
|
|
6396
|
+
)
|
|
6397
|
+
] })
|
|
6398
|
+
]
|
|
6399
|
+
}
|
|
6400
|
+
),
|
|
6401
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "pt-2 pb-1 pl-1 pr-1 space-y-1.5", children: [
|
|
6402
|
+
values.length > 5 && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "relative mb-2", children: [
|
|
6403
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SearchIcon, { className: "pointer-events-none absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 opacity-50" }),
|
|
6404
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6405
|
+
"input",
|
|
6406
|
+
{
|
|
6407
|
+
type: "text",
|
|
6408
|
+
value: facetCategorySearch[field] || "",
|
|
6409
|
+
onChange: (e) => setFacetCategorySearch((prev) => ({
|
|
6410
|
+
...prev,
|
|
6411
|
+
[field]: e.target.value
|
|
6412
|
+
})),
|
|
6413
|
+
placeholder: `Search ${humanize(field).toLowerCase()}...`,
|
|
6414
|
+
className: "h-8.5 w-full rounded-md border border-neutral-soft bg-neutral-weak py-1 pl-8 pr-3 text-xs focus:border-primary-base focus:outline-none"
|
|
6415
|
+
}
|
|
6416
|
+
)
|
|
6417
|
+
] }),
|
|
6418
|
+
filteredValues.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "py-2 text-center text-xs opacity-60", children: "No matching options" }) : filteredValues.map((facet) => {
|
|
6419
|
+
const isChecked = selectedValue === facet.value;
|
|
6420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6421
|
+
"button",
|
|
6422
|
+
{
|
|
6423
|
+
type: "button",
|
|
6424
|
+
onClick: () => navigateWithoutReload(
|
|
6425
|
+
getFacetUrl(field, facet.value)
|
|
6426
|
+
),
|
|
6427
|
+
"aria-pressed": isChecked,
|
|
6428
|
+
className: `flex w-full cursor-pointer items-center justify-between gap-3 rounded-md px-2.5 py-2 text-left text-sm transition-colors ${isChecked ? "bg-neutral-soft font-medium" : "hover:bg-neutral-weak"}`,
|
|
6429
|
+
children: [
|
|
6430
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
6431
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6432
|
+
"span",
|
|
6433
|
+
{
|
|
6434
|
+
className: `flex h-5 w-5 shrink-0 items-center justify-center rounded-md border transition-colors ${isChecked ? "bg-primary-base border-primary-base" : "border-neutral-soft bg-default"}`,
|
|
6435
|
+
children: isChecked && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(CheckIcon, { className: "h-3.5 w-3.5" })
|
|
6436
|
+
}
|
|
6437
|
+
),
|
|
6438
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "leading-snug break-words", children: facet.value })
|
|
6439
|
+
] }),
|
|
6440
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "shrink-0 text-xs opacity-60 ml-2", children: facet.count })
|
|
6441
|
+
]
|
|
6442
|
+
},
|
|
6443
|
+
`drawer-${field}-${facet.value}`
|
|
6444
|
+
);
|
|
6073
6445
|
})
|
|
6074
|
-
)
|
|
6075
|
-
},
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6446
|
+
] })
|
|
6447
|
+
] }, `drawer-cat-${field}`);
|
|
6448
|
+
}) }),
|
|
6449
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-3 border-t border-neutral-soft bg-default p-4", children: [
|
|
6450
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6451
|
+
"button",
|
|
6452
|
+
{
|
|
6453
|
+
type: "button",
|
|
6454
|
+
onClick: () => setIsMobileFiltersOpen(false),
|
|
6455
|
+
className: "flex-1 h-11 rounded-md border border-neutral-soft bg-default text-sm font-medium transition-colors hover:bg-neutral-weak cursor-pointer flex items-center justify-center",
|
|
6456
|
+
children: "Close"
|
|
6457
|
+
}
|
|
6458
|
+
),
|
|
6459
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6460
|
+
"button",
|
|
6461
|
+
{
|
|
6462
|
+
type: "button",
|
|
6463
|
+
onClick: () => setIsMobileFiltersOpen(false),
|
|
6464
|
+
className: "flex-1 h-11 rounded-md bg-primary-base text-sm font-semibold shadow-md transition-all hover:opacity-90 active:scale-98 cursor-pointer flex items-center justify-center",
|
|
6465
|
+
children: [
|
|
6466
|
+
"Apply Filters",
|
|
6467
|
+
selectedFacetCount > 0 ? ` (${selectedFacetCount})` : ""
|
|
6468
|
+
]
|
|
6469
|
+
}
|
|
6470
|
+
)
|
|
6471
|
+
] })
|
|
6472
|
+
] })
|
|
6080
6473
|
] })
|
|
6081
6474
|
] }),
|
|
6082
6475
|
shouldShowFacets && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
6083
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center justify-between border-b
|
|
6476
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center justify-between border-b border-neutral-soft pb-3", children: [
|
|
6084
6477
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6085
6478
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(FilterSlidersIcon, { className: "h-4 w-4" }),
|
|
6086
6479
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h2", { className: "text-base font-semibold tracking-tight", children: "Filters" }),
|
|
@@ -6100,12 +6493,12 @@ var init_DataBindingControls = __esm({
|
|
|
6100
6493
|
}
|
|
6101
6494
|
)
|
|
6102
6495
|
] }),
|
|
6103
|
-
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex flex-wrap gap-1.5 pb-2.5 border-b ", children: Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6496
|
+
selectedFacetCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "flex flex-wrap gap-1.5 pb-2.5 border-b border-neutral-soft", children: Array.from(selectedFacetValues.entries()).map(([field, value]) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6104
6497
|
"button",
|
|
6105
6498
|
{
|
|
6106
6499
|
type: "button",
|
|
6107
6500
|
onClick: () => clearFacetField(field),
|
|
6108
|
-
className: "group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-md border bg-neutral-weak px-2.5 py-1 text-xs transition-colors hover:bg-neutral-soft",
|
|
6501
|
+
className: "group inline-flex max-w-full cursor-pointer items-center gap-1.5 rounded-md border border-neutral-soft bg-neutral-weak px-2.5 py-1 text-xs transition-colors hover:bg-neutral-soft",
|
|
6109
6502
|
title: `Remove filter: ${value}`,
|
|
6110
6503
|
children: [
|
|
6111
6504
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "font-medium truncate max-w-[150px]", children: value }),
|
|
@@ -6132,7 +6525,10 @@ var init_DataBindingControls = __esm({
|
|
|
6132
6525
|
onClick: () => toggleCategory(field),
|
|
6133
6526
|
className: "flex w-full cursor-pointer items-center justify-between rounded-md px-1.5 py-1.5 text-sm font-semibold transition-colors duration-150 hover:bg-neutral-weak focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-base",
|
|
6134
6527
|
children: [
|
|
6135
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.
|
|
6528
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
6529
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded border border-neutral-soft bg-neutral-weak", children: getCategoryIcon(field) }),
|
|
6530
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { children: humanize(field) })
|
|
6531
|
+
] }),
|
|
6136
6532
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6137
6533
|
ChevronDownIcon,
|
|
6138
6534
|
{
|
|
@@ -7002,8 +7398,14 @@ var ViewControl = (props) => {
|
|
|
7002
7398
|
};
|
|
7003
7399
|
var ViewControl_default = ViewControl;
|
|
7004
7400
|
|
|
7401
|
+
// src/components/controls/edit/InputControl.tsx
|
|
7402
|
+
var import_dynamic7 = __toESM(require("next/dynamic"));
|
|
7403
|
+
var InputControl2 = (0, import_dynamic7.default)(() => Promise.resolve().then(() => (init_InputControlClient(), InputControlClient_exports)), {
|
|
7404
|
+
ssr: false
|
|
7405
|
+
});
|
|
7406
|
+
var InputControl_default = InputControl2;
|
|
7407
|
+
|
|
7005
7408
|
// src/index.ts
|
|
7006
|
-
init_InputControl();
|
|
7007
7409
|
init_InputControlType();
|
|
7008
7410
|
|
|
7009
7411
|
// src/components/pageRenderingEngine/PageBodyRenderer.tsx
|
|
@@ -9520,7 +9922,7 @@ var DivContainer = async (props) => {
|
|
|
9520
9922
|
renderedContainer,
|
|
9521
9923
|
paginationControl
|
|
9522
9924
|
] }),
|
|
9523
|
-
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("aside", { children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9925
|
+
dataBindingProperties?.showFacets && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("aside", { className: "hidden lg:block", children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9524
9926
|
DataBindingControls2,
|
|
9525
9927
|
{
|
|
9526
9928
|
mode: "facets",
|
|
@@ -9794,7 +10196,6 @@ var NavigationTabsV2_default = NavigationTabsV2;
|
|
|
9794
10196
|
|
|
9795
10197
|
// src/components/dataForm/DataList.tsx
|
|
9796
10198
|
var import_react67 = __toESM(require("react"));
|
|
9797
|
-
init_InputControl();
|
|
9798
10199
|
var import_navigation3 = require("next/navigation");
|
|
9799
10200
|
|
|
9800
10201
|
// src/components/dataForm/NoContentView.tsx
|
|
@@ -10600,14 +11001,12 @@ init_InputControlType();
|
|
|
10600
11001
|
|
|
10601
11002
|
// src/components/dataForm/DataForm.tsx
|
|
10602
11003
|
var import_react70 = __toESM(require("react"));
|
|
10603
|
-
init_InputControl();
|
|
10604
11004
|
init_Icon();
|
|
10605
11005
|
init_Button();
|
|
10606
11006
|
init_StyleTypes();
|
|
10607
11007
|
|
|
10608
11008
|
// src/components/dataForm/DataFormChildSection.tsx
|
|
10609
11009
|
var import_react69 = __toESM(require("react"));
|
|
10610
|
-
init_InputControl();
|
|
10611
11010
|
|
|
10612
11011
|
// src/components/dataForm/StyleTypes.tsx
|
|
10613
11012
|
var StyleTypes2 = /* @__PURE__ */ ((StyleTypes3) => {
|