@nocobase/client 2.0.0-alpha.2 → 2.0.0-alpha.3
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/es/index.mjs +45 -29
- package/es/nocobase-buildin-plugin/index.d.ts +7 -0
- package/lib/index-C3fHjsMw-DwoPC866.js +2081 -0
- package/lib/index.js +8 -8
- package/package.json +10 -5
- package/lib/index-C3fHjsMw-mwRBOzGB.js +0 -1977
package/es/index.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var we = Object.getOwnPropertySymbols,
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var ze = Object.defineProperty, _e = Object.defineProperties;
|
|
2
|
+
var Ue = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var we = Object.getOwnPropertySymbols, Ge = Object.getPrototypeOf, Ve = Object.prototype.hasOwnProperty, qe = Object.prototype.propertyIsEnumerable, He = Reflect.get;
|
|
4
|
+
var Le = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e);
|
|
5
|
+
var Be = (e, t, o) => t in e ? ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, f = (e, t) => {
|
|
6
6
|
for (var o in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
Ve.call(t, o) && Be(e, o, t[o]);
|
|
8
8
|
if (we)
|
|
9
9
|
for (var o of we(t))
|
|
10
|
-
|
|
10
|
+
qe.call(t, o) && Be(e, o, t[o]);
|
|
11
11
|
return e;
|
|
12
|
-
}, I = (e, t) =>
|
|
12
|
+
}, I = (e, t) => _e(e, Ue(t));
|
|
13
13
|
var W = (e, t) => {
|
|
14
14
|
var o = {};
|
|
15
15
|
for (var n in e)
|
|
16
|
-
|
|
16
|
+
Ve.call(e, n) && t.indexOf(n) < 0 && (o[n] = e[n]);
|
|
17
17
|
if (e != null && we)
|
|
18
18
|
for (var n of we(e))
|
|
19
|
-
t.indexOf(n) < 0 &&
|
|
19
|
+
t.indexOf(n) < 0 && qe.call(e, n) && (o[n] = e[n]);
|
|
20
20
|
return o;
|
|
21
21
|
};
|
|
22
|
-
var k = (e, t, o) => (
|
|
23
|
-
var Se = (e, t, o) => Ge(
|
|
22
|
+
var k = (e, t, o) => (Be(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
23
|
+
var Se = (e, t, o) => He(Ge(e), o, t);
|
|
24
24
|
var E = (e, t, o) => new Promise((n, r) => {
|
|
25
25
|
var i = (c) => {
|
|
26
26
|
try {
|
|
@@ -37,7 +37,7 @@ var E = (e, t, o) => new Promise((n, r) => {
|
|
|
37
37
|
}, l = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(i, a);
|
|
38
38
|
l((o = o.apply(e, t)).next());
|
|
39
39
|
});
|
|
40
|
-
var Me = (e, t, o) => (t = e[
|
|
40
|
+
var Me = (e, t, o) => (t = e[Le("asyncIterator")]) ? t.call(e) : (e = e[Le("iterator")](), t = {}, o = (n, r) => (r = e[n]) && (t[n] = (i) => new Promise((a, l, c) => (i = r.call(e, i), c = i.done, Promise.resolve(i.value).then((u) => a({ value: u, done: c }), l)))), o("next"), o("return"), t);
|
|
41
41
|
import "./index.css";
|
|
42
42
|
import "dayjs/plugin/isBetween";
|
|
43
43
|
import "dayjs/plugin/isSameOrAfter";
|
|
@@ -73,7 +73,7 @@ import * as antdCssinjs from "@ant-design/cssinjs";
|
|
|
73
73
|
import { useStyleRegister } from "@ant-design/cssinjs";
|
|
74
74
|
import * as nocobaseClientUtils from "@nocobase/utils/client";
|
|
75
75
|
import { isPlainObject, tval as tval$1, toGmt, toLocal, getDefaultFormat, str2moment, getPickerFormat, Handlebars, dayjs as dayjs$1, uid as uid$1, getValuesByPath, flatten, isPortalInBody, error, getDateTimeFormat, unflatten as unflatten$1, sortTree, forEach, transformMultiColumnToSingleColumn, getDayRangeByParams, isURL, parse, nextTick, toFixedByStep, removeNullCondition as removeNullCondition$1, transformFilter, isEmptyFilter, evaluateConditions, parseHTML } from "@nocobase/utils/client";
|
|
76
|
-
import { transformFilter as
|
|
76
|
+
import { transformFilter as Xo } from "@nocobase/utils/client";
|
|
77
77
|
import classNames from "classnames";
|
|
78
78
|
import debounce$1 from "lodash/debounce";
|
|
79
79
|
import { ErrorBoundary } from "react-error-boundary";
|
|
@@ -109,7 +109,7 @@ import * as formilyReactiveReact from "@formily/reactive-react";
|
|
|
109
109
|
import { observer, Observer as Observer$1 } from "@formily/reactive-react";
|
|
110
110
|
import * as nocobaseFlowEngine from "@nocobase/flow-engine";
|
|
111
111
|
import { useFlowEngine, createCollectionContextMeta, FlowEngine, FlowEngineProvider, FlowEngineGlobalsContextProvider, useFlowContext, FlowContextSelector, defineAction, escapeT, useFlowViewContext, parseValueToPath, VariableInput as VariableInput$1, useFlowSettingsContext, FlowModel, observable as observable$1, defineFlow, reaction as reaction$1, parsePathnameToViewParams, useFlowModelById, FlowModelRenderer, ViewNavigation, engineSnippets, getRunJSDocFor, FlowRunJSContext, ActionScene, DisplayItemModel, FormItem as FormItem$2, FieldModelRenderer, jioToJoiSchema, EditableItemModel, isVariableExpression, MultiRecordResource, FilterableItemModel, useFlowModel, createCurrentRecordMetaFactory, observer as observer$2, buildSubModelItems, buildSubModelItem, FilterItem as FilterItem$2, FilterGroup as FilterGroup$3, EMPTY_COLUMN_UID, DragHandler as DragHandler$1, findModelUidPosition, getMousePositionOnElement, moveBlock, positionToDirection, DndProvider, Droppable, MemoFlowModelRenderer, AddSubModelButton, FlowSettingsButton, createRecordMetaFactory, SingleRecordResource, ModelRenderMode, buildWrapperFieldChildren, createSafeWindow, createSafeDocument, ElementProxy, FlowsFloatContextMenu, FlowModelProvider, FlowErrorFallback, extractPropertyPath, VariableTag, largeField, FlowStepContext, untracked as untracked$1 } from "@nocobase/flow-engine";
|
|
112
|
-
import { FieldModelRenderer as
|
|
112
|
+
import { FieldModelRenderer as Zo } from "@nocobase/flow-engine";
|
|
113
113
|
import ignore from "ignore";
|
|
114
114
|
import cronstrue from "cronstrue";
|
|
115
115
|
import { formatDayjsValue, usePrefixCls as usePrefixCls$1, dayjsable } from "@formily/antd-v5/esm/__builtins__";
|
|
@@ -117,7 +117,7 @@ import { loadableResource } from "react-imported-component";
|
|
|
117
117
|
import ProLayout, { RouteContext, PageHeader } from "@ant-design/pro-layout";
|
|
118
118
|
import * as antdStyle from "antd-style";
|
|
119
119
|
import { createStyles, createGlobalStyle, useAntdToken } from "antd-style";
|
|
120
|
-
import { createStyles as
|
|
120
|
+
import { createStyles as tn } from "antd-style";
|
|
121
121
|
import * as dndKitCore from "@dnd-kit/core";
|
|
122
122
|
import { DndContext as DndContext$1, rectIntersection, DragOverlay, useDroppable, useDndContext, useDndMonitor, useDraggable } from "@dnd-kit/core";
|
|
123
123
|
import * as dndKitSortable from "@dnd-kit/sortable";
|
|
@@ -9558,7 +9558,7 @@ function addAppVersion(e, t) {
|
|
|
9558
9558
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
9559
9559
|
}), e;
|
|
9560
9560
|
}
|
|
9561
|
-
const name = "@nocobase/client", version = "2.0.0-alpha.
|
|
9561
|
+
const name = "@nocobase/client", version = "2.0.0-alpha.3", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
9562
9562
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
9563
9563
|
"@ant-design/cssinjs": "^1.11.1",
|
|
9564
9564
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -9566,6 +9566,7 @@ const name = "@nocobase/client", version = "2.0.0-alpha.2", license = "AGPL-3.0"
|
|
|
9566
9566
|
"@antv/g2plot": "^2.4.18",
|
|
9567
9567
|
"@budibase/handlebars-helpers": "0.14.0",
|
|
9568
9568
|
"@codemirror/lang-html": "^6.4.10",
|
|
9569
|
+
"@codemirror/theme-one-dark": "^6.1.3",
|
|
9569
9570
|
"@ctrl/tinycolor": "^3.6.0",
|
|
9570
9571
|
"@dnd-kit/core": "^6.0.0",
|
|
9571
9572
|
"@dnd-kit/sortable": "^7.0.0",
|
|
@@ -9580,17 +9581,21 @@ const name = "@nocobase/client", version = "2.0.0-alpha.2", license = "AGPL-3.0"
|
|
|
9580
9581
|
"@formily/reactive-react": "^2.2.27",
|
|
9581
9582
|
"@formily/shared": "^2.2.27",
|
|
9582
9583
|
"@formily/validator": "^2.2.27",
|
|
9583
|
-
"@nocobase/evaluators": "2.0.0-alpha.
|
|
9584
|
-
"@nocobase/
|
|
9585
|
-
"@nocobase/
|
|
9584
|
+
"@nocobase/evaluators": "2.0.0-alpha.3",
|
|
9585
|
+
"@nocobase/flow-engine": "2.0.0-alpha.3",
|
|
9586
|
+
"@nocobase/sdk": "2.0.0-alpha.3",
|
|
9587
|
+
"@nocobase/utils": "2.0.0-alpha.3",
|
|
9586
9588
|
"@tanstack/react-table": "^8.21.3",
|
|
9587
9589
|
"@types/tabulator-tables": "^6.2.6",
|
|
9588
9590
|
ahooks: "^3.7.2",
|
|
9589
9591
|
antd: "5.24.2",
|
|
9592
|
+
"antd-mobile": "^5.41.1",
|
|
9593
|
+
"antd-mobile-icons": "^0.3.0",
|
|
9590
9594
|
"antd-style": "3.7.1",
|
|
9591
9595
|
axios: "^1.7.0",
|
|
9592
9596
|
"bignumber.js": "^9.1.2",
|
|
9593
9597
|
classnames: "^2.3.1",
|
|
9598
|
+
codemirror: "^6.0.2",
|
|
9594
9599
|
cronstrue: "^2.11.0",
|
|
9595
9600
|
"file-saver": "^2.0.5",
|
|
9596
9601
|
filesize: "9.0.11",
|
|
@@ -11316,12 +11321,12 @@ const Table$2 = withDynamicSchemaProps(
|
|
|
11316
11321
|
[JSON.stringify(m), X]
|
|
11317
11322
|
), Q = useMemo(() => (Array.isArray(y) ? y : []).filter(Boolean), [y, y == null ? void 0 : y.length]), ee = useMemo(() => (oe) => {
|
|
11318
11323
|
const se = useCallback((ae) => {
|
|
11319
|
-
var Fe, Pe, Ie, ke, Ae,
|
|
11324
|
+
var Fe, Pe, Ie, ke, Ae, Ne, Ee, Oe;
|
|
11320
11325
|
if (!ae.active || !ae.over) {
|
|
11321
11326
|
console.warn("move cancel");
|
|
11322
11327
|
return;
|
|
11323
11328
|
}
|
|
11324
|
-
const he = (Ie = (Pe = (Fe = ae.active) == null ? void 0 : Fe.data.current) == null ? void 0 : Pe.sortable) == null ? void 0 : Ie.index, be = (
|
|
11329
|
+
const he = (Ie = (Pe = (Fe = ae.active) == null ? void 0 : Fe.data.current) == null ? void 0 : Pe.sortable) == null ? void 0 : Ie.index, be = (Ne = (Ae = (ke = ae.over) == null ? void 0 : ke.data.current) == null ? void 0 : Ae.sortable) == null ? void 0 : Ne.index, ve = ((Ee = K.current) == null ? void 0 : Ee[he]) || ae.active, Te = ((Oe = K.current) == null ? void 0 : Oe[be]) || ae.over;
|
|
11325
11330
|
C.move(he, be), j({ from: ve, to: Te });
|
|
11326
11331
|
}, []);
|
|
11327
11332
|
return /* @__PURE__ */ jsx(DndContext, { onDragEnd: se, children: /* @__PURE__ */ jsx("tbody", f({}, oe)) });
|
|
@@ -86938,8 +86943,7 @@ const AppSpin = () => /* @__PURE__ */ jsx(Spin, { style: { position: "fixed", to
|
|
|
86938
86943
|
return /* @__PURE__ */ jsx(Modal, { open: !0, footer: null, closable: !1, children: /* @__PURE__ */ jsx(Result, { icon: t, status: o, title: e.i18n.t(n), subTitle: e.i18n.t(r) }) });
|
|
86939
86944
|
},
|
|
86940
86945
|
{ displayName: "AppMaintainingDialog" }
|
|
86941
|
-
)
|
|
86942
|
-
class NocoBaseBuildInPlugin extends Plugin {
|
|
86946
|
+
), $e = class $e extends Plugin {
|
|
86943
86947
|
afterAdd() {
|
|
86944
86948
|
return E(this, null, function* () {
|
|
86945
86949
|
this.app.addComponents({
|
|
@@ -86962,7 +86966,7 @@ class NocoBaseBuildInPlugin extends Plugin {
|
|
|
86962
86966
|
addRoutes() {
|
|
86963
86967
|
this.router.add("root", {
|
|
86964
86968
|
path: "/",
|
|
86965
|
-
element: /* @__PURE__ */ jsx(
|
|
86969
|
+
element: /* @__PURE__ */ jsx($e.RootRedirect, {})
|
|
86966
86970
|
}), this.router.add("not-found", {
|
|
86967
86971
|
path: "*",
|
|
86968
86972
|
Component: AppNotFound
|
|
@@ -87015,7 +87019,19 @@ class NocoBaseBuildInPlugin extends Plugin {
|
|
|
87015
87019
|
}), yield this.app.pm.add(SchemaComponentPlugin, { name: "schema-component" }), yield this.app.pm.add(SchemaInitializerPlugin, { name: "schema-initializer" }), yield this.app.pm.add(SchemaSettingsPlugin, { name: "schema-settings" }), yield this.app.pm.add(BlockSchemaComponentPlugin, { name: "block-schema-component" }), yield this.app.pm.add(AntdSchemaComponentPlugin, { name: "antd-schema-component" }), yield this.app.pm.add(ACLPlugin, { name: "builtin-acl" }), yield this.app.pm.add(RemoteDocumentTitlePlugin, { name: "remote-document-title" }), yield this.app.pm.add(PMPlugin, { name: "builtin-pm" }), yield this.app.pm.add(CollectionPlugin, { name: "builtin-collection" });
|
|
87016
87020
|
});
|
|
87017
87021
|
}
|
|
87018
|
-
}
|
|
87022
|
+
};
|
|
87023
|
+
/**
|
|
87024
|
+
* Redirect component for root path:
|
|
87025
|
+
* - If there is a token, go to `/admin` (existing behavior)
|
|
87026
|
+
* - If not logged in, go to `/signin?redirect=/admin`
|
|
87027
|
+
* This avoids the race where `/` first jumps to `/admin` before auth check.
|
|
87028
|
+
*/
|
|
87029
|
+
k($e, "RootRedirect", () => {
|
|
87030
|
+
var r;
|
|
87031
|
+
const t = useAPIClient(), n = !!((r = t == null ? void 0 : t.auth) != null && r.token) ? "/admin" : "/signin?redirect=/admin";
|
|
87032
|
+
return /* @__PURE__ */ jsx(Navigate, { replace: !0, to: n });
|
|
87033
|
+
});
|
|
87034
|
+
let NocoBaseBuildInPlugin = $e;
|
|
87019
87035
|
const PoweredBy = () => {
|
|
87020
87036
|
var l, c, u;
|
|
87021
87037
|
const { i18n: e } = useTranslation(), { token: t } = useToken(), o = usePlugin("@nocobase/plugin-custom-brand"), n = useCurrentAppInfo(), r = {
|
|
@@ -87402,7 +87418,7 @@ export {
|
|
|
87402
87418
|
ExtendCollectionsContext,
|
|
87403
87419
|
ExtendCollectionsProvider,
|
|
87404
87420
|
FieldModel,
|
|
87405
|
-
|
|
87421
|
+
Zo as FieldModelRenderer,
|
|
87406
87422
|
FieldSummary,
|
|
87407
87423
|
FieldValidation,
|
|
87408
87424
|
FieldsTreeSelect,
|
|
@@ -87864,7 +87880,7 @@ export {
|
|
|
87864
87880
|
createReadPrettyFormBlockSchema,
|
|
87865
87881
|
createRouterManager,
|
|
87866
87882
|
createSelectSchemaSettingsItem,
|
|
87867
|
-
|
|
87883
|
+
tn as createStyles,
|
|
87868
87884
|
createSwitchSettingsItem,
|
|
87869
87885
|
createTableBlockSchema,
|
|
87870
87886
|
createTableBlockUISchema,
|
|
@@ -88022,7 +88038,7 @@ export {
|
|
|
88022
88038
|
tableColumnSettings,
|
|
88023
88039
|
tableSelectorBlockSettings,
|
|
88024
88040
|
timeProps,
|
|
88025
|
-
|
|
88041
|
+
Xo as transformFilter,
|
|
88026
88042
|
transformRowsToSingleColumn,
|
|
88027
88043
|
transformToFilter,
|
|
88028
88044
|
transformVariableValue,
|
|
@@ -9,6 +9,13 @@
|
|
|
9
9
|
import { Plugin } from '../application/Plugin';
|
|
10
10
|
export declare class NocoBaseBuildInPlugin extends Plugin {
|
|
11
11
|
afterAdd(): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Redirect component for root path:
|
|
14
|
+
* - If there is a token, go to `/admin` (existing behavior)
|
|
15
|
+
* - If not logged in, go to `/signin?redirect=/admin`
|
|
16
|
+
* This avoids the race where `/` first jumps to `/admin` before auth check.
|
|
17
|
+
*/
|
|
18
|
+
private static RootRedirect;
|
|
12
19
|
load(): Promise<void>;
|
|
13
20
|
addRoutes(): void;
|
|
14
21
|
addComponents(): void;
|