|
83 | 83 | actionableCfp: "", |
84 | 84 | industryTalks: "", |
85 | 85 | inPipeline: "", |
86 | | - sortBy: "attendees_name" |
| 86 | + sortBy: "deadline_soon" |
87 | 87 | }; |
88 | 88 | } |
89 | 89 |
|
90 | | - function defaultSortByForPersona(mode = state.personaMode) { |
91 | | - return mode === "attendee" ? "start_soon" : "deadline_soon"; |
| 90 | + function defaultSortByForPersona() { |
| 91 | + return "deadline_soon"; |
92 | 92 | } |
93 | 93 |
|
94 | 94 | function speakerPresetFilters() { |
|
103 | 103 | function attendeePresetFilters() { |
104 | 104 | return { |
105 | 105 | ...defaultFilters(), |
106 | | - sortBy: "start_soon" |
| 106 | + sortBy: "deadline_soon" |
107 | 107 | }; |
108 | 108 | } |
109 | 109 |
|
|
2270 | 2270 | return escapeHtml(raw || "—"); |
2271 | 2271 | } |
2272 | 2272 |
|
2273 | | - const COUNTRY_REGION = { |
2274 | | - europe: new Set([ |
2275 | | - "United Kingdom", |
2276 | | - "Germany", |
2277 | | - "France", |
2278 | | - "Netherlands", |
2279 | | - "Belgium", |
2280 | | - "Switzerland", |
2281 | | - "Austria", |
2282 | | - "Italy", |
2283 | | - "Spain", |
2284 | | - "Portugal", |
2285 | | - "Norway", |
2286 | | - "Denmark", |
2287 | | - "Poland", |
2288 | | - "Romania", |
2289 | | - "Luxembourg", |
2290 | | - "Lithuania", |
2291 | | - "Greece" |
2292 | | - ]), |
2293 | | - americas: new Set(["United States", "Canada", "Brazil", "Argentina", "Mexico", "Chile"]), |
2294 | | - apac: new Set(["Japan", "Singapore", "India", "Australia", "Indonesia", "Nepal", "Taiwan"]), |
2295 | | - mea: new Set(["Israel", "United Arab Emirates", "Saudi Arabia", "Bahrain", "Qatar"]), |
2296 | | - africa: new Set(["South Africa", "Kenya"]) |
| 2273 | + const COUNTRY_REGISTRY = { |
| 2274 | + Albania: { iso2: "AL", region: "europe" }, |
| 2275 | + Argentina: { iso2: "AR", region: "americas" }, |
| 2276 | + Armenia: { iso2: "AM", region: "europe" }, |
| 2277 | + Australia: { iso2: "AU", region: "apac" }, |
| 2278 | + Austria: { iso2: "AT", region: "europe" }, |
| 2279 | + Azerbaijan: { iso2: "AZ", region: "europe" }, |
| 2280 | + Bahrain: { iso2: "BH", region: "mea" }, |
| 2281 | + Bangladesh: { iso2: "BD", region: "apac" }, |
| 2282 | + Belarus: { iso2: "BY", region: "europe" }, |
| 2283 | + Belgium: { iso2: "BE", region: "europe" }, |
| 2284 | + "Bosnia and Herzegovina": { iso2: "BA", region: "europe" }, |
| 2285 | + Brazil: { iso2: "BR", region: "americas" }, |
| 2286 | + Bulgaria: { iso2: "BG", region: "europe" }, |
| 2287 | + Canada: { iso2: "CA", region: "americas" }, |
| 2288 | + Chile: { iso2: "CL", region: "americas" }, |
| 2289 | + China: { iso2: "CN", region: "apac" }, |
| 2290 | + Colombia: { iso2: "CO", region: "americas" }, |
| 2291 | + "Costa Rica": { iso2: "CR", region: "americas" }, |
| 2292 | + Croatia: { iso2: "HR", region: "europe" }, |
| 2293 | + Cyprus: { iso2: "CY", region: "europe" }, |
| 2294 | + "Czech Republic": { iso2: "CZ", region: "europe" }, |
| 2295 | + Denmark: { iso2: "DK", region: "europe" }, |
| 2296 | + Ecuador: { iso2: "EC", region: "americas" }, |
| 2297 | + Egypt: { iso2: "EG", region: "mea" }, |
| 2298 | + Estonia: { iso2: "EE", region: "europe" }, |
| 2299 | + Ethiopia: { iso2: "ET", region: "africa" }, |
| 2300 | + Finland: { iso2: "FI", region: "europe" }, |
| 2301 | + France: { iso2: "FR", region: "europe" }, |
| 2302 | + Georgia: { iso2: "GE", region: "europe" }, |
| 2303 | + Germany: { iso2: "DE", region: "europe" }, |
| 2304 | + Ghana: { iso2: "GH", region: "africa" }, |
| 2305 | + Greece: { iso2: "GR", region: "europe" }, |
| 2306 | + "Hong Kong": { iso2: "HK", region: "apac" }, |
| 2307 | + Hungary: { iso2: "HU", region: "europe" }, |
| 2308 | + Iceland: { iso2: "IS", region: "europe" }, |
| 2309 | + India: { iso2: "IN", region: "apac" }, |
| 2310 | + Indonesia: { iso2: "ID", region: "apac" }, |
| 2311 | + Ireland: { iso2: "IE", region: "europe" }, |
| 2312 | + Israel: { iso2: "IL", region: "mea" }, |
| 2313 | + Italy: { iso2: "IT", region: "europe" }, |
| 2314 | + Japan: { iso2: "JP", region: "apac" }, |
| 2315 | + Jordan: { iso2: "JO", region: "mea" }, |
| 2316 | + Kenya: { iso2: "KE", region: "africa" }, |
| 2317 | + Kuwait: { iso2: "KW", region: "mea" }, |
| 2318 | + Latvia: { iso2: "LV", region: "europe" }, |
| 2319 | + Lebanon: { iso2: "LB", region: "mea" }, |
| 2320 | + Lithuania: { iso2: "LT", region: "europe" }, |
| 2321 | + Luxembourg: { iso2: "LU", region: "europe" }, |
| 2322 | + Malaysia: { iso2: "MY", region: "apac" }, |
| 2323 | + Malta: { iso2: "MT", region: "europe" }, |
| 2324 | + Mexico: { iso2: "MX", region: "americas" }, |
| 2325 | + Moldova: { iso2: "MD", region: "europe" }, |
| 2326 | + Montenegro: { iso2: "ME", region: "europe" }, |
| 2327 | + Morocco: { iso2: "MA", region: "mea" }, |
| 2328 | + Nepal: { iso2: "NP", region: "apac" }, |
| 2329 | + "New Zealand": { iso2: "NZ", region: "apac" }, |
| 2330 | + Netherlands: { iso2: "NL", region: "europe" }, |
| 2331 | + Nigeria: { iso2: "NG", region: "africa" }, |
| 2332 | + "North Macedonia": { iso2: "MK", region: "europe" }, |
| 2333 | + Norway: { iso2: "NO", region: "europe" }, |
| 2334 | + Oman: { iso2: "OM", region: "mea" }, |
| 2335 | + Pakistan: { iso2: "PK", region: "apac" }, |
| 2336 | + Panama: { iso2: "PA", region: "americas" }, |
| 2337 | + Peru: { iso2: "PE", region: "americas" }, |
| 2338 | + Philippines: { iso2: "PH", region: "apac" }, |
| 2339 | + Poland: { iso2: "PL", region: "europe" }, |
| 2340 | + Portugal: { iso2: "PT", region: "europe" }, |
| 2341 | + Qatar: { iso2: "QA", region: "mea" }, |
| 2342 | + Romania: { iso2: "RO", region: "europe" }, |
| 2343 | + Russia: { iso2: "RU", region: "europe" }, |
| 2344 | + "Saudi Arabia": { iso2: "SA", region: "mea" }, |
| 2345 | + Serbia: { iso2: "RS", region: "europe" }, |
| 2346 | + Singapore: { iso2: "SG", region: "apac" }, |
| 2347 | + Slovakia: { iso2: "SK", region: "europe" }, |
| 2348 | + Slovenia: { iso2: "SI", region: "europe" }, |
| 2349 | + "South Africa": { iso2: "ZA", region: "africa" }, |
| 2350 | + "South Korea": { iso2: "KR", region: "apac" }, |
| 2351 | + Spain: { iso2: "ES", region: "europe" }, |
| 2352 | + "Sri Lanka": { iso2: "LK", region: "apac" }, |
| 2353 | + Sweden: { iso2: "SE", region: "europe" }, |
| 2354 | + Switzerland: { iso2: "CH", region: "europe" }, |
| 2355 | + Taiwan: { iso2: "TW", region: "apac" }, |
| 2356 | + Thailand: { iso2: "TH", region: "apac" }, |
| 2357 | + Tunisia: { iso2: "TN", region: "mea" }, |
| 2358 | + Turkey: { iso2: "TR", region: "europe" }, |
| 2359 | + Ukraine: { iso2: "UA", region: "europe" }, |
| 2360 | + "United Arab Emirates": { iso2: "AE", region: "mea" }, |
| 2361 | + "United Kingdom": { iso2: "GB", region: "europe" }, |
| 2362 | + "United States": { iso2: "US", region: "americas" }, |
| 2363 | + Uruguay: { iso2: "UY", region: "americas" }, |
| 2364 | + Vietnam: { iso2: "VN", region: "apac" } |
2297 | 2365 | }; |
2298 | 2366 |
|
2299 | | - const countryToIso2 = { |
2300 | | - Argentina: "AR", |
2301 | | - Australia: "AU", |
2302 | | - Austria: "AT", |
2303 | | - Bahrain: "BH", |
2304 | | - Belgium: "BE", |
2305 | | - Brazil: "BR", |
2306 | | - Canada: "CA", |
2307 | | - Chile: "CL", |
2308 | | - Denmark: "DK", |
2309 | | - France: "FR", |
2310 | | - Germany: "DE", |
2311 | | - Greece: "GR", |
2312 | | - India: "IN", |
2313 | | - Indonesia: "ID", |
2314 | | - Israel: "IL", |
2315 | | - Italy: "IT", |
2316 | | - Japan: "JP", |
2317 | | - Kenya: "KE", |
2318 | | - Lithuania: "LT", |
2319 | | - Luxembourg: "LU", |
2320 | | - Mexico: "MX", |
2321 | | - Nepal: "NP", |
2322 | | - Netherlands: "NL", |
2323 | | - Norway: "NO", |
2324 | | - Poland: "PL", |
2325 | | - Portugal: "PT", |
2326 | | - Qatar: "QA", |
2327 | | - Romania: "RO", |
2328 | | - "Saudi Arabia": "SA", |
2329 | | - Singapore: "SG", |
2330 | | - "South Africa": "ZA", |
2331 | | - Spain: "ES", |
2332 | | - Switzerland: "CH", |
2333 | | - Taiwan: "TW", |
2334 | | - "United Arab Emirates": "AE", |
2335 | | - "United Kingdom": "GB", |
2336 | | - "United States": "US" |
| 2367 | + const COUNTRY_REGION = { |
| 2368 | + europe: new Set(), |
| 2369 | + americas: new Set(), |
| 2370 | + apac: new Set(), |
| 2371 | + mea: new Set(), |
| 2372 | + africa: new Set() |
2337 | 2373 | }; |
| 2374 | + const countryToIso2 = {}; |
| 2375 | + for (const [name, { iso2, region }] of Object.entries(COUNTRY_REGISTRY)) { |
| 2376 | + countryToIso2[name] = iso2; |
| 2377 | + COUNTRY_REGION[region].add(name); |
| 2378 | + } |
2338 | 2379 |
|
2339 | 2380 | function iso2ToFlagEmoji(iso2) { |
2340 | 2381 | return iso2 |
|
2352 | 2393 | } |
2353 | 2394 |
|
2354 | 2395 | function renderCountryFlag(countryValue) { |
2355 | | - const country = normalize(countryValue); |
| 2396 | + const country = normalizeCountryName(countryValue); |
2356 | 2397 | if (!country || country === "TBD" || country === "Various") return "—"; |
2357 | 2398 | if (isGlobalCountry(country)) { |
2358 | 2399 | return `<span class="country-flag country-flag-global"${tipDataAttr(country)} aria-label="${escapeHtml(country)}">${globalCountryFlagSvg()}</span>`; |
|
2479 | 2520 | if (label === "Name") parts.push("m-head"); |
2480 | 2521 | else if (label === "Favorite") parts.push("m-fav"); |
2481 | 2522 | else if (label === "Actions") parts.push("m-actions"); |
2482 | | - else if (label === "Next Deadline" || label === "Site") parts.push("m-foot"); |
| 2523 | + else if (label === "Next Deadline") parts.push("m-foot"); |
2483 | 2524 | else parts.push("m-field"); |
2484 | 2525 | const isDeadlineCol = label === "CfP" || label === "CfT" || label === "CfW"; |
2485 | 2526 | const empty = !String(value == null ? "" : value).trim(); |
|
2518 | 2559 | td("City", escapeHtml(normalize(r.city))), |
2519 | 2560 | td("Country", renderCountryFlag(r.country), "country-col") |
2520 | 2561 | ); |
2521 | | - if (attendee) { |
2522 | | - cells.push(td("Site", linkOrText(r.website_or_cfp_link, "Site"), "attendee-only-col")); |
2523 | | - } else { |
| 2562 | + if (!attendee) { |
2524 | 2563 | cells.push(td("Next Deadline", renderNextDeadline(r))); |
2525 | 2564 | } |
2526 | 2565 | cells.push(td("Actions", renderRowActions(r), "table-action-cell")); |
|
2713 | 2752 |
|
2714 | 2753 | function countryMatchesRegion(country, region) { |
2715 | 2754 | if (!region) return true; |
2716 | | - const c = normalize(country); |
| 2755 | + const c = normalizeCountryName(country); |
2717 | 2756 | if (!c || c === "TBD" || c === "Global" || c === "Virtual") return false; |
2718 | 2757 | const set = COUNTRY_REGION[region]; |
2719 | 2758 | return set ? set.has(c) : true; |
|
2991 | 3030 | uae: "United Arab Emirates", |
2992 | 3031 | "chinese taipei": "Taiwan", |
2993 | 3032 | worldwide: "Global", |
2994 | | - international: "Global" |
| 3033 | + international: "Global", |
| 3034 | + czechia: "Czech Republic", |
| 3035 | + turkiye: "Turkey", |
| 3036 | + türkiye: "Turkey", |
| 3037 | + korea: "South Korea", |
| 3038 | + "republic of korea": "South Korea", |
| 3039 | + holland: "Netherlands", |
| 3040 | + england: "United Kingdom", |
| 3041 | + scotland: "United Kingdom", |
| 3042 | + wales: "United Kingdom", |
| 3043 | + macedonia: "North Macedonia", |
| 3044 | + bosnia: "Bosnia and Herzegovina", |
| 3045 | + "hong kong sar": "Hong Kong" |
2995 | 3046 | }; |
2996 | 3047 | return aliases[lowered] || country; |
2997 | 3048 | } |
|
3674 | 3725 | SPEAKER_ONLY_FILTER_KEYS.forEach((k) => { |
3675 | 3726 | state.filters[k] = ""; |
3676 | 3727 | }); |
3677 | | - if (state.filters.sortBy === "deadline_soon") { |
3678 | | - state.filters.sortBy = "start_soon"; |
3679 | | - } |
3680 | 3728 | if ( |
3681 | 3729 | state.headerSort.key && |
3682 | 3730 | (state.headerSort.key.startsWith("accepts_") || |
|
3690 | 3738 | const cur = state.filters.sortBy || defaultSortByForPersona(); |
3691 | 3739 | const opts = isAttendeeMode() |
3692 | 3740 | ? [ |
| 3741 | + { v: "deadline_soon", l: "Soonest CfX deadline" }, |
3693 | 3742 | { v: "start_soon", l: "Conference date soonest" }, |
3694 | 3743 | { v: "name_asc", l: "Name A–Z" }, |
3695 | 3744 | { v: "attendees_name", l: "500+ attendees, then name" } |
|
3820 | 3869 |
|
3821 | 3870 | function resetFilters() { |
3822 | 3871 | closeConferenceDetail(); |
3823 | | - state.filters = state.personaMode === "speaker" ? speakerPresetFilters() : attendeePresetFilters(); |
| 3872 | + state.filters = { |
| 3873 | + ...defaultFilters(), |
| 3874 | + sortBy: defaultSortByForPersona() |
| 3875 | + }; |
3824 | 3876 | state.headerSort = { key: "", direction: "asc" }; |
3825 | 3877 | localStorage.removeItem(STORAGE_KEY); |
3826 | 3878 | applyFilterValuesToInputs(); |
|
0 commit comments