Add calendar toolbox with weekly and monthly scheduling
All checks were successful
Deploy Sokko G / deploy (push) Successful in 14s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 14s
This commit is contained in:
parent
4f73e0068b
commit
992665f4ea
39 changed files with 4331 additions and 36 deletions
|
|
@ -6,6 +6,7 @@ import {
|
|||
clampQty,
|
||||
hostnameFromUrl,
|
||||
normalizeCalculatorData,
|
||||
normalizeCalendarData,
|
||||
normalizeChecklistData,
|
||||
normalizeCombosData,
|
||||
normalizeCountersData,
|
||||
|
|
@ -31,6 +32,7 @@ const MODULE_COMPONENTS = {
|
|||
counters: lazy(() => import("../features/toolboxes/modules/CountersModule.jsx").then((module) => ({ default: module.CountersModule }))),
|
||||
combos: lazy(() => import("../features/toolboxes/modules/CombosModule.jsx").then((module) => ({ default: module.CombosModule }))),
|
||||
calculator: lazy(() => import("../features/toolboxes/modules/CalculatorModule.jsx").then((module) => ({ default: module.CalculatorModule }))),
|
||||
calendar: lazy(() => import("../features/toolboxes/modules/CalendarModule.jsx").then((module) => ({ default: module.CalendarModule }))),
|
||||
table: lazy(() => import("../features/toolboxes/modules/TableModule.jsx").then((module) => ({ default: module.TableModule }))),
|
||||
timer: lazy(() => import("../features/toolboxes/modules/TimerModule.jsx").then((module) => ({ default: module.TimerModule }))),
|
||||
taskPlanner: lazy(() => import("../features/toolboxes/modules/TaskPlannerModule.jsx").then((module) => ({ default: module.TaskPlannerModule }))),
|
||||
|
|
@ -94,12 +96,15 @@ function getToolDescription(siteContent, definition) {
|
|||
}
|
||||
|
||||
function getLibraryCategories(modules, content) {
|
||||
const modulesByType = new Map((modules || []).map((module) => [module.type, module]));
|
||||
const modulesByType = new Map();
|
||||
(modules || []).forEach((module) => {
|
||||
modulesByType.set(module.type, [...(modulesByType.get(module.type) || []), module]);
|
||||
});
|
||||
return LIBRARY_CATEGORY_DEFINITIONS.map((category) => ({
|
||||
...category,
|
||||
title: content.categories?.[category.key] || category.key,
|
||||
description: content.categoryDescriptions?.[category.key] || "",
|
||||
modules: category.types.map((type) => modulesByType.get(type)).filter(Boolean)
|
||||
modules: category.types.flatMap((type) => modulesByType.get(type) || [])
|
||||
})).filter((category) => category.modules.length);
|
||||
}
|
||||
|
||||
|
|
@ -149,6 +154,7 @@ export function LibraryPage({ siteContent, actions }) {
|
|||
normalizeCountersData,
|
||||
normalizeEquipmentPlannerData,
|
||||
normalizeCalculatorData,
|
||||
normalizeCalendarData,
|
||||
normalizeImageAnnotationData,
|
||||
normalizeNotepadData,
|
||||
normalizeTableData,
|
||||
|
|
@ -245,7 +251,11 @@ export function LibraryPage({ siteContent, actions }) {
|
|||
sourceData={libraryPayload.modules?.[module.id] || {}}
|
||||
description={getToolDescription(siteContent, getToolboxModuleDefinition(module.type))}
|
||||
categoryTitle={activeCategory.title}
|
||||
docs={content.toolDocs?.[module.type]}
|
||||
docs={{
|
||||
...(content.toolDocs?.[module.type] || {}),
|
||||
...(module.controls ? { controls: module.controls } : {}),
|
||||
...(module.importFormat ? { importFormat: module.importFormat } : {})
|
||||
}}
|
||||
featureHeading={content.featureHeading}
|
||||
advancedHeading={content.advancedHeading}
|
||||
advancedCopyLabel={content.copyExampleLabel}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue