@trebco/treb 32.6.4 → 32.6.6

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trebco/treb",
3
- "version": "32.6.4",
3
+ "version": "32.6.6",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "homepage": "https://treb.app",
6
6
  "repository": {
@@ -166,23 +166,22 @@ export enum ValueType {
166
166
  // OK we use it all the time now
167
167
  object = 5,
168
168
 
169
+ function = 6, // why was this inserted in the middle?
170
+
169
171
  // error is a STRING VALUE... object errors are layered on top? is that
170
172
  // correct? (...) it sort of makes sense... since we have separate typing
171
- error = 6,
173
+ error = 7,
172
174
 
173
175
  // complex is pretty stable by now
174
- complex = 7,
176
+ complex = 8,
175
177
 
176
178
  // this is new though. this is not a cell value, it's
177
179
  // only for union types. perhaps we should move or rename
178
180
  // this array, and then cells could have a subset?
179
- array = 8,
181
+ array = 9,
180
182
 
181
183
  // adding DQ to union
182
- dimensioned_quantity = 9,
183
-
184
- // new for lambdas
185
- function = 10,
184
+ dimensioned_quantity = 10,
186
185
 
187
186
  }
188
187
 
@@ -366,9 +366,9 @@ export const BaseFunctionLibrary: FunctionMap = {
366
366
 
367
367
  if (integer) {
368
368
  const range = max - min + 1;
369
- for (let i = 0; i < rows; i++) {
369
+ for (let i = 0; i < columns; i++) {
370
370
  const row: UnionValue[] = [];
371
- for (let j = 0; j < columns; j++) {
371
+ for (let j = 0; j < rows; j++) {
372
372
  row.push({
373
373
  type: ValueType.number,
374
374
  value: Math.floor(Math.random() * range + min),
@@ -380,9 +380,9 @@ export const BaseFunctionLibrary: FunctionMap = {
380
380
  else {
381
381
  const range = max - min;
382
382
 
383
- for (let i = 0; i < rows; i++) {
383
+ for (let i = 0; i < columns; i++) {
384
384
  const row: UnionValue[] = [];
385
- for (let j = 0; j < columns; j++) {
385
+ for (let j = 0; j < rows; j++) {
386
386
  row.push({
387
387
  type: ValueType.number,
388
388
  value: Math.random() * range + min,
@@ -391,7 +391,7 @@ export const BaseFunctionLibrary: FunctionMap = {
391
391
  value.push(row);
392
392
  }
393
393
  }
394
-
394
+
395
395
  return {
396
396
  type: ValueType.array,
397
397
  value,
@@ -486,7 +486,7 @@ export const StatisticsFunctionLibrary: FunctionMap = {
486
486
  'Norm.S.Inv': {
487
487
  description: 'Inverse of the standard normal cumulative distribution',
488
488
  arguments: [
489
- {name: 'probability'},
489
+ {name: 'probability', unroll: true },
490
490
  ],
491
491
  xlfn: true,
492
492
  fn: (q: number): UnionValue => {
@@ -105,7 +105,14 @@ export class DataModel {
105
105
  }
106
106
 
107
107
  const sheet = this.sheets.ID(sheet_name);
108
- return this.named.Get_(parts[1], sheet || 0, true); // require scope in this case
108
+
109
+ // Q: why require scope in this case? if there _is_ a global name,
110
+ // and no scoped name, why not return that? that seems to be the
111
+ // behavior in excel, although I can't be sure
112
+
113
+ // test: default false
114
+
115
+ return this.named.Get_(parts[1], sheet || 0, false); // true); // require scope in this case
109
116
 
110
117
 
111
118
  }
@@ -201,14 +201,17 @@ export class NamedRangeManager {
201
201
  * that implies that if there are both, we'll prefer the scoped name.
202
202
  *
203
203
  * now possible to require scope, for qualified scoped names
204
+ *
205
+ * Q: why require scope? what's the benefit of that? (...)
206
+ *
204
207
  */
205
208
  public Get_(name: string, scope: number, require_scope = false) {
206
-
209
+
207
210
  if (require_scope) {
208
211
  return this.named.get(this.ScopedName(name, scope));
209
212
  }
210
213
 
211
- return this.named.get(this.ScopedName(name, scope)) || this.named.get(name.toLowerCase());
214
+ return this.named.get(this.ScopedName(name, scope)) ?? this.named.get(name.toLowerCase());
212
215
  }
213
216
 
214
217
  /**
@@ -59,6 +59,12 @@
59
59
  margin: 0;
60
60
  overflow-x: scroll;
61
61
  overflow-y: hidden;
62
+
63
+ scrollbar-width: none; /* For Firefox */
64
+ &::-webkit-scrollbar {
65
+ display: none;
66
+ }
67
+
62
68
  }
63
69
 
64
70
  &[hidden] {