@elaraai/e3-ui-components 1.0.25 → 1.0.26
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/dist/components/StatusDisplay.d.ts.map +1 -1
- package/dist/components/UITaskPreview.d.ts.map +1 -1
- package/dist/hooks/useDatasetValue.d.ts.map +1 -1
- package/dist/index.cjs +37 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +39 -6
- package/dist/index.js.map +1 -1
- package/dist/platform/dataset-store.d.ts.map +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -22,12 +22,12 @@ import { variant, EastError, ConflictError, equalFor, SortedMap, toEastTypeValue
|
|
|
22
22
|
import { EastTypeType } from "@elaraai/east/internal";
|
|
23
23
|
import { bindPlatformFn, funcBindPlatformFn, recordBindPlatformFn, Diff, Ontology, FuncBindHandleType, Experiment, decisionBindPlatformFn, DecisionQueue, DecisionJournal, decodeManifest } from "@elaraai/e3-ui/internal";
|
|
24
24
|
import { registerReactiveTracker, registerPlatformImplementation } from "@elaraai/east-ui-components/platform";
|
|
25
|
-
import { workspaceStatus, datasetListAt, datasetList, dataflowExecuteLaunch, datasetSet, datasetGet, workspaceFunctionCall, workspaceFunctionList, workspaceRecordHistory, workspaceRecordMutate, workspaceRecordDescribe,
|
|
25
|
+
import { workspaceStatus, datasetListAt, datasetList, dataflowExecuteLaunch, datasetSet, datasetGet, ApiError, workspaceFunctionCall, workspaceFunctionList, workspaceRecordHistory, workspaceRecordMutate, workspaceRecordDescribe, repoCreate, repoGc, repoGcStart, repoGcStatus, repoList, repoRemove, repoStatus, packageExport, packageGet, packageImport, packageList, packageRemove, workspaceCreate, workspaceDeploy, workspaceExport, workspaceGet, workspaceList, workspaceRemove, datasetGetStatus, datasetListRecursive, datasetListRecursivePaths, datasetListWithStatus, taskExecutionList, taskGet, taskList, dataflowCancel, dataflowExecute, dataflowExecutePoll, dataflowGraph, taskLogs } from "@elaraai/e3-api-client";
|
|
26
26
|
import { jsx as jsx$1, Fragment, jsxs } from "react/jsx-runtime";
|
|
27
27
|
import * as React from "react";
|
|
28
28
|
import React__default, { useId, useMemo, useContext, createContext, useRef, useEffect, useState, useCallback, useSyncExternalStore, memo, forwardRef, useLayoutEffect, Fragment as Fragment$1, Component } from "react";
|
|
29
29
|
import { Box, Flex, Text, HStack, Input, useSlotRecipe, useRecipe, VStack, useToken, Drawer, Portal, Field, NativeSelect, Textarea, chakra, Tooltip, SegmentGroup, Menu, HoverCard, useChakraContext, Spinner, Code, Clipboard, IconButton, Badge, Button, Tabs, useTabs } from "@chakra-ui/react";
|
|
30
|
-
import { implementUIComponent, getSomeorUndefined, formatPredicate, SliceEditPopover, SlicePredicateBuilder, StateRuntime, buildSliceHandle, DEFAULT_SLICE_STATE, registerPlatformImplementation as registerPlatformImplementation$1, EastChakraSelect, EastChakraStringInput, EastChakraDateTimeInput, EastChakraFloatInput, EastChakraIntegerInput, formatTick, useSliceReactivity, SliceRailCluster, EastChakraComponent, ClauseChip, StateImpl, OverlayImpl, createUIStore, UIStoreProvider } from "@elaraai/east-ui-components";
|
|
30
|
+
import { implementUIComponent, getSomeorUndefined, formatPredicate, SliceEditPopover, SlicePredicateBuilder, StateRuntime, buildSliceHandle, DEFAULT_SLICE_STATE, registerPlatformImplementation as registerPlatformImplementation$1, EastChakraSelect, EastChakraStringInput, EastChakraDateTimeInput, EastChakraFloatInput, EastChakraIntegerInput, formatTick, useSliceReactivity, SliceRailCluster, EastChakraComponent, ClauseChip, StateImpl, NavImpl, SliceImpl, SliceApplyImpl, OverlayImpl, ClipboardImpl, DownloadImpl, ShareImpl, createUIStore, UIStoreProvider } from "@elaraai/east-ui-components";
|
|
31
31
|
import { createPortal } from "react-dom";
|
|
32
32
|
import { sliceMatches } from "@elaraai/east-ui/internal";
|
|
33
33
|
import { QueryClient as QueryClient$1, QueryClientProvider, useMutation, useQuery } from "@tanstack/react-query";
|
|
@@ -2294,6 +2294,11 @@ class ReactiveDatasetCache {
|
|
|
2294
2294
|
});
|
|
2295
2295
|
} catch (error3) {
|
|
2296
2296
|
if (isCancelledError(error3)) return;
|
|
2297
|
+
if (isDatasetUnassignedError(error3)) {
|
|
2298
|
+
this.statuses.set(key, variant("unset", null));
|
|
2299
|
+
this.notifyChange(key);
|
|
2300
|
+
return;
|
|
2301
|
+
}
|
|
2297
2302
|
throw error3;
|
|
2298
2303
|
}
|
|
2299
2304
|
if (this.destroyed) {
|
|
@@ -2591,6 +2596,9 @@ class ReactiveDatasetCache {
|
|
|
2591
2596
|
function isCancelledError(error3) {
|
|
2592
2597
|
return error3 instanceof CancelledError;
|
|
2593
2598
|
}
|
|
2599
|
+
function isDatasetUnassignedError(error3) {
|
|
2600
|
+
return error3 instanceof ApiError && error3.code === "dataset_unassigned";
|
|
2601
|
+
}
|
|
2594
2602
|
function createReactiveDatasetCache(config2, api3, clock2) {
|
|
2595
2603
|
return new ReactiveDatasetCache(config2, api3, clock2);
|
|
2596
2604
|
}
|
|
@@ -63057,7 +63065,20 @@ function useDatasetStatus(apiUrl, repo, workspace, datasetPath, options2) {
|
|
|
63057
63065
|
...queryOverrides
|
|
63058
63066
|
});
|
|
63059
63067
|
}
|
|
63060
|
-
const defaultPlatformImplementations = [
|
|
63068
|
+
const defaultPlatformImplementations = [
|
|
63069
|
+
...StateImpl,
|
|
63070
|
+
...NavImpl,
|
|
63071
|
+
...SliceImpl,
|
|
63072
|
+
...SliceApplyImpl,
|
|
63073
|
+
...OverlayImpl,
|
|
63074
|
+
...ClipboardImpl,
|
|
63075
|
+
...DownloadImpl,
|
|
63076
|
+
...ShareImpl,
|
|
63077
|
+
...DecisionBindPlatform,
|
|
63078
|
+
...BindPlatform,
|
|
63079
|
+
...FuncPlatform,
|
|
63080
|
+
...RecordPlatform
|
|
63081
|
+
];
|
|
63061
63082
|
function useDatasetValue(apiUrl, repo, workspace, datasetPath, options2) {
|
|
63062
63083
|
const { requestOptions, queryOverrides, enabled = true, hash: hash2, platforms, type } = options2;
|
|
63063
63084
|
const platformImpls = platforms ?? defaultPlatformImplementations;
|
|
@@ -63158,6 +63179,7 @@ function StatusDisplay({ variant: variant2, title, message, details }) {
|
|
|
63158
63179
|
return /* @__PURE__ */ jsx$1(
|
|
63159
63180
|
Box,
|
|
63160
63181
|
{
|
|
63182
|
+
"data-status": variant2,
|
|
63161
63183
|
height: "100%",
|
|
63162
63184
|
width: "100%",
|
|
63163
63185
|
display: "flex",
|
|
@@ -63191,7 +63213,7 @@ function StatusDisplay({ variant: variant2, title, message, details }) {
|
|
|
63191
63213
|
}
|
|
63192
63214
|
);
|
|
63193
63215
|
}
|
|
63194
|
-
return /* @__PURE__ */ jsxs(Box, { p: 6, bg: styles2.bg, height: "100%", width: "100%", children: [
|
|
63216
|
+
return /* @__PURE__ */ jsxs(Box, { "data-status": variant2, p: 6, bg: styles2.bg, height: "100%", width: "100%", children: [
|
|
63195
63217
|
/* @__PURE__ */ jsx$1(Text, { fontSize: "lg", fontWeight: "bold", color: styles2.titleColor, mb: 4, children: title }),
|
|
63196
63218
|
message && /* @__PURE__ */ jsx$1(Text, { color: styles2.messageColor, mb: details ? 4 : 0, children: message }),
|
|
63197
63219
|
details && /* @__PURE__ */ jsxs(Box, { position: "relative", children: [
|
|
@@ -63705,11 +63727,22 @@ const UITaskPreview = memo(function UITaskPreview2({
|
|
|
63705
63727
|
const { loading: preloading, error: preloadError } = usePreloadReactiveDatasets(preloads);
|
|
63706
63728
|
const scopedPlatforms = useMemo(
|
|
63707
63729
|
() => manifest ? [
|
|
63730
|
+
// EVERY browser-local platform impl (unscoped — no manifest paths) from east-ui-components +
|
|
63731
|
+
// e3-ui-components MUST be listed here, or a ui() task that uses it throws "Platform function
|
|
63732
|
+
// '<x>_bind' is not available" — and only inside an e3 ui() task, so component tests miss it
|
|
63733
|
+
// (see east-contribute "Common traps"). The manifest-SCOPED data/func/record binds follow.
|
|
63708
63734
|
...StateImpl,
|
|
63735
|
+
...NavImpl,
|
|
63736
|
+
...SliceImpl,
|
|
63737
|
+
...SliceApplyImpl,
|
|
63738
|
+
...OverlayImpl,
|
|
63739
|
+
...ClipboardImpl,
|
|
63740
|
+
...DownloadImpl,
|
|
63741
|
+
...ShareImpl,
|
|
63742
|
+
...DecisionBindPlatform,
|
|
63709
63743
|
...createScopedBindPlatform(manifest),
|
|
63710
63744
|
...createScopedFuncPlatform(manifest.functions),
|
|
63711
|
-
...createScopedRecordPlatform(manifest.records)
|
|
63712
|
-
...OverlayImpl
|
|
63745
|
+
...createScopedRecordPlatform(manifest.records)
|
|
63713
63746
|
] : void 0,
|
|
63714
63747
|
[manifest]
|
|
63715
63748
|
);
|