Skip to content

Commit

Permalink
refactor: simplify and also shrink Focus Nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Feb 2, 2024
1 parent 7f27129 commit 8dc7cc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
4 changes: 2 additions & 2 deletions packages/app/src/lib/components/error-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ function renderSummary({ focusNodes, ...top }, customPrefixes) {
${[...focusNodes].map(
([focusNode, { properties, errors }]) => html`
<li>
${focusNode.value}:
${shrink(focusNode.value, customPrefixes) || focusNode.value}:
<ul>
${errors.map(renderResult)}
${[...properties].map(
([property, messages]) => html`
<li>
${shrink(property.value, customPrefixes) == "" ? property.value : shrink(property.value, customPrefixes)}:
${shrink(property.value, customPrefixes) || property.value}:
<ul>
${messages.map(renderResult)}
</ul>
Expand Down
16 changes: 2 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@
resolved "https://registry.yarnpkg.com/@webcomponents/shadycss/-/shadycss-1.11.1.tgz#add19d5e0db4a014e143d2278921347dcd8f0a55"
integrity sha512-qSok/oMynEgS99wFY5fKT6cR1y64i01RkHGYOspkh2JQsLSM8pjciER+gu3fqTx589y/7LoSuyB5G9Rh7dyXaQ==

"@zazuko/rdf-vocabularies@>=2023.01.17":
"@zazuko/rdf-vocabularies@>=2023.01.17", "@zazuko/rdf-vocabularies@^2023.1.19":
version "2023.1.19"
resolved "https://registry.yarnpkg.com/@zazuko/rdf-vocabularies/-/rdf-vocabularies-2023.1.19.tgz#545da0172b5963a7dea4e1cb9942e312c2724577"
integrity sha512-/vC/Ok8etIi4kflbOAoRr9JV95auJaUREV9lrWP3wDEMfhu8jVYogwi/OD1yA2pH6KIYPS2+z7LN1jxOe3G56g==
Expand All @@ -1695,18 +1695,6 @@
readable-stream "^3.6.0"
string-to-stream "^3.0.1"

"@zazuko/rdf-vocabularies@^2021.3.31":
version "2021.9.22"
resolved "https://registry.yarnpkg.com/@zazuko/rdf-vocabularies/-/rdf-vocabularies-2021.9.22.tgz#6d342e663e2a1104f7a53c5ccb3da5b2167850eb"
integrity sha512-BHiNfex7Apt0EibtLHrPYv9dimYtsWZfVBKHtv4s58EtONwW2cLODUC8HFrlwre5G4EDq5gDehEHTjWCPFReHw==
dependencies:
"@rdfjs/parser-n3" "^1.1.4"
commander "^5.0.0"
pkg-dir "^5.0.0"
rdf-ext "^1.3.1"
readable-stream "^3.6.0"
string-to-stream "^3.0.1"

"@zazuko/s@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@zazuko/s/-/s-1.0.0.tgz#dc07617676af9f00f3a93e78224c969584ce0b4b"
Expand Down Expand Up @@ -4755,7 +4743,7 @@ rdf-data-factory@^1.1.0:
dependencies:
"@rdfjs/types" "*"

rdf-ext@^1.3.1, rdf-ext@^1.3.5:
rdf-ext@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/rdf-ext/-/rdf-ext-1.3.5.tgz#89706abec64657d744b478d3a33d40fe5a6aa249"
integrity sha512-LS/waItwp5aGY9Ay7y147HxWLIaSvw4r172S995aGwVkvg0KwUA0NY8w61p/LoFdQ4V6mzxQdVoRN6x/6OaK0w==
Expand Down

0 comments on commit 8dc7cc2

Please sign in to comment.