Skip to content

Version Packages#199

Merged
IzumiSy merged 1 commit into
mainfrom
changeset-release/main
Apr 23, 2026
Merged

Version Packages#199
IzumiSy merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 22, 2026

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@tailor-platform/app-shell@0.36.0

Minor Changes

  • e2a6f81: Add Attachment component and useAttachment hook for ERP attachment workflows with drag-and-drop upload, image/file previews, and per-item Download/Delete actions.

    Use useAttachment to manage upload/delete state locally and flush operations to your backend on submit via applyChanges. Spread the returned props directly onto <Attachment />.

    import { Attachment, useAttachment } from "@tailor-platform/app-shell";
    import type { AttachmentOperation } from "@tailor-platform/app-shell";
    
    const { props, applyChanges } = useAttachment({
      initialItems: existingAttachments,
      accept: "image/*,.pdf",
    });
    
    async function handleSubmit() {
      // The component is agnostic to backend shape — run all operations in parallel.
      await applyChanges((operations) =>
        Promise.all(
          operations.map((op) => {
            if (op.type === "upload") return uploadToServer(op.file);
            if (op.type === "delete") return deleteFromServer(op.item.id);
          })
        )
      );
    }
    
    <Attachment {...props} uploadLabel="Upload" onDownload={handleDownload} />;

@github-actions github-actions Bot force-pushed the changeset-release/main branch from 34bb43f to e984cb2 Compare April 22, 2026 07:20
@IzumiSy IzumiSy merged commit 81cc6d1 into main Apr 23, 2026
@IzumiSy IzumiSy deleted the changeset-release/main branch April 23, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant