@nocobase/client 1.7.13 → 1.7.14
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
|
@@ -8711,7 +8711,7 @@ function addAppVersion(e, t) {
|
|
|
8711
8711
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8712
8712
|
}), e;
|
|
8713
8713
|
}
|
|
8714
|
-
const name = "@nocobase/client", version = "1.7.
|
|
8714
|
+
const name = "@nocobase/client", version = "1.7.14", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8715
8715
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8716
8716
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8717
8717
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8732,9 +8732,9 @@ const name = "@nocobase/client", version = "1.7.13", license = "AGPL-3.0", main
|
|
|
8732
8732
|
"@formily/reactive-react": "^2.2.27",
|
|
8733
8733
|
"@formily/shared": "^2.2.27",
|
|
8734
8734
|
"@formily/validator": "^2.2.27",
|
|
8735
|
-
"@nocobase/evaluators": "1.7.
|
|
8736
|
-
"@nocobase/sdk": "1.7.
|
|
8737
|
-
"@nocobase/utils": "1.7.
|
|
8735
|
+
"@nocobase/evaluators": "1.7.14",
|
|
8736
|
+
"@nocobase/sdk": "1.7.14",
|
|
8737
|
+
"@nocobase/utils": "1.7.14",
|
|
8738
8738
|
ahooks: "^3.7.2",
|
|
8739
8739
|
antd: "5.24.2",
|
|
8740
8740
|
"antd-style": "3.7.1",
|
|
@@ -9500,7 +9500,7 @@ function useSatisfiedActionValues({
|
|
|
9500
9500
|
schema: o,
|
|
9501
9501
|
form: r
|
|
9502
9502
|
}) {
|
|
9503
|
-
const [a, i] = useState({}), l = useFieldSchema(), c = useVariables$1(), u = useLocalVariables$1({ currentForm: { values: e } }), d = o != null ? o : l, p = n != null ? n : d[LinkageRuleDataKeyMap[t]], m = useApp(), h = useCallback(() => {
|
|
9503
|
+
const [a, i] = useState({}), l = useFieldSchema(), c = useVariables$1(), u = useLocalVariables$1({ currentForm: { values: e } }), d = o != null ? o : l, p = n != null ? n : d[LinkageRuleDataKeyMap[t]] || (d == null ? void 0 : d.parent[LinkageRuleDataKeyMap[t]]), m = useApp(), h = useCallback(() => {
|
|
9504
9504
|
p && e && getSatisfiedValueMap({ rules: p, variables: c, localVariables: u }, m.jsonLogic).then((g) => {
|
|
9505
9505
|
isEmpty$1(g) ? i({}) : i(g);
|
|
9506
9506
|
}).catch((g) => {
|
|
@@ -9518,7 +9518,7 @@ function useSatisfiedActionValues({
|
|
|
9518
9518
|
r.removeEffects(g);
|
|
9519
9519
|
};
|
|
9520
9520
|
}
|
|
9521
|
-
}, [r, h]), { valueMap: a };
|
|
9521
|
+
}, [r, h, e]), { valueMap: a };
|
|
9522
9522
|
}
|
|
9523
9523
|
const GetStyleRules = React.memo(({ record: e, schema: t, onStyleChange: n }) => {
|
|
9524
9524
|
const { valueMap: o } = useSatisfiedActionValues({ formValues: e, category: "style", schema: t });
|
|
@@ -9582,9 +9582,13 @@ const mergeFilter = (e, t = "$and") => {
|
|
|
9582
9582
|
"$dateBetween",
|
|
9583
9583
|
"$in",
|
|
9584
9584
|
"$notIn"
|
|
9585
|
-
].includes(t[i])
|
|
9585
|
+
].includes(t[i]))
|
|
9586
9586
|
return !0;
|
|
9587
9587
|
const l = n(`${o}.${i}`);
|
|
9588
|
+
if (["datetime", "datetimeNoTz", "date", "unixTimestamp", "createdAt", "updatedAt"].includes(
|
|
9589
|
+
l == null ? void 0 : l.interface
|
|
9590
|
+
))
|
|
9591
|
+
return !0;
|
|
9588
9592
|
if (l != null && l.target) {
|
|
9589
9593
|
if (Array.isArray(a))
|
|
9590
9594
|
return !0;
|
|
@@ -18132,6 +18136,14 @@ function useCreateFormBlockDecoratorProps(e) {
|
|
|
18132
18136
|
function useCreateFormBlockProps() {
|
|
18133
18137
|
return useFormBlockProps$1();
|
|
18134
18138
|
}
|
|
18139
|
+
function useDataFormItemProps() {
|
|
18140
|
+
const e = useCollectionRecordData(), { form: t } = useFormBlockContext(), n = useSubFormValue(), { valueMap: o } = useSatisfiedActionValues({
|
|
18141
|
+
category: "style",
|
|
18142
|
+
formValues: (n == null ? void 0 : n.formValue) || (t == null ? void 0 : t.values) || e,
|
|
18143
|
+
form: t
|
|
18144
|
+
});
|
|
18145
|
+
return { wrapperStyle: o };
|
|
18146
|
+
}
|
|
18135
18147
|
function useEditFormBlockDecoratorProps(e) {
|
|
18136
18148
|
const t = useFormBlockParams(e);
|
|
18137
18149
|
let n;
|
|
@@ -18148,14 +18160,16 @@ function useFormBlockParams(e) {
|
|
|
18148
18160
|
function useEditFormBlockProps() {
|
|
18149
18161
|
return useFormBlockProps$1();
|
|
18150
18162
|
}
|
|
18151
|
-
|
|
18152
|
-
const e =
|
|
18153
|
-
|
|
18154
|
-
|
|
18155
|
-
|
|
18156
|
-
|
|
18157
|
-
|
|
18158
|
-
|
|
18163
|
+
const useGridCardActionBarProps$1 = () => {
|
|
18164
|
+
const e = useFieldSchema(), { designable: t } = useDesignable();
|
|
18165
|
+
return {
|
|
18166
|
+
style: {
|
|
18167
|
+
marginBottom: "var(--nb-spacing)"
|
|
18168
|
+
},
|
|
18169
|
+
// In non-configuration mode, when there are no buttons, ActionBar doesn't need to be displayed
|
|
18170
|
+
hidden: !t && _.isEmpty(e.properties)
|
|
18171
|
+
};
|
|
18172
|
+
};
|
|
18159
18173
|
function useGridCardBlockParams(e) {
|
|
18160
18174
|
const { params: t } = e, { filter: n, parseVariableLoading: o } = useParsedFilter({
|
|
18161
18175
|
filterOption: t == null ? void 0 : t.filter
|
|
@@ -19159,7 +19173,8 @@ const useTableSelectorParams = () => useContext(TableSelectorParamsContext), Tab
|
|
|
19159
19173
|
useGridCardBlockItemProps,
|
|
19160
19174
|
useGridCardBlockProps,
|
|
19161
19175
|
useFormItemProps,
|
|
19162
|
-
useDataFormItemProps
|
|
19176
|
+
useDataFormItemProps,
|
|
19177
|
+
useGridCardActionBarProps: useGridCardActionBarProps$1
|
|
19163
19178
|
}),
|
|
19164
19179
|
children: e.children
|
|
19165
19180
|
}
|
|
@@ -19218,7 +19233,8 @@ class BlockSchemaComponentPlugin extends Plugin {
|
|
|
19218
19233
|
useGridCardBlockProps,
|
|
19219
19234
|
useGridCardBlockItemProps,
|
|
19220
19235
|
useFormItemProps,
|
|
19221
|
-
useDataFormItemProps
|
|
19236
|
+
useDataFormItemProps,
|
|
19237
|
+
useGridCardActionBarProps: useGridCardActionBarProps$1
|
|
19222
19238
|
}));
|
|
19223
19239
|
}
|
|
19224
19240
|
}
|
|
@@ -30841,9 +30857,9 @@ const DragHandler = (e) => {
|
|
|
30841
30857
|
collectionName: C,
|
|
30842
30858
|
dataSource: b,
|
|
30843
30859
|
defaultValue: S
|
|
30844
|
-
} = useParentPopupVariableContext(), {
|
|
30845
|
-
let { name:
|
|
30846
|
-
return e != null && e.collectionName && (
|
|
30860
|
+
} = useParentPopupVariableContext(), { urlSearchParamsCtx: y, shouldDisplay: v } = useURLSearchParamsVariable(), { datetimeCtx: F } = useDatetimeVariableContext(), { currentFormCtx: I } = useCurrentFormContext({ form: e == null ? void 0 : e.currentForm }), { name: T } = useCollection_deprecated(), R = useContextVariable();
|
|
30861
|
+
let { name: D } = useBlockCollection();
|
|
30862
|
+
return e != null && e.collectionName && (D = e.collectionName), useMemo(() => [
|
|
30847
30863
|
/**
|
|
30848
30864
|
* @deprecated
|
|
30849
30865
|
* 兼容老版本
|
|
@@ -30858,9 +30874,9 @@ const DragHandler = (e) => {
|
|
|
30858
30874
|
* 兼容旧版本的以数据表名称命名的变量,新版本已更名为 `$nForm`
|
|
30859
30875
|
*/
|
|
30860
30876
|
{
|
|
30861
|
-
name:
|
|
30862
|
-
ctx:
|
|
30863
|
-
collectionName:
|
|
30877
|
+
name: D,
|
|
30878
|
+
ctx: I || i,
|
|
30879
|
+
collectionName: D
|
|
30864
30880
|
},
|
|
30865
30881
|
/**
|
|
30866
30882
|
* @deprecated
|
|
@@ -30868,8 +30884,8 @@ const DragHandler = (e) => {
|
|
|
30868
30884
|
*/
|
|
30869
30885
|
{
|
|
30870
30886
|
name: "$form",
|
|
30871
|
-
ctx:
|
|
30872
|
-
collectionName:
|
|
30887
|
+
ctx: I,
|
|
30888
|
+
collectionName: D
|
|
30873
30889
|
},
|
|
30874
30890
|
{
|
|
30875
30891
|
name: "$nRecord",
|
|
@@ -30899,12 +30915,12 @@ const DragHandler = (e) => {
|
|
|
30899
30915
|
},
|
|
30900
30916
|
{
|
|
30901
30917
|
name: "$nForm",
|
|
30902
|
-
ctx:
|
|
30903
|
-
collectionName:
|
|
30918
|
+
ctx: I,
|
|
30919
|
+
collectionName: D
|
|
30904
30920
|
},
|
|
30905
30921
|
{
|
|
30906
30922
|
name: "$nDate",
|
|
30907
|
-
ctx:
|
|
30923
|
+
ctx: F
|
|
30908
30924
|
},
|
|
30909
30925
|
/**
|
|
30910
30926
|
* @deprecated
|
|
@@ -30912,24 +30928,28 @@ const DragHandler = (e) => {
|
|
|
30912
30928
|
*/
|
|
30913
30929
|
{
|
|
30914
30930
|
name: "$date",
|
|
30915
|
-
ctx:
|
|
30931
|
+
ctx: F
|
|
30916
30932
|
},
|
|
30917
|
-
|
|
30933
|
+
R,
|
|
30918
30934
|
a && {
|
|
30919
30935
|
name: "$iteration",
|
|
30920
30936
|
ctx: r,
|
|
30921
|
-
collectionName:
|
|
30937
|
+
collectionName: T
|
|
30922
30938
|
},
|
|
30923
30939
|
n && {
|
|
30924
30940
|
name: "$nParentIteration",
|
|
30925
30941
|
ctx: t,
|
|
30926
30942
|
collectionName: o
|
|
30943
|
+
},
|
|
30944
|
+
v && {
|
|
30945
|
+
name: "$nURLSearchParams",
|
|
30946
|
+
ctx: y
|
|
30927
30947
|
}
|
|
30928
30948
|
].filter(Boolean), [
|
|
30929
30949
|
i,
|
|
30930
30950
|
l,
|
|
30931
|
-
|
|
30932
|
-
|
|
30951
|
+
D,
|
|
30952
|
+
I,
|
|
30933
30953
|
c,
|
|
30934
30954
|
u,
|
|
30935
30955
|
d,
|
|
@@ -30937,16 +30957,17 @@ const DragHandler = (e) => {
|
|
|
30937
30957
|
f,
|
|
30938
30958
|
m,
|
|
30939
30959
|
h,
|
|
30940
|
-
|
|
30960
|
+
F,
|
|
30941
30961
|
a,
|
|
30942
30962
|
r,
|
|
30943
|
-
|
|
30963
|
+
T,
|
|
30944
30964
|
g,
|
|
30945
30965
|
S,
|
|
30946
30966
|
n,
|
|
30947
30967
|
t,
|
|
30948
30968
|
o,
|
|
30949
|
-
|
|
30969
|
+
R,
|
|
30970
|
+
y
|
|
30950
30971
|
]);
|
|
30951
30972
|
}, useLocalVariables$1 = useLocalVariables, useVariables = () => useContext(VariablesContext), useVariables$1 = useVariables, isSubFormOrSubTableField = (e) => {
|
|
30952
30973
|
for (; e; ) {
|
|
@@ -39529,7 +39550,7 @@ const ActionBarContext = React.createContext({
|
|
|
39529
39550
|
})
|
|
39530
39551
|
);
|
|
39531
39552
|
}, ActionBar = withDynamicSchemaProps(
|
|
39532
|
-
(e) => /* @__PURE__ */ jsx(InternalActionBar, x({}, e)),
|
|
39553
|
+
(e) => e.hidden ? null : /* @__PURE__ */ jsx(InternalActionBar, x({}, e)),
|
|
39533
39554
|
{ displayName: "ActionBar" }
|
|
39534
39555
|
), useGetAriaLabelOfPopover = () => {
|
|
39535
39556
|
const e = useFieldSchema(), t = e["x-component"], n = typeof t == "string" ? t : (t == null ? void 0 : t.displayName) || (t == null ? void 0 : t.name), o = useCompile();
|
|
@@ -45403,8 +45424,11 @@ const useColumnsDeepMemoized = (e) => {
|
|
|
45403
45424
|
return /* @__PURE__ */ jsx("td", P(x({}, c), { className: cls(e.className, cellClass), style: d, children: l || n || o ? e.children : /* @__PURE__ */ jsx("div", { style: p }) }));
|
|
45404
45425
|
}, displayNone = { display: "none" }, BodyCellComponent = (n) => {
|
|
45405
45426
|
var o = n, { columnHidden: e } = o, t = W(o, ["columnHidden"]);
|
|
45406
|
-
const { designable: r } = useDesignable();
|
|
45407
|
-
return e ? /* @__PURE__ */ jsx("td", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : /* @__PURE__ */ jsx("span", { style: displayNone, children: t.children }) }) : /* @__PURE__ */
|
|
45427
|
+
const { designable: r } = useDesignable(), a = useCollection();
|
|
45428
|
+
return e ? /* @__PURE__ */ jsx("td", { style: r ? columnOpacityStyle : columnHiddenStyle, children: r ? t.children : /* @__PURE__ */ jsx("span", { style: displayNone, children: t.children }) }) : /* @__PURE__ */ jsxs(SubFormProvider, { value: { value: t == null ? void 0 : t.record, collection: a, fieldSchema: t.schema }, children: [
|
|
45429
|
+
/* @__PURE__ */ jsx(InternalBodyCellComponent, x({}, t)),
|
|
45430
|
+
" "
|
|
45431
|
+
] });
|
|
45408
45432
|
}, InternalNocoBaseTable = React.memo(
|
|
45409
45433
|
(e) => {
|
|
45410
45434
|
const b = e, {
|
|
@@ -63442,11 +63466,7 @@ const createGridCardBlockUISchema = (e) => {
|
|
|
63442
63466
|
type: "void",
|
|
63443
63467
|
"x-initializer": "gridCard:configureActions",
|
|
63444
63468
|
"x-component": "ActionBar",
|
|
63445
|
-
"x-component-props":
|
|
63446
|
-
style: {
|
|
63447
|
-
marginBottom: "var(--nb-spacing)"
|
|
63448
|
-
}
|
|
63449
|
-
}
|
|
63469
|
+
"x-use-component-props": "useGridCardActionBarProps"
|
|
63450
63470
|
},
|
|
63451
63471
|
list: {
|
|
63452
63472
|
type: "array",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useGridCardActionBarProps: () => {
|
|
10
|
+
style: {
|
|
11
|
+
marginBottom: string;
|
|
12
|
+
};
|
|
13
|
+
hidden: boolean;
|
|
14
|
+
};
|