@livechat/platform-workflows 0.0.15 → 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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1094 -822
- package/dist/index.mjs +1172 -891
- package/dist/workflows-welcome-N73H5YQR.png +0 -0
- package/package.json +5 -5
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
|
|
265
|
+
var Fragment46 = 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 =
|
|
324
|
+
exports2.Fragment = Fragment46;
|
|
325
325
|
exports2.Lazy = Lazy;
|
|
326
326
|
exports2.Memo = Memo;
|
|
327
327
|
exports2.Portal = Portal;
|
|
@@ -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,
|
|
@@ -1024,7 +1025,7 @@ var import_react_router_dom33 = require("react-router-dom");
|
|
|
1024
1025
|
// src/views/Flows/Definitions/index.tsx
|
|
1025
1026
|
var import_react145 = require("react");
|
|
1026
1027
|
var import_react_router_dom31 = require("react-router-dom");
|
|
1027
|
-
var
|
|
1028
|
+
var import_developer_studio_ui_react59 = require("@livechat/developer-studio-ui-react");
|
|
1028
1029
|
|
|
1029
1030
|
// src/hooks/state/apps/apps.ts
|
|
1030
1031
|
var import_react2 = require("react");
|
|
@@ -1046,11 +1047,12 @@ var appQueryKeys = {
|
|
|
1046
1047
|
getAppVariables: (appId, decrypted) => ["console.getAppVariables", appId, decrypted].filter(
|
|
1047
1048
|
(criteria) => criteria !== void 0
|
|
1048
1049
|
),
|
|
1049
|
-
getAutoReview: (appId) => ["dps.getAutoReview", appId]
|
|
1050
|
+
getAutoReview: (appId) => ["dps.getAutoReview", appId],
|
|
1051
|
+
getAppInstalled: (appId) => ["dps.getAppInstalled", appId]
|
|
1050
1052
|
};
|
|
1051
1053
|
var useFetchInstalledApp = (appId, license) => {
|
|
1052
1054
|
return (0, import_react_query.useQuery)(
|
|
1053
|
-
appQueryKeys.
|
|
1055
|
+
appQueryKeys.getAppInstalled(appId),
|
|
1054
1056
|
() => __async(void 0, null, function* () {
|
|
1055
1057
|
const { data } = yield import_developer_studio_api2.api.platform.dps.applications.application.install.getInstalledApplication(
|
|
1056
1058
|
appId,
|
|
@@ -1087,7 +1089,7 @@ var useFetchUserInstalledWorkflows = (user) => {
|
|
|
1087
1089
|
// src/views/Flows/Definitions/Edit/index.tsx
|
|
1088
1090
|
var import_react127 = require("react");
|
|
1089
1091
|
var import_react_router_dom21 = require("react-router-dom");
|
|
1090
|
-
var
|
|
1092
|
+
var import_developer_studio_ui_react48 = require("@livechat/developer-studio-ui-react");
|
|
1091
1093
|
|
|
1092
1094
|
// src/views/Flows/Definitions/Common/Builder/config/workflow.ts
|
|
1093
1095
|
var import_developer_studio_api11 = require("@livechat/developer-studio-api");
|
|
@@ -8053,7 +8055,7 @@ var import_react9 = require("react");
|
|
|
8053
8055
|
var import_react_router_dom = require("react-router-dom");
|
|
8054
8056
|
var import_reactflow = require("reactflow");
|
|
8055
8057
|
var import_lodash = require("lodash");
|
|
8056
|
-
var
|
|
8058
|
+
var import_developer_studio_api19 = require("@livechat/developer-studio-api");
|
|
8057
8059
|
var import_developer_studio_ui_react6 = require("@livechat/developer-studio-ui-react");
|
|
8058
8060
|
|
|
8059
8061
|
// src/views/Flows/Definitions/hooks.ts
|
|
@@ -9060,9 +9062,63 @@ var getWorkflowFrames = (workflow, credentials) => {
|
|
|
9060
9062
|
// src/views/Flows/Definitions/Common/Builder/Context/state/metadata/hooks.ts
|
|
9061
9063
|
var import_react6 = require("react");
|
|
9062
9064
|
|
|
9065
|
+
// src/hooks/user.ts
|
|
9066
|
+
var import_react_query4 = require("@tanstack/react-query");
|
|
9067
|
+
var import_developer_studio_api16 = require("@livechat/developer-studio-api");
|
|
9068
|
+
var userQueryKeys = {
|
|
9069
|
+
dps: {
|
|
9070
|
+
getUser: ["dps.getUser"],
|
|
9071
|
+
getUserIntegrations: ["dps.getUserIntegrations"]
|
|
9072
|
+
},
|
|
9073
|
+
livechat: {
|
|
9074
|
+
agent: {
|
|
9075
|
+
getUser: ["livechat.agent.getUser"]
|
|
9076
|
+
}
|
|
9077
|
+
},
|
|
9078
|
+
accounts: {
|
|
9079
|
+
account: {
|
|
9080
|
+
getInfo: ["accounts.account.getInfo"]
|
|
9081
|
+
},
|
|
9082
|
+
products: {
|
|
9083
|
+
getOrganizationProducts: ["accounts.products.getOrganizationProducts"]
|
|
9084
|
+
}
|
|
9085
|
+
}
|
|
9086
|
+
};
|
|
9087
|
+
var useFetchUserIntegrationsQuery = () => {
|
|
9088
|
+
return (0, import_react_query4.useQuery)(
|
|
9089
|
+
userQueryKeys.dps.getUserIntegrations,
|
|
9090
|
+
() => import_developer_studio_api16.api.platform.dps.user.getUserIntegrations()
|
|
9091
|
+
);
|
|
9092
|
+
};
|
|
9093
|
+
var useFetchOrganizationProducts = () => {
|
|
9094
|
+
var _b;
|
|
9095
|
+
const _a = (0, import_react_query4.useQuery)(
|
|
9096
|
+
userQueryKeys.accounts.products.getOrganizationProducts,
|
|
9097
|
+
() => import_developer_studio_api16.api.platform.accounts.products.getOrganizationProducts()
|
|
9098
|
+
), { data, isLoading } = _a, rest = __objRest(_a, ["data", "isLoading"]);
|
|
9099
|
+
return __spreadValues({ data: (_b = data == null ? void 0 : data.data) != null ? _b : [], isLoading }, rest);
|
|
9100
|
+
};
|
|
9101
|
+
var useUpdateOrganizationProducts = () => {
|
|
9102
|
+
const queryClient = (0, import_react_query4.useQueryClient)();
|
|
9103
|
+
const { mutateAsync: updateOrganizationProducts, isLoading } = (0, import_react_query4.useMutation)(
|
|
9104
|
+
({ productName }) => import_developer_studio_api16.api.platform.accounts.products.updateOrganizationProducts({
|
|
9105
|
+
product: productName
|
|
9106
|
+
}),
|
|
9107
|
+
{
|
|
9108
|
+
onSuccess: (_) => {
|
|
9109
|
+
queryClient.refetchQueries({
|
|
9110
|
+
queryKey: userQueryKeys.accounts.products.getOrganizationProducts
|
|
9111
|
+
});
|
|
9112
|
+
}
|
|
9113
|
+
}
|
|
9114
|
+
);
|
|
9115
|
+
return { updateOrganizationProducts, isLoading };
|
|
9116
|
+
};
|
|
9117
|
+
|
|
9063
9118
|
// src/views/Flows/Definitions/Common/Builder/Context/state/metadata/validation/utils.ts
|
|
9064
9119
|
var import_ajv = __toESM(require("ajv"));
|
|
9065
9120
|
var import_ajv_errors = __toESM(require("ajv-errors"));
|
|
9121
|
+
var import_developer_studio_api17 = require("@livechat/developer-studio-api");
|
|
9066
9122
|
var ajv = (0, import_ajv_errors.default)(
|
|
9067
9123
|
new import_ajv.default({
|
|
9068
9124
|
strict: false,
|
|
@@ -9084,8 +9140,12 @@ var getWorkflowValidationErrors = (validationErrors) => {
|
|
|
9084
9140
|
if (!fieldErrors.__errors) {
|
|
9085
9141
|
fieldErrors.__errors = [];
|
|
9086
9142
|
}
|
|
9143
|
+
if (!fieldErrors.__errorsExtended) {
|
|
9144
|
+
fieldErrors.__errorsExtended = [];
|
|
9145
|
+
}
|
|
9087
9146
|
if (item.message && item.message !== 'must match "then" schema') {
|
|
9088
9147
|
fieldErrors.__errors.push(item.message);
|
|
9148
|
+
fieldErrors.__errorsExtended.push(item);
|
|
9089
9149
|
}
|
|
9090
9150
|
} else {
|
|
9091
9151
|
if (!current[head]) {
|
|
@@ -9106,7 +9166,7 @@ var getWorkflowValidationErrors = (validationErrors) => {
|
|
|
9106
9166
|
}
|
|
9107
9167
|
return errors;
|
|
9108
9168
|
};
|
|
9109
|
-
var
|
|
9169
|
+
var getSchemaError = (workflow, frames) => {
|
|
9110
9170
|
const validate = ajv.compile(WORKFLOW_SCHEMA);
|
|
9111
9171
|
const resolved = __spreadProps(__spreadValues({}, workflow), {
|
|
9112
9172
|
definition: __spreadProps(__spreadValues({}, workflow.definition), {
|
|
@@ -9128,101 +9188,122 @@ var getWorkflowValidation = (workflow, frames) => {
|
|
|
9128
9188
|
}
|
|
9129
9189
|
) : void 0
|
|
9130
9190
|
});
|
|
9131
|
-
console.log(resolved);
|
|
9132
9191
|
validate(resolved);
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9192
|
+
return validate.errors || [];
|
|
9193
|
+
};
|
|
9194
|
+
var getTasksErrors = (workflow, frames, products) => {
|
|
9195
|
+
return workflow.definition.tasks.flatMap((task2, index) => {
|
|
9196
|
+
var _a;
|
|
9197
|
+
const globalFrame = frames.global;
|
|
9198
|
+
const frame = frames.tasks[task2.taskReferenceName];
|
|
9199
|
+
const config14 = (_a = frame.__meta) == null ? void 0 : _a.config;
|
|
9200
|
+
const resolvingErrors = workflowBuilderUtils.getMatchesInObject(task2).map((match2) => {
|
|
9201
|
+
var _a2, _b;
|
|
9202
|
+
const segments = match2.rawValue.split(".");
|
|
9203
|
+
const resolved = workflowBuilderUtils.resolveTextByContext(
|
|
9204
|
+
match2.value,
|
|
9205
|
+
frame
|
|
9206
|
+
);
|
|
9207
|
+
let message = `Invalid field value`;
|
|
9208
|
+
const params = {};
|
|
9209
|
+
if (!(frame == null ? void 0 : frame[segments[0]])) {
|
|
9210
|
+
if (segments[0]) {
|
|
9211
|
+
if (globalFrame == null ? void 0 : globalFrame[segments[0]]) {
|
|
9212
|
+
message += " - task not accessible";
|
|
9213
|
+
} else {
|
|
9214
|
+
message += " - task not found";
|
|
9152
9215
|
}
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
return error;
|
|
9161
|
-
}
|
|
9162
|
-
if (!resolved2) {
|
|
9163
|
-
let message = `Invalid field value`;
|
|
9164
|
-
if (segments[0] === "workflow") {
|
|
9165
|
-
if (segments[1] === "input") {
|
|
9166
|
-
if (segments[2] === "body") {
|
|
9167
|
-
if (workflow.trigger.type) {
|
|
9168
|
-
message += " - invalid trigger property";
|
|
9169
|
-
} else {
|
|
9170
|
-
message += " - trigger not found";
|
|
9171
|
-
}
|
|
9216
|
+
}
|
|
9217
|
+
} else {
|
|
9218
|
+
if (segments[0] === "workflow") {
|
|
9219
|
+
if (segments[1] === "input") {
|
|
9220
|
+
if (segments[2] === "body") {
|
|
9221
|
+
if (workflow.trigger.type) {
|
|
9222
|
+
message += " - invalid trigger property";
|
|
9172
9223
|
} else {
|
|
9173
|
-
|
|
9174
|
-
message = `Couldn't use manual parameters when trigger is not manual`;
|
|
9175
|
-
} else {
|
|
9176
|
-
message += " - invalid input property";
|
|
9177
|
-
}
|
|
9224
|
+
message += " - trigger not found";
|
|
9178
9225
|
}
|
|
9179
|
-
} else
|
|
9180
|
-
if (
|
|
9181
|
-
|
|
9182
|
-
message += " - invalid credential";
|
|
9183
|
-
} else {
|
|
9184
|
-
if (segments[3]) {
|
|
9185
|
-
message += " - invalid credential property";
|
|
9186
|
-
} else {
|
|
9187
|
-
message += " - unknown credential";
|
|
9188
|
-
}
|
|
9189
|
-
}
|
|
9226
|
+
} else {
|
|
9227
|
+
if (!workflow.trigger.type || workflow.trigger.type === "recurring" || workflow.trigger.type === "webhook") {
|
|
9228
|
+
message = `Couldn't use manual parameters when trigger is not manual`;
|
|
9190
9229
|
} else {
|
|
9230
|
+
message += " - invalid input property";
|
|
9231
|
+
}
|
|
9232
|
+
}
|
|
9233
|
+
} else if (segments[1] === "credentials") {
|
|
9234
|
+
if (segments[2]) {
|
|
9235
|
+
params.subType = segments[1];
|
|
9236
|
+
params.provider = segments[2];
|
|
9237
|
+
if (!((_b = (_a2 = frame == null ? void 0 : frame.workflow) == null ? void 0 : _a2.credentials) == null ? void 0 : _b[segments[2]])) {
|
|
9191
9238
|
message += " - invalid credential";
|
|
9239
|
+
} else {
|
|
9240
|
+
if (segments[3]) {
|
|
9241
|
+
message += " - invalid credential property";
|
|
9242
|
+
} else {
|
|
9243
|
+
message += " - unknown credential";
|
|
9244
|
+
}
|
|
9192
9245
|
}
|
|
9193
9246
|
} else {
|
|
9194
|
-
message += " - invalid
|
|
9247
|
+
message += " - invalid credential";
|
|
9195
9248
|
}
|
|
9196
9249
|
} else {
|
|
9197
|
-
message += " - invalid
|
|
9198
|
-
}
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
message,
|
|
9202
|
-
keyword: "resolver",
|
|
9203
|
-
schemaPath: "",
|
|
9204
|
-
params: {}
|
|
9205
|
-
};
|
|
9206
|
-
return error;
|
|
9250
|
+
message += " - invalid property";
|
|
9251
|
+
}
|
|
9252
|
+
} else {
|
|
9253
|
+
message += " - invalid task property";
|
|
9207
9254
|
}
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9255
|
+
if (resolved) {
|
|
9256
|
+
return void 0;
|
|
9257
|
+
}
|
|
9258
|
+
}
|
|
9259
|
+
return {
|
|
9260
|
+
instancePath: `/definition/tasks/${index}/${match2.instancePath}`,
|
|
9261
|
+
keyword: "resolver",
|
|
9262
|
+
message,
|
|
9263
|
+
params
|
|
9264
|
+
};
|
|
9265
|
+
}).filter(Boolean);
|
|
9266
|
+
const connectionErrors = resolvingErrors.filter((error) => error.params.subType === "credentials").map((error) => {
|
|
9267
|
+
return {
|
|
9268
|
+
instancePath: `/definition/tasks/${index}`,
|
|
9269
|
+
keyword: "connection",
|
|
9270
|
+
message: `Not connected to ${error.params.provider}`,
|
|
9271
|
+
params: {}
|
|
9272
|
+
};
|
|
9273
|
+
});
|
|
9274
|
+
const activationError = config14 && (config14 == null ? void 0 : config14.customization.provider.startsWith(import_developer_studio_api17.IntegrationNames.Text)) && !products.find(({ product }) => product === config14.customization.product) ? {
|
|
9275
|
+
instancePath: `/definition/tasks/${index}`,
|
|
9276
|
+
keyword: "activation",
|
|
9277
|
+
message: `${config14.customization.product} not activated`,
|
|
9278
|
+
params: {}
|
|
9279
|
+
} : void 0;
|
|
9280
|
+
return [
|
|
9281
|
+
...resolvingErrors,
|
|
9282
|
+
...connectionErrors,
|
|
9283
|
+
...activationError ? [activationError] : []
|
|
9284
|
+
];
|
|
9285
|
+
});
|
|
9286
|
+
};
|
|
9287
|
+
var getTriggerErrors = (workflow, frames, products) => {
|
|
9288
|
+
var _a;
|
|
9289
|
+
const frame = frames.trigger;
|
|
9290
|
+
const config14 = (_a = frame == null ? void 0 : frame.__meta) == null ? void 0 : _a.config;
|
|
9291
|
+
const resolvingErrors = workflowBuilderUtils.getMatchesInObject(workflow.trigger).map((match2) => {
|
|
9292
|
+
var _a2, _b;
|
|
9215
9293
|
const segments = match2.rawValue.split(".");
|
|
9216
|
-
const
|
|
9294
|
+
const resolved = workflowBuilderUtils.resolveTextByContext(
|
|
9217
9295
|
match2.value,
|
|
9218
9296
|
frames.trigger
|
|
9219
9297
|
);
|
|
9220
|
-
if (!
|
|
9298
|
+
if (!resolved) {
|
|
9221
9299
|
let message = `Invalid field value`;
|
|
9300
|
+
const params = {};
|
|
9222
9301
|
if (segments[0] === "workflow") {
|
|
9223
9302
|
if (segments[1] === "credentials") {
|
|
9224
9303
|
if (segments[2]) {
|
|
9225
|
-
|
|
9304
|
+
params.subType = segments[1];
|
|
9305
|
+
params.provider = segments[2];
|
|
9306
|
+
if (!((_b = (_a2 = frame == null ? void 0 : frame.workflow) == null ? void 0 : _a2.credentials) == null ? void 0 : _b[segments[2]])) {
|
|
9226
9307
|
message += " - invalid credential";
|
|
9227
9308
|
} else {
|
|
9228
9309
|
if (segments[3]) {
|
|
@@ -9240,22 +9321,43 @@ var getWorkflowValidation = (workflow, frames) => {
|
|
|
9240
9321
|
} else {
|
|
9241
9322
|
message += " - invalid trigger property";
|
|
9242
9323
|
}
|
|
9243
|
-
|
|
9324
|
+
return {
|
|
9244
9325
|
instancePath: `/trigger/${match2.instancePath}`,
|
|
9245
|
-
message,
|
|
9246
9326
|
keyword: "resolver",
|
|
9247
|
-
|
|
9248
|
-
params
|
|
9327
|
+
message,
|
|
9328
|
+
params
|
|
9249
9329
|
};
|
|
9250
|
-
return error;
|
|
9251
9330
|
}
|
|
9252
9331
|
return void 0;
|
|
9332
|
+
}).filter(Boolean);
|
|
9333
|
+
const connectionErrors = resolvingErrors.filter((error) => error.params.subType === "credentials").map((error) => {
|
|
9334
|
+
return {
|
|
9335
|
+
instancePath: `/trigger`,
|
|
9336
|
+
keyword: "connection",
|
|
9337
|
+
message: `Not connected to ${error.params.provider}`,
|
|
9338
|
+
params: {}
|
|
9339
|
+
};
|
|
9253
9340
|
});
|
|
9254
|
-
const
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9341
|
+
const activationError = config14 && (config14 == null ? void 0 : config14.customization.provider.startsWith(import_developer_studio_api17.IntegrationNames.Text)) && !products.find(({ product }) => product === config14.customization.product) ? {
|
|
9342
|
+
instancePath: `/trigger`,
|
|
9343
|
+
keyword: "activation",
|
|
9344
|
+
message: `${config14.customization.product} not activated`,
|
|
9345
|
+
params: {}
|
|
9346
|
+
} : void 0;
|
|
9347
|
+
console.log("activationError: ", activationError);
|
|
9348
|
+
return [
|
|
9349
|
+
...resolvingErrors,
|
|
9350
|
+
...connectionErrors,
|
|
9351
|
+
...activationError ? [activationError] : []
|
|
9352
|
+
];
|
|
9353
|
+
};
|
|
9354
|
+
var getWorkflowValidation = (workflow, frames, products) => {
|
|
9355
|
+
const schemaError = getSchemaError(workflow, frames);
|
|
9356
|
+
const tasksErrors = getTasksErrors(workflow, frames, products);
|
|
9357
|
+
const triggerErrors = getTriggerErrors(workflow, frames, products);
|
|
9358
|
+
const rawErrors = [...triggerErrors, ...tasksErrors, ...schemaError].filter(
|
|
9359
|
+
(rawError) => Boolean(rawError)
|
|
9360
|
+
).map((rawError) => {
|
|
9259
9361
|
var _a;
|
|
9260
9362
|
let message = rawError.message;
|
|
9261
9363
|
if ("missingProperty" in rawError.params) {
|
|
@@ -9272,7 +9374,6 @@ var getWorkflowValidation = (workflow, frames) => {
|
|
|
9272
9374
|
instanceJsonPath.replaceAll("/", "."),
|
|
9273
9375
|
workflow
|
|
9274
9376
|
)) == null ? void 0 : _a[0] : void 0;
|
|
9275
|
-
console.log(value);
|
|
9276
9377
|
if (value === null) {
|
|
9277
9378
|
message = `This field cannot be empty`;
|
|
9278
9379
|
} else {
|
|
@@ -9294,13 +9395,13 @@ var getWorkflowValidation = (workflow, frames) => {
|
|
|
9294
9395
|
default:
|
|
9295
9396
|
break;
|
|
9296
9397
|
}
|
|
9297
|
-
return {
|
|
9398
|
+
return __spreadProps(__spreadValues({}, rawError), {
|
|
9298
9399
|
message,
|
|
9299
9400
|
instancePath: rawError.instancePath.replace(
|
|
9300
9401
|
/tasks\/(\d+)/,
|
|
9301
9402
|
(_, i) => `tasks/${workflow.definition.tasks[i].taskReferenceName}`
|
|
9302
9403
|
)
|
|
9303
|
-
};
|
|
9404
|
+
});
|
|
9304
9405
|
});
|
|
9305
9406
|
const errors = getWorkflowValidationErrors(rawErrors);
|
|
9306
9407
|
return {
|
|
@@ -9313,15 +9414,20 @@ var getWorkflowValidation = (workflow, frames) => {
|
|
|
9313
9414
|
// src/views/Flows/Definitions/Common/Builder/Context/state/metadata/hooks.ts
|
|
9314
9415
|
function useWorkflowMetadata(workflow) {
|
|
9315
9416
|
const credentialsQuery = useFetchIntegrationCredentialsQuery();
|
|
9417
|
+
const organizationProducts = useFetchOrganizationProducts();
|
|
9316
9418
|
const metadata = (0, import_react6.useMemo)(() => {
|
|
9317
|
-
var _a;
|
|
9419
|
+
var _a, _b;
|
|
9318
9420
|
const frames = getWorkflowFrames(workflow, (_a = credentialsQuery.data) != null ? _a : []);
|
|
9319
|
-
const validation = getWorkflowValidation(
|
|
9421
|
+
const validation = getWorkflowValidation(
|
|
9422
|
+
workflow,
|
|
9423
|
+
frames,
|
|
9424
|
+
(_b = organizationProducts.data) != null ? _b : []
|
|
9425
|
+
);
|
|
9320
9426
|
return {
|
|
9321
9427
|
frames,
|
|
9322
9428
|
validation
|
|
9323
9429
|
};
|
|
9324
|
-
}, [workflow, credentialsQuery.data]);
|
|
9430
|
+
}, [workflow, credentialsQuery.data, organizationProducts.data]);
|
|
9325
9431
|
return {
|
|
9326
9432
|
metadata
|
|
9327
9433
|
};
|
|
@@ -9356,14 +9462,14 @@ function useWorkflowState(workflow, options2) {
|
|
|
9356
9462
|
}
|
|
9357
9463
|
|
|
9358
9464
|
// src/views/Flows/Definitions/Common/Builder/Context/utils.ts
|
|
9359
|
-
var
|
|
9465
|
+
var import_developer_studio_api18 = require("@livechat/developer-studio-api");
|
|
9360
9466
|
var flattenTasks = (tasks) => tasks.flatMap((task2) => {
|
|
9361
|
-
if (task2.type ===
|
|
9467
|
+
if (task2.type === import_developer_studio_api18.WorkflowDefinitionTaskType.switch) {
|
|
9362
9468
|
return [
|
|
9363
9469
|
task2,
|
|
9364
9470
|
...Object.values(task2.decisionCases).flatMap((a) => flattenTasks(a))
|
|
9365
9471
|
];
|
|
9366
|
-
} else if (task2.type ===
|
|
9472
|
+
} else if (task2.type === import_developer_studio_api18.WorkflowDefinitionTaskType.forkJoin) {
|
|
9367
9473
|
return [task2, ...task2.forkTasks.flat()];
|
|
9368
9474
|
} else {
|
|
9369
9475
|
return [task2];
|
|
@@ -9371,7 +9477,7 @@ var flattenTasks = (tasks) => tasks.flatMap((task2) => {
|
|
|
9371
9477
|
});
|
|
9372
9478
|
var applyChange = (workflow, change) => {
|
|
9373
9479
|
var _a, _b;
|
|
9374
|
-
let changed = (0,
|
|
9480
|
+
let changed = (0, import_developer_studio_api18.mergeDeep)(workflow, change);
|
|
9375
9481
|
const inputParameters = Array.from(
|
|
9376
9482
|
new Set(
|
|
9377
9483
|
(_b = (_a = workflowBuilderUtils.getMatchesInText(JSON.stringify(changed))) == null ? void 0 : _a.filter((x) => x.includes("workflow.input.") && !x.includes("body")).map((x) => x.replace("workflow.input.", "")).filter((x) => x.length > 0)) != null ? _b : []
|
|
@@ -10714,10 +10820,10 @@ function WorkflowContextProviderBase({
|
|
|
10714
10820
|
setTimeout(() => {
|
|
10715
10821
|
setSelection(() => {
|
|
10716
10822
|
const isNotEditable = (params == null ? void 0 : params.kind) === "task" && [
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10823
|
+
import_developer_studio_api19.WorkflowDefinitionTaskType.forkJoin,
|
|
10824
|
+
import_developer_studio_api19.WorkflowDefinitionTaskType.join,
|
|
10825
|
+
import_developer_studio_api19.WorkflowDefinitionTaskType.addNode,
|
|
10826
|
+
import_developer_studio_api19.WorkflowDefinitionTaskType.addTrigger
|
|
10721
10827
|
].includes(params.id) || (params == null ? void 0 : params.kind) === "add-trigger" || (params == null ? void 0 : params.kind) === "trigger" && params.id === "manual_only";
|
|
10722
10828
|
return params ? __spreadProps(__spreadValues({}, params), {
|
|
10723
10829
|
isEditable: !isNotEditable
|
|
@@ -11488,7 +11594,7 @@ tags.forEach(function(tagName) {
|
|
|
11488
11594
|
// src/views/Flows/Definitions/Common/Modals/Delete.tsx
|
|
11489
11595
|
var import_design_system_icons34 = require("@livechat/design-system-icons");
|
|
11490
11596
|
var import_design_system_react_components66 = require("@livechat/design-system-react-components");
|
|
11491
|
-
var
|
|
11597
|
+
var import_developer_studio_ui_react41 = require("@livechat/developer-studio-ui-react");
|
|
11492
11598
|
|
|
11493
11599
|
// src/utils/tracking.ts
|
|
11494
11600
|
var import_amplitude_js = __toESM(require("amplitude-js"));
|
|
@@ -11701,7 +11807,7 @@ var import_developer_studio_ui_react10 = require("@livechat/developer-studio-ui-
|
|
|
11701
11807
|
// src/views/Flows/Definitions/Common/Icons/ProductIcon.tsx
|
|
11702
11808
|
var import_design_system_icons2 = require("@livechat/design-system-icons");
|
|
11703
11809
|
var import_design_system_react_components2 = require("@livechat/design-system-react-components");
|
|
11704
|
-
var
|
|
11810
|
+
var import_developer_studio_api20 = require("@livechat/developer-studio-api");
|
|
11705
11811
|
var defaultIconStyle = ({
|
|
11706
11812
|
disabled,
|
|
11707
11813
|
height,
|
|
@@ -11792,11 +11898,11 @@ var ProductIcon = ({
|
|
|
11792
11898
|
})
|
|
11793
11899
|
}
|
|
11794
11900
|
);
|
|
11795
|
-
case
|
|
11901
|
+
case import_developer_studio_api20.IntegrationNames.Mailchimp:
|
|
11796
11902
|
return /* @__PURE__ */ jsx4(import_design_system_icons2.Mailchimp, { css: defaultIconStyle({ disabled, height, width }) });
|
|
11797
|
-
case
|
|
11903
|
+
case import_developer_studio_api20.IntegrationNames.Shopify:
|
|
11798
11904
|
return /* @__PURE__ */ jsx4(import_design_system_icons2.ShopifyColored, { css: defaultIconStyle({ disabled, height, width }) });
|
|
11799
|
-
case
|
|
11905
|
+
case import_developer_studio_api20.IntegrationNames.BigCommerce:
|
|
11800
11906
|
return /* @__PURE__ */ jsx4(
|
|
11801
11907
|
import_design_system_icons2.BigCommerceColored,
|
|
11802
11908
|
{
|
|
@@ -11808,7 +11914,7 @@ var ProductIcon = ({
|
|
|
11808
11914
|
})
|
|
11809
11915
|
}
|
|
11810
11916
|
);
|
|
11811
|
-
case
|
|
11917
|
+
case import_developer_studio_api20.IntegrationNames.HubSpot:
|
|
11812
11918
|
return /* @__PURE__ */ jsx4(import_design_system_icons2.Hubspot, { css: defaultIconStyle({ disabled, height, width }) });
|
|
11813
11919
|
case OTHER_PRODUCT_TYPE.OPENAI:
|
|
11814
11920
|
return /* @__PURE__ */ jsx4(
|
|
@@ -12118,11 +12224,10 @@ var WorkflowEditorRaw = () => {
|
|
|
12118
12224
|
var Editor_default = WorkflowEditorRaw;
|
|
12119
12225
|
|
|
12120
12226
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Panels/Edit/Wrapper.tsx
|
|
12121
|
-
var import_react76 = require("react");
|
|
12122
12227
|
var import_design_system_icons22 = require("@livechat/design-system-icons");
|
|
12123
12228
|
var import_design_system_react_components41 = require("@livechat/design-system-react-components");
|
|
12124
|
-
var
|
|
12125
|
-
var
|
|
12229
|
+
var import_developer_studio_api37 = require("@livechat/developer-studio-api");
|
|
12230
|
+
var import_developer_studio_ui_react35 = require("@livechat/developer-studio-ui-react");
|
|
12126
12231
|
|
|
12127
12232
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/ForkJoinNode/Base.tsx
|
|
12128
12233
|
var import_react19 = require("react");
|
|
@@ -12133,7 +12238,7 @@ var import_design_system_react_components7 = require("@livechat/design-system-re
|
|
|
12133
12238
|
var import_reactflow2 = require("reactflow");
|
|
12134
12239
|
var import_elkjs = __toESM(require("elkjs"));
|
|
12135
12240
|
var import_design_system_react_components6 = require("@livechat/design-system-react-components");
|
|
12136
|
-
var
|
|
12241
|
+
var import_developer_studio_api21 = require("@livechat/developer-studio-api");
|
|
12137
12242
|
var DEFAULT_NODE_WIDTH = {
|
|
12138
12243
|
[NodeTypes.http]: 180,
|
|
12139
12244
|
[NodeTypes.forkJoin]: 140,
|
|
@@ -12210,19 +12315,19 @@ var customNode = ({
|
|
|
12210
12315
|
};
|
|
12211
12316
|
var getCustomNodeType = (taskType) => {
|
|
12212
12317
|
switch (taskType) {
|
|
12213
|
-
case
|
|
12318
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.http:
|
|
12214
12319
|
return NodeTypes.http;
|
|
12215
|
-
case
|
|
12320
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.forkJoin:
|
|
12216
12321
|
return NodeTypes.forkJoin;
|
|
12217
|
-
case
|
|
12322
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.switch:
|
|
12218
12323
|
return NodeTypes.switch;
|
|
12219
|
-
case
|
|
12324
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.terminate:
|
|
12220
12325
|
return NodeTypes.terminate;
|
|
12221
|
-
case
|
|
12326
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.join:
|
|
12222
12327
|
return NodeTypes.join;
|
|
12223
|
-
case
|
|
12328
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.addNode:
|
|
12224
12329
|
return NodeTypes.addNode;
|
|
12225
|
-
case
|
|
12330
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.trigger:
|
|
12226
12331
|
return NodeTypes.trigger;
|
|
12227
12332
|
default:
|
|
12228
12333
|
return NodeTypes.http;
|
|
@@ -12236,12 +12341,12 @@ var convertToNodes = (tasks, originalTasks, parentIndex = 0, parentTaskReference
|
|
|
12236
12341
|
);
|
|
12237
12342
|
const targets = [];
|
|
12238
12343
|
switch (type) {
|
|
12239
|
-
case
|
|
12240
|
-
case
|
|
12241
|
-
case
|
|
12242
|
-
case
|
|
12243
|
-
case
|
|
12244
|
-
case
|
|
12344
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.terminate:
|
|
12345
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.http:
|
|
12346
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.join:
|
|
12347
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.addNode:
|
|
12348
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.addTrigger:
|
|
12349
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.trigger:
|
|
12245
12350
|
const targetHandler = () => {
|
|
12246
12351
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2;
|
|
12247
12352
|
if (parentTaskReferenceName == null ? void 0 : parentTaskReferenceName.includes("fork")) {
|
|
@@ -12280,7 +12385,7 @@ var convertToNodes = (tasks, originalTasks, parentIndex = 0, parentTaskReference
|
|
|
12280
12385
|
});
|
|
12281
12386
|
nodes.push(node2);
|
|
12282
12387
|
return nodes;
|
|
12283
|
-
case
|
|
12388
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.switch:
|
|
12284
12389
|
Object.keys((_b = workflowTask.decisionCases) != null ? _b : {}).forEach(
|
|
12285
12390
|
(decisionCase) => {
|
|
12286
12391
|
var _a2;
|
|
@@ -12344,7 +12449,7 @@ var convertToNodes = (tasks, originalTasks, parentIndex = 0, parentTaskReference
|
|
|
12344
12449
|
});
|
|
12345
12450
|
}
|
|
12346
12451
|
return nodes;
|
|
12347
|
-
case
|
|
12452
|
+
case import_developer_studio_api21.WorkflowDefinitionTaskType.forkJoin:
|
|
12348
12453
|
(_i = workflowTask.forkTasks) == null ? void 0 : _i.forEach(
|
|
12349
12454
|
(forkTask) => {
|
|
12350
12455
|
forkTask.forEach((task2, index2) => {
|
|
@@ -13787,7 +13892,7 @@ var CustomTagsField = ({
|
|
|
13787
13892
|
error,
|
|
13788
13893
|
trim: trim2,
|
|
13789
13894
|
disabled,
|
|
13790
|
-
wrapperCss,
|
|
13895
|
+
wrapperCss: wrapperCss2,
|
|
13791
13896
|
onChange
|
|
13792
13897
|
}) => {
|
|
13793
13898
|
const wrapperRef = (0, import_react30.useRef)(null);
|
|
@@ -13795,7 +13900,7 @@ var CustomTagsField = ({
|
|
|
13795
13900
|
(0, import_developer_studio_ui_react16.useOnClickOutside)(wrapperRef, () => {
|
|
13796
13901
|
setIsPickerVisible(false);
|
|
13797
13902
|
});
|
|
13798
|
-
return /* @__PURE__ */ jsx4("div", { ref: wrapperRef, css:
|
|
13903
|
+
return /* @__PURE__ */ jsx4("div", { ref: wrapperRef, css: wrapperCss2, children: /* @__PURE__ */ jsx4(
|
|
13799
13904
|
CustomTagsInput,
|
|
13800
13905
|
{
|
|
13801
13906
|
value,
|
|
@@ -14817,7 +14922,7 @@ var Node_default = (0, import_react44.memo)(ForkJoinNode);
|
|
|
14817
14922
|
var import_react45 = require("react");
|
|
14818
14923
|
var import_design_system_icons12 = require("@livechat/design-system-icons");
|
|
14819
14924
|
var import_design_system_react_components27 = require("@livechat/design-system-react-components");
|
|
14820
|
-
var
|
|
14925
|
+
var import_developer_studio_api22 = require("@livechat/developer-studio-api");
|
|
14821
14926
|
var import_developer_studio_ui_react19 = require("@livechat/developer-studio-ui-react");
|
|
14822
14927
|
var Node2 = newStyled.div`
|
|
14823
14928
|
background-color: ${({ editing }) => editing ? `var(${import_design_system_react_components27.DesignToken.SurfacePrimaryActive})` : `var(${import_design_system_react_components27.DesignToken.SurfacePrimaryDefault})`};
|
|
@@ -14868,7 +14973,7 @@ var HttpNodeBase = ({
|
|
|
14868
14973
|
} = useWorkflowContext();
|
|
14869
14974
|
const frame = frames.tasks[data.taskReferenceName];
|
|
14870
14975
|
const customization = (_b = (_a = frame == null ? void 0 : frame.__meta) == null ? void 0 : _a.config) == null ? void 0 : _b.customization;
|
|
14871
|
-
const revertIconColor = getWorkflowEnv2("isHeadless") && ((customization == null ? void 0 : customization.icon) ===
|
|
14976
|
+
const revertIconColor = getWorkflowEnv2("isHeadless") && ((customization == null ? void 0 : customization.icon) === import_developer_studio_api22.IntegrationNames.OpenAI || (customization == null ? void 0 : customization.icon) === import_developer_studio_api22.IntegrationNames.BigCommerce);
|
|
14872
14977
|
return /* @__PURE__ */ jsxs2(
|
|
14873
14978
|
Node2,
|
|
14874
14979
|
{
|
|
@@ -14940,30 +15045,27 @@ var HttpNodeBase = ({
|
|
|
14940
15045
|
};
|
|
14941
15046
|
var Base_default2 = HttpNodeBase;
|
|
14942
15047
|
|
|
14943
|
-
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/HttpNode/Form.tsx
|
|
14944
|
-
var import_developer_studio_api32 = require("@livechat/developer-studio-api");
|
|
14945
|
-
|
|
14946
15048
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/Wrapper.tsx
|
|
14947
|
-
var
|
|
15049
|
+
var import_react65 = require("react");
|
|
14948
15050
|
var import_design_system_icons19 = require("@livechat/design-system-icons");
|
|
14949
15051
|
var import_design_system_react_components35 = require("@livechat/design-system-react-components");
|
|
14950
|
-
var
|
|
15052
|
+
var import_developer_studio_api35 = require("@livechat/developer-studio-api");
|
|
14951
15053
|
|
|
14952
15054
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/integrations/BigCommerce/index.tsx
|
|
14953
15055
|
var import_react50 = require("react");
|
|
14954
15056
|
var import_react_router_dom6 = require("react-router-dom");
|
|
14955
|
-
var
|
|
15057
|
+
var import_react_query5 = require("@tanstack/react-query");
|
|
14956
15058
|
var import_design_system2 = require("@livechat/design-system");
|
|
14957
15059
|
var import_design_system_icons13 = require("@livechat/design-system-icons");
|
|
14958
15060
|
var import_design_system_react_components29 = require("@livechat/design-system-react-components");
|
|
14959
15061
|
var import_developer_studio_ui_react25 = require("@livechat/developer-studio-ui-react");
|
|
14960
15062
|
|
|
14961
15063
|
// src/hooks/integrations/bigcommerce/credentials.ts
|
|
14962
|
-
var
|
|
15064
|
+
var import_developer_studio_api23 = require("@livechat/developer-studio-api");
|
|
14963
15065
|
var useFetchBigCommerceCredentials = () => {
|
|
14964
15066
|
var _a, _b;
|
|
14965
15067
|
const credentialsQuery = useFetchIntegrationCredentialsQuery(
|
|
14966
|
-
|
|
15068
|
+
import_developer_studio_api23.IntegrationNames.BigCommerce
|
|
14967
15069
|
);
|
|
14968
15070
|
const oauthCredential = (_a = credentialsQuery.data) == null ? void 0 : _a.find(
|
|
14969
15071
|
(credential) => credential.type === "oauth2" && credential.data.client_id === getWorkflowEnv("bigcommerceClientId")
|
|
@@ -14981,14 +15083,14 @@ var useFetchBigCommerceCredentials = () => {
|
|
|
14981
15083
|
|
|
14982
15084
|
// src/views/Settings/Integrations/BigCommerce/Action.tsx
|
|
14983
15085
|
var import_react49 = require("react");
|
|
14984
|
-
var
|
|
15086
|
+
var import_developer_studio_api25 = require("@livechat/developer-studio-api");
|
|
14985
15087
|
var import_developer_studio_ui_react24 = require("@livechat/developer-studio-ui-react");
|
|
14986
15088
|
|
|
14987
15089
|
// src/views/Settings/Integrations/Common/IntegrationAction.tsx
|
|
14988
15090
|
var import_react48 = require("react");
|
|
14989
15091
|
var import_react_router_dom5 = require("react-router-dom");
|
|
14990
15092
|
var import_uuid = require("uuid");
|
|
14991
|
-
var
|
|
15093
|
+
var import_developer_studio_api24 = require("@livechat/developer-studio-api");
|
|
14992
15094
|
var import_developer_studio_ui_react23 = require("@livechat/developer-studio-ui-react");
|
|
14993
15095
|
|
|
14994
15096
|
// src/views/Settings/Integrations/Common/IntegrationCallback.tsx
|
|
@@ -15181,43 +15283,52 @@ function IntegrationAction(props) {
|
|
|
15181
15283
|
}
|
|
15182
15284
|
function executeIntegrationAction(props, meta) {
|
|
15183
15285
|
return __async(this, null, function* () {
|
|
15184
|
-
var _a, _b;
|
|
15286
|
+
var _a, _b, _c;
|
|
15185
15287
|
if (!meta.user.profile.id || !props.data) {
|
|
15186
15288
|
return;
|
|
15187
15289
|
}
|
|
15188
15290
|
const serializedActionData = serializeContextState(props.data);
|
|
15189
|
-
if (props.name ===
|
|
15190
|
-
(0
|
|
15191
|
-
|
|
15192
|
-
|
|
15193
|
-
)
|
|
15194
|
-
|
|
15195
|
-
|
|
15291
|
+
if (props.name === import_developer_studio_api24.IntegrationNames.Accounts) {
|
|
15292
|
+
if (((_a = props.trigger) == null ? void 0 : _a.mode) === import_developer_studio_api24.IntegrationModes.Modal) {
|
|
15293
|
+
const result = yield (0, import_developer_studio_ui_react23.getAccountsSDK)().popup({
|
|
15294
|
+
state: serializedActionData
|
|
15295
|
+
}).authorize();
|
|
15296
|
+
if (props.onSuccess && result.access_token) {
|
|
15297
|
+
props.onSuccess(result);
|
|
15298
|
+
}
|
|
15299
|
+
} else {
|
|
15300
|
+
(0, import_developer_studio_ui_react23.getAccountsSDK)().redirect({
|
|
15301
|
+
redirect_uri: `${window.location.origin}${getWorkflowEnv(
|
|
15302
|
+
"publicUrl"
|
|
15303
|
+
)}/settings/integrations/${props.name}/callback/${props.action}`,
|
|
15304
|
+
state: serializedActionData
|
|
15305
|
+
}).authorize();
|
|
15306
|
+
}
|
|
15196
15307
|
} else if (!window.Cypress) {
|
|
15197
|
-
const output = yield (0,
|
|
15308
|
+
const output = yield (0, import_developer_studio_api24.getIntegrationFlowUrl)(
|
|
15198
15309
|
props.name,
|
|
15199
15310
|
props.action,
|
|
15200
|
-
props.trigger.mode ===
|
|
15311
|
+
props.trigger.mode === import_developer_studio_api24.IntegrationModes.Modal ? {
|
|
15201
15312
|
mode: props.trigger.mode
|
|
15202
15313
|
} : {
|
|
15203
|
-
mode:
|
|
15314
|
+
mode: import_developer_studio_api24.IntegrationModes.Redirect,
|
|
15204
15315
|
redirectUrl: `${window.location.origin}${getWorkflowEnv(
|
|
15205
15316
|
"publicUrl"
|
|
15206
15317
|
)}/settings/integrations/${props.name}/callback/${props.action}`
|
|
15207
15318
|
},
|
|
15208
|
-
(
|
|
15319
|
+
(_b = props.context) != null ? _b : {},
|
|
15209
15320
|
serializedActionData,
|
|
15210
15321
|
{
|
|
15211
15322
|
user: {
|
|
15212
15323
|
id: meta.user.profile.id,
|
|
15213
|
-
token: (
|
|
15324
|
+
token: (_c = (0, import_developer_studio_ui_react23.getCookie)("access_token")) != null ? _c : ""
|
|
15214
15325
|
},
|
|
15215
15326
|
urls: {
|
|
15216
15327
|
adapterUrl: `${getWorkflowEnv("adapterUrl")}`
|
|
15217
15328
|
}
|
|
15218
15329
|
}
|
|
15219
15330
|
);
|
|
15220
|
-
if (output && props.trigger.mode ===
|
|
15331
|
+
if (output && props.trigger.mode === import_developer_studio_api24.IntegrationModes.Modal) {
|
|
15221
15332
|
const response = integrationHandlerWrapper(
|
|
15222
15333
|
output,
|
|
15223
15334
|
props.trigger.handler,
|
|
@@ -15247,7 +15358,7 @@ var BigCommerceAction = (props) => {
|
|
|
15247
15358
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
15248
15359
|
IntegrationAction_default,
|
|
15249
15360
|
{
|
|
15250
|
-
name:
|
|
15361
|
+
name: import_developer_studio_api25.IntegrationNames.BigCommerce,
|
|
15251
15362
|
action,
|
|
15252
15363
|
data: props.data,
|
|
15253
15364
|
context: props.context,
|
|
@@ -15255,7 +15366,7 @@ var BigCommerceAction = (props) => {
|
|
|
15255
15366
|
serializedContext: match2.params.context,
|
|
15256
15367
|
executor: props.executor,
|
|
15257
15368
|
trigger: {
|
|
15258
|
-
mode:
|
|
15369
|
+
mode: import_developer_studio_api25.IntegrationModes.Modal,
|
|
15259
15370
|
handler: (output) => bigCommerceActionHandlers(login)[action](output)
|
|
15260
15371
|
},
|
|
15261
15372
|
onSuccess: props.onSuccess
|
|
@@ -15265,9 +15376,9 @@ var BigCommerceAction = (props) => {
|
|
|
15265
15376
|
function triggerBigCommerceAction(props, meta) {
|
|
15266
15377
|
return executeIntegrationAction(
|
|
15267
15378
|
__spreadProps(__spreadValues({}, props), {
|
|
15268
|
-
name:
|
|
15379
|
+
name: import_developer_studio_api25.IntegrationNames.BigCommerce,
|
|
15269
15380
|
trigger: {
|
|
15270
|
-
mode:
|
|
15381
|
+
mode: import_developer_studio_api25.IntegrationModes.Modal,
|
|
15271
15382
|
handler: (output) => bigCommerceActionHandlers(meta.login)[props.action](output)
|
|
15272
15383
|
}
|
|
15273
15384
|
}),
|
|
@@ -15279,7 +15390,7 @@ var bigCommerceActionHandlers = (login) => {
|
|
|
15279
15390
|
authorize: (output) => {
|
|
15280
15391
|
if (output.status === "success" && output.result.token) {
|
|
15281
15392
|
login({
|
|
15282
|
-
source:
|
|
15393
|
+
source: import_developer_studio_api25.IntegrationNames.BigCommerce,
|
|
15283
15394
|
data: { token: output.result.token, shop: output.result.shop }
|
|
15284
15395
|
});
|
|
15285
15396
|
return {
|
|
@@ -15352,7 +15463,7 @@ var noteStyles = css`
|
|
|
15352
15463
|
function BigCommerce() {
|
|
15353
15464
|
var _a, _b;
|
|
15354
15465
|
const { pathname } = (0, import_react_router_dom6.useLocation)();
|
|
15355
|
-
const queryClient = (0,
|
|
15466
|
+
const queryClient = (0, import_react_query5.useQueryClient)();
|
|
15356
15467
|
const credentialsQuery = useFetchBigCommerceCredentials();
|
|
15357
15468
|
const { login } = (0, import_react50.useContext)(AuthContext);
|
|
15358
15469
|
const {
|
|
@@ -15575,16 +15686,16 @@ var BigCommerce_default = (0, import_design_system2.notificationConnect)(BigComm
|
|
|
15575
15686
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/integrations/HubSpot/index.tsx
|
|
15576
15687
|
var import_react53 = require("react");
|
|
15577
15688
|
var import_react_router_dom7 = require("react-router-dom");
|
|
15578
|
-
var
|
|
15689
|
+
var import_react_query6 = require("@tanstack/react-query");
|
|
15579
15690
|
var import_design_system_icons14 = require("@livechat/design-system-icons");
|
|
15580
15691
|
var import_design_system_react_components30 = require("@livechat/design-system-react-components");
|
|
15581
15692
|
|
|
15582
15693
|
// src/hooks/integrations/hubspot/credentials.ts
|
|
15583
|
-
var
|
|
15694
|
+
var import_developer_studio_api26 = require("@livechat/developer-studio-api");
|
|
15584
15695
|
var useFetchHubspotCredentials = () => {
|
|
15585
15696
|
var _a, _b;
|
|
15586
15697
|
const credentialsQuery = useFetchIntegrationCredentialsQuery(
|
|
15587
|
-
|
|
15698
|
+
import_developer_studio_api26.IntegrationNames.HubSpot
|
|
15588
15699
|
);
|
|
15589
15700
|
const oauthCredential = (_a = credentialsQuery.data) == null ? void 0 : _a.find(
|
|
15590
15701
|
(credential) => credential.type === "oauth2" && credential.data.client_id === getWorkflowEnv("hubpotClientId")
|
|
@@ -15602,7 +15713,7 @@ var useFetchHubspotCredentials = () => {
|
|
|
15602
15713
|
|
|
15603
15714
|
// src/views/Settings/Integrations/HubSpot/Action.tsx
|
|
15604
15715
|
var import_react52 = require("react");
|
|
15605
|
-
var
|
|
15716
|
+
var import_developer_studio_api27 = require("@livechat/developer-studio-api");
|
|
15606
15717
|
var import_developer_studio_ui_react26 = require("@livechat/developer-studio-ui-react");
|
|
15607
15718
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
15608
15719
|
var HubSpotAction = (props) => {
|
|
@@ -15616,7 +15727,7 @@ var HubSpotAction = (props) => {
|
|
|
15616
15727
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
15617
15728
|
IntegrationAction_default,
|
|
15618
15729
|
{
|
|
15619
|
-
name:
|
|
15730
|
+
name: import_developer_studio_api27.IntegrationNames.HubSpot,
|
|
15620
15731
|
action,
|
|
15621
15732
|
data: props.data,
|
|
15622
15733
|
context: props.context,
|
|
@@ -15624,7 +15735,7 @@ var HubSpotAction = (props) => {
|
|
|
15624
15735
|
serializedContext: match2.params.context,
|
|
15625
15736
|
executor: props.executor,
|
|
15626
15737
|
trigger: {
|
|
15627
|
-
mode:
|
|
15738
|
+
mode: import_developer_studio_api27.IntegrationModes.Modal,
|
|
15628
15739
|
handler: (output) => hubSpotActionHandlers(login)[action](output)
|
|
15629
15740
|
},
|
|
15630
15741
|
onSuccess: props.onSuccess
|
|
@@ -15636,7 +15747,7 @@ var hubSpotActionHandlers = (login) => {
|
|
|
15636
15747
|
authorize: (output) => {
|
|
15637
15748
|
if (output.status === "success" && output.result.token) {
|
|
15638
15749
|
login({
|
|
15639
|
-
source:
|
|
15750
|
+
source: import_developer_studio_api27.IntegrationNames.HubSpot,
|
|
15640
15751
|
data: { token: output.result.token }
|
|
15641
15752
|
});
|
|
15642
15753
|
return {
|
|
@@ -15689,7 +15800,7 @@ var connectionStyles2 = css`
|
|
|
15689
15800
|
var HubSpot = () => {
|
|
15690
15801
|
var _a;
|
|
15691
15802
|
const { pathname } = (0, import_react_router_dom7.useLocation)();
|
|
15692
|
-
const queryClient = (0,
|
|
15803
|
+
const queryClient = (0, import_react_query6.useQueryClient)();
|
|
15693
15804
|
const credentialsQuery = useFetchHubspotCredentials();
|
|
15694
15805
|
const oauthCredential = credentialsQuery.data.internal;
|
|
15695
15806
|
const connected = (_a = credentialsQuery.data.internal) == null ? void 0 : _a.data.connected;
|
|
@@ -15759,16 +15870,16 @@ var HubSpot_default = HubSpot;
|
|
|
15759
15870
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/integrations/Mailchimp/index.tsx
|
|
15760
15871
|
var import_react56 = require("react");
|
|
15761
15872
|
var import_react_router_dom8 = require("react-router-dom");
|
|
15762
|
-
var
|
|
15873
|
+
var import_react_query7 = require("@tanstack/react-query");
|
|
15763
15874
|
var import_design_system_icons15 = require("@livechat/design-system-icons");
|
|
15764
15875
|
var import_design_system_react_components31 = require("@livechat/design-system-react-components");
|
|
15765
15876
|
|
|
15766
15877
|
// src/hooks/integrations/mailchimp/credentials.ts
|
|
15767
|
-
var
|
|
15878
|
+
var import_developer_studio_api28 = require("@livechat/developer-studio-api");
|
|
15768
15879
|
var useFetchMailchimpCredentials = () => {
|
|
15769
15880
|
var _a, _b;
|
|
15770
15881
|
const credentialsQuery = useFetchIntegrationCredentialsQuery(
|
|
15771
|
-
|
|
15882
|
+
import_developer_studio_api28.IntegrationNames.Mailchimp
|
|
15772
15883
|
);
|
|
15773
15884
|
const oauthCredential = (_a = credentialsQuery.data) == null ? void 0 : _a.find(
|
|
15774
15885
|
(credential) => credential.type === "oauth2" && credential.data.client_id === getWorkflowEnv("mailchimpClientId")
|
|
@@ -15786,7 +15897,7 @@ var useFetchMailchimpCredentials = () => {
|
|
|
15786
15897
|
|
|
15787
15898
|
// src/views/Settings/Integrations/Mailchimp/Action.tsx
|
|
15788
15899
|
var import_react55 = require("react");
|
|
15789
|
-
var
|
|
15900
|
+
var import_developer_studio_api29 = require("@livechat/developer-studio-api");
|
|
15790
15901
|
var import_developer_studio_ui_react27 = require("@livechat/developer-studio-ui-react");
|
|
15791
15902
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
15792
15903
|
var MailchimpAction = (props) => {
|
|
@@ -15800,7 +15911,7 @@ var MailchimpAction = (props) => {
|
|
|
15800
15911
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15801
15912
|
IntegrationAction_default,
|
|
15802
15913
|
{
|
|
15803
|
-
name:
|
|
15914
|
+
name: import_developer_studio_api29.IntegrationNames.Mailchimp,
|
|
15804
15915
|
action,
|
|
15805
15916
|
data: props.data,
|
|
15806
15917
|
context: props.context,
|
|
@@ -15808,7 +15919,7 @@ var MailchimpAction = (props) => {
|
|
|
15808
15919
|
serializedContext: match2.params.context,
|
|
15809
15920
|
executor: props.executor,
|
|
15810
15921
|
trigger: {
|
|
15811
|
-
mode:
|
|
15922
|
+
mode: import_developer_studio_api29.IntegrationModes.Modal,
|
|
15812
15923
|
handler: (output) => mailchimpActionHandlers(login)[action](output)
|
|
15813
15924
|
},
|
|
15814
15925
|
onSuccess: props.onSuccess
|
|
@@ -15820,7 +15931,7 @@ var mailchimpActionHandlers = (login) => {
|
|
|
15820
15931
|
authorize: (output) => {
|
|
15821
15932
|
if (output.status === "success" && output.result.token) {
|
|
15822
15933
|
login({
|
|
15823
|
-
source:
|
|
15934
|
+
source: import_developer_studio_api29.IntegrationNames.Mailchimp,
|
|
15824
15935
|
data: { token: output.result.token, server: output.result.server }
|
|
15825
15936
|
});
|
|
15826
15937
|
return {
|
|
@@ -15873,7 +15984,7 @@ var connectionStyles3 = css`
|
|
|
15873
15984
|
var Mailchimp = () => {
|
|
15874
15985
|
var _a;
|
|
15875
15986
|
const { pathname } = (0, import_react_router_dom8.useLocation)();
|
|
15876
|
-
const queryClient = (0,
|
|
15987
|
+
const queryClient = (0, import_react_query7.useQueryClient)();
|
|
15877
15988
|
const credentialsQuery = useFetchMailchimpCredentials();
|
|
15878
15989
|
const oauthCredential = credentialsQuery.data.internal;
|
|
15879
15990
|
const connected = (_a = credentialsQuery.data.internal) == null ? void 0 : _a.data.connected;
|
|
@@ -15942,8 +16053,10 @@ var Mailchimp_default = Mailchimp;
|
|
|
15942
16053
|
|
|
15943
16054
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/integrations/OpenAI/index.tsx
|
|
15944
16055
|
var import_react58 = require("react");
|
|
16056
|
+
var import_react_query8 = require("@tanstack/react-query");
|
|
15945
16057
|
var import_design_system_icons16 = require("@livechat/design-system-icons");
|
|
15946
16058
|
var import_design_system_react_components32 = require("@livechat/design-system-react-components");
|
|
16059
|
+
var import_developer_studio_api30 = require("@livechat/developer-studio-api");
|
|
15947
16060
|
var import_developer_studio_ui_react28 = require("@livechat/developer-studio-ui-react");
|
|
15948
16061
|
var wrapperStyles4 = css`
|
|
15949
16062
|
width: 100%;
|
|
@@ -15977,23 +16090,49 @@ var actionsStyles = css`
|
|
|
15977
16090
|
flex-direction: column;
|
|
15978
16091
|
margin-block-start: var(${import_design_system_react_components32.SpacingToken.Spacing7});
|
|
15979
16092
|
`;
|
|
15980
|
-
|
|
16093
|
+
function OpenAI() {
|
|
15981
16094
|
var _a;
|
|
15982
16095
|
const [loading, setLoading] = (0, import_react58.useState)(false);
|
|
15983
|
-
const [error, setError] = (0, import_react58.useState)(
|
|
16096
|
+
const [error, setError] = (0, import_react58.useState)();
|
|
16097
|
+
const queryClient = (0, import_react_query8.useQueryClient)();
|
|
15984
16098
|
const credentialQuery = useFetchIntegrationCredentialQuery("openai");
|
|
15985
16099
|
const createCredential = useCreateIntegrationCredential();
|
|
15986
16100
|
const updateCredential = useUpdateIntegrationCredential();
|
|
15987
16101
|
const connected = Boolean((_a = credentialQuery.data) == null ? void 0 : _a.name);
|
|
15988
16102
|
const [openAiToken, setOpenAiToken] = (0, import_react58.useState)("");
|
|
15989
|
-
const
|
|
16103
|
+
const refetch = (0, import_react58.useCallback)(() => {
|
|
16104
|
+
credentialQuery.refetch();
|
|
16105
|
+
queryClient.invalidateQueries(
|
|
16106
|
+
integrationCredentialsQueryKeys.getCredentials()
|
|
16107
|
+
);
|
|
16108
|
+
}, [credentialQuery, queryClient]);
|
|
16109
|
+
const validateToken = () => __async(this, null, function* () {
|
|
16110
|
+
setLoading(true);
|
|
16111
|
+
try {
|
|
16112
|
+
const isValid = yield import_developer_studio_api30.api.integrations.openai.verifyToken(openAiToken);
|
|
16113
|
+
if (!isValid) {
|
|
16114
|
+
setError("Invalid API KEY");
|
|
16115
|
+
}
|
|
16116
|
+
return isValid;
|
|
16117
|
+
} catch (e) {
|
|
16118
|
+
setError("Invalid API KEY");
|
|
16119
|
+
return false;
|
|
16120
|
+
} finally {
|
|
16121
|
+
setLoading(false);
|
|
16122
|
+
}
|
|
16123
|
+
});
|
|
16124
|
+
const handleConnect = () => __async(this, null, function* () {
|
|
15990
16125
|
if (!openAiToken) {
|
|
15991
|
-
setError(
|
|
16126
|
+
setError("Cannot be empty");
|
|
16127
|
+
return;
|
|
16128
|
+
}
|
|
16129
|
+
const isValid = yield validateToken();
|
|
16130
|
+
if (!isValid) {
|
|
15992
16131
|
return;
|
|
15993
16132
|
}
|
|
15994
16133
|
try {
|
|
15995
16134
|
setLoading(true);
|
|
15996
|
-
createCredential.mutateAsync({
|
|
16135
|
+
yield createCredential.mutateAsync({
|
|
15997
16136
|
name: "openai",
|
|
15998
16137
|
description: "",
|
|
15999
16138
|
provider: "openai",
|
|
@@ -16002,16 +16141,21 @@ var OpenAI = () => {
|
|
|
16002
16141
|
api_key: openAiToken
|
|
16003
16142
|
}
|
|
16004
16143
|
});
|
|
16144
|
+
refetch();
|
|
16005
16145
|
} catch (error2) {
|
|
16006
|
-
setError(
|
|
16146
|
+
setError(error2.message);
|
|
16007
16147
|
} finally {
|
|
16008
16148
|
setLoading(false);
|
|
16009
16149
|
setOpenAiToken("");
|
|
16010
16150
|
}
|
|
16011
|
-
};
|
|
16012
|
-
const handleUpdate = () => {
|
|
16151
|
+
});
|
|
16152
|
+
const handleUpdate = () => __async(this, null, function* () {
|
|
16013
16153
|
if (!openAiToken) {
|
|
16014
|
-
setError(
|
|
16154
|
+
setError("Cannot be empty");
|
|
16155
|
+
return;
|
|
16156
|
+
}
|
|
16157
|
+
const isValid = yield validateToken();
|
|
16158
|
+
if (!isValid) {
|
|
16015
16159
|
return;
|
|
16016
16160
|
}
|
|
16017
16161
|
try {
|
|
@@ -16025,30 +16169,31 @@ var OpenAI = () => {
|
|
|
16025
16169
|
api_key: openAiToken
|
|
16026
16170
|
}
|
|
16027
16171
|
});
|
|
16172
|
+
refetch();
|
|
16028
16173
|
} catch (error2) {
|
|
16029
|
-
setError(
|
|
16174
|
+
setError(error2.message);
|
|
16030
16175
|
} finally {
|
|
16031
16176
|
setLoading(false);
|
|
16032
16177
|
setOpenAiToken("");
|
|
16033
16178
|
}
|
|
16034
|
-
};
|
|
16179
|
+
});
|
|
16035
16180
|
const handleChange = (e) => {
|
|
16036
16181
|
setOpenAiToken(e.target.value);
|
|
16037
16182
|
if (e.target.value) {
|
|
16038
|
-
setError(
|
|
16183
|
+
setError(void 0);
|
|
16039
16184
|
}
|
|
16040
16185
|
};
|
|
16041
16186
|
return /* @__PURE__ */ jsxs2("div", { css: wrapperStyles4, children: [
|
|
16042
16187
|
/* @__PURE__ */ jsxs2("div", { css: connectionStyles4, children: [
|
|
16043
16188
|
/* @__PURE__ */ jsxs2("span", { children: [
|
|
16044
16189
|
/* @__PURE__ */ jsx4(import_design_system_react_components32.Icon, { source: import_design_system_icons16.Chatgpt }),
|
|
16045
|
-
/* @__PURE__ */ jsx4(import_design_system_react_components32.Text, { size: "lg",
|
|
16190
|
+
/* @__PURE__ */ jsx4(import_design_system_react_components32.Text, { bold: true, size: "lg", children: "OpenAI" })
|
|
16046
16191
|
] }),
|
|
16047
16192
|
connected ? /* @__PURE__ */ jsx4(
|
|
16048
16193
|
import_design_system_react_components32.Tag,
|
|
16049
16194
|
{
|
|
16050
16195
|
kind: "success",
|
|
16051
|
-
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components32.Icon, { source: import_design_system_icons16.CheckCircle
|
|
16196
|
+
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components32.Icon, { size: "small", source: import_design_system_icons16.CheckCircle }),
|
|
16052
16197
|
size: "small",
|
|
16053
16198
|
children: "Connected"
|
|
16054
16199
|
}
|
|
@@ -16056,94 +16201,106 @@ var OpenAI = () => {
|
|
|
16056
16201
|
import_design_system_react_components32.Tag,
|
|
16057
16202
|
{
|
|
16058
16203
|
kind: "error",
|
|
16059
|
-
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components32.Icon, { source: import_design_system_icons16.CloseCircle
|
|
16204
|
+
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components32.Icon, { size: "small", source: import_design_system_icons16.CloseCircle }),
|
|
16060
16205
|
size: "small",
|
|
16061
16206
|
children: "Not connected"
|
|
16062
16207
|
}
|
|
16063
16208
|
)
|
|
16064
16209
|
] }),
|
|
16065
16210
|
!connected ? /* @__PURE__ */ jsxs2("div", { css: actionsStyles, children: [
|
|
16066
|
-
/* @__PURE__ */ jsx4(import_design_system_react_components32.Text, { size: "sm",
|
|
16067
|
-
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react28.Row, {
|
|
16211
|
+
/* @__PURE__ */ jsx4(import_design_system_react_components32.Text, { css: labelStyles2, size: "sm", children: "API Key" }),
|
|
16212
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react28.Row, { gap: `var(${import_design_system_react_components32.SpacingToken.Spacing2})`, noWrap: true, notPadded: true, children: [
|
|
16068
16213
|
/* @__PURE__ */ jsx4(
|
|
16069
|
-
import_design_system_react_components32.
|
|
16214
|
+
import_design_system_react_components32.FormField,
|
|
16070
16215
|
{
|
|
16071
|
-
value: openAiToken,
|
|
16072
|
-
onChange: (e) => {
|
|
16073
|
-
handleChange(e);
|
|
16074
|
-
},
|
|
16075
|
-
placeholder: "Enter API Key",
|
|
16076
|
-
type: "password",
|
|
16077
|
-
inputSize: "medium",
|
|
16078
|
-
error,
|
|
16079
16216
|
css: css`
|
|
16080
16217
|
width: 100%;
|
|
16081
|
-
|
|
16218
|
+
`,
|
|
16219
|
+
error,
|
|
16220
|
+
children: /* @__PURE__ */ jsx4(
|
|
16221
|
+
import_design_system_react_components32.Input,
|
|
16222
|
+
{
|
|
16223
|
+
error: Boolean(error),
|
|
16224
|
+
inputSize: "medium",
|
|
16225
|
+
onChange: (e) => {
|
|
16226
|
+
handleChange(e);
|
|
16227
|
+
},
|
|
16228
|
+
placeholder: "Enter API Key",
|
|
16229
|
+
type: "password",
|
|
16230
|
+
value: openAiToken
|
|
16231
|
+
}
|
|
16232
|
+
)
|
|
16082
16233
|
}
|
|
16083
16234
|
),
|
|
16084
16235
|
/* @__PURE__ */ jsx4(
|
|
16085
16236
|
import_design_system_react_components32.Button,
|
|
16086
16237
|
{
|
|
16087
|
-
|
|
16238
|
+
disabled: loading,
|
|
16088
16239
|
kind: "secondary",
|
|
16089
|
-
onClick: handleConnect,
|
|
16090
16240
|
loading,
|
|
16091
|
-
|
|
16241
|
+
onClick: handleConnect,
|
|
16242
|
+
size: "medium",
|
|
16092
16243
|
children: "Connect"
|
|
16093
16244
|
}
|
|
16094
16245
|
)
|
|
16095
16246
|
] })
|
|
16096
16247
|
] }) : /* @__PURE__ */ jsxs2("div", { css: actionsStyles, children: [
|
|
16097
|
-
/* @__PURE__ */ jsx4(import_design_system_react_components32.Text, { size: "sm",
|
|
16098
|
-
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react28.Row, {
|
|
16248
|
+
/* @__PURE__ */ jsx4(import_design_system_react_components32.Text, { css: labelStyles2, size: "sm", children: "API Key" }),
|
|
16249
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react28.Row, { gap: `var(${import_design_system_react_components32.SpacingToken.Spacing2})`, noWrap: true, notPadded: true, children: [
|
|
16099
16250
|
/* @__PURE__ */ jsx4(
|
|
16100
|
-
import_design_system_react_components32.
|
|
16251
|
+
import_design_system_react_components32.FormField,
|
|
16101
16252
|
{
|
|
16102
|
-
value: openAiToken,
|
|
16103
|
-
onChange: (e) => {
|
|
16104
|
-
handleChange(e);
|
|
16105
|
-
},
|
|
16106
|
-
placeholder: "Enter API Key",
|
|
16107
|
-
type: "password",
|
|
16108
|
-
inputSize: "medium",
|
|
16109
|
-
error,
|
|
16110
16253
|
css: css`
|
|
16111
16254
|
width: 100%;
|
|
16112
|
-
|
|
16255
|
+
`,
|
|
16256
|
+
error,
|
|
16257
|
+
children: /* @__PURE__ */ jsx4(
|
|
16258
|
+
import_design_system_react_components32.Input,
|
|
16259
|
+
{
|
|
16260
|
+
error: Boolean(error),
|
|
16261
|
+
inputSize: "medium",
|
|
16262
|
+
onChange: (e) => {
|
|
16263
|
+
handleChange(e);
|
|
16264
|
+
},
|
|
16265
|
+
placeholder: "Enter API Key",
|
|
16266
|
+
type: "password",
|
|
16267
|
+
value: openAiToken
|
|
16268
|
+
}
|
|
16269
|
+
)
|
|
16113
16270
|
}
|
|
16114
16271
|
),
|
|
16115
16272
|
/* @__PURE__ */ jsx4(
|
|
16116
16273
|
import_design_system_react_components32.Button,
|
|
16117
16274
|
{
|
|
16118
|
-
|
|
16275
|
+
disabled: loading,
|
|
16119
16276
|
kind: "secondary",
|
|
16120
|
-
onClick: handleUpdate,
|
|
16121
16277
|
loading,
|
|
16122
|
-
|
|
16278
|
+
onClick: handleUpdate,
|
|
16279
|
+
size: "medium",
|
|
16123
16280
|
children: "Update"
|
|
16124
16281
|
}
|
|
16125
16282
|
)
|
|
16126
16283
|
] })
|
|
16127
16284
|
] })
|
|
16128
16285
|
] });
|
|
16129
|
-
}
|
|
16286
|
+
}
|
|
16130
16287
|
var OpenAI_default = OpenAI;
|
|
16131
16288
|
|
|
16132
16289
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/integrations/Shopify/index.tsx
|
|
16133
16290
|
var import_react61 = require("react");
|
|
16134
16291
|
var import_react_router_dom9 = require("react-router-dom");
|
|
16135
|
-
var
|
|
16292
|
+
var import_react_query9 = require("@tanstack/react-query");
|
|
16136
16293
|
var import_design_system3 = require("@livechat/design-system");
|
|
16137
16294
|
var import_design_system_icons17 = require("@livechat/design-system-icons");
|
|
16138
16295
|
var import_design_system_react_components33 = require("@livechat/design-system-react-components");
|
|
16139
16296
|
var import_developer_studio_ui_react30 = require("@livechat/developer-studio-ui-react");
|
|
16140
16297
|
|
|
16141
16298
|
// src/hooks/integrations/shopify/credentials.ts
|
|
16142
|
-
var
|
|
16299
|
+
var import_developer_studio_api31 = require("@livechat/developer-studio-api");
|
|
16143
16300
|
var useFetchShopifyCredentials = () => {
|
|
16144
16301
|
var _a, _b;
|
|
16145
16302
|
const credentialsQuery = useFetchIntegrationCredentialsQuery(
|
|
16146
|
-
|
|
16303
|
+
import_developer_studio_api31.IntegrationNames.Shopify
|
|
16147
16304
|
);
|
|
16148
16305
|
const oauthCredential = (_a = credentialsQuery.data) == null ? void 0 : _a.find(
|
|
16149
16306
|
(credential) => credential.type === "oauth2" && credential.data.client_id === getWorkflowEnv("shopifyClientId")
|
|
@@ -16161,7 +16318,7 @@ var useFetchShopifyCredentials = () => {
|
|
|
16161
16318
|
|
|
16162
16319
|
// src/views/Settings/Integrations/Shopify/Action.tsx
|
|
16163
16320
|
var import_react60 = require("react");
|
|
16164
|
-
var
|
|
16321
|
+
var import_developer_studio_api32 = require("@livechat/developer-studio-api");
|
|
16165
16322
|
var import_developer_studio_ui_react29 = require("@livechat/developer-studio-ui-react");
|
|
16166
16323
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
16167
16324
|
var ShopifyAction = (props) => {
|
|
@@ -16175,7 +16332,7 @@ var ShopifyAction = (props) => {
|
|
|
16175
16332
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
16176
16333
|
IntegrationAction_default,
|
|
16177
16334
|
{
|
|
16178
|
-
name:
|
|
16335
|
+
name: import_developer_studio_api32.IntegrationNames.Shopify,
|
|
16179
16336
|
action,
|
|
16180
16337
|
data: props.data,
|
|
16181
16338
|
context: props.context,
|
|
@@ -16183,7 +16340,7 @@ var ShopifyAction = (props) => {
|
|
|
16183
16340
|
serializedContext: match2.params.context,
|
|
16184
16341
|
executor: props.executor,
|
|
16185
16342
|
trigger: {
|
|
16186
|
-
mode:
|
|
16343
|
+
mode: import_developer_studio_api32.IntegrationModes.Modal,
|
|
16187
16344
|
handler: (output) => shopifyActionHandlers(login)[action](output)
|
|
16188
16345
|
},
|
|
16189
16346
|
onSuccess: props.onSuccess
|
|
@@ -16193,9 +16350,9 @@ var ShopifyAction = (props) => {
|
|
|
16193
16350
|
function triggerShopifyAction(props, meta) {
|
|
16194
16351
|
return executeIntegrationAction(
|
|
16195
16352
|
__spreadProps(__spreadValues({}, props), {
|
|
16196
|
-
name:
|
|
16353
|
+
name: import_developer_studio_api32.IntegrationNames.Shopify,
|
|
16197
16354
|
trigger: {
|
|
16198
|
-
mode:
|
|
16355
|
+
mode: import_developer_studio_api32.IntegrationModes.Modal,
|
|
16199
16356
|
handler: (output) => shopifyActionHandlers(meta.login)[props.action](output)
|
|
16200
16357
|
}
|
|
16201
16358
|
}),
|
|
@@ -16207,7 +16364,7 @@ var shopifyActionHandlers = (login) => {
|
|
|
16207
16364
|
authorize: (output) => {
|
|
16208
16365
|
if (output.status === "success" && output.result.token) {
|
|
16209
16366
|
login({
|
|
16210
|
-
source:
|
|
16367
|
+
source: import_developer_studio_api32.IntegrationNames.Shopify,
|
|
16211
16368
|
data: { token: output.result.token, shop: output.result.shop }
|
|
16212
16369
|
});
|
|
16213
16370
|
return {
|
|
@@ -16276,7 +16433,7 @@ var noteStyles2 = css`
|
|
|
16276
16433
|
function Shopify() {
|
|
16277
16434
|
var _a, _b;
|
|
16278
16435
|
const { pathname } = (0, import_react_router_dom9.useLocation)();
|
|
16279
|
-
const queryClient = (0,
|
|
16436
|
+
const queryClient = (0, import_react_query9.useQueryClient)();
|
|
16280
16437
|
const credentialsQuery = useFetchShopifyCredentials();
|
|
16281
16438
|
const { login } = (0, import_react61.useContext)(AuthContext);
|
|
16282
16439
|
const {
|
|
@@ -16497,16 +16654,18 @@ function Shopify() {
|
|
|
16497
16654
|
var Shopify_default = (0, import_design_system3.notificationConnect)(Shopify);
|
|
16498
16655
|
|
|
16499
16656
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/integrations/Text/index.tsx
|
|
16657
|
+
var import_react63 = require("react");
|
|
16500
16658
|
var import_react_router_dom10 = require("react-router-dom");
|
|
16501
16659
|
var import_design_system_icons18 = require("@livechat/design-system-icons");
|
|
16502
16660
|
var import_design_system_react_components34 = require("@livechat/design-system-react-components");
|
|
16661
|
+
var import_developer_studio_ui_react32 = require("@livechat/developer-studio-ui-react");
|
|
16503
16662
|
|
|
16504
16663
|
// src/hooks/integrations/text/credentials.ts
|
|
16505
|
-
var
|
|
16664
|
+
var import_developer_studio_api33 = require("@livechat/developer-studio-api");
|
|
16506
16665
|
var useFetchTextCredentials = () => {
|
|
16507
16666
|
var _a, _b;
|
|
16508
16667
|
const credentialsQuery = useFetchIntegrationCredentialsQuery(
|
|
16509
|
-
|
|
16668
|
+
import_developer_studio_api33.IntegrationNames.Text
|
|
16510
16669
|
);
|
|
16511
16670
|
const textAuth = (_a = credentialsQuery.data) == null ? void 0 : _a.find(
|
|
16512
16671
|
(credential) => credential.type === "text_auth"
|
|
@@ -16533,24 +16692,88 @@ var useFetchUserInstalledTextIntegration = (user) => {
|
|
|
16533
16692
|
}, rest);
|
|
16534
16693
|
};
|
|
16535
16694
|
|
|
16536
|
-
// src/views/
|
|
16537
|
-
var
|
|
16538
|
-
|
|
16539
|
-
|
|
16540
|
-
|
|
16541
|
-
|
|
16542
|
-
|
|
16543
|
-
|
|
16544
|
-
|
|
16545
|
-
|
|
16546
|
-
|
|
16547
|
-
|
|
16548
|
-
|
|
16549
|
-
|
|
16550
|
-
|
|
16551
|
-
|
|
16552
|
-
|
|
16553
|
-
|
|
16695
|
+
// src/views/Settings/Integrations/Accounts/Action.tsx
|
|
16696
|
+
var import_developer_studio_api34 = require("@livechat/developer-studio-api");
|
|
16697
|
+
var import_developer_studio_ui_react31 = require("@livechat/developer-studio-ui-react");
|
|
16698
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
16699
|
+
var AccountsAction = (props) => {
|
|
16700
|
+
var _a;
|
|
16701
|
+
const match2 = (0, import_developer_studio_ui_react31.useMatch)();
|
|
16702
|
+
const action = (_a = props.action) != null ? _a : match2.params.action;
|
|
16703
|
+
if (!action) {
|
|
16704
|
+
throw new Error("Invalid action");
|
|
16705
|
+
}
|
|
16706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
16707
|
+
IntegrationAction_default,
|
|
16708
|
+
{
|
|
16709
|
+
name: import_developer_studio_api34.IntegrationNames.Accounts,
|
|
16710
|
+
action,
|
|
16711
|
+
data: props.data,
|
|
16712
|
+
context: props.context,
|
|
16713
|
+
serializedData: match2.params.data,
|
|
16714
|
+
serializedContext: match2.params.context,
|
|
16715
|
+
executor: props.executor,
|
|
16716
|
+
trigger: {
|
|
16717
|
+
mode: import_developer_studio_api34.IntegrationModes.Modal,
|
|
16718
|
+
handler: (output) => accountsActionHandlers()[action](output)
|
|
16719
|
+
},
|
|
16720
|
+
onSuccess: props.onSuccess
|
|
16721
|
+
}
|
|
16722
|
+
);
|
|
16723
|
+
};
|
|
16724
|
+
function triggerAccountsAction(props, meta) {
|
|
16725
|
+
executeIntegrationAction(
|
|
16726
|
+
__spreadProps(__spreadValues({}, props), {
|
|
16727
|
+
name: import_developer_studio_api34.IntegrationNames.Accounts,
|
|
16728
|
+
trigger: {
|
|
16729
|
+
mode: import_developer_studio_api34.IntegrationModes.Modal,
|
|
16730
|
+
handler: (output) => accountsActionHandlers()[props.action](output)
|
|
16731
|
+
}
|
|
16732
|
+
}),
|
|
16733
|
+
meta
|
|
16734
|
+
);
|
|
16735
|
+
}
|
|
16736
|
+
var accountsActionHandlers = () => {
|
|
16737
|
+
const handlers = {
|
|
16738
|
+
activate: (output) => {
|
|
16739
|
+
if (output.status === "success" && output.result.access_token) {
|
|
16740
|
+
(0, import_developer_studio_ui_react31.setRootData)({
|
|
16741
|
+
access_token: output.result.access_token,
|
|
16742
|
+
scope: output.result.scope,
|
|
16743
|
+
expires_in: output.result.expires_in
|
|
16744
|
+
});
|
|
16745
|
+
return {
|
|
16746
|
+
isValid: true,
|
|
16747
|
+
result: output.result
|
|
16748
|
+
};
|
|
16749
|
+
}
|
|
16750
|
+
return {
|
|
16751
|
+
isValid: false
|
|
16752
|
+
};
|
|
16753
|
+
}
|
|
16754
|
+
};
|
|
16755
|
+
return handlers;
|
|
16756
|
+
};
|
|
16757
|
+
var Action_default5 = AccountsAction;
|
|
16758
|
+
|
|
16759
|
+
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/integrations/Text/index.tsx
|
|
16760
|
+
var wrapperStyles6 = css`
|
|
16761
|
+
width: 100%;
|
|
16762
|
+
display: flex;
|
|
16763
|
+
flex-direction: column;
|
|
16764
|
+
gap: var(${import_design_system_react_components34.SpacingToken.Spacing2});
|
|
16765
|
+
padding: var(${import_design_system_react_components34.SpacingToken.Spacing2}) 0;
|
|
16766
|
+
`;
|
|
16767
|
+
var infoStyles5 = css`
|
|
16768
|
+
font-size: 13px;
|
|
16769
|
+
font-weight: 400;
|
|
16770
|
+
line-height: 16px;
|
|
16771
|
+
color: ${import_design_system_react_components34.DesignToken.ContentBasicSecondary};
|
|
16772
|
+
margin-top: var(${import_design_system_react_components34.SpacingToken.Spacing3});
|
|
16773
|
+
`;
|
|
16774
|
+
var connectionStyles6 = css`
|
|
16775
|
+
background-color: var(${import_design_system_react_components34.DesignToken.SurfaceSecondaryDefault});
|
|
16776
|
+
border-radius: var(${import_design_system_react_components34.RadiusToken.Radius2});
|
|
16554
16777
|
padding: var(${import_design_system_react_components34.SpacingToken.Spacing3});
|
|
16555
16778
|
display: flex;
|
|
16556
16779
|
justify-content: space-between;
|
|
@@ -16565,20 +16788,37 @@ var connectionStyles6 = css`
|
|
|
16565
16788
|
}
|
|
16566
16789
|
}
|
|
16567
16790
|
`;
|
|
16568
|
-
|
|
16791
|
+
function GlobalAccounts(props) {
|
|
16792
|
+
const { pathname } = (0, import_react_router_dom10.useLocation)();
|
|
16793
|
+
const notifications = (0, import_developer_studio_ui_react32.useNotifications)();
|
|
16794
|
+
const {
|
|
16795
|
+
userData: { user }
|
|
16796
|
+
} = (0, import_developer_studio_ui_react32.useRootContext)();
|
|
16569
16797
|
const credentialsQuery = useFetchTextCredentials();
|
|
16798
|
+
const organizationProductsQuery = useFetchOrganizationProducts();
|
|
16799
|
+
const {
|
|
16800
|
+
updateOrganizationProducts,
|
|
16801
|
+
isLoading: isOrganizationProductsUpdating
|
|
16802
|
+
} = useUpdateOrganizationProducts();
|
|
16570
16803
|
const connected = Boolean(credentialsQuery.data.internal);
|
|
16804
|
+
const needToBeActivated = organizationProductsQuery.data ? !organizationProductsQuery.data.find(
|
|
16805
|
+
(product) => product.product === props.product
|
|
16806
|
+
) : void 0;
|
|
16807
|
+
const refetch = (0, import_react63.useCallback)(() => {
|
|
16808
|
+
credentialsQuery.refetch();
|
|
16809
|
+
organizationProductsQuery.refetch();
|
|
16810
|
+
}, [credentialsQuery, organizationProductsQuery]);
|
|
16571
16811
|
return /* @__PURE__ */ jsxs2("div", { css: wrapperStyles6, children: [
|
|
16572
16812
|
/* @__PURE__ */ jsxs2("div", { css: connectionStyles6, children: [
|
|
16573
16813
|
/* @__PURE__ */ jsxs2("span", { children: [
|
|
16574
16814
|
/* @__PURE__ */ jsx4(import_design_system_react_components34.Icon, { source: import_design_system_icons18.TextLogo }),
|
|
16575
|
-
/* @__PURE__ */ jsx4(import_design_system_react_components34.Text, { size: "lg",
|
|
16815
|
+
/* @__PURE__ */ jsx4(import_design_system_react_components34.Text, { bold: true, size: "lg", children: "Text" })
|
|
16576
16816
|
] }),
|
|
16577
16817
|
connected ? /* @__PURE__ */ jsx4(
|
|
16578
16818
|
import_design_system_react_components34.Tag,
|
|
16579
16819
|
{
|
|
16580
16820
|
kind: "success",
|
|
16581
|
-
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components34.Icon, { source: import_design_system_icons18.CheckCircle
|
|
16821
|
+
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components34.Icon, { size: "small", source: import_design_system_icons18.CheckCircle }),
|
|
16582
16822
|
size: "small",
|
|
16583
16823
|
children: "Connected"
|
|
16584
16824
|
}
|
|
@@ -16586,12 +16826,61 @@ var GlobalAccounts = () => {
|
|
|
16586
16826
|
import_design_system_react_components34.Tag,
|
|
16587
16827
|
{
|
|
16588
16828
|
kind: "error",
|
|
16589
|
-
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components34.Icon, { source: import_design_system_icons18.CloseCircle
|
|
16829
|
+
leftNode: /* @__PURE__ */ jsx4(import_design_system_react_components34.Icon, { size: "small", source: import_design_system_icons18.CloseCircle }),
|
|
16590
16830
|
size: "small",
|
|
16591
16831
|
children: "Not connected"
|
|
16592
16832
|
}
|
|
16593
16833
|
) : /* @__PURE__ */ jsx4(import_design_system_react_components34.Loader, { size: "small" })
|
|
16594
16834
|
] }),
|
|
16835
|
+
props.product && needToBeActivated ? /* @__PURE__ */ jsxs2(import_developer_studio_ui_react32.Card, { light: true, children: [
|
|
16836
|
+
/* @__PURE__ */ jsxs2("p", { children: [
|
|
16837
|
+
"To use ",
|
|
16838
|
+
props.product,
|
|
16839
|
+
" in your workflow, you need an active",
|
|
16840
|
+
" ",
|
|
16841
|
+
props.product,
|
|
16842
|
+
"account."
|
|
16843
|
+
] }),
|
|
16844
|
+
props.product === "HelpDesk" && /* @__PURE__ */ jsx4("p", { children: "We can activate your HelpDesk license on your behalf using your registered email. You`'ll automatically start a 14-day trial." }),
|
|
16845
|
+
/* @__PURE__ */ jsx4("p", { children: "Do you want to proceed?" }),
|
|
16846
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react32.Row, { flexEnd: true, notPadded: true, children: /* @__PURE__ */ jsx4(
|
|
16847
|
+
import_design_system_react_components34.Button,
|
|
16848
|
+
{
|
|
16849
|
+
kind: "primary",
|
|
16850
|
+
loading: organizationProductsQuery.isRefetching || isOrganizationProductsUpdating,
|
|
16851
|
+
onClick: () => __async(this, null, function* () {
|
|
16852
|
+
if (!props.product) {
|
|
16853
|
+
return;
|
|
16854
|
+
}
|
|
16855
|
+
try {
|
|
16856
|
+
yield updateOrganizationProducts({
|
|
16857
|
+
productName: props.product
|
|
16858
|
+
});
|
|
16859
|
+
user && triggerAccountsAction(
|
|
16860
|
+
{
|
|
16861
|
+
action: "activate",
|
|
16862
|
+
data: {
|
|
16863
|
+
redirectTo: {
|
|
16864
|
+
success: pathname || "/settings/integrations/shopify/status"
|
|
16865
|
+
}
|
|
16866
|
+
},
|
|
16867
|
+
context: {},
|
|
16868
|
+
onSuccess: refetch
|
|
16869
|
+
},
|
|
16870
|
+
{
|
|
16871
|
+
notifications: notifications.context,
|
|
16872
|
+
user
|
|
16873
|
+
}
|
|
16874
|
+
);
|
|
16875
|
+
} catch (e) {
|
|
16876
|
+
notifications.showError(`Couldn't activate ${props.product}`);
|
|
16877
|
+
}
|
|
16878
|
+
}),
|
|
16879
|
+
type: "submit",
|
|
16880
|
+
children: "Start free trial"
|
|
16881
|
+
}
|
|
16882
|
+
) })
|
|
16883
|
+
] }) : null,
|
|
16595
16884
|
/* @__PURE__ */ jsxs2("p", { css: infoStyles5, children: [
|
|
16596
16885
|
"Text Platform provides a secure connection with Global Accounts. To add, change, or remove the connection,",
|
|
16597
16886
|
" ",
|
|
@@ -16599,17 +16888,17 @@ var GlobalAccounts = () => {
|
|
|
16599
16888
|
"."
|
|
16600
16889
|
] })
|
|
16601
16890
|
] });
|
|
16602
|
-
}
|
|
16891
|
+
}
|
|
16603
16892
|
var Text_default = GlobalAccounts;
|
|
16604
16893
|
|
|
16605
16894
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Forms/Schema/Wrapper.tsx
|
|
16606
16895
|
var componentsMap = {
|
|
16607
|
-
[`${
|
|
16608
|
-
[`${
|
|
16609
|
-
[
|
|
16610
|
-
[
|
|
16611
|
-
[
|
|
16612
|
-
[
|
|
16896
|
+
[`${import_developer_studio_api35.IntegrationNames.Text}-${PRODUCT_TYPE.HD}`]: ({ product }) => /* @__PURE__ */ jsx4(Text_default, { product }),
|
|
16897
|
+
[`${import_developer_studio_api35.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`]: ({ product }) => /* @__PURE__ */ jsx4(Text_default, { product }),
|
|
16898
|
+
[import_developer_studio_api35.IntegrationNames.Shopify]: () => /* @__PURE__ */ jsx4(Shopify_default, {}),
|
|
16899
|
+
[import_developer_studio_api35.IntegrationNames.Mailchimp]: () => /* @__PURE__ */ jsx4(Mailchimp_default, {}),
|
|
16900
|
+
[import_developer_studio_api35.IntegrationNames.BigCommerce]: () => /* @__PURE__ */ jsx4(BigCommerce_default, {}),
|
|
16901
|
+
[import_developer_studio_api35.IntegrationNames.HubSpot]: () => /* @__PURE__ */ jsx4(HubSpot_default, {}),
|
|
16613
16902
|
openai: () => /* @__PURE__ */ jsx4(OpenAI_default, {})
|
|
16614
16903
|
};
|
|
16615
16904
|
var CustomSchemaFormWrapper = ({
|
|
@@ -16620,10 +16909,10 @@ var CustomSchemaFormWrapper = ({
|
|
|
16620
16909
|
}) => {
|
|
16621
16910
|
var _a;
|
|
16622
16911
|
const spec = workflowBuilderUtils.getItemConfig(data);
|
|
16623
|
-
const [selectedTab, setSelectedTab] = (0,
|
|
16912
|
+
const [selectedTab, setSelectedTab] = (0, import_react65.useState)(
|
|
16624
16913
|
preselectedTab != null ? preselectedTab : !spec || (spec == null ? void 0 : spec.specification.input) ? "parameters" : spec && spec.customization.provider !== OTHER_TYPES.SYSTEM ? "connection" : void 0
|
|
16625
16914
|
);
|
|
16626
|
-
const tabItems = (0,
|
|
16915
|
+
const tabItems = (0, import_react65.useMemo)(
|
|
16627
16916
|
() => [
|
|
16628
16917
|
!spec || (spec == null ? void 0 : spec.specification.input) ? { id: "parameters", title: "Parameters" } : void 0,
|
|
16629
16918
|
spec && spec.customization.provider !== OTHER_TYPES.SYSTEM ? {
|
|
@@ -16635,7 +16924,7 @@ var CustomSchemaFormWrapper = ({
|
|
|
16635
16924
|
),
|
|
16636
16925
|
[spec]
|
|
16637
16926
|
);
|
|
16638
|
-
return /* @__PURE__ */ jsxs2(
|
|
16927
|
+
return /* @__PURE__ */ jsxs2(import_react65.Fragment, { children: [
|
|
16639
16928
|
tabItems.length > 1 ? /* @__PURE__ */ jsx4(
|
|
16640
16929
|
import_design_system_react_components35.TabsWrapper,
|
|
16641
16930
|
{
|
|
@@ -16653,7 +16942,7 @@ var CustomSchemaFormWrapper = ({
|
|
|
16653
16942
|
onClick: () => {
|
|
16654
16943
|
setSelectedTab(id);
|
|
16655
16944
|
},
|
|
16656
|
-
icon: ((_a2 = tabsMetadata == null ? void 0 : tabsMetadata[id]) == null ? void 0 : _a2.hasError) ? /* @__PURE__ */ jsx4(import_design_system_react_components35.Icon, { source: import_design_system_icons19.Error, size: "small", kind: "negative" }) : /* @__PURE__ */ jsx4(
|
|
16945
|
+
icon: ((_a2 = tabsMetadata == null ? void 0 : tabsMetadata[id]) == null ? void 0 : _a2.hasError) ? /* @__PURE__ */ jsx4(import_design_system_react_components35.Icon, { source: import_design_system_icons19.Error, size: "small", kind: "negative" }) : /* @__PURE__ */ jsx4(import_react65.Fragment, {}),
|
|
16657
16946
|
children: title
|
|
16658
16947
|
},
|
|
16659
16948
|
id
|
|
@@ -16661,7 +16950,9 @@ var CustomSchemaFormWrapper = ({
|
|
|
16661
16950
|
}) })
|
|
16662
16951
|
}
|
|
16663
16952
|
) : void 0,
|
|
16664
|
-
spec && selectedTab === "connection" && ((_a = componentsMap[spec.customization.provider]) == null ? void 0 : _a.call(componentsMap, {
|
|
16953
|
+
spec && selectedTab === "connection" && ((_a = componentsMap[spec.customization.provider]) == null ? void 0 : _a.call(componentsMap, {
|
|
16954
|
+
product: spec.customization.product
|
|
16955
|
+
})),
|
|
16665
16956
|
selectedTab === "parameters" && /* @__PURE__ */ jsx4(
|
|
16666
16957
|
"div",
|
|
16667
16958
|
{
|
|
@@ -16682,7 +16973,7 @@ var HttpNodeForm = ({
|
|
|
16682
16973
|
onChange,
|
|
16683
16974
|
readonly
|
|
16684
16975
|
}) => {
|
|
16685
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v
|
|
16976
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
16686
16977
|
const spec = (_a = metadata.frame.__meta) == null ? void 0 : _a.config;
|
|
16687
16978
|
if (data.name === "http") {
|
|
16688
16979
|
return /* @__PURE__ */ jsx4(
|
|
@@ -16710,29 +17001,26 @@ var HttpNodeForm = ({
|
|
|
16710
17001
|
result[key] = value;
|
|
16711
17002
|
return result;
|
|
16712
17003
|
}, {});
|
|
16713
|
-
const
|
|
16714
|
-
|
|
16715
|
-
);
|
|
16716
|
-
const hasConnectionError = Boolean(
|
|
16717
|
-
(_k = (_j = (_i = metadata.errors) == null ? void 0 : _i.inputParameters) == null ? void 0 : _j.http_request) == null ? void 0 : _k.headers
|
|
17004
|
+
const hasConnectionError = (_h = (_g = metadata.errors) == null ? void 0 : _g.__errorsExtended) == null ? void 0 : _h.some(
|
|
17005
|
+
(error) => error.keyword === "connection" || "activation"
|
|
16718
17006
|
);
|
|
16719
17007
|
return /* @__PURE__ */ jsxs2(
|
|
16720
17008
|
Wrapper_default,
|
|
16721
17009
|
{
|
|
16722
17010
|
data,
|
|
16723
|
-
preselectedTab: hasConnectionError
|
|
17011
|
+
preselectedTab: hasConnectionError ? "connection" : void 0,
|
|
16724
17012
|
tabsMetadata: {
|
|
16725
17013
|
connection: {
|
|
16726
|
-
hasError: hasConnectionError
|
|
17014
|
+
hasError: hasConnectionError
|
|
16727
17015
|
}
|
|
16728
17016
|
},
|
|
16729
17017
|
children: [
|
|
16730
|
-
((
|
|
17018
|
+
((_j = (_i = spec == null ? void 0 : spec.specification.input) == null ? void 0 : _i.properties) == null ? void 0 : _j.query) ? /* @__PURE__ */ jsx4(
|
|
16731
17019
|
Form_default,
|
|
16732
17020
|
{
|
|
16733
|
-
schema: (
|
|
17021
|
+
schema: (_l = (_k = spec == null ? void 0 : spec.specification.input) == null ? void 0 : _k.properties) == null ? void 0 : _l.query,
|
|
16734
17022
|
formData: queryParams,
|
|
16735
|
-
formErrors: ((
|
|
17023
|
+
formErrors: ((_o = (_n = (_m = metadata.errors) == null ? void 0 : _m.inputParameters) == null ? void 0 : _n.http_request) == null ? void 0 : _o.uri) ? Object.fromEntries(
|
|
16736
17024
|
Object.entries(queryParams).map((entry) => {
|
|
16737
17025
|
var _a2, _b2, _c2;
|
|
16738
17026
|
return [
|
|
@@ -16756,12 +17044,12 @@ var HttpNodeForm = ({
|
|
|
16756
17044
|
readonly
|
|
16757
17045
|
}
|
|
16758
17046
|
) : void 0,
|
|
16759
|
-
((
|
|
17047
|
+
((_q = (_p = spec == null ? void 0 : spec.specification.input) == null ? void 0 : _p.properties) == null ? void 0 : _q.body) ? /* @__PURE__ */ jsx4(
|
|
16760
17048
|
Form_default,
|
|
16761
17049
|
{
|
|
16762
|
-
schema: (
|
|
17050
|
+
schema: (_s = (_r = spec == null ? void 0 : spec.specification.input) == null ? void 0 : _r.properties) == null ? void 0 : _s.body,
|
|
16763
17051
|
formData: data.inputParameters.http_request.body,
|
|
16764
|
-
formErrors: (
|
|
17052
|
+
formErrors: (_v = (_u = (_t = metadata.errors) == null ? void 0 : _t.inputParameters) == null ? void 0 : _u.http_request) == null ? void 0 : _v.body,
|
|
16765
17053
|
formContext: __spreadProps(__spreadValues({}, metadata), {
|
|
16766
17054
|
data
|
|
16767
17055
|
}),
|
|
@@ -16784,14 +17072,14 @@ var HttpNodeForm = ({
|
|
|
16784
17072
|
var Form_default3 = HttpNodeForm;
|
|
16785
17073
|
|
|
16786
17074
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/HttpNode/Node.tsx
|
|
16787
|
-
var
|
|
17075
|
+
var import_react67 = require("react");
|
|
16788
17076
|
var import_reactflow8 = require("reactflow");
|
|
16789
17077
|
function HttpNode({
|
|
16790
17078
|
id,
|
|
16791
17079
|
data
|
|
16792
17080
|
}) {
|
|
16793
17081
|
var _a, _b;
|
|
16794
|
-
const [isHovered, setIsHovered] = (0,
|
|
17082
|
+
const [isHovered, setIsHovered] = (0, import_react67.useState)(false);
|
|
16795
17083
|
const {
|
|
16796
17084
|
removeTask,
|
|
16797
17085
|
goToAddTask,
|
|
@@ -16857,10 +17145,10 @@ function HttpNode({
|
|
|
16857
17145
|
}
|
|
16858
17146
|
);
|
|
16859
17147
|
}
|
|
16860
|
-
var Node_default2 = (0,
|
|
17148
|
+
var Node_default2 = (0, import_react67.memo)(HttpNode);
|
|
16861
17149
|
|
|
16862
17150
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/SwitchNode/Base.tsx
|
|
16863
|
-
var
|
|
17151
|
+
var import_react68 = require("react");
|
|
16864
17152
|
var import_design_system_icons20 = require("@livechat/design-system-icons");
|
|
16865
17153
|
var import_design_system_react_components36 = require("@livechat/design-system-react-components");
|
|
16866
17154
|
var Node3 = newStyled.div`
|
|
@@ -16918,7 +17206,7 @@ var SwitchNodeBase = ({
|
|
|
16918
17206
|
const {
|
|
16919
17207
|
state: { selection }
|
|
16920
17208
|
} = useWorkflowContext();
|
|
16921
|
-
return /* @__PURE__ */ jsxs2(
|
|
17209
|
+
return /* @__PURE__ */ jsxs2(import_react68.Fragment, { children: [
|
|
16922
17210
|
top,
|
|
16923
17211
|
/* @__PURE__ */ jsxs2(Node3, { source: Boolean(source), editing: (selection == null ? void 0 : selection.id) === id, children: [
|
|
16924
17212
|
toolbar,
|
|
@@ -16965,7 +17253,7 @@ var SwitchNodeForm = ({
|
|
|
16965
17253
|
var Form_default4 = SwitchNodeForm;
|
|
16966
17254
|
|
|
16967
17255
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/SwitchNode/Node.tsx
|
|
16968
|
-
var
|
|
17256
|
+
var import_react70 = require("react");
|
|
16969
17257
|
var import_reactflow9 = require("reactflow");
|
|
16970
17258
|
var import_design_system_react_components37 = require("@livechat/design-system-react-components");
|
|
16971
17259
|
var handlerWrapperCss = css`
|
|
@@ -16988,10 +17276,10 @@ function SwitchNode({
|
|
|
16988
17276
|
id,
|
|
16989
17277
|
data
|
|
16990
17278
|
}) {
|
|
16991
|
-
const [isHovered, setIsHovered] = (0,
|
|
17279
|
+
const [isHovered, setIsHovered] = (0, import_react70.useState)(false);
|
|
16992
17280
|
const { nodes, updateTask, removeTask, goToAddTask } = useWorkflowContext();
|
|
16993
17281
|
const node2 = nodes.find((node3) => node3.id === id);
|
|
16994
|
-
(0,
|
|
17282
|
+
(0, import_react70.useEffect)(() => {
|
|
16995
17283
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
16996
17284
|
const sourceNode = nodes.find((node1) => node1.id === (node2 == null ? void 0 : node2.source));
|
|
16997
17285
|
if (sourceNode) {
|
|
@@ -17021,7 +17309,7 @@ function SwitchNode({
|
|
|
17021
17309
|
}
|
|
17022
17310
|
}, [node2 == null ? void 0 : node2.source]);
|
|
17023
17311
|
if (!node2) {
|
|
17024
|
-
return /* @__PURE__ */ jsx4(
|
|
17312
|
+
return /* @__PURE__ */ jsx4(import_react70.Fragment, {});
|
|
17025
17313
|
}
|
|
17026
17314
|
return /* @__PURE__ */ jsx4(
|
|
17027
17315
|
CustomNodeWrapper,
|
|
@@ -17037,7 +17325,7 @@ function SwitchNode({
|
|
|
17037
17325
|
{
|
|
17038
17326
|
id,
|
|
17039
17327
|
name: data.name,
|
|
17040
|
-
top: /* @__PURE__ */ jsxs2(
|
|
17328
|
+
top: /* @__PURE__ */ jsxs2(import_react70.Fragment, { children: [
|
|
17041
17329
|
/* @__PURE__ */ jsx4(
|
|
17042
17330
|
import_reactflow9.Handle,
|
|
17043
17331
|
{
|
|
@@ -17069,7 +17357,7 @@ function SwitchNode({
|
|
|
17069
17357
|
}
|
|
17070
17358
|
}
|
|
17071
17359
|
),
|
|
17072
|
-
bottom: /* @__PURE__ */ jsxs2(
|
|
17360
|
+
bottom: /* @__PURE__ */ jsxs2(import_react70.Fragment, { children: [
|
|
17073
17361
|
/* @__PURE__ */ jsx4(
|
|
17074
17362
|
import_reactflow9.Handle,
|
|
17075
17363
|
{
|
|
@@ -17099,13 +17387,13 @@ function SwitchNode({
|
|
|
17099
17387
|
}
|
|
17100
17388
|
);
|
|
17101
17389
|
}
|
|
17102
|
-
var Node_default3 = (0,
|
|
17390
|
+
var Node_default3 = (0, import_react70.memo)(SwitchNode);
|
|
17103
17391
|
|
|
17104
17392
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/TerminateNode/Base.tsx
|
|
17105
17393
|
var import_design_system_icons21 = require("@livechat/design-system-icons");
|
|
17106
17394
|
var import_design_system_react_components38 = require("@livechat/design-system-react-components");
|
|
17107
|
-
var
|
|
17108
|
-
var
|
|
17395
|
+
var import_developer_studio_ui_react33 = require("@livechat/developer-studio-ui-react");
|
|
17396
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
17109
17397
|
var Node4 = newStyled.div`
|
|
17110
17398
|
background-color: ${({ editing }) => editing ? `var(${import_design_system_react_components38.DesignToken.SurfacePrimaryActive})` : `var(${import_design_system_react_components38.DesignToken.SurfacePrimaryDefault})`};
|
|
17111
17399
|
color: var(${import_design_system_react_components38.DesignToken.ContentBasicPrimary});
|
|
@@ -17148,7 +17436,7 @@ var TerminateNodeBase = ({
|
|
|
17148
17436
|
const {
|
|
17149
17437
|
state: { selection, visibility }
|
|
17150
17438
|
} = useWorkflowContext();
|
|
17151
|
-
return /* @__PURE__ */ (0,
|
|
17439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
17152
17440
|
Node4,
|
|
17153
17441
|
{
|
|
17154
17442
|
hasErrors: visibility.validation && hasErrors,
|
|
@@ -17156,9 +17444,9 @@ var TerminateNodeBase = ({
|
|
|
17156
17444
|
children: [
|
|
17157
17445
|
top,
|
|
17158
17446
|
toolbar,
|
|
17159
|
-
/* @__PURE__ */ (0,
|
|
17160
|
-
/* @__PURE__ */ (0,
|
|
17161
|
-
/* @__PURE__ */ (0,
|
|
17447
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Header5, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Title4, { children: [
|
|
17448
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_design_system_react_components38.Icon, { size: "large", source: import_design_system_icons21.ArrowBarToRight }),
|
|
17449
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_developer_studio_ui_react33.Column, { notPadded: true, children: "END" })
|
|
17162
17450
|
] }) })
|
|
17163
17451
|
]
|
|
17164
17452
|
}
|
|
@@ -17191,13 +17479,13 @@ var TerminateNodeForm = ({
|
|
|
17191
17479
|
var Form_default5 = TerminateNodeForm;
|
|
17192
17480
|
|
|
17193
17481
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/TerminateNode/Node.tsx
|
|
17194
|
-
var
|
|
17482
|
+
var import_react72 = require("react");
|
|
17195
17483
|
var import_reactflow10 = require("reactflow");
|
|
17196
17484
|
function TerminateNode({
|
|
17197
17485
|
id,
|
|
17198
17486
|
data
|
|
17199
17487
|
}) {
|
|
17200
|
-
const [isHovered, setIsHovered] = (0,
|
|
17488
|
+
const [isHovered, setIsHovered] = (0, import_react72.useState)(false);
|
|
17201
17489
|
const { removeTask, goToAddTask } = useWorkflowContext();
|
|
17202
17490
|
return /* @__PURE__ */ jsx4(
|
|
17203
17491
|
CustomNodeWrapper,
|
|
@@ -17240,12 +17528,12 @@ function TerminateNode({
|
|
|
17240
17528
|
}
|
|
17241
17529
|
);
|
|
17242
17530
|
}
|
|
17243
|
-
var Node_default4 = (0,
|
|
17531
|
+
var Node_default4 = (0, import_react72.memo)(TerminateNode);
|
|
17244
17532
|
|
|
17245
17533
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/TriggerNode/Base.tsx
|
|
17246
17534
|
var import_design_system_react_components39 = require("@livechat/design-system-react-components");
|
|
17247
|
-
var
|
|
17248
|
-
var
|
|
17535
|
+
var import_developer_studio_api36 = require("@livechat/developer-studio-api");
|
|
17536
|
+
var import_developer_studio_ui_react34 = require("@livechat/developer-studio-ui-react");
|
|
17249
17537
|
var Node5 = newStyled.div`
|
|
17250
17538
|
background-color: ${({ editing }) => editing ? `var(${import_design_system_react_components39.DesignToken.SurfacePrimaryActive})` : `var(${import_design_system_react_components39.DesignToken.SurfacePrimaryDefault})`};
|
|
17251
17539
|
color: var(${import_design_system_react_components39.DesignToken.ContentBasicPrimary});
|
|
@@ -17296,7 +17584,7 @@ var TriggerNodeBase = ({
|
|
|
17296
17584
|
} = useWorkflowContext();
|
|
17297
17585
|
const frame = frames.trigger;
|
|
17298
17586
|
const customization = (_a = frame == null ? void 0 : frame.__meta) == null ? void 0 : _a.config.customization;
|
|
17299
|
-
const revertIconColor = getWorkflowEnv2("isHeadless") && ((customization == null ? void 0 : customization.icon) ===
|
|
17587
|
+
const revertIconColor = getWorkflowEnv2("isHeadless") && ((customization == null ? void 0 : customization.icon) === import_developer_studio_api36.IntegrationNames.OpenAI || (customization == null ? void 0 : customization.icon) === import_developer_studio_api36.IntegrationNames.BigCommerce);
|
|
17300
17588
|
return /* @__PURE__ */ jsxs2(
|
|
17301
17589
|
Node5,
|
|
17302
17590
|
{
|
|
@@ -17317,7 +17605,7 @@ var TriggerNodeBase = ({
|
|
|
17317
17605
|
}
|
|
17318
17606
|
),
|
|
17319
17607
|
/* @__PURE__ */ jsxs2(
|
|
17320
|
-
|
|
17608
|
+
import_developer_studio_ui_react34.Column,
|
|
17321
17609
|
{
|
|
17322
17610
|
notPadded: true,
|
|
17323
17611
|
css: css`
|
|
@@ -17355,10 +17643,9 @@ var TriggerNodeBase = ({
|
|
|
17355
17643
|
var Base_default5 = TriggerNodeBase;
|
|
17356
17644
|
|
|
17357
17645
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/TriggerNode/Form.tsx
|
|
17358
|
-
var
|
|
17646
|
+
var import_react74 = require("react");
|
|
17359
17647
|
var import_react_js_cron = require("react-js-cron");
|
|
17360
17648
|
var import_design_system_react_components40 = require("@livechat/design-system-react-components");
|
|
17361
|
-
var import_developer_studio_api34 = require("@livechat/developer-studio-api");
|
|
17362
17649
|
var cronCss = css`
|
|
17363
17650
|
width: 100%;
|
|
17364
17651
|
|
|
@@ -17393,7 +17680,7 @@ var cronCss = css`
|
|
|
17393
17680
|
}
|
|
17394
17681
|
`;
|
|
17395
17682
|
var CronWrapper = (props) => {
|
|
17396
|
-
const [state, setState] = (0,
|
|
17683
|
+
const [state, setState] = (0, import_react74.useState)(props.value);
|
|
17397
17684
|
return /* @__PURE__ */ jsx4(
|
|
17398
17685
|
import_react_js_cron.Cron,
|
|
17399
17686
|
{
|
|
@@ -17416,20 +17703,17 @@ var TriggerNodeForm = ({
|
|
|
17416
17703
|
if (data.type === "webhook") {
|
|
17417
17704
|
const _a = data.webhook.event, { name } = _a, formData = __objRest(_a, ["name"]);
|
|
17418
17705
|
const specConfig = (_c = (_b = metadata.frame) == null ? void 0 : _b.__meta) == null ? void 0 : _c.config;
|
|
17419
|
-
const
|
|
17420
|
-
|
|
17421
|
-
);
|
|
17422
|
-
const hasConnectionError = Boolean(
|
|
17423
|
-
(_e = (_d = metadata.error) == null ? void 0 : _d.webhook) == null ? void 0 : _e.headers
|
|
17706
|
+
const hasConnectionError = (_e = (_d = metadata.errors) == null ? void 0 : _d.__errorsExtended) == null ? void 0 : _e.some(
|
|
17707
|
+
(error) => error.keyword === "connection" || "activation"
|
|
17424
17708
|
);
|
|
17425
17709
|
return /* @__PURE__ */ jsx4(
|
|
17426
17710
|
Wrapper_default,
|
|
17427
17711
|
{
|
|
17428
17712
|
data,
|
|
17429
|
-
preselectedTab: hasConnectionError
|
|
17713
|
+
preselectedTab: hasConnectionError ? "connection" : void 0,
|
|
17430
17714
|
tabsMetadata: {
|
|
17431
17715
|
connection: {
|
|
17432
|
-
hasError: hasConnectionError
|
|
17716
|
+
hasError: hasConnectionError
|
|
17433
17717
|
}
|
|
17434
17718
|
},
|
|
17435
17719
|
children: /* @__PURE__ */ jsx4(
|
|
@@ -17438,7 +17722,7 @@ var TriggerNodeForm = ({
|
|
|
17438
17722
|
schema: (_f = specConfig == null ? void 0 : specConfig.specification) == null ? void 0 : _f.input,
|
|
17439
17723
|
formData,
|
|
17440
17724
|
formContext: { frame: metadata.frame, data },
|
|
17441
|
-
formErrors: (_h = (_g = metadata.
|
|
17725
|
+
formErrors: (_h = (_g = metadata.errors) == null ? void 0 : _g.webhook) == null ? void 0 : _h.event,
|
|
17442
17726
|
onChange: (formData2) => {
|
|
17443
17727
|
onChange(__spreadProps(__spreadValues({}, data), {
|
|
17444
17728
|
webhook: __spreadProps(__spreadValues({}, data.webhook), {
|
|
@@ -17465,18 +17749,18 @@ var TriggerNodeForm = ({
|
|
|
17465
17749
|
}
|
|
17466
17750
|
);
|
|
17467
17751
|
}
|
|
17468
|
-
return /* @__PURE__ */ jsx4(
|
|
17752
|
+
return /* @__PURE__ */ jsx4(import_react74.Fragment, {});
|
|
17469
17753
|
};
|
|
17470
17754
|
var Form_default6 = TriggerNodeForm;
|
|
17471
17755
|
|
|
17472
17756
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Nodes/CustomNodes/TriggerNode/Node.tsx
|
|
17473
|
-
var
|
|
17757
|
+
var import_react76 = require("react");
|
|
17474
17758
|
var import_reactflow11 = require("reactflow");
|
|
17475
17759
|
function TriggerNode({
|
|
17476
17760
|
id,
|
|
17477
17761
|
data
|
|
17478
17762
|
}) {
|
|
17479
|
-
const [isHovered, setIsHovered] = (0,
|
|
17763
|
+
const [isHovered, setIsHovered] = (0, import_react76.useState)(false);
|
|
17480
17764
|
const {
|
|
17481
17765
|
goToAddTask,
|
|
17482
17766
|
removeTrigger,
|
|
@@ -17531,7 +17815,7 @@ function TriggerNode({
|
|
|
17531
17815
|
}
|
|
17532
17816
|
);
|
|
17533
17817
|
}
|
|
17534
|
-
var Node_default5 = (0,
|
|
17818
|
+
var Node_default5 = (0, import_react76.memo)(TriggerNode);
|
|
17535
17819
|
|
|
17536
17820
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Panels/Edit/Wrapper.tsx
|
|
17537
17821
|
var import_styles = require("react-js-cron/dist/styles.css");
|
|
@@ -17561,8 +17845,8 @@ var Title6 = newStyled.p`
|
|
|
17561
17845
|
align-items: center;
|
|
17562
17846
|
gap: 16px;
|
|
17563
17847
|
`;
|
|
17564
|
-
|
|
17565
|
-
var _a, _b, _c, _d, _e
|
|
17848
|
+
function EditNodeWrapper() {
|
|
17849
|
+
var _a, _b, _c, _d, _e;
|
|
17566
17850
|
const {
|
|
17567
17851
|
updateTask,
|
|
17568
17852
|
updateTrigger,
|
|
@@ -17581,15 +17865,15 @@ var EditNodeWrapper = () => {
|
|
|
17581
17865
|
frame: frames.trigger
|
|
17582
17866
|
} : {
|
|
17583
17867
|
data: workflow.definition.tasks.find(
|
|
17584
|
-
(task2) => task2.taskReferenceName ===
|
|
17868
|
+
(task2) => task2.taskReferenceName === selection.id
|
|
17585
17869
|
),
|
|
17586
|
-
frame: frames.tasks[(_a = selection
|
|
17870
|
+
frame: frames.tasks[(_a = selection.id) != null ? _a : ""]
|
|
17587
17871
|
} : {
|
|
17588
17872
|
data: void 0,
|
|
17589
17873
|
frame: void 0
|
|
17590
17874
|
};
|
|
17591
17875
|
if (!data) {
|
|
17592
|
-
return /* @__PURE__ */ jsx4(
|
|
17876
|
+
return /* @__PURE__ */ jsx4(Fragment3, {});
|
|
17593
17877
|
}
|
|
17594
17878
|
const config14 = (_b = frame == null ? void 0 : frame.__meta) == null ? void 0 : _b.config;
|
|
17595
17879
|
const readonly = !workflow.draft;
|
|
@@ -17600,8 +17884,8 @@ var EditNodeWrapper = () => {
|
|
|
17600
17884
|
return /* @__PURE__ */ jsx4(
|
|
17601
17885
|
Form_default3,
|
|
17602
17886
|
{
|
|
17603
|
-
id: data.taskReferenceName,
|
|
17604
17887
|
data,
|
|
17888
|
+
id: data.taskReferenceName,
|
|
17605
17889
|
metadata: {
|
|
17606
17890
|
triggerType: workflow.trigger.type,
|
|
17607
17891
|
frame: frames.tasks[data.taskReferenceName],
|
|
@@ -17617,8 +17901,8 @@ var EditNodeWrapper = () => {
|
|
|
17617
17901
|
return /* @__PURE__ */ jsx4(
|
|
17618
17902
|
Form_default4,
|
|
17619
17903
|
{
|
|
17620
|
-
id: data.taskReferenceName,
|
|
17621
17904
|
data,
|
|
17905
|
+
id: data.taskReferenceName,
|
|
17622
17906
|
metadata: {
|
|
17623
17907
|
frame: frames.tasks[data.taskReferenceName]
|
|
17624
17908
|
},
|
|
@@ -17632,8 +17916,8 @@ var EditNodeWrapper = () => {
|
|
|
17632
17916
|
return /* @__PURE__ */ jsx4(
|
|
17633
17917
|
Form_default2,
|
|
17634
17918
|
{
|
|
17635
|
-
id: data.taskReferenceName,
|
|
17636
17919
|
data,
|
|
17920
|
+
id: data.taskReferenceName,
|
|
17637
17921
|
metadata: {
|
|
17638
17922
|
frame: frames.tasks[data.taskReferenceName]
|
|
17639
17923
|
},
|
|
@@ -17647,8 +17931,8 @@ var EditNodeWrapper = () => {
|
|
|
17647
17931
|
return /* @__PURE__ */ jsx4(
|
|
17648
17932
|
Form_default5,
|
|
17649
17933
|
{
|
|
17650
|
-
id: data.taskReferenceName,
|
|
17651
17934
|
data,
|
|
17935
|
+
id: data.taskReferenceName,
|
|
17652
17936
|
metadata: {
|
|
17653
17937
|
frame: frames.tasks[data.taskReferenceName]
|
|
17654
17938
|
},
|
|
@@ -17666,7 +17950,7 @@ var EditNodeWrapper = () => {
|
|
|
17666
17950
|
data,
|
|
17667
17951
|
metadata: {
|
|
17668
17952
|
frame: frames.trigger,
|
|
17669
|
-
|
|
17953
|
+
errors: errors.trigger
|
|
17670
17954
|
},
|
|
17671
17955
|
onChange: (trigger) => {
|
|
17672
17956
|
updateTrigger(trigger);
|
|
@@ -17676,9 +17960,9 @@ var EditNodeWrapper = () => {
|
|
|
17676
17960
|
);
|
|
17677
17961
|
}
|
|
17678
17962
|
};
|
|
17679
|
-
const revertIconColor = getWorkflowEnv2("isHeadless") && ((
|
|
17963
|
+
const revertIconColor = getWorkflowEnv2("isHeadless") && ((config14 == null ? void 0 : config14.customization.icon) === import_developer_studio_api37.IntegrationNames.OpenAI || (config14 == null ? void 0 : config14.customization.icon) === import_developer_studio_api37.IntegrationNames.BigCommerce);
|
|
17680
17964
|
return /* @__PURE__ */ jsxs2(Wrapper3, { children: [
|
|
17681
|
-
/* @__PURE__ */ jsxs2(
|
|
17965
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react35.Row, { center: true, setRowPadding: "12px 24px", spaceBetween: true, children: [
|
|
17682
17966
|
/* @__PURE__ */ jsx4(
|
|
17683
17967
|
Header7,
|
|
17684
17968
|
{
|
|
@@ -17689,40 +17973,47 @@ var EditNodeWrapper = () => {
|
|
|
17689
17973
|
(config14 == null ? void 0 : config14.customization.product) ? /* @__PURE__ */ jsx4(
|
|
17690
17974
|
ProductIcon_default,
|
|
17691
17975
|
{
|
|
17692
|
-
product: config14.customization.icon,
|
|
17693
17976
|
center: true,
|
|
17694
17977
|
disabled: false,
|
|
17695
17978
|
height: 10,
|
|
17696
|
-
|
|
17697
|
-
revertColors: revertIconColor
|
|
17979
|
+
product: config14.customization.icon,
|
|
17980
|
+
revertColors: revertIconColor,
|
|
17981
|
+
width: 10
|
|
17698
17982
|
}
|
|
17699
17983
|
) : /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
|
|
17700
17984
|
import_design_system_react_components41.Icon,
|
|
17701
17985
|
{
|
|
17702
|
-
source: import_design_system_icons22.Automation,
|
|
17703
|
-
size: "xlarge",
|
|
17704
17986
|
css: css`
|
|
17705
17987
|
width: var(${import_design_system_react_components41.SpacingToken.Spacing6});
|
|
17706
|
-
|
|
17988
|
+
`,
|
|
17989
|
+
size: "xlarge",
|
|
17990
|
+
source: import_design_system_icons22.Automation
|
|
17707
17991
|
}
|
|
17708
17992
|
) }),
|
|
17709
|
-
/* @__PURE__ */ jsxs2(
|
|
17993
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react35.Column, { noFlexBasis: true, notPadded: true, children: [
|
|
17710
17994
|
/* @__PURE__ */ jsxs2("strong", { children: [
|
|
17711
|
-
((
|
|
17712
|
-
(
|
|
17995
|
+
((_c = frame == null ? void 0 : frame.__meta) == null ? void 0 : _c.index) !== void 0 ? `${frame.__meta.index}. ` : "",
|
|
17996
|
+
(_d = config14 == null ? void 0 : config14.customization.displayName) != null ? _d : data.type === NodeTypes.switch ? "Condition" : data.type === NodeTypes.http ? "Custom HTTP" : data.type === NodeTypes.terminate ? "End workflow" : ""
|
|
17713
17997
|
] }),
|
|
17714
|
-
(
|
|
17998
|
+
(_e = config14 == null ? void 0 : config14.customization.description) != null ? _e : data.type === NodeTypes.switch ? "Conditional execution" : data.type === NodeTypes.http ? "Make an HTTP request" : data.type === NodeTypes.terminate ? "End the workflow" : ""
|
|
17715
17999
|
] })
|
|
17716
18000
|
] })
|
|
17717
18001
|
}
|
|
17718
18002
|
),
|
|
17719
|
-
/* @__PURE__ */ jsx4(
|
|
17720
|
-
|
|
17721
|
-
|
|
18003
|
+
/* @__PURE__ */ jsx4(
|
|
18004
|
+
import_design_system_react_components41.Button,
|
|
18005
|
+
{
|
|
18006
|
+
kind: "plain",
|
|
18007
|
+
onClick: () => {
|
|
18008
|
+
toggle();
|
|
18009
|
+
},
|
|
18010
|
+
children: /* @__PURE__ */ jsx4(import_design_system_react_components41.Icon, { source: import_design_system_icons22.Close })
|
|
18011
|
+
}
|
|
18012
|
+
)
|
|
17722
18013
|
] }),
|
|
17723
|
-
/* @__PURE__ */ jsx4(
|
|
18014
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react35.Row, { css: formCss, children: contentHandler() })
|
|
17724
18015
|
] });
|
|
17725
|
-
}
|
|
18016
|
+
}
|
|
17726
18017
|
var Wrapper_default2 = EditNodeWrapper;
|
|
17727
18018
|
|
|
17728
18019
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Panels/Edit/index.ts
|
|
@@ -17733,7 +18024,7 @@ var import_react113 = require("react");
|
|
|
17733
18024
|
var import_reactflow18 = __toESM(require("reactflow"));
|
|
17734
18025
|
var import_design_system_icons33 = require("@livechat/design-system-icons");
|
|
17735
18026
|
var import_design_system_react_components64 = require("@livechat/design-system-react-components");
|
|
17736
|
-
var
|
|
18027
|
+
var import_developer_studio_api38 = require("@livechat/developer-studio-api");
|
|
17737
18028
|
|
|
17738
18029
|
// src/views/Flows/Definitions/Common/Modals/Preview.tsx
|
|
17739
18030
|
var import_react78 = require("react");
|
|
@@ -18026,7 +18317,7 @@ var import_react_router_dom14 = require("react-router-dom");
|
|
|
18026
18317
|
var import_reactflow15 = require("reactflow");
|
|
18027
18318
|
var import_design_system_icons32 = require("@livechat/design-system-icons");
|
|
18028
18319
|
var import_design_system_react_components61 = require("@livechat/design-system-react-components");
|
|
18029
|
-
var
|
|
18320
|
+
var import_developer_studio_ui_react40 = require("@livechat/developer-studio-ui-react");
|
|
18030
18321
|
|
|
18031
18322
|
// src/views/Flows/Definitions/Common/One/widget/message-box/OneMessageBox.tsx
|
|
18032
18323
|
var import_react94 = require("react");
|
|
@@ -18199,7 +18490,7 @@ var import_lexical = require("lexical");
|
|
|
18199
18490
|
// src/views/Flows/Definitions/Common/One/contexts/OneMessagesContext.tsx
|
|
18200
18491
|
var import_react87 = require("react");
|
|
18201
18492
|
var import_uuid3 = require("uuid");
|
|
18202
|
-
var
|
|
18493
|
+
var import_developer_studio_ui_react36 = require("@livechat/developer-studio-ui-react");
|
|
18203
18494
|
|
|
18204
18495
|
// src/views/Flows/Definitions/Common/One/helpers.ts
|
|
18205
18496
|
var import_uuid2 = require("uuid");
|
|
@@ -18273,7 +18564,7 @@ var getSources = (sources) => {
|
|
|
18273
18564
|
};
|
|
18274
18565
|
|
|
18275
18566
|
// src/views/Flows/Definitions/Common/One/contexts/OneMessagesContext.tsx
|
|
18276
|
-
var
|
|
18567
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
18277
18568
|
var getInitialMessage = () => [
|
|
18278
18569
|
{
|
|
18279
18570
|
authorId: "live-assistant",
|
|
@@ -18303,7 +18594,7 @@ var OneMessagesProvider = ({
|
|
|
18303
18594
|
const generateAiResponseMutation = useGenerateAIResponse();
|
|
18304
18595
|
const {
|
|
18305
18596
|
userData: { user }
|
|
18306
|
-
} = (0,
|
|
18597
|
+
} = (0, import_developer_studio_ui_react36.useRootContext)();
|
|
18307
18598
|
const isLoading = generateAiResponseMutation.isLoading;
|
|
18308
18599
|
const sendMessage = (message) => __async(void 0, null, function* () {
|
|
18309
18600
|
const config14 = getWorkflowsConfig2();
|
|
@@ -18362,7 +18653,7 @@ var OneMessagesProvider = ({
|
|
|
18362
18653
|
[events, isLoading, isError]
|
|
18363
18654
|
);
|
|
18364
18655
|
const hasAdditionalEvents = events.length !== eventsGroup.length;
|
|
18365
|
-
return /* @__PURE__ */ (0,
|
|
18656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
18366
18657
|
OneMessagesContext.Provider,
|
|
18367
18658
|
{
|
|
18368
18659
|
value: {
|
|
@@ -19431,7 +19722,7 @@ var NavigateButton = ({
|
|
|
19431
19722
|
var import_react106 = require("react");
|
|
19432
19723
|
var import_design_system_icons30 = require("@livechat/design-system-icons");
|
|
19433
19724
|
var import_design_system_react_components57 = require("@livechat/design-system-react-components");
|
|
19434
|
-
var
|
|
19725
|
+
var import_developer_studio_ui_react38 = require("@livechat/developer-studio-ui-react");
|
|
19435
19726
|
|
|
19436
19727
|
// src/views/Flows/Definitions/Common/One/components/ApplyWorkflowButton.tsx
|
|
19437
19728
|
var import_react104 = require("react");
|
|
@@ -19489,12 +19780,12 @@ var ApplyWorkflowButton = ({
|
|
|
19489
19780
|
};
|
|
19490
19781
|
|
|
19491
19782
|
// src/views/Flows/Definitions/Common/One/hooks/use-message-bottom-bar.ts
|
|
19492
|
-
var
|
|
19783
|
+
var import_developer_studio_ui_react37 = require("@livechat/developer-studio-ui-react");
|
|
19493
19784
|
var useMessageBottomBar = (event) => {
|
|
19494
19785
|
const { text: text2, sessionId } = event;
|
|
19495
|
-
const notifications = (0,
|
|
19786
|
+
const notifications = (0, import_developer_studio_ui_react37.useNotifications)();
|
|
19496
19787
|
const handleCopyClick = () => __async(void 0, null, function* () {
|
|
19497
|
-
const isCopied = yield (0,
|
|
19788
|
+
const isCopied = yield (0, import_developer_studio_ui_react37.copyTextToClipboard)(text2);
|
|
19498
19789
|
if (isCopied) {
|
|
19499
19790
|
notifications.showSuccess("Message copied successfully");
|
|
19500
19791
|
} else {
|
|
@@ -19531,7 +19822,7 @@ var OneAssistantMessageBottomBar = ({
|
|
|
19531
19822
|
const numberOfSources = (eventSources == null ? void 0 : eventSources.length) || 0;
|
|
19532
19823
|
const { topSources } = getSources(eventSources);
|
|
19533
19824
|
const { handleCopyClick, handleRateMessageClick } = useMessageBottomBar(event);
|
|
19534
|
-
const sourcesText = `${(0,
|
|
19825
|
+
const sourcesText = `${(0, import_developer_studio_ui_react38.plural)(numberOfSources, "Source", "Sources")}`;
|
|
19535
19826
|
return /* @__PURE__ */ jsxs2("div", { css: bottomBarContainer, children: [
|
|
19536
19827
|
/* @__PURE__ */ jsxs2("div", { css: bottomBar2, children: [
|
|
19537
19828
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
@@ -19846,12 +20137,12 @@ var OneChatFeedContent = ({
|
|
|
19846
20137
|
// src/views/Flows/Definitions/Common/One/widget/OneWidgetHeader.tsx
|
|
19847
20138
|
var import_design_system_icons31 = require("@livechat/design-system-icons");
|
|
19848
20139
|
var import_design_system_react_components60 = require("@livechat/design-system-react-components");
|
|
19849
|
-
var
|
|
20140
|
+
var import_developer_studio_ui_react39 = require("@livechat/developer-studio-ui-react");
|
|
19850
20141
|
var OneWidgetHeader = () => {
|
|
19851
20142
|
const { toggleOneWidget } = useOneWidgetContext();
|
|
19852
20143
|
return /* @__PURE__ */ jsxs2("div", { css: headerWrapper, children: [
|
|
19853
20144
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
19854
|
-
/* @__PURE__ */ jsx4(import_design_system_react_components60.Icon, { size: "xlarge", source:
|
|
20145
|
+
/* @__PURE__ */ jsx4(import_design_system_react_components60.Icon, { size: "xlarge", source: import_developer_studio_ui_react39.OneIcon }),
|
|
19855
20146
|
/* @__PURE__ */ jsx4(import_design_system_react_components60.Text, { as: "h2", children: "Copilot" })
|
|
19856
20147
|
] }),
|
|
19857
20148
|
/* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
|
|
@@ -19971,7 +20262,7 @@ var CustomControls = ({
|
|
|
19971
20262
|
}
|
|
19972
20263
|
`,
|
|
19973
20264
|
size: "large",
|
|
19974
|
-
source:
|
|
20265
|
+
source: import_developer_studio_ui_react40.OneIcon
|
|
19975
20266
|
}
|
|
19976
20267
|
)
|
|
19977
20268
|
}
|
|
@@ -20047,7 +20338,7 @@ var import_react110 = require("react");
|
|
|
20047
20338
|
var import_react_router_dom15 = require("react-router-dom");
|
|
20048
20339
|
var import_reactflow16 = require("reactflow");
|
|
20049
20340
|
var import_design_system_react_components62 = require("@livechat/design-system-react-components");
|
|
20050
|
-
var
|
|
20341
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
20051
20342
|
function SwitcherControls({
|
|
20052
20343
|
isDraft,
|
|
20053
20344
|
hasRelatedWorkflow,
|
|
@@ -20090,7 +20381,7 @@ function SwitcherControls({
|
|
|
20090
20381
|
}
|
|
20091
20382
|
};
|
|
20092
20383
|
if (!visibility.switcher || !isDraft && !hasRelatedWorkflow) {
|
|
20093
|
-
return /* @__PURE__ */ (0,
|
|
20384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react110.Fragment, {});
|
|
20094
20385
|
}
|
|
20095
20386
|
const handleVersionClick = (id) => {
|
|
20096
20387
|
if (id === "draft" && isDraft) {
|
|
@@ -20105,14 +20396,14 @@ function SwitcherControls({
|
|
|
20105
20396
|
});
|
|
20106
20397
|
focus();
|
|
20107
20398
|
};
|
|
20108
|
-
return /* @__PURE__ */ (0,
|
|
20399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
20109
20400
|
import_reactflow16.Controls,
|
|
20110
20401
|
{
|
|
20111
20402
|
showZoom: false,
|
|
20112
20403
|
showInteractive: false,
|
|
20113
20404
|
showFitView: false,
|
|
20114
20405
|
position: "top-center",
|
|
20115
|
-
children: /* @__PURE__ */ (0,
|
|
20406
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
20116
20407
|
import_design_system_react_components62.SegmentedControl,
|
|
20117
20408
|
{
|
|
20118
20409
|
size: "compact",
|
|
@@ -20183,16 +20474,16 @@ var Edges_default = CustomEdge_default;
|
|
|
20183
20474
|
|
|
20184
20475
|
// src/views/Flows/Definitions/Common/Builder/Editors/Visual/Diagram/Diagram.tsx
|
|
20185
20476
|
var import_style = require("reactflow/dist/style.css");
|
|
20186
|
-
var
|
|
20477
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
20187
20478
|
var nodeConfig = {
|
|
20188
|
-
[
|
|
20189
|
-
[
|
|
20190
|
-
[
|
|
20191
|
-
[
|
|
20192
|
-
[
|
|
20193
|
-
[
|
|
20194
|
-
[
|
|
20195
|
-
[
|
|
20479
|
+
[import_developer_studio_api38.WorkflowDefinitionTaskType.http]: Node_default2,
|
|
20480
|
+
[import_developer_studio_api38.WorkflowDefinitionTaskType.forkJoin]: Node_default,
|
|
20481
|
+
[import_developer_studio_api38.WorkflowDefinitionTaskType.switch]: Node_default3,
|
|
20482
|
+
[import_developer_studio_api38.WorkflowDefinitionTaskType.terminate]: Node_default4,
|
|
20483
|
+
[import_developer_studio_api38.WorkflowDefinitionTaskType.join]: Node_default7,
|
|
20484
|
+
[import_developer_studio_api38.WorkflowDefinitionTaskType.addNode]: Node_default6,
|
|
20485
|
+
[import_developer_studio_api38.WorkflowDefinitionTaskType.addTrigger]: Trigger_default,
|
|
20486
|
+
[import_developer_studio_api38.WorkflowDefinitionTaskType.trigger]: Node_default5
|
|
20196
20487
|
};
|
|
20197
20488
|
var nodeTypes = Object.entries(nodeConfig).reduce((result, [key, Node8]) => {
|
|
20198
20489
|
result[key] = Node8;
|
|
@@ -20241,10 +20532,10 @@ var Diagram = ({
|
|
|
20241
20532
|
if (forkNode.data.forkTasks.length > 2) {
|
|
20242
20533
|
const indexHelper = edge.id.split("-");
|
|
20243
20534
|
const pathIndex = indexHelper[indexHelper.length - 1];
|
|
20244
|
-
edge.data.label = /* @__PURE__ */ (0,
|
|
20535
|
+
edge.data.label = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
20245
20536
|
import_design_system_react_components64.Button,
|
|
20246
20537
|
{
|
|
20247
|
-
icon: /* @__PURE__ */ (0,
|
|
20538
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_design_system_react_components64.Icon, { source: import_design_system_icons33.Delete }),
|
|
20248
20539
|
kind: "plain",
|
|
20249
20540
|
onClick: () => {
|
|
20250
20541
|
forkNode.data.forkTasks.splice(pathIndex, 1);
|
|
@@ -20272,8 +20563,8 @@ var Diagram = ({
|
|
|
20272
20563
|
if (!workflow.draft && isRawEditorVisible) {
|
|
20273
20564
|
onRawEditorToggle && onRawEditorToggle();
|
|
20274
20565
|
}
|
|
20275
|
-
return /* @__PURE__ */ (0,
|
|
20276
|
-
/* @__PURE__ */ (0,
|
|
20566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_react113.Fragment, { children: [
|
|
20567
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
20277
20568
|
import_reactflow18.default,
|
|
20278
20569
|
{
|
|
20279
20570
|
nodes,
|
|
@@ -20286,7 +20577,7 @@ var Diagram = ({
|
|
|
20286
20577
|
return;
|
|
20287
20578
|
}
|
|
20288
20579
|
toggle(
|
|
20289
|
-
node2.type ===
|
|
20580
|
+
node2.type === import_developer_studio_api38.WorkflowDefinitionTaskType.trigger ? {
|
|
20290
20581
|
kind: "trigger",
|
|
20291
20582
|
id: node2.data.type
|
|
20292
20583
|
} : {
|
|
@@ -20307,7 +20598,7 @@ var Diagram = ({
|
|
|
20307
20598
|
},
|
|
20308
20599
|
edgeTypes,
|
|
20309
20600
|
children: [
|
|
20310
|
-
/* @__PURE__ */ (0,
|
|
20601
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
20311
20602
|
SwitcherControls,
|
|
20312
20603
|
{
|
|
20313
20604
|
isDraft: (_a = workflow.draft) != null ? _a : false,
|
|
@@ -20315,7 +20606,7 @@ var Diagram = ({
|
|
|
20315
20606
|
relatedWorkflowId: workflow.related_workflow_id
|
|
20316
20607
|
}
|
|
20317
20608
|
),
|
|
20318
|
-
/* @__PURE__ */ (0,
|
|
20609
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
20319
20610
|
CustomControls_default,
|
|
20320
20611
|
{
|
|
20321
20612
|
isRawEditorVisible,
|
|
@@ -20331,7 +20622,7 @@ var Diagram = ({
|
|
|
20331
20622
|
}
|
|
20332
20623
|
}
|
|
20333
20624
|
),
|
|
20334
|
-
/* @__PURE__ */ (0,
|
|
20625
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
20335
20626
|
import_reactflow18.Background,
|
|
20336
20627
|
{
|
|
20337
20628
|
color: `var(${import_design_system_react_components64.DesignToken.SurfaceSecondaryActive})`,
|
|
@@ -20342,7 +20633,7 @@ var Diagram = ({
|
|
|
20342
20633
|
]
|
|
20343
20634
|
}
|
|
20344
20635
|
),
|
|
20345
|
-
previewModalVisible.isVisible && /* @__PURE__ */ (0,
|
|
20636
|
+
previewModalVisible.isVisible && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
20346
20637
|
Preview_default,
|
|
20347
20638
|
{
|
|
20348
20639
|
onClose: () => {
|
|
@@ -20423,7 +20714,7 @@ var WorkflowBuilder = () => {
|
|
|
20423
20714
|
var Builder_default = WorkflowBuilder;
|
|
20424
20715
|
|
|
20425
20716
|
// src/views/Flows/Definitions/Common/Modals/Delete.tsx
|
|
20426
|
-
var
|
|
20717
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
20427
20718
|
var ModalContent2 = newStyled.div`
|
|
20428
20719
|
display: grid;
|
|
20429
20720
|
align-items: center;
|
|
@@ -20460,12 +20751,12 @@ function WorkflowDeleteModal({
|
|
|
20460
20751
|
} = useWorkflowContext();
|
|
20461
20752
|
const {
|
|
20462
20753
|
userData: { user }
|
|
20463
|
-
} = (0,
|
|
20754
|
+
} = (0, import_developer_studio_ui_react41.useRootContext)();
|
|
20464
20755
|
const amplitudeWorkflowsJourney = workflowsBlockAmplitudeJourneyFactory(
|
|
20465
20756
|
user == null ? void 0 : user.meta.email
|
|
20466
20757
|
);
|
|
20467
|
-
return /* @__PURE__ */ (0,
|
|
20468
|
-
/* @__PURE__ */ (0,
|
|
20758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_design_system_react_components66.Modal, { heading: true, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(ModalContent2, { children: [
|
|
20759
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
20469
20760
|
import_design_system_react_components66.Icon,
|
|
20470
20761
|
{
|
|
20471
20762
|
source: import_design_system_icons34.Error,
|
|
@@ -20473,20 +20764,20 @@ function WorkflowDeleteModal({
|
|
|
20473
20764
|
customColor: `var(${import_design_system_react_components66.DesignToken.ContentBasicDisabled})`
|
|
20474
20765
|
}
|
|
20475
20766
|
),
|
|
20476
|
-
/* @__PURE__ */ (0,
|
|
20767
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_design_system_react_components66.Heading, { as: "h2", size: "md", children: [
|
|
20477
20768
|
"You are",
|
|
20478
20769
|
" ",
|
|
20479
20770
|
version === "draft" ? `discarding a ${version}` : `deleting a ${version}`
|
|
20480
20771
|
] }),
|
|
20481
|
-
/* @__PURE__ */ (0,
|
|
20772
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_design_system_react_components66.Text, { size: "md", children: [
|
|
20482
20773
|
"You can\u2019t restore a",
|
|
20483
20774
|
" ",
|
|
20484
20775
|
version === "draft" ? `discarded ${version}` : `deleted ${version}`,
|
|
20485
20776
|
". Are you sure you want to continue?"
|
|
20486
20777
|
] }),
|
|
20487
|
-
/* @__PURE__ */ (0,
|
|
20488
|
-
/* @__PURE__ */ (0,
|
|
20489
|
-
/* @__PURE__ */ (0,
|
|
20778
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(ModalFooter, { children: [
|
|
20779
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_design_system_react_components66.Button, { kind: "secondary", onClick: onClose, children: "Cancel" }),
|
|
20780
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
20490
20781
|
import_design_system_react_components66.Button,
|
|
20491
20782
|
{
|
|
20492
20783
|
kind: "destructive",
|
|
@@ -20514,8 +20805,8 @@ function WorkflowDeleteModal({
|
|
|
20514
20805
|
var import_react_router_dom17 = require("react-router-dom");
|
|
20515
20806
|
var import_design_system_icons35 = require("@livechat/design-system-icons");
|
|
20516
20807
|
var import_design_system_react_components67 = require("@livechat/design-system-react-components");
|
|
20517
|
-
var
|
|
20518
|
-
var
|
|
20808
|
+
var import_developer_studio_ui_react42 = require("@livechat/developer-studio-ui-react");
|
|
20809
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
20519
20810
|
var ModalContent3 = newStyled.div`
|
|
20520
20811
|
display: grid;
|
|
20521
20812
|
align-items: center;
|
|
@@ -20549,12 +20840,12 @@ function WorkflowEditModal({ onClose }) {
|
|
|
20549
20840
|
} = useWorkflowContext();
|
|
20550
20841
|
const {
|
|
20551
20842
|
userData: { user }
|
|
20552
|
-
} = (0,
|
|
20843
|
+
} = (0, import_developer_studio_ui_react42.useRootContext)();
|
|
20553
20844
|
const amplitudeWorkflowsJourney = workflowsBlockAmplitudeJourneyFactory(
|
|
20554
20845
|
user == null ? void 0 : user.meta.email
|
|
20555
20846
|
);
|
|
20556
|
-
return /* @__PURE__ */ (0,
|
|
20557
|
-
/* @__PURE__ */ (0,
|
|
20847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_design_system_react_components67.Modal, { heading: true, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(ModalContent3, { children: [
|
|
20848
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20558
20849
|
import_design_system_react_components67.Icon,
|
|
20559
20850
|
{
|
|
20560
20851
|
source: import_design_system_icons35.Error,
|
|
@@ -20562,10 +20853,10 @@ function WorkflowEditModal({ onClose }) {
|
|
|
20562
20853
|
customColor: `var(${import_design_system_react_components67.DesignToken.ContentBasicDisabled})`
|
|
20563
20854
|
}
|
|
20564
20855
|
),
|
|
20565
|
-
/* @__PURE__ */ (0,
|
|
20566
|
-
/* @__PURE__ */ (0,
|
|
20567
|
-
/* @__PURE__ */ (0,
|
|
20568
|
-
/* @__PURE__ */ (0,
|
|
20856
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_design_system_react_components67.Heading, { as: "h2", size: "md", children: "You have an existing draft" }),
|
|
20857
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_design_system_react_components67.Text, { size: "md", children: "You already have an existing draft, by editing the published version you can overwrite the current draft for this workflow. Do you want to continue?" }),
|
|
20858
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(ModalFooter2, { children: [
|
|
20859
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20569
20860
|
import_design_system_react_components67.Button,
|
|
20570
20861
|
{
|
|
20571
20862
|
kind: "secondary",
|
|
@@ -20578,7 +20869,7 @@ function WorkflowEditModal({ onClose }) {
|
|
|
20578
20869
|
children: "Edit existing draft"
|
|
20579
20870
|
}
|
|
20580
20871
|
),
|
|
20581
|
-
/* @__PURE__ */ (0,
|
|
20872
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
20582
20873
|
import_design_system_react_components67.Button,
|
|
20583
20874
|
{
|
|
20584
20875
|
kind: "destructive",
|
|
@@ -20597,7 +20888,7 @@ function WorkflowEditModal({ onClose }) {
|
|
|
20597
20888
|
// src/views/Flows/Definitions/Common/Modals/Publish.tsx
|
|
20598
20889
|
var import_design_system_icons36 = require("@livechat/design-system-icons");
|
|
20599
20890
|
var import_design_system_react_components68 = require("@livechat/design-system-react-components");
|
|
20600
|
-
var
|
|
20891
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
20601
20892
|
var ModalContent4 = newStyled.div`
|
|
20602
20893
|
display: grid;
|
|
20603
20894
|
align-items: center;
|
|
@@ -20629,8 +20920,8 @@ function WorkflowPublishModal({
|
|
|
20629
20920
|
},
|
|
20630
20921
|
publishDraft
|
|
20631
20922
|
} = useWorkflowContext();
|
|
20632
|
-
return /* @__PURE__ */ (0,
|
|
20633
|
-
/* @__PURE__ */ (0,
|
|
20923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_design_system_react_components68.Modal, { heading: true, onClose, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(ModalContent4, { children: [
|
|
20924
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20634
20925
|
import_design_system_react_components68.Icon,
|
|
20635
20926
|
{
|
|
20636
20927
|
source: import_design_system_icons36.Error,
|
|
@@ -20638,11 +20929,11 @@ function WorkflowPublishModal({
|
|
|
20638
20929
|
customColor: `var(${import_design_system_react_components68.DesignToken.ContentBasicDisabled})`
|
|
20639
20930
|
}
|
|
20640
20931
|
),
|
|
20641
|
-
/* @__PURE__ */ (0,
|
|
20642
|
-
/* @__PURE__ */ (0,
|
|
20643
|
-
/* @__PURE__ */ (0,
|
|
20644
|
-
/* @__PURE__ */ (0,
|
|
20645
|
-
/* @__PURE__ */ (0,
|
|
20932
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_design_system_react_components68.Heading, { as: "h2", size: "md", children: "You are publishing a workflow" }),
|
|
20933
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_design_system_react_components68.Text, { size: "md", children: "Once published, this will be the working version of your workflow and will\xA0be\xA0automatically set to active." }),
|
|
20934
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(ModalFooter3, { children: [
|
|
20935
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_design_system_react_components68.Button, { kind: "secondary", onClick: onClose, children: "Cancel" }),
|
|
20936
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
20646
20937
|
import_design_system_react_components68.Button,
|
|
20647
20938
|
{
|
|
20648
20939
|
kind: "primary",
|
|
@@ -20748,13 +21039,13 @@ var Execute_default = ExecuteWorkflow;
|
|
|
20748
21039
|
var import_react119 = require("react");
|
|
20749
21040
|
var import_react_router_dom18 = require("react-router-dom");
|
|
20750
21041
|
var import_design_system_react_components71 = require("@livechat/design-system-react-components");
|
|
20751
|
-
var
|
|
20752
|
-
var
|
|
21042
|
+
var import_developer_studio_api39 = require("@livechat/developer-studio-api");
|
|
21043
|
+
var import_developer_studio_ui_react44 = require("@livechat/developer-studio-ui-react");
|
|
20753
21044
|
|
|
20754
21045
|
// src/views/Flows/Definitions/Edit/Tasks/Options.tsx
|
|
20755
21046
|
var import_react117 = require("react");
|
|
20756
21047
|
var import_design_system_react_components70 = require("@livechat/design-system-react-components");
|
|
20757
|
-
var
|
|
21048
|
+
var import_developer_studio_ui_react43 = require("@livechat/developer-studio-ui-react");
|
|
20758
21049
|
var itemOptionCss = (active) => css`
|
|
20759
21050
|
display: flex;
|
|
20760
21051
|
align-items: center;
|
|
@@ -20775,7 +21066,7 @@ var itemOptionCss = (active) => css`
|
|
|
20775
21066
|
}
|
|
20776
21067
|
`;
|
|
20777
21068
|
var ItemOption = ({ option, onClick, active }) => {
|
|
20778
|
-
return /* @__PURE__ */ jsx4("div", { css: itemOptionCss(active), onClick, children: /* @__PURE__ */ jsxs2(
|
|
21069
|
+
return /* @__PURE__ */ jsx4("div", { css: itemOptionCss(active), onClick, children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react43.Column, { setColumnPadding: "0", width: 6, children: [
|
|
20779
21070
|
/* @__PURE__ */ jsx4(import_design_system_react_components70.Text, { noMargin: true, children: option.name }),
|
|
20780
21071
|
/* @__PURE__ */ jsx4(
|
|
20781
21072
|
import_design_system_react_components70.Text,
|
|
@@ -20889,9 +21180,9 @@ var config10 = [
|
|
|
20889
21180
|
}))
|
|
20890
21181
|
},
|
|
20891
21182
|
{
|
|
20892
|
-
name:
|
|
20893
|
-
displayName:
|
|
20894
|
-
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product:
|
|
21183
|
+
name: import_developer_studio_api39.IntegrationNames.Mailchimp,
|
|
21184
|
+
displayName: import_developer_studio_api39.IntegrationDisplayNames.Mailchimp,
|
|
21185
|
+
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product: import_developer_studio_api39.IntegrationNames.Mailchimp, height: 5, width: 5 }),
|
|
20895
21186
|
values: Object.values(mailchimpTaskConfigs).map((x) => ({
|
|
20896
21187
|
key: x.key,
|
|
20897
21188
|
name: x.customization.displayName,
|
|
@@ -20900,9 +21191,9 @@ var config10 = [
|
|
|
20900
21191
|
}))
|
|
20901
21192
|
},
|
|
20902
21193
|
{
|
|
20903
|
-
name:
|
|
20904
|
-
displayName:
|
|
20905
|
-
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product:
|
|
21194
|
+
name: import_developer_studio_api39.IntegrationNames.HubSpot,
|
|
21195
|
+
displayName: import_developer_studio_api39.IntegrationDisplayNames.HubSpot,
|
|
21196
|
+
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product: import_developer_studio_api39.IntegrationNames.HubSpot, height: 5, width: 5 }),
|
|
20906
21197
|
values: Object.values(hubspotTaskConfigs).map((x) => ({
|
|
20907
21198
|
key: x.key,
|
|
20908
21199
|
name: x.customization.displayName,
|
|
@@ -20911,12 +21202,12 @@ var config10 = [
|
|
|
20911
21202
|
}))
|
|
20912
21203
|
},
|
|
20913
21204
|
{
|
|
20914
|
-
name:
|
|
20915
|
-
displayName:
|
|
21205
|
+
name: import_developer_studio_api39.IntegrationNames.BigCommerce,
|
|
21206
|
+
displayName: import_developer_studio_api39.IntegrationDisplayNames.BigCommerce,
|
|
20916
21207
|
icon: /* @__PURE__ */ jsx4(
|
|
20917
21208
|
ProductIcon_default,
|
|
20918
21209
|
{
|
|
20919
|
-
product:
|
|
21210
|
+
product: import_developer_studio_api39.IntegrationNames.BigCommerce,
|
|
20920
21211
|
height: 5,
|
|
20921
21212
|
width: 5
|
|
20922
21213
|
}
|
|
@@ -20929,9 +21220,9 @@ var config10 = [
|
|
|
20929
21220
|
}))
|
|
20930
21221
|
},
|
|
20931
21222
|
{
|
|
20932
|
-
name:
|
|
20933
|
-
displayName:
|
|
20934
|
-
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product:
|
|
21223
|
+
name: import_developer_studio_api39.IntegrationNames.Shopify,
|
|
21224
|
+
displayName: import_developer_studio_api39.IntegrationDisplayNames.Shopify,
|
|
21225
|
+
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product: import_developer_studio_api39.IntegrationNames.Shopify, height: 5, width: 5 }),
|
|
20935
21226
|
values: Object.values(shopifyTaskConfigs).map((x) => ({
|
|
20936
21227
|
key: x.key,
|
|
20937
21228
|
name: x.customization.displayName,
|
|
@@ -20953,7 +21244,7 @@ var AddWorkflowTask = ({ basePath, onClose }) => {
|
|
|
20953
21244
|
} = useWorkflowContext();
|
|
20954
21245
|
const {
|
|
20955
21246
|
userData: { user }
|
|
20956
|
-
} = (0,
|
|
21247
|
+
} = (0, import_developer_studio_ui_react44.useRootContext)();
|
|
20957
21248
|
const amplitudeWorkflowsJourney = workflowsBlockAmplitudeJourneyFactory(
|
|
20958
21249
|
user == null ? void 0 : user.meta.email
|
|
20959
21250
|
);
|
|
@@ -21022,7 +21313,7 @@ var AddWorkflowTask = ({ basePath, onClose }) => {
|
|
|
21022
21313
|
width: 650px;
|
|
21023
21314
|
`,
|
|
21024
21315
|
heading: /* @__PURE__ */ jsx4(import_design_system_react_components71.ModalHeader, { title: "Add task" }),
|
|
21025
|
-
footer: /* @__PURE__ */ jsxs2(
|
|
21316
|
+
footer: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react44.Row, { gap: `var(${import_design_system_react_components71.SpacingToken.Spacing2})`, flexEnd: true, notPadded: true, children: [
|
|
21026
21317
|
/* @__PURE__ */ jsx4(import_design_system_react_components71.Button, { size: "medium", kind: "secondary", onClick: onClose, children: "Cancel" }),
|
|
21027
21318
|
/* @__PURE__ */ jsx4(
|
|
21028
21319
|
import_design_system_react_components71.Button,
|
|
@@ -21038,9 +21329,9 @@ var AddWorkflowTask = ({ basePath, onClose }) => {
|
|
|
21038
21329
|
)
|
|
21039
21330
|
] }),
|
|
21040
21331
|
onClose,
|
|
21041
|
-
children: /* @__PURE__ */ jsxs2(
|
|
21332
|
+
children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react44.Row, { notPadded: true, children: [
|
|
21042
21333
|
/* @__PURE__ */ jsxs2(
|
|
21043
|
-
|
|
21334
|
+
import_developer_studio_ui_react44.Column,
|
|
21044
21335
|
{
|
|
21045
21336
|
width: 2,
|
|
21046
21337
|
noWrap: true,
|
|
@@ -21070,7 +21361,7 @@ var AddWorkflowTask = ({ basePath, onClose }) => {
|
|
|
21070
21361
|
}
|
|
21071
21362
|
),
|
|
21072
21363
|
config10.map(({ name, displayName, icon: icon2, values }) => {
|
|
21073
|
-
const revertIconColor = getWorkflowEnv2("isHeadless") && (name === "openai" || name ===
|
|
21364
|
+
const revertIconColor = getWorkflowEnv2("isHeadless") && (name === "openai" || name === import_developer_studio_api39.IntegrationNames.BigCommerce);
|
|
21074
21365
|
if (search) {
|
|
21075
21366
|
if (values.some(
|
|
21076
21367
|
(el) => el.name.toLowerCase().includes(search.toLowerCase())
|
|
@@ -21079,7 +21370,7 @@ var AddWorkflowTask = ({ basePath, onClose }) => {
|
|
|
21079
21370
|
}
|
|
21080
21371
|
}
|
|
21081
21372
|
return /* @__PURE__ */ jsxs2(
|
|
21082
|
-
|
|
21373
|
+
import_developer_studio_ui_react44.Row,
|
|
21083
21374
|
{
|
|
21084
21375
|
center: true,
|
|
21085
21376
|
setRowPadding: `var(${import_design_system_react_components71.SpacingToken.Spacing2})`,
|
|
@@ -21126,7 +21417,7 @@ var AddWorkflowTask = ({ basePath, onClose }) => {
|
|
|
21126
21417
|
css: css`
|
|
21127
21418
|
text-decoration: none;
|
|
21128
21419
|
`,
|
|
21129
|
-
children: /* @__PURE__ */ jsx4(
|
|
21420
|
+
children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Text, { size: "md", children: displayName })
|
|
21130
21421
|
}
|
|
21131
21422
|
)
|
|
21132
21423
|
]
|
|
@@ -21137,7 +21428,7 @@ var AddWorkflowTask = ({ basePath, onClose }) => {
|
|
|
21137
21428
|
}
|
|
21138
21429
|
),
|
|
21139
21430
|
/* @__PURE__ */ jsx4(
|
|
21140
|
-
|
|
21431
|
+
import_developer_studio_ui_react44.Column,
|
|
21141
21432
|
{
|
|
21142
21433
|
css: css`
|
|
21143
21434
|
height: 350px;
|
|
@@ -21154,7 +21445,7 @@ var AddWorkflowTask = ({ basePath, onClose }) => {
|
|
|
21154
21445
|
})).sort((a, b) => a.name.localeCompare(b.name)).filter(
|
|
21155
21446
|
(el) => el.name.toLowerCase().includes(search.toLowerCase())
|
|
21156
21447
|
);
|
|
21157
|
-
return /* @__PURE__ */ jsx4(
|
|
21448
|
+
return /* @__PURE__ */ jsx4(import_developer_studio_ui_react44.Row, { notPadded: true, gap: "4px", children: /* @__PURE__ */ jsx4(
|
|
21158
21449
|
Options_default,
|
|
21159
21450
|
{
|
|
21160
21451
|
options: options2,
|
|
@@ -21182,13 +21473,13 @@ var Add_default = AddWorkflowTask;
|
|
|
21182
21473
|
var import_react123 = require("react");
|
|
21183
21474
|
var import_react_router_dom19 = require("react-router-dom");
|
|
21184
21475
|
var import_design_system_react_components73 = require("@livechat/design-system-react-components");
|
|
21185
|
-
var
|
|
21186
|
-
var
|
|
21476
|
+
var import_developer_studio_api40 = require("@livechat/developer-studio-api");
|
|
21477
|
+
var import_developer_studio_ui_react46 = require("@livechat/developer-studio-ui-react");
|
|
21187
21478
|
|
|
21188
21479
|
// src/views/Flows/Definitions/Edit/Triggers/Options.tsx
|
|
21189
21480
|
var import_react121 = require("react");
|
|
21190
21481
|
var import_design_system_react_components72 = require("@livechat/design-system-react-components");
|
|
21191
|
-
var
|
|
21482
|
+
var import_developer_studio_ui_react45 = require("@livechat/developer-studio-ui-react");
|
|
21192
21483
|
var itemOptionCss2 = (active) => css`
|
|
21193
21484
|
display: flex;
|
|
21194
21485
|
align-items: center;
|
|
@@ -21209,7 +21500,7 @@ var itemOptionCss2 = (active) => css`
|
|
|
21209
21500
|
}
|
|
21210
21501
|
`;
|
|
21211
21502
|
var ItemOption2 = ({ option, onClick, active }) => {
|
|
21212
|
-
return /* @__PURE__ */ jsx4("div", { css: itemOptionCss2(active), onClick, children: /* @__PURE__ */ jsxs2(
|
|
21503
|
+
return /* @__PURE__ */ jsx4("div", { css: itemOptionCss2(active), onClick, children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react45.Column, { setColumnPadding: "0", width: 6, children: [
|
|
21213
21504
|
/* @__PURE__ */ jsx4(import_design_system_react_components72.Text, { noMargin: true, bold: true, children: option.name }),
|
|
21214
21505
|
/* @__PURE__ */ jsx4(
|
|
21215
21506
|
import_design_system_react_components72.Text,
|
|
@@ -21300,9 +21591,9 @@ var config11 = [
|
|
|
21300
21591
|
}))
|
|
21301
21592
|
},
|
|
21302
21593
|
{
|
|
21303
|
-
name:
|
|
21304
|
-
displayName:
|
|
21305
|
-
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product:
|
|
21594
|
+
name: import_developer_studio_api40.IntegrationNames.Mailchimp,
|
|
21595
|
+
displayName: import_developer_studio_api40.IntegrationDisplayNames.Mailchimp,
|
|
21596
|
+
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product: import_developer_studio_api40.IntegrationNames.Mailchimp, height: 5, width: 5 }),
|
|
21306
21597
|
values: Object.values(mailchimpTriggerConfigs).map((x) => ({
|
|
21307
21598
|
key: x.key,
|
|
21308
21599
|
name: x.customization.displayName,
|
|
@@ -21310,9 +21601,9 @@ var config11 = [
|
|
|
21310
21601
|
}))
|
|
21311
21602
|
},
|
|
21312
21603
|
{
|
|
21313
|
-
name:
|
|
21314
|
-
displayName:
|
|
21315
|
-
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product:
|
|
21604
|
+
name: import_developer_studio_api40.IntegrationNames.Shopify,
|
|
21605
|
+
displayName: import_developer_studio_api40.IntegrationDisplayNames.Shopify,
|
|
21606
|
+
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product: import_developer_studio_api40.IntegrationNames.Shopify, height: 5, width: 5 }),
|
|
21316
21607
|
values: Object.values(shopifyTriggerConfigs).map((x) => ({
|
|
21317
21608
|
key: x.key,
|
|
21318
21609
|
name: x.customization.displayName,
|
|
@@ -21320,9 +21611,9 @@ var config11 = [
|
|
|
21320
21611
|
}))
|
|
21321
21612
|
},
|
|
21322
21613
|
{
|
|
21323
|
-
name:
|
|
21324
|
-
displayName:
|
|
21325
|
-
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product:
|
|
21614
|
+
name: import_developer_studio_api40.IntegrationNames.HubSpot,
|
|
21615
|
+
displayName: import_developer_studio_api40.IntegrationDisplayNames.HubSpot,
|
|
21616
|
+
icon: /* @__PURE__ */ jsx4(ProductIcon_default, { product: import_developer_studio_api40.IntegrationNames.HubSpot, height: 5, width: 5 }),
|
|
21326
21617
|
values: Object.values(hubspotTriggerConfigs).map((x) => ({
|
|
21327
21618
|
key: x.key,
|
|
21328
21619
|
name: x.customization.displayName,
|
|
@@ -21330,12 +21621,12 @@ var config11 = [
|
|
|
21330
21621
|
}))
|
|
21331
21622
|
},
|
|
21332
21623
|
{
|
|
21333
|
-
name:
|
|
21334
|
-
displayName:
|
|
21624
|
+
name: import_developer_studio_api40.IntegrationNames.BigCommerce,
|
|
21625
|
+
displayName: import_developer_studio_api40.IntegrationDisplayNames.BigCommerce,
|
|
21335
21626
|
icon: /* @__PURE__ */ jsx4(
|
|
21336
21627
|
ProductIcon_default,
|
|
21337
21628
|
{
|
|
21338
|
-
product:
|
|
21629
|
+
product: import_developer_studio_api40.IntegrationNames.BigCommerce,
|
|
21339
21630
|
height: 5,
|
|
21340
21631
|
width: 5
|
|
21341
21632
|
}
|
|
@@ -21356,7 +21647,7 @@ var AddWorkflowTrigger = ({ basePath, onClose }) => {
|
|
|
21356
21647
|
const { addTrigger } = useWorkflowContext();
|
|
21357
21648
|
const {
|
|
21358
21649
|
userData: { user }
|
|
21359
|
-
} = (0,
|
|
21650
|
+
} = (0, import_developer_studio_ui_react46.useRootContext)();
|
|
21360
21651
|
const amplitudeWorkflowsJourney = workflowsBlockAmplitudeJourneyFactory(
|
|
21361
21652
|
user == null ? void 0 : user.meta.email
|
|
21362
21653
|
);
|
|
@@ -21388,7 +21679,7 @@ var AddWorkflowTrigger = ({ basePath, onClose }) => {
|
|
|
21388
21679
|
width: 650px;
|
|
21389
21680
|
`,
|
|
21390
21681
|
heading: /* @__PURE__ */ jsx4(import_design_system_react_components73.ModalHeader, { title: "Add trigger" }),
|
|
21391
|
-
footer: /* @__PURE__ */ jsxs2(
|
|
21682
|
+
footer: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react46.Row, { gap: `var(${import_design_system_react_components73.SpacingToken.Spacing2})`, flexEnd: true, notPadded: true, children: [
|
|
21392
21683
|
/* @__PURE__ */ jsx4(import_design_system_react_components73.Button, { size: "medium", kind: "secondary", onClick: onClose, children: "Cancel" }),
|
|
21393
21684
|
/* @__PURE__ */ jsx4(
|
|
21394
21685
|
import_design_system_react_components73.Button,
|
|
@@ -21404,9 +21695,9 @@ var AddWorkflowTrigger = ({ basePath, onClose }) => {
|
|
|
21404
21695
|
)
|
|
21405
21696
|
] }),
|
|
21406
21697
|
onClose,
|
|
21407
|
-
children: /* @__PURE__ */ jsxs2(
|
|
21698
|
+
children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react46.Row, { notPadded: true, children: [
|
|
21408
21699
|
/* @__PURE__ */ jsxs2(
|
|
21409
|
-
|
|
21700
|
+
import_developer_studio_ui_react46.Column,
|
|
21410
21701
|
{
|
|
21411
21702
|
width: 2,
|
|
21412
21703
|
noWrap: true,
|
|
@@ -21436,7 +21727,7 @@ var AddWorkflowTrigger = ({ basePath, onClose }) => {
|
|
|
21436
21727
|
}
|
|
21437
21728
|
),
|
|
21438
21729
|
config11.map(({ name, displayName, icon: icon2, values }) => {
|
|
21439
|
-
const revertIconColor = getWorkflowEnv2("isHeadless") && (name ===
|
|
21730
|
+
const revertIconColor = getWorkflowEnv2("isHeadless") && (name === import_developer_studio_api40.IntegrationNames.OpenAI || name === import_developer_studio_api40.IntegrationNames.BigCommerce);
|
|
21440
21731
|
if (search) {
|
|
21441
21732
|
if (values.some(
|
|
21442
21733
|
(el) => el.name.toLowerCase().includes(search.toLowerCase())
|
|
@@ -21445,7 +21736,7 @@ var AddWorkflowTrigger = ({ basePath, onClose }) => {
|
|
|
21445
21736
|
}
|
|
21446
21737
|
}
|
|
21447
21738
|
return /* @__PURE__ */ jsxs2(
|
|
21448
|
-
|
|
21739
|
+
import_developer_studio_ui_react46.Row,
|
|
21449
21740
|
{
|
|
21450
21741
|
setRowPadding: `var(${import_design_system_react_components73.SpacingToken.Spacing2})`,
|
|
21451
21742
|
center: true,
|
|
@@ -21492,7 +21783,7 @@ var AddWorkflowTrigger = ({ basePath, onClose }) => {
|
|
|
21492
21783
|
css: css`
|
|
21493
21784
|
text-decoration: none;
|
|
21494
21785
|
`,
|
|
21495
|
-
children: /* @__PURE__ */ jsx4(
|
|
21786
|
+
children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react46.Text, { size: "md", children: displayName })
|
|
21496
21787
|
}
|
|
21497
21788
|
)
|
|
21498
21789
|
]
|
|
@@ -21503,7 +21794,7 @@ var AddWorkflowTrigger = ({ basePath, onClose }) => {
|
|
|
21503
21794
|
}
|
|
21504
21795
|
),
|
|
21505
21796
|
/* @__PURE__ */ jsx4(
|
|
21506
|
-
|
|
21797
|
+
import_developer_studio_ui_react46.Column,
|
|
21507
21798
|
{
|
|
21508
21799
|
css: css`
|
|
21509
21800
|
height: 350px;
|
|
@@ -21521,7 +21812,7 @@ var AddWorkflowTrigger = ({ basePath, onClose }) => {
|
|
|
21521
21812
|
})).sort((a, b) => a.name.localeCompare(b.name)).filter(
|
|
21522
21813
|
(el) => el.name.toLowerCase().includes(search.toLowerCase())
|
|
21523
21814
|
);
|
|
21524
|
-
return /* @__PURE__ */ jsx4(
|
|
21815
|
+
return /* @__PURE__ */ jsx4(import_developer_studio_ui_react46.Row, { notPadded: true, gap: "4px", children: /* @__PURE__ */ jsx4(
|
|
21525
21816
|
Options_default2,
|
|
21526
21817
|
{
|
|
21527
21818
|
options: options2,
|
|
@@ -21550,7 +21841,7 @@ var import_react125 = require("react");
|
|
|
21550
21841
|
var import_react_router_dom20 = require("react-router-dom");
|
|
21551
21842
|
var import_design_system_icons37 = require("@livechat/design-system-icons");
|
|
21552
21843
|
var import_design_system_react_components74 = require("@livechat/design-system-react-components");
|
|
21553
|
-
var
|
|
21844
|
+
var import_developer_studio_ui_react47 = require("@livechat/developer-studio-ui-react");
|
|
21554
21845
|
var WorkflowBuilderNavbar = () => {
|
|
21555
21846
|
var _a, _b, _c, _d, _e;
|
|
21556
21847
|
const navigate = (0, import_react_router_dom20.useNavigate)();
|
|
@@ -21571,14 +21862,14 @@ var WorkflowBuilderNavbar = () => {
|
|
|
21571
21862
|
const [workflowName, setWorkflowName] = (0, import_react125.useState)(workflow.name);
|
|
21572
21863
|
const {
|
|
21573
21864
|
userData: { user }
|
|
21574
|
-
} = (0,
|
|
21865
|
+
} = (0, import_developer_studio_ui_react47.useRootContext)();
|
|
21575
21866
|
const amplitudeWorkflowsJourney = workflowsBlockAmplitudeJourneyFactory(
|
|
21576
21867
|
user == null ? void 0 : user.meta.email
|
|
21577
21868
|
);
|
|
21578
21869
|
(0, import_react125.useEffect)(() => {
|
|
21579
21870
|
setWorkflowName(workflow.name);
|
|
21580
21871
|
}, [workflow.name]);
|
|
21581
|
-
(0,
|
|
21872
|
+
(0, import_developer_studio_ui_react47.useOnClickOutside)(inputRef, () => {
|
|
21582
21873
|
setIsNameChanging(false);
|
|
21583
21874
|
});
|
|
21584
21875
|
const menuOptions = [
|
|
@@ -21625,7 +21916,7 @@ var WorkflowBuilderNavbar = () => {
|
|
|
21625
21916
|
}));
|
|
21626
21917
|
};
|
|
21627
21918
|
return /* @__PURE__ */ jsxs2(
|
|
21628
|
-
|
|
21919
|
+
import_developer_studio_ui_react47.Row,
|
|
21629
21920
|
{
|
|
21630
21921
|
center: true,
|
|
21631
21922
|
noMaxWidth: true,
|
|
@@ -21652,7 +21943,7 @@ var WorkflowBuilderNavbar = () => {
|
|
|
21652
21943
|
onClick: () => {
|
|
21653
21944
|
navigate("/workflow/list");
|
|
21654
21945
|
},
|
|
21655
|
-
children: /* @__PURE__ */ jsxs2(
|
|
21946
|
+
children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react47.Row, { center: true, notPadded: true, noWrap: true, children: [
|
|
21656
21947
|
/* @__PURE__ */ jsx4(
|
|
21657
21948
|
import_design_system_react_components74.Icon,
|
|
21658
21949
|
{
|
|
@@ -21668,9 +21959,9 @@ var WorkflowBuilderNavbar = () => {
|
|
|
21668
21959
|
] })
|
|
21669
21960
|
}
|
|
21670
21961
|
),
|
|
21671
|
-
/* @__PURE__ */ jsxs2(
|
|
21672
|
-
/* @__PURE__ */ jsx4(
|
|
21673
|
-
/* @__PURE__ */ jsx4(
|
|
21962
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react47.Row, { center: true, noMaxWidth: true, setRowPadding: "4px 16px", spaceBetween: true, children: [
|
|
21963
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react47.Column, {}),
|
|
21964
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react47.Column, { center: true, children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react47.Row, { center: true, verticalCenter: true, noWrap: true, children: [
|
|
21674
21965
|
/* @__PURE__ */ jsx4(
|
|
21675
21966
|
import_design_system_react_components74.FormField,
|
|
21676
21967
|
{
|
|
@@ -21742,8 +22033,8 @@ var WorkflowBuilderNavbar = () => {
|
|
|
21742
22033
|
}
|
|
21743
22034
|
)
|
|
21744
22035
|
] }) }),
|
|
21745
|
-
/* @__PURE__ */ jsx4(
|
|
21746
|
-
|
|
22036
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react47.Column, { setColumnPadding: "0", children: /* @__PURE__ */ jsxs2(
|
|
22037
|
+
import_developer_studio_ui_react47.Row,
|
|
21747
22038
|
{
|
|
21748
22039
|
center: true,
|
|
21749
22040
|
notPadded: true,
|
|
@@ -21857,7 +22148,7 @@ var EditWorkflow = () => {
|
|
|
21857
22148
|
return /* @__PURE__ */ jsx4(import_react127.Fragment, {});
|
|
21858
22149
|
}
|
|
21859
22150
|
if (id !== "new" && workflowQuery.isLoading) {
|
|
21860
|
-
return /* @__PURE__ */ jsx4(
|
|
22151
|
+
return /* @__PURE__ */ jsx4(import_developer_studio_ui_react48.Loader, { stretch: true });
|
|
21861
22152
|
}
|
|
21862
22153
|
if (id !== "new" && !workflowQuery.isSuccess) {
|
|
21863
22154
|
throw new Error("Couldn't load workflow");
|
|
@@ -21978,7 +22269,7 @@ var import_react_router_dom23 = require("react-router-dom");
|
|
|
21978
22269
|
|
|
21979
22270
|
// src/views/Flows/Templates/api.mocks.tsx
|
|
21980
22271
|
var import_design_system_icons38 = require("@livechat/design-system-icons");
|
|
21981
|
-
var
|
|
22272
|
+
var import_developer_studio_api41 = require("@livechat/developer-studio-api");
|
|
21982
22273
|
var config12 = getWorkflowsConfig2();
|
|
21983
22274
|
var flowTemplates = [
|
|
21984
22275
|
{
|
|
@@ -22010,9 +22301,9 @@ var flowTemplates = [
|
|
|
22010
22301
|
trigger: {
|
|
22011
22302
|
type: "webhook",
|
|
22012
22303
|
webhook: {
|
|
22013
|
-
source: `${
|
|
22304
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
22014
22305
|
event: {
|
|
22015
|
-
name:
|
|
22306
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatEnded
|
|
22016
22307
|
},
|
|
22017
22308
|
headers: {
|
|
22018
22309
|
"x-adapter-text-token": [
|
|
@@ -22231,9 +22522,9 @@ var flowTemplates = [
|
|
|
22231
22522
|
trigger: {
|
|
22232
22523
|
type: "webhook",
|
|
22233
22524
|
webhook: {
|
|
22234
|
-
source: `${
|
|
22525
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
22235
22526
|
event: {
|
|
22236
|
-
name:
|
|
22527
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatMessage,
|
|
22237
22528
|
filter: "competitor"
|
|
22238
22529
|
},
|
|
22239
22530
|
headers: {
|
|
@@ -22379,9 +22670,9 @@ var flowTemplates = [
|
|
|
22379
22670
|
trigger: {
|
|
22380
22671
|
type: "webhook",
|
|
22381
22672
|
webhook: {
|
|
22382
|
-
source: `${
|
|
22673
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
22383
22674
|
event: {
|
|
22384
|
-
name:
|
|
22675
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatEnded
|
|
22385
22676
|
},
|
|
22386
22677
|
headers: {
|
|
22387
22678
|
"x-adapter-text-token": [
|
|
@@ -22531,7 +22822,7 @@ var flowTemplates = [
|
|
|
22531
22822
|
webhook: {
|
|
22532
22823
|
source: "text-livechat",
|
|
22533
22824
|
event: {
|
|
22534
|
-
name:
|
|
22825
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatEnded
|
|
22535
22826
|
},
|
|
22536
22827
|
headers: {
|
|
22537
22828
|
"x-adapter-text-token": [
|
|
@@ -22673,9 +22964,9 @@ var flowTemplates = [
|
|
|
22673
22964
|
trigger: {
|
|
22674
22965
|
type: "webhook",
|
|
22675
22966
|
webhook: {
|
|
22676
|
-
source: `${
|
|
22967
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
22677
22968
|
event: {
|
|
22678
|
-
name:
|
|
22969
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatEnded
|
|
22679
22970
|
},
|
|
22680
22971
|
headers: {
|
|
22681
22972
|
"x-adapter-text-token": [
|
|
@@ -22746,9 +23037,9 @@ var flowTemplates = [
|
|
|
22746
23037
|
trigger: {
|
|
22747
23038
|
type: "webhook",
|
|
22748
23039
|
webhook: {
|
|
22749
|
-
source: `${
|
|
23040
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
22750
23041
|
event: {
|
|
22751
|
-
name:
|
|
23042
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatStarted
|
|
22752
23043
|
},
|
|
22753
23044
|
headers: {
|
|
22754
23045
|
"x-adapter-text-token": [
|
|
@@ -22865,9 +23156,9 @@ var flowTemplates = [
|
|
|
22865
23156
|
trigger: {
|
|
22866
23157
|
type: "webhook",
|
|
22867
23158
|
webhook: {
|
|
22868
|
-
source: `${
|
|
23159
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
22869
23160
|
event: {
|
|
22870
|
-
name:
|
|
23161
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatRated,
|
|
22871
23162
|
rating: "bad"
|
|
22872
23163
|
},
|
|
22873
23164
|
headers: {
|
|
@@ -22983,9 +23274,9 @@ var flowTemplates = [
|
|
|
22983
23274
|
trigger: {
|
|
22984
23275
|
type: "webhook",
|
|
22985
23276
|
webhook: {
|
|
22986
|
-
source: `${
|
|
23277
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
22987
23278
|
event: {
|
|
22988
|
-
name:
|
|
23279
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatStarted
|
|
22989
23280
|
},
|
|
22990
23281
|
headers: {
|
|
22991
23282
|
"x-cred-access-token": [
|
|
@@ -23076,9 +23367,9 @@ var flowTemplates = [
|
|
|
23076
23367
|
trigger: {
|
|
23077
23368
|
type: "webhook",
|
|
23078
23369
|
webhook: {
|
|
23079
|
-
source: `${
|
|
23370
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
23080
23371
|
event: {
|
|
23081
|
-
name:
|
|
23372
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatEnded
|
|
23082
23373
|
},
|
|
23083
23374
|
headers: {
|
|
23084
23375
|
"x-cred-access-token": [
|
|
@@ -23174,9 +23465,9 @@ var flowTemplates = [
|
|
|
23174
23465
|
trigger: {
|
|
23175
23466
|
type: "webhook",
|
|
23176
23467
|
webhook: {
|
|
23177
|
-
source: `${
|
|
23468
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
23178
23469
|
event: {
|
|
23179
|
-
name:
|
|
23470
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatStarted
|
|
23180
23471
|
},
|
|
23181
23472
|
headers: {
|
|
23182
23473
|
"x-cred-access-token": [
|
|
@@ -23292,9 +23583,9 @@ var flowTemplates = [
|
|
|
23292
23583
|
trigger: {
|
|
23293
23584
|
type: "webhook",
|
|
23294
23585
|
webhook: {
|
|
23295
|
-
source: `${
|
|
23586
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
23296
23587
|
event: {
|
|
23297
|
-
name:
|
|
23588
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatEnded
|
|
23298
23589
|
},
|
|
23299
23590
|
headers: {
|
|
23300
23591
|
"x-cred-access-token": [
|
|
@@ -23390,9 +23681,9 @@ var flowTemplates = [
|
|
|
23390
23681
|
trigger: {
|
|
23391
23682
|
type: "webhook",
|
|
23392
23683
|
webhook: {
|
|
23393
|
-
source: `${
|
|
23684
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
23394
23685
|
event: {
|
|
23395
|
-
name:
|
|
23686
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatTagged,
|
|
23396
23687
|
tag: void 0,
|
|
23397
23688
|
exact: false
|
|
23398
23689
|
},
|
|
@@ -23489,9 +23780,9 @@ var flowTemplates = [
|
|
|
23489
23780
|
trigger: {
|
|
23490
23781
|
type: "webhook",
|
|
23491
23782
|
webhook: {
|
|
23492
|
-
source: `${
|
|
23783
|
+
source: `${import_developer_studio_api41.IntegrationNames.Text}-${PRODUCT_TYPE.LC}`,
|
|
23493
23784
|
event: {
|
|
23494
|
-
name:
|
|
23785
|
+
name: import_developer_studio_api41.TextLivechatEventNames.ChatEnded
|
|
23495
23786
|
},
|
|
23496
23787
|
headers: {
|
|
23497
23788
|
"x-cred-access-token": [
|
|
@@ -23511,12 +23802,12 @@ var import_react128 = require("react");
|
|
|
23511
23802
|
var import_react_router_dom22 = require("react-router-dom");
|
|
23512
23803
|
var import_design_system_icons40 = require("@livechat/design-system-icons");
|
|
23513
23804
|
var import_design_system_react_components76 = require("@livechat/design-system-react-components");
|
|
23514
|
-
var
|
|
23805
|
+
var import_developer_studio_ui_react50 = require("@livechat/developer-studio-ui-react");
|
|
23515
23806
|
|
|
23516
23807
|
// src/views/Flows/Templates/Common/CategoryIcon.tsx
|
|
23517
23808
|
var import_design_system_icons39 = require("@livechat/design-system-icons");
|
|
23518
23809
|
var import_design_system_react_components75 = require("@livechat/design-system-react-components");
|
|
23519
|
-
var
|
|
23810
|
+
var import_developer_studio_ui_react49 = require("@livechat/developer-studio-ui-react");
|
|
23520
23811
|
var WorkflowTemplateCategoryIcon = (category) => {
|
|
23521
23812
|
const icons = {
|
|
23522
23813
|
["Notifications & alerts" /* notifications_and_alerts */]: import_design_system_icons39.Notifications,
|
|
@@ -23525,7 +23816,7 @@ var WorkflowTemplateCategoryIcon = (category) => {
|
|
|
23525
23816
|
["Chat management" /* chat_management */]: import_design_system_icons39.ChatDots,
|
|
23526
23817
|
["Customer experience" /* customer_experience */]: import_design_system_icons39.Smiles
|
|
23527
23818
|
};
|
|
23528
|
-
return /* @__PURE__ */ jsxs2(
|
|
23819
|
+
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react49.Row, { noWrap: true, notPadded: true, gap: `var(${import_design_system_react_components75.SpacingToken.Spacing1})`, children: [
|
|
23529
23820
|
/* @__PURE__ */ jsx4(
|
|
23530
23821
|
import_design_system_react_components75.Icon,
|
|
23531
23822
|
{
|
|
@@ -23609,7 +23900,7 @@ var WorkflowTemplatePreviewModal = ({
|
|
|
23609
23900
|
} = useWorkflowContext();
|
|
23610
23901
|
const {
|
|
23611
23902
|
userData: { user }
|
|
23612
|
-
} = (0,
|
|
23903
|
+
} = (0, import_developer_studio_ui_react50.useRootContext)();
|
|
23613
23904
|
const amplitudeWorkflowsJourney = workflowsBlockAmplitudeJourneyFactory(
|
|
23614
23905
|
user == null ? void 0 : user.meta.email
|
|
23615
23906
|
);
|
|
@@ -23685,9 +23976,9 @@ var WorkflowTemplatePreviewModal = ({
|
|
|
23685
23976
|
)
|
|
23686
23977
|
] }),
|
|
23687
23978
|
onClose: handleClose,
|
|
23688
|
-
children: /* @__PURE__ */ jsxs2(
|
|
23979
|
+
children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react50.Row, { notPadded: true, noWrap: true, children: [
|
|
23689
23980
|
/* @__PURE__ */ jsxs2(
|
|
23690
|
-
|
|
23981
|
+
import_developer_studio_ui_react50.Column,
|
|
23691
23982
|
{
|
|
23692
23983
|
notPadded: true,
|
|
23693
23984
|
noFlexBasis: true,
|
|
@@ -23731,7 +24022,7 @@ var WorkflowTemplatePreviewModal = ({
|
|
|
23731
24022
|
children: "Products used:"
|
|
23732
24023
|
}
|
|
23733
24024
|
),
|
|
23734
|
-
/* @__PURE__ */ jsx4(
|
|
24025
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react50.Row, { notPadded: true, gap: `var(${import_design_system_react_components76.SpacingToken.Spacing1})`, children: template.products && renderProductTags(template.products) })
|
|
23735
24026
|
] })
|
|
23736
24027
|
]
|
|
23737
24028
|
}
|
|
@@ -23795,13 +24086,13 @@ var import_design_system_react_components82 = require("@livechat/design-system-r
|
|
|
23795
24086
|
var import_react134 = require("react");
|
|
23796
24087
|
var import_design_system_icons43 = require("@livechat/design-system-icons");
|
|
23797
24088
|
var import_design_system_react_components81 = require("@livechat/design-system-react-components");
|
|
23798
|
-
var
|
|
24089
|
+
var import_developer_studio_ui_react55 = require("@livechat/developer-studio-ui-react");
|
|
23799
24090
|
|
|
23800
24091
|
// src/views/Flows/Templates/Common/Modals/List/Filters/Category.tsx
|
|
23801
24092
|
var import_react131 = require("react");
|
|
23802
24093
|
var import_design_system_icons41 = require("@livechat/design-system-icons");
|
|
23803
24094
|
var import_design_system_react_components77 = require("@livechat/design-system-react-components");
|
|
23804
|
-
var
|
|
24095
|
+
var import_developer_studio_ui_react51 = require("@livechat/developer-studio-ui-react");
|
|
23805
24096
|
var WorkflowTemplatesCategoryFilter = ({
|
|
23806
24097
|
handleStatus,
|
|
23807
24098
|
status
|
|
@@ -23810,7 +24101,7 @@ var WorkflowTemplatesCategoryFilter = ({
|
|
|
23810
24101
|
const getItem = (0, import_react131.useCallback)(
|
|
23811
24102
|
(key, category, icon2) => ({
|
|
23812
24103
|
key,
|
|
23813
|
-
element: /* @__PURE__ */ jsxs2(
|
|
24104
|
+
element: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react51.Row, { notPadded: true, gap: `var(${import_design_system_react_components77.SpacingToken.Spacing1});`, children: [
|
|
23814
24105
|
icon2 ? /* @__PURE__ */ jsx4(import_design_system_react_components77.Icon, { source: icon2 }) : void 0,
|
|
23815
24106
|
category
|
|
23816
24107
|
] }),
|
|
@@ -23864,7 +24155,7 @@ var Category_default = WorkflowTemplatesCategoryFilter;
|
|
|
23864
24155
|
var import_react132 = require("react");
|
|
23865
24156
|
var import_design_system_icons42 = require("@livechat/design-system-icons");
|
|
23866
24157
|
var import_design_system_react_components78 = require("@livechat/design-system-react-components");
|
|
23867
|
-
var
|
|
24158
|
+
var import_developer_studio_ui_react52 = require("@livechat/developer-studio-ui-react");
|
|
23868
24159
|
var WorkflowTemplatesProductFilter = ({
|
|
23869
24160
|
handleStatus,
|
|
23870
24161
|
status
|
|
@@ -23873,7 +24164,7 @@ var WorkflowTemplatesProductFilter = ({
|
|
|
23873
24164
|
const getItem = (0, import_react132.useCallback)(
|
|
23874
24165
|
(key, product, icon2) => ({
|
|
23875
24166
|
key,
|
|
23876
|
-
element: /* @__PURE__ */ jsxs2(
|
|
24167
|
+
element: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react52.Row, { notPadded: true, gap: `var(${import_design_system_react_components78.SpacingToken.Spacing1});`, children: [
|
|
23877
24168
|
icon2 ? /* @__PURE__ */ jsx4(import_design_system_react_components78.Icon, { source: icon2 }) : void 0,
|
|
23878
24169
|
product
|
|
23879
24170
|
] }),
|
|
@@ -23924,7 +24215,7 @@ var Product_default = WorkflowTemplatesProductFilter;
|
|
|
23924
24215
|
// src/views/Flows/Definitions/List/Home/Cards/Scratch.tsx
|
|
23925
24216
|
var import_react_router_dom24 = require("react-router-dom");
|
|
23926
24217
|
var import_design_system_react_components79 = require("@livechat/design-system-react-components");
|
|
23927
|
-
var
|
|
24218
|
+
var import_developer_studio_ui_react53 = require("@livechat/developer-studio-ui-react");
|
|
23928
24219
|
var WorkflowScratchCard = ({
|
|
23929
24220
|
title,
|
|
23930
24221
|
icon: icon2,
|
|
@@ -23933,7 +24224,7 @@ var WorkflowScratchCard = ({
|
|
|
23933
24224
|
const navigate = (0, import_react_router_dom24.useNavigate)();
|
|
23934
24225
|
const {
|
|
23935
24226
|
userData: { user }
|
|
23936
|
-
} = (0,
|
|
24227
|
+
} = (0, import_developer_studio_ui_react53.useRootContext)();
|
|
23937
24228
|
const amplitudeWorkflowsJourney = workflowsBlockAmplitudeJourneyFactory(
|
|
23938
24229
|
user == null ? void 0 : user.meta.email
|
|
23939
24230
|
);
|
|
@@ -23943,10 +24234,10 @@ var WorkflowScratchCard = ({
|
|
|
23943
24234
|
);
|
|
23944
24235
|
navigate("/workflow/new", { state: { openOne } });
|
|
23945
24236
|
};
|
|
23946
|
-
return /* @__PURE__ */ jsxs2(
|
|
23947
|
-
/* @__PURE__ */ jsxs2(
|
|
24237
|
+
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react53.Card, { light: true, hover: true, rounded: true, width: "100%", onClick: handleClick, children: [
|
|
24238
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react53.Row, { notPadded: true, spaceBetween: true, noWrap: true, children: [
|
|
23948
24239
|
/* @__PURE__ */ jsx4(import_design_system_react_components79.Icon, { source: icon2, kind: "primary", size: "xlarge" }),
|
|
23949
|
-
openOne && /* @__PURE__ */ jsx4(
|
|
24240
|
+
openOne && /* @__PURE__ */ jsx4(import_developer_studio_ui_react53.BetaTag, { darkTag: getWorkflowEnv2("isHeadless"), children: "Beta" })
|
|
23950
24241
|
] }),
|
|
23951
24242
|
/* @__PURE__ */ jsx4(
|
|
23952
24243
|
import_design_system_react_components79.Heading,
|
|
@@ -23966,7 +24257,7 @@ var Scratch_default = WorkflowScratchCard;
|
|
|
23966
24257
|
// src/views/Flows/Definitions/List/Home/Cards/Template.tsx
|
|
23967
24258
|
var import_react_router_dom25 = require("react-router-dom");
|
|
23968
24259
|
var import_design_system_react_components80 = require("@livechat/design-system-react-components");
|
|
23969
|
-
var
|
|
24260
|
+
var import_developer_studio_ui_react54 = require("@livechat/developer-studio-ui-react");
|
|
23970
24261
|
var IconWrapper2 = newStyled.div`
|
|
23971
24262
|
display: flex;
|
|
23972
24263
|
align-items: center;
|
|
@@ -23984,7 +24275,7 @@ var WorkflowTemplateCard = ({
|
|
|
23984
24275
|
}) => {
|
|
23985
24276
|
const navigate = (0, import_react_router_dom25.useNavigate)();
|
|
23986
24277
|
return /* @__PURE__ */ jsx4(
|
|
23987
|
-
|
|
24278
|
+
import_developer_studio_ui_react54.Card,
|
|
23988
24279
|
{
|
|
23989
24280
|
border: true,
|
|
23990
24281
|
noBackground: true,
|
|
@@ -23996,7 +24287,7 @@ var WorkflowTemplateCard = ({
|
|
|
23996
24287
|
navigate(`preview/${id}`);
|
|
23997
24288
|
},
|
|
23998
24289
|
children: /* @__PURE__ */ jsxs2(
|
|
23999
|
-
|
|
24290
|
+
import_developer_studio_ui_react54.Column,
|
|
24000
24291
|
{
|
|
24001
24292
|
notPadded: true,
|
|
24002
24293
|
noFlexBasis: true,
|
|
@@ -24005,11 +24296,11 @@ var WorkflowTemplateCard = ({
|
|
|
24005
24296
|
inheritHeight: true,
|
|
24006
24297
|
gap: `var(${import_design_system_react_components80.SpacingToken.Spacing4})`,
|
|
24007
24298
|
children: [
|
|
24008
|
-
/* @__PURE__ */ jsxs2(
|
|
24299
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react54.Column, { notPadded: true, noFlexBasis: true, gap: `var(${import_design_system_react_components80.SpacingToken.Spacing4})`, children: [
|
|
24009
24300
|
CategoryIcon_default(category),
|
|
24010
24301
|
/* @__PURE__ */ jsx4(import_design_system_react_components80.Heading, { as: "div", size: "xs", children: name })
|
|
24011
24302
|
] }),
|
|
24012
|
-
/* @__PURE__ */ jsx4(
|
|
24303
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react54.Row, { noWrap: true, notPadded: true, gap: `var(${import_design_system_react_components80.SpacingToken.Spacing1})`, children: icons.map((icon2, i) => /* @__PURE__ */ jsx4(IconWrapper2, { children: /* @__PURE__ */ jsx4(import_design_system_react_components80.Icon, { source: icon2, kind: "primary", size: "medium" }) }, i)) })
|
|
24013
24304
|
]
|
|
24014
24305
|
}
|
|
24015
24306
|
)
|
|
@@ -24040,8 +24331,8 @@ var WorkflowsHome = ({ isOnModal, basePath }) => {
|
|
|
24040
24331
|
}
|
|
24041
24332
|
return true;
|
|
24042
24333
|
});
|
|
24043
|
-
return /* @__PURE__ */ jsx4(
|
|
24044
|
-
|
|
24334
|
+
return /* @__PURE__ */ jsx4(import_developer_studio_ui_react55.Column, { width: 12, notPadded: true, children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react55.Row, { verticalCenter: true, notPadded: true, children: /* @__PURE__ */ jsxs2(
|
|
24335
|
+
import_developer_studio_ui_react55.Column,
|
|
24045
24336
|
{
|
|
24046
24337
|
width: 9,
|
|
24047
24338
|
gap: `var(${import_design_system_react_components81.SpacingToken.Spacing3})`,
|
|
@@ -24049,14 +24340,14 @@ var WorkflowsHome = ({ isOnModal, basePath }) => {
|
|
|
24049
24340
|
notPadded: true,
|
|
24050
24341
|
children: [
|
|
24051
24342
|
/* @__PURE__ */ jsx4(
|
|
24052
|
-
|
|
24343
|
+
import_developer_studio_ui_react55.Intro,
|
|
24053
24344
|
{
|
|
24054
24345
|
header: "Start from scratch",
|
|
24055
24346
|
headerSize: isOnModal ? "xs" : "s"
|
|
24056
24347
|
}
|
|
24057
24348
|
),
|
|
24058
24349
|
/* @__PURE__ */ jsxs2(
|
|
24059
|
-
|
|
24350
|
+
import_developer_studio_ui_react55.Row,
|
|
24060
24351
|
{
|
|
24061
24352
|
bottomMargin: true,
|
|
24062
24353
|
lowMargin: true,
|
|
@@ -24084,13 +24375,13 @@ var WorkflowsHome = ({ isOnModal, basePath }) => {
|
|
|
24084
24375
|
}
|
|
24085
24376
|
),
|
|
24086
24377
|
/* @__PURE__ */ jsx4(
|
|
24087
|
-
|
|
24378
|
+
import_developer_studio_ui_react55.Intro,
|
|
24088
24379
|
{
|
|
24089
24380
|
header: "Start with a template",
|
|
24090
24381
|
headerSize: isOnModal ? "xs" : "s"
|
|
24091
24382
|
}
|
|
24092
24383
|
),
|
|
24093
|
-
/* @__PURE__ */ jsxs2(
|
|
24384
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react55.Row, { notPadded: true, gap: `var(${import_design_system_react_components81.SpacingToken.Spacing2})`, children: [
|
|
24094
24385
|
/* @__PURE__ */ jsx4(
|
|
24095
24386
|
Product_default,
|
|
24096
24387
|
{
|
|
@@ -24172,19 +24463,19 @@ var Create_default = WorkflowCreate;
|
|
|
24172
24463
|
var import_react142 = require("react");
|
|
24173
24464
|
var import_react_router_dom29 = require("react-router-dom");
|
|
24174
24465
|
var import_design_system_react_components87 = require("@livechat/design-system-react-components");
|
|
24175
|
-
var
|
|
24176
|
-
var
|
|
24466
|
+
var import_developer_studio_api43 = require("@livechat/developer-studio-api");
|
|
24467
|
+
var import_developer_studio_ui_react58 = require("@livechat/developer-studio-ui-react");
|
|
24177
24468
|
|
|
24178
24469
|
// src/views/Flows/Definitions/List/Grid/Grid.tsx
|
|
24179
24470
|
var import_react140 = require("react");
|
|
24180
24471
|
var import_design_system_react_components86 = require("@livechat/design-system-react-components");
|
|
24181
|
-
var
|
|
24472
|
+
var import_developer_studio_ui_react57 = require("@livechat/developer-studio-ui-react");
|
|
24182
24473
|
|
|
24183
24474
|
// src/views/Flows/Definitions/List/Grid/Filters/StatusFilter.tsx
|
|
24184
24475
|
var import_react138 = require("react");
|
|
24185
24476
|
var import_design_system_icons44 = require("@livechat/design-system-icons");
|
|
24186
24477
|
var import_design_system_react_components83 = require("@livechat/design-system-react-components");
|
|
24187
|
-
var
|
|
24478
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
24188
24479
|
var WorkflowStatusFilter = ({
|
|
24189
24480
|
handleStatus,
|
|
24190
24481
|
status
|
|
@@ -24216,20 +24507,20 @@ var WorkflowStatusFilter = ({
|
|
|
24216
24507
|
}
|
|
24217
24508
|
}
|
|
24218
24509
|
];
|
|
24219
|
-
return /* @__PURE__ */ (0,
|
|
24510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
24220
24511
|
import_design_system_react_components83.ActionMenu,
|
|
24221
24512
|
{
|
|
24222
24513
|
options: items,
|
|
24223
24514
|
placement: "bottom",
|
|
24224
24515
|
visible: isVisible,
|
|
24225
|
-
triggerRenderer: /* @__PURE__ */ (0,
|
|
24516
|
+
triggerRenderer: /* @__PURE__ */ (0, import_jsx_runtime125.jsxs)(
|
|
24226
24517
|
import_design_system_react_components83.Button,
|
|
24227
24518
|
{
|
|
24228
24519
|
kind: "secondary",
|
|
24229
24520
|
onClick: () => {
|
|
24230
24521
|
setIsVisible(!isVisible);
|
|
24231
24522
|
},
|
|
24232
|
-
icon: /* @__PURE__ */ (0,
|
|
24523
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(import_design_system_react_components83.Icon, { source: import_design_system_icons44.ToggleLeft }),
|
|
24233
24524
|
children: [
|
|
24234
24525
|
"Status: ",
|
|
24235
24526
|
status
|
|
@@ -24249,17 +24540,17 @@ var import_react_router_dom28 = require("react-router-dom");
|
|
|
24249
24540
|
var import_design_system_icons45 = require("@livechat/design-system-icons");
|
|
24250
24541
|
var import_design_system_react_components84 = require("@livechat/design-system-react-components");
|
|
24251
24542
|
var import_design_system_react_components85 = require("@livechat/design-system-react-components");
|
|
24252
|
-
var
|
|
24253
|
-
var
|
|
24543
|
+
var import_developer_studio_api42 = require("@livechat/developer-studio-api");
|
|
24544
|
+
var import_developer_studio_ui_react56 = require("@livechat/developer-studio-ui-react");
|
|
24254
24545
|
var WorkflowsTable = ({ workflowsQuery, state }) => {
|
|
24255
24546
|
var _a, _b, _c, _d, _e;
|
|
24256
24547
|
const navigate = (0, import_react_router_dom28.useNavigate)();
|
|
24257
|
-
const notifications = (0,
|
|
24548
|
+
const notifications = (0, import_developer_studio_ui_react56.useNotifications)();
|
|
24258
24549
|
const deleteAction = useDeleteWorkflow();
|
|
24259
24550
|
const activateWorkflowAction = useActivateWorkflow();
|
|
24260
24551
|
const {
|
|
24261
24552
|
userData: { user }
|
|
24262
|
-
} = (0,
|
|
24553
|
+
} = (0, import_developer_studio_ui_react56.useRootContext)();
|
|
24263
24554
|
const amplitudeWorkflowsJourney = workflowsBlockAmplitudeJourneyFactory(
|
|
24264
24555
|
user == null ? void 0 : user.meta.email
|
|
24265
24556
|
);
|
|
@@ -24275,7 +24566,7 @@ var WorkflowsTable = ({ workflowsQuery, state }) => {
|
|
|
24275
24566
|
return workflow.name.toLowerCase().includes((_c2 = (_b2 = (_a2 = state.params) == null ? void 0 : _a2.name) == null ? void 0 : _b2.value) != null ? _c2 : "");
|
|
24276
24567
|
}
|
|
24277
24568
|
);
|
|
24278
|
-
return /* @__PURE__ */ jsxs2(
|
|
24569
|
+
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react56.Table, { loading: workflowsQuery.isLoading, flowTable: true, children: [
|
|
24279
24570
|
/* @__PURE__ */ jsx4("thead", { children: /* @__PURE__ */ jsxs2("tr", { children: [
|
|
24280
24571
|
/* @__PURE__ */ jsx4("th", { children: "Name" }),
|
|
24281
24572
|
/* @__PURE__ */ jsx4("th", { children: "Tasks" }),
|
|
@@ -24302,7 +24593,7 @@ var WorkflowsTable = ({ workflowsQuery, state }) => {
|
|
|
24302
24593
|
}
|
|
24303
24594
|
`,
|
|
24304
24595
|
children: [
|
|
24305
|
-
/* @__PURE__ */ jsx4("td", { width: "45%", children: /* @__PURE__ */ jsxs2(
|
|
24596
|
+
/* @__PURE__ */ jsx4("td", { width: "45%", children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react56.Row, { notPadded: true, gap: `var(${import_design_system_react_components84.SpacingToken.Spacing2})`, children: [
|
|
24306
24597
|
/* @__PURE__ */ jsx4("span", { children: workflow.name }),
|
|
24307
24598
|
workflow.related_workflow_id && /* @__PURE__ */ jsx4(
|
|
24308
24599
|
import_design_system_react_components84.Tag,
|
|
@@ -24316,8 +24607,8 @@ var WorkflowsTable = ({ workflowsQuery, state }) => {
|
|
|
24316
24607
|
}
|
|
24317
24608
|
)
|
|
24318
24609
|
] }) }),
|
|
24319
|
-
/* @__PURE__ */ jsx4("td", { width: "40%", children: /* @__PURE__ */ jsx4(
|
|
24320
|
-
const revertIconColor = getWorkflowEnv2("isHeadless") && (tag.toLowerCase() === "openai" || tag.toLowerCase() ===
|
|
24610
|
+
/* @__PURE__ */ jsx4("td", { width: "40%", children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react56.Row, { notPadded: true, gap: 12, children: (_d2 = workflow.tags) == null ? void 0 : _d2.map((tag) => {
|
|
24611
|
+
const revertIconColor = getWorkflowEnv2("isHeadless") && (tag.toLowerCase() === "openai" || tag.toLowerCase() === import_developer_studio_api42.IntegrationNames.BigCommerce.toLowerCase());
|
|
24321
24612
|
return /* @__PURE__ */ jsx4(
|
|
24322
24613
|
ProductIcon_default,
|
|
24323
24614
|
{
|
|
@@ -24419,7 +24710,7 @@ var WorkflowsTable = ({ workflowsQuery, state }) => {
|
|
|
24419
24710
|
);
|
|
24420
24711
|
}
|
|
24421
24712
|
return null;
|
|
24422
|
-
}) : workflowsQuery.isLoading ? /* @__PURE__ */ jsx4("tr", { children: /* @__PURE__ */ jsx4("td", { colSpan: 6, align: "center", children: /* @__PURE__ */ jsx4(
|
|
24713
|
+
}) : workflowsQuery.isLoading ? /* @__PURE__ */ jsx4("tr", { children: /* @__PURE__ */ jsx4("td", { colSpan: 6, align: "center", children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react56.Loader, { size: "medium" }) }) }) : /* @__PURE__ */ jsx4(
|
|
24423
24714
|
"tr",
|
|
24424
24715
|
{
|
|
24425
24716
|
css: css`
|
|
@@ -24449,7 +24740,7 @@ var WorkflowsGrid = ({
|
|
|
24449
24740
|
}) => {
|
|
24450
24741
|
var _a, _b, _c, _d;
|
|
24451
24742
|
return /* @__PURE__ */ jsx4(
|
|
24452
|
-
|
|
24743
|
+
import_developer_studio_ui_react57.Grid,
|
|
24453
24744
|
{
|
|
24454
24745
|
filters: {
|
|
24455
24746
|
left: /* @__PURE__ */ jsx4(import_react140.Fragment, { children: /* @__PURE__ */ jsx4(
|
|
@@ -24511,15 +24802,15 @@ var WorkflowListView = () => {
|
|
|
24511
24802
|
const hasNoData = workflows.isSuccess && workflows.data.length === 0 && state.params === void 0;
|
|
24512
24803
|
const hasData = !isLoading && !hasNoData;
|
|
24513
24804
|
if (isLoading) {
|
|
24514
|
-
return /* @__PURE__ */ jsx4(
|
|
24805
|
+
return /* @__PURE__ */ jsx4(import_developer_studio_ui_react58.Loader, { stretch: true });
|
|
24515
24806
|
}
|
|
24516
|
-
return /* @__PURE__ */ jsxs2(
|
|
24517
|
-
/* @__PURE__ */ jsxs2(
|
|
24518
|
-
/* @__PURE__ */ jsx4(
|
|
24519
|
-
|
|
24807
|
+
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react58.View, { stretch: isLoading, center: hasNoData, children: [
|
|
24808
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react58.Row, { topMargin: true, verticalCenter: hasNoData, children: [
|
|
24809
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react58.Column, { width: hasNoData ? 10 : 8, children: hasNoData ? /* @__PURE__ */ jsx4(import_developer_studio_ui_react58.Row, { notPadded: true, children: /* @__PURE__ */ jsx4(
|
|
24810
|
+
import_developer_studio_ui_react58.Intro,
|
|
24520
24811
|
{
|
|
24521
|
-
header: /* @__PURE__ */ jsx4(
|
|
24522
|
-
|
|
24812
|
+
header: /* @__PURE__ */ jsx4(import_developer_studio_ui_react58.Column, { notPadded: true, stretch: true, children: /* @__PURE__ */ jsxs2(
|
|
24813
|
+
import_developer_studio_ui_react58.Row,
|
|
24523
24814
|
{
|
|
24524
24815
|
notPadded: true,
|
|
24525
24816
|
verticalCenter: true,
|
|
@@ -24537,14 +24828,14 @@ var WorkflowListView = () => {
|
|
|
24537
24828
|
noMaxWidth: true
|
|
24538
24829
|
}
|
|
24539
24830
|
) }) : /* @__PURE__ */ jsx4(
|
|
24540
|
-
|
|
24831
|
+
import_developer_studio_ui_react58.Intro,
|
|
24541
24832
|
{
|
|
24542
24833
|
header: "Your workflows",
|
|
24543
24834
|
body: "Create custom workflows to automate your work.",
|
|
24544
24835
|
bodySize: "s"
|
|
24545
24836
|
}
|
|
24546
24837
|
) }),
|
|
24547
|
-
hasData ? /* @__PURE__ */ jsx4(
|
|
24838
|
+
hasData ? /* @__PURE__ */ jsx4(import_developer_studio_ui_react58.Column, { pullRight: true, children: /* @__PURE__ */ jsx4(
|
|
24548
24839
|
import_design_system_react_components87.Button,
|
|
24549
24840
|
{
|
|
24550
24841
|
kind: "primary",
|
|
@@ -24555,14 +24846,14 @@ var WorkflowListView = () => {
|
|
|
24555
24846
|
}
|
|
24556
24847
|
) }) : null
|
|
24557
24848
|
] }),
|
|
24558
|
-
/* @__PURE__ */ jsx4(
|
|
24849
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react58.Row, { children: /* @__PURE__ */ jsxs2(import_developer_studio_ui_react58.Column, { width: 12, noMaxWidth: true, gap: `var(${import_design_system_react_components87.SpacingToken.Spacing10})`, children: [
|
|
24559
24850
|
hasData ? /* @__PURE__ */ jsx4(
|
|
24560
24851
|
Grid_default,
|
|
24561
24852
|
{
|
|
24562
24853
|
workflowQuery: workflows,
|
|
24563
24854
|
state,
|
|
24564
24855
|
onStateChange: (change) => {
|
|
24565
|
-
setState((prevState) => (0,
|
|
24856
|
+
setState((prevState) => (0, import_developer_studio_api43.mergeDeep)(prevState, change));
|
|
24566
24857
|
}
|
|
24567
24858
|
}
|
|
24568
24859
|
) : null,
|
|
@@ -24592,12 +24883,12 @@ var WorkflowList = () => {
|
|
|
24592
24883
|
var List_default2 = WorkflowList;
|
|
24593
24884
|
|
|
24594
24885
|
// src/views/Flows/Definitions/index.tsx
|
|
24595
|
-
var
|
|
24886
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
24596
24887
|
function Workflows() {
|
|
24597
24888
|
const navigate = (0, import_react_router_dom31.useNavigate)();
|
|
24598
24889
|
const {
|
|
24599
24890
|
userData: { user, isLoading: isUserLoading }
|
|
24600
|
-
} = (0,
|
|
24891
|
+
} = (0, import_developer_studio_ui_react59.useRootContext)();
|
|
24601
24892
|
const { data: userHasInstalledWorkflows, isLoading: isWorkflowAppLoading } = useFetchUserInstalledWorkflows(user);
|
|
24602
24893
|
(0, import_react145.useEffect)(() => {
|
|
24603
24894
|
if (isUserLoading || isWorkflowAppLoading) {
|
|
@@ -24612,10 +24903,10 @@ function Workflows() {
|
|
|
24612
24903
|
isWorkflowAppLoading,
|
|
24613
24904
|
userHasInstalledWorkflows
|
|
24614
24905
|
]);
|
|
24615
|
-
return /* @__PURE__ */ (0,
|
|
24616
|
-
/* @__PURE__ */ (0,
|
|
24617
|
-
/* @__PURE__ */ (0,
|
|
24618
|
-
/* @__PURE__ */ (0,
|
|
24906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_react_router_dom31.Routes, { children: [
|
|
24907
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react_router_dom31.Route, { element: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react_router_dom31.Navigate, { replace: true, to: "list" }), path: "" }),
|
|
24908
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react_router_dom31.Route, { element: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(List_default2, {}), path: "list/*" }),
|
|
24909
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_react_router_dom31.Route, { element: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Edit_default2, {}), path: ":id/*" })
|
|
24619
24910
|
] });
|
|
24620
24911
|
}
|
|
24621
24912
|
var Definitions_default = Workflows;
|
|
@@ -24625,7 +24916,7 @@ var import_react146 = require("react");
|
|
|
24625
24916
|
var import_react_router_dom32 = require("react-router-dom");
|
|
24626
24917
|
var import_design_system_icons46 = require("@livechat/design-system-icons");
|
|
24627
24918
|
var import_design_system_react_components88 = require("@livechat/design-system-react-components");
|
|
24628
|
-
var
|
|
24919
|
+
var import_developer_studio_ui_react60 = require("@livechat/developer-studio-ui-react");
|
|
24629
24920
|
|
|
24630
24921
|
// src/assets/flows/workflows-presentation.png
|
|
24631
24922
|
var workflows_presentation_default = "./workflows-presentation-EFFOQNV2.png";
|
|
@@ -24649,7 +24940,7 @@ var imgContainerCss = css`
|
|
|
24649
24940
|
var Waitlist = () => {
|
|
24650
24941
|
const {
|
|
24651
24942
|
userData: { user, isLoading }
|
|
24652
|
-
} = (0,
|
|
24943
|
+
} = (0, import_developer_studio_ui_react60.useRootContext)();
|
|
24653
24944
|
const { data: userHasInstalledWorkflows, isLoading: isWorkflowsAppLoading } = useFetchUserInstalledWorkflows(user);
|
|
24654
24945
|
const navigate = (0, import_react_router_dom32.useNavigate)();
|
|
24655
24946
|
(0, import_react146.useEffect)(() => {
|
|
@@ -24658,14 +24949,14 @@ var Waitlist = () => {
|
|
|
24658
24949
|
}
|
|
24659
24950
|
}, [userHasInstalledWorkflows, navigate]);
|
|
24660
24951
|
if (isLoading || isWorkflowsAppLoading) {
|
|
24661
|
-
return /* @__PURE__ */ jsx4(
|
|
24952
|
+
return /* @__PURE__ */ jsx4(import_developer_studio_ui_react60.Loader, { stretch: true });
|
|
24662
24953
|
}
|
|
24663
|
-
return /* @__PURE__ */ jsxs2(
|
|
24664
|
-
/* @__PURE__ */ jsx4(
|
|
24665
|
-
|
|
24954
|
+
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react60.View, { children: [
|
|
24955
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react60.Row, { topMargin: true, verticalCenter: true, noMaxWidth: true, children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react60.Column, { center: true, children: /* @__PURE__ */ jsx4(
|
|
24956
|
+
import_developer_studio_ui_react60.Intro,
|
|
24666
24957
|
{
|
|
24667
|
-
header: /* @__PURE__ */ jsx4(
|
|
24668
|
-
|
|
24958
|
+
header: /* @__PURE__ */ jsx4(import_developer_studio_ui_react60.Column, { notPadded: true, stretch: true, width: 4, children: /* @__PURE__ */ jsx4(
|
|
24959
|
+
import_developer_studio_ui_react60.Row,
|
|
24669
24960
|
{
|
|
24670
24961
|
notPadded: true,
|
|
24671
24962
|
verticalCenter: true,
|
|
@@ -24679,7 +24970,7 @@ var Waitlist = () => {
|
|
|
24679
24970
|
noMaxWidth: true
|
|
24680
24971
|
}
|
|
24681
24972
|
) }) }),
|
|
24682
|
-
/* @__PURE__ */ jsxs2(
|
|
24973
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react60.Row, { verticalCenter: true, gap: 8, topMargin: true, noMaxWidth: true, children: [
|
|
24683
24974
|
/* @__PURE__ */ jsx4(
|
|
24684
24975
|
import_design_system_react_components88.Button,
|
|
24685
24976
|
{
|
|
@@ -24706,7 +24997,7 @@ var Waitlist = () => {
|
|
|
24706
24997
|
}
|
|
24707
24998
|
)
|
|
24708
24999
|
] }),
|
|
24709
|
-
/* @__PURE__ */ jsxs2(
|
|
25000
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react60.Row, { verticalCenter: true, gap: 8, topMargin: true, lowMargin: true, noMaxWidth: true, children: [
|
|
24710
25001
|
/* @__PURE__ */ jsxs2(import_design_system_react_components88.Text, { css: infoCss, size: "lg", children: [
|
|
24711
25002
|
/* @__PURE__ */ jsx4(import_design_system_react_components88.Icon, { source: import_design_system_icons46.CheckCircle }),
|
|
24712
25003
|
"integrated with popular platforms"
|
|
@@ -24720,7 +25011,7 @@ var Waitlist = () => {
|
|
|
24720
25011
|
"build with ready-made blocks"
|
|
24721
25012
|
] })
|
|
24722
25013
|
] }),
|
|
24723
|
-
/* @__PURE__ */ jsx4(
|
|
25014
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react60.Row, { center: true, verticalCenter: true, noMaxWidth: true, children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react60.Column, { width: 5, center: true, children: /* @__PURE__ */ jsx4("div", { css: imgContainerCss, children: /* @__PURE__ */ jsx4(
|
|
24724
25015
|
"img",
|
|
24725
25016
|
{
|
|
24726
25017
|
alt: "waitlist",
|
|
@@ -24736,11 +25027,11 @@ var Waitlist = () => {
|
|
|
24736
25027
|
var Waitlist_default = Waitlist;
|
|
24737
25028
|
|
|
24738
25029
|
// src/views/Flows/index.tsx
|
|
24739
|
-
var
|
|
25030
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
24740
25031
|
var Flows = () => {
|
|
24741
|
-
return /* @__PURE__ */ (0,
|
|
24742
|
-
/* @__PURE__ */ (0,
|
|
24743
|
-
/* @__PURE__ */ (0,
|
|
25032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_react_router_dom33.Routes, { children: [
|
|
25033
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_react_router_dom33.Route, { path: "*", element: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Definitions_default, {}) }),
|
|
25034
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_react_router_dom33.Route, { path: "/waitlist", element: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Waitlist_default, {}) })
|
|
24744
25035
|
] });
|
|
24745
25036
|
};
|
|
24746
25037
|
var Flows_default = Flows;
|
|
@@ -24752,68 +25043,16 @@ var import_react_router_dom45 = require("react-router-dom");
|
|
|
24752
25043
|
var import_react_router_dom44 = require("react-router-dom");
|
|
24753
25044
|
var import_design_system_react_components103 = require("@livechat/design-system-react-components");
|
|
24754
25045
|
var import_developer_studio_api70 = require("@livechat/developer-studio-api");
|
|
24755
|
-
var
|
|
25046
|
+
var import_developer_studio_ui_react86 = require("@livechat/developer-studio-ui-react");
|
|
24756
25047
|
|
|
24757
25048
|
// src/views/Settings/Integrations/Accounts/index.tsx
|
|
24758
25049
|
var import_react_router_dom34 = require("react-router-dom");
|
|
24759
25050
|
|
|
24760
|
-
// src/views/Settings/Integrations/Accounts/Action.tsx
|
|
24761
|
-
var import_developer_studio_api42 = require("@livechat/developer-studio-api");
|
|
24762
|
-
var import_developer_studio_ui_react59 = require("@livechat/developer-studio-ui-react");
|
|
24763
|
-
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
24764
|
-
var AccountsAction = (props) => {
|
|
24765
|
-
var _a;
|
|
24766
|
-
const match2 = (0, import_developer_studio_ui_react59.useMatch)();
|
|
24767
|
-
const action = (_a = props.action) != null ? _a : match2.params.action;
|
|
24768
|
-
if (!action) {
|
|
24769
|
-
throw new Error("Invalid action");
|
|
24770
|
-
}
|
|
24771
|
-
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
24772
|
-
IntegrationAction_default,
|
|
24773
|
-
{
|
|
24774
|
-
name: import_developer_studio_api42.IntegrationNames.Accounts,
|
|
24775
|
-
action,
|
|
24776
|
-
data: props.data,
|
|
24777
|
-
context: props.context,
|
|
24778
|
-
serializedData: match2.params.data,
|
|
24779
|
-
serializedContext: match2.params.context,
|
|
24780
|
-
executor: props.executor,
|
|
24781
|
-
trigger: {
|
|
24782
|
-
mode: import_developer_studio_api42.IntegrationModes.Modal,
|
|
24783
|
-
handler: (output) => accountsActionHandlers()[action](output)
|
|
24784
|
-
},
|
|
24785
|
-
onSuccess: props.onSuccess
|
|
24786
|
-
}
|
|
24787
|
-
);
|
|
24788
|
-
};
|
|
24789
|
-
var accountsActionHandlers = () => {
|
|
24790
|
-
const handlers = {
|
|
24791
|
-
activate: (output) => {
|
|
24792
|
-
if (output.status === "success" && output.result.access_token) {
|
|
24793
|
-
(0, import_developer_studio_ui_react59.setRootData)({
|
|
24794
|
-
access_token: output.result.access_token,
|
|
24795
|
-
scope: output.result.scope,
|
|
24796
|
-
expires_in: output.result.expires_in
|
|
24797
|
-
});
|
|
24798
|
-
return {
|
|
24799
|
-
isValid: true,
|
|
24800
|
-
result: output.result
|
|
24801
|
-
};
|
|
24802
|
-
}
|
|
24803
|
-
return {
|
|
24804
|
-
isValid: false
|
|
24805
|
-
};
|
|
24806
|
-
}
|
|
24807
|
-
};
|
|
24808
|
-
return handlers;
|
|
24809
|
-
};
|
|
24810
|
-
var Action_default5 = AccountsAction;
|
|
24811
|
-
|
|
24812
25051
|
// src/views/Settings/Integrations/Accounts/Callback.tsx
|
|
24813
|
-
var
|
|
25052
|
+
var import_developer_studio_ui_react61 = require("@livechat/developer-studio-ui-react");
|
|
24814
25053
|
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
24815
25054
|
var AccountsCallback = () => {
|
|
24816
|
-
const match2 = (0,
|
|
25055
|
+
const match2 = (0, import_developer_studio_ui_react61.useMatch)();
|
|
24817
25056
|
const action = match2.params.action;
|
|
24818
25057
|
if (!action) {
|
|
24819
25058
|
throw new Error("Invalid action");
|
|
@@ -24848,11 +25087,11 @@ var import_react_router_dom35 = require("react-router-dom");
|
|
|
24848
25087
|
|
|
24849
25088
|
// src/views/Settings/Integrations/BigCommerce/Callback.tsx
|
|
24850
25089
|
var import_react148 = require("react");
|
|
24851
|
-
var
|
|
25090
|
+
var import_developer_studio_ui_react62 = require("@livechat/developer-studio-ui-react");
|
|
24852
25091
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
24853
25092
|
var BigCommerceCallback = () => {
|
|
24854
25093
|
const { login } = (0, import_react148.useContext)(AuthContext);
|
|
24855
|
-
const match2 = (0,
|
|
25094
|
+
const match2 = (0, import_developer_studio_ui_react62.useMatch)();
|
|
24856
25095
|
const action = match2.params.action;
|
|
24857
25096
|
if (!action) {
|
|
24858
25097
|
throw new Error("Invalid action");
|
|
@@ -24870,14 +25109,14 @@ var Callback_default2 = BigCommerceCallback;
|
|
|
24870
25109
|
var import_react155 = require("react");
|
|
24871
25110
|
var import_design_system_icons48 = require("@livechat/design-system-icons");
|
|
24872
25111
|
var import_design_system_react_components93 = require("@livechat/design-system-react-components");
|
|
24873
|
-
var
|
|
24874
|
-
var
|
|
25112
|
+
var import_developer_studio_api44 = require("@livechat/developer-studio-api");
|
|
25113
|
+
var import_developer_studio_ui_react66 = require("@livechat/developer-studio-ui-react");
|
|
24875
25114
|
|
|
24876
25115
|
// src/views/Settings/Integrations/Common/IntegrationCredentials.tsx
|
|
24877
25116
|
var import_react149 = require("react");
|
|
24878
25117
|
var import_design_system_icons47 = require("@livechat/design-system-icons");
|
|
24879
25118
|
var import_design_system_react_components89 = require("@livechat/design-system-react-components");
|
|
24880
|
-
var
|
|
25119
|
+
var import_developer_studio_ui_react63 = require("@livechat/developer-studio-ui-react");
|
|
24881
25120
|
function IntegrationStatusCredentials({
|
|
24882
25121
|
credentials,
|
|
24883
25122
|
trigger
|
|
@@ -24900,7 +25139,7 @@ function IntegrationStatusCredentials({
|
|
|
24900
25139
|
] }) }),
|
|
24901
25140
|
[trigger, removeCredentialMutation]
|
|
24902
25141
|
);
|
|
24903
|
-
return /* @__PURE__ */ jsxs2(
|
|
25142
|
+
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react63.Table, { children: [
|
|
24904
25143
|
/* @__PURE__ */ jsxs2("tr", { children: [
|
|
24905
25144
|
/* @__PURE__ */ jsx4("th", { children: "Name" }),
|
|
24906
25145
|
/* @__PURE__ */ jsx4("th", { children: "Type" }),
|
|
@@ -24917,7 +25156,7 @@ function IntegrationStatusCredentials({
|
|
|
24917
25156
|
// src/views/Settings/Integrations/Common/IntegrationStatus.tsx
|
|
24918
25157
|
var import_react150 = __toESM(require("react"));
|
|
24919
25158
|
var import_design_system_react_components90 = require("@livechat/design-system-react-components");
|
|
24920
|
-
var
|
|
25159
|
+
var import_developer_studio_ui_react64 = require("@livechat/developer-studio-ui-react");
|
|
24921
25160
|
var infoContainerCss = css`
|
|
24922
25161
|
background-color: var(${import_design_system_react_components90.DesignToken.SurfaceSecondaryDefault});
|
|
24923
25162
|
`;
|
|
@@ -24937,10 +25176,10 @@ var bigImageStyle = css`
|
|
|
24937
25176
|
`;
|
|
24938
25177
|
var IntegrationStatusView = (props) => {
|
|
24939
25178
|
var _a;
|
|
24940
|
-
return /* @__PURE__ */ jsxs2(
|
|
24941
|
-
/* @__PURE__ */ jsx4(
|
|
24942
|
-
/* @__PURE__ */ jsx4(
|
|
24943
|
-
|
|
25179
|
+
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react64.View, { children: [
|
|
25180
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react64.Row, { topMargin: true, children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react64.Column, { width: 6, children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react64.Intro, { header: props.title, body: props.subtitle, bodySize: "s" }) }) }),
|
|
25181
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react64.Row, { topMargin: true, children: /* @__PURE__ */ jsx4(import_developer_studio_ui_react64.Column, { width: 6, children: /* @__PURE__ */ jsx4(
|
|
25182
|
+
import_developer_studio_ui_react64.Card,
|
|
24944
25183
|
{
|
|
24945
25184
|
noPadding: true,
|
|
24946
25185
|
title: props.header,
|
|
@@ -24949,8 +25188,8 @@ var IntegrationStatusView = (props) => {
|
|
|
24949
25188
|
`,
|
|
24950
25189
|
dataCy: props.dataCy,
|
|
24951
25190
|
children: /* @__PURE__ */ jsxs2(import_react150.default.Fragment, { children: [
|
|
24952
|
-
/* @__PURE__ */ jsxs2(
|
|
24953
|
-
/* @__PURE__ */ jsx4(
|
|
25191
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react64.Row, { notPadded: true, css: infoContainerCss, children: [
|
|
25192
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react64.Column, { center: true, width: 2, setColumnPadding: 28, children: props.imgSrc ? /* @__PURE__ */ jsx4(
|
|
24954
25193
|
"img",
|
|
24955
25194
|
{
|
|
24956
25195
|
alt: "",
|
|
@@ -24958,10 +25197,10 @@ var IntegrationStatusView = (props) => {
|
|
|
24958
25197
|
css: bigImageStyle
|
|
24959
25198
|
}
|
|
24960
25199
|
) : /* @__PURE__ */ jsx4("div", { css: bigIconStyle(props.iconColor), children: props.icon }) }),
|
|
24961
|
-
/* @__PURE__ */ jsx4(
|
|
25200
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react64.Column, { setColumnPadding: 28, children: props.description })
|
|
24962
25201
|
] }),
|
|
24963
25202
|
/* @__PURE__ */ jsx4(
|
|
24964
|
-
|
|
25203
|
+
import_developer_studio_ui_react64.Row,
|
|
24965
25204
|
{
|
|
24966
25205
|
setRowPadding: `var(${import_design_system_react_components90.SpacingToken.Spacing5}) var(${import_design_system_react_components90.SpacingToken.Spacing5}) 0 var(${import_design_system_react_components90.SpacingToken.Spacing5}) `,
|
|
24967
25206
|
children: props.children
|
|
@@ -24976,7 +25215,7 @@ var IntegrationStatus_default = IntegrationStatusView;
|
|
|
24976
25215
|
|
|
24977
25216
|
// src/views/Settings/Integrations/Common/IntegrationStatusRow.tsx
|
|
24978
25217
|
var import_design_system_react_components92 = require("@livechat/design-system-react-components");
|
|
24979
|
-
var
|
|
25218
|
+
var import_developer_studio_ui_react65 = require("@livechat/developer-studio-ui-react");
|
|
24980
25219
|
|
|
24981
25220
|
// src/views/Settings/Integrations/Common/IntegrationConnectionStatus.tsx
|
|
24982
25221
|
var import_react152 = require("react");
|
|
@@ -25015,18 +25254,18 @@ var smallIconStyle = css`
|
|
|
25015
25254
|
}
|
|
25016
25255
|
`;
|
|
25017
25256
|
function IntegrationStatusRow(props) {
|
|
25018
|
-
return /* @__PURE__ */ jsxs2(
|
|
25019
|
-
/* @__PURE__ */ jsxs2(
|
|
25020
|
-
/* @__PURE__ */ jsxs2(
|
|
25257
|
+
return /* @__PURE__ */ jsxs2(import_developer_studio_ui_react65.Row, { notPadded: true, spaceBetween: true, children: [
|
|
25258
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react65.Column, { notPadded: true, stretch: true, children: [
|
|
25259
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react65.Row, { notPadded: true, stretch: true, center: true, children: [
|
|
25021
25260
|
/* @__PURE__ */ jsx4("div", { css: smallIconStyle, children: props.icon }),
|
|
25022
25261
|
/* @__PURE__ */ jsx4(import_design_system_react_components92.Text, { as: "span", size: "xs", children: props.title })
|
|
25023
25262
|
] }),
|
|
25024
|
-
/* @__PURE__ */ jsxs2(
|
|
25263
|
+
/* @__PURE__ */ jsxs2(import_developer_studio_ui_react65.Row, { setRowPadding: "4px 0 0 20px", center: true, stretch: true, children: [
|
|
25025
25264
|
getConnectionStatus(props.isConnected, "connect", props.isLoading),
|
|
25026
25265
|
props.status
|
|
25027
25266
|
] })
|
|
25028
25267
|
] }),
|
|
25029
|
-
/* @__PURE__ */ jsx4(
|
|
25268
|
+
/* @__PURE__ */ jsx4(import_developer_studio_ui_react65.Column, { pullRight: true, stretch: true, children: props.action })
|
|
25030
25269
|
] });
|
|
25031
25270
|
}
|
|
25032
25271
|
|
|
@@ -25036,8 +25275,8 @@ var BigCommerceStatus = () => {
|
|
|
25036
25275
|
const { login } = (0, import_react155.useContext)(AuthContext);
|
|
25037
25276
|
const {
|
|
25038
25277
|
userData: { user }
|
|
25039
|
-
} = (0,
|
|
25040
|
-
const { context: notifications } = (0,
|
|
25278
|
+
} = (0, import_developer_studio_ui_react66.useRootContext)();
|
|
25279
|
+
const { context: notifications } = (0, import_developer_studio_ui_react66.useNotifications)();
|
|
25041
25280
|
const credentialsQuery = useFetchBigCommerceCredentials();
|
|
25042
25281
|
const removeCredentialMutation = useRemoveIntegrationCredential();
|
|
25043
25282
|
const [state, setState] = (0, import_react155.useState)();
|
|
@@ -25196,9 +25435,9 @@ var BigCommerceStatus = () => {
|
|
|
25196
25435
|
/* @__PURE__ */ jsxs2(
|
|
25197
25436
|
IntegrationStatus_default,
|
|
25198
25437
|
{
|
|
25199
|
-
title:
|
|
25200
|
-
subtitle: `${
|
|
25201
|
-
header: `${
|
|
25438
|
+
title: import_developer_studio_api44.IntegrationDisplayNames.BigCommerce,
|
|
25439
|
+
subtitle: `${import_developer_studio_api44.IntegrationDisplayNames.BigCommerce} integration`,
|
|
25440
|
+
header: `${import_developer_studio_api44.IntegrationDisplayNames.BigCommerce} integration`,
|
|
25202
25441
|
description: "",
|
|
25203
25442
|
icon: /* @__PURE__ */ jsx4(import_design_system_icons48.BigCommerceColored, {}),
|
|
25204
25443
|
iconColor: true,
|
|
@@ -25264,8 +25503,8 @@ var import_react_router_dom36 = require("react-router-dom");
|
|
|
25264
25503
|
|
|
25265
25504
|
// src/views/Settings/Integrations/GitHub/Action.tsx
|
|
25266
25505
|
var import_react156 = require("react");
|
|
25267
|
-
var
|
|
25268
|
-
var
|
|
25506
|
+
var import_developer_studio_api45 = require("@livechat/developer-studio-api");
|
|
25507
|
+
var import_developer_studio_ui_react67 = require("@livechat/developer-studio-ui-react");
|
|
25269
25508
|
|
|
25270
25509
|
// src/utils/amplitude/journeys/application/blocks/repository.ts
|
|
25271
25510
|
var appRepositoryBlockAmplitudeJourneyFactory = (email) => ({
|
|
@@ -25392,10 +25631,10 @@ var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
|
25392
25631
|
var GitHubAction = (props) => {
|
|
25393
25632
|
var _a;
|
|
25394
25633
|
const { login } = (0, import_react156.useContext)(AuthContext);
|
|
25395
|
-
const match2 = (0,
|
|
25634
|
+
const match2 = (0, import_developer_studio_ui_react67.useMatch)();
|
|
25396
25635
|
const {
|
|
25397
25636
|
userData: { user }
|
|
25398
|
-
} = (0,
|
|
25637
|
+
} = (0, import_developer_studio_ui_react67.useRootContext)();
|
|
25399
25638
|
const action = (_a = props.action) != null ? _a : match2.params.action;
|
|
25400
25639
|
if (!action) {
|
|
25401
25640
|
throw new Error("Invalid action");
|
|
@@ -25403,7 +25642,7 @@ var GitHubAction = (props) => {
|
|
|
25403
25642
|
return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
25404
25643
|
IntegrationAction_default,
|
|
25405
25644
|
{
|
|
25406
|
-
name:
|
|
25645
|
+
name: import_developer_studio_api45.IntegrationNames.GitHub,
|
|
25407
25646
|
action,
|
|
25408
25647
|
data: props.data,
|
|
25409
25648
|
context: props.context,
|
|
@@ -25411,7 +25650,7 @@ var GitHubAction = (props) => {
|
|
|
25411
25650
|
serializedContext: match2.params.context,
|
|
25412
25651
|
executor: props.executor,
|
|
25413
25652
|
trigger: {
|
|
25414
|
-
mode:
|
|
25653
|
+
mode: import_developer_studio_api45.IntegrationModes.Modal,
|
|
25415
25654
|
handler: (output) => gitHubActionHandlers(login, user == null ? void 0 : user.meta.email)[action](output)
|
|
25416
25655
|
},
|
|
25417
25656
|
onSuccess: props.onSuccess
|
|
@@ -25424,10 +25663,10 @@ var gitHubActionHandlers = (login, email) => {
|
|
|
25424
25663
|
authorize: (output) => {
|
|
25425
25664
|
if (output.status === "success" && output.result.appToken && output.result.oauthToken) {
|
|
25426
25665
|
amplitudeRepositoryJourney.app.repository.actions.authorize.success(
|
|
25427
|
-
|
|
25666
|
+
import_developer_studio_api45.IntegrationNames.GitHub
|
|
25428
25667
|
);
|
|
25429
25668
|
login({
|
|
25430
|
-
source:
|
|
25669
|
+
source: import_developer_studio_api45.IntegrationNames.GitHub,
|
|
25431
25670
|
data: {
|
|
25432
25671
|
appToken: output.result.appToken,
|
|
25433
25672
|
oauthToken: output.result.oauthToken
|
|
@@ -25451,7 +25690,7 @@ var gitHubActionHandlers = (login, email) => {
|
|
|
25451
25690
|
install: (output) => {
|
|
25452
25691
|
if (output.status === "success" && output.result.installationId) {
|
|
25453
25692
|
amplitudeRepositoryJourney.app.repository.actions.install.success(
|
|
25454
|
-
|
|
25693
|
+
import_developer_studio_api45.IntegrationNames.GitHub
|
|
25455
25694
|
);
|
|
25456
25695
|
return {
|
|
25457
25696
|
isValid: true,
|
|
@@ -25470,15 +25709,15 @@ var Action_default6 = GitHubAction;
|
|
|
25470
25709
|
|
|
25471
25710
|
// src/views/Settings/Integrations/GitHub/Callback.tsx
|
|
25472
25711
|
var import_react157 = require("react");
|
|
25473
|
-
var
|
|
25712
|
+
var import_developer_studio_ui_react68 = require("@livechat/developer-studio-ui-react");
|
|
25474
25713
|
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
25475
25714
|
var GithubCallback = () => {
|
|
25476
25715
|
const { login } = (0, import_react157.useContext)(AuthContext);
|
|
25477
|
-
const match2 = (0,
|
|
25716
|
+
const match2 = (0, import_developer_studio_ui_react68.useMatch)();
|
|
25478
25717
|
const action = match2.params.action;
|
|
25479
25718
|
const {
|
|
25480
25719
|
userData: { user }
|
|
25481
|
-
} = (0,
|
|
25720
|
+
} = (0, import_developer_studio_ui_react68.useRootContext)();
|
|
25482
25721
|
if (!action) {
|
|
25483
25722
|
throw new Error("Invalid action");
|
|
25484
25723
|
}
|
|
@@ -25496,15 +25735,15 @@ var import_react161 = require("react");
|
|
|
25496
25735
|
var import_design_system_icons49 = require("@livechat/design-system-icons");
|
|
25497
25736
|
var import_design_system_react_components94 = require("@livechat/design-system-react-components");
|
|
25498
25737
|
var import_design_system_react_components95 = require("@livechat/design-system-react-components");
|
|
25499
|
-
var
|
|
25500
|
-
var
|
|
25738
|
+
var import_developer_studio_api49 = require("@livechat/developer-studio-api");
|
|
25739
|
+
var import_developer_studio_ui_react69 = require("@livechat/developer-studio-ui-react");
|
|
25501
25740
|
|
|
25502
25741
|
// src/hooks/integrations/github/credentials.ts
|
|
25503
|
-
var
|
|
25742
|
+
var import_developer_studio_api46 = require("@livechat/developer-studio-api");
|
|
25504
25743
|
var useFetchGitHubCredentials = () => {
|
|
25505
25744
|
var _a, _b, _c;
|
|
25506
25745
|
const credentialsQuery = useFetchIntegrationCredentialsQuery(
|
|
25507
|
-
|
|
25746
|
+
import_developer_studio_api46.IntegrationNames.GitHub
|
|
25508
25747
|
);
|
|
25509
25748
|
const appCredential = (_a = credentialsQuery.data) == null ? void 0 : _a.find(
|
|
25510
25749
|
(credential) => credential.type === "oauth2" && credential.data.client_id === getWorkflowEnv("githubAppClientId")
|
|
@@ -25528,22 +25767,22 @@ var useFetchGitHubCredentials = () => {
|
|
|
25528
25767
|
|
|
25529
25768
|
// src/hooks/integrations/github/installation.ts
|
|
25530
25769
|
var import_react158 = require("react");
|
|
25531
|
-
var
|
|
25532
|
-
var
|
|
25770
|
+
var import_react_query10 = require("@tanstack/react-query");
|
|
25771
|
+
var import_developer_studio_api47 = require("@livechat/developer-studio-api");
|
|
25533
25772
|
var githubInstallationQueryKeys = {
|
|
25534
25773
|
getInstallations: ["github.getInstallations"],
|
|
25535
25774
|
getIsInstalled: ["github.getIsInstalled"]
|
|
25536
25775
|
};
|
|
25537
25776
|
var useFetchGitHubInstallations = () => {
|
|
25538
25777
|
const { logout } = (0, import_react158.useContext)(AuthContext);
|
|
25539
|
-
return (0,
|
|
25778
|
+
return (0, import_react_query10.useQuery)(
|
|
25540
25779
|
githubInstallationQueryKeys.getInstallations,
|
|
25541
|
-
() =>
|
|
25780
|
+
() => import_developer_studio_api47.api.integrations.github.installation.getInstallations(),
|
|
25542
25781
|
{
|
|
25543
25782
|
retry: false,
|
|
25544
25783
|
onError: (error) => {
|
|
25545
|
-
if (error instanceof
|
|
25546
|
-
logout(
|
|
25784
|
+
if (error instanceof import_developer_studio_api47.UnauthorizeApiError) {
|
|
25785
|
+
logout(import_developer_studio_api47.IntegrationNames.GitHub);
|
|
25547
25786
|
}
|
|
25548
25787
|
}
|
|
25549
25788
|
}
|
|
@@ -25552,8 +25791,8 @@ var useFetchGitHubInstallations = () => {
|
|
|
25552
25791
|
|
|
25553
25792
|
// src/hooks/integrations/github/repository.ts
|
|
25554
25793
|
var import_react159 = require("react");
|
|
25555
|
-
var
|
|
25556
|
-
var
|
|
25794
|
+
var import_react_query11 = require("@tanstack/react-query");
|
|
25795
|
+
var import_developer_studio_api48 = require("@livechat/developer-studio-api");
|
|
25557
25796
|
|
|
25558
25797
|
// src/hooks/integrations/pusher/usePusher.ts
|
|
25559
25798
|
var import_react160 = require("react");
|
|
@@ -25592,7 +25831,7 @@ var GitHubStatus = () => {
|
|
|
25592
25831
|
var _a, _b;
|
|
25593
25832
|
const {
|
|
25594
25833
|
userData: { user }
|
|
25595
|
-
} = (0,
|
|
25834
|
+
} = (0, import_developer_studio_ui_react69.useRootContext)();
|
|
25596
25835
|
const { logout } = (0, import_react161.useContext)(AuthContext);
|
|
25597
25836
|
const credentialsQuery = useFetchGitHubCredentials();
|
|
25598
25837
|
const removeCredentialMutation = useRemoveIntegrationCredential();
|
|
@@ -25615,7 +25854,7 @@ var GitHubStatus = () => {
|
|
|
25615
25854
|
}
|
|
25616
25855
|
if (!appCredential && !oauthCredential) {
|
|
25617
25856
|
amplitudeRepositoryJourney.app.repository.actions.authorize.requested(
|
|
25618
|
-
|
|
25857
|
+
import_developer_studio_api49.IntegrationNames.GitHub
|
|
25619
25858
|
);
|
|
25620
25859
|
return;
|
|
25621
25860
|
}
|
|
@@ -25624,7 +25863,7 @@ var GitHubStatus = () => {
|
|
|
25624
25863
|
}
|
|
25625
25864
|
if (!isInstalled) {
|
|
25626
25865
|
amplitudeRepositoryJourney.app.repository.actions.install.requested(
|
|
25627
|
-
|
|
25866
|
+
import_developer_studio_api49.IntegrationNames.GitHub
|
|
25628
25867
|
);
|
|
25629
25868
|
}
|
|
25630
25869
|
}, [
|
|
@@ -25639,7 +25878,7 @@ var GitHubStatus = () => {
|
|
|
25639
25878
|
"my-event",
|
|
25640
25879
|
(data) => {
|
|
25641
25880
|
var _a2;
|
|
25642
|
-
if (data.integration !==
|
|
25881
|
+
if (data.integration !== import_developer_studio_api49.IntegrationNames.GitHub) {
|
|
25643
25882
|
return;
|
|
25644
25883
|
}
|
|
25645
25884
|
if (data.action === "install" && data.userId === (user == null ? void 0 : user.profile.id)) {
|
|
@@ -25649,7 +25888,7 @@ var GitHubStatus = () => {
|
|
|
25649
25888
|
))) {
|
|
25650
25889
|
credentialsQuery.refetch();
|
|
25651
25890
|
gitHubInstallationsQuery.refetch();
|
|
25652
|
-
logout(
|
|
25891
|
+
logout(import_developer_studio_api49.IntegrationNames.GitHub);
|
|
25653
25892
|
}
|
|
25654
25893
|
},
|
|
25655
25894
|
[gitHubInstallationsQuery.data]
|
|
@@ -25668,7 +25907,7 @@ var GitHubStatus = () => {
|
|
|
25668
25907
|
onClick: () => {
|
|
25669
25908
|
if (!(credential == null ? void 0 : credential.data.connected)) {
|
|
25670
25909
|
amplitudeRepositoryJourney.app.repository.actions.authorize.click(
|
|
25671
|
-
|
|
25910
|
+
import_developer_studio_api49.IntegrationNames.GitHub
|
|
25672
25911
|
);
|
|
25673
25912
|
}
|
|
25674
25913
|
confirm();
|
|
@@ -25707,7 +25946,7 @@ var GitHubStatus = () => {
|
|
|
25707
25946
|
loading: gitHubInstallationsQuery.isLoading,
|
|
25708
25947
|
onClick: () => {
|
|
25709
25948
|
amplitudeRepositoryJourney.app.repository.actions.install.click(
|
|
25710
|
-
|
|
25949
|
+
import_developer_studio_api49.IntegrationNames.GitHub
|
|
25711
25950
|
);
|
|
25712
25951
|
confirm();
|
|
25713
25952
|
},
|
|
@@ -25772,11 +26011,11 @@ var GitHubStatus = () => {
|
|
|
25772
26011
|
return /* @__PURE__ */ jsxs2(
|
|
25773
26012
|
IntegrationStatus_default,
|
|
25774
26013
|
{
|
|
25775
|
-
title:
|
|
26014
|
+
title: import_developer_studio_api49.IntegrationDisplayNames.GitHub,
|
|
25776
26015
|
subtitle: "Integrate your GitHub account to be able to link repositories of your apps.",
|
|
25777
26016
|
header: "GitHub integration",
|
|
25778
26017
|
description: "The integration of GitHub and the Developer Console streamlines your development process, enhances collaboration, centralizes the services for building, testing and deploying apps, and helps to efficiently manage your code.",
|
|
25779
|
-
icon: /* @__PURE__ */ jsx4(
|
|
26018
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react69.Github, {}),
|
|
25780
26019
|
iconColor: true,
|
|
25781
26020
|
dataCy: "github-integration-component",
|
|
25782
26021
|
children: [
|
|
@@ -25788,8 +26027,8 @@ var GitHubStatus = () => {
|
|
|
25788
26027
|
(appCredential == null ? void 0 : appCredential.data.connected) && (oauthCredential == null ? void 0 : oauthCredential.data.connected)
|
|
25789
26028
|
),
|
|
25790
26029
|
isLoading: credentialsQuery.isFetching,
|
|
25791
|
-
icon: /* @__PURE__ */ jsx4(
|
|
25792
|
-
action: !credentialsQuery.isFetching && !(appCredential == null ? void 0 : appCredential.name) && !(oauthCredential == null ? void 0 : oauthCredential.name) ? /* @__PURE__ */ jsx4(Connect, {}) : !credentialsQuery.isFetching ? /* @__PURE__ */ jsxs2(
|
|
26030
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react69.Github, {}),
|
|
26031
|
+
action: !credentialsQuery.isFetching && !(appCredential == null ? void 0 : appCredential.name) && !(oauthCredential == null ? void 0 : oauthCredential.name) ? /* @__PURE__ */ jsx4(Connect, {}) : !credentialsQuery.isFetching ? /* @__PURE__ */ jsxs2(import_developer_studio_ui_react69.Row, { notPadded: true, flexEnd: true, gap: `var(${import_design_system_react_components94.SpacingToken.Spacing2})`, children: [
|
|
25793
26032
|
/* @__PURE__ */ jsx4(Install, {}),
|
|
25794
26033
|
/* @__PURE__ */ jsx4(
|
|
25795
26034
|
import_design_system_react_components95.ActionMenu,
|
|
@@ -25869,11 +26108,11 @@ var import_react_router_dom37 = require("react-router-dom");
|
|
|
25869
26108
|
|
|
25870
26109
|
// src/views/Settings/Integrations/HubSpot/Callback.tsx
|
|
25871
26110
|
var import_react162 = require("react");
|
|
25872
|
-
var
|
|
26111
|
+
var import_developer_studio_ui_react70 = require("@livechat/developer-studio-ui-react");
|
|
25873
26112
|
var import_jsx_runtime146 = require("react/jsx-runtime");
|
|
25874
26113
|
var HubSpotCallback = () => {
|
|
25875
26114
|
const { login } = (0, import_react162.useContext)(AuthContext);
|
|
25876
|
-
const match2 = (0,
|
|
26115
|
+
const match2 = (0, import_developer_studio_ui_react70.useMatch)();
|
|
25877
26116
|
const action = match2.params.action;
|
|
25878
26117
|
if (!action) {
|
|
25879
26118
|
throw new Error("Invalid action");
|
|
@@ -25891,7 +26130,7 @@ var Callback_default4 = HubSpotCallback;
|
|
|
25891
26130
|
var import_react163 = require("react");
|
|
25892
26131
|
var import_design_system_icons50 = require("@livechat/design-system-icons");
|
|
25893
26132
|
var import_design_system_react_components96 = require("@livechat/design-system-react-components");
|
|
25894
|
-
var
|
|
26133
|
+
var import_developer_studio_api50 = require("@livechat/developer-studio-api");
|
|
25895
26134
|
var HubspotStatus = () => {
|
|
25896
26135
|
const credentialsQuery = useFetchHubspotCredentials();
|
|
25897
26136
|
const removeCredentialMutation = useRemoveIntegrationCredential();
|
|
@@ -25934,9 +26173,9 @@ var HubspotStatus = () => {
|
|
|
25934
26173
|
return /* @__PURE__ */ jsxs2(
|
|
25935
26174
|
IntegrationStatus_default,
|
|
25936
26175
|
{
|
|
25937
|
-
title:
|
|
25938
|
-
subtitle: `${
|
|
25939
|
-
header: `${
|
|
26176
|
+
title: import_developer_studio_api50.IntegrationDisplayNames.HubSpot,
|
|
26177
|
+
subtitle: `${import_developer_studio_api50.IntegrationDisplayNames.HubSpot} integration`,
|
|
26178
|
+
header: `${import_developer_studio_api50.IntegrationDisplayNames.HubSpot} integration`,
|
|
25940
26179
|
description: "",
|
|
25941
26180
|
icon: /* @__PURE__ */ jsx4(import_design_system_icons50.Hubspot, {}),
|
|
25942
26181
|
dataCy: "hubpsot-integration-component",
|
|
@@ -26000,11 +26239,11 @@ var import_react_router_dom38 = require("react-router-dom");
|
|
|
26000
26239
|
|
|
26001
26240
|
// src/views/Settings/Integrations/Mailchimp/Callback.tsx
|
|
26002
26241
|
var import_react164 = require("react");
|
|
26003
|
-
var
|
|
26242
|
+
var import_developer_studio_ui_react71 = require("@livechat/developer-studio-ui-react");
|
|
26004
26243
|
var import_jsx_runtime149 = require("react/jsx-runtime");
|
|
26005
26244
|
var MailchimpCallback = () => {
|
|
26006
26245
|
const { login } = (0, import_react164.useContext)(AuthContext);
|
|
26007
|
-
const match2 = (0,
|
|
26246
|
+
const match2 = (0, import_developer_studio_ui_react71.useMatch)();
|
|
26008
26247
|
const action = match2.params.action;
|
|
26009
26248
|
if (!action) {
|
|
26010
26249
|
throw new Error("Invalid action");
|
|
@@ -26022,7 +26261,7 @@ var Callback_default5 = MailchimpCallback;
|
|
|
26022
26261
|
var import_react165 = require("react");
|
|
26023
26262
|
var import_design_system_icons51 = require("@livechat/design-system-icons");
|
|
26024
26263
|
var import_design_system_react_components97 = require("@livechat/design-system-react-components");
|
|
26025
|
-
var
|
|
26264
|
+
var import_developer_studio_api51 = require("@livechat/developer-studio-api");
|
|
26026
26265
|
var MailchimpStatus = () => {
|
|
26027
26266
|
const credentialsQuery = useFetchMailchimpCredentials();
|
|
26028
26267
|
const removeCredentialMutation = useRemoveIntegrationCredential();
|
|
@@ -26065,9 +26304,9 @@ var MailchimpStatus = () => {
|
|
|
26065
26304
|
return /* @__PURE__ */ jsxs2(
|
|
26066
26305
|
IntegrationStatus_default,
|
|
26067
26306
|
{
|
|
26068
|
-
title:
|
|
26069
|
-
subtitle: `${
|
|
26070
|
-
header: `${
|
|
26307
|
+
title: import_developer_studio_api51.IntegrationDisplayNames.Mailchimp,
|
|
26308
|
+
subtitle: `${import_developer_studio_api51.IntegrationDisplayNames.Mailchimp} integration`,
|
|
26309
|
+
header: `${import_developer_studio_api51.IntegrationDisplayNames.Mailchimp} integration`,
|
|
26071
26310
|
description: "Integrate Developer Console with Mailchimp to streamline your marketing campaigns, automate email workflows, and enhance your customer engagement with ease. Experience efficient and effective communication, all within a unified platform.",
|
|
26072
26311
|
icon: /* @__PURE__ */ jsx4(import_design_system_icons51.Mailchimp, {}),
|
|
26073
26312
|
dataCy: "mailchimp-integration-component",
|
|
@@ -26131,13 +26370,13 @@ var import_react_router_dom39 = require("react-router-dom");
|
|
|
26131
26370
|
|
|
26132
26371
|
// src/views/Settings/Integrations/Neon/Action.tsx
|
|
26133
26372
|
var import_react166 = require("react");
|
|
26134
|
-
var
|
|
26135
|
-
var
|
|
26373
|
+
var import_developer_studio_api52 = require("@livechat/developer-studio-api");
|
|
26374
|
+
var import_developer_studio_ui_react72 = require("@livechat/developer-studio-ui-react");
|
|
26136
26375
|
var import_jsx_runtime152 = require("react/jsx-runtime");
|
|
26137
26376
|
var NeonAction = (props) => {
|
|
26138
26377
|
var _a;
|
|
26139
26378
|
const { login } = (0, import_react166.useContext)(AuthContext);
|
|
26140
|
-
const match2 = (0,
|
|
26379
|
+
const match2 = (0, import_developer_studio_ui_react72.useMatch)();
|
|
26141
26380
|
const action = (_a = props.action) != null ? _a : match2.params.action;
|
|
26142
26381
|
if (!action) {
|
|
26143
26382
|
throw new Error("Invalid action");
|
|
@@ -26145,7 +26384,7 @@ var NeonAction = (props) => {
|
|
|
26145
26384
|
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
|
|
26146
26385
|
IntegrationAction_default,
|
|
26147
26386
|
{
|
|
26148
|
-
name:
|
|
26387
|
+
name: import_developer_studio_api52.IntegrationNames.Neon,
|
|
26149
26388
|
action,
|
|
26150
26389
|
data: props.data,
|
|
26151
26390
|
context: props.context,
|
|
@@ -26153,7 +26392,7 @@ var NeonAction = (props) => {
|
|
|
26153
26392
|
serializedContext: match2.params.context,
|
|
26154
26393
|
executor: props.executor,
|
|
26155
26394
|
trigger: {
|
|
26156
|
-
mode:
|
|
26395
|
+
mode: import_developer_studio_api52.IntegrationModes.Modal,
|
|
26157
26396
|
handler: (output) => {
|
|
26158
26397
|
var _a2;
|
|
26159
26398
|
return neonActionHandlers(login, (_a2 = props.data) == null ? void 0 : _a2.setIsActionLoading)[action](output);
|
|
@@ -26169,7 +26408,7 @@ var neonActionHandlers = (login, setIsActionLoading) => {
|
|
|
26169
26408
|
setIsActionLoading == null ? void 0 : setIsActionLoading(false);
|
|
26170
26409
|
if (output.status === "success" && output.result.token) {
|
|
26171
26410
|
login({
|
|
26172
|
-
source:
|
|
26411
|
+
source: import_developer_studio_api52.IntegrationNames.Neon,
|
|
26173
26412
|
data: { token: output.result.token }
|
|
26174
26413
|
});
|
|
26175
26414
|
return {
|
|
@@ -26188,11 +26427,11 @@ var Action_default7 = NeonAction;
|
|
|
26188
26427
|
|
|
26189
26428
|
// src/views/Settings/Integrations/Neon/Callback.tsx
|
|
26190
26429
|
var import_react167 = require("react");
|
|
26191
|
-
var
|
|
26430
|
+
var import_developer_studio_ui_react73 = require("@livechat/developer-studio-ui-react");
|
|
26192
26431
|
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
26193
26432
|
var NeonCallback = () => {
|
|
26194
26433
|
const { login } = (0, import_react167.useContext)(AuthContext);
|
|
26195
|
-
const match2 = (0,
|
|
26434
|
+
const match2 = (0, import_developer_studio_ui_react73.useMatch)();
|
|
26196
26435
|
const action = match2.params.action;
|
|
26197
26436
|
if (!action) {
|
|
26198
26437
|
throw new Error("Invalid action");
|
|
@@ -26210,15 +26449,15 @@ var Callback_default6 = NeonCallback;
|
|
|
26210
26449
|
var import_react171 = require("react");
|
|
26211
26450
|
var import_design_system_icons52 = require("@livechat/design-system-icons");
|
|
26212
26451
|
var import_design_system_react_components98 = require("@livechat/design-system-react-components");
|
|
26213
|
-
var
|
|
26214
|
-
var
|
|
26452
|
+
var import_developer_studio_api57 = require("@livechat/developer-studio-api");
|
|
26453
|
+
var import_developer_studio_ui_react74 = require("@livechat/developer-studio-ui-react");
|
|
26215
26454
|
|
|
26216
26455
|
// src/hooks/integrations/neon/credentials.ts
|
|
26217
|
-
var
|
|
26456
|
+
var import_developer_studio_api53 = require("@livechat/developer-studio-api");
|
|
26218
26457
|
var useFetchNeonCredentials = () => {
|
|
26219
26458
|
var _a, _b;
|
|
26220
26459
|
const credentialsQuery = useFetchIntegrationCredentialsQuery(
|
|
26221
|
-
|
|
26460
|
+
import_developer_studio_api53.IntegrationNames.Neon
|
|
26222
26461
|
);
|
|
26223
26462
|
const oauthCredential = (_a = credentialsQuery.data) == null ? void 0 : _a.find(
|
|
26224
26463
|
(credential) => credential.type === "oauth2" && credential.data.client_id === getWorkflowEnv("neonClientId")
|
|
@@ -26236,18 +26475,18 @@ var useFetchNeonCredentials = () => {
|
|
|
26236
26475
|
|
|
26237
26476
|
// src/hooks/integrations/neon/databases.ts
|
|
26238
26477
|
var import_react168 = require("react");
|
|
26239
|
-
var
|
|
26240
|
-
var
|
|
26478
|
+
var import_react_query12 = require("@tanstack/react-query");
|
|
26479
|
+
var import_developer_studio_api54 = require("@livechat/developer-studio-api");
|
|
26241
26480
|
|
|
26242
26481
|
// src/hooks/integrations/neon/projects.ts
|
|
26243
26482
|
var import_react169 = require("react");
|
|
26244
|
-
var
|
|
26245
|
-
var
|
|
26483
|
+
var import_react_query13 = require("@tanstack/react-query");
|
|
26484
|
+
var import_developer_studio_api55 = require("@livechat/developer-studio-api");
|
|
26246
26485
|
|
|
26247
26486
|
// src/hooks/integrations/neon/user.ts
|
|
26248
26487
|
var import_react170 = require("react");
|
|
26249
|
-
var
|
|
26250
|
-
var
|
|
26488
|
+
var import_react_query14 = require("@tanstack/react-query");
|
|
26489
|
+
var import_developer_studio_api56 = require("@livechat/developer-studio-api");
|
|
26251
26490
|
|
|
26252
26491
|
// src/views/Settings/Integrations/Neon/Status.tsx
|
|
26253
26492
|
var NeonStatus = () => {
|
|
@@ -26292,11 +26531,11 @@ var NeonStatus = () => {
|
|
|
26292
26531
|
return /* @__PURE__ */ jsxs2(
|
|
26293
26532
|
IntegrationStatus_default,
|
|
26294
26533
|
{
|
|
26295
|
-
title:
|
|
26296
|
-
subtitle: `${
|
|
26297
|
-
header: `${
|
|
26534
|
+
title: import_developer_studio_api57.IntegrationDisplayNames.Neon,
|
|
26535
|
+
subtitle: `${import_developer_studio_api57.IntegrationDisplayNames.Neon} integration`,
|
|
26536
|
+
header: `${import_developer_studio_api57.IntegrationDisplayNames.Neon} integration`,
|
|
26298
26537
|
description: "Integrate Developer Console with Neon to enjoy simplified web development with a platform for storing your apps data. Experience faster, scalable, and more secure workflow.",
|
|
26299
|
-
icon: /* @__PURE__ */ jsx4(
|
|
26538
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react74.Neon, {}),
|
|
26300
26539
|
dataCy: "neon-integration-component",
|
|
26301
26540
|
children: [
|
|
26302
26541
|
/* @__PURE__ */ jsx4(
|
|
@@ -26305,7 +26544,7 @@ var NeonStatus = () => {
|
|
|
26305
26544
|
title: "Text Platform | Developer Console",
|
|
26306
26545
|
isConnected: Boolean(oauthCredential == null ? void 0 : oauthCredential.data.connected),
|
|
26307
26546
|
isLoading: credentialsQuery.isFetching,
|
|
26308
|
-
icon: /* @__PURE__ */ jsx4(
|
|
26547
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react74.Neon, {}),
|
|
26309
26548
|
action: !credentialsQuery.isFetching ? /* @__PURE__ */ jsx4(Connect, { credential: oauthCredential }) : void 0,
|
|
26310
26549
|
status: !credentialsQuery.isFetching && (oauthCredential == null ? void 0 : oauthCredential.name) ? /* @__PURE__ */ jsx4(
|
|
26311
26550
|
import_design_system_react_components98.Button,
|
|
@@ -26352,8 +26591,8 @@ var import_react_router_dom40 = require("react-router-dom");
|
|
|
26352
26591
|
|
|
26353
26592
|
// src/views/Settings/Integrations/Netlify/Action.tsx
|
|
26354
26593
|
var import_react172 = require("react");
|
|
26355
|
-
var
|
|
26356
|
-
var
|
|
26594
|
+
var import_developer_studio_api58 = require("@livechat/developer-studio-api");
|
|
26595
|
+
var import_developer_studio_ui_react75 = require("@livechat/developer-studio-ui-react");
|
|
26357
26596
|
|
|
26358
26597
|
// src/utils/amplitude/journeys/application/blocks/deployment.ts
|
|
26359
26598
|
var appDeploymentBlockAmplitudeJourneyFactory = (email) => ({
|
|
@@ -26473,10 +26712,10 @@ var import_jsx_runtime156 = require("react/jsx-runtime");
|
|
|
26473
26712
|
var NetlifyAction = (props) => {
|
|
26474
26713
|
var _a;
|
|
26475
26714
|
const { login } = (0, import_react172.useContext)(AuthContext);
|
|
26476
|
-
const match2 = (0,
|
|
26715
|
+
const match2 = (0, import_developer_studio_ui_react75.useMatch)();
|
|
26477
26716
|
const {
|
|
26478
26717
|
userData: { user }
|
|
26479
|
-
} = (0,
|
|
26718
|
+
} = (0, import_developer_studio_ui_react75.useRootContext)();
|
|
26480
26719
|
const action = (_a = props.action) != null ? _a : match2.params.action;
|
|
26481
26720
|
if (!action) {
|
|
26482
26721
|
throw new Error("Invalid action");
|
|
@@ -26484,7 +26723,7 @@ var NetlifyAction = (props) => {
|
|
|
26484
26723
|
return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
|
|
26485
26724
|
IntegrationAction_default,
|
|
26486
26725
|
{
|
|
26487
|
-
name:
|
|
26726
|
+
name: import_developer_studio_api58.IntegrationNames.Netlify,
|
|
26488
26727
|
action,
|
|
26489
26728
|
data: props.data,
|
|
26490
26729
|
context: props.context,
|
|
@@ -26492,7 +26731,7 @@ var NetlifyAction = (props) => {
|
|
|
26492
26731
|
serializedContext: match2.params.context,
|
|
26493
26732
|
executor: props.executor,
|
|
26494
26733
|
trigger: {
|
|
26495
|
-
mode:
|
|
26734
|
+
mode: import_developer_studio_api58.IntegrationModes.Modal,
|
|
26496
26735
|
handler: (output) => netlifyActionHandlers(login, user == null ? void 0 : user.meta.email)[action](output)
|
|
26497
26736
|
},
|
|
26498
26737
|
onSuccess: props.onSuccess
|
|
@@ -26502,9 +26741,9 @@ var NetlifyAction = (props) => {
|
|
|
26502
26741
|
function triggerNetlifyAction(props, meta) {
|
|
26503
26742
|
return executeIntegrationAction(
|
|
26504
26743
|
__spreadProps(__spreadValues({}, props), {
|
|
26505
|
-
name:
|
|
26744
|
+
name: import_developer_studio_api58.IntegrationNames.Netlify,
|
|
26506
26745
|
trigger: {
|
|
26507
|
-
mode:
|
|
26746
|
+
mode: import_developer_studio_api58.IntegrationModes.Modal,
|
|
26508
26747
|
handler: (output) => netlifyActionHandlers(
|
|
26509
26748
|
meta.login,
|
|
26510
26749
|
meta.user.meta.email
|
|
@@ -26520,10 +26759,10 @@ var netlifyActionHandlers = (login, email) => {
|
|
|
26520
26759
|
authorize: (output) => {
|
|
26521
26760
|
if (output.status === "success" && output.result.token) {
|
|
26522
26761
|
amplitudeDeploymentJourney.app.deployment.actions.authorize.success(
|
|
26523
|
-
|
|
26762
|
+
import_developer_studio_api58.IntegrationNames.Netlify
|
|
26524
26763
|
);
|
|
26525
26764
|
login({
|
|
26526
|
-
source:
|
|
26765
|
+
source: import_developer_studio_api58.IntegrationNames.Netlify,
|
|
26527
26766
|
data: { token: output.result.token }
|
|
26528
26767
|
});
|
|
26529
26768
|
return {
|
|
@@ -26544,7 +26783,7 @@ var netlifyActionHandlers = (login, email) => {
|
|
|
26544
26783
|
install: (output) => {
|
|
26545
26784
|
if (output.status === "success" && output.result.installationId) {
|
|
26546
26785
|
amplitudeDeploymentJourney.app.deployment.actions.install.success(
|
|
26547
|
-
|
|
26786
|
+
import_developer_studio_api58.IntegrationNames.Netlify
|
|
26548
26787
|
);
|
|
26549
26788
|
return {
|
|
26550
26789
|
isValid: true,
|
|
@@ -26563,15 +26802,15 @@ var Action_default8 = NetlifyAction;
|
|
|
26563
26802
|
|
|
26564
26803
|
// src/views/Settings/Integrations/Netlify/Callback.tsx
|
|
26565
26804
|
var import_react173 = require("react");
|
|
26566
|
-
var
|
|
26805
|
+
var import_developer_studio_ui_react76 = require("@livechat/developer-studio-ui-react");
|
|
26567
26806
|
var import_jsx_runtime157 = require("react/jsx-runtime");
|
|
26568
26807
|
var NetlifyCallback = () => {
|
|
26569
|
-
const match2 = (0,
|
|
26808
|
+
const match2 = (0, import_developer_studio_ui_react76.useMatch)();
|
|
26570
26809
|
const { login } = (0, import_react173.useContext)(AuthContext);
|
|
26571
26810
|
const action = match2.params.action;
|
|
26572
26811
|
const {
|
|
26573
26812
|
userData: { user }
|
|
26574
|
-
} = (0,
|
|
26813
|
+
} = (0, import_developer_studio_ui_react76.useRootContext)();
|
|
26575
26814
|
if (!action) {
|
|
26576
26815
|
throw new Error("Invalid action");
|
|
26577
26816
|
}
|
|
@@ -26589,14 +26828,14 @@ var import_react175 = require("react");
|
|
|
26589
26828
|
var import_design_system_icons53 = require("@livechat/design-system-icons");
|
|
26590
26829
|
var import_design_system_react_components99 = require("@livechat/design-system-react-components");
|
|
26591
26830
|
var import_developer_studio_api62 = require("@livechat/developer-studio-api");
|
|
26592
|
-
var
|
|
26831
|
+
var import_developer_studio_ui_react77 = require("@livechat/developer-studio-ui-react");
|
|
26593
26832
|
|
|
26594
26833
|
// src/hooks/integrations/netlify/credentials.ts
|
|
26595
|
-
var
|
|
26834
|
+
var import_developer_studio_api59 = require("@livechat/developer-studio-api");
|
|
26596
26835
|
var useFetchNetlifyCredentials = () => {
|
|
26597
26836
|
var _a, _b;
|
|
26598
26837
|
const credentialsQuery = useFetchIntegrationCredentialsQuery(
|
|
26599
|
-
|
|
26838
|
+
import_developer_studio_api59.IntegrationNames.Netlify
|
|
26600
26839
|
);
|
|
26601
26840
|
const oauthCredential = (_a = credentialsQuery.data) == null ? void 0 : _a.find(
|
|
26602
26841
|
(credential) => credential.type === "oauth2" && credential.data.client_id === getWorkflowEnv("netlifyClientId")
|
|
@@ -26614,21 +26853,21 @@ var useFetchNetlifyCredentials = () => {
|
|
|
26614
26853
|
|
|
26615
26854
|
// src/hooks/integrations/netlify/site.ts
|
|
26616
26855
|
var import_react174 = require("react");
|
|
26617
|
-
var
|
|
26618
|
-
var
|
|
26856
|
+
var import_react_query15 = require("@tanstack/react-query");
|
|
26857
|
+
var import_developer_studio_api60 = require("@livechat/developer-studio-api");
|
|
26619
26858
|
var netlifyDeploymentQueryKeys = {
|
|
26620
26859
|
getSites: ["netlify.getSites"]
|
|
26621
26860
|
};
|
|
26622
26861
|
var useFetchNetlifySitesQuery = (isAuthorized) => {
|
|
26623
26862
|
const { logout } = (0, import_react174.useContext)(AuthContext);
|
|
26624
|
-
return (0,
|
|
26863
|
+
return (0, import_react_query15.useQuery)(
|
|
26625
26864
|
netlifyDeploymentQueryKeys.getSites,
|
|
26626
|
-
() =>
|
|
26865
|
+
() => import_developer_studio_api60.api.integrations.netlify.site.getSites(),
|
|
26627
26866
|
{
|
|
26628
26867
|
retry: false,
|
|
26629
26868
|
onError: (error) => {
|
|
26630
|
-
if (error instanceof
|
|
26631
|
-
logout(
|
|
26869
|
+
if (error instanceof import_developer_studio_api60.UnauthorizeApiError) {
|
|
26870
|
+
logout(import_developer_studio_api60.IntegrationNames.Netlify);
|
|
26632
26871
|
}
|
|
26633
26872
|
},
|
|
26634
26873
|
enabled: isAuthorized
|
|
@@ -26637,39 +26876,11 @@ var useFetchNetlifySitesQuery = (isAuthorized) => {
|
|
|
26637
26876
|
};
|
|
26638
26877
|
|
|
26639
26878
|
// src/hooks/state/user/integrations/netlify.ts
|
|
26640
|
-
var
|
|
26879
|
+
var import_react_query16 = require("@tanstack/react-query");
|
|
26641
26880
|
var import_developer_studio_api61 = require("@livechat/developer-studio-api");
|
|
26642
|
-
|
|
26643
|
-
// src/hooks/user.ts
|
|
26644
|
-
var import_react_query14 = require("@tanstack/react-query");
|
|
26645
|
-
var import_developer_studio_api60 = require("@livechat/developer-studio-api");
|
|
26646
|
-
var userQueryKeys = {
|
|
26647
|
-
dps: {
|
|
26648
|
-
getUser: ["dps.getUser"],
|
|
26649
|
-
getUserIntegrations: ["dps.getUserIntegrations"]
|
|
26650
|
-
},
|
|
26651
|
-
livechat: {
|
|
26652
|
-
agent: {
|
|
26653
|
-
getUser: ["livechat.agent.getUser"]
|
|
26654
|
-
}
|
|
26655
|
-
},
|
|
26656
|
-
accounts: {
|
|
26657
|
-
account: {
|
|
26658
|
-
getInfo: ["accounts.account.getInfo"]
|
|
26659
|
-
}
|
|
26660
|
-
}
|
|
26661
|
-
};
|
|
26662
|
-
var useFetchUserIntegrationsQuery = () => {
|
|
26663
|
-
return (0, import_react_query14.useQuery)(
|
|
26664
|
-
userQueryKeys.dps.getUserIntegrations,
|
|
26665
|
-
() => import_developer_studio_api60.api.platform.dps.user.getUserIntegrations()
|
|
26666
|
-
);
|
|
26667
|
-
};
|
|
26668
|
-
|
|
26669
|
-
// src/hooks/state/user/integrations/netlify.ts
|
|
26670
26881
|
var useUpdateUserNetlifyIntegrationQuery = () => {
|
|
26671
|
-
const queryClient = (0,
|
|
26672
|
-
const { mutateAsync: updateUserNetlifyIntegration, isLoading } = (0,
|
|
26882
|
+
const queryClient = (0, import_react_query16.useQueryClient)();
|
|
26883
|
+
const { mutateAsync: updateUserNetlifyIntegration, isLoading } = (0, import_react_query16.useMutation)(
|
|
26673
26884
|
(userNetlifyIntegration) => import_developer_studio_api61.api.platform.dps.user.updateUserNetlifyIntegration(
|
|
26674
26885
|
userNetlifyIntegration
|
|
26675
26886
|
),
|
|
@@ -26709,9 +26920,9 @@ var NetlifyStatus = () => {
|
|
|
26709
26920
|
var _a, _b, _c, _d;
|
|
26710
26921
|
const {
|
|
26711
26922
|
userData: { user }
|
|
26712
|
-
} = (0,
|
|
26923
|
+
} = (0, import_developer_studio_ui_react77.useRootContext)();
|
|
26713
26924
|
const { state, login } = (0, import_react175.useContext)(AuthContext);
|
|
26714
|
-
const { context: notifications } = (0,
|
|
26925
|
+
const { context: notifications } = (0, import_developer_studio_ui_react77.useNotifications)();
|
|
26715
26926
|
const userIntegrationsQuery = useFetchUserIntegrationsQuery();
|
|
26716
26927
|
const removeCredentialMutation = useRemoveIntegrationCredential();
|
|
26717
26928
|
const credentialsQuery = useFetchNetlifyCredentials();
|
|
@@ -26911,7 +27122,7 @@ var NetlifyStatus = () => {
|
|
|
26911
27122
|
subtitle: `${import_developer_studio_api62.IntegrationDisplayNames.Netlify} integration`,
|
|
26912
27123
|
header: `${import_developer_studio_api62.IntegrationDisplayNames.Netlify} integration`,
|
|
26913
27124
|
description: "Integrate Developer Console with Netlify to enjoy simplified web development with a platform for building, deploying, and managing your projects. Experience faster, scalable, and more secure workflow.",
|
|
26914
|
-
icon: /* @__PURE__ */ jsx4(
|
|
27125
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react77.Netlify, {}),
|
|
26915
27126
|
dataCy: "netlify-integration-component",
|
|
26916
27127
|
children: [
|
|
26917
27128
|
/* @__PURE__ */ jsx4(
|
|
@@ -26920,8 +27131,8 @@ var NetlifyStatus = () => {
|
|
|
26920
27131
|
title: "Text Platform | Developer Console",
|
|
26921
27132
|
isConnected: Boolean(oauthCredential == null ? void 0 : oauthCredential.data.connected),
|
|
26922
27133
|
isLoading: credentialsQuery.isFetching,
|
|
26923
|
-
icon: /* @__PURE__ */ jsx4(
|
|
26924
|
-
action: !(oauthCredential == null ? void 0 : oauthCredential.data.connected) && !credentialsQuery.isFetching ? /* @__PURE__ */ jsx4(Connect, {}) : !credentialsQuery.isFetching ? /* @__PURE__ */ jsxs2(
|
|
27134
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react77.Netlify, {}),
|
|
27135
|
+
action: !(oauthCredential == null ? void 0 : oauthCredential.data.connected) && !credentialsQuery.isFetching ? /* @__PURE__ */ jsx4(Connect, {}) : !credentialsQuery.isFetching ? /* @__PURE__ */ jsxs2(import_developer_studio_ui_react77.Row, { notPadded: true, flexEnd: true, gap: `var(${import_design_system_react_components99.SpacingToken.Spacing2})`, children: [
|
|
26925
27136
|
!userIntegrationsQuery.isFetching && !isInstalled ? /* @__PURE__ */ jsx4(Install, {}) : void 0,
|
|
26926
27137
|
/* @__PURE__ */ jsx4(
|
|
26927
27138
|
import_design_system_react_components99.ActionMenu,
|
|
@@ -26969,7 +27180,7 @@ var NetlifyStatus = () => {
|
|
|
26969
27180
|
] }) : void 0
|
|
26970
27181
|
}
|
|
26971
27182
|
),
|
|
26972
|
-
oauthCredential && isInstalled && !sitesQuery.isFetching && !doesNetlifySiteHasInstallID ? /* @__PURE__ */ jsx4(
|
|
27183
|
+
oauthCredential && isInstalled && !sitesQuery.isFetching && !doesNetlifySiteHasInstallID ? /* @__PURE__ */ jsx4(import_developer_studio_ui_react77.Row, { setRowPadding: "8px 0 0 26px", children: /* @__PURE__ */ jsxs2("p", { css: notFoundInfoCss, children: [
|
|
26973
27184
|
"In case of GitHub Installation page returns 404,",
|
|
26974
27185
|
" ",
|
|
26975
27186
|
/* @__PURE__ */ jsx4(
|
|
@@ -27018,11 +27229,11 @@ var import_react_router_dom41 = require("react-router-dom");
|
|
|
27018
27229
|
|
|
27019
27230
|
// src/views/Settings/Integrations/Shopify/Callback.tsx
|
|
27020
27231
|
var import_react177 = require("react");
|
|
27021
|
-
var
|
|
27232
|
+
var import_developer_studio_ui_react78 = require("@livechat/developer-studio-ui-react");
|
|
27022
27233
|
var import_jsx_runtime160 = require("react/jsx-runtime");
|
|
27023
27234
|
var ShopifyCallback = () => {
|
|
27024
27235
|
const { login } = (0, import_react177.useContext)(AuthContext);
|
|
27025
|
-
const match2 = (0,
|
|
27236
|
+
const match2 = (0, import_developer_studio_ui_react78.useMatch)();
|
|
27026
27237
|
const action = match2.params.action;
|
|
27027
27238
|
if (!action) {
|
|
27028
27239
|
throw new Error("Invalid action");
|
|
@@ -27042,14 +27253,14 @@ var import_design_system4 = require("@livechat/design-system");
|
|
|
27042
27253
|
var import_design_system_icons54 = require("@livechat/design-system-icons");
|
|
27043
27254
|
var import_design_system_react_components100 = require("@livechat/design-system-react-components");
|
|
27044
27255
|
var import_developer_studio_api63 = require("@livechat/developer-studio-api");
|
|
27045
|
-
var
|
|
27256
|
+
var import_developer_studio_ui_react79 = require("@livechat/developer-studio-ui-react");
|
|
27046
27257
|
var ShopifyStatus = () => {
|
|
27047
27258
|
var _a;
|
|
27048
27259
|
const {
|
|
27049
27260
|
userData: { user }
|
|
27050
|
-
} = (0,
|
|
27261
|
+
} = (0, import_developer_studio_ui_react79.useRootContext)();
|
|
27051
27262
|
const { login } = (0, import_react178.useContext)(AuthContext);
|
|
27052
|
-
const { context: notifications } = (0,
|
|
27263
|
+
const { context: notifications } = (0, import_developer_studio_ui_react79.useNotifications)();
|
|
27053
27264
|
const credentialsQuery = useFetchShopifyCredentials();
|
|
27054
27265
|
const removeCredentialMutation = useRemoveIntegrationCredential();
|
|
27055
27266
|
const [state, setState] = (0, import_react178.useState)();
|
|
@@ -27276,12 +27487,12 @@ var import_react_router_dom42 = require("react-router-dom");
|
|
|
27276
27487
|
// src/views/Settings/Integrations/Text/Action.tsx
|
|
27277
27488
|
var import_react179 = require("react");
|
|
27278
27489
|
var import_developer_studio_api64 = require("@livechat/developer-studio-api");
|
|
27279
|
-
var
|
|
27490
|
+
var import_developer_studio_ui_react80 = require("@livechat/developer-studio-ui-react");
|
|
27280
27491
|
var import_jsx_runtime163 = require("react/jsx-runtime");
|
|
27281
27492
|
var TextAction = (props) => {
|
|
27282
27493
|
var _a;
|
|
27283
27494
|
const { login } = (0, import_react179.useContext)(AuthContext);
|
|
27284
|
-
const match2 = (0,
|
|
27495
|
+
const match2 = (0, import_developer_studio_ui_react80.useMatch)();
|
|
27285
27496
|
const action = (_a = props.action) != null ? _a : match2.params.action;
|
|
27286
27497
|
if (!action) {
|
|
27287
27498
|
throw new Error("Invalid action");
|
|
@@ -27328,11 +27539,11 @@ var Action_default9 = TextAction;
|
|
|
27328
27539
|
|
|
27329
27540
|
// src/views/Settings/Integrations/Text/Callback.tsx
|
|
27330
27541
|
var import_react180 = require("react");
|
|
27331
|
-
var
|
|
27542
|
+
var import_developer_studio_ui_react81 = require("@livechat/developer-studio-ui-react");
|
|
27332
27543
|
var import_jsx_runtime164 = require("react/jsx-runtime");
|
|
27333
27544
|
var TextCallback = () => {
|
|
27334
27545
|
const { login } = (0, import_react180.useContext)(AuthContext);
|
|
27335
|
-
const match2 = (0,
|
|
27546
|
+
const match2 = (0, import_developer_studio_ui_react81.useMatch)();
|
|
27336
27547
|
const action = match2.params.action;
|
|
27337
27548
|
if (!action) {
|
|
27338
27549
|
throw new Error("Invalid action");
|
|
@@ -27350,11 +27561,11 @@ var Callback_default9 = TextCallback;
|
|
|
27350
27561
|
var import_react181 = require("react");
|
|
27351
27562
|
var import_design_system_react_components101 = require("@livechat/design-system-react-components");
|
|
27352
27563
|
var import_developer_studio_api65 = require("@livechat/developer-studio-api");
|
|
27353
|
-
var
|
|
27564
|
+
var import_developer_studio_ui_react82 = require("@livechat/developer-studio-ui-react");
|
|
27354
27565
|
var TextStatus = () => {
|
|
27355
27566
|
const {
|
|
27356
27567
|
userData: { user }
|
|
27357
|
-
} = (0,
|
|
27568
|
+
} = (0, import_developer_studio_ui_react82.useRootContext)();
|
|
27358
27569
|
const credentialsQuery = useFetchTextCredentials();
|
|
27359
27570
|
const isInstalledQuery = useFetchUserInstalledTextIntegration(user);
|
|
27360
27571
|
const refetch = (0, import_react181.useCallback)(() => {
|
|
@@ -27401,7 +27612,7 @@ var TextStatus = () => {
|
|
|
27401
27612
|
subtitle: `${import_developer_studio_api65.IntegrationDisplayNames.Text} integration`,
|
|
27402
27613
|
header: `${import_developer_studio_api65.IntegrationDisplayNames.Text} integration`,
|
|
27403
27614
|
description: "",
|
|
27404
|
-
icon: /* @__PURE__ */ jsx4(
|
|
27615
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react82.Logo, {}),
|
|
27405
27616
|
dataCy: "text-integration-component",
|
|
27406
27617
|
children: [
|
|
27407
27618
|
/* @__PURE__ */ jsx4(
|
|
@@ -27410,7 +27621,7 @@ var TextStatus = () => {
|
|
|
27410
27621
|
title: "Text Platform | Developer Console",
|
|
27411
27622
|
isConnected: Boolean(authCredential),
|
|
27412
27623
|
isLoading: credentialsQuery.isFetching,
|
|
27413
|
-
icon: /* @__PURE__ */ jsx4(
|
|
27624
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react82.Logo, {}),
|
|
27414
27625
|
status: !credentialsQuery.isFetching && (authCredential == null ? void 0 : authCredential.name) ? /* @__PURE__ */ jsx4(import_react181.Fragment, { children: !isInstalledQuery.isFetching ? getConnectionStatus(isInstalledQuery.data, "install") : void 0 }) : void 0
|
|
27415
27626
|
}
|
|
27416
27627
|
),
|
|
@@ -27445,15 +27656,15 @@ var import_react_router_dom43 = require("react-router-dom");
|
|
|
27445
27656
|
// src/views/Settings/Integrations/Vercel/Action.tsx
|
|
27446
27657
|
var import_react182 = require("react");
|
|
27447
27658
|
var import_developer_studio_api66 = require("@livechat/developer-studio-api");
|
|
27448
|
-
var
|
|
27659
|
+
var import_developer_studio_ui_react83 = require("@livechat/developer-studio-ui-react");
|
|
27449
27660
|
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
27450
27661
|
var VercelAction = (props) => {
|
|
27451
27662
|
var _a;
|
|
27452
27663
|
const {
|
|
27453
27664
|
userData: { user }
|
|
27454
|
-
} = (0,
|
|
27665
|
+
} = (0, import_developer_studio_ui_react83.useRootContext)();
|
|
27455
27666
|
const { login } = (0, import_react182.useContext)(AuthContext);
|
|
27456
|
-
const match2 = (0,
|
|
27667
|
+
const match2 = (0, import_developer_studio_ui_react83.useMatch)();
|
|
27457
27668
|
const action = (_a = props.action) != null ? _a : match2.params.action;
|
|
27458
27669
|
if (!action) {
|
|
27459
27670
|
throw new Error("Invalid action");
|
|
@@ -27544,15 +27755,15 @@ var Action_default10 = VercelAction;
|
|
|
27544
27755
|
|
|
27545
27756
|
// src/views/Settings/Integrations/Vercel/Callback.tsx
|
|
27546
27757
|
var import_react183 = require("react");
|
|
27547
|
-
var
|
|
27758
|
+
var import_developer_studio_ui_react84 = require("@livechat/developer-studio-ui-react");
|
|
27548
27759
|
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
27549
27760
|
var VercelCallback = () => {
|
|
27550
27761
|
const { login } = (0, import_react183.useContext)(AuthContext);
|
|
27551
|
-
const match2 = (0,
|
|
27762
|
+
const match2 = (0, import_developer_studio_ui_react84.useMatch)();
|
|
27552
27763
|
const action = match2.params.action;
|
|
27553
27764
|
const {
|
|
27554
27765
|
userData: { user }
|
|
27555
|
-
} = (0,
|
|
27766
|
+
} = (0, import_developer_studio_ui_react84.useRootContext)();
|
|
27556
27767
|
if (!action) {
|
|
27557
27768
|
throw new Error("Invalid action");
|
|
27558
27769
|
}
|
|
@@ -27570,7 +27781,7 @@ var import_react184 = require("react");
|
|
|
27570
27781
|
var import_design_system_icons55 = require("@livechat/design-system-icons");
|
|
27571
27782
|
var import_design_system_react_components102 = require("@livechat/design-system-react-components");
|
|
27572
27783
|
var import_developer_studio_api69 = require("@livechat/developer-studio-api");
|
|
27573
|
-
var
|
|
27784
|
+
var import_developer_studio_ui_react85 = require("@livechat/developer-studio-ui-react");
|
|
27574
27785
|
|
|
27575
27786
|
// src/hooks/integrations/vercel/credentials.ts
|
|
27576
27787
|
var import_developer_studio_api67 = require("@livechat/developer-studio-api");
|
|
@@ -27594,13 +27805,13 @@ var useFetchVercelCredentials = () => {
|
|
|
27594
27805
|
};
|
|
27595
27806
|
|
|
27596
27807
|
// src/hooks/integrations/vercel/namespace.ts
|
|
27597
|
-
var
|
|
27808
|
+
var import_react_query17 = require("@tanstack/react-query");
|
|
27598
27809
|
var import_developer_studio_api68 = require("@livechat/developer-studio-api");
|
|
27599
27810
|
var vercelNamespacesQueryKeys = {
|
|
27600
27811
|
getInstallations: ["vercel.getNamespaces"]
|
|
27601
27812
|
};
|
|
27602
27813
|
var useFetchVercelNamespaces = (enabled) => {
|
|
27603
|
-
return (0,
|
|
27814
|
+
return (0, import_react_query17.useQuery)(
|
|
27604
27815
|
vercelNamespacesQueryKeys.getInstallations,
|
|
27605
27816
|
() => import_developer_studio_api68.api.integrations.vercel.integrations.getGitNamespaces(),
|
|
27606
27817
|
{
|
|
@@ -27615,9 +27826,9 @@ var VercelStatus = () => {
|
|
|
27615
27826
|
var _a, _b, _c;
|
|
27616
27827
|
const {
|
|
27617
27828
|
userData: { user }
|
|
27618
|
-
} = (0,
|
|
27829
|
+
} = (0, import_developer_studio_ui_react85.useRootContext)();
|
|
27619
27830
|
const { state, login } = (0, import_react184.useContext)(AuthContext);
|
|
27620
|
-
const { context: notifications } = (0,
|
|
27831
|
+
const { context: notifications } = (0, import_developer_studio_ui_react85.useNotifications)();
|
|
27621
27832
|
const removeCredentialMutation = useRemoveIntegrationCredential();
|
|
27622
27833
|
const credentialsQuery = useFetchVercelCredentials();
|
|
27623
27834
|
const namespacesQuery = useFetchVercelNamespaces(
|
|
@@ -27817,7 +28028,7 @@ var VercelStatus = () => {
|
|
|
27817
28028
|
subtitle: `${import_developer_studio_api69.IntegrationDisplayNames.Vercel} integration`,
|
|
27818
28029
|
header: `${import_developer_studio_api69.IntegrationDisplayNames.Vercel} integration`,
|
|
27819
28030
|
description: "Optimize your app deployment with Vercel to enjoy seamless integration, streamlined workflows, and easy collaboration, all without compromising on speed or quality.",
|
|
27820
|
-
icon: /* @__PURE__ */ jsx4(
|
|
28031
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react85.Vercel, {}),
|
|
27821
28032
|
dataCy: "vercel-integration-component",
|
|
27822
28033
|
children: [
|
|
27823
28034
|
/* @__PURE__ */ jsx4(
|
|
@@ -27826,8 +28037,8 @@ var VercelStatus = () => {
|
|
|
27826
28037
|
title: "Text Platform | Developer Console",
|
|
27827
28038
|
isConnected: Boolean(oauthCredential == null ? void 0 : oauthCredential.data.connected),
|
|
27828
28039
|
isLoading: credentialsQuery.isFetching,
|
|
27829
|
-
icon: /* @__PURE__ */ jsx4(
|
|
27830
|
-
action: !(oauthCredential == null ? void 0 : oauthCredential.data.connected) && !credentialsQuery.isFetching ? /* @__PURE__ */ jsx4(Connect, {}) : !credentialsQuery.isFetching ? /* @__PURE__ */ jsxs2(
|
|
28040
|
+
icon: /* @__PURE__ */ jsx4(import_developer_studio_ui_react85.Vercel, {}),
|
|
28041
|
+
action: !(oauthCredential == null ? void 0 : oauthCredential.data.connected) && !credentialsQuery.isFetching ? /* @__PURE__ */ jsx4(Connect, {}) : !credentialsQuery.isFetching ? /* @__PURE__ */ jsxs2(import_developer_studio_ui_react85.Row, { notPadded: true, flexEnd: true, gap: `var(${import_design_system_react_components102.SpacingToken.Spacing2})`, children: [
|
|
27831
28042
|
!namespacesQuery.isFetching && !isInstalled ? /* @__PURE__ */ jsx4(Install, {}) : void 0,
|
|
27832
28043
|
/* @__PURE__ */ jsx4(
|
|
27833
28044
|
import_design_system_react_components102.ActionMenu,
|
|
@@ -27913,7 +28124,7 @@ function IntegrationsSubNavGroup() {
|
|
|
27913
28124
|
const navigate = (0, import_react_router_dom44.useNavigate)();
|
|
27914
28125
|
const {
|
|
27915
28126
|
userData: { user }
|
|
27916
|
-
} = (0,
|
|
28127
|
+
} = (0, import_developer_studio_ui_react86.useRootContext)();
|
|
27917
28128
|
const { data: userHasInstalledWorkflows } = useFetchUserInstalledWorkflows(user);
|
|
27918
28129
|
return /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(
|
|
27919
28130
|
import_design_system_react_components103.SideNavigationGroup,
|
|
@@ -28064,11 +28275,72 @@ function Settings() {
|
|
|
28064
28275
|
] });
|
|
28065
28276
|
}
|
|
28066
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;
|
|
28067
28338
|
// Annotate the CommonJS export names for ESM import in node:
|
|
28068
28339
|
0 && (module.exports = {
|
|
28069
28340
|
AuthContext,
|
|
28070
28341
|
AuthProvider,
|
|
28071
28342
|
Flows,
|
|
28343
|
+
LoginError,
|
|
28072
28344
|
Settings,
|
|
28073
28345
|
SettingsSubNav,
|
|
28074
28346
|
getWorkflowEnv,
|