@immense/vue-pom-generator 1.0.87 → 1.0.89

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
@@ -2985,6 +2985,7 @@ Fix: either (1) include ${bestKeyPreservePlaceholder} in your :${attrLabel} temp
2985
2985
  case "radio":
2986
2986
  case "grid":
2987
2987
  case "link":
2988
+ case "tab":
2988
2989
  return role;
2989
2990
  default:
2990
2991
  return void 0;
@@ -3602,53 +3603,6 @@ function buildPomGeneratedPropertyName(pom) {
3602
3603
  function buildPomGeneratedActionName(pom) {
3603
3604
  return requireStructuredPomName(pom.generatedActionName, "generatedActionName", pom);
3604
3605
  }
3605
- const STANDALONE_WRAPPER_FALLBACK_ROLES = /* @__PURE__ */ new Set([
3606
- "button",
3607
- "input",
3608
- "select",
3609
- "vselect",
3610
- "checkbox",
3611
- "toggle",
3612
- "radio",
3613
- "link"
3614
- ]);
3615
- function stripTrailingAsciiDigits(value) {
3616
- let end = value.length;
3617
- while (end > 0 && isAsciiDigitCode(value.charCodeAt(end - 1))) {
3618
- end -= 1;
3619
- }
3620
- return value.slice(0, end);
3621
- }
3622
- function matchesStandaloneWrapperFallbackMethodName(methodName, componentClassName) {
3623
- let normalizedMethodName = methodName;
3624
- if (normalizedMethodName.endsWith("ByKey")) {
3625
- normalizedMethodName = normalizedMethodName.slice(0, -"ByKey".length);
3626
- }
3627
- normalizedMethodName = stripTrailingAsciiDigits(normalizedMethodName);
3628
- return normalizedMethodName === componentClassName;
3629
- }
3630
- function shouldSuppressStandaloneWrapperFallbackSurface(componentName, dependencies) {
3631
- if (dependencies.isView || (dependencies.pomExtraMethods?.length ?? 0) > 0) {
3632
- return false;
3633
- }
3634
- const entries = Array.from(dependencies.dataTestIdSet ?? []);
3635
- if (!entries.length) {
3636
- return false;
3637
- }
3638
- const primaryEntries = entries.filter((entry) => {
3639
- return !!entry.pom && entry.pom.emitPrimary !== false;
3640
- });
3641
- if (!primaryEntries.length || primaryEntries.length !== entries.length) {
3642
- return false;
3643
- }
3644
- const componentClassName = toPascalCase(componentName.endsWith(".vue") ? componentName.slice(0, -4) : componentName);
3645
- if (!componentClassName) {
3646
- return false;
3647
- }
3648
- return primaryEntries.every(({ pom }) => {
3649
- return STANDALONE_WRAPPER_FALLBACK_ROLES.has(pom.nativeRole) && matchesStandaloneWrapperFallbackMethodName(pom.methodName, componentClassName);
3650
- });
3651
- }
3652
3606
  function safeRealpath(value) {
3653
3607
  try {
3654
3608
  if (fs.existsSync(value)) {
@@ -5112,11 +5066,7 @@ async function generateFiles(componentHierarchyMap, vueFilesPathMap, basePageCla
5112
5066
  componentDirs,
5113
5067
  layoutDirs
5114
5068
  }) : void 0);
5115
- const emittableComponentHierarchyMap = new Map(
5116
- Array.from(componentHierarchyMap.entries()).filter(([componentName, dependencies]) => {
5117
- return !shouldSuppressStandaloneWrapperFallbackSurface(componentName, dependencies);
5118
- })
5119
- );
5069
+ const emittableComponentHierarchyMap = componentHierarchyMap;
5120
5070
  const generatedFilePaths = [];
5121
5071
  const writeGeneratedFile = (file) => {
5122
5072
  const resolvedFilePath = path.resolve(file.filePath);
@@ -8006,7 +7956,7 @@ Fix: remove the explicit ${attrLabel}, or change existingIdBehavior to "overwrit
8006
7956
  }
8007
7957
  if (existingElementDataTestId) {
8008
7958
  const inferredRole = getNativeRoleFromTagSuffix().toLowerCase();
8009
- const isRecognizedInteractiveRole = inferredRole === "button" || inferredRole === "input" || inferredRole === "select" || inferredRole === "vselect" || inferredRole === "checkbox" || inferredRole === "toggle" || inferredRole === "radio" || inferredRole === "grid" || inferredRole === "link" || isComponentLikeTag(element.tag);
7959
+ const isRecognizedInteractiveRole = inferredRole === "button" || inferredRole === "input" || inferredRole === "select" || inferredRole === "vselect" || inferredRole === "checkbox" || inferredRole === "toggle" || inferredRole === "radio" || inferredRole === "grid" || inferredRole === "link" || inferredRole === "tab" || isComponentLikeTag(element.tag);
8010
7960
  if (!isRecognizedInteractiveRole) {
8011
7961
  return;
8012
7962
  }
@@ -8886,7 +8836,7 @@ function getManifestEntry(componentName, entry, componentMetadata, extraMethods)
8886
8836
  };
8887
8837
  }
8888
8838
  function buildPomManifest(componentHierarchyMap, elementMetadata) {
8889
- const manifestEntries = Array.from(componentHierarchyMap.entries()).filter(([componentName, dependencies]) => !shouldSuppressStandaloneWrapperFallbackSurface(componentName, dependencies)).sort((a, b) => a[0].localeCompare(b[0])).map(([componentName, dependencies]) => {
8839
+ const manifestEntries = Array.from(componentHierarchyMap.entries()).sort((a, b) => a[0].localeCompare(b[0])).map(([componentName, dependencies]) => {
8890
8840
  const entries = Array.from(dependencies.dataTestIdSet).sort((a, b) => a.selectorValue.formatted.localeCompare(b.selectorValue.formatted)).map((entry) => getManifestEntry(componentName, entry, elementMetadata.get(componentName), dependencies.pomExtraMethods ?? []));
8891
8841
  if (!entries.length) {
8892
8842
  return null;