cedar-embeddable-editor 2.0.7 → 2.0.8

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/CHANGELOG.md CHANGED
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Changed
11
+
12
+ - The download menu names each entry by the artifact it produces, then the serialization:
13
+ `Template - YAML`, `Template - Compact YAML`, `Template - JSON Schema`, `Instance - YAML`,
14
+ `Instance - Compact YAML`, `Instance - JSON-LD`. It lists the three template downloads before the
15
+ three instance downloads, with the data quality report last.
16
+
17
+ - Compact YAML downloads retain the template's root ID but omit the IDs of nested fields and
18
+ elements. Full YAML downloads continue to carry the complete identity tree.
19
+
20
+ ## [2.0.8] - 2026-09-08
21
+
22
+ This release builds against the public `cedar-model-typescript-library@1.0.7` package, which
23
+ confines an artifact's identity in compact YAML to the document root.
24
+
25
+ ### Changed
26
+
27
+ - Compact YAML downloads carry the root artifact's identifier alone. The identifiers of nested
28
+ fields and elements belong to the full YAML form, which continues to carry the complete identity
29
+ tree.
30
+
10
31
  ## [2.0.7] - 2026-09-06
11
32
 
12
33
  This release builds against the public `cedar-model-typescript-library@1.0.6` package, the same
package/README.md CHANGED
@@ -2,31 +2,112 @@
2
2
 
3
3
  [![Test](https://github.com/metadatacenter/cedar-embeddable-editor/actions/workflows/test.yml/badge.svg?branch=develop)](https://github.com/metadatacenter/cedar-embeddable-editor/actions/workflows/test.yml)
4
4
 
5
- The CEDAR Embeddable Editor (CEE) is a reusable Web Component for adding
6
- structured, standards-based metadata authoring to web applications.
5
+ The CEDAR Embeddable Editor (CEE) puts a metadata entry form inside a web
6
+ application without anyone hand-writing that form. The host page supplies a
7
+ template, and the CEE renders the fields the template calls for, checks what the
8
+ user enters against the template's constraints, and returns the finished record
9
+ as structured metadata in JSON-LD or YAML.
10
+
11
+ A template describes the metadata to collect, not the interface that collects it.
12
+ It names the fields, their types and cardinalities, which of them repeat, and
13
+ which draw their values from a controlled vocabulary or from an identifier
14
+ authority such as ORCID or ROR. A platform can therefore adopt or revise a
15
+ metadata standard by editing a template rather than by rewriting a form. The
16
+ record that comes back preserves those bindings, since a controlled term carries
17
+ its IRI beside its label and an authority field carries its persistent
18
+ identifier.
19
+
20
+ Templates follow the model defined by CEDAR, the metadata infrastructure
21
+ maintained by the Stanford Division of Computational Medicine. Rendering a form
22
+ needs neither a CEDAR account nor a running CEDAR installation. The CEE ships as
23
+ a single JavaScript file defining a standard Web Component, so it embeds in a
24
+ plain HTML page as readily as in an Angular, React, or Ember application.
25
+
26
+ ## Documentation
27
+
28
+ The [CEDAR Embeddable Editor documentation](https://metadatacenter.readthedocs.io/en/latest/cedar-embeddable-editor/)
29
+ covers embedding the component in a page or a framework, configuring it,
30
+ controlled terms and external identifiers, validation, appearance, and security.
31
+
32
+ [Your First Embedded Editor](https://metadatacenter.readthedocs.io/en/latest/cedar-embeddable-editor/first-editor/)
33
+ assembles a working page from the bundle, one element, and a template.
34
+ [Templates and Metadata](https://metadatacenter.readthedocs.io/en/latest/cedar-embeddable-editor/templates-and-metadata/)
35
+ gives the input properties, the output properties, and the change event a host
36
+ reads.
37
+
38
+ For the design rationale, the architecture, and deployments in research
39
+ platforms, see [*Author Once, Publish Everywhere: Portable Metadata Authoring
40
+ with the CEDAR Embeddable Editor*](https://doi.org/10.5334/dsj-2026-002),
41
+ published in the *Data Science Journal* (2026).
42
+
43
+ ## Installing
7
44
 
8
- The CEE dynamically renders data-entry forms from machine-actionable CEDAR
9
- templates and produces semantically rich metadata as JSON-LD. Templates define
10
- the fields, constraints, controlled vocabularies, and repeatable structures in a
11
- form, allowing the metadata-authoring experience to evolve independently of the
12
- application that embeds it. The CEE also supports ontology-backed value selection
13
- and persistent identifiers from external authorities such as ORCID and ROR.
45
+ Releases are published to npmjs.org as
46
+ [`cedar-embeddable-editor`](https://www.npmjs.com/package/cedar-embeddable-editor)
47
+ under the `latest` tag, the public stable channel, so an embedder installs the
48
+ current release by name:
49
+
50
+ ```shell
51
+ npm install cedar-embeddable-editor
52
+ ```
53
+
54
+ To see which release that is, without depending on a version copied into a
55
+ document that can go stale:
56
+
57
+ ```shell
58
+ npm view cedar-embeddable-editor version
59
+ ```
60
+
61
+ The package holds `cedar-embeddable-editor.js`, the self-contained bundle, and
62
+ `cedar-embeddable-editor.d.ts`, the declarations for the element and its public
63
+ API. Copy the bundle to the application's static assets and load it with a
64
+ regular `<script>` tag. The bundle loads as a classic script, not as an ES
65
+ module.
66
+
67
+ ## Embedding
68
+
69
+ A host page needs the bundle, one `<cedar-embeddable-editor>` element, and a
70
+ template:
14
71
 
15
- For the design rationale, architecture, and deployments in research platforms,
16
- see [*Author Once, Publish Everywhere: Portable Metadata Authoring with the CEDAR
17
- Embeddable Editor*](https://doi.org/10.5334/dsj-2026-002), published in the
18
- *Data Science Journal* (2026).
72
+ ```html
73
+ <cedar-embeddable-editor></cedar-embeddable-editor>
19
74
 
20
- For embedding and using the CEE in a web application, see the
21
- [CEDAR Embeddable Editor documentation](https://metadatacenter.readthedocs.io/en/latest/cedar-embeddable-editor/).
75
+ <script src="/assets/cedar-embeddable-editor.js"></script>
76
+ <script type="module">
77
+ const template = await (await fetch('/assets/dataset-template.json')).json();
78
+
79
+ await customElements.whenDefined('cedar-embeddable-editor');
80
+ const cee = document.querySelector('cedar-embeddable-editor');
81
+
82
+ cee.config = {
83
+ terminologyBaseUrl: 'https://terminology.metadatacenter.org/',
84
+ bridgeBaseUrl: 'https://bridge.metadatacenter.org/',
85
+ };
86
+
87
+ cee.templateObject = template;
88
+ </script>
89
+ ```
22
90
 
23
- This README covers developing, building, and testing the component.
91
+ Templates, instances, and configuration are JavaScript objects, so a host assigns
92
+ them as properties rather than as attributes. Waiting for
93
+ `customElements.whenDefined()` guarantees the element exists. Set `config` before
94
+ the form is built, and assign `templateObject` last, which renders it. The two
95
+ service URLs are needed only for controlled-term and external-authority lookups.
96
+
97
+ Read the record back from `currentMetadata` as CEDAR JSON-LD, or from
98
+ `currentMetadataYaml` as YAML. The CEE neither submits nor stores it. The host
99
+ decides when and where a record is saved.
100
+
101
+ [Your First Embedded Editor](https://metadatacenter.readthedocs.io/en/latest/cedar-embeddable-editor/first-editor/)
102
+ takes the same page apart step by step, and
103
+ [Embedding in a Framework](https://metadatacenter.readthedocs.io/en/latest/cedar-embeddable-editor/frameworks/)
104
+ covers Angular, React, and Ember.
24
105
 
25
106
  ## Building the Web Component
26
107
 
27
- The CEE is shipped as one JavaScript file that can be embedded in an application or
28
- HTML page. Do not concatenate named Angular output files manually: their names,
29
- locations, and module structure change when Angular changes builders.
108
+ One command produces the single file an embedder loads. Do not concatenate named
109
+ Angular output files manually: their names, locations, and module structure change
110
+ when Angular changes builders.
30
111
 
31
112
  Build the production application, then run the browser suite against the
32
113
  single-file bundle it produced:
@@ -157,33 +238,12 @@ The unit tests run in Node and do not use `TestBed` or Angular's JIT compiler.
157
238
  Browser behavior belongs in the Playwright suite under `visual/`, which tests the
158
239
  shipped bundle rather than the sources.
159
240
 
160
- ## Running
161
-
162
- ### As an `npm` package
163
-
164
- Releases are published to npmjs.org as
165
- [`cedar-embeddable-editor`](https://www.npmjs.com/package/cedar-embeddable-editor)
166
- under the `latest` tag, so an embedder installs the current one by name:
167
-
168
- ```shell
169
- npm install cedar-embeddable-editor
170
- ```
171
-
172
- The `latest` tag is the public stable channel. To see the current release without
173
- depending on a version copied into this README:
174
-
175
- ```shell
176
- npm view cedar-embeddable-editor version
177
- ```
178
-
179
- ### As a standalone application
180
-
181
- You can run the CEE as a standalone application. This is helpful for developers to
182
- see changes to the code reflected immediately in the application.
241
+ ## Running the Standalone Application
183
242
 
184
- Proceed with the following steps:
243
+ The CEE also runs on its own, outside any host page, which shows a change to the
244
+ sources immediately in a browser.
185
245
 
186
- #### Clone the repository
246
+ ### Clone the repository
187
247
 
188
248
  Clone this repository onto a local directory of your choice:
189
249
 
@@ -191,7 +251,7 @@ Clone this repository onto a local directory of your choice:
191
251
  git clone https://github.com/metadatacenter/cedar-embeddable-editor.git
192
252
  ```
193
253
 
194
- #### Edit configuration
254
+ ### Edit configuration
195
255
 
196
256
  Open the standalone application's configuration file, `src/app/app.component.dev.ts`.
197
257
  This minimal configuration enables lookups through the public CEDAR services:
@@ -209,7 +269,7 @@ For a different CEDAR deployment, replace both URLs with its service URLs. See
209
269
  the [configuration documentation](https://metadatacenter.readthedocs.io/en/latest/cedar-embeddable-editor/configuration/)
210
270
  for all available settings.
211
271
 
212
- #### Build the project and start the server
272
+ ### Build the project and start the server
213
273
 
214
274
  1. Navigate to the CEE directory:
215
275
 
@@ -4,6 +4,6 @@
4
4
  "main.js",
5
5
  "polyfills.js"
6
6
  ],
7
- "bytes": 2205194,
8
- "sha256": "ea0c239e5d5991255c516e044c6c6eefb0460e0dcd67abce49f7ca01a12d57c2"
7
+ "bytes": 2205237,
8
+ "sha256": "a612682e7af1d69d477bb503990c50ccccd07431d0b7ef91e4268581e2491fdd"
9
9
  }