@bigbinary/neeto-folders-frontend 2.0.40 → 2.0.42
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/.ready +1 -1
- package/dist/cjs/v2/components.js +42 -29
- package/dist/cjs/v2/components.js.map +1 -1
- package/dist/v2/components.js +43 -30
- package/dist/v2/components.js.map +1 -1
- package/package.json +10 -10
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-
|
|
1
|
+
Built at 2026-07-02T04:53:18.709Z
|
|
@@ -23,6 +23,7 @@ var formik = require('@bigbinary/neeto-atoms/formik');
|
|
|
23
23
|
var i18next = require('i18next');
|
|
24
24
|
var yup = require('yup');
|
|
25
25
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
26
|
+
var primitives = require('@bigbinary/neeto-atoms/primitives');
|
|
26
27
|
var useHotkeys = require('@bigbinary/neeto-hotkeys');
|
|
27
28
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
28
29
|
var ramda = require('ramda');
|
|
@@ -413,6 +414,9 @@ var Node$2 = /*#__PURE__*/React.forwardRef(Node$1);
|
|
|
413
414
|
var _excluded$5 = ["folder", "item", "depth", "maxDepth", "disabled", "config"];
|
|
414
415
|
function ownKeys$i(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
415
416
|
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
417
|
+
var toRadioValue = function toRadioValue(id) {
|
|
418
|
+
return id == null ? "__root__" : String(id);
|
|
419
|
+
};
|
|
416
420
|
var _SelectableNode = function SelectableNode(_ref) {
|
|
417
421
|
var _folder$children$leng, _folder$children;
|
|
418
422
|
var folder = _ref.folder,
|
|
@@ -423,8 +427,8 @@ var _SelectableNode = function SelectableNode(_ref) {
|
|
|
423
427
|
disabled = _ref.disabled,
|
|
424
428
|
config = _ref.config,
|
|
425
429
|
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
426
|
-
|
|
427
|
-
onSelect = rest.onSelect;
|
|
430
|
+
rest.selection;
|
|
431
|
+
var onSelect = rest.onSelect;
|
|
428
432
|
var _useTranslation = injectCss.useTranslation(config),
|
|
429
433
|
t = _useTranslation.t;
|
|
430
434
|
var isDisabled = disabled || (item === null || item === void 0 ? void 0 : item.id) === folder.id || depth >= maxDepth;
|
|
@@ -457,11 +461,10 @@ var _SelectableNode = function SelectableNode(_ref) {
|
|
|
457
461
|
folderLabel: folderLabel,
|
|
458
462
|
itemLabel: itemLabel
|
|
459
463
|
})), {}, {
|
|
460
|
-
icon: /*#__PURE__*/jsxRuntime.jsx(
|
|
461
|
-
readOnly: true,
|
|
462
|
-
checked: selection === folder.id,
|
|
464
|
+
icon: /*#__PURE__*/jsxRuntime.jsx(primitives.RadioGroupItem, {
|
|
463
465
|
"data-testid": "".concat(neetoCist.hyphenate(folder.name), "-folder-option"),
|
|
464
|
-
|
|
466
|
+
disabled: isDisabled,
|
|
467
|
+
value: toRadioValue(folder.id)
|
|
465
468
|
}),
|
|
466
469
|
onClick: isDisabled ? neetoCist.noop : function () {
|
|
467
470
|
return onSelect(folder);
|
|
@@ -565,31 +568,36 @@ var PaneBody = function PaneBody(_ref) {
|
|
|
565
568
|
}
|
|
566
569
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
567
570
|
children: [/*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Sheet.Header, {
|
|
568
|
-
className: "flex items-center justify-between",
|
|
571
|
+
className: "flex flex-row items-center justify-between",
|
|
569
572
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Sheet.Title, {
|
|
570
573
|
children: t("moveToFolder.title")
|
|
571
574
|
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
572
|
-
className: "
|
|
575
|
+
className: "absolute end-12 top-3",
|
|
573
576
|
"data-testid": "add-new-folder-button",
|
|
574
577
|
label: t("folders.add"),
|
|
575
|
-
|
|
578
|
+
size: "sm",
|
|
579
|
+
variant: "outline",
|
|
576
580
|
onClick: onAddFolder
|
|
577
581
|
})]
|
|
578
582
|
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Sheet.Body, {
|
|
579
583
|
className: "pb-6",
|
|
580
|
-
children:
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
584
|
+
children: /*#__PURE__*/jsxRuntime.jsx(primitives.RadioGroup, {
|
|
585
|
+
className: "contents",
|
|
586
|
+
value: toRadioValue(selection),
|
|
587
|
+
children: tree.map(function (folder) {
|
|
588
|
+
return /*#__PURE__*/React.createElement(_SelectableNode, {
|
|
589
|
+
config: config,
|
|
590
|
+
folder: folder,
|
|
591
|
+
item: item,
|
|
592
|
+
maxDepth: maxDepth,
|
|
593
|
+
selection: selection,
|
|
594
|
+
disabled: (item === null || item === void 0 ? void 0 : item.id) === folder.id || maxDepth <= 0,
|
|
595
|
+
key: folder.id,
|
|
596
|
+
onSelect: function onSelect(folder) {
|
|
597
|
+
return setSelection(folder.id);
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
})
|
|
593
601
|
})
|
|
594
602
|
}), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Sheet.Footer, {
|
|
595
603
|
className: "space-x-2",
|
|
@@ -816,7 +824,7 @@ var RearrangeFoldersPane = function RearrangeFoldersPane(_ref) {
|
|
|
816
824
|
});
|
|
817
825
|
var nodeProps = {
|
|
818
826
|
icon: /*#__PURE__*/jsxRuntime.jsx(lucideReact.GripVertical, {
|
|
819
|
-
className: "text-muted-foreground relative -start-[0.3125rem] flex-shrink-0"
|
|
827
|
+
className: "text-muted-foreground relative -start-[0.3125rem] size-4 flex-shrink-0"
|
|
820
828
|
})
|
|
821
829
|
};
|
|
822
830
|
if (isFetching) {
|
|
@@ -1097,7 +1105,7 @@ var ReorderFoldersPane = function ReorderFoldersPane(_ref) {
|
|
|
1097
1105
|
});
|
|
1098
1106
|
var nodeProps = {
|
|
1099
1107
|
icon: /*#__PURE__*/jsxRuntime.jsx(lucideReact.GripVertical, {
|
|
1100
|
-
className: "text-muted-foreground relative -start-[0.3125rem] flex-shrink-0"
|
|
1108
|
+
className: "text-muted-foreground relative -start-[0.3125rem] size-4 flex-shrink-0"
|
|
1101
1109
|
})
|
|
1102
1110
|
};
|
|
1103
1111
|
if (isFetching) {
|
|
@@ -1195,6 +1203,7 @@ var FoldersPane = function FoldersPane(_ref) {
|
|
|
1195
1203
|
onClose: onClose,
|
|
1196
1204
|
initialFocusRef: setFocusField,
|
|
1197
1205
|
isOpen: !!type,
|
|
1206
|
+
size: "large",
|
|
1198
1207
|
children: [(type === "edit" || type === "add") && /*#__PURE__*/jsxRuntime.jsx(AddEditPane, _objectSpread$c({}, _objectSpread$c({
|
|
1199
1208
|
setFocusField: setFocusField
|
|
1200
1209
|
}, commonProps))), type === "move" && /*#__PURE__*/jsxRuntime.jsx(MoveFolderPane, _objectSpread$c({}, commonProps)), type === "reorder" && /*#__PURE__*/jsxRuntime.jsx(ReorderPaneComponent, _objectSpread$c({}, commonProps))]
|
|
@@ -1303,13 +1312,16 @@ var FolderTile = function FolderTile(_ref) {
|
|
|
1303
1312
|
})]
|
|
1304
1313
|
}), /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
|
|
1305
1314
|
menuItems: menuItems,
|
|
1306
|
-
dropdownButtonProps: {
|
|
1307
|
-
className: "absolute end-2 top-2"
|
|
1308
|
-
},
|
|
1309
1315
|
dropdownProps: {
|
|
1310
1316
|
onClick: function onClick(event) {
|
|
1311
1317
|
return event.preventDefault();
|
|
1312
1318
|
}
|
|
1319
|
+
},
|
|
1320
|
+
dropdownButtonProps: {
|
|
1321
|
+
className: "absolute end-2 top-2",
|
|
1322
|
+
onClick: function onClick(event) {
|
|
1323
|
+
return event.preventDefault();
|
|
1324
|
+
}
|
|
1313
1325
|
}
|
|
1314
1326
|
})]
|
|
1315
1327
|
}));
|
|
@@ -1404,7 +1416,7 @@ var FoldersList = function FoldersList(_ref) {
|
|
|
1404
1416
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1405
1417
|
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
1406
1418
|
className: "my-3",
|
|
1407
|
-
variant: "
|
|
1419
|
+
variant: "h6",
|
|
1408
1420
|
children: t("folders.title")
|
|
1409
1421
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1410
1422
|
className: "neeto-folders-grid-view-wrapper mb-10 grid w-full gap-4",
|
|
@@ -1457,6 +1469,7 @@ var MoveToFolderPane = function MoveToFolderPane(_ref) {
|
|
|
1457
1469
|
return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Sheet, {
|
|
1458
1470
|
isOpen: isOpen,
|
|
1459
1471
|
onClose: onClose,
|
|
1472
|
+
size: "large",
|
|
1460
1473
|
children: /*#__PURE__*/jsxRuntime.jsx(PaneBody, _objectSpread$8({}, _objectSpread$8(_objectSpread$8({}, rest), {}, {
|
|
1461
1474
|
onClose: onClose
|
|
1462
1475
|
})))
|
|
@@ -1846,7 +1859,7 @@ var TreeSelect = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
1846
1859
|
});
|
|
1847
1860
|
TreeSelect.displayName = "TreeSelect";
|
|
1848
1861
|
|
|
1849
|
-
var css = ".neeto-sidebar-folders-tree__folder-node{color:inherit!important}.neeto-
|
|
1862
|
+
var css = ".neeto-sidebar-folders-tree__folder-node{color:inherit!important}.neeto-folders-grid-view-wrapper{grid-template-columns:repeat(auto-fill,minmax(256px,1fr))}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3NyYy92Mi9jb21wb25lbnRzL25lZXRvLWZvbGRlcnMtbmFuby5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVFBLHlDQUNFLHVCQVBGLENBVUEsaUNBQ0UseURBUEYiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBUaGUgbmVldG8tYXRvbXMgVHJlZSBpcyByZWFjdC1hcmJvcmlzdCBiYXNlZCBhbmQgZW1pdHMgbm8gYC5hbnQtdHJlZWBcbi8vIG1hcmt1cCwgc28gdGhlIGFudGQtc2NvcGVkIHJ1bGVzIGZyb20gdGhlIG5lZXRvLXVpIHZlcnNpb24gKG5vZGUgc3BhY2luZyxcbi8vIHNlbGVjdGVkL2hvdmVyIHN0eWxpbmcsIHN3aXRjaGVyIHR3ZWFrcykgbm8gbG9uZ2VyIG1hdGNoIGFueXRoaW5nIGhlcmUuXG4vLyBUaGV5IGFsc28gY2FycmllZCB0aGUgbGFzdCBsZWdhY3kgbmVldG8tdWkgQ1NTIHZhcmlhYmxlcyBpbiB0aGlzIGZpbGU7IHRoZVxuLy8gYXRvbXMgVHJlZSBvd25zIGl0cyBvd24gc2VsZWN0aW9uL2hvdmVyIHN0eWxpbmcgYW5kIHRoZSBub2RlIGFjdGlvbnMgbm93IGZhZGUgaW5cbi8vIHZpYSBgb3BhY2l0eS0wIGdyb3VwLWhvdmVyOm9wYWNpdHktMTAwYCBvbiB0aGUgZWxlbWVudCBpdHNlbGYsIHNvIG9ubHkgdGhlXG4vLyB0d28gc2VsZWN0b3JzIGJlbG93IHJlbWFpbiBsaXZlLlxuXG4ubmVldG8tc2lkZWJhci1mb2xkZXJzLXRyZWVfX2ZvbGRlci1ub2RlIHtcbiAgY29sb3I6IGluaGVyaXQgIWltcG9ydGFudDtcbn1cblxuLm5lZXRvLWZvbGRlcnMtZ3JpZC12aWV3LXdyYXBwZXIge1xuICBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IHJlcGVhdChhdXRvLWZpbGwsIG1pbm1heCgyNTZweCwgMWZyKSk7XG59XG4iXX0= */";
|
|
1850
1863
|
injectCss.n(css,{});
|
|
1851
1864
|
|
|
1852
1865
|
exports.AddEditPane = AddEditPane;
|