ochre-sdk 0.22.1 → 0.22.2

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.d.mts CHANGED
@@ -1139,19 +1139,23 @@ type WebElementComponent = {
1139
1139
  title: string | null;
1140
1140
  };
1141
1141
  };
1142
- displayedProperties: Array<{
1143
- uuid: string;
1144
- label: string;
1145
- }> | null;
1146
- variant: Extract<WebElementComponent, {
1147
- component: "collection";
1148
- }>["variant"];
1149
- paginationVariant: Extract<WebElementComponent, {
1150
- component: "collection";
1151
- }>["paginationVariant"];
1152
- layout: Extract<WebElementComponent, {
1153
- component: "collection";
1154
- }>["layout"];
1142
+ collectionProperties: {
1143
+ displayedProperties: Extract<WebElementComponent, {
1144
+ component: "collection";
1145
+ }>["displayedProperties"];
1146
+ variant: Extract<WebElementComponent, {
1147
+ component: "collection";
1148
+ }>["variant"];
1149
+ paginationVariant: Extract<WebElementComponent, {
1150
+ component: "collection";
1151
+ }>["paginationVariant"];
1152
+ loadingVariant: Extract<WebElementComponent, {
1153
+ component: "collection";
1154
+ }>["loadingVariant"];
1155
+ layout: Extract<WebElementComponent, {
1156
+ component: "collection";
1157
+ }>["layout"];
1158
+ };
1155
1159
  } | {
1156
1160
  component: "search-bar";
1157
1161
  queryVariant: "submit" | "change";
package/dist/index.mjs CHANGED
@@ -4703,6 +4703,8 @@ function parseWebElementProperties(componentProperty, elementResource) {
4703
4703
  variant ??= "detailed";
4704
4704
  let paginationVariant = getPropertyValueContentByLabel(componentProperty.properties, "pagination-variant");
4705
4705
  paginationVariant ??= "default";
4706
+ let loadingVariant = getPropertyValueContentByLabel(componentProperty.properties, "loading-variant");
4707
+ loadingVariant ??= "spinner";
4706
4708
  let layout = getPropertyValueContentByLabel(componentProperty.properties, "layout");
4707
4709
  layout ??= "image-start";
4708
4710
  properties = {
@@ -4710,13 +4712,16 @@ function parseWebElementProperties(componentProperty, elementResource) {
4710
4712
  linkUuids: setLinks.map((link) => link.uuid).filter((uuid) => uuid !== null),
4711
4713
  items,
4712
4714
  options,
4713
- displayedProperties: displayedProperties?.values.filter((value) => value.uuid !== null).map((value) => ({
4714
- uuid: value.uuid,
4715
- label: value.content?.toString() ?? ""
4716
- })) ?? null,
4717
- variant,
4718
- paginationVariant,
4719
- layout
4715
+ collectionProperties: {
4716
+ displayedProperties: displayedProperties?.values.filter((value) => value.uuid !== null).map((value) => ({
4717
+ uuid: value.uuid,
4718
+ label: value.content?.toString() ?? ""
4719
+ })) ?? null,
4720
+ variant,
4721
+ paginationVariant,
4722
+ loadingVariant,
4723
+ layout
4724
+ }
4720
4725
  };
4721
4726
  break;
4722
4727
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ochre-sdk",
3
- "version": "0.22.1",
3
+ "version": "0.22.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",