Skip to content

Commit

Permalink
Merge pull request #1198 from City-of-Helsinki/UHF-11362
Browse files Browse the repository at this point in the history
UHF-11362 HDS update to 4.2.0
  • Loading branch information
annadruid authored Feb 21, 2025
2 parents 542fa33 + 160e02c commit abc8e28
Show file tree
Hide file tree
Showing 373 changed files with 72 additions and 8,392 deletions.
4 changes: 2 additions & 2 deletions dist/css/ckeditor.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/css/styles.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/district-and-project-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/health-station-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/job-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/linkedevents.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/maternity-and-child-health-clinic-search.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/news-archive.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/ploughing-schedule.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/school-search.min.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions hdbt.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ nav-global:
- hdbt/nav-toggle

event-list:
version: 1.4.0
version: 1.4.1
js:
dist/js/linkedevents.min.js: {
preprocess: false,
Expand All @@ -214,7 +214,7 @@ event-list:
- core/drupal

school-search:
version: 1.5.2
version: 1.5.3
js:
dist/js/school-search.min.js: {
preprocess: false,
Expand Down Expand Up @@ -249,7 +249,7 @@ hyphenopoly:
- hdbt/hyphenopoly-loader

job-search:
version: 1.8.1
version: 1.8.2
js:
dist/js/job-search.min.js: {
preprocess: false,
Expand All @@ -260,7 +260,7 @@ job-search:
- core/drupal

district-and-project-search:
version: 1.3.1
version: 1.3.2
js:
dist/js/district-and-project-search.min.js: {
preprocess: false,
Expand All @@ -271,7 +271,7 @@ district-and-project-search:
- core/drupal

news-archive:
version: 1.3.1
version: 1.3.2
js:
dist/js/news-archive.min.js: {
preprocess: false,
Expand Down Expand Up @@ -299,7 +299,7 @@ table-figcaption:
- core/once

health-station-search:
version: 1.3.1
version: 1.3.2
js:
dist/js/health-station-search.min.js: {
preprocess: false,
Expand All @@ -310,7 +310,7 @@ health-station-search:
- core/drupal

maternity-and-child-health-clinic-search:
version: 1.2.1
version: 1.2.2
js:
dist/js/maternity-and-child-health-clinic-search.min.js: {
preprocess: false,
Expand All @@ -321,7 +321,7 @@ maternity-and-child-health-clinic-search:
- core/drupal

ploughing-schedule:
version: 1.0.1
version: 1.0.2
js:
dist/js/ploughing-schedule.min.js: {
preprocess: false,
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
"expose-loader": "^5.0.0",
"focus-trap": "^7.5.4",
"glob": "^11.0.0",
"hds-core": "^4.1.0",
"hds-design-tokens": "^4.1.0",
"hds-react": "^4.1.0",
"hds-core": "^4.2.0",
"hds-design-tokens": "^4.2.0",
"hds-react": "^4.2.0",
"html-loader": "^5.0.0",
"html-react-parser": "^5.0.11",
"html-webpack-plugin": "^5.3.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {useEffect, useState} from 'react';
import {useEffect} from 'react';
import {useAtom, useAtomValue, useSetAtom} from 'jotai';
import {
Accordion,
Expand Down Expand Up @@ -38,16 +38,12 @@ const FormContainer = () => {
const [title, setTitle] = useAtom(titleAtom);
const districtOptions = useAtomValue(districtsAtom);
const [districtSelection, setDistrictFilter] = useAtom(districtSelectionAtom);
const [districtSelectOpen, setDistrictSelectOpen] = useState(false);
const themeOptions = useAtomValue(themesAtom);
const [themeSelection, setThemeFilter] = useAtom(themeSelectionAtom);
const [themeSelectOpen, setThemeSelectOpen] = useState(false);
const phaseOptions = useAtomValue(phasesAtom);
const [phaseSelection, setPhaseFilter] = useAtom(phaseSelectionAtom);
const [phaseSelectOpen, setPhaseSelectOpen] = useState(false);
const typeOptions = useAtomValue(typesAtom);
const [typeSelection, setTypeFilter] = useAtom(typeSelectionAtom);
const [typeSelectOpen, setTypeSelectOpen] = useState(false);

// Set form control values from url parameters on load
useEffect(() => {
Expand Down Expand Up @@ -95,12 +91,9 @@ const FormContainer = () => {
id={SearchComponents.DISTRICTS}
multiSelect
noTags
onChange={(selectedOptions, clickedOption) => {
onChange={(selectedOptions) => {
setDistrictFilter(selectedOptions);
if (clickedOption) setDistrictSelectOpen(true);
}}
onBlur={() => setDistrictSelectOpen(false)}
open={districtSelectOpen}
options={districtOptions}
texts={{
clearButtonAriaLabel_one: Drupal.t('Clear @label selection', {'@label': residentialAreaLabel}, { context: 'React search clear selection label' }),
Expand Down Expand Up @@ -134,12 +127,9 @@ const FormContainer = () => {
id={SearchComponents.THEME}
multiSelect
noTags
onChange={(selectedOptions, clickedOption) => {
onChange={(selectedOptions) => {
setThemeFilter(selectedOptions);
if (clickedOption) setThemeSelectOpen(true);
}}
onBlur={() => setThemeSelectOpen(false)}
open={themeSelectOpen}
options={themeOptions}
texts={{
clearButtonAriaLabel_one: Drupal.t('Clear @label selection', {'@label': projectThemeLabel}, { context: 'React search clear selection label' }),
Expand All @@ -159,12 +149,9 @@ const FormContainer = () => {
id={SearchComponents.PHASE}
multiSelect
noTags
onChange={(selectedOptions, clickedOption) => {
onChange={(selectedOptions) => {
setPhaseFilter(selectedOptions);
if (clickedOption) setPhaseSelectOpen(true);
}}
onBlur={() => setPhaseSelectOpen(false)}
open={phaseSelectOpen}
options={phaseOptions}
texts={{
clearButtonAriaLabel_one: Drupal.t('Clear @label selection', {'@label': projectStageLabel}, { context: 'React search clear selection label' }),
Expand All @@ -184,12 +171,9 @@ const FormContainer = () => {
id={SearchComponents.TYPE}
multiSelect
noTags
onChange={(selectedOptions, clickedOption) => {
onChange={(selectedOptions) => {
setTypeFilter(selectedOptions);
if (clickedOption) setTypeSelectOpen(true);
}}
onBlur={() => setTypeSelectOpen(false)}
open={typeSelectOpen}
options={typeOptions}
texts={{
clearButtonAriaLabel_one: Drupal.t('Clear @label selection', {'@label': projectTypeLabel}, { context: 'React search clear selection label' }),
Expand Down
20 changes: 4 additions & 16 deletions src/js/react/apps/job-search/containers/FormContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, Checkbox, Select, TextInput } from 'hds-react';
import { useAtom, useAtomValue, useSetAtom } from 'jotai';
import React, { useEffect, useState } from 'react';
import React, { useEffect } from 'react';

import bucketToMap from '@/react/common/helpers/Aggregations';
import CustomIds from '../enum/CustomTermIds';
Expand Down Expand Up @@ -39,18 +39,15 @@ const FormContainer = () => {
const urlParams = useAtomValue(urlAtom);
const setUrlParams = useSetAtom(urlUpdateAtom);
const [taskAreaSelection, setTaskAreaFilter] = useAtom(taskAreasSelectionAtom);
const [taskAreaSelectOpen, setTaskAreaSelectOpen] = useState(false);
const taskAreasOptions = useAtomValue(taskAreasAtom);
const employmentOptions = useAtomValue(employmentAtom);
const [employmentSelection, setEmploymentFilter] = useAtom(employmentSelectionAtom);
const [employmentSelectOpen, setEmploymentSelectOpen] = useState(false);
const languagesOptions = useAtomValue(languagesAtom);
const [languageSelection, setLanguageFilter] = useAtom(languageSelectionAtom);
const { employmentSearchIds } = useAtomValue(configurationsAtom);
const employmentSearchIdMap = bucketToMap(employmentSearchIds);
const areaFilterOptions = useAtomValue(areaFilterAtom);
const [areaFilterSelection, setAreaFilter] = useAtom(areaFilterSelectionAtom);
const [areaFilterSelectOpen, setAreaFilterSelectOpen] = useState(false);
const setSubmitted = useSetAtom(monitorSubmittedAtom);

// Set form control values from url parameters on load
Expand Down Expand Up @@ -135,11 +132,8 @@ const FormContainer = () => {
id={SearchComponents.TASK_AREAS}
multiSelect
noTags
open={taskAreaSelectOpen}
onBlur={() => setTaskAreaSelectOpen(false)}
onChange={(selectedOptions, clickedOption) => {
onChange={(selectedOptions) => {
setTaskAreaFilter(selectedOptions);
if (clickedOption) setTaskAreaSelectOpen(true);
}}
options={taskAreasOptions}
texts={{
Expand All @@ -157,12 +151,9 @@ const FormContainer = () => {
id={SearchComponents.EMPLOYMENT_RELATIONSHIP}
multiSelect
noTags
open={employmentSelectOpen}
onChange={(selectedOptions, clickedOption) => {
onChange={(selectedOptions) => {
setEmploymentFilter(selectedOptions);
if (clickedOption) setEmploymentSelectOpen(true);
}}
onBlur={() => setEmploymentSelectOpen(false)}
options={employmentOptions}
texts={{
clearButtonAriaLabel_one: Drupal.t('Clear @label selection', {'@label': employmentRelationshipLabel}, { context: 'React search clear selection label' }),
Expand Down Expand Up @@ -234,12 +225,9 @@ const FormContainer = () => {
id={SearchComponents.AREA_FILTER}
multiSelect
noTags
open={areaFilterSelectOpen}
onChange={(selectedOptions, clickedOption) => {
onChange={(selectedOptions) => {
setAreaFilter(selectedOptions);
if (clickedOption) setAreaFilterSelectOpen(true);
}}
onBlur={() => setAreaFilterSelectOpen(false)}
options={areaFilterOptions}
value={areaFilterSelection}
texts={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const FullLocationFilter = memo(() => {

return (
<div className='hdbt-search__filter event-form__filter--location'>
{/* @ts-ignore */}
<Select
className='hdbt-search__dropdown'
texts={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const FullTopicsFilter = memo(() => {

return (
<div className='hdbt-search__filter event-form__filter--topics'>
{/* @ts-ignore */}
<Select
className='hdbt-search__dropdown'
texts={{
Expand Down
Loading

0 comments on commit abc8e28

Please sign in to comment.