@livechat/platform-workflows 0.0.81 → 0.0.82
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +205 -135
- package/dist/index.mjs +171 -95
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -490,7 +490,7 @@ var getWorkflowsEnv = (key) => {
|
|
|
490
490
|
};
|
|
491
491
|
|
|
492
492
|
// src/views/index.tsx
|
|
493
|
-
var
|
|
493
|
+
var import_react_router_dom29 = require("react-router-dom");
|
|
494
494
|
|
|
495
495
|
// src/views/Waitlist/index.tsx
|
|
496
496
|
var import_react3 = require("react");
|
|
@@ -2302,8 +2302,8 @@ function Waitlist({ image }) {
|
|
|
2302
2302
|
var Waitlist_default = Waitlist;
|
|
2303
2303
|
|
|
2304
2304
|
// src/views/Workflows/index.tsx
|
|
2305
|
-
var
|
|
2306
|
-
var
|
|
2305
|
+
var import_react108 = require("react");
|
|
2306
|
+
var import_react_router_dom28 = require("react-router-dom");
|
|
2307
2307
|
var import_developer_studio_ui_react46 = require("@livechat/developer-studio-ui-react");
|
|
2308
2308
|
|
|
2309
2309
|
// src/views/Workflows/Creator/index.tsx
|
|
@@ -11923,7 +11923,7 @@ function OneMessagesProvider({ children }) {
|
|
|
11923
11923
|
const generateAiResponseMutation = useGenerateAIResponse();
|
|
11924
11924
|
const { user } = (0, import_developer_studio_ui_react4.useUserContext)();
|
|
11925
11925
|
const isLoading = generateAiResponseMutation.isLoading;
|
|
11926
|
-
const
|
|
11926
|
+
const sendMessage2 = (message) => __async(this, null, function* () {
|
|
11927
11927
|
setIsError(null);
|
|
11928
11928
|
setEvents((prevEvents) => [
|
|
11929
11929
|
...prevEvents,
|
|
@@ -11985,7 +11985,7 @@ function OneMessagesProvider({ children }) {
|
|
|
11985
11985
|
isError,
|
|
11986
11986
|
groupedEvents: eventsGroup,
|
|
11987
11987
|
hasAdditionalEvents,
|
|
11988
|
-
sendMessage
|
|
11988
|
+
sendMessage: sendMessage2
|
|
11989
11989
|
},
|
|
11990
11990
|
children
|
|
11991
11991
|
}
|
|
@@ -16186,7 +16186,7 @@ function CustomTagsField({
|
|
|
16186
16186
|
error,
|
|
16187
16187
|
trim: trim2,
|
|
16188
16188
|
disabled,
|
|
16189
|
-
wrapperCss:
|
|
16189
|
+
wrapperCss: wrapperCss3,
|
|
16190
16190
|
onChange
|
|
16191
16191
|
}) {
|
|
16192
16192
|
const wrapperRef = (0, import_react33.useRef)(null);
|
|
@@ -16194,7 +16194,7 @@ function CustomTagsField({
|
|
|
16194
16194
|
(0, import_developer_studio_ui_react15.useOnClickOutside)(wrapperRef, () => {
|
|
16195
16195
|
setIsPickerVisible(false);
|
|
16196
16196
|
});
|
|
16197
|
-
return /* @__PURE__ */ jsx4("div", { css:
|
|
16197
|
+
return /* @__PURE__ */ jsx4("div", { css: wrapperCss3, ref: wrapperRef, children: /* @__PURE__ */ jsx4(
|
|
16198
16198
|
CustomTagsInput,
|
|
16199
16199
|
{
|
|
16200
16200
|
context,
|
|
@@ -18651,16 +18651,16 @@ var import_LexicalComposerContext2 = require("@lexical/react/LexicalComposerCont
|
|
|
18651
18651
|
var import_lexical = require("lexical");
|
|
18652
18652
|
var useSendOneMessage = () => {
|
|
18653
18653
|
const [editor] = (0, import_LexicalComposerContext2.useLexicalComposerContext)();
|
|
18654
|
-
const { sendMessage } = (0, import_react61.useContext)(OneMessagesContext);
|
|
18654
|
+
const { sendMessage: sendMessage2 } = (0, import_react61.useContext)(OneMessagesContext);
|
|
18655
18655
|
const onSend = (0, import_react61.useCallback)(() => {
|
|
18656
18656
|
var _a;
|
|
18657
18657
|
const messageToSend = (_a = editor.getRootElement()) == null ? void 0 : _a.innerText.trim();
|
|
18658
18658
|
if (!messageToSend) {
|
|
18659
18659
|
return;
|
|
18660
18660
|
}
|
|
18661
|
-
|
|
18661
|
+
sendMessage2(messageToSend);
|
|
18662
18662
|
editor.dispatchCommand(import_lexical.CLEAR_EDITOR_COMMAND, void 0);
|
|
18663
|
-
}, [editor,
|
|
18663
|
+
}, [editor, sendMessage2]);
|
|
18664
18664
|
return onSend;
|
|
18665
18665
|
};
|
|
18666
18666
|
|
|
@@ -21097,9 +21097,16 @@ function PublishWorkflowModal({
|
|
|
21097
21097
|
}
|
|
21098
21098
|
|
|
21099
21099
|
// src/views/Workflows/Creator/View.tsx
|
|
21100
|
+
var import_react91 = require("react");
|
|
21100
21101
|
var import_react_router_dom16 = require("react-router-dom");
|
|
21102
|
+
var import_reactflow17 = require("reactflow");
|
|
21101
21103
|
var import_design_system_react_components69 = require("@livechat/design-system-react-components");
|
|
21102
21104
|
|
|
21105
|
+
// src/utils/sendMessage.ts
|
|
21106
|
+
var sendMessage = (type) => {
|
|
21107
|
+
window.parent.postMessage({ type }, "*");
|
|
21108
|
+
};
|
|
21109
|
+
|
|
21103
21110
|
// src/views/Workflows/Creator/Panels/Details/index.tsx
|
|
21104
21111
|
var import_react_router_dom13 = require("react-router-dom");
|
|
21105
21112
|
|
|
@@ -21774,42 +21781,25 @@ function WorkflowCreatorNavbar() {
|
|
|
21774
21781
|
borderBottom: true,
|
|
21775
21782
|
center: true,
|
|
21776
21783
|
css: css`
|
|
21777
|
-
min-height:
|
|
21784
|
+
min-height: var(${import_design_system_react_components68.SpacingToken.Spacing14});
|
|
21785
|
+
padding-left: var(${import_design_system_react_components68.SpacingToken.Spacing4});
|
|
21778
21786
|
`,
|
|
21779
21787
|
flexEnd: true,
|
|
21780
21788
|
lowMargin: true,
|
|
21781
|
-
lowPadding: true,
|
|
21782
21789
|
noMaxWidth: true,
|
|
21783
21790
|
noWrap: true,
|
|
21784
21791
|
notPadded: true,
|
|
21785
|
-
paddingLeft: true,
|
|
21786
21792
|
spaceBetween: true,
|
|
21787
21793
|
children: [
|
|
21788
|
-
getWorkflowsEnv("
|
|
21794
|
+
getWorkflowsEnv("isLiveChatMode") && /* @__PURE__ */ jsx4(
|
|
21789
21795
|
import_design_system_react_components68.Button,
|
|
21790
21796
|
{
|
|
21791
|
-
|
|
21792
|
-
|
|
21793
|
-
text-decoration: none;
|
|
21794
|
-
`,
|
|
21795
|
-
kind: "text",
|
|
21797
|
+
icon: /* @__PURE__ */ jsx4(import_design_system_react_components68.Icon, { source: import_design_system_icons32.Close }),
|
|
21798
|
+
kind: "plain",
|
|
21796
21799
|
onClick: () => {
|
|
21797
21800
|
navigate("/workflow/list");
|
|
21798
|
-
|
|
21799
|
-
|
|
21800
|
-
/* @__PURE__ */ jsx4(
|
|
21801
|
-
import_design_system_react_components68.Icon,
|
|
21802
|
-
{
|
|
21803
|
-
css: css`
|
|
21804
|
-
min-height: var(${import_design_system_react_components68.SpacingToken.Spacing8});
|
|
21805
|
-
min-width: var(${import_design_system_react_components68.SpacingToken.Spacing8});
|
|
21806
|
-
`,
|
|
21807
|
-
size: "large",
|
|
21808
|
-
source: import_design_system_icons32.ArrowBarLeft
|
|
21809
|
-
}
|
|
21810
|
-
),
|
|
21811
|
-
"Workflows"
|
|
21812
|
-
] })
|
|
21801
|
+
sendMessage("openSideNav" /* OpenSideNav */);
|
|
21802
|
+
}
|
|
21813
21803
|
}
|
|
21814
21804
|
),
|
|
21815
21805
|
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react33.Row, { center: true, noMaxWidth: true, setRowPadding: "4px 16px", spaceBetween: true, children: [
|
|
@@ -21995,6 +21985,22 @@ function WorkflowCreatorView() {
|
|
|
21995
21985
|
state: { selection },
|
|
21996
21986
|
focus
|
|
21997
21987
|
} = useWorkflowCreator();
|
|
21988
|
+
const { fitView } = (0, import_reactflow17.useReactFlow)();
|
|
21989
|
+
(0, import_react91.useEffect)(() => {
|
|
21990
|
+
if (getWorkflowsEnv("isLiveChatMode")) {
|
|
21991
|
+
sendMessage("closeSideNav" /* CloseSideNav */);
|
|
21992
|
+
const timeoutId = setTimeout(() => {
|
|
21993
|
+
fitView({
|
|
21994
|
+
duration: 400,
|
|
21995
|
+
maxZoom: 1.15,
|
|
21996
|
+
minZoom: 1.15
|
|
21997
|
+
});
|
|
21998
|
+
}, 200);
|
|
21999
|
+
return () => {
|
|
22000
|
+
clearTimeout(timeoutId);
|
|
22001
|
+
};
|
|
22002
|
+
}
|
|
22003
|
+
}, [fitView]);
|
|
21998
22004
|
return /* @__PURE__ */ jsxs2(View2, { children: [
|
|
21999
22005
|
/* @__PURE__ */ jsx4(Navbar_default, {}),
|
|
22000
22006
|
/* @__PURE__ */ jsxs2(WorkflowCreatorContent, { grayBackground: getWorkflowsEnv("isHeadless"), children: [
|
|
@@ -22155,18 +22161,18 @@ function WorkflowCreator() {
|
|
|
22155
22161
|
var Creator_default = WorkflowCreator;
|
|
22156
22162
|
|
|
22157
22163
|
// src/views/Workflows/List/index.tsx
|
|
22158
|
-
var
|
|
22164
|
+
var import_react_router_dom27 = require("react-router-dom");
|
|
22159
22165
|
var import_developer_studio_ui_react45 = require("@livechat/developer-studio-ui-react");
|
|
22160
22166
|
|
|
22161
22167
|
// src/views/Workflows/List/Modals/Create/index.tsx
|
|
22162
22168
|
var import_react_router_dom23 = require("react-router-dom");
|
|
22163
22169
|
|
|
22164
22170
|
// src/views/Workflows/List/Modals/PreviewTemplate/index.tsx
|
|
22165
|
-
var
|
|
22171
|
+
var import_react94 = require("react");
|
|
22166
22172
|
var import_react_router_dom19 = require("react-router-dom");
|
|
22167
22173
|
|
|
22168
22174
|
// src/views/Workflows/List/Modals/PreviewTemplate/Modal.tsx
|
|
22169
|
-
var
|
|
22175
|
+
var import_react92 = require("react");
|
|
22170
22176
|
var import_react_router_dom18 = require("react-router-dom");
|
|
22171
22177
|
var import_design_system_icons34 = require("@livechat/design-system-icons");
|
|
22172
22178
|
var import_design_system_react_components71 = require("@livechat/design-system-react-components");
|
|
@@ -22259,7 +22265,7 @@ function WorkflowTemplatePreviewModal({
|
|
|
22259
22265
|
const amplitudeWorkflowsJourney = workflowsBlockAmplitudeJourneyFactory(
|
|
22260
22266
|
user == null ? void 0 : user.meta.email
|
|
22261
22267
|
);
|
|
22262
|
-
const handleClose = (0,
|
|
22268
|
+
const handleClose = (0, import_react92.useCallback)(
|
|
22263
22269
|
(target) => {
|
|
22264
22270
|
if (onClose) {
|
|
22265
22271
|
onClose();
|
|
@@ -22405,7 +22411,7 @@ function WorkflowTemplatePreview({
|
|
|
22405
22411
|
workflow,
|
|
22406
22412
|
onClose
|
|
22407
22413
|
}) {
|
|
22408
|
-
const flowTemplates = (0,
|
|
22414
|
+
const flowTemplates = (0, import_react94.useMemo)(() => getWorkflowTemplates(), []);
|
|
22409
22415
|
const params = (0, import_react_router_dom19.useParams)();
|
|
22410
22416
|
const template = flowTemplates.find((t) => t.id === params.template);
|
|
22411
22417
|
const targetWorkflow = workflow || (template == null ? void 0 : template.workflow);
|
|
@@ -22437,18 +22443,18 @@ function WorkflowTemplatePreview({
|
|
|
22437
22443
|
var PreviewTemplate_default = WorkflowTemplatePreview;
|
|
22438
22444
|
|
|
22439
22445
|
// src/views/Workflows/List/Modals/Create/Modal.tsx
|
|
22440
|
-
var
|
|
22446
|
+
var import_react99 = require("react");
|
|
22441
22447
|
var import_react_router_dom22 = require("react-router-dom");
|
|
22442
22448
|
var import_design_system_react_components77 = require("@livechat/design-system-react-components");
|
|
22443
22449
|
|
|
22444
22450
|
// src/views/Workflows/List/Home/Home.tsx
|
|
22445
|
-
var
|
|
22451
|
+
var import_react98 = require("react");
|
|
22446
22452
|
var import_design_system_icons37 = require("@livechat/design-system-icons");
|
|
22447
22453
|
var import_design_system_react_components76 = require("@livechat/design-system-react-components");
|
|
22448
22454
|
var import_developer_studio_ui_react41 = require("@livechat/developer-studio-ui-react");
|
|
22449
22455
|
|
|
22450
22456
|
// src/views/Workflows/List/Modals/TemplateList/Filters/Category.tsx
|
|
22451
|
-
var
|
|
22457
|
+
var import_react95 = require("react");
|
|
22452
22458
|
var import_design_system_icons35 = require("@livechat/design-system-icons");
|
|
22453
22459
|
var import_design_system_react_components72 = require("@livechat/design-system-react-components");
|
|
22454
22460
|
var import_developer_studio_api29 = require("@livechat/developer-studio-api");
|
|
@@ -22457,8 +22463,9 @@ function WorkflowTemplatesCategoryFilter({
|
|
|
22457
22463
|
handleStatus,
|
|
22458
22464
|
status
|
|
22459
22465
|
}) {
|
|
22460
|
-
|
|
22461
|
-
const
|
|
22466
|
+
var _a;
|
|
22467
|
+
const [isVisible, setIsVisible] = (0, import_react95.useState)(false);
|
|
22468
|
+
const getItem = (0, import_react95.useCallback)(
|
|
22462
22469
|
(key, category, icon2) => ({
|
|
22463
22470
|
key,
|
|
22464
22471
|
element: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react37.Row, { gap: `var(${import_design_system_react_components72.SpacingToken.Spacing1});`, notPadded: true, children: [
|
|
@@ -22472,25 +22479,26 @@ function WorkflowTemplatesCategoryFilter({
|
|
|
22472
22479
|
}),
|
|
22473
22480
|
[handleStatus]
|
|
22474
22481
|
);
|
|
22482
|
+
const options = [
|
|
22483
|
+
getItem("0", "All"),
|
|
22484
|
+
getItem("1", import_developer_studio_api29.WorkflowTemplateCategory.NotificationAndAlerts, import_design_system_icons35.Notifications),
|
|
22485
|
+
getItem("2", import_developer_studio_api29.WorkflowTemplateCategory.SalesManagement, import_design_system_icons35.CurrencyDollar),
|
|
22486
|
+
getItem("3", import_developer_studio_api29.WorkflowTemplateCategory.LeadCollection, import_design_system_icons35.TargetArrow),
|
|
22487
|
+
getItem("4", import_developer_studio_api29.WorkflowTemplateCategory.ChatManagement, import_design_system_icons35.ChatDots),
|
|
22488
|
+
getItem("5", import_developer_studio_api29.WorkflowTemplateCategory.CustomerExperience, import_design_system_icons35.Smiles)
|
|
22489
|
+
];
|
|
22490
|
+
const selectedKey = (_a = options.find(
|
|
22491
|
+
(option) => option.element.props.children[1] === status
|
|
22492
|
+
)) == null ? void 0 : _a.key;
|
|
22475
22493
|
return /* @__PURE__ */ jsx4(
|
|
22476
22494
|
import_design_system_react_components72.ActionMenu,
|
|
22477
22495
|
{
|
|
22478
22496
|
onClose: () => {
|
|
22479
22497
|
setIsVisible(false);
|
|
22480
22498
|
},
|
|
22481
|
-
options
|
|
22482
|
-
getItem("0", "All"),
|
|
22483
|
-
getItem(
|
|
22484
|
-
"1",
|
|
22485
|
-
import_developer_studio_api29.WorkflowTemplateCategory.NotificationAndAlerts,
|
|
22486
|
-
import_design_system_icons35.Notifications
|
|
22487
|
-
),
|
|
22488
|
-
getItem("2", import_developer_studio_api29.WorkflowTemplateCategory.SalesManagement, import_design_system_icons35.CurrencyDollar),
|
|
22489
|
-
getItem("3", import_developer_studio_api29.WorkflowTemplateCategory.LeadCollection, import_design_system_icons35.TargetArrow),
|
|
22490
|
-
getItem("4", import_developer_studio_api29.WorkflowTemplateCategory.ChatManagement, import_design_system_icons35.ChatDots),
|
|
22491
|
-
getItem("5", import_developer_studio_api29.WorkflowTemplateCategory.CustomerExperience, import_design_system_icons35.Smiles)
|
|
22492
|
-
],
|
|
22499
|
+
options,
|
|
22493
22500
|
placement: "bottom",
|
|
22501
|
+
selectedOptions: selectedKey ? [selectedKey] : [],
|
|
22494
22502
|
triggerRenderer: /* @__PURE__ */ jsxs2(
|
|
22495
22503
|
import_design_system_react_components72.Button,
|
|
22496
22504
|
{
|
|
@@ -22512,7 +22520,7 @@ function WorkflowTemplatesCategoryFilter({
|
|
|
22512
22520
|
var Category_default = WorkflowTemplatesCategoryFilter;
|
|
22513
22521
|
|
|
22514
22522
|
// src/views/Workflows/List/Modals/TemplateList/Filters/Product.tsx
|
|
22515
|
-
var
|
|
22523
|
+
var import_react96 = require("react");
|
|
22516
22524
|
var import_design_system_icons36 = require("@livechat/design-system-icons");
|
|
22517
22525
|
var import_design_system_react_components73 = require("@livechat/design-system-react-components");
|
|
22518
22526
|
var import_developer_studio_api30 = require("@livechat/developer-studio-api");
|
|
@@ -22521,8 +22529,9 @@ function WorkflowTemplatesProductFilter({
|
|
|
22521
22529
|
handleStatus,
|
|
22522
22530
|
status
|
|
22523
22531
|
}) {
|
|
22524
|
-
|
|
22525
|
-
const
|
|
22532
|
+
var _a;
|
|
22533
|
+
const [isVisible, setIsVisible] = (0, import_react96.useState)(false);
|
|
22534
|
+
const getItem = (0, import_react96.useCallback)(
|
|
22526
22535
|
(key, product, icon2) => ({
|
|
22527
22536
|
key,
|
|
22528
22537
|
element: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react38.Row, { gap: `var(${import_design_system_react_components73.SpacingToken.Spacing1});`, notPadded: true, children: [
|
|
@@ -22536,23 +22545,28 @@ function WorkflowTemplatesProductFilter({
|
|
|
22536
22545
|
}),
|
|
22537
22546
|
[handleStatus]
|
|
22538
22547
|
);
|
|
22548
|
+
const options = [
|
|
22549
|
+
getItem("0", "All"),
|
|
22550
|
+
getItem("1", import_developer_studio_api30.IntegrationDisplayNames.LiveChat, import_design_system_icons36.LiveChatColored),
|
|
22551
|
+
getItem("2", import_developer_studio_api30.IntegrationDisplayNames.HelpDesk, import_design_system_icons36.HelpDeskColored),
|
|
22552
|
+
getItem("3", import_developer_studio_api30.IntegrationDisplayNames.OpenAI, import_design_system_icons36.Chatgpt),
|
|
22553
|
+
getItem("4", import_developer_studio_api30.IntegrationDisplayNames.Shopify, import_design_system_icons36.ShopifyColored),
|
|
22554
|
+
getItem("5", import_developer_studio_api30.IntegrationDisplayNames.Mailchimp, import_design_system_icons36.Mailchimp)
|
|
22555
|
+
// getItem('6', IntegrationDisplayNames.Stripe, Stripe),
|
|
22556
|
+
// getItem('7', IntegrationDisplayNames.GoogleSheets, GoogleSheets),
|
|
22557
|
+
];
|
|
22558
|
+
const selectedKey = (_a = options.find(
|
|
22559
|
+
(option) => option.element.props.children[1] === status
|
|
22560
|
+
)) == null ? void 0 : _a.key;
|
|
22539
22561
|
return /* @__PURE__ */ jsx4(
|
|
22540
22562
|
import_design_system_react_components73.ActionMenu,
|
|
22541
22563
|
{
|
|
22542
22564
|
onClose: () => {
|
|
22543
22565
|
setIsVisible(false);
|
|
22544
22566
|
},
|
|
22545
|
-
options
|
|
22546
|
-
getItem("0", "All"),
|
|
22547
|
-
getItem("1", import_developer_studio_api30.IntegrationDisplayNames.LiveChat, import_design_system_icons36.LiveChatColored),
|
|
22548
|
-
getItem("2", import_developer_studio_api30.IntegrationDisplayNames.HelpDesk, import_design_system_icons36.HelpDeskColored),
|
|
22549
|
-
getItem("3", import_developer_studio_api30.IntegrationDisplayNames.OpenAI, import_design_system_icons36.Chatgpt),
|
|
22550
|
-
getItem("4", import_developer_studio_api30.IntegrationDisplayNames.Shopify, import_design_system_icons36.ShopifyColored),
|
|
22551
|
-
getItem("5", import_developer_studio_api30.IntegrationDisplayNames.Mailchimp, import_design_system_icons36.Mailchimp)
|
|
22552
|
-
// getItem('6', IntegrationDisplayNames.Stripe, Stripe),
|
|
22553
|
-
// getItem('7', IntegrationDisplayNames.GoogleSheets, GoogleSheets),
|
|
22554
|
-
],
|
|
22567
|
+
options,
|
|
22555
22568
|
placement: "bottom",
|
|
22569
|
+
selectedOptions: selectedKey ? [selectedKey] : [],
|
|
22556
22570
|
triggerRenderer: /* @__PURE__ */ jsxs2(
|
|
22557
22571
|
import_design_system_react_components73.Button,
|
|
22558
22572
|
{
|
|
@@ -22676,9 +22690,9 @@ var Grid = newStyled.div`
|
|
|
22676
22690
|
gap: var(${import_design_system_react_components76.SpacingToken.Spacing3});
|
|
22677
22691
|
`;
|
|
22678
22692
|
function WorkflowsHome({ isOnModal }) {
|
|
22679
|
-
const [product, setProduct] = (0,
|
|
22680
|
-
const [category, setCategory] = (0,
|
|
22681
|
-
const flowTemplates = (0,
|
|
22693
|
+
const [product, setProduct] = (0, import_react98.useState)("All");
|
|
22694
|
+
const [category, setCategory] = (0, import_react98.useState)("All");
|
|
22695
|
+
const flowTemplates = (0, import_react98.useMemo)(() => getWorkflowTemplates(), []);
|
|
22682
22696
|
const filters = [
|
|
22683
22697
|
(template) => product === "All" || template.products.includes(product),
|
|
22684
22698
|
(template) => category === "All" || template.category.includes(category)
|
|
@@ -22781,7 +22795,7 @@ var Home_default = WorkflowsHome;
|
|
|
22781
22795
|
// src/views/Workflows/List/Modals/Create/Modal.tsx
|
|
22782
22796
|
function WorkflowCreateModal({ onClose }) {
|
|
22783
22797
|
const navigate = (0, import_react_router_dom22.useNavigate)();
|
|
22784
|
-
const handleClose = (0,
|
|
22798
|
+
const handleClose = (0, import_react99.useCallback)(() => {
|
|
22785
22799
|
if (onClose) {
|
|
22786
22800
|
onClose();
|
|
22787
22801
|
return;
|
|
@@ -22814,25 +22828,78 @@ function WorkflowCreate() {
|
|
|
22814
22828
|
var Create_default = WorkflowCreate;
|
|
22815
22829
|
|
|
22816
22830
|
// src/views/Workflows/List/View.tsx
|
|
22817
|
-
var
|
|
22818
|
-
var
|
|
22819
|
-
var
|
|
22831
|
+
var import_react106 = require("react");
|
|
22832
|
+
var import_react_router_dom26 = require("react-router-dom");
|
|
22833
|
+
var import_design_system_react_components82 = require("@livechat/design-system-react-components");
|
|
22820
22834
|
var import_developer_studio_api32 = require("@livechat/developer-studio-api");
|
|
22821
22835
|
var import_developer_studio_ui_react44 = require("@livechat/developer-studio-ui-react");
|
|
22822
22836
|
|
|
22837
|
+
// src/views/Workflows/Creator/LiveChatNavbar.tsx
|
|
22838
|
+
var import_react101 = require("react");
|
|
22839
|
+
var import_react_router_dom24 = require("react-router-dom");
|
|
22840
|
+
var import_design_system_icons38 = require("@livechat/design-system-icons");
|
|
22841
|
+
var import_design_system_react_components78 = require("@livechat/design-system-react-components");
|
|
22842
|
+
var wrapperCss = (hasData) => css`
|
|
22843
|
+
flex-shrink: 0;
|
|
22844
|
+
height: var(${import_design_system_react_components78.SpacingToken.Spacing14});
|
|
22845
|
+
width: 100%;
|
|
22846
|
+
display: flex;
|
|
22847
|
+
padding: 0 var(${import_design_system_react_components78.SpacingToken.Spacing6}) 0 var(${import_design_system_react_components78.SpacingToken.Spacing4});
|
|
22848
|
+
align-items: center;
|
|
22849
|
+
gap: var(${import_design_system_react_components78.SpacingToken.Spacing2});
|
|
22850
|
+
border-bottom: 1px solid var(${import_design_system_react_components78.DesignToken.BorderBasicSecondary});
|
|
22851
|
+
|
|
22852
|
+
${hasData && `> button:last-of-type {
|
|
22853
|
+
margin-left: auto;
|
|
22854
|
+
}`}
|
|
22855
|
+
`;
|
|
22856
|
+
function LiveChatNavbar() {
|
|
22857
|
+
const navigate = (0, import_react_router_dom24.useNavigate)();
|
|
22858
|
+
const workflows = useFetchWorkflows({});
|
|
22859
|
+
const isLoading = workflows.isLoading;
|
|
22860
|
+
const hasNoData = workflows.isSuccess && workflows.data.length === 0;
|
|
22861
|
+
const hasData = !isLoading && !hasNoData;
|
|
22862
|
+
const handleClick = (0, import_react101.useCallback)(() => {
|
|
22863
|
+
sendMessage("toggleSideNav" /* ToggleSideNav */);
|
|
22864
|
+
}, []);
|
|
22865
|
+
return /* @__PURE__ */ jsxs2("div", { css: wrapperCss(hasData), children: [
|
|
22866
|
+
/* @__PURE__ */ jsx4(
|
|
22867
|
+
import_design_system_react_components78.Button,
|
|
22868
|
+
{
|
|
22869
|
+
icon: /* @__PURE__ */ jsx4(import_design_system_react_components78.Icon, { source: import_design_system_icons38.LayoutSidebarLeft }),
|
|
22870
|
+
kind: "plain",
|
|
22871
|
+
onClick: handleClick
|
|
22872
|
+
}
|
|
22873
|
+
),
|
|
22874
|
+
/* @__PURE__ */ jsx4(import_design_system_react_components78.Heading, { size: "sm", children: "Workflows" }),
|
|
22875
|
+
hasData ? /* @__PURE__ */ jsx4(
|
|
22876
|
+
import_design_system_react_components78.Button,
|
|
22877
|
+
{
|
|
22878
|
+
kind: "primary",
|
|
22879
|
+
onClick: () => {
|
|
22880
|
+
navigate("create");
|
|
22881
|
+
},
|
|
22882
|
+
children: "Create workflow"
|
|
22883
|
+
}
|
|
22884
|
+
) : null
|
|
22885
|
+
] });
|
|
22886
|
+
}
|
|
22887
|
+
var LiveChatNavbar_default = LiveChatNavbar;
|
|
22888
|
+
|
|
22823
22889
|
// src/views/Workflows/List/Grid/Grid.tsx
|
|
22824
|
-
var
|
|
22890
|
+
var import_design_system_react_components81 = require("@livechat/design-system-react-components");
|
|
22825
22891
|
var import_developer_studio_ui_react43 = require("@livechat/developer-studio-ui-react");
|
|
22826
22892
|
|
|
22827
22893
|
// src/views/Workflows/List/Grid/Filters/StatusFilter.tsx
|
|
22828
|
-
var
|
|
22829
|
-
var
|
|
22830
|
-
var
|
|
22894
|
+
var import_react103 = require("react");
|
|
22895
|
+
var import_design_system_icons39 = require("@livechat/design-system-icons");
|
|
22896
|
+
var import_design_system_react_components79 = require("@livechat/design-system-react-components");
|
|
22831
22897
|
function WorkflowStatusFilter({
|
|
22832
22898
|
handleStatus,
|
|
22833
22899
|
status
|
|
22834
22900
|
}) {
|
|
22835
|
-
|
|
22901
|
+
var _a;
|
|
22902
|
+
const [isVisible, setIsVisible] = (0, import_react103.useState)(false);
|
|
22836
22903
|
const items = [
|
|
22837
22904
|
{
|
|
22838
22905
|
key: "0",
|
|
@@ -22859,18 +22926,20 @@ function WorkflowStatusFilter({
|
|
|
22859
22926
|
}
|
|
22860
22927
|
}
|
|
22861
22928
|
];
|
|
22929
|
+
const selectedKey = (_a = items.find((item) => item.element === status)) == null ? void 0 : _a.key;
|
|
22862
22930
|
return /* @__PURE__ */ jsx4(
|
|
22863
|
-
|
|
22931
|
+
import_design_system_react_components79.ActionMenu,
|
|
22864
22932
|
{
|
|
22865
22933
|
onClose: () => {
|
|
22866
22934
|
setIsVisible(false);
|
|
22867
22935
|
},
|
|
22868
22936
|
options: items,
|
|
22869
22937
|
placement: "bottom",
|
|
22938
|
+
selectedOptions: selectedKey ? [selectedKey] : [],
|
|
22870
22939
|
triggerRenderer: /* @__PURE__ */ jsxs2(
|
|
22871
|
-
|
|
22940
|
+
import_design_system_react_components79.Button,
|
|
22872
22941
|
{
|
|
22873
|
-
icon: /* @__PURE__ */ jsx4(
|
|
22942
|
+
icon: /* @__PURE__ */ jsx4(import_design_system_react_components79.Icon, { source: import_design_system_icons39.ToggleLeft }),
|
|
22874
22943
|
kind: "secondary",
|
|
22875
22944
|
onClick: () => {
|
|
22876
22945
|
setIsVisible(!isVisible);
|
|
@@ -22888,14 +22957,14 @@ function WorkflowStatusFilter({
|
|
|
22888
22957
|
var StatusFilter_default = WorkflowStatusFilter;
|
|
22889
22958
|
|
|
22890
22959
|
// src/views/Workflows/List/Grid/Table.tsx
|
|
22891
|
-
var
|
|
22892
|
-
var
|
|
22893
|
-
var
|
|
22960
|
+
var import_react_router_dom25 = require("react-router-dom");
|
|
22961
|
+
var import_design_system_icons40 = require("@livechat/design-system-icons");
|
|
22962
|
+
var import_design_system_react_components80 = require("@livechat/design-system-react-components");
|
|
22894
22963
|
var import_developer_studio_api31 = require("@livechat/developer-studio-api");
|
|
22895
22964
|
var import_developer_studio_ui_react42 = require("@livechat/developer-studio-ui-react");
|
|
22896
22965
|
function WorkflowsTable({ workflowsQuery, state }) {
|
|
22897
22966
|
var _a, _b, _c;
|
|
22898
|
-
const navigate = (0,
|
|
22967
|
+
const navigate = (0, import_react_router_dom25.useNavigate)();
|
|
22899
22968
|
const notifications = (0, import_developer_studio_ui_react42.useNotificationContext)();
|
|
22900
22969
|
const deleteAction = useDeleteWorkflow();
|
|
22901
22970
|
const activateWorkflowAction = useActivateWorkflow();
|
|
@@ -22932,7 +23001,7 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
22932
23001
|
cursor: pointer;
|
|
22933
23002
|
|
|
22934
23003
|
&:hover {
|
|
22935
|
-
background: var(${
|
|
23004
|
+
background: var(${import_design_system_react_components80.DesignToken.SurfacePrimaryHover});
|
|
22936
23005
|
}
|
|
22937
23006
|
`,
|
|
22938
23007
|
onClick: () => {
|
|
@@ -22940,10 +23009,10 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
22940
23009
|
navigate(`/workflow/${workflow.id}`);
|
|
22941
23010
|
},
|
|
22942
23011
|
children: [
|
|
22943
|
-
/* @__PURE__ */ jsx4("td", { width: "45%", children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react42.Row, { gap: `var(${
|
|
22944
|
-
/* @__PURE__ */ jsx4(
|
|
23012
|
+
/* @__PURE__ */ jsx4("td", { width: "45%", children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react42.Row, { gap: `var(${import_design_system_react_components80.SpacingToken.Spacing2})`, noWrap: true, notPadded: true, children: [
|
|
23013
|
+
/* @__PURE__ */ jsx4(import_design_system_react_components80.Text, { noMargin: true, size: "sm", children: workflow.name }),
|
|
22945
23014
|
workflow.related_workflow_id ? /* @__PURE__ */ jsx4(
|
|
22946
|
-
|
|
23015
|
+
import_design_system_react_components80.Tag,
|
|
22947
23016
|
{
|
|
22948
23017
|
css: css`
|
|
22949
23018
|
color: #68afff;
|
|
@@ -22970,12 +23039,12 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
22970
23039
|
);
|
|
22971
23040
|
}) }) }),
|
|
22972
23041
|
/* @__PURE__ */ jsx4("td", { children: /* @__PURE__ */ jsx4(
|
|
22973
|
-
|
|
23042
|
+
import_design_system_react_components80.Tooltip,
|
|
22974
23043
|
{
|
|
22975
23044
|
triggerClassName: "tooltip-trigger",
|
|
22976
23045
|
triggerOnHover: true,
|
|
22977
23046
|
triggerRenderer: /* @__PURE__ */ jsx4(import_developer_studio_ui_react42.StopPropagation, { children: /* @__PURE__ */ jsx4(
|
|
22978
|
-
|
|
23047
|
+
import_design_system_react_components80.Switch,
|
|
22979
23048
|
{
|
|
22980
23049
|
css: css`
|
|
22981
23050
|
vertical-align: bottom;
|
|
@@ -22995,9 +23064,9 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
22995
23064
|
}
|
|
22996
23065
|
) }),
|
|
22997
23066
|
/* @__PURE__ */ jsx4("td", { children: !workflow.draft && /* @__PURE__ */ jsx4(
|
|
22998
|
-
|
|
23067
|
+
import_design_system_react_components80.Button,
|
|
22999
23068
|
{
|
|
23000
|
-
icon: /* @__PURE__ */ jsx4(
|
|
23069
|
+
icon: /* @__PURE__ */ jsx4(import_design_system_react_components80.Icon, { source: import_design_system_icons40.Info }),
|
|
23001
23070
|
kind: "plain",
|
|
23002
23071
|
onClick: (e) => {
|
|
23003
23072
|
e.stopPropagation();
|
|
@@ -23006,15 +23075,15 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
23006
23075
|
}
|
|
23007
23076
|
) }),
|
|
23008
23077
|
/* @__PURE__ */ jsx4("td", { align: "right", children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react42.StopPropagation, { children: /* @__PURE__ */ jsx4(
|
|
23009
|
-
|
|
23078
|
+
import_design_system_react_components80.ActionMenu,
|
|
23010
23079
|
{
|
|
23011
23080
|
options: [
|
|
23012
23081
|
{
|
|
23013
23082
|
key: "run",
|
|
23014
23083
|
element: /* @__PURE__ */ jsx4(
|
|
23015
|
-
|
|
23084
|
+
import_design_system_react_components80.ActionMenuItem,
|
|
23016
23085
|
{
|
|
23017
|
-
leftNode: /* @__PURE__ */ jsx4(
|
|
23086
|
+
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components80.Icon, { source: import_design_system_icons40.PlayArrow }),
|
|
23018
23087
|
children: "Trigger manually"
|
|
23019
23088
|
}
|
|
23020
23089
|
),
|
|
@@ -23025,9 +23094,9 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
23025
23094
|
{
|
|
23026
23095
|
key: "delete",
|
|
23027
23096
|
element: /* @__PURE__ */ jsx4(
|
|
23028
|
-
|
|
23097
|
+
import_design_system_react_components80.ActionMenuItem,
|
|
23029
23098
|
{
|
|
23030
|
-
leftNode: /* @__PURE__ */ jsx4(
|
|
23099
|
+
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components80.Icon, { source: import_design_system_icons40.Delete }),
|
|
23031
23100
|
children: "Delete"
|
|
23032
23101
|
}
|
|
23033
23102
|
),
|
|
@@ -23043,9 +23112,9 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
23043
23112
|
}
|
|
23044
23113
|
],
|
|
23045
23114
|
triggerRenderer: /* @__PURE__ */ jsx4(
|
|
23046
|
-
|
|
23115
|
+
import_design_system_react_components80.Button,
|
|
23047
23116
|
{
|
|
23048
|
-
icon: /* @__PURE__ */ jsx4(
|
|
23117
|
+
icon: /* @__PURE__ */ jsx4(import_design_system_react_components80.Icon, { source: import_design_system_icons40.MoreHoriz }),
|
|
23049
23118
|
kind: "text",
|
|
23050
23119
|
loading: deleteAction.isLoading ? ((_g = deleteAction.variables) == null ? void 0 : _g.id) === workflow.id : void 0,
|
|
23051
23120
|
size: "compact"
|
|
@@ -23064,9 +23133,9 @@ function WorkflowsTable({ workflowsQuery, state }) {
|
|
|
23064
23133
|
{
|
|
23065
23134
|
css: css`
|
|
23066
23135
|
background: transparent !important;
|
|
23067
|
-
color: var(${
|
|
23136
|
+
color: var(${import_design_system_react_components80.DesignToken.ContentBasicSecondary});
|
|
23068
23137
|
`,
|
|
23069
|
-
children: /* @__PURE__ */ jsx4("td", { align: "left", colSpan: 6, children: /* @__PURE__ */ jsxs2(
|
|
23138
|
+
children: /* @__PURE__ */ jsx4("td", { align: "left", colSpan: 6, children: /* @__PURE__ */ jsxs2(import_design_system_react_components80.Text, { as: "div", size: "md", children: [
|
|
23070
23139
|
"There are no",
|
|
23071
23140
|
" ",
|
|
23072
23141
|
state.filters.status !== "All" && state.filters.status.toLowerCase(),
|
|
@@ -23106,7 +23175,7 @@ function WorkflowsGrid({
|
|
|
23106
23175
|
}
|
|
23107
23176
|
),
|
|
23108
23177
|
right: /* @__PURE__ */ jsx4(
|
|
23109
|
-
|
|
23178
|
+
import_design_system_react_components81.SearchInput,
|
|
23110
23179
|
{
|
|
23111
23180
|
css: () => css`
|
|
23112
23181
|
min-width: 250px;
|
|
@@ -23135,12 +23204,12 @@ var Grid_default = WorkflowsGrid;
|
|
|
23135
23204
|
|
|
23136
23205
|
// src/views/Workflows/List/View.tsx
|
|
23137
23206
|
var markedStyles = css`
|
|
23138
|
-
color: var(${
|
|
23207
|
+
color: var(${import_design_system_react_components82.DesignToken.ActionPrimaryDefault});
|
|
23139
23208
|
`;
|
|
23140
23209
|
function WorkflowListView() {
|
|
23141
23210
|
var _a;
|
|
23142
|
-
const navigate = (0,
|
|
23143
|
-
const [state, setState] = (0,
|
|
23211
|
+
const navigate = (0, import_react_router_dom26.useNavigate)();
|
|
23212
|
+
const [state, setState] = (0, import_react106.useState)({
|
|
23144
23213
|
filters: {
|
|
23145
23214
|
status: "All",
|
|
23146
23215
|
tasks: "All"
|
|
@@ -23154,6 +23223,7 @@ function WorkflowListView() {
|
|
|
23154
23223
|
return /* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Loader, { stretch: true });
|
|
23155
23224
|
}
|
|
23156
23225
|
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react44.View, { center: hasNoData, noWrap: true, stretch: isLoading, children: [
|
|
23226
|
+
getWorkflowsEnv("isLiveChatMode") ? /* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Row, { noMaxWidth: true, notPadded: true, children: /* @__PURE__ */ jsx4(LiveChatNavbar_default, {}) }) : null,
|
|
23157
23227
|
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react44.Row, { topMargin: true, verticalCenter: hasNoData, children: [
|
|
23158
23228
|
/* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Column, { width: hasNoData ? 10 : 8, children: hasNoData ? /* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Row, { notPadded: true, children: /* @__PURE__ */ jsx4(
|
|
23159
23229
|
import_developer_studio_ui_react44.Intro,
|
|
@@ -23164,7 +23234,7 @@ function WorkflowListView() {
|
|
|
23164
23234
|
import_developer_studio_ui_react44.Row,
|
|
23165
23235
|
{
|
|
23166
23236
|
center: true,
|
|
23167
|
-
gap: `var(${
|
|
23237
|
+
gap: `var(${import_design_system_react_components82.SpacingToken.Spacing2})`,
|
|
23168
23238
|
notPadded: true,
|
|
23169
23239
|
verticalCenter: true,
|
|
23170
23240
|
children: [
|
|
@@ -23184,8 +23254,8 @@ function WorkflowListView() {
|
|
|
23184
23254
|
header: "Your workflows"
|
|
23185
23255
|
}
|
|
23186
23256
|
) }),
|
|
23187
|
-
hasData ? /* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Column, { pullRight: true, children: /* @__PURE__ */ jsx4(
|
|
23188
|
-
|
|
23257
|
+
hasData && !getWorkflowsEnv("isHeadless") ? /* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Column, { pullRight: true, children: /* @__PURE__ */ jsx4(
|
|
23258
|
+
import_design_system_react_components82.Button,
|
|
23189
23259
|
{
|
|
23190
23260
|
kind: "primary",
|
|
23191
23261
|
onClick: () => {
|
|
@@ -23195,7 +23265,7 @@ function WorkflowListView() {
|
|
|
23195
23265
|
}
|
|
23196
23266
|
) }) : null
|
|
23197
23267
|
] }),
|
|
23198
|
-
/* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Row, { children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react44.Column, { gap: `var(${
|
|
23268
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Row, { children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react44.Column, { gap: `var(${import_design_system_react_components82.SpacingToken.Spacing10})`, noMaxWidth: true, width: 12, children: [
|
|
23199
23269
|
hasData ? /* @__PURE__ */ jsx4(
|
|
23200
23270
|
Grid_default,
|
|
23201
23271
|
{
|
|
@@ -23216,21 +23286,21 @@ var View_default2 = WorkflowListView;
|
|
|
23216
23286
|
function WorkflowList() {
|
|
23217
23287
|
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react45.Row, { noMaxWidth: true, noWrap: true, notPadded: true, stretch: true, children: [
|
|
23218
23288
|
/* @__PURE__ */ jsx4(View_default2, {}),
|
|
23219
|
-
/* @__PURE__ */ jsxs2(
|
|
23220
|
-
/* @__PURE__ */ jsx4(
|
|
23221
|
-
/* @__PURE__ */ jsx4(
|
|
23222
|
-
/* @__PURE__ */ jsx4(
|
|
23289
|
+
/* @__PURE__ */ jsxs2(import_react_router_dom27.Routes, { children: [
|
|
23290
|
+
/* @__PURE__ */ jsx4(import_react_router_dom27.Route, { element: /* @__PURE__ */ jsx4(PreviewTemplate_default, {}), path: "preview/:template" }),
|
|
23291
|
+
/* @__PURE__ */ jsx4(import_react_router_dom27.Route, { element: /* @__PURE__ */ jsx4(Create_default, {}), path: "create/*" }),
|
|
23292
|
+
/* @__PURE__ */ jsx4(import_react_router_dom27.Route, { element: /* @__PURE__ */ jsx4(WorkflowDetails, { headerType: "name" }), path: ":id/*" })
|
|
23223
23293
|
] })
|
|
23224
23294
|
] });
|
|
23225
23295
|
}
|
|
23226
23296
|
var List_default2 = WorkflowList;
|
|
23227
23297
|
|
|
23228
23298
|
// src/views/Workflows/index.tsx
|
|
23229
|
-
var
|
|
23299
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
23230
23300
|
function Workflows() {
|
|
23231
|
-
const navigate = (0,
|
|
23301
|
+
const navigate = (0, import_react_router_dom28.useNavigate)();
|
|
23232
23302
|
const { userHasInstalledWorkflows, isWorkflowAppLoading } = useFetchUserInstalledWorkflows();
|
|
23233
|
-
(0,
|
|
23303
|
+
(0, import_react108.useEffect)(() => {
|
|
23234
23304
|
if (isWorkflowAppLoading) {
|
|
23235
23305
|
return;
|
|
23236
23306
|
}
|
|
@@ -23239,31 +23309,31 @@ function Workflows() {
|
|
|
23239
23309
|
}
|
|
23240
23310
|
}, [navigate, isWorkflowAppLoading, userHasInstalledWorkflows]);
|
|
23241
23311
|
if (isWorkflowAppLoading) {
|
|
23242
|
-
return /* @__PURE__ */ (0,
|
|
23312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_developer_studio_ui_react46.Loader, { stretch: true });
|
|
23243
23313
|
}
|
|
23244
|
-
return /* @__PURE__ */ (0,
|
|
23245
|
-
/* @__PURE__ */ (0,
|
|
23246
|
-
/* @__PURE__ */ (0,
|
|
23247
|
-
/* @__PURE__ */ (0,
|
|
23314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_react_router_dom28.Routes, { children: [
|
|
23315
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react_router_dom28.Route, { element: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react_router_dom28.Navigate, { replace: true, to: "list" }), path: "" }),
|
|
23316
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react_router_dom28.Route, { element: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(List_default2, {}), path: "list/*" }),
|
|
23317
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_react_router_dom28.Route, { element: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Creator_default, {}), path: ":id/*" })
|
|
23248
23318
|
] });
|
|
23249
23319
|
}
|
|
23250
23320
|
var Workflows_default = Workflows;
|
|
23251
23321
|
|
|
23252
23322
|
// src/views/Common/LoginError.tsx
|
|
23253
|
-
var
|
|
23323
|
+
var import_design_system_react_components83 = require("@livechat/design-system-react-components");
|
|
23254
23324
|
var import_developer_studio_ui_react47 = require("@livechat/developer-studio-ui-react");
|
|
23255
23325
|
var imgContainerCss2 = css`
|
|
23256
23326
|
img {
|
|
23257
23327
|
height: auto;
|
|
23258
23328
|
max-width: 100%;
|
|
23259
|
-
margin-bottom: var(${
|
|
23329
|
+
margin-bottom: var(${import_design_system_react_components83.SpacingToken.Spacing10});
|
|
23260
23330
|
}
|
|
23261
23331
|
`;
|
|
23262
23332
|
var paragraphCss = (heading) => css`
|
|
23263
23333
|
${heading ? import_developer_studio_ui_react47.theme.typography.heading.xs : import_developer_studio_ui_react47.theme.typography.paragraph.s}
|
|
23264
|
-
margin-top: var(${heading ?
|
|
23334
|
+
margin-top: var(${heading ? import_design_system_react_components83.SpacingToken.Spacing10 : import_design_system_react_components83.SpacingToken.Spacing2});
|
|
23265
23335
|
`;
|
|
23266
|
-
var
|
|
23336
|
+
var wrapperCss2 = css`
|
|
23267
23337
|
display: flex;
|
|
23268
23338
|
flex-direction: column;
|
|
23269
23339
|
align-items: center;
|
|
@@ -23277,12 +23347,12 @@ function LoginErrorPage({
|
|
|
23277
23347
|
onAuthorize
|
|
23278
23348
|
}) {
|
|
23279
23349
|
if (getWorkflowsEnv("isHeadless")) {
|
|
23280
|
-
return /* @__PURE__ */ jsxs2("div", { css:
|
|
23350
|
+
return /* @__PURE__ */ jsxs2("div", { css: wrapperCss2, children: [
|
|
23281
23351
|
/* @__PURE__ */ jsx4(import_developer_studio_ui_react47.Row, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react47.Column, { center: true, width: 10, children: /* @__PURE__ */ jsx4("div", { css: imgContainerCss2, children: welcomeImage }) }) }),
|
|
23282
23352
|
/* @__PURE__ */ jsx4(import_developer_studio_ui_react47.Row, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react47.Column, { center: true, width: 10, children: [
|
|
23283
23353
|
/* @__PURE__ */ jsx4(import_developer_studio_ui_react47.Intro, { center: true, header: "Welcome to Workflows!", headerSize: "m" }),
|
|
23284
23354
|
/* @__PURE__ */ jsx4("p", { css: paragraphCss(false), children: "You're using a browser that required additional login to access Workflows" }),
|
|
23285
|
-
/* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
|
|
23355
|
+
/* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(import_design_system_react_components83.Button, { kind: "primary", onClick: onAuthorize, children: "Login with Text" }) })
|
|
23286
23356
|
] }) })
|
|
23287
23357
|
] });
|
|
23288
23358
|
}
|
|
@@ -23291,11 +23361,11 @@ function LoginErrorPage({
|
|
|
23291
23361
|
var LoginError_default = LoginErrorPage;
|
|
23292
23362
|
|
|
23293
23363
|
// src/views/index.tsx
|
|
23294
|
-
var
|
|
23364
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
23295
23365
|
function WorkflowsModule({ waitlistImage }) {
|
|
23296
|
-
return /* @__PURE__ */ (0,
|
|
23297
|
-
/* @__PURE__ */ (0,
|
|
23298
|
-
/* @__PURE__ */ (0,
|
|
23366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_react_router_dom29.Routes, { children: [
|
|
23367
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_react_router_dom29.Route, { element: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Workflows_default, {}), path: "*" }),
|
|
23368
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_react_router_dom29.Route, { element: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Waitlist_default, { image: waitlistImage }), path: "/waitlist" })
|
|
23299
23369
|
] });
|
|
23300
23370
|
}
|
|
23301
23371
|
// Annotate the CommonJS export names for ESM import in node:
|