@nubitio/hydra 0.1.0 → 0.2.1

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/dist/index.cjs CHANGED
@@ -586,7 +586,7 @@ function mapHydraSchemaToFields(schema, urlLookup, schemaLookup) {
586
586
  }
587
587
  if (!readable) continue;
588
588
  const hydraTitle = fieldSchema["hydra:title"];
589
- const label = hydraTitle && hydraTitle.trim() !== "" ? hydraTitle : toLabel(name);
589
+ const label = hydraTitle && hydraTitle.trim() !== "" && hydraTitle !== name ? hydraTitle : toLabel(name);
590
590
  const filterable = filterableProperties.size === 0 ? true : filterableProperties.has(name);
591
591
  if (!writeable) {
592
592
  const field = {
package/dist/index.mjs CHANGED
@@ -562,7 +562,7 @@ function mapHydraSchemaToFields(schema, urlLookup, schemaLookup) {
562
562
  }
563
563
  if (!readable) continue;
564
564
  const hydraTitle = fieldSchema["hydra:title"];
565
- const label = hydraTitle && hydraTitle.trim() !== "" ? hydraTitle : toLabel(name);
565
+ const label = hydraTitle && hydraTitle.trim() !== "" && hydraTitle !== name ? hydraTitle : toLabel(name);
566
566
  const filterable = filterableProperties.size === 0 ? true : filterableProperties.has(name);
567
567
  if (!writeable) {
568
568
  const field = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nubitio/hydra",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Hydra / OpenAPI adapter for @nubitio/crud — automatic schema discovery and data source from API Platform docs.",
6
6
  "license": "MIT",
@@ -50,7 +50,7 @@
50
50
  "react": "^19.0.0",
51
51
  "react-dom": "^19.0.0",
52
52
  "react-i18next": "^14.0.0",
53
- "@nubitio/core": "^0.1.0",
54
- "@nubitio/crud": "^0.1.0"
53
+ "@nubitio/core": "^0.2.1",
54
+ "@nubitio/crud": "^0.2.1"
55
55
  }
56
56
  }