@livechat/platform-workflows 0.1.4 → 0.1.6
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/chunk-BW4GCPXP.mjs +20 -0
- package/dist/chunk-EACC5D4G.mjs +113 -0
- package/dist/{config/index.mjs → chunk-I4E63NIC.mjs} +5 -15
- package/dist/{chunk-I7LVNCZF.mjs → chunk-PWFJOGII.mjs} +1 -62
- package/dist/{chunk-Q53XLSIX.mjs → chunk-UQO6HYDU.mjs} +1 -53
- package/dist/chunk-V3FK4SUN.mjs +1606 -0
- package/dist/chunk-WFVTCU6F.mjs +24 -0
- package/dist/chunk-WNNR3KXF.mjs +1607 -0
- package/dist/chunk-WS4FFM4M.mjs +111 -0
- package/dist/chunk-XIPVJOPR.mjs +1621 -0
- package/dist/chunk-YS3C7NY2.mjs +1623 -0
- package/dist/{config/index.d.ts → config.d.mts} +5 -2
- package/dist/{config/index.d.mts → config.d.ts} +5 -2
- package/dist/{config/index.js → config.js} +0 -2
- package/dist/config.mjs +11 -0
- package/dist/constants.d.mts +1037 -0
- package/dist/constants.d.ts +1037 -0
- package/dist/constants.js +10845 -0
- package/dist/constants.mjs +10779 -0
- package/dist/index-B3GBo8sA.d.mts +98 -0
- package/dist/index-B3GBo8sA.d.ts +98 -0
- package/dist/index.d.mts +108 -2
- package/dist/index.d.ts +108 -2
- package/dist/index.js +203 -205
- package/dist/index.mjs +182 -11
- package/dist/tests.js +0 -1
- package/dist/tests.mjs +109 -4
- package/package.json +21 -8
- package/dist/.DS_Store +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,78 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
38
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
39
|
+
};
|
|
40
|
+
var __copyProps = (to, from2, except, desc) => {
|
|
41
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
42
|
+
for (let key of __getOwnPropNames(from2))
|
|
43
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
44
|
+
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
|
|
45
|
+
}
|
|
46
|
+
return to;
|
|
47
|
+
};
|
|
48
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
49
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
50
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
51
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
52
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
53
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
54
|
+
mod
|
|
55
|
+
));
|
|
56
|
+
var __async = (__this, __arguments, generator) => {
|
|
57
|
+
return new Promise((resolve, reject) => {
|
|
58
|
+
var fulfilled = (value) => {
|
|
59
|
+
try {
|
|
60
|
+
step(generator.next(value));
|
|
61
|
+
} catch (e) {
|
|
62
|
+
reject(e);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
var rejected = (value) => {
|
|
66
|
+
try {
|
|
67
|
+
step(generator.throw(value));
|
|
68
|
+
} catch (e) {
|
|
69
|
+
reject(e);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
73
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
74
|
+
});
|
|
75
|
+
};
|
|
11
76
|
|
|
12
77
|
// ../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
|
|
13
78
|
var require_react_is_production_min = __commonJS({
|
|
@@ -395,18 +460,124 @@ var require_extends = __commonJS({
|
|
|
395
460
|
});
|
|
396
461
|
|
|
397
462
|
// src/config.ts
|
|
398
|
-
import { setConfig } from "@livechat/developer-studio-ui-react";
|
|
399
463
|
var config = {
|
|
400
464
|
config: void 0
|
|
401
465
|
};
|
|
402
466
|
function setWorkflowsConfig(newConfig) {
|
|
403
467
|
config.config = __spreadValues(__spreadValues({}, config.config), newConfig);
|
|
404
|
-
setConfig(newConfig);
|
|
405
468
|
}
|
|
406
469
|
var getWorkflowsEnv = (key) => {
|
|
407
470
|
return config.config[key];
|
|
408
471
|
};
|
|
409
472
|
|
|
473
|
+
// src/tests/selectors.ts
|
|
474
|
+
var WORKFLOWS_TEST_SELECTORS = {
|
|
475
|
+
views: {
|
|
476
|
+
workflows: {
|
|
477
|
+
creator: {
|
|
478
|
+
navbar: {
|
|
479
|
+
activateSwitch: "activate-switch",
|
|
480
|
+
publishButton: "publish-btn",
|
|
481
|
+
editButton: "edit-btn"
|
|
482
|
+
},
|
|
483
|
+
builder: {
|
|
484
|
+
nodes: {
|
|
485
|
+
add: {
|
|
486
|
+
task: {
|
|
487
|
+
button: "add-task-btn"
|
|
488
|
+
},
|
|
489
|
+
trigger: {
|
|
490
|
+
button: "add-trigger-btn"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
forms: {
|
|
495
|
+
integrations: {
|
|
496
|
+
text: {
|
|
497
|
+
info: "info-container",
|
|
498
|
+
button: "start-trial-btn"
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
modals: {
|
|
504
|
+
addTask: {
|
|
505
|
+
wrapper: "add-task-modal",
|
|
506
|
+
taskCard: (key) => `task-option-${key}`,
|
|
507
|
+
taskCategoryButton: (key) => `task-category-${key}`,
|
|
508
|
+
saveButton: "save-task-btn"
|
|
509
|
+
},
|
|
510
|
+
addTrigger: {
|
|
511
|
+
wrapper: "add-trigger-modal",
|
|
512
|
+
saveButton: "save-trigger-btn",
|
|
513
|
+
triggerCard: (key) => `trigger-option-${key}`,
|
|
514
|
+
triggerCategoryButton: (key) => `trigger-category-${key}`
|
|
515
|
+
},
|
|
516
|
+
publish: {
|
|
517
|
+
wrapper: "publish-workflow-modal",
|
|
518
|
+
saveButton: "publish-workflow-btn",
|
|
519
|
+
cancelButton: "cancel-publish-btn"
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
panels: {
|
|
523
|
+
element: {
|
|
524
|
+
wrapper: "element-wrapper"
|
|
525
|
+
},
|
|
526
|
+
details: {
|
|
527
|
+
executions: {
|
|
528
|
+
list: {
|
|
529
|
+
row: "execution-row",
|
|
530
|
+
status: "execution-status"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
panel: {
|
|
534
|
+
historyTab: "history-tab"
|
|
535
|
+
},
|
|
536
|
+
info: {
|
|
537
|
+
dateCreated: "date-created",
|
|
538
|
+
dateUpdated: "date-updated",
|
|
539
|
+
completedCycles: "completed-cycles",
|
|
540
|
+
failedCycles: "failed-cycles"
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
list: {
|
|
546
|
+
grid: {
|
|
547
|
+
table: {
|
|
548
|
+
wrapper: "workflows-table",
|
|
549
|
+
body: "workflows-table-body",
|
|
550
|
+
menuTrigger: "action-menu-trigger",
|
|
551
|
+
activateSwitch: "activate-switch",
|
|
552
|
+
infoButton: "info-btn",
|
|
553
|
+
workflowItem: (id) => `workflow-item-${id}`
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
view: {
|
|
557
|
+
createButton: "create-workflow-btn",
|
|
558
|
+
emptyInfo: "empty-info"
|
|
559
|
+
},
|
|
560
|
+
modals: {
|
|
561
|
+
create: {
|
|
562
|
+
wrapper: "create-workflow-modal"
|
|
563
|
+
},
|
|
564
|
+
previewTemplate: {
|
|
565
|
+
wrapper: "template-preview-modal",
|
|
566
|
+
useButton: "use-template-btn"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
home: {
|
|
570
|
+
cards: {
|
|
571
|
+
template: {
|
|
572
|
+
wrapper: "template-card"
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
|
|
410
581
|
// src/views/index.tsx
|
|
411
582
|
import { Route as Route7, Routes as Routes7 } from "react-router-dom";
|
|
412
583
|
|
package/dist/tests.js
CHANGED
package/dist/tests.mjs
CHANGED
|
@@ -1,7 +1,112 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import "./chunk-I4E63NIC.mjs";
|
|
2
|
+
|
|
3
|
+
// src/tests/selectors.ts
|
|
4
|
+
var WORKFLOWS_TEST_SELECTORS = {
|
|
5
|
+
views: {
|
|
6
|
+
workflows: {
|
|
7
|
+
creator: {
|
|
8
|
+
navbar: {
|
|
9
|
+
activateSwitch: "activate-switch",
|
|
10
|
+
publishButton: "publish-btn",
|
|
11
|
+
editButton: "edit-btn"
|
|
12
|
+
},
|
|
13
|
+
builder: {
|
|
14
|
+
nodes: {
|
|
15
|
+
add: {
|
|
16
|
+
task: {
|
|
17
|
+
button: "add-task-btn"
|
|
18
|
+
},
|
|
19
|
+
trigger: {
|
|
20
|
+
button: "add-trigger-btn"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
forms: {
|
|
25
|
+
integrations: {
|
|
26
|
+
text: {
|
|
27
|
+
info: "info-container",
|
|
28
|
+
button: "start-trial-btn"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
modals: {
|
|
34
|
+
addTask: {
|
|
35
|
+
wrapper: "add-task-modal",
|
|
36
|
+
taskCard: (key) => `task-option-${key}`,
|
|
37
|
+
taskCategoryButton: (key) => `task-category-${key}`,
|
|
38
|
+
saveButton: "save-task-btn"
|
|
39
|
+
},
|
|
40
|
+
addTrigger: {
|
|
41
|
+
wrapper: "add-trigger-modal",
|
|
42
|
+
saveButton: "save-trigger-btn",
|
|
43
|
+
triggerCard: (key) => `trigger-option-${key}`,
|
|
44
|
+
triggerCategoryButton: (key) => `trigger-category-${key}`
|
|
45
|
+
},
|
|
46
|
+
publish: {
|
|
47
|
+
wrapper: "publish-workflow-modal",
|
|
48
|
+
saveButton: "publish-workflow-btn",
|
|
49
|
+
cancelButton: "cancel-publish-btn"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
panels: {
|
|
53
|
+
element: {
|
|
54
|
+
wrapper: "element-wrapper"
|
|
55
|
+
},
|
|
56
|
+
details: {
|
|
57
|
+
executions: {
|
|
58
|
+
list: {
|
|
59
|
+
row: "execution-row",
|
|
60
|
+
status: "execution-status"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
panel: {
|
|
64
|
+
historyTab: "history-tab"
|
|
65
|
+
},
|
|
66
|
+
info: {
|
|
67
|
+
dateCreated: "date-created",
|
|
68
|
+
dateUpdated: "date-updated",
|
|
69
|
+
completedCycles: "completed-cycles",
|
|
70
|
+
failedCycles: "failed-cycles"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
list: {
|
|
76
|
+
grid: {
|
|
77
|
+
table: {
|
|
78
|
+
wrapper: "workflows-table",
|
|
79
|
+
body: "workflows-table-body",
|
|
80
|
+
menuTrigger: "action-menu-trigger",
|
|
81
|
+
activateSwitch: "activate-switch",
|
|
82
|
+
infoButton: "info-btn",
|
|
83
|
+
workflowItem: (id) => `workflow-item-${id}`
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
view: {
|
|
87
|
+
createButton: "create-workflow-btn",
|
|
88
|
+
emptyInfo: "empty-info"
|
|
89
|
+
},
|
|
90
|
+
modals: {
|
|
91
|
+
create: {
|
|
92
|
+
wrapper: "create-workflow-modal"
|
|
93
|
+
},
|
|
94
|
+
previewTemplate: {
|
|
95
|
+
wrapper: "template-preview-modal",
|
|
96
|
+
useButton: "use-template-btn"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
home: {
|
|
100
|
+
cards: {
|
|
101
|
+
template: {
|
|
102
|
+
wrapper: "template-card"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
5
110
|
export {
|
|
6
111
|
WORKFLOWS_TEST_SELECTORS
|
|
7
112
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/platform-workflows",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Text Platform | Workflows",
|
|
5
5
|
"author": "Wojciech Dudek",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,17 +20,30 @@
|
|
|
20
20
|
"style": "./dist/index.css",
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
23
24
|
"import": "./dist/index.mjs",
|
|
24
25
|
"require": "./dist/index.js",
|
|
25
26
|
"default": "./dist/index.js"
|
|
26
27
|
},
|
|
27
|
-
"./
|
|
28
|
+
"./tests": {
|
|
29
|
+
"types": "./dist/tests.d.ts",
|
|
28
30
|
"import": "./dist/tests.mjs",
|
|
29
31
|
"require": "./dist/tests.js",
|
|
30
32
|
"default": "./dist/tests.js"
|
|
31
33
|
},
|
|
32
|
-
"./
|
|
33
|
-
|
|
34
|
+
"./constants": {
|
|
35
|
+
"types": "./dist/constants.d.ts",
|
|
36
|
+
"import": "./dist/constants.mjs",
|
|
37
|
+
"require": "./dist/constants.js",
|
|
38
|
+
"default": "./dist/constants.js"
|
|
39
|
+
},
|
|
40
|
+
"./config": {
|
|
41
|
+
"types": "./dist/config.d.ts",
|
|
42
|
+
"import": "./dist/config.mjs",
|
|
43
|
+
"require": "./dist/config.js",
|
|
44
|
+
"default": "./dist/config.js"
|
|
45
|
+
},
|
|
46
|
+
"./style.css": "./dist/index.css"
|
|
34
47
|
},
|
|
35
48
|
"files": [
|
|
36
49
|
"dist/**"
|
|
@@ -55,7 +68,7 @@
|
|
|
55
68
|
"typescript": "^5.1.6",
|
|
56
69
|
"eslint-config-custom": "0.0.11",
|
|
57
70
|
"tsconfig": "0.0.1",
|
|
58
|
-
"utils": "0.0.
|
|
71
|
+
"utils": "0.0.7"
|
|
59
72
|
},
|
|
60
73
|
"dependencies": {
|
|
61
74
|
"@amplitude/analytics-browser": "^2.11.9",
|
|
@@ -87,9 +100,9 @@
|
|
|
87
100
|
"uuid": "^9.0.1",
|
|
88
101
|
"validator": "^13.12.0",
|
|
89
102
|
"web-worker": "^1.3.0",
|
|
90
|
-
"@livechat/developer-studio-
|
|
91
|
-
"@livechat/
|
|
92
|
-
"@livechat/
|
|
103
|
+
"@livechat/developer-studio-api": "3.5.0",
|
|
104
|
+
"@livechat/developer-studio-ui-react": "2.0.0",
|
|
105
|
+
"@livechat/platform-integrations": "0.1.5"
|
|
93
106
|
},
|
|
94
107
|
"peerDependencies": {
|
|
95
108
|
"@tanstack/react-query": "4.36.1",
|
package/dist/.DS_Store
DELETED
|
Binary file
|