@immense/vue-pom-generator 1.0.34 → 1.0.35

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.mjs CHANGED
@@ -5601,14 +5601,23 @@ Fix: remove the explicit ${attrLabel}, or change existingIdBehavior to "overwrit
5601
5601
  upsertAttribute(element, "option-data-testid-prefix", optionDataTestIdPrefixValue);
5602
5602
  }
5603
5603
  const nativeRole = nativeWrappers[element.tag]?.role ?? element.tag;
5604
- const primarySemanticHint = semanticNameHint || conditionalHint || void 0;
5605
- const alternates = nameCollisionBehavior === "error" && semanticNameHint && conditionalHint ? [`${semanticNameHint} ${conditionalHint}`] : void 0;
5604
+ const wrapperHintCandidates = [
5605
+ semanticNameHint,
5606
+ getStaticAttributeContent(element, "title"),
5607
+ getStaticAttributeContent(element, "label"),
5608
+ getStaticAttributeContent(element, "okTitle"),
5609
+ getStaticAttributeContent(element, "cancelTitle"),
5610
+ getStaticAttributeContent(element, "id") || getStaticAttributeContent(element, "name"),
5611
+ getInnerText(element) || null,
5612
+ nameCollisionBehavior === "error" && semanticNameHint && conditionalHint ? `${semanticNameHint} ${conditionalHint}` : conditionalHint
5613
+ ].map((value) => (value ?? "").trim()).filter(Boolean).filter((value, index, values) => values.indexOf(value) === index);
5614
+ const [primarySemanticHint, ...alternates] = wrapperHintCandidates;
5606
5615
  const pomMergeKey = semanticNameHint && conditionalMergeGroupKey ? `wrapper:ifgroup:${conditionalMergeGroupKey}:model:${semanticNameHint}` : void 0;
5607
5616
  applyResolvedDataTestIdForElement({
5608
5617
  preferredGeneratedValue: nativeWrappersValue,
5609
5618
  nativeRoleOverride: nativeRole,
5610
5619
  semanticNameHint: primarySemanticHint,
5611
- semanticNameHintAlternates: alternates,
5620
+ semanticNameHintAlternates: alternates.length ? alternates : void 0,
5612
5621
  pomMergeKey
5613
5622
  });
5614
5623
  return;