@wix/cli-app 1.1.96 → 1.1.98
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/build/{AddPermissionCommand-OSMYPJRQ.js → AddPermissionCommand-DYGRTPW3.js} +2 -2
- package/build/{CreateVersionCommand-2SHGYJBX.js → CreateVersionCommand-7U7SHHMS.js} +3 -3
- package/build/{DevCommand-5JBBIYTN.js → DevCommand-XFK47XPN.js} +10 -10
- package/build/{GenerateCommand-XNXCRR5M.js → GenerateCommand-P6JVFBKZ.js} +98 -122
- package/build/GenerateCommand-P6JVFBKZ.js.map +1 -0
- package/build/{LogsCommand-IR3US32Z.js → LogsCommand-NCHV2GN7.js} +3 -3
- package/build/PreviewCommand-Q42SZUIS.js +19 -0
- package/build/ReleaseCommand-ICLGFGPC.js +23 -0
- package/build/{ServeCommand-25RAESBL.js → ServeCommand-I6VZS2YK.js} +3 -3
- package/build/{build-WZPDIQUO.js → build-Z4VNDOIL.js} +6 -6
- package/build/{chunk-DPNHTDEY.js → chunk-DSA62VDV.js} +2 -2
- package/build/chunk-GTPRE7FA.js +182 -0
- package/build/chunk-GTPRE7FA.js.map +1 -0
- package/build/{chunk-HP5V6YH3.js → chunk-HHUDSUDG.js} +6 -6
- package/build/{chunk-TPHNWSDL.js → chunk-HIQCBMWB.js} +2 -2
- package/build/{chunk-HZKLMNE6.js → chunk-JKPPIEED.js} +7 -7
- package/build/{chunk-K7MHL7B4.js → chunk-ONIPG3V2.js} +2 -2
- package/build/{chunk-HDBHL76U.js → chunk-QYBJOKX2.js} +2 -2
- package/build/{chunk-XML6APOZ.js → chunk-RGMFONBO.js} +31 -18
- package/build/{chunk-XML6APOZ.js.map → chunk-RGMFONBO.js.map} +1 -1
- package/build/{chunk-P5TI5KKJ.js → chunk-SVPWVNP3.js} +170 -31
- package/build/{chunk-P5TI5KKJ.js.map → chunk-SVPWVNP3.js.map} +1 -1
- package/build/{chunk-UAA3DCJW.js → chunk-VFINMMGN.js} +2 -2
- package/build/{chunk-JNAB66MG.js → chunk-X67AAT4X.js} +5 -5
- package/build/{chunk-UMW4BAJ4.js → chunk-X76FK2NI.js} +2 -2
- package/build/{chunk-UGSFGYTI.js → chunk-XGQZVXNJ.js} +3 -3
- package/build/{chunk-4U4CHXCF.js → chunk-Z27QYOLS.js} +47 -11
- package/build/{chunk-4U4CHXCF.js.map → chunk-Z27QYOLS.js.map} +1 -1
- package/build/{chunk-LXXN3RII.js → chunk-ZCGI26DD.js} +2 -1
- package/build/chunk-ZCGI26DD.js.map +1 -0
- package/build/{chunk-D4GD3WIF.js → chunk-ZJEKZSOD.js} +2 -2
- package/build/{chunk-BCCHS2DP.js → chunk-ZLQLKGPF.js} +5 -5
- package/build/{chunk-Y3K3I3H6.js → chunk-ZVIUVZJY.js} +6 -6
- package/build/index.js +49 -31
- package/build/index.js.map +1 -1
- package/build/platform-sdk/editor.js +1 -1
- package/build/platform-sdk/editor.js.map +1 -1
- package/build/platform-sdk/site.js +1 -1
- package/build/platform-sdk/site.js.map +1 -1
- package/build/{preview-VLEJXGSK.js → preview-EBGBJIU5.js} +13 -13
- package/build/{release-ZTHOL4AK.js → release-Y6DR4WSP.js} +15 -15
- package/build/{render-command-VVUDPRHR.js → render-command-WEM3G7VN.js} +6 -6
- package/package.json +4 -4
- package/build/GenerateCommand-XNXCRR5M.js.map +0 -1
- package/build/PreviewCommand-2O3ZZZY3.js +0 -19
- package/build/ReleaseCommand-X3OHX4QJ.js +0 -23
- package/build/chunk-LXXN3RII.js.map +0 -1
- package/build/chunk-ZH2F3CQO.js +0 -23
- package/build/chunk-ZH2F3CQO.js.map +0 -1
- /package/build/{AddPermissionCommand-OSMYPJRQ.js.map → AddPermissionCommand-DYGRTPW3.js.map} +0 -0
- /package/build/{CreateVersionCommand-2SHGYJBX.js.map → CreateVersionCommand-7U7SHHMS.js.map} +0 -0
- /package/build/{DevCommand-5JBBIYTN.js.map → DevCommand-XFK47XPN.js.map} +0 -0
- /package/build/{LogsCommand-IR3US32Z.js.map → LogsCommand-NCHV2GN7.js.map} +0 -0
- /package/build/{PreviewCommand-2O3ZZZY3.js.map → PreviewCommand-Q42SZUIS.js.map} +0 -0
- /package/build/{ReleaseCommand-X3OHX4QJ.js.map → ReleaseCommand-ICLGFGPC.js.map} +0 -0
- /package/build/{ServeCommand-25RAESBL.js.map → ServeCommand-I6VZS2YK.js.map} +0 -0
- /package/build/{build-WZPDIQUO.js.map → build-Z4VNDOIL.js.map} +0 -0
- /package/build/{chunk-DPNHTDEY.js.map → chunk-DSA62VDV.js.map} +0 -0
- /package/build/{chunk-HP5V6YH3.js.map → chunk-HHUDSUDG.js.map} +0 -0
- /package/build/{chunk-TPHNWSDL.js.map → chunk-HIQCBMWB.js.map} +0 -0
- /package/build/{chunk-HZKLMNE6.js.map → chunk-JKPPIEED.js.map} +0 -0
- /package/build/{chunk-K7MHL7B4.js.map → chunk-ONIPG3V2.js.map} +0 -0
- /package/build/{chunk-HDBHL76U.js.map → chunk-QYBJOKX2.js.map} +0 -0
- /package/build/{chunk-UAA3DCJW.js.map → chunk-VFINMMGN.js.map} +0 -0
- /package/build/{chunk-JNAB66MG.js.map → chunk-X67AAT4X.js.map} +0 -0
- /package/build/{chunk-UMW4BAJ4.js.map → chunk-X76FK2NI.js.map} +0 -0
- /package/build/{chunk-UGSFGYTI.js.map → chunk-XGQZVXNJ.js.map} +0 -0
- /package/build/{chunk-D4GD3WIF.js.map → chunk-ZJEKZSOD.js.map} +0 -0
- /package/build/{chunk-BCCHS2DP.js.map → chunk-ZLQLKGPF.js.map} +0 -0
- /package/build/{chunk-Y3K3I3H6.js.map → chunk-ZVIUVZJY.js.map} +0 -0
- /package/build/{preview-VLEJXGSK.js.map → preview-EBGBJIU5.js.map} +0 -0
- /package/build/{release-ZTHOL4AK.js.map → release-Y6DR4WSP.js.map} +0 -0
- /package/build/{render-command-VVUDPRHR.js.map → render-command-WEM3G7VN.js.map} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useAsync,
|
|
9
9
|
useDevCenterClient,
|
|
10
10
|
useProjectModel
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SVPWVNP3.js";
|
|
12
12
|
import {
|
|
13
13
|
__toESM,
|
|
14
14
|
init_esm_shims
|
|
@@ -40,4 +40,4 @@ var AddPermissionCommand = ({ permissionId }) => {
|
|
|
40
40
|
export {
|
|
41
41
|
AddPermissionCommand
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=AddPermissionCommand-
|
|
43
|
+
//# sourceMappingURL=AddPermissionCommand-DYGRTPW3.js.map
|
|
@@ -3,14 +3,14 @@ const require = _createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
createPackageManager,
|
|
5
5
|
getRepoType
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X76FK2NI.js";
|
|
7
7
|
import "./chunk-GWE3BRHX.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError,
|
|
10
10
|
CliErrorCode,
|
|
11
11
|
useAsync,
|
|
12
12
|
useProjectModel
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SVPWVNP3.js";
|
|
14
14
|
import {
|
|
15
15
|
init_esm_shims
|
|
16
16
|
} from "./chunk-4EFJZ3GQ.js";
|
|
@@ -42,4 +42,4 @@ var CreateVersionCommandDeprecated = () => {
|
|
|
42
42
|
export {
|
|
43
43
|
CreateVersionCommandDeprecated
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=CreateVersionCommand-
|
|
45
|
+
//# sourceMappingURL=CreateVersionCommand-7U7SHHMS.js.map
|
|
@@ -17,23 +17,23 @@ import {
|
|
|
17
17
|
useResolveDashboardExtensionDevUrl,
|
|
18
18
|
useResolvePlatformDevUrl,
|
|
19
19
|
useSite
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JKPPIEED.js";
|
|
21
21
|
import {
|
|
22
22
|
useWixCliAppBi
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QYBJOKX2.js";
|
|
24
24
|
import {
|
|
25
25
|
useBackendComponents
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-ZJEKZSOD.js";
|
|
27
|
+
import "./chunk-DSA62VDV.js";
|
|
28
28
|
import "./chunk-GWE3BRHX.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-VFINMMGN.js";
|
|
30
30
|
import {
|
|
31
31
|
createLogger
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-HIQCBMWB.js";
|
|
33
33
|
import {
|
|
34
34
|
createCustomElementConfig
|
|
35
|
-
} from "./chunk-
|
|
36
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-RGMFONBO.js";
|
|
36
|
+
import "./chunk-Z27QYOLS.js";
|
|
37
37
|
import {
|
|
38
38
|
Alert,
|
|
39
39
|
Box_default,
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
userConfigSchema,
|
|
79
79
|
writeJson,
|
|
80
80
|
z
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-SVPWVNP3.js";
|
|
82
82
|
import {
|
|
83
83
|
__toESM,
|
|
84
84
|
init_esm_shims
|
|
@@ -1503,4 +1503,4 @@ var DevCommand = ({ https }) => {
|
|
|
1503
1503
|
export {
|
|
1504
1504
|
DevCommand
|
|
1505
1505
|
};
|
|
1506
|
-
//# sourceMappingURL=DevCommand-
|
|
1506
|
+
//# sourceMappingURL=DevCommand-XFK47XPN.js.map
|
|
@@ -3,20 +3,22 @@ const require = _createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
createPackageManager,
|
|
5
5
|
getRepoType
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X76FK2NI.js";
|
|
7
7
|
import {
|
|
8
|
-
createI18nT
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
createI18nT,
|
|
9
|
+
getGenerateFlowByDocsExtensionType,
|
|
10
|
+
useGenerateFlows
|
|
11
|
+
} from "./chunk-GTPRE7FA.js";
|
|
12
|
+
import "./chunk-ZCGI26DD.js";
|
|
11
13
|
import {
|
|
12
14
|
useWixCliAppBi
|
|
13
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QYBJOKX2.js";
|
|
14
16
|
import {
|
|
15
17
|
componentGenerator,
|
|
16
18
|
dependenciesUpdater,
|
|
17
19
|
require_lodash,
|
|
18
20
|
useBackendComponents
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-ZJEKZSOD.js";
|
|
20
22
|
import "./chunk-GWE3BRHX.js";
|
|
21
23
|
import {
|
|
22
24
|
getEcomRequiredApps,
|
|
@@ -33,7 +35,7 @@ import {
|
|
|
33
35
|
require_setToArray,
|
|
34
36
|
require_toSource,
|
|
35
37
|
useExtensionDataClient
|
|
36
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-Z27QYOLS.js";
|
|
37
39
|
import {
|
|
38
40
|
AsyncCallbackStatus,
|
|
39
41
|
BACKEND_DIR,
|
|
@@ -114,7 +116,7 @@ import {
|
|
|
114
116
|
uuidValidation,
|
|
115
117
|
writeJson,
|
|
116
118
|
z
|
|
117
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-SVPWVNP3.js";
|
|
118
120
|
import {
|
|
119
121
|
__commonJS,
|
|
120
122
|
__dirname,
|
|
@@ -703,9 +705,9 @@ var require_nodeUtil = __commonJS({
|
|
|
703
705
|
var freeProcess = moduleExports && freeGlobal.process;
|
|
704
706
|
var nodeUtil = function() {
|
|
705
707
|
try {
|
|
706
|
-
var
|
|
707
|
-
if (
|
|
708
|
-
return
|
|
708
|
+
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
709
|
+
if (types) {
|
|
710
|
+
return types;
|
|
709
711
|
}
|
|
710
712
|
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
711
713
|
} catch (e) {
|
|
@@ -1773,6 +1775,11 @@ var Wizard = ({ steps, name, onPrevStep }) => {
|
|
|
1773
1775
|
const goToPreviousStep = (0, import_react2.useCallback)(() => {
|
|
1774
1776
|
if (hasPreviousStep) {
|
|
1775
1777
|
setActiveStep(activeStep - 1);
|
|
1778
|
+
}
|
|
1779
|
+
if (onPrevStep) {
|
|
1780
|
+
onPrevStep(activeStep - 1);
|
|
1781
|
+
}
|
|
1782
|
+
if (hasPreviousStep || onPrevStep) {
|
|
1776
1783
|
bi.cliStepBack({
|
|
1777
1784
|
additionalInfo: {
|
|
1778
1785
|
activeStep,
|
|
@@ -1780,9 +1787,6 @@ var Wizard = ({ steps, name, onPrevStep }) => {
|
|
|
1780
1787
|
}
|
|
1781
1788
|
});
|
|
1782
1789
|
}
|
|
1783
|
-
if (onPrevStep) {
|
|
1784
|
-
onPrevStep(activeStep - 1);
|
|
1785
|
-
}
|
|
1786
1790
|
}, [activeStep, hasPreviousStep, bi, name, onPrevStep]);
|
|
1787
1791
|
use_input_default(
|
|
1788
1792
|
(_, key) => {
|
|
@@ -4367,14 +4371,54 @@ async function generateWebMethod(projectFolder, folderPath) {
|
|
|
4367
4371
|
init_esm_shims();
|
|
4368
4372
|
var import_react27 = __toESM(require_react(), 1);
|
|
4369
4373
|
import { join as join2 } from "node:path";
|
|
4370
|
-
var SelectApiTypeStep = ({ onSubmit }) => {
|
|
4374
|
+
var SelectApiTypeStep = ({ onSubmit, docsExtensionType }) => {
|
|
4371
4375
|
const { t: t2 } = useTranslation();
|
|
4372
4376
|
const bi = useWixCliAppBi();
|
|
4373
4377
|
const { isActive, goToNextStep } = useWizardStep();
|
|
4378
|
+
const webMethodOption = (0, import_react27.useMemo)(
|
|
4379
|
+
() => ({
|
|
4380
|
+
title: t2("generate_command.api.web_method"),
|
|
4381
|
+
description: t2("generate_command.api.web_method.description"),
|
|
4382
|
+
value: "WebMethod"
|
|
4383
|
+
}),
|
|
4384
|
+
[t2]
|
|
4385
|
+
);
|
|
4386
|
+
const httpFunctionOption = (0, import_react27.useMemo)(
|
|
4387
|
+
() => ({
|
|
4388
|
+
title: t2("generate_command.api.http_function"),
|
|
4389
|
+
description: t2("generate_command.api.http_function.description"),
|
|
4390
|
+
value: "HttpFunction"
|
|
4391
|
+
}),
|
|
4392
|
+
[t2]
|
|
4393
|
+
);
|
|
4394
|
+
const apiOption = (0, import_react27.useMemo)(() => {
|
|
4395
|
+
if (docsExtensionType === "HTTP_FUNCTION") {
|
|
4396
|
+
return InputState.Submitted(httpFunctionOption);
|
|
4397
|
+
}
|
|
4398
|
+
if (docsExtensionType === "WEB_METHOD") {
|
|
4399
|
+
return InputState.Submitted(webMethodOption);
|
|
4400
|
+
}
|
|
4401
|
+
}, [docsExtensionType, httpFunctionOption, webMethodOption]);
|
|
4402
|
+
const handleSubmit = (option) => {
|
|
4403
|
+
bi.cliFlowStepAnswered({
|
|
4404
|
+
question: t2("generate_command.api.choose_type"),
|
|
4405
|
+
questionKey: "generate_command.api.choose_type",
|
|
4406
|
+
answer: option.title,
|
|
4407
|
+
additionalInfo: { extensionType: option.value }
|
|
4408
|
+
});
|
|
4409
|
+
onSubmit(option.value);
|
|
4410
|
+
goToNextStep();
|
|
4411
|
+
};
|
|
4412
|
+
(0, import_react27.useEffect)(() => {
|
|
4413
|
+
if (apiOption) {
|
|
4414
|
+
handleSubmit(apiOption.value);
|
|
4415
|
+
}
|
|
4416
|
+
}, []);
|
|
4374
4417
|
return /* @__PURE__ */ import_react27.default.createElement(
|
|
4375
4418
|
SelectInput,
|
|
4376
4419
|
{
|
|
4377
4420
|
isActive,
|
|
4421
|
+
value: apiOption,
|
|
4378
4422
|
info: /* @__PURE__ */ import_react27.default.createElement(
|
|
4379
4423
|
Trans,
|
|
4380
4424
|
{
|
|
@@ -4383,28 +4427,8 @@ var SelectApiTypeStep = ({ onSubmit }) => {
|
|
|
4383
4427
|
}
|
|
4384
4428
|
),
|
|
4385
4429
|
label: t2("generate_command.api.choose_type"),
|
|
4386
|
-
options: [
|
|
4387
|
-
|
|
4388
|
-
title: t2("generate_command.api.web_method"),
|
|
4389
|
-
description: t2("generate_command.api.web_method.description"),
|
|
4390
|
-
value: "WebMethod"
|
|
4391
|
-
},
|
|
4392
|
-
{
|
|
4393
|
-
title: t2("generate_command.api.http_function"),
|
|
4394
|
-
description: t2("generate_command.api.http_function.description"),
|
|
4395
|
-
value: "HttpFunction"
|
|
4396
|
-
}
|
|
4397
|
-
],
|
|
4398
|
-
onSubmit: (option) => {
|
|
4399
|
-
bi.cliFlowStepAnswered({
|
|
4400
|
-
question: t2("generate_command.api.choose_type"),
|
|
4401
|
-
questionKey: "generate_command.api.choose_type",
|
|
4402
|
-
answer: option.title,
|
|
4403
|
-
additionalInfo: { extensionType: option.value }
|
|
4404
|
-
});
|
|
4405
|
-
onSubmit(option.value);
|
|
4406
|
-
goToNextStep();
|
|
4407
|
-
}
|
|
4430
|
+
options: [webMethodOption, httpFunctionOption],
|
|
4431
|
+
onSubmit: handleSubmit
|
|
4408
4432
|
}
|
|
4409
4433
|
);
|
|
4410
4434
|
};
|
|
@@ -4481,9 +4505,10 @@ var WebMethodFolderStep = ({ onSubmit }) => {
|
|
|
4481
4505
|
};
|
|
4482
4506
|
|
|
4483
4507
|
// src/components/GenerateCommand/api/Api.tsx
|
|
4484
|
-
var useGenerateApi = () => {
|
|
4508
|
+
var useGenerateApi = (docsExtensionType) => {
|
|
4485
4509
|
const { t: t2 } = useTranslation();
|
|
4486
4510
|
const { model } = useProjectModel();
|
|
4511
|
+
const [selectedDocsExtensionType, setSelectedDocsExtensionType] = (0, import_react28.useState)(() => docsExtensionType);
|
|
4487
4512
|
const [apiType, setApiType] = (0, import_react28.useState)();
|
|
4488
4513
|
const [apiFolder, setApiFolder] = (0, import_react28.useState)();
|
|
4489
4514
|
const extensionType = apiType === "HttpFunction" ? t2("generate_command.flow.api.title").toLowerCase() : t2("generate_command.api.web_method.title").toLowerCase();
|
|
@@ -4498,7 +4523,16 @@ var useGenerateApi = () => {
|
|
|
4498
4523
|
}
|
|
4499
4524
|
}, [model.projectFolder, apiFolder]);
|
|
4500
4525
|
return [
|
|
4501
|
-
/* @__PURE__ */ import_react28.default.createElement(
|
|
4526
|
+
/* @__PURE__ */ import_react28.default.createElement(
|
|
4527
|
+
SelectApiTypeStep,
|
|
4528
|
+
{
|
|
4529
|
+
docsExtensionType: selectedDocsExtensionType,
|
|
4530
|
+
onSubmit: (value) => {
|
|
4531
|
+
setApiType(value);
|
|
4532
|
+
setSelectedDocsExtensionType(void 0);
|
|
4533
|
+
}
|
|
4534
|
+
}
|
|
4535
|
+
),
|
|
4502
4536
|
apiType === "HttpFunction" ? /* @__PURE__ */ import_react28.default.createElement(ApiFolderStep, { onSubmit: setApiFolder }) : /* @__PURE__ */ import_react28.default.createElement(WebMethodFolderStep, { onSubmit: setApiFolder }),
|
|
4503
4537
|
/* @__PURE__ */ import_react28.default.createElement(
|
|
4504
4538
|
CompleteGeneration,
|
|
@@ -5059,106 +5093,48 @@ var useGenerateSiteWidget = () => {
|
|
|
5059
5093
|
};
|
|
5060
5094
|
|
|
5061
5095
|
// src/components/GenerateCommand/GenerateCommand.tsx
|
|
5062
|
-
var
|
|
5063
|
-
|
|
5096
|
+
var GenerateCommand = ({
|
|
5097
|
+
docsExtensionType
|
|
5098
|
+
}) => {
|
|
5064
5099
|
const { t: t2 } = useTranslation();
|
|
5065
5100
|
const bi = useWixCliAppBi();
|
|
5066
5101
|
const dashboardPageSteps = useGenerateDashboardPage();
|
|
5067
5102
|
const dashboardModalSteps = useGenerateDashboardModal();
|
|
5068
|
-
const apiSteps = useGenerateApi();
|
|
5103
|
+
const apiSteps = useGenerateApi(docsExtensionType);
|
|
5069
5104
|
const generateEventsSteps = useGenerateEvent();
|
|
5070
5105
|
const generateServicePluginSteps = useGenerateServicePlugin();
|
|
5071
5106
|
const generateEmbeddedScriptSteps = useGenerateEmbeddedScript();
|
|
5072
5107
|
const generateSidebarCategorySteps = useGenerateSidebarCategory();
|
|
5073
5108
|
const generateSiteWidgetSteps = useGenerateSiteWidget();
|
|
5074
|
-
const
|
|
5075
|
-
const generateFlows = (0, import_react36.useMemo)(
|
|
5076
|
-
() => [
|
|
5077
|
-
{
|
|
5078
|
-
title: t2("generate_command.flow.dashboard_category"),
|
|
5079
|
-
items: [
|
|
5080
|
-
// Uncomment after SidebarCategory is open to public
|
|
5081
|
-
// {
|
|
5082
|
-
// key: 'sidebar-category',
|
|
5083
|
-
// title: t('generate_command.flow.sidebar_category'),
|
|
5084
|
-
// value: DevCenterGenerateFlow.DashboardSidebarCategory(),
|
|
5085
|
-
// },
|
|
5086
|
-
{
|
|
5087
|
-
key: "dashboard-page",
|
|
5088
|
-
title: t2("generate_command.flow.dashboard_page"),
|
|
5089
|
-
value: DevCenterGenerateFlow.DashboardPage()
|
|
5090
|
-
},
|
|
5091
|
-
{
|
|
5092
|
-
key: "dashboard-modal",
|
|
5093
|
-
title: t2("generate_command.flow.dashboard_modal"),
|
|
5094
|
-
value: DevCenterGenerateFlow.DashboardModal()
|
|
5095
|
-
},
|
|
5096
|
-
{
|
|
5097
|
-
key: "dashboard-plugin",
|
|
5098
|
-
title: t2("generate_command.flow.dashboard_plugin"),
|
|
5099
|
-
value: DevCenterGenerateFlow.DashboardPlugin()
|
|
5100
|
-
},
|
|
5101
|
-
{
|
|
5102
|
-
key: "dashboard-menu-plugin",
|
|
5103
|
-
title: t2("generate_command.flow.dashboard_menu_plugin"),
|
|
5104
|
-
value: DevCenterGenerateFlow.DashboardMenuPlugin()
|
|
5105
|
-
}
|
|
5106
|
-
]
|
|
5107
|
-
},
|
|
5108
|
-
{
|
|
5109
|
-
title: t2("generate_command.flow.site_category"),
|
|
5110
|
-
items: [
|
|
5111
|
-
{
|
|
5112
|
-
key: "custom-element",
|
|
5113
|
-
title: t2("generate_command.flow.custom_element"),
|
|
5114
|
-
value: DevCenterGenerateFlow.CustomElement()
|
|
5115
|
-
},
|
|
5116
|
-
{
|
|
5117
|
-
key: "embedded-script",
|
|
5118
|
-
title: t2("generate_command.flow.embedded_script"),
|
|
5119
|
-
value: DevCenterGenerateFlow.EmbeddedScript()
|
|
5120
|
-
},
|
|
5121
|
-
{
|
|
5122
|
-
key: "site-plugin",
|
|
5123
|
-
title: t2("generate_command.flow.site_plugin"),
|
|
5124
|
-
value: DevCenterGenerateFlow.SitePlugin()
|
|
5125
|
-
}
|
|
5126
|
-
]
|
|
5127
|
-
},
|
|
5128
|
-
{
|
|
5129
|
-
title: t2("generate_command.flow.backend_category"),
|
|
5130
|
-
items: [
|
|
5131
|
-
{
|
|
5132
|
-
key: "api",
|
|
5133
|
-
title: t2("generate_command.flow.api.title"),
|
|
5134
|
-
value: DevCenterGenerateFlow.Api()
|
|
5135
|
-
},
|
|
5136
|
-
{
|
|
5137
|
-
key: "event",
|
|
5138
|
-
title: t2("generate_command.flow.event"),
|
|
5139
|
-
value: DevCenterGenerateFlow.Event()
|
|
5140
|
-
},
|
|
5141
|
-
{
|
|
5142
|
-
key: "service-plugin",
|
|
5143
|
-
title: t2("generate_command.flow.service_plugin"),
|
|
5144
|
-
value: DevCenterGenerateFlow.ServicePlugin()
|
|
5145
|
-
}
|
|
5146
|
-
]
|
|
5147
|
-
}
|
|
5148
|
-
],
|
|
5149
|
-
[t2]
|
|
5150
|
-
);
|
|
5151
|
-
const selectFlow = (0, import_react36.useCallback)(
|
|
5109
|
+
const biCliFlowStepAnswered = (0, import_react36.useCallback)(
|
|
5152
5110
|
(selectedType) => {
|
|
5153
5111
|
bi.cliFlowStepAnswered({
|
|
5154
5112
|
question: t2("generate_command.flow.choose_flow"),
|
|
5155
5113
|
questionKey: "generate_command.flow.choose_flow",
|
|
5156
5114
|
answer: selectedType.title
|
|
5157
5115
|
});
|
|
5158
|
-
setGenerateFlow(selectedType);
|
|
5159
5116
|
},
|
|
5160
5117
|
[bi, t2]
|
|
5161
5118
|
);
|
|
5119
|
+
const [generateFlow, setGenerateFlow] = (0, import_react36.useState)(() => {
|
|
5120
|
+
if (docsExtensionType) {
|
|
5121
|
+
const selectedType = getGenerateFlowByDocsExtensionType(
|
|
5122
|
+
docsExtensionType,
|
|
5123
|
+
t2
|
|
5124
|
+
);
|
|
5125
|
+
biCliFlowStepAnswered(selectedType);
|
|
5126
|
+
return selectedType;
|
|
5127
|
+
}
|
|
5128
|
+
return;
|
|
5129
|
+
});
|
|
5130
|
+
const generateFlows = useGenerateFlows();
|
|
5131
|
+
const selectFlow = (0, import_react36.useCallback)(
|
|
5132
|
+
(selectedType) => {
|
|
5133
|
+
biCliFlowStepAnswered(selectedType);
|
|
5134
|
+
setGenerateFlow(selectedType);
|
|
5135
|
+
},
|
|
5136
|
+
[biCliFlowStepAnswered]
|
|
5137
|
+
);
|
|
5162
5138
|
const handlePrevStep = (stepIdx) => {
|
|
5163
5139
|
if (stepIdx < 0) {
|
|
5164
5140
|
setGenerateFlow(void 0);
|
|
@@ -5250,4 +5226,4 @@ var GenerateCommand = () => {
|
|
|
5250
5226
|
export {
|
|
5251
5227
|
GenerateCommand
|
|
5252
5228
|
};
|
|
5253
|
-
//# sourceMappingURL=GenerateCommand-
|
|
5229
|
+
//# sourceMappingURL=GenerateCommand-P6JVFBKZ.js.map
|