@entryscape/rdforms 10.13.3 → 10.13.5

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/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "application profile",
9
9
  "linked data"
10
10
  ],
11
- "version": "10.13.3",
11
+ "version": "10.13.5",
12
12
  "main": "dist/rdforms.node.js",
13
13
  "browser": "dist/rdforms.react.js",
14
14
  "module": "main.js",
@@ -554,6 +554,10 @@ export default class Item {
554
554
  return `'${this.getLabel()}' (${detailsArr.join(', ')})`;
555
555
  }
556
556
 
557
+ getHash() {
558
+ return `i_${this._internalId}`;
559
+ }
560
+
557
561
  //= ==================================================
558
562
  // Inherited methods
559
563
  //= ==================================================
@@ -191,6 +191,12 @@ export default class ItemStore {
191
191
  // eslint-disable-next-line class-methods-use-this
192
192
  createExtendedSource(origSource, extSource) {
193
193
  const newSource = Object.assign({}, origSource, extSource);
194
+ if (extSource.id === undefined) {
195
+ // If no new id is provided in the original source,
196
+ // don't inherit the id of the extention as then
197
+ // it will be overwrite it in the ItemStore
198
+ delete newSource.id;
199
+ }
194
200
  if (extSource.enhanced) {
195
201
  let keys;
196
202
  if (extSource.enhanced === true) {
@@ -73,7 +73,7 @@ const ItemTooltip = (props) => {
73
73
  props.item.getEditDescriptionMap() || props.item.getDescriptionMap() : props.item.getDescriptionMap()
74
74
  || (property ? '' : props.context.view.messages.info_missing || '');
75
75
  const description = utils.getLocalizedValue(descriptionMap, props.context.view.getLocale()).value;
76
- const tooltipId = `tt_${props.binding.getHash()}`;
76
+ const tooltipId = `tt_${props.binding ? props.binding.getHash() : props.item.getHash()}`;
77
77
 
78
78
  return (
79
79
  <ClickAwayListener onClickAway={handleTooltipClose}>
@@ -136,10 +136,10 @@ renderingContext.renderPresenterLabel = (rowNode, binding, item, context) => {
136
136
  <h2 tabIndex="0" id={labelId} className="rdformsLabelRow"><span className={rdformsLabel} role={role}>{label}</span></h2> :
137
137
  <span tabIndex="0" id={labelId} className="rdformsLabelRow"><span className={rdformsLabel} role={role}>{label}</span></span>;
138
138
  if (context.view.popupOnLabel) {
139
- rowNode.appendChild(<Fragment key={`${binding ? binding.getHash() : item._internalId}_label` }><ItemTooltip
139
+ rowNode.appendChild(<Fragment key={`${binding ? binding.getHash() : item.getHash()}_label` }><ItemTooltip
140
140
  context={context} item={item} binding={binding}>{label}</ItemTooltip>{description}</Fragment>);
141
141
  } else {
142
- rowNode.appendChild(<Fragment key={`${binding ? binding.getHash() : item._internalId}_label` }>{label}{description}</Fragment>);
142
+ rowNode.appendChild(<Fragment key={`${binding ? binding.getHash() : item.getHash()}_label` }>{label}{description}</Fragment>);
143
143
  }
144
144
  };
145
145