@burdenoff/microfe-timecampus 2026.1031.1 → 2026.1031.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-operations.d.ts +449 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +1429 -1188
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/timecampus/TimeCampusRoutes.d.ts.map +1 -1
- package/dist/timecampus/TimeCampusRoutes.js +38 -26
- package/dist/timecampus/TimeCampusRoutes.js.map +1 -1
- package/dist/timecampus/index.js +7 -7
- package/dist/timecampus/pages/extend/AppletStorePage.d.ts +2 -0
- package/dist/timecampus/pages/extend/AppletStorePage.d.ts.map +1 -0
- package/dist/timecampus/pages/extend/AppletStorePage.js +248 -0
- package/dist/timecampus/pages/extend/AppletStorePage.js.map +1 -0
- package/dist/timecampus/pages/extend/TemplateGalleryPage.d.ts +2 -0
- package/dist/timecampus/pages/extend/TemplateGalleryPage.d.ts.map +1 -0
- package/dist/timecampus/pages/extend/TemplateGalleryPage.js +339 -0
- package/dist/timecampus/pages/extend/TemplateGalleryPage.js.map +1 -0
- package/dist/timecampus/pages/extend/WidgetDashboardPage.d.ts +2 -0
- package/dist/timecampus/pages/extend/WidgetDashboardPage.d.ts.map +1 -0
- package/dist/timecampus/pages/extend/WidgetDashboardPage.js +434 -0
- package/dist/timecampus/pages/extend/WidgetDashboardPage.js.map +1 -0
- package/dist/timecampus/pages/extend/extendHelpers.d.ts +36 -0
- package/dist/timecampus/pages/extend/extendHelpers.d.ts.map +1 -0
- package/dist/timecampus/pages/extend/extendHelpers.js +105 -0
- package/dist/timecampus/pages/extend/extendHelpers.js.map +1 -0
- package/dist/timecampus/pages/extend/useOpenRoute.d.ts +7 -0
- package/dist/timecampus/pages/extend/useOpenRoute.d.ts.map +1 -0
- package/dist/timecampus/pages/extend/useOpenRoute.js +19 -0
- package/dist/timecampus/pages/extend/useOpenRoute.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extendHelpers.js","names":[],"sources":["../../../../src/timecampus/pages/extend/extendHelpers.ts"],"sourcesContent":["/**\n * Extend layer helpers (BOFF-4039): labels, icons and layout edits shared by\n * the applet store, the template gallery and the widget dashboard.\n */\nimport {\n Briefcase,\n Calendar,\n CheckCircle,\n Code,\n FileText,\n FlaskConical,\n LayoutDashboard,\n Mail,\n MapPin,\n Megaphone,\n Presentation,\n Puzzle,\n Receipt,\n ShieldCheck,\n Timer,\n TrendingUp,\n User,\n Users,\n Workflow,\n type LucideIcon,\n} from \"lucide-react\";\n\n/** Icons named by the service catalogue; unknown names fall back to a puzzle piece. */\nconst ICONS: Record<string, LucideIcon> = {\n Briefcase,\n Calendar,\n CheckCircle,\n Code,\n FileText,\n FlaskConical,\n LayoutDashboard,\n Mail,\n MapPin,\n Megaphone,\n Presentation,\n Receipt,\n ShieldCheck,\n Timer,\n TrendingUp,\n User,\n Users,\n Workflow,\n};\n\nexport function catalogueIcon(name: string): LucideIcon {\n return ICONS[name] ?? Puzzle;\n}\n\nconst APPLET_CATEGORY_LABELS: Record<string, string> = {\n FOCUS: \"Focus\",\n MEETINGS: \"Meetings & email\",\n FINANCE: \"Finance\",\n CLIENTS: \"Clients\",\n TEAM: \"Team\",\n LOCATION: \"Location\",\n AUTOMATION: \"Automation\",\n ANALYTICS: \"Analytics\",\n};\n\nconst TEMPLATE_CATEGORY_LABELS: Record<string, string> = {\n PROFESSIONAL_SERVICES: \"Professional services\",\n CREATIVE: \"Creative\",\n TECHNOLOGY: \"Technology\",\n INDEPENDENT: \"Independent\",\n RESEARCH: \"Research\",\n};\n\nfunction titleCase(value: string): string {\n return value\n .toLowerCase()\n .split(\"_\")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \");\n}\n\nexport function appletCategoryLabel(category: string): string {\n return APPLET_CATEGORY_LABELS[category] ?? titleCase(category);\n}\n\nexport function templateCategoryLabel(category: string): string {\n return TEMPLATE_CATEGORY_LABELS[category] ?? titleCase(category);\n}\n\n/** Categories in the order the store shows its filter chips. */\nexport const APPLET_CATEGORIES = Object.keys(APPLET_CATEGORY_LABELS);\n\n/** Template project colours are accent token names; never raw colours. */\nexport function accentTokenVar(color: string): string {\n const allowed = new Set([\"blue\", \"indigo\", \"purple\", \"teal\"]);\n return `var(--color-accent-${allowed.has(color) ? color : \"blue\"})`;\n}\n\n/** Case-insensitive match on name, description and category label. */\nexport function matchesAppletSearch(\n applet: { name: string; description: string; category: string },\n search: string,\n): boolean {\n const needle = search.trim().toLowerCase();\n if (!needle) return true;\n return [applet.name, applet.description, appletCategoryLabel(applet.category)]\n .join(\" \")\n .toLowerCase()\n .includes(needle);\n}\n\n/** Paths under /timecampus belong to this micro-frontend; anything else is a shell module. */\nexport function isTimeCampusRoute(route: string): boolean {\n return route === \"/timecampus\" || route.startsWith(\"/timecampus/\");\n}\n\n/** The route relative to the TimeCampus base path (for the MFE navigator). */\nexport function timeCampusRelativeRoute(route: string): string {\n return route.replace(/^\\/timecampus/, \"\") || \"/\";\n}\n\nexport function moveWidget(\n keys: readonly string[],\n key: string,\n direction: -1 | 1,\n): string[] {\n const index = keys.indexOf(key);\n const target = index + direction;\n if (index < 0 || target < 0 || target >= keys.length) return [...keys];\n const next = [...keys];\n [next[index], next[target]] = [next[target], next[index]];\n return next;\n}\n\nexport function removeWidget(keys: readonly string[], key: string): string[] {\n return keys.filter((candidate) => candidate !== key);\n}\n\nexport function addWidget(keys: readonly string[], key: string): string[] {\n return keys.includes(key) ? [...keys] : [...keys, key];\n}\n\nexport function sameLayout(\n a: readonly string[],\n b: readonly string[],\n): boolean {\n return a.length === b.length && a.every((key, index) => key === b[index]);\n}\n\n/** Local-time start of today and of this week (Monday). */\nexport function periodStarts(now: Date = new Date()): {\n today: Date;\n week: Date;\n} {\n const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n const daysSinceMonday = (today.getDay() + 6) % 7;\n const week = new Date(today);\n week.setDate(today.getDate() - daysSinceMonday);\n return { today, week };\n}\n\n/** One-line summary of what applying a template did. */\nexport function describeApplication(application: {\n templateName: string;\n createdProjectIds: readonly string[];\n skippedProjectNames: readonly string[];\n installedAppletKeys: readonly string[];\n createdTaskCount: number;\n}): string {\n const parts: string[] = [];\n const projects = application.createdProjectIds.length;\n parts.push(\n `${projects} project${projects === 1 ? \"\" : \"s\"} and ${application.createdTaskCount} task${application.createdTaskCount === 1 ? \"\" : \"s\"} created`,\n );\n if (application.skippedProjectNames.length > 0) {\n parts.push(\n `${application.skippedProjectNames.length} already existed (${application.skippedProjectNames.join(\", \")})`,\n );\n }\n const applets = application.installedAppletKeys.length;\n if (applets > 0) {\n parts.push(`${applets} applet${applets === 1 ? \"\" : \"s\"} installed`);\n }\n return `${application.templateName}: ${parts.join(\"; \")}.`;\n}\n"],"mappings":";;AA4BA,IAAM,IAAoC;CACxC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,SAAgB,EAAc,GAA0B;CACtD,OAAO,EAAM,MAAS;AACxB;AAEA,IAAM,IAAiD;CACrD,OAAO;CACP,UAAU;CACV,SAAS;CACT,SAAS;CACT,MAAM;CACN,UAAU;CACV,YAAY;CACZ,WAAW;AACb,GAEM,IAAmD;CACvD,uBAAuB;CACvB,UAAU;CACV,YAAY;CACZ,aAAa;CACb,UAAU;AACZ;AAEA,SAAS,EAAU,GAAuB;CACxC,OAAO,EACJ,YAAY,CAAC,CACb,MAAM,GAAG,CAAC,CACV,KAAK,MAAS,EAAK,OAAO,CAAC,CAAC,CAAC,YAAY,IAAI,EAAK,MAAM,CAAC,CAAC,CAAC,CAC3D,KAAK,GAAG;AACb;AAEA,SAAgB,EAAoB,GAA0B;CAC5D,OAAO,EAAuB,MAAa,EAAU,CAAQ;AAC/D;AAEA,SAAgB,EAAsB,GAA0B;CAC9D,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B,EAAa,oBAAY,IAAI,KAAK,GAGhD;CACA,IAAM,IAAQ,IAAI,KAAK,EAAI,YAAY,GAAG,EAAI,SAAS,GAAG,EAAI,QAAQ,CAAC,GACjE,KAAmB,EAAM,OAAO,IAAI,KAAK,GACzC,IAAO,IAAI,KAAK,CAAK;CAE3B,OADA,EAAK,QAAQ,EAAM,QAAQ,IAAI,CAAe,GACvC;EAAE;EAAO;CAAK;AACvB;AAGA,SAAgB,EAAoB,GAMzB;CACT,IAAM,IAAkB,CAAC,GACnB,IAAW,EAAY,kBAAkB;CAI/C,AAHA,EAAM,KACJ,GAAG,EAAS,UAAU,MAAa,IAAI,KAAK,IAAI,OAAO,EAAY,iBAAiB,OAAO,EAAY,qBAAqB,IAAI,KAAK,IAAI,SAC3I,GACI,EAAY,oBAAoB,SAAS,KAC3C,EAAM,KACJ,GAAG,EAAY,oBAAoB,OAAO,oBAAoB,EAAY,oBAAoB,KAAK,IAAI,EAAE,EAC3G;CAEF,IAAM,IAAU,EAAY,oBAAoB;CAIhD,OAHI,IAAU,KACZ,EAAM,KAAK,GAAG,EAAQ,SAAS,MAAY,IAAI,KAAK,IAAI,WAAW,GAE9D,GAAG,EAAY,aAAa,IAAI,EAAM,KAAK,IAAI,EAAE;AAC1D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open an app-shell path from the extend pages. TimeCampus paths go through
|
|
3
|
+
* the MFE navigator (which adds the base path); platform modules such as the
|
|
4
|
+
* FluidGrids workflow builder (/workflows/...) go straight to the shell.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useOpenRoute(): (route: string) => void;
|
|
7
|
+
//# sourceMappingURL=useOpenRoute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOpenRoute.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/extend/useOpenRoute.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAiBtD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useTimeCampus as e, useTimeCampusNavigate as t } from "../../providers/TimeCampusProvider.js";
|
|
2
|
+
import { isTimeCampusRoute as n, timeCampusRelativeRoute as r } from "./extendHelpers.js";
|
|
3
|
+
import { useCallback as i } from "react";
|
|
4
|
+
import { useNavigate as a } from "react-router";
|
|
5
|
+
//#region src/timecampus/pages/extend/useOpenRoute.ts
|
|
6
|
+
function o() {
|
|
7
|
+
let o = t(), { navigate: s } = e(), c = a();
|
|
8
|
+
return i((e) => {
|
|
9
|
+
n(e) ? o(r(e)) : s ? s(e) : c(e);
|
|
10
|
+
}, [
|
|
11
|
+
o,
|
|
12
|
+
s,
|
|
13
|
+
c
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { o as useOpenRoute };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=useOpenRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOpenRoute.js","names":[],"sources":["../../../../src/timecampus/pages/extend/useOpenRoute.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport { useNavigate as useRouterNavigate } from \"react-router\";\nimport {\n useTimeCampus,\n useTimeCampusNavigate,\n} from \"../../providers/TimeCampusProvider\";\nimport { isTimeCampusRoute, timeCampusRelativeRoute } from \"./extendHelpers\";\n\n/**\n * Open an app-shell path from the extend pages. TimeCampus paths go through\n * the MFE navigator (which adds the base path); platform modules such as the\n * FluidGrids workflow builder (/workflows/...) go straight to the shell.\n */\nexport function useOpenRoute(): (route: string) => void {\n const navigate = useTimeCampusNavigate();\n const { navigate: shellNavigate } = useTimeCampus();\n const routerNavigate = useRouterNavigate();\n\n return useCallback(\n (route: string) => {\n if (isTimeCampusRoute(route)) {\n navigate(timeCampusRelativeRoute(route));\n } else if (shellNavigate) {\n shellNavigate(route);\n } else {\n routerNavigate(route);\n }\n },\n [navigate, shellNavigate, routerNavigate],\n );\n}\n"],"mappings":";;;;;AAaA,SAAgB,IAAwC;CACtD,IAAM,IAAW,EAAsB,GACjC,EAAE,UAAU,MAAkB,EAAc,GAC5C,IAAiB,EAAkB;CAEzC,OAAO,GACJ,MAAkB;EACjB,AAAI,EAAkB,CAAK,IACzB,EAAS,EAAwB,CAAK,CAAC,IAC9B,IACT,EAAc,CAAK,IAEnB,EAAe,CAAK;CAExB,GACA;EAAC;EAAU;EAAe;CAAc,CAC1C;AACF"}
|
package/package.json
CHANGED