@ngis/plugin-ui 0.4.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/LICENSE +13 -0
- package/README.md +25 -0
- package/dist/index.cjs +71 -0
- package/dist/index.d.ts +114 -0
- package/dist/index.mjs +69 -0
- package/dist/src/api/analysis.d.ts +140 -0
- package/dist/src/api/resources.d.ts +530 -0
- package/dist/src/api/scenes.d.ts +251 -0
- package/dist/src/api/users.d.ts +22 -0
- package/dist/src/api/workflows.d.ts +191 -0
- package/dist/src/components/plugin-ui/AttributeTable.d.ts +26 -0
- package/dist/src/components/plugin-ui/BatchTable.d.ts +47 -0
- package/dist/src/components/plugin-ui/ChartCanvas.d.ts +14 -0
- package/dist/src/components/plugin-ui/ExtentPicker.d.ts +22 -0
- package/dist/src/components/plugin-ui/FieldSelect.d.ts +23 -0
- package/dist/src/components/plugin-ui/Flow.d.ts +256 -0
- package/dist/src/components/plugin-ui/ModelSelect.d.ts +36 -0
- package/dist/src/components/plugin-ui/ParamForm.d.ts +63 -0
- package/dist/src/components/plugin-ui/PickerField.d.ts +52 -0
- package/dist/src/components/plugin-ui/ResourceSelect.d.ts +37 -0
- package/dist/src/components/plugin-ui/ResultActions.d.ts +48 -0
- package/dist/src/components/plugin-ui/RunButton.d.ts +49 -0
- package/dist/src/components/plugin-ui/StatChart.d.ts +66 -0
- package/dist/src/components/plugin-ui/TaskChrome.d.ts +35 -0
- package/dist/src/components/plugin-ui/TaskList.d.ts +29 -0
- package/dist/src/components/plugin-ui/TaskStatus.d.ts +55 -0
- package/dist/src/components/plugin-ui/batch-model.d.ts +442 -0
- package/dist/src/components/plugin-ui/flow-inputs.d.ts +61 -0
- package/dist/src/components/plugin-ui/flow-model.d.ts +303 -0
- package/dist/src/components/plugin-ui/flow-ports.d.ts +155 -0
- package/dist/src/components/plugin-ui/param-form-data.d.ts +122 -0
- package/dist/src/components/plugin-ui/param-form-model.d.ts +187 -0
- package/dist/src/components/plugin-ui/param-widgets.d.ts +88 -0
- package/dist/src/components/plugin-ui/picker-data.d.ts +141 -0
- package/dist/src/components/plugin-ui/picker-model.d.ts +150 -0
- package/dist/src/components/plugin-ui/recipe-model.d.ts +320 -0
- package/dist/src/components/plugin-ui/result-data.d.ts +112 -0
- package/dist/src/components/plugin-ui/result-model.d.ts +96 -0
- package/dist/src/components/plugin-ui/run-data.d.ts +118 -0
- package/dist/src/components/plugin-ui/run-model.d.ts +179 -0
- package/dist/src/components/plugin-ui/stat-chart-model.d.ts +168 -0
- package/dist/src/components/plugin-ui/validation-messages.d.ts +18 -0
- package/dist/src/components/plugin-ui/w2-contracts.d.ts +151 -0
- package/dist/src/components/plugin-ui/w3-contracts.d.ts +328 -0
- package/dist/src/components/plugin-ui/w4-contracts.d.ts +510 -0
- package/dist/src/components/ui/button.d.ts +12 -0
- package/dist/src/components/ui/checkbox.d.ts +4 -0
- package/dist/src/components/ui/column-resize-handle.d.ts +23 -0
- package/dist/src/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/src/components/ui/input.d.ts +3 -0
- package/dist/src/components/ui/label.d.ts +4 -0
- package/dist/src/components/ui/popover.d.ts +10 -0
- package/dist/src/components/ui/select.d.ts +15 -0
- package/dist/src/components/ui/switch.d.ts +6 -0
- package/dist/src/domain/map/types.d.ts +128 -0
- package/dist/src/features/gis/components/GisAttributeTable.d.ts +56 -0
- package/dist/src/features/gis/hooks/useDatasetFeatureWindow.d.ts +51 -0
- package/dist/src/lib/api-error.d.ts +81 -0
- package/dist/src/lib/api.d.ts +82 -0
- package/dist/src/lib/auth-session.d.ts +22 -0
- package/dist/src/lib/hooks/useColumnResize.d.ts +57 -0
- package/dist/src/lib/raster-color-layer/RasterColorLayer.d.ts +48 -0
- package/dist/src/lib/raster-color-layer/TileGrid.d.ts +31 -0
- package/dist/src/lib/raster-color-layer/colorRamp.d.ts +18 -0
- package/dist/src/lib/raster-color-layer/shaders/raster-color.frag.d.ts +2 -0
- package/dist/src/lib/raster-color-layer/shaders/raster-color.vert.d.ts +2 -0
- package/dist/src/lib/raster-color-layer/zoomInterpolate.d.ts +2 -0
- package/dist/src/lib/utils.d.ts +2 -0
- package/dist/src/sdk/facets/types.d.ts +370 -0
- package/dist/src/sdk/host-api.d.ts +256 -0
- package/dist/src/sdk/map-api.d.ts +288 -0
- package/dist/src/sdk/panels.d.ts +130 -0
- package/dist/src/types/analysis.d.ts +205 -0
- package/dist/src/types/common.d.ts +17 -0
- package/dist/src/types/extensions.d.ts +560 -0
- package/dist/src/types/gis.d.ts +242 -0
- package/dist/src/types/market-social.d.ts +378 -0
- package/dist/src/types/workflow.d.ts +83 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2026 NeoGIS contributors
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
https://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @ngis/plugin-ui
|
|
2
|
+
|
|
3
|
+
Host-connected React components and flow bindings for NeoGIS plugin authors.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install --save-dev @ngis/plugin-sdk @ngis/plugin-ui react @types/react
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { ResourceSelect } from "@ngis/plugin-ui";
|
|
11
|
+
|
|
12
|
+
<ResourceSelect
|
|
13
|
+
host={host}
|
|
14
|
+
value={resourceId}
|
|
15
|
+
onChange={setResourceId}
|
|
16
|
+
/>;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This is a NeoGIS host contract, not a standalone component library. The running
|
|
20
|
+
host owns the component implementations and React instance; the npm package
|
|
21
|
+
ships their public declarations and lazy host-delegating shims. Plugin builds
|
|
22
|
+
must leave `react`, `react-dom`, `react/jsx-runtime`, `@ngis/plugin-sdk`, and
|
|
23
|
+
`@ngis/plugin-ui` external.
|
|
24
|
+
|
|
25
|
+
`@ngis/plugin-ui` and `@ngis/plugin-sdk` use the same API version.
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Generated by scripts/build.mjs — do not hand-edit.
|
|
2
|
+
// The components themselves live in the host bundle (F14.14); this resolves them.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const NGIS_EXTERNALS = "__NGIS_PLUGIN_EXTERNALS__";
|
|
6
|
+
function hostComponent(name) {
|
|
7
|
+
const ui = globalThis[NGIS_EXTERNALS] && globalThis[NGIS_EXTERNALS]["@ngis/plugin-ui"];
|
|
8
|
+
if (!ui || ui[name] === undefined) {
|
|
9
|
+
throw new Error(
|
|
10
|
+
"[ngis] @ngis/plugin-ui." + name + " is rendered by the host: it is provided by the running NGIS " +
|
|
11
|
+
"frontend through globalThis." + NGIS_EXTERNALS + ". Leave \"@ngis/plugin-ui\" external in your " +
|
|
12
|
+
"bundle (the host's import map resolves it) instead of bundling this file."
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
return ui[name];
|
|
16
|
+
}
|
|
17
|
+
exports.NGIS_PLUGIN_UI_VERSION = "0.4.0";
|
|
18
|
+
exports.ResourceSelect = function ResourceSelect(props) {
|
|
19
|
+
return hostComponent("ResourceSelect")(props);
|
|
20
|
+
};
|
|
21
|
+
exports.ModelSelect = function ModelSelect(props) {
|
|
22
|
+
return hostComponent("ModelSelect")(props);
|
|
23
|
+
};
|
|
24
|
+
exports.FieldSelect = function FieldSelect(props) {
|
|
25
|
+
return hostComponent("FieldSelect")(props);
|
|
26
|
+
};
|
|
27
|
+
exports.ExtentPicker = function ExtentPicker(props) {
|
|
28
|
+
return hostComponent("ExtentPicker")(props);
|
|
29
|
+
};
|
|
30
|
+
exports.ParamForm = function ParamForm(props) {
|
|
31
|
+
return hostComponent("ParamForm")(props);
|
|
32
|
+
};
|
|
33
|
+
exports.RunButton = function RunButton(props) {
|
|
34
|
+
return hostComponent("RunButton")(props);
|
|
35
|
+
};
|
|
36
|
+
exports.TaskStatus = function TaskStatus(props) {
|
|
37
|
+
return hostComponent("TaskStatus")(props);
|
|
38
|
+
};
|
|
39
|
+
exports.TaskList = function TaskList(props) {
|
|
40
|
+
return hostComponent("TaskList")(props);
|
|
41
|
+
};
|
|
42
|
+
exports.ResultActions = function ResultActions(props) {
|
|
43
|
+
return hostComponent("ResultActions")(props);
|
|
44
|
+
};
|
|
45
|
+
exports.AttributeTable = function AttributeTable(props) {
|
|
46
|
+
return hostComponent("AttributeTable")(props);
|
|
47
|
+
};
|
|
48
|
+
exports.StatChart = function StatChart(props) {
|
|
49
|
+
return hostComponent("StatChart")(props);
|
|
50
|
+
};
|
|
51
|
+
exports.Flow = function Flow(props) {
|
|
52
|
+
return hostComponent("Flow")(props);
|
|
53
|
+
};
|
|
54
|
+
exports.useFlowScope = function useFlowScope(props) {
|
|
55
|
+
return hostComponent("useFlowScope")(props);
|
|
56
|
+
};
|
|
57
|
+
exports.useFlowPort = function useFlowPort(props) {
|
|
58
|
+
return hostComponent("useFlowPort")(props);
|
|
59
|
+
};
|
|
60
|
+
exports.BatchTable = function BatchTable(props) {
|
|
61
|
+
return hostComponent("BatchTable")(props);
|
|
62
|
+
};
|
|
63
|
+
exports.ngisTypeVerdict = function ngisTypeVerdict(...args) {
|
|
64
|
+
return hostComponent("ngisTypeVerdict")(...args);
|
|
65
|
+
};
|
|
66
|
+
exports.ngisFlowSpread = function ngisFlowSpread(...args) {
|
|
67
|
+
return hostComponent("ngisFlowSpread")(...args);
|
|
68
|
+
};
|
|
69
|
+
exports.serializeRecipe = function serializeRecipe(...args) {
|
|
70
|
+
return hostComponent("serializeRecipe")(...args);
|
|
71
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@ngis/plugin-ui` — the second SDK package: host-connected smart components
|
|
3
|
+
* (Stage 14, **F14.14**).
|
|
4
|
+
*
|
|
5
|
+
* **This file is the W1-kickoff export skeleton: names only, no bodies.** It is
|
|
6
|
+
* read-only to YB1 and YB2; **Y2 owns it** and fills in the W1 half
|
|
7
|
+
* (`ResourceSelect`/`ModelSelect`/`FieldSelect`/`ExtentPicker`), Y3–Y7 add the
|
|
8
|
+
* rest under the ownership table below. The point of freezing the names here is
|
|
9
|
+
* the Stage 13 W1 `NgisResourceType` lesson — exported *names*, not just line
|
|
10
|
+
* ranges, are what collide across concurrent sessions.
|
|
11
|
+
*
|
|
12
|
+
* ## Why a separate package, and not a folder inside `@ngis/plugin-sdk`
|
|
13
|
+
*
|
|
14
|
+
* The SDK is types-first (`tsc --emitDeclarationOnly` plus a two-line runtime
|
|
15
|
+
* shim). Merging a React component library into it changes the SDK's nature and
|
|
16
|
+
* couples type-only authors to a UI bundle. So: two packages, one version
|
|
17
|
+
* string.
|
|
18
|
+
*
|
|
19
|
+
* ## Versions are contractually locked, not conventionally aligned (F14.13)
|
|
20
|
+
*
|
|
21
|
+
* ```
|
|
22
|
+
* @ngis/plugin-sdk version === @ngis/plugin-ui version === NGIS_MAP_API_VERSION === "0.4.0"
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* ## Distribution (F14.14)
|
|
26
|
+
*
|
|
27
|
+
* The components' **runtime lives in the host bundle**, reached through the
|
|
28
|
+
* fifth externals entry (`@ngis/plugin-ui` →
|
|
29
|
+
* `/plugin-externals/plugin-ui.mjs`, added by Y2 under the stage's single
|
|
30
|
+
* declared G-D exception). That is what keeps every component
|
|
31
|
+
* host-renderable-from-declarative-data and therefore survivable into Stage
|
|
32
|
+
* 15's worker tier. **Tarball distribution is deferred to Stage 15** — the ED17
|
|
33
|
+
* channel's MinIO key is a hardcoded `sdk/{version}/plugin-sdk.tgz`, so a second
|
|
34
|
+
* package needs ~20 lines of Java in `ngis-extension`, which no Stage 14 backend
|
|
35
|
+
* session owns. In-repo dogfood consumes this through the pnpm workspace.
|
|
36
|
+
*
|
|
37
|
+
* ## The frozen export surface, and its owner
|
|
38
|
+
*
|
|
39
|
+
* | export | kind | owner |
|
|
40
|
+
* |---|---|---|
|
|
41
|
+
* | `ResourceSelect` · `ResourceSelectProps` | component | Y2 (W1) |
|
|
42
|
+
* | `ModelSelect` · `ModelSelectProps` | component | Y2 (W1) |
|
|
43
|
+
* | `FieldSelect` · `FieldSelectProps` | component | Y2 (W1) |
|
|
44
|
+
* | `ExtentPicker` · `ExtentPickerProps` | component | Y2 (W1) |
|
|
45
|
+
* | `ParamForm` · `ParamFormProps` · `NgisParamFormChange` | component | Y3 (W2) |
|
|
46
|
+
* | `RunButton` · `RunButtonProps` | component | Y4 (W2) |
|
|
47
|
+
* | `TaskStatus` · `TaskList` (+ props) | component | Y4 (W2) |
|
|
48
|
+
* | `ResultActions` · `ResultActionsProps` | component | Y4b (W2) |
|
|
49
|
+
* | `AttributeTable` · `AttributeTableProps` | component | Y4b (W2) |
|
|
50
|
+
* | `StatChart` · `StatChartProps` | component | Y4b (W2) |
|
|
51
|
+
* | `Flow` · `FlowProps` · `useFlowPort` · `useFlowScope` | runtime | **Y5b** (W3) |
|
|
52
|
+
* | `NgisPortDirection` · `NgisPortKind` · `NgisPortSpec` | type | **Y5a** (W3) |
|
|
53
|
+
* | `ngisTypeVerdict` · `NgisTypeVerdict` | runtime | **Y5a** (W3) |
|
|
54
|
+
* | `ngisFlowSpread` · `NgisFlowRef` · `NgisInputBinding` | runtime | **Y5a** (W3) |
|
|
55
|
+
* | `NgisDisclosureState` · `NgisFlowReason` · `NgisNodeEnablement` | type | **Y5a** (W3) |
|
|
56
|
+
* | `NgisFlowNode` · `NgisFlowSnapshot` | type | **Y5a** (W3) |
|
|
57
|
+
* | `serializeRecipe` · `NgisRecipe` (+ family) | runtime | Y6 (W4) |
|
|
58
|
+
* | `BatchTable` · `BatchTableProps` · `NgisBatchConfig` | component | Y7 (W4) |
|
|
59
|
+
*
|
|
60
|
+
* **W3 note.** Every type on Y5a's rows is *declared* in the kickoff seam
|
|
61
|
+
* `src/components/plugin-ui/w3-contracts.ts` and *re-exported* by Y5a's
|
|
62
|
+
* `flow-model.ts`; the barrels take them from `flow-model.ts` only, so the seam
|
|
63
|
+
* module stays off the public surface exactly as `w2-contracts.ts` does. `Flow`
|
|
64
|
+
* is a component and therefore owes all six lockstep places (`scripts/build.mjs`
|
|
65
|
+
* checks two of them mechanically).
|
|
66
|
+
*
|
|
67
|
+
* **Two rules on that table.** A name not on your row is not yours to declare
|
|
68
|
+
* (the X4b `commandPluginId` precedent). And every component that portals — any
|
|
69
|
+
* Select, Popover or Dialog — takes a `contentClassName` escape hatch, because
|
|
70
|
+
* plugin-ui renders inside `.gis-theme` (Tenon) and a portal lands on
|
|
71
|
+
* `document.body`, outside the theme scope. `bg-success`/`bg-warning` resolve to
|
|
72
|
+
* nothing out there. That is the `VersionPolicyControl`/`ExtensionSettingsForm`
|
|
73
|
+
* precedent, and it has already cost two sessions.
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* The package version, asserted equal to `NGIS_MAP_API_VERSION` and to
|
|
77
|
+
* `@ngis/plugin-sdk`'s version by a test Y2 ships (F14.13 — locked, not
|
|
78
|
+
* aligned). One string; any divergence is a lie about what the tarball
|
|
79
|
+
* contains.
|
|
80
|
+
*/
|
|
81
|
+
export declare const NGIS_PLUGIN_UI_VERSION = "0.4.0";
|
|
82
|
+
export { ResourceSelect } from "./src/components/plugin-ui/ResourceSelect";
|
|
83
|
+
export type { ResourceSelectBaseProps, ResourceSelectProps, } from "./src/components/plugin-ui/ResourceSelect";
|
|
84
|
+
export { ModelSelect } from "./src/components/plugin-ui/ModelSelect";
|
|
85
|
+
export type { ModelSelectBaseProps, ModelSelectProps, } from "./src/components/plugin-ui/ModelSelect";
|
|
86
|
+
export { FieldSelect } from "./src/components/plugin-ui/FieldSelect";
|
|
87
|
+
export type { FieldSelectProps } from "./src/components/plugin-ui/FieldSelect";
|
|
88
|
+
export { ExtentPicker } from "./src/components/plugin-ui/ExtentPicker";
|
|
89
|
+
export type { ExtentPickerProps } from "./src/components/plugin-ui/ExtentPicker";
|
|
90
|
+
export { ParamForm } from "./src/components/plugin-ui/ParamForm";
|
|
91
|
+
export type { NgisParamFormChange, ParamFormProps, } from "./src/components/plugin-ui/ParamForm";
|
|
92
|
+
export { RunButton } from "./src/components/plugin-ui/RunButton";
|
|
93
|
+
export type { RunButtonProps } from "./src/components/plugin-ui/RunButton";
|
|
94
|
+
export { TaskStatus } from "./src/components/plugin-ui/TaskStatus";
|
|
95
|
+
export type { NgisTaskVariant, TaskStatusProps, } from "./src/components/plugin-ui/TaskStatus";
|
|
96
|
+
export { TaskList } from "./src/components/plugin-ui/TaskList";
|
|
97
|
+
export type { TaskListProps } from "./src/components/plugin-ui/TaskList";
|
|
98
|
+
export { ResultActions } from "./src/components/plugin-ui/ResultActions";
|
|
99
|
+
export type { NgisResultChartOutput, NgisResultChartRequest, ResultActionsProps, } from "./src/components/plugin-ui/ResultActions";
|
|
100
|
+
export { AttributeTable } from "./src/components/plugin-ui/AttributeTable";
|
|
101
|
+
export type { AttributeTableProps } from "./src/components/plugin-ui/AttributeTable";
|
|
102
|
+
export { StatChart } from "./src/components/plugin-ui/StatChart";
|
|
103
|
+
export type { StatChartProps } from "./src/components/plugin-ui/StatChart";
|
|
104
|
+
export { ngisFlowSpread, ngisTypeVerdict, } from "./src/components/plugin-ui/flow-model";
|
|
105
|
+
export type { NgisDisclosureState, NgisFlowNode, NgisFlowReason, NgisFlowRef, NgisFlowSnapshot, NgisInputBinding, NgisNodeEnablement, NgisPortDirection, NgisPortKind, NgisPortSpec, NgisTypeVerdict, } from "./src/components/plugin-ui/flow-model";
|
|
106
|
+
export { Flow } from "./src/components/plugin-ui/Flow";
|
|
107
|
+
export type { FlowProps } from "./src/components/plugin-ui/Flow";
|
|
108
|
+
export { useFlowScope } from "./src/components/plugin-ui/Flow";
|
|
109
|
+
export { useFlowPort } from "./src/components/plugin-ui/Flow";
|
|
110
|
+
export { serializeRecipe, } from "./src/components/plugin-ui/recipe-model";
|
|
111
|
+
export type { NgisRecipe, NgisRecipeInput, NgisRecipeMeta, NgisRecipeNode, NgisRecipeOutput, } from "./src/components/plugin-ui/recipe-model";
|
|
112
|
+
export { BatchTable } from "./src/components/plugin-ui/BatchTable";
|
|
113
|
+
export type { BatchTableProps } from "./src/components/plugin-ui/BatchTable";
|
|
114
|
+
export type { NgisBatchConfig } from "./src/components/plugin-ui/batch-model";
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Generated by scripts/build.mjs — do not hand-edit.
|
|
2
|
+
// The components themselves live in the host bundle (F14.14); this resolves them.
|
|
3
|
+
const NGIS_EXTERNALS = "__NGIS_PLUGIN_EXTERNALS__";
|
|
4
|
+
function hostComponent(name) {
|
|
5
|
+
const ui = globalThis[NGIS_EXTERNALS] && globalThis[NGIS_EXTERNALS]["@ngis/plugin-ui"];
|
|
6
|
+
if (!ui || ui[name] === undefined) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
"[ngis] @ngis/plugin-ui." + name + " is rendered by the host: it is provided by the running NGIS " +
|
|
9
|
+
"frontend through globalThis." + NGIS_EXTERNALS + ". Leave \"@ngis/plugin-ui\" external in your " +
|
|
10
|
+
"bundle (the host's import map resolves it) instead of bundling this file."
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
return ui[name];
|
|
14
|
+
}
|
|
15
|
+
export const NGIS_PLUGIN_UI_VERSION = "0.4.0";
|
|
16
|
+
export function ResourceSelect(props) {
|
|
17
|
+
return hostComponent("ResourceSelect")(props);
|
|
18
|
+
}
|
|
19
|
+
export function ModelSelect(props) {
|
|
20
|
+
return hostComponent("ModelSelect")(props);
|
|
21
|
+
}
|
|
22
|
+
export function FieldSelect(props) {
|
|
23
|
+
return hostComponent("FieldSelect")(props);
|
|
24
|
+
}
|
|
25
|
+
export function ExtentPicker(props) {
|
|
26
|
+
return hostComponent("ExtentPicker")(props);
|
|
27
|
+
}
|
|
28
|
+
export function ParamForm(props) {
|
|
29
|
+
return hostComponent("ParamForm")(props);
|
|
30
|
+
}
|
|
31
|
+
export function RunButton(props) {
|
|
32
|
+
return hostComponent("RunButton")(props);
|
|
33
|
+
}
|
|
34
|
+
export function TaskStatus(props) {
|
|
35
|
+
return hostComponent("TaskStatus")(props);
|
|
36
|
+
}
|
|
37
|
+
export function TaskList(props) {
|
|
38
|
+
return hostComponent("TaskList")(props);
|
|
39
|
+
}
|
|
40
|
+
export function ResultActions(props) {
|
|
41
|
+
return hostComponent("ResultActions")(props);
|
|
42
|
+
}
|
|
43
|
+
export function AttributeTable(props) {
|
|
44
|
+
return hostComponent("AttributeTable")(props);
|
|
45
|
+
}
|
|
46
|
+
export function StatChart(props) {
|
|
47
|
+
return hostComponent("StatChart")(props);
|
|
48
|
+
}
|
|
49
|
+
export function Flow(props) {
|
|
50
|
+
return hostComponent("Flow")(props);
|
|
51
|
+
}
|
|
52
|
+
export function useFlowScope(props) {
|
|
53
|
+
return hostComponent("useFlowScope")(props);
|
|
54
|
+
}
|
|
55
|
+
export function useFlowPort(props) {
|
|
56
|
+
return hostComponent("useFlowPort")(props);
|
|
57
|
+
}
|
|
58
|
+
export function BatchTable(props) {
|
|
59
|
+
return hostComponent("BatchTable")(props);
|
|
60
|
+
}
|
|
61
|
+
export function ngisTypeVerdict(...args) {
|
|
62
|
+
return hostComponent("ngisTypeVerdict")(...args);
|
|
63
|
+
}
|
|
64
|
+
export function ngisFlowSpread(...args) {
|
|
65
|
+
return hostComponent("ngisFlowSpread")(...args);
|
|
66
|
+
}
|
|
67
|
+
export function serializeRecipe(...args) {
|
|
68
|
+
return hostComponent("serializeRecipe")(...args);
|
|
69
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { NgisBindingValidation, NgisExecutionValidation, NgisToolSearchResponse, NgisToolUiSchema, NgisValidateBindingsBody, NgisValidateExecutionBody } from "../types/analysis";
|
|
2
|
+
import type { PageResult } from "../types/common";
|
|
3
|
+
export interface AnalysisModelboxNode {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
provider?: string | null;
|
|
7
|
+
parent_id?: string | null;
|
|
8
|
+
children?: AnalysisModelboxNode[] | null;
|
|
9
|
+
}
|
|
10
|
+
export interface AnalysisTool {
|
|
11
|
+
id: string;
|
|
12
|
+
version?: number | null;
|
|
13
|
+
name: string;
|
|
14
|
+
provider?: string | null;
|
|
15
|
+
category?: string | null;
|
|
16
|
+
description?: string | null;
|
|
17
|
+
tags?: string[] | string | null;
|
|
18
|
+
enabled?: boolean | null;
|
|
19
|
+
modelbox_id?: string | null;
|
|
20
|
+
capability_key?: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface AnalysisToolSchemaProperty {
|
|
23
|
+
title?: string | null;
|
|
24
|
+
description?: string | null;
|
|
25
|
+
type?: string | string[] | null;
|
|
26
|
+
format?: string | null;
|
|
27
|
+
enum?: unknown[] | null;
|
|
28
|
+
default?: string | number | boolean | null;
|
|
29
|
+
default_val?: string | number | boolean | null;
|
|
30
|
+
minimum?: number | null;
|
|
31
|
+
maximum?: number | null;
|
|
32
|
+
"x-role"?: "input" | "output" | "option" | string | null;
|
|
33
|
+
"x-data-type"?: "Vector" | "Raster" | "Table" | string | null;
|
|
34
|
+
"x-display-name"?: string | null;
|
|
35
|
+
"x-constraints"?: {
|
|
36
|
+
min?: number | null;
|
|
37
|
+
max?: number | null;
|
|
38
|
+
choices?: unknown[] | null;
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
} | null;
|
|
41
|
+
choices?: unknown[] | null;
|
|
42
|
+
items?: AnalysisToolSchemaProperty | null;
|
|
43
|
+
"x-ngis-type"?: string | null;
|
|
44
|
+
"x-ngis-role"?: string | null;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
export interface AnalysisToolSchema extends AnalysisToolSchemaProperty {
|
|
48
|
+
properties?: Record<string, AnalysisToolSchemaProperty> | null;
|
|
49
|
+
required?: string[] | null;
|
|
50
|
+
}
|
|
51
|
+
export type AnalysisTaskStatus = "QUEUED" | "RUNNING" | "SUCCESS" | "FAILED" | "CANCELLED";
|
|
52
|
+
export type AnalysisTaskOutputMode = "ADD_LAYER" | "UPDATE_RESOURCE";
|
|
53
|
+
export interface CreateAnalysisTaskParams {
|
|
54
|
+
tool_id: string;
|
|
55
|
+
params: Record<string, string>;
|
|
56
|
+
scene_id?: string;
|
|
57
|
+
expected_scene_generation?: number;
|
|
58
|
+
output_mode?: AnalysisTaskOutputMode;
|
|
59
|
+
target_resource_id?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface AnalysisTask {
|
|
62
|
+
id: string;
|
|
63
|
+
tool_id: string;
|
|
64
|
+
provider?: string | null;
|
|
65
|
+
status: AnalysisTaskStatus;
|
|
66
|
+
params_json?: unknown;
|
|
67
|
+
output_json?: unknown;
|
|
68
|
+
error_message?: string | null;
|
|
69
|
+
log_output?: string | null;
|
|
70
|
+
exit_code?: number | null;
|
|
71
|
+
owner_id?: string | null;
|
|
72
|
+
scene_id?: string | null;
|
|
73
|
+
expected_scene_generation?: number | null;
|
|
74
|
+
integration_status?: "PENDING" | "DONE" | "PARTIAL" | "FAILED" | "SKIPPED" | null;
|
|
75
|
+
integration_detail?: string | null;
|
|
76
|
+
}
|
|
77
|
+
export interface AnalysisTaskOutputFile {
|
|
78
|
+
name?: string | null;
|
|
79
|
+
minio_key?: string | null;
|
|
80
|
+
file_id?: string | null;
|
|
81
|
+
primary?: boolean | null;
|
|
82
|
+
}
|
|
83
|
+
export declare const analysisApi: {
|
|
84
|
+
listModelboxes(): Promise<AnalysisModelboxNode[]>;
|
|
85
|
+
listTools(params?: {
|
|
86
|
+
provider?: string;
|
|
87
|
+
category?: string;
|
|
88
|
+
capability_key?: string;
|
|
89
|
+
modelbox_id?: string;
|
|
90
|
+
recursive?: boolean;
|
|
91
|
+
}, signal?: AbortSignal): Promise<AnalysisTool[]>;
|
|
92
|
+
listModelboxTools(boxId: string, recursive?: boolean): Promise<AnalysisTool[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Paged sibling of `listTools`, for browsing the ~2,300-tool catalog (`/models`).
|
|
95
|
+
*
|
|
96
|
+
* `q` is a server-side substring match over name/description/category/tags. The
|
|
97
|
+
* envelope is the platform-wide `PageResult<T>` shape; the rows are the same
|
|
98
|
+
* snake_case `AnalysisTool` the flat list returns.
|
|
99
|
+
*/
|
|
100
|
+
pageTools(params?: {
|
|
101
|
+
page?: number;
|
|
102
|
+
size?: number;
|
|
103
|
+
q?: string;
|
|
104
|
+
provider?: string;
|
|
105
|
+
category?: string;
|
|
106
|
+
capability_key?: string;
|
|
107
|
+
modelbox_id?: string;
|
|
108
|
+
recursive?: boolean;
|
|
109
|
+
}, signal?: AbortSignal): Promise<PageResult<AnalysisTool>>;
|
|
110
|
+
getTool(toolId: string, signal?: AbortSignal): Promise<AnalysisTool>;
|
|
111
|
+
getToolSchema(toolId: string, signal?: AbortSignal): Promise<AnalysisToolSchema>;
|
|
112
|
+
createTask(params: CreateAnalysisTaskParams, signal?: AbortSignal): Promise<AnalysisTask>;
|
|
113
|
+
getTask(taskId: string, signal?: AbortSignal): Promise<AnalysisTask>;
|
|
114
|
+
getTaskOutputFiles(taskId: string, signal?: AbortSignal): Promise<AnalysisTaskOutputFile[]>;
|
|
115
|
+
cancelTask(taskId: string, signal?: AbortSignal): Promise<void>;
|
|
116
|
+
streamTask(taskId: string, signal?: AbortSignal): Promise<Response>;
|
|
117
|
+
getToolUiSchema(toolId: string, signal?: AbortSignal): Promise<NgisToolUiSchema>;
|
|
118
|
+
validateToolExecution(toolId: string, body: NgisValidateExecutionBody, signal?: AbortSignal): Promise<NgisExecutionValidation>;
|
|
119
|
+
validateToolBindings(toolId: string, body: NgisValidateBindingsBody, signal?: AbortSignal): Promise<NgisBindingValidation>;
|
|
120
|
+
searchTools(params?: AnalysisToolSearchParams, signal?: AbortSignal): Promise<NgisToolSearchResponse>;
|
|
121
|
+
};
|
|
122
|
+
/** Repeated-value filters, named exactly as the server's `Query` params. */
|
|
123
|
+
export interface AnalysisToolSearchParams {
|
|
124
|
+
q?: string;
|
|
125
|
+
limit?: number;
|
|
126
|
+
provider?: readonly string[];
|
|
127
|
+
kind?: readonly string[];
|
|
128
|
+
input_type?: readonly string[];
|
|
129
|
+
output_type?: readonly string[];
|
|
130
|
+
domain?: readonly string[];
|
|
131
|
+
operation_type?: readonly string[];
|
|
132
|
+
modelbox_path?: readonly string[];
|
|
133
|
+
capability_key?: readonly string[];
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Exported for test: the repeated-parameter shape is the whole point of this
|
|
137
|
+
* helper, and asserting it on a built string is cheaper than asserting it on a
|
|
138
|
+
* captured fetch URL.
|
|
139
|
+
*/
|
|
140
|
+
export declare function buildToolSearchQuery(params: AnalysisToolSearchParams): string;
|