@wix/cli-app 1.1.60 → 1.1.61
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/{CreateVersionCommand-Z6F5IKH5.js → CreateVersionCommand-27X5XRUT.js} +14 -14
- package/build/{DevCommand-YFEZ4QV5.js → DevCommand-6HTMGZ2M.js} +12 -12
- package/build/{GenerateCommand-KCV4YDNN.js → GenerateCommand-7IAUS6BH.js} +105 -41
- package/build/{GenerateCommand-KCV4YDNN.js.map → GenerateCommand-7IAUS6BH.js.map} +1 -1
- package/build/{LogsCommand-VBMGVYNU.js → LogsCommand-WPUUN3JU.js} +4 -4
- package/build/PreviewCommand-CU46IAJE.js +23 -0
- package/build/{ReleaseCommand-5F3FPBXT.js → ReleaseCommand-KTVVW67B.js} +14 -14
- package/build/{ServeCommand-G4FF4PT3.js → ServeCommand-LXJK73IU.js} +13 -13
- package/build/{build-XZI3USNB.js → build-KOJIDD4M.js} +38 -9
- package/build/build-KOJIDD4M.js.map +1 -0
- package/build/{chunk-HUWYF2ET.js → chunk-2GCKBITG.js} +8 -8
- package/build/{chunk-O42QDBJU.js → chunk-63EMUDZG.js} +3 -3
- package/build/{chunk-5QZS3HT7.js → chunk-A3UPTTKJ.js} +3 -3
- package/build/{chunk-WRWNJYKZ.js → chunk-EL6CIFIN.js} +3 -3
- package/build/{chunk-QVGYU6D4.js → chunk-ELYFHAX6.js} +5 -2
- package/build/chunk-ELYFHAX6.js.map +1 -0
- package/build/{chunk-4VTDNX5T.js → chunk-IL6O6OIL.js} +2 -2
- package/build/{chunk-VXE3IWKR.js → chunk-KJF6LWGQ.js} +2 -2
- package/build/{chunk-WRPV7SLY.js → chunk-KJRYBTZB.js} +192 -19
- package/build/chunk-KJRYBTZB.js.map +1 -0
- package/build/{chunk-PKSGXFYA.js → chunk-LOLULZLU.js} +3 -3
- package/build/{chunk-IG6IV6VM.js → chunk-MEDHLZDL.js} +3 -3
- package/build/{chunk-DGTJGIY2.js → chunk-MKPZBVQD.js} +213 -27
- package/build/{chunk-DGTJGIY2.js.map → chunk-MKPZBVQD.js.map} +1 -1
- package/build/{chunk-2PTCXTKF.js → chunk-OHF42SKC.js} +5 -5
- package/build/{chunk-CNZ3Q5PF.js → chunk-PBUNWOQL.js} +7 -7
- package/build/chunk-PBUNWOQL.js.map +1 -0
- package/build/{chunk-7CGRTCDC.js → chunk-S7UPYDTK.js} +3 -3
- package/build/chunk-SJY44CC7.js +19161 -0
- package/build/chunk-SJY44CC7.js.map +1 -0
- package/build/{chunk-VZJZSWRE.js → chunk-XBBIROHO.js} +3 -3
- package/build/{chunk-36W5H7IG.js → chunk-XCKLCHGL.js} +188 -174
- package/build/chunk-XCKLCHGL.js.map +1 -0
- package/build/{chunk-USAOCISL.js → chunk-Z7MEHVBF.js} +3 -3
- package/build/cloudflare-runtime/entry.js +7158 -53
- package/build/cloudflare-runtime/getRegisteredExtensions.js +7096 -16
- package/build/index.js +20 -20
- package/build/platform-sdk/chunk-BGTZ3RNN.js +2 -0
- package/build/platform-sdk/chunk-BGTZ3RNN.js.map +1 -0
- package/build/platform-sdk/{chunk-QV4VBCJB.js → chunk-FWUYJ3UR.js} +2 -2
- package/build/platform-sdk/chunk-NAPHVUFM.js +2 -0
- package/build/platform-sdk/{chunk-42XIZ4MH.js.map → chunk-NAPHVUFM.js.map} +1 -1
- package/build/platform-sdk/{chunk-EERHWVVD.js → chunk-XYIDODIB.js} +2 -2
- package/build/platform-sdk/dashboard.js +1 -1
- package/build/platform-sdk/dashboard.js.map +1 -1
- package/build/platform-sdk/editor.js +2 -2
- package/build/platform-sdk/editor.js.map +1 -1
- package/build/platform-sdk/sdk-context.js +1 -1
- package/build/platform-sdk/sdk-context.js.map +1 -1
- package/build/platform-sdk/site.js +1 -1
- package/build/platform-sdk/site.js.map +1 -1
- package/build/platform-sdk/web-methods.js +1 -1
- package/build/platform-sdk/web-methods.js.map +1 -1
- package/build/{preview-VAHHFTRZ.js → preview-YEREVN42.js} +12 -12
- package/build/{render-command-3AYSQXHN.js → render-command-H5DHMFOD.js} +6 -6
- package/package.json +7 -5
- package/schemas/custom-element.json +1 -1
- package/templates/custom-element/files/element.module.css.ejs +18 -5
- package/templates/custom-element/files/element.tsx.ejs +8 -5
- package/templates/custom-element/files/panel.tsx.ejs +25 -12
- package/templates/web-method/files/placeholder.ts.ejs +1 -1
- package/build/PreviewCommand-3OMHWDW6.js +0 -23
- package/build/build-XZI3USNB.js.map +0 -1
- package/build/chunk-36W5H7IG.js.map +0 -1
- package/build/chunk-CNZ3Q5PF.js.map +0 -1
- package/build/chunk-FTC5AK3Y.js +0 -1367
- package/build/chunk-FTC5AK3Y.js.map +0 -1
- package/build/chunk-QVGYU6D4.js.map +0 -1
- package/build/chunk-WRPV7SLY.js.map +0 -1
- package/build/platform-sdk/chunk-42XIZ4MH.js +0 -2
- /package/build/{CreateVersionCommand-Z6F5IKH5.js.map → CreateVersionCommand-27X5XRUT.js.map} +0 -0
- /package/build/{DevCommand-YFEZ4QV5.js.map → DevCommand-6HTMGZ2M.js.map} +0 -0
- /package/build/{LogsCommand-VBMGVYNU.js.map → LogsCommand-WPUUN3JU.js.map} +0 -0
- /package/build/{PreviewCommand-3OMHWDW6.js.map → PreviewCommand-CU46IAJE.js.map} +0 -0
- /package/build/{ReleaseCommand-5F3FPBXT.js.map → ReleaseCommand-KTVVW67B.js.map} +0 -0
- /package/build/{ServeCommand-G4FF4PT3.js.map → ServeCommand-LXJK73IU.js.map} +0 -0
- /package/build/{chunk-HUWYF2ET.js.map → chunk-2GCKBITG.js.map} +0 -0
- /package/build/{chunk-O42QDBJU.js.map → chunk-63EMUDZG.js.map} +0 -0
- /package/build/{chunk-5QZS3HT7.js.map → chunk-A3UPTTKJ.js.map} +0 -0
- /package/build/{chunk-WRWNJYKZ.js.map → chunk-EL6CIFIN.js.map} +0 -0
- /package/build/{chunk-4VTDNX5T.js.map → chunk-IL6O6OIL.js.map} +0 -0
- /package/build/{chunk-VXE3IWKR.js.map → chunk-KJF6LWGQ.js.map} +0 -0
- /package/build/{chunk-PKSGXFYA.js.map → chunk-LOLULZLU.js.map} +0 -0
- /package/build/{chunk-IG6IV6VM.js.map → chunk-MEDHLZDL.js.map} +0 -0
- /package/build/{chunk-2PTCXTKF.js.map → chunk-OHF42SKC.js.map} +0 -0
- /package/build/{chunk-7CGRTCDC.js.map → chunk-S7UPYDTK.js.map} +0 -0
- /package/build/{chunk-VZJZSWRE.js.map → chunk-XBBIROHO.js.map} +0 -0
- /package/build/{chunk-USAOCISL.js.map → chunk-Z7MEHVBF.js.map} +0 -0
- /package/build/platform-sdk/{chunk-QV4VBCJB.js.map → chunk-FWUYJ3UR.js.map} +0 -0
- /package/build/platform-sdk/{chunk-EERHWVVD.js.map → chunk-XYIDODIB.js.map} +0 -0
- /package/build/{preview-VAHHFTRZ.js.map → preview-YEREVN42.js.map} +0 -0
- /package/build/{render-command-3AYSQXHN.js.map → render-command-H5DHMFOD.js.map} +0 -0
|
@@ -11518,7 +11518,7 @@ var init_tslib_es6 = __esm({
|
|
|
11518
11518
|
});
|
|
11519
11519
|
|
|
11520
11520
|
// package.json
|
|
11521
|
-
var version = "1.1.
|
|
11521
|
+
var version = "1.1.61";
|
|
11522
11522
|
|
|
11523
11523
|
// ../cli-error/src/cli-error.ts
|
|
11524
11524
|
init_esm_shims();
|
|
@@ -11574,12 +11574,14 @@ var CliSystemErrorCode = (0, import_variant.variant)({
|
|
|
11574
11574
|
FailedToGetAppSecret: {},
|
|
11575
11575
|
FailedToCreateTunnel: {},
|
|
11576
11576
|
FailedToDeleteTunnel: {},
|
|
11577
|
+
FailedToGetBlocksExtensionsData: {},
|
|
11577
11578
|
GridAppFailedToUpdateFiles: {},
|
|
11578
11579
|
FailedToCreateGridApp: (0, import_variant.fields)(),
|
|
11579
11580
|
InvalidResponseData: {},
|
|
11580
11581
|
InvalidCreateAppResponse: {},
|
|
11581
11582
|
InvalidDeployAppResponse: {},
|
|
11582
11583
|
InvalidGetDeploymentResponse: {},
|
|
11584
|
+
InvalidGetDeploymentPipelineDescriptionResponse: {},
|
|
11583
11585
|
FailedToGetPagesDiff: {},
|
|
11584
11586
|
InvalidViteBuildOutput: {},
|
|
11585
11587
|
ViteModuleBundleNotFound: {},
|
|
@@ -11602,6 +11604,7 @@ var CliSystemErrorCode = (0, import_variant.variant)({
|
|
|
11602
11604
|
FailedToQuerySites: {},
|
|
11603
11605
|
FailedToGetSite: {},
|
|
11604
11606
|
FailedToDeploySite: {},
|
|
11607
|
+
FailedToDeploySitePreview: {},
|
|
11605
11608
|
FailedToPublishDeployment: {},
|
|
11606
11609
|
FailedToMarkDeploymentAsPermanent: {},
|
|
11607
11610
|
FailedToCheckIfAppInstalled: {},
|
|
@@ -11617,7 +11620,7 @@ var CliSystemErrorCode = (0, import_variant.variant)({
|
|
|
11617
11620
|
FailedToFetchPackageDetails: {},
|
|
11618
11621
|
FailedToCreateSiteOverride: {},
|
|
11619
11622
|
FailedToGetDeploymentStatus: {},
|
|
11620
|
-
|
|
11623
|
+
FailedToGetDeploymentPipelineDescription: {},
|
|
11621
11624
|
FailedToGenerateAppMarketQueryParam: {},
|
|
11622
11625
|
InvalidDependenciesJsonSchemaError: (0, import_variant.fields)(),
|
|
11623
11626
|
FailedToParseLog: {},
|
|
@@ -11637,7 +11640,8 @@ var CliSystemErrorCode = (0, import_variant.variant)({
|
|
|
11637
11640
|
FailedToCreateVeloApp: {},
|
|
11638
11641
|
FailedToUpdateVeloAppFiles: {},
|
|
11639
11642
|
FailedToGetFilesFromVelo: {},
|
|
11640
|
-
FailedToSyncPagesTypes: {}
|
|
11643
|
+
FailedToSyncPagesTypes: {},
|
|
11644
|
+
FailedToDeployDocument: {}
|
|
11641
11645
|
});
|
|
11642
11646
|
var CliUserErrorCode = (0, import_variant.variant)({
|
|
11643
11647
|
LatestVersionOfCreateAppRequired: (0, import_variant.fields)(),
|
|
@@ -11730,7 +11734,9 @@ var CliUserErrorCode = (0, import_variant.variant)({
|
|
|
11730
11734
|
FailedToCreateIntellisenseAdapter: {},
|
|
11731
11735
|
FailedToInitIntellisenseAdapterTypes: {},
|
|
11732
11736
|
FailedToUpdateIntellisenseAdapterTypes: {},
|
|
11733
|
-
WebMethodOutsideOfProjectDirectory: (0, import_variant.fields)()
|
|
11737
|
+
WebMethodOutsideOfProjectDirectory: (0, import_variant.fields)(),
|
|
11738
|
+
FailedToEvalBackendExtension: (0, import_variant.fields)(),
|
|
11739
|
+
DeploymentPipelineFailed: (0, import_variant.fields)()
|
|
11734
11740
|
});
|
|
11735
11741
|
var CliErrorCode = (0, import_variant.variant)({
|
|
11736
11742
|
...CliSystemErrorCode,
|
|
@@ -20642,13 +20648,13 @@ var testOverridesSchema = z.object({
|
|
|
20642
20648
|
devEditorBaseUrl: z.string().url().optional(),
|
|
20643
20649
|
inkDebug: z.boolean().optional(),
|
|
20644
20650
|
minRetryTimeout: z.number().optional(),
|
|
20651
|
+
pollInterval: z.number().optional(),
|
|
20645
20652
|
debounceQueueWait: z.number().optional(),
|
|
20646
20653
|
sentryDsn: z.string().optional(),
|
|
20647
20654
|
userBrowserTestEndpoint: z.string().url().optional(),
|
|
20648
20655
|
dataDir: z.string().optional(),
|
|
20649
20656
|
wixCliDependencyVersion: z.string().optional(),
|
|
20650
20657
|
wixCliAppDependencyVersion: z.string().optional(),
|
|
20651
|
-
appInstallationPollInterval: z.number().optional(),
|
|
20652
20658
|
disableTTY: z.boolean().optional(),
|
|
20653
20659
|
waitForLoginInterval: z.number().optional(),
|
|
20654
20660
|
registryUrl: z.string().optional(),
|
|
@@ -20790,7 +20796,7 @@ init_esm_shims();
|
|
|
20790
20796
|
|
|
20791
20797
|
// ../cli-ui-kit/src/components/ConfirmInput/ConfirmInput.tsx
|
|
20792
20798
|
init_esm_shims();
|
|
20793
|
-
var
|
|
20799
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
20794
20800
|
var import_variant6 = __toESM(require_lib(), 1);
|
|
20795
20801
|
|
|
20796
20802
|
// ../cli-ui-kit/src/components/Text.tsx
|
|
@@ -20837,7 +20843,7 @@ var InputState = (0, import_variant4.variant)(
|
|
|
20837
20843
|
|
|
20838
20844
|
// ../cli-ui-kit/src/components/InputLabel.tsx
|
|
20839
20845
|
init_esm_shims();
|
|
20840
|
-
var
|
|
20846
|
+
var import_react35 = __toESM(require_react(), 1);
|
|
20841
20847
|
|
|
20842
20848
|
// ../cli-ui-kit/src/icons/index.ts
|
|
20843
20849
|
init_esm_shims();
|
|
@@ -20916,36 +20922,43 @@ var InsightIcon = () => {
|
|
|
20916
20922
|
return /* @__PURE__ */ import_react33.default.createElement(Text2, null, isUnicodeSupported() ? "\u{1F4A1}" : "!");
|
|
20917
20923
|
};
|
|
20918
20924
|
|
|
20925
|
+
// ../cli-ui-kit/src/icons/Learn.tsx
|
|
20926
|
+
init_esm_shims();
|
|
20927
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
20928
|
+
var Learn = () => {
|
|
20929
|
+
return /* @__PURE__ */ import_react34.default.createElement(Text2, null, isUnicodeSupported() ? "\u{1F4DA}" : ">");
|
|
20930
|
+
};
|
|
20931
|
+
|
|
20919
20932
|
// ../cli-ui-kit/src/components/InputLabel.tsx
|
|
20920
20933
|
var InputLabel = ({ children, icon }) => {
|
|
20921
|
-
return /* @__PURE__ */
|
|
20934
|
+
return /* @__PURE__ */ import_react35.default.createElement(Text2, null, icon ?? /* @__PURE__ */ import_react35.default.createElement(Text2, { skin: "question", bold: true }, /* @__PURE__ */ import_react35.default.createElement(QuestionMarkIcon, null)), " ", /* @__PURE__ */ import_react35.default.createElement(Text2, { skin: "question", bold: true }, children));
|
|
20922
20935
|
};
|
|
20923
20936
|
|
|
20924
20937
|
// ../cli-ui-kit/src/components/ConfirmInput/Placeholder.tsx
|
|
20925
20938
|
init_esm_shims();
|
|
20926
|
-
var
|
|
20939
|
+
var import_react36 = __toESM(require_react(), 1);
|
|
20927
20940
|
var import_variant5 = __toESM(require_lib(), 1);
|
|
20928
20941
|
var Placeholder = ({ inputState }) => {
|
|
20929
20942
|
return (0, import_variant5.match)(inputState, {
|
|
20930
|
-
NotSubmitted: ({ value: value2 }) => /* @__PURE__ */
|
|
20931
|
-
Submitted: ({ value: value2 }) => /* @__PURE__ */
|
|
20943
|
+
NotSubmitted: ({ value: value2 }) => /* @__PURE__ */ import_react36.default.createElement(Text2, { skin: "secondary" }, "(", value2 ? "Y/n" : "y/N", ")"),
|
|
20944
|
+
Submitted: ({ value: value2 }) => /* @__PURE__ */ import_react36.default.createElement(Text2, null, value2 ? "Yes" : "No")
|
|
20932
20945
|
});
|
|
20933
20946
|
};
|
|
20934
20947
|
|
|
20935
20948
|
// ../cli-ui-kit/src/components/ConfirmInput/Input.tsx
|
|
20936
20949
|
init_esm_shims();
|
|
20937
|
-
var
|
|
20950
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
20938
20951
|
|
|
20939
20952
|
// ../../node_modules/ink-text-input/build/index.js
|
|
20940
20953
|
init_esm_shims();
|
|
20941
|
-
var
|
|
20954
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
20942
20955
|
function TextInput({ value: originalValue, placeholder = "", focus = true, mask, highlightPastedText = false, showCursor = true, onChange, onSubmit }) {
|
|
20943
|
-
const [state, setState] = (0,
|
|
20956
|
+
const [state, setState] = (0, import_react37.useState)({
|
|
20944
20957
|
cursorOffset: (originalValue || "").length,
|
|
20945
20958
|
cursorWidth: 0
|
|
20946
20959
|
});
|
|
20947
20960
|
const { cursorOffset, cursorWidth } = state;
|
|
20948
|
-
(0,
|
|
20961
|
+
(0, import_react37.useEffect)(() => {
|
|
20949
20962
|
setState((previousState) => {
|
|
20950
20963
|
if (!focus || !showCursor) {
|
|
20951
20964
|
return previousState;
|
|
@@ -21023,13 +21036,13 @@ function TextInput({ value: originalValue, placeholder = "", focus = true, mask,
|
|
|
21023
21036
|
onChange(nextValue);
|
|
21024
21037
|
}
|
|
21025
21038
|
}, { isActive: focus });
|
|
21026
|
-
return
|
|
21039
|
+
return import_react37.default.createElement(Text, null, placeholder ? value2.length > 0 ? renderedValue : renderedPlaceholder : renderedValue);
|
|
21027
21040
|
}
|
|
21028
21041
|
var build_default = TextInput;
|
|
21029
21042
|
|
|
21030
21043
|
// ../cli-ui-kit/src/components/ConfirmInput/Input.tsx
|
|
21031
21044
|
var Input = ({ initialValue, onSubmit }) => {
|
|
21032
|
-
const handleChange = (0,
|
|
21045
|
+
const handleChange = (0, import_react38.useCallback)(
|
|
21033
21046
|
(rawKey) => {
|
|
21034
21047
|
const key = rawKey.toLowerCase();
|
|
21035
21048
|
if (["y", "n"].includes(key)) {
|
|
@@ -21038,7 +21051,7 @@ var Input = ({ initialValue, onSubmit }) => {
|
|
|
21038
21051
|
},
|
|
21039
21052
|
[onSubmit]
|
|
21040
21053
|
);
|
|
21041
|
-
return /* @__PURE__ */
|
|
21054
|
+
return /* @__PURE__ */ import_react38.default.createElement(
|
|
21042
21055
|
build_default,
|
|
21043
21056
|
{
|
|
21044
21057
|
value: "",
|
|
@@ -21056,17 +21069,17 @@ var ConfirmInput = ({
|
|
|
21056
21069
|
initialValue = true,
|
|
21057
21070
|
onSubmit
|
|
21058
21071
|
}) => {
|
|
21059
|
-
const [inputState, setInputState] = (0,
|
|
21072
|
+
const [inputState, setInputState] = (0, import_react39.useState)(
|
|
21060
21073
|
() => InputState.NotSubmitted(initialValue)
|
|
21061
21074
|
);
|
|
21062
|
-
const handleSubmit = (0,
|
|
21075
|
+
const handleSubmit = (0, import_react39.useCallback)(
|
|
21063
21076
|
(value2) => {
|
|
21064
21077
|
setInputState(InputState.Submitted(value2));
|
|
21065
21078
|
onSubmit(value2);
|
|
21066
21079
|
},
|
|
21067
21080
|
[onSubmit]
|
|
21068
21081
|
);
|
|
21069
|
-
return /* @__PURE__ */
|
|
21082
|
+
return /* @__PURE__ */ import_react39.default.createElement(Text2, null, /* @__PURE__ */ import_react39.default.createElement(InputLabel, null, label), " ", info && (0, import_variant6.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react39.default.createElement(Text2, { skin: "secondary" }, info, " "), /* @__PURE__ */ import_react39.default.createElement(Placeholder, { inputState }), (0, import_variant6.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react39.default.createElement(Input, { initialValue, onSubmit: handleSubmit }));
|
|
21070
21083
|
};
|
|
21071
21084
|
|
|
21072
21085
|
// ../cli-ui-kit/src/components/SelectInput/index.ts
|
|
@@ -21074,7 +21087,7 @@ init_esm_shims();
|
|
|
21074
21087
|
|
|
21075
21088
|
// ../cli-ui-kit/src/components/SelectInput/SelectInput.tsx
|
|
21076
21089
|
init_esm_shims();
|
|
21077
|
-
var
|
|
21090
|
+
var import_react46 = __toESM(require_react(), 1);
|
|
21078
21091
|
var import_variant10 = __toESM(require_lib(), 1);
|
|
21079
21092
|
|
|
21080
21093
|
// ../../node_modules/ink-select-input/build/index.js
|
|
@@ -21082,7 +21095,7 @@ init_esm_shims();
|
|
|
21082
21095
|
|
|
21083
21096
|
// ../../node_modules/ink-select-input/build/Indicator.js
|
|
21084
21097
|
init_esm_shims();
|
|
21085
|
-
var
|
|
21098
|
+
var import_react40 = __toESM(require_react(), 1);
|
|
21086
21099
|
|
|
21087
21100
|
// ../../node_modules/figures/index.js
|
|
21088
21101
|
init_esm_shims();
|
|
@@ -21377,39 +21390,39 @@ var figures_default = figures;
|
|
|
21377
21390
|
|
|
21378
21391
|
// ../../node_modules/ink-select-input/build/Indicator.js
|
|
21379
21392
|
function Indicator({ isSelected = false }) {
|
|
21380
|
-
return
|
|
21393
|
+
return import_react40.default.createElement(Box_default, { marginRight: 1 }, isSelected ? import_react40.default.createElement(Text, { color: "blue" }, figures_default.pointer) : import_react40.default.createElement(Text, null, " "));
|
|
21381
21394
|
}
|
|
21382
21395
|
var Indicator_default = Indicator;
|
|
21383
21396
|
|
|
21384
21397
|
// ../../node_modules/ink-select-input/build/Item.js
|
|
21385
21398
|
init_esm_shims();
|
|
21386
|
-
var
|
|
21399
|
+
var React28 = __toESM(require_react(), 1);
|
|
21387
21400
|
function Item({ isSelected = false, label }) {
|
|
21388
|
-
return
|
|
21401
|
+
return React28.createElement(Text, { color: isSelected ? "blue" : void 0 }, label);
|
|
21389
21402
|
}
|
|
21390
21403
|
var Item_default = Item;
|
|
21391
21404
|
|
|
21392
21405
|
// ../../node_modules/ink-select-input/build/SelectInput.js
|
|
21393
21406
|
init_esm_shims();
|
|
21394
|
-
var import_react40 = __toESM(require_react(), 1);
|
|
21395
21407
|
var import_react41 = __toESM(require_react(), 1);
|
|
21408
|
+
var import_react42 = __toESM(require_react(), 1);
|
|
21396
21409
|
var import_lodash = __toESM(require_lodash(), 1);
|
|
21397
21410
|
var import_arr_rotate = __toESM(require_arr_rotate(), 1);
|
|
21398
21411
|
function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicatorComponent = Indicator_default, itemComponent = Item_default, limit: customLimit, onSelect, onHighlight }) {
|
|
21399
21412
|
const hasLimit = typeof customLimit === "number" && items.length > customLimit;
|
|
21400
21413
|
const limit = hasLimit ? Math.min(customLimit, items.length) : items.length;
|
|
21401
21414
|
const lastIndex = limit - 1;
|
|
21402
|
-
const [rotateIndex, setRotateIndex] = (0,
|
|
21403
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
21404
|
-
const previousItems = (0,
|
|
21405
|
-
(0,
|
|
21415
|
+
const [rotateIndex, setRotateIndex] = (0, import_react42.useState)(initialIndex > lastIndex ? lastIndex - initialIndex : 0);
|
|
21416
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react42.useState)(initialIndex ? initialIndex > lastIndex ? lastIndex : initialIndex : 0);
|
|
21417
|
+
const previousItems = (0, import_react42.useRef)(items);
|
|
21418
|
+
(0, import_react42.useEffect)(() => {
|
|
21406
21419
|
if (!(0, import_lodash.default)(previousItems.current.map((item) => item.value), items.map((item) => item.value))) {
|
|
21407
21420
|
setRotateIndex(0);
|
|
21408
21421
|
setSelectedIndex(0);
|
|
21409
21422
|
}
|
|
21410
21423
|
previousItems.current = items;
|
|
21411
21424
|
}, [items]);
|
|
21412
|
-
use_input_default((0,
|
|
21425
|
+
use_input_default((0, import_react42.useCallback)((input, key) => {
|
|
21413
21426
|
if (input === "k" || key.upArrow) {
|
|
21414
21427
|
const lastIndex2 = (hasLimit ? limit : items.length) - 1;
|
|
21415
21428
|
const atFirstIndex = selectedIndex === 0;
|
|
@@ -21451,15 +21464,15 @@ function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicator
|
|
|
21451
21464
|
onHighlight
|
|
21452
21465
|
]), { isActive: isFocused });
|
|
21453
21466
|
const slicedItems = hasLimit ? (0, import_arr_rotate.default)(items, rotateIndex).slice(0, limit) : items;
|
|
21454
|
-
return
|
|
21467
|
+
return import_react41.default.createElement(Box_default, { flexDirection: "column" }, slicedItems.map((item, index) => {
|
|
21455
21468
|
const isSelected = index === selectedIndex;
|
|
21456
21469
|
return (
|
|
21457
21470
|
// @ts-expect-error - `key` can't be optional but `item.value` is generic T
|
|
21458
|
-
|
|
21471
|
+
import_react41.default.createElement(
|
|
21459
21472
|
Box_default,
|
|
21460
21473
|
{ key: item.key ?? item.value },
|
|
21461
|
-
|
|
21462
|
-
|
|
21474
|
+
import_react41.default.createElement(indicatorComponent, { isSelected }),
|
|
21475
|
+
import_react41.default.createElement(itemComponent, { ...item, isSelected })
|
|
21463
21476
|
)
|
|
21464
21477
|
);
|
|
21465
21478
|
}));
|
|
@@ -21468,14 +21481,14 @@ var SelectInput_default = SelectInput;
|
|
|
21468
21481
|
|
|
21469
21482
|
// ../cli-ui-kit/src/components/SelectInput/Indicator.tsx
|
|
21470
21483
|
init_esm_shims();
|
|
21471
|
-
var
|
|
21484
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
21472
21485
|
var Indicator2 = ({ isSelected }) => {
|
|
21473
|
-
return /* @__PURE__ */
|
|
21486
|
+
return /* @__PURE__ */ import_react43.default.createElement(Box_default, { width: 2 }, /* @__PURE__ */ import_react43.default.createElement(Text2, { skin: "info" }, /* @__PURE__ */ import_react43.default.createElement(RadioIcon, { selected: isSelected })));
|
|
21474
21487
|
};
|
|
21475
21488
|
|
|
21476
21489
|
// ../cli-ui-kit/src/components/SelectInput/Item.tsx
|
|
21477
21490
|
init_esm_shims();
|
|
21478
|
-
var
|
|
21491
|
+
var import_react44 = __toESM(require_react(), 1);
|
|
21479
21492
|
var import_variant8 = __toESM(require_lib(), 1);
|
|
21480
21493
|
|
|
21481
21494
|
// ../cli-ui-kit/src/components/SelectInput/types.ts
|
|
@@ -21493,7 +21506,7 @@ function Item2({
|
|
|
21493
21506
|
value: { description, availability = SelectOptionAvailability.Enabled() }
|
|
21494
21507
|
}) {
|
|
21495
21508
|
const isDisabled = (0, import_variant8.isType)(availability, SelectOptionAvailability.Disabled);
|
|
21496
|
-
return /* @__PURE__ */
|
|
21509
|
+
return /* @__PURE__ */ import_react44.default.createElement(Box_default, null, /* @__PURE__ */ import_react44.default.createElement(
|
|
21497
21510
|
Text2,
|
|
21498
21511
|
{
|
|
21499
21512
|
skin: isDisabled ? "secondary" : isSelected ? "info" : "standard",
|
|
@@ -21501,19 +21514,19 @@ function Item2({
|
|
|
21501
21514
|
},
|
|
21502
21515
|
label
|
|
21503
21516
|
), isSelected && (0, import_variant8.match)(availability, {
|
|
21504
|
-
Disabled: ({ reason }) => /* @__PURE__ */
|
|
21505
|
-
Enabled: () => description && /* @__PURE__ */
|
|
21517
|
+
Disabled: ({ reason }) => /* @__PURE__ */ import_react44.default.createElement(Box_default, { marginLeft: 1 }, /* @__PURE__ */ import_react44.default.createElement(Text2, { skin: "warning" }, "- disabled", reason && ` (${reason})`)),
|
|
21518
|
+
Enabled: () => description && /* @__PURE__ */ import_react44.default.createElement(Box_default, { marginLeft: 1 }, /* @__PURE__ */ import_react44.default.createElement(Text2, { skin: "secondary" }, "- ", description))
|
|
21506
21519
|
}));
|
|
21507
21520
|
}
|
|
21508
21521
|
|
|
21509
21522
|
// ../cli-ui-kit/src/components/SelectInput/Placeholder.tsx
|
|
21510
21523
|
init_esm_shims();
|
|
21511
|
-
var
|
|
21524
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
21512
21525
|
var import_variant9 = __toESM(require_lib(), 1);
|
|
21513
21526
|
function Placeholder2({ inputState }) {
|
|
21514
21527
|
return (0, import_variant9.match)(inputState, {
|
|
21515
21528
|
NotSubmitted: () => null,
|
|
21516
|
-
Submitted: ({ value: value2 }) => /* @__PURE__ */
|
|
21529
|
+
Submitted: ({ value: value2 }) => /* @__PURE__ */ import_react45.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react45.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react45.default.createElement(SuccessIcon, null), " ", value2.title))
|
|
21517
21530
|
});
|
|
21518
21531
|
}
|
|
21519
21532
|
|
|
@@ -21529,16 +21542,16 @@ function SelectInput2({
|
|
|
21529
21542
|
if (!options.length) {
|
|
21530
21543
|
throw new Error("SelectInput: options cannot be empty");
|
|
21531
21544
|
}
|
|
21532
|
-
const [inputState, setInputState] = (0,
|
|
21545
|
+
const [inputState, setInputState] = (0, import_react46.useState)(
|
|
21533
21546
|
() => InputState.NotSubmitted()
|
|
21534
21547
|
);
|
|
21535
|
-
const handleHighlight = (0,
|
|
21548
|
+
const handleHighlight = (0, import_react46.useCallback)(
|
|
21536
21549
|
({ value: value2 }) => {
|
|
21537
21550
|
setInputState(InputState.NotSubmitted(value2));
|
|
21538
21551
|
},
|
|
21539
21552
|
[]
|
|
21540
21553
|
);
|
|
21541
|
-
const handleSelect = (0,
|
|
21554
|
+
const handleSelect = (0, import_react46.useCallback)(
|
|
21542
21555
|
({ value: value2 }) => {
|
|
21543
21556
|
if (!(0, import_variant10.isType)(value2.availability, SelectOptionAvailability.Disabled)) {
|
|
21544
21557
|
setInputState(InputState.Submitted(value2));
|
|
@@ -21547,7 +21560,7 @@ function SelectInput2({
|
|
|
21547
21560
|
},
|
|
21548
21561
|
[onSubmit]
|
|
21549
21562
|
);
|
|
21550
|
-
const items = (0,
|
|
21563
|
+
const items = (0, import_react46.useMemo)(
|
|
21551
21564
|
() => options.map((option) => ({
|
|
21552
21565
|
key: typeof option.value === "string" ? option.value : option.key,
|
|
21553
21566
|
label: option.title,
|
|
@@ -21555,7 +21568,7 @@ function SelectInput2({
|
|
|
21555
21568
|
})),
|
|
21556
21569
|
[options]
|
|
21557
21570
|
);
|
|
21558
|
-
return /* @__PURE__ */
|
|
21571
|
+
return /* @__PURE__ */ import_react46.default.createElement(import_react46.default.Fragment, null, /* @__PURE__ */ import_react46.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react46.default.createElement(Text2, null, /* @__PURE__ */ import_react46.default.createElement(InputLabel, null, label), " ", info && (0, import_variant10.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react46.default.createElement(Text2, { skin: "secondary" }, info))), /* @__PURE__ */ import_react46.default.createElement(Placeholder2, { inputState }), (0, import_variant10.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react46.default.createElement(Box_default, null, /* @__PURE__ */ import_react46.default.createElement(
|
|
21559
21572
|
SelectInput_default,
|
|
21560
21573
|
{
|
|
21561
21574
|
items,
|
|
@@ -21571,20 +21584,20 @@ function SelectInput2({
|
|
|
21571
21584
|
|
|
21572
21585
|
// ../cli-ui-kit/src/components/SelectInput/SelectGroupsInput.tsx
|
|
21573
21586
|
init_esm_shims();
|
|
21574
|
-
var
|
|
21587
|
+
var import_react51 = __toESM(require_react(), 1);
|
|
21575
21588
|
var import_variant11 = __toESM(require_lib(), 1);
|
|
21576
21589
|
|
|
21577
21590
|
// ../cli-ui-kit/src/components/TextInput/Input.tsx
|
|
21578
21591
|
init_esm_shims();
|
|
21579
|
-
var
|
|
21592
|
+
var import_react47 = __toESM(require_react(), 1);
|
|
21580
21593
|
var Input2 = ({
|
|
21581
21594
|
onSubmit,
|
|
21582
21595
|
onChange,
|
|
21583
21596
|
placeholder,
|
|
21584
21597
|
showCursor
|
|
21585
21598
|
}) => {
|
|
21586
|
-
const [currentValue, setCurrentValue] = (0,
|
|
21587
|
-
return /* @__PURE__ */
|
|
21599
|
+
const [currentValue, setCurrentValue] = (0, import_react47.useState)("");
|
|
21600
|
+
return /* @__PURE__ */ import_react47.default.createElement(
|
|
21588
21601
|
build_default,
|
|
21589
21602
|
{
|
|
21590
21603
|
showCursor,
|
|
@@ -21607,7 +21620,7 @@ var Input2 = ({
|
|
|
21607
21620
|
|
|
21608
21621
|
// ../cli-ui-kit/src/components/SelectInput/GroupsList.tsx
|
|
21609
21622
|
init_esm_shims();
|
|
21610
|
-
var
|
|
21623
|
+
var import_react50 = __toESM(require_react(), 1);
|
|
21611
21624
|
|
|
21612
21625
|
// ../cli-ui-kit/src/components/SelectInput/helpers.tsx
|
|
21613
21626
|
init_esm_shims();
|
|
@@ -21730,7 +21743,7 @@ function getVisibleListItems(staringIndex, listItems, limit, reverse) {
|
|
|
21730
21743
|
|
|
21731
21744
|
// ../cli-ui-kit/src/components/Scroll.tsx
|
|
21732
21745
|
init_esm_shims();
|
|
21733
|
-
var
|
|
21746
|
+
var import_react48 = __toESM(require_react(), 1);
|
|
21734
21747
|
var SCROLL_SYMBOL = "\u2588";
|
|
21735
21748
|
var Scroll = ({
|
|
21736
21749
|
height,
|
|
@@ -21748,7 +21761,7 @@ var Scroll = ({
|
|
|
21748
21761
|
const filledEndIndex = filledStartIndex + filledAmount - 1;
|
|
21749
21762
|
for (let i2 = 0; i2 < height; i2++) {
|
|
21750
21763
|
scroll.push(
|
|
21751
|
-
/* @__PURE__ */
|
|
21764
|
+
/* @__PURE__ */ import_react48.default.createElement(
|
|
21752
21765
|
Text,
|
|
21753
21766
|
{
|
|
21754
21767
|
color: i2 >= filledStartIndex && i2 <= filledEndIndex ? "white" : "gray",
|
|
@@ -21763,7 +21776,7 @@ var Scroll = ({
|
|
|
21763
21776
|
|
|
21764
21777
|
// ../cli-ui-kit/src/components/SelectInput/Highlighter.tsx
|
|
21765
21778
|
init_esm_shims();
|
|
21766
|
-
var
|
|
21779
|
+
var import_react49 = __toESM(require_react(), 1);
|
|
21767
21780
|
var Highlighter = ({ pattern, text }) => {
|
|
21768
21781
|
if (!pattern) {
|
|
21769
21782
|
return text;
|
|
@@ -21777,7 +21790,7 @@ var Highlighter = ({ pattern, text }) => {
|
|
|
21777
21790
|
hightlightMap[i2] = 1;
|
|
21778
21791
|
}
|
|
21779
21792
|
}
|
|
21780
|
-
return hightlightMap.map((flag, index) => /* @__PURE__ */
|
|
21793
|
+
return hightlightMap.map((flag, index) => /* @__PURE__ */ import_react49.default.createElement(Text2, { key: index, skin: flag ? "secondary" : "standard" }, text[index]));
|
|
21781
21794
|
};
|
|
21782
21795
|
|
|
21783
21796
|
// ../cli-ui-kit/src/components/SelectInput/GroupsList.tsx
|
|
@@ -21865,7 +21878,7 @@ function GroupsList({
|
|
|
21865
21878
|
width,
|
|
21866
21879
|
maxHeight: maxHeightProp
|
|
21867
21880
|
}) {
|
|
21868
|
-
const [state, dispatch] = (0,
|
|
21881
|
+
const [state, dispatch] = (0, import_react50.useReducer)(reducer, {
|
|
21869
21882
|
listItems: [],
|
|
21870
21883
|
visibleItems: [],
|
|
21871
21884
|
currentIndex: 0,
|
|
@@ -21873,20 +21886,20 @@ function GroupsList({
|
|
|
21873
21886
|
maxHeight: maxHeightProp
|
|
21874
21887
|
});
|
|
21875
21888
|
const { listItems, visibleItems, currentIndex, maxHeight, totalRowCounts } = state;
|
|
21876
|
-
(0,
|
|
21889
|
+
(0, import_react50.useEffect)(() => {
|
|
21877
21890
|
dispatch({
|
|
21878
21891
|
type: "REFRESH" /* REFRESH */,
|
|
21879
21892
|
payload: listItemsProp
|
|
21880
21893
|
});
|
|
21881
21894
|
}, [listItemsProp]);
|
|
21882
|
-
(0,
|
|
21895
|
+
(0, import_react50.useEffect)(() => {
|
|
21883
21896
|
dispatch({
|
|
21884
21897
|
type: "CHANGE_MAX_HEIGHT" /* CHANGE_MAX_HEIGHT */,
|
|
21885
21898
|
payload: maxHeightProp
|
|
21886
21899
|
});
|
|
21887
21900
|
}, [maxHeightProp]);
|
|
21888
21901
|
use_input_default(
|
|
21889
|
-
(0,
|
|
21902
|
+
(0, import_react50.useCallback)(
|
|
21890
21903
|
(input, key) => {
|
|
21891
21904
|
if (key.upArrow && currentIndex > 0) {
|
|
21892
21905
|
dispatch({
|
|
@@ -21913,7 +21926,7 @@ function GroupsList({
|
|
|
21913
21926
|
);
|
|
21914
21927
|
const shouldShowScroll = !hideScroll && totalRowCounts > maxHeight && visibleItems.length;
|
|
21915
21928
|
const viewHeight = Math.min(totalRowCounts, maxHeight);
|
|
21916
|
-
return /* @__PURE__ */
|
|
21929
|
+
return /* @__PURE__ */ import_react50.default.createElement(
|
|
21917
21930
|
Box_default,
|
|
21918
21931
|
{
|
|
21919
21932
|
height: viewHeight,
|
|
@@ -21921,33 +21934,33 @@ function GroupsList({
|
|
|
21921
21934
|
justifyContent: "space-between",
|
|
21922
21935
|
width: width ?? "100%"
|
|
21923
21936
|
},
|
|
21924
|
-
/* @__PURE__ */
|
|
21937
|
+
/* @__PURE__ */ import_react50.default.createElement(Box_default, { flexDirection: "column", height: viewHeight }, visibleItems.reduce(
|
|
21925
21938
|
(acc, { group, groupIndex, item, itemIndex }, index) => {
|
|
21926
21939
|
const shouldShowGroupLabel = index === 0 || groupIndex !== visibleItems.at(index - 1)?.groupIndex;
|
|
21927
21940
|
if (shouldShowGroupLabel) {
|
|
21928
21941
|
acc.push(
|
|
21929
|
-
/* @__PURE__ */
|
|
21942
|
+
/* @__PURE__ */ import_react50.default.createElement(
|
|
21930
21943
|
Box_default,
|
|
21931
21944
|
{
|
|
21932
21945
|
key: `group-${groupIndex}`,
|
|
21933
21946
|
paddingTop: index === 0 ? 0 : GROUP_PADDING
|
|
21934
21947
|
},
|
|
21935
|
-
/* @__PURE__ */
|
|
21948
|
+
/* @__PURE__ */ import_react50.default.createElement(Text2, { bold: true, underline: true }, /* @__PURE__ */ import_react50.default.createElement(
|
|
21936
21949
|
Highlighter,
|
|
21937
21950
|
{
|
|
21938
21951
|
pattern: highlightPattern,
|
|
21939
21952
|
text: group.title
|
|
21940
21953
|
}
|
|
21941
21954
|
)),
|
|
21942
|
-
group.description && /* @__PURE__ */
|
|
21955
|
+
group.description && /* @__PURE__ */ import_react50.default.createElement(Box_default, { marginLeft: 1 }, group.description)
|
|
21943
21956
|
)
|
|
21944
21957
|
);
|
|
21945
21958
|
}
|
|
21946
21959
|
acc.push(
|
|
21947
|
-
/* @__PURE__ */
|
|
21960
|
+
/* @__PURE__ */ import_react50.default.createElement(Box_default, { key: `item-${itemIndex}`, marginLeft: 1 }, /* @__PURE__ */ import_react50.default.createElement(Indicator2, { isSelected: itemIndex === currentIndex }), /* @__PURE__ */ import_react50.default.createElement(
|
|
21948
21961
|
Item2,
|
|
21949
21962
|
{
|
|
21950
|
-
label: /* @__PURE__ */
|
|
21963
|
+
label: /* @__PURE__ */ import_react50.default.createElement(Highlighter, { pattern: highlightPattern, text: item.title }),
|
|
21951
21964
|
isSelected: itemIndex === currentIndex,
|
|
21952
21965
|
value: item
|
|
21953
21966
|
}
|
|
@@ -21957,7 +21970,7 @@ function GroupsList({
|
|
|
21957
21970
|
},
|
|
21958
21971
|
[]
|
|
21959
21972
|
)),
|
|
21960
|
-
shouldShowScroll ? /* @__PURE__ */
|
|
21973
|
+
shouldShowScroll ? /* @__PURE__ */ import_react50.default.createElement(Box_default, { flexDirection: "column", height: viewHeight }, /* @__PURE__ */ import_react50.default.createElement(
|
|
21961
21974
|
Scroll,
|
|
21962
21975
|
{
|
|
21963
21976
|
height: viewHeight,
|
|
@@ -21982,11 +21995,11 @@ function SelectGroupsInput({
|
|
|
21982
21995
|
if (!groups.length) {
|
|
21983
21996
|
throw new Error("SelectGroupsInput: groups cannot be empty");
|
|
21984
21997
|
}
|
|
21985
|
-
const [inputState, setInputState] = (0,
|
|
21998
|
+
const [inputState, setInputState] = (0, import_react51.useState)(
|
|
21986
21999
|
() => InputState.NotSubmitted()
|
|
21987
22000
|
);
|
|
21988
|
-
const [searchRegExp, setSearchRegExp] = (0,
|
|
21989
|
-
const filteredGroups = (0,
|
|
22001
|
+
const [searchRegExp, setSearchRegExp] = (0, import_react51.useState)();
|
|
22002
|
+
const filteredGroups = (0, import_react51.useMemo)(() => {
|
|
21990
22003
|
if (!searchRegExp) {
|
|
21991
22004
|
return groups;
|
|
21992
22005
|
}
|
|
@@ -22004,11 +22017,11 @@ function SelectGroupsInput({
|
|
|
22004
22017
|
return acc;
|
|
22005
22018
|
}, []);
|
|
22006
22019
|
}, [groups, searchRegExp]);
|
|
22007
|
-
const listItems = (0,
|
|
22020
|
+
const listItems = (0, import_react51.useMemo)(
|
|
22008
22021
|
() => getListItems(filteredGroups),
|
|
22009
22022
|
[filteredGroups]
|
|
22010
22023
|
);
|
|
22011
|
-
const handleItemSelection = (0,
|
|
22024
|
+
const handleItemSelection = (0, import_react51.useCallback)(
|
|
22012
22025
|
(selectedItem) => {
|
|
22013
22026
|
if (!(0, import_variant11.isType)(selectedItem.availability, SelectOptionAvailability.Disabled)) {
|
|
22014
22027
|
setInputState(InputState.Submitted(selectedItem));
|
|
@@ -22017,7 +22030,7 @@ function SelectGroupsInput({
|
|
|
22017
22030
|
},
|
|
22018
22031
|
[onSubmit]
|
|
22019
22032
|
);
|
|
22020
|
-
const handleSearchPhraseChange = (0,
|
|
22033
|
+
const handleSearchPhraseChange = (0, import_react51.useCallback)((searchPhrase) => {
|
|
22021
22034
|
const escapedSearchPhrase = searchPhrase.replaceAll(
|
|
22022
22035
|
/([.?*+^$[\]\\(){}|-])/g,
|
|
22023
22036
|
"\\$1"
|
|
@@ -22028,14 +22041,14 @@ function SelectGroupsInput({
|
|
|
22028
22041
|
}, []);
|
|
22029
22042
|
const lastItem = listItems.at(-1);
|
|
22030
22043
|
const shouldShowSearchInput = searchRegExp ? true : lastItem && lastItem.rowIndex > maxHeight;
|
|
22031
|
-
return /* @__PURE__ */
|
|
22044
|
+
return /* @__PURE__ */ import_react51.default.createElement(import_react51.default.Fragment, null, /* @__PURE__ */ import_react51.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react51.default.createElement(Text2, null, /* @__PURE__ */ import_react51.default.createElement(InputLabel, null, label), " ", info && (0, import_variant11.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react51.default.createElement(Text2, { skin: "secondary" }, info)), (0, import_variant11.isType)(inputState, InputState.NotSubmitted) && shouldShowSearchInput && /* @__PURE__ */ import_react51.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react51.default.createElement(
|
|
22032
22045
|
Input2,
|
|
22033
22046
|
{
|
|
22034
22047
|
onChange: handleSearchPhraseChange,
|
|
22035
22048
|
showCursor: true,
|
|
22036
22049
|
placeholder: "Type to search..."
|
|
22037
22050
|
}
|
|
22038
|
-
))), /* @__PURE__ */
|
|
22051
|
+
))), /* @__PURE__ */ import_react51.default.createElement(Placeholder2, { inputState }), (0, import_variant11.isType)(inputState, InputState.NotSubmitted) && (listItems.length ? /* @__PURE__ */ import_react51.default.createElement(
|
|
22039
22052
|
GroupsList,
|
|
22040
22053
|
{
|
|
22041
22054
|
listItems,
|
|
@@ -22045,7 +22058,7 @@ function SelectGroupsInput({
|
|
|
22045
22058
|
hideScroll,
|
|
22046
22059
|
onItemSelect: handleItemSelection
|
|
22047
22060
|
}
|
|
22048
|
-
) : /* @__PURE__ */
|
|
22061
|
+
) : /* @__PURE__ */ import_react51.default.createElement(Box_default, { paddingBottom: 1, paddingX: 2 }, /* @__PURE__ */ import_react51.default.createElement(Text2, { skin: "secondary" }, "No results found."))));
|
|
22049
22062
|
}
|
|
22050
22063
|
|
|
22051
22064
|
// ../cli-ui-kit/src/components/TextInput/index.ts
|
|
@@ -22053,7 +22066,7 @@ init_esm_shims();
|
|
|
22053
22066
|
|
|
22054
22067
|
// ../cli-ui-kit/src/components/TextInput/TextInput.tsx
|
|
22055
22068
|
init_esm_shims();
|
|
22056
|
-
var
|
|
22069
|
+
var import_react52 = __toESM(require_react(), 1);
|
|
22057
22070
|
var import_variant12 = __toESM(require_lib(), 1);
|
|
22058
22071
|
var TextInput2 = ({
|
|
22059
22072
|
label,
|
|
@@ -22062,12 +22075,12 @@ var TextInput2 = ({
|
|
|
22062
22075
|
validate = () => true,
|
|
22063
22076
|
inCreateFlow = false
|
|
22064
22077
|
}) => {
|
|
22065
|
-
const [inputState, setInputState] = (0,
|
|
22078
|
+
const [inputState, setInputState] = (0, import_react52.useState)(
|
|
22066
22079
|
() => InputState.NotSubmitted(placeholder)
|
|
22067
22080
|
);
|
|
22068
|
-
const [isDirty2, setIsDirty] = (0,
|
|
22069
|
-
const [validationError, setValidationError] = (0,
|
|
22070
|
-
const handleSubmit = (0,
|
|
22081
|
+
const [isDirty2, setIsDirty] = (0, import_react52.useState)(false);
|
|
22082
|
+
const [validationError, setValidationError] = (0, import_react52.useState)();
|
|
22083
|
+
const handleSubmit = (0, import_react52.useCallback)(
|
|
22071
22084
|
async (value2) => {
|
|
22072
22085
|
setIsDirty(false);
|
|
22073
22086
|
const validationResult = await validate(value2);
|
|
@@ -22082,13 +22095,13 @@ var TextInput2 = ({
|
|
|
22082
22095
|
[onSubmit, validate]
|
|
22083
22096
|
);
|
|
22084
22097
|
const afterValidationError = Boolean(validationError && !isDirty2);
|
|
22085
|
-
return /* @__PURE__ */
|
|
22098
|
+
return /* @__PURE__ */ import_react52.default.createElement(import_react52.default.Fragment, null, /* @__PURE__ */ import_react52.default.createElement(Box_default, { marginBottom: 1, marginLeft: inCreateFlow ? -2 : 0 }, /* @__PURE__ */ import_react52.default.createElement(Text2, null, /* @__PURE__ */ import_react52.default.createElement(
|
|
22086
22099
|
InputLabel,
|
|
22087
22100
|
{
|
|
22088
|
-
icon: /* @__PURE__ */
|
|
22101
|
+
icon: /* @__PURE__ */ import_react52.default.createElement(Text2, { skin: "question" }, /* @__PURE__ */ import_react52.default.createElement(PointerIcon, { appearance: "triangle" }))
|
|
22089
22102
|
},
|
|
22090
22103
|
label
|
|
22091
|
-
)
|
|
22104
|
+
), (0, import_variant12.isType)(inputState, InputState.NotSubmitted) && /* @__PURE__ */ import_react52.default.createElement(import_react52.default.Fragment, null, " ", /* @__PURE__ */ import_react52.default.createElement(Text2, { skin: afterValidationError ? "error" : "standard" }, /* @__PURE__ */ import_react52.default.createElement(
|
|
22092
22105
|
Input2,
|
|
22093
22106
|
{
|
|
22094
22107
|
placeholder: inputState.value,
|
|
@@ -22096,52 +22109,52 @@ var TextInput2 = ({
|
|
|
22096
22109
|
onChange: () => setIsDirty(true),
|
|
22097
22110
|
showCursor: afterValidationError
|
|
22098
22111
|
}
|
|
22099
|
-
))), (0, import_variant12.isType)(inputState, InputState.Submitted) && /* @__PURE__ */
|
|
22112
|
+
))))), (0, import_variant12.isType)(inputState, InputState.Submitted) && /* @__PURE__ */ import_react52.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react52.default.createElement(Text2, { skin: "secondary" }, /* @__PURE__ */ import_react52.default.createElement(SuccessIcon, null), " ", inputState.value)), validationError && /* @__PURE__ */ import_react52.default.createElement(Box_default, { columnGap: 1 }, /* @__PURE__ */ import_react52.default.createElement(Text2, { skin: "error" }, /* @__PURE__ */ import_react52.default.createElement(PointerIcon, { appearance: "exclamation" })), /* @__PURE__ */ import_react52.default.createElement(Text2, { skin: "error" }, validationError)));
|
|
22100
22113
|
};
|
|
22101
22114
|
|
|
22102
22115
|
// ../cli-ui-kit/src/components/Alert.tsx
|
|
22103
22116
|
init_esm_shims();
|
|
22104
|
-
var
|
|
22117
|
+
var import_react53 = __toESM(require_react(), 1);
|
|
22105
22118
|
var import_variant13 = __toESM(require_lib(), 1);
|
|
22106
22119
|
var Alert = ({ type, children }) => {
|
|
22107
22120
|
const icon = (0, import_variant13.match)(type, {
|
|
22108
22121
|
error: (0, import_variant13.constant)(
|
|
22109
|
-
/* @__PURE__ */
|
|
22122
|
+
/* @__PURE__ */ import_react53.default.createElement(Text2, { skin: "error" }, /* @__PURE__ */ import_react53.default.createElement(ErrorIcon, null))
|
|
22110
22123
|
),
|
|
22111
22124
|
warning: (0, import_variant13.constant)(
|
|
22112
|
-
/* @__PURE__ */
|
|
22125
|
+
/* @__PURE__ */ import_react53.default.createElement(Text2, { skin: "warning" }, /* @__PURE__ */ import_react53.default.createElement(WarningIcon, null))
|
|
22113
22126
|
),
|
|
22114
22127
|
success: (0, import_variant13.constant)(
|
|
22115
|
-
/* @__PURE__ */
|
|
22128
|
+
/* @__PURE__ */ import_react53.default.createElement(Text2, { skin: "success" }, /* @__PURE__ */ import_react53.default.createElement(SuccessIcon, null))
|
|
22116
22129
|
),
|
|
22117
|
-
insight: (0, import_variant13.constant)(/* @__PURE__ */
|
|
22130
|
+
insight: (0, import_variant13.constant)(/* @__PURE__ */ import_react53.default.createElement(InsightIcon, null))
|
|
22118
22131
|
});
|
|
22119
|
-
return /* @__PURE__ */
|
|
22132
|
+
return /* @__PURE__ */ import_react53.default.createElement(Text2, null, icon, " ", children);
|
|
22120
22133
|
};
|
|
22121
22134
|
|
|
22122
22135
|
// ../cli-ui-kit/src/components/Badge.tsx
|
|
22123
22136
|
init_esm_shims();
|
|
22124
|
-
var
|
|
22137
|
+
var import_react54 = __toESM(require_react(), 1);
|
|
22125
22138
|
var skins2 = {
|
|
22126
22139
|
success: { backgroundColor: "green" }
|
|
22127
22140
|
};
|
|
22128
22141
|
var Badge = ({ children, skin }) => {
|
|
22129
|
-
return /* @__PURE__ */
|
|
22142
|
+
return /* @__PURE__ */ import_react54.default.createElement(Text, { ...skins2[skin] }, " ", children, " ");
|
|
22130
22143
|
};
|
|
22131
22144
|
|
|
22132
22145
|
// ../cli-ui-kit/src/components/Key.tsx
|
|
22133
22146
|
init_esm_shims();
|
|
22134
|
-
var
|
|
22147
|
+
var import_react55 = __toESM(require_react(), 1);
|
|
22135
22148
|
var Key = ({ value: value2, skin }) => {
|
|
22136
22149
|
if (skin === "secondary") {
|
|
22137
|
-
return /* @__PURE__ */
|
|
22150
|
+
return /* @__PURE__ */ import_react55.default.createElement(Text, null, /* @__PURE__ */ import_react55.default.createElement(Text, { inverse: true }, " ", value2, " "), /* @__PURE__ */ import_react55.default.createElement(Text, null, "\u2591"));
|
|
22138
22151
|
}
|
|
22139
|
-
return /* @__PURE__ */
|
|
22152
|
+
return /* @__PURE__ */ import_react55.default.createElement(Text, null, /* @__PURE__ */ import_react55.default.createElement(Text, { backgroundColor: "blueBright" }, " ", value2, " "), /* @__PURE__ */ import_react55.default.createElement(Text, { color: "blueBright" }, "\u2591"));
|
|
22140
22153
|
};
|
|
22141
22154
|
|
|
22142
22155
|
// ../cli-ui-kit/src/components/Link.tsx
|
|
22143
22156
|
init_esm_shims();
|
|
22144
|
-
var
|
|
22157
|
+
var import_react56 = __toESM(require_react(), 1);
|
|
22145
22158
|
|
|
22146
22159
|
// ../../node_modules/terminal-link/index.js
|
|
22147
22160
|
init_esm_shims();
|
|
@@ -22288,31 +22301,31 @@ terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
|
22288
22301
|
var Link = ({ skin, children, url }) => {
|
|
22289
22302
|
if (children) {
|
|
22290
22303
|
if (terminalLink.isSupported) {
|
|
22291
|
-
return /* @__PURE__ */
|
|
22304
|
+
return /* @__PURE__ */ import_react56.default.createElement(
|
|
22292
22305
|
Transform,
|
|
22293
22306
|
{
|
|
22294
22307
|
transform: (childrenAsString) => terminalLink(childrenAsString, url, { fallback: false })
|
|
22295
22308
|
},
|
|
22296
|
-
/* @__PURE__ */
|
|
22309
|
+
/* @__PURE__ */ import_react56.default.createElement(Text2, { skin }, children)
|
|
22297
22310
|
);
|
|
22298
22311
|
}
|
|
22299
|
-
return /* @__PURE__ */
|
|
22312
|
+
return /* @__PURE__ */ import_react56.default.createElement(Text2, null, /* @__PURE__ */ import_react56.default.createElement(Text2, { skin }, children), " (", url, ")");
|
|
22300
22313
|
}
|
|
22301
|
-
return /* @__PURE__ */
|
|
22314
|
+
return /* @__PURE__ */ import_react56.default.createElement(Text2, { skin: "info" }, url);
|
|
22302
22315
|
};
|
|
22303
22316
|
|
|
22304
22317
|
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
22305
22318
|
init_esm_shims();
|
|
22306
|
-
var
|
|
22319
|
+
var import_react58 = __toESM(require_react(), 1);
|
|
22307
22320
|
|
|
22308
22321
|
// ../../node_modules/ink-spinner/build/index.js
|
|
22309
22322
|
init_esm_shims();
|
|
22310
|
-
var
|
|
22323
|
+
var import_react57 = __toESM(require_react(), 1);
|
|
22311
22324
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
22312
22325
|
function Spinner({ type = "dots" }) {
|
|
22313
|
-
const [frame, setFrame] = (0,
|
|
22326
|
+
const [frame, setFrame] = (0, import_react57.useState)(0);
|
|
22314
22327
|
const spinner = import_cli_spinners.default[type];
|
|
22315
|
-
(0,
|
|
22328
|
+
(0, import_react57.useEffect)(() => {
|
|
22316
22329
|
const timer = setInterval(() => {
|
|
22317
22330
|
setFrame((previousFrame) => {
|
|
22318
22331
|
const isLastFrame = previousFrame === spinner.frames.length - 1;
|
|
@@ -22323,33 +22336,33 @@ function Spinner({ type = "dots" }) {
|
|
|
22323
22336
|
clearInterval(timer);
|
|
22324
22337
|
};
|
|
22325
22338
|
}, [spinner]);
|
|
22326
|
-
return
|
|
22339
|
+
return import_react57.default.createElement(Text, null, spinner.frames[frame]);
|
|
22327
22340
|
}
|
|
22328
22341
|
var build_default2 = Spinner;
|
|
22329
22342
|
|
|
22330
22343
|
// ../cli-ui-kit/src/components/Spinner.tsx
|
|
22331
22344
|
var Spinner2 = ({ text }) => {
|
|
22332
|
-
const spinnerNode = /* @__PURE__ */
|
|
22345
|
+
const spinnerNode = /* @__PURE__ */ import_react58.default.createElement(Text2, { skin: "info" }, /* @__PURE__ */ import_react58.default.createElement(build_default2, { type: "dots" }));
|
|
22333
22346
|
if (text) {
|
|
22334
|
-
return /* @__PURE__ */
|
|
22347
|
+
return /* @__PURE__ */ import_react58.default.createElement(Box_default, { gap: 1 }, spinnerNode, typeof text === "string" ? /* @__PURE__ */ import_react58.default.createElement(Text2, null, text) : text);
|
|
22335
22348
|
}
|
|
22336
22349
|
return spinnerNode;
|
|
22337
22350
|
};
|
|
22338
22351
|
|
|
22339
22352
|
// ../cli-ui-kit/src/components/ErrorDetails.tsx
|
|
22340
22353
|
init_esm_shims();
|
|
22341
|
-
var
|
|
22354
|
+
var import_react59 = __toESM(require_react(), 1);
|
|
22342
22355
|
var ErrorDetails = ({
|
|
22343
22356
|
message,
|
|
22344
22357
|
explanation,
|
|
22345
22358
|
hint
|
|
22346
|
-
}) => /* @__PURE__ */
|
|
22359
|
+
}) => /* @__PURE__ */ import_react59.default.createElement(Box_default, { flexDirection: "column" }, /* @__PURE__ */ import_react59.default.createElement(Alert, { type: "error" }, message), explanation && /* @__PURE__ */ import_react59.default.createElement(Alert, { type: "warning" }, explanation), hint && /* @__PURE__ */ import_react59.default.createElement(Box_default, { paddingTop: 1 }, /* @__PURE__ */ import_react59.default.createElement(Alert, { type: "insight" }, hint)));
|
|
22347
22360
|
|
|
22348
22361
|
// ../cli-ui-kit/src/components/Notification.tsx
|
|
22349
22362
|
init_esm_shims();
|
|
22350
|
-
var
|
|
22363
|
+
var import_react60 = __toESM(require_react(), 1);
|
|
22351
22364
|
var Notification = ({ children }) => {
|
|
22352
|
-
return /* @__PURE__ */
|
|
22365
|
+
return /* @__PURE__ */ import_react60.default.createElement(Box_default, null, /* @__PURE__ */ import_react60.default.createElement(
|
|
22353
22366
|
Box_default,
|
|
22354
22367
|
{
|
|
22355
22368
|
padding: 1,
|
|
@@ -22368,7 +22381,7 @@ var import_variant14 = __toESM(require_lib(), 1);
|
|
|
22368
22381
|
|
|
22369
22382
|
// ../../node_modules/react-async-hook/dist/react-async-hook.esm.js
|
|
22370
22383
|
init_esm_shims();
|
|
22371
|
-
var
|
|
22384
|
+
var import_react61 = __toESM(require_react());
|
|
22372
22385
|
function _extends() {
|
|
22373
22386
|
_extends = Object.assign || function(target) {
|
|
22374
22387
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -22385,13 +22398,13 @@ function _extends() {
|
|
|
22385
22398
|
}
|
|
22386
22399
|
var _iteratorSymbol = typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
22387
22400
|
var _asyncIteratorSymbol = typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
22388
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined" ?
|
|
22401
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined" ? import_react61.useLayoutEffect : import_react61.useEffect;
|
|
22389
22402
|
var useGetter = function useGetter2(t3) {
|
|
22390
|
-
var ref = (0,
|
|
22403
|
+
var ref = (0, import_react61.useRef)(t3);
|
|
22391
22404
|
useIsomorphicLayoutEffect(function() {
|
|
22392
22405
|
ref.current = t3;
|
|
22393
22406
|
});
|
|
22394
|
-
return (0,
|
|
22407
|
+
return (0, import_react61.useCallback)(function() {
|
|
22395
22408
|
return ref.current;
|
|
22396
22409
|
}, [ref]);
|
|
22397
22410
|
};
|
|
@@ -22444,22 +22457,22 @@ var normalizeOptions = function normalizeOptions2(options) {
|
|
|
22444
22457
|
return _extends({}, DefaultOptions, {}, options);
|
|
22445
22458
|
};
|
|
22446
22459
|
var useAsyncState = function useAsyncState2(options) {
|
|
22447
|
-
var _useState = (0,
|
|
22460
|
+
var _useState = (0, import_react61.useState)(function() {
|
|
22448
22461
|
return options.initialState(options);
|
|
22449
22462
|
}), value2 = _useState[0], setValue = _useState[1];
|
|
22450
|
-
var reset = (0,
|
|
22463
|
+
var reset = (0, import_react61.useCallback)(function() {
|
|
22451
22464
|
return setValue(options.initialState(options));
|
|
22452
22465
|
}, [setValue, options]);
|
|
22453
|
-
var setLoading = (0,
|
|
22466
|
+
var setLoading = (0, import_react61.useCallback)(function() {
|
|
22454
22467
|
return setValue(options.setLoading(value2));
|
|
22455
22468
|
}, [value2, setValue]);
|
|
22456
|
-
var setResult = (0,
|
|
22469
|
+
var setResult = (0, import_react61.useCallback)(function(result) {
|
|
22457
22470
|
return setValue(options.setResult(result, value2));
|
|
22458
22471
|
}, [value2, setValue]);
|
|
22459
|
-
var setError = (0,
|
|
22472
|
+
var setError = (0, import_react61.useCallback)(function(error) {
|
|
22460
22473
|
return setValue(options.setError(error, value2));
|
|
22461
22474
|
}, [value2, setValue]);
|
|
22462
|
-
var merge = (0,
|
|
22475
|
+
var merge = (0, import_react61.useCallback)(function(state) {
|
|
22463
22476
|
return setValue(_extends({}, value2, {}, state));
|
|
22464
22477
|
}, [value2, setValue]);
|
|
22465
22478
|
return {
|
|
@@ -22473,8 +22486,8 @@ var useAsyncState = function useAsyncState2(options) {
|
|
|
22473
22486
|
};
|
|
22474
22487
|
};
|
|
22475
22488
|
var useIsMounted = function useIsMounted2() {
|
|
22476
|
-
var ref = (0,
|
|
22477
|
-
(0,
|
|
22489
|
+
var ref = (0, import_react61.useRef)(false);
|
|
22490
|
+
(0, import_react61.useEffect)(function() {
|
|
22478
22491
|
ref.current = true;
|
|
22479
22492
|
return function() {
|
|
22480
22493
|
ref.current = false;
|
|
@@ -22485,7 +22498,7 @@ var useIsMounted = function useIsMounted2() {
|
|
|
22485
22498
|
};
|
|
22486
22499
|
};
|
|
22487
22500
|
var useCurrentPromise = function useCurrentPromise2() {
|
|
22488
|
-
var ref = (0,
|
|
22501
|
+
var ref = (0, import_react61.useRef)(null);
|
|
22489
22502
|
return {
|
|
22490
22503
|
set: function set(promise) {
|
|
22491
22504
|
return ref.current = promise;
|
|
@@ -22501,7 +22514,7 @@ var useCurrentPromise = function useCurrentPromise2() {
|
|
|
22501
22514
|
var useAsyncInternal = function useAsyncInternal2(asyncFunction, params, options) {
|
|
22502
22515
|
!params && (params = []);
|
|
22503
22516
|
var normalizedOptions = normalizeOptions(options);
|
|
22504
|
-
var _useState2 = (0,
|
|
22517
|
+
var _useState2 = (0, import_react61.useState)(null), currentParams = _useState2[0], setCurrentParams = _useState2[1];
|
|
22505
22518
|
var AsyncState = useAsyncState(normalizedOptions);
|
|
22506
22519
|
var isMounted = useIsMounted();
|
|
22507
22520
|
var CurrentPromise = useCurrentPromise();
|
|
@@ -22544,11 +22557,11 @@ var useAsyncInternal = function useAsyncInternal2(asyncFunction, params, options
|
|
|
22544
22557
|
return promise;
|
|
22545
22558
|
};
|
|
22546
22559
|
var getLatestExecuteAsyncOperation = useGetter(executeAsyncOperation);
|
|
22547
|
-
var executeAsyncOperationMemo = (0,
|
|
22560
|
+
var executeAsyncOperationMemo = (0, import_react61.useCallback)(function() {
|
|
22548
22561
|
return getLatestExecuteAsyncOperation().apply(void 0, arguments);
|
|
22549
22562
|
}, [getLatestExecuteAsyncOperation]);
|
|
22550
22563
|
var isMounting = !isMounted();
|
|
22551
|
-
(0,
|
|
22564
|
+
(0, import_react61.useEffect)(function() {
|
|
22552
22565
|
var execute = function execute2() {
|
|
22553
22566
|
return getLatestExecuteAsyncOperation().apply(void 0, params);
|
|
22554
22567
|
};
|
|
@@ -22581,7 +22594,7 @@ var useAsyncCallback = function useAsyncCallback2(asyncFunction, options) {
|
|
|
22581
22594
|
};
|
|
22582
22595
|
|
|
22583
22596
|
// ../cli-ui-kit/src/hooks/use-async.ts
|
|
22584
|
-
var
|
|
22597
|
+
var import_react62 = __toESM(require_react(), 1);
|
|
22585
22598
|
var AsyncStatus = (0, import_variant14.variant)(
|
|
22586
22599
|
(0, import_variant14.onTerms)(({ T: _T }) => ({
|
|
22587
22600
|
Error: (error) => ({ error }),
|
|
@@ -22599,7 +22612,7 @@ var AsyncCallbackStatus = (0, import_variant14.variant)(
|
|
|
22599
22612
|
);
|
|
22600
22613
|
var useAsync2 = (fn, args, options) => {
|
|
22601
22614
|
const exit = useExit();
|
|
22602
|
-
const abortController = (0,
|
|
22615
|
+
const abortController = (0, import_react62.useMemo)(() => new AbortController(), []);
|
|
22603
22616
|
const { result, error, status, merge } = useAsync(
|
|
22604
22617
|
fn.bind(null, { signal: abortController.signal }),
|
|
22605
22618
|
args,
|
|
@@ -22608,7 +22621,7 @@ var useAsync2 = (fn, args, options) => {
|
|
|
22608
22621
|
...options ?? {}
|
|
22609
22622
|
}
|
|
22610
22623
|
);
|
|
22611
|
-
(0,
|
|
22624
|
+
(0, import_react62.useEffect)(() => {
|
|
22612
22625
|
return () => {
|
|
22613
22626
|
abortController.abort();
|
|
22614
22627
|
};
|
|
@@ -22628,7 +22641,7 @@ var useAsync2 = (fn, args, options) => {
|
|
|
22628
22641
|
};
|
|
22629
22642
|
var useAsyncCallback3 = (fn, options) => {
|
|
22630
22643
|
const exit = useExit();
|
|
22631
|
-
const abortController = (0,
|
|
22644
|
+
const abortController = (0, import_react62.useMemo)(() => new AbortController(), []);
|
|
22632
22645
|
const { result, error, status, merge, execute } = useAsyncCallback(
|
|
22633
22646
|
fn.bind(null, { signal: abortController.signal }),
|
|
22634
22647
|
{
|
|
@@ -22636,7 +22649,7 @@ var useAsyncCallback3 = (fn, options) => {
|
|
|
22636
22649
|
...options ?? {}
|
|
22637
22650
|
}
|
|
22638
22651
|
);
|
|
22639
|
-
(0,
|
|
22652
|
+
(0, import_react62.useEffect)(() => {
|
|
22640
22653
|
return () => {
|
|
22641
22654
|
abortController.abort();
|
|
22642
22655
|
};
|
|
@@ -22666,18 +22679,18 @@ var useAsyncCallback3 = (fn, options) => {
|
|
|
22666
22679
|
|
|
22667
22680
|
// ../cli-i18n/src/I18nProvider.tsx
|
|
22668
22681
|
init_esm_shims();
|
|
22669
|
-
var
|
|
22682
|
+
var import_react71 = __toESM(require_react(), 1);
|
|
22670
22683
|
|
|
22671
22684
|
// ../../node_modules/react-i18next/dist/es/index.js
|
|
22672
22685
|
init_esm_shims();
|
|
22673
22686
|
|
|
22674
22687
|
// ../../node_modules/react-i18next/dist/es/Trans.js
|
|
22675
22688
|
init_esm_shims();
|
|
22676
|
-
var
|
|
22689
|
+
var import_react65 = __toESM(require_react(), 1);
|
|
22677
22690
|
|
|
22678
22691
|
// ../../node_modules/react-i18next/dist/es/TransWithoutContext.js
|
|
22679
22692
|
init_esm_shims();
|
|
22680
|
-
var
|
|
22693
|
+
var import_react63 = __toESM(require_react(), 1);
|
|
22681
22694
|
|
|
22682
22695
|
// ../../node_modules/html-parse-stringify/dist/html-parse-stringify.module.js
|
|
22683
22696
|
init_esm_shims();
|
|
@@ -22876,7 +22889,7 @@ var getChildren = (node) => {
|
|
|
22876
22889
|
const children = node.props?.children ?? node.children;
|
|
22877
22890
|
return node.props?.i18nIsDynamicList ? getAsArray(children) : children;
|
|
22878
22891
|
};
|
|
22879
|
-
var hasValidReactChildren = (children) => Array.isArray(children) && children.every(
|
|
22892
|
+
var hasValidReactChildren = (children) => Array.isArray(children) && children.every(import_react63.isValidElement);
|
|
22880
22893
|
var getAsArray = (data) => Array.isArray(data) ? data : [data];
|
|
22881
22894
|
var mergeProps = (source, target) => {
|
|
22882
22895
|
const newTarget = {
|
|
@@ -22895,7 +22908,7 @@ var nodesToString = (children, i18nOptions, i18n, i18nKey) => {
|
|
|
22895
22908
|
stringNode += `${child}`;
|
|
22896
22909
|
return;
|
|
22897
22910
|
}
|
|
22898
|
-
if ((0,
|
|
22911
|
+
if ((0, import_react63.isValidElement)(child)) {
|
|
22899
22912
|
const {
|
|
22900
22913
|
props,
|
|
22901
22914
|
type
|
|
@@ -22960,7 +22973,7 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
22960
22973
|
childrenArray.forEach((child) => {
|
|
22961
22974
|
if (isString(child)) return;
|
|
22962
22975
|
if (hasChildren(child)) getData(getChildren(child));
|
|
22963
|
-
else if (isObject(child) && !(0,
|
|
22976
|
+
else if (isObject(child) && !(0, import_react63.isValidElement)(child)) Object.assign(data, child);
|
|
22964
22977
|
});
|
|
22965
22978
|
};
|
|
22966
22979
|
getData(children);
|
|
@@ -22977,16 +22990,16 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
22977
22990
|
const pushTranslatedJSX = (child, inner, mem, i2, isVoid) => {
|
|
22978
22991
|
if (child.dummy) {
|
|
22979
22992
|
child.children = inner;
|
|
22980
|
-
mem.push((0,
|
|
22993
|
+
mem.push((0, import_react63.cloneElement)(child, {
|
|
22981
22994
|
key: i2
|
|
22982
22995
|
}, isVoid ? void 0 : inner));
|
|
22983
22996
|
} else {
|
|
22984
|
-
mem.push(...
|
|
22997
|
+
mem.push(...import_react63.Children.map([child], (c2) => {
|
|
22985
22998
|
const props = {
|
|
22986
22999
|
...c2.props
|
|
22987
23000
|
};
|
|
22988
23001
|
delete props.i18nIsDynamicList;
|
|
22989
|
-
return (0,
|
|
23002
|
+
return (0, import_react63.createElement)(c2.type, {
|
|
22990
23003
|
...props,
|
|
22991
23004
|
key: i2,
|
|
22992
23005
|
ref: c2.ref
|
|
@@ -23006,7 +23019,7 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
23006
23019
|
const child = Object.keys(node.attrs).length !== 0 ? mergeProps({
|
|
23007
23020
|
props: node.attrs
|
|
23008
23021
|
}, tmp) : tmp;
|
|
23009
|
-
const isElement = (0,
|
|
23022
|
+
const isElement = (0, import_react63.isValidElement)(child);
|
|
23010
23023
|
const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
|
|
23011
23024
|
const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;
|
|
23012
23025
|
const isKnownComponent = isObject(children) && Object.hasOwnProperty.call(children, node.name);
|
|
@@ -23025,12 +23038,12 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
23025
23038
|
pushTranslatedJSX(child, inner, mem, i2, node.voidElement);
|
|
23026
23039
|
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
|
|
23027
23040
|
if (node.voidElement) {
|
|
23028
|
-
mem.push((0,
|
|
23041
|
+
mem.push((0, import_react63.createElement)(node.name, {
|
|
23029
23042
|
key: `${node.name}-${i2}`
|
|
23030
23043
|
}));
|
|
23031
23044
|
} else {
|
|
23032
23045
|
const inner = mapAST(reactNodes, node.children, rootReactNode);
|
|
23033
|
-
mem.push((0,
|
|
23046
|
+
mem.push((0, import_react63.createElement)(node.name, {
|
|
23034
23047
|
key: `${node.name}-${i2}`
|
|
23035
23048
|
}, inner));
|
|
23036
23049
|
}
|
|
@@ -23050,7 +23063,7 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
23050
23063
|
const wrapTextNodes = i18nOptions.transWrapTextNodes;
|
|
23051
23064
|
const content = shouldUnescape ? i18nOptions.unescape(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
|
|
23052
23065
|
if (wrapTextNodes) {
|
|
23053
|
-
mem.push((0,
|
|
23066
|
+
mem.push((0, import_react63.createElement)(wrapTextNodes, {
|
|
23054
23067
|
key: `${node.name}-${i2}`
|
|
23055
23068
|
}, content));
|
|
23056
23069
|
} else {
|
|
@@ -23068,16 +23081,16 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
23068
23081
|
};
|
|
23069
23082
|
var fixComponentProps = (component, index, translation) => {
|
|
23070
23083
|
const componentKey = component.key || index;
|
|
23071
|
-
const comp = (0,
|
|
23084
|
+
const comp = (0, import_react63.cloneElement)(component, {
|
|
23072
23085
|
key: componentKey
|
|
23073
23086
|
});
|
|
23074
23087
|
if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {
|
|
23075
23088
|
return comp;
|
|
23076
23089
|
}
|
|
23077
23090
|
function Componentized() {
|
|
23078
|
-
return (0,
|
|
23091
|
+
return (0, import_react63.createElement)(import_react63.Fragment, null, comp);
|
|
23079
23092
|
}
|
|
23080
|
-
return (0,
|
|
23093
|
+
return (0, import_react63.createElement)(Componentized);
|
|
23081
23094
|
};
|
|
23082
23095
|
var generateArrayComponents = (components, translation) => components.map((c2, index) => fixComponentProps(c2, index, translation));
|
|
23083
23096
|
var generateObjectComponents = (components, translation) => {
|
|
@@ -23166,12 +23179,12 @@ function Trans({
|
|
|
23166
23179
|
const generatedComponents = generateComponents(components, translation, i18n, i18nKey);
|
|
23167
23180
|
const content = renderNodes(generatedComponents || children, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
|
|
23168
23181
|
const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;
|
|
23169
|
-
return useAsParent ? (0,
|
|
23182
|
+
return useAsParent ? (0, import_react63.createElement)(useAsParent, additionalProps, content) : content;
|
|
23170
23183
|
}
|
|
23171
23184
|
|
|
23172
23185
|
// ../../node_modules/react-i18next/dist/es/context.js
|
|
23173
23186
|
init_esm_shims();
|
|
23174
|
-
var
|
|
23187
|
+
var import_react64 = __toESM(require_react(), 1);
|
|
23175
23188
|
|
|
23176
23189
|
// ../../node_modules/react-i18next/dist/es/initReactI18next.js
|
|
23177
23190
|
init_esm_shims();
|
|
@@ -23184,7 +23197,7 @@ var initReactI18next = {
|
|
|
23184
23197
|
};
|
|
23185
23198
|
|
|
23186
23199
|
// ../../node_modules/react-i18next/dist/es/context.js
|
|
23187
|
-
var I18nContext = (0,
|
|
23200
|
+
var I18nContext = (0, import_react64.createContext)();
|
|
23188
23201
|
var ReportNamespaces = class {
|
|
23189
23202
|
constructor() {
|
|
23190
23203
|
this.usedNamespaces = {};
|
|
@@ -23219,7 +23232,7 @@ function Trans2({
|
|
|
23219
23232
|
const {
|
|
23220
23233
|
i18n: i18nFromContext,
|
|
23221
23234
|
defaultNS: defaultNSFromContext
|
|
23222
|
-
} = (0,
|
|
23235
|
+
} = (0, import_react65.useContext)(I18nContext) || {};
|
|
23223
23236
|
const i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
23224
23237
|
const t3 = tFromProps || i18n?.t.bind(i18n);
|
|
23225
23238
|
return Trans({
|
|
@@ -23242,16 +23255,16 @@ function Trans2({
|
|
|
23242
23255
|
|
|
23243
23256
|
// ../../node_modules/react-i18next/dist/es/useTranslation.js
|
|
23244
23257
|
init_esm_shims();
|
|
23245
|
-
var
|
|
23258
|
+
var import_react66 = __toESM(require_react(), 1);
|
|
23246
23259
|
var usePrevious = (value2, ignore) => {
|
|
23247
|
-
const ref = (0,
|
|
23248
|
-
(0,
|
|
23260
|
+
const ref = (0, import_react66.useRef)();
|
|
23261
|
+
(0, import_react66.useEffect)(() => {
|
|
23249
23262
|
ref.current = ignore ? ref.current : value2;
|
|
23250
23263
|
}, [value2, ignore]);
|
|
23251
23264
|
return ref.current;
|
|
23252
23265
|
};
|
|
23253
23266
|
var alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
|
|
23254
|
-
var useMemoizedT = (i18n, language, namespace, keyPrefix) => (0,
|
|
23267
|
+
var useMemoizedT = (i18n, language, namespace, keyPrefix) => (0, import_react66.useCallback)(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
|
|
23255
23268
|
var useTranslation = (ns, props = {}) => {
|
|
23256
23269
|
const {
|
|
23257
23270
|
i18n: i18nFromProps
|
|
@@ -23259,7 +23272,7 @@ var useTranslation = (ns, props = {}) => {
|
|
|
23259
23272
|
const {
|
|
23260
23273
|
i18n: i18nFromContext,
|
|
23261
23274
|
defaultNS: defaultNSFromContext
|
|
23262
|
-
} = (0,
|
|
23275
|
+
} = (0, import_react66.useContext)(I18nContext) || {};
|
|
23263
23276
|
const i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
23264
23277
|
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
|
|
23265
23278
|
if (!i18n) {
|
|
@@ -23292,12 +23305,12 @@ var useTranslation = (ns, props = {}) => {
|
|
|
23292
23305
|
const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
23293
23306
|
const getT = () => memoGetT;
|
|
23294
23307
|
const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
23295
|
-
const [t3, setT] = (0,
|
|
23308
|
+
const [t3, setT] = (0, import_react66.useState)(getT);
|
|
23296
23309
|
let joinedNS = namespaces.join();
|
|
23297
23310
|
if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
|
|
23298
23311
|
const previousJoinedNS = usePrevious(joinedNS);
|
|
23299
|
-
const isMounted = (0,
|
|
23300
|
-
(0,
|
|
23312
|
+
const isMounted = (0, import_react66.useRef)(true);
|
|
23313
|
+
(0, import_react66.useEffect)(() => {
|
|
23301
23314
|
const {
|
|
23302
23315
|
bindI18n,
|
|
23303
23316
|
bindI18nStore
|
|
@@ -23328,7 +23341,7 @@ var useTranslation = (ns, props = {}) => {
|
|
|
23328
23341
|
if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e2) => i18n.store.off(e2, boundReset));
|
|
23329
23342
|
};
|
|
23330
23343
|
}, [i18n, joinedNS]);
|
|
23331
|
-
(0,
|
|
23344
|
+
(0, import_react66.useEffect)(() => {
|
|
23332
23345
|
if (isMounted.current && ready) {
|
|
23333
23346
|
setT(getT);
|
|
23334
23347
|
}
|
|
@@ -23350,35 +23363,35 @@ var useTranslation = (ns, props = {}) => {
|
|
|
23350
23363
|
|
|
23351
23364
|
// ../../node_modules/react-i18next/dist/es/withTranslation.js
|
|
23352
23365
|
init_esm_shims();
|
|
23353
|
-
var
|
|
23366
|
+
var import_react67 = __toESM(require_react(), 1);
|
|
23354
23367
|
|
|
23355
23368
|
// ../../node_modules/react-i18next/dist/es/Translation.js
|
|
23356
23369
|
init_esm_shims();
|
|
23357
23370
|
|
|
23358
23371
|
// ../../node_modules/react-i18next/dist/es/I18nextProvider.js
|
|
23359
23372
|
init_esm_shims();
|
|
23360
|
-
var
|
|
23373
|
+
var import_react68 = __toESM(require_react(), 1);
|
|
23361
23374
|
function I18nextProvider({
|
|
23362
23375
|
i18n,
|
|
23363
23376
|
defaultNS,
|
|
23364
23377
|
children
|
|
23365
23378
|
}) {
|
|
23366
|
-
const value2 = (0,
|
|
23379
|
+
const value2 = (0, import_react68.useMemo)(() => ({
|
|
23367
23380
|
i18n,
|
|
23368
23381
|
defaultNS
|
|
23369
23382
|
}), [i18n, defaultNS]);
|
|
23370
|
-
return (0,
|
|
23383
|
+
return (0, import_react68.createElement)(I18nContext.Provider, {
|
|
23371
23384
|
value: value2
|
|
23372
23385
|
}, children);
|
|
23373
23386
|
}
|
|
23374
23387
|
|
|
23375
23388
|
// ../../node_modules/react-i18next/dist/es/withSSR.js
|
|
23376
23389
|
init_esm_shims();
|
|
23377
|
-
var
|
|
23390
|
+
var import_react70 = __toESM(require_react(), 1);
|
|
23378
23391
|
|
|
23379
23392
|
// ../../node_modules/react-i18next/dist/es/useSSR.js
|
|
23380
23393
|
init_esm_shims();
|
|
23381
|
-
var
|
|
23394
|
+
var import_react69 = __toESM(require_react(), 1);
|
|
23382
23395
|
|
|
23383
23396
|
// ../cli-i18n/src/create-i18n.ts
|
|
23384
23397
|
init_esm_shims();
|
|
@@ -29135,8 +29148,8 @@ var I18nProvider = ({
|
|
|
29135
29148
|
messages,
|
|
29136
29149
|
i18n: initialI18n
|
|
29137
29150
|
}) => {
|
|
29138
|
-
const [i18n] = (0,
|
|
29139
|
-
return /* @__PURE__ */
|
|
29151
|
+
const [i18n] = (0, import_react71.useState)(() => initialI18n ?? createI18n(messages));
|
|
29152
|
+
return /* @__PURE__ */ import_react71.default.createElement(I18nextProvider, { i18n }, children);
|
|
29140
29153
|
};
|
|
29141
29154
|
|
|
29142
29155
|
// ../cli-i18n/src/index.ts
|
|
@@ -29174,6 +29187,7 @@ export {
|
|
|
29174
29187
|
PointerIcon,
|
|
29175
29188
|
PointerSmallIcon,
|
|
29176
29189
|
SuccessIcon,
|
|
29190
|
+
Learn,
|
|
29177
29191
|
InputLabel,
|
|
29178
29192
|
ConfirmInput,
|
|
29179
29193
|
SelectOptionAvailability,
|
|
@@ -29244,4 +29258,4 @@ react-reconciler/cjs/react-reconciler-constants.production.min.js:
|
|
|
29244
29258
|
* LICENSE file in the root directory of this source tree.
|
|
29245
29259
|
*)
|
|
29246
29260
|
*/
|
|
29247
|
-
//# sourceMappingURL=chunk-
|
|
29261
|
+
//# sourceMappingURL=chunk-XCKLCHGL.js.map
|