@cccsaurora/clue-ui 1.3.0-dev.361 → 1.3.0-dev.390

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 (133) hide show
  1. package/{ActionForm-BGVd1hea.js → ActionForm-CqKcnDWC.js} +9 -9
  2. package/{AnnotationDetails-D4f9aw7S.js → AnnotationDetails-BlPd3T8k.js} +3 -3
  3. package/{AnnotationPreview-LLor6159.js → AnnotationPreview-Bl447SKT.js} +2 -2
  4. package/{ClueEnrichContext-DKZ2iqmV.js → ClueEnrichContext-B3YrTCaJ.js} +10 -8
  5. package/{_MapCache-DWYVyFVH.js → _MapCache-kuEY_iOH.js} +2 -4
  6. package/_Set-BrSMTlHn.js +6 -0
  7. package/{_Uint8Array-BgBspS6l.js → _Uint8Array-OPpgYQj7.js} +8 -13
  8. package/_arrayIncludes-BNqL-9ZP.js +31 -0
  9. package/_arrayPush-CBkQqaE_.js +10 -0
  10. package/{_baseAssignValue-Dltt6-s5.js → _baseAssignValue-CNUVPOBW.js} +2 -11
  11. package/{_baseClone-BUfES2sT.js → _baseClone-9FaRd1R2.js} +10 -6
  12. package/{_baseExtremum-kob8QXyt.js → _baseExtremum-wOGT4Dgw.js} +1 -1
  13. package/{_baseFlatten-D3wtzJ86.js → _baseFlatten-Co6QHDlG.js} +6 -6
  14. package/{_baseGet-DKnGz1D3.js → _baseGet-Cmp6FztG.js} +4 -3
  15. package/{isObjectLike-OAgjjZye.js → _baseGetTag-Hj-0NTYF.js} +0 -4
  16. package/{_baseIsEqual-CTfFNmaR.js → _baseIsEqual-1CpU47TZ.js} +8 -5
  17. package/{_baseIteratee-C004Z9XE.js → _baseIteratee-BN7Vbe5g.js} +6 -6
  18. package/_baseRest-BZ_hQ9PC.js +8 -0
  19. package/_baseUniq-BnvS3JHL.js +63 -0
  20. package/{_setToArray-CGeR30xg.js → _cacheHas-_aF2y2Xv.js} +2 -10
  21. package/{_createAggregator-BDMdCE6g.js → _createAggregator-BUZrP_is.js} +4 -4
  22. package/_defineProperty-DolZLKmv.js +12 -0
  23. package/{_getPrototype-uU2uJIbq.js → _getPrototype-Bb4gm-5m.js} +1 -1
  24. package/{_getTag-DuA1kj2A.js → _getTag-CML_cXiN.js} +10 -31
  25. package/{_isIterateeCall-CEvg7Bo6.js → _isIterateeCall-B1IFEqVv.js} +3 -3
  26. package/_setToArray-CqyqC8ib.js +10 -0
  27. package/{cloneDeep-C_PzHHQ0.js → cloneDeep-l3UkXG5M.js} +1 -1
  28. package/components/AnnotationDetailPopover.js +1 -1
  29. package/components/AnnotationDetails.js +4 -4
  30. package/components/AnnotationEntry.js +1 -1
  31. package/components/AnnotationPreview.js +2 -2
  32. package/components/EnrichedCard.js +2 -2
  33. package/components/EnrichedChip.js +2 -2
  34. package/components/EnrichedTypography.js +2 -2
  35. package/components/RetryFailedEnrichments.js +1 -1
  36. package/components/SourcePicker.js +1 -1
  37. package/components/actions/ActionForm.js +3 -3
  38. package/components/actions/ExecutePopover.js +1 -1
  39. package/components/actions/ResultModal.js +1 -1
  40. package/components/actions/form/schemaAdapter.js +2 -2
  41. package/components/actions/formats/index.d.ts +2 -0
  42. package/components/actions/formats/index.js +30 -14
  43. package/components/display/graph/elements/NodeCard.js +5 -5
  44. package/components/display/graph/index.js +2 -2
  45. package/components/display/graph/visualizations/Leaf.js +2 -1
  46. package/components/display/graph/visualizations/cloud/index.js +2 -2
  47. package/components/display/graph/visualizations/tree/index.js +5 -5
  48. package/components/display/json/index.js +2 -2
  49. package/components/enrichment/EnrichPopover.js +1 -1
  50. package/components/fetchers/Fetcher.js +21 -10
  51. package/components/fetchers/FetcherResultView.d.ts +7 -0
  52. package/components/fetchers/FetcherResultView.js +41 -0
  53. package/components/fetchers/PreviewModal.d.ts +6 -1
  54. package/components/fetchers/PreviewModal.js +5 -2
  55. package/components/group/Entry.js +1 -1
  56. package/components/group/GroupControl.js +1 -1
  57. package/components/stats/QueryStatus.js +1 -1
  58. package/{countBy-Bkq0mSO-.js → countBy-Bqcp3VCs.js} +2 -2
  59. package/database/index.js +2 -2
  60. package/database/replication.js +2 -2
  61. package/en/translation.json +1 -0
  62. package/fr/translation.json +1 -0
  63. package/{get-DlGeJ2uz.js → get-CdMThM8x.js} +1 -1
  64. package/{groupBy-CXx1vslF.js → groupBy-BVV07EGQ.js} +2 -2
  65. package/hooks/ClueActionContext.js +2 -2
  66. package/hooks/ClueDatabaseContext.js +1 -1
  67. package/hooks/ClueEnrichContext.js +8 -7
  68. package/hooks/ClueFetcherContext.js +1 -1
  69. package/hooks/ClueGroupContext.js +1 -1
  70. package/hooks/CluePopupContext.js +2 -2
  71. package/hooks/ClueProvider.d.ts +2 -1
  72. package/hooks/ClueProvider.js +5 -4
  73. package/hooks/ClueUIPluginContext.d.ts +21 -0
  74. package/hooks/ClueUIPluginContext.js +57 -0
  75. package/hooks/selectors.js +2 -2
  76. package/hooks/useActionResult.js +1 -1
  77. package/hooks/useAnnotations.js +2 -2
  78. package/hooks/useClue.js +1 -1
  79. package/hooks/useClueActions.js +1 -1
  80. package/hooks/useClueTypeConfig.js +54 -6
  81. package/hooks/useComparator.js +1 -1
  82. package/hooks/useErrors.js +1 -1
  83. package/hooks/useFetcherResult.js +1 -1
  84. package/icons/Action.js +3 -3
  85. package/icons/Assessment.js +5 -5
  86. package/icons/Context.js +2 -2
  87. package/icons/Opinion.js +4 -4
  88. package/{index-C28rIsy3.js → index-CAvu7vwt.js} +1 -1
  89. package/{index-IPF68v-l.js → index-DUEubgWN.js} +1 -1
  90. package/{index-VDwFWSqU.js → index-Dj1N4IQP.js} +3 -3
  91. package/{index-CmQM2DaO.js → index-DpJxD74E.js} +1 -1
  92. package/isArguments-CuYlEuhP.js +27 -0
  93. package/isArray-RJPfgWqI.js +4 -0
  94. package/isEmpty-BE656RUK.js +30 -0
  95. package/isObjectLike-CeENW9FN.js +6 -0
  96. package/{isSymbol-Xd2FsJyp.js → isSymbol-D_H4HPZQ.js} +2 -1
  97. package/main.d.ts +4 -2
  98. package/main.js +9 -7
  99. package/{maxBy-a49mqwW9.js → maxBy-BjjQmX5t.js} +2 -2
  100. package/package.json +16 -2
  101. package/plugins/ClueUIPlugin.d.ts +40 -0
  102. package/plugins/ClueUIPlugin.js +442 -0
  103. package/plugins/file/index.d.ts +15 -0
  104. package/plugins/file/index.js +22 -0
  105. package/plugins/graph/index.d.ts +17 -0
  106. package/plugins/graph/index.js +25 -0
  107. package/plugins/image/index.d.ts +12 -0
  108. package/plugins/image/index.js +26 -0
  109. package/plugins/json/index.d.ts +17 -0
  110. package/plugins/json/index.js +25 -0
  111. package/plugins/markdown/index.d.ts +17 -0
  112. package/plugins/markdown/index.js +25 -0
  113. package/plugins/registry.d.ts +13 -0
  114. package/plugins/registry.js +21 -0
  115. package/plugins/store.d.ts +40 -0
  116. package/plugins/store.js +6 -0
  117. package/plugins/test/index.d.ts +17 -0
  118. package/plugins/test/index.js +25 -0
  119. package/{replication-DvYQDhM_.js → replication--gLEZw8a.js} +1 -1
  120. package/{sessionStorage-Dbmo2Exe.js → sessionStorage-B68y-wnE.js} +2 -2
  121. package/{sortBy-Tf6pz1tg.js → sortBy-B8JVsLQY.js} +10 -11
  122. package/store-DMdRx9g0.js +2156 -0
  123. package/{sumBy-DZSVfXDE.js → sumBy-D-HCzM2i.js} +1 -1
  124. package/text/Frequency.js +1 -1
  125. package/{toFinite-Bc55msYj.js → toFinite-meZTg4Su.js} +1 -1
  126. package/{toNumber-DPxy1FBy.js → toNumber-B5JaA1vX.js} +1 -1
  127. package/uniq-CahZPAwp.js +7 -0
  128. package/utils/chain.js +12 -12
  129. package/utils/sessionStorage.js +1 -1
  130. package/utils/utils.js +3 -3
  131. package/{utils-BN7Z0YiP.js → utils-CEySTPtg.js} +7 -5
  132. package/_baseUniq-BqxNeJD9.js +0 -115
  133. package/useClueTypeConfig-CnMg5Ny8.js +0 -59
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ class ClueUIPluginsRegistry {
5
+ constructor() {
6
+ __publicField(this, "_plugins", [
7
+ // { name: 'TestPlugin', id: 'none', loadPlugin: () => import('./test') },
8
+ { name: "MarkdownPlugin", id: "markdown", loadPlugin: () => import("./markdown/index.js") },
9
+ { name: "ImagePlugin", id: "image", loadPlugin: () => import("./image/index.js") },
10
+ { name: "JsonPlugin", id: "json", loadPlugin: () => import("./json/index.js") },
11
+ { name: "GraphPlugin", id: "graph", loadPlugin: () => import("./graph/index.js") },
12
+ { name: "FilePlugin", id: "file", loadPlugin: () => import("./file/index.js") }
13
+ ]);
14
+ }
15
+ getPlugins() {
16
+ return [...this._plugins];
17
+ }
18
+ }
19
+ export {
20
+ ClueUIPluginsRegistry as default
21
+ };
@@ -0,0 +1,40 @@
1
+ import { default as ClueUIPlugin } from './ClueUIPlugin';
2
+
3
+ export declare class ClueUIPluginStore {
4
+ private _pluginStore;
5
+ plugins: string[];
6
+ pluginsByFormat: {
7
+ [format: string]: string[];
8
+ };
9
+ pluginsByActionId: {
10
+ [actionId: string]: string[];
11
+ };
12
+ pluginsByFetcherId: {
13
+ [fetcherId: string]: string[];
14
+ };
15
+ actionPlugins: string[];
16
+ fetcherPlugins: string[];
17
+ reset(): void;
18
+ install(plugin: ClueUIPlugin): void;
19
+ /**
20
+ * Get plugins based on the given criteria.
21
+ *
22
+ * Only plugins that match format and result type criteria will be returned, which could be an empty list.
23
+ *
24
+ * If no criteria is provided all available plugins are returned.
25
+ *
26
+ * The order of the plugins matters, for example if a plugin specifies an action ID, it will be ordered before a
27
+ * plugin just specifies the format and result type.
28
+ *
29
+ * @param format filter plugins by this format
30
+ * @param resultType filter plugins by the result type that they accept (action or fetcher)
31
+ * @param actionId prefer plugins that specify this action ID
32
+ * @param fetcherId prefer plugins that specify this fetcher ID
33
+ * @returns an array of plugin names that match the given criteria
34
+ */
35
+ getPlugins(format?: string, resultType?: 'action' | 'fetcher', actionId?: string, fetcherId?: string): string[];
36
+ getPlugin(format: string, resultType: 'action' | 'fetcher', actionId?: string, fetcherId?: string): string | undefined;
37
+ get pluginStore(): import('react-pluggable').PluginStore;
38
+ }
39
+ declare const clueUIPluginStore: ClueUIPluginStore;
40
+ export default clueUIPluginStore;
@@ -0,0 +1,6 @@
1
+ import { C, c } from "../store-DMdRx9g0.js";
2
+ import "../uniq-CahZPAwp.js";
3
+ export {
4
+ C as ClueUIPluginStore,
5
+ c as default
6
+ };
@@ -0,0 +1,17 @@
1
+ import { ActionResult, FetcherResult } from "../../main";
2
+ import { default as ClueUIPlugin } from '../ClueUIPlugin';
3
+
4
+ declare class TestPlugin extends ClueUIPlugin {
5
+ name: string;
6
+ format: string;
7
+ version: string;
8
+ author: string;
9
+ description: string;
10
+ actionResult(_props: {
11
+ result: ActionResult;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ fetcherResult(_props: {
14
+ result: FetcherResult;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ }
17
+ export default TestPlugin;
@@ -0,0 +1,25 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { Typography } from "@mui/material";
6
+ import ClueUIPlugin from "../ClueUIPlugin.js";
7
+ class TestPlugin extends ClueUIPlugin {
8
+ constructor() {
9
+ super(...arguments);
10
+ __publicField(this, "name", "TestPlugin");
11
+ __publicField(this, "format", "test");
12
+ __publicField(this, "version", "0.0.1");
13
+ __publicField(this, "author", "Canadian Centre for Cyber Security Matthew.Rafuse@cyber.gc.ca");
14
+ __publicField(this, "description", "This plugin is a test.");
15
+ }
16
+ actionResult(_props) {
17
+ return /* @__PURE__ */ jsx(Typography, { variant: "h1", children: "Test Plugin!" });
18
+ }
19
+ fetcherResult(_props) {
20
+ return /* @__PURE__ */ jsx(Typography, { variant: "h1", children: "Test Plugin!" });
21
+ }
22
+ }
23
+ export {
24
+ TestPlugin as default
25
+ };
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var _hashFn, _keyMap, _unpack, _options, _root, _local, _operators, _iteratees, _yieldedValues, _getNext, _a, _source, _predicate, _projection, _options2, _operators2, _result, _buffer, _compiled, _options3, _condition;
12
- import { a as api, j as joinAllUri, u as uri } from "./index-CmQM2DaO.js";
12
+ import { a as api, j as joinAllUri, u as uri } from "./index-DpJxD74E.js";
13
13
  import { REPLICATORS } from "./database/globals.js";
14
14
  import { l as last$1 } from "./last-CUCl67Im.js";
15
15
  function _typeof(o) {
@@ -1,7 +1,7 @@
1
1
  import { StorageKey, MY_SESSION_STORAGE_PREFIX } from "./utils/constants.js";
2
2
  import { i as isObject } from "./isObject-FTY-5JQX.js";
3
- import { r as root } from "./isObjectLike-OAgjjZye.js";
4
- import { t as toNumber } from "./toNumber-DPxy1FBy.js";
3
+ import { r as root } from "./_baseGetTag-Hj-0NTYF.js";
4
+ import { t as toNumber } from "./toNumber-B5JaA1vX.js";
5
5
  var now = function() {
6
6
  return root.Date.now();
7
7
  };
@@ -1,15 +1,14 @@
1
- import { s as setToString, o as overRest, b as baseFlatten } from "./_baseFlatten-D3wtzJ86.js";
2
- import { a as arrayMap, b as baseGet } from "./_baseGet-DKnGz1D3.js";
3
- import { b as baseIteratee } from "./_baseIteratee-C004Z9XE.js";
4
- import { b as baseEach } from "./_createAggregator-BDMdCE6g.js";
5
- import { c as isArrayLike, a as baseUnary } from "./_getTag-DuA1kj2A.js";
6
- import { i as isSymbol } from "./isSymbol-Xd2FsJyp.js";
1
+ import { b as baseFlatten } from "./_baseFlatten-Co6QHDlG.js";
2
+ import { a as arrayMap, b as baseGet } from "./_baseGet-Cmp6FztG.js";
3
+ import { b as baseIteratee } from "./_baseIteratee-BN7Vbe5g.js";
4
+ import { b as baseEach } from "./_createAggregator-BUZrP_is.js";
5
+ import { a as isArrayLike } from "./isArguments-CuYlEuhP.js";
6
+ import { a as baseUnary } from "./_getTag-CML_cXiN.js";
7
+ import { i as isSymbol } from "./isSymbol-D_H4HPZQ.js";
7
8
  import { i as identity } from "./identity-CPGTqrE4.js";
8
- import { i as isArray } from "./_MapCache-DWYVyFVH.js";
9
- import { i as isIterateeCall } from "./_isIterateeCall-CEvg7Bo6.js";
10
- function baseRest(func, start) {
11
- return setToString(overRest(func, start, identity), func + "");
12
- }
9
+ import { i as isArray } from "./isArray-RJPfgWqI.js";
10
+ import { b as baseRest } from "./_baseRest-BZ_hQ9PC.js";
11
+ import { i as isIterateeCall } from "./_isIterateeCall-B1IFEqVv.js";
13
12
  function baseMap(collection, iteratee) {
14
13
  var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
15
14
  baseEach(collection, function(value, key, collection2) {