@abcagency/hc-ui-components 1.9.32 → 1.9.34
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/README.md +323 -0
- package/dist/components/HireControlMap.js +11 -4
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/containers/accordions/filter-container.js +4 -1
- package/dist/components/containers/accordions/filter-container.js.map +1 -1
- package/dist/components/containers/accordions/filter-item-container.js +7 -4
- package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js +4 -1
- package/dist/components/containers/accordions/map-accordion-item-container.js.map +1 -1
- package/dist/components/containers/filter/commute-container.js +4 -1
- package/dist/components/containers/filter/commute-container.js.map +1 -1
- package/dist/components/containers/filter/filter-container.js +4 -1
- package/dist/components/containers/filter/filter-container.js.map +1 -1
- package/dist/components/containers/filter/filter-item-container.js +3 -1
- package/dist/components/containers/filter/filter-item-container.js.map +1 -1
- package/dist/components/containers/filter/location-container.js +4 -1
- package/dist/components/containers/filter/location-container.js.map +1 -1
- package/dist/components/containers/filter/points-of-interest-container.js +5 -2
- 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 +4 -1
- package/dist/components/containers/filter/points-of-interest-radio-item-container.js.map +1 -1
- package/dist/components/containers/filter/search-container.js +4 -1
- package/dist/components/containers/filter/search-container.js.map +1 -1
- package/dist/components/containers/jobListing/listing-details-container.js +4 -1
- package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
- package/dist/components/containers/list/item-list-container.js +3 -2
- package/dist/components/containers/list/item-list-container.js.map +1 -1
- package/dist/components/containers/list/list-item/list-item-container.js +4 -4
- package/dist/components/containers/list/list-item/list-item-container.js.map +1 -1
- package/dist/components/containers/maps/info-window-content-container.js +4 -1
- package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js +13 -3
- package/dist/components/containers/maps/map-container.js.map +1 -1
- package/dist/components/containers/maps/map-list-container.js +4 -1
- package/dist/components/containers/maps/map-list-container.js.map +1 -1
- package/dist/components/containers/maps/map-marker-container.js +6 -3
- package/dist/components/containers/maps/map-marker-container.js.map +1 -1
- package/dist/components/modules/list/item-expand-card/recruiter-contact-nav.js +38 -0
- package/dist/components/modules/list/item-expand-card/recruiter-contact-nav.js.map +1 -0
- package/dist/components/modules/list/item-expand-card/recruiter-details.js +40 -0
- package/dist/components/modules/list/item-expand-card/recruiter-details.js.map +1 -0
- package/dist/components/modules/list/item-expand-card/recruiter-headshot.js +20 -0
- package/dist/components/modules/list/item-expand-card/recruiter-headshot.js.map +1 -0
- package/dist/contexts/componentContext.js +164 -0
- package/dist/contexts/componentContext.js.map +1 -0
- package/dist/contexts/mapListContext.js +13 -1
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/types/components/containers/accordions/filter-item-container.d.ts +10 -0
- package/dist/types/components/containers/filter/filter-item-container.d.ts +16 -0
- package/dist/types/components/modules/accordions/filterItem.d.ts +8 -0
- package/dist/types/components/modules/accordions/filters.d.ts +9 -0
- package/dist/types/components/modules/buttons/items-pill.d.ts +3 -0
- package/dist/types/components/modules/buttons/show-all-button.d.ts +12 -0
- package/dist/types/components/modules/cards/default.d.ts +46 -0
- package/dist/types/components/modules/cards/filter.d.ts +18 -0
- package/dist/types/components/modules/filter/commute.d.ts +19 -0
- package/dist/types/components/modules/filter/index.d.ts +12 -0
- package/dist/types/components/modules/filter/item.d.ts +18 -0
- package/dist/types/components/modules/filter/location.d.ts +13 -0
- package/dist/types/components/modules/filter/radio-item.d.ts +10 -0
- package/dist/types/components/modules/filter/search.d.ts +13 -0
- package/dist/types/components/modules/list/item-expand-card/recruiter-contact-nav.d.ts +17 -0
- package/dist/types/components/modules/list/item-expand-card/recruiter-details.d.ts +21 -0
- package/dist/types/components/modules/list/item-expand-card/recruiter-headshot.d.ts +8 -0
- package/dist/types/components/modules/maps/info-window-card.d.ts +7 -0
- package/dist/types/components/modules/maps/info-window-content.d.ts +8 -0
- package/dist/types/components/modules/maps/map-list.d.ts +11 -0
- package/dist/types/components/modules/maps/map-marker.d.ts +12 -0
- package/dist/types/components/modules/maps/map.d.ts +18 -0
- package/dist/types/components/modules/maps/place-marker.d.ts +10 -0
- package/dist/types/components/modules/maps/tabs.d.ts +9 -0
- package/dist/types/util/twMerge.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/HireControlMap.js +49 -35
- package/src/components/containers/accordions/filter-container.js +4 -1
- package/src/components/containers/accordions/filter-item-container.js +4 -2
- package/src/components/containers/accordions/map-accordion-item-container.js +4 -1
- package/src/components/containers/filter/commute-container.js +4 -1
- package/src/components/containers/filter/filter-container.js +4 -1
- package/src/components/containers/filter/filter-item-container.js +2 -1
- package/src/components/containers/filter/location-container.js +4 -1
- package/src/components/containers/filter/points-of-interest-container.js +4 -2
- package/src/components/containers/filter/points-of-interest-radio-item-container.js +4 -1
- package/src/components/containers/filter/search-container.js +4 -1
- package/src/components/containers/jobListing/listing-details-container.js +4 -1
- package/src/components/containers/list/item-list-container.tsx +4 -2
- package/src/components/containers/list/list-item/list-item-container.js +5 -4
- package/src/components/containers/maps/info-window-content-container.js +4 -1
- package/src/components/containers/maps/map-container.js +12 -3
- package/src/components/containers/maps/map-list-container.js +5 -2
- package/src/components/containers/maps/map-marker-container.js +4 -2
- package/src/contexts/componentContext.tsx +213 -0
- package/src/contexts/mapListContext.tsx +15 -1
- package/src/index.js +8 -0
package/README.md
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
# HireControl UI Components
|
|
2
|
+
|
|
3
|
+
A flexible, customizable React component library for job search interfaces with integrated maps and filtering.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🗺️ **Interactive Map Integration** - Google Maps with job location markers
|
|
8
|
+
- 🔍 **Advanced Filtering** - Multi-faceted search with dynamic counts
|
|
9
|
+
- 📱 **Mobile Responsive** - Tab-based mobile interface
|
|
10
|
+
- 🎨 **Fully Customizable** - Override any component with your own
|
|
11
|
+
- ⚡ **Performance Optimized** - Lazy loading and efficient rendering
|
|
12
|
+
- 🎯 **Type Safe** - TypeScript support
|
|
13
|
+
- 🧩 **Modular Architecture** - Use what you need
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @hirecontrol/hc-ui-components
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
import { HireControlMap } from '@hirecontrol/hc-ui-components';
|
|
25
|
+
|
|
26
|
+
function App() {
|
|
27
|
+
return (
|
|
28
|
+
<HireControlMap
|
|
29
|
+
googleMapsApiKey="your-api-key"
|
|
30
|
+
siteConfiguration={siteConfig}
|
|
31
|
+
listings={listings}
|
|
32
|
+
entities={entities}
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Component Customization
|
|
39
|
+
|
|
40
|
+
**NEW!** Override any component to customize the UI while preserving all business logic:
|
|
41
|
+
|
|
42
|
+
```jsx
|
|
43
|
+
import { HireControlMap } from '@hirecontrol/hc-ui-components';
|
|
44
|
+
import MyCustomFilter from './MyCustomFilter';
|
|
45
|
+
import MyCustomListItem from './MyCustomListItem';
|
|
46
|
+
|
|
47
|
+
<HireControlMap
|
|
48
|
+
googleMapsApiKey="your-api-key"
|
|
49
|
+
siteConfiguration={siteConfig}
|
|
50
|
+
listings={listings}
|
|
51
|
+
entities={entities}
|
|
52
|
+
components={{
|
|
53
|
+
Filter: MyCustomFilter,
|
|
54
|
+
ListItem: MyCustomListItem,
|
|
55
|
+
MapMarker: MyCustomMapMarker,
|
|
56
|
+
// Override any component you want
|
|
57
|
+
}}
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Available Components
|
|
62
|
+
|
|
63
|
+
- **Map Components**: `MapList`, `MapTabs`, `Map`, `MapMarker`, `PlaceMarker`, `InfoWindowCard`
|
|
64
|
+
- **Filter Components**: `Filter`, `FilterItem`, `FilterSearch`, `FilterLocation`, `FilterCommute`
|
|
65
|
+
- **List Components**: `ListItem`, `ItemsList`, `ListHeader`, `FieldMapperDesktop`, `FieldMapperMobile`
|
|
66
|
+
- **Accordion Components**: `Accordion`, `FiltersAccordion`, `FilterItemAccordion`, `MapAccordionItem`
|
|
67
|
+
- **Button Components**: `Button`, `ButtonGroupApply`, `ItemsPill`, `ShowAllButton`
|
|
68
|
+
- **Card Components**: `Card`, `CardFilter`
|
|
69
|
+
- **Dialog Components**: `ApplyDialog`
|
|
70
|
+
- **Utility Components**: `Grid`, `Icon`
|
|
71
|
+
|
|
72
|
+
See [Component Customization Guide](./docs/COMPONENT_CUSTOMIZATION.md) for detailed documentation.
|
|
73
|
+
|
|
74
|
+
## Props
|
|
75
|
+
|
|
76
|
+
### Required Props
|
|
77
|
+
|
|
78
|
+
| Prop | Type | Description |
|
|
79
|
+
|------|------|-------------|
|
|
80
|
+
| `googleMapsApiKey` | string | Google Maps API key |
|
|
81
|
+
| `siteConfiguration` | object | Site configuration object |
|
|
82
|
+
| `listings` | array | Job listings data |
|
|
83
|
+
|
|
84
|
+
### Optional Props
|
|
85
|
+
|
|
86
|
+
| Prop | Type | Default | Description |
|
|
87
|
+
|------|------|---------|-------------|
|
|
88
|
+
| `entities` | array | `[]` | Entity/location data |
|
|
89
|
+
| `components` | object | `{}` | Component overrides |
|
|
90
|
+
| `containerStyle` | object | `{ height: '100vh' }` | Container styling |
|
|
91
|
+
| `hideMap` | boolean | `false` | Hide map view |
|
|
92
|
+
| `hideFilters` | boolean | `false` | Hide filter panel |
|
|
93
|
+
| `filterConfig` | object | `{}` | Filter configuration |
|
|
94
|
+
| `trackEvent` | function | Console log | Analytics tracking |
|
|
95
|
+
| `navigateToDetails` | function | `null` | Custom navigation handler |
|
|
96
|
+
| `Link` | component | `null` | Custom Link component |
|
|
97
|
+
| `defaultFilters` | object | `null` | Initial filter state |
|
|
98
|
+
| `hiddenFilters` | array | `null` | Filters to hide |
|
|
99
|
+
|
|
100
|
+
See full prop documentation in [API Reference](./docs/API_REFERENCE.md).
|
|
101
|
+
|
|
102
|
+
## Site Configuration
|
|
103
|
+
|
|
104
|
+
```javascript
|
|
105
|
+
const siteConfiguration = {
|
|
106
|
+
colors: {
|
|
107
|
+
primary: '#3B82F6',
|
|
108
|
+
primaryDark: '#1E40AF',
|
|
109
|
+
secondary: '#10B981',
|
|
110
|
+
secondaryDark: '#047857',
|
|
111
|
+
uiText: '#1F2937',
|
|
112
|
+
uiAccent: '#6B7280',
|
|
113
|
+
borderDefault: '#E5E7EB'
|
|
114
|
+
},
|
|
115
|
+
showMap: true,
|
|
116
|
+
mapPosition: 'bottom', // 'top' or 'bottom'
|
|
117
|
+
fieldsShown: ['title', 'category', 'entityName', 'location'],
|
|
118
|
+
fieldNames: {
|
|
119
|
+
title: 'Job Title',
|
|
120
|
+
category: 'Category',
|
|
121
|
+
entityName: 'Company',
|
|
122
|
+
location: 'Location'
|
|
123
|
+
},
|
|
124
|
+
pointsOfInterestConfig: {
|
|
125
|
+
placeMappings: {},
|
|
126
|
+
showAtZoomLevel: 12,
|
|
127
|
+
placeMarkerColors: {},
|
|
128
|
+
placeMarkerSize: 30
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Advanced Usage
|
|
134
|
+
|
|
135
|
+
### Using Component Hooks
|
|
136
|
+
|
|
137
|
+
```jsx
|
|
138
|
+
import { useComponents } from '@hirecontrol/hc-ui-components';
|
|
139
|
+
|
|
140
|
+
const MyCustomComponent = () => {
|
|
141
|
+
const { Filter, ListItem } = useComponents();
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<div>
|
|
145
|
+
<Filter {...filterProps} />
|
|
146
|
+
<ListItem {...itemProps} />
|
|
147
|
+
</div>
|
|
148
|
+
);
|
|
149
|
+
};
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Extending Default Components
|
|
153
|
+
|
|
154
|
+
```jsx
|
|
155
|
+
import { defaultComponents } from '@hirecontrol/hc-ui-components';
|
|
156
|
+
|
|
157
|
+
const EnhancedFilter = (props) => {
|
|
158
|
+
const DefaultFilter = defaultComponents.Filter;
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<div className="enhanced-wrapper">
|
|
162
|
+
<DefaultFilter {...props} />
|
|
163
|
+
<div className="custom-addition">Extra content</div>
|
|
164
|
+
</div>
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Higher-Order Component Pattern
|
|
170
|
+
|
|
171
|
+
```jsx
|
|
172
|
+
import { withComponents } from '@hirecontrol/hc-ui-components';
|
|
173
|
+
|
|
174
|
+
const MyContainer = ({ Filter, ListItem, data }) => {
|
|
175
|
+
return (
|
|
176
|
+
<div>
|
|
177
|
+
<Filter />
|
|
178
|
+
{data.map(item => <ListItem key={item.id} item={item} />)}
|
|
179
|
+
</div>
|
|
180
|
+
);
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export default withComponents(['Filter', 'ListItem'])(MyContainer);
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Styling
|
|
187
|
+
|
|
188
|
+
The library uses Tailwind CSS with a custom `hc-` prefix to avoid conflicts:
|
|
189
|
+
|
|
190
|
+
```jsx
|
|
191
|
+
<div className="hc-bg-primary hc-text-white hc-p-4 hc-rounded-lg">
|
|
192
|
+
Custom styled element
|
|
193
|
+
</div>
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### Customizing Styles
|
|
197
|
+
|
|
198
|
+
1. **Override components** with your own styling
|
|
199
|
+
2. **Use filterConfig.classNames** to inject custom classes
|
|
200
|
+
3. **Wrap with styled containers** around default components
|
|
201
|
+
|
|
202
|
+
## Examples
|
|
203
|
+
|
|
204
|
+
### Custom Filter with Analytics
|
|
205
|
+
|
|
206
|
+
```jsx
|
|
207
|
+
const AnalyticsFilter = (props) => {
|
|
208
|
+
const { Filter } = useComponents();
|
|
209
|
+
|
|
210
|
+
useEffect(() => {
|
|
211
|
+
analytics.track('Filter Panel Viewed');
|
|
212
|
+
}, []);
|
|
213
|
+
|
|
214
|
+
const handleFilterChange = (filters) => {
|
|
215
|
+
analytics.track('Filters Applied', { filters });
|
|
216
|
+
props.setSelectedFilters(filters);
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
return <Filter {...props} setSelectedFilters={handleFilterChange} />;
|
|
220
|
+
};
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Custom List Item with Favorites
|
|
224
|
+
|
|
225
|
+
```jsx
|
|
226
|
+
const CustomListItem = ({ item, favorites, handleSettingFavorites, ...props }) => {
|
|
227
|
+
const isFavorite = favorites.includes(item.id);
|
|
228
|
+
|
|
229
|
+
return (
|
|
230
|
+
<div className="hc-border hc-rounded-lg hc-p-4 hc-hover:shadow-lg">
|
|
231
|
+
<div className="hc-flex hc-justify-between">
|
|
232
|
+
<h3>{item.fields.title}</h3>
|
|
233
|
+
<button
|
|
234
|
+
onClick={(e) => {
|
|
235
|
+
e.stopPropagation();
|
|
236
|
+
handleSettingFavorites(item.id);
|
|
237
|
+
}}
|
|
238
|
+
>
|
|
239
|
+
{isFavorite ? '❤️' : '🤍'}
|
|
240
|
+
</button>
|
|
241
|
+
</div>
|
|
242
|
+
<p className="hc-text-gray-600">{item.fields.category}</p>
|
|
243
|
+
<p className="hc-text-sm">{item.mapDetails?.entityDisplayName}</p>
|
|
244
|
+
</div>
|
|
245
|
+
);
|
|
246
|
+
};
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## TypeScript Support
|
|
250
|
+
|
|
251
|
+
The library includes TypeScript definitions:
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
import { HireControlMap, ComponentOverrides } from '@hirecontrol/hc-ui-components';
|
|
255
|
+
|
|
256
|
+
const customComponents: ComponentOverrides = {
|
|
257
|
+
Filter: MyCustomFilter,
|
|
258
|
+
ListItem: MyCustomListItem,
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
<HireControlMap
|
|
262
|
+
googleMapsApiKey={apiKey}
|
|
263
|
+
siteConfiguration={config}
|
|
264
|
+
listings={listings}
|
|
265
|
+
components={customComponents}
|
|
266
|
+
/>
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Browser Support
|
|
270
|
+
|
|
271
|
+
- Chrome (latest)
|
|
272
|
+
- Firefox (latest)
|
|
273
|
+
- Safari (latest)
|
|
274
|
+
- Edge (latest)
|
|
275
|
+
- Mobile browsers (iOS Safari, Chrome Mobile)
|
|
276
|
+
|
|
277
|
+
## Performance
|
|
278
|
+
|
|
279
|
+
- Lazy loading of Google Maps
|
|
280
|
+
- Virtual scrolling for large lists
|
|
281
|
+
- Debounced search inputs
|
|
282
|
+
- Optimized re-renders with React.memo
|
|
283
|
+
- Efficient clustering for map markers
|
|
284
|
+
|
|
285
|
+
## Troubleshooting
|
|
286
|
+
|
|
287
|
+
### Google Maps Not Loading
|
|
288
|
+
- Verify API key is correct
|
|
289
|
+
- Check API key has Maps JavaScript API enabled
|
|
290
|
+
- Ensure domain is whitelisted in Google Console
|
|
291
|
+
|
|
292
|
+
### Custom Components Not Rendering
|
|
293
|
+
- Verify component name matches exactly (case-sensitive)
|
|
294
|
+
- Ensure all required props are handled
|
|
295
|
+
- Check browser console for errors
|
|
296
|
+
|
|
297
|
+
### Styling Conflicts
|
|
298
|
+
- Use the `hc-` prefix for Tailwind classes
|
|
299
|
+
- Check CSS specificity
|
|
300
|
+
- Use browser dev tools to inspect styles
|
|
301
|
+
|
|
302
|
+
See [Troubleshooting Guide](./docs/TROUBLESHOOTING.md) for more help.
|
|
303
|
+
|
|
304
|
+
## Documentation
|
|
305
|
+
|
|
306
|
+
- [Component Customization Guide](./docs/COMPONENT_CUSTOMIZATION.md) - Detailed customization docs
|
|
307
|
+
- [Component Reference](./docs/COMPONENT_REFERENCE.md) - Quick reference for all components
|
|
308
|
+
- [API Reference](./docs/API_REFERENCE.md) - Complete prop documentation
|
|
309
|
+
- [Examples](./docs/EXAMPLES.md) - Code examples and use cases
|
|
310
|
+
|
|
311
|
+
## Contributing
|
|
312
|
+
|
|
313
|
+
Contributions are welcome! Please read our [Contributing Guide](./CONTRIBUTING.md) first.
|
|
314
|
+
|
|
315
|
+
## License
|
|
316
|
+
|
|
317
|
+
MIT License - see [LICENSE](./LICENSE) file for details.
|
|
318
|
+
|
|
319
|
+
## Support
|
|
320
|
+
|
|
321
|
+
- GitHub Issues: https://github.com/hirecontrol/hc-ui-components/issues
|
|
322
|
+
- Documentation: https://docs.hirecontrol.com
|
|
323
|
+
- Email: support@hirecontrol.com
|
|
@@ -9,9 +9,10 @@ import { PlacesProvider } from '../contexts/placesContext.js';
|
|
|
9
9
|
import { MapListProvider } from '../contexts/mapListContext.js';
|
|
10
10
|
import { TrackEventProvider } from '../contexts/trackEventContext.js';
|
|
11
11
|
import { ThemeProvider } from '../contexts/themeContext.js';
|
|
12
|
+
import { ComponentProvider } from '../contexts/componentContext.js';
|
|
12
13
|
import { initializeAlgoliaSearch } from '../util/algoliaSearchUtil.js';
|
|
13
14
|
|
|
14
|
-
var _excluded = ["children", "siteConfig", "trackEvent", "googleMapsApiKey"];
|
|
15
|
+
var _excluded = ["children", "siteConfig", "trackEvent", "googleMapsApiKey", "components"];
|
|
15
16
|
|
|
16
17
|
// Libraries for Google Maps
|
|
17
18
|
var LIBRARIES = ['places'];
|
|
@@ -25,8 +26,11 @@ var ContextProviders = function ContextProviders(_ref) {
|
|
|
25
26
|
siteConfig = _ref.siteConfig,
|
|
26
27
|
trackEvent = _ref.trackEvent,
|
|
27
28
|
googleMapsApiKey = _ref.googleMapsApiKey,
|
|
29
|
+
components = _ref.components,
|
|
28
30
|
mapListProps = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
return /*#__PURE__*/React.createElement(
|
|
31
|
+
return /*#__PURE__*/React.createElement(ComponentProvider, {
|
|
32
|
+
components: components
|
|
33
|
+
}, /*#__PURE__*/React.createElement(TrackEventProvider, {
|
|
30
34
|
trackEvent: trackEvent
|
|
31
35
|
}, /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
32
36
|
uiText: siteConfig.colors.uiText,
|
|
@@ -58,7 +62,7 @@ var ContextProviders = function ContextProviders(_ref) {
|
|
|
58
62
|
size: siteConfig.pointsOfInterestConfig.placeMarkerSize
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
|
-
}, children)))));
|
|
65
|
+
}, children))))));
|
|
62
66
|
};
|
|
63
67
|
|
|
64
68
|
// Main component
|
|
@@ -124,6 +128,8 @@ var HireControlMap = function HireControlMap(_ref2) {
|
|
|
124
128
|
localStorageKey = _ref2$localStorageKey === void 0 ? 'defaultKey.' : _ref2$localStorageKey,
|
|
125
129
|
_ref2$algoliaAppId = _ref2.algoliaAppId,
|
|
126
130
|
algoliaAppId = _ref2$algoliaAppId === void 0 ? null : _ref2$algoliaAppId,
|
|
131
|
+
_ref2$components = _ref2.components,
|
|
132
|
+
components = _ref2$components === void 0 ? {} : _ref2$components,
|
|
127
133
|
_ref2$algoliaApiKey = _ref2.algoliaApiKey,
|
|
128
134
|
algoliaApiKey = _ref2$algoliaApiKey === void 0 ? null : _ref2$algoliaApiKey,
|
|
129
135
|
_ref2$algoliaIndexNam = _ref2.algoliaIndexName,
|
|
@@ -269,7 +275,8 @@ var HireControlMap = function HireControlMap(_ref2) {
|
|
|
269
275
|
return /*#__PURE__*/React.createElement(ContextProviders, _extends({
|
|
270
276
|
siteConfig: siteConfiguration,
|
|
271
277
|
trackEvent: trackEvent,
|
|
272
|
-
googleMapsApiKey: googleMapsApiKey || process.env.GOOGLE_MAPS_API_KEY
|
|
278
|
+
googleMapsApiKey: googleMapsApiKey || process.env.GOOGLE_MAPS_API_KEY,
|
|
279
|
+
components: components
|
|
273
280
|
}, mapListProps), /*#__PURE__*/React.createElement(Grid, {
|
|
274
281
|
as: "section",
|
|
275
282
|
id: "job-search-interface",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HireControlMap.js","sources":["../../src/components/HireControlMap.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useLoadScript } from '@react-google-maps/api';\n\nimport Grid from '~/components/modules/grid';\nimport Filter from '~/components/containers/filter/filter-container';\nimport MapList from '~/components/containers/maps/map-list-container';\n\n// Context imports\nimport { MapProvider } from '~/contexts/mapContext';\nimport { PlacesProvider } from '~/contexts/placesContext';\nimport { MapListProvider } from '~/contexts/mapListContext';\nimport { TrackEventProvider } from '~/contexts/trackEventContext';\nimport { ThemeProvider } from '~/contexts/themeContext';\n\nimport { initializeAlgoliaSearch } from '~/util/algoliaSearchUtil';\n\n// Libraries for Google Maps\nconst LIBRARIES = ['places'];\n\n// Since all data is now passed in statically, no need to fetch config\n\n// Component to handle all context providers\nconst ContextProviders = ({ children, siteConfig, trackEvent, googleMapsApiKey, ...mapListProps }) => { return(\n\t<TrackEventProvider trackEvent={trackEvent}>\n\t\t<ThemeProvider\n\t\t\tuiText={siteConfig.colors.uiText}\n\t\t\tuiAccent={siteConfig.colors.uiAccent}\n\t\t\tprimary={siteConfig.colors.primary}\n\t\t\tprimaryDark={siteConfig.colors.primaryDark}\n\t\t\tsecondary={siteConfig.colors.secondary}\n\t\t\tsecondaryDark={siteConfig.colors.secondaryDark}\n\t\t\tborderDefault={siteConfig.colors.borderDefault}\n\t\t>\n\t\t\t<MapListProvider siteConfig={siteConfig} googleMapsApiKey={googleMapsApiKey} {...mapListProps}>\n\t\t\t\t<MapProvider resetFilters={mapListProps.resetFilters} defaultZoomOverride={mapListProps.defaultZoomOverride} localStorageKey={mapListProps.localStorageKey}>\n\t\t\t\t\t<PlacesProvider\n\t\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\t\tadditionalMapMarkers={mapListProps.additionalMapMarkers}\n\t\t\t\t\t\tgoogleMapsApiKey={googleMapsApiKey}\n\t\t\t\t\t\tshowAtZoomLevel={siteConfig.pointsOfInterestConfig.showAtZoomLevel ?? 12}\n\t\t\t\t\t\tmarkerColors={{\n\t\t\t\t\t\t\tfillColor: siteConfig.colors.primary,\n\t\t\t\t\t\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\t\t\t\t\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\t\t\t\t\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\t\t\t\t\t\tplaceMarkers: {\n\t\t\t\t\t\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\t\t\t\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</PlacesProvider>\n\t\t\t\t</MapProvider>\n\t\t\t</MapListProvider>\n\t\t</ThemeProvider>\n\t</TrackEventProvider>\n);};\n\n// Main component\n//\nexport const HireControlMap = ({\n\tclientToken,\n\tgoogleMapsApiKey, // Required: Google Maps API key from Next.js\n\tcontainerStyle = { height: '100vh' },\n\tnavigateToDetails = null,\n\tnavigateToEasyApply = null,\n\thandleUrlUpdate = null,\n\tLink = null,\n\tlinkFormat = '/jobs/[slug]',\n\teasyApplyUrl = null,\n\teasyApplyText = 'Easy Apply',\n\tisIframe = false,\n\thideMap = false, // Override to hide map even if siteConfig.showMap is true\n\thideFilters = false, // Hide the entire filter section\n\tnoEntities = false, // Skip entity fetching and hide entity-related filters\n\tmobileDetailsCallback = null, // Optional callback for mobile job listing clicks - called instead of expanding accordion\n\ttrackEvent = (eventType, eventObj) => {\n\t\tconsole.log(eventType);\n\t\tconsole.log(eventObj);\n\t},\n\t//providing listings entities and a getListingEntities function should negate the need for map code to fetch data\n\tlistings = [],\n\tentities = [],\n\tgetListingEntitiesCallback = null,\n\tdefaultFilters = null,\n\thiddenFilters = null,\n\tsetFiltersUrl = null,\n\tExpandListComponent = null,\n\tadditionalMapMarkers = [],\n\tdefaultZoomOverride = null,\n\t//Default site configuration file passed here stops need to fetch from api\n\tsiteConfiguration = null,\n\tlocalStorageKey = 'defaultKey.',\n\t// Algolia search configuration (optional)\n\talgoliaAppId = null,\n\talgoliaApiKey = null,\n\talgoliaIndexName = null,\n\t/**\n\t * Filter configuration (optional)\n\t * @param {boolean} hideZeroResults - Hide filter options with 0 results (default: false)\n\t * @param {boolean} dynamicCounts - Update counts based on active filters.\n\t * If false, shows initial/total counts (default: true)\n\t * @param {boolean} showFavorites - Show favorites special feature filter (default: true)\n\t * @param {boolean} collapsedByDefault - Start with all filter sections collapsed (default: false)\n\t * @param {boolean} sortAlphabetically - Sort filter options alphabetically instead of by count (default: false)\n\t * @param {object} classNames - Custom Tailwind classes to apply to filter components\n\t * @param {string} classNames.filterContainer - Classes for the main filter container wrapper\n\t * @param {string} classNames.filterContent - Classes for the scrollable filter content area\n\t * @param {string} classNames.filterAccordion - Classes for each filter accordion section\n\t * @param {string} classNames.filterAccordionHeader - Classes for accordion header/trigger\n\t * @param {string} classNames.filterAccordionContent - Classes for accordion content area\n\t * @param {string} classNames.filterItem - Classes for individual filter items (checkboxes/options)\n\t * @param {string} classNames.filterItemLabel - Classes for filter item labels\n\t * @param {string} classNames.filterItemCheckbox - Classes for filter item checkboxes\n\t * @param {string} classNames.filterItemCount - Classes for filter item count badges\n\t * @param {string} classNames.searchInput - Classes for search input field\n\t * @param {string} classNames.resetButton - Classes for reset all button\n\t * @param {string} classNames.showJobsButton - Classes for show jobs button\n\t * @param {string} classNames.filterFooter - Classes for the footer containing buttons\n\t */\n\tfilterConfig = {\n\t\thideZeroResults: false, // Hide filter options with 0 results\n\t\tdynamicCounts: true, // Update counts based on other active filters (false = show initial counts only)\n\t\tshowFavorites: true, // Show favorites filter\n\t\tcollapsedByDefault: false, // Start with all filter sections collapsed\n\t\tsortAlphabetically: false, // Sort filter options alphabetically instead of by count\n\t\tclassNames: {\n\t\t\tfilterContainer: '', // Main filter container wrapper\n\t\t\tfilterContent: '', // Scrollable content area\n\t\t\tfilterAccordion: '', // Filter accordion section\n\t\t\tfilterAccordionHeader: '', // Accordion header/trigger\n\t\t\tfilterAccordionContent: '', // Accordion content body\n\t\t\tfilterItem: '', // Individual filter items\n\t\t\tfilterItemLabel: '', // Filter item labels\n\t\t\tfilterItemCheckbox: '', // Filter item checkboxes\n\t\t\tfilterItemCount: '', // Filter item count badges\n\t\t\tsearchInput: '', // Search input field\n\t\t\tresetButton: '', // Reset all button\n\t\t\tshowJobsButton: '', // Show jobs button\n\t\t\tfilterFooter: '' // Footer with buttons\n\t\t}\n\t}\n}) => {\n\t// Initialize Algolia when credentials are provided (client-side only)\n\tconst [algoliaInitialized, setAlgoliaInitialized] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (algoliaAppId && algoliaApiKey && algoliaIndexName && typeof window !== 'undefined') {\n\t\t\tinitializeAlgoliaSearch(algoliaAppId, algoliaApiKey, algoliaIndexName).then(initialized => {\n\t\t\t\tsetAlgoliaInitialized(initialized);\n\t\t\t\tif (initialized) {\n\t\t\t\t\tconsole.log('Algolia search initialized successfully');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, [algoliaAppId, algoliaApiKey, algoliaIndexName]);\n\n\t// Load Google Maps (non-blocking - map component will handle this)\n\tconst { isLoaded: isMapsLoaded, loadError } = useLoadScript({\n\t\tgoogleMapsApiKey: googleMapsApiKey,\n\t\tversion: 'quarterly',\n\t\tlibraries: LIBRARIES\n\t});\n\n\t// Only show errors for critical failures\n\tif (!googleMapsApiKey) {\n\t\tconsole.error('Google Maps API key is required');\n\t\treturn <div className=\"hc-p-4\">Google Maps API key is required</div>;\n\t}\n\n\tif (loadError) {\n\t\tconsole.error('Google Maps failed to load:', loadError);\n\t\treturn <div className=\"hc-p-4\">Error loading Google Maps</div>;\n\t}\n\n\t// Don't block rendering - let filters and list show immediately\n\t// Map container will handle its own loading state\n\n\t// siteConfiguration is now required - all data passed in statically\n\tif (!siteConfiguration) {\n\t\tconsole.error('Site configuration is required');\n\t\treturn <div className=\"hc-p-4\">Site configuration is required</div>;\n\t}\n\n\t// Prepare props for MapListProvider\n\tconst mapListProps = {\n\t\tresetFilters: false,\n\t\tnavigateToDetails,\n\t\tnavigateToEasyApply,\n\t\tLink,\n\t\tlinkFormat,\n\t\teasyApplyUrl,\n\t\teasyApplyText,\n\t\tlistings,\n\t\tentities,\n\t\tsiteConfig: siteConfiguration,\n\t\tgetListingEntitiesCallback,\n\t\tsetFiltersUrl,\n\t\thiddenFilters,\n\t\thandleUrlUpdate,\n\t\tdefaultFilters,\n\t\tdefaultZoomOverride, // will usually fit bounds\n\t\tcontainerStyle,\n\t\tExpandListComponent: ExpandListComponent ?? null,\n\t\tadditionalMapMarkers,\n\t\tisIframe,\n\t\tlocalStorageKey,\n\t\thideMap,\n\t\thideFilters,\n\t\tnoEntities,\n\t\tfilterConfig,\n\t\tmobileDetailsCallback\n\t};\n\n\t// Calculate effective showMap value\n\tconst effectiveShowMap = hideMap ? false : siteConfiguration.showMap;\n\n\t// Prepare marker configuration\n\tconst markerConfigs = {\n\t\tfillColor: siteConfiguration.colors.primary,\n\t\tstrokeColor: siteConfiguration.colors.primaryDark,\n\t\tselectedFillColor: siteConfiguration.colors.secondary,\n\t\tselectedStrokeColor: siteConfiguration.colors.secondaryDark,\n\t\tplaceMarkers: {\n\t\t\tcolors: siteConfiguration.pointsOfInterestConfig.placeMarkerColors,\n\t\t\tsize: siteConfiguration.pointsOfInterestConfig.placeMarkerSize\n\t\t}\n\t};\n\n\t// Render immediately - individual components handle their own loading\n\t// Only Google Maps components will wait for isMapsLoaded\n\treturn (\n\t\t<ContextProviders\n\t\t\tsiteConfig={siteConfiguration}\n\t\t\ttrackEvent={trackEvent}\n\t\t\tgoogleMapsApiKey={googleMapsApiKey || process.env.GOOGLE_MAPS_API_KEY}\n\t\t\t{...mapListProps}\n\t\t>\n\t\t\t<Grid\n\t\t\t\tas='section'\n\t\t\t\tid='job-search-interface'\n\t\t\t\tcolumns={hideFilters ? 'hc-grid-cols-1' : 'md:hc-grid-cols-[1fr_2.5fr] lg:hc-grid-cols-[1fr_3.5fr]'}\n\t\t\t\tgap='hc-gap-0'\n\t\t\t\tautoRows={false}\n\t\t\t\tclassName={'hc-bundle hc-items-stretch hc-divide-x-0 md:hc-divide-x hc-divide-uiAccent/20'}\n\t\t\t>\n\t\t\t\t{!hideFilters && (\n\t\t\t\t\t<Grid.Item className='hc-bg-gray-100'>\n\t\t\t\t\t\t<Filter isDesktop={true} showMap={effectiveShowMap} className='hc-hidden md:hc-block' />\n\t\t\t\t\t</Grid.Item>\n\t\t\t\t)}\n\t\t\t\t<MapList\n\t\t\t\t\tcontainerStyle={containerStyle}\n\t\t\t\t\tmapPosition={siteConfiguration.mapPosition}\n\t\t\t\t\tshowMap={effectiveShowMap}\n\t\t\t\t\tfieldsShown={siteConfiguration.fieldsShown}\n\t\t\t\t\tspecialFeatures={siteConfiguration.specialFeatures}\n\t\t\t\t\tfieldNames={siteConfiguration.fieldNames}\n\t\t\t\t\tplaceMappings={siteConfiguration.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\tmarkerConfigs={markerConfigs}\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</ContextProviders>\n\t);\n};\n\nexport default HireControlMap;\n"],"names":["LIBRARIES","ContextProviders","_ref","_siteConfig$pointsOfI","_siteConfig$pointsOfI2","children","siteConfig","trackEvent","googleMapsApiKey","mapListProps","_objectWithoutProperties","_excluded","React","createElement","TrackEventProvider","ThemeProvider","uiText","colors","uiAccent","primary","primaryDark","secondary","secondaryDark","borderDefault","MapListProvider","_extends","MapProvider","resetFilters","defaultZoomOverride","localStorageKey","PlacesProvider","placeMappings","pointsOfInterestConfig","additionalMapMarkers","showAtZoomLevel","markerColors","fillColor","strokeColor","selectedFillColor","selectedStrokeColor","placeMarkers","placeMarkerColors","size","placeMarkerSize","HireControlMap","_ref2","_siteConfiguration$po","clientToken","_ref2$containerStyle","containerStyle","height","_ref2$navigateToDetai","navigateToDetails","_ref2$navigateToEasyA","navigateToEasyApply","_ref2$handleUrlUpdate","handleUrlUpdate","_ref2$Link","Link","_ref2$linkFormat","linkFormat","_ref2$easyApplyUrl","easyApplyUrl","_ref2$easyApplyText","easyApplyText","_ref2$isIframe","isIframe","_ref2$hideMap","hideMap","_ref2$hideFilters","hideFilters","_ref2$noEntities","noEntities","_ref2$mobileDetailsCa","mobileDetailsCallback","_ref2$trackEvent","eventType","eventObj","console","log","_ref2$listings","listings","_ref2$entities","entities","_ref2$getListingEntit","getListingEntitiesCallback","_ref2$defaultFilters","defaultFilters","_ref2$hiddenFilters","hiddenFilters","_ref2$setFiltersUrl","setFiltersUrl","_ref2$ExpandListCompo","ExpandListComponent","_ref2$additionalMapMa","_ref2$defaultZoomOver","_ref2$siteConfigurati","siteConfiguration","_ref2$localStorageKey","_ref2$algoliaAppId","algoliaAppId","_ref2$algoliaApiKey","algoliaApiKey","_ref2$algoliaIndexNam","algoliaIndexName","_ref2$filterConfig","filterConfig","hideZeroResults","dynamicCounts","showFavorites","collapsedByDefault","sortAlphabetically","classNames","filterContainer","filterContent","filterAccordion","filterAccordionHeader","filterAccordionContent","filterItem","filterItemLabel","filterItemCheckbox","filterItemCount","searchInput","resetButton","showJobsButton","filterFooter","_useState","useState","_useState2","_slicedToArray","algoliaInitialized","setAlgoliaInitialized","useEffect","window","initializeAlgoliaSearch","then","initialized","_useLoadScript","useLoadScript","version","libraries","isLoaded","loadError","error","className","effectiveShowMap","showMap","markerConfigs","process","env","GOOGLE_MAPS_API_KEY","Grid","as","id","columns","gap","autoRows","Item","Filter","isDesktop","MapList","mapPosition","fieldsShown","specialFeatures","fieldNames"],"mappings":";;;;;;;;;;;;;;;AAgBA;AACA,IAAMA,SAAS,GAAG,CAAC,QAAQ,CAAC,CAAA;;AAE5B;;AAEA;AACA,IAAMC,gBAAgB,GAAG,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IAAAA,GAAG,EAAC,UAAU;AACdC,IAAAA,QAAQ,EAAE,KAAM;AAChBZ,IAAAA,SAAS,EAAE,+EAAA;GAEV,EAAA,CAAC1E,WAAW,iBACZ1D,KAAA,CAAAC,aAAA,CAAC0I,IAAI,CAACM,IAAI,EAAA;AAACb,IAAAA,SAAS,EAAC,gBAAA;AAAgB,GAAA,eACpCpI,KAAA,CAAAC,aAAA,CAACiJ,eAAM,EAAA;AAACC,IAAAA,SAAS,EAAE,IAAK;AAACb,IAAAA,OAAO,EAAED,gBAAiB;AAACD,IAAAA,SAAS,EAAC,uBAAA;AAAuB,GAAE,CAC7E,CACX,eACDpI,KAAA,CAAAC,aAAA,CAACmJ,gBAAO,EAAA;AACP/G,IAAAA,cAAc,EAAEA,cAAe;IAC/BgH,WAAW,EAAEhE,iBAAiB,CAACgE,WAAY;AAC3Cf,IAAAA,OAAO,EAAED,gBAAiB;IAC1BiB,WAAW,EAAEjE,iBAAiB,CAACiE,WAAY;IAC3CC,eAAe,EAAElE,iBAAiB,CAACkE,eAAgB;IACnDC,UAAU,EAAEnE,iBAAiB,CAACmE,UAAW;AACzCrI,IAAAA,aAAa,EAAAe,CAAAA,qBAAA,GAAEmD,iBAAiB,CAACjE,sBAAsB,CAACD,aAAa,MAAA,IAAA,IAAAe,qBAAA,KAAA,KAAA,CAAA,GAAAA,qBAAA,GAAI,EAAG;AAC5EqG,IAAAA,aAAa,EAAEA,aAAAA;GACf,CACI,CACW,CAAC,CAAA;AAErB,EAAC;AAED,uBAAevG,cAAc;;;;"}
|
|
1
|
+
{"version":3,"file":"HireControlMap.js","sources":["../../src/components/HireControlMap.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useLoadScript } from '@react-google-maps/api';\n\nimport Grid from '~/components/modules/grid';\nimport Filter from '~/components/containers/filter/filter-container';\nimport MapList from '~/components/containers/maps/map-list-container';\n\n// Context imports\nimport { MapProvider } from '~/contexts/mapContext';\nimport { PlacesProvider } from '~/contexts/placesContext';\nimport { MapListProvider } from '~/contexts/mapListContext';\nimport { TrackEventProvider } from '~/contexts/trackEventContext';\nimport { ThemeProvider } from '~/contexts/themeContext';\nimport { ComponentProvider } from '~/contexts/componentContext';\n\nimport { initializeAlgoliaSearch } from '~/util/algoliaSearchUtil';\n\n// Libraries for Google Maps\nconst LIBRARIES = ['places'];\n\n// Since all data is now passed in statically, no need to fetch config\n\n// Component to handle all context providers\nconst ContextProviders = ({ children, siteConfig, trackEvent, googleMapsApiKey, components, ...mapListProps }) => { return(\n\t<ComponentProvider components={components}>\n\t\t<TrackEventProvider trackEvent={trackEvent}>\n\t\t\t<ThemeProvider\n\t\t\t\tuiText={siteConfig.colors.uiText}\n\t\t\t\tuiAccent={siteConfig.colors.uiAccent}\n\t\t\t\tprimary={siteConfig.colors.primary}\n\t\t\t\tprimaryDark={siteConfig.colors.primaryDark}\n\t\t\t\tsecondary={siteConfig.colors.secondary}\n\t\t\t\tsecondaryDark={siteConfig.colors.secondaryDark}\n\t\t\t\tborderDefault={siteConfig.colors.borderDefault}\n\t\t\t>\n\t\t\t\t<MapListProvider siteConfig={siteConfig} googleMapsApiKey={googleMapsApiKey} {...mapListProps}>\n\t\t\t\t\t<MapProvider resetFilters={mapListProps.resetFilters} defaultZoomOverride={mapListProps.defaultZoomOverride} localStorageKey={mapListProps.localStorageKey}>\n\t\t\t\t\t\t<PlacesProvider\n\t\t\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\t\t\tadditionalMapMarkers={mapListProps.additionalMapMarkers}\n\t\t\t\t\t\t\tgoogleMapsApiKey={googleMapsApiKey}\n\t\t\t\t\t\t\tshowAtZoomLevel={siteConfig.pointsOfInterestConfig.showAtZoomLevel ?? 12}\n\t\t\t\t\t\t\tmarkerColors={{\n\t\t\t\t\t\t\t\tfillColor: siteConfig.colors.primary,\n\t\t\t\t\t\t\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\t\t\t\t\t\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\t\t\t\t\t\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\t\t\t\t\t\t\tplaceMarkers: {\n\t\t\t\t\t\t\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\t\t\t\t\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</PlacesProvider>\n\t\t\t\t\t</MapProvider>\n\t\t\t\t</MapListProvider>\n\t\t\t</ThemeProvider>\n\t\t</TrackEventProvider>\n\t</ComponentProvider>\n);};\n\n// Main component\n//\nexport const HireControlMap = ({\n\tclientToken,\n\tgoogleMapsApiKey, // Required: Google Maps API key from Next.js\n\tcontainerStyle = { height: '100vh' },\n\tnavigateToDetails = null,\n\tnavigateToEasyApply = null,\n\thandleUrlUpdate = null,\n\tLink = null,\n\tlinkFormat = '/jobs/[slug]',\n\teasyApplyUrl = null,\n\teasyApplyText = 'Easy Apply',\n\tisIframe = false,\n\thideMap = false, // Override to hide map even if siteConfig.showMap is true\n\thideFilters = false, // Hide the entire filter section\n\tnoEntities = false, // Skip entity fetching and hide entity-related filters\n\tmobileDetailsCallback = null, // Optional callback for mobile job listing clicks - called instead of expanding accordion\n\ttrackEvent = (eventType, eventObj) => {\n\t\tconsole.log(eventType);\n\t\tconsole.log(eventObj);\n\t},\n\t//providing listings entities and a getListingEntities function should negate the need for map code to fetch data\n\tlistings = [],\n\tentities = [],\n\tgetListingEntitiesCallback = null,\n\tdefaultFilters = null,\n\thiddenFilters = null,\n\tsetFiltersUrl = null,\n\tExpandListComponent = null,\n\tadditionalMapMarkers = [],\n\tdefaultZoomOverride = null,\n\t//Default site configuration file passed here stops need to fetch from api\n\tsiteConfiguration = null,\n\tlocalStorageKey = 'defaultKey.',\n\t// Algolia search configuration (optional)\n\talgoliaAppId = null,\n\t/**\n\t * Component overrides - allows customization of any component\n\t * @example\n\t * components={{\n\t * Filter: MyCustomFilter,\n\t * ListItem: MyCustomListItem,\n\t * MapMarker: MyCustomMapMarker\n\t * }}\n\t */\n\tcomponents = {},\n\talgoliaApiKey = null,\n\talgoliaIndexName = null,\n\t/**\n\t * Filter configuration (optional)\n\t * @param {boolean} hideZeroResults - Hide filter options with 0 results (default: false)\n\t * @param {boolean} dynamicCounts - Update counts based on active filters.\n\t * If false, shows initial/total counts (default: true)\n\t * @param {boolean} showFavorites - Show favorites special feature filter (default: true)\n\t * @param {boolean} collapsedByDefault - Start with all filter sections collapsed (default: false)\n\t * @param {boolean} sortAlphabetically - Sort filter options alphabetically instead of by count (default: false)\n\t * @param {object} classNames - Custom Tailwind classes to apply to filter components\n\t * @param {string} classNames.filterContainer - Classes for the main filter container wrapper\n\t * @param {string} classNames.filterContent - Classes for the scrollable filter content area\n\t * @param {string} classNames.filterAccordion - Classes for each filter accordion section\n\t * @param {string} classNames.filterAccordionHeader - Classes for accordion header/trigger\n\t * @param {string} classNames.filterAccordionContent - Classes for accordion content area\n\t * @param {string} classNames.filterItem - Classes for individual filter items (checkboxes/options)\n\t * @param {string} classNames.filterItemLabel - Classes for filter item labels\n\t * @param {string} classNames.filterItemCheckbox - Classes for filter item checkboxes\n\t * @param {string} classNames.filterItemCount - Classes for filter item count badges\n\t * @param {string} classNames.searchInput - Classes for search input field\n\t * @param {string} classNames.resetButton - Classes for reset all button\n\t * @param {string} classNames.showJobsButton - Classes for show jobs button\n\t * @param {string} classNames.filterFooter - Classes for the footer containing buttons\n\t */\n\tfilterConfig = {\n\t\thideZeroResults: false, // Hide filter options with 0 results\n\t\tdynamicCounts: true, // Update counts based on other active filters (false = show initial counts only)\n\t\tshowFavorites: true, // Show favorites filter\n\t\tcollapsedByDefault: false, // Start with all filter sections collapsed\n\t\tsortAlphabetically: false, // Sort filter options alphabetically instead of by count\n\t\tclassNames: {\n\t\t\tfilterContainer: '', // Main filter container wrapper\n\t\t\tfilterContent: '', // Scrollable content area\n\t\t\tfilterAccordion: '', // Filter accordion section\n\t\t\tfilterAccordionHeader: '', // Accordion header/trigger\n\t\t\tfilterAccordionContent: '', // Accordion content body\n\t\t\tfilterItem: '', // Individual filter items\n\t\t\tfilterItemLabel: '', // Filter item labels\n\t\t\tfilterItemCheckbox: '', // Filter item checkboxes\n\t\t\tfilterItemCount: '', // Filter item count badges\n\t\t\tsearchInput: '', // Search input field\n\t\t\tresetButton: '', // Reset all button\n\t\t\tshowJobsButton: '', // Show jobs button\n\t\t\tfilterFooter: '' // Footer with buttons\n\t\t}\n\t}\n}) => {\n\t// Initialize Algolia when credentials are provided (client-side only)\n\tconst [algoliaInitialized, setAlgoliaInitialized] = useState(false);\n\n\tuseEffect(() => {\n\t\tif (algoliaAppId && algoliaApiKey && algoliaIndexName && typeof window !== 'undefined') {\n\t\t\tinitializeAlgoliaSearch(algoliaAppId, algoliaApiKey, algoliaIndexName).then(initialized => {\n\t\t\t\tsetAlgoliaInitialized(initialized);\n\t\t\t\tif (initialized) {\n\t\t\t\t\tconsole.log('Algolia search initialized successfully');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, [algoliaAppId, algoliaApiKey, algoliaIndexName]);\n\n\t// Load Google Maps (non-blocking - map component will handle this)\n\tconst { isLoaded: isMapsLoaded, loadError } = useLoadScript({\n\t\tgoogleMapsApiKey: googleMapsApiKey,\n\t\tversion: 'quarterly',\n\t\tlibraries: LIBRARIES\n\t});\n\n\t// Only show errors for critical failures\n\tif (!googleMapsApiKey) {\n\t\tconsole.error('Google Maps API key is required');\n\t\treturn <div className=\"hc-p-4\">Google Maps API key is required</div>;\n\t}\n\n\tif (loadError) {\n\t\tconsole.error('Google Maps failed to load:', loadError);\n\t\treturn <div className=\"hc-p-4\">Error loading Google Maps</div>;\n\t}\n\n\t// Don't block rendering - let filters and list show immediately\n\t// Map container will handle its own loading state\n\n\t// siteConfiguration is now required - all data passed in statically\n\tif (!siteConfiguration) {\n\t\tconsole.error('Site configuration is required');\n\t\treturn <div className=\"hc-p-4\">Site configuration is required</div>;\n\t}\n\n\t// Prepare props for MapListProvider\n\tconst mapListProps = {\n\t\tresetFilters: false,\n\t\tnavigateToDetails,\n\t\tnavigateToEasyApply,\n\t\tLink,\n\t\tlinkFormat,\n\t\teasyApplyUrl,\n\t\teasyApplyText,\n\t\tlistings,\n\t\tentities,\n\t\tsiteConfig: siteConfiguration,\n\t\tgetListingEntitiesCallback,\n\t\tsetFiltersUrl,\n\t\thiddenFilters,\n\t\thandleUrlUpdate,\n\t\tdefaultFilters,\n\t\tdefaultZoomOverride, // will usually fit bounds\n\t\tcontainerStyle,\n\t\tExpandListComponent: ExpandListComponent ?? null,\n\t\tadditionalMapMarkers,\n\t\tisIframe,\n\t\tlocalStorageKey,\n\t\thideMap,\n\t\thideFilters,\n\t\tnoEntities,\n\t\tfilterConfig,\n\t\tmobileDetailsCallback\n\t};\n\n\t// Calculate effective showMap value\n\tconst effectiveShowMap = hideMap ? false : siteConfiguration.showMap;\n\n\t// Prepare marker configuration\n\tconst markerConfigs = {\n\t\tfillColor: siteConfiguration.colors.primary,\n\t\tstrokeColor: siteConfiguration.colors.primaryDark,\n\t\tselectedFillColor: siteConfiguration.colors.secondary,\n\t\tselectedStrokeColor: siteConfiguration.colors.secondaryDark,\n\t\tplaceMarkers: {\n\t\t\tcolors: siteConfiguration.pointsOfInterestConfig.placeMarkerColors,\n\t\t\tsize: siteConfiguration.pointsOfInterestConfig.placeMarkerSize\n\t\t}\n\t};\n\n\t// Render immediately - individual components handle their own loading\n\t// Only Google Maps components will wait for isMapsLoaded\n\treturn (\n\t\t<ContextProviders\n\t\t\tsiteConfig={siteConfiguration}\n\t\t\ttrackEvent={trackEvent}\n\t\t\tgoogleMapsApiKey={googleMapsApiKey || process.env.GOOGLE_MAPS_API_KEY}\n\t\t\tcomponents={components}\n\t\t\t{...mapListProps}\n\t\t>\n\t\t\t<Grid\n\t\t\t\tas='section'\n\t\t\t\tid='job-search-interface'\n\t\t\t\tcolumns={hideFilters ? 'hc-grid-cols-1' : 'md:hc-grid-cols-[1fr_2.5fr] lg:hc-grid-cols-[1fr_3.5fr]'}\n\t\t\t\tgap='hc-gap-0'\n\t\t\t\tautoRows={false}\n\t\t\t\tclassName={'hc-bundle hc-items-stretch hc-divide-x-0 md:hc-divide-x hc-divide-uiAccent/20'}\n\t\t\t>\n\t\t\t\t{!hideFilters && (\n\t\t\t\t\t<Grid.Item className='hc-bg-gray-100'>\n\t\t\t\t\t\t<Filter isDesktop={true} showMap={effectiveShowMap} className='hc-hidden md:hc-block' />\n\t\t\t\t\t</Grid.Item>\n\t\t\t\t)}\n\t\t\t\t<MapList\n\t\t\t\t\tcontainerStyle={containerStyle}\n\t\t\t\t\tmapPosition={siteConfiguration.mapPosition}\n\t\t\t\t\tshowMap={effectiveShowMap}\n\t\t\t\t\tfieldsShown={siteConfiguration.fieldsShown}\n\t\t\t\t\tspecialFeatures={siteConfiguration.specialFeatures}\n\t\t\t\t\tfieldNames={siteConfiguration.fieldNames}\n\t\t\t\t\tplaceMappings={siteConfiguration.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\tmarkerConfigs={markerConfigs}\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</ContextProviders>\n\t);\n};\n\nexport default HireControlMap;\n"],"names":["LIBRARIES","ContextProviders","_ref","_siteConfig$pointsOfI","_siteConfig$pointsOfI2","children","siteConfig","trackEvent","googleMapsApiKey","components","mapListProps","_objectWithoutProperties","_excluded","React","createElement","ComponentProvider","TrackEventProvider","ThemeProvider","uiText","colors","uiAccent","primary","primaryDark","secondary","secondaryDark","borderDefault","MapListProvider","_extends","MapProvider","resetFilters","defaultZoomOverride","localStorageKey","PlacesProvider","placeMappings","pointsOfInterestConfig","additionalMapMarkers","showAtZoomLevel","markerColors","fillColor","strokeColor","selectedFillColor","selectedStrokeColor","placeMarkers","placeMarkerColors","size","placeMarkerSize","HireControlMap","_ref2","_siteConfiguration$po","clientToken","_ref2$containerStyle","containerStyle","height","_ref2$navigateToDetai","navigateToDetails","_ref2$navigateToEasyA","navigateToEasyApply","_ref2$handleUrlUpdate","handleUrlUpdate","_ref2$Link","Link","_ref2$linkFormat","linkFormat","_ref2$easyApplyUrl","easyApplyUrl","_ref2$easyApplyText","easyApplyText","_ref2$isIframe","isIframe","_ref2$hideMap","hideMap","_ref2$hideFilters","hideFilters","_ref2$noEntities","noEntities","_ref2$mobileDetailsCa","mobileDetailsCallback","_ref2$trackEvent","eventType","eventObj","console","log","_ref2$listings","listings","_ref2$entities","entities","_ref2$getListingEntit","getListingEntitiesCallback","_ref2$defaultFilters","defaultFilters","_ref2$hiddenFilters","hiddenFilters","_ref2$setFiltersUrl","setFiltersUrl","_ref2$ExpandListCompo","ExpandListComponent","_ref2$additionalMapMa","_ref2$defaultZoomOver","_ref2$siteConfigurati","siteConfiguration","_ref2$localStorageKey","_ref2$algoliaAppId","algoliaAppId","_ref2$components","_ref2$algoliaApiKey","algoliaApiKey","_ref2$algoliaIndexNam","algoliaIndexName","_ref2$filterConfig","filterConfig","hideZeroResults","dynamicCounts","showFavorites","collapsedByDefault","sortAlphabetically","classNames","filterContainer","filterContent","filterAccordion","filterAccordionHeader","filterAccordionContent","filterItem","filterItemLabel","filterItemCheckbox","filterItemCount","searchInput","resetButton","showJobsButton","filterFooter","_useState","useState","_useState2","_slicedToArray","algoliaInitialized","setAlgoliaInitialized","useEffect","window","initializeAlgoliaSearch","then","initialized","_useLoadScript","useLoadScript","version","libraries","isLoaded","loadError","error","className","effectiveShowMap","showMap","markerConfigs","process","env","GOOGLE_MAPS_API_KEY","Grid","as","id","columns","gap","autoRows","Item","Filter","isDesktop","MapList","mapPosition","fieldsShown","specialFeatures","fieldNames"],"mappings":";;;;;;;;;;;;;;;;AAiBA;AACA,IAAMA,SAAS,GAAG,CAAC,QAAQ,CAAC,CAAA;;AAE5B;;AAEA;AACA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,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;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useMapList } from '../../../contexts/mapListContext.js';
|
|
3
|
-
import
|
|
3
|
+
import { useComponents } from '../../../contexts/componentContext.js';
|
|
4
4
|
import AccordionFilterItem from './filter-item-container.js';
|
|
5
5
|
import FilterItemContainer from '../filter/filter-item-container.js';
|
|
6
6
|
|
|
@@ -13,6 +13,9 @@ var AccordionFiltersContainer = function AccordionFiltersContainer(_ref) {
|
|
|
13
13
|
setSelectedListItem = _ref.setSelectedListItem,
|
|
14
14
|
SubcategoryRequireCategory = _ref.SubcategoryRequireCategory,
|
|
15
15
|
handleReset = _ref.handleReset;
|
|
16
|
+
// Get injected FiltersAccordion component from context
|
|
17
|
+
var _useComponents = useComponents(),
|
|
18
|
+
AccordionFilters = _useComponents.FiltersAccordion;
|
|
16
19
|
var _useMapList = useMapList(),
|
|
17
20
|
filterOptions = _useMapList.filterOptions,
|
|
18
21
|
selectedFilters = _useMapList.selectedFilters,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-container.js","sources":["../../../../src/components/containers/accordions/filter-container.js"],"sourcesContent":["import React from 'react';\nimport { useMapList } from '~/contexts/mapListContext';\nimport
|
|
1
|
+
{"version":3,"file":"filter-container.js","sources":["../../../../src/components/containers/accordions/filter-container.js"],"sourcesContent":["import React from 'react';\nimport { useMapList } from '~/contexts/mapListContext';\nimport { useComponents } from '~/contexts/componentContext';\nimport AccordionFilterItem from '~/components/containers/accordions/filter-item-container';\nimport FilterItem from '~/components/containers/filter/filter-item-container';\n\nconst AccordionFiltersContainer = ({\n\tclassName,\n\tdefaultValue,\n\tsetDefaultValue,\n\tsetLocation,\n\tsetSelectedListItem,\n\tSubcategoryRequireCategory,\n\thandleReset\n}) => {\n\t// Get injected FiltersAccordion component from context\n\tconst { FiltersAccordion: AccordionFilters } = useComponents();\n\t\n\tconst { filterOptions, selectedFilters, setSelectedFilters, siteConfig, hiddenFilters, noEntities } = useMapList();\n\n\tconst handleSetSelectedFilters = prevFilters => {\n\t\tsetSelectedFilters(prevFilters);\n\t\tsetLocation(null);\n\t\tsetSelectedListItem(null);\n\t};\n\tlet displayedFilters = filterOptions?.filters;\n\n\tif (hiddenFilters) {\n\t\t displayedFilters = filterOptions?.filters.filter(filter => !hiddenFilters.includes(filter.id));\n\t}\n\n\t// Hide entity-dependent filters when noEntities is true\n\tif (noEntities && displayedFilters) {\n\t\tdisplayedFilters = displayedFilters.filter(filter => filter.id !== 'entityName');\n\t}\n\n\treturn (\n\t\t<AccordionFilters\n\t\t\tclassName={className}\n\t\t\tdefaultValue={defaultValue}\n\t\t\tfilterOptions={filterOptions}\n\t\t\thandleReset={handleReset}\n\t\t>\n\t\t\t{displayedFilters?.map(filter => {\n\t\t\t\tif(filter.id === 'category' && SubcategoryRequireCategory === true && (!selectedFilters.categoryClass || Object.keys(selectedFilters.categoryClass).length < 1)){\n\t\t\t\t\treturn;\n\t\t\t\t} else if (filter.id === 'category' && SubcategoryRequireCategory === true && filter.items.length > 0) {\n\t\t\t\t\tfilter.items = filter.items.filter(item => item.count > 0);\n\t\t\t\t}\n\n\t\t\t\telse if(filter.id === 'specialFeatures' && !filter.items.some(item => item.name !== \"Favorite\" && item.count > 0)){\n\t\t\t\t\tconst favorite = filter.items.find(item => item.name === \"Favorite\");\n\t\t\t\t\treturn \t<FilterItem\n\t\t\t\t\t\tkey={\"Favorite\"}\n\t\t\t\t\t\titem={favorite}\n\t\t\t\t\t\tfield={filter.id}\n\t\t\t\t\t\tselectedFilters={selectedFilters}\n\t\t\t\t\t\tsetSelectedFilters={setSelectedFilters}\n\t\t\t\t\t\tsubcategoryRequireCategory={false}\n\t\t\t\t\t/>;\n\n\t\t\t\t}\n\n\t\t\t\treturn (<AccordionFilterItem\n\t\t\t\t\tkey={filter.id}\n\t\t\t\t\tfilter={filter}\n\t\t\t\t\texternalLinksInFilters={siteConfig.externalLinksInFilters}\n\t\t\t\t\tsetDefaultValue={setDefaultValue}\n\t\t\t\t\tselectedFilters={selectedFilters}\n\t\t\t\t\tsetSelectedFilters={handleSetSelectedFilters}\n\t\t\t\t\tsubcategoryRequireCategory={siteConfig.subcategoryRequireCategory}\n\t\t\t\t/>);\n\t\t\t}\n\t\t\t)}\n\t\t</AccordionFilters>\n\t);\n};\n\nexport default AccordionFiltersContainer;\n"],"names":["AccordionFiltersContainer","_ref","_displayedFilters","className","defaultValue","setDefaultValue","setLocation","setSelectedListItem","SubcategoryRequireCategory","handleReset","_useComponents","useComponents","AccordionFilters","FiltersAccordion","_useMapList","useMapList","filterOptions","selectedFilters","setSelectedFilters","siteConfig","hiddenFilters","noEntities","handleSetSelectedFilters","prevFilters","displayedFilters","filters","filter","includes","id","React","createElement","map","categoryClass","Object","keys","length","items","item","count","some","name","favorite","find","FilterItem","key","field","subcategoryRequireCategory","AccordionFilterItem","externalLinksInFilters"],"mappings":";;;;;;AAMA,IAAMA,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAAC,IAAA,EAQzB;AAAA,EAAA,IAAAC,iBAAA,CAAA;AAAA,EAAA,IAPLC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IACZC,eAAe,GAAAJ,IAAA,CAAfI,eAAe;IACfC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,mBAAmB,GAAAN,IAAA,CAAnBM,mBAAmB;IACnBC,0BAA0B,GAAAP,IAAA,CAA1BO,0BAA0B;IAC1BC,WAAW,GAAAR,IAAA,CAAXQ,WAAW,CAAA;AAEX;AACA,EAAA,IAAAC,cAAA,GAA+CC,aAAa,EAAE;IAApCC,gBAAgB,GAAAF,cAAA,CAAlCG,gBAAgB,CAAA;AAExB,EAAA,IAAAC,WAAA,GAAsGC,UAAU,EAAE;IAA1GC,aAAa,GAAAF,WAAA,CAAbE,aAAa;IAAEC,eAAe,GAAAH,WAAA,CAAfG,eAAe;IAAEC,kBAAkB,GAAAJ,WAAA,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AAEA,eAAgB;AACjCC,QAAAA,kBAAkB,EAAEA,kBAAmB;AACvC4B,QAAAA,0BAA0B,EAAE,KAAA;AAAM,OAClC,CAAC,CAAA;AAEH,KAAA;AAEA,IAAA,oBAAQjB,KAAA,CAAAC,aAAA,CAACiB,mBAAmB,EAAA;MAC3BH,GAAG,EAAElB,MAAM,CAACE,EAAG;AACfF,MAAAA,MAAM,EAAEA,MAAO;MACfsB,sBAAsB,EAAE7B,UAAU,CAAC6B,sBAAuB;AAC1D3C,MAAAA,eAAe,EAAEA,eAAgB;AACjCY,MAAAA,eAAe,EAAEA,eAAgB;AACjCC,MAAAA,kBAAkB,EAAEI,wBAAyB;MAC7CwB,0BAA0B,EAAE3B,UAAU,CAAC2B,0BAAAA;AAA2B,KAClE,CAAC,CAAA;AACH,GACA,CACiB,CAAC,CAAA;AAErB;;;;"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { memo } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { useComponents } from '../../../contexts/componentContext.js';
|
|
4
4
|
import FilterItemContainer$1 from '../filter/filter-item-container.js';
|
|
5
|
-
import { ButtonItemsPill } from '../../modules/buttons/items-pill.js';
|
|
6
5
|
|
|
7
6
|
var FilterItemContainer = function FilterItemContainer(_ref) {
|
|
8
7
|
var filter = _ref.filter,
|
|
@@ -12,6 +11,10 @@ var FilterItemContainer = function FilterItemContainer(_ref) {
|
|
|
12
11
|
_ref$subcategoryRequi = _ref.subcategoryRequireCategory,
|
|
13
12
|
subcategoryRequireCategory = _ref$subcategoryRequi === void 0 ? false : _ref$subcategoryRequi,
|
|
14
13
|
externalLinksInFilters = _ref.externalLinksInFilters;
|
|
14
|
+
// Get injected components from context
|
|
15
|
+
var _useComponents = useComponents(),
|
|
16
|
+
AccordionFilterItem = _useComponents.FilterItemAccordion,
|
|
17
|
+
ItemsPill = _useComponents.ItemsPill;
|
|
15
18
|
var externalLinks = externalLinksInFilters === null || externalLinksInFilters === void 0 ? void 0 : externalLinksInFilters.filter(function (x) {
|
|
16
19
|
return x.fieldName == filter.id;
|
|
17
20
|
});
|
|
@@ -32,7 +35,7 @@ var FilterItemContainer = function FilterItemContainer(_ref) {
|
|
|
32
35
|
return updatedFilters;
|
|
33
36
|
});
|
|
34
37
|
};
|
|
35
|
-
var header = /*#__PURE__*/React.createElement(React.Fragment, null, filter.title, activeItemsCount > 0 && /*#__PURE__*/React.createElement(
|
|
38
|
+
var header = /*#__PURE__*/React.createElement(React.Fragment, null, filter.title, activeItemsCount > 0 && /*#__PURE__*/React.createElement(ItemsPill, {
|
|
36
39
|
activeItemsCount: activeItemsCount,
|
|
37
40
|
onClick: handleClearFilters
|
|
38
41
|
}));
|
|
@@ -59,7 +62,7 @@ var FilterItemContainer = function FilterItemContainer(_ref) {
|
|
|
59
62
|
subcategoryRequireCategory: subcategoryRequireCategory
|
|
60
63
|
});
|
|
61
64
|
}));
|
|
62
|
-
return /*#__PURE__*/React.createElement(AccordionFilterItem
|
|
65
|
+
return /*#__PURE__*/React.createElement(AccordionFilterItem, {
|
|
63
66
|
id: filter.id,
|
|
64
67
|
setDefaultValue: setDefaultValue,
|
|
65
68
|
header: header,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-item-container.js","sources":["../../../../src/components/containers/accordions/filter-item-container.js"],"sourcesContent":["import React, { memo } from 'react';\nimport
|
|
1
|
+
{"version":3,"file":"filter-item-container.js","sources":["../../../../src/components/containers/accordions/filter-item-container.js"],"sourcesContent":["import React, { memo } from 'react';\nimport { useComponents } from '~/contexts/componentContext';\nimport FilterItem from '~/components/containers/filter/filter-item-container';\n\nconst FilterItemContainer = ({\n\tfilter,\n\tsetDefaultValue,\n\tsetSelectedFilters,\n\tselectedFilters,\n\tsubcategoryRequireCategory = false,\n\texternalLinksInFilters\n}) => {\n\t// Get injected components from context\n\tconst { FilterItemAccordion: AccordionFilterItem, ItemsPill } = useComponents();\n\t\n\tconst externalLinks = externalLinksInFilters?.filter(x => x.fieldName == filter.id);\n\tconst fieldKey = filter.id;\n\tconst activeItemsCount = selectedFilters != null && selectedFilters[fieldKey]\n\t\t? Object.keys(selectedFilters[fieldKey]).length\n\t\t: 0;\n\n\tconst handleClearFilters = event => {\n\t\tevent.stopPropagation();\n\t\tsetSelectedFilters(prevFilters => {\n\t\t\tconst updatedFilters = { ...prevFilters };\n\t\t\tif(subcategoryRequireCategory && fieldKey == 'category'){\n\t\t\t\tdelete updatedFilters['subCategory'];\n\t\t\t}\n\t\t\tif(fieldKey == 'state' || fieldKey == 'city' || fieldKey == 'cityState'){\n\t\t\t\tdelete updatedFilters.entityId;\n\t\t\t\tdelete updatedFilters['entityName'];\n\t\t\t}\n\t\t\tdelete updatedFilters[fieldKey];\n\t\t\treturn updatedFilters;\n\t\t});\n\t};\n\n\tconst header = (\n\t\t<>\n\t\t\t{filter.title}\n\t\t\t{activeItemsCount > 0 && (\n\t\t\t\t<ItemsPill\n\t\t\t\t\tactiveItemsCount={activeItemsCount}\n\t\t\t\t\tonClick={handleClearFilters}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</>\n\t);\n\n\tconst body = (\n\t\t<>\n\t\t\t{filter.items.filter(item => item != null).sort().map(item => (\n\t\t\t\t<FilterItem\n\t\t\t\t\tkey={item.name}\n\t\t\t\t\titem={item}\n\t\t\t\t\tfield={filter.id}\n\t\t\t\t\tselectedFilters={selectedFilters}\n\t\t\t\t\tsetSelectedFilters={setSelectedFilters}\n\t\t\t\t\tsubcategoryRequireCategory={subcategoryRequireCategory}\n\t\t\t\t/>\n\t\t\t))}\n\t\t\t{externalLinks && externalLinks.map(link => (\n\t\t\t\t<FilterItem\n\t\t\t\t\tkey={link.externalLink}\n\t\t\t\t\titem={<a href={link.externalLinkUrl}>{link.externalLink}</a>}\n\t\t\t\t\tisExternalLink={true}\n\t\t\t\t\texternalLinkUrl={link.externalLinkUrl}\n\t\t\t\t\tfield={filter.id}\n\t\t\t\t\tsubcategoryRequireCategory={subcategoryRequireCategory}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</>\n\t);\n\n\treturn (\n\t\t<AccordionFilterItem\n\t\t\tid={filter.id}\n\t\t\tsetDefaultValue={setDefaultValue}\n\t\t\theader={header}\n\t\t\tbody={body}\n\t\t/>\n\t);\n};\n\nexport default memo(FilterItemContainer);\n"],"names":["FilterItemContainer","_ref","filter","setDefaultValue","setSelectedFilters","selectedFilters","_ref$subcategoryRequi","subcategoryRequireCategory","externalLinksInFilters","_useComponents","useComponents","AccordionFilterItem","FilterItemAccordion","ItemsPill","externalLinks","x","fieldName","id","fieldKey","activeItemsCount","Object","keys","length","handleClearFilters","event","stopPropagation","prevFilters","updatedFilters","_objectSpread","entityId","header","React","createElement","Fragment","title","onClick","body","items","item","sort","map","FilterItem","key","name","field","link","externalLink","href","externalLinkUrl","isExternalLink","memo"],"mappings":";;;;;AAIA,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,EAOnB;AAAA,EAAA,IANLC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,eAAe,GAAAF,IAAA,CAAfE,eAAe;IACfC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAClBC,eAAe,GAAAJ,IAAA,CAAfI,eAAe;IAAAC,qBAAA,GAAAL,IAAA,CACfM,0BAA0B;AAA1BA,IAAAA,0BAA0B,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IAClCE,sBAAsB,GAAAP,IAAA,CAAtBO,sBAAsB,CAAA;AAEtB;AACA,EAAA,IAAAC,cAAA,GAAgEC,aAAa,EAAE;IAAlDC,mBAAmB,GAAAF,cAAA,CAAxCG,mBAAmB;IAAuBC,SAAS,GAAAJ,cAAA,CAATI,SAAS,CAAA;EAE3D,IAAMC,aAAa,GAAGN,sBAAsB,KAAtBA,IAAAA,IAAAA,sBAAsB,KAAtBA,KAAA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