@uipath/apollo-react 3.44.1 → 3.44.2-pr255.af80ea0
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/canvas/components/StageNode/CrossStageTaskDrag.stories.cjs +581 -0
- package/dist/canvas/components/StageNode/CrossStageTaskDrag.stories.d.ts +6 -0
- package/dist/canvas/components/StageNode/CrossStageTaskDrag.stories.d.ts.map +1 -0
- package/dist/canvas/components/StageNode/CrossStageTaskDrag.stories.js +544 -0
- package/dist/canvas/components/StageNode/DropPlaceholder.cjs +106 -0
- package/dist/canvas/components/StageNode/DropPlaceholder.d.ts +10 -0
- package/dist/canvas/components/StageNode/DropPlaceholder.d.ts.map +1 -0
- package/dist/canvas/components/StageNode/DropPlaceholder.js +72 -0
- package/dist/canvas/components/StageNode/StageNode.cjs +334 -389
- package/dist/canvas/components/StageNode/StageNode.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.js +336 -391
- package/dist/canvas/components/StageNode/StageNode.stories.cjs +1910 -1416
- package/dist/canvas/components/StageNode/StageNode.stories.d.ts +1 -1
- package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNode.stories.js +1906 -1412
- package/dist/canvas/components/StageNode/StageNode.styles.cjs +1 -1
- package/dist/canvas/components/StageNode/StageNode.styles.js +1 -1
- package/dist/canvas/components/StageNode/StageNode.types.d.ts +26 -10
- package/dist/canvas/components/StageNode/StageNode.types.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeTaskUtilities.cjs +10 -5
- package/dist/canvas/components/StageNode/StageNodeTaskUtilities.d.ts +2 -1
- package/dist/canvas/components/StageNode/StageNodeTaskUtilities.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/StageNodeTaskUtilities.js +6 -4
- package/dist/canvas/components/StageNode/TaskMenu.cjs +11 -43
- package/dist/canvas/components/StageNode/TaskMenu.d.ts +1 -6
- package/dist/canvas/components/StageNode/TaskMenu.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/TaskMenu.js +13 -35
- package/dist/canvas/components/StageNode/index.cjs +17 -3
- package/dist/canvas/components/StageNode/index.d.ts +4 -1
- package/dist/canvas/components/StageNode/index.d.ts.map +1 -1
- package/dist/canvas/components/StageNode/index.js +3 -1
- package/dist/canvas/components/TaskNode/PlaceholderTaskNode.cjs +51 -0
- package/dist/canvas/components/TaskNode/PlaceholderTaskNode.d.ts +8 -0
- package/dist/canvas/components/TaskNode/PlaceholderTaskNode.d.ts.map +1 -0
- package/dist/canvas/components/TaskNode/PlaceholderTaskNode.js +17 -0
- package/dist/canvas/components/TaskNode/TaskNode.cjs +235 -0
- package/dist/canvas/components/TaskNode/TaskNode.d.ts +11 -0
- package/dist/canvas/components/TaskNode/TaskNode.d.ts.map +1 -0
- package/dist/canvas/components/TaskNode/TaskNode.js +198 -0
- package/dist/canvas/components/TaskNode/TaskNode.stories.cjs +558 -0
- package/dist/canvas/components/TaskNode/TaskNode.stories.d.ts +8 -0
- package/dist/canvas/components/TaskNode/TaskNode.stories.d.ts.map +1 -0
- package/dist/canvas/components/TaskNode/TaskNode.stories.js +515 -0
- package/dist/canvas/components/TaskNode/TaskNode.types.d.ts +40 -0
- package/dist/canvas/components/TaskNode/TaskNode.types.d.ts.map +1 -0
- package/dist/canvas/components/TaskNode/TaskNodeContext.cjs +86 -0
- package/dist/canvas/components/TaskNode/TaskNodeContext.d.ts +24 -0
- package/dist/canvas/components/TaskNode/TaskNodeContext.d.ts.map +1 -0
- package/dist/canvas/components/TaskNode/TaskNodeContext.js +40 -0
- package/dist/canvas/components/TaskNode/index.cjs +82 -0
- package/dist/canvas/components/TaskNode/index.d.ts +8 -0
- package/dist/canvas/components/TaskNode/index.d.ts.map +1 -0
- package/dist/canvas/components/TaskNode/index.js +6 -0
- package/dist/canvas/components/TaskNode/taskReorderUtils.cjs +206 -0
- package/dist/canvas/components/TaskNode/taskReorderUtils.d.ts +23 -0
- package/dist/canvas/components/TaskNode/taskReorderUtils.d.ts.map +1 -0
- package/dist/canvas/components/TaskNode/taskReorderUtils.js +154 -0
- package/dist/canvas/components/TaskNode/useTaskPositions.cjs +153 -0
- package/dist/canvas/components/TaskNode/useTaskPositions.d.ts +29 -0
- package/dist/canvas/components/TaskNode/useTaskPositions.d.ts.map +1 -0
- package/dist/canvas/components/TaskNode/useTaskPositions.js +110 -0
- package/dist/canvas/core/TaskTypeRegistry.cjs +132 -0
- package/dist/canvas/core/TaskTypeRegistry.d.ts +18 -0
- package/dist/canvas/core/TaskTypeRegistry.d.ts.map +1 -0
- package/dist/canvas/core/TaskTypeRegistry.js +98 -0
- package/dist/canvas/core/index.cjs +21 -3
- package/dist/canvas/core/index.d.ts +2 -0
- package/dist/canvas/core/index.d.ts.map +1 -1
- package/dist/canvas/core/index.js +2 -0
- package/dist/canvas/core/useTaskTypeRegistry.cjs +82 -0
- package/dist/canvas/core/useTaskTypeRegistry.d.ts +13 -0
- package/dist/canvas/core/useTaskTypeRegistry.d.ts.map +1 -0
- package/dist/canvas/core/useTaskTypeRegistry.js +33 -0
- package/dist/canvas/hooks/CrossStageDragContext.cjs +45 -0
- package/dist/canvas/hooks/CrossStageDragContext.d.ts +8 -0
- package/dist/canvas/hooks/CrossStageDragContext.d.ts.map +1 -0
- package/dist/canvas/hooks/CrossStageDragContext.js +8 -0
- package/dist/canvas/hooks/calculateTaskDropPosition.cjs +253 -0
- package/dist/canvas/hooks/calculateTaskDropPosition.d.ts +11 -0
- package/dist/canvas/hooks/calculateTaskDropPosition.d.ts.map +1 -0
- package/dist/canvas/hooks/calculateTaskDropPosition.js +216 -0
- package/dist/canvas/hooks/index.cjs +57 -30
- package/dist/canvas/hooks/index.d.ts +3 -0
- package/dist/canvas/hooks/index.d.ts.map +1 -1
- package/dist/canvas/hooks/index.js +3 -0
- package/dist/canvas/hooks/useCrossStageTaskDrag.cjs +346 -0
- package/dist/canvas/hooks/useCrossStageTaskDrag.d.ts +44 -0
- package/dist/canvas/hooks/useCrossStageTaskDrag.d.ts.map +1 -0
- package/dist/canvas/hooks/useCrossStageTaskDrag.js +312 -0
- package/dist/canvas/hooks/useTaskCopyPaste.cjs +155 -0
- package/dist/canvas/hooks/useTaskCopyPaste.d.ts +34 -0
- package/dist/canvas/hooks/useTaskCopyPaste.d.ts.map +1 -0
- package/dist/canvas/hooks/useTaskCopyPaste.js +121 -0
- package/dist/canvas/schema/index.cjs +12 -3
- package/dist/canvas/schema/index.d.ts +1 -0
- package/dist/canvas/schema/index.d.ts.map +1 -1
- package/dist/canvas/schema/index.js +1 -0
- package/dist/canvas/schema/task-definition/index.cjs +60 -0
- package/dist/canvas/schema/task-definition/index.d.ts +2 -0
- package/dist/canvas/schema/task-definition/index.d.ts.map +1 -0
- package/dist/canvas/schema/task-definition/index.js +1 -0
- package/dist/canvas/schema/task-definition/task-manifest.cjs +78 -0
- package/dist/canvas/schema/task-definition/task-manifest.d.ts +43 -0
- package/dist/canvas/schema/task-definition/task-manifest.d.ts.map +1 -0
- package/dist/canvas/schema/task-definition/task-manifest.js +29 -0
- package/package.json +1 -1
- package/dist/canvas/components/StageNode/DraggableTask.cjs +0 -271
- package/dist/canvas/components/StageNode/DraggableTask.d.ts +0 -4
- package/dist/canvas/components/StageNode/DraggableTask.d.ts.map +0 -1
- package/dist/canvas/components/StageNode/DraggableTask.js +0 -234
- package/dist/canvas/components/StageNode/DraggableTask.types.d.ts +0 -20
- package/dist/canvas/components/StageNode/DraggableTask.types.d.ts.map +0 -1
- package/dist/canvas/components/StageNode/StageNode.utils.cjs +0 -164
- package/dist/canvas/components/StageNode/StageNode.utils.d.ts +0 -19
- package/dist/canvas/components/StageNode/StageNode.utils.d.ts.map +0 -1
- package/dist/canvas/components/StageNode/StageNode.utils.js +0 -121
- /package/dist/canvas/components/{StageNode/DraggableTask.types.cjs → TaskNode/TaskNode.types.cjs} +0 -0
- /package/dist/canvas/components/{StageNode/DraggableTask.types.js → TaskNode/TaskNode.types.js} +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"./task-manifest": function(module) {
|
|
4
|
+
module.exports = require("./task-manifest.cjs");
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
var __webpack_module_cache__ = {};
|
|
8
|
+
function __webpack_require__(moduleId) {
|
|
9
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
10
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
11
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
12
|
+
exports: {}
|
|
13
|
+
};
|
|
14
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
15
|
+
return module.exports;
|
|
16
|
+
}
|
|
17
|
+
(()=>{
|
|
18
|
+
__webpack_require__.n = (module)=>{
|
|
19
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
20
|
+
__webpack_require__.d(getter, {
|
|
21
|
+
a: getter
|
|
22
|
+
});
|
|
23
|
+
return getter;
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
(()=>{
|
|
27
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
28
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: definition[key]
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
})();
|
|
34
|
+
(()=>{
|
|
35
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
36
|
+
})();
|
|
37
|
+
(()=>{
|
|
38
|
+
__webpack_require__.r = (exports1)=>{
|
|
39
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
40
|
+
value: 'Module'
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
43
|
+
value: true
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
})();
|
|
47
|
+
var __webpack_exports__ = {};
|
|
48
|
+
(()=>{
|
|
49
|
+
__webpack_require__.r(__webpack_exports__);
|
|
50
|
+
var _task_manifest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./task-manifest");
|
|
51
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
52
|
+
for(var __WEBPACK_IMPORT_KEY__ in _task_manifest__WEBPACK_IMPORTED_MODULE_0__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
53
|
+
return _task_manifest__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
54
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
55
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
56
|
+
})();
|
|
57
|
+
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
58
|
+
Object.defineProperty(exports, '__esModule', {
|
|
59
|
+
value: true
|
|
60
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/task-definition/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./task-manifest.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
taskDisplayManifestSchema: ()=>taskDisplayManifestSchema,
|
|
28
|
+
taskManifestCollectionSchema: ()=>taskManifestCollectionSchema,
|
|
29
|
+
taskManifestSchema: ()=>taskManifestSchema,
|
|
30
|
+
isTaskAllowedInStage: ()=>isTaskAllowedInStage,
|
|
31
|
+
validateTaskManifestCollection: ()=>validateTaskManifestCollection,
|
|
32
|
+
validateTaskManifest: ()=>validateTaskManifest
|
|
33
|
+
});
|
|
34
|
+
const external_zod_namespaceObject = require("zod");
|
|
35
|
+
const taskDisplayManifestSchema = external_zod_namespaceObject.z.object({
|
|
36
|
+
label: external_zod_namespaceObject.z.string().min(1),
|
|
37
|
+
description: external_zod_namespaceObject.z.string().optional(),
|
|
38
|
+
icon: external_zod_namespaceObject.z.string().min(1)
|
|
39
|
+
});
|
|
40
|
+
const taskManifestSchema = external_zod_namespaceObject.z.object({
|
|
41
|
+
taskType: external_zod_namespaceObject.z.string().min(1),
|
|
42
|
+
version: external_zod_namespaceObject.z.string().min(1),
|
|
43
|
+
category: external_zod_namespaceObject.z.string().optional(),
|
|
44
|
+
tags: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()),
|
|
45
|
+
sortOrder: external_zod_namespaceObject.z.number().int().nonnegative(),
|
|
46
|
+
display: taskDisplayManifestSchema,
|
|
47
|
+
allowedStageTypes: external_zod_namespaceObject.z.array(external_zod_namespaceObject.z.string()).optional(),
|
|
48
|
+
defaultProperties: external_zod_namespaceObject.z.record(external_zod_namespaceObject.z.string(), external_zod_namespaceObject.z.unknown()).optional(),
|
|
49
|
+
deprecated: external_zod_namespaceObject.z.boolean().optional()
|
|
50
|
+
});
|
|
51
|
+
const taskManifestCollectionSchema = external_zod_namespaceObject.z.array(taskManifestSchema);
|
|
52
|
+
function validateTaskManifest(manifest) {
|
|
53
|
+
return taskManifestSchema.parse(manifest);
|
|
54
|
+
}
|
|
55
|
+
function validateTaskManifestCollection(manifests) {
|
|
56
|
+
return taskManifestCollectionSchema.parse(manifests);
|
|
57
|
+
}
|
|
58
|
+
function isTaskAllowedInStage(manifest, stageNodeType) {
|
|
59
|
+
if (!manifest.allowedStageTypes || 0 === manifest.allowedStageTypes.length) return true;
|
|
60
|
+
return manifest.allowedStageTypes.includes(stageNodeType);
|
|
61
|
+
}
|
|
62
|
+
exports.isTaskAllowedInStage = __webpack_exports__.isTaskAllowedInStage;
|
|
63
|
+
exports.taskDisplayManifestSchema = __webpack_exports__.taskDisplayManifestSchema;
|
|
64
|
+
exports.taskManifestCollectionSchema = __webpack_exports__.taskManifestCollectionSchema;
|
|
65
|
+
exports.taskManifestSchema = __webpack_exports__.taskManifestSchema;
|
|
66
|
+
exports.validateTaskManifest = __webpack_exports__.validateTaskManifest;
|
|
67
|
+
exports.validateTaskManifestCollection = __webpack_exports__.validateTaskManifestCollection;
|
|
68
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
69
|
+
"isTaskAllowedInStage",
|
|
70
|
+
"taskDisplayManifestSchema",
|
|
71
|
+
"taskManifestCollectionSchema",
|
|
72
|
+
"taskManifestSchema",
|
|
73
|
+
"validateTaskManifest",
|
|
74
|
+
"validateTaskManifestCollection"
|
|
75
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
76
|
+
Object.defineProperty(exports, '__esModule', {
|
|
77
|
+
value: true
|
|
78
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const taskDisplayManifestSchema: z.ZodObject<{
|
|
3
|
+
label: z.ZodString;
|
|
4
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5
|
+
icon: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const taskManifestSchema: z.ZodObject<{
|
|
8
|
+
taskType: z.ZodString;
|
|
9
|
+
version: z.ZodString;
|
|
10
|
+
category: z.ZodOptional<z.ZodString>;
|
|
11
|
+
tags: z.ZodArray<z.ZodString>;
|
|
12
|
+
sortOrder: z.ZodNumber;
|
|
13
|
+
display: z.ZodObject<{
|
|
14
|
+
label: z.ZodString;
|
|
15
|
+
description: z.ZodOptional<z.ZodString>;
|
|
16
|
+
icon: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
allowedStageTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
defaultProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
20
|
+
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const taskManifestCollectionSchema: z.ZodArray<z.ZodObject<{
|
|
23
|
+
taskType: z.ZodString;
|
|
24
|
+
version: z.ZodString;
|
|
25
|
+
category: z.ZodOptional<z.ZodString>;
|
|
26
|
+
tags: z.ZodArray<z.ZodString>;
|
|
27
|
+
sortOrder: z.ZodNumber;
|
|
28
|
+
display: z.ZodObject<{
|
|
29
|
+
label: z.ZodString;
|
|
30
|
+
description: z.ZodOptional<z.ZodString>;
|
|
31
|
+
icon: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
allowedStageTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
+
defaultProperties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
35
|
+
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
export type TaskDisplayManifest = z.infer<typeof taskDisplayManifestSchema>;
|
|
38
|
+
export type TaskManifest = z.infer<typeof taskManifestSchema>;
|
|
39
|
+
export type TaskManifestCollection = z.infer<typeof taskManifestCollectionSchema>;
|
|
40
|
+
export declare function validateTaskManifest(manifest: unknown): TaskManifest;
|
|
41
|
+
export declare function validateTaskManifestCollection(manifests: unknown): TaskManifestCollection;
|
|
42
|
+
export declare function isTaskAllowedInStage(manifest: TaskManifest, stageNodeType: string): boolean;
|
|
43
|
+
//# sourceMappingURL=task-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-manifest.d.ts","sourceRoot":"","sources":["../../../../src/canvas/schema/task-definition/task-manifest.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,yBAAyB;;;;iBASpC,CAAC;AAKH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;iBAqC7B,CAAC;AAKH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;kBAA8B,CAAC;AAGxE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAKlF,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,CAEpE;AAKD,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,OAAO,GAAG,sBAAsB,CAEzF;AAKD,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,YAAY,EACtB,aAAa,EAAE,MAAM,GACpB,OAAO,CAMT"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const taskDisplayManifestSchema = z.object({
|
|
3
|
+
label: z.string().min(1),
|
|
4
|
+
description: z.string().optional(),
|
|
5
|
+
icon: z.string().min(1)
|
|
6
|
+
});
|
|
7
|
+
const taskManifestSchema = z.object({
|
|
8
|
+
taskType: z.string().min(1),
|
|
9
|
+
version: z.string().min(1),
|
|
10
|
+
category: z.string().optional(),
|
|
11
|
+
tags: z.array(z.string()),
|
|
12
|
+
sortOrder: z.number().int().nonnegative(),
|
|
13
|
+
display: taskDisplayManifestSchema,
|
|
14
|
+
allowedStageTypes: z.array(z.string()).optional(),
|
|
15
|
+
defaultProperties: z.record(z.string(), z.unknown()).optional(),
|
|
16
|
+
deprecated: z.boolean().optional()
|
|
17
|
+
});
|
|
18
|
+
const taskManifestCollectionSchema = z.array(taskManifestSchema);
|
|
19
|
+
function validateTaskManifest(manifest) {
|
|
20
|
+
return taskManifestSchema.parse(manifest);
|
|
21
|
+
}
|
|
22
|
+
function validateTaskManifestCollection(manifests) {
|
|
23
|
+
return taskManifestCollectionSchema.parse(manifests);
|
|
24
|
+
}
|
|
25
|
+
function isTaskAllowedInStage(manifest, stageNodeType) {
|
|
26
|
+
if (!manifest.allowedStageTypes || 0 === manifest.allowedStageTypes.length) return true;
|
|
27
|
+
return manifest.allowedStageTypes.includes(stageNodeType);
|
|
28
|
+
}
|
|
29
|
+
export { isTaskAllowedInStage, taskDisplayManifestSchema, taskManifestCollectionSchema, taskManifestSchema, validateTaskManifest, validateTaskManifestCollection };
|
package/package.json
CHANGED
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: definition[key]
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
})();
|
|
11
|
-
(()=>{
|
|
12
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
-
})();
|
|
14
|
-
(()=>{
|
|
15
|
-
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
-
value: 'Module'
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
var __webpack_exports__ = {};
|
|
25
|
-
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
TaskContent: ()=>TaskContent,
|
|
28
|
-
DraggableTask: ()=>DraggableTask
|
|
29
|
-
});
|
|
30
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
-
const sortable_namespaceObject = require("@dnd-kit/sortable");
|
|
32
|
-
const utilities_namespaceObject = require("@dnd-kit/utilities");
|
|
33
|
-
const apollo_core_namespaceObject = require("@uipath/apollo-core");
|
|
34
|
-
const index_cjs_namespaceObject = require("../../layouts/index.cjs");
|
|
35
|
-
const external_material_index_cjs_namespaceObject = require("../../../material/index.cjs");
|
|
36
|
-
const external_react_namespaceObject = require("react");
|
|
37
|
-
const external_ExecutionStatusIcon_index_cjs_namespaceObject = require("../ExecutionStatusIcon/index.cjs");
|
|
38
|
-
const external_StageNode_styles_cjs_namespaceObject = require("./StageNode.styles.cjs");
|
|
39
|
-
const external_TaskMenu_cjs_namespaceObject = require("./TaskMenu.cjs");
|
|
40
|
-
const ProcessNodeIcon = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("svg", {
|
|
41
|
-
viewBox: "0 0 24 24",
|
|
42
|
-
fill: "none",
|
|
43
|
-
stroke: "currentColor",
|
|
44
|
-
strokeWidth: "1.5",
|
|
45
|
-
children: [
|
|
46
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
|
|
47
|
-
x: "3",
|
|
48
|
-
y: "3",
|
|
49
|
-
width: "7",
|
|
50
|
-
height: "7",
|
|
51
|
-
rx: "1"
|
|
52
|
-
}),
|
|
53
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
|
|
54
|
-
x: "14",
|
|
55
|
-
y: "3",
|
|
56
|
-
width: "7",
|
|
57
|
-
height: "7",
|
|
58
|
-
rx: "1"
|
|
59
|
-
}),
|
|
60
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
|
|
61
|
-
x: "3",
|
|
62
|
-
y: "14",
|
|
63
|
-
width: "7",
|
|
64
|
-
height: "7",
|
|
65
|
-
rx: "1"
|
|
66
|
-
}),
|
|
67
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("rect", {
|
|
68
|
-
x: "14",
|
|
69
|
-
y: "14",
|
|
70
|
-
width: "7",
|
|
71
|
-
height: "7",
|
|
72
|
-
rx: "1"
|
|
73
|
-
})
|
|
74
|
-
]
|
|
75
|
-
});
|
|
76
|
-
const generateBadgeText = (taskExecution)=>{
|
|
77
|
-
if (!taskExecution.badge) return;
|
|
78
|
-
if (taskExecution.retryCount && taskExecution.retryCount > 1) return `${taskExecution.badge} x${taskExecution.retryCount}`;
|
|
79
|
-
return taskExecution.badge;
|
|
80
|
-
};
|
|
81
|
-
const TaskContent = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ task, taskExecution, isDragging })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
|
|
82
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Column, {
|
|
83
|
-
flex: 1,
|
|
84
|
-
style: {
|
|
85
|
-
overflow: 'hidden',
|
|
86
|
-
textOverflow: 'ellipsis',
|
|
87
|
-
whiteSpace: 'nowrap'
|
|
88
|
-
},
|
|
89
|
-
gap: apollo_core_namespaceObject.Padding.PadXs,
|
|
90
|
-
children: [
|
|
91
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
92
|
-
align: "center",
|
|
93
|
-
justify: "space-between",
|
|
94
|
-
children: [
|
|
95
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
96
|
-
gap: apollo_core_namespaceObject.Spacing.SpacingXs,
|
|
97
|
-
align: "center",
|
|
98
|
-
style: {
|
|
99
|
-
overflow: 'hidden',
|
|
100
|
-
textOverflow: 'ellipsis',
|
|
101
|
-
whiteSpace: 'nowrap'
|
|
102
|
-
},
|
|
103
|
-
children: [
|
|
104
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskIcon, {
|
|
105
|
-
children: task.icon ?? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ProcessNodeIcon, {})
|
|
106
|
-
}),
|
|
107
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
|
|
108
|
-
content: task.label,
|
|
109
|
-
placement: "top",
|
|
110
|
-
smartTooltip: true,
|
|
111
|
-
...isDragging && {
|
|
112
|
-
isOpen: false
|
|
113
|
-
},
|
|
114
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTypography, {
|
|
115
|
-
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeM,
|
|
116
|
-
color: "var(--uix-canvas-foreground)",
|
|
117
|
-
style: {
|
|
118
|
-
overflow: 'hidden',
|
|
119
|
-
textOverflow: 'ellipsis',
|
|
120
|
-
whiteSpace: 'nowrap'
|
|
121
|
-
},
|
|
122
|
-
children: task.label
|
|
123
|
-
})
|
|
124
|
-
})
|
|
125
|
-
]
|
|
126
|
-
}),
|
|
127
|
-
taskExecution?.status && (taskExecution.message ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTooltip, {
|
|
128
|
-
content: taskExecution.message,
|
|
129
|
-
placement: "top",
|
|
130
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ExecutionStatusIcon_index_cjs_namespaceObject.ExecutionStatusIcon, {
|
|
131
|
-
status: taskExecution.status
|
|
132
|
-
})
|
|
133
|
-
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_ExecutionStatusIcon_index_cjs_namespaceObject.ExecutionStatusIcon, {
|
|
134
|
-
status: taskExecution.status
|
|
135
|
-
}))
|
|
136
|
-
]
|
|
137
|
-
}),
|
|
138
|
-
taskExecution && (taskExecution.duration || taskExecution.retryDuration || taskExecution.badge) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
139
|
-
align: "center",
|
|
140
|
-
justify: "space-between",
|
|
141
|
-
children: [
|
|
142
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(index_cjs_namespaceObject.Row, {
|
|
143
|
-
gap: '2px',
|
|
144
|
-
children: [
|
|
145
|
-
taskExecution?.duration && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTypography, {
|
|
146
|
-
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeS,
|
|
147
|
-
color: "var(--uix-canvas-foreground-de-emp)",
|
|
148
|
-
children: taskExecution.duration
|
|
149
|
-
}),
|
|
150
|
-
taskExecution?.retryDuration && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskRetryDuration, {
|
|
151
|
-
status: taskExecution.badgeStatus ?? 'warning',
|
|
152
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApTypography, {
|
|
153
|
-
variant: apollo_core_namespaceObject.FontVariantToken.fontSizeS,
|
|
154
|
-
color: "inherit",
|
|
155
|
-
children: `(+${taskExecution.retryDuration})`
|
|
156
|
-
})
|
|
157
|
-
})
|
|
158
|
-
]
|
|
159
|
-
}),
|
|
160
|
-
taskExecution?.badge && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_material_index_cjs_namespaceObject.ApBadge, {
|
|
161
|
-
size: external_material_index_cjs_namespaceObject.BadgeSize.SMALL,
|
|
162
|
-
status: taskExecution.badgeStatus,
|
|
163
|
-
label: generateBadgeText(taskExecution) ?? ''
|
|
164
|
-
})
|
|
165
|
-
]
|
|
166
|
-
})
|
|
167
|
-
]
|
|
168
|
-
})
|
|
169
|
-
}));
|
|
170
|
-
const DraggableTaskComponent = ({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, isDragDisabled, projectedDepth, zoom = 1 })=>{
|
|
171
|
-
const [isMenuOpen, setIsMenuOpen] = (0, external_react_namespaceObject.useState)(false);
|
|
172
|
-
const taskRef = (0, external_react_namespaceObject.useRef)(null);
|
|
173
|
-
const menuRef = (0, external_react_namespaceObject.useRef)(null);
|
|
174
|
-
const handleClick = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
175
|
-
if (isMenuOpen) return;
|
|
176
|
-
onTaskClick(e, task.id);
|
|
177
|
-
}, [
|
|
178
|
-
isMenuOpen,
|
|
179
|
-
onTaskClick,
|
|
180
|
-
task.id
|
|
181
|
-
]);
|
|
182
|
-
const handleMenuOpenChange = (0, external_react_namespaceObject.useCallback)((isOpen)=>{
|
|
183
|
-
setIsMenuOpen(isOpen);
|
|
184
|
-
}, []);
|
|
185
|
-
const handleContextMenu = (0, external_react_namespaceObject.useCallback)((e)=>{
|
|
186
|
-
menuRef.current?.handleContextMenu(e);
|
|
187
|
-
}, []);
|
|
188
|
-
const { attributes, listeners, setNodeRef, transition, transform, isDragging } = (0, sortable_namespaceObject.useSortable)({
|
|
189
|
-
id: task.id,
|
|
190
|
-
disabled: isDragDisabled
|
|
191
|
-
});
|
|
192
|
-
const style = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
193
|
-
const scaledTransform = transform ? {
|
|
194
|
-
...transform,
|
|
195
|
-
x: transform.x / zoom,
|
|
196
|
-
y: transform.y / zoom
|
|
197
|
-
} : null;
|
|
198
|
-
let marginLeft;
|
|
199
|
-
if (isDragging && void 0 !== projectedDepth) if (1 !== projectedDepth || isParallel) {
|
|
200
|
-
if (0 === projectedDepth && isParallel) marginLeft = `-${external_StageNode_styles_cjs_namespaceObject.INDENTATION_WIDTH}px`;
|
|
201
|
-
} else marginLeft = `${external_StageNode_styles_cjs_namespaceObject.INDENTATION_WIDTH}px`;
|
|
202
|
-
return {
|
|
203
|
-
transition,
|
|
204
|
-
transform: utilities_namespaceObject.CSS.Transform.toString(scaledTransform),
|
|
205
|
-
marginLeft
|
|
206
|
-
};
|
|
207
|
-
}, [
|
|
208
|
-
transform,
|
|
209
|
-
zoom,
|
|
210
|
-
transition,
|
|
211
|
-
isDragging,
|
|
212
|
-
projectedDepth,
|
|
213
|
-
isParallel
|
|
214
|
-
]);
|
|
215
|
-
if (isDragging) {
|
|
216
|
-
const isTargetParallel = 1 === projectedDepth;
|
|
217
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskDragPlaceholderWrapper, {
|
|
218
|
-
ref: setNodeRef,
|
|
219
|
-
style: style,
|
|
220
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskDragPlaceholder, {
|
|
221
|
-
isTargetParallel: isTargetParallel
|
|
222
|
-
})
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
const taskElement = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_StageNode_styles_cjs_namespaceObject.StageTask, {
|
|
226
|
-
ref: taskRef,
|
|
227
|
-
"data-testid": `stage-task-${task.id}`,
|
|
228
|
-
selected: isSelected,
|
|
229
|
-
status: taskExecution?.status,
|
|
230
|
-
isParallel: isParallel,
|
|
231
|
-
isDragEnabled: !isDragDisabled,
|
|
232
|
-
isMenuOpen: isMenuOpen,
|
|
233
|
-
onClick: handleClick,
|
|
234
|
-
...contextMenuItems.length > 0 && {
|
|
235
|
-
onContextMenu: handleContextMenu
|
|
236
|
-
},
|
|
237
|
-
children: [
|
|
238
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TaskContent, {
|
|
239
|
-
task: task,
|
|
240
|
-
taskExecution: taskExecution
|
|
241
|
-
}),
|
|
242
|
-
contextMenuItems.length > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_TaskMenu_cjs_namespaceObject.TaskMenu, {
|
|
243
|
-
ref: menuRef,
|
|
244
|
-
taskId: task.id,
|
|
245
|
-
contextMenuItems: contextMenuItems,
|
|
246
|
-
onMenuOpenChange: handleMenuOpenChange,
|
|
247
|
-
onMenuOpen: onMenuOpen,
|
|
248
|
-
taskRef: taskRef
|
|
249
|
-
})
|
|
250
|
-
]
|
|
251
|
-
});
|
|
252
|
-
if (isDragDisabled) return taskElement;
|
|
253
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_StageNode_styles_cjs_namespaceObject.StageTaskWrapper, {
|
|
254
|
-
ref: setNodeRef,
|
|
255
|
-
style: style,
|
|
256
|
-
isParallel: isParallel,
|
|
257
|
-
...attributes,
|
|
258
|
-
...listeners,
|
|
259
|
-
children: taskElement
|
|
260
|
-
});
|
|
261
|
-
};
|
|
262
|
-
const DraggableTask = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(DraggableTaskComponent);
|
|
263
|
-
exports.DraggableTask = __webpack_exports__.DraggableTask;
|
|
264
|
-
exports.TaskContent = __webpack_exports__.TaskContent;
|
|
265
|
-
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
266
|
-
"DraggableTask",
|
|
267
|
-
"TaskContent"
|
|
268
|
-
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
269
|
-
Object.defineProperty(exports, '__esModule', {
|
|
270
|
-
value: true
|
|
271
|
-
});
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { DraggableTaskProps, TaskContentProps } from './DraggableTask.types';
|
|
2
|
-
export declare const TaskContent: import("react").MemoExoticComponent<({ task, taskExecution, isDragging }: TaskContentProps) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
-
export declare const DraggableTask: import("react").MemoExoticComponent<({ task, taskExecution, isSelected, isParallel, contextMenuItems, onTaskClick, onMenuOpen, isDragDisabled, projectedDepth, zoom, }: DraggableTaskProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
-
//# sourceMappingURL=DraggableTask.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableTask.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/StageNode/DraggableTask.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAgClF,eAAO,MAAM,WAAW,4EAA8C,gBAAgB,6CAsEpF,CAAC;AAqHH,eAAO,MAAM,aAAa,0KAxGvB,kBAAkB,6CAwGoC,CAAC"}
|