@abcagency/hc-ui-components 1.3.26 → 1.3.27
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/components/HireControlMap.js +1 -1
- package/dist/components/containers/filter/commute-container.js +1 -1
- package/dist/components/containers/maps/map-marker-container.js +1 -1
- package/dist/components/modules/accordions/default.js +2 -2
- package/dist/components/modules/buttons/button-group-apply.js +1 -1
- package/dist/components/modules/buttons/default.js +2 -2
- package/dist/components/modules/cards/default.js +2 -2
- package/dist/components/modules/dialogs/apply-dialog.js +1 -1
- package/dist/components/modules/filter/commute.js +2 -2
- package/dist/components/modules/filter/search.js +1 -0
- package/dist/components/modules/filter/search.js.map +1 -1
- package/dist/components/modules/filter/sort.js +2 -2
- package/dist/components/modules/grid.js +1 -1
- package/dist/components/modules/icon.js +1 -1
- package/dist/components/modules/list/header.js +1 -1
- package/dist/components/modules/list/item-expand-card/index.js +1 -1
- package/dist/components/modules/list/item-expand-card/recruiter-details.js +1 -1
- package/dist/components/modules/maps/map-marker.js +1 -1
- package/dist/components/modules/maps/map.js +1 -1
- package/dist/components/modules/maps/place-marker.js +1 -1
- package/dist/components/modules/maps/tabs.js +1 -1
- package/dist/util/filterUtil.js +1 -1
- package/dist/util/urlFilterUtil.js +20 -7
- package/dist/util/urlFilterUtil.js.map +1 -1
- package/package.json +1 -1
- package/src/components/modules/filter/search.js +1 -0
- package/src/util/urlFilterUtil.js +10 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default, { useState, useEffect } from 'react';
|
|
3
|
-
import { useLoadScript } from '../node_modules/@react-google-maps/api/dist/esm.js';
|
|
3
|
+
import { useLoadScript } from '../packages/hc-ui-components/node_modules/@react-google-maps/api/dist/esm.js';
|
|
4
4
|
import Grid from './modules/grid.js';
|
|
5
5
|
import FilterContainer from './containers/filter/filter-container.js';
|
|
6
6
|
import MapListContainer from './containers/maps/map-list-container.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
|
-
import usePlacesAutocomplete, { getLatLng, getGeocode } from '../../../node_modules/use-places-autocomplete/dist/index.esm.js';
|
|
3
|
+
import usePlacesAutocomplete, { getLatLng, getGeocode } from '../../../packages/hc-ui-components/node_modules/use-places-autocomplete/dist/index.esm.js';
|
|
4
4
|
import { useMapList } from '../../../contexts/mapListContext.js';
|
|
5
5
|
import { useTrackEvent } from '../../../contexts/trackEventContext.js';
|
|
6
6
|
import { getStorageItem } from '../../../util/localStorageUtil.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useRef, useEffect } from 'react';
|
|
2
2
|
import MapMarker from '../../modules/maps/map-marker.js';
|
|
3
|
-
import { InfoWindow } from '../../../node_modules/@react-google-maps/api/dist/esm.js';
|
|
3
|
+
import { InfoWindow } from '../../../packages/hc-ui-components/node_modules/@react-google-maps/api/dist/esm.js';
|
|
4
4
|
import CardInfoWindow from '../../modules/maps/info-window-card.js';
|
|
5
5
|
import InfoWindowContentContainer from './info-window-content-container.js';
|
|
6
6
|
import { useMap } from '../../../contexts/mapContext.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default, { forwardRef } from 'react';
|
|
3
|
-
import { Root as Root2, Item, Header, Trigger as Trigger2, Content as Content2 } from '../../../node_modules/@radix-ui/react-accordion/dist/index.js';
|
|
4
|
-
import { twMerge } from '../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
3
|
+
import { Root as Root2, Item, Header, Trigger as Trigger2, Content as Content2 } from '../../../packages/hc-ui-components/node_modules/@radix-ui/react-accordion/dist/index.js';
|
|
4
|
+
import { twMerge } from '../../../packages/hc-ui-components/node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
5
5
|
import IconContained from '../icon.js';
|
|
6
6
|
|
|
7
7
|
var _excluded = ["id", "children", "className"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { twMerge } from '../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
3
|
+
import { twMerge } from '../../../packages/hc-ui-components/node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
4
4
|
import Button from './default.js';
|
|
5
5
|
import ApplyDialog from '../dialogs/apply-dialog.js';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default, { forwardRef } from 'react';
|
|
3
|
-
import { Link } from '../../../node_modules/react-router-dom/dist/index.js';
|
|
4
|
-
import { twMerge } from '../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
3
|
+
import { Link } from '../../../packages/hc-ui-components/node_modules/react-router-dom/dist/index.js';
|
|
4
|
+
import { twMerge } from '../../../packages/hc-ui-components/node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
5
5
|
import IconContained from '../icon.js';
|
|
6
6
|
|
|
7
7
|
var _excluded = ["children", "href", "className", "size", "variant", "isBlock", "hasUnderline", "target"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default, { forwardRef } from 'react';
|
|
3
|
-
import { Link } from '../../../node_modules/react-router-dom/dist/index.js';
|
|
4
|
-
import { twMerge } from '../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
3
|
+
import { Link } from '../../../packages/hc-ui-components/node_modules/react-router-dom/dist/index.js';
|
|
4
|
+
import { twMerge } from '../../../packages/hc-ui-components/node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
5
5
|
|
|
6
6
|
var _excluded = ["as", "className", "hasShadow", "image", "body", "children", "footer"],
|
|
7
7
|
_excluded2 = ["as", "href", "className", "hasShadow", "image", "body", "children", "footer"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { Root, Trigger, Portal, Overlay, Content, Title, Description, Close } from '../../../node_modules/@radix-ui/react-dialog/dist/index.js';
|
|
2
|
+
import { Root, Trigger, Portal, Overlay, Content, Title, Description, Close } from '../../../packages/hc-ui-components/node_modules/@radix-ui/react-dialog/dist/index.js';
|
|
3
3
|
import Button from '../buttons/default.js';
|
|
4
4
|
import IconContained from '../icon.js';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React__default, { Fragment } from 'react';
|
|
2
2
|
import Button from '../buttons/default.js';
|
|
3
3
|
import IconContained from '../icon.js';
|
|
4
|
-
import { Combobox as qt } from '../../../node_modules/@headlessui/react/dist/components/combobox/combobox.js';
|
|
5
|
-
import { Transition as qe } from '../../../node_modules/@headlessui/react/dist/components/transitions/transition.js';
|
|
4
|
+
import { Combobox as qt } from '../../../packages/hc-ui-components/node_modules/@headlessui/react/dist/components/combobox/combobox.js';
|
|
5
|
+
import { Transition as qe } from '../../../packages/hc-ui-components/node_modules/@headlessui/react/dist/components/transitions/transition.js';
|
|
6
6
|
|
|
7
7
|
var FilterCommute = function FilterCommute(_ref) {
|
|
8
8
|
var className = _ref.className,
|
|
@@ -43,6 +43,7 @@ var Search = function Search(_ref) {
|
|
|
43
43
|
className: "hc-w-full hc-px-0 hc-py-2 hc-text-sm hc-border-0 hc-transition-colors placeholder:hc-text-uiText/50 focus:hc-ring-0 focus:hc-outline-none",
|
|
44
44
|
onChange: handleInputChange
|
|
45
45
|
}), /*#__PURE__*/React__default.createElement("button", {
|
|
46
|
+
id: "SearchButton",
|
|
46
47
|
ref: buttonRef,
|
|
47
48
|
type: "button",
|
|
48
49
|
className: "hidden hc-invisible",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sources":["../../../../src/components/modules/filter/search.js"],"sourcesContent":["import React, { useRef } from 'react';\nimport Button from '~/components/modules/buttons/default';\nimport Icon from '~/components/modules/icon';\nimport FilterCard from '~/components/modules/cards/filter';\n\nconst Search = ({\n\tinputPlaceholder,\n\tshowSearchIcon,\n\tclassName,\n\tlabelClassName,\n\tinputValue,\n\thandleInputChange,\n\thandleSubmitInput,\n\thandleReset,\n\tlabel\n}) => {\n\tconst inputRef = useRef(null);\n\tconst buttonRef = useRef(null);\n\n\treturn (\n\t\t<FilterCard as=\"form\" className={className ?? \"\"}>\n\t\t\t<FilterCard.Title\n\t\t\t\tas=\"label\"\n\t\t\t\ticon=\"fluent:search-12-filled\"\n\t\t\t\tclassName={labelClassName ?? \"\"}\n\t\t\t>\n\t\t\t\t<span>{label}</span>\n\t\t\t</FilterCard.Title>\n\n\t\t\t<div className=\"hc-relative hc-flex hc-items-center hc-px-2 hc-rounded hc-bg-white hc-border hc-border-uiAccent/20 focus-within:hc-ring-1 focus-within:hc-ring-uiAccent\">\n\t\t\t\t{showSearchIcon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon=\"fluent:search-12-filled\"\n\t\t\t\t\t\tsize=\"hc-size-4\"\n\t\t\t\t\t\tclassName=\"hc-mr-2 hc-text-uiAccent/50\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tname=\"search\"\n\t\t\t\t\tref={inputRef}\n\t\t\t\t\tonKeyDown={e => {\n\t\t\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tbuttonRef.current.click(); // Trigger the hidden button on Enter key press\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tplaceholder={inputPlaceholder}\n\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\tclassName=\"hc-w-full hc-px-0 hc-py-2 hc-text-sm hc-border-0 hc-transition-colors placeholder:hc-text-uiText/50 focus:hc-ring-0 focus:hc-outline-none\"\n\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t/>\n\n\t\t\t\t<button\n\t\t\t\t\tref={buttonRef}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclassName=\"hidden hc-invisible\"\n\t\t\t\t\tonClick={() => handleSubmitInput(inputRef.current.value)}\n\t\t\t\t>\n Hidden Submit\n\t\t\t\t</button>\n\n\t\t\t\t<Button.Btn\n\t\t\t\t\ttype=\"reset\"\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\tsize=\"sqsm\"\n\t\t\t\t\tclassName={`transition-opacity ${inputValue ? \"hc-opacity-100\" : \"hc-opacity-0 hc-pointer-events-none\"}`}\n\t\t\t\t\tonClick={handleReset}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"hc-sr-only\">Clear</span>\n\t\t\t\t\t<Button.Icon icon=\"uil:times\" className=\"hc-text-uiAccent\" />\n\t\t\t\t</Button.Btn>\n\t\t\t</div>\n\t\t</FilterCard>\n\t);\n};\n\nexport default Search;\n"],"names":["Search","_ref","inputPlaceholder","showSearchIcon","className","labelClassName","inputValue","handleInputChange","handleSubmitInput","handleReset","label","inputRef","useRef","buttonRef","React","createElement","FilterCard","as","Title","icon","Icon","size","type","name","ref","onKeyDown","e","key","preventDefault","current","click","placeholder","value","onChange","onClick","Button","Btn","variant","concat"],"mappings":";;;;;AAKA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAUN;AAAA,EAAA,IATLC,gBAAgB,GAAAD,IAAA,CAAhB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AAA;AAA6B,GACvC,CACD,eACDU,cAAA,CAAAC,aAAA,CAAA,OAAA,EAAA;AACCO,IAAAA,IAAI,EAAC,MAAM;AACXC,IAAAA,IAAI,EAAC,QAAQ;AACbC,IAAAA,GAAG,EAAEb,QAAS;AACdc,IAAAA,SAAS,EAAE,SAAAA,SAAAC,CAAAA,CAAC,EAAI;AACf,MAAA,IAAIA,CAAC,CAACC,GAAG,KAAK,OAAO,EAAE;QACtBD,CAAC,CAACE,cAAc,EAAE,CAAA;AAClBf,QAAAA,SAAS,CAACgB,OAAO,CAACC,KAAK,EAAE,CAAC;AAC3B,OAAA;KACC;AACFC,IAAAA,WAAW,EAAE7B,gBAAiB;AAC9B8B,IAAAA,KAAK,EAAE1B,UAAW;AAClBF,IAAAA,SAAS,EAAC,2IAA2I;AACrJ6B,IAAAA,QAAQ,EAAE1B,iBAAAA;AAAkB,GAC5B,CAAC,eAEFO,cAAA,CAAAC,aAAA,CAAA,QAAA,EAAA;
|
|
1
|
+
{"version":3,"file":"search.js","sources":["../../../../src/components/modules/filter/search.js"],"sourcesContent":["import React, { useRef } from 'react';\nimport Button from '~/components/modules/buttons/default';\nimport Icon from '~/components/modules/icon';\nimport FilterCard from '~/components/modules/cards/filter';\n\nconst Search = ({\n\tinputPlaceholder,\n\tshowSearchIcon,\n\tclassName,\n\tlabelClassName,\n\tinputValue,\n\thandleInputChange,\n\thandleSubmitInput,\n\thandleReset,\n\tlabel\n}) => {\n\tconst inputRef = useRef(null);\n\tconst buttonRef = useRef(null);\n\n\treturn (\n\t\t<FilterCard as=\"form\" className={className ?? \"\"}>\n\t\t\t<FilterCard.Title\n\t\t\t\tas=\"label\"\n\t\t\t\ticon=\"fluent:search-12-filled\"\n\t\t\t\tclassName={labelClassName ?? \"\"}\n\t\t\t>\n\t\t\t\t<span>{label}</span>\n\t\t\t</FilterCard.Title>\n\n\t\t\t<div className=\"hc-relative hc-flex hc-items-center hc-px-2 hc-rounded hc-bg-white hc-border hc-border-uiAccent/20 focus-within:hc-ring-1 focus-within:hc-ring-uiAccent\">\n\t\t\t\t{showSearchIcon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon=\"fluent:search-12-filled\"\n\t\t\t\t\t\tsize=\"hc-size-4\"\n\t\t\t\t\t\tclassName=\"hc-mr-2 hc-text-uiAccent/50\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tname=\"search\"\n\t\t\t\t\tref={inputRef}\n\t\t\t\t\tonKeyDown={e => {\n\t\t\t\t\t\tif (e.key === 'Enter') {\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\tbuttonRef.current.click(); // Trigger the hidden button on Enter key press\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t\tplaceholder={inputPlaceholder}\n\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\tclassName=\"hc-w-full hc-px-0 hc-py-2 hc-text-sm hc-border-0 hc-transition-colors placeholder:hc-text-uiText/50 focus:hc-ring-0 focus:hc-outline-none\"\n\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t/>\n\n\t\t\t\t<button\n\t\t\t\t id=\"SearchButton\"\n\t\t\t\t\tref={buttonRef}\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tclassName=\"hidden hc-invisible\"\n\t\t\t\t\tonClick={() => handleSubmitInput(inputRef.current.value)}\n\t\t\t\t>\n Hidden Submit\n\t\t\t\t</button>\n\n\t\t\t\t<Button.Btn\n\t\t\t\t\ttype=\"reset\"\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t\tsize=\"sqsm\"\n\t\t\t\t\tclassName={`transition-opacity ${inputValue ? \"hc-opacity-100\" : \"hc-opacity-0 hc-pointer-events-none\"}`}\n\t\t\t\t\tonClick={handleReset}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"hc-sr-only\">Clear</span>\n\t\t\t\t\t<Button.Icon icon=\"uil:times\" className=\"hc-text-uiAccent\" />\n\t\t\t\t</Button.Btn>\n\t\t\t</div>\n\t\t</FilterCard>\n\t);\n};\n\nexport default Search;\n"],"names":["Search","_ref","inputPlaceholder","showSearchIcon","className","labelClassName","inputValue","handleInputChange","handleSubmitInput","handleReset","label","inputRef","useRef","buttonRef","React","createElement","FilterCard","as","Title","icon","Icon","size","type","name","ref","onKeyDown","e","key","preventDefault","current","click","placeholder","value","onChange","id","onClick","Button","Btn","variant","concat"],"mappings":";;;;;AAKA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAUN;AAAA,EAAA,IATLC,gBAAgB,GAAAD,IAAA,CAAhBC,gBAAgB;IAChBC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IACdC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IACdC,UAAU,GAAAL,IAAA,CAAVK,UAAU;IACVC,iBAAiB,GAAAN,IAAA,CAAjBM,iBAAiB;IACjBC,iBAAiB,GAAAP,IAAA,CAAjBO,iBAAiB;IACjBC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;IACXC,KAAK,GAAAT,IAAA,CAALS,KAAK,CAAA;AAEL,EAAA,IAAMC,QAAQ,GAAGC,MAAM,CAAC,IAAI,CAAC,CAAA;AAC7B,EAAA,IAAMC,SAAS,GAAGD,MAAM,CAAC,IAAI,CAAC,CAAA;AAE9B,EAAA,oBACCE,cAAA,CAAAC,aAAA,CAACC,UAAU,EAAA;AAACC,IAAAA,EAAE,EAAC,MAAM;AAACb,IAAAA,SAAS,EAAEA,SAAS,KAAA,IAAA,IAATA,SAAS,KAAA,KAAA,CAAA,GAATA,SAAS,GAAI,EAAA;AAAG,GAAA,eAChDU,cAAA,CAAAC,aAAA,CAACC,UAAU,CAACE,KAAK,EAAA;AAChBD,IAAAA,EAAE,EAAC,OAAO;AACVE,IAAAA,IAAI,EAAC,yBAAyB;AAC9Bf,IAAAA,SAAS,EAAEC,cAAc,KAAA,I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ACG,KAAK,CAAC,CAAA;AAAA,KAAA;GACxD,EAAA,eAEO,CAAC,eAETlB,cAAA,CAAAC,aAAA,CAACqB,MAAM,CAACC,GAAG,EAAA;AACVf,IAAAA,IAAI,EAAC,OAAO;AACZgB,IAAAA,OAAO,EAAC,MAAM;AACdjB,IAAAA,IAAI,EAAC,MAAM;IACXjB,SAAS,EAAA,qBAAA,CAAAmC,MAAA,CAAwBjC,UAAU,GAAG,gBAAgB,GAAG,qCAAqC,CAAG;AACzG6B,IAAAA,OAAO,EAAE1B,WAAAA;GAETK,eAAAA,cAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMX,IAAAA,SAAS,EAAC,YAAA;GAAa,EAAA,OAAW,CAAC,eACzCU,cAAA,CAAAC,aAAA,CAACqB,MAAM,CAAChB,IAAI,EAAA;AAACD,IAAAA,IAAI,EAAC,WAAW;AAACf,IAAAA,SAAS,EAAC,kBAAA;GAAoB,CACjD,CACR,CACM,CAAC,CAAA;AAEf;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default, { forwardRef } from 'react';
|
|
3
|
-
import { Item, ItemText, ItemIndicator, Root as Root2, Trigger, Value, Icon, Portal, Content as Content2, ScrollUpButton, Viewport, Group, ScrollDownButton } from '../../../node_modules/@radix-ui/react-select/dist/index.js';
|
|
4
|
-
import { twMerge } from '../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
3
|
+
import { Item, ItemText, ItemIndicator, Root as Root2, Trigger, Value, Icon, Portal, Content as Content2, ScrollUpButton, Viewport, Group, ScrollDownButton } from '../../../packages/hc-ui-components/node_modules/@radix-ui/react-select/dist/index.js';
|
|
4
|
+
import { twMerge } from '../../../packages/hc-ui-components/node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
5
5
|
import IconContained from '../icon.js';
|
|
6
6
|
import Button from '../buttons/default.js';
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default, { forwardRef } from 'react';
|
|
3
|
-
import { twMerge } from '../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
3
|
+
import { twMerge } from '../../packages/hc-ui-components/node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
4
4
|
|
|
5
5
|
var _excluded = ["as", "children", "className", "autoRows", "columns", "gap"];
|
|
6
6
|
var Grid = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { Icon } from '../../node_modules/@iconify/react/dist/iconify.js';
|
|
3
|
+
import { Icon } from '../../packages/hc-ui-components/node_modules/@iconify/react/dist/iconify.js';
|
|
4
4
|
|
|
5
5
|
var _excluded = ["className", "size", "icon", "iconClasses", "title"];
|
|
6
6
|
var IconContained = function IconContained(_ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { twMerge } from '../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
3
|
+
import { twMerge } from '../../../packages/hc-ui-components/node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
4
4
|
import Grid from '../grid.js';
|
|
5
5
|
import HeaderItem from './header-item.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { twMerge } from '../../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
3
|
+
import { twMerge } from '../../../../packages/hc-ui-components/node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
4
4
|
|
|
5
5
|
var _excluded = ["className", "content"];
|
|
6
6
|
var CardItemExpand = function CardItemExpand(_ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { twMerge } from '../../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
3
|
+
import { twMerge } from '../../../../packages/hc-ui-components/node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
4
4
|
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3;
|
|
6
6
|
var RecruiterDetails = function RecruiterDetails(_ref) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { MarkerF } from '../../../node_modules/@react-google-maps/api/dist/esm.js';
|
|
2
|
+
import { MarkerF } from '../../../packages/hc-ui-components/node_modules/@react-google-maps/api/dist/esm.js';
|
|
3
3
|
|
|
4
4
|
var MapMarker = function MapMarker(_ref) {
|
|
5
5
|
var position = _ref.position,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { GoogleMap, MarkerClustererF } from '../../../node_modules/@react-google-maps/api/dist/esm.js';
|
|
2
|
+
import { GoogleMap, MarkerClustererF } from '../../../packages/hc-ui-components/node_modules/@react-google-maps/api/dist/esm.js';
|
|
3
3
|
import ShowAllButton from '../buttons/show-all-button.js';
|
|
4
4
|
import { clusterOptions } from '../../../util/mapUtil.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { Marker, InfoWindowF } from '../../../node_modules/@react-google-maps/api/dist/esm.js';
|
|
2
|
+
import { Marker, InfoWindowF } from '../../../packages/hc-ui-components/node_modules/@react-google-maps/api/dist/esm.js';
|
|
3
3
|
|
|
4
4
|
var PlaceMarker = function PlaceMarker(_ref) {
|
|
5
5
|
var marker = _ref.marker,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { Root as Root2, List, Trigger, Content } from '../../../node_modules/@radix-ui/react-tabs/dist/index.js';
|
|
2
|
+
import { Root as Root2, List, Trigger, Content } from '../../../packages/hc-ui-components/node_modules/@radix-ui/react-tabs/dist/index.js';
|
|
3
3
|
import Button from '../buttons/default.js';
|
|
4
4
|
import { useMapList } from '../../../contexts/mapListContext.js';
|
|
5
5
|
|
package/dist/util/filterUtil.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray, defineProperty as _defineProperty, createForOfIteratorHelper as _createForOfIteratorHelper } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { getDistinctItemsByProximity } from './mapUtil.js';
|
|
3
|
-
import Fuse from '../node_modules/fuse.js/dist/fuse.js';
|
|
3
|
+
import Fuse from '../packages/hc-ui-components/node_modules/fuse.js/dist/fuse.js';
|
|
4
4
|
|
|
5
5
|
var getFilterOptions = function getFilterOptions(listings, filteredListings, field) {
|
|
6
6
|
var excludeZeroCount = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
@@ -1,33 +1,46 @@
|
|
|
1
1
|
import { createForOfIteratorHelper as _createForOfIteratorHelper, slicedToArray as _slicedToArray } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
|
|
3
3
|
var updateURLWithFilters = function updateURLWithFilters(filters, location, query) {
|
|
4
|
+
console.log("updating with filters");
|
|
5
|
+
console.log(filters);
|
|
6
|
+
console.log(query);
|
|
4
7
|
var searchParams = new URLSearchParams(location.search);
|
|
5
|
-
|
|
8
|
+
|
|
9
|
+
// Remove keys with a '.' or those equal to 'query'
|
|
10
|
+
var filteredSearchParams = new URLSearchParams();
|
|
11
|
+
var _iterator = _createForOfIteratorHelper(searchParams.entries()),
|
|
6
12
|
_step;
|
|
7
13
|
try {
|
|
8
14
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
var _step$value = _slicedToArray(_step.value, 2),
|
|
16
|
+
_key = _step$value[0],
|
|
17
|
+
value = _step$value[1];
|
|
18
|
+
if (!_key.includes('.') && _key !== 'query') {
|
|
19
|
+
filteredSearchParams.set(_key, value);
|
|
12
20
|
}
|
|
13
21
|
}
|
|
22
|
+
|
|
23
|
+
// Add the query parameter if it exists
|
|
14
24
|
} catch (err) {
|
|
15
25
|
_iterator.e(err);
|
|
16
26
|
} finally {
|
|
17
27
|
_iterator.f();
|
|
18
28
|
}
|
|
19
29
|
if (query) {
|
|
20
|
-
|
|
30
|
+
filteredSearchParams.set('query', query);
|
|
21
31
|
}
|
|
32
|
+
|
|
33
|
+
// Add the filters back to the search params
|
|
22
34
|
for (var category in filters) {
|
|
23
35
|
for (var filter in filters[category]) {
|
|
24
36
|
var key = "".concat(category, ".").concat(filter);
|
|
25
37
|
if (filters[category][filter]) {
|
|
26
|
-
|
|
38
|
+
filteredSearchParams.set(key, 'true');
|
|
27
39
|
}
|
|
28
40
|
}
|
|
29
41
|
}
|
|
30
|
-
var newUrl = "".concat(location.pathname, "?").concat(
|
|
42
|
+
var newUrl = "".concat(location.pathname, "?").concat(filteredSearchParams.toString());
|
|
43
|
+
console.log(newUrl);
|
|
31
44
|
window.history.replaceState({}, '', newUrl);
|
|
32
45
|
};
|
|
33
46
|
var parseQueryParams = function parseQueryParams(search) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlFilterUtil.js","sources":["../../src/util/urlFilterUtil.js"],"sourcesContent":["export const updateURLWithFilters = (filters, location, query) => {\n\tconst searchParams = new URLSearchParams(location.search);\n\n\tfor (const key of searchParams.
|
|
1
|
+
{"version":3,"file":"urlFilterUtil.js","sources":["../../src/util/urlFilterUtil.js"],"sourcesContent":["export const updateURLWithFilters = (filters, location, query) => {\n\tconsole.log(\"updating with filters\");\n\tconsole.log(filters);\n\tconsole.log(query);\n\n\tconst searchParams = new URLSearchParams(location.search);\n\n\t// Remove keys with a '.' or those equal to 'query'\n\tconst filteredSearchParams = new URLSearchParams();\n\tfor (const [key, value] of searchParams.entries()) {\n\t\tif (!key.includes('.') && key !== 'query') {\n\t\t\tfilteredSearchParams.set(key, value);\n\t\t}\n\t}\n\n\t// Add the query parameter if it exists\n\tif (query) {\n\t\tfilteredSearchParams.set('query', query);\n\t}\n\n\t// Add the filters back to the search params\n\tfor (const category in filters) {\n\t\tfor (const filter in filters[category]) {\n\t\t\tconst key = `${category}.${filter}`;\n\t\t\tif (filters[category][filter]) {\n\t\t\t\tfilteredSearchParams.set(key, 'true');\n\t\t\t}\n\t\t}\n\t}\n\n\tconst newUrl = `${location.pathname}?${filteredSearchParams.toString()}`;\n\tconsole.log(newUrl);\n\twindow.history.replaceState({}, '', newUrl);\n};\n\nfunction notifyParentOfUrlChange() {\n\tsetTimeout(() => {\n\t\tvar message = {\n\t\t\ttype: 'URL_CHANGE',\n\t\t\turl: window.location.href\n\t\t};\n\t\twindow.parent.postMessage(message, \"*\");\n\t}, 500);\n}\n\nexport const parseQueryParams = search => {\n\tconst queryParams = {};\n\tif (!search) return queryParams;\n\tlet queryString = search.split('?')[1];\n\tif (!queryString) {\n\t\treturn queryParams;\n\t}\n\tqueryString = queryString.replaceAll('+', ' ');\n\tqueryString.split('&').forEach(param => {\n\t\tconst [key, value] = param.split('=');\n\t\tqueryParams[decodeURIComponent(key)] = decodeURIComponent(value);\n\t});\n\treturn queryParams;\n};\n\nexport const filtersFromURL = location => {\n\tif (!location || !location.search) return;\n\tconst filters = {};\n\tlet queryParam = null;\n\tconst queryParams = parseQueryParams(location.search);\n\tif (!queryParams) return;\n\tObject.keys(queryParams).forEach(key => {\n\t\tif (key && key.includes('.')) {\n\t\t\tconst [category, filter] = key.split('.');\n\t\t\tif (!filters[category]) {\n\t\t\t\tfilters[category] = {};\n\t\t\t}\n\t\t\tfilters[category][filter] = queryParams[key] === 'true';\n\t\t} else if (key === 'query') {\n\t\t\tqueryParam = queryParams[key];\n\t\t}\n\t});\n\n\treturn { filters, query: queryParam };\n};\n\nexport const hasFiltersInURL = location => {\n\tif (!location || !location.search) return;\n\tconst queryParams = parseQueryParams(location.search);\n\tif (!queryParams) return;\n\treturn Object.keys(queryParams).some(key => key.includes('.'));\n};\n\nexport const hasQueryInUrl = location => {\n\tif (!location || !location.search) return;\n\tconst queryParams = parseQueryParams(location.search);\n\tif (!queryParams) return;\n\treturn Object.keys(queryParams).includes('query');\n};\n"],"names":["updateURLWithFilters","filters","location","query","console","log","searchParams","URLSearchParams","search","filteredSearchParams","_iterator","_createForOfIteratorHelper","entries","_step","s","n","done","_step$value","_slicedToArray","value","key","includes","set","err","e","f","category","filter","concat","newUrl","pathname","toString","window","history","replaceState","parseQueryParams","queryParams","queryString","split","replaceAll","forEach","param","_param$split","_param$split2","decodeURIComponent","filtersFromURL","queryParam","Object","keys","_key$split","_key$split2"],"mappings":";;AAAO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAIC,OAAO,EAAEC,QAAQ,EAAEC,KAAK,EAAK;AACjEC,EAAAA,OAAO,CAACC,GAAG,CAAC,uBAAuB,CAAC,CAAA;AACpCD,EAAAA,OAAO,CAACC,GAAG,CAACJ,OAAO,CAAC,CAAA;AACpBG,EAAAA,OAAO,CAACC,GAAG,CAACF,KAAK,CAAC,CAAA;EAElB,IAAMG,YAAY,GAAG,IAAIC,eAAe,CAACL,QAAQ,CAACM,MAAM,CAAC,CAAA;;AAEzD;AACA,EAAA,IAAMC,oBAAoB,GAAG,IAAIF,eAAe,EAAE,CAAA;EAAC,IAAAG,SAAA,GAAAC,0BAAA,CACxBL,YAAY,CAACM,OAAO,EAAE,CAAA;IAAAC,KAAA,CAAA;AA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1
1
|
export const updateURLWithFilters = (filters, location, query) => {
|
|
2
2
|
const searchParams = new URLSearchParams(location.search);
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const filteredSearchParams = new URLSearchParams();
|
|
5
|
+
for (const [key, value] of searchParams.entries()) {
|
|
6
|
+
if (!key.includes('.') && key !== 'query') {
|
|
7
|
+
filteredSearchParams.set(key, value);
|
|
8
|
+
}
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
if (query) {
|
|
11
|
-
|
|
12
|
+
filteredSearchParams.set('query', query);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
for (const category in filters) {
|
|
15
|
-
|
|
16
|
+
for (const filter in filters[category]) {
|
|
16
17
|
const key = `${category}.${filter}`;
|
|
17
18
|
if (filters[category][filter]) {
|
|
18
|
-
|
|
19
|
+
filteredSearchParams.set(key, 'true');
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
}
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
const newUrl = `${location.pathname}?${
|
|
24
|
+
const newUrl = `${location.pathname}?${filteredSearchParams.toString()}`;
|
|
24
25
|
window.history.replaceState({}, '', newUrl);
|
|
25
26
|
};
|
|
26
27
|
|