js.documents 14.4.26 → 14.4.28

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.
@@ -60,8 +60,7 @@ function tryResolveName(candidates, ref, what, sql) {
60
60
  if (!ref.quoted) {
61
61
  const folded = candidates.filter((candidate) => candidate.toUpperCase() === ref.name);
62
62
  if (folded.length > 1) throw new require_odb_sql_errors.HsqldbSqlEvaluationError(`${what} "${ref.name}" is ambiguous—it matches ${folded.join(", ")} case-insensitively`, sql);
63
- const only = folded[0];
64
- if (only !== void 0) return only;
63
+ return folded[0];
65
64
  }
66
65
  }
67
66
  function resolveName(candidates, ref, what, sql) {
@@ -104,7 +103,7 @@ function tryResolveColumnIndex(columns, candidateIndices, ref, sql) {
104
103
  firstFolded ??= index;
105
104
  }
106
105
  if (foldedNames.length > 1) throw new require_odb_sql_errors.HsqldbSqlEvaluationError(`column "${ref.name}" is ambiguous—it matches ${foldedNames.join(", ")} case-insensitively`, sql);
107
- if (firstFolded !== void 0) return firstFolded;
106
+ return firstFolded;
108
107
  }
109
108
  }
110
109
  function resolveColumnIndex(columns, candidateIndices, ref, sql) {
@@ -133,29 +132,28 @@ var ColumnResolver = class {
133
132
  indexOf(ref) {
134
133
  const cached = this.cache.get(ref);
135
134
  if (cached !== void 0) return cached;
136
- let candidateIndices;
137
- if (ref.qualifier !== void 0) {
138
- const qualifierName = resolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
139
- candidateIndices = this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
140
- } else candidateIndices = this.columns.map((_column, index) => index);
141
- const index = resolveColumnIndex(this.columns, candidateIndices, ref.column, this.sql);
135
+ const qualifierName = ref.qualifier === void 0 ? void 0 : resolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
136
+ const index = resolveColumnIndex(this.columns, this.candidateIndicesFor(qualifierName), ref.column, this.sql);
142
137
  this.cache.set(ref, index);
143
138
  return index;
144
139
  }
145
140
  tryLocalIndexOf(ref) {
146
141
  const cached = this.cache.get(ref);
147
142
  if (cached !== void 0) return cached;
148
- let candidateIndices;
143
+ let qualifierName;
149
144
  if (ref.qualifier !== void 0) {
150
- const qualifierName = tryResolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
145
+ qualifierName = tryResolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
151
146
  if (qualifierName === void 0) return;
152
- candidateIndices = this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
153
- } else candidateIndices = this.columns.map((_column, index) => index);
154
- const index = tryResolveColumnIndex(this.columns, candidateIndices, ref.column, this.sql);
147
+ }
148
+ const index = tryResolveColumnIndex(this.columns, this.candidateIndicesFor(qualifierName), ref.column, this.sql);
155
149
  if (index === void 0) return;
156
150
  this.cache.set(ref, index);
157
151
  return index;
158
152
  }
153
+ candidateIndicesFor(qualifierName) {
154
+ if (qualifierName === void 0) return this.columns.map((_column, index) => index);
155
+ return this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
156
+ }
159
157
  valueAt(index, row) {
160
158
  return valueAtIndex(row, index, this.sql);
161
159
  }
@@ -59,8 +59,7 @@ function tryResolveName(candidates, ref, what, sql) {
59
59
  if (!ref.quoted) {
60
60
  const folded = candidates.filter((candidate) => candidate.toUpperCase() === ref.name);
61
61
  if (folded.length > 1) throw new HsqldbSqlEvaluationError(`${what} "${ref.name}" is ambiguous—it matches ${folded.join(", ")} case-insensitively`, sql);
62
- const only = folded[0];
63
- if (only !== void 0) return only;
62
+ return folded[0];
64
63
  }
65
64
  }
66
65
  function resolveName(candidates, ref, what, sql) {
@@ -103,7 +102,7 @@ function tryResolveColumnIndex(columns, candidateIndices, ref, sql) {
103
102
  firstFolded ??= index;
104
103
  }
105
104
  if (foldedNames.length > 1) throw new HsqldbSqlEvaluationError(`column "${ref.name}" is ambiguous—it matches ${foldedNames.join(", ")} case-insensitively`, sql);
106
- if (firstFolded !== void 0) return firstFolded;
105
+ return firstFolded;
107
106
  }
108
107
  }
109
108
  function resolveColumnIndex(columns, candidateIndices, ref, sql) {
@@ -132,29 +131,28 @@ var ColumnResolver = class {
132
131
  indexOf(ref) {
133
132
  const cached = this.cache.get(ref);
134
133
  if (cached !== void 0) return cached;
135
- let candidateIndices;
136
- if (ref.qualifier !== void 0) {
137
- const qualifierName = resolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
138
- candidateIndices = this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
139
- } else candidateIndices = this.columns.map((_column, index) => index);
140
- const index = resolveColumnIndex(this.columns, candidateIndices, ref.column, this.sql);
134
+ const qualifierName = ref.qualifier === void 0 ? void 0 : resolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
135
+ const index = resolveColumnIndex(this.columns, this.candidateIndicesFor(qualifierName), ref.column, this.sql);
141
136
  this.cache.set(ref, index);
142
137
  return index;
143
138
  }
144
139
  tryLocalIndexOf(ref) {
145
140
  const cached = this.cache.get(ref);
146
141
  if (cached !== void 0) return cached;
147
- let candidateIndices;
142
+ let qualifierName;
148
143
  if (ref.qualifier !== void 0) {
149
- const qualifierName = tryResolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
144
+ qualifierName = tryResolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
150
145
  if (qualifierName === void 0) return;
151
- candidateIndices = this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
152
- } else candidateIndices = this.columns.map((_column, index) => index);
153
- const index = tryResolveColumnIndex(this.columns, candidateIndices, ref.column, this.sql);
146
+ }
147
+ const index = tryResolveColumnIndex(this.columns, this.candidateIndicesFor(qualifierName), ref.column, this.sql);
154
148
  if (index === void 0) return;
155
149
  this.cache.set(ref, index);
156
150
  return index;
157
151
  }
152
+ candidateIndicesFor(qualifierName) {
153
+ if (qualifierName === void 0) return this.columns.map((_column, index) => index);
154
+ return this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
155
+ }
158
156
  valueAt(index, row) {
159
157
  return valueAtIndex(row, index, this.sql);
160
158
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js.documents",
3
- "version": "14.4.26",
3
+ "version": "14.4.28",
4
4
  "description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -77,21 +77,21 @@
77
77
  ],
78
78
  "license": "MIT",
79
79
  "dependencies": {
80
- "archive-codec": "1.11.19",
81
- "byte-codec": "2.0.0",
82
- "doc-codec": "6.1.11",
80
+ "archive-codec": "1.11.20",
81
+ "byte-codec": "2.0.1",
82
+ "doc-codec": "6.1.13",
83
83
  "document-schema.js": "7.15.1",
84
- "epub-codec": "5.1.6",
84
+ "epub-codec": "5.1.7",
85
85
  "fflate": "0.8.3",
86
- "markdown-codec": "11.1.5",
87
- "odf.js": "11.1.6",
88
- "ooxml.js": "12.2.19",
89
- "pdf-codec": "5.2.23",
90
- "ppt-codec": "2.2.10",
91
- "rtf-codec": "8.1.11",
86
+ "markdown-codec": "11.1.6",
87
+ "odf.js": "11.1.7",
88
+ "ooxml.js": "12.2.21",
89
+ "pdf-codec": "5.2.24",
90
+ "ppt-codec": "2.2.12",
91
+ "rtf-codec": "8.1.13",
92
92
  "temml": "0.13.4",
93
- "wpd-codec": "5.1.12",
94
- "xls-codec": "4.15.32",
93
+ "wpd-codec": "5.1.14",
94
+ "xls-codec": "4.15.34",
95
95
  "zod": "4.4.3"
96
96
  },
97
97
  "devDependencies": {