# XWUIDBDocumentsBrowser

A browse/insert/delete view for the documents in one collection, mirroring KEYSTONE's `/databases/:db/collections/:name` page. A schema-driven `enterprise/XWUIDataGrid` renders one column per field (with enc/idx header pills) and is JSON-aware for KEYSTONE envelope objects (`$guid`, `$b64`, `$dt`, `$td`, `$dec`); a summary strip totals rows/fields/encrypted/indexed/primary-key. When `canInsert`/`canDelete` are set, an Insert dialog (JSON textarea pre-seeded from the field schema) and per-row Delete confirm appear, wired to `onInsert(doc)` / `onDelete(key)`.

## Basic Usage

A tenant-prod `users` collection with four fields (guid `id`, encrypted `email`, indexed `is_active`, `created_at`) and three documents mixing scalars, booleans, and `$guid`/`$dt` envelope objects, with insert and delete enabled and mock callbacks.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: A users-collection browser with an encrypted email field, envelope-object cells, and insert/delete enabled.
```

## Orders Ledger

A read-only finance-audit view of an orders collection that exercises the `$dec` (decimal money) and `$td` (duration) envelope renderers.

```example
file: examples/OrdersLedger.ts
html: examples/OrdersLedger.html
title: Orders Ledger
description: A read-only orders browser whose rows use $dec money totals and $td processing durations alongside $guid and $dt envelopes.
```

## Encrypted Patients

A compliance admin's PHI-heavy patients collection, dense with "enc" header pills and a `$b64` binary consent-scan column, with insert and delete enabled.

```example
file: examples/EncryptedPatients.ts
html: examples/EncryptedPatients.html
title: Encrypted Patients
description: A patients-collection browser with five encrypted fields, a truncated $b64 blob column, and an insert dialog seeded from the schema.
```

```api
```
