@dra2020/dra-types 1.8.123 → 1.8.125

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.
@@ -43,6 +43,9 @@ export interface DatasetMeta {
43
43
  votingAge?: boolean;
44
44
  nhAlone?: boolean;
45
45
  privateKey?: string;
46
+ restrict?: {
47
+ [key: string]: boolean;
48
+ };
46
49
  members?: {
47
50
  [key: number]: string;
48
51
  };
@@ -77,6 +80,9 @@ export interface Dataset {
77
80
  groups?: G.GroupMapIndex;
78
81
  labels?: string[];
79
82
  }
83
+ export declare function datasetRestrict(ds: Dataset): {
84
+ [key: string]: boolean;
85
+ };
80
86
  export type DatasetIndex = {
81
87
  [id: string]: Dataset;
82
88
  };
package/dist/dra-types.js CHANGED
@@ -1405,7 +1405,7 @@ exports.StateNameMap = {
1405
1405
 
1406
1406
 
1407
1407
  Object.defineProperty(exports, "__esModule", ({ value: true }));
1408
- exports.isColorBy = exports.parseColorBy = exports.formColorBy = exports.sortFields = void 0;
1408
+ exports.datasetRestrict = exports.isColorBy = exports.parseColorBy = exports.formColorBy = exports.sortFields = void 0;
1409
1409
  function sortFields(f1, f2) {
1410
1410
  return (f1.order || 0) - (f2.order || 0);
1411
1411
  }
@@ -1430,6 +1430,12 @@ function isColorBy(colorby) {
1430
1430
  exports.isColorBy = isColorBy;
1431
1431
  ;
1432
1432
  ;
1433
+ function datasetRestrict(ds) {
1434
+ if (ds && ds.id && ds.meta && ds.meta[ds.id] && ds.meta[ds.id].restrict)
1435
+ return ds.meta[ds.id].restrict;
1436
+ return null;
1437
+ }
1438
+ exports.datasetRestrict = datasetRestrict;
1433
1439
 
1434
1440
 
1435
1441
  /***/ }),
@@ -1831,9 +1837,12 @@ function aggregatePackedFields(agg, pf) {
1831
1837
  }
1832
1838
  exports.aggregatePackedFields = aggregatePackedFields;
1833
1839
  function aggregateCount(agg) {
1834
- if (!agg || !agg[''])
1840
+ // If we have multiple packedfieldarrays, all of them track the aggregate in zero spot.
1841
+ // So we just pick the one that happens to be come up first.
1842
+ if (!agg)
1835
1843
  return 0;
1836
- return agg[''][0];
1844
+ let pfa = baseclient_1.Util.nthProperty(agg);
1845
+ return pfa ? pfa[0] : 0;
1837
1846
  }
1838
1847
  exports.aggregateCount = aggregateCount;
1839
1848
  function decrementPackedFields(agg, pf) {