@nocobase/client 1.9.0-alpha.4 → 1.9.0-alpha.5
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
|
@@ -8813,7 +8813,7 @@ function addAppVersion(e, t) {
|
|
|
8813
8813
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
8814
8814
|
}), e;
|
|
8815
8815
|
}
|
|
8816
|
-
const name = "@nocobase/client", version = "1.9.0-alpha.
|
|
8816
|
+
const name = "@nocobase/client", version = "1.9.0-alpha.5", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
8817
8817
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
8818
8818
|
"@ant-design/cssinjs": "^1.11.1",
|
|
8819
8819
|
"@ant-design/icons": "^5.6.1",
|
|
@@ -8834,9 +8834,9 @@ const name = "@nocobase/client", version = "1.9.0-alpha.4", license = "AGPL-3.0"
|
|
|
8834
8834
|
"@formily/reactive-react": "^2.2.27",
|
|
8835
8835
|
"@formily/shared": "^2.2.27",
|
|
8836
8836
|
"@formily/validator": "^2.2.27",
|
|
8837
|
-
"@nocobase/evaluators": "1.9.0-alpha.
|
|
8838
|
-
"@nocobase/sdk": "1.9.0-alpha.
|
|
8839
|
-
"@nocobase/utils": "1.9.0-alpha.
|
|
8837
|
+
"@nocobase/evaluators": "1.9.0-alpha.5",
|
|
8838
|
+
"@nocobase/sdk": "1.9.0-alpha.5",
|
|
8839
|
+
"@nocobase/utils": "1.9.0-alpha.5",
|
|
8840
8840
|
ahooks: "^3.7.2",
|
|
8841
8841
|
antd: "5.24.2",
|
|
8842
8842
|
"antd-style": "3.7.1",
|
|
@@ -19020,30 +19020,33 @@ const useCollectOperator = () => {
|
|
|
19020
19020
|
}, setRequired$1 = (e, t, n) => {
|
|
19021
19021
|
typeof t.required == "undefined" && (e.required = !!n.required);
|
|
19022
19022
|
}, FilterCollectionFieldInternalField = (e) => {
|
|
19023
|
-
var
|
|
19024
|
-
const t = useCompile(), n = useField(), o = useFieldSchema(), { getInterface: r } = useCollectionManager_deprecated(), { uiSchema: a, defaultValue: i, interface: l } = useCollectionField(), { isAllowToSetDefaultValue: c } = useIsAllowToSetDefaultValue(), u = r(l), d = ((
|
|
19025
|
-
((
|
|
19023
|
+
var f, C, b, y, S, v;
|
|
19024
|
+
const t = useCompile(), n = useField(), o = useFieldSchema(), { getInterface: r } = useCollectionManager_deprecated(), { uiSchema: a, defaultValue: i, interface: l } = useCollectionField(), { isAllowToSetDefaultValue: c } = useIsAllowToSetDefaultValue(), u = r(l), d = ((C = (f = u == null ? void 0 : u.filterable) == null ? void 0 : f.operators) == null ? void 0 : C.find((I, F) => I.value === (o == null ? void 0 : o["x-filter-operator"]))) || ((y = (b = u == null ? void 0 : u.filterable) == null ? void 0 : b.operators) == null ? void 0 : y[0]), p = useComponent(
|
|
19025
|
+
((S = d == null ? void 0 : d.schema) == null ? void 0 : S["x-component"]) || ((v = o["x-component-props"]) == null ? void 0 : v.component) || (a == null ? void 0 : a["x-component"]) || "Input"
|
|
19026
19026
|
), m = useFormBlockContext(), h = useDynamicComponentProps(a == null ? void 0 : a["x-use-component-props"], e);
|
|
19027
|
-
|
|
19028
|
-
var
|
|
19027
|
+
if (useEffect(() => {
|
|
19028
|
+
var R;
|
|
19029
19029
|
if (!a)
|
|
19030
19030
|
return;
|
|
19031
|
-
const
|
|
19032
|
-
if (setFieldProps$1(n, "content",
|
|
19033
|
-
const
|
|
19034
|
-
|
|
19035
|
-
}
|
|
19036
|
-
if (!n.validator && (
|
|
19037
|
-
const
|
|
19038
|
-
n.validator =
|
|
19039
|
-
}
|
|
19040
|
-
o["x-disabled"] === !0 && (n.disabled = !0), o["x-read-pretty"] === !0 && (n.readPretty = !0), setRequired$1(n, o,
|
|
19041
|
-
const
|
|
19042
|
-
n.componentProps = merge(n.componentProps || {},
|
|
19043
|
-
}, [a]), a
|
|
19031
|
+
const I = t(a);
|
|
19032
|
+
if (setFieldProps$1(n, "content", I["x-content"]), setFieldProps$1(n, "title", I.title), setFieldProps$1(n, "description", I.description), m != null && m.form) {
|
|
19033
|
+
const T = c() ? o.default || i : void 0;
|
|
19034
|
+
T != null && setFieldProps$1(n, "initialValue", T);
|
|
19035
|
+
}
|
|
19036
|
+
if (!n.validator && (I["x-validator"] || o["x-validator"])) {
|
|
19037
|
+
const T = concat([], I["x-validator"] || [], o["x-validator"] || []);
|
|
19038
|
+
n.validator = T;
|
|
19039
|
+
}
|
|
19040
|
+
o["x-disabled"] === !0 && (n.disabled = !0), o["x-read-pretty"] === !0 && (n.readPretty = !0), setRequired$1(n, o, I), n.dataSource = I.enum, n.data = n.data || {}, n.data.dataSource = I == null ? void 0 : I.enum;
|
|
19041
|
+
const F = t(x(x(x({}, ((R = d == null ? void 0 : d.schema) == null ? void 0 : R["x-component-props"]) || {}), I["x-component-props"] || {}), (o == null ? void 0 : o["x-component-props"]) || {})) || {};
|
|
19042
|
+
n.componentProps = merge(n.componentProps || {}, F, h || {});
|
|
19043
|
+
}, [a]), !a)
|
|
19044
|
+
return null;
|
|
19045
|
+
const g = x(x({}, e), h);
|
|
19046
|
+
return isVariable$1(g.value) && g.value === o.default && (g.value = void 0), /* @__PURE__ */ jsx(p, x({}, g));
|
|
19044
19047
|
}, FilterCollectionField = connect((e) => {
|
|
19045
19048
|
const t = useFieldSchema();
|
|
19046
|
-
return
|
|
19049
|
+
return /* @__PURE__ */ jsx(ErrorBoundary, { FallbackComponent: ErrorFallback.Modal, onError: (n) => console.log(n), children: /* @__PURE__ */ jsx(CollectionFieldProvider, { name: t.name, children: /* @__PURE__ */ jsx(FilterCollectionFieldInternalField, x({}, e)) }) });
|
|
19047
19050
|
});
|
|
19048
19051
|
FilterCollectionField.displayName = "FilterCollectionField";
|
|
19049
19052
|
const FilterFormBlockProvider = withDynamicSchemaProps((e) => {
|
|
@@ -31857,7 +31860,7 @@ const useParseDefaultValue = () => {
|
|
|
31857
31860
|
const j = transformVariableValue(M, {
|
|
31858
31861
|
targetCollectionField: w
|
|
31859
31862
|
});
|
|
31860
|
-
j == null || j === "" ? e.mounted && e.setInitialValue(
|
|
31863
|
+
j == null || j === "" ? e.mounted && (e.setInitialValue(void 0), e.setValue(void 0)) : p() ? h === 0 && m(j) : e.setInitialValue(j), e.loading = !1;
|
|
31861
31864
|
} else
|
|
31862
31865
|
!/\{\{.+\}\}/g.test(t.default) && e.setInitialValue && e.setInitialValue(t.default);
|
|
31863
31866
|
}), v = _.debounce(S, DEBOUNCE_WAIT);
|
|
@@ -37603,6 +37606,31 @@ const enabledIndexColumn$1 = {
|
|
|
37603
37606
|
const e = useField(), { fieldSchema: t } = useColumnSchema$1(), n = useFieldSchema(), o = t || n;
|
|
37604
37607
|
return ((o == null ? void 0 : o["x-read-pretty"]) || e.readPretty) && ((r = o == null ? void 0 : o["x-component-props"]) == null ? void 0 : r.enableLink);
|
|
37605
37608
|
}
|
|
37609
|
+
}, autoFocusSettingsItem = {
|
|
37610
|
+
name: "autoFocus",
|
|
37611
|
+
type: "switch",
|
|
37612
|
+
useVisible() {
|
|
37613
|
+
const e = useField(), { fieldSchema: t } = useColumnSchema$1(), n = useFieldSchema(), o = t || n;
|
|
37614
|
+
return !(o != null && o["x-read-pretty"]) && !e.readPretty;
|
|
37615
|
+
},
|
|
37616
|
+
useComponentProps() {
|
|
37617
|
+
var i;
|
|
37618
|
+
const { t: e } = useTranslation(), t = useField(), { fieldSchema: n } = useColumnSchema$1(), o = useFieldSchema(), r = n || o, { dn: a } = useDesignable();
|
|
37619
|
+
return {
|
|
37620
|
+
title: e("Auto focus"),
|
|
37621
|
+
checked: (i = r == null ? void 0 : r["x-component-props"]) == null ? void 0 : i.autoFocus,
|
|
37622
|
+
onChange(l) {
|
|
37623
|
+
r["x-component-props"] = P(x({}, r == null ? void 0 : r["x-component-props"]), {
|
|
37624
|
+
autoFocus: l
|
|
37625
|
+
}), t.componentProps.autoFocus = l, a.emit("patch", {
|
|
37626
|
+
schema: {
|
|
37627
|
+
"x-uid": r["x-uid"],
|
|
37628
|
+
"x-component-props": x({}, r == null ? void 0 : r["x-component-props"])
|
|
37629
|
+
}
|
|
37630
|
+
});
|
|
37631
|
+
}
|
|
37632
|
+
};
|
|
37633
|
+
}
|
|
37606
37634
|
}, inputComponentSettings = new SchemaSettings({
|
|
37607
37635
|
name: "fieldSettings:component:Input",
|
|
37608
37636
|
items: [
|
|
@@ -37610,7 +37638,8 @@ const enabledIndexColumn$1 = {
|
|
|
37610
37638
|
enableLinkSettingsItem,
|
|
37611
37639
|
openModeSettingsItem,
|
|
37612
37640
|
enableScanSettingsItem,
|
|
37613
|
-
disableManualInputSettingsItem
|
|
37641
|
+
disableManualInputSettingsItem,
|
|
37642
|
+
autoFocusSettingsItem
|
|
37614
37643
|
]
|
|
37615
37644
|
}), enableLink$1 = {
|
|
37616
37645
|
name: "enableLink",
|
|
@@ -38342,10 +38371,10 @@ const enabledIndexColumn$1 = {
|
|
|
38342
38371
|
items: [size, objectFit]
|
|
38343
38372
|
}), inputTextAreaSettings = new SchemaSettings({
|
|
38344
38373
|
name: "fieldSettings:component:Input.TextArea",
|
|
38345
|
-
items: [ellipsisSettingsItem]
|
|
38374
|
+
items: [ellipsisSettingsItem, autoFocusSettingsItem]
|
|
38346
38375
|
}), inputURLSettings = new SchemaSettings({
|
|
38347
38376
|
name: "fieldSettings:component:Input.URL",
|
|
38348
|
-
items: [ellipsisSettingsItem]
|
|
38377
|
+
items: [ellipsisSettingsItem, autoFocusSettingsItem]
|
|
38349
38378
|
}), markdownSettings = new SchemaSettings({
|
|
38350
38379
|
name: "fieldSettings:component:Markdown",
|
|
38351
38380
|
items: [ellipsisSettingsItem]
|
|
@@ -38512,7 +38541,8 @@ const dividerSettings = new SchemaSettings({
|
|
|
38512
38541
|
}
|
|
38513
38542
|
},
|
|
38514
38543
|
enableLinkSettingsItem,
|
|
38515
|
-
openModeSettingsItem
|
|
38544
|
+
openModeSettingsItem,
|
|
38545
|
+
autoFocusSettingsItem
|
|
38516
38546
|
]
|
|
38517
38547
|
}), filterFormItemSettings = new SchemaSettings({
|
|
38518
38548
|
name: "FilterFormItemSettings",
|
|
@@ -40505,7 +40535,7 @@ const RenderButtonInner = observer$1(
|
|
|
40505
40535
|
component: D,
|
|
40506
40536
|
className: cls(m, h, g, "nb-action"),
|
|
40507
40537
|
type: f === "danger" ? void 0 : f,
|
|
40508
|
-
title: M,
|
|
40538
|
+
title: typeof M == "string" ? M : null,
|
|
40509
40539
|
onlyIcon: v,
|
|
40510
40540
|
children: [
|
|
40511
40541
|
!v && M && /* @__PURE__ */ jsx("span", { className: r ? "nb-action-title" : null, style: j, children: M }),
|
|
@@ -13,4 +13,5 @@ export declare const enableLinkSettingsItem: SchemaSettingsItemType;
|
|
|
13
13
|
export declare const enableScanSettingsItem: SchemaSettingsItemType;
|
|
14
14
|
export declare const disableManualInputSettingsItem: SchemaSettingsItemType;
|
|
15
15
|
export declare const openModeSettingsItem: SchemaSettingsItemType;
|
|
16
|
+
export declare const autoFocusSettingsItem: SchemaSettingsItemType;
|
|
16
17
|
export declare const inputComponentSettings: SchemaSettings<{}>;
|