@livechat/platform-workflows 0.1.0 → 0.1.2
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-OHDSKF3P.mjs +193 -0
- package/dist/index.js +341 -203
- package/dist/index.mjs +293 -204
- package/dist/tests.d.mts +49 -0
- package/dist/tests.d.ts +49 -0
- package/dist/tests.js +49 -0
- package/dist/tests.mjs +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
__spreadProps,
|
|
8
8
|
__spreadValues,
|
|
9
9
|
__toESM
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OHDSKF3P.mjs";
|
|
11
11
|
|
|
12
12
|
// ../../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
|
|
13
13
|
var require_react_is_production_min = __commonJS({
|
|
@@ -9329,7 +9329,7 @@ var slackTaskTemplates = () => ({
|
|
|
9329
9329
|
},
|
|
9330
9330
|
headers: {
|
|
9331
9331
|
Accept: "application/json",
|
|
9332
|
-
// eslint-disable-next-line no-template-curly-in-string
|
|
9332
|
+
// eslint-disable-next-line no-template-curly-in-string -- on purpose
|
|
9333
9333
|
"x-cred-access-token": "${workflow.credentials.slack.access_token}"
|
|
9334
9334
|
}
|
|
9335
9335
|
})
|
|
@@ -9350,7 +9350,7 @@ var slackTaskTemplates = () => ({
|
|
|
9350
9350
|
},
|
|
9351
9351
|
headers: {
|
|
9352
9352
|
Accept: "application/json",
|
|
9353
|
-
// eslint-disable-next-line no-template-curly-in-string
|
|
9353
|
+
// eslint-disable-next-line no-template-curly-in-string -- on purpose
|
|
9354
9354
|
"x-cred-access-token": "${workflow.credentials.slack.access_token}"
|
|
9355
9355
|
}
|
|
9356
9356
|
})
|
|
@@ -9382,23 +9382,24 @@ var slackTriggerConfigs = () => {
|
|
|
9382
9382
|
},
|
|
9383
9383
|
output: {
|
|
9384
9384
|
type: "object",
|
|
9385
|
-
required: ["text", "sub_type", "channel_id"],
|
|
9386
9385
|
properties: {
|
|
9387
|
-
|
|
9388
|
-
type: "
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9386
|
+
body: {
|
|
9387
|
+
type: "object",
|
|
9388
|
+
required: ["text", "channel"],
|
|
9389
|
+
properties: {
|
|
9390
|
+
text: {
|
|
9391
|
+
type: "string",
|
|
9392
|
+
title: "Text Message"
|
|
9393
|
+
},
|
|
9394
|
+
channel: {
|
|
9395
|
+
type: "string",
|
|
9396
|
+
title: "Channel ID"
|
|
9397
|
+
},
|
|
9398
|
+
user: {
|
|
9399
|
+
type: "string",
|
|
9400
|
+
title: "ID of the user"
|
|
9401
|
+
}
|
|
9402
|
+
}
|
|
9402
9403
|
}
|
|
9403
9404
|
}
|
|
9404
9405
|
}
|
|
@@ -9427,23 +9428,24 @@ var slackTriggerConfigs = () => {
|
|
|
9427
9428
|
},
|
|
9428
9429
|
output: {
|
|
9429
9430
|
type: "object",
|
|
9430
|
-
required: ["text", "sub_type", "channel_id"],
|
|
9431
9431
|
properties: {
|
|
9432
|
-
|
|
9433
|
-
type: "
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
|
|
9432
|
+
body: {
|
|
9433
|
+
type: "object",
|
|
9434
|
+
required: ["text", "channel"],
|
|
9435
|
+
properties: {
|
|
9436
|
+
text: {
|
|
9437
|
+
type: "string",
|
|
9438
|
+
title: "Text Message"
|
|
9439
|
+
},
|
|
9440
|
+
channel: {
|
|
9441
|
+
type: "string",
|
|
9442
|
+
title: "Channel ID"
|
|
9443
|
+
},
|
|
9444
|
+
user: {
|
|
9445
|
+
type: "string",
|
|
9446
|
+
title: "ID of the user"
|
|
9447
|
+
}
|
|
9448
|
+
}
|
|
9447
9449
|
}
|
|
9448
9450
|
}
|
|
9449
9451
|
}
|
|
@@ -9461,7 +9463,7 @@ var slackTriggerTemplates = () => ({
|
|
|
9461
9463
|
channelId: null
|
|
9462
9464
|
},
|
|
9463
9465
|
headers: {
|
|
9464
|
-
// eslint-disable-next-line no-template-curly-in-string
|
|
9466
|
+
// eslint-disable-next-line no-template-curly-in-string -- on purpose
|
|
9465
9467
|
"x-adapter-slack-token": ["${workflow.credentials.slack.access_token}"]
|
|
9466
9468
|
}
|
|
9467
9469
|
}
|
|
@@ -9475,7 +9477,7 @@ var slackTriggerTemplates = () => ({
|
|
|
9475
9477
|
userId: null
|
|
9476
9478
|
},
|
|
9477
9479
|
headers: {
|
|
9478
|
-
// eslint-disable-next-line no-template-curly-in-string
|
|
9480
|
+
// eslint-disable-next-line no-template-curly-in-string -- on purpose
|
|
9479
9481
|
"x-adapter-slack-token": ["${workflow.credentials.slack.access_token}"]
|
|
9480
9482
|
}
|
|
9481
9483
|
}
|
|
@@ -12918,6 +12920,9 @@ var logAmplitudeEvent = (name, payload, user) => {
|
|
|
12918
12920
|
};
|
|
12919
12921
|
var logSprigEvent = (name, email, payload) => {
|
|
12920
12922
|
const sprig = window.Sprig;
|
|
12923
|
+
if (!sprig) {
|
|
12924
|
+
return;
|
|
12925
|
+
}
|
|
12921
12926
|
sprig("identifyAndTrack", {
|
|
12922
12927
|
eventName: name,
|
|
12923
12928
|
userId: email,
|
|
@@ -14984,6 +14989,7 @@ function WorkflowCreatorProviderBase({
|
|
|
14984
14989
|
}
|
|
14985
14990
|
replaceWorkflowId(workflowId);
|
|
14986
14991
|
}
|
|
14992
|
+
} catch (e) {
|
|
14987
14993
|
} finally {
|
|
14988
14994
|
setAction("isSaving", false);
|
|
14989
14995
|
}
|
|
@@ -15018,6 +15024,7 @@ function WorkflowCreatorProviderBase({
|
|
|
15018
15024
|
notifications.addSuccessToast(
|
|
15019
15025
|
`Workflow has been ${state2.workflow.active ? "deactivated" : "activated"}`
|
|
15020
15026
|
);
|
|
15027
|
+
} catch (e) {
|
|
15021
15028
|
} finally {
|
|
15022
15029
|
setAction("isActivating", false);
|
|
15023
15030
|
}
|
|
@@ -15037,6 +15044,7 @@ function WorkflowCreatorProviderBase({
|
|
|
15037
15044
|
}
|
|
15038
15045
|
navigate("/list");
|
|
15039
15046
|
notifications.addSuccessToast("Workflow has been removed successfully");
|
|
15047
|
+
} catch (e) {
|
|
15040
15048
|
} finally {
|
|
15041
15049
|
setAction("isRemoving", false);
|
|
15042
15050
|
}
|
|
@@ -15067,6 +15075,7 @@ function WorkflowCreatorProviderBase({
|
|
|
15067
15075
|
notifications.addSuccessToast(
|
|
15068
15076
|
"Workflow draft has been created successfully"
|
|
15069
15077
|
);
|
|
15078
|
+
} catch (e) {
|
|
15070
15079
|
} finally {
|
|
15071
15080
|
setAction("isCreating", false);
|
|
15072
15081
|
}
|
|
@@ -15111,6 +15120,7 @@ function WorkflowCreatorProviderBase({
|
|
|
15111
15120
|
notifications.addSuccessToast(
|
|
15112
15121
|
"Workflow draft has been published successfully"
|
|
15113
15122
|
);
|
|
15123
|
+
} catch (e) {
|
|
15114
15124
|
} finally {
|
|
15115
15125
|
setAction("isPublishing", false);
|
|
15116
15126
|
}
|
|
@@ -15147,6 +15157,7 @@ function WorkflowCreatorProviderBase({
|
|
|
15147
15157
|
notifications.addSuccessToast(
|
|
15148
15158
|
"Workflow draft has been discarded successfully"
|
|
15149
15159
|
);
|
|
15160
|
+
} catch (e) {
|
|
15150
15161
|
} finally {
|
|
15151
15162
|
setAction("isDiscarding", false);
|
|
15152
15163
|
}
|
|
@@ -23376,25 +23387,38 @@ function WorkflowExecutionList({
|
|
|
23376
23387
|
/* @__PURE__ */ jsx4("th", { children: "End date" }),
|
|
23377
23388
|
/* @__PURE__ */ jsx4("th", { children: "Completion" })
|
|
23378
23389
|
] }) }),
|
|
23379
|
-
/* @__PURE__ */ jsx4("tbody", { children: ((_a = workflowExecutions.data) == null ? void 0 : _a.length) ? workflowExecutions.data.map((execution) => /* @__PURE__ */ jsxs2(
|
|
23380
|
-
|
|
23381
|
-
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23390
|
+
/* @__PURE__ */ jsx4("tbody", { children: ((_a = workflowExecutions.data) == null ? void 0 : _a.length) ? workflowExecutions.data.map((execution) => /* @__PURE__ */ jsxs2(
|
|
23391
|
+
"tr",
|
|
23392
|
+
{
|
|
23393
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.creator.panels.details.executions.list.row,
|
|
23394
|
+
children: [
|
|
23395
|
+
/* @__PURE__ */ jsx4("td", { children: formatUSADate(execution.started_at) }),
|
|
23396
|
+
/* @__PURE__ */ jsx4("td", { children: formatUSADate(execution.ended_at) }),
|
|
23397
|
+
/* @__PURE__ */ jsx4(
|
|
23398
|
+
"td",
|
|
23388
23399
|
{
|
|
23389
|
-
|
|
23390
|
-
|
|
23400
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.creator.panels.details.executions.list.status,
|
|
23401
|
+
children: /* @__PURE__ */ jsx4(
|
|
23402
|
+
Tag2,
|
|
23403
|
+
{
|
|
23404
|
+
kind: execution.status === WorkflowExecutionStatus.Completed ? "success" : "error",
|
|
23405
|
+
leftNode: /* @__PURE__ */ jsx4(
|
|
23406
|
+
Icon27,
|
|
23407
|
+
{
|
|
23408
|
+
size: "small",
|
|
23409
|
+
source: execution.status === WorkflowExecutionStatus.Completed ? CheckCircle2 : CloseCircle2
|
|
23410
|
+
}
|
|
23411
|
+
),
|
|
23412
|
+
size: "small",
|
|
23413
|
+
children: execution.status
|
|
23414
|
+
}
|
|
23415
|
+
)
|
|
23391
23416
|
}
|
|
23392
|
-
)
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
] }, execution.id)) : /* @__PURE__ */ jsx4("tr", { children: /* @__PURE__ */ jsx4("td", { align: "center", colSpan: 4, children: "No executions" }) }) })
|
|
23417
|
+
)
|
|
23418
|
+
]
|
|
23419
|
+
},
|
|
23420
|
+
execution.id
|
|
23421
|
+
)) : /* @__PURE__ */ jsx4("tr", { children: /* @__PURE__ */ jsx4("td", { align: "center", colSpan: 4, children: "No executions" }) }) })
|
|
23398
23422
|
] }) });
|
|
23399
23423
|
}
|
|
23400
23424
|
var List_default = WorkflowExecutionList;
|
|
@@ -23439,11 +23463,27 @@ function WorkflowDetailsInfo({
|
|
|
23439
23463
|
return /* @__PURE__ */ jsxs2(Column12, { gap: 8, setColumnPadding: "0 2rem 0", children: [
|
|
23440
23464
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
23441
23465
|
/* @__PURE__ */ jsx4(Label, { children: "Date created" }),
|
|
23442
|
-
/* @__PURE__ */ jsx4(
|
|
23466
|
+
/* @__PURE__ */ jsx4(
|
|
23467
|
+
Text15,
|
|
23468
|
+
{
|
|
23469
|
+
as: "div",
|
|
23470
|
+
bold: true,
|
|
23471
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.creator.panels.details.info.dateCreated,
|
|
23472
|
+
children: formatUSADate2(workflow.data.created_at)
|
|
23473
|
+
}
|
|
23474
|
+
)
|
|
23443
23475
|
] }),
|
|
23444
23476
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
23445
23477
|
/* @__PURE__ */ jsx4(Label, { children: "Last modified" }),
|
|
23446
|
-
/* @__PURE__ */ jsx4(
|
|
23478
|
+
/* @__PURE__ */ jsx4(
|
|
23479
|
+
Text15,
|
|
23480
|
+
{
|
|
23481
|
+
as: "div",
|
|
23482
|
+
bold: true,
|
|
23483
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.creator.panels.details.info.dateUpdated,
|
|
23484
|
+
children: formatUSADate2(workflow.data.updated_at || workflow.data.created_at)
|
|
23485
|
+
}
|
|
23486
|
+
)
|
|
23447
23487
|
] }),
|
|
23448
23488
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
23449
23489
|
/* @__PURE__ */ jsx4(Label, { children: "Created by" }),
|
|
@@ -23451,11 +23491,27 @@ function WorkflowDetailsInfo({
|
|
|
23451
23491
|
] }),
|
|
23452
23492
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
23453
23493
|
/* @__PURE__ */ jsx4(Label, { children: "Completed cycles" }),
|
|
23454
|
-
/* @__PURE__ */ jsx4(
|
|
23494
|
+
/* @__PURE__ */ jsx4(
|
|
23495
|
+
Text15,
|
|
23496
|
+
{
|
|
23497
|
+
as: "div",
|
|
23498
|
+
bold: true,
|
|
23499
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.creator.panels.details.info.completedCycles,
|
|
23500
|
+
children: completedCycles
|
|
23501
|
+
}
|
|
23502
|
+
)
|
|
23455
23503
|
] }),
|
|
23456
23504
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
23457
23505
|
/* @__PURE__ */ jsx4(Label, { children: "Failed cycles" }),
|
|
23458
|
-
/* @__PURE__ */ jsx4(
|
|
23506
|
+
/* @__PURE__ */ jsx4(
|
|
23507
|
+
Text15,
|
|
23508
|
+
{
|
|
23509
|
+
as: "div",
|
|
23510
|
+
bold: true,
|
|
23511
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.creator.panels.details.info.failedCycles,
|
|
23512
|
+
children: failedCycles
|
|
23513
|
+
}
|
|
23514
|
+
)
|
|
23459
23515
|
] }),
|
|
23460
23516
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
23461
23517
|
/* @__PURE__ */ jsx4(Label, { children: "Tasks" }),
|
|
@@ -23560,6 +23616,7 @@ function WorkflowDetailsPanel({
|
|
|
23560
23616
|
/* @__PURE__ */ jsx4(
|
|
23561
23617
|
Tab2,
|
|
23562
23618
|
{
|
|
23619
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.creator.panels.details.panel.historyTab,
|
|
23563
23620
|
isSelected: tab === "executions",
|
|
23564
23621
|
onClick: () => {
|
|
23565
23622
|
navigate("../executions", { replace: true, relative: "route" });
|
|
@@ -24574,6 +24631,7 @@ function WorkflowTemplatePreviewModal({
|
|
|
24574
24631
|
return /* @__PURE__ */ jsx4(
|
|
24575
24632
|
Modal8,
|
|
24576
24633
|
{
|
|
24634
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.list.modals.previewTemplate.wrapper,
|
|
24577
24635
|
footer: /* @__PURE__ */ jsxs2(Row19, { flexEnd: true, gap: `var(${SpacingToken36.Spacing3})`, notPadded: true, children: [
|
|
24578
24636
|
/* @__PURE__ */ jsx4(
|
|
24579
24637
|
Button29,
|
|
@@ -24590,6 +24648,7 @@ function WorkflowTemplatePreviewModal({
|
|
|
24590
24648
|
/* @__PURE__ */ jsx4(
|
|
24591
24649
|
Button29,
|
|
24592
24650
|
{
|
|
24651
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.list.modals.previewTemplate.useButton,
|
|
24593
24652
|
disabled: isSaving,
|
|
24594
24653
|
kind: "primary",
|
|
24595
24654
|
loading: isSaving,
|
|
@@ -24941,6 +25000,7 @@ function WorkflowTemplateCard({
|
|
|
24941
25000
|
Card3,
|
|
24942
25001
|
{
|
|
24943
25002
|
border: true,
|
|
25003
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.list.home.cards.template.wrapper,
|
|
24944
25004
|
height: "100%",
|
|
24945
25005
|
marginLeft: false,
|
|
24946
25006
|
noBackground: true,
|
|
@@ -25104,6 +25164,7 @@ function WorkflowCreateModal({ onClose }) {
|
|
|
25104
25164
|
width: min(100% - 4rem, 60rem);
|
|
25105
25165
|
overflow-y: auto;
|
|
25106
25166
|
`,
|
|
25167
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.list.modals.create.wrapper,
|
|
25107
25168
|
heading: /* @__PURE__ */ jsx4(ModalHeader6, { title: "Create a workflow" }),
|
|
25108
25169
|
onClose: handleClose,
|
|
25109
25170
|
children: /* @__PURE__ */ jsx4(Home_default, { basePath: "create/", isOnModal: true })
|
|
@@ -25353,20 +25414,30 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
25353
25414
|
},
|
|
25354
25415
|
[navigate]
|
|
25355
25416
|
);
|
|
25356
|
-
return /* @__PURE__ */ jsxs2(
|
|
25357
|
-
|
|
25358
|
-
|
|
25359
|
-
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
|
|
25363
|
-
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
|
|
25367
|
-
|
|
25368
|
-
|
|
25369
|
-
|
|
25417
|
+
return /* @__PURE__ */ jsxs2(
|
|
25418
|
+
Table,
|
|
25419
|
+
{
|
|
25420
|
+
"data-testId": WORKFLOWS_TEST_SELECTORS.views.workflows.list.grid.table.wrapper,
|
|
25421
|
+
flowTable: true,
|
|
25422
|
+
loading: workflowsQuery.isLoading,
|
|
25423
|
+
children: [
|
|
25424
|
+
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
25425
|
+
/* @__PURE__ */ jsx4("th", { children: "Name" }),
|
|
25426
|
+
/* @__PURE__ */ jsx4("th", { children: "Tasks" }),
|
|
25427
|
+
/* @__PURE__ */ jsx4("th", { children: "Status" }),
|
|
25428
|
+
/* @__PURE__ */ jsx4("th", {}),
|
|
25429
|
+
/* @__PURE__ */ jsx4("th", {})
|
|
25430
|
+
] }) }),
|
|
25431
|
+
/* @__PURE__ */ jsx4(
|
|
25432
|
+
"tbody",
|
|
25433
|
+
{
|
|
25434
|
+
"data-testId": WORKFLOWS_TEST_SELECTORS.views.workflows.list.grid.table.body,
|
|
25435
|
+
children: workflowsQuery.isSuccess && filteredWorkflows.length > 0 ? filteredWorkflows.map((workflow) => {
|
|
25436
|
+
var _a2, _b2, _c2, _d;
|
|
25437
|
+
return /* @__PURE__ */ jsxs2(
|
|
25438
|
+
"tr",
|
|
25439
|
+
{
|
|
25440
|
+
css: css`
|
|
25370
25441
|
transition: background 0.2s;
|
|
25371
25442
|
cursor: pointer;
|
|
25372
25443
|
|
|
@@ -25374,131 +25445,141 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
25374
25445
|
background: var(${DesignToken45.SurfacePrimaryHover});
|
|
25375
25446
|
}
|
|
25376
25447
|
`,
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
|
|
25448
|
+
"data-testId": WORKFLOWS_TEST_SELECTORS.views.workflows.list.grid.table.workflowItem(
|
|
25449
|
+
workflow.id
|
|
25450
|
+
),
|
|
25451
|
+
onClick: () => {
|
|
25452
|
+
handleSelect(workflow);
|
|
25453
|
+
},
|
|
25454
|
+
children: [
|
|
25455
|
+
/* @__PURE__ */ jsx4("td", { width: "45%", children: /* @__PURE__ */ jsxs2(Row25, { gap: `var(${SpacingToken43.Spacing2})`, noWrap: true, notPadded: true, children: [
|
|
25456
|
+
/* @__PURE__ */ jsx4(Text20, { noMargin: true, size: "sm", children: workflow.name }),
|
|
25457
|
+
workflow.related_workflow_id ? /* @__PURE__ */ jsx4(
|
|
25458
|
+
Tag4,
|
|
25459
|
+
{
|
|
25460
|
+
css: css`
|
|
25387
25461
|
color: #68afff;
|
|
25388
25462
|
flex-shrink: 0;
|
|
25389
25463
|
`,
|
|
25390
|
-
|
|
25391
|
-
|
|
25392
|
-
|
|
25393
|
-
|
|
25394
|
-
|
|
25395
|
-
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
|
|
25399
|
-
|
|
25400
|
-
|
|
25401
|
-
|
|
25402
|
-
|
|
25403
|
-
|
|
25404
|
-
|
|
25405
|
-
|
|
25406
|
-
|
|
25407
|
-
|
|
25408
|
-
|
|
25409
|
-
|
|
25410
|
-
|
|
25411
|
-
|
|
25412
|
-
|
|
25413
|
-
|
|
25414
|
-
|
|
25415
|
-
|
|
25416
|
-
|
|
25417
|
-
|
|
25418
|
-
|
|
25464
|
+
kind: "info",
|
|
25465
|
+
size: "small",
|
|
25466
|
+
children: "Has Draft"
|
|
25467
|
+
}
|
|
25468
|
+
) : null
|
|
25469
|
+
] }) }),
|
|
25470
|
+
/* @__PURE__ */ jsx4("td", { width: "40%", children: /* @__PURE__ */ jsx4(Row25, { gap: 12, notPadded: true, children: (_a2 = workflow.tags) == null ? void 0 : _a2.map((tag) => {
|
|
25471
|
+
const revertIconColor = getWorkflowsEnv("isHeadless") && (tag.toLowerCase() === "openai" || tag.toLowerCase() === IntegrationNames20.BigCommerce.toLowerCase());
|
|
25472
|
+
return /* @__PURE__ */ jsx4(
|
|
25473
|
+
ProductIcon_default,
|
|
25474
|
+
{
|
|
25475
|
+
center: true,
|
|
25476
|
+
height: 4,
|
|
25477
|
+
product: tag.toLowerCase(),
|
|
25478
|
+
revertColors: revertIconColor,
|
|
25479
|
+
width: 4
|
|
25480
|
+
},
|
|
25481
|
+
tag
|
|
25482
|
+
);
|
|
25483
|
+
}) }) }),
|
|
25484
|
+
/* @__PURE__ */ jsx4("td", { children: /* @__PURE__ */ jsx4(
|
|
25485
|
+
Tooltip9,
|
|
25486
|
+
{
|
|
25487
|
+
triggerClassName: "tooltip-trigger",
|
|
25488
|
+
triggerOnHover: true,
|
|
25489
|
+
triggerRenderer: /* @__PURE__ */ jsx4(StopPropagation, { children: /* @__PURE__ */ jsx4(
|
|
25490
|
+
Switch2,
|
|
25491
|
+
{
|
|
25492
|
+
css: css`
|
|
25419
25493
|
vertical-align: bottom;
|
|
25420
25494
|
`,
|
|
25421
|
-
|
|
25422
|
-
|
|
25423
|
-
|
|
25424
|
-
|
|
25425
|
-
|
|
25426
|
-
|
|
25427
|
-
|
|
25428
|
-
|
|
25429
|
-
|
|
25430
|
-
|
|
25431
|
-
|
|
25432
|
-
|
|
25433
|
-
|
|
25434
|
-
|
|
25435
|
-
icon: /* @__PURE__ */ jsx4(Icon39, { source: Info2 }),
|
|
25436
|
-
kind: "plain",
|
|
25437
|
-
onClick: (e) => {
|
|
25438
|
-
e.stopPropagation();
|
|
25439
|
-
handleShowDetails(workflow);
|
|
25440
|
-
}
|
|
25441
|
-
}
|
|
25442
|
-
) }),
|
|
25443
|
-
/* @__PURE__ */ jsx4("td", { align: "right", children: /* @__PURE__ */ jsx4(StopPropagation, { children: /* @__PURE__ */ jsx4(
|
|
25444
|
-
ActionMenu6,
|
|
25445
|
-
{
|
|
25446
|
-
options: [
|
|
25447
|
-
{
|
|
25448
|
-
key: "run",
|
|
25449
|
-
element: /* @__PURE__ */ jsx4(
|
|
25450
|
-
ActionMenuItem2,
|
|
25495
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.list.grid.table.activateSwitch,
|
|
25496
|
+
on: (_b2 = workflow.active) != null ? _b2 : false,
|
|
25497
|
+
onChange: (e) => {
|
|
25498
|
+
e.stopPropagation();
|
|
25499
|
+
void handleActivate(workflow);
|
|
25500
|
+
},
|
|
25501
|
+
state: activateWorkflowAction.isLoading && ((_c2 = activateWorkflowAction.variables) == null ? void 0 : _c2.id) === workflow.id ? "loading" : workflow.draft ? "locked" : "regular"
|
|
25502
|
+
}
|
|
25503
|
+
) }),
|
|
25504
|
+
children: workflow.draft ? "Publish the draft to activate this workflow" : workflow.active ? "Deactivate flow" : "Activate flow"
|
|
25505
|
+
}
|
|
25506
|
+
) }),
|
|
25507
|
+
/* @__PURE__ */ jsx4("td", { children: !workflow.draft && /* @__PURE__ */ jsx4(
|
|
25508
|
+
Button34,
|
|
25451
25509
|
{
|
|
25452
|
-
|
|
25453
|
-
|
|
25510
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.list.grid.table.infoButton,
|
|
25511
|
+
icon: /* @__PURE__ */ jsx4(Icon39, { source: Info2 }),
|
|
25512
|
+
kind: "plain",
|
|
25513
|
+
onClick: (e) => {
|
|
25514
|
+
e.stopPropagation();
|
|
25515
|
+
handleShowDetails(workflow);
|
|
25516
|
+
}
|
|
25454
25517
|
}
|
|
25455
|
-
),
|
|
25456
|
-
|
|
25457
|
-
|
|
25458
|
-
|
|
25459
|
-
|
|
25460
|
-
|
|
25461
|
-
|
|
25462
|
-
|
|
25463
|
-
|
|
25464
|
-
|
|
25465
|
-
|
|
25466
|
-
|
|
25467
|
-
|
|
25468
|
-
|
|
25469
|
-
|
|
25470
|
-
|
|
25471
|
-
|
|
25472
|
-
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
|
|
25477
|
-
|
|
25478
|
-
|
|
25479
|
-
|
|
25480
|
-
|
|
25481
|
-
|
|
25482
|
-
|
|
25483
|
-
|
|
25484
|
-
|
|
25485
|
-
|
|
25486
|
-
|
|
25518
|
+
) }),
|
|
25519
|
+
/* @__PURE__ */ jsx4("td", { align: "right", children: /* @__PURE__ */ jsx4(StopPropagation, { children: /* @__PURE__ */ jsx4(
|
|
25520
|
+
ActionMenu6,
|
|
25521
|
+
{
|
|
25522
|
+
options: [
|
|
25523
|
+
{
|
|
25524
|
+
key: "run",
|
|
25525
|
+
element: /* @__PURE__ */ jsx4(
|
|
25526
|
+
ActionMenuItem2,
|
|
25527
|
+
{
|
|
25528
|
+
leftNode: /* @__PURE__ */ jsx4(Icon39, { source: PlayArrow }),
|
|
25529
|
+
children: "Trigger manually"
|
|
25530
|
+
}
|
|
25531
|
+
),
|
|
25532
|
+
onClick: () => {
|
|
25533
|
+
navigate(`/${workflow.id}/execute`);
|
|
25534
|
+
}
|
|
25535
|
+
},
|
|
25536
|
+
{
|
|
25537
|
+
key: "delete",
|
|
25538
|
+
element: /* @__PURE__ */ jsx4(ActionMenuItem2, { leftNode: /* @__PURE__ */ jsx4(Icon39, { source: Delete3 }), children: "Delete" }),
|
|
25539
|
+
onClick: () => {
|
|
25540
|
+
void handleDelete(workflow);
|
|
25541
|
+
}
|
|
25542
|
+
}
|
|
25543
|
+
],
|
|
25544
|
+
triggerRenderer: /* @__PURE__ */ jsx4(
|
|
25545
|
+
Button34,
|
|
25546
|
+
{
|
|
25547
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.list.grid.table.menuTrigger,
|
|
25548
|
+
icon: /* @__PURE__ */ jsx4(Icon39, { source: MoreHoriz2 }),
|
|
25549
|
+
kind: "text",
|
|
25550
|
+
loading: deleteAction.isLoading ? ((_d = deleteAction.variables) == null ? void 0 : _d.id) === workflow.id : void 0,
|
|
25551
|
+
size: "compact"
|
|
25552
|
+
}
|
|
25553
|
+
)
|
|
25554
|
+
}
|
|
25555
|
+
) }) })
|
|
25556
|
+
]
|
|
25557
|
+
},
|
|
25558
|
+
workflow.id
|
|
25559
|
+
);
|
|
25560
|
+
}) : workflowsQuery.isLoading ? /* @__PURE__ */ jsx4("tr", { children: /* @__PURE__ */ jsx4("td", { align: "center", colSpan: 6, children: /* @__PURE__ */ jsx4(Loader4, { size: "medium" }) }) }) : /* @__PURE__ */ jsx4(
|
|
25561
|
+
"tr",
|
|
25562
|
+
{
|
|
25563
|
+
css: css`
|
|
25487
25564
|
background: transparent !important;
|
|
25488
25565
|
color: var(${DesignToken45.ContentBasicSecondary});
|
|
25489
25566
|
`,
|
|
25490
|
-
|
|
25491
|
-
|
|
25492
|
-
|
|
25493
|
-
|
|
25494
|
-
|
|
25495
|
-
|
|
25496
|
-
|
|
25497
|
-
|
|
25498
|
-
|
|
25499
|
-
|
|
25500
|
-
|
|
25501
|
-
|
|
25567
|
+
children: /* @__PURE__ */ jsx4("td", { align: "left", colSpan: 6, children: /* @__PURE__ */ jsxs2(Text20, { as: "div", size: "md", children: [
|
|
25568
|
+
"There are no",
|
|
25569
|
+
" ",
|
|
25570
|
+
state.filters.status !== "All" && state.filters.status.toLowerCase(),
|
|
25571
|
+
" ",
|
|
25572
|
+
"workflows",
|
|
25573
|
+
" ",
|
|
25574
|
+
((_c = (_b = state.params) == null ? void 0 : _b.name) == null ? void 0 : _c.value) ? `with "${state.params.name.value}" in the name` : null
|
|
25575
|
+
] }) })
|
|
25576
|
+
}
|
|
25577
|
+
)
|
|
25578
|
+
}
|
|
25579
|
+
)
|
|
25580
|
+
]
|
|
25581
|
+
}
|
|
25582
|
+
);
|
|
25502
25583
|
}
|
|
25503
25584
|
var Table_default = WorkflowsTable;
|
|
25504
25585
|
|
|
@@ -25582,28 +25663,35 @@ function WorkflowListView() {
|
|
|
25582
25663
|
return /* @__PURE__ */ jsxs2(View3, { center: hasNoData, noWrap: true, stretch: isLoading, children: [
|
|
25583
25664
|
getWorkflowsEnv("isLiveChatMode") ? /* @__PURE__ */ jsx4(Row26, { noMaxWidth: true, notPadded: true, children: /* @__PURE__ */ jsx4(LiveChatNavbar_default, {}) }) : null,
|
|
25584
25665
|
/* @__PURE__ */ jsxs2(Row26, { topMargin: true, verticalCenter: hasNoData, children: [
|
|
25585
|
-
/* @__PURE__ */ jsx4(Column18, { width: hasNoData ? 10 : 8, children: hasNoData ? /* @__PURE__ */ jsx4(
|
|
25586
|
-
|
|
25666
|
+
/* @__PURE__ */ jsx4(Column18, { width: hasNoData ? 10 : 8, children: hasNoData ? /* @__PURE__ */ jsx4(
|
|
25667
|
+
Row26,
|
|
25587
25668
|
{
|
|
25588
|
-
|
|
25589
|
-
|
|
25590
|
-
|
|
25591
|
-
|
|
25669
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.list.view.emptyInfo,
|
|
25670
|
+
notPadded: true,
|
|
25671
|
+
children: /* @__PURE__ */ jsx4(
|
|
25672
|
+
Intro4,
|
|
25592
25673
|
{
|
|
25674
|
+
body: "Automate your work with an app integration platform. Use AI to quicken the process. Enjoy a simple, no-code setup to streamline tasks you would otherwise do manually.",
|
|
25593
25675
|
center: true,
|
|
25594
|
-
|
|
25595
|
-
|
|
25596
|
-
|
|
25597
|
-
|
|
25598
|
-
|
|
25599
|
-
|
|
25600
|
-
|
|
25676
|
+
header: /* @__PURE__ */ jsx4(Column18, { notPadded: true, stretch: true, children: /* @__PURE__ */ jsxs2(
|
|
25677
|
+
Row26,
|
|
25678
|
+
{
|
|
25679
|
+
center: true,
|
|
25680
|
+
gap: `var(${SpacingToken44.Spacing2})`,
|
|
25681
|
+
notPadded: true,
|
|
25682
|
+
verticalCenter: true,
|
|
25683
|
+
children: [
|
|
25684
|
+
"Welcome to ",
|
|
25685
|
+
/* @__PURE__ */ jsx4("span", { css: markedStyles, children: "Workflows" })
|
|
25686
|
+
]
|
|
25687
|
+
}
|
|
25688
|
+
) }),
|
|
25689
|
+
noMaxWidth: true,
|
|
25690
|
+
style: { maxWidth: "38rem" }
|
|
25601
25691
|
}
|
|
25602
|
-
)
|
|
25603
|
-
noMaxWidth: true,
|
|
25604
|
-
style: { maxWidth: "38rem" }
|
|
25692
|
+
)
|
|
25605
25693
|
}
|
|
25606
|
-
)
|
|
25694
|
+
) : /* @__PURE__ */ jsx4(
|
|
25607
25695
|
Intro4,
|
|
25608
25696
|
{
|
|
25609
25697
|
body: "Create custom workflows to automate your work.",
|
|
@@ -25614,6 +25702,7 @@ function WorkflowListView() {
|
|
|
25614
25702
|
hasData && !getWorkflowsEnv("isHeadless") ? /* @__PURE__ */ jsx4(Column18, { pullRight: true, children: /* @__PURE__ */ jsx4(
|
|
25615
25703
|
Button35,
|
|
25616
25704
|
{
|
|
25705
|
+
"data-testid": WORKFLOWS_TEST_SELECTORS.views.workflows.list.view.createButton,
|
|
25617
25706
|
kind: "primary",
|
|
25618
25707
|
onClick: () => {
|
|
25619
25708
|
navigate("create");
|