@abcagency/hc-ui-components 1.4.17 → 1.4.20
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 +16 -16
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/containers/accordions/filter-container.js +4 -4
- package/dist/components/containers/accordions/filter-container.js.map +1 -1
- package/dist/components/containers/accordions/filter-item-container.js +7 -7
- package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js +3 -3
- package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
- package/dist/components/containers/filter/commute-container.js +3 -3
- package/dist/components/containers/filter/commute-container.js.map +1 -1
- package/dist/components/containers/filter/filter-container.js +4 -4
- package/dist/components/containers/filter/filter-container.js.map +1 -1
- package/dist/components/containers/filter/filter-item-container.js +2 -2
- package/dist/components/containers/filter/filter-item-container.js.map +1 -1
- package/dist/components/containers/filter/location-container.js +4 -4
- package/dist/components/containers/filter/location-container.js.map +1 -1
- package/dist/components/containers/filter/points-of-interest-container.js +5 -5
- package/dist/components/containers/filter/points-of-interest-container.js.map +1 -1
- package/dist/components/containers/filter/points-of-interest-radio-item-container.js +2 -2
- package/dist/components/containers/filter/points-of-interest-radio-item-container.js.map +1 -1
- package/dist/components/containers/filter/search-container.js +2 -2
- package/dist/components/containers/filter/search-container.js.map +1 -1
- package/dist/components/containers/jobListing/listing-details-container.js +2 -2
- package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
- package/dist/components/containers/list/item-list-container.js +5 -5
- package/dist/components/containers/list/item-list-container.js.map +1 -1
- package/dist/components/containers/list/list-item/list-item-container.js +2 -2
- package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
- package/dist/components/containers/maps/info-window-content-container.js +2 -2
- package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js +8 -8
- package/dist/components/containers/maps/map-container.js.map +1 -1
- package/dist/components/containers/maps/map-list-container.js +5 -5
- package/dist/components/containers/maps/map-list-container.js.map +1 -1
- package/dist/components/containers/maps/map-marker-container.js +6 -6
- package/dist/components/containers/maps/map-marker-container.js.map +1 -1
- package/dist/components/modules/accordions/MapAccordionItem.js +5 -5
- package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
- package/dist/components/modules/accordions/default.js +14 -14
- package/dist/components/modules/accordions/default.js.map +1 -1
- package/dist/components/modules/accordions/filterItem.js +4 -4
- package/dist/components/modules/accordions/filterItem.js.map +1 -1
- package/dist/components/modules/accordions/filters.js +6 -6
- package/dist/components/modules/accordions/filters.js.map +1 -1
- package/dist/components/modules/buttons/button-group-apply.js +8 -8
- package/dist/components/modules/buttons/button-group-apply.js.map +1 -1
- package/dist/components/modules/buttons/default.js +8 -8
- package/dist/components/modules/buttons/default.js.map +1 -1
- package/dist/components/modules/buttons/items-pill.js +2 -2
- package/dist/components/modules/buttons/items-pill.js.map +1 -1
- package/dist/components/modules/buttons/pill-wrapper.js +2 -2
- package/dist/components/modules/buttons/pill-wrapper.js.map +1 -1
- package/dist/components/modules/buttons/show-all-button.js +3 -3
- package/dist/components/modules/buttons/show-all-button.js.map +1 -1
- package/dist/components/modules/cards/default.js +10 -10
- package/dist/components/modules/cards/default.js.map +1 -1
- package/dist/components/modules/cards/filter.js +5 -5
- package/dist/components/modules/cards/filter.js.map +1 -1
- package/dist/components/modules/dialogs/apply-dialog.js +15 -15
- package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
- package/dist/components/modules/filter/commute.js +18 -19
- package/dist/components/modules/filter/commute.js.map +1 -1
- package/dist/components/modules/filter/index.js +10 -10
- package/dist/components/modules/filter/index.js.map +1 -1
- package/dist/components/modules/filter/item.js +6 -6
- package/dist/components/modules/filter/item.js.map +1 -1
- package/dist/components/modules/filter/location.js +6 -6
- package/dist/components/modules/filter/location.js.map +1 -1
- package/dist/components/modules/filter/radio-item.js +6 -6
- package/dist/components/modules/filter/radio-item.js.map +1 -1
- package/dist/components/modules/filter/search.js +10 -10
- package/dist/components/modules/filter/search.js.map +1 -1
- package/dist/components/modules/filter/sort.js +27 -27
- package/dist/components/modules/filter/sort.js.map +1 -1
- package/dist/components/modules/grid.js +3 -3
- package/dist/components/modules/grid.js.map +1 -1
- package/dist/components/modules/icon.js +4 -4
- package/dist/components/modules/icon.js.map +1 -1
- package/dist/components/modules/jobListing/listing-details.js +4 -4
- package/dist/components/modules/jobListing/listing-details.js.map +1 -1
- package/dist/components/modules/list/field-mapper-desktop.js +6 -6
- package/dist/components/modules/list/field-mapper-desktop.js.map +1 -1
- package/dist/components/modules/list/field-mapper-mobile.js +13 -13
- package/dist/components/modules/list/field-mapper-mobile.js.map +1 -1
- package/dist/components/modules/list/header-item.js +6 -6
- package/dist/components/modules/list/header-item.js.map +1 -1
- package/dist/components/modules/list/header.js +4 -4
- package/dist/components/modules/list/header.js.map +1 -1
- package/dist/components/modules/list/item-expand-card/index.js +2 -2
- package/dist/components/modules/list/item-expand-card/index.js.map +1 -1
- package/dist/components/modules/list/item-list.js +15 -15
- package/dist/components/modules/list/item-list.js.map +1 -1
- package/dist/components/modules/list/list-item/list-item.js +13 -13
- package/dist/components/modules/list/list-item/list-item.js.map +1 -1
- package/dist/components/modules/maps/info-window-card.js +2 -2
- package/dist/components/modules/maps/info-window-card.js.map +1 -1
- package/dist/components/modules/maps/info-window-content.js +5 -5
- package/dist/components/modules/maps/info-window-content.js.map +1 -1
- package/dist/components/modules/maps/map-list.js +4 -4
- package/dist/components/modules/maps/map-list.js.map +1 -1
- package/dist/components/modules/maps/map-marker.js +3 -3
- package/dist/components/modules/maps/map-marker.js.map +1 -1
- package/dist/components/modules/maps/map.js +5 -5
- package/dist/components/modules/maps/map.js.map +1 -1
- package/dist/components/modules/maps/place-marker.js +5 -5
- package/dist/components/modules/maps/place-marker.js.map +1 -1
- package/dist/components/modules/maps/tabs.js +21 -21
- package/dist/components/modules/maps/tabs.js.map +1 -1
- package/dist/contexts/mapContext.js +2 -2
- package/dist/contexts/mapContext.js.map +1 -1
- package/dist/contexts/mapListContext.js +2 -2
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/contexts/placesContext.js +2 -2
- package/dist/contexts/placesContext.js.map +1 -1
- package/dist/contexts/themeContext.js +2 -2
- package/dist/contexts/themeContext.js.map +1 -1
- package/dist/contexts/trackEventContext.js +2 -2
- package/dist/contexts/trackEventContext.js.map +1 -1
- package/dist/styles/index.css +1 -3
- package/dist/types/components/modules/list/list-item/list-item.d.ts +1 -1
- package/dist/types/hooks/useList.d.ts +3 -3
- package/dist/util/loading.js +3 -3
- package/dist/util/loading.js.map +1 -1
- package/package.json +55 -8
- package/src/components/HireControlMap.js +1 -1
- package/src/styles/components.css +30 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort.js","sources":["../../../../src/components/modules/filter/sort.js"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport * as Select from '@radix-ui/react-select';\nimport { twMerge } from 'tailwind-merge';\n\nimport Icon from '~/components/modules/icon';\nimport Button from '~/components/modules/buttons/default';\n\nconst FilterSort = ({ className, fields, setSortSetting, fieldNames }) => {\n\tconst handleSortChange = value => {\n\t\tconst [field, direction] = value.split(\"-\");\n\t\tsetSortSetting({ field, type: direction });\n\t};\n\n\treturn (\n\t\t<div className={className ?? \"\"}>\n\t\t\t<Select.Root onValueChange={handleSortChange}>\n\t\t\t\t<Select.Trigger asChild aria-label=\"Sort\">\n\t\t\t\t\t<Button.Btn variant=\"outline\" size=\"sm\" className=\"hc-normal-case\">\n\t\t\t\t\t\t<Button.Body className=\"hc-justify-center\">\n\t\t\t\t\t\t\t<Select.Value placeholder={\n\t\t\t\t\t\t\t\t<span className=\"hc-flex hc-items-center hc-gap-2\">\n\t\t\t\t\t\t\t\t\tSort\n\t\t\t\t\t\t\t\t\t<Icon icon=\"mdi:sort\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t} />\n\t\t\t\t\t\t\t<Select.Icon>\n\t\t\t\t\t\t\t\t<Button.Icon icon=\"mdi:chevron-down\" />\n\t\t\t\t\t\t\t</Select.Icon>\n\t\t\t\t\t\t</Button.Body>\n\t\t\t\t\t</Button.Btn>\n\t\t\t\t</Select.Trigger>\n\t\t\t\t<Select.Portal>\n\t\t\t\t\t<Select.Content className={`hc-relative hc-z-[200] hc-overflow-hidden hc-bg-white hc-rounded-md `}>\n\t\t\t\t\t\t<Select.ScrollUpButton className=\"hc-flex hc-items-center hc-justify-center hc-h-5 hc-bg-white hc-text-primary hc-cursor-default\">\n\t\t\t\t\t\t\t<Icon icon=\"mdi:chevron-up\" />\n\t\t\t\t\t\t</Select.ScrollUpButton>\n\t\t\t\t\t\t<Select.Viewport className=\"hc-p-1\">\n\t\t\t\t\t\t\t{fields.map(field => (\n\t\t\t\t\t\t\t\t<Select.Group key={field}>\n\t\t\t\t\t\t\t\t\t<SelectItem value={`${field}-asc`}>\n\t\t\t\t\t\t\t\t\t\t<span className=\"hc-flex hc-items-center hc-justify-between hc-gap-2 hc-w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{fieldNames[field] ?? field}\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon=\"mdi:sort-ascending\" />\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value={`${field}-desc`}>\n\t\t\t\t\t\t\t\t\t\t<span className=\"hc-flex hc-items-center hc-justify-between hc-gap-2 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{fieldNames[field] ?? field}\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon=\"mdi:sort-descending\" />\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t</Select.Group>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Select.Viewport>\n\t\t\t\t\t\t<Select.ScrollDownButton className=\"hc-flex hc-items-center hc-justify-center hc-h-5 hc-bg-white hc-text-primary hc-cursor-default\">\n\t\t\t\t\t\t\t<Icon icon=\"mdi:chevron-down\" />\n\t\t\t\t\t\t</Select.ScrollDownButton>\n\t\t\t\t\t</Select.Content>\n\t\t\t\t</Select.Portal>\n\t\t\t</Select.Root>\n\t\t</div>\n\t);\n};\n\nconst SelectItem = forwardRef(({ children, className, ...props }, forwardedRef) => (\n\t<Select.Item\n\t\tclassName={twMerge(\n\t\t\t\"hc-text-sm hc-leading-none hc-rounded-sm hc-flex hc-items-center hc-w-full hc-py-1.5 hc-pr-4 hc-pl-7 hc-relative hc-select-none hc-cursor-pointer data-[disabled]:hc-text-gray-500 data-[disabled]:hc-pointer-events-none data-[highlighted]:hc-outline-none data-[highlighted]:hc-bg-primary data-[highlighted]:hc-text-white\",\n\t\t\tclassName\n\t\t)}\n\t\t{...props}\n\t\tref={forwardedRef}\n\t>\n\t\t<Select.ItemText>{children}</Select.ItemText>\n\t\t<Select.ItemIndicator className=\"hc-absolute hc-left-0 hc-w-8 hc-inline-flex hc-items-center hc-justify-center\">\n\t\t\t<Icon icon=\"mdi:check\" />\n\t\t</Select.ItemIndicator>\n\t</Select.Item>\n));\n\nSelectItem.displayName = \"SelectItem\";\n\nexport default FilterSort;\n"],"names":["FilterSort","_ref","className","fields","setSortSetting","fieldNames","handleSortChange","value","_value$split","split","_value$split2","_slicedToArray","field","direction","type","React","createElement","Select","onValueChange","asChild","Button","Btn","variant","size","Body","placeholder","Icon","icon","map","_fieldNames$field","_fieldNames$field2","key","SelectItem","concat","forwardRef","_ref2","forwardedRef","children","props","_objectWithoutProperties","_excluded","_extends","twMerge","ref","displayName"],"mappings":";;;;;;;;AAOA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAA0D;AAAA,EAAA,IAApDC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,cAAc,GAAAH,IAAA,CAAdG,cAAc;IAAEC,UAAU,GAAAJ,IAAA,CAAVI,UAAU,CAAA;AAClE,EAAA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAGC,KAAK,EAAI;AACjC,IAAA,IAAAC,YAAA,GAA2BD,KAAK,CAACE,KAAK,CAAC,GAAG,CAAC;MAAAC,aAAA,GAAAC,cAAA,CAAAH,YAAA,EAAA,CAAA,CAAA;AAApCI,MAAAA,KAAK,GAAAF,aAAA,CAAA,CAAA,CAAA;AAAEG,MAAAA,SAAS,GAAAH,aAAA,CAAA,CAAA,CAAA,CAAA;AACvBN,IAAAA,cAAc,CAAC;AAAEQ,MAAAA,KAAK,EAALA,KAAK;AAAEE,MAAAA,IAAI,EAAED,SAAAA;AAAU,KAAC,CAAC,CAAA;GAC1C,CAAA;EAED,oBACCE,
|
|
1
|
+
{"version":3,"file":"sort.js","sources":["../../../../src/components/modules/filter/sort.js"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport * as Select from '@radix-ui/react-select';\nimport { twMerge } from 'tailwind-merge';\n\nimport Icon from '~/components/modules/icon';\nimport Button from '~/components/modules/buttons/default';\n\nconst FilterSort = ({ className, fields, setSortSetting, fieldNames }) => {\n\tconst handleSortChange = value => {\n\t\tconst [field, direction] = value.split(\"-\");\n\t\tsetSortSetting({ field, type: direction });\n\t};\n\n\treturn (\n\t\t<div className={className ?? \"\"}>\n\t\t\t<Select.Root onValueChange={handleSortChange}>\n\t\t\t\t<Select.Trigger asChild aria-label=\"Sort\">\n\t\t\t\t\t<Button.Btn variant=\"outline\" size=\"sm\" className=\"hc-normal-case\">\n\t\t\t\t\t\t<Button.Body className=\"hc-justify-center\">\n\t\t\t\t\t\t\t<Select.Value placeholder={\n\t\t\t\t\t\t\t\t<span className=\"hc-flex hc-items-center hc-gap-2\">\n\t\t\t\t\t\t\t\t\tSort\n\t\t\t\t\t\t\t\t\t<Icon icon=\"mdi:sort\" />\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t} />\n\t\t\t\t\t\t\t<Select.Icon>\n\t\t\t\t\t\t\t\t<Button.Icon icon=\"mdi:chevron-down\" />\n\t\t\t\t\t\t\t</Select.Icon>\n\t\t\t\t\t\t</Button.Body>\n\t\t\t\t\t</Button.Btn>\n\t\t\t\t</Select.Trigger>\n\t\t\t\t<Select.Portal>\n\t\t\t\t\t<Select.Content className={`hc-relative hc-z-[200] hc-overflow-hidden hc-bg-white hc-rounded-md `}>\n\t\t\t\t\t\t<Select.ScrollUpButton className=\"hc-flex hc-items-center hc-justify-center hc-h-5 hc-bg-white hc-text-primary hc-cursor-default\">\n\t\t\t\t\t\t\t<Icon icon=\"mdi:chevron-up\" />\n\t\t\t\t\t\t</Select.ScrollUpButton>\n\t\t\t\t\t\t<Select.Viewport className=\"hc-p-1\">\n\t\t\t\t\t\t\t{fields.map(field => (\n\t\t\t\t\t\t\t\t<Select.Group key={field}>\n\t\t\t\t\t\t\t\t\t<SelectItem value={`${field}-asc`}>\n\t\t\t\t\t\t\t\t\t\t<span className=\"hc-flex hc-items-center hc-justify-between hc-gap-2 hc-w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{fieldNames[field] ?? field}\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon=\"mdi:sort-ascending\" />\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t\t<SelectItem value={`${field}-desc`}>\n\t\t\t\t\t\t\t\t\t\t<span className=\"hc-flex hc-items-center hc-justify-between hc-gap-2 w-full\">\n\t\t\t\t\t\t\t\t\t\t\t{fieldNames[field] ?? field}\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon=\"mdi:sort-descending\" />\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t\t\t\t</Select.Group>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</Select.Viewport>\n\t\t\t\t\t\t<Select.ScrollDownButton className=\"hc-flex hc-items-center hc-justify-center hc-h-5 hc-bg-white hc-text-primary hc-cursor-default\">\n\t\t\t\t\t\t\t<Icon icon=\"mdi:chevron-down\" />\n\t\t\t\t\t\t</Select.ScrollDownButton>\n\t\t\t\t\t</Select.Content>\n\t\t\t\t</Select.Portal>\n\t\t\t</Select.Root>\n\t\t</div>\n\t);\n};\n\nconst SelectItem = forwardRef(({ children, className, ...props }, forwardedRef) => (\n\t<Select.Item\n\t\tclassName={twMerge(\n\t\t\t\"hc-text-sm hc-leading-none hc-rounded-sm hc-flex hc-items-center hc-w-full hc-py-1.5 hc-pr-4 hc-pl-7 hc-relative hc-select-none hc-cursor-pointer data-[disabled]:hc-text-gray-500 data-[disabled]:hc-pointer-events-none data-[highlighted]:hc-outline-none data-[highlighted]:hc-bg-primary data-[highlighted]:hc-text-white\",\n\t\t\tclassName\n\t\t)}\n\t\t{...props}\n\t\tref={forwardedRef}\n\t>\n\t\t<Select.ItemText>{children}</Select.ItemText>\n\t\t<Select.ItemIndicator className=\"hc-absolute hc-left-0 hc-w-8 hc-inline-flex hc-items-center hc-justify-center\">\n\t\t\t<Icon icon=\"mdi:check\" />\n\t\t</Select.ItemIndicator>\n\t</Select.Item>\n));\n\nSelectItem.displayName = \"SelectItem\";\n\nexport default FilterSort;\n"],"names":["FilterSort","_ref","className","fields","setSortSetting","fieldNames","handleSortChange","value","_value$split","split","_value$split2","_slicedToArray","field","direction","type","React","createElement","Select","Root","onValueChange","Trigger","asChild","Button","Btn","variant","size","Body","Value","placeholder","Icon","icon","Portal","Content","ScrollUpButton","Viewport","map","_fieldNames$field","_fieldNames$field2","Group","key","SelectItem","concat","ScrollDownButton","forwardRef","_ref2","forwardedRef","children","props","_objectWithoutProperties","_excluded","Item","_extends","twMerge","ref","ItemText","ItemIndicator","displayName"],"mappings":";;;;;;;;AAOA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAA0D;AAAA,EAAA,IAApDC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,MAAM,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SAAS;AAAK6C,IAAAA,KAAK,GAAAC,wBAAA,CAAAJ,KAAA,EAAAK,SAAA,CAAA,CAAA;EAAA,oBAC7DlC,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACiC,IAAI,EAAAC,QAAA,CAAA;AACXjD,IAAAA,SAAS,EAAEkD,OAAO,CACjB,gUAAgU,EAChUlD,SACD,CAAA;AAAE,GAAA,EACE6C,KAAK,EAAA;AACTM,IAAAA,GAAG,EAAER,YAAAA;AAAa,GAAA,CAAA,eAElB9B,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACqC,QAAQ,EAAA,IAAA,EAAER,QAA0B,CAAC,eAC7C/B,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACsC,aAAa,EAAA;AAACrD,IAAAA,SAAS,EAAC,+EAAA;AAA+E,GAAA,eAC9Ga,KAAA,CAAAC,aAAA,CAACa,aAAI,EAAA;AAACC,IAAAA,IAAI,EAAC,WAAA;GAAa,CACH,CACV,CAAC,CAAA;AAAA,CACd,CAAC,CAAA;AAEFU,UAAU,CAACgB,WAAW,GAAG,YAAY;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
3
|
import { twMerge } from '../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
4
4
|
|
|
5
5
|
var _excluded = ["as", "children", "className", "autoRows", "columns", "gap"];
|
|
@@ -16,7 +16,7 @@ var Grid = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
16
16
|
gap = _props$gap === void 0 ? 'hc-gap-12 lg:hc-gap-16' : _props$gap,
|
|
17
17
|
rest = _objectWithoutProperties(props, _excluded);
|
|
18
18
|
var Container = as;
|
|
19
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
20
20
|
ref: ref,
|
|
21
21
|
className: twMerge('hc-grid', gap, autoRows ? 'hc-auto-rows-min' : '', 'hc-grid-cols-1', columns, className !== null && className !== void 0 ? className : '')
|
|
22
22
|
}, rest), children);
|
|
@@ -27,7 +27,7 @@ var GridItem = function GridItem(_ref) {
|
|
|
27
27
|
children = _ref.children,
|
|
28
28
|
className = _ref.className;
|
|
29
29
|
var Container = as;
|
|
30
|
-
return /*#__PURE__*/
|
|
30
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
31
31
|
className: className !== null && className !== void 0 ? className : ''
|
|
32
32
|
}, children);
|
|
33
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.js","sources":["../../../src/components/modules/grid.js"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nconst Grid = forwardRef((props, ref) => {\n\tconst {\n\t\tas = 'div',\n\t\tchildren,\n\t\tclassName,\n\t\tautoRows = true,\n\t\tcolumns = 'md:hc-grid-cols-2',\n\t\tgap = 'hc-gap-12 lg:hc-gap-16',\n\t\t...rest\n\t} = props;\n\n\tconst Container = as;\n\n\treturn (\n\t\t<Container\n\t\t\tref={ref}\n\t\t\tclassName={twMerge(\n\t\t\t\t'hc-grid',\n\t\t\t\tgap,\n\t\t\t\tautoRows ? 'hc-auto-rows-min' : '',\n\t\t\t\t'hc-grid-cols-1',\n\t\t\t\tcolumns,\n\t\t\t\tclassName ?? ''\n\t\t\t)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</Container>\n\t);\n});\n\nexport const GridItem = ({\n\tas = 'div',\n\tchildren,\n\tclassName\n}) => {\n\tconst Container = as;\n\n\treturn (\n\t\t<Container\n\t\t\tclassName={className ?? ''}\n\t\t>\n\t\t\t{children}\n\t\t</Container>\n\t);\n};\n\nGrid.Item = GridItem;\n\nGrid.displayName = 'Grid';\nexport default Grid;\n"],"names":["Grid","forwardRef","props","ref","_props$as","as","children","className","_props$autoRows","autoRows","_props$columns","columns","_props$gap","gap","rest","_objectWithoutProperties","_excluded","Container","React","createElement","_extends","twMerge","GridItem","_ref","_ref$as","Item","displayName"],"mappings":";;;;;AAGMA,IAAAA,IAAI,gBAAGC,UAAU,CAAC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACvC,EAAA,IAAAC,SAAA,GAQIF,KAAK,CAPRG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,SAAA;IACVE,QAAQ,GAMLJ,KAAK,CANRI,QAAQ;IACRC,SAAS,GAKNL,KAAK,CALRK,SAAS;IAAAC,eAAA,GAKNN,KAAK,CAJRO,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;IAAAE,cAAA,GAIZR,KAAK,CAHRS,OAAO;AAAPA,IAAAA,OAAO,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,mBAAmB,GAAAA,cAAA;IAAAE,UAAA,GAG1BV,KAAK,CAFRW,GAAG;AAAHA,IAAAA,GAAG,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,wBAAwB,GAAAA,UAAA;AAC3BE,IAAAA,IAAI,GAAAC,wBAAA,CACJb,KAAK,EAAAc,SAAA,CAAA,CAAA;EAET,IAAMC,SAAS,GAAGZ,EAAE,CAAA;AAEpB,EAAA,oBACCa,
|
|
1
|
+
{"version":3,"file":"grid.js","sources":["../../../src/components/modules/grid.js"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nconst Grid = forwardRef((props, ref) => {\n\tconst {\n\t\tas = 'div',\n\t\tchildren,\n\t\tclassName,\n\t\tautoRows = true,\n\t\tcolumns = 'md:hc-grid-cols-2',\n\t\tgap = 'hc-gap-12 lg:hc-gap-16',\n\t\t...rest\n\t} = props;\n\n\tconst Container = as;\n\n\treturn (\n\t\t<Container\n\t\t\tref={ref}\n\t\t\tclassName={twMerge(\n\t\t\t\t'hc-grid',\n\t\t\t\tgap,\n\t\t\t\tautoRows ? 'hc-auto-rows-min' : '',\n\t\t\t\t'hc-grid-cols-1',\n\t\t\t\tcolumns,\n\t\t\t\tclassName ?? ''\n\t\t\t)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</Container>\n\t);\n});\n\nexport const GridItem = ({\n\tas = 'div',\n\tchildren,\n\tclassName\n}) => {\n\tconst Container = as;\n\n\treturn (\n\t\t<Container\n\t\t\tclassName={className ?? ''}\n\t\t>\n\t\t\t{children}\n\t\t</Container>\n\t);\n};\n\nGrid.Item = GridItem;\n\nGrid.displayName = 'Grid';\nexport default Grid;\n"],"names":["Grid","forwardRef","props","ref","_props$as","as","children","className","_props$autoRows","autoRows","_props$columns","columns","_props$gap","gap","rest","_objectWithoutProperties","_excluded","Container","React","createElement","_extends","twMerge","GridItem","_ref","_ref$as","Item","displayName"],"mappings":";;;;;AAGMA,IAAAA,IAAI,gBAAGC,UAAU,CAAC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACvC,EAAA,IAAAC,SAAA,GAQIF,KAAK,CAPRG,EAAE;AAAFA,IAAAA,EAAE,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,SAAA;IACVE,QAAQ,GAMLJ,KAAK,CANRI,QAAQ;IACRC,SAAS,GAKNL,KAAK,CALRK,SAAS;IAAAC,eAAA,GAKNN,KAAK,CAJRO,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;IAAAE,cAAA,GAIZR,KAAK,CAHRS,OAAO;AAAPA,IAAAA,OAAO,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,mBAAmB,GAAAA,cAAA;IAAAE,UAAA,GAG1BV,KAAK,CAFRW,GAAG;AAAHA,IAAAA,GAAG,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,wBAAwB,GAAAA,UAAA;AAC3BE,IAAAA,IAAI,GAAAC,wBAAA,CACJb,KAAK,EAAAc,SAAA,CAAA,CAAA;EAET,IAAMC,SAAS,GAAGZ,EAAE,CAAA;AAEpB,EAAA,oBACCa,KAAA,CAAAC,aAAA,CAACF,SAAS,EAAAG,QAAA,CAAA;AACTjB,IAAAA,GAAG,EAAEA,GAAI;IACTI,SAAS,EAAEc,OAAO,CACjB,SAAS,EACTR,GAAG,EACHJ,QAAQ,GAAG,kBAAkB,GAAG,EAAE,EAClC,gBAAgB,EAChBE,OAAO,EACPJ,SAAS,aAATA,SAAS,KAAA,KAAA,CAAA,GAATA,SAAS,GAAI,EACd,CAAA;GACIO,EAAAA,IAAI,CAEPR,EAAAA,QACS,CAAC,CAAA;AAEd,CAAC,EAAC;IAEWgB,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAIf;AAAA,EAAA,IAAAC,OAAA,GAAAD,IAAA,CAHLlB,EAAE;AAAFA,IAAAA,EAAE,GAAAmB,OAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,OAAA;IACVlB,QAAQ,GAAAiB,IAAA,CAARjB,QAAQ;IACRC,SAAS,GAAAgB,IAAA,CAAThB,SAAS,CAAA;EAET,IAAMU,SAAS,GAAGZ,EAAE,CAAA;AAEpB,EAAA,oBACCa,KAAA,CAAAC,aAAA,CAACF,SAAS,EAAA;AACTV,IAAAA,SAAS,EAAEA,SAAS,KAAA,IAAA,IAATA,SAAS,KAAA,KAAA,CAAA,GAATA,SAAS,GAAI,EAAA;AAAG,GAAA,EAE1BD,QACS,CAAC,CAAA;AAEd,EAAC;AAEDN,IAAI,CAACyB,IAAI,GAAGH,QAAQ,CAAA;AAEpBtB,IAAI,CAAC0B,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
3
|
-
import { Icon } from '
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Icon } from '@iconify/react';
|
|
4
4
|
|
|
5
5
|
var _excluded = ["className", "size", "icon", "iconClasses", "title"];
|
|
6
6
|
var IconContained = function IconContained(_ref) {
|
|
@@ -10,10 +10,10 @@ var IconContained = function IconContained(_ref) {
|
|
|
10
10
|
iconClasses = _ref.iconClasses,
|
|
11
11
|
title = _ref.title,
|
|
12
12
|
iconProps = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
14
14
|
title: title,
|
|
15
15
|
className: "\n\t\t\thc-inline-block hc-align-middle\n\t\t\t\t".concat(className !== null && className !== void 0 ? className : '', "\n\t\t\t\t").concat(size !== null && size !== void 0 ? size : '', "\n\t\t\t")
|
|
16
|
-
}, /*#__PURE__*/
|
|
16
|
+
}, /*#__PURE__*/React.createElement(Icon, _extends({
|
|
17
17
|
icon: icon,
|
|
18
18
|
className: "\n\t\t\t\t\t".concat(iconClasses !== null && iconClasses !== void 0 ? iconClasses : '', "\n\t\t\t\t\t").concat(size !== null && size !== void 0 ? size : '', "\n\t\t\t\t")
|
|
19
19
|
}, iconProps)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sources":["../../../src/components/modules/icon.js"],"sourcesContent":["import React from 'react';\nimport { Icon } from '@iconify/react';\n\nconst IconContained = ({\n\tclassName,\n\tsize,\n\ticon,\n\ticonClasses,\n\ttitle,\n\t...iconProps\n}) => {\n\treturn (\n\t\t<span\n\t\t\ttitle={title}\n\t\t\tclassName={`\n\t\t\thc-inline-block hc-align-middle\n\t\t\t\t${className ?? ''}\n\t\t\t\t${size ?? ''}\n\t\t\t`}\n\t\t>\n\t\t\t<Icon\n\t\t\t\ticon={icon}\n\t\t\t\tclassName={`\n\t\t\t\t\t${iconClasses ?? ''}\n\t\t\t\t\t${size ?? ''}\n\t\t\t\t`}\n\t\t\t\t{...iconProps}\n\t\t\t/>\n\t\t</span>\n\t);\n};\n\nexport default IconContained;\n"],"names":["IconContained","_ref","className","size","icon","iconClasses","title","iconProps","_objectWithoutProperties","_excluded","React","createElement","concat","Icon","_extends"],"mappings":";;;;;AAGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAOb;AAAA,EAAA,IANLC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,KAAK,GAAAL,IAAA,CAALK,KAAK;AACFC,IAAAA,SAAS,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;EAEZ,oBACCC,
|
|
1
|
+
{"version":3,"file":"icon.js","sources":["../../../src/components/modules/icon.js"],"sourcesContent":["import React from 'react';\nimport { Icon } from '@iconify/react';\n\nconst IconContained = ({\n\tclassName,\n\tsize,\n\ticon,\n\ticonClasses,\n\ttitle,\n\t...iconProps\n}) => {\n\treturn (\n\t\t<span\n\t\t\ttitle={title}\n\t\t\tclassName={`\n\t\t\thc-inline-block hc-align-middle\n\t\t\t\t${className ?? ''}\n\t\t\t\t${size ?? ''}\n\t\t\t`}\n\t\t>\n\t\t\t<Icon\n\t\t\t\ticon={icon}\n\t\t\t\tclassName={`\n\t\t\t\t\t${iconClasses ?? ''}\n\t\t\t\t\t${size ?? ''}\n\t\t\t\t`}\n\t\t\t\t{...iconProps}\n\t\t\t/>\n\t\t</span>\n\t);\n};\n\nexport default IconContained;\n"],"names":["IconContained","_ref","className","size","icon","iconClasses","title","iconProps","_objectWithoutProperties","_excluded","React","createElement","concat","Icon","_extends"],"mappings":";;;;;AAGA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAOb;AAAA,EAAA,IANLC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IACJC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,KAAK,GAAAL,IAAA,CAALK,KAAK;AACFC,IAAAA,SAAS,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;EAEZ,oBACCC,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AACCL,IAAAA,KAAK,EAAEA,KAAM;AACbJ,IAAAA,SAAS,sDAAAU,MAAA,CAENV,SAAS,KAATA,IAAAA,IAAAA,SAAS,cAATA,SAAS,GAAI,EAAE,EAAAU,YAAAA,CAAAA,CAAAA,MAAA,CACfT,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAJA,KAAAA,CAAAA,GAAAA,IAAI,GAAI,EAAE,EAAA,UAAA,CAAA;AACX,GAAA,eAEFO,KAAA,CAAAC,aAAA,CAACE,IAAI,EAAAC,QAAA,CAAA;AACJV,IAAAA,IAAI,EAAEA,IAAK;AACXF,IAAAA,SAAS,iBAAAU,MAAA,CACNP,WAAW,KAAXA,IAAAA,IAAAA,WAAW,cAAXA,WAAW,GAAI,EAAE,EAAAO,cAAAA,CAAAA,CAAAA,MAAA,CACjBT,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAJA,KAAAA,CAAAA,GAAAA,IAAI,GAAI,EAAE,EAAA,YAAA,CAAA;GAETI,EAAAA,SAAS,CACb,CACI,CAAC,CAAA;AAET;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import ButtonGroupApply from '../buttons/button-group-apply.js';
|
|
3
3
|
|
|
4
4
|
var ListingDetails = function ListingDetails(_ref) {
|
|
@@ -20,11 +20,11 @@ var ListingDetails = function ListingDetails(_ref) {
|
|
|
20
20
|
if (!item) {
|
|
21
21
|
return null;
|
|
22
22
|
}
|
|
23
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
24
|
className: "hc-w-full"
|
|
25
|
-
}, /*#__PURE__*/
|
|
25
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
26
26
|
className: "hc-grow hc-flex hc-flex-wrap hc-items-center hc-gap-4"
|
|
27
|
-
}, /*#__PURE__*/
|
|
27
|
+
}, /*#__PURE__*/React.createElement(ButtonGroupApply, {
|
|
28
28
|
useDetailsPostMessage: useDetailsPostMessage,
|
|
29
29
|
navigateToDetails: navigateToDetails,
|
|
30
30
|
navigateToEasyApply: navigateToEasyApply,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listing-details.js","sources":["../../../../src/components/modules/jobListing/listing-details.js"],"sourcesContent":["import React from 'react';\nimport ApplyButtonGroup from '~/components/modules/buttons/button-group-apply';\n\nconst ListingDetails = ({\n\titem,\n\tuseDetailsPostMessage,\n\tnavigateToDetails,\n\tnavigateToEasyApply,\n\tLink,\n\tlinkFormat,\n\teasyApplyUrl,\n\teasyApplyText,\n\tisIframe,\n\tuseApplyDialog,\n\tinternalApplyLink,\n\tcompanyName,\n\tjobsDomain,\n\ttrackEvent,\n\teventTypes\n}) => {\n\tif (!item) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"hc-w-full\">\n\t\t\t<div className=\"hc-grow hc-flex hc-flex-wrap hc-items-center hc-gap-4\">\n\t\t\t\t<ApplyButtonGroup\n\t\t\t\t\tuseDetailsPostMessage={useDetailsPostMessage}\n\t\t\t\t\tnavigateToDetails={navigateToDetails}\n\t\t\t\t\tnavigateToEasyApply={navigateToEasyApply}\n\t\t\t\t\tLink={Link}\n\t\t\t\t\tlinkFormat={linkFormat}\n\t\t\t\t\teasyApplyUrl={easyApplyUrl}\n\t\t\t\t\teasyApplyText={easyApplyText}\n\t\t\t\t\tisIframe={isIframe}\n\t\t\t\t\tincludeDialog={useApplyDialog}\n\t\t\t\t\tinternalApplyLink={internalApplyLink}\n\t\t\t\t\tcompanyName={companyName}\n\t\t\t\t\titem={item}\n\t\t\t\t\ttrackEvent={trackEvent}\n\t\t\t\t\teventTypes={eventTypes}\n\t\t\t\t\tdetailsUrl={item.useClientJobUrl ? item?.detailsUrl : `${jobsDomain}${item.id}`}\n\t\t\t\t\tclassName={`\n lg:hc-w-auto hc-order-first lg:hc-order-last md:hc-self-center hc-py-2 lg:hc-p-0 lg:hc-mb-0 hc-border-b lg:hc-border-none hc-border-uiAccent/20\n lg:hc-flex-row\n `}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default ListingDetails;\n\n"],"names":["ListingDetails","_ref","item","useDetailsPostMessage","navigateToDetails","navigateToEasyApply","Link","linkFormat","easyApplyUrl","easyApplyText","isIframe","useApplyDialog","internalApplyLink","companyName","jobsDomain","trackEvent","eventTypes","React","createElement","className","ApplyButtonGroup","includeDialog","detailsUrl","useClientJobUrl","concat","id"],"mappings":";;;AAGA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAgBd;AAAA,EAAA,IAfLC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,qBAAqB,GAAAF,IAAA,CAArBE,qBAAqB;IACrBC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;IACjBC,mBAAmB,GAAAJ,IAAA,CAAnBI,mBAAmB;IACnBC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IACJC,UAAU,GAAAN,IAAA,CAAVM,UAAU;IACVC,YAAY,GAAAP,IAAA,CAAZO,YAAY;IACZC,aAAa,GAAAR,IAAA,CAAbQ,aAAa;IACbC,QAAQ,GAAAT,IAAA,CAARS,QAAQ;IACRC,cAAc,GAAAV,IAAA,CAAdU,cAAc;IACdC,iBAAiB,GAAAX,IAAA,CAAjBW,iBAAiB;IACjBC,WAAW,GAAAZ,IAAA,CAAXY,WAAW;IACXC,UAAU,GAAAb,IAAA,CAAVa,UAAU;IACVC,UAAU,GAAAd,IAAA,CAAVc,UAAU;IACVC,UAAU,GAAAf,IAAA,CAAVe,UAAU,CAAA;EAEV,IAAI,CAACd,IAAI,EAAE;AACV,IAAA,OAAO,IAAI,CAAA;AACZ,GAAA;EAEA,oBACCe,
|
|
1
|
+
{"version":3,"file":"listing-details.js","sources":["../../../../src/components/modules/jobListing/listing-details.js"],"sourcesContent":["import React from 'react';\nimport ApplyButtonGroup from '~/components/modules/buttons/button-group-apply';\n\nconst ListingDetails = ({\n\titem,\n\tuseDetailsPostMessage,\n\tnavigateToDetails,\n\tnavigateToEasyApply,\n\tLink,\n\tlinkFormat,\n\teasyApplyUrl,\n\teasyApplyText,\n\tisIframe,\n\tuseApplyDialog,\n\tinternalApplyLink,\n\tcompanyName,\n\tjobsDomain,\n\ttrackEvent,\n\teventTypes\n}) => {\n\tif (!item) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"hc-w-full\">\n\t\t\t<div className=\"hc-grow hc-flex hc-flex-wrap hc-items-center hc-gap-4\">\n\t\t\t\t<ApplyButtonGroup\n\t\t\t\t\tuseDetailsPostMessage={useDetailsPostMessage}\n\t\t\t\t\tnavigateToDetails={navigateToDetails}\n\t\t\t\t\tnavigateToEasyApply={navigateToEasyApply}\n\t\t\t\t\tLink={Link}\n\t\t\t\t\tlinkFormat={linkFormat}\n\t\t\t\t\teasyApplyUrl={easyApplyUrl}\n\t\t\t\t\teasyApplyText={easyApplyText}\n\t\t\t\t\tisIframe={isIframe}\n\t\t\t\t\tincludeDialog={useApplyDialog}\n\t\t\t\t\tinternalApplyLink={internalApplyLink}\n\t\t\t\t\tcompanyName={companyName}\n\t\t\t\t\titem={item}\n\t\t\t\t\ttrackEvent={trackEvent}\n\t\t\t\t\teventTypes={eventTypes}\n\t\t\t\t\tdetailsUrl={item.useClientJobUrl ? item?.detailsUrl : `${jobsDomain}${item.id}`}\n\t\t\t\t\tclassName={`\n lg:hc-w-auto hc-order-first lg:hc-order-last md:hc-self-center hc-py-2 lg:hc-p-0 lg:hc-mb-0 hc-border-b lg:hc-border-none hc-border-uiAccent/20\n lg:hc-flex-row\n `}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default ListingDetails;\n\n"],"names":["ListingDetails","_ref","item","useDetailsPostMessage","navigateToDetails","navigateToEasyApply","Link","linkFormat","easyApplyUrl","easyApplyText","isIframe","useApplyDialog","internalApplyLink","companyName","jobsDomain","trackEvent","eventTypes","React","createElement","className","ApplyButtonGroup","includeDialog","detailsUrl","useClientJobUrl","concat","id"],"mappings":";;;AAGA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAgBd;AAAA,EAAA,IAfLC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,qBAAqB,GAAAF,IAAA,CAArBE,qBAAqB;IACrBC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;IACjBC,mBAAmB,GAAAJ,IAAA,CAAnBI,mBAAmB;IACnBC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IACJC,UAAU,GAAAN,IAAA,CAAVM,UAAU;IACVC,YAAY,GAAAP,IAAA,CAAZO,YAAY;IACZC,aAAa,GAAAR,IAAA,CAAbQ,aAAa;IACbC,QAAQ,GAAAT,IAAA,CAARS,QAAQ;IACRC,cAAc,GAAAV,IAAA,CAAdU,cAAc;IACdC,iBAAiB,GAAAX,IAAA,CAAjBW,iBAAiB;IACjBC,WAAW,GAAAZ,IAAA,CAAXY,WAAW;IACXC,UAAU,GAAAb,IAAA,CAAVa,UAAU;IACVC,UAAU,GAAAd,IAAA,CAAVc,UAAU;IACVC,UAAU,GAAAf,IAAA,CAAVe,UAAU,CAAA;EAEV,IAAI,CAACd,IAAI,EAAE;AACV,IAAA,OAAO,IAAI,CAAA;AACZ,GAAA;EAEA,oBACCe,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,WAAA;GACdF,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,uDAAA;AAAuD,GAAA,eACrEF,KAAA,CAAAC,aAAA,CAACE,gBAAgB,EAAA;AAChBjB,IAAAA,qBAAqB,EAAEA,qBAAsB;AAC7CC,IAAAA,iBAAiB,EAAEA,iBAAkB;AACrCC,IAAAA,mBAAmB,EAAEA,mBAAoB;AACzCC,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,YAAY,EAAEA,YAAa;AAC3BC,IAAAA,aAAa,EAAEA,aAAc;AAC7BC,IAAAA,QAAQ,EAAEA,QAAS;AACnBW,IAAAA,aAAa,EAAEV,cAAe;AAC9BC,IAAAA,iBAAiB,EAAEA,iBAAkB;AACrCC,IAAAA,WAAW,EAAEA,WAAY;AACzBX,IAAAA,IAAI,EAAEA,IAAK;AACXa,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,UAAU,EAAEA,UAAW;IACvBM,UAAU,EAAEpB,IAAI,CAACqB,eAAe,GAAGrB,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAJA,IAAI,CAAEoB,UAAU,GAAAE,EAAAA,CAAAA,MAAA,CAAMV,UAAU,CAAA,CAAAU,MAAA,CAAGtB,IAAI,CAACuB,EAAE,CAAG;IAChFN,SAAS,EAAA,uMAAA;GAIT,CACG,CACD,CAAC,CAAA;AAER;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import Grid from '../grid.js';
|
|
4
4
|
import { PillWrapper } from '../buttons/pill-wrapper.js';
|
|
5
5
|
import { capitalize } from '../../../util/stringUtils.js';
|
|
@@ -16,19 +16,19 @@ var FieldMapperDesktop = function FieldMapperDesktop(_ref) {
|
|
|
16
16
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
17
17
|
featureKey = _ref3[0],
|
|
18
18
|
featureLabel = _ref3[1];
|
|
19
|
-
return item.fields[featureKey] == 1 && /*#__PURE__*/
|
|
19
|
+
return item.fields[featureKey] == 1 && /*#__PURE__*/React.createElement(PillWrapper, {
|
|
20
20
|
key: featureKey
|
|
21
21
|
}, featureLabel);
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, orderedFields.map(function (field, index) {
|
|
25
25
|
var value = item.fields[field];
|
|
26
|
-
return /*#__PURE__*/
|
|
26
|
+
return /*#__PURE__*/React.createElement(Grid.Item, {
|
|
27
27
|
key: field,
|
|
28
28
|
className: "\n hc-hidden md:hc-block hc-px-2\n ".concat(index === 0 ? "hc-pl-7" : "", "\n ").concat(field.toLowerCase() === "title" ? "hc-col-span-4 hc-text-balance hc-font-semibold" : field.toLowerCase() === "state" || field.toLowerCase() == "favorite" ? "hc-col-span-1" : "hc-col-span-2", "\n ")
|
|
29
|
-
}, /*#__PURE__*/
|
|
29
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
30
30
|
className: "hc-sr-only"
|
|
31
|
-
}, capitalize(field)), value, /*#__PURE__*/
|
|
31
|
+
}, capitalize(field)), value, /*#__PURE__*/React.createElement("br", null), specialFeaturePills(field));
|
|
32
32
|
}));
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-mapper-desktop.js","sources":["../../../../src/components/modules/list/field-mapper-desktop.jsx"],"sourcesContent":["import React from 'react';\nimport Grid from '~/components/modules/grid';\nimport PillWrapper from '~/components/modules/buttons/pill-wrapper';\nimport { capitalize } from '~/util/stringUtils';\n\nconst FieldMapperDesktop = ({\n\titem,\n\tfieldsShown,\n\tspecialFeatures\n}) => {\n\tconst orderedFields = fieldsShown.filter(field => field in item.fields);\n\n\tconst specialFeaturePills = field => {\n\t\treturn field === 'title' && specialFeatures &&\n Object.entries(specialFeatures).map(([featureKey, featureLabel]) => {\n \treturn item.fields[featureKey] == 1 && (\n \t\t<PillWrapper key={featureKey}>{featureLabel}</PillWrapper>\n \t);\n });\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{orderedFields.map((field, index) => {\n\t\t\t\tlet value = item.fields[field];\n\t\t\t\treturn (\n\t\t\t\t\t<Grid.Item\n\t\t\t\t\t\tkey={field}\n\t\t\t\t\t\tclassName={`\n hc-hidden md:hc-block hc-px-2\n ${index === 0 ? \"hc-pl-7\" : \"\"}\n ${field.toLowerCase() === \"title\" ? \"hc-col-span-4 hc-text-balance hc-font-semibold\" : (field.toLowerCase() === \"state\" || field.toLowerCase() == \"favorite\") ? \"hc-col-span-1\" : \"hc-col-span-2\"}\n `}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"hc-sr-only\">{capitalize(field)}</span>\n\t\t\t\t\t\t{value}\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t{specialFeaturePills(field)}\n\t\t\t\t\t</Grid.Item>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport default FieldMapperDesktop;"],"names":["FieldMapperDesktop","_ref","item","fieldsShown","specialFeatures","orderedFields","filter","field","fields","specialFeaturePills","Object","entries","map","_ref2","_ref3","_slicedToArray","featureKey","featureLabel","React","createElement","PillWrapper","key","Fragment","index","value","Grid","Item","className","concat","toLowerCase","capitalize"],"mappings":";;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAIlB;AAAA,EAAA,IAHLC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,eAAe,GAAAH,IAAA,CAAfG,eAAe,CAAA;AAEf,EAAA,IAAMC,aAAa,GAAGF,WAAW,CAACG,MAAM,CAAC,UAAAC,KAAK,EAAA;AAAA,IAAA,OAAIA,KAAK,IAAIL,IAAI,CAACM,MAAM,CAAA;GAAC,CAAA,CAAA;AAEvE,EAAA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGF,KAAK,EAAI;AACpC,IAAA,OAAOA,KAAK,KAAK,OAAO,IAAIH,eAAe,IACvCM,MAAM,CAACC,OAAO,CAACP,eAAe,CAAC,CAACQ,GAAG,CAAC,UAAAC,KAAA,EAAgC;AAAA,MAAA,IAAAC,KAAA,GAAAC,cAAA,CAAAF,KAAA,EAAA,CAAA,CAAA;AAA9BG,QAAAA,UAAU,GAAAF,KAAA,CAAA,CAAA,CAAA;AAAEG,QAAAA,YAAY,GAAAH,KAAA,CAAA,CAAA,CAAA,CAAA;AAC7D,MAAA,OAAOZ,IAAI,CAACM,MAAM,CAACQ,UAAU,CAAC,IAAI,CAAC,iBAClCE,
|
|
1
|
+
{"version":3,"file":"field-mapper-desktop.js","sources":["../../../../src/components/modules/list/field-mapper-desktop.jsx"],"sourcesContent":["import React from 'react';\nimport Grid from '~/components/modules/grid';\nimport PillWrapper from '~/components/modules/buttons/pill-wrapper';\nimport { capitalize } from '~/util/stringUtils';\n\nconst FieldMapperDesktop = ({\n\titem,\n\tfieldsShown,\n\tspecialFeatures\n}) => {\n\tconst orderedFields = fieldsShown.filter(field => field in item.fields);\n\n\tconst specialFeaturePills = field => {\n\t\treturn field === 'title' && specialFeatures &&\n Object.entries(specialFeatures).map(([featureKey, featureLabel]) => {\n \treturn item.fields[featureKey] == 1 && (\n \t\t<PillWrapper key={featureKey}>{featureLabel}</PillWrapper>\n \t);\n });\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{orderedFields.map((field, index) => {\n\t\t\t\tlet value = item.fields[field];\n\t\t\t\treturn (\n\t\t\t\t\t<Grid.Item\n\t\t\t\t\t\tkey={field}\n\t\t\t\t\t\tclassName={`\n hc-hidden md:hc-block hc-px-2\n ${index === 0 ? \"hc-pl-7\" : \"\"}\n ${field.toLowerCase() === \"title\" ? \"hc-col-span-4 hc-text-balance hc-font-semibold\" : (field.toLowerCase() === \"state\" || field.toLowerCase() == \"favorite\") ? \"hc-col-span-1\" : \"hc-col-span-2\"}\n `}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"hc-sr-only\">{capitalize(field)}</span>\n\t\t\t\t\t\t{value}\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t{specialFeaturePills(field)}\n\t\t\t\t\t</Grid.Item>\n\t\t\t\t);\n\t\t\t})}\n\t\t</>\n\t);\n};\n\nexport default FieldMapperDesktop;"],"names":["FieldMapperDesktop","_ref","item","fieldsShown","specialFeatures","orderedFields","filter","field","fields","specialFeaturePills","Object","entries","map","_ref2","_ref3","_slicedToArray","featureKey","featureLabel","React","createElement","PillWrapper","key","Fragment","index","value","Grid","Item","className","concat","toLowerCase","capitalize"],"mappings":";;;;;;AAKA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAIlB;AAAA,EAAA,IAHLC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,eAAe,GAAAH,IAAA,CAAfG,eAAe,CAAA;AAEf,EAAA,IAAMC,aAAa,GAAGF,WAAW,CAACG,MAAM,CAAC,UAAAC,KAAK,EAAA;AAAA,IAAA,OAAIA,KAAK,IAAIL,IAAI,CAACM,MAAM,CAAA;GAAC,CAAA,CAAA;AAEvE,EAAA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGF,KAAK,EAAI;AACpC,IAAA,OAAOA,KAAK,KAAK,OAAO,IAAIH,eAAe,IACvCM,MAAM,CAACC,OAAO,CAACP,eAAe,CAAC,CAACQ,GAAG,CAAC,UAAAC,KAAA,EAAgC;AAAA,MAAA,IAAAC,KAAA,GAAAC,cAAA,CAAAF,KAAA,EAAA,CAAA,CAAA;AAA9BG,QAAAA,UAAU,GAAAF,KAAA,CAAA,CAAA,CAAA;AAAEG,QAAAA,YAAY,GAAAH,KAAA,CAAA,CAAA,CAAA,CAAA;AAC7D,MAAA,OAAOZ,IAAI,CAACM,MAAM,CAACQ,UAAU,CAAC,IAAI,CAAC,iBAClCE,KAAA,CAAAC,aAAA,CAACC,WAAW,EAAA;AAACC,QAAAA,GAAG,EAAEL,UAAAA;AAAW,OAAA,EAAEC,YAA0B,CACzD,CAAA;AACF,KAAC,CAAC,CAAA;GACN,CAAA;AAED,EAAA,oBACCC,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAI,QAAA,EAAA,IAAA,EACEjB,aAAa,CAACO,GAAG,CAAC,UAACL,KAAK,EAAEgB,KAAK,EAAK;AACpC,IAAA,IAAIC,KAAK,GAAGtB,IAAI,CAACM,MAAM,CAACD,KAAK,CAAC,CAAA;AAC9B,IAAA,oBACCW,KAAA,CAAAC,aAAA,CAACM,IAAI,CAACC,IAAI,EAAA;AACTL,MAAAA,GAAG,EAAEd,KAAM;AACXoB,MAAAA,SAAS,kEAAAC,MAAA,CAECL,KAAK,KAAK,CAAC,GAAG,SAAS,GAAG,EAAE,EAAA,kBAAA,CAAA,CAAAK,MAAA,CAC5BrB,KAAK,CAACsB,WAAW,EAAE,KAAK,OAAO,GAAG,gDAAgD,GAAItB,KAAK,CAACsB,WAAW,EAAE,KAAK,OAAO,IAAItB,KAAK,CAACsB,WAAW,EAAE,IAAI,UAAU,GAAI,eAAe,GAAG,eAAe,EAAA,gBAAA,CAAA;KAGzMX,eAAAA,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMQ,MAAAA,SAAS,EAAC,YAAA;AAAY,KAAA,EAAEG,UAAU,CAACvB,KAAK,CAAQ,CAAC,EACtDiB,KAAK,eACNN,KAAA,CAAAC,aAAA,WAAK,CAAC,EACLV,mBAAmB,CAACF,KAAK,CAChB,CAAC,CAAA;AAEd,GAAC,CACA,CAAC,CAAA;AAEL;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import Grid from '../grid.js';
|
|
4
4
|
import IconContained from '../icon.js';
|
|
5
5
|
import { PillWrapper } from '../buttons/pill-wrapper.js';
|
|
@@ -17,22 +17,22 @@ var FieldMapperMobile = function FieldMapperMobile(_ref) {
|
|
|
17
17
|
var _ref3 = _slicedToArray(_ref2, 2),
|
|
18
18
|
featureKey = _ref3[0],
|
|
19
19
|
featureLabel = _ref3[1];
|
|
20
|
-
return item.fields[featureKey] == 1 && /*#__PURE__*/
|
|
20
|
+
return item.fields[featureKey] == 1 && /*#__PURE__*/React.createElement(PillWrapper, {
|
|
21
21
|
key: featureKey
|
|
22
22
|
}, featureLabel);
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
-
return /*#__PURE__*/
|
|
25
|
+
return /*#__PURE__*/React.createElement(Grid.Item, {
|
|
26
26
|
className: "md:hc-hidden"
|
|
27
|
-
}, fieldsShown.includes("title") && /*#__PURE__*/
|
|
27
|
+
}, fieldsShown.includes("title") && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
28
28
|
className: "hc-flex hc-items-start"
|
|
29
|
-
}, /*#__PURE__*/
|
|
29
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
30
30
|
className: "hc-flex hc-justify-between hc-items-center hc-min-w-[100%]"
|
|
31
|
-
}, /*#__PURE__*/
|
|
31
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
32
32
|
className: "hc-font-bold hc-mb-3 hc-flex-1"
|
|
33
|
-
}, item.fields.title), includeFavorite && /*#__PURE__*/
|
|
33
|
+
}, item.fields.title), includeFavorite && /*#__PURE__*/React.createElement("div", {
|
|
34
34
|
className: "hc-flex hc-justify-end hc-pb-2"
|
|
35
|
-
}, /*#__PURE__*/
|
|
35
|
+
}, /*#__PURE__*/React.createElement(IconContained, {
|
|
36
36
|
icon: isFavorite ? "mdi:heart" : "mdi:heart-outline",
|
|
37
37
|
size: "hc-size-3.5",
|
|
38
38
|
iconClasses: isFavorite ? "hc-text-primary" : "",
|
|
@@ -40,9 +40,9 @@ var FieldMapperMobile = function FieldMapperMobile(_ref) {
|
|
|
40
40
|
onClick: function onClick(e) {
|
|
41
41
|
return handleFavouriteClick(e, item);
|
|
42
42
|
}
|
|
43
|
-
})))), specialFeatures && /*#__PURE__*/
|
|
43
|
+
})))), specialFeatures && /*#__PURE__*/React.createElement("div", {
|
|
44
44
|
className: "hc-pb-4"
|
|
45
|
-
}, specialFeaturePills("title"), " ")), /*#__PURE__*/
|
|
45
|
+
}, specialFeaturePills("title"), " ")), /*#__PURE__*/React.createElement("ul", {
|
|
46
46
|
className: "hc-space-y-2 hc-text-xs"
|
|
47
47
|
}, [{
|
|
48
48
|
field: "category",
|
|
@@ -73,14 +73,14 @@ var FieldMapperMobile = function FieldMapperMobile(_ref) {
|
|
|
73
73
|
name: "Commute",
|
|
74
74
|
icon: "ri:pin-distance-fill"
|
|
75
75
|
}].map(function (listItem) {
|
|
76
|
-
return fieldsShown.includes(listItem.field) && item.fields[listItem.field] && /*#__PURE__*/
|
|
76
|
+
return fieldsShown.includes(listItem.field) && item.fields[listItem.field] && /*#__PURE__*/React.createElement("li", {
|
|
77
77
|
key: listItem.field,
|
|
78
78
|
className: "hc-flex hc-gap-2"
|
|
79
|
-
}, /*#__PURE__*/
|
|
79
|
+
}, /*#__PURE__*/React.createElement(IconContained, {
|
|
80
80
|
icon: listItem.icon,
|
|
81
81
|
size: "hc-size-3.5",
|
|
82
82
|
className: "hc-text-uiAccent/30"
|
|
83
|
-
}), /*#__PURE__*/
|
|
83
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
84
84
|
className: "hc-sr-only"
|
|
85
85
|
}, listItem.name), item.fields[listItem.field]);
|
|
86
86
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-mapper-mobile.js","sources":["../../../../src/components/modules/list/field-mapper-mobile.jsx"],"sourcesContent":["import React from 'react';\nimport Grid from '~/components/modules/grid';\nimport Icon from '~/components/modules/icon';\nimport PillWrapper from '~/components/modules/buttons/pill-wrapper';\n\nconst FieldMapperMobile = ({\n\titem,\n\tfieldsShown,\n\tspecialFeatures,\n\thandleFavouriteClick,\n\tisFavorite,\n\tincludeFavorite = true\n}) => {\n\tconst specialFeaturePills = field => {\n\t\treturn field === 'title' && specialFeatures &&\n Object.entries(specialFeatures).map(([featureKey, featureLabel]) => {\n \treturn item.fields[featureKey] == 1 && (\n \t\t<PillWrapper key={featureKey}>{featureLabel}</PillWrapper>\n \t);\n });\n\t};\n\n\treturn (\n\t\t<Grid.Item className=\"md:hc-hidden\">\n\t\t\t{fieldsShown.includes(\"title\") &&\n <>\n \t<div className=\"hc-flex hc-items-start\">\n \t\t<div className=\"hc-flex hc-justify-between hc-items-center hc-min-w-[100%]\">\n \t\t\t<h3 className=\"hc-font-bold hc-mb-3 hc-flex-1\">{item.fields.title}</h3>\n \t\t\t{includeFavorite && <div className=\"hc-flex hc-justify-end hc-pb-2\">\n \t\t\t\t<Icon\n \t\t\t\t\ticon={isFavorite ? \"mdi:heart\" : \"mdi:heart-outline\"}\n \t\t\t\t\tsize=\"hc-size-3.5\"\n \t\t\t\t\ticonClasses={isFavorite ? \"hc-text-primary\" : \"\"}\n \t\t\t\t\tclassName={`hc-transition-opacity hc-duration-300 hc-cursor-pointer\n ${isFavorite ? \"hc-opacity-100\" : \"hc-text-uiText/60 group-hover:hc-opacity-100\"}\n `}\n \t\t\t\t\tonClick={e => handleFavouriteClick(e, item)}\n \t\t\t\t/>\n \t\t\t</div>\n \t\t\t}\n \t\t</div>\n \t</div>\n \t{specialFeatures && <div className='hc-pb-4'>{specialFeaturePills(\"title\", true)} </div>}\n </>\n\t\t\t}\n\n\t\t\t<ul className=\"hc-space-y-2 hc-text-xs\">\n\t\t\t\t{[\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"category\",\n\t\t\t\t\t\tname: \"category\",\n\t\t\t\t\t\ticon: \"icon-park-solid:tree-list\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"subCategory\",\n\t\t\t\t\t\tname: \"subCategory\",\n\t\t\t\t\t\ticon: \"icon-park-solid:tree-list\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"schedule\",\n\t\t\t\t\t\tname: \"Schedule\",\n\t\t\t\t\t\ticon: \"gravity-ui:clock-fill\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"city\",\n\t\t\t\t\t\tname: \"Location\",\n\t\t\t\t\t\ticon: \"fluent:location-16-filled\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"state\",\n\t\t\t\t\t\tname: \"Location\",\n\t\t\t\t\t\ticon: \"fluent:location-16-filled\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"cityState\",\n\t\t\t\t\t\tname: \"Location\",\n\t\t\t\t\t\ticon: \"fluent:location-16-filled\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"travelTime\",\n\t\t\t\t\t\tname: \"Commute\",\n\t\t\t\t\t\ticon: \"ri:pin-distance-fill\"\n\t\t\t\t\t}\n\t\t\t\t].map(listItem => (\n\t\t\t\t\t(fieldsShown.includes(listItem.field) && item.fields[listItem.field]) &&\n <li\n \tkey={listItem.field}\n \tclassName=\"hc-flex hc-gap-2\"\n >\n \t<Icon\n \t\ticon={listItem.icon}\n \t\tsize=\"hc-size-3.5\"\n \t\tclassName=\"hc-text-uiAccent/30\"\n \t/>\n \t<span className=\"hc-sr-only\">{listItem.name}</span>\n \t{item.fields[listItem.field]}\n </li>\n\t\t\t\t))}\n\t\t\t</ul>\n\t\t</Grid.Item>\n\t);\n};\n\nexport default FieldMapperMobile;"],"names":["FieldMapperMobile","_ref","item","fieldsShown","specialFeatures","handleFavouriteClick","isFavorite","_ref$includeFavorite","includeFavorite","specialFeaturePills","field","Object","entries","map","_ref2","_ref3","_slicedToArray","featureKey","featureLabel","fields","React","createElement","PillWrapper","key","Grid","Item","className","includes","Fragment","title","Icon","icon","size","iconClasses","concat","onClick","e","name","listItem"],"mappings":";;;;;;AAKA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAOjB;AAAA,EAAA,IANLC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IACJC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,eAAe,GAAAH,IAAA,CAAfG,eAAe;IACfC,oBAAoB,GAAAJ,IAAA,CAApBI,oBAAoB;IACpBC,UAAU,GAAAL,IAAA,CAAVK,UAAU;IAAAC,oBAAA,GAAAN,IAAA,CACVO,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,oBAAA,CAAA;AAEtB,EAAA,IAAME,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,KAAK,EAAI;AACpC,IAAA,OAAOA,KAAK,KAAK,OAAO,IAAIN,eAAe,IACvCO,MAAM,CAACC,OAAO,CAACR,eAAe,CAAC,CAACS,GAAG,CAAC,UAAAC,KAAA,EAAgC;AAAA,MAAA,IAAAC,KAAA,GAAAC,cAAA,CAAAF,KAAA,EAAA,CAAA,CAAA;AAA9BG,QAAAA,UAAU,GAAAF,KAAA,CAAA,CAAA,CAAA;AAAEG,QAAAA,YAAY,GAAAH,KAAA,CAAA,CAAA,CAAA,CAAA;AAC7D,MAAA,OAAOb,IAAI,CAACiB,MAAM,CAACF,UAAU,CAAC,IAAI,CAAC,iBAClCG,
|
|
1
|
+
{"version":3,"file":"field-mapper-mobile.js","sources":["../../../../src/components/modules/list/field-mapper-mobile.jsx"],"sourcesContent":["import React from 'react';\nimport Grid from '~/components/modules/grid';\nimport Icon from '~/components/modules/icon';\nimport PillWrapper from '~/components/modules/buttons/pill-wrapper';\n\nconst FieldMapperMobile = ({\n\titem,\n\tfieldsShown,\n\tspecialFeatures,\n\thandleFavouriteClick,\n\tisFavorite,\n\tincludeFavorite = true\n}) => {\n\tconst specialFeaturePills = field => {\n\t\treturn field === 'title' && specialFeatures &&\n Object.entries(specialFeatures).map(([featureKey, featureLabel]) => {\n \treturn item.fields[featureKey] == 1 && (\n \t\t<PillWrapper key={featureKey}>{featureLabel}</PillWrapper>\n \t);\n });\n\t};\n\n\treturn (\n\t\t<Grid.Item className=\"md:hc-hidden\">\n\t\t\t{fieldsShown.includes(\"title\") &&\n <>\n \t<div className=\"hc-flex hc-items-start\">\n \t\t<div className=\"hc-flex hc-justify-between hc-items-center hc-min-w-[100%]\">\n \t\t\t<h3 className=\"hc-font-bold hc-mb-3 hc-flex-1\">{item.fields.title}</h3>\n \t\t\t{includeFavorite && <div className=\"hc-flex hc-justify-end hc-pb-2\">\n \t\t\t\t<Icon\n \t\t\t\t\ticon={isFavorite ? \"mdi:heart\" : \"mdi:heart-outline\"}\n \t\t\t\t\tsize=\"hc-size-3.5\"\n \t\t\t\t\ticonClasses={isFavorite ? \"hc-text-primary\" : \"\"}\n \t\t\t\t\tclassName={`hc-transition-opacity hc-duration-300 hc-cursor-pointer\n ${isFavorite ? \"hc-opacity-100\" : \"hc-text-uiText/60 group-hover:hc-opacity-100\"}\n `}\n \t\t\t\t\tonClick={e => handleFavouriteClick(e, item)}\n \t\t\t\t/>\n \t\t\t</div>\n \t\t\t}\n \t\t</div>\n \t</div>\n \t{specialFeatures && <div className='hc-pb-4'>{specialFeaturePills(\"title\", true)} </div>}\n </>\n\t\t\t}\n\n\t\t\t<ul className=\"hc-space-y-2 hc-text-xs\">\n\t\t\t\t{[\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"category\",\n\t\t\t\t\t\tname: \"category\",\n\t\t\t\t\t\ticon: \"icon-park-solid:tree-list\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"subCategory\",\n\t\t\t\t\t\tname: \"subCategory\",\n\t\t\t\t\t\ticon: \"icon-park-solid:tree-list\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"schedule\",\n\t\t\t\t\t\tname: \"Schedule\",\n\t\t\t\t\t\ticon: \"gravity-ui:clock-fill\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"city\",\n\t\t\t\t\t\tname: \"Location\",\n\t\t\t\t\t\ticon: \"fluent:location-16-filled\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"state\",\n\t\t\t\t\t\tname: \"Location\",\n\t\t\t\t\t\ticon: \"fluent:location-16-filled\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"cityState\",\n\t\t\t\t\t\tname: \"Location\",\n\t\t\t\t\t\ticon: \"fluent:location-16-filled\"\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tfield: \"travelTime\",\n\t\t\t\t\t\tname: \"Commute\",\n\t\t\t\t\t\ticon: \"ri:pin-distance-fill\"\n\t\t\t\t\t}\n\t\t\t\t].map(listItem => (\n\t\t\t\t\t(fieldsShown.includes(listItem.field) && item.fields[listItem.field]) &&\n <li\n \tkey={listItem.field}\n \tclassName=\"hc-flex hc-gap-2\"\n >\n \t<Icon\n \t\ticon={listItem.icon}\n \t\tsize=\"hc-size-3.5\"\n \t\tclassName=\"hc-text-uiAccent/30\"\n \t/>\n \t<span className=\"hc-sr-only\">{listItem.name}</span>\n \t{item.fields[listItem.field]}\n </li>\n\t\t\t\t))}\n\t\t\t</ul>\n\t\t</Grid.Item>\n\t);\n};\n\nexport default FieldMapperMobile;"],"names":["FieldMapperMobile","_ref","item","fieldsShown","specialFeatures","handleFavouriteClick","isFavorite","_ref$includeFavorite","includeFavorite","specialFeaturePills","field","Object","entries","map","_ref2","_ref3","_slicedToArray","featureKey","featureLabel","fields","React","createElement","PillWrapper","key","Grid","Item","className","includes","Fragment","title","Icon","icon","size","iconClasses","concat","onClick","e","name","listItem"],"mappings":";;;;;;AAKA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,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AQ,CAACD,IAAW,CAAC,EAClDnC,IAAI,CAACiB,MAAM,CAACmB,QAAQ,CAAC5B,KAAK,CACxB,CAAC,CAAA;GACV,CACE,CACM,CAAC,CAAA;AAEd;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, slicedToArray as _slicedToArray, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
3
|
import Button from '../buttons/default.js';
|
|
4
4
|
|
|
5
5
|
var _excluded = ["className", "children", "field", "setSortSetting", "sortSetting", "isSortable"];
|
|
@@ -36,22 +36,22 @@ var HeaderItem = function HeaderItem(_ref) {
|
|
|
36
36
|
setIsSorted(sortSetting.type == "asc" ? SORT_STATE.sortedAsc : SORT_STATE.sortedDesc);
|
|
37
37
|
}
|
|
38
38
|
}, [sortSetting, isSorted, field]);
|
|
39
|
-
return /*#__PURE__*/
|
|
39
|
+
return /*#__PURE__*/React.createElement(Button.Btn, _extends({
|
|
40
40
|
onClick: function onClick() {
|
|
41
41
|
return handleChange(field);
|
|
42
42
|
},
|
|
43
43
|
variant: "none",
|
|
44
44
|
size: "none",
|
|
45
45
|
className: "\n\t\t\t\thc-p-2 hc-rounded-none hc-text-left hc-normal-case hover:hc-bg-uiAccent/5 focus:hc-bg-uiAccent/5\n\t\t\t\t".concat(field.toLowerCase() === "title" ? "hc-pl-7 hc-col-span-4" : field.toLowerCase() === "state" || field.toLowerCase() == "favorite" ? "hc-col-span-1" : "hc-col-span-2", "\n\t\t\t\t").concat(className !== null && className !== void 0 ? className : "", "\n\t\t\t")
|
|
46
|
-
}, rest), /*#__PURE__*/
|
|
46
|
+
}, rest), /*#__PURE__*/React.createElement(Button.Body, null, /*#__PURE__*/React.createElement("span", {
|
|
47
47
|
className: "hc-font-semibold"
|
|
48
|
-
}, children), isSortable && /*#__PURE__*/
|
|
48
|
+
}, children), isSortable && /*#__PURE__*/React.createElement("div", {
|
|
49
49
|
className: "hc-flex hc-flex-col hc-pr-2"
|
|
50
|
-
}, /*#__PURE__*/
|
|
50
|
+
}, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
51
51
|
icon: "bi:caret-up-fill",
|
|
52
52
|
size: "hc-size-2.5",
|
|
53
53
|
className: "\n\t\t\t\t\t\t\thc-transition-opacity\n\t\t\t\t\t\t\t\t".concat(isSorted === "sorted-asc" ? "hc-opacity-100 hc-text-primary" : "hc-opacity-30", "\n\t\t\t\t\t\t\t")
|
|
54
|
-
}), /*#__PURE__*/
|
|
54
|
+
}), /*#__PURE__*/React.createElement(Button.Icon, {
|
|
55
55
|
icon: "bi:caret-down-fill",
|
|
56
56
|
size: "hc-size-2.5",
|
|
57
57
|
className: "\n\t\t\t\t\t\t\t\ttransition-opacity\n\t\t\t\t\t\t\t\t".concat(isSorted === "sorted-desc" ? "hc-opacity-100" : "hc-opacity-30", "\n\t\t\t\t\t\t\t")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-item.js","sources":["../../../../src/components/modules/list/header-item.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\n\nimport Button from '~/components/modules/buttons/default';\n\nconst SORT_STATE = {\n\tnotSorted: \"not-sorted\",\n\tsortedAsc: \"sorted-asc\",\n\tsortedDesc: \"sorted-desc\"\n};\n\nconst HeaderItem = ({\n\tclassName,\n\tchildren,\n\tfield,\n\tsetSortSetting,\n\tsortSetting,\n\tisSortable,\n\t...rest\n}) => {\n\tconst [isSorted, setIsSorted] = useState(SORT_STATE.notSorted);\n\n\tconst handleChange = field => {\n\t\tif (isSortable === false)\n\t\t\treturn;\n\t\tlet setting = {\n\t\t\tfield: field,\n\t\t\ttype: isSorted === SORT_STATE.sortedAsc ? \"desc\" : \"asc\"\n\t\t};\n\t\tsetSortSetting(setting);\n\t\tisSorted === SORT_STATE.notSorted\n\t\t\t? setIsSorted(SORT_STATE.sortedAsc)\n\t\t\t: isSorted === SORT_STATE.sortedAsc\n\t\t\t\t? setIsSorted(SORT_STATE.sortedDesc)\n\t\t\t\t: setIsSorted(SORT_STATE.sortedAsc);\n\t};\n\n\tuseEffect(() => {\n\t\tif (sortSetting?.field != null && sortSetting.field != field) {\n\t\t\tsetIsSorted(SORT_STATE.notSorted);\n\t\t} else if (\n\t\t\tsortSetting?.field != null &&\n\t\t\tisSorted == SORT_STATE.notSorted &&\n\t\t\tsortSetting.field == field\n\t\t) {\n\t\t\tsetIsSorted(\n\t\t\t\tsortSetting.type == \"asc\"\n\t\t\t\t\t? SORT_STATE.sortedAsc\n\t\t\t\t\t: SORT_STATE.sortedDesc\n\t\t\t);\n\t\t}\n\t}, [sortSetting, isSorted, field]);\n\n\treturn (\n\t\t<Button.Btn\n\t\t\tonClick={() => handleChange(field)}\n\t\t\tvariant=\"none\"\n\t\t\tsize=\"none\"\n\t\t\tclassName={`\n\t\t\t\thc-p-2 hc-rounded-none hc-text-left hc-normal-case hover:hc-bg-uiAccent/5 focus:hc-bg-uiAccent/5\n\t\t\t\t${field.toLowerCase() === \"title\" ? \"hc-pl-7 hc-col-span-4\" : (field.toLowerCase() === \"state\" || field.toLowerCase() == \"favorite\") ? \"hc-col-span-1\" : \"hc-col-span-2\"}\n\t\t\t\t${className ?? \"\"}\n\t\t\t`}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<Button.Body>\n\t\t\t\t<span className=\"hc-font-semibold\">{children}</span>\n\t\t\t\t{isSortable && (\n\t\t\t\t\t<div className=\"hc-flex hc-flex-col hc-pr-2\">\n\t\t\t\t\t\t<Button.Icon\n\t\t\t\t\t\t\ticon=\"bi:caret-up-fill\"\n\t\t\t\t\t\t\tsize=\"hc-size-2.5\"\n\t\t\t\t\t\t\tclassName={`\n\t\t\t\t\t\t\thc-transition-opacity\n\t\t\t\t\t\t\t\t${isSorted === \"sorted-asc\" ? \"hc-opacity-100 hc-text-primary\" : \"hc-opacity-30\"}\n\t\t\t\t\t\t\t`}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Button.Icon\n\t\t\t\t\t\t\ticon=\"bi:caret-down-fill\"\n\t\t\t\t\t\t\tsize=\"hc-size-2.5\"\n\t\t\t\t\t\t\tclassName={`\n\t\t\t\t\t\t\t\ttransition-opacity\n\t\t\t\t\t\t\t\t${isSorted === \"sorted-desc\" ? \"hc-opacity-100\" : \"hc-opacity-30\"}\n\t\t\t\t\t\t\t`}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Button.Body>\n\t\t</Button.Btn>\n\t);\n};\n\nexport default HeaderItem;\n"],"names":["SORT_STATE","notSorted","sortedAsc","sortedDesc","HeaderItem","_ref","className","children","field","setSortSetting","sortSetting","isSortable","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isSorted","setIsSorted","handleChange","setting","type","useEffect","React","createElement","Button","Btn","_extends","onClick","variant","size","concat","toLowerCase","Body","Icon","icon"],"mappings":";;;;;AAIA,IAAMA,UAAU,GAAG;AAClBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,UAAU,EAAE,aAAA;AACb,CAAC,CAAA;AAED,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAQV;AAAA,EAAA,IAPLC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IACdC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,UAAU,GAAAN,IAAA,CAAVM,UAAU;AACPC,IAAAA,IAAI,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAAgCC,QAAQ,CAAChB,UAAU,CAACC,SAAS,CAAC;IAAAgB,UAAA,GAAAC,cAAA,CAAAH,SAAA,E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U,CAACE,SAAS,GACpBF,UAAU,CAACG,UACf,CAAC,CAAA;AACF,KAAA;GACA,EAAE,CAACO,WAAW,EAAES,QAAQ,EAAEX,KAAK,CAAC,CAAC,CAAA;EAElC,oBACCiB,
|
|
1
|
+
{"version":3,"file":"header-item.js","sources":["../../../../src/components/modules/list/header-item.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\n\nimport Button from '~/components/modules/buttons/default';\n\nconst SORT_STATE = {\n\tnotSorted: \"not-sorted\",\n\tsortedAsc: \"sorted-asc\",\n\tsortedDesc: \"sorted-desc\"\n};\n\nconst HeaderItem = ({\n\tclassName,\n\tchildren,\n\tfield,\n\tsetSortSetting,\n\tsortSetting,\n\tisSortable,\n\t...rest\n}) => {\n\tconst [isSorted, setIsSorted] = useState(SORT_STATE.notSorted);\n\n\tconst handleChange = field => {\n\t\tif (isSortable === false)\n\t\t\treturn;\n\t\tlet setting = {\n\t\t\tfield: field,\n\t\t\ttype: isSorted === SORT_STATE.sortedAsc ? \"desc\" : \"asc\"\n\t\t};\n\t\tsetSortSetting(setting);\n\t\tisSorted === SORT_STATE.notSorted\n\t\t\t? setIsSorted(SORT_STATE.sortedAsc)\n\t\t\t: isSorted === SORT_STATE.sortedAsc\n\t\t\t\t? setIsSorted(SORT_STATE.sortedDesc)\n\t\t\t\t: setIsSorted(SORT_STATE.sortedAsc);\n\t};\n\n\tuseEffect(() => {\n\t\tif (sortSetting?.field != null && sortSetting.field != field) {\n\t\t\tsetIsSorted(SORT_STATE.notSorted);\n\t\t} else if (\n\t\t\tsortSetting?.field != null &&\n\t\t\tisSorted == SORT_STATE.notSorted &&\n\t\t\tsortSetting.field == field\n\t\t) {\n\t\t\tsetIsSorted(\n\t\t\t\tsortSetting.type == \"asc\"\n\t\t\t\t\t? SORT_STATE.sortedAsc\n\t\t\t\t\t: SORT_STATE.sortedDesc\n\t\t\t);\n\t\t}\n\t}, [sortSetting, isSorted, field]);\n\n\treturn (\n\t\t<Button.Btn\n\t\t\tonClick={() => handleChange(field)}\n\t\t\tvariant=\"none\"\n\t\t\tsize=\"none\"\n\t\t\tclassName={`\n\t\t\t\thc-p-2 hc-rounded-none hc-text-left hc-normal-case hover:hc-bg-uiAccent/5 focus:hc-bg-uiAccent/5\n\t\t\t\t${field.toLowerCase() === \"title\" ? \"hc-pl-7 hc-col-span-4\" : (field.toLowerCase() === \"state\" || field.toLowerCase() == \"favorite\") ? \"hc-col-span-1\" : \"hc-col-span-2\"}\n\t\t\t\t${className ?? \"\"}\n\t\t\t`}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<Button.Body>\n\t\t\t\t<span className=\"hc-font-semibold\">{children}</span>\n\t\t\t\t{isSortable && (\n\t\t\t\t\t<div className=\"hc-flex hc-flex-col hc-pr-2\">\n\t\t\t\t\t\t<Button.Icon\n\t\t\t\t\t\t\ticon=\"bi:caret-up-fill\"\n\t\t\t\t\t\t\tsize=\"hc-size-2.5\"\n\t\t\t\t\t\t\tclassName={`\n\t\t\t\t\t\t\thc-transition-opacity\n\t\t\t\t\t\t\t\t${isSorted === \"sorted-asc\" ? \"hc-opacity-100 hc-text-primary\" : \"hc-opacity-30\"}\n\t\t\t\t\t\t\t`}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Button.Icon\n\t\t\t\t\t\t\ticon=\"bi:caret-down-fill\"\n\t\t\t\t\t\t\tsize=\"hc-size-2.5\"\n\t\t\t\t\t\t\tclassName={`\n\t\t\t\t\t\t\t\ttransition-opacity\n\t\t\t\t\t\t\t\t${isSorted === \"sorted-desc\" ? \"hc-opacity-100\" : \"hc-opacity-30\"}\n\t\t\t\t\t\t\t`}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Button.Body>\n\t\t</Button.Btn>\n\t);\n};\n\nexport default HeaderItem;\n"],"names":["SORT_STATE","notSorted","sortedAsc","sortedDesc","HeaderItem","_ref","className","children","field","setSortSetting","sortSetting","isSortable","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isSorted","setIsSorted","handleChange","setting","type","useEffect","React","createElement","Button","Btn","_extends","onClick","variant","size","concat","toLowerCase","Body","Icon","icon"],"mappings":";;;;;AAIA,IAAMA,UAAU,GAAG;AAClBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,SAAS,EAAE,YAAY;AACvBC,EAAAA,UAAU,EAAE,aAAA;AACb,CAAC,CAAA;AAED,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAQV;AAAA,EAAA,IAPLC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IACdC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,UAAU,GAAAN,IAAA,CAAVM,UAAU;AACPC,IAAAA,IAAI,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAAgCC,QAAQ,CAAChB,UAAU,CAACC,SAAS,CAAC;IAAAgB,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAvDI,IAAAA,QAAQ,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,WAAW,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAE5B,EAAA,IAAMI,YAAY,GAAG,SAAfA,YAAYA,CAAGb,KAAK,EAAI;IAC7B,IAAIG,UAAU,KAAK,KAAK,EACvB,OAAA;AACD,IAAA,IAAIW,OAAO,GAAG;AACbd,MAAAA,KAAK,EAAEA,KAAK;MACZe,IAAI,EAAEJ,QAAQ,KAAKnB,UAAU,CAACE,SAAS,GAAG,MAAM,GAAG,KAAA;KACnD,CAAA;IACDO,cAAc,CAACa,OAAO,CAAC,CAAA;AACvBH,IAAAA,QAAQ,KAAKnB,UAAU,CAACC,SAAS,GAC9Bm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AAE,KAAK,OAAO,IAAI1B,KAAK,CAAC0B,WAAW,EAAE,IAAI,UAAU,GAAI,eAAe,GAAG,eAAe,EAAAD,YAAAA,CAAAA,CAAAA,MAAA,CACtK3B,SAAS,KAAA,IAAA,IAATA,SAAS,KAATA,KAAAA,CAAAA,GAAAA,SAAS,GAAI,EAAE,EAAA,UAAA,CAAA;AAChB,GAAA,EACEM,IAAI,CAAA,eAERa,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACQ,IAAI,EAAA,IAAA,eACXV,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMpB,IAAAA,SAAS,EAAC,kBAAA;AAAkB,GAAA,EAAEC,QAAe,CAAC,EACnDI,UAAU,iBACVc,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKpB,IAAAA,SAAS,EAAC,6BAAA;AAA6B,GAAA,eAC3CmB,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACS,IAAI,EAAA;AACXC,IAAAA,IAAI,EAAC,kBAAkB;AACvBL,IAAAA,IAAI,EAAC,aAAa;IAClB1B,SAAS,EAAA,yDAAA,CAAA2B,MAAA,CAENd,QAAQ,KAAK,YAAY,GAAG,gCAAgC,GAAG,eAAe,EAAA,kBAAA,CAAA;GAEjF,CAAC,eACFM,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACS,IAAI,EAAA;AACXC,IAAAA,IAAI,EAAC,oBAAoB;AACzBL,IAAAA,IAAI,EAAC,aAAa;IAClB1B,SAAS,EAAA,wDAAA,CAAA2B,MAAA,CAENd,QAAQ,KAAK,aAAa,GAAG,gBAAgB,GAAG,eAAe,EAAA,kBAAA,CAAA;GAElE,CACG,CAEM,CACF,CAAC,CAAA;AAEf;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { twMerge } from '../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
4
4
|
import Grid from '../grid.js';
|
|
5
5
|
import HeaderItem from './header-item.js';
|
|
@@ -16,7 +16,7 @@ var ListHeader = function ListHeader(_ref) {
|
|
|
16
16
|
_ref$includeFavorite = _ref.includeFavorite,
|
|
17
17
|
includeFavorite = _ref$includeFavorite === void 0 ? false : _ref$includeFavorite,
|
|
18
18
|
scrollbarWidth = _ref.scrollbarWidth;
|
|
19
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/React.createElement(Grid, {
|
|
20
20
|
columns: "hc-grid-flow-col hc-auto-cols-fr",
|
|
21
21
|
gap: "hc-gap-0",
|
|
22
22
|
style: {
|
|
@@ -24,14 +24,14 @@ var ListHeader = function ListHeader(_ref) {
|
|
|
24
24
|
},
|
|
25
25
|
className: twMerge(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\thc-hidden md:hc-grid hc-bg-uiAccent/10 hc-border-b hc-border-uiAccent/10 hc-sticky hc-top-0 hc-z-10\n\t\t\t\t", "\n\t\t\t"])), className !== null && className !== void 0 ? className : "")
|
|
26
26
|
}, fieldsShown.map(function (field) {
|
|
27
|
-
return /*#__PURE__*/
|
|
27
|
+
return /*#__PURE__*/React.createElement(HeaderItem, {
|
|
28
28
|
key: field,
|
|
29
29
|
isSortable: fieldIsSortable,
|
|
30
30
|
sortSetting: sortSetting,
|
|
31
31
|
field: field,
|
|
32
32
|
setSortSetting: setSortSetting
|
|
33
33
|
}, fieldNames[field]);
|
|
34
|
-
}), includeFavorite == true && /*#__PURE__*/
|
|
34
|
+
}), includeFavorite == true && /*#__PURE__*/React.createElement(HeaderItem, {
|
|
35
35
|
key: "favorite",
|
|
36
36
|
isSortable: true,
|
|
37
37
|
sortSetting: sortSetting,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sources":["../../../../src/components/modules/list/header.js"],"sourcesContent":["import React from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nimport Grid from '~/components/modules/grid';\nimport HeaderItem from '~/components/modules/list/header-item';\n\nconst ListHeader = ({\n\tclassName,\n\tfieldsShown,\n\tfieldNames,\n\tfieldIsSortable = true,\n\tsetSortSetting,\n\tsortSetting,\n\tincludeFavorite = false,\n\tscrollbarWidth\n}) => {\n\treturn (\n\t\t<Grid\n\t\t\tcolumns=\"hc-grid-flow-col hc-auto-cols-fr\"\n\t\t\tgap=\"hc-gap-0\"\n\t\t\tstyle={{ paddingRight: `${scrollbarWidth && scrollbarWidth > 0 ? scrollbarWidth + 6 : 1 }px` }}\n\t\t\tclassName={twMerge`\n\t\t\t\thc-hidden md:hc-grid hc-bg-uiAccent/10 hc-border-b hc-border-uiAccent/10 hc-sticky hc-top-0 hc-z-10\n\t\t\t\t${className ?? \"\"}\n\t\t\t`}\n\t\t>\n\t\t\t{fieldsShown.map(field => (\n\t\t\t\t<HeaderItem\n\t\t\t\t\tkey={field}\n\t\t\t\t\tisSortable={fieldIsSortable}\n\t\t\t\t\tsortSetting={sortSetting}\n\t\t\t\t\tfield={field}\n\t\t\t\t\tsetSortSetting={setSortSetting}\n\t\t\t\t>\n\t\t\t\t\t{fieldNames[field]}\n\t\t\t\t</HeaderItem>\n\t\t\t))}\n\t\t\t{ includeFavorite == true &&\n\t\t\t<HeaderItem key={\"favorite\"}\n\t\t\t\tisSortable={true}\n\t\t\t\tsortSetting={sortSetting}\n\t\t\t\tfield={\"favorite\"}\n\t\t\t\tsetSortSetting={setSortSetting}\n\t\t\t>\n\t\t\t\tFavorite\n\t\t\t</HeaderItem>\n\t\t\t}\n\t\t</Grid>\n\t);\n};\n\nexport default ListHeader;\n"],"names":["ListHeader","_ref","className","fieldsShown","fieldNames","_ref$fieldIsSortable","fieldIsSortable","setSortSetting","sortSetting","_ref$includeFavorite","includeFavorite","scrollbarWidth","React","createElement","Grid","columns","gap","style","paddingRight","concat","twMerge","_templateObject","_taggedTemplateLiteral","map","field","HeaderItem","key","isSortable"],"mappings":";;;;;;;AAMA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EASV;AAAA,EAAA,IARLC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IAAAC,oBAAA,GAAAJ,IAAA,CACVK,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,oBAAA;IACtBE,cAAc,GAAAN,IAAA,CAAdM,cAAc;IACdC,WAAW,GAAAP,IAAA,CAAXO,WAAW;IAAAC,oBAAA,GAAAR,IAAA,CACXS,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,oBAAA;IACvBE,cAAc,GAAAV,IAAA,CAAdU,cAAc,CAAA;AAEd,EAAA,oBACCC,
|
|
1
|
+
{"version":3,"file":"header.js","sources":["../../../../src/components/modules/list/header.js"],"sourcesContent":["import React from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nimport Grid from '~/components/modules/grid';\nimport HeaderItem from '~/components/modules/list/header-item';\n\nconst ListHeader = ({\n\tclassName,\n\tfieldsShown,\n\tfieldNames,\n\tfieldIsSortable = true,\n\tsetSortSetting,\n\tsortSetting,\n\tincludeFavorite = false,\n\tscrollbarWidth\n}) => {\n\treturn (\n\t\t<Grid\n\t\t\tcolumns=\"hc-grid-flow-col hc-auto-cols-fr\"\n\t\t\tgap=\"hc-gap-0\"\n\t\t\tstyle={{ paddingRight: `${scrollbarWidth && scrollbarWidth > 0 ? scrollbarWidth + 6 : 1 }px` }}\n\t\t\tclassName={twMerge`\n\t\t\t\thc-hidden md:hc-grid hc-bg-uiAccent/10 hc-border-b hc-border-uiAccent/10 hc-sticky hc-top-0 hc-z-10\n\t\t\t\t${className ?? \"\"}\n\t\t\t`}\n\t\t>\n\t\t\t{fieldsShown.map(field => (\n\t\t\t\t<HeaderItem\n\t\t\t\t\tkey={field}\n\t\t\t\t\tisSortable={fieldIsSortable}\n\t\t\t\t\tsortSetting={sortSetting}\n\t\t\t\t\tfield={field}\n\t\t\t\t\tsetSortSetting={setSortSetting}\n\t\t\t\t>\n\t\t\t\t\t{fieldNames[field]}\n\t\t\t\t</HeaderItem>\n\t\t\t))}\n\t\t\t{ includeFavorite == true &&\n\t\t\t<HeaderItem key={\"favorite\"}\n\t\t\t\tisSortable={true}\n\t\t\t\tsortSetting={sortSetting}\n\t\t\t\tfield={\"favorite\"}\n\t\t\t\tsetSortSetting={setSortSetting}\n\t\t\t>\n\t\t\t\tFavorite\n\t\t\t</HeaderItem>\n\t\t\t}\n\t\t</Grid>\n\t);\n};\n\nexport default ListHeader;\n"],"names":["ListHeader","_ref","className","fieldsShown","fieldNames","_ref$fieldIsSortable","fieldIsSortable","setSortSetting","sortSetting","_ref$includeFavorite","includeFavorite","scrollbarWidth","React","createElement","Grid","columns","gap","style","paddingRight","concat","twMerge","_templateObject","_taggedTemplateLiteral","map","field","HeaderItem","key","isSortable"],"mappings":";;;;;;;AAMA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EASV;AAAA,EAAA,IARLC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IAAAC,oBAAA,GAAAJ,IAAA,CACVK,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,oBAAA;IACtBE,cAAc,GAAAN,IAAA,CAAdM,cAAc;IACdC,WAAW,GAAAP,IAAA,CAAXO,WAAW;IAAAC,oBAAA,GAAAR,IAAA,CACXS,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,oBAAA;IACvBE,cAAc,GAAAV,IAAA,CAAdU,cAAc,CAAA;AAEd,EAAA,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../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { twMerge } from '../../../../node_modules/tailwind-merge/dist/bundle-mjs.js';
|
|
4
4
|
|
|
5
5
|
var _excluded = ["className", "content"];
|
|
@@ -7,7 +7,7 @@ var CardItemExpand = function CardItemExpand(_ref) {
|
|
|
7
7
|
var className = _ref.className,
|
|
8
8
|
content = _ref.content,
|
|
9
9
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
-
return /*#__PURE__*/
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
11
11
|
className: twMerge('hc-flex hc-flex-col lg:hc-flex-row hc-flex-wrap hc-items-stretch hc-gap-x-4 hc-w-full lg:hc-pt-2 hc-border-t hc-border-uiAccent/20', className !== null && className !== void 0 ? className : '')
|
|
12
12
|
}, props), content);
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/modules/list/item-expand-card/index.js"],"sourcesContent":["import React from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nconst CardItemExpand = ({\n\tclassName,\n\tcontent,\n\t...props\n}) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={twMerge(\n\t\t\t\t'hc-flex hc-flex-col lg:hc-flex-row hc-flex-wrap hc-items-stretch hc-gap-x-4 hc-w-full lg:hc-pt-2 hc-border-t hc-border-uiAccent/20',\n\t\t\t\tclassName ?? ''\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{content}\n\t\t</div>\n\t);\n};\n\nexport default CardItemExpand;\n"],"names":["CardItemExpand","_ref","className","content","props","_objectWithoutProperties","_excluded","React","createElement","_extends","twMerge"],"mappings":";;;;;AAGA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAId;AAAA,EAAA,IAHLC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,OAAO,GAAAF,IAAA,CAAPE,OAAO;AACJC,IAAAA,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAER,EAAA,oBACCC,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/modules/list/item-expand-card/index.js"],"sourcesContent":["import React from 'react';\nimport { twMerge } from 'tailwind-merge';\n\nconst CardItemExpand = ({\n\tclassName,\n\tcontent,\n\t...props\n}) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={twMerge(\n\t\t\t\t'hc-flex hc-flex-col lg:hc-flex-row hc-flex-wrap hc-items-stretch hc-gap-x-4 hc-w-full lg:hc-pt-2 hc-border-t hc-border-uiAccent/20',\n\t\t\t\tclassName ?? ''\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{content}\n\t\t</div>\n\t);\n};\n\nexport default CardItemExpand;\n"],"names":["CardItemExpand","_ref","className","content","props","_objectWithoutProperties","_excluded","React","createElement","_extends","twMerge"],"mappings":";;;;;AAGA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAId;AAAA,EAAA,IAHLC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,OAAO,GAAAF,IAAA,CAAPE,OAAO;AACJC,IAAAA,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAER,EAAA,oBACCC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAAC,QAAA,CAAA;IACCP,SAAS,EAAEQ,OAAO,CACjB,oIAAoI,EACpIR,SAAS,KAAA,IAAA,IAATA,SAAS,KAAA,KAAA,CAAA,GAATA,SAAS,GAAI,EACd,CAAA;GACIE,EAAAA,KAAK,CAERD,EAAAA,OACG,CAAC,CAAA;AAER;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import ListHeader from './header.js';
|
|
3
3
|
import FilterSort from '../filter/sort.js';
|
|
4
4
|
import Loading from '../../../util/loading.js';
|
|
@@ -28,26 +28,26 @@ const ItemsList = ({ fieldNames, showMap, fieldsShown, filteredListings, loading
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
}, [scrollContainerRef]);
|
|
31
|
-
return (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
loading &&
|
|
35
|
-
!loading &&
|
|
31
|
+
return (React.createElement("div", { className: "hc-relative hc-bg-white md:hc-px-4 hc-flex hc-flex-col hc-h-[100%]" },
|
|
32
|
+
React.createElement("div", { className: "hc-flex hc-flex-wrap hc-items-center hc-justify-between hc-gap-4 md:hc-mb-2 hc-p-3 md:hc-p-0 hc-bg-uiAccent/10 md:hc-bg-transparent hc-border-b md:hc-border-none hc-border-uiAccent/20" },
|
|
33
|
+
React.createElement("h2", { className: "hc-text-gray-500 hc-font-semibold hc-text-xs md:hc-text-sm" },
|
|
34
|
+
loading && React.createElement("span", null, "Loading..."),
|
|
35
|
+
!loading && React.createElement("span", null,
|
|
36
36
|
filteredListings.length,
|
|
37
37
|
" results")),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
React.createElement("div", { className: "hc-block md:hc-hidden" },
|
|
39
|
+
React.createElement(FilterSort, { className: '', fields: fieldsShown, setSortSetting: setSortSetting, fieldNames: fieldNames }))),
|
|
40
|
+
React.createElement("div", null,
|
|
41
|
+
React.createElement(ListHeader, { className: '', setSortSetting: setSortSetting, sortSetting: sortSetting, fieldsShown: fieldsShown, fieldNames: fieldNames, includeFavorite: includeFavorite, scrollbarWidth: scrollbarWidth })),
|
|
42
|
+
React.createElement("div", { ref: scrollContainerRef, className: `
|
|
43
43
|
hc-flex-grow hc-overflow-y-auto
|
|
44
44
|
${showMap ? " hc-max-h-[88%] md:hc-max-[100%]" : "md:hc-max-h-[95%] hc-max-h-[95%]"}
|
|
45
45
|
` },
|
|
46
|
-
loading ? (
|
|
47
|
-
|
|
48
|
-
filteredListings.length >= itemLimit &&
|
|
46
|
+
loading ? (React.createElement("div", { className: "hc-flex hc-justify-center hc-items-center hc-pt-20" },
|
|
47
|
+
React.createElement(Loading, null))) : (children),
|
|
48
|
+
filteredListings.length >= itemLimit && React.createElement("div", { ref: loader, style: { height: "100px", textAlign: "center" } },
|
|
49
49
|
" ",
|
|
50
|
-
|
|
50
|
+
React.createElement(Loading, null)))));
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export { ItemsList as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-list.js","sources":["../../../../src/components/modules/list/item-list.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, RefObject, ReactNode } from 'react';\nimport Header from '~/components/modules/list/header';\nimport Sort from '~/components/modules/filter/sort';\nimport Loading from \"~/util/loading\";\nimport { Listing } from '~/types/Listings';\n\ninterface ItemsListProps {\n fieldNames: Record<string, string>;\n showMap: boolean;\n fieldsShown: string[];\n filteredListings: Listing[];\n loading: boolean;\n sortSetting: any;\n setSortSetting: (setting: any) => void;\n itemLimit: number;\n loader: RefObject<HTMLDivElement>;\n scrollContainerRef: RefObject<HTMLDivElement>;\n itemRefs: any;\n selectedListItem: Listing | null;\n children: ReactNode;\n includeFavorite: boolean;\n}\n\nconst ItemsList: React.FC<ItemsListProps> = ({\n fieldNames,\n showMap,\n fieldsShown,\n filteredListings,\n loading,\n sortSetting,\n setSortSetting,\n itemLimit,\n loader,\n scrollContainerRef,\n includeFavorite = false,\n children\n}) => {\n const [scrollbarWidth, setScrollbarWidth] = useState<number>(0);\n\n const checkScrollbar = () => {\n if (scrollContainerRef.current) {\n const { scrollHeight, clientHeight, offsetWidth, clientWidth } = scrollContainerRef.current;\n const hasVerticalScrollbar = scrollHeight > clientHeight;\n const newScrollbarWidth = hasVerticalScrollbar ? offsetWidth - clientWidth : 0;\n setScrollbarWidth(newScrollbarWidth);\n }\n };\n\n useEffect(() => {\n checkScrollbar();\n\n const resizeObserver = new ResizeObserver(() => checkScrollbar());\n const mutationObserver = new MutationObserver(() => checkScrollbar());\n\n if (scrollContainerRef.current) {\n resizeObserver.observe(scrollContainerRef.current);\n mutationObserver.observe(scrollContainerRef.current, { childList: true, subtree: true, attributes: true });\n }\n\n return () => {\n if (scrollContainerRef.current) {\n resizeObserver.unobserve(scrollContainerRef.current);\n mutationObserver.disconnect();\n }\n };\n }, [scrollContainerRef]);\n\n return (\n <div className=\"hc-relative hc-bg-white md:hc-px-4 hc-flex hc-flex-col hc-h-[100%]\">\n <div className=\"hc-flex hc-flex-wrap hc-items-center hc-justify-between hc-gap-4 md:hc-mb-2 hc-p-3 md:hc-p-0 hc-bg-uiAccent/10 md:hc-bg-transparent hc-border-b md:hc-border-none hc-border-uiAccent/20\">\n <h2 className=\"hc-text-gray-500 hc-font-semibold hc-text-xs md:hc-text-sm\">\n {loading && <span>Loading...</span>}\n {!loading && <span>{filteredListings.length} results</span>}\n </h2>\n <div className=\"hc-block md:hc-hidden\">\n <Sort\n className={''}\n fields={fieldsShown}\n setSortSetting={setSortSetting}\n fieldNames={fieldNames}\n />\n </div>\n </div>\n <div>\n <Header\n className={''}\n setSortSetting={setSortSetting}\n sortSetting={sortSetting}\n fieldsShown={fieldsShown}\n fieldNames={fieldNames}\n includeFavorite={includeFavorite}\n scrollbarWidth={scrollbarWidth}\n />\n </div>\n <div\n ref={scrollContainerRef}\n className={`\n hc-flex-grow hc-overflow-y-auto\n ${showMap ? \" hc-max-h-[88%] md:hc-max-[100%]\" : \"md:hc-max-h-[95%] hc-max-h-[95%]\"}\n `}\n >\n {loading ? (\n <div className=\"hc-flex hc-justify-center hc-items-center hc-pt-20\">\n <Loading />\n </div>\n ) : (\n children\n )}\n {filteredListings.length >= itemLimit &&<div ref={loader} style={{ height: \"100px\", textAlign: \"center\" }}> <Loading /></div>}\n </div>\n </div>\n );\n};\n\nexport default ItemsList;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"item-list.js","sources":["../../../../src/components/modules/list/item-list.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, RefObject, ReactNode } from 'react';\nimport Header from '~/components/modules/list/header';\nimport Sort from '~/components/modules/filter/sort';\nimport Loading from \"~/util/loading\";\nimport { Listing } from '~/types/Listings';\n\ninterface ItemsListProps {\n fieldNames: Record<string, string>;\n showMap: boolean;\n fieldsShown: string[];\n filteredListings: Listing[];\n loading: boolean;\n sortSetting: any;\n setSortSetting: (setting: any) => void;\n itemLimit: number;\n loader: RefObject<HTMLDivElement>;\n scrollContainerRef: RefObject<HTMLDivElement>;\n itemRefs: any;\n selectedListItem: Listing | null;\n children: ReactNode;\n includeFavorite: boolean;\n}\n\nconst ItemsList: React.FC<ItemsListProps> = ({\n fieldNames,\n showMap,\n fieldsShown,\n filteredListings,\n loading,\n sortSetting,\n setSortSetting,\n itemLimit,\n loader,\n scrollContainerRef,\n includeFavorite = false,\n children\n}) => {\n const [scrollbarWidth, setScrollbarWidth] = useState<number>(0);\n\n const checkScrollbar = () => {\n if (scrollContainerRef.current) {\n const { scrollHeight, clientHeight, offsetWidth, clientWidth } = scrollContainerRef.current;\n const hasVerticalScrollbar = scrollHeight > clientHeight;\n const newScrollbarWidth = hasVerticalScrollbar ? offsetWidth - clientWidth : 0;\n setScrollbarWidth(newScrollbarWidth);\n }\n };\n\n useEffect(() => {\n checkScrollbar();\n\n const resizeObserver = new ResizeObserver(() => checkScrollbar());\n const mutationObserver = new MutationObserver(() => checkScrollbar());\n\n if (scrollContainerRef.current) {\n resizeObserver.observe(scrollContainerRef.current);\n mutationObserver.observe(scrollContainerRef.current, { childList: true, subtree: true, attributes: true });\n }\n\n return () => {\n if (scrollContainerRef.current) {\n resizeObserver.unobserve(scrollContainerRef.current);\n mutationObserver.disconnect();\n }\n };\n }, [scrollContainerRef]);\n\n return (\n <div className=\"hc-relative hc-bg-white md:hc-px-4 hc-flex hc-flex-col hc-h-[100%]\">\n <div className=\"hc-flex hc-flex-wrap hc-items-center hc-justify-between hc-gap-4 md:hc-mb-2 hc-p-3 md:hc-p-0 hc-bg-uiAccent/10 md:hc-bg-transparent hc-border-b md:hc-border-none hc-border-uiAccent/20\">\n <h2 className=\"hc-text-gray-500 hc-font-semibold hc-text-xs md:hc-text-sm\">\n {loading && <span>Loading...</span>}\n {!loading && <span>{filteredListings.length} results</span>}\n </h2>\n <div className=\"hc-block md:hc-hidden\">\n <Sort\n className={''}\n fields={fieldsShown}\n setSortSetting={setSortSetting}\n fieldNames={fieldNames}\n />\n </div>\n </div>\n <div>\n <Header\n className={''}\n setSortSetting={setSortSetting}\n sortSetting={sortSetting}\n fieldsShown={fieldsShown}\n fieldNames={fieldNames}\n includeFavorite={includeFavorite}\n scrollbarWidth={scrollbarWidth}\n />\n </div>\n <div\n ref={scrollContainerRef}\n className={`\n hc-flex-grow hc-overflow-y-auto\n ${showMap ? \" hc-max-h-[88%] md:hc-max-[100%]\" : \"md:hc-max-h-[95%] hc-max-h-[95%]\"}\n `}\n >\n {loading ? (\n <div className=\"hc-flex hc-justify-center hc-items-center hc-pt-20\">\n <Loading />\n </div>\n ) : (\n children\n )}\n {filteredListings.length >= itemLimit &&<div ref={loader} style={{ height: \"100px\", textAlign: \"center\" }}> <Loading /></div>}\n </div>\n </div>\n );\n};\n\nexport default ItemsList;\n"],"names":["Sort","Header"],"mappings":";;;;;AAuBA,MAAM,SAAS,GAA6B,CAAC,EAC3C,UAAU,EACV,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,WAAW,EACX,cAAc,EACd,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,eAAe,GAAG,KAAK,EACvB,QAAQ,EACT,KAAI;IACH,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAEhE,MAAM,cAAc,GAAG,MAAK;QAC1B,IAAI,kBAAkB,CAAC,OAAO,EAAE;AAC9B,YAAA,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,kBAAkB,CAAC,OAAO,C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