@livechat/platform-workflows 0.0.23 → 0.0.25

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.js CHANGED
@@ -262,7 +262,7 @@ var require_react_is_development = __commonJS({
262
262
  var ContextProvider = REACT_PROVIDER_TYPE;
263
263
  var Element = REACT_ELEMENT_TYPE;
264
264
  var ForwardRef = REACT_FORWARD_REF_TYPE;
265
- var Fragment19 = REACT_FRAGMENT_TYPE;
265
+ var Fragment18 = REACT_FRAGMENT_TYPE;
266
266
  var Lazy = REACT_LAZY_TYPE;
267
267
  var Memo = REACT_MEMO_TYPE;
268
268
  var Portal = REACT_PORTAL_TYPE;
@@ -321,7 +321,7 @@ var require_react_is_development = __commonJS({
321
321
  exports2.ContextProvider = ContextProvider;
322
322
  exports2.Element = Element;
323
323
  exports2.ForwardRef = ForwardRef;
324
- exports2.Fragment = Fragment19;
324
+ exports2.Fragment = Fragment18;
325
325
  exports2.Lazy = Lazy;
326
326
  exports2.Memo = Memo;
327
327
  exports2.Portal = Portal;
@@ -1807,9 +1807,11 @@ function jsxs2(type, props, key) {
1807
1807
 
1808
1808
  // src/views/Common/LoginError.tsx
1809
1809
  var imgContainerCss = css`
1810
- width: 100%;
1811
- display: flex;
1812
- justify-content: center;
1810
+ img {
1811
+ height: auto;
1812
+ max-width: 100%;
1813
+ margin-bottom: var(${import_design_system_react_components.SpacingToken.Spacing10});
1814
+ }
1813
1815
  `;
1814
1816
  var paragraphCss = (heading) => css`
1815
1817
  ${heading ? import_developer_studio_ui_react2.theme.typography.heading.xs : import_developer_studio_ui_react2.theme.typography.paragraph.s}
@@ -8851,7 +8853,7 @@ function configureMonaco(monaco) {
8851
8853
  var import_react8 = require("react");
8852
8854
  var import_react_router_dom = require("react-router-dom");
8853
8855
  var import_reactflow = require("reactflow");
8854
- var import_lodash = require("lodash");
8856
+ var import_lodash = __toESM(require("lodash.debounce"));
8855
8857
  var import_developer_studio_api17 = require("@livechat/developer-studio-api");
8856
8858
  var import_developer_studio_ui_react5 = require("@livechat/developer-studio-ui-react");
8857
8859
 
@@ -10201,7 +10203,7 @@ function WorkflowContextProviderBase({
10201
10203
  } = useWorkflowState(workflow, options2);
10202
10204
  const autosaveStateRef = (0, import_react8.useRef)(state);
10203
10205
  const autosaveWorkflow = (0, import_react8.useRef)(
10204
- (0, import_lodash.debounce)(() => __async(this, null, function* () {
10206
+ (0, import_lodash.default)(() => __async(this, null, function* () {
10205
10207
  yield save(true);
10206
10208
  }), 500)
10207
10209
  ).current;
@@ -10394,7 +10396,9 @@ function WorkflowContextProviderBase({
10394
10396
  }
10395
10397
  return 0;
10396
10398
  });
10397
- const existingTaskIndex = /_(\d+)$/.exec((_a2 = existingTasks[existingTasks.length - 1]) == null ? void 0 : _a2.taskReferenceName);
10399
+ const existingTaskIndex = /_(\d+)$/.exec(
10400
+ (_a2 = existingTasks[existingTasks.length - 1]) == null ? void 0 : _a2.taskReferenceName
10401
+ );
10398
10402
  const newTask = __spreadProps(__spreadValues({}, task2), {
10399
10403
  taskReferenceName: `${task2.taskReferenceName}_${existingTaskIndex ? Number(existingTaskIndex[1]) + 1 : 1}`
10400
10404
  });
@@ -12649,7 +12653,7 @@ function CustomTagTemplate(tagData, { settings: _s }) {
12649
12653
 
12650
12654
  // src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/overrides/Fields/CustomTags/TagsInput/Tag/Tooltip.tsx
12651
12655
  var import_react21 = require("react");
12652
- var import_lodash2 = require("lodash");
12656
+ var import_lodash2 = __toESM(require("lodash.debounce"));
12653
12657
  var import_design_system_react_components12 = require("@livechat/design-system-react-components");
12654
12658
  var import_developer_studio_ui_react12 = require("@livechat/developer-studio-ui-react");
12655
12659
  var useCustomTagsInputTagTooltipData = () => {
@@ -12658,7 +12662,7 @@ var useCustomTagsInputTagTooltipData = () => {
12658
12662
  visible: false
12659
12663
  }
12660
12664
  );
12661
- const setTooltipDataDebounced = (0, import_react21.useCallback)((0, import_lodash2.debounce)(setTooltipData, 50), []);
12665
+ const setTooltipDataDebounced = (0, import_react21.useCallback)((0, import_lodash2.default)(setTooltipData, 50), []);
12662
12666
  const showTagTooltip = (0, import_react21.useCallback)(
12663
12667
  (tag, tagElement) => {
12664
12668
  const rect = tagElement.getBoundingClientRect();
@@ -17545,7 +17549,7 @@ var import_react88 = require("react");
17545
17549
 
17546
17550
  // src/views/Flows/Definitions/Common/One/hooks/use-scroll.ts
17547
17551
  var import_react76 = require("react");
17548
- var import_lodash3 = require("lodash");
17552
+ var import_lodash3 = __toESM(require("lodash.debounce"));
17549
17553
  var useScroll = ({
17550
17554
  oneChatFeedRef,
17551
17555
  groupedEvents,
@@ -17601,7 +17605,7 @@ var useScroll = ({
17601
17605
  currentScrollPosition.current = (_a = container2.scrollTop) != null ? _a : null;
17602
17606
  isScrolledToBottom.current = container2.scrollHeight - container2.scrollTop - container2.clientHeight < 1;
17603
17607
  };
17604
- const debouncedScroll = (0, import_lodash3.debounce)(handleScroll, 200);
17608
+ const debouncedScroll = (0, import_lodash3.default)(handleScroll, 200);
17605
17609
  return {
17606
17610
  handleScroll: debouncedScroll,
17607
17611
  handleScrollToBottom: scrollToBottom
package/dist/index.mjs CHANGED
@@ -256,7 +256,7 @@ var require_react_is_development = __commonJS({
256
256
  var ContextProvider = REACT_PROVIDER_TYPE;
257
257
  var Element = REACT_ELEMENT_TYPE;
258
258
  var ForwardRef = REACT_FORWARD_REF_TYPE;
259
- var Fragment19 = REACT_FRAGMENT_TYPE;
259
+ var Fragment18 = REACT_FRAGMENT_TYPE;
260
260
  var Lazy = REACT_LAZY_TYPE;
261
261
  var Memo = REACT_MEMO_TYPE;
262
262
  var Portal = REACT_PORTAL_TYPE;
@@ -315,7 +315,7 @@ var require_react_is_development = __commonJS({
315
315
  exports.ContextProvider = ContextProvider;
316
316
  exports.Element = Element;
317
317
  exports.ForwardRef = ForwardRef;
318
- exports.Fragment = Fragment19;
318
+ exports.Fragment = Fragment18;
319
319
  exports.Lazy = Lazy;
320
320
  exports.Memo = Memo;
321
321
  exports.Portal = Portal;
@@ -1799,9 +1799,11 @@ function jsxs2(type, props, key) {
1799
1799
 
1800
1800
  // src/views/Common/LoginError.tsx
1801
1801
  var imgContainerCss = css`
1802
- width: 100%;
1803
- display: flex;
1804
- justify-content: center;
1802
+ img {
1803
+ height: auto;
1804
+ max-width: 100%;
1805
+ margin-bottom: var(${SpacingToken.Spacing10});
1806
+ }
1805
1807
  `;
1806
1808
  var paragraphCss = (heading) => css`
1807
1809
  ${heading ? theme.typography.heading.xs : theme.typography.paragraph.s}
@@ -8885,10 +8887,8 @@ import {
8885
8887
  } from "react";
8886
8888
  import { useNavigate } from "react-router-dom";
8887
8889
  import { ReactFlowProvider, useReactFlow } from "reactflow";
8888
- import { debounce } from "lodash";
8889
- import {
8890
- WorkflowDefinitionTaskType as WorkflowDefinitionTaskType12
8891
- } from "@livechat/developer-studio-api";
8890
+ import debounce from "lodash.debounce";
8891
+ import { WorkflowDefinitionTaskType as WorkflowDefinitionTaskType12 } from "@livechat/developer-studio-api";
8892
8892
  import { useNotifications as useNotifications3 } from "@livechat/developer-studio-ui-react";
8893
8893
 
8894
8894
  // src/views/Flows/Definitions/hooks.ts
@@ -10444,7 +10444,9 @@ function WorkflowContextProviderBase({
10444
10444
  }
10445
10445
  return 0;
10446
10446
  });
10447
- const existingTaskIndex = /_(\d+)$/.exec((_a2 = existingTasks[existingTasks.length - 1]) == null ? void 0 : _a2.taskReferenceName);
10447
+ const existingTaskIndex = /_(\d+)$/.exec(
10448
+ (_a2 = existingTasks[existingTasks.length - 1]) == null ? void 0 : _a2.taskReferenceName
10449
+ );
10448
10450
  const newTask = __spreadProps(__spreadValues({}, task2), {
10449
10451
  taskReferenceName: `${task2.taskReferenceName}_${existingTaskIndex ? Number(existingTaskIndex[1]) + 1 : 1}`
10450
10452
  });
@@ -12778,7 +12780,7 @@ function CustomTagTemplate(tagData, { settings: _s }) {
12778
12780
 
12779
12781
  // src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/overrides/Fields/CustomTags/TagsInput/Tag/Tooltip.tsx
12780
12782
  import { useCallback as useCallback3, useState as useState7 } from "react";
12781
- import { debounce as debounce2 } from "lodash";
12783
+ import debounce2 from "lodash.debounce";
12782
12784
  import {
12783
12785
  DesignToken as DesignToken8,
12784
12786
  SpacingToken as SpacingToken9,
@@ -14311,7 +14313,7 @@ import {
14311
14313
  DesignToken as DesignToken11,
14312
14314
  RadiusToken as RadiusToken3
14313
14315
  } from "@livechat/design-system-react-components";
14314
- import { Fragment as Fragment9, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
14316
+ import { Fragment as Fragment8, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
14315
14317
  var Wrapper2 = newStyled.div`
14316
14318
  &:hover {
14317
14319
  cursor: pointer;
@@ -14387,7 +14389,7 @@ function CustomNode({
14387
14389
  id,
14388
14390
  data
14389
14391
  }) {
14390
- return /* @__PURE__ */ jsxs3(Fragment9, { children: [
14392
+ return /* @__PURE__ */ jsxs3(Fragment8, { children: [
14391
14393
  /* @__PURE__ */ jsxs3("div", { className: "custom-node__header", children: [
14392
14394
  "This is a ",
14393
14395
  /* @__PURE__ */ jsx5("strong", { children: "custom node" })
@@ -17909,7 +17911,7 @@ import { useRef as useRef8 } from "react";
17909
17911
 
17910
17912
  // src/views/Flows/Definitions/Common/One/hooks/use-scroll.ts
17911
17913
  import { useCallback as useCallback16, useEffect as useEffect11, useRef as useRef7 } from "react";
17912
- import { debounce as debounce3 } from "lodash";
17914
+ import debounce3 from "lodash.debounce";
17913
17915
  var useScroll = ({
17914
17916
  oneChatFeedRef,
17915
17917
  groupedEvents,
@@ -19413,7 +19415,7 @@ import { useState as useState27 } from "react";
19413
19415
  import { useLocation as useLocation7, useNavigate as useNavigate5 } from "react-router-dom";
19414
19416
  import { Controls as Controls2 } from "reactflow";
19415
19417
  import { SegmentedControl } from "@livechat/design-system-react-components";
19416
- import { Fragment as Fragment16, jsx as jsx9 } from "react/jsx-runtime";
19418
+ import { Fragment as Fragment15, jsx as jsx9 } from "react/jsx-runtime";
19417
19419
  function SwitcherControls({
19418
19420
  isDraft,
19419
19421
  hasRelatedWorkflow,
@@ -19456,7 +19458,7 @@ function SwitcherControls({
19456
19458
  }
19457
19459
  };
19458
19460
  if (!visibility.switcher || !isDraft && !hasRelatedWorkflow) {
19459
- return /* @__PURE__ */ jsx9(Fragment16, {});
19461
+ return /* @__PURE__ */ jsx9(Fragment15, {});
19460
19462
  }
19461
19463
  const handleVersionClick = (id) => {
19462
19464
  if (id === "draft" && isDraft) {
@@ -19555,7 +19557,7 @@ var Edges_default = CustomEdge_default;
19555
19557
 
19556
19558
  // src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Diagram.tsx
19557
19559
  import "reactflow/dist/style.css";
19558
- import { Fragment as Fragment18, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
19560
+ import { Fragment as Fragment17, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
19559
19561
  var nodeConfig = {
19560
19562
  [WorkflowDefinitionTaskType14.http]: Node_default2,
19561
19563
  [WorkflowDefinitionTaskType14.forkJoin]: Node_default,
@@ -19644,7 +19646,7 @@ function Diagram({
19644
19646
  if (!workflow.draft && isRawEditorVisible) {
19645
19647
  onRawEditorToggle && onRawEditorToggle();
19646
19648
  }
19647
- return /* @__PURE__ */ jsxs5(Fragment18, { children: [
19649
+ return /* @__PURE__ */ jsxs5(Fragment17, { children: [
19648
19650
  /* @__PURE__ */ jsxs5(
19649
19651
  ReactFlow,
19650
19652
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/platform-workflows",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "Text Platform | Workflows",
5
5
  "author": "Wojciech Dudek",
6
6
  "license": "MIT",
@@ -52,7 +52,7 @@
52
52
  "@rjsf/core": "^5.22.1",
53
53
  "@rjsf/utils": "^5.22.1",
54
54
  "@rjsf/validator-ajv8": "^5.22.1",
55
- "@types/lodash": "^4.17.13",
55
+ "@types/lodash.debounce": "^4.0.9",
56
56
  "@yaireo/tagify": "4.32.0",
57
57
  "ajv": "^8.17.1",
58
58
  "ajv-errors": "^3.0.0",
@@ -64,7 +64,7 @@
64
64
  "json-schema": "^0.4.0",
65
65
  "jsonpath-plus": "^10.1.0",
66
66
  "lexical": "^0.19.0",
67
- "lodash": "^4.17.21",
67
+ "lodash.debounce": "^4.0.8",
68
68
  "monaco-editor": "^0.52.0",
69
69
  "pusher-js": "8.4.0-rc2",
70
70
  "react-final-form": "^6.5.9",
@@ -76,8 +76,8 @@
76
76
  "validator": "^13.12.0",
77
77
  "web-worker": "^1.3.0",
78
78
  "@livechat/developer-studio-api": "3.3.8",
79
- "@livechat/platform-integrations": "0.0.3",
80
- "@livechat/developer-studio-ui-react": "0.0.61"
79
+ "@livechat/developer-studio-ui-react": "0.0.61",
80
+ "@livechat/platform-integrations": "0.0.4"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "@tanstack/react-query": "4.36.1",