@nocobase/client 1.3.29-beta → 1.3.30-beta
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
CHANGED
|
@@ -328,6 +328,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
328
328
|
get AssociationField() {
|
|
329
329
|
return AssociationField;
|
|
330
330
|
},
|
|
331
|
+
get AssociationFieldMode() {
|
|
332
|
+
return AssociationFieldMode;
|
|
333
|
+
},
|
|
331
334
|
get AssociationFieldModeProvider() {
|
|
332
335
|
return AssociationFieldModeProvider;
|
|
333
336
|
},
|
|
@@ -748,6 +751,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
748
751
|
get useActionContext() {
|
|
749
752
|
return useActionContext;
|
|
750
753
|
},
|
|
754
|
+
get useAssociationFieldModeContext() {
|
|
755
|
+
return useAssociationFieldModeContext;
|
|
756
|
+
},
|
|
751
757
|
get useBackButton() {
|
|
752
758
|
return useBackButton;
|
|
753
759
|
},
|
|
@@ -1005,6 +1011,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1005
1011
|
get AssociationField() {
|
|
1006
1012
|
return AssociationField;
|
|
1007
1013
|
},
|
|
1014
|
+
get AssociationFieldMode() {
|
|
1015
|
+
return AssociationFieldMode;
|
|
1016
|
+
},
|
|
1008
1017
|
get AssociationFieldModeProvider() {
|
|
1009
1018
|
return AssociationFieldModeProvider;
|
|
1010
1019
|
},
|
|
@@ -2949,6 +2958,9 @@ const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2949
2958
|
get useAssociationCreateActionProps() {
|
|
2950
2959
|
return useAssociationCreateActionProps;
|
|
2951
2960
|
},
|
|
2961
|
+
get useAssociationFieldModeContext() {
|
|
2962
|
+
return useAssociationFieldModeContext;
|
|
2963
|
+
},
|
|
2952
2964
|
get useAssociationFilterBlockProps() {
|
|
2953
2965
|
return useAssociationFilterBlockProps;
|
|
2954
2966
|
},
|
|
@@ -4110,7 +4122,7 @@ function addAppVersion(e, t) {
|
|
|
4110
4122
|
addAppVersion((n = e.properties) == null ? void 0 : n[o], t);
|
|
4111
4123
|
}), e;
|
|
4112
4124
|
}
|
|
4113
|
-
const name = "@nocobase/client", version$1 = "1.3.
|
|
4125
|
+
const name = "@nocobase/client", version$1 = "1.3.30-beta", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
4114
4126
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
4115
4127
|
"@ant-design/cssinjs": "^1.11.1",
|
|
4116
4128
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -4131,9 +4143,9 @@ const name = "@nocobase/client", version$1 = "1.3.29-beta", license = "AGPL-3.0"
|
|
|
4131
4143
|
"@formily/reactive-react": "^2.2.27",
|
|
4132
4144
|
"@formily/shared": "^2.2.27",
|
|
4133
4145
|
"@formily/validator": "^2.2.27",
|
|
4134
|
-
"@nocobase/evaluators": "1.3.
|
|
4135
|
-
"@nocobase/sdk": "1.3.
|
|
4136
|
-
"@nocobase/utils": "1.3.
|
|
4146
|
+
"@nocobase/evaluators": "1.3.30-beta",
|
|
4147
|
+
"@nocobase/sdk": "1.3.30-beta",
|
|
4148
|
+
"@nocobase/utils": "1.3.30-beta",
|
|
4137
4149
|
ahooks: "^3.7.2",
|
|
4138
4150
|
antd: "5.12.8",
|
|
4139
4151
|
"antd-style": "3.4.5",
|
|
@@ -9674,7 +9686,7 @@ const DataSourceApplicationProvider = (n) => {
|
|
|
9674
9686
|
);
|
|
9675
9687
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9676
9688
|
/* @__PURE__ */ jsx("div", { onMouseOver: () => o(!0), children: e.children || n }),
|
|
9677
|
-
/* @__PURE__ */ jsx(Modal, { open: t, footer: null, onCancel: () => o(!1), width: "60%", children: /* @__PURE__ */ jsx(ErrorFallback, g({}, e)) })
|
|
9689
|
+
/* @__PURE__ */ jsx(Modal, { zIndex: 1e4, open: t, footer: null, onCancel: () => o(!1), width: "60%", children: /* @__PURE__ */ jsx(ErrorFallback, g({}, e)) })
|
|
9678
9690
|
] });
|
|
9679
9691
|
}, { Paragraph, Text: Text$1, Link } = Typography, useDownloadLogs = (e, t = {}) => {
|
|
9680
9692
|
const o = useLocationNoUpdate(), [n, r] = React.useState(!1), i = useAPIClient();
|
|
@@ -10996,6 +11008,7 @@ const useFormItemInitializerFields = (e) => {
|
|
|
10996
11008
|
onClick() {
|
|
10997
11009
|
},
|
|
10998
11010
|
componentProps: F(g({}, a), {
|
|
11011
|
+
hideSearch: !1,
|
|
10999
11012
|
icon: null,
|
|
11000
11013
|
title: p || h("Other records"),
|
|
11001
11014
|
name: "otherRecords",
|
|
@@ -14858,7 +14871,7 @@ const useUpdateSchemaTemplateActionProps = () => {
|
|
|
14858
14871
|
/* @__PURE__ */ jsx(PageHeader, { style: { backgroundColor: "white" }, ghost: !1, title: e("Block templates") }),
|
|
14859
14872
|
/* @__PURE__ */ jsx("div", { style: { margin: "var(--nb-spacing)" }, children: /* @__PURE__ */ jsx(SchemaComponent, { schema: uiSchemaTemplatesSchema }) })
|
|
14860
14873
|
] });
|
|
14861
|
-
}, BlockTemplatesPane = () => /* @__PURE__ */ jsx(SchemaComponent, { schema: uiSchemaTemplatesSchema }), MENU_ITEM_HEIGHT =
|
|
14874
|
+
}, BlockTemplatesPane = () => /* @__PURE__ */ jsx(SchemaComponent, { schema: uiSchemaTemplatesSchema }), MENU_ITEM_HEIGHT = 32, STEP = 15, SearchCollections = ({ value: e, onChange: t }) => {
|
|
14862
14875
|
const { t: o } = useTranslation(), [n, r] = useState(e), i = React.useRef(null);
|
|
14863
14876
|
return useEffect(() => {
|
|
14864
14877
|
r(e);
|
|
@@ -18260,13 +18273,13 @@ const PopupVisibleProvider = ({ children: e, visible: t, setVisible: o }) => {
|
|
|
18260
18273
|
z(void 0, null, function* () {
|
|
18261
18274
|
const m = n.map((C) => {
|
|
18262
18275
|
var S;
|
|
18263
|
-
return ((S = getStoredPopupContext(C.popupuid)) == null ? void 0 : S.schema) || findSchemaByUid(C.popupuid, t.root) || r(C.popupuid);
|
|
18276
|
+
return ((S = getStoredPopupContext(C.popupuid)) == null ? void 0 : S.schema) || findSchemaByUid(C.popupuid, t == null ? void 0 : t.root) || r(C.popupuid);
|
|
18264
18277
|
}), x = (yield Promise.all(m)).map((C, S) => {
|
|
18265
18278
|
if (_.isEmpty(C))
|
|
18266
18279
|
return get404Schema();
|
|
18267
18280
|
const b = n[S];
|
|
18268
18281
|
if (b.puid) {
|
|
18269
|
-
const y = findSchemaByUid(b.puid, t.root);
|
|
18282
|
+
const y = findSchemaByUid(b.puid, t == null ? void 0 : t.root);
|
|
18270
18283
|
y && c(_.omit(y, "parent"), C);
|
|
18271
18284
|
}
|
|
18272
18285
|
const v = _.cloneDeep(_.omit(C, "parent"));
|
|
@@ -35469,7 +35482,9 @@ const ButtonLinkList = (e) => {
|
|
|
35469
35482
|
) }) });
|
|
35470
35483
|
},
|
|
35471
35484
|
{ displayName: "InternalSubTable" }
|
|
35472
|
-
)
|
|
35485
|
+
);
|
|
35486
|
+
var AssociationFieldMode = /* @__PURE__ */ ((e) => (e.Picker = "Picker", e.Nester = "Nester", e.PopoverNester = "PopoverNester", e.Select = "Select", e.SubTable = "SubTable", e.FileManager = "FileManager", e.CascadeSelect = "CascadeSelect", e.Tag = "Tag", e))(AssociationFieldMode || {});
|
|
35487
|
+
const defaultModeToComponent = {
|
|
35473
35488
|
Picker: InternalPicker,
|
|
35474
35489
|
Nester: InternalNester,
|
|
35475
35490
|
PopoverNester: InternalPopoverNester,
|
|
@@ -35479,19 +35494,20 @@ const ButtonLinkList = (e) => {
|
|
|
35479
35494
|
CascadeSelect: InternalCascadeSelect
|
|
35480
35495
|
}, AssociationFieldModeContext = createContext({
|
|
35481
35496
|
modeToComponent: defaultModeToComponent,
|
|
35482
|
-
getComponent: (e) => defaultModeToComponent[e]
|
|
35497
|
+
getComponent: (e) => defaultModeToComponent[e],
|
|
35498
|
+
getDefaultComponent: (e) => defaultModeToComponent[e]
|
|
35483
35499
|
}), AssociationFieldModeProvider = (e) => {
|
|
35484
35500
|
const t = useAssociationFieldModeContext(), o = useMemo(
|
|
35485
35501
|
() => g(g({}, t.modeToComponent), e.modeToComponent),
|
|
35486
35502
|
[t.modeToComponent, e.modeToComponent]
|
|
35487
35503
|
), n = useCallback(
|
|
35488
|
-
(
|
|
35489
|
-
const a = o[i];
|
|
35490
|
-
return _.isFunction(a) ? a(defaultModeToComponent[i]) : a || defaultModeToComponent[i];
|
|
35491
|
-
},
|
|
35504
|
+
(a) => o[a] || defaultModeToComponent[a],
|
|
35492
35505
|
[o]
|
|
35493
|
-
), r =
|
|
35494
|
-
|
|
35506
|
+
), r = useCallback((a) => defaultModeToComponent[a], []), i = useMemo(
|
|
35507
|
+
() => ({ modeToComponent: o, getComponent: n, getDefaultComponent: r }),
|
|
35508
|
+
[n, o, r]
|
|
35509
|
+
);
|
|
35510
|
+
return /* @__PURE__ */ jsx(AssociationFieldModeContext.Provider, { value: i, children: e.children });
|
|
35495
35511
|
}, useAssociationFieldModeContext = () => React.useContext(AssociationFieldModeContext), AssociationFieldProvider = observer$1(
|
|
35496
35512
|
(e) => {
|
|
35497
35513
|
var m, h, x;
|
|
@@ -59051,6 +59067,7 @@ export {
|
|
|
59051
59067
|
AssignedFieldValues,
|
|
59052
59068
|
AssociatedFields,
|
|
59053
59069
|
AssociationField,
|
|
59070
|
+
AssociationFieldMode,
|
|
59054
59071
|
AssociationFieldModeProvider,
|
|
59055
59072
|
AssociationFilter,
|
|
59056
59073
|
AssociationFilterDesignerDelete,
|
|
@@ -59699,6 +59716,7 @@ export {
|
|
|
59699
59716
|
useAssociatedFormItemInitializerFields,
|
|
59700
59717
|
useAssociatedTableColumnInitializerFields,
|
|
59701
59718
|
useAssociationCreateActionProps,
|
|
59719
|
+
useAssociationFieldModeContext,
|
|
59702
59720
|
useAssociationFilterBlockProps,
|
|
59703
59721
|
useAssociationFilterProps,
|
|
59704
59722
|
useAssociationName,
|
|
@@ -18,11 +18,12 @@ export declare enum AssociationFieldMode {
|
|
|
18
18
|
Tag = "Tag"
|
|
19
19
|
}
|
|
20
20
|
interface AssociationFieldModeProviderProps {
|
|
21
|
-
modeToComponent: Partial<Record<AssociationFieldMode, React.FC
|
|
21
|
+
modeToComponent: Partial<Record<AssociationFieldMode, React.FC>>;
|
|
22
22
|
}
|
|
23
23
|
export declare const AssociationFieldModeProvider: React.FC<AssociationFieldModeProviderProps>;
|
|
24
24
|
export declare const useAssociationFieldModeContext: () => {
|
|
25
25
|
modeToComponent: AssociationFieldModeProviderProps['modeToComponent'];
|
|
26
26
|
getComponent: (mode: AssociationFieldMode) => React.FC;
|
|
27
|
+
getDefaultComponent: (mode: AssociationFieldMode) => React.FC;
|
|
27
28
|
};
|
|
28
29
|
export {};
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
-
export { AssociationFieldModeProvider } from './AssociationFieldModeProvider';
|
|
9
|
+
export { AssociationFieldMode, AssociationFieldModeProvider, useAssociationFieldModeContext, } from './AssociationFieldModeProvider';
|
|
10
10
|
export declare const AssociationField: any;
|