@inf-monkeys-tech/monkeys-design 2.0.436 → 2.0.437

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.
@@ -298,6 +298,28 @@ export const DirectoryViewCapabilityRenderer: DesignCapabilityRenderer = ({
298
298
  (action) => !row.actionIds || row.actionIds.includes(action.id),
299
299
  );
300
300
  if (!allowed.length) return null;
301
+ if (allowed.length === 1 && !allowed[0].destructive) {
302
+ const [action] = allowed;
303
+ const pending = Boolean(pendingActionInvocations?.length);
304
+ return (
305
+ <BaseButton
306
+ variant="solid"
307
+ label={translate(action.labelKey)}
308
+ loading={pending}
309
+ disabled={pending || action.disabled}
310
+ onPointerDown={(event) => event.stopPropagation()}
311
+ onKeyDown={(event) => event.stopPropagation()}
312
+ onClick={(event) => {
313
+ event.preventDefault();
314
+ event.stopPropagation();
315
+ void emitIntent("capability.directory-view.row-action", {
316
+ rowId: row.id,
317
+ actionId: action.id,
318
+ });
319
+ }}
320
+ />
321
+ );
322
+ }
301
323
  return (
302
324
  <DropdownMenu>
303
325
  <DropdownMenuTrigger asChild>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inf-monkeys-tech/monkeys-design",
3
- "version": "2.0.436",
3
+ "version": "2.0.437",
4
4
  "description": "Monkeys Design Components Library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -380,5 +380,5 @@
380
380
  ],
381
381
  "license": "MIT",
382
382
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
383
- "monkeysReleaseCommit": "1f9d1cf20a4fa5823fd7fe0d5edcbb3651d234ad"
383
+ "monkeysReleaseCommit": "5d61a5421f4e3c8cbc6256a72f20ba8ccb02dd7e"
384
384
  }