@open-mercato/ui 0.6.7 → 0.6.8-develop.6874.1.982d6097d8
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/.turbo/turbo-build.log +1 -1
- package/AGENTS.md +4 -2
- package/agentic/standalone-guide.md +1 -1
- package/build.mjs +2 -54
- package/dist/ai/AiChat.js +26 -7
- package/dist/ai/AiChat.js.map +2 -2
- package/dist/ai/LoopDisabledBanner.js +1 -1
- package/dist/ai/LoopDisabledBanner.js.map +2 -2
- package/dist/ai/parts/ConfirmationCard.js +4 -4
- package/dist/ai/parts/ConfirmationCard.js.map +2 -2
- package/dist/ai/parts/FieldDiffCard.js +2 -2
- package/dist/ai/parts/FieldDiffCard.js.map +2 -2
- package/dist/ai/parts/MutationResultCard.js +3 -3
- package/dist/ai/parts/MutationResultCard.js.map +2 -2
- package/dist/ai/ui-parts/pending-phase3-placeholder.js +1 -1
- package/dist/ai/ui-parts/pending-phase3-placeholder.js.map +2 -2
- package/dist/backend/AppShell.js +43 -4
- package/dist/backend/AppShell.js.map +2 -2
- package/dist/backend/AuthSessionGuard.js +14 -0
- package/dist/backend/AuthSessionGuard.js.map +2 -2
- package/dist/backend/BackendChromeProvider.js +6 -1
- package/dist/backend/BackendChromeProvider.js.map +2 -2
- package/dist/backend/CrudForm.js +6 -4
- package/dist/backend/CrudForm.js.map +2 -2
- package/dist/backend/DataTable.js +20 -18
- package/dist/backend/DataTable.js.map +2 -2
- package/dist/backend/JsonBuilder.js +3 -3
- package/dist/backend/JsonBuilder.js.map +2 -2
- package/dist/backend/NextStepCallout.js +4 -4
- package/dist/backend/NextStepCallout.js.map +1 -1
- package/dist/backend/PerspectiveSidebar.js +1 -1
- package/dist/backend/PerspectiveSidebar.js.map +2 -2
- package/dist/backend/ProfileDropdown.js +2 -1
- package/dist/backend/ProfileDropdown.js.map +2 -2
- package/dist/backend/RowActions.js +2 -2
- package/dist/backend/RowActions.js.map +2 -2
- package/dist/backend/confirm-dialog/ConfirmDialog.js +13 -1
- package/dist/backend/confirm-dialog/ConfirmDialog.js.map +2 -2
- package/dist/backend/crud/useGroupOrder.js +14 -21
- package/dist/backend/crud/useGroupOrder.js.map +2 -2
- package/dist/backend/custom-fields/FieldDefinitionsManager.js +1 -1
- package/dist/backend/custom-fields/FieldDefinitionsManager.js.map +2 -2
- package/dist/backend/dashboard/DashboardScreen.js +3 -3
- package/dist/backend/dashboard/DashboardScreen.js.map +2 -2
- package/dist/backend/detail/AddressTiles.js +4 -5
- package/dist/backend/detail/AddressTiles.js.map +2 -2
- package/dist/backend/detail/AttachmentDeleteDialog.js +1 -1
- package/dist/backend/detail/AttachmentDeleteDialog.js.map +2 -2
- package/dist/backend/detail/AttachmentMetadataDialog.js.map +1 -1
- package/dist/backend/detail/AttachmentsSection.js +1 -1
- package/dist/backend/detail/AttachmentsSection.js.map +2 -2
- package/dist/backend/detail/NotesSection.js +1 -1
- package/dist/backend/detail/NotesSection.js.map +2 -2
- package/dist/backend/detail/TagsSection.js +1 -1
- package/dist/backend/detail/TagsSection.js.map +2 -2
- package/dist/backend/filters/AdvancedFilterPanel.js +1 -1
- package/dist/backend/filters/AdvancedFilterPanel.js.map +2 -2
- package/dist/backend/forms/FormHeader.js +1 -2
- package/dist/backend/forms/FormHeader.js.map +2 -2
- package/dist/backend/icons/lucideRegistry.generated.js +1 -25
- package/dist/backend/icons/lucideRegistry.generated.js.map +2 -2
- package/dist/backend/icons/lucideRegistry.js +3 -3
- package/dist/backend/icons/lucideRegistry.js.map +2 -2
- package/dist/backend/icons/lucideRegistryRuntime.js +28 -0
- package/dist/backend/icons/lucideRegistryRuntime.js.map +7 -0
- package/dist/backend/injection/spotIds.js +23 -18
- package/dist/backend/injection/spotIds.js.map +2 -2
- package/dist/backend/inputs/ComboboxInput.js.map +1 -1
- package/dist/backend/messages/EmailThreadsPanel.js +1 -1
- package/dist/backend/messages/EmailThreadsPanel.js.map +2 -2
- package/dist/backend/perspectiveState.js +34 -0
- package/dist/backend/perspectiveState.js.map +7 -0
- package/dist/backend/schedule/ScheduleAgenda.js +3 -3
- package/dist/backend/schedule/ScheduleAgenda.js.map +1 -1
- package/dist/backend/schedule/ScheduleGrid.js +3 -3
- package/dist/backend/schedule/ScheduleGrid.js.map +1 -1
- package/dist/backend/schedule/ScheduleToolbar.js +87 -70
- package/dist/backend/schedule/ScheduleToolbar.js.map +2 -2
- package/dist/backend/sidebar/SidebarCustomizationEditor.js +30 -2
- package/dist/backend/sidebar/SidebarCustomizationEditor.js.map +2 -2
- package/dist/backend/sidebar/customization-helpers.js +30 -0
- package/dist/backend/sidebar/customization-helpers.js.map +2 -2
- package/dist/backend/utils/apiCall.js +21 -1
- package/dist/backend/utils/apiCall.js.map +2 -2
- package/dist/backend/utils/customFieldDefs.js.map +2 -2
- package/dist/backend/utils/customFieldForms.js +10 -9
- package/dist/backend/utils/customFieldForms.js.map +2 -2
- package/dist/backend/utils/fetchAllPages.js +57 -0
- package/dist/backend/utils/fetchAllPages.js.map +7 -0
- package/dist/backend/utils/nav.js +5 -2
- package/dist/backend/utils/nav.js.map +2 -2
- package/dist/backend/version-history/VersionHistoryPanel.js +1 -1
- package/dist/backend/version-history/VersionHistoryPanel.js.map +2 -2
- package/dist/frontend/LanguageSwitcher.js +2 -1
- package/dist/frontend/LanguageSwitcher.js.map +2 -2
- package/dist/portal/PortalContext.js +1 -1
- package/dist/portal/PortalContext.js.map +2 -2
- package/dist/portal/hooks/portalBridgeStatus.js +25 -0
- package/dist/portal/hooks/portalBridgeStatus.js.map +7 -0
- package/dist/portal/hooks/usePortalEventBridge.js +6 -0
- package/dist/portal/hooks/usePortalEventBridge.js.map +2 -2
- package/dist/portal/hooks/usePortalNotifications.js +42 -4
- package/dist/portal/hooks/usePortalNotifications.js.map +2 -2
- package/dist/portal/utils/nav.js +2 -3
- package/dist/portal/utils/nav.js.map +2 -2
- package/dist/primitives/ErrorNotice.js +1 -1
- package/dist/primitives/ErrorNotice.js.map +2 -2
- package/dist/primitives/Notice.js +1 -1
- package/dist/primitives/Notice.js.map +1 -1
- package/dist/primitives/button.js +9 -4
- package/dist/primitives/button.js.map +2 -2
- package/dist/theme/ThemeProvider.js +1 -1
- package/dist/theme/ThemeProvider.js.map +2 -2
- package/dist/theme/index.js +3 -0
- package/dist/theme/index.js.map +2 -2
- package/dist/theme/theme-init-script.js +17 -0
- package/dist/theme/theme-init-script.js.map +7 -0
- package/figma/alert.figma.tsx +35 -0
- package/figma/badge.figma.tsx +33 -0
- package/figma/button.figma.tsx +33 -0
- package/figma/checkbox.figma.tsx +28 -0
- package/figma/drawer.figma.tsx +40 -0
- package/figma/input-variants.figma.tsx +58 -0
- package/figma/radio.figma.tsx +16 -0
- package/figma/select.figma.tsx +24 -0
- package/figma/status-badge.figma.tsx +24 -0
- package/figma/switch.figma.tsx +28 -0
- package/figma/tabs.figma.tsx +22 -0
- package/figma/tag.figma.tsx +27 -0
- package/figma.config.json +6 -0
- package/jest.config.cjs +2 -1
- package/package.json +21 -18
- package/scripts/lucideRegistrySource.cjs +133 -0
- package/src/ai/AiChat.tsx +36 -7
- package/src/ai/LoopDisabledBanner.tsx +1 -1
- package/src/ai/__tests__/AiChat.test.tsx +31 -0
- package/src/ai/parts/ConfirmationCard.tsx +4 -4
- package/src/ai/parts/FieldDiffCard.tsx +2 -2
- package/src/ai/parts/MutationResultCard.tsx +3 -3
- package/src/ai/ui-parts/pending-phase3-placeholder.tsx +2 -2
- package/src/backend/AppShell.tsx +55 -4
- package/src/backend/AuthSessionGuard.tsx +29 -0
- package/src/backend/BackendChromeProvider.tsx +19 -1
- package/src/backend/CrudForm.tsx +18 -4
- package/src/backend/DataTable.tsx +36 -19
- package/src/backend/JsonBuilder.tsx +3 -3
- package/src/backend/NextStepCallout.tsx +4 -4
- package/src/backend/PerspectiveSidebar.tsx +1 -1
- package/src/backend/ProfileDropdown.tsx +1 -0
- package/src/backend/RowActions.tsx +2 -2
- package/src/backend/__tests__/AppShell.test.tsx +65 -7
- package/src/backend/__tests__/AuthSessionGuard.test.tsx +52 -0
- package/src/backend/__tests__/BackendChromeProvider.test.tsx +98 -2
- package/src/backend/__tests__/CrudForm.fieldsetBinding.test.tsx +158 -0
- package/src/backend/__tests__/CrudForm.groupInjectionColumn.test.tsx +98 -0
- package/src/backend/__tests__/DataTable.metaHiddenLateColumns.test.tsx +105 -0
- package/src/backend/__tests__/DataTable.perspectiveStorage.test.ts +62 -1
- package/src/backend/__tests__/nav-utils.test.ts +139 -0
- package/src/backend/confirm-dialog/ConfirmDialog.tsx +16 -1
- package/src/backend/confirm-dialog/__tests__/ConfirmDialog.test.tsx +68 -1
- package/src/backend/crud/__tests__/useGroupOrder.test.ts +39 -1
- package/src/backend/crud/useGroupOrder.ts +30 -25
- package/src/backend/custom-fields/FieldDefinitionsManager.tsx +1 -1
- package/src/backend/dashboard/DashboardScreen.tsx +3 -3
- package/src/backend/detail/AddressTiles.tsx +3 -6
- package/src/backend/detail/AttachmentDeleteDialog.tsx +1 -1
- package/src/backend/detail/AttachmentMetadataDialog.tsx +1 -1
- package/src/backend/detail/AttachmentsSection.tsx +1 -1
- package/src/backend/detail/NotesSection.tsx +1 -1
- package/src/backend/detail/TagsSection.tsx +1 -1
- package/src/backend/detail/__tests__/AttachmentAssignmentsEditor.test.tsx +21 -0
- package/src/backend/filters/AdvancedFilterPanel.tsx +1 -1
- package/src/backend/forms/FormHeader.tsx +1 -2
- package/src/backend/icons/__tests__/lucideRegistryGenerator.test.ts +177 -0
- package/src/backend/icons/lucideRegistry.generated.tsx +3 -37
- package/src/backend/icons/lucideRegistry.ts +2 -2
- package/src/backend/icons/lucideRegistryRuntime.tsx +36 -0
- package/src/backend/injection/__tests__/spotIds.extension-points.test.ts +38 -0
- package/src/backend/injection/spotIds.ts +23 -18
- package/src/backend/inputs/ComboboxInput.tsx +1 -1
- package/src/backend/messages/EmailThreadsPanel.tsx +1 -1
- package/src/backend/perspectiveState.ts +44 -0
- package/src/backend/schedule/ScheduleAgenda.tsx +3 -3
- package/src/backend/schedule/ScheduleGrid.tsx +3 -3
- package/src/backend/schedule/ScheduleToolbar.tsx +89 -68
- package/src/backend/sidebar/SidebarCustomizationEditor.tsx +42 -3
- package/src/backend/sidebar/__tests__/group-visibility.test.ts +131 -0
- package/src/backend/sidebar/customization-helpers.ts +47 -0
- package/src/backend/utils/__tests__/apiCall.test.ts +61 -0
- package/src/backend/utils/__tests__/customFieldForms.optionsPaging.test.ts +95 -0
- package/src/backend/utils/__tests__/fetchAllPages.test.ts +103 -0
- package/src/backend/utils/apiCall.ts +29 -1
- package/src/backend/utils/customFieldDefs.ts +1 -0
- package/src/backend/utils/customFieldForms.ts +15 -11
- package/src/backend/utils/fetchAllPages.ts +93 -0
- package/src/backend/utils/nav.ts +22 -2
- package/src/backend/version-history/VersionHistoryPanel.tsx +1 -1
- package/src/frontend/LanguageSwitcher.tsx +1 -0
- package/src/portal/PortalContext.tsx +1 -1
- package/src/portal/hooks/__tests__/usePortalEventBridge.test.tsx +66 -0
- package/src/portal/hooks/__tests__/usePortalNotifications.test.tsx +155 -0
- package/src/portal/hooks/portalBridgeStatus.ts +29 -0
- package/src/portal/hooks/usePortalEventBridge.ts +6 -0
- package/src/portal/hooks/usePortalNotifications.ts +55 -12
- package/src/portal/utils/__tests__/nav.test.ts +2 -2
- package/src/portal/utils/nav.ts +3 -4
- package/src/primitives/ErrorNotice.tsx +1 -1
- package/src/primitives/Notice.tsx +5 -5
- package/src/primitives/__tests__/button.test.tsx +70 -0
- package/src/primitives/button.tsx +10 -4
- package/src/theme/ThemeProvider.tsx +1 -2
- package/src/theme/__tests__/theme-init-script.test.ts +70 -0
- package/src/theme/index.ts +1 -0
- package/src/theme/theme-init-script.ts +23 -0
|
@@ -46,6 +46,7 @@ import { useT } from "@open-mercato/shared/lib/i18n/context";
|
|
|
46
46
|
import { flash } from "./FlashMessages.js";
|
|
47
47
|
import { useConfirmDialog } from "./confirm-dialog/index.js";
|
|
48
48
|
import { ComponentReplacementHandles } from "@open-mercato/shared/modules/widgets/component-registry";
|
|
49
|
+
import { dataTableExtensionSpotId, extensionSpotChildId } from "@open-mercato/shared/modules/widgets/extension-points";
|
|
49
50
|
import { insertByInjectionPlacement } from "@open-mercato/shared/modules/widgets/injection-position";
|
|
50
51
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
51
52
|
import { getDefaultOperator, isAdvancedFilterState, flatToTree } from "@open-mercato/shared/lib/query/advanced-filter";
|
|
@@ -74,6 +75,7 @@ import {
|
|
|
74
75
|
} from "@dnd-kit/sortable";
|
|
75
76
|
import { CSS } from "@dnd-kit/utilities";
|
|
76
77
|
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
78
|
+
import { clearAllPerspectiveState, PERSPECTIVE_COOKIE_PREFIX, PERSPECTIVE_STORAGE_PREFIX } from "./perspectiveState.js";
|
|
77
79
|
const logger = createLogger("ui").child({ component: "DataTable" });
|
|
78
80
|
let refreshScheduled = false;
|
|
79
81
|
function scheduleRouterRefresh(router) {
|
|
@@ -199,8 +201,6 @@ function resolveExportSections(config) {
|
|
|
199
201
|
addSection("full", config.full, "Full data export");
|
|
200
202
|
return sections;
|
|
201
203
|
}
|
|
202
|
-
const PERSPECTIVE_COOKIE_PREFIX = "om_table_perspective";
|
|
203
|
-
const PERSPECTIVE_STORAGE_PREFIX = "om_table_perspective_snapshot";
|
|
204
204
|
const COLUMN_MIN_WIDTH = 60;
|
|
205
205
|
const COLUMN_MAX_WIDTH = 900;
|
|
206
206
|
function formatDurationLabel(durationMs) {
|
|
@@ -932,7 +932,7 @@ function DataTable({
|
|
|
932
932
|
if (injectionSpotId?.startsWith("data-table:")) return injectionSpotId.slice("data-table:".length);
|
|
933
933
|
return null;
|
|
934
934
|
}, [injectionSpotId, perspective?.tableId, extensionTableIdProp]);
|
|
935
|
-
const resolvedInjectionSpotId = injectionSpotId ?? (perspective?.tableId ?
|
|
935
|
+
const resolvedInjectionSpotId = injectionSpotId ?? (perspective?.tableId ? dataTableExtensionSpotId(perspective.tableId) : null) ?? (extensionTableIdProp ? dataTableExtensionSpotId(extensionTableIdProp) : null);
|
|
936
936
|
const resolvedReplacementHandle = replacementHandle ?? ComponentReplacementHandles.dataTable(extensionTableId ?? "unknown");
|
|
937
937
|
const baseInjectionContext = React.useMemo(
|
|
938
938
|
() => {
|
|
@@ -944,32 +944,32 @@ function DataTable({
|
|
|
944
944
|
[injectionContext, perspective?.tableId, extensionTableId, title]
|
|
945
945
|
);
|
|
946
946
|
const headerInjectionSpotId = React.useMemo(
|
|
947
|
-
() => resolvedInjectionSpotId ?
|
|
947
|
+
() => resolvedInjectionSpotId ? extensionSpotChildId(resolvedInjectionSpotId, "header") : null,
|
|
948
948
|
[resolvedInjectionSpotId]
|
|
949
949
|
);
|
|
950
950
|
const toolbarInjectionSpotId = React.useMemo(
|
|
951
|
-
() => resolvedInjectionSpotId ?
|
|
951
|
+
() => resolvedInjectionSpotId ? extensionSpotChildId(resolvedInjectionSpotId, "toolbar") : null,
|
|
952
952
|
[resolvedInjectionSpotId]
|
|
953
953
|
);
|
|
954
954
|
const searchTrailingInjectionSpotId = React.useMemo(
|
|
955
|
-
() => resolvedInjectionSpotId ?
|
|
955
|
+
() => resolvedInjectionSpotId ? extensionSpotChildId(resolvedInjectionSpotId, "search-trailing") : null,
|
|
956
956
|
[resolvedInjectionSpotId]
|
|
957
957
|
);
|
|
958
958
|
const footerInjectionSpotId = React.useMemo(
|
|
959
|
-
() => resolvedInjectionSpotId ?
|
|
959
|
+
() => resolvedInjectionSpotId ? extensionSpotChildId(resolvedInjectionSpotId, "footer") : null,
|
|
960
960
|
[resolvedInjectionSpotId]
|
|
961
961
|
);
|
|
962
962
|
const { widgets: columnWidgets } = useInjectionDataWidgets(
|
|
963
|
-
extensionTableId ?
|
|
963
|
+
extensionTableId ? dataTableExtensionSpotId(extensionTableId, "columns") : "__disabled__:columns"
|
|
964
964
|
);
|
|
965
965
|
const { widgets: rowActionWidgets } = useInjectionDataWidgets(
|
|
966
|
-
extensionTableId ?
|
|
966
|
+
extensionTableId ? dataTableExtensionSpotId(extensionTableId, "row-actions") : "__disabled__:row-actions"
|
|
967
967
|
);
|
|
968
968
|
const { widgets: bulkActionWidgets } = useInjectionDataWidgets(
|
|
969
|
-
extensionTableId ?
|
|
969
|
+
extensionTableId ? dataTableExtensionSpotId(extensionTableId, "bulk-actions") : "__disabled__:bulk-actions"
|
|
970
970
|
);
|
|
971
971
|
const { widgets: filterWidgets } = useInjectionDataWidgets(
|
|
972
|
-
extensionTableId ?
|
|
972
|
+
extensionTableId ? dataTableExtensionSpotId(extensionTableId, "filters") : "__disabled__:filters"
|
|
973
973
|
);
|
|
974
974
|
const injectedColumnDefs = React.useMemo(() => {
|
|
975
975
|
const entries = [];
|
|
@@ -1231,18 +1231,19 @@ function DataTable({
|
|
|
1231
1231
|
return changed ? filtered : prev;
|
|
1232
1232
|
});
|
|
1233
1233
|
}, [table, mergedColumns]);
|
|
1234
|
-
const
|
|
1234
|
+
const visibilitySeededByStoredSettings = React.useRef(Boolean(mergedInitialSettings?.columnVisibility));
|
|
1235
|
+
const autoHiddenColumnIds = React.useRef(/* @__PURE__ */ new Set());
|
|
1235
1236
|
React.useEffect(() => {
|
|
1236
|
-
if (
|
|
1237
|
+
if (visibilitySeededByStoredSettings.current) return;
|
|
1237
1238
|
const hidden = {};
|
|
1238
1239
|
table.getAllLeafColumns().forEach((column) => {
|
|
1239
1240
|
const hiddenMeta = column.columnDef?.meta?.hidden;
|
|
1240
|
-
if (hiddenMeta
|
|
1241
|
+
if (!hiddenMeta || autoHiddenColumnIds.current.has(column.id)) return;
|
|
1242
|
+
hidden[column.id] = false;
|
|
1243
|
+
autoHiddenColumnIds.current.add(column.id);
|
|
1241
1244
|
});
|
|
1242
|
-
if (Object.keys(hidden).length)
|
|
1243
|
-
|
|
1244
|
-
}
|
|
1245
|
-
initialVisibilityApplied.current = true;
|
|
1245
|
+
if (!Object.keys(hidden).length) return;
|
|
1246
|
+
setColumnVisibility((prev) => ({ ...hidden, ...prev }));
|
|
1246
1247
|
}, [table, mergedColumns]);
|
|
1247
1248
|
const getCurrentSettings = React.useCallback(() => {
|
|
1248
1249
|
const visibility = {};
|
|
@@ -2555,6 +2556,7 @@ function DataTable({
|
|
|
2555
2556
|
}
|
|
2556
2557
|
export {
|
|
2557
2558
|
DataTable,
|
|
2559
|
+
clearAllPerspectiveState,
|
|
2558
2560
|
readPerspectiveSnapshot,
|
|
2559
2561
|
sanitizePerspectiveSettings,
|
|
2560
2562
|
withDataTableNamespaces,
|