Refactor UML module selection UI and enhance schema mappings across various YAML files
All checks were successful
Deploy Frontend / build-and-deploy (push) Successful in 2m3s
All checks were successful
Deploy Frontend / build-and-deploy (push) Successful in 2m3s
This commit is contained in:
parent
2fd6f491ef
commit
e922ff3640
27 changed files with 166 additions and 81 deletions
|
|
@ -16,7 +16,7 @@ imports:
|
|||
classes:
|
||||
Curator:
|
||||
is_a: StaffRole
|
||||
class_uri: schema:curator
|
||||
class_uri: hc:Curator
|
||||
description: |
|
||||
Curator responsible for collections research, acquisition, and exhibitions.
|
||||
|
||||
|
|
@ -41,8 +41,7 @@ classes:
|
|||
- Object interpretation and labeling
|
||||
- Loan negotiations
|
||||
exact_mappings:
|
||||
- schema:curator
|
||||
- wikidata:Q674426
|
||||
- wikidata:Q674426
|
||||
slot_usage:
|
||||
role_category:
|
||||
ifabsent: string(CURATORIAL)
|
||||
|
|
@ -53,8 +52,8 @@ classes:
|
|||
range: TemplateSpecificityScores
|
||||
inlined: true
|
||||
slots:
|
||||
- specificity_annotation
|
||||
- template_specificity
|
||||
- specificity_annotation
|
||||
- template_specificity
|
||||
CollectionsManager:
|
||||
is_a: StaffRole
|
||||
description: |
|
||||
|
|
@ -80,7 +79,7 @@ classes:
|
|||
- Rights and reproductions
|
||||
- Insurance and valuation coordination
|
||||
exact_mappings:
|
||||
- wikidata:Q65963513
|
||||
- wikidata:Q65963513
|
||||
slot_usage:
|
||||
role_category:
|
||||
ifabsent: string(CURATORIAL)
|
||||
|
|
@ -91,8 +90,8 @@ classes:
|
|||
range: TemplateSpecificityScores
|
||||
inlined: true
|
||||
slots:
|
||||
- specificity_annotation
|
||||
- template_specificity
|
||||
- specificity_annotation
|
||||
- template_specificity
|
||||
Conservator:
|
||||
is_a: StaffRole
|
||||
description: |
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ classes:
|
|||
- crm:E8_Acquisition
|
||||
close_mappings:
|
||||
- prov:Activity
|
||||
- schema:AcquireAction
|
||||
- schema:TradeAction
|
||||
related_mappings:
|
||||
- rico:Event
|
||||
- dwc:Event
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ imports:
|
|||
- ../slots/temporal_extent
|
||||
classes:
|
||||
Agreement:
|
||||
class_uri: schema:Contract
|
||||
class_uri: hc:Agreement
|
||||
close_mappings:
|
||||
- schema:Thing
|
||||
description: >-
|
||||
Formal arrangement between two or more parties establishing mutual
|
||||
obligations, rights, or expectations, typically documented in writing
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ imports:
|
|||
- ../slots/categorized_as
|
||||
classes:
|
||||
Animal:
|
||||
class_uri: schema:Animal
|
||||
class_uri: wd:Q729
|
||||
exact_mappings:
|
||||
- wikidata:Q729
|
||||
description: >-
|
||||
Multicellular living organism characterized by heterotrophic nutrition,
|
||||
motility at some life stage, and sensory response capacity.
|
||||
|
|
@ -83,10 +85,7 @@ classes:
|
|||
- zoological
|
||||
- wildlife
|
||||
- fauna
|
||||
exact_mappings:
|
||||
- schema:Animal
|
||||
broad_mappings:
|
||||
- wd:Q729
|
||||
- schema:Thing
|
||||
slots:
|
||||
- has_label
|
||||
|
|
@ -103,7 +102,7 @@ classes:
|
|||
Preserved from prior description:
|
||||
|
||||
**Ontological Alignment**:
|
||||
- `schema:Animal`: Generic animal class.
|
||||
- `wikidata:Q729`: Animal (kingdom Animalia) - Wikidata entity for animals.
|
||||
- 'Preserved from prior description: Living organism belonging to the kingdom Animalia, characterized by voluntary movement, consumption of organic material, and typically sensory and nervous systems, relevant to natural history collections and zoological specimens.'
|
||||
annotations:
|
||||
specificity_score: "0.2"
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ classes:
|
|||
description: Specialized auction house
|
||||
close_mappings:
|
||||
- schema:Organization
|
||||
- schema:AuctionHouse
|
||||
- schema:LocalBusiness
|
||||
broad_mappings:
|
||||
- skos:Concept
|
||||
structured_aliases:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ prefixes:
|
|||
default_prefix: hc
|
||||
classes:
|
||||
AvailabilityStatus:
|
||||
class_uri: schema:Availability
|
||||
class_uri: hc:AvailabilityStatus
|
||||
broad_mappings:
|
||||
- schema:ItemAvailability
|
||||
description: >-
|
||||
Availability state of a resource, service, or feature, indicating whether
|
||||
something is currently available for use with optional temporal validity
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ prefixes:
|
|||
linkml: https://w3id.org/linkml/
|
||||
hc: https://nde.nl/ontology/hc/
|
||||
schema: http://schema.org/
|
||||
rec: https://w3id.org/rec#
|
||||
qudt: http://qudt.org/schema/qudt/
|
||||
default_prefix: hc
|
||||
imports:
|
||||
|
|
@ -15,7 +16,7 @@ imports:
|
|||
classes:
|
||||
Classroom:
|
||||
is_a: Facility
|
||||
class_uri: schema:Classroom
|
||||
class_uri: rec:Classroom
|
||||
description: >-
|
||||
Instructional room entity for teaching, workshops, and guided learning sessions within institutional premises.
|
||||
alt_descriptions:
|
||||
|
|
@ -42,7 +43,7 @@ classes:
|
|||
examples:
|
||||
- value: 'unit_type: CLASSROOM '
|
||||
exact_mappings:
|
||||
- schema:Classroom
|
||||
- rec:Classroom
|
||||
close_mappings:
|
||||
- schema:Room
|
||||
- schema:Place
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@ classes:
|
|||
required: false
|
||||
close_mappings:
|
||||
- dcterms:conformsTo
|
||||
related_mappings:
|
||||
- schema:assessment
|
||||
annotations:
|
||||
custodian_types: '["A", "L", "M"]'
|
||||
custodian_types_rationale: Compliance tracking is common for archives, libraries, and museums with preservation mandates.
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ imports:
|
|||
- ../slots/has_score
|
||||
classes:
|
||||
Currency:
|
||||
class_uri: schema:Currency
|
||||
class_uri: qudt:CurrencyUnit
|
||||
exact_mappings:
|
||||
- qudt:CurrencyUnit
|
||||
description: >-
|
||||
Standardized monetary unit with ISO 4217 code representation for pricing, budgeting, and financial valuation metadata.
|
||||
alt_descriptions:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ imports:
|
|||
- ../slots/temporal_extent
|
||||
classes:
|
||||
DeceasedStatus:
|
||||
class_uri: schema:DeathEvent
|
||||
class_uri: hc:DeceasedStatus
|
||||
broad_mappings:
|
||||
- schema:Event
|
||||
description: >-
|
||||
Structured event record for a person's death including causal,
|
||||
temporal, and contextual attributes.
|
||||
|
|
@ -38,9 +40,8 @@ classes:
|
|||
- {literal_form: status kematian, in_language: id}
|
||||
- {literal_form: 死亡状态记录, in_language: zh}
|
||||
exact_mappings:
|
||||
- schema:DeathEvent
|
||||
close_mappings:
|
||||
- crm:E69_Death
|
||||
close_mappings:
|
||||
related_mappings:
|
||||
- prov:End
|
||||
keywords:
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ imports:
|
|||
- ../slots/has_description
|
||||
classes:
|
||||
ForkliftAccess:
|
||||
class_uri: schema:AmenityFeature
|
||||
class_uri: schema:LocationFeatureSpecification
|
||||
description: >-
|
||||
Facility access feature indicating whether spaces permit forklift entry
|
||||
for logistics, handling, or collection movement.
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ imports:
|
|||
- ../slots/has_description
|
||||
classes:
|
||||
HandsOnFacility:
|
||||
class_uri: schema:AmenityFeature
|
||||
class_uri: schema:LocationFeatureSpecification
|
||||
description: >-
|
||||
Amenity feature indicating availability of interactive, practical learning
|
||||
or handling spaces for visitors and participants.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ imports:
|
|||
classes:
|
||||
InstitutionalRepository:
|
||||
is_a: ArchiveOrganizationType
|
||||
class_uri: schema:DigitalLibrary
|
||||
class_uri: hc:InstitutionalRepository
|
||||
broad_mappings:
|
||||
- schema:Library
|
||||
description: >-
|
||||
Digital repository service for preserving, publishing, and providing access
|
||||
to scholarly output produced by an academic or research institution.
|
||||
|
|
@ -62,8 +64,6 @@ classes:
|
|||
- literal_form: 机构仓储
|
||||
predicate: EXACT_SYNONYM
|
||||
in_language: zh
|
||||
broad_mappings:
|
||||
- schema:DigitalLibrary
|
||||
close_mappings:
|
||||
- skos:Concept
|
||||
slots:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ imports:
|
|||
- ../slots/has_description
|
||||
classes:
|
||||
LoadingDock:
|
||||
class_uri: schema:AmenityFeature
|
||||
class_uri: schema:LocationFeatureSpecification
|
||||
description: >-
|
||||
Designated area for receiving and dispatching physical items through vehicular transport.
|
||||
alt_descriptions:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ imports:
|
|||
- ../slots/has_description
|
||||
classes:
|
||||
Locker:
|
||||
class_uri: schema:AmenityFeature
|
||||
class_uri: schema:LocationFeatureSpecification
|
||||
description: >-
|
||||
Secure storage compartment provided as a visitor or staff amenity for temporary personal item retention.
|
||||
alt_descriptions:
|
||||
|
|
@ -52,7 +52,7 @@ classes:
|
|||
predicate: EXACT_SYNONYM
|
||||
in_language: zh
|
||||
broad_mappings:
|
||||
- schema:AmenityFeature
|
||||
- schema:LocationFeatureSpecification
|
||||
slots:
|
||||
- has_description
|
||||
comments:
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ classes:
|
|||
zh: >-
|
||||
分类概念,根据分类系统中的共同特征、功能、材料或预期用途对产品或项目进行分组。
|
||||
exact_mappings:
|
||||
- schema:Category
|
||||
- schema:CategoryCode
|
||||
broad_mappings:
|
||||
- skos:Concept
|
||||
- schema:Thing
|
||||
|
|
|
|||
|
|
@ -13,7 +13,9 @@ imports:
|
|||
- ../slots/has_description
|
||||
classes:
|
||||
SupervisedHandling:
|
||||
class_uri: schema:Policy
|
||||
class_uri: hc:SupervisedHandling
|
||||
close_mappings:
|
||||
- schema:Thing
|
||||
description: >-
|
||||
Policy mandating that access to or manipulation of materials occurs only under staff observation and guidance to ensure proper care.
|
||||
alt_descriptions:
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ classes:
|
|||
broad_mappings:
|
||||
- prov:Entity
|
||||
related_mappings:
|
||||
- schema:Award
|
||||
- crm:E7_Activity
|
||||
- schema:Organization
|
||||
slots: []
|
||||
|
|
|
|||
|
|
@ -24,13 +24,12 @@ classes:
|
|||
ar: نسخ فيديو YouTube بما في ذلك معرف الفيديو واللغة ونوع النسخ (يدوي أو مولد تلقائيًا) والنص الكامل وبيانات الاستخراج الوصفية للوصول وتحليل المحتوى.
|
||||
id: Transkrip video YouTube termasuk ID video, bahasa, jenis transkrip (manual atau dihasilkan otomatis), teks lengkap, dan metadata ekstraksi untuk aksesibilitas dan analisis konten.
|
||||
zh: YouTube视频字幕,包括视频ID、语言、字幕类型(手动或自动生成)、 全文和提取元数据,用于无障碍访问和内容分析。
|
||||
class_uri: schema:Transcript
|
||||
class_uri: hc:YoutubeTranscript
|
||||
close_mappings:
|
||||
- schema:Transcript
|
||||
- schema:MediaObject
|
||||
related_mappings:
|
||||
- oa:TextualBody
|
||||
- prov:Entity
|
||||
- schema:MediaObject
|
||||
slots:
|
||||
- in_language
|
||||
structured_aliases:
|
||||
|
|
|
|||
|
|
@ -573,7 +573,6 @@ enums:
|
|||
SPONSORSHIP_EXHIBITION:
|
||||
description: |
|
||||
Corporate or individual sponsorship of temporary exhibition.
|
||||
meaning: schema:SponsorAction
|
||||
annotations:
|
||||
category: sponsorship
|
||||
typical_benefits: |
|
||||
|
|
@ -586,7 +585,6 @@ enums:
|
|||
SPONSORSHIP_GALLERY:
|
||||
description: |
|
||||
Named sponsorship of permanent gallery or wing.
|
||||
meaning: schema:SponsorAction
|
||||
annotations:
|
||||
category: sponsorship
|
||||
custodian_types: "G, M, B, H"
|
||||
|
|
@ -595,7 +593,6 @@ enums:
|
|||
description: |
|
||||
Sponsorship of institutional event (gala, lecture series,
|
||||
education program).
|
||||
meaning: schema:SponsorAction
|
||||
annotations:
|
||||
category: sponsorship
|
||||
custodian_types: "G, L, A, M, O, R, B, E, S, H, D"
|
||||
|
|
@ -604,7 +601,6 @@ enums:
|
|||
description: |
|
||||
Sponsorship of ongoing program (education, outreach,
|
||||
conservation, research).
|
||||
meaning: schema:SponsorAction
|
||||
annotations:
|
||||
category: sponsorship
|
||||
examples: |
|
||||
|
|
@ -615,7 +611,6 @@ enums:
|
|||
SPONSORSHIP_DIGITIZATION:
|
||||
description: |
|
||||
Sponsorship of digitization projects for online access.
|
||||
meaning: schema:SponsorAction
|
||||
annotations:
|
||||
category: sponsorship
|
||||
examples: |
|
||||
|
|
@ -626,7 +621,6 @@ enums:
|
|||
SPONSORSHIP_CONSERVATION:
|
||||
description: |
|
||||
Sponsorship of conservation or restoration work.
|
||||
meaning: schema:SponsorAction
|
||||
annotations:
|
||||
category: sponsorship
|
||||
examples: |
|
||||
|
|
|
|||
|
|
@ -17,18 +17,13 @@ enums:
|
|||
permissible_values:
|
||||
NATIVE_BILINGUAL:
|
||||
description: Native or bilingual proficiency
|
||||
meaning: schema:Expert
|
||||
FULL_PROFESSIONAL:
|
||||
description: Full professional proficiency
|
||||
meaning: schema:Advanced
|
||||
PROFESSIONAL_WORKING:
|
||||
description: Professional working proficiency
|
||||
meaning: schema:Intermediate
|
||||
LIMITED_WORKING:
|
||||
description: Limited working proficiency
|
||||
meaning: schema:Intermediate
|
||||
ELEMENTARY:
|
||||
description: Elementary proficiency
|
||||
meaning: schema:Beginner
|
||||
UNKNOWN:
|
||||
description: Proficiency level not specified
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ enums:
|
|||
description: |
|
||||
Initial loan request submitted by borrowing institution.
|
||||
Loan is awaiting review by lending institution.
|
||||
meaning: schema:PendingAction
|
||||
annotations:
|
||||
loan_phase: "initiation"
|
||||
next_states: '["UNDER_REVIEW", "DECLINED", "CANCELLED"]'
|
||||
|
|
@ -110,7 +109,6 @@ enums:
|
|||
description: |
|
||||
Object in transit from lender to borrower.
|
||||
May involve courier accompaniment for high-value items.
|
||||
meaning: schema:InTransitAction
|
||||
annotations:
|
||||
loan_phase: "transit"
|
||||
next_states: '["ON_LOAN", "RETURNED"]'
|
||||
|
|
@ -144,7 +142,6 @@ enums:
|
|||
description: |
|
||||
Object in transit from borrower back to lender.
|
||||
Return journey underway.
|
||||
meaning: schema:InTransitAction
|
||||
annotations:
|
||||
loan_phase: "transit"
|
||||
next_states: '["RETURNED"]'
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ enums:
|
|||
meaning: schema:size
|
||||
VISITOR_COUNT:
|
||||
description: Number of visitors (annual, daily, etc.).
|
||||
meaning: schema:numberOfAttendees
|
||||
BUDGET_AMOUNT:
|
||||
description: Financial amount (budget, revenue, cost).
|
||||
meaning: schema:amount
|
||||
|
|
@ -53,7 +52,6 @@ enums:
|
|||
meaning: schema:numberOfItems
|
||||
CHARACTER_COUNT:
|
||||
description: Number of characters in text content.
|
||||
meaning: schema:characterCount
|
||||
WORD_COUNT:
|
||||
description: Number of words in text content.
|
||||
meaning: schema:wordCount
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ prefixes:
|
|||
linkml: https://w3id.org/linkml/
|
||||
hc: https://nde.nl/ontology/hc/
|
||||
schema: http://schema.org/
|
||||
rec: https://w3id.org/rec#
|
||||
|
||||
imports:
|
||||
- linkml:types
|
||||
|
|
@ -34,7 +35,7 @@ enums:
|
|||
# Educational spaces
|
||||
CLASSROOM:
|
||||
description: Teaching/learning space for group instruction
|
||||
meaning: schema:Classroom
|
||||
meaning: rec:Classroom
|
||||
annotations:
|
||||
usage_context: education
|
||||
typical_capacity: "20-40"
|
||||
|
|
|
|||
|
|
@ -142,17 +142,17 @@ slots:
|
|||
- has_or_had_accessibility_feature
|
||||
- is_accessible
|
||||
examples:
|
||||
- value: "schema:wheelchairAccessible"
|
||||
- value: "wheelchairAccessible"
|
||||
description: Physical location is accessible by wheelchair
|
||||
- value: "schema:audioDescription"
|
||||
- value: "audioDescription"
|
||||
description: Content includes audio description for visually impaired users
|
||||
- value: "schema:captions"
|
||||
- value: "captions"
|
||||
description: Content includes captions for deaf or hard-of-hearing users
|
||||
- value: "schema:signLanguage"
|
||||
- value: "signLanguage"
|
||||
description: Content includes sign language interpretation
|
||||
- value: "schema:braille"
|
||||
- value: "braille"
|
||||
description: Materials available in Braille format
|
||||
- value: "schema:largePrint"
|
||||
- value: "largePrint"
|
||||
description: Materials available in large print format
|
||||
comments:
|
||||
- Updated 2026-02-03 with verified ontology mappings and translations
|
||||
|
|
|
|||
|
|
@ -1126,6 +1126,46 @@
|
|||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
.uml-module-chips {
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
.uml-module-chips-title {
|
||||
margin: 0 0 0.375rem 0;
|
||||
font-size: 0.75rem;
|
||||
color: #172a59;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.uml-module-chip-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
.uml-module-chip {
|
||||
padding: 0.35rem 0.625rem;
|
||||
border: 1px solid #c8d4ff;
|
||||
background: white;
|
||||
color: #2c5ce6;
|
||||
border-radius: 999px;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.uml-module-chip:hover {
|
||||
border-color: #4a7dff;
|
||||
background: #f8f9ff;
|
||||
}
|
||||
|
||||
.uml-module-chip.active {
|
||||
border-color: #4a7dff;
|
||||
background: #4a7dff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.uml-module-label {
|
||||
display: block;
|
||||
margin: 0 0 0.375rem 0;
|
||||
|
|
@ -2499,6 +2539,27 @@ body:has(.visualize-page.is-mobile .sidebar--mobile:not(.collapsed)) {
|
|||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .uml-module-chips-title {
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .uml-module-chip {
|
||||
background: #1e1e32;
|
||||
border-color: #3d3d5c;
|
||||
color: #a7c1ff;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .uml-module-chip:hover {
|
||||
border-color: #4a7dff;
|
||||
background: #2d2d4a;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .uml-module-chip.active {
|
||||
border-color: #4a7dff;
|
||||
background: #4a7dff;
|
||||
color: white;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .uml-module-select {
|
||||
background: #1e1e32;
|
||||
border-color: #3d3d5c;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ function isAdvancedRdfLayout(layout: string): layout is RdfAdvancedLayoutType {
|
|||
|
||||
type UmlDensityMode = 'full' | 'streamlined' | 'module';
|
||||
type UmlModuleOption = { id: string; label: string; count: number };
|
||||
const POPULAR_UML_MODULE_IDS = ['custodian', 'legal', 'collections'];
|
||||
|
||||
function humanizeModuleName(moduleId: string): string {
|
||||
return moduleId
|
||||
|
|
@ -193,6 +194,7 @@ const TEXT = {
|
|||
umlModeModuleHint: { nl: 'Toon een domein met context', en: 'Show one domain with context' },
|
||||
umlModuleSelect: { nl: 'Module', en: 'Module' },
|
||||
umlModuleAll: { nl: 'Alle modules', en: 'All modules' },
|
||||
umlPopularModules: { nl: 'Populaire modules', en: 'Popular modules' },
|
||||
umlShowingClasses: { nl: 'klassen zichtbaar', en: 'classes visible' },
|
||||
|
||||
// View switcher
|
||||
|
|
@ -1196,6 +1198,11 @@ export function Visualize() {
|
|||
return options;
|
||||
}, [umlDiagram, t]);
|
||||
|
||||
const popularUmlModules = useMemo(() => {
|
||||
if (!umlModuleOptions.length) return [];
|
||||
return umlModuleOptions.filter((option) => POPULAR_UML_MODULE_IDS.includes(option.id));
|
||||
}, [umlModuleOptions]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!umlModuleOptions.length) return;
|
||||
if (umlModuleOptions.some((option) => option.id === selectedUmlModule)) return;
|
||||
|
|
@ -1539,25 +1546,53 @@ export function Visualize() {
|
|||
</button>
|
||||
</div>
|
||||
{umlDensityMode === 'module' && umlModuleOptions.length > 0 && (
|
||||
<div className="uml-module-picker">
|
||||
<label htmlFor="uml-module-select" className="uml-module-label">{t('umlModuleSelect')}</label>
|
||||
<select
|
||||
id="uml-module-select"
|
||||
className="uml-module-select"
|
||||
value={selectedUmlModule}
|
||||
onChange={(e) => {
|
||||
const next = e.target.value;
|
||||
setSelectedUmlModule(next);
|
||||
localStorage.setItem('visualize-uml-module', next);
|
||||
}}
|
||||
>
|
||||
{umlModuleOptions.map((option) => (
|
||||
<option key={option.id} value={option.id}>
|
||||
{option.label} ({option.count.toLocaleString()})
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
<>
|
||||
<div className="uml-module-chips">
|
||||
<p className="uml-module-chips-title">{t('umlPopularModules')}</p>
|
||||
<div className="uml-module-chip-row">
|
||||
<button
|
||||
className={`uml-module-chip ${selectedUmlModule === '__all__' ? 'active' : ''}`}
|
||||
onClick={() => {
|
||||
setSelectedUmlModule('__all__');
|
||||
localStorage.setItem('visualize-uml-module', '__all__');
|
||||
}}
|
||||
>
|
||||
{t('umlModuleAll')}
|
||||
</button>
|
||||
{popularUmlModules.map((option) => (
|
||||
<button
|
||||
key={option.id}
|
||||
className={`uml-module-chip ${selectedUmlModule === option.id ? 'active' : ''}`}
|
||||
onClick={() => {
|
||||
setSelectedUmlModule(option.id);
|
||||
localStorage.setItem('visualize-uml-module', option.id);
|
||||
}}
|
||||
>
|
||||
{option.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="uml-module-picker">
|
||||
<label htmlFor="uml-module-select" className="uml-module-label">{t('umlModuleSelect')}</label>
|
||||
<select
|
||||
id="uml-module-select"
|
||||
className="uml-module-select"
|
||||
value={selectedUmlModule}
|
||||
onChange={(e) => {
|
||||
const next = e.target.value;
|
||||
setSelectedUmlModule(next);
|
||||
localStorage.setItem('visualize-uml-module', next);
|
||||
}}
|
||||
>
|
||||
{umlModuleOptions.map((option) => (
|
||||
<option key={option.id} value={option.id}>
|
||||
{option.label} ({option.count.toLocaleString()})
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{displayUmlDiagram && umlDiagram && (
|
||||
<p className="uml-density-info">
|
||||
|
|
|
|||
Loading…
Reference in a new issue