@cccsaurora/clue-ui 1.5.0-dev.487 → 1.6.0-dev.524.1

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.
Files changed (63) hide show
  1. package/{ActionForm-DxbV_aLe.js → ActionForm-C1D2_1Pg.js} +6 -6
  2. package/{AnnotationDetails-EDZRnwin.js → AnnotationDetails-C683Hvym.js} +1 -1
  3. package/{AnnotationPreview-DfLcrcuH.js → AnnotationPreview-Bm9e2UgC.js} +1 -1
  4. package/{ClueEnrichContext-DUxJFS3j.js → ClueEnrichContext-DmERFjhQ.js} +3 -3
  5. package/components/AnnotationDetailPopover.js +3 -3
  6. package/components/AnnotationDetails.js +2 -2
  7. package/components/AnnotationPreview.js +1 -1
  8. package/components/EnrichedCard.js +1 -1
  9. package/components/EnrichedChip.js +3 -3
  10. package/components/EnrichedTypography.js +2 -2
  11. package/components/RetryFailedEnrichments.js +1 -1
  12. package/components/SourcePicker.js +1 -1
  13. package/components/actions/ActionForm.js +2 -2
  14. package/components/actions/ExecutePopover.js +1 -1
  15. package/components/actions/ResultModal.js +1 -1
  16. package/components/actions/formats/index.js +1 -1
  17. package/components/display/graph/elements/NodeCard.js +1 -1
  18. package/components/display/graph/index.js +2 -2
  19. package/components/display/graph/visualizations/cloud/index.js +3 -2
  20. package/components/display/graph/visualizations/icons/TargetIcon.js +0 -1
  21. package/components/display/graph/visualizations/tree/BundleLine.js +2 -1
  22. package/components/display/graph/visualizations/tree/index.js +1 -1
  23. package/components/display/json/index.js +1 -1
  24. package/components/display/markdown/index.js +87 -27
  25. package/components/enrichment/EnrichPopover.js +1 -1
  26. package/components/fetchers/Fetcher.js +1 -1
  27. package/components/fetchers/FetcherResultView.js +1 -1
  28. package/components/group/GroupControl.js +1 -1
  29. package/components/stats/QueryStatus.js +1 -1
  30. package/{index-CVUD9o3t.js → d3-CwtkB99t.js} +15024 -10621
  31. package/database/index.js +2 -2
  32. package/database/replication.js +2 -2
  33. package/hooks/ClueActionContext.js +2 -2
  34. package/hooks/ClueDatabaseContext.d.ts +1 -1
  35. package/hooks/ClueDatabaseContext.js +5 -1
  36. package/hooks/ClueEnrichContext.js +2 -2
  37. package/hooks/ClueFetcherContext.js +1 -1
  38. package/hooks/ClueGroupContext.js +1 -1
  39. package/hooks/CluePopupContext.js +2 -2
  40. package/hooks/ClueProvider.js +3 -3
  41. package/hooks/selectors.js +2 -2
  42. package/hooks/useActionResult.js +1 -1
  43. package/hooks/useAnnotations.js +2 -2
  44. package/hooks/useClue.js +1 -1
  45. package/hooks/useClueActions.js +1 -1
  46. package/hooks/useClueTypeConfig.js +1 -1
  47. package/hooks/useErrors.js +1 -1
  48. package/hooks/useFetcherResult.js +1 -1
  49. package/hooks/useMyHighlights.js +1 -1
  50. package/icons/Action.js +2 -2
  51. package/icons/Assessment.js +1 -1
  52. package/icons/Context.js +3 -3
  53. package/icons/Opinion.js +2 -2
  54. package/{index-DcMufc6R.js → index-Bx5giDpY.js} +730 -250
  55. package/{index-CARYR0Hw.js → index-D1tw5sJ1.js} +94 -27
  56. package/{index-DUEubgWN.js → index-D4JJWbGh.js} +2 -2
  57. package/{index-C8VMJ2QX.js → index-DzbOfIT_.js} +9 -7
  58. package/index.css +2 -11
  59. package/main.js +5 -5
  60. package/package.json +30 -40
  61. package/plugins/json/index.js +1 -1
  62. package/{replication-DzmbOO2P.js → replication-Bxa4yXXZ.js} +134 -50
  63. package/utils/time.js +8 -8
@@ -1,6 +1,6 @@
1
1
  import { d as debounce } from "./sessionStorage-B68y-wnE.js";
2
2
  import { i as isObject } from "./isObject-FTY-5JQX.js";
3
- import { aq as identity, aL as operate, W as createOperatorSubscriber, ax as isFunction, U as computeValue, b0 as truthy, H as assert, a4 as ensureArray, at as isArray, T as compare, V as createExpressionOperator, c as $eq$1, f as $gt$1, h as $gte$1, k as $lt$1, m as $lte$1, p as $ne$1, M as MingoError, ay as isFunction$1, X as createQueryOperator, $ as $all$1, al as getSchemaByObjectPath, aK as objectPathMonad, y as INDEX_MIN, I as INDEX_MAX, a5 as ensureNotFalsy, ag as getFromMapOrCreate, ai as getPrimaryFieldOfPrimaryKey, aS as requestIdleCallbackIfAvailable, B as BehaviorSubject, aG as mergeMap, aa as firstValueFrom, a8 as filter, ab as flatClone$1, a0 as createRxQuery, _ as _getDefaultQuery, aP as queryCollection, aH as newRxError, af as getDefaultRevision, aJ as now, aN as prepareQuery, aM as overwritable, az as isMaybeReadonlyArray, ac as flatCloneDocWithMeta, S as Subject, a_ as toArray, K as categorizeBulkWriteRows, aO as pushAtSortPosition, ak as getQueryMatcher, am as getSortComparator, P as PROMISE_RESOLVE_TRUE, z as PROMISE_RESOLVE_VOID, R as RXDB_VERSION, a6 as ensureRxStorageInstanceParamsAreCorrect, aQ as randomToken, a1 as deepEqual, aT as requestIdlePromiseNoQueue, a as $and$1, b as $elemMatch, d as $eq$2, e as $exists, g as $gt$2, i as $gte$2, j as $in, l as $lt$2, n as $lte$2, o as $mod, q as $ne$2, r as $nin, s as $nor, t as $not$1, u as $or$1, v as $regex, w as $size, x as $type, ar as initOptions, C as Context, Q as Query, b2 as walk, aU as resolve$1, au as isDate, aB as isObject$1, aD as isRegExp, O as cloneDeep, an as has, as as intersection, b1 as unique, aA as isNumber, aC as isOperator, av as isEqual, L as clone$1, aW as runQueryUpdateFunction, ae as getChangedDocumentsSince, aV as runPluginHooks, aX as setProperty, aF as merge, aY as shareReplay, A as RXJS_SHARE_REPLAY_DEFAULTS, aE as map, G as appendToArray, aj as getProperty, aZ as startWith, a3 as distinctUntilChanged, F as addRxPlugin, Y as createRxDatabase, aR as replicateSelectorCollection } from "./replication-DzmbOO2P.js";
3
+ import { aq as identity, aL as operate, W as createOperatorSubscriber, ax as isFunction, U as computeValue, b0 as truthy, H as assert, a4 as ensureArray, at as isArray, T as compare, V as createExpressionOperator, c as $eq$1, f as $gt$1, h as $gte$1, k as $lt$1, m as $lte$1, p as $ne$1, M as MingoError, ay as isFunction$1, X as createQueryOperator, $ as $all$1, al as getSchemaByObjectPath, aK as objectPathMonad, y as INDEX_MIN, I as INDEX_MAX, a5 as ensureNotFalsy, ag as getFromMapOrCreate, ai as getPrimaryFieldOfPrimaryKey, aS as requestIdleCallbackIfAvailable, B as BehaviorSubject, aG as mergeMap, aa as firstValueFrom, a8 as filter, ab as flatClone$1, a0 as createRxQuery, _ as _getDefaultQuery, aP as queryCollection, aH as newRxError, af as getDefaultRevision, aJ as now, aN as prepareQuery, aM as overwritable, az as isMaybeReadonlyArray, ac as flatCloneDocWithMeta, S as Subject, a_ as toArray, K as categorizeBulkWriteRows, aO as pushAtSortPosition, ak as getQueryMatcher, am as getSortComparator, P as PROMISE_RESOLVE_TRUE, z as PROMISE_RESOLVE_VOID, R as RXDB_VERSION, a6 as ensureRxStorageInstanceParamsAreCorrect, aQ as randomToken, a1 as deepEqual, aT as requestIdlePromiseNoQueue, a as $and$1, b as $elemMatch, d as $eq$2, e as $exists, g as $gt$2, i as $gte$2, j as $in, l as $lt$2, n as $lte$2, o as $mod, q as $ne$2, r as $nin, s as $nor, t as $not$1, u as $or$1, v as $regex, w as $size, x as $type, ar as initOptions, C as Context, Q as Query, b2 as walk, aU as resolve$1, au as isDate, aB as isObject$1, aD as isRegExp, O as cloneDeep, an as has, as as intersection, b1 as unique, aA as isNumber, aC as isOperator, av as isEqual, L as clone$1, aW as runQueryUpdateFunction, ae as getChangedDocumentsSince, aV as runPluginHooks, aX as setProperty, aF as merge, aY as shareReplay, A as RXJS_SHARE_REPLAY_DEFAULTS, aE as map, G as appendToArray, aj as getProperty, aZ as startWith, a3 as distinctUntilChanged, F as addRxPlugin, Y as createRxDatabase, aR as replicateSelectorCollection } from "./replication-Bxa4yXXZ.js";
4
4
  import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.js";
5
5
  import { REPLICATE } from "./utils/constants.js";
6
6
  import { REPLICATORS } from "./database/globals.js";
@@ -379,6 +379,37 @@ function requireUtils() {
379
379
  }
380
380
  return output.join("");
381
381
  }
382
+ function removeDotSegmentsRelative(path) {
383
+ if (path === "" || path[0] === "/") {
384
+ return removeDotSegments(path);
385
+ }
386
+ const segments = path.split("/");
387
+ const last = segments.length - 1;
388
+ const output = [];
389
+ let trailingDirectory = false;
390
+ for (let i = 0; i <= last; i++) {
391
+ const segment = segments[i];
392
+ if (segment === "." || segment === "..") {
393
+ if (segment === "..") {
394
+ if (output.length !== 0 && output[output.length - 1] !== "..") {
395
+ output.pop();
396
+ } else {
397
+ output.push("..");
398
+ }
399
+ }
400
+ trailingDirectory = i === last;
401
+ } else {
402
+ output.push(segment);
403
+ }
404
+ }
405
+ if (trailingDirectory && output[output.length - 1] !== "..") {
406
+ output.push("");
407
+ }
408
+ if (output.length === 0 || output[0] === "" || output[0].includes(":")) {
409
+ output.unshift(".");
410
+ }
411
+ return output.join("/");
412
+ }
382
413
  const HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
383
414
  const HOST_DELIM_RE = /[@/?#:]/g;
384
415
  const HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
@@ -639,6 +670,7 @@ function requireUtils() {
639
670
  encodeFragment,
640
671
  escapePreservingEscapes,
641
672
  removeDotSegments,
673
+ removeDotSegmentsRelative,
642
674
  isIPv4,
643
675
  isUUID,
644
676
  normalizeIPv6,
@@ -861,16 +893,18 @@ var hasRequiredFastUri;
861
893
  function requireFastUri() {
862
894
  if (hasRequiredFastUri) return fastUri.exports;
863
895
  hasRequiredFastUri = 1;
864
- const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = requireUtils();
896
+ const { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = requireUtils();
865
897
  const { SCHEMES, getSchemeHandler } = requireSchemes();
866
898
  const VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
867
899
  const MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
868
- function decodeValidScheme(scheme) {
869
- const decodedScheme = unescape(String(scheme));
870
- if (!VALID_SCHEME.test(decodedScheme)) {
900
+ const MALFORMED_HOST_ERROR = "URI host is malformed.";
901
+ const FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
902
+ function validateScheme(scheme) {
903
+ const stringScheme = String(scheme);
904
+ if (!VALID_SCHEME.test(stringScheme)) {
871
905
  throw new TypeError(MALFORMED_SCHEME_ERROR);
872
906
  }
873
- return decodedScheme;
907
+ return stringScheme;
874
908
  }
875
909
  function normalize(uri2, options) {
876
910
  if (typeof uri2 === "string") {
@@ -907,6 +941,9 @@ function requireFastUri() {
907
941
  const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
908
942
  const resolvedHost = resolved.host;
909
943
  const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
944
+ if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
945
+ throw new Error(MALFORMED_HOST_ERROR);
946
+ }
910
947
  canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
911
948
  const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
912
949
  if (resolved.error && !encodedASCIIHost) {
@@ -948,14 +985,15 @@ function requireFastUri() {
948
985
  if (relative.path[0] === "/") {
949
986
  target.path = removeDotSegments(relative.path);
950
987
  } else {
951
- if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
988
+ const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
989
+ if (baseHasAuthority && !base.path) {
952
990
  target.path = "/" + relative.path;
953
991
  } else if (!base.path) {
954
992
  target.path = relative.path;
955
993
  } else {
956
994
  target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
957
995
  }
958
- target.path = removeDotSegments(target.path);
996
+ target.path = base.scheme === void 0 && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
959
997
  }
960
998
  target.query = relative.query;
961
999
  }
@@ -993,12 +1031,13 @@ function requireFastUri() {
993
1031
  const options = Object.assign({}, opts);
994
1032
  const uriTokens = [];
995
1033
  if (component.scheme) {
996
- component.scheme = decodeValidScheme(component.scheme);
1034
+ component.scheme = validateScheme(component.scheme);
997
1035
  }
998
1036
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
999
1037
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
1000
1038
  const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
1001
- const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
1039
+ const schemelessReference = (component.scheme === void 0 || options.reference === "suffix") && !hasAuthority;
1040
+ const pathNoScheme = !options.skipEscape && schemelessReference;
1002
1041
  if (component.path !== void 0) {
1003
1042
  if (!options.skipEscape) {
1004
1043
  component.path = serializePathEncoding(component.path, pathNoScheme);
@@ -1007,7 +1046,7 @@ function requireFastUri() {
1007
1046
  }
1008
1047
  }
1009
1048
  if (options.reference !== "suffix" && component.scheme) {
1010
- component.scheme = decodeValidScheme(component.scheme);
1049
+ component.scheme = validateScheme(component.scheme);
1011
1050
  uriTokens.push(component.scheme, ":");
1012
1051
  }
1013
1052
  const authority = recomposeAuthority(component);
@@ -1023,9 +1062,9 @@ function requireFastUri() {
1023
1062
  if (component.path !== void 0) {
1024
1063
  let s = component.path;
1025
1064
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
1026
- s = removeDotSegments(s);
1065
+ s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
1027
1066
  }
1028
- if (pathNoScheme) {
1067
+ if (schemelessReference) {
1029
1068
  s = serializePathEncoding(s, true);
1030
1069
  }
1031
1070
  if (authority === void 0 && s[0] === "/" && s[1] === "/") {
@@ -1072,16 +1111,34 @@ function requireFastUri() {
1072
1111
  return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
1073
1112
  }
1074
1113
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
1114
+ if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
1115
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
1116
+ return true;
1117
+ }
1075
1118
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
1119
+ let url;
1076
1120
  try {
1077
- parsed.host = new URL("http://" + parsed.host).hostname;
1121
+ url = new URL("http://" + parsed.host);
1078
1122
  } catch (e) {
1079
1123
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
1080
1124
  return true;
1081
1125
  }
1126
+ if (!isHostOnlyURL(url)) {
1127
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
1128
+ return true;
1129
+ }
1130
+ parsed.host = url.hostname;
1082
1131
  }
1083
1132
  return false;
1084
1133
  }
1134
+ function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
1135
+ return Boolean(
1136
+ parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host)
1137
+ );
1138
+ }
1139
+ function isHostOnlyURL(url) {
1140
+ return url.username === "" && url.password === "" && url.port === "" && url.pathname === "/" && url.search === "" && url.hash === "" && url.hostname !== "";
1141
+ }
1085
1142
  function parseWithStatus(uri2, opts) {
1086
1143
  const options = Object.assign({}, opts);
1087
1144
  const parsed = {
@@ -1136,9 +1193,8 @@ function requireFastUri() {
1136
1193
  parsed.query = matches[7];
1137
1194
  parsed.fragment = matches[8];
1138
1195
  if (parsed.scheme !== void 0) {
1139
- const decodedScheme = unescape(parsed.scheme);
1140
- if (VALID_SCHEME.test(decodedScheme)) {
1141
- parsed.scheme = decodedScheme.toLowerCase();
1196
+ if (VALID_SCHEME.test(parsed.scheme)) {
1197
+ parsed.scheme = parsed.scheme.toLowerCase();
1142
1198
  } else {
1143
1199
  parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
1144
1200
  malformedScheme = true;
@@ -1166,7 +1222,7 @@ function requireFastUri() {
1166
1222
  malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
1167
1223
  parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
1168
1224
  if (malformedIPLiteral) {
1169
- parsed.error = parsed.error || "URI host is malformed.";
1225
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
1170
1226
  malformedAuthorityOrPort = true;
1171
1227
  }
1172
1228
  } else {
@@ -1194,7 +1250,7 @@ function requireFastUri() {
1194
1250
  if (!isIP) {
1195
1251
  host = normalizePercentEncoding(host.toLowerCase());
1196
1252
  }
1197
- parsed.host = reescapeHostDelimiters(host, isIP);
1253
+ parsed.host = isIP || options.scheme !== "null" ? reescapeHostDelimiters(host, isIP) : host;
1198
1254
  }
1199
1255
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
1200
1256
  if (parsed.path) {
@@ -1572,9 +1628,9 @@ function wrappedValidateStorageFactory(getValidator2, validatorKey) {
1572
1628
  status: 422,
1573
1629
  isError: true,
1574
1630
  documentId,
1575
- writeRow: row,
1576
1631
  validationErrors,
1577
- schema: instance.schema
1632
+ schema: instance.schema,
1633
+ writeRow: row
1578
1634
  });
1579
1635
  } else {
1580
1636
  continueWrites.push(row);
@@ -1736,8 +1792,8 @@ var dumpRxCollection = async function() {
1736
1792
  docs: []
1737
1793
  };
1738
1794
  var query = createRxQuery("find", _getDefaultQuery(), this);
1739
- return queryCollection(query).then((docs) => {
1740
- json.docs = docs.map((docData) => {
1795
+ return queryCollection(query).then((result) => {
1796
+ json.docs = result.docs.map((docData) => {
1741
1797
  docData = flatClone$1(docData);
1742
1798
  delete docData._rev;
1743
1799
  delete docData._attachments;
@@ -2267,6 +2323,7 @@ var RxStorageInstanceLocalstorage = /* @__PURE__ */ (function() {
2267
2323
  this.docsKey = "RxDB-ls-doc-" + this.databaseName + "--" + this.collectionName + "--" + this.schema.version;
2268
2324
  this.changestreamStorageKey = "RxDB-ls-changes-" + this.databaseName + "--" + this.collectionName + "--" + this.schema.version;
2269
2325
  this.indexesKey = "RxDB-ls-idx-" + this.databaseName + "--" + this.collectionName + "--" + this.schema.version;
2326
+ this.attachmentsKey = "RxDB-ls-attachment-" + this.databaseName + "--" + this.collectionName + "--" + this.schema.version;
2270
2327
  this.changeStreamSub = getStorageEventStream().subscribe((ev) => {
2271
2328
  if (ev.key !== this.changestreamStorageKey || !ev.newValue || ev.fromStorageEvent && ev.databaseInstanceToken === this.databaseInstanceToken) {
2272
2329
  return;
@@ -2359,6 +2416,15 @@ var RxStorageInstanceLocalstorage = /* @__PURE__ */ (function() {
2359
2416
  var index = Object.values(this.internals.indexes);
2360
2417
  this.setIndex(index[i].index, indexValue);
2361
2418
  });
2419
+ categorized.attachmentsAdd.forEach((attachment) => {
2420
+ this.localStorage.setItem(this.attachmentsKey + "-" + attachment.documentId + "||" + attachment.attachmentId, attachment.attachmentData.data);
2421
+ });
2422
+ categorized.attachmentsUpdate.forEach((attachment) => {
2423
+ this.localStorage.setItem(this.attachmentsKey + "-" + attachment.documentId + "||" + attachment.attachmentId, attachment.attachmentData.data);
2424
+ });
2425
+ categorized.attachmentsRemove.forEach((attachment) => {
2426
+ this.localStorage.removeItem(this.attachmentsKey + "-" + attachment.documentId + "||" + attachment.attachmentId);
2427
+ });
2362
2428
  if (categorized.eventBulk.events.length > 0) {
2363
2429
  var lastState = ensureNotFalsy(categorized.newestRow).document;
2364
2430
  categorized.eventBulk.checkpoint = {
@@ -2392,7 +2458,7 @@ var RxStorageInstanceLocalstorage = /* @__PURE__ */ (function() {
2392
2458
  });
2393
2459
  return ret;
2394
2460
  };
2395
- _proto.query = async function query(preparedQuery) {
2461
+ _proto.query = function query(preparedQuery) {
2396
2462
  var queryPlan = preparedQuery.queryPlan;
2397
2463
  var query2 = preparedQuery.query;
2398
2464
  var skip = query2.skip ? query2.skip : 0;
@@ -2488,8 +2554,9 @@ var RxStorageInstanceLocalstorage = /* @__PURE__ */ (function() {
2488
2554
  });
2489
2555
  return PROMISE_RESOLVE_TRUE;
2490
2556
  };
2491
- _proto.getAttachmentData = function getAttachmentData(_documentId, _attachmentId) {
2492
- throw newRxError("SNH");
2557
+ _proto.getAttachmentData = async function getAttachmentData(documentId, attachmentId) {
2558
+ var data = this.localStorage.getItem(this.attachmentsKey + "-" + documentId + "||" + attachmentId);
2559
+ return ensureNotFalsy(data);
2493
2560
  };
2494
2561
  _proto.remove = function remove() {
2495
2562
  ensureNotRemoved$1(this);
@@ -9656,7 +9723,7 @@ const buildDatabase = async (_config = {}) => {
9656
9723
  addRxPlugin(RxDBStatePlugin);
9657
9724
  /* v8 ignore next 10 -- @preserve */
9658
9725
  if (config.devMode) {
9659
- await import("./index-C8VMJ2QX.js").then((module) => {
9726
+ await import("./index-DzbOfIT_.js").then((module) => {
9660
9727
  addRxPlugin(module.RxDBDevModePlugin);
9661
9728
  if (config.testing) {
9662
9729
  module.disableWarnings();
@@ -180,10 +180,10 @@ class TuiPhraseConsumer {
180
180
  reset() {
181
181
  this._buffer = [];
182
182
  }
183
- init(buffer, lexer) {
183
+ init(buffer, _lexer) {
184
184
  this._buffer = [...buffer];
185
185
  }
186
- append(next, lexer) {
186
+ append(next, _lexer) {
187
187
  this._buffer.push(next);
188
188
  }
189
189
  bufferValue() {
@@ -1,4 +1,4 @@
1
- import { N as NON_PREMIUM_COLLECTION_LIMIT, E as RxDatabaseBase, D as RxCollectionBase, Z as createRxDocumentConstructor, J as basePrototype, aH as newRxError, az as isMaybeReadonlyArray, al as getSchemaByObjectPath, ad as flattenObject, aj as getProperty, a$ as trimDots, G as appendToArray, ai as getPrimaryFieldOfPrimaryKey, aI as newRxTypeError, ah as getPreviousVersions, aw as isFolderPath, aN as prepareQuery, a9 as findUndefinedPath, a1 as deepEqual, a7 as fillPrimaryKey, ao as hasPremiumFlag, R as RXDB_VERSION, ap as hashStringToNumber, a2 as deepFreeze } from "./replication-DzmbOO2P.js";
1
+ import { N as NON_PREMIUM_COLLECTION_LIMIT, E as RxDatabaseBase, D as RxCollectionBase, Z as createRxDocumentConstructor, J as basePrototype, aH as newRxError, az as isMaybeReadonlyArray, al as getSchemaByObjectPath, ad as flattenObject, aj as getProperty, a$ as trimDots, G as appendToArray, ai as getPrimaryFieldOfPrimaryKey, aI as newRxTypeError, ah as getPreviousVersions, aw as isFolderPath, aN as prepareQuery, a9 as findUndefinedPath, a1 as deepEqual, a7 as fillPrimaryKey, ao as hasPremiumFlag, R as RXDB_VERSION, ap as hashStringToNumber, a2 as deepFreeze } from "./replication-Bxa4yXXZ.js";
2
2
  var ERROR_MESSAGES = {
3
3
  // util.js / config
4
4
  UT1: "given name is no string or empty",
@@ -35,7 +35,7 @@ var ERROR_MESSAGES = {
35
35
  QU15: "For count queries it is not allowed to use skip or limit",
36
36
  QU16: "$regex queries must be defined by a string, not an RegExp instance. This is because RegExp objects cannot be JSON stringified and also they are mutable which would be dangerous",
37
37
  QU17: "Chained queries cannot be used on findByIds() RxQuery instances",
38
- QU18: "Malformed query result data. This likely happens because you create a OPFS-storage RxDatabase inside of a worker but did not set the usesRxDatabaseInWorker setting. https://rxdb.info/rx-storage-opfs.html#setting-usesrxdatabaseinworker-when-a-rxdatabase-is-also-used-inside-of-the-worker ",
38
+ QU18: "Malformed query result data. This likely happens because you create a OPFS-storage RxDatabase inside of a worker but did not set the usesRxDatabaseInWorker setting. https://rxdb.info/rx-storage-opfs.html?console=opfs#setting-usesrxdatabaseinworker-when-a-rxdatabase-is-also-used-inside-of-the-worker ",
39
39
  QU19: "Queries must not contain fields or properties with the value `undefined`: https://github.com/pubkey/rxdb/issues/6792#issuecomment-2624555824 ",
40
40
  // mquery.js
41
41
  MQ1: "path must be a string or object",
@@ -52,7 +52,7 @@ var ERROR_MESSAGES = {
52
52
  DB3: "RxDatabase.addCollections(): collection already exists. use myDatabase[collectionName] to get it",
53
53
  DB4: "RxDatabase.addCollections(): schema is missing",
54
54
  DB5: "RxDatabase.addCollections(): collection-name not allowed",
55
- DB6: "RxDatabase.addCollections(): another instance created this collection with a different schema. Read this https://rxdb.info/questions-answers.html?console=qa#cant-change-the-schema ",
55
+ DB6: "RxDatabase.addCollections(): another instance created this collection with a different schema. Read thishttps://rxdb.info/rx-schema.html?console=qa#faq ",
56
56
  // removed in 13.0.0 (now part of the encryption plugin) DB7: 'RxDatabase.addCollections(): schema encrypted but no password given',
57
57
  DB8: 'createRxDatabase(): A RxDatabase with the same name and adapter already exists.\nMake sure to use this combination of storage+databaseName only once\nIf you have the duplicate database on purpose to simulate multi-tab behavior in unit tests, set "ignoreDuplicate: true".\nAs alternative you can set "closeDuplicates: true" like if this happens in your react projects with hot reload that reloads the code without reloading the process.',
58
58
  DB9: "ignoreDuplicate is only allowed in dev-mode and must never be used in production",
@@ -86,7 +86,7 @@ var ERROR_MESSAGES = {
86
86
  COL21: "The RxCollection is closed or removed already, either from this JavaScript realm or from another, like a browser tab",
87
87
  CONFLICT: "Document update conflict. When changing a document you must work on the previous revision",
88
88
  COL22: ".bulkInsert() and .bulkUpsert() cannot be run with multiple documents that have the same primary key",
89
- COL23: "In the open-source version of RxDB, the amount of collections that can exist in parallel is limited to " + NON_PREMIUM_COLLECTION_LIMIT + ". If you already purchased the premium access, you can remove this limit: https://rxdb.info/rx-collection.html#faq",
89
+ COL23: "In the open-source version of RxDB, the amount of collections that can exist in parallel is limited to " + NON_PREMIUM_COLLECTION_LIMIT + ". If you already purchased the premium access, you can remove this limit: https://rxdb.info/rx-collection.html?console=limit#faq",
90
90
  // rx-document.js
91
91
  DOC1: "RxDocument.get$ cannot get observable of in-array fields because order cannot be guessed",
92
92
  DOC2: "cannot observe primary path",
@@ -172,7 +172,7 @@ var ERROR_MESSAGES = {
172
172
  SC14: "SchemaCheck: primary is always unique, do not declare it as index",
173
173
  SC15: "SchemaCheck: primary cannot be encrypted",
174
174
  SC16: "SchemaCheck: primary must have type: string",
175
- SC17: "SchemaCheck: top-level fieldname is not allowed",
175
+ SC17: "SchemaCheck: top-level fieldname is not allowed. See https://rxdb.info/rx-schema.html?console=toplevel#non-allowed-properties ",
176
176
  SC18: "SchemaCheck: indexes must be an array",
177
177
  SC19: "SchemaCheck: indexes must contain strings or arrays of strings",
178
178
  SC20: "SchemaCheck: indexes.array must contain strings",
@@ -225,6 +225,8 @@ var ERROR_MESSAGES = {
225
225
  SQL3: "The trial version of the SQLite storage is limited to running 110 operations",
226
226
  // plugins/storage-remote
227
227
  RM1: "Cannot communicate with a remote that was build on a different RxDB version. Did you forget to rebuild your workers when updating RxDB?",
228
+ // plugins/replication-mongodb
229
+ MG1: "If _id is used as primaryKey, all documents in the MongoDB instance must have a string-value as _id, not an ObjectId or number",
228
230
  /**
229
231
  * Should never be thrown, use this for
230
232
  * null checks etc. so you do not have to increase the
@@ -914,7 +916,7 @@ function containsDateInstance(obj) {
914
916
  return false;
915
917
  }
916
918
  for (var key in obj) {
917
- if (obj.hasOwnProperty(key)) {
919
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
918
920
  if (obj[key] instanceof Date) {
919
921
  return true;
920
922
  }
@@ -995,7 +997,7 @@ var links = [{
995
997
  url: "https://rxdb.info/nodejs-database.html"
996
998
  }];
997
999
  async function addDevModeTrackingIframe() {
998
- if (iframeShown || typeof window === "undefined" || typeof location === "undefined") {
1000
+ if (iframeShown || typeof window === "undefined" || typeof location === "undefined" || typeof document === "undefined") {
999
1001
  return;
1000
1002
  }
1001
1003
  if (await hasPremiumFlag()) {
package/index.css CHANGED
@@ -1,17 +1,8 @@
1
1
  body {
2
2
  margin: 0;
3
3
  font-family:
4
- 'Roboto',
5
- -apple-system,
6
- BlinkMacSystemFont,
7
- 'Segoe UI',
8
- 'Oxygen',
9
- 'Ubuntu',
10
- 'Cantarell',
11
- 'Fira Sans',
12
- 'Droid Sans',
13
- 'Helvetica Neue',
14
- sans-serif;
4
+ 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans',
5
+ 'Helvetica Neue', sans-serif;
15
6
  -webkit-font-smoothing: antialiased;
16
7
  -moz-osx-font-smoothing: grayscale;
17
8
  }
package/main.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A, b, d, f, g } from "./ActionForm-DxbV_aLe.js";
1
+ import { A, b, d, f, g } from "./ActionForm-C1D2_1Pg.js";
2
2
  import { default as default2 } from "./components/AnnotationDetailPopover.js";
3
- import { A as A2 } from "./AnnotationDetails-EDZRnwin.js";
3
+ import { A as A2 } from "./AnnotationDetails-C683Hvym.js";
4
4
  import { default as default3 } from "./components/AnnotationEntry.js";
5
- import { A as A3, C } from "./AnnotationPreview-DfLcrcuH.js";
5
+ import { A as A3, C } from "./AnnotationPreview-Bm9e2UgC.js";
6
6
  import { default as default4 } from "./components/CountBadge.js";
7
7
  import { default as default5 } from "./components/EnrichedCard.js";
8
8
  import { default as default6 } from "./components/EnrichedChip.js";
@@ -14,12 +14,12 @@ import { default as default11 } from "./components/group/Group.js";
14
14
  import { default as default12 } from "./components/group/GroupControl.js";
15
15
  import { default as default13 } from "./components/SourcePicker.js";
16
16
  import { SNACKBAR_EVENT_ID } from "./data/event.js";
17
- import { b as b2 } from "./index-CARYR0Hw.js";
17
+ import { b as b2 } from "./index-D1tw5sJ1.js";
18
18
  import { ClueReplicationError } from "./database/errors.js";
19
19
  import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
20
20
  import { ClueConfigContext } from "./hooks/ClueConfigProvider.js";
21
21
  import { ClueDatabaseContext } from "./hooks/ClueDatabaseContext.js";
22
- import { C as C2 } from "./ClueEnrichContext-DUxJFS3j.js";
22
+ import { C as C2 } from "./ClueEnrichContext-DmERFjhQ.js";
23
23
  import { ClueProvider } from "./hooks/ClueProvider.js";
24
24
  import { default as default14 } from "./hooks/useClue.js";
25
25
  import { default as default15 } from "./hooks/useClueConfig.js";
package/package.json CHANGED
@@ -12,47 +12,37 @@
12
12
  ]
13
13
  },
14
14
  "dependencies": {
15
- "@jsonforms/core": "^3.6.0",
16
- "@jsonforms/material-renderers": "^3.6.0",
17
- "@jsonforms/react": "^3.6.0",
18
- "@microlink/react-json-view": "^1.26.2",
19
- "@testing-library/user-event": "^14.6.1",
15
+ "@jsonforms/core": "^3.8.0",
16
+ "@jsonforms/material-renderers": "^3.8.0",
17
+ "@jsonforms/react": "^3.8.0",
18
+ "@microlink/react-json-view": "^1.31.50",
19
+ "@testing-library/user-event": "^14.6.10",
20
20
  "ajv": "^8.20.0",
21
- "d3": "^7.9.0",
22
- "dayjs": "^1.11.19",
23
- "fuse.js": "^7.1.0",
21
+ "d3": "^7.9.2",
22
+ "dayjs": "^1.11.23",
23
+ "fuse.js": "^7.5.0",
24
24
  "i18next": "^23.16.8",
25
25
  "i18next-browser-languagedetector": "^7.2.2",
26
26
  "lodash-es": "^4.18.1",
27
27
  "react-i18next": "^13.5.0",
28
28
  "react-markdown": "10.1.0",
29
29
  "react-pluggable": "^0.4.3",
30
- "react-syntax-highlighter": "^15.6.1",
30
+ "react-syntax-highlighter": "^15.6.6",
31
31
  "rehype-raw": "7.0.0",
32
32
  "rehype-sanitize": "^6.0.0",
33
33
  "remark-gfm": "4.0.1",
34
- "rxdb": "^16.16.0",
34
+ "rxdb": "^16.21.1",
35
35
  "rxjs": "^7.8.2",
36
- "scheduler": "^0.26.0",
36
+ "scheduler": "^0.28.0",
37
37
  "tinycolor2": "^1.6.0",
38
38
  "unified": "^11.0.5",
39
39
  "use-context-selector": "^2.0.0"
40
40
  },
41
- "eslintConfig": {
42
- "extends": [
43
- "react-app"
44
- ]
45
- },
46
41
  "jest": {
47
42
  "transformIgnorePatterns": [
48
43
  "!node_modules/url-join"
49
44
  ]
50
45
  },
51
- "lint-staged": {
52
- "*.{ts,tsx,js,jsx}": [
53
- "prettier --write --config .prettierrc"
54
- ]
55
- },
56
46
  "main": "main.js",
57
47
  "name": "@cccsaurora/clue-ui",
58
48
  "peerDependencies": {
@@ -68,58 +58,58 @@
68
58
  },
69
59
  "type": "module",
70
60
  "types": "main.d.ts",
71
- "version": "1.5.0-dev.487",
61
+ "version": "1.6.0-dev.524.1",
72
62
  "exports": {
73
63
  ".": "./main.js",
74
64
  "./index.css": "./index.css",
75
65
  "./en/*.json": "./en/*.json",
76
66
  "./fr/*.json": "./fr/*.json",
67
+ "./text/*": "./text/*.js",
68
+ "./types/*": "./types/*.js",
69
+ "./plugins/*": "./plugins/*.js",
70
+ "./data/*": "./data/*.js",
71
+ "./hooks/*": "./hooks/*.js",
77
72
  "./icons/*": "./icons/*.js",
78
73
  "./components/*": "./components/*.js",
79
- "./plugins/*": "./plugins/*.js",
80
74
  "./utils/*": "./utils/*.js",
81
75
  "./utils/*.json": "./utils/*.json",
82
- "./data/*": "./data/*.js",
83
- "./hooks/*": "./hooks/*.js",
84
76
  "./database/*": "./database/*.js",
85
77
  "./database": "./database/index.js",
86
- "./types/*": "./types/*.js",
87
- "./text/*": "./text/*.js",
88
78
  "./components/fetchers/*": "./components/fetchers/*.js",
79
+ "./components/actions/*": "./components/actions/*.js",
89
80
  "./components/display/*": "./components/display/*.js",
90
81
  "./components/enrichment/*": "./components/enrichment/*.js",
91
- "./components/actions/*": "./components/actions/*.js",
92
- "./components/stats/*": "./components/stats/*.js",
93
82
  "./components/group/*": "./components/group/*.js",
83
+ "./components/stats/*": "./components/stats/*.js",
84
+ "./components/display/json/*": "./components/display/json/*.js",
85
+ "./components/display/json": "./components/display/json/index.js",
94
86
  "./components/display/icons/*": "./components/display/icons/*.js",
95
87
  "./components/display/graph/*": "./components/display/graph/*.js",
96
88
  "./components/display/graph": "./components/display/graph/index.js",
97
- "./components/display/json/*": "./components/display/json/*.js",
98
- "./components/display/json": "./components/display/json/index.js",
99
89
  "./components/display/markdown/*.md": "./components/display/markdown/*.md.js",
100
90
  "./components/display/markdown": "./components/display/markdown/index.js",
101
91
  "./components/display/graph/elements/*": "./components/display/graph/elements/*.js",
102
92
  "./components/display/graph/visualizations/*": "./components/display/graph/visualizations/*.js",
103
- "./components/display/graph/visualizations/icons/*": "./components/display/graph/visualizations/icons/*.js",
104
- "./components/display/graph/visualizations/icons": "./components/display/graph/visualizations/icons/index.js",
93
+ "./components/display/graph/visualizations/panels/*": "./components/display/graph/visualizations/panels/*.js",
105
94
  "./components/display/graph/visualizations/cloud/*": "./components/display/graph/visualizations/cloud/*.js",
106
95
  "./components/display/graph/visualizations/cloud": "./components/display/graph/visualizations/cloud/index.js",
107
- "./components/display/graph/visualizations/panels/*": "./components/display/graph/visualizations/panels/*.js",
96
+ "./components/display/graph/visualizations/icons/*": "./components/display/graph/visualizations/icons/*.js",
97
+ "./components/display/graph/visualizations/icons": "./components/display/graph/visualizations/icons/index.js",
108
98
  "./components/display/graph/visualizations/tree/*": "./components/display/graph/visualizations/tree/*.js",
109
99
  "./components/display/graph/visualizations/tree": "./components/display/graph/visualizations/tree/index.js",
110
100
  "./components/actions/form/*": "./components/actions/form/*.js",
111
101
  "./components/actions/formats/*": "./components/actions/formats/*.js",
112
102
  "./components/actions/formats": "./components/actions/formats/index.js",
113
- "./plugins/graph/*": "./plugins/graph/*.js",
114
- "./plugins/graph": "./plugins/graph/index.js",
115
- "./plugins/json/*": "./plugins/json/*.js",
116
- "./plugins/json": "./plugins/json/index.js",
117
103
  "./plugins/image/*": "./plugins/image/*.js",
118
104
  "./plugins/image": "./plugins/image/index.js",
119
- "./plugins/file/*": "./plugins/file/*.js",
120
- "./plugins/file": "./plugins/file/index.js",
121
105
  "./plugins/test/*": "./plugins/test/*.js",
122
106
  "./plugins/test": "./plugins/test/index.js",
107
+ "./plugins/json/*": "./plugins/json/*.js",
108
+ "./plugins/json": "./plugins/json/index.js",
109
+ "./plugins/file/*": "./plugins/file/*.js",
110
+ "./plugins/file": "./plugins/file/index.js",
111
+ "./plugins/graph/*": "./plugins/graph/*.js",
112
+ "./plugins/graph": "./plugins/graph/index.js",
123
113
  "./plugins/markdown/*.md": "./plugins/markdown/*.md.js",
124
114
  "./plugins/markdown": "./plugins/markdown/index.js",
125
115
  "./plugins/graph/example/*": "./plugins/graph/example/*.js"
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import { jsx } from "react/jsx-runtime";
5
- import { J as JSONViewer } from "../../index-DUEubgWN.js";
5
+ import { J as JSONViewer } from "../../index-D4JJWbGh.js";
6
6
  import ClueUIPlugin from "../ClueUIPlugin.js";
7
7
  import { validateJsonData } from "../utils.js";
8
8
  class JsonPlugin extends ClueUIPlugin {