@multiplatform.one/backoffice 6.4.0 → 6.4.1
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/cjs/chrome/CommandPalette.cjs +20 -9
- package/dist/cjs/chrome/CommandPalette.native.js +18 -10
- package/dist/cjs/chrome/CommandPalette.native.js.map +1 -1
- package/dist/cjs/i18n/en.cjs +21 -0
- package/dist/cjs/i18n/en.native.js +21 -0
- package/dist/cjs/i18n/en.native.js.map +1 -1
- package/dist/cjs/index.cjs +49 -1
- package/dist/cjs/index.native.js +48 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/shared/types.cjs +18 -0
- package/dist/cjs/shared/types.native.js +21 -0
- package/dist/cjs/shared/types.native.js.map +1 -0
- package/dist/cjs/shared/useDocinfo.cjs +116 -0
- package/dist/cjs/shared/useDocinfo.native.js +167 -0
- package/dist/cjs/shared/useDocinfo.native.js.map +1 -0
- package/dist/cjs/shared/useDoctypeMeta.cjs +124 -0
- package/dist/cjs/shared/useDoctypeMeta.native.js +158 -0
- package/dist/cjs/shared/useDoctypeMeta.native.js.map +1 -0
- package/dist/cjs/shared/useRecentVisit.cjs +40 -0
- package/dist/cjs/shared/useRecentVisit.native.js +43 -0
- package/dist/cjs/shared/useRecentVisit.native.js.map +1 -0
- package/dist/cjs/shared/useSessionUserId.cjs +54 -0
- package/dist/cjs/shared/useSessionUserId.native.js +59 -0
- package/dist/cjs/shared/useSessionUserId.native.js.map +1 -0
- package/dist/cjs/shared/useSlugTarget.cjs +138 -0
- package/dist/cjs/shared/useSlugTarget.native.js +166 -0
- package/dist/cjs/shared/useSlugTarget.native.js.map +1 -0
- package/dist/cjs/shared/useUserRoles.cjs +72 -0
- package/dist/cjs/shared/useUserRoles.native.js +79 -0
- package/dist/cjs/shared/useUserRoles.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceChartBlock.cjs +136 -0
- package/dist/cjs/workspace/WorkspaceChartBlock.native.js +144 -0
- package/dist/cjs/workspace/WorkspaceChartBlock.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceGrid.cjs +91 -0
- package/dist/cjs/workspace/WorkspaceGrid.native.js +126 -0
- package/dist/cjs/workspace/WorkspaceGrid.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceLinkCard.cjs +139 -0
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js +155 -0
- package/dist/cjs/workspace/WorkspaceLinkCard.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceLinkDirectory.cjs +110 -0
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js +127 -0
- package/dist/cjs/workspace/WorkspaceLinkDirectory.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceNumberCard.cjs +133 -0
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js +138 -0
- package/dist/cjs/workspace/WorkspaceNumberCard.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceQuickList.cjs +112 -0
- package/dist/cjs/workspace/WorkspaceQuickList.native.js +130 -0
- package/dist/cjs/workspace/WorkspaceQuickList.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceRecents.cjs +116 -0
- package/dist/cjs/workspace/WorkspaceRecents.native.js +132 -0
- package/dist/cjs/workspace/WorkspaceRecents.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceScreen.cjs +291 -0
- package/dist/cjs/workspace/WorkspaceScreen.native.js +323 -0
- package/dist/cjs/workspace/WorkspaceScreen.native.js.map +1 -0
- package/dist/cjs/workspace/WorkspaceShortcut.cjs +185 -0
- package/dist/cjs/workspace/WorkspaceShortcut.native.js +202 -0
- package/dist/cjs/workspace/WorkspaceShortcut.native.js.map +1 -0
- package/dist/cjs/workspace/parseContent.cjs +180 -0
- package/dist/cjs/workspace/parseContent.native.js +299 -0
- package/dist/cjs/workspace/parseContent.native.js.map +1 -0
- package/dist/cjs/workspace/types.cjs +18 -0
- package/dist/cjs/workspace/types.native.js +21 -0
- package/dist/cjs/workspace/types.native.js.map +1 -0
- package/dist/cjs/workspace/useDashboardChart.cjs +96 -0
- package/dist/cjs/workspace/useDashboardChart.native.js +110 -0
- package/dist/cjs/workspace/useDashboardChart.native.js.map +1 -0
- package/dist/cjs/workspace/useWorkspaceDoc.cjs +103 -0
- package/dist/cjs/workspace/useWorkspaceDoc.native.js +120 -0
- package/dist/cjs/workspace/useWorkspaceDoc.native.js.map +1 -0
- package/dist/esm/chrome/CommandPalette.mjs +20 -9
- package/dist/esm/chrome/CommandPalette.mjs.map +1 -1
- package/dist/esm/chrome/CommandPalette.native.js +18 -10
- package/dist/esm/chrome/CommandPalette.native.js.map +1 -1
- package/dist/esm/i18n/en.mjs +21 -0
- package/dist/esm/i18n/en.mjs.map +1 -1
- package/dist/esm/i18n/en.native.js +21 -0
- package/dist/esm/i18n/en.native.js.map +1 -1
- package/dist/esm/index.mjs +19 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +19 -1
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/shared/types.mjs +2 -0
- package/dist/esm/shared/types.mjs.map +1 -0
- package/dist/esm/shared/types.native.js +2 -0
- package/dist/esm/shared/types.native.js.map +1 -0
- package/dist/esm/shared/useDocinfo.mjs +90 -0
- package/dist/esm/shared/useDocinfo.mjs.map +1 -0
- package/dist/esm/shared/useDocinfo.native.js +138 -0
- package/dist/esm/shared/useDocinfo.native.js.map +1 -0
- package/dist/esm/shared/useDoctypeMeta.mjs +99 -0
- package/dist/esm/shared/useDoctypeMeta.mjs.map +1 -0
- package/dist/esm/shared/useDoctypeMeta.native.js +130 -0
- package/dist/esm/shared/useDoctypeMeta.native.js.map +1 -0
- package/dist/esm/shared/useRecentVisit.mjs +15 -0
- package/dist/esm/shared/useRecentVisit.mjs.map +1 -0
- package/dist/esm/shared/useRecentVisit.native.js +15 -0
- package/dist/esm/shared/useRecentVisit.native.js.map +1 -0
- package/dist/esm/shared/useSessionUserId.mjs +29 -0
- package/dist/esm/shared/useSessionUserId.mjs.map +1 -0
- package/dist/esm/shared/useSessionUserId.native.js +31 -0
- package/dist/esm/shared/useSessionUserId.native.js.map +1 -0
- package/dist/esm/shared/useSlugTarget.mjs +113 -0
- package/dist/esm/shared/useSlugTarget.mjs.map +1 -0
- package/dist/esm/shared/useSlugTarget.native.js +138 -0
- package/dist/esm/shared/useSlugTarget.native.js.map +1 -0
- package/dist/esm/shared/useUserRoles.mjs +47 -0
- package/dist/esm/shared/useUserRoles.mjs.map +1 -0
- package/dist/esm/shared/useUserRoles.native.js +51 -0
- package/dist/esm/shared/useUserRoles.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceChartBlock.mjs +111 -0
- package/dist/esm/workspace/WorkspaceChartBlock.mjs.map +1 -0
- package/dist/esm/workspace/WorkspaceChartBlock.native.js +116 -0
- package/dist/esm/workspace/WorkspaceChartBlock.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceGrid.mjs +66 -0
- package/dist/esm/workspace/WorkspaceGrid.mjs.map +1 -0
- package/dist/esm/workspace/WorkspaceGrid.native.js +98 -0
- package/dist/esm/workspace/WorkspaceGrid.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceLinkCard.mjs +113 -0
- package/dist/esm/workspace/WorkspaceLinkCard.mjs.map +1 -0
- package/dist/esm/workspace/WorkspaceLinkCard.native.js +126 -0
- package/dist/esm/workspace/WorkspaceLinkCard.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceLinkDirectory.mjs +84 -0
- package/dist/esm/workspace/WorkspaceLinkDirectory.mjs.map +1 -0
- package/dist/esm/workspace/WorkspaceLinkDirectory.native.js +98 -0
- package/dist/esm/workspace/WorkspaceLinkDirectory.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceNumberCard.mjs +108 -0
- package/dist/esm/workspace/WorkspaceNumberCard.mjs.map +1 -0
- package/dist/esm/workspace/WorkspaceNumberCard.native.js +110 -0
- package/dist/esm/workspace/WorkspaceNumberCard.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceQuickList.mjs +87 -0
- package/dist/esm/workspace/WorkspaceQuickList.mjs.map +1 -0
- package/dist/esm/workspace/WorkspaceQuickList.native.js +102 -0
- package/dist/esm/workspace/WorkspaceQuickList.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceRecents.mjs +91 -0
- package/dist/esm/workspace/WorkspaceRecents.mjs.map +1 -0
- package/dist/esm/workspace/WorkspaceRecents.native.js +104 -0
- package/dist/esm/workspace/WorkspaceRecents.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceScreen.mjs +266 -0
- package/dist/esm/workspace/WorkspaceScreen.mjs.map +1 -0
- package/dist/esm/workspace/WorkspaceScreen.native.js +295 -0
- package/dist/esm/workspace/WorkspaceScreen.native.js.map +1 -0
- package/dist/esm/workspace/WorkspaceShortcut.mjs +159 -0
- package/dist/esm/workspace/WorkspaceShortcut.mjs.map +1 -0
- package/dist/esm/workspace/WorkspaceShortcut.native.js +173 -0
- package/dist/esm/workspace/WorkspaceShortcut.native.js.map +1 -0
- package/dist/esm/workspace/parseContent.mjs +148 -0
- package/dist/esm/workspace/parseContent.mjs.map +1 -0
- package/dist/esm/workspace/parseContent.native.js +264 -0
- package/dist/esm/workspace/parseContent.native.js.map +1 -0
- package/dist/esm/workspace/types.mjs +2 -0
- package/dist/esm/workspace/types.mjs.map +1 -0
- package/dist/esm/workspace/types.native.js +2 -0
- package/dist/esm/workspace/types.native.js.map +1 -0
- package/dist/esm/workspace/useDashboardChart.mjs +71 -0
- package/dist/esm/workspace/useDashboardChart.mjs.map +1 -0
- package/dist/esm/workspace/useDashboardChart.native.js +82 -0
- package/dist/esm/workspace/useDashboardChart.native.js.map +1 -0
- package/dist/esm/workspace/useWorkspaceDoc.mjs +77 -0
- package/dist/esm/workspace/useWorkspaceDoc.mjs.map +1 -0
- package/dist/esm/workspace/useWorkspaceDoc.native.js +91 -0
- package/dist/esm/workspace/useWorkspaceDoc.native.js.map +1 -0
- package/dist/jsx/chrome/CommandPalette.mjs +20 -9
- package/dist/jsx/chrome/CommandPalette.mjs.map +1 -1
- package/dist/jsx/chrome/CommandPalette.native.js +18 -10
- package/dist/jsx/chrome/CommandPalette.native.js.map +1 -1
- package/dist/jsx/i18n/en.mjs +21 -0
- package/dist/jsx/i18n/en.mjs.map +1 -1
- package/dist/jsx/i18n/en.native.js +21 -0
- package/dist/jsx/i18n/en.native.js.map +1 -1
- package/dist/jsx/index.js +19 -1
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +19 -1
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +48 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/shared/types.mjs +2 -0
- package/dist/jsx/shared/types.mjs.map +1 -0
- package/dist/jsx/shared/types.native.js +21 -0
- package/dist/jsx/shared/types.native.js.map +1 -0
- package/dist/jsx/shared/useDocinfo.mjs +90 -0
- package/dist/jsx/shared/useDocinfo.mjs.map +1 -0
- package/dist/jsx/shared/useDocinfo.native.js +167 -0
- package/dist/jsx/shared/useDocinfo.native.js.map +1 -0
- package/dist/jsx/shared/useDoctypeMeta.mjs +99 -0
- package/dist/jsx/shared/useDoctypeMeta.mjs.map +1 -0
- package/dist/jsx/shared/useDoctypeMeta.native.js +158 -0
- package/dist/jsx/shared/useDoctypeMeta.native.js.map +1 -0
- package/dist/jsx/shared/useRecentVisit.mjs +15 -0
- package/dist/jsx/shared/useRecentVisit.mjs.map +1 -0
- package/dist/jsx/shared/useRecentVisit.native.js +43 -0
- package/dist/jsx/shared/useRecentVisit.native.js.map +1 -0
- package/dist/jsx/shared/useSessionUserId.mjs +29 -0
- package/dist/jsx/shared/useSessionUserId.mjs.map +1 -0
- package/dist/jsx/shared/useSessionUserId.native.js +59 -0
- package/dist/jsx/shared/useSessionUserId.native.js.map +1 -0
- package/dist/jsx/shared/useSlugTarget.mjs +113 -0
- package/dist/jsx/shared/useSlugTarget.mjs.map +1 -0
- package/dist/jsx/shared/useSlugTarget.native.js +166 -0
- package/dist/jsx/shared/useSlugTarget.native.js.map +1 -0
- package/dist/jsx/shared/useUserRoles.mjs +47 -0
- package/dist/jsx/shared/useUserRoles.mjs.map +1 -0
- package/dist/jsx/shared/useUserRoles.native.js +79 -0
- package/dist/jsx/shared/useUserRoles.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceChartBlock.mjs +111 -0
- package/dist/jsx/workspace/WorkspaceChartBlock.mjs.map +1 -0
- package/dist/jsx/workspace/WorkspaceChartBlock.native.js +144 -0
- package/dist/jsx/workspace/WorkspaceChartBlock.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceGrid.mjs +66 -0
- package/dist/jsx/workspace/WorkspaceGrid.mjs.map +1 -0
- package/dist/jsx/workspace/WorkspaceGrid.native.js +126 -0
- package/dist/jsx/workspace/WorkspaceGrid.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceLinkCard.mjs +113 -0
- package/dist/jsx/workspace/WorkspaceLinkCard.mjs.map +1 -0
- package/dist/jsx/workspace/WorkspaceLinkCard.native.js +155 -0
- package/dist/jsx/workspace/WorkspaceLinkCard.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceLinkDirectory.mjs +84 -0
- package/dist/jsx/workspace/WorkspaceLinkDirectory.mjs.map +1 -0
- package/dist/jsx/workspace/WorkspaceLinkDirectory.native.js +127 -0
- package/dist/jsx/workspace/WorkspaceLinkDirectory.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceNumberCard.mjs +108 -0
- package/dist/jsx/workspace/WorkspaceNumberCard.mjs.map +1 -0
- package/dist/jsx/workspace/WorkspaceNumberCard.native.js +138 -0
- package/dist/jsx/workspace/WorkspaceNumberCard.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceQuickList.mjs +87 -0
- package/dist/jsx/workspace/WorkspaceQuickList.mjs.map +1 -0
- package/dist/jsx/workspace/WorkspaceQuickList.native.js +130 -0
- package/dist/jsx/workspace/WorkspaceQuickList.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceRecents.mjs +91 -0
- package/dist/jsx/workspace/WorkspaceRecents.mjs.map +1 -0
- package/dist/jsx/workspace/WorkspaceRecents.native.js +132 -0
- package/dist/jsx/workspace/WorkspaceRecents.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceScreen.mjs +266 -0
- package/dist/jsx/workspace/WorkspaceScreen.mjs.map +1 -0
- package/dist/jsx/workspace/WorkspaceScreen.native.js +323 -0
- package/dist/jsx/workspace/WorkspaceScreen.native.js.map +1 -0
- package/dist/jsx/workspace/WorkspaceShortcut.mjs +159 -0
- package/dist/jsx/workspace/WorkspaceShortcut.mjs.map +1 -0
- package/dist/jsx/workspace/WorkspaceShortcut.native.js +202 -0
- package/dist/jsx/workspace/WorkspaceShortcut.native.js.map +1 -0
- package/dist/jsx/workspace/parseContent.mjs +148 -0
- package/dist/jsx/workspace/parseContent.mjs.map +1 -0
- package/dist/jsx/workspace/parseContent.native.js +299 -0
- package/dist/jsx/workspace/parseContent.native.js.map +1 -0
- package/dist/jsx/workspace/types.mjs +2 -0
- package/dist/jsx/workspace/types.mjs.map +1 -0
- package/dist/jsx/workspace/types.native.js +21 -0
- package/dist/jsx/workspace/types.native.js.map +1 -0
- package/dist/jsx/workspace/useDashboardChart.mjs +71 -0
- package/dist/jsx/workspace/useDashboardChart.mjs.map +1 -0
- package/dist/jsx/workspace/useDashboardChart.native.js +110 -0
- package/dist/jsx/workspace/useDashboardChart.native.js.map +1 -0
- package/dist/jsx/workspace/useWorkspaceDoc.mjs +77 -0
- package/dist/jsx/workspace/useWorkspaceDoc.mjs.map +1 -0
- package/dist/jsx/workspace/useWorkspaceDoc.native.js +120 -0
- package/dist/jsx/workspace/useWorkspaceDoc.native.js.map +1 -0
- package/package.json +12 -12
- package/src/chrome/CommandPalette.tsx +35 -15
- package/src/i18n/en.ts +21 -0
- package/src/index.ts +69 -0
- package/src/shared/types.ts +14 -0
- package/src/shared/useDocinfo.ts +163 -0
- package/src/shared/useDoctypeMeta.ts +243 -0
- package/src/shared/useRecentVisit.ts +33 -0
- package/src/shared/useSessionUserId.ts +42 -0
- package/src/shared/useSlugTarget.ts +143 -0
- package/src/shared/useUserRoles.ts +66 -0
- package/src/workspace/WorkspaceChartBlock.tsx +115 -0
- package/src/workspace/WorkspaceGrid.tsx +82 -0
- package/src/workspace/WorkspaceLinkCard.tsx +134 -0
- package/src/workspace/WorkspaceLinkDirectory.tsx +126 -0
- package/src/workspace/WorkspaceNumberCard.tsx +126 -0
- package/src/workspace/WorkspaceQuickList.tsx +100 -0
- package/src/workspace/WorkspaceRecents.tsx +100 -0
- package/src/workspace/WorkspaceScreen.tsx +322 -0
- package/src/workspace/WorkspaceShortcut.tsx +223 -0
- package/src/workspace/parseContent.spec.ts +327 -0
- package/src/workspace/parseContent.ts +240 -0
- package/src/workspace/types.ts +135 -0
- package/src/workspace/useDashboardChart.ts +115 -0
- package/src/workspace/useWorkspaceDoc.ts +111 -0
- package/types/chrome/CommandPalette.d.ts.map +1 -1
- package/types/i18n/en.d.ts +19 -0
- package/types/i18n/en.d.ts.map +1 -1
- package/types/index.d.ts +34 -0
- package/types/index.d.ts.map +1 -1
- package/types/shared/types.d.ts +21 -0
- package/types/shared/types.d.ts.map +1 -0
- package/types/shared/useDocinfo.d.ts +61 -0
- package/types/shared/useDocinfo.d.ts.map +1 -0
- package/types/shared/useDoctypeMeta.d.ts +118 -0
- package/types/shared/useDoctypeMeta.d.ts.map +1 -0
- package/types/shared/useRecentVisit.d.ts +10 -0
- package/types/shared/useRecentVisit.d.ts.map +1 -0
- package/types/shared/useSessionUserId.d.ts +6 -0
- package/types/shared/useSessionUserId.d.ts.map +1 -0
- package/types/shared/useSlugTarget.d.ts +18 -0
- package/types/shared/useSlugTarget.d.ts.map +1 -0
- package/types/shared/useUserRoles.d.ts +15 -0
- package/types/shared/useUserRoles.d.ts.map +1 -0
- package/types/workspace/WorkspaceChartBlock.d.ts +6 -0
- package/types/workspace/WorkspaceChartBlock.d.ts.map +1 -0
- package/types/workspace/WorkspaceGrid.d.ts +23 -0
- package/types/workspace/WorkspaceGrid.d.ts.map +1 -0
- package/types/workspace/WorkspaceLinkCard.d.ts +20 -0
- package/types/workspace/WorkspaceLinkCard.d.ts.map +1 -0
- package/types/workspace/WorkspaceLinkDirectory.d.ts +19 -0
- package/types/workspace/WorkspaceLinkDirectory.d.ts.map +1 -0
- package/types/workspace/WorkspaceNumberCard.d.ts +19 -0
- package/types/workspace/WorkspaceNumberCard.d.ts.map +1 -0
- package/types/workspace/WorkspaceQuickList.d.ts +6 -0
- package/types/workspace/WorkspaceQuickList.d.ts.map +1 -0
- package/types/workspace/WorkspaceRecents.d.ts +2 -0
- package/types/workspace/WorkspaceRecents.d.ts.map +1 -0
- package/types/workspace/WorkspaceScreen.d.ts +24 -0
- package/types/workspace/WorkspaceScreen.d.ts.map +1 -0
- package/types/workspace/WorkspaceShortcut.d.ts +27 -0
- package/types/workspace/WorkspaceShortcut.d.ts.map +1 -0
- package/types/workspace/parseContent.d.ts +77 -0
- package/types/workspace/parseContent.d.ts.map +1 -0
- package/types/workspace/types.d.ts +112 -0
- package/types/workspace/types.d.ts.map +1 -0
- package/types/workspace/useDashboardChart.d.ts +29 -0
- package/types/workspace/useDashboardChart.d.ts.map +1 -0
- package/types/workspace/useWorkspaceDoc.d.ts +18 -0
- package/types/workspace/useWorkspaceDoc.d.ts.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDoctypeMeta.d.ts","sourceRoot":"","sources":["../../src/shared/useDoctypeMeta.ts"],"names":[],"mappings":"AAWA,qFAAqF;AACrF,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACb,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACf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CACxC;AAmCD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG;IAChD,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAgFA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface RecentVisit {
|
|
2
|
+
label: string;
|
|
3
|
+
path: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Record a visit in the shared recents store. Pass `undefined` to skip
|
|
7
|
+
* (create mode, fixture/story mode). Dedup/cap is owned by `addToRecent`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useRecentVisit(visit: RecentVisit | undefined): void;
|
|
10
|
+
//# sourceMappingURL=useRecentVisit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRecentVisit.d.ts","sourceRoot":"","sources":["../../src/shared/useRecentVisit.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAOnE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The logged-in user's id (`frappe.auth.get_logged_user`), or undefined
|
|
3
|
+
* while loading / in fixture mode (no session exists against fixtures).
|
|
4
|
+
*/
|
|
5
|
+
export declare function useSessionUserId(): string | undefined;
|
|
6
|
+
//# sourceMappingURL=useSessionUserId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSessionUserId.d.ts","sourceRoot":"","sources":["../../src/shared/useSessionUserId.ts"],"names":[],"mappings":"AASA;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CA4BrD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SlugTarget } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve a URL slug ("sales-order") to its target:
|
|
4
|
+
* - a Workspace whose slugged name matches → workspace page (workspaces win)
|
|
5
|
+
* - otherwise a DocType whose slugged name matches → doctype list
|
|
6
|
+
* - otherwise not-found
|
|
7
|
+
*
|
|
8
|
+
* The Workspace + DocType name indexes are fetched once per session (module
|
|
9
|
+
* cache) via the frappe client, honoring FrappeProvider fixtures in stories
|
|
10
|
+
* and tests. Connection comes exclusively from the ambient FrappeProvider
|
|
11
|
+
* (mounted by BackofficeProvider); without one the hook degrades the same
|
|
12
|
+
* way a failed fetch does. SSR-safe: the fetch runs in an effect, so the
|
|
13
|
+
* server render (and first client paint) reports `loading`. If the fetch
|
|
14
|
+
* fails the hook degrades gracefully by treating the slug as a title-cased
|
|
15
|
+
* doctype.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useSlugTarget(slug: string | undefined): SlugTarget;
|
|
18
|
+
//# sourceMappingURL=useSlugTarget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSlugTarget.d.ts","sourceRoot":"","sources":["../../src/shared/useSlugTarget.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAyE1C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAgDlE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session user's role list — the client-side half of desk's
|
|
3
|
+
* `frappe.user_roles` (bootinfo). Fetched once per session via the
|
|
4
|
+
* whitelisted `frappe.core.doctype.user.user.get_roles` RPC (probed:
|
|
5
|
+
* `?uid=<user>` → `{"message": ["Role", ...]}`), keyed off
|
|
6
|
+
* `frappe.auth.get_logged_user`.
|
|
7
|
+
*
|
|
8
|
+
* `roles` stays undefined while loading, in fixture mode, or when the RPC
|
|
9
|
+
* fails — consumers (permlevel matrix) fall back to the conservative
|
|
10
|
+
* "permlevel > 0 → read-only" rule in that case.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useUserRoles(): {
|
|
13
|
+
roles?: string[];
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useUserRoles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUserRoles.d.ts","sourceRoot":"","sources":["../../src/shared/useUserRoles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,wBAAgB,YAAY,IAAI;IAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CA+CnD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WorkspaceChartRow } from "./types";
|
|
2
|
+
export interface WorkspaceChartBlockProps {
|
|
3
|
+
row: WorkspaceChartRow;
|
|
4
|
+
}
|
|
5
|
+
export declare function WorkspaceChartBlock({ row }: WorkspaceChartBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=WorkspaceChartBlock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceChartBlock.d.ts","sourceRoot":"","sources":["../../src/workspace/WorkspaceChartBlock.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAkBjD,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,iBAAiB,CAAC;CACxB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,GAAG,EAAE,EAAE,wBAAwB,2CA4EpE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 12-column workspace grid — desk parity for the editorjs block layout.
|
|
3
|
+
*
|
|
4
|
+
* Blocks carry a `col` span (3 = shortcut, 4 = card, 12 = full row).
|
|
5
|
+
* Consecutive blocks accumulate into rows of up to 12 columns and each row
|
|
6
|
+
* lays out with flex ratios, so no pixel math is needed. The container
|
|
7
|
+
* measures itself with `onLayout` (cross-platform — no media queries, no
|
|
8
|
+
* DOM) and collapses spans on narrow widths: everything full-width on
|
|
9
|
+
* phones, two-up on mid widths, desk's ~3–4 column layout when wide.
|
|
10
|
+
*/
|
|
11
|
+
import { type YStackProps } from "@multiplatform.one/components";
|
|
12
|
+
import { type ReactNode } from "react";
|
|
13
|
+
export interface WorkspaceGridItem {
|
|
14
|
+
key: string;
|
|
15
|
+
/** 12-column span requested by the block (defaults to 12). */
|
|
16
|
+
col?: number;
|
|
17
|
+
node: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export interface WorkspaceGridProps extends YStackProps {
|
|
20
|
+
items: WorkspaceGridItem[];
|
|
21
|
+
}
|
|
22
|
+
export declare function WorkspaceGrid({ items, ...stackProps }: WorkspaceGridProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=WorkspaceGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceGrid.d.ts","sourceRoot":"","sources":["../../src/workspace/WorkspaceGrid.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOjD,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;CACjB;AAUD,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC5B;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,EAAE,kBAAkB,2CA2CzE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type BackofficePaths } from "../navigation/paths";
|
|
2
|
+
import type { WorkspaceLinkGroup, WorkspaceLinkRow } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Resolve a Workspace Link row to a router path (basePath-aware when the
|
|
5
|
+
* provider's `paths` are passed; defaults to the canonical "/backoffice").
|
|
6
|
+
* - DocType → paths.list(link_to)
|
|
7
|
+
* - Report → paths.list(link_to) fallback (no query-report route yet — the
|
|
8
|
+
* slug router decides; documented gap)
|
|
9
|
+
* - Page → `{base}/<link_to>` (page names are already slugs)
|
|
10
|
+
* - anything else → disabled
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveLinkTarget(row: WorkspaceLinkRow, paths?: BackofficePaths): {
|
|
13
|
+
path?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export interface WorkspaceLinkCardProps {
|
|
17
|
+
group: WorkspaceLinkGroup;
|
|
18
|
+
}
|
|
19
|
+
export declare function WorkspaceLinkCard({ group }: WorkspaceLinkCardProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
//# sourceMappingURL=WorkspaceLinkCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceLinkCard.d.ts","sourceRoot":"","sources":["../../src/workspace/WorkspaceLinkCard.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIpE;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,gBAAgB,EACrB,KAAK,GAAE,eAA8B,GACpC;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAcA;AAgCD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,sBAAsB,2CA0ClE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WorkspaceLinkGroup } from "./types";
|
|
2
|
+
export interface WorkspaceLinkDirectoryItem {
|
|
3
|
+
/** Stable key from the authored card block. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Authored 12-column span (defaults to 4, desk's card width). */
|
|
6
|
+
col?: number;
|
|
7
|
+
group: WorkspaceLinkGroup;
|
|
8
|
+
}
|
|
9
|
+
export interface WorkspaceLinkDirectoryProps {
|
|
10
|
+
items: WorkspaceLinkDirectoryItem[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Case-insensitive filter over a link group: a match on the group label
|
|
14
|
+
* keeps the whole card; otherwise the card narrows to its matching links
|
|
15
|
+
* (and disappears when none match).
|
|
16
|
+
*/
|
|
17
|
+
export declare function filterLinkGroup(group: WorkspaceLinkGroup, query: string): WorkspaceLinkGroup | undefined;
|
|
18
|
+
export declare function WorkspaceLinkDirectory({ items }: WorkspaceLinkDirectoryProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=WorkspaceLinkDirectory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceLinkDirectory.d.ts","sourceRoot":"","sources":["../../src/workspace/WorkspaceLinkDirectory.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAIlD,MAAM,WAAW,0BAA0B;IACzC,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,kBAAkB,CAAC;CAC3B;AAED,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,0BAA0B,EAAE,CAAC;CACrC;AAID;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,kBAAkB,EACzB,KAAK,EAAE,MAAM,GACZ,kBAAkB,GAAG,SAAS,CAMhC;AAED,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,2BAA2B,2CA8E5E"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WorkspaceNumberCardRow } from "./types";
|
|
2
|
+
export interface NumberCardDoc {
|
|
3
|
+
name: string;
|
|
4
|
+
doctype: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
/** "Document Type" | "Report" | "Custom" */
|
|
7
|
+
type?: string;
|
|
8
|
+
document_type?: string;
|
|
9
|
+
/** "Count" | "Sum" | "Average" | "Minimum" | "Maximum" */
|
|
10
|
+
function?: string;
|
|
11
|
+
aggregate_function_based_on?: string;
|
|
12
|
+
filters_json?: string;
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface WorkspaceNumberCardProps {
|
|
16
|
+
row: WorkspaceNumberCardRow;
|
|
17
|
+
}
|
|
18
|
+
export declare function WorkspaceNumberCard({ row }: WorkspaceNumberCardProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=WorkspaceNumberCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceNumberCard.d.ts","sourceRoot":"","sources":["../../src/workspace/WorkspaceNumberCard.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAGtD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAUD,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,sBAAsB,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,GAAG,EAAE,EAAE,wBAAwB,2CA0EpE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WorkspaceQuickListRow } from "./types";
|
|
2
|
+
export interface WorkspaceQuickListProps {
|
|
3
|
+
row: WorkspaceQuickListRow;
|
|
4
|
+
}
|
|
5
|
+
export declare function WorkspaceQuickList({ row }: WorkspaceQuickListProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=WorkspaceQuickList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceQuickList.d.ts","sourceRoot":"","sources":["../../src/workspace/WorkspaceQuickList.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAcrD,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,qBAAqB,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAAC,EAAE,GAAG,EAAE,EAAE,uBAAuB,2CAkElE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceRecents.d.ts","sourceRoot":"","sources":["../../src/workspace/WorkspaceRecents.tsx"],"names":[],"mappings":"AAyBA,wBAAgB,gBAAgB,mDA0E/B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { WorkspaceBlock, WorkspaceDoc, WorkspaceShortcutRow } from "./types";
|
|
3
|
+
/** Block classes a host can hide from the workspace composition. */
|
|
4
|
+
export type WorkspaceBlockKind = "shortcuts" | "links" | "charts" | "numbers" | "quickLists" | "recents";
|
|
5
|
+
export interface WorkspaceScreenProps {
|
|
6
|
+
/** Workspace document name (proper case, e.g. "Home", "Users") */
|
|
7
|
+
workspace: string;
|
|
8
|
+
/** Hide whole block classes from the composition. */
|
|
9
|
+
hiddenBlocks?: readonly WorkspaceBlockKind[];
|
|
10
|
+
/** Override the default shortcut-chip navigation. */
|
|
11
|
+
onShortcutPress?: (row: WorkspaceShortcutRow) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Replace the rendering of individual grid blocks (data widgets and
|
|
14
|
+
* narrative text). Shortcut chips and link cards have their own
|
|
15
|
+
* composition and are controlled via `hiddenBlocks`/`onShortcutPress`.
|
|
16
|
+
*/
|
|
17
|
+
renderBlock?: (context: {
|
|
18
|
+
block: WorkspaceBlock;
|
|
19
|
+
doc: WorkspaceDoc;
|
|
20
|
+
defaultContent: ReactNode;
|
|
21
|
+
}) => ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function WorkspaceScreen({ workspace, hiddenBlocks, onShortcutPress, renderBlock, }: WorkspaceScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=WorkspaceScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceScreen.d.ts","sourceRoot":"","sources":["../../src/workspace/WorkspaceScreen.tsx"],"names":[],"mappings":"AAkCA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAYhD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAUlF,oEAAoE;AACpE,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,OAAO,GACP,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,SAAS,CAAC;AAEd,MAAM,WAAW,oBAAoB;IACnC,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,YAAY,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC7C,qDAAqD;IACrD,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACtD;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE;QACtB,KAAK,EAAE,cAAc,CAAC;QACtB,GAAG,EAAE,YAAY,CAAC;QAClB,cAAc,EAAE,SAAS,CAAC;KAC3B,KAAK,SAAS,CAAC;CACjB;AAkJD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,GACZ,EAAE,oBAAoB,2CAwFtB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type BackofficePaths } from "../navigation/paths";
|
|
2
|
+
import type { WorkspaceShortcutRow } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Resolve a shortcut press to a router path (or an external URL) —
|
|
5
|
+
* basePath-aware when the provider's `paths` are passed; defaults to the
|
|
6
|
+
* canonical "/backoffice".
|
|
7
|
+
*
|
|
8
|
+
* - DocType → paths.list(link_to)
|
|
9
|
+
* - Report → paths.list(link_to): there is no query-report route yet, so the
|
|
10
|
+
* report slug goes through the runtime slug resolver (documented gap).
|
|
11
|
+
* - Page → `{base}/<link_to>` (frappe page names are already slugs,
|
|
12
|
+
* e.g. "permission-manager"); resolution is up to the slug router.
|
|
13
|
+
* - Dashboard → no dashboard-view route yet → disabled (documented gap).
|
|
14
|
+
* - URL → external, opened through the platform openUrl.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveShortcutTarget(row: WorkspaceShortcutRow, paths?: BackofficePaths): {
|
|
17
|
+
path?: string;
|
|
18
|
+
externalUrl?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export interface WorkspaceShortcutProps {
|
|
22
|
+
row: WorkspaceShortcutRow;
|
|
23
|
+
/** Override the default navigation/open behavior for this chip. */
|
|
24
|
+
onPress?: (row: WorkspaceShortcutRow) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function WorkspaceShortcut({ row, onPress }: WorkspaceShortcutProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
//# sourceMappingURL=WorkspaceShortcut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WorkspaceShortcut.d.ts","sourceRoot":"","sources":["../../src/workspace/WorkspaceShortcut.tsx"],"names":[],"mappings":"AA6CA,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAElF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAIpD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,oBAAoB,EACzB,KAAK,GAAE,eAA8B,GACpC;IACD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAgBA;AAED,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,oBAAoB,CAAC;IAC1B,mEAAmE;IACnE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC/C;AAWD,wBAAgB,iBAAiB,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,sBAAsB,kDAsHzE"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure parsing helpers for the Workspace `content` block JSON and the
|
|
3
|
+
* JSON filter strings carried by shortcuts / quick lists / number cards.
|
|
4
|
+
* No DOM: HTML in header/paragraph blocks is stripped with a regex-based
|
|
5
|
+
* text extractor so this runs on native and gjs too.
|
|
6
|
+
*/
|
|
7
|
+
import type { FrappeFilterTuple, WorkspaceBlock, WorkspaceDoc, WorkspaceLinkGroup, WorkspaceLinkRow } from "./types";
|
|
8
|
+
/** Parse the workspace `content` JSON string into blocks (bad JSON → []). */
|
|
9
|
+
export declare function parseWorkspaceContent(content: string | undefined | null): WorkspaceBlock[];
|
|
10
|
+
/**
|
|
11
|
+
* Extract plain text from desk's rich-text wrappers, e.g.
|
|
12
|
+
* `<span class="h4"><b>Reports & Masters</b></span>` → "Reports & Masters".
|
|
13
|
+
*/
|
|
14
|
+
export declare function stripHtml(html: string | undefined | null): string;
|
|
15
|
+
/**
|
|
16
|
+
* Heading level from a desk header block's HTML wrapper: `class="h4"` →
|
|
17
|
+
* 4. Desk also emits raw font-size styles (Build workspace uses
|
|
18
|
+
* `font-size: 18px`); those and unclassed headers fall back to 4 — the
|
|
19
|
+
* visual scale desk uses for workspace section headings.
|
|
20
|
+
*/
|
|
21
|
+
export declare function headerLevel(html: string | undefined | null): 1 | 2 | 3 | 4 | 5 | 6;
|
|
22
|
+
/**
|
|
23
|
+
* Group the flat `links` child table into cards: each "Card Break" row
|
|
24
|
+
* opens a group that collects the following "Link" rows (hidden rows are
|
|
25
|
+
* dropped). Link rows before any Card Break are ignored — desk does the
|
|
26
|
+
* same (they are unreachable from card blocks).
|
|
27
|
+
*/
|
|
28
|
+
export declare function groupLinks(links: WorkspaceLinkRow[] | undefined): WorkspaceLinkGroup[];
|
|
29
|
+
/**
|
|
30
|
+
* Normalize a frappe JSON filter string to `[field, op, value]` triples.
|
|
31
|
+
* Real-world shapes (all seen on the control bench):
|
|
32
|
+
* - dict: `{"status":"Open"}` → `[["status","=","Open"]]`
|
|
33
|
+
* - dict of tuples: `{"status":["=","Open"]}` → `[["status","=","Open"]]`
|
|
34
|
+
* - list of triples: `[["enabled","=",1]]` → as-is
|
|
35
|
+
* - list of quads (doctype-prefixed, Number Card `filters_json`):
|
|
36
|
+
* `[["User","enabled","=",1]]` → doctype element stripped.
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseFrappeFilters(raw: string | undefined | null): FrappeFilterTuple[] | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Workspace blocks partitioned by class for the dashboard-first layout:
|
|
41
|
+
* data widgets render first, then shortcuts, then the link-card directory.
|
|
42
|
+
*/
|
|
43
|
+
export interface WorkspaceComposition {
|
|
44
|
+
/**
|
|
45
|
+
* Live data widgets, ordered number cards → charts → quick lists
|
|
46
|
+
* (authored order within each class).
|
|
47
|
+
*/
|
|
48
|
+
data: WorkspaceBlock[];
|
|
49
|
+
/** Shortcut blocks in authored order. */
|
|
50
|
+
shortcuts: WorkspaceBlock[];
|
|
51
|
+
/** Link-card blocks in authored order. */
|
|
52
|
+
cards: WorkspaceBlock[];
|
|
53
|
+
/**
|
|
54
|
+
* Narrative content in authored order: paragraphs, plus headers that do
|
|
55
|
+
* NOT label a widget run (see keep rule below). Section-label headers
|
|
56
|
+
* ("Your Shortcuts", "Reports & Masters") are dropped — the recomposed
|
|
57
|
+
* sections carry their own canonical headings.
|
|
58
|
+
*/
|
|
59
|
+
text: WorkspaceBlock[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Partition parsed content blocks for the dashboard-first workspace layout
|
|
63
|
+
* (data → shortcuts → link cards), instead of desk's authoring order.
|
|
64
|
+
*
|
|
65
|
+
* Header keep rule: a header labels the blocks that follow it up to the next
|
|
66
|
+
* header. If that run contains any widget block (shortcut, card, chart,
|
|
67
|
+
* number card, quick list, onboarding, custom block), the header is a section
|
|
68
|
+
* label and is dropped; if the run holds only paragraphs (or nothing — e.g.
|
|
69
|
+
* the text-only "Welcome Workspace"), the header is real content and is kept.
|
|
70
|
+
* Spacers are dropped — section spacing owns the rhythm.
|
|
71
|
+
*/
|
|
72
|
+
export declare function composeWorkspaceBlocks(blocks: WorkspaceBlock[]): WorkspaceComposition;
|
|
73
|
+
/** Find a workspace shortcut row by a shortcut block's `shortcut_name`. */
|
|
74
|
+
export declare function findShortcut(doc: WorkspaceDoc, shortcutName: string | undefined): import("./types").WorkspaceShortcutRow | undefined;
|
|
75
|
+
/** Find a link group by a card block's `card_name`. */
|
|
76
|
+
export declare function findLinkGroup(groups: WorkspaceLinkGroup[], cardName: string | undefined): WorkspaceLinkGroup | undefined;
|
|
77
|
+
//# sourceMappingURL=parseContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseContent.d.ts","sourceRoot":"","sources":["../../src/workspace/parseContent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB,6EAA6E;AAC7E,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,cAAc,EAAE,CAY1F;AAWD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAgBjE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAIlF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,SAAS,GAAG,kBAAkB,EAAE,CAkBtF;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAC7B,iBAAiB,EAAE,GAAG,SAAS,CAiCjC;AAMD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,yCAAyC;IACzC,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,0CAA0C;IAC1C,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB;;;;;OAKG;IACH,IAAI,EAAE,cAAc,EAAE,CAAC;CACxB;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,oBAAoB,CAuCrF;AAED,2EAA2E;AAC3E,wBAAgB,YAAY,CAAC,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,sDAG/E;AAED,uDAAuD;AACvD,wBAAgB,aAAa,CAAC,MAAM,EAAE,kBAAkB,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,kCAGvF"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frappe Workspace doc shapes — verified against a real bench
|
|
3
|
+
* (`GET /api/resource/Workspace/<name>`; see WorkspaceScreen for the
|
|
4
|
+
* rendering contract). `content` is an editorjs-style JSON string of
|
|
5
|
+
* blocks; the child tables hold the referenced widget definitions.
|
|
6
|
+
*/
|
|
7
|
+
/** One row of the `shortcuts` child table (doctype "Workspace Shortcut"). */
|
|
8
|
+
export interface WorkspaceShortcutRow {
|
|
9
|
+
name: string;
|
|
10
|
+
/** "DocType" | "Report" | "Page" | "Dashboard" | "URL" */
|
|
11
|
+
type: string;
|
|
12
|
+
link_to?: string;
|
|
13
|
+
/** URL shortcuts put the target here. */
|
|
14
|
+
url?: string;
|
|
15
|
+
label: string;
|
|
16
|
+
/** Optional list-view variant, e.g. "List" | "Tree" | "Report Builder". */
|
|
17
|
+
doc_view?: string;
|
|
18
|
+
/** Frappe color name for the count pill, e.g. "Grey", "Blue". */
|
|
19
|
+
color?: string;
|
|
20
|
+
/** JSON filters for the live count, e.g. `{"status":"Open"}`. */
|
|
21
|
+
stats_filter?: string;
|
|
22
|
+
/** Count display template, `{}` is the count, e.g. `"{} Open"`. */
|
|
23
|
+
format?: string;
|
|
24
|
+
}
|
|
25
|
+
/** One row of the `links` child table (doctype "Workspace Link"). */
|
|
26
|
+
export interface WorkspaceLinkRow {
|
|
27
|
+
name: string;
|
|
28
|
+
/** "Card Break" starts a link group; "Link" is a member of the group. */
|
|
29
|
+
type: "Card Break" | "Link" | string;
|
|
30
|
+
label: string;
|
|
31
|
+
/** "DocType" | "Report" | "Page" — only on type "Link". */
|
|
32
|
+
link_type?: string;
|
|
33
|
+
link_to?: string;
|
|
34
|
+
hidden?: number;
|
|
35
|
+
onboard?: number;
|
|
36
|
+
is_query_report?: number;
|
|
37
|
+
/** On Card Break rows: number of links desk shows before "+ N more". */
|
|
38
|
+
link_count?: number;
|
|
39
|
+
dependencies?: string;
|
|
40
|
+
}
|
|
41
|
+
/** One row of the `charts` child table (doctype "Workspace Chart"). */
|
|
42
|
+
export interface WorkspaceChartRow {
|
|
43
|
+
name: string;
|
|
44
|
+
/** Dashboard Chart doc name. */
|
|
45
|
+
chart_name: string;
|
|
46
|
+
label?: string;
|
|
47
|
+
}
|
|
48
|
+
/** One row of the `number_cards` child table (doctype "Workspace Number Card"). */
|
|
49
|
+
export interface WorkspaceNumberCardRow {
|
|
50
|
+
name: string;
|
|
51
|
+
/** Number Card doc name. */
|
|
52
|
+
number_card_name: string;
|
|
53
|
+
label?: string;
|
|
54
|
+
}
|
|
55
|
+
/** One row of the `quick_lists` child table (doctype "Workspace Quick List"). */
|
|
56
|
+
export interface WorkspaceQuickListRow {
|
|
57
|
+
name: string;
|
|
58
|
+
document_type: string;
|
|
59
|
+
label?: string;
|
|
60
|
+
/** JSON filters, e.g. `{"status":["=","Open"]}`. */
|
|
61
|
+
quick_list_filter?: string;
|
|
62
|
+
}
|
|
63
|
+
/** The Workspace document (fields the workspace page renders). */
|
|
64
|
+
export interface WorkspaceDoc {
|
|
65
|
+
name: string;
|
|
66
|
+
doctype: string;
|
|
67
|
+
title?: string;
|
|
68
|
+
label?: string;
|
|
69
|
+
icon?: string;
|
|
70
|
+
module?: string;
|
|
71
|
+
public?: number;
|
|
72
|
+
is_hidden?: number;
|
|
73
|
+
/** JSON string of editorjs-style blocks. */
|
|
74
|
+
content?: string;
|
|
75
|
+
shortcuts?: WorkspaceShortcutRow[];
|
|
76
|
+
links?: WorkspaceLinkRow[];
|
|
77
|
+
charts?: WorkspaceChartRow[];
|
|
78
|
+
number_cards?: WorkspaceNumberCardRow[];
|
|
79
|
+
quick_lists?: WorkspaceQuickListRow[];
|
|
80
|
+
[key: string]: unknown;
|
|
81
|
+
}
|
|
82
|
+
export type WorkspaceBlockType = "header" | "paragraph" | "shortcut" | "card" | "chart" | "number_card" | "quick_list" | "spacer" | "onboarding" | (string & {});
|
|
83
|
+
export interface WorkspaceBlock {
|
|
84
|
+
id: string;
|
|
85
|
+
type: WorkspaceBlockType;
|
|
86
|
+
data: {
|
|
87
|
+
/** header / paragraph: HTML-ish rich text. */
|
|
88
|
+
text?: string;
|
|
89
|
+
/** shortcut: matches `shortcuts[].label`. */
|
|
90
|
+
shortcut_name?: string;
|
|
91
|
+
/** card: matches a Card Break `links[].label`. */
|
|
92
|
+
card_name?: string;
|
|
93
|
+
/** chart: matches `charts[].chart_name`. */
|
|
94
|
+
chart_name?: string;
|
|
95
|
+
/** number_card: matches `number_cards[].number_card_name`. */
|
|
96
|
+
number_card_name?: string;
|
|
97
|
+
/** quick_list: matches `quick_lists[].document_type`. */
|
|
98
|
+
quick_list_name?: string;
|
|
99
|
+
/** 12-column grid span (3 = shortcut pill, 4 = card, 12 = full row). */
|
|
100
|
+
col?: number;
|
|
101
|
+
[key: string]: unknown;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/** A Card Break row grouped together with its following Link rows. */
|
|
105
|
+
export interface WorkspaceLinkGroup {
|
|
106
|
+
label: string;
|
|
107
|
+
breakRow: WorkspaceLinkRow;
|
|
108
|
+
links: WorkspaceLinkRow[];
|
|
109
|
+
}
|
|
110
|
+
/** Frappe filter triple, ready for the frappe client (`[field, op, value]`). */
|
|
111
|
+
export type FrappeFilterTuple = [string, string, unknown];
|
|
112
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/workspace/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MA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ACpB,8DAA8D;QAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,yDAAyD;QACzD,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,wEAAwE;QACxE,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;CACH;AAED,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B;AAED,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface DashboardChartSeries {
|
|
2
|
+
labels: string[];
|
|
3
|
+
datasets: Array<{
|
|
4
|
+
name?: string;
|
|
5
|
+
values: number[];
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
export interface DashboardChartDoc {
|
|
9
|
+
name: string;
|
|
10
|
+
doctype: string;
|
|
11
|
+
chart_name?: string;
|
|
12
|
+
/** Render style: "Line" | "Bar" | "Percentage" | "Pie" | "Donut" | "Heatmap" */
|
|
13
|
+
type?: string;
|
|
14
|
+
/** Data source kind: "Count" | "Sum" | "Average" | "Group By" | "Report" | "Custom" */
|
|
15
|
+
chart_type?: string;
|
|
16
|
+
document_type?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
export interface UseDashboardChartDataResult {
|
|
20
|
+
series: DashboardChartSeries | undefined;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
error: Error | undefined;
|
|
23
|
+
/** Fixture mode (stories/tests) — no RPC available for chart data. */
|
|
24
|
+
unsupported: boolean;
|
|
25
|
+
refresh: () => void;
|
|
26
|
+
}
|
|
27
|
+
/** Fetch a Dashboard Chart's series via the desk RPC (live mode only). */
|
|
28
|
+
export declare function useDashboardChartData(chartName: string | undefined): UseDashboardChartDataResult;
|
|
29
|
+
//# sourceMappingURL=useDashboardChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDashboardChart.d.ts","sourceRoot":"","sources":["../../src/workspace/useDashboardChart.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,sEAAsE;IACtE,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAuBD,0EAA0E;AAC1E,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,2BAA2B,CAiDhG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WorkspaceDoc } from "./types";
|
|
2
|
+
export interface UseFrappeDocResult<TDoc> {
|
|
3
|
+
doc: TDoc | undefined;
|
|
4
|
+
/** First load in flight — render a skeleton. */
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
error: Error | undefined;
|
|
7
|
+
/** True when the server rejected the read (HTTP 403). */
|
|
8
|
+
isPermissionError: boolean;
|
|
9
|
+
refresh: () => void;
|
|
10
|
+
}
|
|
11
|
+
/** Fetch one document via REST (or the provider's fixtures when present). */
|
|
12
|
+
export declare function useFrappeDoc<TDoc extends {
|
|
13
|
+
name: string;
|
|
14
|
+
doctype: string;
|
|
15
|
+
}>(doctype: string, name: string | undefined): UseFrappeDocResult<TDoc>;
|
|
16
|
+
/** Fetch a Workspace doc by proper-cased name (e.g. "Home", "Users"). */
|
|
17
|
+
export declare function useWorkspaceDoc(workspace: string): UseFrappeDocResult<WorkspaceDoc>;
|
|
18
|
+
//# sourceMappingURL=useWorkspaceDoc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWorkspaceDoc.d.ts","sourceRoot":"","sources":["../../src/workspace/useWorkspaceDoc.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsB5C,MAAM,WAAW,kBAAkB,CAAC,IAAI;IACtC,GAAG,EAAE,IAAI,GAAG,SAAS,CAAC;IACtB,gDAAgD;IAChD,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,yDAAyD;IACzD,iBAAiB,EAAE,OAAO,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,6EAA6E;AAC7E,wBAAgB,YAAY,CAAC,IAAI,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EACzE,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,kBAAkB,CAAC,IAAI,CAAC,CA0D1B;AAED,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAEnF"}
|