From 71edfe660efaf8d7126bfa227827f00b8d3c77f9 Mon Sep 17 00:00:00 2001 From: gen Date: Sat, 16 May 2026 01:39:05 +0900 Subject: [PATCH 1/2] Replace deprecated Angular InstantSearch integration --- package-lock.json | 724 ++++++++++++------ package.json | 4 +- src/app/compat/instantsearch/base-widget.ts | 79 ++ .../instantsearch/highlight.component.ts | 36 + .../instantsearch/index-widget.component.ts | 55 ++ src/app/compat/instantsearch/index.ts | 6 + .../instantsearch/infinite-hits.component.ts | 101 +++ .../instantsearch/instantsearch.component.ts | 62 ++ .../instantsearch/instantsearch.module.ts | 24 + src/app/compat/instantsearch/utils.ts | 6 + .../age-refinement-list.component.ts | 9 +- .../age-refinement-list.module.ts | 4 +- .../applied-filters.component.spec.ts | 2 +- .../applied-filters.component.ts | 2 +- .../applied-filters/applied-filters.module.ts | 4 +- .../bawes-ais-pagination-module.module.ts | 4 +- .../bawes-ais-pagination.component.ts | 2 +- .../candidate-filter.module.ts | 4 +- .../candidate-filter/candidate-filter.ts | 2 +- .../current-refinement.component.spec.ts | 2 +- .../current-refinement.component.ts | 4 +- .../current-refinement.module.ts | 4 +- .../date-range-refinement-list.component.ts | 4 +- .../date-range-refinement-list.module.ts | 4 +- .../fulltimer-filter.module.ts | 4 +- .../fulltimer-filter/fulltimer-filter.ts | 2 +- .../is-facets-search.component.spec.ts | 2 +- .../is-facets-search.module.ts | 4 +- .../is-search-box.component.spec.ts | 2 +- .../is-search-box/is-search-box.component.ts | 2 +- .../is-search-box/is-search-box.module.ts | 4 +- .../range-refinement-list.module.ts | 4 +- .../range-refinement-list.ts | 9 +- .../refinement-list.component.html | 6 +- .../refinement-list.component.spec.ts | 2 +- .../refinement-list.component.ts | 4 +- .../refinement-list/refinement-list.module.ts | 4 +- .../candidate-search.module.ts | 4 +- .../candidate-search.page.html | 8 +- .../candidate-search/candidate-search.page.ts | 8 +- .../fulltimer-search.module.ts | 4 +- .../fulltimer-search.page.html | 14 +- .../fulltimer-search/fulltimer-search.page.ts | 6 +- .../providers/logged-in/algolia.service.ts | 22 +- tsconfig.json | 1 + 45 files changed, 959 insertions(+), 305 deletions(-) create mode 100644 src/app/compat/instantsearch/base-widget.ts create mode 100644 src/app/compat/instantsearch/highlight.component.ts create mode 100644 src/app/compat/instantsearch/index-widget.component.ts create mode 100644 src/app/compat/instantsearch/index.ts create mode 100644 src/app/compat/instantsearch/infinite-hits.component.ts create mode 100644 src/app/compat/instantsearch/instantsearch.component.ts create mode 100644 src/app/compat/instantsearch/instantsearch.module.ts create mode 100644 src/app/compat/instantsearch/utils.ts diff --git a/package-lock.json b/package-lock.json index 9add9672..5bd49572 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,14 +38,14 @@ "@sentry/browser": "^7.92.0", "@sentry/cli": "^2.24.1", "@tinymce/tinymce-angular": "^7.0.0", - "algoliasearch": "^4.23.3", - "angular-instantsearch": "^4.4.0", + "algoliasearch": "^5.52.1", "aws-sdk": "^2.1279.0", "chart.js": "^4.1.1", "cordova-plugin-file": "^7.0.0", "cordova-plugin-nativestorage": "^2.3.2", "date-fns": "^2.29.3", "file-saver": "^2.0.5", + "instantsearch.js": "^4.97.0", "ion2-calendar": "^3.5.0", "ionicons": "^6.0.3", "mixpanel-browser": "^2.45.0", @@ -90,158 +90,207 @@ "typescript": "~4.8.4" } }, - "node_modules/@algolia/cache-browser-local-storage": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.23.3.tgz", - "integrity": "sha512-vRHXYCpPlTDE7i6UOy2xE03zHF2C8MEFjPN2v7fRbqVpcOvAUQK81x3Kc21xyb5aSIpYCjWCZbYZuz8Glyzyyg==", - "dependencies": { - "@algolia/cache-common": "4.23.3" - } - }, - "node_modules/@algolia/cache-common": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.23.3.tgz", - "integrity": "sha512-h9XcNI6lxYStaw32pHpB1TMm0RuxphF+Ik4o7tcQiodEdpKK+wKufY6QXtba7t3k8eseirEMVB83uFFF3Nu54A==" - }, - "node_modules/@algolia/cache-in-memory": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.23.3.tgz", - "integrity": "sha512-yvpbuUXg/+0rbcagxNT7un0eo3czx2Uf0y4eiR4z4SD7SiptwYTpbuS0IHxcLHG3lq22ukx1T6Kjtk/rT+mqNg==", + "node_modules/@algolia/abtesting": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@algolia/abtesting/-/abtesting-1.18.1.tgz", + "integrity": "sha512-aehCadlWOGvrT91KUIZpC0MbB8KBW9yUuvTJFd2xesR7le/IsT4nJUnjCCZ4ZqZCeTcPHPV5mo//fZ5oxcSVYw==", + "license": "MIT", "dependencies": { - "@algolia/cache-common": "4.23.3" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/client-account": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.23.3.tgz", - "integrity": "sha512-hpa6S5d7iQmretHHF40QGq6hz0anWEHGlULcTIT9tbUssWUriN9AUXIFQ8Ei4w9azD0hc1rUok9/DeQQobhQMA==", + "node_modules/@algolia/client-abtesting": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.52.1.tgz", + "integrity": "sha512-HmXOGBOAOJPounpBzBpuY0zDYeiCpxgHnQmuA7JO6ScukcBdGp3/XM9zJk5pJx/xNGD68mbPGXWpDxGtl6BwDQ==", + "license": "MIT", "dependencies": { - "@algolia/client-common": "4.23.3", - "@algolia/client-search": "4.23.3", - "@algolia/transporter": "4.23.3" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-analytics": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.23.3.tgz", - "integrity": "sha512-LBsEARGS9cj8VkTAVEZphjxTjMVCci+zIIiRhpFun9jGDUlS1XmhCW7CTrnaWeIuCQS/2iPyRqSy1nXPjcBLRA==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.52.1.tgz", + "integrity": "sha512-5oo4+I8iixie9vXhCyNFCzeIr8pqA3FQ//VsLHTDvZAV4ttYOPGvYHGQq5NSalrLx5Jc3dRro/5uDOlnUMcBJg==", + "license": "MIT", "dependencies": { - "@algolia/client-common": "4.23.3", - "@algolia/client-search": "4.23.3", - "@algolia/requester-common": "4.23.3", - "@algolia/transporter": "4.23.3" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-common": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.23.3.tgz", - "integrity": "sha512-l6EiPxdAlg8CYhroqS5ybfIczsGUIAC47slLPOMDeKSVXYG1n0qGiz4RjAHLw2aD0xzh2EXZ7aRguPfz7UKDKw==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.52.1.tgz", + "integrity": "sha512-qCDoZfx5MpX7XQzvQ3bC4tSEMkQWQMaF/ABtLuoze03Y/flR563CCSws02qIJ23oX7lxl92LsilZjINVyTdtLw==", + "license": "MIT", + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-insights": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.52.1.tgz", + "integrity": "sha512-hnGs0/lsFJ2PWDxNBz7pxreXo/Xz7gxYRcfePBUjsH26ad0kU/sgnVZd9LwWBpsQv65z2jlb5dkyaB9WE9M9FQ==", + "license": "MIT", "dependencies": { - "@algolia/requester-common": "4.23.3", - "@algolia/transporter": "4.23.3" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-personalization": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.23.3.tgz", - "integrity": "sha512-3E3yF3Ocr1tB/xOZiuC3doHQBQ2zu2MPTYZ0d4lpfWads2WTKG7ZzmGnsHmm63RflvDeLK/UVx7j2b3QuwKQ2g==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.52.1.tgz", + "integrity": "sha512-2VxxNc/uBysyKvGeBdSM5n9eIDKH8kWD7wd9/yqbJAiVwU4Yv6tU1LSJusHKrXV/aCu1KW7t9Gug9QyeEmtn/Q==", + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/@algolia/client-query-suggestions": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.52.1.tgz", + "integrity": "sha512-O6mPtsw3xEfNOe6gWFpYLeAZAIljNa4Hgna3bq15PwyN7nbjTY0wXJFRbzs/0YVf75Br+SbOQUmjKxXYjDiSiQ==", + "license": "MIT", "dependencies": { - "@algolia/client-common": "4.23.3", - "@algolia/requester-common": "4.23.3", - "@algolia/transporter": "4.23.3" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/client-search": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.23.3.tgz", - "integrity": "sha512-P4VAKFHqU0wx9O+q29Q8YVuaowaZ5EM77rxfmGnkHUJggh28useXQdopokgwMeYw2XUht49WX5RcTQ40rZIabw==", + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.52.1.tgz", + "integrity": "sha512-gA8oJOV1LnQQkDf91iebNnFInHuW0gRPEgLSOQ7EfipCEjYTHm5swm1DlH9H5RaRw4RrHuzHBegnlzc0MAstcg==", + "license": "MIT", "dependencies": { - "@algolia/client-common": "4.23.3", - "@algolia/requester-common": "4.23.3", - "@algolia/transporter": "4.23.3" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/@algolia/events": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@algolia/events/-/events-4.0.1.tgz", - "integrity": "sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==" - }, - "node_modules/@algolia/logger-common": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.23.3.tgz", - "integrity": "sha512-y9kBtmJwiZ9ZZ+1Ek66P0M68mHQzKRxkW5kAAXYN/rdzgDN0d2COsViEFufxJ0pb45K4FRcfC7+33YB4BLrZ+g==" + "integrity": "sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==", + "license": "MIT" }, - "node_modules/@algolia/logger-console": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.23.3.tgz", - "integrity": "sha512-8xoiseoWDKuCVnWP8jHthgaeobDLolh00KJAdMe9XPrWPuf1by732jSpgy2BlsLTaT9m32pHI8CRfrOqQzHv3A==", + "node_modules/@algolia/ingestion": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.52.1.tgz", + "integrity": "sha512-U9zZfc5xIu9wRxZkt+HceJUAD4VKHKbAyLSloJdEyMRmphXeibfrY9cxqIXBcmPeZzGhn3Imb35Dq8l19PkJhw==", + "license": "MIT", "dependencies": { - "@algolia/logger-common": "4.23.3" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/recommend": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-4.23.3.tgz", - "integrity": "sha512-9fK4nXZF0bFkdcLBRDexsnGzVmu4TSYZqxdpgBW2tEyfuSSY54D4qSRkLmNkrrz4YFvdh2GM1gA8vSsnZPR73w==", - "dependencies": { - "@algolia/cache-browser-local-storage": "4.23.3", - "@algolia/cache-common": "4.23.3", - "@algolia/cache-in-memory": "4.23.3", - "@algolia/client-common": "4.23.3", - "@algolia/client-search": "4.23.3", - "@algolia/logger-common": "4.23.3", - "@algolia/logger-console": "4.23.3", - "@algolia/requester-browser-xhr": "4.23.3", - "@algolia/requester-common": "4.23.3", - "@algolia/requester-node-http": "4.23.3", - "@algolia/transporter": "4.23.3" + "node_modules/@algolia/monitoring": { + "version": "1.52.1", + "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.52.1.tgz", + "integrity": "sha512-a3SGNceHmkQfq77iG8Ka+w1pvwfZa/0lzEIgse30fL0kD+yKnd/dg0dQvSfFPAEt2f21DMcGkDSSeJlO3KdQjQ==", + "license": "MIT", + "dependencies": { + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/requester-browser-xhr": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.23.3.tgz", - "integrity": "sha512-jDWGIQ96BhXbmONAQsasIpTYWslyjkiGu0Quydjlowe+ciqySpiDUrJHERIRfELE5+wFc7hc1Q5hqjGoV7yghw==", + "node_modules/@algolia/recommend": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.52.1.tgz", + "integrity": "sha512-z98QEguCFDpxb4S/PyrUK1igqF8tPsdbqOUUO6ON91vJ58w+Gwa6ncrI0oNXSFcrkxA5EqPKPQ2A1PBCn08TYQ==", + "license": "MIT", "dependencies": { - "@algolia/requester-common": "4.23.3" + "@algolia/client-common": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/requester-common": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.23.3.tgz", - "integrity": "sha512-xloIdr/bedtYEGcXCiF2muajyvRhwop4cMZo+K2qzNht0CMzlRkm8YsDdj5IaBhshqfgmBb3rTg4sL4/PpvLYw==" - }, - "node_modules/@algolia/requester-node-http": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.23.3.tgz", - "integrity": "sha512-zgu++8Uj03IWDEJM3fuNl34s746JnZOWn1Uz5taV1dFyJhVM/kTNw9Ik7YJWiUNHJQXcaD8IXD1eCb0nq/aByA==", + "node_modules/@algolia/requester-browser-xhr": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.52.1.tgz", + "integrity": "sha512-CI7+/0I11QeZM59Uc8whd2or0kqzFVjpaPn9Qpwll/krHcBAxk24WkAQ6WX+IwDVMfpont4YGbKwAmCre3vE8Q==", + "license": "MIT", "dependencies": { - "@algolia/requester-common": "4.23.3" + "@algolia/client-common": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/transporter": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.23.3.tgz", - "integrity": "sha512-Wjl5gttqnf/gQKJA+dafnD0Y6Yw97yvfY8R9h0dQltX1GXTgNs1zWgvtWW0tHl1EgMdhAyw189uWiZMnL3QebQ==", + "node_modules/@algolia/requester-fetch": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.52.1.tgz", + "integrity": "sha512-S6bDuw9byfOvm3T71cgdoZgrgnZq6hpdMLkx52Louh57nUAmvGQESz2aojOynQHjbTiV55smvAFbgn0qT4tJrg==", + "license": "MIT", "dependencies": { - "@algolia/cache-common": "4.23.3", - "@algolia/logger-common": "4.23.3", - "@algolia/requester-common": "4.23.3" + "@algolia/client-common": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/ui-components-highlight-vdom": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@algolia/ui-components-highlight-vdom/-/ui-components-highlight-vdom-1.2.1.tgz", - "integrity": "sha512-IlYgIaCUEkz9ezNbwugwKv991oOHhveyq6nzL0F1jDzg1p3q5Yj/vO4KpNG910r2dwGCG3nEm5GtChcLnarhFA==", + "node_modules/@algolia/requester-node-http": { + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.52.1.tgz", + "integrity": "sha512-tqZXM+54rWo4mk5jL5Z/flE11nPmNEdXwFBM5py9DkOmbjeCNemfVd45FyM97XdzfZ0dl9uOJC6PYn1FpkeyQg==", + "license": "MIT", "dependencies": { - "@algolia/ui-components-shared": "1.2.1", - "@babel/runtime": "^7.0.0" + "@algolia/client-common": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, - "node_modules/@algolia/ui-components-shared": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@algolia/ui-components-shared/-/ui-components-shared-1.2.1.tgz", - "integrity": "sha512-a7mYHf/GVQfhAx/HRiMveKkFvHspQv/REdG+C/FIOosiSmNZxX7QebDwJkrGSmDWdXO12D0Qv1xn3AytFcEDlQ==" - }, "node_modules/@alloc/quick-lru": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz", @@ -2603,6 +2652,7 @@ "version": "7.20.13", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.13.tgz", "integrity": "sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==", + "dev": true, "dependencies": { "regenerator-runtime": "^0.13.11" }, @@ -4786,6 +4836,21 @@ "npm": ">=6.0.0" } }, + "node_modules/@swc/helpers": { + "version": "0.5.18", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.18.tgz", + "integrity": "sha512-TXTnIcNJQEKwThMMqBXsZ4VGAza6bvN4pa41Rkqoio6QBKMvo+5lexeTMScGCIxtzgQJzElcvIltani+adC5PQ==", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@swc/helpers/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@tinymce/tinymce-angular": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@tinymce/tinymce-angular/-/tinymce-angular-7.0.0.tgz", @@ -4903,6 +4968,12 @@ "@types/node": "*" } }, + "node_modules/@types/dom-speech-recognition": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@types/dom-speech-recognition/-/dom-speech-recognition-0.0.1.tgz", + "integrity": "sha512-udCxb8DvjcDKfk1WTBzDsxFbLgYxmQGKrE/ricoMqHRNjSlSUCcamVTA5lIQqzY10mY5qCY0QDwBfFEwhfoDPw==", + "license": "MIT" + }, "node_modules/@types/eslint": { "version": "8.21.2", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.2.tgz", @@ -4962,14 +5033,16 @@ } }, "node_modules/@types/google.maps": { - "version": "3.52.3", - "resolved": "https://registry.npmjs.org/@types/google.maps/-/google.maps-3.52.3.tgz", - "integrity": "sha512-2bIhomvQF3+R/ahhhIsL95mPXEpvOY53wojcXAZSrFylYQuAT6owtmJRDGpSz3SL1PQAVDJ6MYLbH59cLDx7VQ==" + "version": "3.64.1", + "resolved": "https://registry.npmjs.org/@types/google.maps/-/google.maps-3.64.1.tgz", + "integrity": "sha512-nEBoa6iDNipICtxJ5VlrOgPNZQ6ixIg5nuv8iryFj0Z/1NLgxyg3pQCVegPuCzGCyTQwQI/N3uZvLUysqAzaaw==", + "license": "MIT" }, "node_modules/@types/hogan.js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/hogan.js/-/hogan.js-3.0.1.tgz", - "integrity": "sha512-D03i/2OY7kGyMq9wdQ7oD8roE49z/ZCZThe/nbahtvuqCNZY9T2MfedOWyeBdbEpY2W8Gnh/dyJLdFtUCOkYbg==" + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/hogan.js/-/hogan.js-3.0.5.tgz", + "integrity": "sha512-/uRaY3HGPWyLqOyhgvW9Aa43BNnLZrNeQxl2p8wqId4UHMfPKolSB+U7BlZyO1ng7MkLnyEAItsBzCG0SDhqrA==", + "license": "MIT" }, "node_modules/@types/http-proxy": { "version": "1.17.10", @@ -5792,31 +5865,35 @@ } }, "node_modules/algoliasearch": { - "version": "4.23.3", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.23.3.tgz", - "integrity": "sha512-Le/3YgNvjW9zxIQMRhUHuhiUjAlKY/zsdZpfq4dlLqg6mEm0nL6yk+7f2hDOtLpxsgE4jSzDmvHL7nXdBp5feg==", - "dependencies": { - "@algolia/cache-browser-local-storage": "4.23.3", - "@algolia/cache-common": "4.23.3", - "@algolia/cache-in-memory": "4.23.3", - "@algolia/client-account": "4.23.3", - "@algolia/client-analytics": "4.23.3", - "@algolia/client-common": "4.23.3", - "@algolia/client-personalization": "4.23.3", - "@algolia/client-search": "4.23.3", - "@algolia/logger-common": "4.23.3", - "@algolia/logger-console": "4.23.3", - "@algolia/recommend": "4.23.3", - "@algolia/requester-browser-xhr": "4.23.3", - "@algolia/requester-common": "4.23.3", - "@algolia/requester-node-http": "4.23.3", - "@algolia/transporter": "4.23.3" + "version": "5.52.1", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.52.1.tgz", + "integrity": "sha512-fHA8+kXTbjagw3jkLiaS7KKrH8qe2DyOsiUhGlN4cdT77PEsfqXZl7ewDk1hsg+pJnPlnE50XtLxjR91iJOpmg==", + "license": "MIT", + "dependencies": { + "@algolia/abtesting": "1.18.1", + "@algolia/client-abtesting": "5.52.1", + "@algolia/client-analytics": "5.52.1", + "@algolia/client-common": "5.52.1", + "@algolia/client-insights": "5.52.1", + "@algolia/client-personalization": "5.52.1", + "@algolia/client-query-suggestions": "5.52.1", + "@algolia/client-search": "5.52.1", + "@algolia/ingestion": "1.52.1", + "@algolia/monitoring": "1.52.1", + "@algolia/recommend": "5.52.1", + "@algolia/requester-browser-xhr": "5.52.1", + "@algolia/requester-fetch": "5.52.1", + "@algolia/requester-node-http": "5.52.1" + }, + "engines": { + "node": ">= 14.0.0" } }, "node_modules/algoliasearch-helper": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.12.0.tgz", - "integrity": "sha512-/j1U3PEwdan0n6P/QqSnSpNSLC5+cEMvyljd5CnmNmUjDlGrys+vFEOwjVEnqELIiAGMHEA/Nl3CiKVFBUYqyQ==", + "version": "3.29.1", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.29.1.tgz", + "integrity": "sha512-6ck2YFudF2Pje7szQoPBiRFTGfd+1I+0I/WfLPGn0bj1kvrFoOQmNyedNiDxTk3/r4IfSLDYk+RA4G7u8H6+yA==", + "license": "MIT", "dependencies": { "@algolia/events": "^4.0.1" }, @@ -5824,24 +5901,6 @@ "algoliasearch": ">= 3.1 < 6" } }, - "node_modules/angular-instantsearch": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/angular-instantsearch/-/angular-instantsearch-4.4.0.tgz", - "integrity": "sha512-NhxaYKpnKz6lIMXR6r/7HXNbm0S8c4zUQH4mGVpjp9oKLxEyWq3C4IdnARof0qWa6mdlLaCBf5ImrzBUJ1wHyA==", - "dependencies": { - "instantsearch.css": "^7.3.1", - "instantsearch.js": "^4.48.1", - "nouislider": "^10.0.0", - "querystring-es3": "^0.2.1", - "tslib": "^2.1.0" - }, - "peerDependencies": { - "@angular/common": ">=5.0.0 <16.0.0", - "@angular/core": ">=5.0.0 <16.0.0", - "@angular/platform-browser": ">=5.0.0 <16.0.0", - "@angular/platform-browser-dynamic": ">=5.0.0 <16.0.0" - } - }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -6588,6 +6647,35 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -7679,6 +7767,20 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -7924,6 +8026,24 @@ "resolved": "https://registry.npmjs.org/es-cookie/-/es-cookie-1.3.2.tgz", "integrity": "sha512-UTlYYhXGLOy05P/vKVT2Ui7WtC7NiRzGtJyAKKn32g5Gvcjn7KAClLPWlipCtxIus934dFg9o9jXiBL0nP+t9Q==" }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-get-iterator": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", @@ -7956,6 +8076,18 @@ "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", "dev": true }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", @@ -9247,13 +9379,24 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", - "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9268,6 +9411,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -9399,11 +9555,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9425,6 +9582,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -9475,9 +9633,10 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -9509,7 +9668,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -9613,7 +9771,8 @@ "node_modules/htm": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz", - "integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==" + "integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==", + "license": "Apache-2.0" }, "node_modules/html-entities": { "version": "2.3.3", @@ -10019,28 +10178,40 @@ "node": ">=8" } }, - "node_modules/instantsearch.css": { - "version": "7.4.5", - "resolved": "https://registry.npmjs.org/instantsearch.css/-/instantsearch.css-7.4.5.tgz", - "integrity": "sha512-iIGBYjCokU93DDB8kbeztKtlu4qVEyTg1xvS6iSO1YvqRwkIZgf0tmsl/GytsLdZhuw8j4wEaeYsCzNbeJ/zEQ==" + "node_modules/instantsearch-ui-components": { + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/instantsearch-ui-components/-/instantsearch-ui-components-0.26.1.tgz", + "integrity": "sha512-oWP8d130JXFpFQzDnTrZ2qdEJf0ZSz0qDuaemoK8K7tQchoHTqE7NA3S9I5Kos9VDPSzwv9D2relAh6L0yLMzw==", + "license": "MIT", + "dependencies": { + "@swc/helpers": "0.5.18", + "markdown-to-jsx": "^7.7.15", + "zod": "^3.25.76 || ^4", + "zod-to-json-schema": "3.24.6" + } }, "node_modules/instantsearch.js": { - "version": "4.49.2", - "resolved": "https://registry.npmjs.org/instantsearch.js/-/instantsearch.js-4.49.2.tgz", - "integrity": "sha512-mnFscxv8cmBBGrM+mdvDz5MK+X4fRiI6t6CmKc6tigrFdykWBJGeIXtKvn3cAc0bTEkEl9TqhlEpPOLeBrXPcw==", + "version": "4.97.0", + "resolved": "https://registry.npmjs.org/instantsearch.js/-/instantsearch.js-4.97.0.tgz", + "integrity": "sha512-+HVczmXa5TdvnaYj37Pe5nSaSSmYffwl8RUciEpQQYCTxwv9MU7R866A5vL+JMAS9GhQAa4ZUgZeTk7PMaTjZw==", + "license": "MIT", "dependencies": { "@algolia/events": "^4.0.1", - "@algolia/ui-components-highlight-vdom": "^1.2.1", - "@algolia/ui-components-shared": "^1.2.1", - "@types/google.maps": "^3.45.3", + "@swc/helpers": "0.5.18", + "@types/dom-speech-recognition": "^0.0.1", + "@types/google.maps": "^3.55.12", "@types/hogan.js": "^3.0.0", "@types/qs": "^6.5.3", - "algoliasearch-helper": "^3.11.1", + "algoliasearch-helper": "3.29.1", "hogan.js": "^3.0.2", "htm": "^3.0.0", + "instantsearch-ui-components": "0.26.1", "preact": "^10.10.0", - "qs": "^6.5.1 < 6.10", - "search-insights": "^2.1.0" + "qs": "^6.5.1", + "react": ">= 0.14.0", + "search-insights": "^2.17.2", + "zod": "^3.25.76 || ^4", + "zod-to-json-schema": "3.24.6" }, "peerDependencies": { "algoliasearch": ">= 3.1 < 6" @@ -11739,6 +11910,32 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/markdown-to-jsx": { + "version": "7.7.17", + "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.7.17.tgz", + "integrity": "sha512-7mG/1feQ0TX5I7YyMZVDgCC/y2I3CiEhIRQIhyov9nGBP5eoVrOXXHuL5ZP8GRfxVZKRiXWJgwXkb9It+nQZfQ==", + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "react": ">= 0.14.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + } + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -12125,6 +12322,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz", "integrity": "sha512-OHsdUcVAQ6pOtg5JYWpCBo9W/GySVuwvP9hueRMW7UqshC0tbfzLv8wjySTPm3tfUZ/21CE9E1pJagOA91Pxew==", "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", + "license": "MIT/X11", "engines": { "node": "*" } @@ -12459,6 +12657,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "license": "MIT", "dependencies": { "abbrev": "1" }, @@ -12502,11 +12701,6 @@ "node": ">=0.10.0" } }, - "node_modules/nouislider": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/nouislider/-/nouislider-10.1.0.tgz", - "integrity": "sha512-lENwxlpoYg4/5gjdaY/PMNHeVL+CMJyrO+7RzXi1MqhSSGwuJsQSJteXCQV5bE2UKEdSLARWrqIF8XSWAq7h+A==" - }, "node_modules/npm-bundled": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", @@ -12711,10 +12905,13 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", - "dev": true, + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -13630,9 +13827,10 @@ "dev": true }, "node_modules/preact": { - "version": "10.13.1", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.13.1.tgz", - "integrity": "sha512-KyoXVDU5OqTpG9LXlB3+y639JAGzl8JSBXLn1J9HTSB3gbKcuInga7bZnXLlxmK94ntTs1EFeZp0lrja2AuBYQ==", + "version": "10.29.1", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.29.1.tgz", + "integrity": "sha512-gQCLc/vWroE8lIpleXtdJhTFDogTdZG9AjMUpVkDf2iTCNwYNWA+u16dL41TqUDJO4gm2IgrcMv3uTpjd4Pwmg==", + "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -13781,9 +13979,13 @@ } }, "node_modules/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", + "version": "6.15.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz", + "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, "engines": { "node": ">=0.6" }, @@ -13800,14 +14002,6 @@ "node": ">=0.4.x" } }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -13861,6 +14055,15 @@ "node": ">= 0.8" } }, + "node_modules/react": { + "version": "19.2.6", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.6.tgz", + "integrity": "sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -14103,7 +14306,8 @@ "node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "dev": true }, "node_modules/regenerator-transform": { "version": "0.15.1", @@ -14523,12 +14727,10 @@ } }, "node_modules/search-insights": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.3.0.tgz", - "integrity": "sha512-0v/TTO4fbd6I91sFBK/e2zNfD0f51A+fMoYNkMplmR77NpThUye/7gIxNoJ3LejKpZH6Z2KNBIpxxFmDKj10Yw==", - "engines": { - "node": ">=8.16.0" - } + "version": "2.17.3", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.17.3.tgz", + "integrity": "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==", + "license": "MIT" }, "node_modules/select-hose": { "version": "2.0.0", @@ -14786,14 +14988,72 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -17207,6 +17467,24 @@ "node": ">=6" } }, + "node_modules/zod": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", + "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.24.6", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.24.6.tgz", + "integrity": "sha512-h/z3PKvcTcTetyjl1fkj79MHNEjm+HpD6NXheWjzOekY7kV+lwDYnHw+ivHkijnCSMz1yJaWBD9vu/Fcmk+vEg==", + "license": "ISC", + "peerDependencies": { + "zod": "^3.24.1" + } + }, "node_modules/zone.js": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.8.tgz", diff --git a/package.json b/package.json index fd0473f0..168c83ce 100644 --- a/package.json +++ b/package.json @@ -48,14 +48,14 @@ "@sentry/browser": "^7.92.0", "@sentry/cli": "^2.24.1", "@tinymce/tinymce-angular": "^7.0.0", - "algoliasearch": "^4.23.3", - "angular-instantsearch": "^4.4.0", + "algoliasearch": "^5.52.1", "aws-sdk": "^2.1279.0", "chart.js": "^4.1.1", "cordova-plugin-file": "^7.0.0", "cordova-plugin-nativestorage": "^2.3.2", "date-fns": "^2.29.3", "file-saver": "^2.0.5", + "instantsearch.js": "^4.97.0", "ion2-calendar": "^3.5.0", "ionicons": "^6.0.3", "mixpanel-browser": "^2.45.0", diff --git a/src/app/compat/instantsearch/base-widget.ts b/src/app/compat/instantsearch/base-widget.ts new file mode 100644 index 00000000..a02db25e --- /dev/null +++ b/src/app/compat/instantsearch/base-widget.ts @@ -0,0 +1,79 @@ +import { Directive, Input } from '@angular/core'; +import { isPlatformBrowser } from '@angular/common'; +import { noop } from './utils'; + +function bem(widgetName: string) { + return function cx(element?: string, subElement?: string): string { + let cssClass = `ais-${widgetName}`; + + if (element) { + cssClass += `-${element}`; + } + + if (subElement) { + cssClass += `--${subElement}`; + } + + return cssClass; + }; +} + +@Directive() +export class BaseWidget { + @Input() autoHideContainer: boolean; + + public state: any = {}; + public widget: any; + public updateState: (state: any, isFirstRendering?: boolean) => any; + public cx: (element?: string, subElement?: string) => string; + public parentIndex: any; + public instantSearchInstance: any; + + constructor(widgetName: string) { + this.cx = bem(widgetName); + this.updateState = (state, isFirstRendering) => { + if (isFirstRendering) { + return Promise.resolve().then(() => { + this.state = state; + }); + } + + this.state = state; + }; + } + + get parent() { + return this.parentIndex || this.instantSearchInstance; + } + + createWidget(connector: any, options: any = {}, additionalWidgetProperties: any = {}) { + this.widget = { + ...connector(this.updateState, noop)(options), + ...additionalWidgetProperties, + }; + } + + ngOnInit() { + this.parent.addWidgets([this.widget]); + } + + ngOnDestroy() { + if (isPlatformBrowser(this.instantSearchInstance.platformId)) { + this.parent.removeWidgets([this.widget]); + } + } + + getItemClass(item: any): string { + const className = this.cx('item'); + return item.isRefined ? `${className} ${this.cx('item', 'selected')}` : className; + } +} + +@Directive() +export class TypedBaseWidget extends BaseWidget { + declare public state: TWidgetDescription extends { renderState: infer TState } ? TState : any; + + createWidget(connector: any, options: TConnectorParams, additionalWidgetProperties: any = {}) { + super.createWidget(connector, options, additionalWidgetProperties); + } +} diff --git a/src/app/compat/instantsearch/highlight.component.ts b/src/app/compat/instantsearch/highlight.component.ts new file mode 100644 index 00000000..c388e042 --- /dev/null +++ b/src/app/compat/instantsearch/highlight.component.ts @@ -0,0 +1,36 @@ +import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; +import { highlight } from 'instantsearch.js/es/helpers'; + +function getPropertyByPath(object: any, path: string) { + return path + .replace(/\[(\d+)]/g, '.$1') + .split('.') + .reduce((current, key) => (current ? current[key] : undefined), object); +} + +@Component({ + selector: 'app-instantsearch-highlight', + changeDetection: ChangeDetectionStrategy.OnPush, + template: '', +}) +export class InstantSearchHighlightComponent { + @Input() attribute: string; + @Input() hit: any; + @Input() tagName = 'mark'; + + get content() { + const highlightAttributeResult = getPropertyByPath(this.hit._highlightResult, this.attribute); + const fallback = getPropertyByPath(this.hit, this.attribute); + + if (!highlightAttributeResult && fallback) { + return fallback; + } + + return highlight({ + attribute: this.attribute, + highlightedTagName: this.tagName, + hit: this.hit, + }); + } +} + diff --git a/src/app/compat/instantsearch/index-widget.component.ts b/src/app/compat/instantsearch/index-widget.component.ts new file mode 100644 index 00000000..50fcd754 --- /dev/null +++ b/src/app/compat/instantsearch/index-widget.component.ts @@ -0,0 +1,55 @@ +import { Component, Inject, Input, OnDestroy, OnInit, Optional, SkipSelf, forwardRef } from '@angular/core'; +import { isPlatformBrowser } from '@angular/common'; +import indexWidget from 'instantsearch.js/es/widgets/index/index'; +import { NgAisInstantSearch } from './instantsearch.component'; + +@Component({ + selector: 'app-instantsearch-index', + template: '', +}) +export class NgAisIndex implements OnInit, OnDestroy { + @Input() indexName: string; + @Input() indexId: string; + + public widget: any; + + constructor( + @SkipSelf() + @Inject(forwardRef(() => NgAisIndex)) + @Optional() + public parentIndex: NgAisIndex, + @Inject(forwardRef(() => NgAisInstantSearch)) + public instantSearchInstance: NgAisInstantSearch + ) {} + + get parent() { + return this.parentIndex || this.instantSearchInstance; + } + + ngOnInit() { + this.widget = { + ...indexWidget({ + indexName: this.indexName, + indexId: this.indexId, + }), + $$widgetType: 'ais.index', + }; + + this.parent.addWidgets([this.widget]); + } + + ngOnDestroy() { + if (isPlatformBrowser(this.instantSearchInstance.platformId)) { + this.parent.removeWidgets([this.widget]); + } + } + + addWidgets(widgets: any[]) { + this.widget.addWidgets(widgets); + } + + removeWidgets(widgets: any[]) { + this.widget.removeWidgets(widgets); + } +} + diff --git a/src/app/compat/instantsearch/index.ts b/src/app/compat/instantsearch/index.ts new file mode 100644 index 00000000..42ae1172 --- /dev/null +++ b/src/app/compat/instantsearch/index.ts @@ -0,0 +1,6 @@ +export * from './base-widget'; +export * from './index-widget.component'; +export * from './instantsearch.component'; +export * from './instantsearch.module'; +export * from './utils'; + diff --git a/src/app/compat/instantsearch/infinite-hits.component.ts b/src/app/compat/instantsearch/infinite-hits.component.ts new file mode 100644 index 00000000..b2670ea3 --- /dev/null +++ b/src/app/compat/instantsearch/infinite-hits.component.ts @@ -0,0 +1,101 @@ +import { Component, ContentChild, Inject, Input, OnInit, Optional, TemplateRef, forwardRef } from '@angular/core'; +import { connectInfiniteHitsWithInsights } from 'instantsearch.js/es/connectors'; +import { TypedBaseWidget } from './base-widget'; +import { noop } from './utils'; +import { NgAisIndex } from './index-widget.component'; +import { NgAisInstantSearch } from './instantsearch.component'; + +@Component({ + selector: 'app-infinite-hits', + template: ` +
+ + + + +
+
    +
  • + +
  • +
+
+ + +
+ `, +}) +export class InstantSearchInfiniteHitsComponent extends TypedBaseWidget implements OnInit { + @ContentChild(TemplateRef, { static: false }) template: TemplateRef; + @Input() escapeHTML: boolean; + @Input() showPrevious = false; + @Input() showPreviousLabel = 'Show previous results'; + @Input() showMoreLabel = 'Show more results'; + @Input() transformItems: any; + + public override state: any = { + hits: [], + results: undefined, + currentPageHits: [], + isFirstPage: false, + isLastPage: false, + showMore: noop, + showPrevious: noop, + sendEvent: noop, + bindEvent: () => '', + }; + + constructor( + @Inject(forwardRef(() => NgAisIndex)) + @Optional() + public override parentIndex: NgAisIndex, + @Inject(forwardRef(() => NgAisInstantSearch)) + public override instantSearchInstance: NgAisInstantSearch + ) { + super('InfiniteHits'); + + this.updateState = (state, isFirstRendering) => { + if (isFirstRendering) { + return; + } + + this.state = state; + }; + } + + ngOnInit() { + this.createWidget(connectInfiniteHitsWithInsights, { + escapeHTML: this.escapeHTML, + transformItems: this.transformItems, + }, { + $$widgetType: 'ais.infiniteHits', + }); + + super.ngOnInit(); + } + + showMoreHandler(event: Event) { + event.preventDefault(); + this.state.showMore(); + } + + showPreviousHandler(event: Event) { + event.preventDefault(); + this.state.showPrevious(); + } +} + diff --git a/src/app/compat/instantsearch/instantsearch.component.ts b/src/app/compat/instantsearch/instantsearch.component.ts new file mode 100644 index 00000000..69b950ac --- /dev/null +++ b/src/app/compat/instantsearch/instantsearch.component.ts @@ -0,0 +1,62 @@ +import { AfterViewInit, Component, EventEmitter, Inject, Input, OnDestroy, OnInit, Output, PLATFORM_ID } from '@angular/core'; +import { VERSION as ANGULAR_VERSION } from '@angular/core'; +import InstantSearch from 'instantsearch.js/es/lib/InstantSearch'; + +@Component({ + selector: 'app-instantsearch', + template: '', +}) +export class NgAisInstantSearch implements OnInit, AfterViewInit, OnDestroy { + @Input() config: any; + @Input() instanceName = 'default'; + @Input('index-name') indexName: string; + @Output() change: EventEmitter = new EventEmitter(); + @Output() onRender: EventEmitter = new EventEmitter(); + + public instantSearchInstance: any; + + constructor(@Inject(PLATFORM_ID) public platformId: Object) {} + + ngOnInit() { + if (typeof this.config.searchClient.addAlgoliaAgent === 'function') { + this.config.searchClient.addAlgoliaAgent(`angular (${ANGULAR_VERSION.full})`); + this.config.searchClient.addAlgoliaAgent('studenthub-staff-instantsearch'); + } + + this.instantSearchInstance = new InstantSearch(this.config); + this.instantSearchInstance.on('render', this.emitRenderState); + } + + ngAfterViewInit() { + this.instantSearchInstance.start(); + } + + ngOnDestroy() { + if (this.instantSearchInstance) { + this.instantSearchInstance.removeListener('render', this.emitRenderState); + this.instantSearchInstance.dispose(); + } + } + + addWidgets(widgets: any[]) { + this.instantSearchInstance.addWidgets(widgets); + } + + removeWidgets(widgets: any[]) { + this.instantSearchInstance.removeWidgets(widgets); + } + + refresh() { + this.instantSearchInstance.refresh(); + } + + private emitRenderState = () => { + const payload = { + results: this.instantSearchInstance.helper.lastResults, + state: this.instantSearchInstance.helper.state, + }; + + this.change.emit(payload); + this.onRender.emit(payload); + }; +} diff --git a/src/app/compat/instantsearch/instantsearch.module.ts b/src/app/compat/instantsearch/instantsearch.module.ts new file mode 100644 index 00000000..68d86de4 --- /dev/null +++ b/src/app/compat/instantsearch/instantsearch.module.ts @@ -0,0 +1,24 @@ +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { NgAisInstantSearch } from './instantsearch.component'; +import { NgAisIndex } from './index-widget.component'; +import { InstantSearchHighlightComponent } from './highlight.component'; +import { InstantSearchInfiniteHitsComponent } from './infinite-hits.component'; + +@NgModule({ + declarations: [ + NgAisInstantSearch, + NgAisIndex, + InstantSearchHighlightComponent, + InstantSearchInfiniteHitsComponent, + ], + exports: [ + NgAisInstantSearch, + NgAisIndex, + InstantSearchHighlightComponent, + InstantSearchInfiniteHitsComponent, + ], + imports: [CommonModule], +}) +export class InstantSearchCompatModule {} + diff --git a/src/app/compat/instantsearch/utils.ts b/src/app/compat/instantsearch/utils.ts new file mode 100644 index 00000000..0c903326 --- /dev/null +++ b/src/app/compat/instantsearch/utils.ts @@ -0,0 +1,6 @@ +export function noop(..._args: any[]): void {} + +export function parseNumberInput(input: number | string): number { + return typeof input === 'string' ? parseInt(input, 10) : input; +} + diff --git a/src/app/components/age-refinement-list/age-refinement-list.component.ts b/src/app/components/age-refinement-list/age-refinement-list.component.ts index f40cc81a..8c54a9b5 100644 --- a/src/app/components/age-refinement-list/age-refinement-list.component.ts +++ b/src/app/components/age-refinement-list/age-refinement-list.component.ts @@ -1,8 +1,8 @@ import { Component, Input, Inject, forwardRef, EventEmitter, Output, ChangeDetectorRef, Optional } from '@angular/core'; import { connectRange } from 'instantsearch.js/es/connectors'; import { RangeRenderState } from 'instantsearch.js/es/connectors/range/connectRange'; -import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch'; -import { parseNumberInput, noop } from 'angular-instantsearch/esm2015/utils'; +import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'src/app/compat/instantsearch'; +import { parseNumberInput, noop } from 'src/app/compat/instantsearch'; import { Options } from 'ng5-slider'; @@ -32,7 +32,10 @@ export class AgeRefinementListComponent extends BaseWidget { refine: noop, canRefine: null, sendEvent: noop, - format: noop, + format: { + from: value => String(value), + to: value => String(value), + }, start: [0, 1], }; diff --git a/src/app/components/age-refinement-list/age-refinement-list.module.ts b/src/app/components/age-refinement-list/age-refinement-list.module.ts index 11f80689..374865b3 100644 --- a/src/app/components/age-refinement-list/age-refinement-list.module.ts +++ b/src/app/components/age-refinement-list/age-refinement-list.module.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { Ng5SliderModule } from 'ng5-slider'; import { FormsModule } from '@angular/forms'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { IonicModule } from '@ionic/angular'; import { PipesModule } from 'src/app/pipes/pipes.module'; @@ -14,7 +14,7 @@ import { AgeRefinementListComponent } from './age-refinement-list.component'; ], imports: [ IonicModule, - NgAisModule, + InstantSearchCompatModule, CommonModule, FormsModule, PipesModule, diff --git a/src/app/components/applied-filters/applied-filters.component.spec.ts b/src/app/components/applied-filters/applied-filters.component.spec.ts index e9d0cf78..719762b1 100644 --- a/src/app/components/applied-filters/applied-filters.component.spec.ts +++ b/src/app/components/applied-filters/applied-filters.component.spec.ts @@ -5,7 +5,7 @@ import { AppliedFiltersComponent } from './applied-filters.component'; import { AppliedFiltersModule } from './applied-filters.module'; import { APP_BASE_HREF } from '@angular/common'; import { AppModule } from '../../app.module'; -import { NgAisInstantSearch } from 'angular-instantsearch'; +import { NgAisInstantSearch } from 'src/app/compat/instantsearch'; describe('AppliedFiltersPage', () => { diff --git a/src/app/components/applied-filters/applied-filters.component.ts b/src/app/components/applied-filters/applied-filters.component.ts index 9a11aeb7..f308c810 100644 --- a/src/app/components/applied-filters/applied-filters.component.ts +++ b/src/app/components/applied-filters/applied-filters.component.ts @@ -1,5 +1,5 @@ import { Component, Inject, forwardRef, Input, Optional } from '@angular/core'; -import { TypedBaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch'; +import { TypedBaseWidget, NgAisIndex, NgAisInstantSearch } from 'src/app/compat/instantsearch'; import connectCurrentRefinements, { CurrentRefinementsWidgetDescription, CurrentRefinementsConnectorParams diff --git a/src/app/components/applied-filters/applied-filters.module.ts b/src/app/components/applied-filters/applied-filters.module.ts index d7091e16..9aade3a4 100644 --- a/src/app/components/applied-filters/applied-filters.module.ts +++ b/src/app/components/applied-filters/applied-filters.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { IonicModule } from '@ionic/angular'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { TranslateModule } from '@ngx-translate/core'; import { AppliedFiltersComponent } from './applied-filters.component'; import { CommonModule, CurrencyPipe } from '@angular/common'; @@ -17,7 +17,7 @@ import { PipesModule } from 'src/app/pipes/pipes.module'; imports: [ CommonModule, IonicModule, - NgAisModule, + InstantSearchCompatModule, PipesModule, TranslateModule.forChild(), ], diff --git a/src/app/components/bawes-ais-pagination/bawes-ais-pagination-module.module.ts b/src/app/components/bawes-ais-pagination/bawes-ais-pagination-module.module.ts index 22dc42db..847a4b39 100644 --- a/src/app/components/bawes-ais-pagination/bawes-ais-pagination-module.module.ts +++ b/src/app/components/bawes-ais-pagination/bawes-ais-pagination-module.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { IonicModule } from '@ionic/angular'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { BawesAisPaginationComponent } from './bawes-ais-pagination.component'; import { TranslateModule } from '@ngx-translate/core'; @@ -13,7 +13,7 @@ import { TranslateModule } from '@ngx-translate/core'; ], imports: [ IonicModule, - NgAisModule, + InstantSearchCompatModule, CommonModule, TranslateModule.forChild(), ], diff --git a/src/app/components/bawes-ais-pagination/bawes-ais-pagination.component.ts b/src/app/components/bawes-ais-pagination/bawes-ais-pagination.component.ts index 96a9a6f5..df5595ff 100644 --- a/src/app/components/bawes-ais-pagination/bawes-ais-pagination.component.ts +++ b/src/app/components/bawes-ais-pagination/bawes-ais-pagination.component.ts @@ -1,5 +1,5 @@ import { Component, Inject, forwardRef, Optional, OnInit } from '@angular/core'; -import { TypedBaseWidget, NgAisInstantSearch, NgAisIndex } from 'angular-instantsearch'; +import { TypedBaseWidget, NgAisInstantSearch, NgAisIndex } from 'src/app/compat/instantsearch'; import connectPagination, { PaginationWidgetDescription, diff --git a/src/app/components/candidate-filter/candidate-filter.module.ts b/src/app/components/candidate-filter/candidate-filter.module.ts index bfb5f368..216b4446 100644 --- a/src/app/components/candidate-filter/candidate-filter.module.ts +++ b/src/app/components/candidate-filter/candidate-filter.module.ts @@ -3,7 +3,7 @@ import { IonicModule } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; import { CandidateFilterComponent } from './candidate-filter'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { RefinementListModule } from '../refinement-list/refinement-list.module'; import {CommonModule} from "@angular/common"; import { RangeRefinementModule } from '../range-refinement-list/range-refinement-list.module'; @@ -18,7 +18,7 @@ import { AgeRefinementListModule } from '../age-refinement-list/age-refinement-l CommonModule, TranslateModule.forChild(), IonicModule, - NgAisModule, + InstantSearchCompatModule, AgeRefinementListModule, RangeRefinementModule, RefinementListModule, diff --git a/src/app/components/candidate-filter/candidate-filter.ts b/src/app/components/candidate-filter/candidate-filter.ts index 100c3254..8c935e99 100644 --- a/src/app/components/candidate-filter/candidate-filter.ts +++ b/src/app/components/candidate-filter/candidate-filter.ts @@ -1,5 +1,5 @@ import { Component, forwardRef, Inject } from '@angular/core'; -import { NgAisInstantSearch } from 'angular-instantsearch'; +import { NgAisInstantSearch } from 'src/app/compat/instantsearch'; // services import { TranslateLabelService } from '../../providers/translate-label.service'; diff --git a/src/app/components/current-refinement/current-refinement.component.spec.ts b/src/app/components/current-refinement/current-refinement.component.spec.ts index a6ee0bae..3db3db0e 100644 --- a/src/app/components/current-refinement/current-refinement.component.spec.ts +++ b/src/app/components/current-refinement/current-refinement.component.spec.ts @@ -5,7 +5,7 @@ import { CurrentRefinementComponent } from './current-refinement.component'; import { CurrentRefinementModule } from './current-refinement.module'; import { APP_BASE_HREF } from '@angular/common'; import { AppModule } from 'src/app/app.module'; -import { NgAisInstantSearch } from 'angular-instantsearch'; +import { NgAisInstantSearch } from 'src/app/compat/instantsearch'; describe('CurrentRefinementComponent', () => { diff --git a/src/app/components/current-refinement/current-refinement.component.ts b/src/app/components/current-refinement/current-refinement.component.ts index b14df7f1..d1ed22a3 100644 --- a/src/app/components/current-refinement/current-refinement.component.ts +++ b/src/app/components/current-refinement/current-refinement.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, forwardRef, Input, ViewEncapsulation, Optional } from '@angular/core'; -import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch'; -import { noop } from "angular-instantsearch/esm2015/utils"; +import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'src/app/compat/instantsearch'; +import { noop } from "src/app/compat/instantsearch"; import { AgePipe } from 'src/app/pipes/age.pipe'; import { connectCurrentRefinements } from "instantsearch.js/es/connectors"; diff --git a/src/app/components/current-refinement/current-refinement.module.ts b/src/app/components/current-refinement/current-refinement.module.ts index 2282c5e6..a7d02def 100644 --- a/src/app/components/current-refinement/current-refinement.module.ts +++ b/src/app/components/current-refinement/current-refinement.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { IonicModule } from '@ionic/angular'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { TranslateModule } from '@ngx-translate/core'; import { CurrentRefinementComponent } from './current-refinement.component'; import { CommonModule } from '@angular/common'; @@ -14,7 +14,7 @@ import { PipesModule } from 'src/app/pipes/pipes.module'; imports: [ IonicModule, CommonModule, - NgAisModule, + InstantSearchCompatModule, PipesModule, TranslateModule.forChild(), ], diff --git a/src/app/components/date-range-refinement-list/date-range-refinement-list.component.ts b/src/app/components/date-range-refinement-list/date-range-refinement-list.component.ts index a88fe9b1..9a8f335e 100644 --- a/src/app/components/date-range-refinement-list/date-range-refinement-list.component.ts +++ b/src/app/components/date-range-refinement-list/date-range-refinement-list.component.ts @@ -1,7 +1,7 @@ import { Component, Input, Inject, forwardRef, EventEmitter, Output, OnInit, Optional } from '@angular/core'; import { connectRange } from 'instantsearch.js/es/connectors'; -import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch'; -import { parseNumberInput, noop } from 'angular-instantsearch/esm2015/utils'; +import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'src/app/compat/instantsearch'; +import { parseNumberInput, noop } from 'src/app/compat/instantsearch'; import {CalendarModal, CalendarModalOptions, CalendarResult} from 'ion2-calendar'; import { ModalController } from '@ionic/angular'; import {Options} from "ng5-slider"; diff --git a/src/app/components/date-range-refinement-list/date-range-refinement-list.module.ts b/src/app/components/date-range-refinement-list/date-range-refinement-list.module.ts index 2505bfbb..53ea1388 100644 --- a/src/app/components/date-range-refinement-list/date-range-refinement-list.module.ts +++ b/src/app/components/date-range-refinement-list/date-range-refinement-list.module.ts @@ -3,7 +3,7 @@ import { IonicModule } from '@ionic/angular'; import { CommonModule } from "@angular/common"; import { FormsModule } from "@angular/forms"; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { PipesModule } from '../../pipes/pipes.module'; import { DateRangeRefinementListComponent } from './date-range-refinement-list.component'; @@ -16,7 +16,7 @@ import { DateRangeRefinementListComponent } from './date-range-refinement-list.c imports: [ CommonModule, IonicModule, - NgAisModule, + InstantSearchCompatModule, FormsModule, PipesModule, ], diff --git a/src/app/components/fulltimer-filter/fulltimer-filter.module.ts b/src/app/components/fulltimer-filter/fulltimer-filter.module.ts index 1a61f870..598dcaf4 100644 --- a/src/app/components/fulltimer-filter/fulltimer-filter.module.ts +++ b/src/app/components/fulltimer-filter/fulltimer-filter.module.ts @@ -3,7 +3,7 @@ import { IonicModule } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; import { FulltimerFilterComponent } from './fulltimer-filter'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { RefinementListModule } from '../refinement-list/refinement-list.module'; import { CommonModule } from "@angular/common"; import { RangeRefinementModule } from '../range-refinement-list/range-refinement-list.module'; @@ -17,7 +17,7 @@ import { RangeRefinementModule } from '../range-refinement-list/range-refinement CommonModule, TranslateModule.forChild(), IonicModule, - NgAisModule, + InstantSearchCompatModule, RangeRefinementModule, RefinementListModule ], diff --git a/src/app/components/fulltimer-filter/fulltimer-filter.ts b/src/app/components/fulltimer-filter/fulltimer-filter.ts index dae353ba..ee54627b 100644 --- a/src/app/components/fulltimer-filter/fulltimer-filter.ts +++ b/src/app/components/fulltimer-filter/fulltimer-filter.ts @@ -1,5 +1,5 @@ import { Component, forwardRef, Inject } from '@angular/core'; -import { NgAisInstantSearch } from 'angular-instantsearch'; +import { NgAisInstantSearch } from 'src/app/compat/instantsearch'; // services import { TranslateLabelService } from '../../providers/translate-label.service'; diff --git a/src/app/components/is-facets-search/is-facets-search.component.spec.ts b/src/app/components/is-facets-search/is-facets-search.component.spec.ts index 8ebc326f..a00e0173 100644 --- a/src/app/components/is-facets-search/is-facets-search.component.spec.ts +++ b/src/app/components/is-facets-search/is-facets-search.component.spec.ts @@ -5,7 +5,7 @@ import { IsFacetsSearchComponent } from './is-facets-search.component'; import { IsFacetsSearchModule } from './is-facets-search.module'; import { APP_BASE_HREF } from '@angular/common'; import { AppModule } from 'src/app/app.module'; -import { NgAisInstantSearch } from 'angular-instantsearch'; +import { NgAisInstantSearch } from 'src/app/compat/instantsearch'; describe('IsFacetsSearchComponent', () => { diff --git a/src/app/components/is-facets-search/is-facets-search.module.ts b/src/app/components/is-facets-search/is-facets-search.module.ts index 5e7cb8bf..28a3d666 100644 --- a/src/app/components/is-facets-search/is-facets-search.module.ts +++ b/src/app/components/is-facets-search/is-facets-search.module.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { IonicModule } from '@ionic/angular'; import { IsFacetsSearchComponent } from './is-facets-search.component'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { TranslateModule } from '@ngx-translate/core'; @NgModule({ @@ -11,7 +11,7 @@ import { TranslateModule } from '@ngx-translate/core'; ], imports: [ IonicModule, - NgAisModule, + InstantSearchCompatModule, TranslateModule.forChild(), ], exports: [ diff --git a/src/app/components/is-search-box/is-search-box.component.spec.ts b/src/app/components/is-search-box/is-search-box.component.spec.ts index c31faa45..cdbae8e1 100644 --- a/src/app/components/is-search-box/is-search-box.component.spec.ts +++ b/src/app/components/is-search-box/is-search-box.component.spec.ts @@ -5,7 +5,7 @@ import { IsSearchBoxComponent } from './is-search-box.component'; import { IsSearchBoxModule } from './is-search-box.module'; import { APP_BASE_HREF } from '@angular/common'; import { AppModule } from 'src/app/app.module'; -import { NgAisInstantSearch } from 'angular-instantsearch'; +import { NgAisInstantSearch } from 'src/app/compat/instantsearch'; describe('IsSearchBoxComponent', () => { diff --git a/src/app/components/is-search-box/is-search-box.component.ts b/src/app/components/is-search-box/is-search-box.component.ts index 20b80452..48b5b014 100644 --- a/src/app/components/is-search-box/is-search-box.component.ts +++ b/src/app/components/is-search-box/is-search-box.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, forwardRef, Input, Output, EventEmitter, Optional } from '@angular/core'; import { connectSearchBox } from 'instantsearch.js/es/connectors'; -import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch'; +import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'src/app/compat/instantsearch'; import { Subject, timer, EMPTY } from 'rxjs'; import { debounceTime, distinctUntilChanged, debounce } from 'rxjs/operators'; // services diff --git a/src/app/components/is-search-box/is-search-box.module.ts b/src/app/components/is-search-box/is-search-box.module.ts index 65f54d7b..263ab316 100644 --- a/src/app/components/is-search-box/is-search-box.module.ts +++ b/src/app/components/is-search-box/is-search-box.module.ts @@ -1,5 +1,5 @@ import { NgModule } from '@angular/core'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { TranslateModule } from '@ngx-translate/core'; import { IsSearchBoxComponent } from './is-search-box.component'; import { IonicModule } from '@ionic/angular'; @@ -12,7 +12,7 @@ import { CommonModule } from '@angular/common'; ], imports: [ IonicModule, - NgAisModule, + InstantSearchCompatModule, FormsModule, CommonModule, TranslateModule.forChild(), diff --git a/src/app/components/range-refinement-list/range-refinement-list.module.ts b/src/app/components/range-refinement-list/range-refinement-list.module.ts index 0a61b2d7..ba130054 100644 --- a/src/app/components/range-refinement-list/range-refinement-list.module.ts +++ b/src/app/components/range-refinement-list/range-refinement-list.module.ts @@ -5,7 +5,7 @@ import { FormsModule } from "@angular/forms"; import { RangeRefinementComponent } from './range-refinement-list'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { Ng5SliderModule } from 'ng5-slider'; import { PipesModule } from '../../pipes/pipes.module'; @@ -17,7 +17,7 @@ import { PipesModule } from '../../pipes/pipes.module'; ], imports: [ IonicModule, - NgAisModule, + InstantSearchCompatModule, CommonModule, FormsModule, PipesModule, diff --git a/src/app/components/range-refinement-list/range-refinement-list.ts b/src/app/components/range-refinement-list/range-refinement-list.ts index a95a4f6c..5b372f47 100644 --- a/src/app/components/range-refinement-list/range-refinement-list.ts +++ b/src/app/components/range-refinement-list/range-refinement-list.ts @@ -1,8 +1,8 @@ import { Component, Input, Inject, forwardRef, EventEmitter, Output, ChangeDetectorRef, Optional } from '@angular/core'; import { connectRange } from 'instantsearch.js/es/connectors'; import { RangeRenderState } from 'instantsearch.js/es/connectors/range/connectRange'; -import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch'; -import { parseNumberInput, noop } from 'angular-instantsearch/esm2015/utils'; +import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'src/app/compat/instantsearch'; +import { parseNumberInput, noop } from 'src/app/compat/instantsearch'; import { Options } from 'ng5-slider'; @@ -32,7 +32,10 @@ export class RangeRefinementComponent extends BaseWidget { refine: noop, canRefine: null, sendEvent: noop, - format: noop, + format: { + from: value => String(value), + to: value => String(value), + }, start: [0, 1], }; diff --git a/src/app/components/refinement-list/refinement-list.component.html b/src/app/components/refinement-list/refinement-list.component.html index 9a47cfcf..003b0d73 100644 --- a/src/app/components/refinement-list/refinement-list.component.html +++ b/src/app/components/refinement-list/refinement-list.component.html @@ -24,8 +24,8 @@ placeholder="{{ searchPlaceholder | translate }}"> - - --> + + -->
@@ -40,7 +40,7 @@
- + {{item.count}} diff --git a/src/app/components/refinement-list/refinement-list.component.spec.ts b/src/app/components/refinement-list/refinement-list.component.spec.ts index 0306f83d..c1ea3ad8 100644 --- a/src/app/components/refinement-list/refinement-list.component.spec.ts +++ b/src/app/components/refinement-list/refinement-list.component.spec.ts @@ -5,7 +5,7 @@ import { RefinementListComponent } from './refinement-list.component'; import { RefinementListModule } from './refinement-list.module'; import { APP_BASE_HREF } from '@angular/common'; import { AppModule } from 'src/app/app.module'; -import { NgAisInstantSearch } from 'angular-instantsearch'; +import { NgAisInstantSearch } from 'src/app/compat/instantsearch'; describe('RefinementListComponent', () => { diff --git a/src/app/components/refinement-list/refinement-list.component.ts b/src/app/components/refinement-list/refinement-list.component.ts index 6ff9dc63..9e8ff24a 100644 --- a/src/app/components/refinement-list/refinement-list.component.ts +++ b/src/app/components/refinement-list/refinement-list.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, forwardRef, Input, Output, EventEmitter, Optional } from '@angular/core'; -import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'angular-instantsearch'; +import { BaseWidget, NgAisIndex, NgAisInstantSearch } from 'src/app/compat/instantsearch'; import { connectRefinementList } from "instantsearch.js/es/connectors"; -import { parseNumberInput, noop } from "angular-instantsearch/esm2015/utils"; +import { parseNumberInput, noop } from "src/app/compat/instantsearch"; //services import { TranslateLabelService } from 'src/app/providers/translate-label.service'; import { EventService } from 'src/app/providers/event.service'; diff --git a/src/app/components/refinement-list/refinement-list.module.ts b/src/app/components/refinement-list/refinement-list.module.ts index 84f0865c..ea46208b 100644 --- a/src/app/components/refinement-list/refinement-list.module.ts +++ b/src/app/components/refinement-list/refinement-list.module.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { IonicModule } from '@ionic/angular'; import { RefinementListComponent } from './refinement-list.component'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { TranslateModule } from '@ngx-translate/core'; import { CurrentRefinementModule } from '../current-refinement/current-refinement.module'; import { IsFacetsSearchModule } from '../is-facets-search/is-facets-search.module'; @@ -16,7 +16,7 @@ import { CommonModule } from '@angular/common'; imports: [ CurrentRefinementModule, IonicModule, - NgAisModule, + InstantSearchCompatModule, IsFacetsSearchModule, CommonModule, TranslateModule.forChild(), diff --git a/src/app/pages/logged-in/candidate/candidate-search/candidate-search.module.ts b/src/app/pages/logged-in/candidate/candidate-search/candidate-search.module.ts index 0710998f..c9272b3f 100644 --- a/src/app/pages/logged-in/candidate/candidate-search/candidate-search.module.ts +++ b/src/app/pages/logged-in/candidate/candidate-search/candidate-search.module.ts @@ -13,7 +13,7 @@ import { AppliedFiltersModule } from '../../../../components/applied-filters/app import { LoadingModalModule } from '../../../../components/loading-modal/loading-modal.module'; import { CandidateModule } from '../../../../components/candidate/candidate.module'; import { NoItemsModule } from '../../../../components/no-items/no-items.module'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { TranslateModule } from '@ngx-translate/core'; import { BawesAisPaginationModuleModule } from 'src/app/components/bawes-ais-pagination/bawes-ais-pagination-module.module'; @@ -23,7 +23,7 @@ import { BawesAisPaginationModuleModule } from 'src/app/components/bawes-ais-pag CommonModule, FormsModule, IonicModule, - NgAisModule, + InstantSearchCompatModule, CandidateFilterModule, BawesAisPaginationModuleModule, AppliedFiltersModule, diff --git a/src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.html b/src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.html index 2173c83f..2159ae0f 100644 --- a/src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.html +++ b/src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.html @@ -58,7 +58,7 @@ - + @@ -86,7 +86,7 @@
- +
@@ -101,7 +101,7 @@ --> - + @@ -114,7 +114,7 @@ - +
diff --git a/src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts b/src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts index 32524fbd..1c44f50d 100644 --- a/src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts +++ b/src/app/pages/logged-in/candidate/candidate-search/candidate-search.page.ts @@ -4,9 +4,7 @@ import { NavController, Platform, MenuController, PopoverController, IonContent, import { environment } from '../../../../../environments/environment'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { TransferState, makeStateKey } from '@angular/platform-browser'; -import algoliasearch from 'algoliasearch/index'; -import * as VERSION from 'algoliasearch-helper/src/version'; -import * as encodeProxy from 'querystring-es3/encode'; +import { algoliasearch } from 'algoliasearch'; // service import { AuthService } from '../../../../providers/auth.service'; import { CandidateService } from '../../../../providers/logged-in/candidate.service'; @@ -19,8 +17,6 @@ import { CandidateMergeSelectPage } from '../candidate-merge-select/candidate-me import { AnalyticsService } from 'src/app/providers/analytics.service'; -const encode = encodeProxy.default || encodeProxy; - @Component({ selector: 'app-candidate-search', templateUrl: './candidate-search.page.html', @@ -374,7 +370,7 @@ export class CandidateSearchPage implements OnInit { } }); - client.addAlgoliaAgent('angular-instantsearch ' + VERSION); + client.addAlgoliaAgent('studenthub-staff-instantsearch'); /*client._request = (rawUrl, opts, fromResetKey = false) => { diff --git a/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.module.ts b/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.module.ts index 17557ab0..cbbf9c94 100644 --- a/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.module.ts +++ b/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.module.ts @@ -11,7 +11,7 @@ import { FulltimerSearchPage } from './fulltimer-search.page'; import { AppliedFiltersModule } from '../../../../components/applied-filters/applied-filters.module'; import { LoadingModalModule } from '../../../../components/loading-modal/loading-modal.module'; import { NoItemsModule } from '../../../../components/no-items/no-items.module'; -import { NgAisModule } from 'angular-instantsearch'; +import { InstantSearchCompatModule } from 'src/app/compat/instantsearch'; import { FulltimerFilterModule } from 'src/app/components/fulltimer-filter/fulltimer-filter.module'; import { BawesAisPaginationModuleModule } from 'src/app/components/bawes-ais-pagination/bawes-ais-pagination-module.module'; import { TranslateModule } from '@ngx-translate/core'; @@ -23,7 +23,7 @@ import { TranslateModule } from '@ngx-translate/core'; IonicModule, FulltimerSearchPageRoutingModule, BawesAisPaginationModuleModule, - NgAisModule, + InstantSearchCompatModule, FulltimerFilterModule, AppliedFiltersModule, LoadingModalModule, diff --git a/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.html b/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.html index 9ef31897..f8093cf4 100644 --- a/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.html +++ b/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.html @@ -58,7 +58,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -152,24 +152,24 @@ - +
@@ -183,7 +183,7 @@ - + diff --git a/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.ts b/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.ts index b571b5e5..319bcde9 100644 --- a/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.ts +++ b/src/app/pages/logged-in/fulltimer/fulltimer-search/fulltimer-search.page.ts @@ -3,9 +3,7 @@ import { NavController, Platform, MenuController, PopoverController, IonContent, import { environment } from '../../../../../environments/environment'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { TransferState, makeStateKey } from '@angular/platform-browser'; -import algoliasearch from 'algoliasearch'; -import * as VERSION from 'algoliasearch-helper/src/version'; -import * as encodeProxy from 'querystring-es3/encode'; +import { algoliasearch } from 'algoliasearch'; // service import { AuthService } from '../../../../providers/auth.service'; import { FulltimerService } from '../../../../providers/logged-in/fulltimer.service'; @@ -19,8 +17,6 @@ import { FulltimerFormPage } from '../fulltimer-form/fulltimer-form.page'; import { AnalyticsService } from 'src/app/providers/analytics.service'; -const encode = encodeProxy.default || encodeProxy; - @Component({ selector: 'app-fulltimer-search', templateUrl: './fulltimer-search.page.html', diff --git a/src/app/providers/logged-in/algolia.service.ts b/src/app/providers/logged-in/algolia.service.ts index c836a8ad..b9d4a95e 100644 --- a/src/app/providers/logged-in/algolia.service.ts +++ b/src/app/providers/logged-in/algolia.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { Observable, Observer, throwError } from 'rxjs'; -import algoliasearch from 'algoliasearch'; +import { algoliasearch } from 'algoliasearch'; // Services import { AuthHttpService } from "./authhttp.service"; @@ -78,9 +78,13 @@ export class AlgoliaService { const client = algoliasearch(keyData.appId, keyData.securedApiKey, {}); - let index = client.initIndex(indexName); - - index.search('', searchParameters).then(content => { + client.searchSingleIndex({ + indexName, + searchParams: { + query: '', + ...searchParameters, + }, + }).then(content => { if (content) { observer.next(content); @@ -93,9 +97,13 @@ export class AlgoliaService { const client = algoliasearch(keyData.appId, keyData.securedApiKey, {}); - let index = client.initIndex(indexName); - - index.search('', searchParameters).then(content => { + client.searchSingleIndex({ + indexName, + searchParams: { + query: '', + ...searchParameters, + }, + }).then(content => { if (content) { observer.next(content); diff --git a/tsconfig.json b/tsconfig.json index 26160473..b0c3a591 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,6 +16,7 @@ "experimentalDecorators": true, "moduleResolution": "node", "importHelpers": true, + "skipLibCheck": true, "target": "ES2022", "module": "es2020", "lib": [ From 01d5368395c3445e30722b95d4984eba1b4c9953 Mon Sep 17 00:00:00 2001 From: gen Date: Sat, 16 May 2026 01:59:39 +0900 Subject: [PATCH 2/2] Address InstantSearch review feedback --- .../instantsearch/highlight.component.ts | 9 ++++-- .../instantsearch/instantsearch.component.ts | 28 +++++++++++++++---- .../providers/logged-in/algolia.service.ts | 13 +++++---- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/src/app/compat/instantsearch/highlight.component.ts b/src/app/compat/instantsearch/highlight.component.ts index c388e042..5fa77470 100644 --- a/src/app/compat/instantsearch/highlight.component.ts +++ b/src/app/compat/instantsearch/highlight.component.ts @@ -19,11 +19,15 @@ export class InstantSearchHighlightComponent { @Input() tagName = 'mark'; get content() { + if (!this.hit || !this.attribute) { + return ''; + } + const highlightAttributeResult = getPropertyByPath(this.hit._highlightResult, this.attribute); const fallback = getPropertyByPath(this.hit, this.attribute); - if (!highlightAttributeResult && fallback) { - return fallback; + if (!highlightAttributeResult) { + return fallback || ''; } return highlight({ @@ -33,4 +37,3 @@ export class InstantSearchHighlightComponent { }); } } - diff --git a/src/app/compat/instantsearch/instantsearch.component.ts b/src/app/compat/instantsearch/instantsearch.component.ts index 69b950ac..1b5312af 100644 --- a/src/app/compat/instantsearch/instantsearch.component.ts +++ b/src/app/compat/instantsearch/instantsearch.component.ts @@ -18,17 +18,29 @@ export class NgAisInstantSearch implements OnInit, AfterViewInit, OnDestroy { constructor(@Inject(PLATFORM_ID) public platformId: Object) {} ngOnInit() { + if (!this.config || !this.config.searchClient) { + console.warn('InstantSearch config with searchClient is required.'); + return; + } + if (typeof this.config.searchClient.addAlgoliaAgent === 'function') { this.config.searchClient.addAlgoliaAgent(`angular (${ANGULAR_VERSION.full})`); this.config.searchClient.addAlgoliaAgent('studenthub-staff-instantsearch'); } - this.instantSearchInstance = new InstantSearch(this.config); + const config = { + ...this.config, + indexName: this.indexName || this.config.indexName, + }; + + this.instantSearchInstance = new InstantSearch(config); this.instantSearchInstance.on('render', this.emitRenderState); } ngAfterViewInit() { - this.instantSearchInstance.start(); + if (this.instantSearchInstance) { + this.instantSearchInstance.start(); + } } ngOnDestroy() { @@ -39,15 +51,21 @@ export class NgAisInstantSearch implements OnInit, AfterViewInit, OnDestroy { } addWidgets(widgets: any[]) { - this.instantSearchInstance.addWidgets(widgets); + if (this.instantSearchInstance) { + this.instantSearchInstance.addWidgets(widgets); + } } removeWidgets(widgets: any[]) { - this.instantSearchInstance.removeWidgets(widgets); + if (this.instantSearchInstance) { + this.instantSearchInstance.removeWidgets(widgets); + } } refresh() { - this.instantSearchInstance.refresh(); + if (this.instantSearchInstance) { + this.instantSearchInstance.refresh(); + } } private emitRenderState = () => { diff --git a/src/app/providers/logged-in/algolia.service.ts b/src/app/providers/logged-in/algolia.service.ts index b9d4a95e..fc6ac850 100644 --- a/src/app/providers/logged-in/algolia.service.ts +++ b/src/app/providers/logged-in/algolia.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Observable, Observer, throwError } from 'rxjs'; +import { Observable, Observer } from 'rxjs'; import { algoliasearch } from 'algoliasearch'; // Services import { AuthHttpService } from "./authhttp.service"; @@ -108,16 +108,19 @@ export class AlgoliaService { if (content) { observer.next(content); } + observer.complete(); }).catch(err => { - return throwError(err); + observer.error(err); }); - - observer.complete(); + }).catch(err => { + observer.error(err); }); } else { - return throwError(err); + observer.error(err); } }); + }).catch(err => { + observer.error(err); }); }); }