@rxdrag/website-studio 0.0.46 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/StatusBar/TaskManger.d.ts +1 -0
- package/dist/components/StatusBar/TaskTable.d.ts +1 -0
- package/dist/{cssMode-93ea5c72.js → cssMode-e235f5c4.js} +3 -3
- package/dist/{cssMode-93ea5c72.js.map → cssMode-e235f5c4.js.map} +1 -1
- package/dist/{freemarker2-38ffe93b.js → freemarker2-775aff18.js} +3 -3
- package/dist/{freemarker2-38ffe93b.js.map → freemarker2-775aff18.js.map} +1 -1
- package/dist/{handlebars-03fa2b48.js → handlebars-46315f0e.js} +3 -3
- package/dist/{handlebars-03fa2b48.js.map → handlebars-46315f0e.js.map} +1 -1
- package/dist/hooks/useTranslateTheme.d.ts +1 -1
- package/dist/{html-98032dab.js → html-ed8824db.js} +3 -3
- package/dist/{html-98032dab.js.map → html-ed8824db.js.map} +1 -1
- package/dist/{htmlMode-17c79d22.js → htmlMode-6d3a7f40.js} +3 -3
- package/dist/{htmlMode-17c79d22.js.map → htmlMode-6d3a7f40.js.map} +1 -1
- package/dist/{index-a36e35b9.js → index-aaa4e570.js} +336 -44
- package/dist/{index-a36e35b9.js.map → index-aaa4e570.js.map} +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{javascript-59dea486.js → javascript-c0d8cc8b.js} +4 -4
- package/dist/{javascript-59dea486.js.map → javascript-c0d8cc8b.js.map} +1 -1
- package/dist/{jsonMode-e0ecfacb.js → jsonMode-165aee85.js} +3 -3
- package/dist/{jsonMode-e0ecfacb.js.map → jsonMode-165aee85.js.map} +1 -1
- package/dist/{liquid-82e66f78.js → liquid-fd914edd.js} +3 -3
- package/dist/{liquid-82e66f78.js.map → liquid-fd914edd.js.map} +1 -1
- package/dist/{mdx-1bea00b6.js → mdx-5e7a0f83.js} +3 -3
- package/dist/{mdx-1bea00b6.js.map → mdx-5e7a0f83.js.map} +1 -1
- package/dist/{python-cb42d146.js → python-e1d6d047.js} +3 -3
- package/dist/{python-cb42d146.js.map → python-e1d6d047.js.map} +1 -1
- package/dist/{razor-88e2f64e.js → razor-e15c6655.js} +3 -3
- package/dist/{razor-88e2f64e.js.map → razor-e15c6655.js.map} +1 -1
- package/dist/{tsMode-7ddadd61.js → tsMode-2f97f8d8.js} +3 -3
- package/dist/{tsMode-7ddadd61.js.map → tsMode-2f97f8d8.js.map} +1 -1
- package/dist/{typescript-c6ee2621.js → typescript-0b9ed5c9.js} +3 -3
- package/dist/{typescript-c6ee2621.js.map → typescript-0b9ed5c9.js.map} +1 -1
- package/dist/{xml-366a61e0.js → xml-4e563c2c.js} +3 -3
- package/dist/{xml-366a61e0.js.map → xml-4e563c2c.js.map} +1 -1
- package/dist/{yaml-d854ca5f.js → yaml-c9882143.js} +3 -3
- package/dist/{yaml-d854ca5f.js.map → yaml-c9882143.js.map} +1 -1
- package/package.json +20 -20
|
@@ -7,8 +7,8 @@ var __publicField = (obj, key2, value) => {
|
|
|
7
7
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i2, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$2, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa;
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import React__default, { createContext, useContext, useMemo, memo, useEffect, useCallback, useState, useRef, forwardRef as forwardRef$2, Component, useImperativeHandle, isValidElement, cloneElement } from "react";
|
|
10
|
-
import { ThemeFields, PageQueryOptions, PageFields, FrontComponentQueryOptions, FrontComponentFields, ComponentCategoryFields, SectionTemplateQueryOptions, SectionTemplateFields, ComponentCategoryQueryOptions, TemplateCategoryQueryOptions, TemplateCategoryFields, ThemeQueryOptions, StyleConfigFields, LangFields, ThemeConfigQueryOptions, ThemeConfigFields, PageAssciations, PageType, ProductCategoryEntityName, ProductCategoryQueryOptions, ProductCategoryFields, ProductQueryOptions, ProductFields, PublishableStatus, websiteToInput, LangQueryOptions, WebsiteAssciations, ExtendFieldType, ThemeConfigAssciations, MediaQueryOptions, WebsiteSettingsQueryOptions, WebsiteSettingsFields, themeConfigToInputCascade, ThemeConfigEntityName, MediaType, themeConfigToInput, websiteSettingsToInput, WebsiteSettingsEntityName, WebsiteSettingsAssciations, PageEntityName, ThemeEntityName, themeToInputCascade, ThemeCategoryFields, themeToInput, frontComponentToInput, sectionTemplateToInput, pageToInputCascade, ComponentCategoryEntityName, SectionTemplateEntityName, FrontComponentEntityName, PageMetaFields, pageToInput, PageMetaAssciations, componentCategoryToInput, TemplateCategoryEntityName, templateCategoryToInput } from "@rxdrag/rxcms-models";
|
|
11
|
-
import { GlobalLoading, EntityForm, SubmitButton, useListData, SearchInput, EntityPagination, useIsLoading, QueryListScope, useRemoveRow, useEditRow, EntityEditModal, useSelectionsState,
|
|
10
|
+
import { ThemeFields, PageQueryOptions, PageFields, FrontComponentQueryOptions, FrontComponentFields, ComponentCategoryFields, SectionTemplateQueryOptions, SectionTemplateFields, ComponentCategoryQueryOptions, TemplateCategoryQueryOptions, TemplateCategoryFields, ThemeQueryOptions, StyleConfigFields, LangFields, ThemeConfigQueryOptions, ThemeConfigFields, PageAssciations, PageType, ProductCategoryEntityName, ProductCategoryQueryOptions, ProductCategoryFields, ProductQueryOptions, ProductFields, PublishableStatus, websiteToInput, LangQueryOptions, WebsiteAssciations, ExtendFieldType, ThemeConfigAssciations, MediaQueryOptions, WebsiteSettingsQueryOptions, WebsiteSettingsFields, themeConfigToInputCascade, ThemeConfigEntityName, MediaType, themeConfigToInput, websiteSettingsToInput, WebsiteSettingsEntityName, WebsiteSettingsAssciations, PageEntityName, ThemeEntityName, themeToInputCascade, ThemeCategoryFields, themeToInput, frontComponentToInput, sectionTemplateToInput, pageToInputCascade, ComponentCategoryEntityName, SectionTemplateEntityName, FrontComponentEntityName, TaskFields, TaskStatus, TaskQueryOptions, AppModule, PageMetaFields, pageToInput, PageMetaAssciations, componentCategoryToInput, TemplateCategoryEntityName, templateCategoryToInput } from "@rxdrag/rxcms-models";
|
|
11
|
+
import { GlobalLoading, EntityForm, SubmitButton, useListData, SearchInput, EntityPagination, useIsLoading, QueryListScope, EditButton, RemoveButton, EntityTable, useRemoveRow, useEditRow, EntityEditModal, useSelectionsState, EntityListScope, NewButton, EntityRowScope, EntitySelectField, useNewRow } from "@rxdrag/rxcms-models-ui";
|
|
12
12
|
import { useOneTheme, usePageList, useTemplateCategoryList, useSectionTemplateList, useComponentCategoryList, useFrontComponentList, useOneThemeById, useUpsertOneWebsite, useDeleteThemeById, useUpsertOneTheme, useLangList, useOneWebsiteSettings, useOneThemeConfig, useUpsertOneThemeConfig, useUpsertOneWebsiteSettings, useUpsertOnePage, useUpsertOneFrontComponent, useUpsertOneSectionTemplate, useDeletePageById } from "@rxdrag/rxcms-model-hooks";
|
|
13
13
|
import { newPageMetaOptions, useWebsite, useCurrentLang, ComponentType, currentLangState, useCurrentLangId, MediaSingleSelectField, FullImageSelectField, useSiteId, usePreviewUrl, LangSelect, TitleAndSlug, TitleViewField, DescriptionViewField, SiteRoot } from "@rxdrag/biz-components";
|
|
14
14
|
import { parseExpressionValue, isExpression, extractVariables, compileCode, AsyncFunction, transformCodeToSchema, transformSchemaToCode } from "@rxdrag/astro-compiler";
|
|
@@ -20,7 +20,7 @@ import { isHTMLElement as isHTMLElement$1, isStr } from "@rxdrag/shared";
|
|
|
20
20
|
import { isFunction as isFunction$2, debounce, keys, uniqueId } from "lodash-es";
|
|
21
21
|
import { useEntifyEndpoint, useEntifyToken, useLazyQueryEntityList, useLazyQueryOneEntity, emitEntityChange, useCreateEntityClient } from "@rxdrag/entify-hooks";
|
|
22
22
|
import dayjs from "dayjs";
|
|
23
|
-
import { ErrorBoundary, ColorPicker, useSave, CheckCircleIcon as CheckCircleIcon$1, CloseIcon, ModalBody, AddIcon as AddIcon$1, AiStarIcon, ConfirmDialog, SettingsIcon, ModalFooter, FavouriteIcon, LightIcon, DarkIcon, EditIcon, TextInput, Drawer, ModalHeader, ModalClose, SearchIcon, ModalContent as ModalContent$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1, MonacoEditor, getTheFile, MoreIcon, LanguageIcon, SeoIcon, AiIcon, SettingsMinimalisticIcon, CodeSquareIcon, DownloadIcon, UploadIcon, StyledTooltip, PlayIcon, Logo, GlobalIcon, SnsIcon, LightBoltIcon, WarningIcon, PinIcon, PredefinedColorPicker, PagesIcon, WidgetIcon, LeafNode, GroupNode, TreeView, DesignIcon, RemoveIcon, ResetIcon, TaskStopIcon, ImportIcon, AstroIcon, AddFolderIcon, TemplateIcon, AddTemplateIcon } from "@rxdrag/rxcms-common";
|
|
23
|
+
import { ErrorBoundary, ColorPicker, useSave, CheckCircleIcon as CheckCircleIcon$1, CloseIcon, ModalBody, AddIcon as AddIcon$1, AiStarIcon, ConfirmDialog, SettingsIcon, ModalFooter, FavouriteIcon, LightIcon, DarkIcon, EditIcon, TextInput, Drawer, ModalHeader, ModalClose, SearchIcon, ModalContent as ModalContent$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1, MonacoEditor, getTheFile, MoreIcon, LanguageIcon, SeoIcon, AiIcon, SettingsMinimalisticIcon, CodeSquareIcon, DownloadIcon, UploadIcon, StyledTooltip, PlayIcon, Logo, GlobalIcon, SnsIcon, LightBoltIcon, TaskIcon, TaskErrorIcon, TaskSuspendIcon, WarningIcon, PinIcon, PredefinedColorPicker, PagesIcon, WidgetIcon, LeafNode, GroupNode, TreeView, DesignIcon, RemoveIcon, ResetIcon, TaskStopIcon, ImportIcon, AstroIcon, AddFolderIcon, TemplateIcon, AddTemplateIcon } from "@rxdrag/rxcms-common";
|
|
24
24
|
import { PageLoader, PopoverController, ModalController, AnimateController, TabsController, NumberController, FlipController, CollapseController, AosController } from "@rxdrag/website-lib-core";
|
|
25
25
|
import gsap$2 from "gsap";
|
|
26
26
|
import { Input, Textarea, StringArrayInput, ImageSelect, TargetSetter, propSetters, DeviceBreakpoints, DeviceContext } from "@rxdrag/schema-setters";
|
|
@@ -38,8 +38,8 @@ import { motion, AnimatePresence, LazyMotion, m } from "framer-motion";
|
|
|
38
38
|
import $4AOtR$reactdom, { createPortal } from "react-dom";
|
|
39
39
|
import { DeployType, useExportWebsite as useExportWebsite$1 } from "@rxdrag/code-generator";
|
|
40
40
|
import { ComponentRender } from "@rxdrag/react-runner-pro";
|
|
41
|
-
import { TaskManager, useInprogressTaskByKey, useUpdateTask, taskPool, ResetPageTask, ImportPagesTask, ImportComponentsTask } from "@rxdrag/ai-tasks";
|
|
42
41
|
import tinycolor from "tinycolor2";
|
|
42
|
+
import { useInprogressTaskByKey, useUpdateTask, taskPool, ResetPageTask, ImportPagesTask, ImportComponentsTask } from "@rxdrag/ai-tasks";
|
|
43
43
|
var jsxRuntime = { exports: {} };
|
|
44
44
|
var reactJsxRuntime_production_min = {};
|
|
45
45
|
/**
|
|
@@ -6676,17 +6676,76 @@ function useTranslateTheme() {
|
|
|
6676
6676
|
const website = useWebsite();
|
|
6677
6677
|
const translate = useCallback(
|
|
6678
6678
|
async (langId, title) => {
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6679
|
+
var _a3, _b3;
|
|
6680
|
+
if (!(langId == null ? void 0 : langId.trim())) {
|
|
6681
|
+
throw new Error("语言ID不能为空");
|
|
6682
|
+
}
|
|
6683
|
+
if (!(title == null ? void 0 : title.trim())) {
|
|
6684
|
+
throw new Error("标题不能为空");
|
|
6685
|
+
}
|
|
6686
|
+
if (!token) {
|
|
6687
|
+
throw new Error("用户未登录或token已过期");
|
|
6688
|
+
}
|
|
6689
|
+
if (!(website == null ? void 0 : website.id)) {
|
|
6690
|
+
throw new Error("未找到网站信息");
|
|
6691
|
+
}
|
|
6692
|
+
if (!baseURL) {
|
|
6693
|
+
throw new Error("AI服务URL未配置");
|
|
6694
|
+
}
|
|
6695
|
+
try {
|
|
6696
|
+
const http = createHttpClient({ baseURL, token });
|
|
6697
|
+
const response = await http.post("/api/studio/translate-theme", {
|
|
6698
|
+
websiteId: website.id,
|
|
6699
|
+
langId: langId.trim(),
|
|
6700
|
+
title: title.trim()
|
|
6701
|
+
});
|
|
6702
|
+
console.log("翻译主题成功:", response);
|
|
6703
|
+
return response;
|
|
6704
|
+
} catch (error) {
|
|
6705
|
+
const isErrorObject = (err) => {
|
|
6706
|
+
return typeof err === "object" && err !== null;
|
|
6707
|
+
};
|
|
6708
|
+
if (isErrorObject(error) && (error.code === "NETWORK_ERROR" || ((_a3 = error.message) == null ? void 0 : _a3.includes("fetch")))) {
|
|
6709
|
+
console.error("翻译主题网络错误:", error);
|
|
6710
|
+
throw new Error("网络连接失败,请检查网络连接");
|
|
6711
|
+
}
|
|
6712
|
+
if (isErrorObject(error) && ((_b3 = error.response) == null ? void 0 : _b3.status)) {
|
|
6713
|
+
const status2 = error.response.status;
|
|
6714
|
+
let errorMsg2 = "翻译请求失败";
|
|
6715
|
+
switch (status2) {
|
|
6716
|
+
case 400:
|
|
6717
|
+
errorMsg2 = "请求参数错误";
|
|
6718
|
+
break;
|
|
6719
|
+
case 401:
|
|
6720
|
+
errorMsg2 = "认证失败,请重新登录";
|
|
6721
|
+
break;
|
|
6722
|
+
case 403:
|
|
6723
|
+
errorMsg2 = "没有权限执行此操作";
|
|
6724
|
+
break;
|
|
6725
|
+
case 404:
|
|
6726
|
+
errorMsg2 = "翻译服务不存在";
|
|
6727
|
+
break;
|
|
6728
|
+
case 429:
|
|
6729
|
+
errorMsg2 = "请求过于频繁,请稍后再试";
|
|
6730
|
+
break;
|
|
6731
|
+
case 500:
|
|
6732
|
+
errorMsg2 = "服务器内部错误";
|
|
6733
|
+
break;
|
|
6734
|
+
case 502:
|
|
6735
|
+
case 503:
|
|
6736
|
+
case 504:
|
|
6737
|
+
errorMsg2 = "服务暂时不可用,请稍后再试";
|
|
6738
|
+
break;
|
|
6739
|
+
default:
|
|
6740
|
+
errorMsg2 = `请求失败 (${status2})`;
|
|
6741
|
+
}
|
|
6742
|
+
console.error("翻译主题HTTP错误:", { status: status2, error });
|
|
6743
|
+
throw new Error(errorMsg2);
|
|
6744
|
+
}
|
|
6745
|
+
const errorMsg = isErrorObject(error) && error.message ? error.message : "翻译过程中发生未知错误";
|
|
6746
|
+
console.error("翻译主题未知错误:", error);
|
|
6747
|
+
throw new Error(errorMsg);
|
|
6682
6748
|
}
|
|
6683
|
-
const http = createHttpClient({ baseURL, token });
|
|
6684
|
-
const response = await http.post("/api/studio/translate-theme", {
|
|
6685
|
-
websiteId: website == null ? void 0 : website.id,
|
|
6686
|
-
langId,
|
|
6687
|
-
title
|
|
6688
|
-
});
|
|
6689
|
-
console.log("translate response", response);
|
|
6690
6749
|
},
|
|
6691
6750
|
[baseURL, token, website == null ? void 0 : website.id]
|
|
6692
6751
|
);
|
|
@@ -6762,6 +6821,7 @@ function MultiLangPanel() {
|
|
|
6762
6821
|
const [linkType, setLinkType] = useState("subdomain");
|
|
6763
6822
|
const [confirmOpen, setConfirmOpen] = useState(false);
|
|
6764
6823
|
const [currentLangId, setCurrentLangId] = useCurrentLangId();
|
|
6824
|
+
const setError = useEntifyWrapperStore((state) => state.setGlobalError);
|
|
6765
6825
|
const selectedContent = useStudioStore((state) => state.selectedContent);
|
|
6766
6826
|
const setSelectedContent = useStudioStore(
|
|
6767
6827
|
(state) => state.setSelectedContent
|
|
@@ -6861,16 +6921,22 @@ function MultiLangPanel() {
|
|
|
6861
6921
|
const handleCloseConfirm = useCallback(() => {
|
|
6862
6922
|
setConfirmOpen(false);
|
|
6863
6923
|
}, []);
|
|
6864
|
-
const handleConfirm = useCallback(() => {
|
|
6924
|
+
const handleConfirm = useCallback(async () => {
|
|
6865
6925
|
var _a4;
|
|
6866
6926
|
if (!currentLangId) {
|
|
6867
6927
|
console.error("No currentLang");
|
|
6868
6928
|
return;
|
|
6869
6929
|
}
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6930
|
+
try {
|
|
6931
|
+
const lang = (_a4 = allLangs == null ? void 0 : allLangs.items) == null ? void 0 : _a4.find((lang2) => lang2.id === currentLangId);
|
|
6932
|
+
const title = `网站代码翻译到:${(lang == null ? void 0 : lang.cnName) || (lang == null ? void 0 : lang.enName) || (lang == null ? void 0 : lang.localName) || (lang == null ? void 0 : lang.abbr) || ""}`;
|
|
6933
|
+
await translateTheme(currentLangId, title);
|
|
6934
|
+
} catch (error) {
|
|
6935
|
+
console.error("翻译主题失败:", error);
|
|
6936
|
+
const errorString = error instanceof Error ? error.message : String(error);
|
|
6937
|
+
setError(errorString);
|
|
6938
|
+
}
|
|
6939
|
+
}, [currentLangId, allLangs == null ? void 0 : allLangs.items, translateTheme, setError]);
|
|
6874
6940
|
const isRunning = false;
|
|
6875
6941
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
6876
6942
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ModalBody, { className: "flex-1 p-4 min-h-0 overflow-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
@@ -138222,7 +138288,7 @@ registerLanguage({
|
|
|
138222
138288
|
aliases: ["FreeMarker2", "Apache FreeMarker2"],
|
|
138223
138289
|
loader: () => {
|
|
138224
138290
|
{
|
|
138225
|
-
return import("./freemarker2-
|
|
138291
|
+
return import("./freemarker2-775aff18.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
138226
138292
|
}
|
|
138227
138293
|
}
|
|
138228
138294
|
});
|
|
@@ -138231,7 +138297,7 @@ registerLanguage({
|
|
|
138231
138297
|
aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
|
|
138232
138298
|
loader: () => {
|
|
138233
138299
|
{
|
|
138234
|
-
return import("./freemarker2-
|
|
138300
|
+
return import("./freemarker2-775aff18.js").then((m2) => m2.TagAngleInterpolationDollar);
|
|
138235
138301
|
}
|
|
138236
138302
|
}
|
|
138237
138303
|
});
|
|
@@ -138240,7 +138306,7 @@ registerLanguage({
|
|
|
138240
138306
|
aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
|
|
138241
138307
|
loader: () => {
|
|
138242
138308
|
{
|
|
138243
|
-
return import("./freemarker2-
|
|
138309
|
+
return import("./freemarker2-775aff18.js").then((m2) => m2.TagBracketInterpolationDollar);
|
|
138244
138310
|
}
|
|
138245
138311
|
}
|
|
138246
138312
|
});
|
|
@@ -138249,7 +138315,7 @@ registerLanguage({
|
|
|
138249
138315
|
aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
|
|
138250
138316
|
loader: () => {
|
|
138251
138317
|
{
|
|
138252
|
-
return import("./freemarker2-
|
|
138318
|
+
return import("./freemarker2-775aff18.js").then((m2) => m2.TagAngleInterpolationBracket);
|
|
138253
138319
|
}
|
|
138254
138320
|
}
|
|
138255
138321
|
});
|
|
@@ -138258,7 +138324,7 @@ registerLanguage({
|
|
|
138258
138324
|
aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
|
|
138259
138325
|
loader: () => {
|
|
138260
138326
|
{
|
|
138261
|
-
return import("./freemarker2-
|
|
138327
|
+
return import("./freemarker2-775aff18.js").then((m2) => m2.TagBracketInterpolationBracket);
|
|
138262
138328
|
}
|
|
138263
138329
|
}
|
|
138264
138330
|
});
|
|
@@ -138267,7 +138333,7 @@ registerLanguage({
|
|
|
138267
138333
|
aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
|
|
138268
138334
|
loader: () => {
|
|
138269
138335
|
{
|
|
138270
|
-
return import("./freemarker2-
|
|
138336
|
+
return import("./freemarker2-775aff18.js").then((m2) => m2.TagAutoInterpolationDollar);
|
|
138271
138337
|
}
|
|
138272
138338
|
}
|
|
138273
138339
|
});
|
|
@@ -138276,7 +138342,7 @@ registerLanguage({
|
|
|
138276
138342
|
aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
|
|
138277
138343
|
loader: () => {
|
|
138278
138344
|
{
|
|
138279
|
-
return import("./freemarker2-
|
|
138345
|
+
return import("./freemarker2-775aff18.js").then((m2) => m2.TagAutoInterpolationBracket);
|
|
138280
138346
|
}
|
|
138281
138347
|
}
|
|
138282
138348
|
});
|
|
@@ -138326,7 +138392,7 @@ registerLanguage({
|
|
|
138326
138392
|
mimetypes: ["text/x-handlebars-template"],
|
|
138327
138393
|
loader: () => {
|
|
138328
138394
|
{
|
|
138329
|
-
return import("./handlebars-
|
|
138395
|
+
return import("./handlebars-46315f0e.js");
|
|
138330
138396
|
}
|
|
138331
138397
|
}
|
|
138332
138398
|
});
|
|
@@ -138359,7 +138425,7 @@ registerLanguage({
|
|
|
138359
138425
|
mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
|
|
138360
138426
|
loader: () => {
|
|
138361
138427
|
{
|
|
138362
|
-
return import("./html-
|
|
138428
|
+
return import("./html-ed8824db.js");
|
|
138363
138429
|
}
|
|
138364
138430
|
}
|
|
138365
138431
|
});
|
|
@@ -138412,7 +138478,7 @@ registerLanguage({
|
|
|
138412
138478
|
mimetypes: ["text/javascript"],
|
|
138413
138479
|
loader: () => {
|
|
138414
138480
|
{
|
|
138415
|
-
return import("./javascript-
|
|
138481
|
+
return import("./javascript-c0d8cc8b.js");
|
|
138416
138482
|
}
|
|
138417
138483
|
}
|
|
138418
138484
|
});
|
|
@@ -138511,7 +138577,7 @@ registerLanguage({
|
|
|
138511
138577
|
mimetypes: ["application/liquid"],
|
|
138512
138578
|
loader: () => {
|
|
138513
138579
|
{
|
|
138514
|
-
return import("./liquid-
|
|
138580
|
+
return import("./liquid-fd914edd.js");
|
|
138515
138581
|
}
|
|
138516
138582
|
}
|
|
138517
138583
|
});
|
|
@@ -138559,7 +138625,7 @@ registerLanguage({
|
|
|
138559
138625
|
aliases: ["MDX", "mdx"],
|
|
138560
138626
|
loader: () => {
|
|
138561
138627
|
{
|
|
138562
|
-
return import("./mdx-
|
|
138628
|
+
return import("./mdx-5e7a0f83.js");
|
|
138563
138629
|
}
|
|
138564
138630
|
}
|
|
138565
138631
|
});
|
|
@@ -138818,7 +138884,7 @@ registerLanguage({
|
|
|
138818
138884
|
firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
|
|
138819
138885
|
loader: () => {
|
|
138820
138886
|
{
|
|
138821
|
-
return import("./python-
|
|
138887
|
+
return import("./python-e1d6d047.js");
|
|
138822
138888
|
}
|
|
138823
138889
|
}
|
|
138824
138890
|
});
|
|
@@ -138867,7 +138933,7 @@ registerLanguage({
|
|
|
138867
138933
|
mimetypes: ["text/x-cshtml"],
|
|
138868
138934
|
loader: () => {
|
|
138869
138935
|
{
|
|
138870
|
-
return import("./razor-
|
|
138936
|
+
return import("./razor-e15c6655.js");
|
|
138871
138937
|
}
|
|
138872
138938
|
}
|
|
138873
138939
|
});
|
|
@@ -139203,7 +139269,7 @@ registerLanguage({
|
|
|
139203
139269
|
mimetypes: ["text/typescript"],
|
|
139204
139270
|
loader: () => {
|
|
139205
139271
|
{
|
|
139206
|
-
return import("./typescript-
|
|
139272
|
+
return import("./typescript-0b9ed5c9.js");
|
|
139207
139273
|
}
|
|
139208
139274
|
}
|
|
139209
139275
|
});
|
|
@@ -139287,7 +139353,7 @@ registerLanguage({
|
|
|
139287
139353
|
mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
|
|
139288
139354
|
loader: () => {
|
|
139289
139355
|
{
|
|
139290
|
-
return import("./xml-
|
|
139356
|
+
return import("./xml-4e563c2c.js");
|
|
139291
139357
|
}
|
|
139292
139358
|
}
|
|
139293
139359
|
});
|
|
@@ -139304,7 +139370,7 @@ registerLanguage({
|
|
|
139304
139370
|
mimetypes: ["application/x-yaml", "text/x-yaml"],
|
|
139305
139371
|
loader: () => {
|
|
139306
139372
|
{
|
|
139307
|
-
return import("./yaml-
|
|
139373
|
+
return import("./yaml-c9882143.js");
|
|
139308
139374
|
}
|
|
139309
139375
|
}
|
|
139310
139376
|
});
|
|
@@ -139428,7 +139494,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3(
|
|
|
139428
139494
|
monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
|
|
139429
139495
|
function getMode$3() {
|
|
139430
139496
|
{
|
|
139431
|
-
return import("./cssMode-
|
|
139497
|
+
return import("./cssMode-e235f5c4.js");
|
|
139432
139498
|
}
|
|
139433
139499
|
}
|
|
139434
139500
|
monaco_editor_core_exports$3.languages.onLanguage("less", () => {
|
|
@@ -139559,7 +139625,7 @@ monaco_editor_core_exports$2.languages.html = {
|
|
|
139559
139625
|
};
|
|
139560
139626
|
function getMode$2() {
|
|
139561
139627
|
{
|
|
139562
|
-
return import("./htmlMode-
|
|
139628
|
+
return import("./htmlMode-6d3a7f40.js");
|
|
139563
139629
|
}
|
|
139564
139630
|
}
|
|
139565
139631
|
function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
|
|
@@ -139657,7 +139723,7 @@ var getWorker = () => getMode$1().then((mode) => mode.getWorker());
|
|
|
139657
139723
|
monaco_editor_core_exports$1.languages.json = { jsonDefaults, getWorker };
|
|
139658
139724
|
function getMode$1() {
|
|
139659
139725
|
{
|
|
139660
|
-
return import("./jsonMode-
|
|
139726
|
+
return import("./jsonMode-165aee85.js");
|
|
139661
139727
|
}
|
|
139662
139728
|
}
|
|
139663
139729
|
monaco_editor_core_exports$1.languages.register({
|
|
@@ -139933,7 +139999,7 @@ monaco_editor_core_exports.languages.typescript = {
|
|
|
139933
139999
|
};
|
|
139934
140000
|
function getMode() {
|
|
139935
140001
|
{
|
|
139936
|
-
return import("./tsMode-
|
|
140002
|
+
return import("./tsMode-2f97f8d8.js");
|
|
139937
140003
|
}
|
|
139938
140004
|
}
|
|
139939
140005
|
monaco_editor_core_exports.languages.onLanguage("typescript", () => {
|
|
@@ -198455,11 +198521,202 @@ const RightPanel = memo(() => {
|
|
|
198455
198521
|
}
|
|
198456
198522
|
) }) });
|
|
198457
198523
|
});
|
|
198524
|
+
function TaskTable() {
|
|
198525
|
+
var _a3, _b3;
|
|
198526
|
+
const data = useListData();
|
|
198527
|
+
const cols = React.useMemo(() => {
|
|
198528
|
+
return [
|
|
198529
|
+
{
|
|
198530
|
+
dataIndex: TaskFields.name,
|
|
198531
|
+
key: TaskFields.name,
|
|
198532
|
+
title: "任务",
|
|
198533
|
+
width: 240,
|
|
198534
|
+
sortable: false,
|
|
198535
|
+
editable: false,
|
|
198536
|
+
cellRender: (text2, row) => {
|
|
198537
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
198538
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
198539
|
+
(row == null ? void 0 : row.status) === TaskStatus.A_Progress && /* @__PURE__ */ jsxRuntimeExports.jsx(TaskIcon, { className: "size-5 text-primary" }),
|
|
198540
|
+
(row == null ? void 0 : row.status) === TaskStatus.B_Failure && /* @__PURE__ */ jsxRuntimeExports.jsx(TaskErrorIcon, { className: "size-5 text-danger" }),
|
|
198541
|
+
(row == null ? void 0 : row.status) === TaskStatus.C_Pending && /* @__PURE__ */ jsxRuntimeExports.jsx(TaskSuspendIcon, { className: "size-5" })
|
|
198542
|
+
] }),
|
|
198543
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col", children: [
|
|
198544
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm", children: text2 }),
|
|
198545
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-xs text-default-500 flex items-center gap-1", children: [
|
|
198546
|
+
row == null ? void 0 : row.message,
|
|
198547
|
+
(row == null ? void 0 : row.status) === TaskStatus.A_Progress && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
198548
|
+
"svg",
|
|
198549
|
+
{
|
|
198550
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
198551
|
+
className: "size-4",
|
|
198552
|
+
viewBox: "0 0 24 24",
|
|
198553
|
+
children: [
|
|
198554
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("circle", { cx: "4", cy: "12", r: "3", fill: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198555
|
+
"animate",
|
|
198556
|
+
{
|
|
198557
|
+
id: "SVG7x14Dcom",
|
|
198558
|
+
fill: "freeze",
|
|
198559
|
+
attributeName: "opacity",
|
|
198560
|
+
begin: "0;SVGqSjG0dUp.end-0.25s",
|
|
198561
|
+
dur: "0.75s",
|
|
198562
|
+
values: "1;0.2"
|
|
198563
|
+
}
|
|
198564
|
+
) }),
|
|
198565
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198566
|
+
"circle",
|
|
198567
|
+
{
|
|
198568
|
+
cx: "12",
|
|
198569
|
+
cy: "12",
|
|
198570
|
+
r: "3",
|
|
198571
|
+
fill: "currentColor",
|
|
198572
|
+
opacity: "0.4",
|
|
198573
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198574
|
+
"animate",
|
|
198575
|
+
{
|
|
198576
|
+
fill: "freeze",
|
|
198577
|
+
attributeName: "opacity",
|
|
198578
|
+
begin: "SVG7x14Dcom.begin+0.15s",
|
|
198579
|
+
dur: "0.75s",
|
|
198580
|
+
values: "1;0.2"
|
|
198581
|
+
}
|
|
198582
|
+
)
|
|
198583
|
+
}
|
|
198584
|
+
),
|
|
198585
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198586
|
+
"circle",
|
|
198587
|
+
{
|
|
198588
|
+
cx: "20",
|
|
198589
|
+
cy: "12",
|
|
198590
|
+
r: "3",
|
|
198591
|
+
fill: "currentColor",
|
|
198592
|
+
opacity: "0.3",
|
|
198593
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198594
|
+
"animate",
|
|
198595
|
+
{
|
|
198596
|
+
id: "SVGqSjG0dUp",
|
|
198597
|
+
fill: "freeze",
|
|
198598
|
+
attributeName: "opacity",
|
|
198599
|
+
begin: "SVG7x14Dcom.begin+0.3s",
|
|
198600
|
+
dur: "0.75s",
|
|
198601
|
+
values: "1;0.2"
|
|
198602
|
+
}
|
|
198603
|
+
)
|
|
198604
|
+
}
|
|
198605
|
+
)
|
|
198606
|
+
]
|
|
198607
|
+
}
|
|
198608
|
+
)
|
|
198609
|
+
] })
|
|
198610
|
+
] })
|
|
198611
|
+
] });
|
|
198612
|
+
}
|
|
198613
|
+
},
|
|
198614
|
+
// {
|
|
198615
|
+
// dataIndex: UserFields.createdAt,
|
|
198616
|
+
// key: UserFields.createdAt,
|
|
198617
|
+
// title: "创建日期",
|
|
198618
|
+
// width: 160,
|
|
198619
|
+
// sortable: false,
|
|
198620
|
+
// cellRender: formatTimeCell,
|
|
198621
|
+
// },
|
|
198622
|
+
// {
|
|
198623
|
+
// dataIndex: UserFields.updatedAt,
|
|
198624
|
+
// key: UserFields.updatedAt,
|
|
198625
|
+
// title: "更新日期",
|
|
198626
|
+
// width: 160,
|
|
198627
|
+
// sortable: false,
|
|
198628
|
+
// cellRender: formatTimeCell,
|
|
198629
|
+
// },
|
|
198630
|
+
{
|
|
198631
|
+
key: "operate",
|
|
198632
|
+
width: 120,
|
|
198633
|
+
title: "操作",
|
|
198634
|
+
cellRender: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-0.5 items-center", children: [
|
|
198635
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(EditButton, { isIconOnly: true, size: "sm", variant: "light", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198636
|
+
Icon,
|
|
198637
|
+
{
|
|
198638
|
+
icon: "solar:pen-linear",
|
|
198639
|
+
className: "size-4 text-default-500"
|
|
198640
|
+
}
|
|
198641
|
+
) }),
|
|
198642
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(RemoveButton, { isIconOnly: true, size: "sm", variant: "light", color: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198643
|
+
Icon,
|
|
198644
|
+
{
|
|
198645
|
+
icon: "solar:trash-bin-minimalistic-linear",
|
|
198646
|
+
className: "size-4"
|
|
198647
|
+
}
|
|
198648
|
+
) })
|
|
198649
|
+
] })
|
|
198650
|
+
}
|
|
198651
|
+
];
|
|
198652
|
+
}, []);
|
|
198653
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198654
|
+
EntityTable,
|
|
198655
|
+
{
|
|
198656
|
+
"aria-label": "用户列表",
|
|
198657
|
+
columns: cols,
|
|
198658
|
+
removeWrapper: true,
|
|
198659
|
+
headerProps: {
|
|
198660
|
+
style: {
|
|
198661
|
+
padding: "12px 6px",
|
|
198662
|
+
display: "none"
|
|
198663
|
+
}
|
|
198664
|
+
},
|
|
198665
|
+
bottomContent: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
198666
|
+
!!((_a3 = data == null ? void 0 : data.items) == null ? void 0 : _a3.length) && ((_b3 = data == null ? void 0 : data.items) == null ? void 0 : _b3.length) < (data.total || 0) && /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { className: "opacity-30" }),
|
|
198667
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(EntityPagination, {})
|
|
198668
|
+
] })
|
|
198669
|
+
}
|
|
198670
|
+
) });
|
|
198671
|
+
}
|
|
198672
|
+
function TaskManager() {
|
|
198673
|
+
const [open, setOpen] = useState();
|
|
198674
|
+
const handleClose = useCallback(() => {
|
|
198675
|
+
setOpen(false);
|
|
198676
|
+
}, []);
|
|
198677
|
+
const handlePress = useCallback(() => {
|
|
198678
|
+
setOpen(true);
|
|
198679
|
+
}, []);
|
|
198680
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
198681
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198682
|
+
Button$2,
|
|
198683
|
+
{
|
|
198684
|
+
variant: "light",
|
|
198685
|
+
size: "sm",
|
|
198686
|
+
className: cn(
|
|
198687
|
+
"px-1 py-1 shrink-0"
|
|
198688
|
+
//runningTasks.length ? "text-default-600" : "text-default-500"
|
|
198689
|
+
),
|
|
198690
|
+
startContent: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex gap-1" }),
|
|
198691
|
+
onPress: handlePress,
|
|
198692
|
+
children: "任务"
|
|
198693
|
+
}
|
|
198694
|
+
),
|
|
198695
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
198696
|
+
Drawer,
|
|
198697
|
+
{
|
|
198698
|
+
isOpen: open,
|
|
198699
|
+
placement: "right",
|
|
198700
|
+
width: 600,
|
|
198701
|
+
className: "min-h-0",
|
|
198702
|
+
noOverlay: true,
|
|
198703
|
+
onClose: handleClose,
|
|
198704
|
+
children: [
|
|
198705
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ModalHeader, { className: "pr-2 h-12", children: [
|
|
198706
|
+
"任务管理器",
|
|
198707
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ModalClose, {})
|
|
198708
|
+
] }),
|
|
198709
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}),
|
|
198710
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ModalBody, { className: "flex flex-col gap-4 min-h-0 overflow-auto py-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(TaskTable, {}) })
|
|
198711
|
+
]
|
|
198712
|
+
}
|
|
198713
|
+
)
|
|
198714
|
+
] });
|
|
198715
|
+
}
|
|
198458
198716
|
function StatusBar({ doc }) {
|
|
198459
198717
|
const viewMode = useStudioStore((state) => state.viewMode);
|
|
198460
198718
|
const selectedContent = useStudioStore((state) => state.selectedContent);
|
|
198461
|
-
const
|
|
198462
|
-
const stableAppKey = useMemo(() => (theme == null ? void 0 : theme.id) || "", [theme == null ? void 0 : theme.id]);
|
|
198719
|
+
const website = useWebsite();
|
|
198463
198720
|
const breadcrumbsText = useMemo(() => {
|
|
198464
198721
|
var _a3;
|
|
198465
198722
|
return ((_a3 = selectedContent == null ? void 0 : selectedContent.breadcrumbs) == null ? void 0 : _a3.join("/")) || "";
|
|
@@ -198480,7 +198737,42 @@ function StatusBar({ doc }) {
|
|
|
198480
198737
|
] }),
|
|
198481
198738
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { className: "h-5 w-[2px]" })
|
|
198482
198739
|
] }),
|
|
198483
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198740
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
198741
|
+
QueryListScope,
|
|
198742
|
+
{
|
|
198743
|
+
defaultPageSize: 20,
|
|
198744
|
+
options: new TaskQueryOptions(
|
|
198745
|
+
[
|
|
198746
|
+
TaskFields.id,
|
|
198747
|
+
TaskFields.name,
|
|
198748
|
+
TaskFields.type,
|
|
198749
|
+
TaskFields.status,
|
|
198750
|
+
TaskFields.message,
|
|
198751
|
+
TaskFields.createdAt,
|
|
198752
|
+
TaskFields.updatedAt
|
|
198753
|
+
],
|
|
198754
|
+
{
|
|
198755
|
+
where: {
|
|
198756
|
+
[TaskFields.websiteId]: {
|
|
198757
|
+
_eq: website == null ? void 0 : website.id
|
|
198758
|
+
},
|
|
198759
|
+
[TaskFields.module]: {
|
|
198760
|
+
_eq: AppModule.Studio
|
|
198761
|
+
}
|
|
198762
|
+
},
|
|
198763
|
+
orderBy: [
|
|
198764
|
+
{
|
|
198765
|
+
status: "asc"
|
|
198766
|
+
},
|
|
198767
|
+
{
|
|
198768
|
+
createdAt: "desc"
|
|
198769
|
+
}
|
|
198770
|
+
]
|
|
198771
|
+
}
|
|
198772
|
+
).setNoQuery(!(website == null ? void 0 : website.id)),
|
|
198773
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(TaskManager, {})
|
|
198774
|
+
}
|
|
198775
|
+
)
|
|
198484
198776
|
] })
|
|
198485
198777
|
]
|
|
198486
198778
|
}
|
|
@@ -203919,4 +204211,4 @@ export {
|
|
|
203919
204211
|
typescriptDefaults as t,
|
|
203920
204212
|
useCustomizedMaterials as u
|
|
203921
204213
|
};
|
|
203922
|
-
//# sourceMappingURL=index-
|
|
204214
|
+
//# sourceMappingURL=index-aaa4e570.js.map
|