@open-mercato/ui 0.6.7-develop.6860.1.f796b22e80 → 0.6.7
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 +2 -4
- package/agentic/standalone-guide.md +1 -1
- package/build.mjs +54 -2
- package/dist/ai/AiChat.js +2 -21
- package/dist/ai/AiChat.js.map +2 -2
- package/dist/backend/AppShell.js +4 -43
- package/dist/backend/AppShell.js.map +2 -2
- package/dist/backend/AuthSessionGuard.js +0 -14
- package/dist/backend/AuthSessionGuard.js.map +2 -2
- package/dist/backend/BackendChromeProvider.js +1 -6
- package/dist/backend/BackendChromeProvider.js.map +2 -2
- package/dist/backend/CrudForm.js +4 -6
- package/dist/backend/CrudForm.js.map +2 -2
- package/dist/backend/DataTable.js +18 -20
- 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/ProfileDropdown.js +1 -2
- 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 +1 -13
- package/dist/backend/confirm-dialog/ConfirmDialog.js.map +2 -2
- package/dist/backend/crud/useGroupOrder.js +21 -14
- package/dist/backend/crud/useGroupOrder.js.map +2 -2
- package/dist/backend/detail/AddressTiles.js +5 -4
- 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/forms/FormHeader.js +2 -1
- package/dist/backend/forms/FormHeader.js.map +2 -2
- package/dist/backend/icons/lucideRegistry.generated.js +25 -1
- 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/injection/spotIds.js +18 -23
- package/dist/backend/injection/spotIds.js.map +2 -2
- 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 +70 -87
- package/dist/backend/schedule/ScheduleToolbar.js.map +2 -2
- package/dist/backend/sidebar/SidebarCustomizationEditor.js +2 -30
- package/dist/backend/sidebar/SidebarCustomizationEditor.js.map +2 -2
- package/dist/backend/sidebar/customization-helpers.js +0 -30
- package/dist/backend/sidebar/customization-helpers.js.map +2 -2
- package/dist/backend/utils/api.js +13 -3
- package/dist/backend/utils/api.js.map +2 -2
- package/dist/backend/utils/apiCall.js +1 -21
- package/dist/backend/utils/apiCall.js.map +2 -2
- package/dist/backend/utils/customFieldDefs.js.map +2 -2
- package/dist/backend/utils/customFieldForms.js +9 -10
- package/dist/backend/utils/customFieldForms.js.map +2 -2
- package/dist/backend/utils/nav.js +2 -5
- package/dist/backend/utils/nav.js.map +2 -2
- package/dist/frontend/LanguageSwitcher.js +1 -2
- 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/usePortalEventBridge.js +0 -6
- package/dist/portal/hooks/usePortalEventBridge.js.map +2 -2
- package/dist/portal/hooks/usePortalNotifications.js +4 -42
- package/dist/portal/hooks/usePortalNotifications.js.map +2 -2
- package/dist/portal/utils/nav.js +3 -2
- package/dist/portal/utils/nav.js.map +2 -2
- package/dist/primitives/button.js +4 -9
- package/dist/primitives/button.js.map +2 -2
- package/jest.config.cjs +1 -2
- package/package.json +18 -21
- package/src/ai/AiChat.tsx +1 -30
- package/src/ai/__tests__/AiChat.test.tsx +0 -31
- package/src/backend/AppShell.tsx +4 -55
- package/src/backend/AuthSessionGuard.tsx +0 -29
- package/src/backend/BackendChromeProvider.tsx +1 -19
- package/src/backend/CrudForm.tsx +4 -18
- package/src/backend/DataTable.tsx +19 -36
- package/src/backend/JsonBuilder.tsx +3 -3
- package/src/backend/NextStepCallout.tsx +4 -4
- package/src/backend/ProfileDropdown.tsx +0 -1
- package/src/backend/RowActions.tsx +2 -2
- package/src/backend/__tests__/AppShell.test.tsx +7 -65
- package/src/backend/__tests__/AuthSessionGuard.test.tsx +0 -52
- package/src/backend/__tests__/BackendChromeProvider.test.tsx +2 -98
- package/src/backend/__tests__/DataTable.perspectiveStorage.test.ts +1 -62
- package/src/backend/__tests__/nav-utils.test.ts +0 -139
- package/src/backend/confirm-dialog/ConfirmDialog.tsx +1 -16
- package/src/backend/confirm-dialog/__tests__/ConfirmDialog.test.tsx +1 -68
- package/src/backend/crud/__tests__/useGroupOrder.test.ts +1 -39
- package/src/backend/crud/useGroupOrder.ts +25 -30
- package/src/backend/detail/AddressTiles.tsx +6 -3
- 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 +0 -21
- package/src/backend/forms/FormHeader.tsx +2 -1
- package/src/backend/icons/lucideRegistry.generated.tsx +37 -3
- package/src/backend/icons/lucideRegistry.ts +2 -2
- package/src/backend/injection/spotIds.ts +18 -23
- package/src/backend/schedule/ScheduleAgenda.tsx +3 -3
- package/src/backend/schedule/ScheduleGrid.tsx +3 -3
- package/src/backend/schedule/ScheduleToolbar.tsx +68 -89
- package/src/backend/sidebar/SidebarCustomizationEditor.tsx +3 -42
- package/src/backend/sidebar/customization-helpers.ts +0 -47
- package/src/backend/utils/__tests__/api.test.ts +27 -0
- package/src/backend/utils/__tests__/apiCall.test.ts +0 -61
- package/src/backend/utils/api.ts +20 -3
- package/src/backend/utils/apiCall.ts +1 -29
- package/src/backend/utils/customFieldDefs.ts +0 -1
- package/src/backend/utils/customFieldForms.ts +11 -15
- package/src/backend/utils/nav.ts +2 -22
- package/src/frontend/LanguageSwitcher.tsx +0 -1
- package/src/portal/PortalContext.tsx +1 -1
- package/src/portal/hooks/usePortalEventBridge.ts +0 -6
- package/src/portal/hooks/usePortalNotifications.ts +12 -55
- package/src/portal/utils/__tests__/nav.test.ts +2 -2
- package/src/portal/utils/nav.ts +4 -3
- package/src/primitives/button.tsx +4 -10
- package/dist/backend/icons/lucideRegistryRuntime.js +0 -28
- package/dist/backend/icons/lucideRegistryRuntime.js.map +0 -7
- package/dist/backend/perspectiveState.js +0 -34
- package/dist/backend/perspectiveState.js.map +0 -7
- package/dist/backend/utils/fetchAllPages.js +0 -57
- package/dist/backend/utils/fetchAllPages.js.map +0 -7
- package/dist/portal/hooks/portalBridgeStatus.js +0 -25
- package/dist/portal/hooks/portalBridgeStatus.js.map +0 -7
- package/figma/alert.figma.tsx +0 -35
- package/figma/badge.figma.tsx +0 -33
- package/figma/button.figma.tsx +0 -33
- package/figma/checkbox.figma.tsx +0 -28
- package/figma/drawer.figma.tsx +0 -40
- package/figma/input-variants.figma.tsx +0 -58
- package/figma/radio.figma.tsx +0 -16
- package/figma/select.figma.tsx +0 -24
- package/figma/status-badge.figma.tsx +0 -24
- package/figma/switch.figma.tsx +0 -28
- package/figma/tabs.figma.tsx +0 -22
- package/figma/tag.figma.tsx +0 -27
- package/figma.config.json +0 -6
- package/scripts/lucideRegistrySource.cjs +0 -133
- package/src/backend/__tests__/CrudForm.fieldsetBinding.test.tsx +0 -158
- package/src/backend/__tests__/CrudForm.groupInjectionColumn.test.tsx +0 -98
- package/src/backend/__tests__/DataTable.metaHiddenLateColumns.test.tsx +0 -105
- package/src/backend/icons/__tests__/lucideRegistryGenerator.test.ts +0 -177
- package/src/backend/icons/lucideRegistryRuntime.tsx +0 -36
- package/src/backend/injection/__tests__/spotIds.extension-points.test.ts +0 -38
- package/src/backend/perspectiveState.ts +0 -44
- package/src/backend/sidebar/__tests__/group-visibility.test.ts +0 -131
- package/src/backend/utils/__tests__/customFieldForms.optionsPaging.test.ts +0 -95
- package/src/backend/utils/__tests__/fetchAllPages.test.ts +0 -103
- package/src/backend/utils/fetchAllPages.ts +0 -93
- package/src/portal/hooks/__tests__/usePortalEventBridge.test.tsx +0 -66
- package/src/portal/hooks/__tests__/usePortalNotifications.test.tsx +0 -155
- package/src/portal/hooks/portalBridgeStatus.ts +0 -29
- package/src/primitives/__tests__/button.test.tsx +0 -70
|
@@ -46,7 +46,6 @@ 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";
|
|
50
49
|
import { insertByInjectionPlacement } from "@open-mercato/shared/modules/widgets/injection-position";
|
|
51
50
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
52
51
|
import { getDefaultOperator, isAdvancedFilterState, flatToTree } from "@open-mercato/shared/lib/query/advanced-filter";
|
|
@@ -75,7 +74,6 @@ import {
|
|
|
75
74
|
} from "@dnd-kit/sortable";
|
|
76
75
|
import { CSS } from "@dnd-kit/utilities";
|
|
77
76
|
import { createLogger } from "@open-mercato/shared/lib/logger";
|
|
78
|
-
import { clearAllPerspectiveState, PERSPECTIVE_COOKIE_PREFIX, PERSPECTIVE_STORAGE_PREFIX } from "./perspectiveState.js";
|
|
79
77
|
const logger = createLogger("ui").child({ component: "DataTable" });
|
|
80
78
|
let refreshScheduled = false;
|
|
81
79
|
function scheduleRouterRefresh(router) {
|
|
@@ -201,6 +199,8 @@ function resolveExportSections(config) {
|
|
|
201
199
|
addSection("full", config.full, "Full data export");
|
|
202
200
|
return sections;
|
|
203
201
|
}
|
|
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 ? `data-table:${perspective.tableId}` : null) ?? (extensionTableIdProp ? `data-table:${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 ? `${resolvedInjectionSpotId}:header` : null,
|
|
948
948
|
[resolvedInjectionSpotId]
|
|
949
949
|
);
|
|
950
950
|
const toolbarInjectionSpotId = React.useMemo(
|
|
951
|
-
() => resolvedInjectionSpotId ?
|
|
951
|
+
() => resolvedInjectionSpotId ? `${resolvedInjectionSpotId}:toolbar` : null,
|
|
952
952
|
[resolvedInjectionSpotId]
|
|
953
953
|
);
|
|
954
954
|
const searchTrailingInjectionSpotId = React.useMemo(
|
|
955
|
-
() => resolvedInjectionSpotId ?
|
|
955
|
+
() => resolvedInjectionSpotId ? `${resolvedInjectionSpotId}:search-trailing` : null,
|
|
956
956
|
[resolvedInjectionSpotId]
|
|
957
957
|
);
|
|
958
958
|
const footerInjectionSpotId = React.useMemo(
|
|
959
|
-
() => resolvedInjectionSpotId ?
|
|
959
|
+
() => resolvedInjectionSpotId ? `${resolvedInjectionSpotId}:footer` : null,
|
|
960
960
|
[resolvedInjectionSpotId]
|
|
961
961
|
);
|
|
962
962
|
const { widgets: columnWidgets } = useInjectionDataWidgets(
|
|
963
|
-
extensionTableId ?
|
|
963
|
+
extensionTableId ? `data-table:${extensionTableId}:columns` : "__disabled__:columns"
|
|
964
964
|
);
|
|
965
965
|
const { widgets: rowActionWidgets } = useInjectionDataWidgets(
|
|
966
|
-
extensionTableId ?
|
|
966
|
+
extensionTableId ? `data-table:${extensionTableId}:row-actions` : "__disabled__:row-actions"
|
|
967
967
|
);
|
|
968
968
|
const { widgets: bulkActionWidgets } = useInjectionDataWidgets(
|
|
969
|
-
extensionTableId ?
|
|
969
|
+
extensionTableId ? `data-table:${extensionTableId}:bulk-actions` : "__disabled__:bulk-actions"
|
|
970
970
|
);
|
|
971
971
|
const { widgets: filterWidgets } = useInjectionDataWidgets(
|
|
972
|
-
extensionTableId ?
|
|
972
|
+
extensionTableId ? `data-table:${extensionTableId}:filters` : "__disabled__:filters"
|
|
973
973
|
);
|
|
974
974
|
const injectedColumnDefs = React.useMemo(() => {
|
|
975
975
|
const entries = [];
|
|
@@ -1231,19 +1231,18 @@ function DataTable({
|
|
|
1231
1231
|
return changed ? filtered : prev;
|
|
1232
1232
|
});
|
|
1233
1233
|
}, [table, mergedColumns]);
|
|
1234
|
-
const
|
|
1235
|
-
const autoHiddenColumnIds = React.useRef(/* @__PURE__ */ new Set());
|
|
1234
|
+
const initialVisibilityApplied = React.useRef(Boolean(mergedInitialSettings?.columnVisibility));
|
|
1236
1235
|
React.useEffect(() => {
|
|
1237
|
-
if (
|
|
1236
|
+
if (initialVisibilityApplied.current) return;
|
|
1238
1237
|
const hidden = {};
|
|
1239
1238
|
table.getAllLeafColumns().forEach((column) => {
|
|
1240
1239
|
const hiddenMeta = column.columnDef?.meta?.hidden;
|
|
1241
|
-
if (
|
|
1242
|
-
hidden[column.id] = false;
|
|
1243
|
-
autoHiddenColumnIds.current.add(column.id);
|
|
1240
|
+
if (hiddenMeta) hidden[column.id] = false;
|
|
1244
1241
|
});
|
|
1245
|
-
if (
|
|
1246
|
-
|
|
1242
|
+
if (Object.keys(hidden).length) {
|
|
1243
|
+
setColumnVisibility((prev) => ({ ...hidden, ...prev }));
|
|
1244
|
+
}
|
|
1245
|
+
initialVisibilityApplied.current = true;
|
|
1247
1246
|
}, [table, mergedColumns]);
|
|
1248
1247
|
const getCurrentSettings = React.useCallback(() => {
|
|
1249
1248
|
const visibility = {};
|
|
@@ -2556,7 +2555,6 @@ function DataTable({
|
|
|
2556
2555
|
}
|
|
2557
2556
|
export {
|
|
2558
2557
|
DataTable,
|
|
2559
|
-
clearAllPerspectiveState,
|
|
2560
2558
|
readPerspectiveSnapshot,
|
|
2561
2559
|
sanitizePerspectiveSettings,
|
|
2562
2560
|
withDataTableNamespaces,
|