@cccsaurora/clue-ui 0.15.0-dev.31 → 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 +143 -39
- 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/package.json
CHANGED
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
"react-app"
|
|
41
41
|
]
|
|
42
42
|
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist"
|
|
45
|
+
],
|
|
43
46
|
"jest": {
|
|
44
47
|
"transformIgnorePatterns": [
|
|
45
48
|
"!node_modules/url-join"
|
|
@@ -50,57 +53,158 @@
|
|
|
50
53
|
"prettier --write --config .prettierrc"
|
|
51
54
|
]
|
|
52
55
|
},
|
|
53
|
-
"main": "main.js",
|
|
56
|
+
"main": "dist/main.js",
|
|
54
57
|
"name": "@cccsaurora/clue-ui",
|
|
55
58
|
"peerDependencies": {
|
|
56
59
|
"@emotion/react": "^11.11.1",
|
|
57
60
|
"@emotion/styled": "^11.11.0",
|
|
58
61
|
"@mui/lab": "^5.0.0-alpha.134 || ^6.0.0 || ^6.0.0-beta.9",
|
|
59
62
|
"@mui/material": "^5.13.6 || ^6.0.0",
|
|
60
|
-
"react": "^18.
|
|
61
|
-
"react-dom": "^18.
|
|
63
|
+
"react": "^18.2.0",
|
|
64
|
+
"react-dom": "^18.2.0"
|
|
62
65
|
},
|
|
63
66
|
"type": "module",
|
|
64
|
-
"types": "main.d.ts",
|
|
65
|
-
"version": "0.15.0
|
|
67
|
+
"types": "dist/main.d.ts",
|
|
68
|
+
"version": "0.15.0",
|
|
66
69
|
"exports": {
|
|
67
|
-
"
|
|
70
|
+
"./i18n": "./i18n.js",
|
|
68
71
|
"./index.css": "./index.css",
|
|
69
|
-
"./
|
|
70
|
-
"./
|
|
71
|
-
"./
|
|
72
|
-
"./
|
|
72
|
+
"./api/*": "./api/*.js",
|
|
73
|
+
"./api": "./api/index.js",
|
|
74
|
+
"./models/*": "./models/*.js",
|
|
75
|
+
"./locales/*.json": "./locales/*.json",
|
|
73
76
|
"./utils/*": "./utils/*.js",
|
|
74
77
|
"./utils/*.json": "./utils/*.json",
|
|
78
|
+
"./rest/*": "./rest/*.js",
|
|
75
79
|
"./components/*": "./components/*.js",
|
|
76
|
-
"./
|
|
77
|
-
"./
|
|
78
|
-
"./
|
|
79
|
-
"./
|
|
80
|
-
"./
|
|
81
|
-
"./
|
|
82
|
-
"./
|
|
83
|
-
"./
|
|
84
|
-
"./
|
|
85
|
-
"./
|
|
86
|
-
"./
|
|
87
|
-
"./
|
|
88
|
-
"./
|
|
89
|
-
"./
|
|
90
|
-
"./
|
|
91
|
-
"./
|
|
92
|
-
"./
|
|
93
|
-
"./
|
|
94
|
-
"./components/
|
|
95
|
-
"./components/
|
|
96
|
-
"./components/
|
|
97
|
-
"./components/
|
|
98
|
-
"./components/
|
|
99
|
-
"./components/
|
|
100
|
-
"./components/
|
|
101
|
-
"./components/
|
|
102
|
-
"./components/
|
|
103
|
-
"./components/
|
|
104
|
-
"./components/
|
|
80
|
+
"./lib/*": "./lib/*.js",
|
|
81
|
+
"./commons/*": "./commons/*.js",
|
|
82
|
+
"./tests/*": "./tests/*.js",
|
|
83
|
+
"./api/lookup/*": "./api/lookup/*.js",
|
|
84
|
+
"./api/lookup": "./api/lookup/index.js",
|
|
85
|
+
"./api/fetchers/*": "./api/fetchers/*.js",
|
|
86
|
+
"./api/fetchers": "./api/fetchers/index.js",
|
|
87
|
+
"./api/static/*": "./api/static/*.js",
|
|
88
|
+
"./api/static": "./api/static/index.js",
|
|
89
|
+
"./api/auth/*": "./api/auth/*.js",
|
|
90
|
+
"./api/auth": "./api/auth/index.js",
|
|
91
|
+
"./api/actions/*": "./api/actions/*.js",
|
|
92
|
+
"./api/actions": "./api/actions/index.js",
|
|
93
|
+
"./api/configs/*": "./api/configs/*.js",
|
|
94
|
+
"./api/configs": "./api/configs/index.js",
|
|
95
|
+
"./models/entities/*": "./models/entities/*.js",
|
|
96
|
+
"./locales/en/*.json": "./locales/en/*.json",
|
|
97
|
+
"./locales/fr/*.json": "./locales/fr/*.json",
|
|
98
|
+
"./components/hooks/*": "./components/hooks/*.js",
|
|
99
|
+
"./components/app/*": "./components/app/*.js",
|
|
100
|
+
"./components/logins/*": "./components/logins/*.js",
|
|
101
|
+
"./components/elements/*": "./components/elements/*.js",
|
|
102
|
+
"./components/routes/*": "./components/routes/*.js",
|
|
103
|
+
"./components/app/hooks/*": "./components/app/hooks/*.js",
|
|
104
|
+
"./components/app/providers/*": "./components/app/providers/*.js",
|
|
105
|
+
"./components/app/drawers/*": "./components/app/drawers/*.js",
|
|
106
|
+
"./components/logins/hooks/*": "./components/logins/hooks/*.js",
|
|
107
|
+
"./components/logins/auth/*": "./components/logins/auth/*.js",
|
|
108
|
+
"./components/elements/display/*": "./components/elements/display/*.js",
|
|
109
|
+
"./components/elements/display/modals/*": "./components/elements/display/modals/*.js",
|
|
110
|
+
"./components/routes/examples/*": "./components/routes/examples/*.js",
|
|
111
|
+
"./components/routes/examples": "./components/routes/examples/index.js",
|
|
112
|
+
"./components/routes/settings/*": "./components/routes/settings/*.js",
|
|
113
|
+
"./components/routes/home/*": "./components/routes/home/*.js",
|
|
114
|
+
"./components/routes/home": "./components/routes/home/index.js",
|
|
115
|
+
"./lib/icons/*": "./lib/icons/*.js",
|
|
116
|
+
"./lib/types/*": "./lib/types/*.js",
|
|
117
|
+
"./lib/utils/*": "./lib/utils/*.js",
|
|
118
|
+
"./lib/components/*": "./lib/components/*.js",
|
|
119
|
+
"./lib/hooks/*": "./lib/hooks/*.js",
|
|
120
|
+
"./lib/text/*": "./lib/text/*.js",
|
|
121
|
+
"./lib/data/*": "./lib/data/*.js",
|
|
122
|
+
"./lib/database/*": "./lib/database/*.js",
|
|
123
|
+
"./lib/database": "./lib/database/index.js",
|
|
124
|
+
"./lib/components/group/*": "./lib/components/group/*.js",
|
|
125
|
+
"./lib/components/enrichment/*": "./lib/components/enrichment/*.js",
|
|
126
|
+
"./lib/components/fetchers/*": "./lib/components/fetchers/*.js",
|
|
127
|
+
"./lib/components/stats/*": "./lib/components/stats/*.js",
|
|
128
|
+
"./lib/components/display/*": "./lib/components/display/*.js",
|
|
129
|
+
"./lib/components/actions/*": "./lib/components/actions/*.js",
|
|
130
|
+
"./lib/components/display/icons/*": "./lib/components/display/icons/*.js",
|
|
131
|
+
"./lib/components/display/graph/*": "./lib/components/display/graph/*.js",
|
|
132
|
+
"./lib/components/display/graph": "./lib/components/display/graph/index.js",
|
|
133
|
+
"./lib/components/display/json/*": "./lib/components/display/json/*.js",
|
|
134
|
+
"./lib/components/display/json": "./lib/components/display/json/index.js",
|
|
135
|
+
"./lib/components/display/markdown/*.md": "./lib/components/display/markdown/*.md.js",
|
|
136
|
+
"./lib/components/display/markdown": "./lib/components/display/markdown/index.js",
|
|
137
|
+
"./lib/components/display/graph/elements/*": "./lib/components/display/graph/elements/*.js",
|
|
138
|
+
"./lib/components/display/graph/visualizations/*": "./lib/components/display/graph/visualizations/*.js",
|
|
139
|
+
"./lib/components/display/graph/visualizations/icons/*": "./lib/components/display/graph/visualizations/icons/*.js",
|
|
140
|
+
"./lib/components/display/graph/visualizations/icons": "./lib/components/display/graph/visualizations/icons/index.js",
|
|
141
|
+
"./lib/components/display/graph/visualizations/cloud/*": "./lib/components/display/graph/visualizations/cloud/*.js",
|
|
142
|
+
"./lib/components/display/graph/visualizations/cloud": "./lib/components/display/graph/visualizations/cloud/index.js",
|
|
143
|
+
"./lib/components/display/graph/visualizations/tree/*": "./lib/components/display/graph/visualizations/tree/*.js",
|
|
144
|
+
"./lib/components/display/graph/visualizations/tree": "./lib/components/display/graph/visualizations/tree/index.js",
|
|
145
|
+
"./lib/components/display/graph/visualizations/panels/*": "./lib/components/display/graph/visualizations/panels/*.js",
|
|
146
|
+
"./lib/components/display/markdown/markdownPlugins/*.md": "./lib/components/display/markdown/markdownPlugins/*.md.js",
|
|
147
|
+
"./lib/components/actions/form/*": "./lib/components/actions/form/*.js",
|
|
148
|
+
"./commons/addons/*": "./commons/addons/*.js",
|
|
149
|
+
"./commons/addons": "./commons/addons/index.js",
|
|
150
|
+
"./commons/components/*": "./commons/components/*.js",
|
|
151
|
+
"./commons/addons/utils/*": "./commons/addons/utils/*.js",
|
|
152
|
+
"./commons/addons/controls/*": "./commons/addons/controls/*.js",
|
|
153
|
+
"./commons/addons/controls": "./commons/addons/controls/index.js",
|
|
154
|
+
"./commons/addons/form/*": "./commons/addons/form/*.js",
|
|
155
|
+
"./commons/addons/search/*": "./commons/addons/search/*.js",
|
|
156
|
+
"./commons/addons/search": "./commons/addons/search/index.js",
|
|
157
|
+
"./commons/addons/vsbox/*": "./commons/addons/vsbox/*.js",
|
|
158
|
+
"./commons/addons/flexers/*": "./commons/addons/flexers/*.js",
|
|
159
|
+
"./commons/addons/lists/*": "./commons/addons/lists/*.js",
|
|
160
|
+
"./commons/addons/lists": "./commons/addons/lists/index.js",
|
|
161
|
+
"./commons/addons/display/*": "./commons/addons/display/*.js",
|
|
162
|
+
"./commons/addons/styles/*": "./commons/addons/styles/*.js",
|
|
163
|
+
"./commons/addons/controls/query/*": "./commons/addons/controls/query/*.js",
|
|
164
|
+
"./commons/addons/controls/query": "./commons/addons/controls/query/index.js",
|
|
165
|
+
"./commons/addons/controls/phrase/*": "./commons/addons/controls/phrase/*.js",
|
|
166
|
+
"./commons/addons/controls/phrase": "./commons/addons/controls/phrase/index.js",
|
|
167
|
+
"./commons/addons/controls/query/hooks/*": "./commons/addons/controls/query/hooks/*.js",
|
|
168
|
+
"./commons/addons/controls/query/elements/*": "./commons/addons/controls/query/elements/*.js",
|
|
169
|
+
"./commons/addons/controls/phrase/lucene/*": "./commons/addons/controls/phrase/lucene/*.js",
|
|
170
|
+
"./commons/addons/controls/phrase/lucene": "./commons/addons/controls/phrase/lucene/index.js",
|
|
171
|
+
"./commons/addons/controls/phrase/word/*": "./commons/addons/controls/phrase/word/*.js",
|
|
172
|
+
"./commons/addons/controls/phrase/lucene/consumers/*": "./commons/addons/controls/phrase/lucene/consumers/*.js",
|
|
173
|
+
"./commons/addons/controls/phrase/word/consumers/*": "./commons/addons/controls/phrase/word/consumers/*.js",
|
|
174
|
+
"./commons/addons/form/controls/*": "./commons/addons/form/controls/*.js",
|
|
175
|
+
"./commons/addons/form/effects/*": "./commons/addons/form/effects/*.js",
|
|
176
|
+
"./commons/addons/form/effects": "./commons/addons/form/effects/index.js",
|
|
177
|
+
"./commons/addons/form/hooks/*": "./commons/addons/form/hooks/*.js",
|
|
178
|
+
"./commons/addons/search/models/*": "./commons/addons/search/models/*.js",
|
|
179
|
+
"./commons/addons/search/phrase/*": "./commons/addons/search/phrase/*.js",
|
|
180
|
+
"./commons/addons/search/hooks/*": "./commons/addons/search/hooks/*.js",
|
|
181
|
+
"./commons/addons/search/phrase/consumers/*": "./commons/addons/search/phrase/consumers/*.js",
|
|
182
|
+
"./commons/addons/vsbox/hooks/*": "./commons/addons/vsbox/hooks/*.js",
|
|
183
|
+
"./commons/addons/lists/hooks/*": "./commons/addons/lists/hooks/*.js",
|
|
184
|
+
"./commons/addons/lists/table/*": "./commons/addons/lists/table/*.js",
|
|
185
|
+
"./commons/addons/lists/table": "./commons/addons/lists/table/index.js",
|
|
186
|
+
"./commons/addons/display/buttons/*": "./commons/addons/display/buttons/*.js",
|
|
187
|
+
"./commons/addons/display/buttons": "./commons/addons/display/buttons/index.js",
|
|
188
|
+
"./commons/addons/display/labels/*": "./commons/addons/display/labels/*.js",
|
|
189
|
+
"./commons/addons/display/links/*": "./commons/addons/display/links/*.js",
|
|
190
|
+
"./commons/addons/display/chips/*": "./commons/addons/display/chips/*.js",
|
|
191
|
+
"./commons/components/utils/*": "./commons/components/utils/*.js",
|
|
192
|
+
"./commons/components/leftnav/*": "./commons/components/leftnav/*.js",
|
|
193
|
+
"./commons/components/pages/*": "./commons/components/pages/*.js",
|
|
194
|
+
"./commons/components/topnav/*": "./commons/components/topnav/*.js",
|
|
195
|
+
"./commons/components/app/*": "./commons/components/app/*.js",
|
|
196
|
+
"./commons/components/search/*": "./commons/components/search/*.js",
|
|
197
|
+
"./commons/components/breadcrumbs/*": "./commons/components/breadcrumbs/*.js",
|
|
198
|
+
"./commons/components/display/*": "./commons/components/display/*.js",
|
|
199
|
+
"./commons/components/notification/*": "./commons/components/notification/*.js",
|
|
200
|
+
"./commons/components/notification": "./commons/components/notification/index.js",
|
|
201
|
+
"./commons/components/utils/hooks/*": "./commons/components/utils/hooks/*.js",
|
|
202
|
+
"./commons/components/pages/hooks/*": "./commons/components/pages/hooks/*.js",
|
|
203
|
+
"./commons/components/app/hooks/*": "./commons/components/app/hooks/*.js",
|
|
204
|
+
"./commons/components/app/providers/*": "./commons/components/app/providers/*.js",
|
|
205
|
+
"./commons/components/display/hooks/*": "./commons/components/display/hooks/*.js",
|
|
206
|
+
"./commons/components/notification/elements/*": "./commons/components/notification/elements/*.js",
|
|
207
|
+
"./commons/components/notification/elements/item/*": "./commons/components/notification/elements/item/*.js",
|
|
208
|
+
"./tests/models/*": "./tests/models/*.js"
|
|
105
209
|
}
|
|
106
210
|
}
|
package/ActionForm-DgfJwTzt.js
DELETED
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { materialRenderers, materialCells } from "@jsonforms/material-renderers";
|
|
3
|
-
import { JsonForms } from "@jsonforms/react";
|
|
4
|
-
import { Stack, Typography, IconButton, Modal, Paper, Box, Button, Divider, CircularProgress, Collapse } from "@mui/material";
|
|
5
|
-
import Iconified from "./components/display/icons/Iconified.js";
|
|
6
|
-
import { J as JSONViewer } from "./index-BDrtH5ec.js";
|
|
7
|
-
import { ClueComponentContext } from "./hooks/ClueComponentContext.js";
|
|
8
|
-
import { c as createContext, u as useContextSelector, a as useContext } from "./index-BDVjGvMI.js";
|
|
9
|
-
import { A as Ajv } from "./index-Dn2NHyXg.js";
|
|
10
|
-
import { a as api } from "./useClueTypeConfig-D9ZSxa4F.js";
|
|
11
|
-
import { useState, useCallback, useEffect, useMemo, memo } from "react";
|
|
12
|
-
import ErrorBoundary from "./components/ErrorBoundary.js";
|
|
13
|
-
import { adaptSchema } from "./components/actions/form/schemaAdapter.js";
|
|
14
|
-
import { d as toString } from "./_baseGet-BSK_nnoz.js";
|
|
15
|
-
import { b as baseSlice } from "./_baseSlice-GAv_YFTT.js";
|
|
16
|
-
import { i as isEqual } from "./utils-CxIhC2xH.js";
|
|
17
|
-
import ResultModal from "./components/actions/ResultModal.js";
|
|
18
|
-
import { SNACKBAR_EVENT_ID } from "./data/event.js";
|
|
19
|
-
import { safeDispatchEvent } from "./utils/window.js";
|
|
20
|
-
import useClue from "./hooks/useClue.js";
|
|
21
|
-
function castSlice(array, start, end) {
|
|
22
|
-
var length = array.length;
|
|
23
|
-
end = end === void 0 ? length : end;
|
|
24
|
-
return false ? array : baseSlice(array, start, end);
|
|
25
|
-
}
|
|
26
|
-
var rsAstralRange$1 = "\\ud800-\\udfff", rsComboMarksRange$1 = "\\u0300-\\u036f", reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$1 = "\\u20d0-\\u20ff", rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, rsVarRange$1 = "\\ufe0e\\ufe0f";
|
|
27
|
-
var rsZWJ$1 = "\\u200d";
|
|
28
|
-
var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
|
|
29
|
-
function hasUnicode(string) {
|
|
30
|
-
return reHasUnicode.test(string);
|
|
31
|
-
}
|
|
32
|
-
function asciiToArray(string) {
|
|
33
|
-
return string.split("");
|
|
34
|
-
}
|
|
35
|
-
var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = "\\ufe0e\\ufe0f";
|
|
36
|
-
var rsAstral = "[" + rsAstralRange + "]", rsCombo = "[" + rsComboRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ = "\\u200d";
|
|
37
|
-
var reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
|
|
38
|
-
var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
|
|
39
|
-
function unicodeToArray(string) {
|
|
40
|
-
return string.match(reUnicode) || [];
|
|
41
|
-
}
|
|
42
|
-
function stringToArray(string) {
|
|
43
|
-
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
|
|
44
|
-
}
|
|
45
|
-
function createCaseFirst(methodName) {
|
|
46
|
-
return function(string) {
|
|
47
|
-
string = toString(string);
|
|
48
|
-
var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
|
|
49
|
-
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
|
|
50
|
-
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
|
|
51
|
-
return chr[methodName]() + trailing;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
var upperFirst = createCaseFirst("toUpperCase");
|
|
55
|
-
function capitalize(string) {
|
|
56
|
-
return upperFirst(toString(string).toLowerCase());
|
|
57
|
-
}
|
|
58
|
-
const AJV = new Ajv({ removeAdditional: true, coerceTypes: true, strict: false });
|
|
59
|
-
const ClueActionContext = createContext(null);
|
|
60
|
-
const ClueActionProvider = ({
|
|
61
|
-
baseURL,
|
|
62
|
-
children,
|
|
63
|
-
classification: defaultClassification,
|
|
64
|
-
getToken,
|
|
65
|
-
onNetworkCall
|
|
66
|
-
}) => {
|
|
67
|
-
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
|
|
68
|
-
const { ready } = useClue();
|
|
69
|
-
const [runningActionData, setRunningActionData] = useState(null);
|
|
70
|
-
const [actionResults, setActionResults] = useState({});
|
|
71
|
-
const [showResultModal, setShowResultModal] = useState(false);
|
|
72
|
-
const [lastResult, setLastResult] = useState(null);
|
|
73
|
-
const [loading, setLoading] = useState(false);
|
|
74
|
-
const [availableActions, setAvailableActions] = useState({});
|
|
75
|
-
const refreshActions = useCallback(async () => {
|
|
76
|
-
if (!ready) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const headers = {};
|
|
80
|
-
const token = getToken == null ? void 0 : getToken();
|
|
81
|
-
if (token) {
|
|
82
|
-
headers.Authorization = `Bearer ${token}`;
|
|
83
|
-
}
|
|
84
|
-
let requestConfig = { baseURL, headers };
|
|
85
|
-
if (onNetworkCall) {
|
|
86
|
-
requestConfig = onNetworkCall(requestConfig);
|
|
87
|
-
}
|
|
88
|
-
const _actions = await api.actions.get(requestConfig);
|
|
89
|
-
if (_actions) {
|
|
90
|
-
setAvailableActions(_actions);
|
|
91
|
-
}
|
|
92
|
-
return _actions;
|
|
93
|
-
}, [baseURL, getToken, onNetworkCall, ready]);
|
|
94
|
-
useEffect(() => {
|
|
95
|
-
refreshActions();
|
|
96
|
-
}, [baseURL, ready]);
|
|
97
|
-
const getHashKey = useCallback(
|
|
98
|
-
(type, value, classification) => JSON.stringify({ type, value, classification: classification ?? defaultClassification }),
|
|
99
|
-
[defaultClassification]
|
|
100
|
-
);
|
|
101
|
-
const executeAction = useCallback(
|
|
102
|
-
async (actionId, selectors, params, options) => {
|
|
103
|
-
const { forceMenu, onComplete, skipMenu, timeout } = {
|
|
104
|
-
forceMenu: false,
|
|
105
|
-
skipMenu: false,
|
|
106
|
-
onComplete: null,
|
|
107
|
-
timeout: null,
|
|
108
|
-
...options
|
|
109
|
-
};
|
|
110
|
-
const headers = {};
|
|
111
|
-
const token = getToken == null ? void 0 : getToken();
|
|
112
|
-
if (token) {
|
|
113
|
-
headers.Authorization = `Bearer ${token}`;
|
|
114
|
-
}
|
|
115
|
-
if (!Object.keys(availableActions).includes(actionId)) {
|
|
116
|
-
throw new Error("Invalid action id");
|
|
117
|
-
}
|
|
118
|
-
const stringifiedSelectors = selectors.map(
|
|
119
|
-
(selector) => selector.type === "telemetry" ? { ...selector, value: JSON.stringify(selector.value) } : selector
|
|
120
|
-
);
|
|
121
|
-
const actionToRun = availableActions[actionId];
|
|
122
|
-
const validator = AJV.compile(actionToRun.params);
|
|
123
|
-
const validatedParams = { selectors: stringifiedSelectors, ...params };
|
|
124
|
-
setLoading(true);
|
|
125
|
-
if (!validator(validatedParams) || forceMenu) {
|
|
126
|
-
if (skipMenu && !forceMenu) {
|
|
127
|
-
console.error(`Form is not valid (${validator.errors.length} errors)`);
|
|
128
|
-
throw new Error("Form is not completed");
|
|
129
|
-
}
|
|
130
|
-
if ((runningActionData == null ? void 0 : runningActionData.id) === actionId) {
|
|
131
|
-
console.error(`Form is not valid (${validator.errors.length} errors)`);
|
|
132
|
-
safeDispatchEvent(
|
|
133
|
-
new CustomEvent(SNACKBAR_EVENT_ID, {
|
|
134
|
-
detail: {
|
|
135
|
-
message: t("action.error.validation"),
|
|
136
|
-
level: "error"
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
setRunningActionData({
|
|
142
|
-
id: actionId,
|
|
143
|
-
action: actionToRun,
|
|
144
|
-
selectors,
|
|
145
|
-
params: validatedParams ?? {},
|
|
146
|
-
onComplete,
|
|
147
|
-
timeout
|
|
148
|
-
});
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
try {
|
|
152
|
-
let requestConfig = { baseURL, headers };
|
|
153
|
-
if (onNetworkCall) {
|
|
154
|
-
requestConfig = onNetworkCall(requestConfig);
|
|
155
|
-
}
|
|
156
|
-
const actionResult = await api.actions.post(
|
|
157
|
-
actionId,
|
|
158
|
-
stringifiedSelectors,
|
|
159
|
-
validatedParams ?? {},
|
|
160
|
-
{ timeout },
|
|
161
|
-
requestConfig
|
|
162
|
-
);
|
|
163
|
-
const actionResultWithData = { ...actionResult, actionId, action: actionToRun };
|
|
164
|
-
onComplete == null ? void 0 : onComplete(actionResultWithData);
|
|
165
|
-
setActionResults((_results) => {
|
|
166
|
-
const keys = selectors.map((value) => getHashKey(value.type, value.value, value.classification));
|
|
167
|
-
return {
|
|
168
|
-
..._results,
|
|
169
|
-
...keys.reduce(
|
|
170
|
-
(acc, key) => ({
|
|
171
|
-
...acc,
|
|
172
|
-
[key]: [..._results[key] ?? [], actionResultWithData]
|
|
173
|
-
}),
|
|
174
|
-
{}
|
|
175
|
-
)
|
|
176
|
-
};
|
|
177
|
-
});
|
|
178
|
-
safeDispatchEvent(
|
|
179
|
-
new CustomEvent(SNACKBAR_EVENT_ID, {
|
|
180
|
-
detail: {
|
|
181
|
-
message: /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", spacing: 0.5, width: "100%", children: [
|
|
182
|
-
/* @__PURE__ */ jsx(Typography, { children: actionResult.summary }),
|
|
183
|
-
actionResult.link && /* @__PURE__ */ jsx(IconButton, { component: "a", href: actionResult.link, size: "small", target: "_blank", children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-open-in-new", fontSize: "small" }) })
|
|
184
|
-
] }),
|
|
185
|
-
timeout: actionResult.link ? null : 5e3,
|
|
186
|
-
level: actionResult.outcome === "success" ? "success" : "error",
|
|
187
|
-
options: {
|
|
188
|
-
style: {
|
|
189
|
-
minWidth: 0
|
|
190
|
-
},
|
|
191
|
-
SnackbarProps: {
|
|
192
|
-
style: {
|
|
193
|
-
minWidth: 0
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
})
|
|
199
|
-
);
|
|
200
|
-
if (actionResult.outcome === "success") {
|
|
201
|
-
setRunningActionData(null);
|
|
202
|
-
}
|
|
203
|
-
if (actionResult.format) {
|
|
204
|
-
setLastResult({ ...actionResult, actionId, action: actionToRun });
|
|
205
|
-
if (actionResult.format !== "pivot") {
|
|
206
|
-
setShowResultModal(true);
|
|
207
|
-
} else {
|
|
208
|
-
window.open(actionResult.output, "_blank", "noreferrer");
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
} catch (e) {
|
|
212
|
-
safeDispatchEvent(
|
|
213
|
-
new CustomEvent(SNACKBAR_EVENT_ID, {
|
|
214
|
-
detail: {
|
|
215
|
-
message: e.toString(),
|
|
216
|
-
level: "error"
|
|
217
|
-
}
|
|
218
|
-
})
|
|
219
|
-
);
|
|
220
|
-
} finally {
|
|
221
|
-
setLoading(false);
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
[availableActions, baseURL, getHashKey, getToken, onNetworkCall, runningActionData == null ? void 0 : runningActionData.id, t]
|
|
225
|
-
);
|
|
226
|
-
const cancelAction = useCallback(() => {
|
|
227
|
-
setRunningActionData(null);
|
|
228
|
-
setLoading(false);
|
|
229
|
-
}, []);
|
|
230
|
-
const getActionResults = useCallback(
|
|
231
|
-
(type, value, classification) => actionResults[getHashKey(type, value, classification)] ?? [],
|
|
232
|
-
[actionResults, getHashKey]
|
|
233
|
-
);
|
|
234
|
-
const context = useMemo(
|
|
235
|
-
() => ({
|
|
236
|
-
availableActions,
|
|
237
|
-
executeAction,
|
|
238
|
-
cancelAction,
|
|
239
|
-
getActionResults,
|
|
240
|
-
loading,
|
|
241
|
-
refreshActions
|
|
242
|
-
}),
|
|
243
|
-
[availableActions, cancelAction, executeAction, getActionResults, loading, refreshActions]
|
|
244
|
-
);
|
|
245
|
-
return /* @__PURE__ */ jsxs(ClueActionContext.Provider, { value: context, children: [
|
|
246
|
-
children,
|
|
247
|
-
/* @__PURE__ */ jsxs(ErrorBoundary, { children: [
|
|
248
|
-
runningActionData && /* @__PURE__ */ jsx(ActionForm$1, { runningActionData }),
|
|
249
|
-
/* @__PURE__ */ jsx(
|
|
250
|
-
ResultModal,
|
|
251
|
-
{
|
|
252
|
-
show: showResultModal && !!lastResult,
|
|
253
|
-
result: lastResult,
|
|
254
|
-
onClose: () => setShowResultModal(false)
|
|
255
|
-
}
|
|
256
|
-
)
|
|
257
|
-
] })
|
|
258
|
-
] });
|
|
259
|
-
};
|
|
260
|
-
const useClueActions = () => {
|
|
261
|
-
return useContext(ClueActionContext);
|
|
262
|
-
};
|
|
263
|
-
const WRAPPED_RENDERERS = materialRenderers.map((value) => ({
|
|
264
|
-
...value,
|
|
265
|
-
renderer: ({ ...props }) => /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(value.renderer, { ...props }) })
|
|
266
|
-
}));
|
|
267
|
-
const ActionForm = ({ runningActionData }) => {
|
|
268
|
-
const { executeAction, cancelAction } = useClueActions();
|
|
269
|
-
const { t } = useContextSelector(ClueComponentContext, (ctx) => ctx.i18next);
|
|
270
|
-
const [loading, setLoading] = useState(false);
|
|
271
|
-
const [errors, setErrors] = useState(null);
|
|
272
|
-
const [formData, setFormData] = useState(runningActionData == null ? void 0 : runningActionData.params);
|
|
273
|
-
const [showFormDataJson, setShowFormDataJson] = useState(false);
|
|
274
|
-
const formSchema = useMemo(
|
|
275
|
-
() => (runningActionData == null ? void 0 : runningActionData.action) ? { ...adaptSchema(runningActionData.action.params), ...runningActionData.action.extra_schema ?? {} } : null,
|
|
276
|
-
[runningActionData == null ? void 0 : runningActionData.action]
|
|
277
|
-
);
|
|
278
|
-
const uiSchema = useMemo(
|
|
279
|
-
() => ({
|
|
280
|
-
type: "VerticalLayout",
|
|
281
|
-
elements: Object.entries((formSchema == null ? void 0 : formSchema.properties) ?? {}).sort(([a_key, a_ent], [b_key, b_ent]) => {
|
|
282
|
-
if (!!a_ent.order || !!b_ent.order) {
|
|
283
|
-
return a_ent.order - b_ent.order;
|
|
284
|
-
} else {
|
|
285
|
-
return +(formSchema == null ? void 0 : formSchema.required.includes(a_key)) - +(formSchema == null ? void 0 : formSchema.required.includes(b_key));
|
|
286
|
-
}
|
|
287
|
-
}).map(([key, value]) => ({
|
|
288
|
-
type: "Control",
|
|
289
|
-
scope: `#/properties/${key}`,
|
|
290
|
-
options: {
|
|
291
|
-
autocomplete: !!value.enum,
|
|
292
|
-
showUnfocusedDescription: true,
|
|
293
|
-
...value.options
|
|
294
|
-
},
|
|
295
|
-
rule: value.rule
|
|
296
|
-
}))
|
|
297
|
-
}),
|
|
298
|
-
[formSchema == null ? void 0 : formSchema.properties, formSchema == null ? void 0 : formSchema.required]
|
|
299
|
-
);
|
|
300
|
-
const execute = useCallback(async () => {
|
|
301
|
-
try {
|
|
302
|
-
setLoading(true);
|
|
303
|
-
const options = {};
|
|
304
|
-
if (runningActionData == null ? void 0 : runningActionData.onComplete) {
|
|
305
|
-
options.onComplete = runningActionData == null ? void 0 : runningActionData.onComplete;
|
|
306
|
-
}
|
|
307
|
-
if (runningActionData == null ? void 0 : runningActionData.timeout) {
|
|
308
|
-
options.timeout = runningActionData == null ? void 0 : runningActionData.timeout;
|
|
309
|
-
}
|
|
310
|
-
await executeAction(runningActionData == null ? void 0 : runningActionData.id, runningActionData == null ? void 0 : runningActionData.selectors, formData, options);
|
|
311
|
-
} catch (e) {
|
|
312
|
-
console.error(e);
|
|
313
|
-
} finally {
|
|
314
|
-
setLoading(false);
|
|
315
|
-
}
|
|
316
|
-
}, [
|
|
317
|
-
executeAction,
|
|
318
|
-
runningActionData == null ? void 0 : runningActionData.id,
|
|
319
|
-
runningActionData == null ? void 0 : runningActionData.selectors,
|
|
320
|
-
runningActionData == null ? void 0 : runningActionData.onComplete,
|
|
321
|
-
runningActionData == null ? void 0 : runningActionData.timeout,
|
|
322
|
-
formData
|
|
323
|
-
]);
|
|
324
|
-
if (!(runningActionData == null ? void 0 : runningActionData.action)) {
|
|
325
|
-
return;
|
|
326
|
-
}
|
|
327
|
-
try {
|
|
328
|
-
return /* @__PURE__ */ jsx(Modal, { open: true, sx: { display: "flex", alignItems: "center", justifyContent: "center" }, onClose: cancelAction, children: /* @__PURE__ */ jsx(
|
|
329
|
-
Paper,
|
|
330
|
-
{
|
|
331
|
-
sx: { maxHeight: "80%", maxWidth: "80%", height: "100%", px: 2, pt: 2, minWidth: "750px", overflow: "auto" },
|
|
332
|
-
children: /* @__PURE__ */ jsxs(
|
|
333
|
-
Stack,
|
|
334
|
-
{
|
|
335
|
-
spacing: 1,
|
|
336
|
-
height: "100%",
|
|
337
|
-
sx: {
|
|
338
|
-
".MuiFormHelperText-root": {
|
|
339
|
-
marginLeft: "0 !important",
|
|
340
|
-
"&:last-of-type": { mb: 3 }
|
|
341
|
-
}
|
|
342
|
-
},
|
|
343
|
-
children: [
|
|
344
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, children: [
|
|
345
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 1, children: [
|
|
346
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "h5", children: [
|
|
347
|
-
t("actions.executing"),
|
|
348
|
-
" ",
|
|
349
|
-
runningActionData == null ? void 0 : runningActionData.action.id.replace(/_/g, " ").split(" ").map(capitalize).join(" ")
|
|
350
|
-
] }),
|
|
351
|
-
(runningActionData == null ? void 0 : runningActionData.action.summary) && /* @__PURE__ */ jsx(Typography, { variant: "body1", color: "text.secondary", sx: { pb: 1.5 }, children: runningActionData == null ? void 0 : runningActionData.action.summary })
|
|
352
|
-
] }),
|
|
353
|
-
/* @__PURE__ */ jsx(Box, { flex: 1 }),
|
|
354
|
-
/* @__PURE__ */ jsx(Box, { alignContent: "end", children: /* @__PURE__ */ jsx(
|
|
355
|
-
Button,
|
|
356
|
-
{
|
|
357
|
-
variant: "outlined",
|
|
358
|
-
onClick: () => setShowFormDataJson((prev) => !prev),
|
|
359
|
-
startIcon: /* @__PURE__ */ jsx(
|
|
360
|
-
Box,
|
|
361
|
-
{
|
|
362
|
-
component: "span",
|
|
363
|
-
sx: (theme) => ({
|
|
364
|
-
transition: theme.transitions.create("transform"),
|
|
365
|
-
transform: showFormDataJson ? "rotate(180deg)" : "rotate(0deg)"
|
|
366
|
-
}),
|
|
367
|
-
children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-keyboard-double-arrow-right" })
|
|
368
|
-
}
|
|
369
|
-
),
|
|
370
|
-
children: !showFormDataJson ? t("actions.json.show") : t("actions.json.hide")
|
|
371
|
-
}
|
|
372
|
-
) })
|
|
373
|
-
] }),
|
|
374
|
-
/* @__PURE__ */ jsx(Divider, { orientation: "horizontal", variant: "middle" }),
|
|
375
|
-
/* @__PURE__ */ jsx(Box, { pt: 1.5 }),
|
|
376
|
-
/* @__PURE__ */ jsxs(Stack, { flexGrow: 1, direction: "row", spacing: 1, children: [
|
|
377
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "column", flexGrow: 1, children: [
|
|
378
|
-
/* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(
|
|
379
|
-
JsonForms,
|
|
380
|
-
{
|
|
381
|
-
schema: formSchema,
|
|
382
|
-
uischema: uiSchema,
|
|
383
|
-
renderers: WRAPPED_RENDERERS,
|
|
384
|
-
cells: materialCells,
|
|
385
|
-
data: formData,
|
|
386
|
-
onChange: ({ data, errors: _errors }) => {
|
|
387
|
-
if (!isEqual(data, formData)) {
|
|
388
|
-
setFormData(data);
|
|
389
|
-
}
|
|
390
|
-
setErrors(_errors);
|
|
391
|
-
},
|
|
392
|
-
config: {}
|
|
393
|
-
}
|
|
394
|
-
) }),
|
|
395
|
-
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, pb: 1, children: [
|
|
396
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
|
|
397
|
-
/* @__PURE__ */ jsx(Button, { color: "error", variant: "outlined", onClick: cancelAction, children: t("cancel") }),
|
|
398
|
-
/* @__PURE__ */ jsx(
|
|
399
|
-
Button,
|
|
400
|
-
{
|
|
401
|
-
color: "success",
|
|
402
|
-
variant: "outlined",
|
|
403
|
-
disabled: loading || (errors == null ? void 0 : errors.length) > 0,
|
|
404
|
-
onClick: execute,
|
|
405
|
-
endIcon: loading && /* @__PURE__ */ jsx(CircularProgress, { color: "inherit", size: 18 }),
|
|
406
|
-
children: t("actions.execute")
|
|
407
|
-
}
|
|
408
|
-
)
|
|
409
|
-
] })
|
|
410
|
-
] }),
|
|
411
|
-
/* @__PURE__ */ jsx(Collapse, { orientation: "horizontal", in: showFormDataJson, unmountOnExit: true, mountOnEnter: true, children: /* @__PURE__ */ jsxs(Stack, { direction: "row", height: "100%", spacing: 1, children: [
|
|
412
|
-
/* @__PURE__ */ jsx(Divider, { orientation: "vertical" }),
|
|
413
|
-
/* @__PURE__ */ jsxs(Stack, { children: [
|
|
414
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h5", children: t("action.data") }),
|
|
415
|
-
/* @__PURE__ */ jsx(Box, { width: 600, height: "100%", children: /* @__PURE__ */ jsx(JSONViewer, { data: formData, slotProps: { stack: { height: "100%" }, json: { name: false } } }) })
|
|
416
|
-
] })
|
|
417
|
-
] }) })
|
|
418
|
-
] })
|
|
419
|
-
]
|
|
420
|
-
}
|
|
421
|
-
)
|
|
422
|
-
}
|
|
423
|
-
) });
|
|
424
|
-
} catch (e) {
|
|
425
|
-
console.warn(e);
|
|
426
|
-
return null;
|
|
427
|
-
}
|
|
428
|
-
};
|
|
429
|
-
const ActionForm$1 = memo(ActionForm);
|
|
430
|
-
export {
|
|
431
|
-
ActionForm$1 as A,
|
|
432
|
-
ClueActionProvider as C,
|
|
433
|
-
ClueActionContext as a,
|
|
434
|
-
capitalize as c,
|
|
435
|
-
useClueActions as u
|
|
436
|
-
};
|