@uniformdev/canvas 19.147.1-alpha.1 → 19.147.1-alpha.10
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/index.d.mts +3533 -221
- package/dist/index.d.ts +3533 -221
- package/dist/index.esm.js +42 -44
- package/dist/index.js +45 -46
- package/dist/index.mjs +42 -44
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
@@ -1082,6 +1082,7 @@ function walkNodeTree(node, visitor, options) {
|
|
1082
1082
|
} else {
|
1083
1083
|
throw new Error("Unknown node type");
|
1084
1084
|
}
|
1085
|
+
visitDescendants = false;
|
1085
1086
|
},
|
1086
1087
|
insertAfter: (nodes) => {
|
1087
1088
|
const currentNodeInfo = currentQueueEntry.ancestorsAndSelf[0];
|
@@ -1167,6 +1168,7 @@ function walkNodeTree(node, visitor, options) {
|
|
1167
1168
|
} else {
|
1168
1169
|
throw new Error("Unknown node type");
|
1169
1170
|
}
|
1171
|
+
visitDescendants = false;
|
1170
1172
|
},
|
1171
1173
|
insertAfter: (nodes) => {
|
1172
1174
|
const nodesToInsert = Array.isArray(nodes) ? nodes : [nodes];
|
@@ -2152,6 +2154,7 @@ var createCanvasChannel = ({
|
|
2152
2154
|
listenTo.forEach((item) => item.removeEventListener("message", messageEventListener));
|
2153
2155
|
};
|
2154
2156
|
return {
|
2157
|
+
broadcastTo,
|
2155
2158
|
ready,
|
2156
2159
|
destroy,
|
2157
2160
|
triggerComponentAction,
|
@@ -2299,49 +2302,6 @@ var RelationshipClient = class extends ApiClient8 {
|
|
2299
2302
|
const url = this.createUrl(RELATIONSHIPS_URL, { ...options, projectId });
|
2300
2303
|
return this.apiClient(url);
|
2301
2304
|
};
|
2302
|
-
this.clearProjectRelationships = async () => {
|
2303
|
-
const { projectId } = this.options;
|
2304
|
-
const url = this.createUrl(RELATIONSHIPS_URL);
|
2305
|
-
return this.apiClient(url, {
|
2306
|
-
method: "POST",
|
2307
|
-
body: JSON.stringify({
|
2308
|
-
action: "clear",
|
2309
|
-
projectId
|
2310
|
-
})
|
2311
|
-
});
|
2312
|
-
};
|
2313
|
-
this.indexRelationships = async ({ state, id, type }) => {
|
2314
|
-
const { projectId } = this.options;
|
2315
|
-
const url = this.createUrl(RELATIONSHIPS_URL);
|
2316
|
-
return this.apiClient(url, {
|
2317
|
-
method: "POST",
|
2318
|
-
body: JSON.stringify({
|
2319
|
-
action: "index",
|
2320
|
-
type,
|
2321
|
-
projectId,
|
2322
|
-
state,
|
2323
|
-
id
|
2324
|
-
})
|
2325
|
-
});
|
2326
|
-
};
|
2327
|
-
this.getVersion = async () => {
|
2328
|
-
const { projectId } = this.options;
|
2329
|
-
const url = this.createUrl("/api/v1/usage-tracking", {
|
2330
|
-
projectId
|
2331
|
-
});
|
2332
|
-
return this.apiClient(url).then((response) => response.version);
|
2333
|
-
};
|
2334
|
-
this.setVersion = async (version) => {
|
2335
|
-
const { projectId } = this.options;
|
2336
|
-
const url = this.createUrl("/api/v1/usage-tracking");
|
2337
|
-
return this.apiClient(url, {
|
2338
|
-
method: "POST",
|
2339
|
-
body: JSON.stringify({
|
2340
|
-
projectId,
|
2341
|
-
version
|
2342
|
-
})
|
2343
|
-
});
|
2344
|
-
};
|
2345
2305
|
}
|
2346
2306
|
};
|
2347
2307
|
|
@@ -2477,7 +2437,9 @@ function convertEntryToPutEntry(entry) {
|
|
2477
2437
|
pattern: entry.pattern,
|
2478
2438
|
state: entry.state,
|
2479
2439
|
projectId: entry.projectId,
|
2480
|
-
releaseId: entry.releaseId
|
2440
|
+
releaseId: entry.releaseId,
|
2441
|
+
workflowId: entry.workflowId,
|
2442
|
+
workflowStageId: entry.workflowStageId
|
2481
2443
|
};
|
2482
2444
|
}
|
2483
2445
|
|
@@ -2780,6 +2742,41 @@ function handleRichTextNodeBinding(object, options) {
|
|
2780
2742
|
|
2781
2743
|
// src/index.ts
|
2782
2744
|
import { ApiClientError as ApiClientError2 } from "@uniformdev/context/api";
|
2745
|
+
|
2746
|
+
// src/WorkflowClient.ts
|
2747
|
+
import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
|
2748
|
+
var workflowsUrl = "/api/v1/workflows";
|
2749
|
+
var WorkflowClient = class extends ApiClient12 {
|
2750
|
+
constructor(options) {
|
2751
|
+
super(options);
|
2752
|
+
}
|
2753
|
+
/** Fetches workflows for a project */
|
2754
|
+
async get(options) {
|
2755
|
+
const { projectId } = this.options;
|
2756
|
+
const fetchUri = this.createUrl(workflowsUrl, { ...options, projectId });
|
2757
|
+
return await this.apiClient(fetchUri);
|
2758
|
+
}
|
2759
|
+
/** Updates or creates a workflow definition */
|
2760
|
+
async upsert(body) {
|
2761
|
+
const fetchUri = this.createUrl(workflowsUrl);
|
2762
|
+
await this.apiClient(fetchUri, {
|
2763
|
+
method: "PUT",
|
2764
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2765
|
+
expectNoContent: true
|
2766
|
+
});
|
2767
|
+
}
|
2768
|
+
/** Deletes a workflow definition */
|
2769
|
+
async remove(body) {
|
2770
|
+
const fetchUri = this.createUrl(workflowsUrl);
|
2771
|
+
await this.apiClient(fetchUri, {
|
2772
|
+
method: "DELETE",
|
2773
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2774
|
+
expectNoContent: true
|
2775
|
+
});
|
2776
|
+
}
|
2777
|
+
};
|
2778
|
+
|
2779
|
+
// src/index.ts
|
2783
2780
|
var CanvasClientError = ApiClientError2;
|
2784
2781
|
export {
|
2785
2782
|
ASSETS_SOURCE_CUSTOM_URL,
|
@@ -2844,6 +2841,7 @@ export {
|
|
2844
2841
|
UncachedCategoryClient,
|
2845
2842
|
UncachedContentClient,
|
2846
2843
|
UniqueBatchEntries,
|
2844
|
+
WorkflowClient,
|
2847
2845
|
bindVariables,
|
2848
2846
|
bindVariablesToObject,
|
2849
2847
|
compose,
|
package/dist/index.js
CHANGED
@@ -286,7 +286,7 @@ __export(src_exports, {
|
|
286
286
|
ATTRIBUTE_PARAMETER_TYPE: () => ATTRIBUTE_PARAMETER_TYPE,
|
287
287
|
ATTRIBUTE_PARAMETER_VALUE: () => ATTRIBUTE_PARAMETER_VALUE,
|
288
288
|
ATTRIBUTE_PLACEHOLDER: () => ATTRIBUTE_PLACEHOLDER,
|
289
|
-
ApiClientError: () =>
|
289
|
+
ApiClientError: () => import_api14.ApiClientError,
|
290
290
|
BatchEntry: () => BatchEntry,
|
291
291
|
CANVAS_BLOCK_PARAM_TYPE: () => CANVAS_BLOCK_PARAM_TYPE,
|
292
292
|
CANVAS_DRAFT_STATE: () => CANVAS_DRAFT_STATE,
|
@@ -339,6 +339,7 @@ __export(src_exports, {
|
|
339
339
|
UncachedCategoryClient: () => UncachedCategoryClient,
|
340
340
|
UncachedContentClient: () => UncachedContentClient,
|
341
341
|
UniqueBatchEntries: () => UniqueBatchEntries,
|
342
|
+
WorkflowClient: () => WorkflowClient,
|
342
343
|
bindVariables: () => bindVariables,
|
343
344
|
bindVariablesToObject: () => bindVariablesToObject,
|
344
345
|
compose: () => compose,
|
@@ -1218,6 +1219,7 @@ function walkNodeTree(node, visitor, options) {
|
|
1218
1219
|
} else {
|
1219
1220
|
throw new Error("Unknown node type");
|
1220
1221
|
}
|
1222
|
+
visitDescendants = false;
|
1221
1223
|
},
|
1222
1224
|
insertAfter: (nodes) => {
|
1223
1225
|
const currentNodeInfo = currentQueueEntry.ancestorsAndSelf[0];
|
@@ -1303,6 +1305,7 @@ function walkNodeTree(node, visitor, options) {
|
|
1303
1305
|
} else {
|
1304
1306
|
throw new Error("Unknown node type");
|
1305
1307
|
}
|
1308
|
+
visitDescendants = false;
|
1306
1309
|
},
|
1307
1310
|
insertAfter: (nodes) => {
|
1308
1311
|
const nodesToInsert = Array.isArray(nodes) ? nodes : [nodes];
|
@@ -2288,6 +2291,7 @@ var createCanvasChannel = ({
|
|
2288
2291
|
listenTo.forEach((item) => item.removeEventListener("message", messageEventListener));
|
2289
2292
|
};
|
2290
2293
|
return {
|
2294
|
+
broadcastTo,
|
2291
2295
|
ready,
|
2292
2296
|
destroy,
|
2293
2297
|
triggerComponentAction,
|
@@ -2435,49 +2439,6 @@ var RelationshipClient = class extends import_api9.ApiClient {
|
|
2435
2439
|
const url = this.createUrl(RELATIONSHIPS_URL, { ...options, projectId });
|
2436
2440
|
return this.apiClient(url);
|
2437
2441
|
};
|
2438
|
-
this.clearProjectRelationships = async () => {
|
2439
|
-
const { projectId } = this.options;
|
2440
|
-
const url = this.createUrl(RELATIONSHIPS_URL);
|
2441
|
-
return this.apiClient(url, {
|
2442
|
-
method: "POST",
|
2443
|
-
body: JSON.stringify({
|
2444
|
-
action: "clear",
|
2445
|
-
projectId
|
2446
|
-
})
|
2447
|
-
});
|
2448
|
-
};
|
2449
|
-
this.indexRelationships = async ({ state, id, type }) => {
|
2450
|
-
const { projectId } = this.options;
|
2451
|
-
const url = this.createUrl(RELATIONSHIPS_URL);
|
2452
|
-
return this.apiClient(url, {
|
2453
|
-
method: "POST",
|
2454
|
-
body: JSON.stringify({
|
2455
|
-
action: "index",
|
2456
|
-
type,
|
2457
|
-
projectId,
|
2458
|
-
state,
|
2459
|
-
id
|
2460
|
-
})
|
2461
|
-
});
|
2462
|
-
};
|
2463
|
-
this.getVersion = async () => {
|
2464
|
-
const { projectId } = this.options;
|
2465
|
-
const url = this.createUrl("/api/v1/usage-tracking", {
|
2466
|
-
projectId
|
2467
|
-
});
|
2468
|
-
return this.apiClient(url).then((response) => response.version);
|
2469
|
-
};
|
2470
|
-
this.setVersion = async (version) => {
|
2471
|
-
const { projectId } = this.options;
|
2472
|
-
const url = this.createUrl("/api/v1/usage-tracking");
|
2473
|
-
return this.apiClient(url, {
|
2474
|
-
method: "POST",
|
2475
|
-
body: JSON.stringify({
|
2476
|
-
projectId,
|
2477
|
-
version
|
2478
|
-
})
|
2479
|
-
});
|
2480
|
-
};
|
2481
2442
|
}
|
2482
2443
|
};
|
2483
2444
|
|
@@ -2613,7 +2574,9 @@ function convertEntryToPutEntry(entry) {
|
|
2613
2574
|
pattern: entry.pattern,
|
2614
2575
|
state: entry.state,
|
2615
2576
|
projectId: entry.projectId,
|
2616
|
-
releaseId: entry.releaseId
|
2577
|
+
releaseId: entry.releaseId,
|
2578
|
+
workflowId: entry.workflowId,
|
2579
|
+
workflowStageId: entry.workflowStageId
|
2617
2580
|
};
|
2618
2581
|
}
|
2619
2582
|
|
@@ -2915,8 +2878,43 @@ function handleRichTextNodeBinding(object, options) {
|
|
2915
2878
|
}
|
2916
2879
|
|
2917
2880
|
// src/index.ts
|
2881
|
+
var import_api14 = require("@uniformdev/context/api");
|
2882
|
+
|
2883
|
+
// src/WorkflowClient.ts
|
2918
2884
|
var import_api13 = require("@uniformdev/context/api");
|
2919
|
-
var
|
2885
|
+
var workflowsUrl = "/api/v1/workflows";
|
2886
|
+
var WorkflowClient = class extends import_api13.ApiClient {
|
2887
|
+
constructor(options) {
|
2888
|
+
super(options);
|
2889
|
+
}
|
2890
|
+
/** Fetches workflows for a project */
|
2891
|
+
async get(options) {
|
2892
|
+
const { projectId } = this.options;
|
2893
|
+
const fetchUri = this.createUrl(workflowsUrl, { ...options, projectId });
|
2894
|
+
return await this.apiClient(fetchUri);
|
2895
|
+
}
|
2896
|
+
/** Updates or creates a workflow definition */
|
2897
|
+
async upsert(body) {
|
2898
|
+
const fetchUri = this.createUrl(workflowsUrl);
|
2899
|
+
await this.apiClient(fetchUri, {
|
2900
|
+
method: "PUT",
|
2901
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2902
|
+
expectNoContent: true
|
2903
|
+
});
|
2904
|
+
}
|
2905
|
+
/** Deletes a workflow definition */
|
2906
|
+
async remove(body) {
|
2907
|
+
const fetchUri = this.createUrl(workflowsUrl);
|
2908
|
+
await this.apiClient(fetchUri, {
|
2909
|
+
method: "DELETE",
|
2910
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2911
|
+
expectNoContent: true
|
2912
|
+
});
|
2913
|
+
}
|
2914
|
+
};
|
2915
|
+
|
2916
|
+
// src/index.ts
|
2917
|
+
var CanvasClientError = import_api14.ApiClientError;
|
2920
2918
|
// Annotate the CommonJS export names for ESM import in node:
|
2921
2919
|
0 && (module.exports = {
|
2922
2920
|
ASSETS_SOURCE_CUSTOM_URL,
|
@@ -2981,6 +2979,7 @@ var CanvasClientError = import_api13.ApiClientError;
|
|
2981
2979
|
UncachedCategoryClient,
|
2982
2980
|
UncachedContentClient,
|
2983
2981
|
UniqueBatchEntries,
|
2982
|
+
WorkflowClient,
|
2984
2983
|
bindVariables,
|
2985
2984
|
bindVariablesToObject,
|
2986
2985
|
compose,
|
package/dist/index.mjs
CHANGED
@@ -1082,6 +1082,7 @@ function walkNodeTree(node, visitor, options) {
|
|
1082
1082
|
} else {
|
1083
1083
|
throw new Error("Unknown node type");
|
1084
1084
|
}
|
1085
|
+
visitDescendants = false;
|
1085
1086
|
},
|
1086
1087
|
insertAfter: (nodes) => {
|
1087
1088
|
const currentNodeInfo = currentQueueEntry.ancestorsAndSelf[0];
|
@@ -1167,6 +1168,7 @@ function walkNodeTree(node, visitor, options) {
|
|
1167
1168
|
} else {
|
1168
1169
|
throw new Error("Unknown node type");
|
1169
1170
|
}
|
1171
|
+
visitDescendants = false;
|
1170
1172
|
},
|
1171
1173
|
insertAfter: (nodes) => {
|
1172
1174
|
const nodesToInsert = Array.isArray(nodes) ? nodes : [nodes];
|
@@ -2152,6 +2154,7 @@ var createCanvasChannel = ({
|
|
2152
2154
|
listenTo.forEach((item) => item.removeEventListener("message", messageEventListener));
|
2153
2155
|
};
|
2154
2156
|
return {
|
2157
|
+
broadcastTo,
|
2155
2158
|
ready,
|
2156
2159
|
destroy,
|
2157
2160
|
triggerComponentAction,
|
@@ -2299,49 +2302,6 @@ var RelationshipClient = class extends ApiClient8 {
|
|
2299
2302
|
const url = this.createUrl(RELATIONSHIPS_URL, { ...options, projectId });
|
2300
2303
|
return this.apiClient(url);
|
2301
2304
|
};
|
2302
|
-
this.clearProjectRelationships = async () => {
|
2303
|
-
const { projectId } = this.options;
|
2304
|
-
const url = this.createUrl(RELATIONSHIPS_URL);
|
2305
|
-
return this.apiClient(url, {
|
2306
|
-
method: "POST",
|
2307
|
-
body: JSON.stringify({
|
2308
|
-
action: "clear",
|
2309
|
-
projectId
|
2310
|
-
})
|
2311
|
-
});
|
2312
|
-
};
|
2313
|
-
this.indexRelationships = async ({ state, id, type }) => {
|
2314
|
-
const { projectId } = this.options;
|
2315
|
-
const url = this.createUrl(RELATIONSHIPS_URL);
|
2316
|
-
return this.apiClient(url, {
|
2317
|
-
method: "POST",
|
2318
|
-
body: JSON.stringify({
|
2319
|
-
action: "index",
|
2320
|
-
type,
|
2321
|
-
projectId,
|
2322
|
-
state,
|
2323
|
-
id
|
2324
|
-
})
|
2325
|
-
});
|
2326
|
-
};
|
2327
|
-
this.getVersion = async () => {
|
2328
|
-
const { projectId } = this.options;
|
2329
|
-
const url = this.createUrl("/api/v1/usage-tracking", {
|
2330
|
-
projectId
|
2331
|
-
});
|
2332
|
-
return this.apiClient(url).then((response) => response.version);
|
2333
|
-
};
|
2334
|
-
this.setVersion = async (version) => {
|
2335
|
-
const { projectId } = this.options;
|
2336
|
-
const url = this.createUrl("/api/v1/usage-tracking");
|
2337
|
-
return this.apiClient(url, {
|
2338
|
-
method: "POST",
|
2339
|
-
body: JSON.stringify({
|
2340
|
-
projectId,
|
2341
|
-
version
|
2342
|
-
})
|
2343
|
-
});
|
2344
|
-
};
|
2345
2305
|
}
|
2346
2306
|
};
|
2347
2307
|
|
@@ -2477,7 +2437,9 @@ function convertEntryToPutEntry(entry) {
|
|
2477
2437
|
pattern: entry.pattern,
|
2478
2438
|
state: entry.state,
|
2479
2439
|
projectId: entry.projectId,
|
2480
|
-
releaseId: entry.releaseId
|
2440
|
+
releaseId: entry.releaseId,
|
2441
|
+
workflowId: entry.workflowId,
|
2442
|
+
workflowStageId: entry.workflowStageId
|
2481
2443
|
};
|
2482
2444
|
}
|
2483
2445
|
|
@@ -2780,6 +2742,41 @@ function handleRichTextNodeBinding(object, options) {
|
|
2780
2742
|
|
2781
2743
|
// src/index.ts
|
2782
2744
|
import { ApiClientError as ApiClientError2 } from "@uniformdev/context/api";
|
2745
|
+
|
2746
|
+
// src/WorkflowClient.ts
|
2747
|
+
import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
|
2748
|
+
var workflowsUrl = "/api/v1/workflows";
|
2749
|
+
var WorkflowClient = class extends ApiClient12 {
|
2750
|
+
constructor(options) {
|
2751
|
+
super(options);
|
2752
|
+
}
|
2753
|
+
/** Fetches workflows for a project */
|
2754
|
+
async get(options) {
|
2755
|
+
const { projectId } = this.options;
|
2756
|
+
const fetchUri = this.createUrl(workflowsUrl, { ...options, projectId });
|
2757
|
+
return await this.apiClient(fetchUri);
|
2758
|
+
}
|
2759
|
+
/** Updates or creates a workflow definition */
|
2760
|
+
async upsert(body) {
|
2761
|
+
const fetchUri = this.createUrl(workflowsUrl);
|
2762
|
+
await this.apiClient(fetchUri, {
|
2763
|
+
method: "PUT",
|
2764
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2765
|
+
expectNoContent: true
|
2766
|
+
});
|
2767
|
+
}
|
2768
|
+
/** Deletes a workflow definition */
|
2769
|
+
async remove(body) {
|
2770
|
+
const fetchUri = this.createUrl(workflowsUrl);
|
2771
|
+
await this.apiClient(fetchUri, {
|
2772
|
+
method: "DELETE",
|
2773
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2774
|
+
expectNoContent: true
|
2775
|
+
});
|
2776
|
+
}
|
2777
|
+
};
|
2778
|
+
|
2779
|
+
// src/index.ts
|
2783
2780
|
var CanvasClientError = ApiClientError2;
|
2784
2781
|
export {
|
2785
2782
|
ASSETS_SOURCE_CUSTOM_URL,
|
@@ -2844,6 +2841,7 @@ export {
|
|
2844
2841
|
UncachedCategoryClient,
|
2845
2842
|
UncachedContentClient,
|
2846
2843
|
UniqueBatchEntries,
|
2844
|
+
WorkflowClient,
|
2847
2845
|
bindVariables,
|
2848
2846
|
bindVariablesToObject,
|
2849
2847
|
compose,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "19.147.1-alpha.
|
3
|
+
"version": "19.147.1-alpha.10+6efbd31548",
|
4
4
|
"description": "Common functionality and types for Uniform Canvas",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -38,8 +38,8 @@
|
|
38
38
|
"pusher-js": "8.2.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@uniformdev/assets": "19.147.1-alpha.
|
42
|
-
"@uniformdev/context": "19.147.1-alpha.
|
41
|
+
"@uniformdev/assets": "19.147.1-alpha.10+6efbd31548",
|
42
|
+
"@uniformdev/context": "19.147.1-alpha.10+6efbd31548",
|
43
43
|
"immer": "10.0.4"
|
44
44
|
},
|
45
45
|
"files": [
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"publishConfig": {
|
49
49
|
"access": "public"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "6efbd31548d4190f950f425f10ec9398de1aacb2"
|
52
52
|
}
|