@vantageos/mosaic-blocks 0.5.37-alpha → 0.5.38-alpha
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/index.cjs +141 -127
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +142 -128
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/r/mosaic-adaptive-grid.json +1 -1
- package/r/mosaic-adaptive-modal.json +1 -1
- package/r/mosaic-adaptive-navigation.json +1 -1
- package/r/mosaic-add-memory-form.json +3 -3
- package/r/mosaic-admin-only-guard.json +1 -1
- package/r/mosaic-agent-chat.json +4 -4
- package/r/mosaic-agent-composer.json +1 -1
- package/r/mosaic-agent-editor.json +3 -3
- package/r/mosaic-agent-list.json +4 -4
- package/r/mosaic-app-sidebar.json +1 -1
- package/r/mosaic-artifact-checklist.json +1 -1
- package/r/mosaic-artifact-data-table.json +1 -1
- package/r/mosaic-artifact-library.json +1 -1
- package/r/mosaic-artifact-save-as-memory-form.json +2 -2
- package/r/mosaic-chat-message.json +1 -1
- package/r/mosaic-dashboard-content.json +1 -1
- package/r/mosaic-dashboard-header.json +1 -1
- package/r/mosaic-dashboard-layout.json +3 -3
- package/r/mosaic-document-table.json +6 -6
- package/r/mosaic-edit-memory-dialog.json +3 -3
- package/r/mosaic-edit-session-dialog.json +3 -3
- package/r/mosaic-editable-cell.json +1 -1
- package/r/mosaic-filter-bar.json +1 -1
- package/r/mosaic-filter-sidebar.json +1 -1
- package/r/mosaic-grille-registre.json +2 -2
- package/r/mosaic-main-nav.json +1 -1
- package/r/mosaic-marketplace-card.json +2 -2
- package/r/mosaic-marketplace-list.json +3 -3
- package/r/mosaic-match-input.json +1 -1
- package/r/mosaic-memory-dashboard.json +1 -1
- package/r/mosaic-memory-search.json +1 -1
- package/r/mosaic-mention-input.json +1 -1
- package/r/mosaic-message-list.json +2 -2
- package/r/mosaic-message-search.json +1 -1
- package/r/mosaic-module-library.json +1 -1
- package/r/mosaic-org-context-display.json +1 -1
- package/r/mosaic-org-panel.json +2 -2
- package/r/mosaic-preferences-panel.json +1 -1
- package/r/mosaic-profile-panel.json +1 -1
- package/r/mosaic-quick-actions-menu.json +1 -1
- package/r/mosaic-quick-agent-selector.json +2 -2
- package/r/mosaic-save-chat-as-memory-form.json +3 -3
- package/r/mosaic-save-template-modal.json +5 -5
- package/r/mosaic-selector-modal.json +1 -1
- package/r/mosaic-session-card.json +2 -2
- package/r/mosaic-template-gallery.json +3 -3
- package/r/mosaic-template-management-panel.json +3 -3
- package/r/use-effective-workspace-id.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -52,7 +52,7 @@ function _interopNamespace(e) {
|
|
|
52
52
|
var React30__namespace = /*#__PURE__*/_interopNamespace(React30);
|
|
53
53
|
|
|
54
54
|
// src/version.ts
|
|
55
|
-
var version = "0.5.
|
|
55
|
+
var version = "0.5.38-alpha";
|
|
56
56
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
57
57
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
58
58
|
}
|
|
@@ -18228,6 +18228,86 @@ function MosaicAdminOnlyGuard(props) {
|
|
|
18228
18228
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
18229
18229
|
}
|
|
18230
18230
|
MosaicAdminOnlyGuard.displayName = "MosaicAdminOnlyGuard";
|
|
18231
|
+
var registreGridTheme = agGridCommunity.themeQuartz.withParams({
|
|
18232
|
+
accentColor: "var(--accent)",
|
|
18233
|
+
backgroundColor: "var(--surface)",
|
|
18234
|
+
foregroundColor: "var(--foreground)",
|
|
18235
|
+
textColor: "var(--foreground)",
|
|
18236
|
+
borderColor: "var(--border)",
|
|
18237
|
+
headerBackgroundColor: "var(--surface-secondary)",
|
|
18238
|
+
headerTextColor: "var(--surface-secondary-foreground)",
|
|
18239
|
+
headerFontWeight: 600,
|
|
18240
|
+
fontFamily: "var(--font-sans)",
|
|
18241
|
+
fontSize: 14,
|
|
18242
|
+
headerFontSize: 13,
|
|
18243
|
+
rowHeight: 40,
|
|
18244
|
+
headerHeight: 44,
|
|
18245
|
+
spacing: 8,
|
|
18246
|
+
wrapperBorderRadius: 8,
|
|
18247
|
+
rowHoverColor: "var(--surface-hover)"
|
|
18248
|
+
// No `selectedRowBackgroundColor`: the grid does not use the native AG Grid row
|
|
18249
|
+
// selection. A host highlights its selected row through `getRowStyle`.
|
|
18250
|
+
});
|
|
18251
|
+
var fitGridWidthStrategy = {
|
|
18252
|
+
type: "fitGridWidth"
|
|
18253
|
+
};
|
|
18254
|
+
function refitColumns(e) {
|
|
18255
|
+
e.api.sizeColumnsToFit();
|
|
18256
|
+
}
|
|
18257
|
+
var modulesRegistered = false;
|
|
18258
|
+
function ensureModules() {
|
|
18259
|
+
if (modulesRegistered) return;
|
|
18260
|
+
agGridCommunity.ModuleRegistry.registerModules([agGridCommunity.AllCommunityModule]);
|
|
18261
|
+
modulesRegistered = true;
|
|
18262
|
+
}
|
|
18263
|
+
var DEFAUTS = {
|
|
18264
|
+
resizable: true,
|
|
18265
|
+
sortable: true,
|
|
18266
|
+
filter: true,
|
|
18267
|
+
floatingFilter: true
|
|
18268
|
+
};
|
|
18269
|
+
function GrilleRegistre({
|
|
18270
|
+
lignes,
|
|
18271
|
+
columnDefs,
|
|
18272
|
+
getRowId,
|
|
18273
|
+
filtreGlobal,
|
|
18274
|
+
theme = registreGridTheme,
|
|
18275
|
+
onGridReady,
|
|
18276
|
+
onCelluleEditee,
|
|
18277
|
+
getRowStyle,
|
|
18278
|
+
tooltipShowDelay,
|
|
18279
|
+
suppressCellFocus,
|
|
18280
|
+
onCellClicked,
|
|
18281
|
+
rowHeight,
|
|
18282
|
+
domLayout,
|
|
18283
|
+
onGridSizeChanged,
|
|
18284
|
+
messageVide
|
|
18285
|
+
}) {
|
|
18286
|
+
ensureModules();
|
|
18287
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "isolate h-full min-h-0 w-full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18288
|
+
agGridReact.AgGridReact,
|
|
18289
|
+
{
|
|
18290
|
+
theme,
|
|
18291
|
+
autoSizeStrategy: fitGridWidthStrategy,
|
|
18292
|
+
rowData: lignes,
|
|
18293
|
+
columnDefs,
|
|
18294
|
+
defaultColDef: DEFAUTS,
|
|
18295
|
+
quickFilterText: filtreGlobal,
|
|
18296
|
+
getRowId: (p) => getRowId(p.data),
|
|
18297
|
+
onGridReady,
|
|
18298
|
+
onCellValueChanged: onCelluleEditee,
|
|
18299
|
+
onCellClicked,
|
|
18300
|
+
getRowStyle,
|
|
18301
|
+
tooltipShowDelay,
|
|
18302
|
+
suppressCellFocus,
|
|
18303
|
+
rowHeight,
|
|
18304
|
+
domLayout,
|
|
18305
|
+
onGridSizeChanged,
|
|
18306
|
+
overlayComponentParams: messageVide === void 0 ? void 0 : { noRows: { overlayText: messageVide } },
|
|
18307
|
+
animateRows: true
|
|
18308
|
+
}
|
|
18309
|
+
) });
|
|
18310
|
+
}
|
|
18231
18311
|
|
|
18232
18312
|
// src/components/document-review/panel-tab.ts
|
|
18233
18313
|
var REVIEW_PANEL_TABS = ["compare", "document", "row"];
|
|
@@ -18308,6 +18388,22 @@ function correctionOutcome(result) {
|
|
|
18308
18388
|
if (!result.ok) return "failed";
|
|
18309
18389
|
return result.confirmed ? "ok" : "uncertain";
|
|
18310
18390
|
}
|
|
18391
|
+
var SelectedRowIdContext = React30.createContext(null);
|
|
18392
|
+
function OpenRowButton({ value, node }) {
|
|
18393
|
+
const selectedRowId = React30.useContext(SelectedRowIdContext);
|
|
18394
|
+
const isSelected = node.id !== void 0 && node.id === selectedRowId;
|
|
18395
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
18396
|
+
"button",
|
|
18397
|
+
{
|
|
18398
|
+
type: "button",
|
|
18399
|
+
"data-slot": "document-table-open",
|
|
18400
|
+
"aria-current": isSelected ? "true" : void 0,
|
|
18401
|
+
"data-selected": isSelected ? "true" : void 0,
|
|
18402
|
+
className: "text-left underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
18403
|
+
children: value
|
|
18404
|
+
}
|
|
18405
|
+
);
|
|
18406
|
+
}
|
|
18311
18407
|
function MosaicDocumentTable({
|
|
18312
18408
|
columns,
|
|
18313
18409
|
rows,
|
|
@@ -18326,57 +18422,53 @@ function MosaicDocumentTable({
|
|
|
18326
18422
|
if (!isControlled) setInternalSelectedRowId(rowId);
|
|
18327
18423
|
onSelectedRowChange?.(rowId);
|
|
18328
18424
|
}
|
|
18329
|
-
const
|
|
18330
|
-
|
|
18331
|
-
|
|
18332
|
-
|
|
18333
|
-
|
|
18334
|
-
|
|
18335
|
-
|
|
18336
|
-
|
|
18337
|
-
|
|
18338
|
-
|
|
18339
|
-
|
|
18340
|
-
|
|
18341
|
-
|
|
18342
|
-
|
|
18343
|
-
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18349
|
-
|
|
18350
|
-
|
|
18351
|
-
|
|
18352
|
-
const tr = event.target.closest("tr[data-slot='data-table-row']");
|
|
18353
|
-
if (!(tr instanceof HTMLTableRowElement)) return;
|
|
18354
|
-
const row = rows[tr.sectionRowIndex];
|
|
18355
|
-
if (row !== void 0) select(getRowId(row));
|
|
18425
|
+
const columnDefs = React30.useMemo(
|
|
18426
|
+
() => visibleColumns(columns, columnVisibility ?? initialColumnVisibility(columns)).map(
|
|
18427
|
+
(column, columnIndex) => ({
|
|
18428
|
+
colId: column.id,
|
|
18429
|
+
headerName: column.label,
|
|
18430
|
+
// The column model's value, as text: null reads as an empty cell.
|
|
18431
|
+
valueGetter: (params) => {
|
|
18432
|
+
if (params.data === void 0) return "";
|
|
18433
|
+
const value = column.accessor(params.data);
|
|
18434
|
+
return value === null ? "" : String(value);
|
|
18435
|
+
},
|
|
18436
|
+
// No type inference: a boolean stays text, never a grid checkbox.
|
|
18437
|
+
cellDataType: false,
|
|
18438
|
+
sortable: false,
|
|
18439
|
+
filter: false,
|
|
18440
|
+
floatingFilter: false,
|
|
18441
|
+
...columnIndex === 0 ? { cellRenderer: OpenRowButton } : {}
|
|
18442
|
+
})
|
|
18443
|
+
),
|
|
18444
|
+
[columns, columnVisibility]
|
|
18445
|
+
);
|
|
18446
|
+
function handleCellClicked(event) {
|
|
18447
|
+
if (event.data !== void 0) select(getRowId(event.data));
|
|
18356
18448
|
}
|
|
18357
18449
|
const orderedRowIds = rows.map(getRowId);
|
|
18358
18450
|
const selectedRow = selectedRowId === null ? void 0 : rows.find((row) => getRowId(row) === selectedRowId);
|
|
18359
|
-
return (
|
|
18360
|
-
|
|
18361
|
-
|
|
18362
|
-
|
|
18363
|
-
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
|
|
18369
|
-
|
|
18370
|
-
|
|
18371
|
-
|
|
18372
|
-
|
|
18373
|
-
|
|
18374
|
-
|
|
18375
|
-
|
|
18376
|
-
|
|
18377
|
-
|
|
18378
|
-
|
|
18379
|
-
);
|
|
18451
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "document-table", className, children: [
|
|
18452
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectedRowIdContext.Provider, { value: selectedRowId, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18453
|
+
GrilleRegistre,
|
|
18454
|
+
{
|
|
18455
|
+
lignes: rows,
|
|
18456
|
+
columnDefs,
|
|
18457
|
+
getRowId,
|
|
18458
|
+
onCellClicked: handleCellClicked,
|
|
18459
|
+
suppressCellFocus: true,
|
|
18460
|
+
domLayout: "autoHeight",
|
|
18461
|
+
onGridSizeChanged: refitColumns,
|
|
18462
|
+
messageVide: emptyMessage
|
|
18463
|
+
}
|
|
18464
|
+
) }),
|
|
18465
|
+
selectedRow !== void 0 && renderPanel ? renderPanel(selectedRow, {
|
|
18466
|
+
rowId: getRowId(selectedRow),
|
|
18467
|
+
orderedRowIds,
|
|
18468
|
+
selectRow: (rowId) => select(rowId),
|
|
18469
|
+
closeRow: () => select(null)
|
|
18470
|
+
}) : null
|
|
18471
|
+
] });
|
|
18380
18472
|
}
|
|
18381
18473
|
MosaicDocumentTable.displayName = "MosaicDocumentTable";
|
|
18382
18474
|
function MosaicDocumentCriteriaPanel({
|
|
@@ -18509,84 +18601,6 @@ function MosaicDocumentCriteriaPanel({
|
|
|
18509
18601
|
);
|
|
18510
18602
|
}
|
|
18511
18603
|
MosaicDocumentCriteriaPanel.displayName = "MosaicDocumentCriteriaPanel";
|
|
18512
|
-
var registreGridTheme = agGridCommunity.themeQuartz.withParams({
|
|
18513
|
-
accentColor: "var(--accent)",
|
|
18514
|
-
backgroundColor: "var(--surface)",
|
|
18515
|
-
foregroundColor: "var(--foreground)",
|
|
18516
|
-
textColor: "var(--foreground)",
|
|
18517
|
-
borderColor: "var(--border)",
|
|
18518
|
-
headerBackgroundColor: "var(--surface-secondary)",
|
|
18519
|
-
headerTextColor: "var(--surface-secondary-foreground)",
|
|
18520
|
-
headerFontWeight: 600,
|
|
18521
|
-
fontFamily: "var(--font-sans)",
|
|
18522
|
-
fontSize: 14,
|
|
18523
|
-
headerFontSize: 13,
|
|
18524
|
-
rowHeight: 40,
|
|
18525
|
-
headerHeight: 44,
|
|
18526
|
-
spacing: 8,
|
|
18527
|
-
wrapperBorderRadius: 8,
|
|
18528
|
-
rowHoverColor: "var(--surface-hover)"
|
|
18529
|
-
// No `selectedRowBackgroundColor`: the grid does not use the native AG Grid row
|
|
18530
|
-
// selection. A host highlights its selected row through `getRowStyle`.
|
|
18531
|
-
});
|
|
18532
|
-
var fitGridWidthStrategy = {
|
|
18533
|
-
type: "fitGridWidth"
|
|
18534
|
-
};
|
|
18535
|
-
function refitColumns(e) {
|
|
18536
|
-
e.api.sizeColumnsToFit();
|
|
18537
|
-
}
|
|
18538
|
-
var modulesRegistered = false;
|
|
18539
|
-
function ensureModules() {
|
|
18540
|
-
if (modulesRegistered) return;
|
|
18541
|
-
agGridCommunity.ModuleRegistry.registerModules([agGridCommunity.AllCommunityModule]);
|
|
18542
|
-
modulesRegistered = true;
|
|
18543
|
-
}
|
|
18544
|
-
var DEFAUTS = {
|
|
18545
|
-
resizable: true,
|
|
18546
|
-
sortable: true,
|
|
18547
|
-
filter: true,
|
|
18548
|
-
floatingFilter: true
|
|
18549
|
-
};
|
|
18550
|
-
function GrilleRegistre({
|
|
18551
|
-
lignes,
|
|
18552
|
-
columnDefs,
|
|
18553
|
-
getRowId,
|
|
18554
|
-
filtreGlobal,
|
|
18555
|
-
theme = registreGridTheme,
|
|
18556
|
-
onGridReady,
|
|
18557
|
-
onCelluleEditee,
|
|
18558
|
-
getRowStyle,
|
|
18559
|
-
tooltipShowDelay,
|
|
18560
|
-
suppressCellFocus,
|
|
18561
|
-
onCellClicked,
|
|
18562
|
-
rowHeight,
|
|
18563
|
-
domLayout,
|
|
18564
|
-
onGridSizeChanged
|
|
18565
|
-
}) {
|
|
18566
|
-
ensureModules();
|
|
18567
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "isolate h-full min-h-0 w-full", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18568
|
-
agGridReact.AgGridReact,
|
|
18569
|
-
{
|
|
18570
|
-
theme,
|
|
18571
|
-
autoSizeStrategy: fitGridWidthStrategy,
|
|
18572
|
-
rowData: lignes,
|
|
18573
|
-
columnDefs,
|
|
18574
|
-
defaultColDef: DEFAUTS,
|
|
18575
|
-
quickFilterText: filtreGlobal,
|
|
18576
|
-
getRowId: (p) => getRowId(p.data),
|
|
18577
|
-
onGridReady,
|
|
18578
|
-
onCellValueChanged: onCelluleEditee,
|
|
18579
|
-
onCellClicked,
|
|
18580
|
-
getRowStyle,
|
|
18581
|
-
tooltipShowDelay,
|
|
18582
|
-
suppressCellFocus,
|
|
18583
|
-
rowHeight,
|
|
18584
|
-
domLayout,
|
|
18585
|
-
onGridSizeChanged,
|
|
18586
|
-
animateRows: true
|
|
18587
|
-
}
|
|
18588
|
-
) });
|
|
18589
|
-
}
|
|
18590
18604
|
var DEFAULT_WIDTH_RATIO = 0.45;
|
|
18591
18605
|
var MIN_WIDTH_PX = 360;
|
|
18592
18606
|
var MAX_WIDTH_RATIO = 0.9;
|