@firecms/core 3.1.0-canary.1df3b2c → 3.1.0-canary.9e89e98

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.umd.js CHANGED
@@ -18341,13 +18341,13 @@
18341
18341
  ] })
18342
18342
  ] });
18343
18343
  }
18344
+ const ALL_VIEW_MODES = ["table", "cards", "kanban"];
18344
18345
  function ViewModeToggle(t0) {
18345
- const $ = reactCompilerRuntime.c(42);
18346
+ const $ = reactCompilerRuntime.c(36);
18346
18347
  const {
18347
18348
  viewMode: t1,
18348
18349
  onViewModeChange,
18349
- kanbanEnabled: t2,
18350
- hasKanbanConfigPlugin: t3,
18350
+ enabledViews: t2,
18351
18351
  size,
18352
18352
  onSizeChanged,
18353
18353
  open,
@@ -18357,14 +18357,13 @@
18357
18357
  onKanbanPropertyChange
18358
18358
  } = t0;
18359
18359
  const viewMode = t1 === void 0 ? "table" : t1;
18360
- const kanbanEnabled = t2 === void 0 ? false : t2;
18361
- const hasKanbanConfigPlugin = t3 === void 0 ? false : t3;
18360
+ const enabledViews = t2 === void 0 ? ALL_VIEW_MODES : t2;
18362
18361
  if (!onViewModeChange) {
18363
18362
  return null;
18364
18363
  }
18365
- let t4;
18364
+ let t3;
18366
18365
  if ($[0] !== viewMode) {
18367
- t4 = () => {
18366
+ t3 = () => {
18368
18367
  if (viewMode === "kanban") {
18369
18368
  return /* @__PURE__ */ jsxRuntime.jsx(ui.ViewKanbanIcon, { size: "small" });
18370
18369
  }
@@ -18374,14 +18373,14 @@
18374
18373
  return /* @__PURE__ */ jsxRuntime.jsx(ui.ListIcon, { size: "small" });
18375
18374
  };
18376
18375
  $[0] = viewMode;
18377
- $[1] = t4;
18376
+ $[1] = t3;
18378
18377
  } else {
18379
- t4 = $[1];
18378
+ t3 = $[1];
18380
18379
  }
18381
- const getViewModeIcon = t4;
18382
- let t5;
18380
+ const getViewModeIcon = t3;
18381
+ let t4;
18383
18382
  if ($[2] !== viewMode) {
18384
- t5 = () => {
18383
+ t4 = () => {
18385
18384
  if (viewMode === "kanban") {
18386
18385
  return "Board";
18387
18386
  }
@@ -18391,177 +18390,151 @@
18391
18390
  return "List";
18392
18391
  };
18393
18392
  $[2] = viewMode;
18394
- $[3] = t5;
18393
+ $[3] = t4;
18395
18394
  } else {
18396
- t5 = $[3];
18395
+ t4 = $[3];
18397
18396
  }
18398
- const getViewModeName = t5;
18399
- const showKanban = kanbanEnabled || hasKanbanConfigPlugin;
18397
+ const getViewModeName = t4;
18400
18398
  const showSizeSelector = size && onSizeChanged && (viewMode === "table" || viewMode === "cards");
18401
18399
  const showKanbanPropertySelector = viewMode === "kanban" && kanbanPropertyOptions && kanbanPropertyOptions.length > 0 && onKanbanPropertyChange;
18400
+ let t5;
18402
18401
  let t6;
18403
- let t7;
18404
18402
  if ($[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
18405
- t7 = {
18406
- value: "table",
18407
- label: "List",
18408
- icon: /* @__PURE__ */ jsxRuntime.jsx(ui.ListIcon, { size: "small" })
18409
- };
18410
- $[4] = t7;
18403
+ t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.ListIcon, { size: "small" });
18404
+ $[4] = t6;
18411
18405
  } else {
18412
- t7 = $[4];
18406
+ t6 = $[4];
18413
18407
  }
18414
- let t8;
18415
- if ($[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
18416
- t8 = {
18408
+ let t7;
18409
+ if ($[5] !== enabledViews) {
18410
+ const allOptions = [{
18411
+ value: "table",
18412
+ label: "List",
18413
+ icon: t6
18414
+ }, {
18417
18415
  value: "cards",
18418
18416
  label: "Cards",
18419
18417
  icon: /* @__PURE__ */ jsxRuntime.jsx(ui.AppsIcon, { size: "small" })
18420
- };
18421
- $[5] = t8;
18418
+ }, {
18419
+ value: "kanban",
18420
+ label: "Board",
18421
+ icon: /* @__PURE__ */ jsxRuntime.jsx(ui.ViewKanbanIcon, { size: "small" })
18422
+ }];
18423
+ t7 = allOptions.filter((option) => enabledViews.includes(option.value));
18424
+ $[5] = enabledViews;
18425
+ $[6] = t7;
18422
18426
  } else {
18423
- t8 = $[5];
18427
+ t7 = $[6];
18424
18428
  }
18425
- let options;
18426
- if ($[6] !== hasKanbanConfigPlugin || $[7] !== kanbanEnabled || $[8] !== showKanban) {
18427
- options = [t7, t8];
18428
- if (showKanban) {
18429
- let t92;
18430
- if ($[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
18431
- t92 = /* @__PURE__ */ jsxRuntime.jsx(ui.ViewKanbanIcon, { size: "small" });
18432
- $[10] = t92;
18433
- } else {
18434
- t92 = $[10];
18435
- }
18436
- const t102 = !kanbanEnabled && !hasKanbanConfigPlugin;
18437
- let t112;
18438
- if ($[11] !== t102) {
18439
- t112 = {
18440
- value: "kanban",
18441
- label: "Board",
18442
- icon: t92,
18443
- disabled: t102
18444
- };
18445
- $[11] = t102;
18446
- $[12] = t112;
18447
- } else {
18448
- t112 = $[12];
18449
- }
18450
- options.push(t112);
18451
- }
18452
- $[6] = hasKanbanConfigPlugin;
18453
- $[7] = kanbanEnabled;
18454
- $[8] = showKanban;
18455
- $[9] = options;
18429
+ t5 = t7;
18430
+ const viewModeOptions = t5;
18431
+ if (viewModeOptions.length <= 1 && !showSizeSelector) {
18432
+ return null;
18433
+ }
18434
+ let t8;
18435
+ if ($[7] !== getViewModeIcon) {
18436
+ t8 = getViewModeIcon();
18437
+ $[7] = getViewModeIcon;
18438
+ $[8] = t8;
18456
18439
  } else {
18457
- options = $[9];
18440
+ t8 = $[8];
18458
18441
  }
18459
- t6 = options;
18460
- const viewModeOptions = t6;
18461
- let t9;
18462
- if ($[13] !== getViewModeIcon) {
18463
- t9 = getViewModeIcon();
18464
- $[13] = getViewModeIcon;
18465
- $[14] = t9;
18442
+ const t9 = getViewModeName();
18443
+ let t10;
18444
+ if ($[9] !== t9) {
18445
+ t10 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-sm", children: t9 });
18446
+ $[9] = t9;
18447
+ $[10] = t10;
18466
18448
  } else {
18467
- t9 = $[14];
18449
+ t10 = $[10];
18468
18450
  }
18469
- const t10 = getViewModeName();
18470
18451
  let t11;
18471
- if ($[15] !== t10) {
18472
- t11 = /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-sm", children: t10 });
18473
- $[15] = t10;
18474
- $[16] = t11;
18452
+ if ($[11] !== t10 || $[12] !== t8) {
18453
+ t11 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { size: "small", children: [
18454
+ t8,
18455
+ t10
18456
+ ] });
18457
+ $[11] = t10;
18458
+ $[12] = t8;
18459
+ $[13] = t11;
18475
18460
  } else {
18476
- t11 = $[16];
18461
+ t11 = $[13];
18477
18462
  }
18478
18463
  let t12;
18479
- if ($[17] !== t11 || $[18] !== t9) {
18480
- t12 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { size: "small", children: [
18481
- t9,
18482
- t11
18483
- ] });
18484
- $[17] = t11;
18485
- $[18] = t9;
18486
- $[19] = t12;
18464
+ if ($[14] !== onViewModeChange || $[15] !== viewMode || $[16] !== viewModeOptions) {
18465
+ t12 = viewModeOptions.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(ui.ToggleButtonGroup, { value: viewMode, onValueChange: onViewModeChange, options: viewModeOptions });
18466
+ $[14] = onViewModeChange;
18467
+ $[15] = viewMode;
18468
+ $[16] = viewModeOptions;
18469
+ $[17] = t12;
18487
18470
  } else {
18488
- t12 = $[19];
18471
+ t12 = $[17];
18489
18472
  }
18490
18473
  let t13;
18491
- if ($[20] !== onViewModeChange || $[21] !== viewMode || $[22] !== viewModeOptions) {
18492
- t13 = /* @__PURE__ */ jsxRuntime.jsx(ui.ToggleButtonGroup, { value: viewMode, onValueChange: onViewModeChange, options: viewModeOptions });
18493
- $[20] = onViewModeChange;
18494
- $[21] = viewMode;
18495
- $[22] = viewModeOptions;
18496
- $[23] = t13;
18497
- } else {
18498
- t13 = $[23];
18499
- }
18500
- let t14;
18501
- if ($[24] !== onSizeChanged || $[25] !== showSizeSelector || $[26] !== size) {
18502
- t14 = showSizeSelector && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-between gap-2", children: [
18474
+ if ($[18] !== onSizeChanged || $[19] !== showSizeSelector || $[20] !== size) {
18475
+ t13 = showSizeSelector && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-between gap-2", children: [
18503
18476
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm text-surface-600 dark:text-surface-300", children: [
18504
18477
  /* @__PURE__ */ jsxRuntime.jsx(ui.ViewColumnIcon, { size: "small" }),
18505
18478
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Size" })
18506
18479
  ] }),
18507
18480
  /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: size, size: "small", className: "w-20", onValueChange: (v) => onSizeChanged?.(v), renderValue: _temp$e, children: ["xs", "s", "m", "l", "xl"].map(_temp2$5) })
18508
18481
  ] });
18509
- $[24] = onSizeChanged;
18510
- $[25] = showSizeSelector;
18511
- $[26] = size;
18512
- $[27] = t14;
18482
+ $[18] = onSizeChanged;
18483
+ $[19] = showSizeSelector;
18484
+ $[20] = size;
18485
+ $[21] = t13;
18513
18486
  } else {
18514
- t14 = $[27];
18487
+ t13 = $[21];
18515
18488
  }
18516
- let t15;
18517
- if ($[28] !== kanbanPropertyOptions || $[29] !== onKanbanPropertyChange || $[30] !== selectedKanbanProperty || $[31] !== showKanbanPropertySelector) {
18518
- t15 = showKanbanPropertySelector && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-between gap-2", children: [
18489
+ let t14;
18490
+ if ($[22] !== kanbanPropertyOptions || $[23] !== onKanbanPropertyChange || $[24] !== selectedKanbanProperty || $[25] !== showKanbanPropertySelector) {
18491
+ t14 = showKanbanPropertySelector && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-between gap-2", children: [
18519
18492
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-sm text-surface-600 dark:text-surface-300", children: [
18520
18493
  /* @__PURE__ */ jsxRuntime.jsx(ui.ViewKanbanIcon, { size: "small" }),
18521
18494
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Group by" })
18522
18495
  ] }),
18523
18496
  /* @__PURE__ */ jsxRuntime.jsx(ui.Select, { value: selectedKanbanProperty, size: "small", className: "w-32", onValueChange: (v_1) => onKanbanPropertyChange?.(v_1), renderValue: (v_2) => {
18524
- const option = kanbanPropertyOptions?.find((o) => o.key === v_2);
18525
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium truncate", children: option?.label ?? v_2 });
18497
+ const option_0 = kanbanPropertyOptions?.find((o) => o.key === v_2);
18498
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium truncate", children: option_0?.label ?? v_2 });
18526
18499
  }, children: kanbanPropertyOptions?.map(_temp3$3) })
18527
18500
  ] });
18528
- $[28] = kanbanPropertyOptions;
18529
- $[29] = onKanbanPropertyChange;
18530
- $[30] = selectedKanbanProperty;
18531
- $[31] = showKanbanPropertySelector;
18532
- $[32] = t15;
18501
+ $[22] = kanbanPropertyOptions;
18502
+ $[23] = onKanbanPropertyChange;
18503
+ $[24] = selectedKanbanProperty;
18504
+ $[25] = showKanbanPropertySelector;
18505
+ $[26] = t14;
18533
18506
  } else {
18534
- t15 = $[32];
18507
+ t14 = $[26];
18535
18508
  }
18536
- let t16;
18537
- if ($[33] !== t13 || $[34] !== t14 || $[35] !== t15) {
18538
- t16 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 flex flex-col gap-3 min-w-[240px]", children: [
18509
+ let t15;
18510
+ if ($[27] !== t12 || $[28] !== t13 || $[29] !== t14) {
18511
+ t15 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 flex flex-col gap-3 min-w-[240px]", children: [
18512
+ t12,
18539
18513
  t13,
18540
- t14,
18541
- t15
18514
+ t14
18542
18515
  ] });
18543
- $[33] = t13;
18544
- $[34] = t14;
18545
- $[35] = t15;
18546
- $[36] = t16;
18516
+ $[27] = t12;
18517
+ $[28] = t13;
18518
+ $[29] = t14;
18519
+ $[30] = t15;
18547
18520
  } else {
18548
- t16 = $[36];
18521
+ t15 = $[30];
18549
18522
  }
18550
- let t17;
18551
- if ($[37] !== onOpenChange || $[38] !== open || $[39] !== t12 || $[40] !== t16) {
18552
- t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Popover, { open, onOpenChange, modal: true, trigger: t12, children: t16 });
18553
- $[37] = onOpenChange;
18554
- $[38] = open;
18555
- $[39] = t12;
18556
- $[40] = t16;
18557
- $[41] = t17;
18523
+ let t16;
18524
+ if ($[31] !== onOpenChange || $[32] !== open || $[33] !== t11 || $[34] !== t15) {
18525
+ t16 = /* @__PURE__ */ jsxRuntime.jsx(ui.Popover, { open, onOpenChange, modal: true, trigger: t11, children: t15 });
18526
+ $[31] = onOpenChange;
18527
+ $[32] = open;
18528
+ $[33] = t11;
18529
+ $[34] = t15;
18530
+ $[35] = t16;
18558
18531
  } else {
18559
- t17 = $[41];
18532
+ t16 = $[35];
18560
18533
  }
18561
- return t17;
18534
+ return t16;
18562
18535
  }
18563
- function _temp3$3(option_0) {
18564
- return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: option_0.key, children: option_0.label }, option_0.key);
18536
+ function _temp3$3(option_1) {
18537
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: option_1.key, children: option_1.label }, option_1.key);
18565
18538
  }
18566
18539
  function _temp2$5(s) {
18567
18540
  return /* @__PURE__ */ jsxRuntime.jsx(ui.SelectItem, { value: s, className: "font-medium text-center", children: s.toUpperCase() }, s);
@@ -24562,24 +24535,26 @@
24562
24535
  propertyConfigs: customizationController.propertyConfigs,
24563
24536
  authController
24564
24537
  }), [collection, fullPath]);
24565
- const kanbanEnabled = React.useMemo(() => {
24566
- if (!collection.kanban?.columnProperty) return false;
24567
- const property_0 = getPropertyInPath(resolvedCollection.properties, collection.kanban.columnProperty);
24568
- if (!property_0 || !("dataType" in property_0) || property_0.dataType !== "string") return false;
24569
- return Boolean(property_0.enumValues);
24570
- }, [collection.kanban?.columnProperty, resolvedCollection.properties]);
24571
- const hasKanbanConfigPlugin = React.useMemo(() => {
24572
- return customizationController.plugins?.some((plugin_0) => plugin_0.collectionView?.KanbanSetupComponent) ?? false;
24573
- }, [customizationController.plugins]);
24538
+ const hasEnumProperty = React.useMemo(() => {
24539
+ const properties = resolvedCollection.properties;
24540
+ return Object.values(properties).some((prop) => prop && prop.dataType === "string" && prop.enumValues);
24541
+ }, [resolvedCollection.properties]);
24542
+ const enabledViews = React.useMemo(() => {
24543
+ const configured = collection.enabledViews ?? ["table", "cards", "kanban"];
24544
+ if (!hasEnumProperty) {
24545
+ return configured.filter((v) => v !== "kanban");
24546
+ }
24547
+ return configured;
24548
+ }, [collection.enabledViews, hasEnumProperty]);
24574
24549
  const kanbanPropertyOptions = React.useMemo(() => {
24575
24550
  const options = [];
24576
- const properties = resolvedCollection.properties;
24577
- for (const [key_0, property_1] of Object.entries(properties)) {
24578
- const prop = property_1;
24579
- if (prop && prop.dataType === "string" && prop.enumValues) {
24551
+ const properties_0 = resolvedCollection.properties;
24552
+ for (const [key_0, property_0] of Object.entries(properties_0)) {
24553
+ const prop_0 = property_0;
24554
+ if (prop_0 && prop_0.dataType === "string" && prop_0.enumValues) {
24580
24555
  options.push({
24581
24556
  key: key_0,
24582
- label: prop.name || key_0
24557
+ label: prop_0.name || key_0
24583
24558
  });
24584
24559
  }
24585
24560
  }
@@ -24607,11 +24582,11 @@
24607
24582
  }
24608
24583
  }
24609
24584
  }, [kanbanPropertyOptions, selectedKanbanProperty, getSavedKanbanProperty, collection.kanban?.columnProperty]);
24610
- const onKanbanPropertyChange = React.useCallback((property_2) => {
24611
- setSelectedKanbanProperty(property_2);
24585
+ const onKanbanPropertyChange = React.useCallback((property_1) => {
24586
+ setSelectedKanbanProperty(property_1);
24612
24587
  if (userConfigPersistence) {
24613
24588
  onCollectionModifiedForUser(fullPath, {
24614
- kanbanColumnProperty: property_2
24589
+ kanbanColumnProperty: property_1
24615
24590
  });
24616
24591
  }
24617
24592
  }, [userConfigPersistence, onCollectionModifiedForUser, fullPath]);
@@ -24726,15 +24701,15 @@
24726
24701
  }, [docsCount, fullPath, breadcrumbs.updateCount]);
24727
24702
  const countFetcher = /* @__PURE__ */ jsxRuntime.jsx(EntitiesCount, { fullPath, collection, filter: tableController.filterValues, sortBy: tableController.sortBy, onCountChange: setDocsCount });
24728
24703
  const buildAdditionalHeaderWidget = React.useCallback(({
24729
- property: property_3,
24704
+ property: property_2,
24730
24705
  propertyKey: propertyKey_1,
24731
24706
  onHover
24732
24707
  }) => {
24733
24708
  const collection_4 = collectionRef.current;
24734
24709
  if (!customizationController.plugins) return null;
24735
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: customizationController.plugins.filter((plugin_1) => plugin_1.collectionView?.HeaderAction).map((plugin_2, i) => {
24736
- const HeaderAction = plugin_2.collectionView.HeaderAction;
24737
- return /* @__PURE__ */ jsxRuntime.jsx(HeaderAction, { onHover, propertyKey: propertyKey_1, property: property_3, fullPath, collection: collection_4, tableController, parentCollectionIds: parentCollectionIds ?? [] }, `plugin_header_action_${i}`);
24710
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: customizationController.plugins.filter((plugin_0) => plugin_0.collectionView?.HeaderAction).map((plugin_1, i) => {
24711
+ const HeaderAction = plugin_1.collectionView.HeaderAction;
24712
+ return /* @__PURE__ */ jsxRuntime.jsx(HeaderAction, { onHover, propertyKey: propertyKey_1, property: property_2, fullPath, collection: collection_4, tableController, parentCollectionIds: parentCollectionIds ?? [] }, `plugin_header_action_${i}`);
24738
24713
  }) });
24739
24714
  }, [customizationController.plugins, fullPath, parentCollectionIds]);
24740
24715
  const addColumnComponentInternal = AddColumnComponent ? function() {
@@ -24752,11 +24727,11 @@
24752
24727
  parentCollectionIds
24753
24728
  });
24754
24729
  const [viewModePopoverOpen, setViewModePopoverOpen] = React.useState(false);
24755
- const viewModeToggleElement = /* @__PURE__ */ jsxRuntime.jsx(ViewModeToggle, { viewMode, onViewModeChange, kanbanEnabled, hasKanbanConfigPlugin, size: viewMode === "table" ? tableSize : viewMode === "cards" ? cardSize : void 0, onSizeChanged: viewMode === "table" ? onTableSizeChanged : viewMode === "cards" ? setCardSize : void 0, open: viewModePopoverOpen, onOpenChange: setViewModePopoverOpen, kanbanPropertyOptions, selectedKanbanProperty, onKanbanPropertyChange });
24730
+ const viewModeToggleElement = /* @__PURE__ */ jsxRuntime.jsx(ViewModeToggle, { viewMode, onViewModeChange, enabledViews, size: viewMode === "table" ? tableSize : viewMode === "cards" ? cardSize : void 0, onSizeChanged: viewMode === "table" ? onTableSizeChanged : viewMode === "cards" ? setCardSize : void 0, open: viewModePopoverOpen, onOpenChange: setViewModePopoverOpen, kanbanPropertyOptions, selectedKanbanProperty, onKanbanPropertyChange });
24756
24731
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("overflow-hidden h-full w-full rounded-md flex flex-col", className), ref: containerRef, children: [
24757
24732
  countFetcher,
24758
24733
  /* @__PURE__ */ jsxRuntime.jsx(CollectionTableToolbar, { loading: tableController.dataLoading, onTextSearch: textSearchEnabled && textSearchInitialised ? tableController.setSearchString : void 0, onTextSearchClick: textSearchEnabled && !textSearchInitialised ? onTextSearchClick : void 0, textSearchLoading, viewModeToggle: viewModeToggleElement, actionsStart: /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionViewStartActions, { parentCollectionIds: parentCollectionIds ?? [], collection, tableController, path: fullPath, relativePath: collection.path, selectionController: usedSelectionController, collectionEntitiesCount: docsCount, resolvedProperties: resolvedCollection.properties }), actions: /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionViewActions, { parentCollectionIds: parentCollectionIds ?? [], collection, tableController, onMultipleDeleteClick, onNewClick, path: fullPath, relativePath: collection.path, selectionController: usedSelectionController, selectionEnabled, collectionEntitiesCount: docsCount }) }),
24759
- viewMode === "kanban" && (kanbanEnabled || hasKanbanConfigPlugin) ? /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionBoardView, { collection, tableController, fullPath, parentCollectionIds, columnProperty: selectedKanbanProperty, onEntityClick, selectionController: usedSelectionController, selectionEnabled, highlightedEntities: highlightedEntity ? [highlightedEntity] : [], deletedEntities, emptyComponent: canCreateEntities && tableController.filterValues === void 0 && tableController.sortBy === void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center", children: [
24734
+ viewMode === "kanban" && enabledViews.includes("kanban") ? /* @__PURE__ */ jsxRuntime.jsx(EntityCollectionBoardView, { collection, tableController, fullPath, parentCollectionIds, columnProperty: selectedKanbanProperty, onEntityClick, selectionController: usedSelectionController, selectionEnabled, highlightedEntities: highlightedEntity ? [highlightedEntity] : [], deletedEntities, emptyComponent: canCreateEntities && tableController.filterValues === void 0 && tableController.sortBy === void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center", children: [
24760
24735
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", children: "So empty..." }),
24761
24736
  /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: onNewClick, className: "mt-4", children: [
24762
24737
  /* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, {}),
@@ -24783,8 +24758,8 @@
24783
24758
  });
24784
24759
  setLocalPropertiesOrder(newPropertiesOrder);
24785
24760
  if (customizationController?.plugins) {
24786
- customizationController.plugins.filter((plugin_3) => plugin_3.collectionView?.onColumnsReorder).forEach((plugin_4) => {
24787
- plugin_4.collectionView.onColumnsReorder({
24761
+ customizationController.plugins.filter((plugin_2) => plugin_2.collectionView?.onColumnsReorder).forEach((plugin_3) => {
24762
+ plugin_3.collectionView.onColumnsReorder({
24788
24763
  fullPath,
24789
24764
  parentCollectionIds: parentCollectionIds ?? [],
24790
24765
  collection,