@livechat/platform-workflows 0.0.16 → 0.0.17

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 CHANGED
@@ -109,4 +109,6 @@ declare const Flows: () => JSX.Element;
109
109
  declare function SettingsSubNav(): JSX.Element;
110
110
  declare function Settings(): JSX.Element;
111
111
 
112
- export { AuthContext, AuthProvider, type AuthSource, type AuthState, Flows, type IAuthContext, Settings, SettingsSubNav, type WorkflowsConfig, type WorkflowsConfigBase, getWorkflowEnv, getWorkflowsConfig, setWorkflowsConfig };
112
+ declare function LoginErrorPage(): JSX.Element;
113
+
114
+ export { AuthContext, AuthProvider, type AuthSource, type AuthState, Flows, type IAuthContext, LoginErrorPage as LoginError, Settings, SettingsSubNav, type WorkflowsConfig, type WorkflowsConfigBase, getWorkflowEnv, getWorkflowsConfig, setWorkflowsConfig };
package/dist/index.d.ts CHANGED
@@ -109,4 +109,6 @@ declare const Flows: () => JSX.Element;
109
109
  declare function SettingsSubNav(): JSX.Element;
110
110
  declare function Settings(): JSX.Element;
111
111
 
112
- export { AuthContext, AuthProvider, type AuthSource, type AuthState, Flows, type IAuthContext, Settings, SettingsSubNav, type WorkflowsConfig, type WorkflowsConfigBase, getWorkflowEnv, getWorkflowsConfig, setWorkflowsConfig };
112
+ declare function LoginErrorPage(): JSX.Element;
113
+
114
+ export { AuthContext, AuthProvider, type AuthSource, type AuthState, Flows, type IAuthContext, LoginErrorPage as LoginError, Settings, SettingsSubNav, type WorkflowsConfig, type WorkflowsConfigBase, getWorkflowEnv, getWorkflowsConfig, setWorkflowsConfig };
package/dist/index.js CHANGED
@@ -476,6 +476,7 @@ __export(src_exports, {
476
476
  AuthContext: () => AuthContext,
477
477
  AuthProvider: () => AuthProvider,
478
478
  Flows: () => Flows_default,
479
+ LoginError: () => LoginError_default,
479
480
  Settings: () => Settings_default,
480
481
  SettingsSubNav: () => SettingsSubNav,
481
482
  getWorkflowEnv: () => getWorkflowEnv,
@@ -13891,7 +13892,7 @@ var CustomTagsField = ({
13891
13892
  error,
13892
13893
  trim: trim2,
13893
13894
  disabled,
13894
- wrapperCss,
13895
+ wrapperCss: wrapperCss2,
13895
13896
  onChange
13896
13897
  }) => {
13897
13898
  const wrapperRef = (0, import_react30.useRef)(null);
@@ -13899,7 +13900,7 @@ var CustomTagsField = ({
13899
13900
  (0, import_developer_studio_ui_react16.useOnClickOutside)(wrapperRef, () => {
13900
13901
  setIsPickerVisible(false);
13901
13902
  });
13902
- return /* @__PURE__ */ jsx4("div", { ref: wrapperRef, css: wrapperCss, children: /* @__PURE__ */ jsx4(
13903
+ return /* @__PURE__ */ jsx4("div", { ref: wrapperRef, css: wrapperCss2, children: /* @__PURE__ */ jsx4(
13903
13904
  CustomTagsInput,
13904
13905
  {
13905
13906
  value,
@@ -28274,11 +28275,72 @@ function Settings() {
28274
28275
  ] });
28275
28276
  }
28276
28277
  var Settings_default = Settings;
28278
+
28279
+ // src/views/Common/LoginError.tsx
28280
+ var import_design_system_react_components104 = require("@livechat/design-system-react-components");
28281
+ var import_developer_studio_ui_react87 = require("@livechat/developer-studio-ui-react");
28282
+
28283
+ // src/assets/flows/workflows-welcome.png
28284
+ var workflows_welcome_default = "./workflows-welcome-N73H5YQR.png";
28285
+
28286
+ // src/views/Common/LoginError.tsx
28287
+ var imgContainerCss2 = css`
28288
+ width: 100%;
28289
+ display: flex;
28290
+ justify-content: center;
28291
+ `;
28292
+ var paragraphCss = (heading) => css`
28293
+ ${heading ? import_developer_studio_ui_react87.theme.typography.heading.xs : import_developer_studio_ui_react87.theme.typography.paragraph.s}
28294
+ margin-top: var(${heading ? import_design_system_react_components104.SpacingToken.Spacing10 : import_design_system_react_components104.SpacingToken.Spacing2});
28295
+ `;
28296
+ var wrapperCss = css`
28297
+ display: flex;
28298
+ flex-direction: column;
28299
+ align-items: center;
28300
+ justify-content: center;
28301
+ height: 100vh;
28302
+ width: 100%;
28303
+ `;
28304
+ function LoginErrorPage() {
28305
+ const { authorize } = (0, import_developer_studio_ui_react87.useRootContext)();
28306
+ if (getWorkflowEnv("isHeadless")) {
28307
+ return /* @__PURE__ */ jsxs2("div", { css: wrapperCss, children: [
28308
+ /* @__PURE__ */ jsx4(import_developer_studio_ui_react87.Row, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react87.Column, { center: true, width: 10, children: /* @__PURE__ */ jsx4("div", { css: imgContainerCss2, children: /* @__PURE__ */ jsx4(
28309
+ "img",
28310
+ {
28311
+ alt: "",
28312
+ css: css`
28313
+ width: 600px;
28314
+ margin-bottom: var(${import_design_system_react_components104.SpacingToken.Spacing7});
28315
+ `,
28316
+ src: workflows_welcome_default
28317
+ }
28318
+ ) }) }) }),
28319
+ /* @__PURE__ */ jsx4(import_developer_studio_ui_react87.Row, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react87.Column, { center: true, width: 10, children: [
28320
+ /* @__PURE__ */ jsx4(import_developer_studio_ui_react87.Intro, { center: true, header: "Welcome to Workflows!", headerSize: "m" }),
28321
+ /* @__PURE__ */ jsx4("p", { css: paragraphCss(false), children: "You're using a browser that required additional login to access Workflows" }),
28322
+ /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
28323
+ import_design_system_react_components104.Button,
28324
+ {
28325
+ kind: "primary",
28326
+ onClick: () => {
28327
+ authorize(true);
28328
+ },
28329
+ children: "Login with Text"
28330
+ }
28331
+ ) })
28332
+ ] }) })
28333
+ ] });
28334
+ }
28335
+ return /* @__PURE__ */ jsx4(import_developer_studio_ui_react87.LoginErrorPage, {});
28336
+ }
28337
+ var LoginError_default = LoginErrorPage;
28277
28338
  // Annotate the CommonJS export names for ESM import in node:
28278
28339
  0 && (module.exports = {
28279
28340
  AuthContext,
28280
28341
  AuthProvider,
28281
28342
  Flows,
28343
+ LoginError,
28282
28344
  Settings,
28283
28345
  SettingsSubNav,
28284
28346
  getWorkflowEnv,
package/dist/index.mjs CHANGED
@@ -14042,7 +14042,7 @@ var CustomTagsField = ({
14042
14042
  error,
14043
14043
  trim: trim2,
14044
14044
  disabled,
14045
- wrapperCss,
14045
+ wrapperCss: wrapperCss2,
14046
14046
  onChange
14047
14047
  }) => {
14048
14048
  const wrapperRef = useRef6(null);
@@ -14050,7 +14050,7 @@ var CustomTagsField = ({
14050
14050
  useOnClickOutside(wrapperRef, () => {
14051
14051
  setIsPickerVisible(false);
14052
14052
  });
14053
- return /* @__PURE__ */ jsx4("div", { ref: wrapperRef, css: wrapperCss, children: /* @__PURE__ */ jsx4(
14053
+ return /* @__PURE__ */ jsx4("div", { ref: wrapperRef, css: wrapperCss2, children: /* @__PURE__ */ jsx4(
14054
14054
  CustomTagsInput,
14055
14055
  {
14056
14056
  value,
@@ -29055,10 +29055,78 @@ function Settings() {
29055
29055
  ] });
29056
29056
  }
29057
29057
  var Settings_default = Settings;
29058
+
29059
+ // src/views/Common/LoginError.tsx
29060
+ import { Button as Button50, SpacingToken as SpacingToken57 } from "@livechat/design-system-react-components";
29061
+ import {
29062
+ Column as Column21,
29063
+ Intro as Intro7,
29064
+ LoginErrorPage as DefaultLoginErrorPage,
29065
+ Row as Row31,
29066
+ theme,
29067
+ useRootContext as useRootContext30
29068
+ } from "@livechat/developer-studio-ui-react";
29069
+
29070
+ // src/assets/flows/workflows-welcome.png
29071
+ var workflows_welcome_default = "./workflows-welcome-N73H5YQR.png";
29072
+
29073
+ // src/views/Common/LoginError.tsx
29074
+ var imgContainerCss2 = css`
29075
+ width: 100%;
29076
+ display: flex;
29077
+ justify-content: center;
29078
+ `;
29079
+ var paragraphCss = (heading) => css`
29080
+ ${heading ? theme.typography.heading.xs : theme.typography.paragraph.s}
29081
+ margin-top: var(${heading ? SpacingToken57.Spacing10 : SpacingToken57.Spacing2});
29082
+ `;
29083
+ var wrapperCss = css`
29084
+ display: flex;
29085
+ flex-direction: column;
29086
+ align-items: center;
29087
+ justify-content: center;
29088
+ height: 100vh;
29089
+ width: 100%;
29090
+ `;
29091
+ function LoginErrorPage() {
29092
+ const { authorize } = useRootContext30();
29093
+ if (getWorkflowEnv("isHeadless")) {
29094
+ return /* @__PURE__ */ jsxs2("div", { css: wrapperCss, children: [
29095
+ /* @__PURE__ */ jsx4(Row31, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsx4(Column21, { center: true, width: 10, children: /* @__PURE__ */ jsx4("div", { css: imgContainerCss2, children: /* @__PURE__ */ jsx4(
29096
+ "img",
29097
+ {
29098
+ alt: "",
29099
+ css: css`
29100
+ width: 600px;
29101
+ margin-bottom: var(${SpacingToken57.Spacing7});
29102
+ `,
29103
+ src: workflows_welcome_default
29104
+ }
29105
+ ) }) }) }),
29106
+ /* @__PURE__ */ jsx4(Row31, { center: true, noMaxWidth: true, verticalCenter: true, children: /* @__PURE__ */ jsxs2(Column21, { center: true, width: 10, children: [
29107
+ /* @__PURE__ */ jsx4(Intro7, { center: true, header: "Welcome to Workflows!", headerSize: "m" }),
29108
+ /* @__PURE__ */ jsx4("p", { css: paragraphCss(false), children: "You're using a browser that required additional login to access Workflows" }),
29109
+ /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
29110
+ Button50,
29111
+ {
29112
+ kind: "primary",
29113
+ onClick: () => {
29114
+ authorize(true);
29115
+ },
29116
+ children: "Login with Text"
29117
+ }
29118
+ ) })
29119
+ ] }) })
29120
+ ] });
29121
+ }
29122
+ return /* @__PURE__ */ jsx4(DefaultLoginErrorPage, {});
29123
+ }
29124
+ var LoginError_default = LoginErrorPage;
29058
29125
  export {
29059
29126
  AuthContext,
29060
29127
  AuthProvider,
29061
29128
  Flows_default as Flows,
29129
+ LoginError_default as LoginError,
29062
29130
  Settings_default as Settings,
29063
29131
  SettingsSubNav,
29064
29132
  getWorkflowEnv,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/platform-workflows",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Text Platform | Workflows",
5
5
  "author": "Wojciech Dudek",
6
6
  "license": "MIT",
@@ -40,8 +40,8 @@
40
40
  "postcss-modules": "^6.0.0",
41
41
  "tsup": "^8.0.0",
42
42
  "typescript": "^5.1.6",
43
- "eslint-config-custom": "0.0.10",
44
- "tsconfig": "0.0.1"
43
+ "tsconfig": "0.0.1",
44
+ "eslint-config-custom": "0.0.10"
45
45
  },
46
46
  "dependencies": {
47
47
  "@lexical/react": "^0.19.0",
@@ -77,8 +77,8 @@
77
77
  "uuid": "^9.0.1",
78
78
  "validator": "^13.12.0",
79
79
  "web-worker": "^1.3.0",
80
- "@livechat/developer-studio-ui-react": "0.0.56",
81
- "@livechat/developer-studio-api": "3.3.7"
80
+ "@livechat/developer-studio-api": "3.3.7",
81
+ "@livechat/developer-studio-ui-react": "0.0.57"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@tanstack/react-query": "4.36.1",