@cccsaurora/clue-ui 0.15.0-dev.30 → 0.15.0
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 +141 -37
- package/ActionForm-DgfJwTzt.js +0 -436
- package/AnnotationPreview-BvNpZOP0.js +0 -188
- package/ClueEnrichContext-DXwLVp0M.js +0 -518
- package/FlexOne-BSYAhhtG.js +0 -9
- package/_Map-kgDsDYxq.js +0 -64
- package/_MapCache-DabaaWfq.js +0 -161
- package/_Uint8Array-BlVVH1tp.js +0 -129
- package/_baseAssignValue-CNbcU6Nb.js +0 -25
- package/_baseClone-D3a8Pa4T.js +0 -284
- package/_baseExtremum-B1o1zHjR.js +0 -33
- package/_baseFlatten-D4huXoEI.js +0 -92
- package/_baseGet-BSK_nnoz.js +0 -109
- package/_baseIsEqual-B5xLoweL.js +0 -238
- package/_baseIteratee-p6Nj07-n.js +0 -126
- package/_baseSlice-GAv_YFTT.js +0 -20
- package/_baseSum-D0WC1dN0.js +0 -13
- package/_baseUniq-CpupKWcL.js +0 -89
- package/_commonjsHelpers-CUmg6egw.js +0 -6
- package/_createAggregator-BpVy5xMi.js +0 -63
- package/_getPrototype-D1LAdQKO.js +0 -5
- package/_getTag-D3ToyefI.js +0 -126
- package/api/lookup/enrich.d.ts +0 -10
- package/api/lookup/index.d.ts +0 -5
- package/api/lookup/types.d.ts +0 -5
- package/api/lookup/types_detection.d.ts +0 -5
- package/cloneDeep-CjP5k9zW.js +0 -8
- package/components/AnnotationBody.d.ts +0 -6
- package/components/AnnotationBody.js +0 -56
- package/components/AnnotationDetailPopover.d.ts +0 -14
- package/components/AnnotationDetailPopover.js +0 -61
- package/components/AnnotationDetails.d.ts +0 -8
- package/components/AnnotationDetails.js +0 -172
- package/components/AnnotationEntry.d.ts +0 -6
- package/components/AnnotationEntry.js +0 -59
- package/components/AnnotationPreview.d.ts +0 -14
- package/components/AnnotationPreview.js +0 -11
- package/components/ClassificationChip.d.ts +0 -11
- package/components/ClassificationChip.js +0 -52
- package/components/CountBadge.d.ts +0 -8
- package/components/CountBadge.js +0 -34
- package/components/EnrichedCard.d.ts +0 -14
- package/components/EnrichedCard.js +0 -162
- package/components/EnrichedChip.d.ts +0 -9
- package/components/EnrichedChip.js +0 -176
- package/components/EnrichedTypography.d.ts +0 -16
- package/components/EnrichedTypography.js +0 -178
- package/components/ErrorBoundary.d.ts +0 -15
- package/components/ErrorBoundary.js +0 -36
- package/components/RetryFailedEnrichments.d.ts +0 -2
- package/components/RetryFailedEnrichments.js +0 -13
- package/components/SourcePicker.d.ts +0 -2
- package/components/SourcePicker.js +0 -98
- package/components/actions/ActionForm.d.ts +0 -6
- package/components/actions/ActionForm.js +0 -16
- package/components/actions/ExecutePopover.d.ts +0 -10
- package/components/actions/ExecutePopover.js +0 -93
- package/components/actions/ResultModal.d.ts +0 -9
- package/components/actions/ResultModal.js +0 -46
- package/components/actions/form/schemaAdapter.d.ts +0 -3
- package/components/actions/form/schemaAdapter.js +0 -47
- package/components/display/graph/ExpandMoreButton.d.ts +0 -7
- package/components/display/graph/ExpandMoreButton.js +0 -18
- package/components/display/graph/elements/NodeCard.d.ts +0 -10
- package/components/display/graph/elements/NodeCard.js +0 -146
- package/components/display/graph/elements/NodeTag.d.ts +0 -9
- package/components/display/graph/elements/NodeTag.js +0 -17
- package/components/display/graph/index.d.ts +0 -9
- package/components/display/graph/index.js +0 -438
- package/components/display/graph/visualizations/Leaf.d.ts +0 -25
- package/components/display/graph/visualizations/Leaf.js +0 -125
- package/components/display/graph/visualizations/cloud/index.d.ts +0 -24
- package/components/display/graph/visualizations/cloud/index.js +0 -141
- package/components/display/graph/visualizations/icons/BaseIcon.d.ts +0 -12
- package/components/display/graph/visualizations/icons/BaseIcon.js +0 -37
- package/components/display/graph/visualizations/icons/BugIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/BugIcon.js +0 -18
- package/components/display/graph/visualizations/icons/HostIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/HostIcon.js +0 -24
- package/components/display/graph/visualizations/icons/NetworkIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/NetworkIcon.js +0 -24
- package/components/display/graph/visualizations/icons/ProcessIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/ProcessIcon.js +0 -18
- package/components/display/graph/visualizations/icons/TargetIcon.d.ts +0 -5
- package/components/display/graph/visualizations/icons/TargetIcon.js +0 -19
- package/components/display/graph/visualizations/icons/index.d.ts +0 -2
- package/components/display/graph/visualizations/icons/index.js +0 -16
- package/components/display/graph/visualizations/panels/NodePanel.d.ts +0 -8
- package/components/display/graph/visualizations/panels/NodePanel.js +0 -12
- package/components/display/graph/visualizations/tree/BundleLine.d.ts +0 -29
- package/components/display/graph/visualizations/tree/BundleLine.js +0 -121
- package/components/display/graph/visualizations/tree/Triangle.d.ts +0 -9
- package/components/display/graph/visualizations/tree/Triangle.js +0 -26
- package/components/display/graph/visualizations/tree/index.d.ts +0 -36
- package/components/display/graph/visualizations/tree/index.js +0 -485
- package/components/display/graph/visualizations/tree/types.d.ts +0 -11
- package/components/display/graph/visualizations/tree/types.js +0 -1
- package/components/display/icons/Iconified.d.ts +0 -9
- package/components/display/icons/Iconified.js +0 -29
- package/components/display/json/index.d.ts +0 -14
- package/components/display/json/index.js +0 -12
- package/components/display/markdown/DynamicTabs.d.ts +0 -8
- package/components/display/markdown/DynamicTabs.js +0 -26
- package/components/display/markdown/index.d.ts +0 -9
- package/components/display/markdown/index.js +0 -13389
- package/components/display/markdown/markdownPlugins/tabs.d.ts +0 -3
- package/components/display/markdown/markdownPlugins/tabs.js +0 -4
- package/components/enrichment/EnrichPopover.d.ts +0 -10
- package/components/enrichment/EnrichPopover.js +0 -88
- package/components/fetchers/Fetcher.d.ts +0 -17
- package/components/fetchers/Fetcher.js +0 -188
- package/components/fetchers/PreviewModal.d.ts +0 -8
- package/components/fetchers/PreviewModal.js +0 -22
- package/components/fetchers/StatusChip.d.ts +0 -8
- package/components/fetchers/StatusChip.js +0 -30
- package/components/group/Entry.d.ts +0 -8
- package/components/group/Entry.js +0 -15
- package/components/group/Group.d.ts +0 -12
- package/components/group/Group.js +0 -15
- package/components/group/GroupControl.d.ts +0 -4
- package/components/group/GroupControl.js +0 -103
- package/components/stats/QueryStatus.d.ts +0 -4
- package/components/stats/QueryStatus.js +0 -61
- package/countBy-C69WslUA.js +0 -14
- package/data/event.d.ts +0 -12
- package/data/event.js +0 -8
- package/database/index.d.ts +0 -4
- package/database/index.js +0 -4
- package/database/selector.schema.json.d.ts +0 -119
- package/database/status.schema.json.d.ts +0 -38
- package/database/types.d.ts +0 -64
- package/debounce-bV0h5FC5.js +0 -92
- package/en/translation.json +0 -135
- package/fr/translation.json +0 -135
- package/get-D3C3lEU3.js +0 -8
- package/groupBy-DC2oOuBN.js +0 -14
- package/hooks/ClueActionContext.d.ts +0 -86
- package/hooks/ClueActionContext.js +0 -18
- package/hooks/ClueComponentContext.d.ts +0 -10
- package/hooks/ClueComponentContext.js +0 -40
- package/hooks/ClueConfigProvider.d.ts +0 -12
- package/hooks/ClueConfigProvider.js +0 -23
- package/hooks/ClueDatabaseContext.d.ts +0 -10
- package/hooks/ClueDatabaseContext.js +0 -23
- package/hooks/ClueEnrichContext.d.ts +0 -6
- package/hooks/ClueEnrichContext.js +0 -15
- package/hooks/ClueEnrichContextType.d.ts +0 -113
- package/hooks/ClueEnrichProps.d.ts +0 -81
- package/hooks/ClueFetcherContext.d.ts +0 -35
- package/hooks/ClueFetcherContext.js +0 -88
- package/hooks/ClueGroupContext.d.ts +0 -14
- package/hooks/ClueGroupContext.js +0 -23
- package/hooks/CluePopupContext.d.ts +0 -24
- package/hooks/CluePopupContext.js +0 -12
- package/hooks/ClueProvider.d.ts +0 -9
- package/hooks/ClueProvider.js +0 -14
- package/hooks/selectors.d.ts +0 -10
- package/hooks/selectors.js +0 -24
- package/hooks/useAnnotations.d.ts +0 -24
- package/hooks/useAnnotations.js +0 -69
- package/hooks/useClue.d.ts +0 -4
- package/hooks/useClue.js +0 -8
- package/hooks/useClueActions.d.ts +0 -4
- package/hooks/useClueActions.js +0 -5
- package/hooks/useClueConfig.d.ts +0 -1
- package/hooks/useClueConfig.js +0 -8
- package/hooks/useClueTypeConfig.d.ts +0 -17
- package/hooks/useClueTypeConfig.js +0 -7
- package/hooks/useComparator.d.ts +0 -16
- package/hooks/useComparator.js +0 -1060
- package/hooks/useErrors.d.ts +0 -17
- package/hooks/useErrors.js +0 -35
- package/hooks/useMyHighlights.d.ts +0 -11
- package/hooks/useMyHighlights.js +0 -74
- package/hooks/useMyLocalStorage.d.ts +0 -16
- package/hooks/useMyLocalStorage.js +0 -80
- package/iconify-CXMreGTg.js +0 -1782
- package/icons/Action.d.ts +0 -9
- package/icons/Action.js +0 -90
- package/icons/Assessment.d.ts +0 -11
- package/icons/Assessment.js +0 -123
- package/icons/Context.d.ts +0 -12
- package/icons/Context.js +0 -83
- package/icons/Opinion.d.ts +0 -11
- package/icons/Opinion.js +0 -125
- package/icons/iconMap.d.ts +0 -7
- package/icons/iconMap.js +0 -10
- package/identity-CPGTqrE4.js +0 -6
- package/index-BDVjGvMI.js +0 -696
- package/index-BDrtH5ec.js +0 -465
- package/index-C9lySIVX.js +0 -1172
- package/index-DJYqRcxJ.js +0 -15750
- package/index-Dn2NHyXg.js +0 -17654
- package/index.css +0 -21
- package/isEmpty-BQkZubqU.js +0 -29
- package/isNil-CIubwp4T.js +0 -6
- package/isObject-FTY-5JQX.js +0 -7
- package/isObjectLike-OAgjjZye.js +0 -48
- package/isSymbol-Xd2FsJyp.js +0 -8
- package/isUndefined-CE8h73dH.js +0 -10
- package/last-CUCl67Im.js +0 -7
- package/main.d.ts +0 -42
- package/main.js +0 -70
- package/public/manifest.json +0 -16
- package/public/robots.txt +0 -3
- package/public/svg/dark/clue-h.svg +0 -52
- package/public/svg/dark/clue-icon1-simple.svg +0 -33
- package/public/svg/dark/clue-icon1.svg +0 -44
- package/public/svg/dark/clue-icon2-simple.svg +0 -26
- package/public/svg/dark/clue-icon2.svg +0 -37
- package/public/svg/dark/clue-name.svg +0 -14
- package/public/svg/dark/clue-v.svg +0 -52
- package/public/svg/light/clue-h.svg +0 -60
- package/public/svg/light/clue-icon1-simple.svg +0 -37
- package/public/svg/light/clue-icon1.svg +0 -48
- package/public/svg/light/clue-icon2-simple.svg +0 -30
- package/public/svg/light/clue-icon2.svg +0 -41
- package/public/svg/light/clue-name.svg +0 -14
- package/public/svg/light/clue-v.svg +0 -60
- package/sortBy-B-UKp4GT.js +0 -100
- package/sumBy-MYkDPHZL.js +0 -8
- package/tabs-xGuUGsJd.js +0 -254
- package/text/Frequency.d.ts +0 -9
- package/text/Frequency.js +0 -49
- package/toFinite-CArjry_l.js +0 -16
- package/toNumber-DPxy1FBy.js +0 -39
- package/types/EnrichmentProps.d.ts +0 -73
- package/types/RunningActionData.d.ts +0 -15
- package/types/WithActionData.d.ts +0 -9
- package/types/action.d.ts +0 -25
- package/types/config.d.ts +0 -16
- package/types/fetcher.d.ts +0 -60
- package/types/graph.d.ts +0 -101
- package/types/lookup.d.ts +0 -62
- package/types/network.d.ts +0 -9
- package/useClueTypeConfig-D9ZSxa4F.js +0 -3096
- package/utils/chain.d.ts +0 -14
- package/utils/chain.js +0 -106
- package/utils/classificationParser.d.ts +0 -195
- package/utils/classificationParser.js +0 -553
- package/utils/constants.d.ts +0 -26
- package/utils/constants.js +0 -36
- package/utils/graph.d.ts +0 -13
- package/utils/graph.js +0 -79
- package/utils/hashUtil.d.ts +0 -6
- package/utils/hashUtil.js +0 -11
- package/utils/line.d.ts +0 -28
- package/utils/line.js +0 -136
- package/utils/loggerUtil.d.ts +0 -6
- package/utils/loggerUtil.js +0 -8
- package/utils/sessionStorage.d.ts +0 -9
- package/utils/sessionStorage.js +0 -51
- package/utils/utils.d.ts +0 -13
- package/utils/utils.js +0 -11
- package/utils/window.d.ts +0 -3
- package/utils/window.js +0 -24
- package/utils-CxIhC2xH.js +0 -4182
package/utils/chain.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const chain: <T>(input: T) => {
|
|
2
|
-
value: () => any;
|
|
3
|
-
map: (...args: any[]) => /*elided*/ any;
|
|
4
|
-
filter: (...args: any[]) => /*elided*/ any;
|
|
5
|
-
toPairs: (...args: any[]) => /*elided*/ any;
|
|
6
|
-
orderBy: (...args: any[]) => /*elided*/ any;
|
|
7
|
-
groupBy: (...args: any[]) => /*elided*/ any;
|
|
8
|
-
sortBy: (...args: any[]) => /*elided*/ any;
|
|
9
|
-
countBy: (...args: any[]) => /*elided*/ any;
|
|
10
|
-
entries: (...args: any[]) => /*elided*/ any;
|
|
11
|
-
maxBy: (...args: any[]) => /*elided*/ any;
|
|
12
|
-
reverse: (...args: any[]) => /*elided*/ any;
|
|
13
|
-
};
|
|
14
|
-
export default chain;
|
package/utils/chain.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { c as countBy } from "../countBy-C69WslUA.js";
|
|
2
|
-
import { k as keys, b as arrayFilter } from "../_Uint8Array-BlVVH1tp.js";
|
|
3
|
-
import { b as baseEach, a as baseForOwn } from "../_createAggregator-BpVy5xMi.js";
|
|
4
|
-
import { b as baseIteratee } from "../_baseIteratee-p6Nj07-n.js";
|
|
5
|
-
import { i as isArray } from "../_Map-kgDsDYxq.js";
|
|
6
|
-
import { g as groupBy } from "../groupBy-DC2oOuBN.js";
|
|
7
|
-
import { a as arrayMap } from "../_baseGet-BSK_nnoz.js";
|
|
8
|
-
import { b as baseMap, a as baseOrderBy, m as maxBy, s as sortBy } from "../sortBy-B-UKp4GT.js";
|
|
9
|
-
import { b as baseAssignValue } from "../_baseAssignValue-CNbcU6Nb.js";
|
|
10
|
-
import { g as getTag } from "../_getTag-D3ToyefI.js";
|
|
11
|
-
import { m as mapToArray } from "../_baseIsEqual-B5xLoweL.js";
|
|
12
|
-
function baseToPairs(object, props) {
|
|
13
|
-
return arrayMap(props, function(key) {
|
|
14
|
-
return [key, object[key]];
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function setToPairs(set) {
|
|
18
|
-
var index = -1, result = Array(set.size);
|
|
19
|
-
set.forEach(function(value) {
|
|
20
|
-
result[++index] = [value, value];
|
|
21
|
-
});
|
|
22
|
-
return result;
|
|
23
|
-
}
|
|
24
|
-
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
25
|
-
function createToPairs(keysFunc) {
|
|
26
|
-
return function(object) {
|
|
27
|
-
var tag = getTag(object);
|
|
28
|
-
if (tag == mapTag) {
|
|
29
|
-
return mapToArray(object);
|
|
30
|
-
}
|
|
31
|
-
if (tag == setTag) {
|
|
32
|
-
return setToPairs(object);
|
|
33
|
-
}
|
|
34
|
-
return baseToPairs(object, keysFunc(object));
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
var toPairs = createToPairs(keys);
|
|
38
|
-
function baseFilter(collection, predicate) {
|
|
39
|
-
var result = [];
|
|
40
|
-
baseEach(collection, function(value, index, collection2) {
|
|
41
|
-
if (predicate(value, index, collection2)) {
|
|
42
|
-
result.push(value);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
return result;
|
|
46
|
-
}
|
|
47
|
-
function filter(collection, predicate) {
|
|
48
|
-
var func = isArray(collection) ? arrayFilter : baseFilter;
|
|
49
|
-
return func(collection, baseIteratee(predicate));
|
|
50
|
-
}
|
|
51
|
-
function map(collection, iteratee) {
|
|
52
|
-
var func = isArray(collection) ? arrayMap : baseMap;
|
|
53
|
-
return func(collection, baseIteratee(iteratee));
|
|
54
|
-
}
|
|
55
|
-
function mapValues(object, iteratee) {
|
|
56
|
-
var result = {};
|
|
57
|
-
iteratee = baseIteratee(iteratee);
|
|
58
|
-
baseForOwn(object, function(value, key, object2) {
|
|
59
|
-
baseAssignValue(result, key, iteratee(value, key, object2));
|
|
60
|
-
});
|
|
61
|
-
return result;
|
|
62
|
-
}
|
|
63
|
-
function orderBy(collection, iteratees, orders, guard) {
|
|
64
|
-
if (collection == null) {
|
|
65
|
-
return [];
|
|
66
|
-
}
|
|
67
|
-
if (!isArray(iteratees)) {
|
|
68
|
-
iteratees = iteratees == null ? [] : [iteratees];
|
|
69
|
-
}
|
|
70
|
-
orders = guard ? void 0 : orders;
|
|
71
|
-
if (!isArray(orders)) {
|
|
72
|
-
orders = orders == null ? [] : [orders];
|
|
73
|
-
}
|
|
74
|
-
return baseOrderBy(collection, iteratees, orders);
|
|
75
|
-
}
|
|
76
|
-
var arrayProto = Array.prototype;
|
|
77
|
-
var nativeReverse = arrayProto.reverse;
|
|
78
|
-
function reverse(array) {
|
|
79
|
-
return array == null ? array : nativeReverse.call(array);
|
|
80
|
-
}
|
|
81
|
-
const chainableFunctions = {
|
|
82
|
-
map,
|
|
83
|
-
filter,
|
|
84
|
-
toPairs,
|
|
85
|
-
orderBy,
|
|
86
|
-
groupBy,
|
|
87
|
-
sortBy,
|
|
88
|
-
countBy,
|
|
89
|
-
entries: toPairs,
|
|
90
|
-
maxBy,
|
|
91
|
-
reverse
|
|
92
|
-
};
|
|
93
|
-
const chain = (input) => {
|
|
94
|
-
let value = input;
|
|
95
|
-
const wrapper = {
|
|
96
|
-
...mapValues(chainableFunctions, (f) => (...args) => {
|
|
97
|
-
value = f(value, ...args);
|
|
98
|
-
return wrapper;
|
|
99
|
-
}),
|
|
100
|
-
value: () => value
|
|
101
|
-
};
|
|
102
|
-
return wrapper;
|
|
103
|
-
};
|
|
104
|
-
export {
|
|
105
|
-
chain as default
|
|
106
|
-
};
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Classification related utils.
|
|
3
|
-
*
|
|
4
|
-
* WARNING:
|
|
5
|
-
* Actual classification enforcement is handled server side. These utils are convenience functions mostly used for
|
|
6
|
-
* display purposes. They and are not expected to be used for critical access control enforcement. As such, error
|
|
7
|
-
* conditions are not raised and suitable default values are returned.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export type FormatProp = 'long' | 'short';
|
|
11
|
-
type LevelStylesheet = {
|
|
12
|
-
banner?: string;
|
|
13
|
-
label?: string;
|
|
14
|
-
text?: string;
|
|
15
|
-
color?: string;
|
|
16
|
-
};
|
|
17
|
-
type ClassificationLevel = {
|
|
18
|
-
aliases: string[];
|
|
19
|
-
css: LevelStylesheet;
|
|
20
|
-
description: string;
|
|
21
|
-
lvl: number;
|
|
22
|
-
name: string;
|
|
23
|
-
short_name: string;
|
|
24
|
-
is_hidden?: boolean;
|
|
25
|
-
};
|
|
26
|
-
type ClassificationRequired = {
|
|
27
|
-
aliases: string[];
|
|
28
|
-
description: string;
|
|
29
|
-
name: string;
|
|
30
|
-
is_required_group?: boolean;
|
|
31
|
-
require_lvl?: number;
|
|
32
|
-
short_name: string;
|
|
33
|
-
is_hidden?: boolean;
|
|
34
|
-
};
|
|
35
|
-
type ClassificationGroup = {
|
|
36
|
-
aliases: string[];
|
|
37
|
-
auto_select?: boolean;
|
|
38
|
-
description: string;
|
|
39
|
-
name: string;
|
|
40
|
-
short_name: string;
|
|
41
|
-
solitary_display_name?: string;
|
|
42
|
-
is_hidden?: boolean;
|
|
43
|
-
};
|
|
44
|
-
type ClassificationSubGroup = {
|
|
45
|
-
aliases: string[];
|
|
46
|
-
auto_select?: boolean;
|
|
47
|
-
description: string;
|
|
48
|
-
limited_to_group?: string;
|
|
49
|
-
name: string;
|
|
50
|
-
require_group?: string;
|
|
51
|
-
short_name: string;
|
|
52
|
-
solitary_display_name?: string;
|
|
53
|
-
is_hidden?: boolean;
|
|
54
|
-
};
|
|
55
|
-
type ClassificationYAMLDefinition = {
|
|
56
|
-
dynamic_groups: boolean;
|
|
57
|
-
dynamic_groups_type: string;
|
|
58
|
-
enforce: boolean;
|
|
59
|
-
groups: ClassificationGroup[];
|
|
60
|
-
levels: ClassificationLevel[];
|
|
61
|
-
required: ClassificationRequired[];
|
|
62
|
-
restricted: string;
|
|
63
|
-
subgroups: ClassificationSubGroup[];
|
|
64
|
-
unrestricted: string;
|
|
65
|
-
};
|
|
66
|
-
type StringMap = {
|
|
67
|
-
[propName: string]: string;
|
|
68
|
-
};
|
|
69
|
-
type StringMapArray = {
|
|
70
|
-
[propName: string]: string[];
|
|
71
|
-
};
|
|
72
|
-
type StylesheetMap = {
|
|
73
|
-
[propName: string]: LevelStylesheet;
|
|
74
|
-
};
|
|
75
|
-
type ParamsMap = {
|
|
76
|
-
[propName: string]: {
|
|
77
|
-
is_required_group?: boolean;
|
|
78
|
-
solitary_display_name?: string;
|
|
79
|
-
require_lvl?: number;
|
|
80
|
-
require_group?: string;
|
|
81
|
-
limited_to_group?: string;
|
|
82
|
-
is_hidden?: boolean;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
export type ClassificationDefinition = {
|
|
86
|
-
RESTRICTED: string;
|
|
87
|
-
UNRESTRICTED: string;
|
|
88
|
-
access_req_aliases: StringMapArray;
|
|
89
|
-
access_req_map_lts: StringMap;
|
|
90
|
-
access_req_map_stl: StringMap;
|
|
91
|
-
description: StringMap;
|
|
92
|
-
dynamic_groups: boolean;
|
|
93
|
-
dynamic_groups_type: 'email' | 'group' | 'all';
|
|
94
|
-
enforce: boolean;
|
|
95
|
-
groups_aliases: StringMapArray;
|
|
96
|
-
groups_auto_select: string[];
|
|
97
|
-
groups_auto_select_short: string[];
|
|
98
|
-
groups_map_lts: StringMap;
|
|
99
|
-
groups_map_stl: StringMap;
|
|
100
|
-
invalid_mode: boolean;
|
|
101
|
-
levels_aliases: StringMap;
|
|
102
|
-
levels_map: StringMap;
|
|
103
|
-
levels_map_lts: StringMap;
|
|
104
|
-
levels_map_stl: StringMap;
|
|
105
|
-
levels_styles_map: StylesheetMap;
|
|
106
|
-
original_definition: ClassificationYAMLDefinition;
|
|
107
|
-
params_map: ParamsMap;
|
|
108
|
-
subgroups_aliases: StringMapArray;
|
|
109
|
-
subgroups_auto_select: string[];
|
|
110
|
-
subgroups_auto_select_short: string[];
|
|
111
|
-
subgroups_map_lts: StringMap;
|
|
112
|
-
subgroups_map_stl: StringMap;
|
|
113
|
-
};
|
|
114
|
-
export type ClassificationParts = {
|
|
115
|
-
lvlIdx: number;
|
|
116
|
-
lvl: string;
|
|
117
|
-
req: string[];
|
|
118
|
-
groups: string[];
|
|
119
|
-
subgroups: string[];
|
|
120
|
-
};
|
|
121
|
-
export declare const defaultParts: ClassificationParts;
|
|
122
|
-
type DisabledControls = {
|
|
123
|
-
levels: string[];
|
|
124
|
-
groups: string[];
|
|
125
|
-
};
|
|
126
|
-
export declare const defaultDisabled: DisabledControls;
|
|
127
|
-
export declare class InvalidClassification extends Error {
|
|
128
|
-
}
|
|
129
|
-
export declare function getLevelText(lvl: number, c12nDef: ClassificationDefinition, format: FormatProp, isMobile: boolean): string;
|
|
130
|
-
export declare function getParts(c12n: string, c12nDef: ClassificationDefinition, format: FormatProp, isMobile: boolean): ClassificationParts;
|
|
131
|
-
export declare function canSeeRequired(user_req: string[], req: string[]): boolean;
|
|
132
|
-
export declare function canSeeGroups(user_groups: string[], groups: string[]): boolean;
|
|
133
|
-
/**
|
|
134
|
-
* Normalize a given classification by applying the rules defined in the classification definition.
|
|
135
|
-
* This function will remove any invalid parts and add missing parts to the classification.
|
|
136
|
-
* It will also ensure that the display of the classification is always done the same way
|
|
137
|
-
*
|
|
138
|
-
* Note: This function mutates the passed in `parts` parameter.
|
|
139
|
-
*
|
|
140
|
-
* @param parts - `ClassificationParts` object containing the parsed classification components
|
|
141
|
-
* @param c12nDef - ClassificationDefinition returned by the API server
|
|
142
|
-
* @param format - return results in `long` or `short` format
|
|
143
|
-
* @param isMobile - `true`/`false` if the results should be returned for display on a mobile device
|
|
144
|
-
* @param skipAutoSelect - `true`/`false` skip auto selecting required groups
|
|
145
|
-
*
|
|
146
|
-
* @returns A normalized version of the original classification
|
|
147
|
-
*
|
|
148
|
-
*/
|
|
149
|
-
export declare function normalizedClassification(parts: ClassificationParts, c12nDef: ClassificationDefinition, format: FormatProp, isMobile: boolean, skipAutoSelect?: boolean): string;
|
|
150
|
-
type ClassificationValidator = {
|
|
151
|
-
disabled: DisabledControls;
|
|
152
|
-
parts: ClassificationParts;
|
|
153
|
-
};
|
|
154
|
-
export declare const defaultClassificationValidator: ClassificationValidator;
|
|
155
|
-
/**
|
|
156
|
-
* Applies the Level, Require and Group rules and returns valid and invalid options based on the given input
|
|
157
|
-
*
|
|
158
|
-
* @param parts - `ClassificationParts` object containing the parsed classification components
|
|
159
|
-
* @param c12nDef - ClassificationDefinition returned by the API server
|
|
160
|
-
* @param format - return results in `long` or `short` format
|
|
161
|
-
* @param isMobile - `true`/`false` if the results should be returned for display on a mobile device
|
|
162
|
-
* @param userClassification - `true`/`false` if to apply `auto select` based on the user
|
|
163
|
-
*
|
|
164
|
-
* @returns The most restrictive classification that we could create out of the two
|
|
165
|
-
*
|
|
166
|
-
*/
|
|
167
|
-
export declare function applyClassificationRules(parts: ClassificationParts, c12nDef: ClassificationDefinition, format: FormatProp, isMobile: boolean, userClassification?: boolean): ClassificationValidator;
|
|
168
|
-
/**
|
|
169
|
-
* Mixes two classifications and returns to most restrictive form for them
|
|
170
|
-
*
|
|
171
|
-
* @param c12n_1 - First classification
|
|
172
|
-
* @param c12n_2 - Second classification
|
|
173
|
-
* @param c12nDef - ClassificationDefinition returned by the API server
|
|
174
|
-
* @param format - return results in `long` or `short` format
|
|
175
|
-
* @param isMobile - `true`/`false` if the results should be returned for display on a mobile device
|
|
176
|
-
*
|
|
177
|
-
* @returns The most restrictive classification that we could create out of the two
|
|
178
|
-
*
|
|
179
|
-
*/
|
|
180
|
-
export declare function getMaxClassification(c12n_1: string, c12n_2: string, c12nDef: ClassificationDefinition, format: FormatProp, isMobile: boolean): string;
|
|
181
|
-
/**
|
|
182
|
-
*
|
|
183
|
-
* Given a user classification, check if a user is allow to see a certain classification
|
|
184
|
-
*
|
|
185
|
-
* @param user_c12n - Maximum classification for the user
|
|
186
|
-
* @param c12n - Classification the user wishes to see
|
|
187
|
-
* @param c12nDef - ClassificationDefinition returned by the API server
|
|
188
|
-
* @param enforce - `true`/`false` if access controls are enabled
|
|
189
|
-
* @param ignoreInvalid - `true`/`false` if invalid classifications should raise errors or just deny access
|
|
190
|
-
*
|
|
191
|
-
* @returns True is the user can see the classification
|
|
192
|
-
*
|
|
193
|
-
*/
|
|
194
|
-
export declare function isAccessible(user_c12n: string, c12n: string, c12nDef: ClassificationDefinition, enforce?: boolean, ignoreInvalid?: boolean): boolean;
|
|
195
|
-
export {};
|