@nocobase/client 1.5.0-beta.18 → 1.5.0-beta.19
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 +68 -76
- package/lib/index.js +73 -73
- package/package.json +5 -5
package/es/index.mjs
CHANGED
|
@@ -73,7 +73,7 @@ import * as nocobaseSDK from "@nocobase/sdk";
|
|
|
73
73
|
import { APIClient as APIClient$1, getSubAppName } from "@nocobase/sdk";
|
|
74
74
|
import cloneDeep from "lodash/cloneDeep";
|
|
75
75
|
import * as nocobaseClientUtils from "@nocobase/utils/client";
|
|
76
|
-
import { isPlainObject, tval as tval$1, flatten, getValuesByPath, getDefaultFormat, str2moment, toGmt, toLocal, getPickerFormat, Handlebars, dayjs as dayjs$1, uid as uid$1, error, isPortalInBody, forEach, unflatten as unflatten$1, isURL, parse, nextTick, toFixedByStep, parseHTML } from "@nocobase/utils/client";
|
|
76
|
+
import { isPlainObject, tval as tval$1, flatten, getValuesByPath, getDefaultFormat, str2moment, toGmt, toLocal, getPickerFormat, Handlebars, dayjs as dayjs$1, uid as uid$1, error, isPortalInBody, forEach, getDateTimeFormat, unflatten as unflatten$1, isURL, parse, nextTick, toFixedByStep, parseHTML } from "@nocobase/utils/client";
|
|
77
77
|
import deepmerge from "deepmerge";
|
|
78
78
|
import uniq$1 from "lodash/uniq";
|
|
79
79
|
import * as formilyJsonReactive from "@formily/reactive";
|
|
@@ -10112,7 +10112,7 @@ const TableCellRender = ({ record: e, columnSchema: t, uiSchema: n, filterProper
|
|
|
10112
10112
|
return spliceArrayState(o, {
|
|
10113
10113
|
startIndex: R,
|
|
10114
10114
|
deleteCount: T
|
|
10115
|
-
}), o.value.splice(R, T), o.setInitialValue(o.value), o.onInput(o.value);
|
|
10115
|
+
}), o.value.splice(R, T), o.setInitialValue([...o.value]), o.onInput(o.value);
|
|
10116
10116
|
}),
|
|
10117
10117
|
children: /* @__PURE__ */ jsx(CloseOutlined, { style: { cursor: "pointer", color: "gray" } })
|
|
10118
10118
|
}
|
|
@@ -19226,35 +19226,35 @@ const DatePickerContext = React.createContext({ utc: !0 }), useDatePickerContext
|
|
|
19226
19226
|
};
|
|
19227
19227
|
DatePicker.ReadPretty = ReadPretty$d.DatePicker;
|
|
19228
19228
|
DatePicker.RangePicker = function e(t) {
|
|
19229
|
-
const { value: n, picker: o = "date", format: r } = t, { t:
|
|
19230
|
-
{ label:
|
|
19231
|
-
{ label:
|
|
19232
|
-
{ label:
|
|
19233
|
-
{ label:
|
|
19234
|
-
{ label:
|
|
19235
|
-
{ label:
|
|
19236
|
-
{ label:
|
|
19237
|
-
{ label:
|
|
19238
|
-
{ label:
|
|
19239
|
-
{ label:
|
|
19240
|
-
{ label:
|
|
19241
|
-
{ label:
|
|
19242
|
-
{ label:
|
|
19243
|
-
{ label:
|
|
19244
|
-
{ label:
|
|
19245
|
-
{ label:
|
|
19246
|
-
{ label:
|
|
19247
|
-
{ label:
|
|
19248
|
-
{ label:
|
|
19249
|
-
],
|
|
19250
|
-
utc:
|
|
19251
|
-
presets:
|
|
19229
|
+
const { value: n, picker: o = "date", format: r, showTime: i, timeFormat: a } = t, { t: l } = useTranslation(), c = useFieldSchema(), u = useField(), { utc: d = !0 } = useDatePickerContext(), p = getDateRanges(), m = useCompile(), h = !c["x-filter-operator"], g = [
|
|
19230
|
+
{ label: l("Today"), value: p.today },
|
|
19231
|
+
{ label: l("Last week"), value: p.lastWeek },
|
|
19232
|
+
{ label: l("This week"), value: p.thisWeek },
|
|
19233
|
+
{ label: l("Next week"), value: p.nextWeek },
|
|
19234
|
+
{ label: l("Last month"), value: p.lastMonth },
|
|
19235
|
+
{ label: l("This month"), value: p.thisMonth },
|
|
19236
|
+
{ label: l("Next month"), value: p.nextMonth },
|
|
19237
|
+
{ label: l("Last quarter"), value: p.lastQuarter },
|
|
19238
|
+
{ label: l("This quarter"), value: p.thisQuarter },
|
|
19239
|
+
{ label: l("Next quarter"), value: p.nextQuarter },
|
|
19240
|
+
{ label: l("Last year"), value: p.lastYear },
|
|
19241
|
+
{ label: l("This year"), value: p.thisYear },
|
|
19242
|
+
{ label: l("Next year"), value: p.nextYear },
|
|
19243
|
+
{ label: l("Last 7 days"), value: p.last7Days },
|
|
19244
|
+
{ label: l("Next 7 days"), value: p.next7Days },
|
|
19245
|
+
{ label: l("Last 30 days"), value: p.last30Days },
|
|
19246
|
+
{ label: l("Next 30 days"), value: p.next30Days },
|
|
19247
|
+
{ label: l("Last 90 days"), value: p.last90Days },
|
|
19248
|
+
{ label: l("Next 90 days"), value: p.next90Days }
|
|
19249
|
+
], f = n ? inferPickerType(n == null ? void 0 : n[0]) : o, C = getPickerFormat(f) || r, b = P(x({
|
|
19250
|
+
utc: d,
|
|
19251
|
+
presets: g
|
|
19252
19252
|
}, t), {
|
|
19253
|
-
format:
|
|
19254
|
-
picker:
|
|
19255
|
-
showTime:
|
|
19256
|
-
}), [
|
|
19257
|
-
return
|
|
19253
|
+
format: getDateTimeFormat(f, C, i, a),
|
|
19254
|
+
picker: f,
|
|
19255
|
+
showTime: i ? { defaultValue: [dayjs("00:00:00", "HH:mm:ss"), dayjs("00:00:00", "HH:mm:ss")] } : !1
|
|
19256
|
+
}), [y, S] = useState(b);
|
|
19257
|
+
return h ? /* @__PURE__ */ jsxs(Space$1.Compact, { children: [
|
|
19258
19258
|
/* @__PURE__ */ jsx(
|
|
19259
19259
|
Select$1,
|
|
19260
19260
|
{
|
|
@@ -19262,8 +19262,8 @@ DatePicker.RangePicker = function e(t) {
|
|
|
19262
19262
|
"data-testid": "select-picker",
|
|
19263
19263
|
style: { width: "100px" },
|
|
19264
19264
|
popupMatchSelectWidth: !1,
|
|
19265
|
-
defaultValue:
|
|
19266
|
-
options:
|
|
19265
|
+
defaultValue: f,
|
|
19266
|
+
options: m([
|
|
19267
19267
|
{
|
|
19268
19268
|
label: '{{t("Date")}}',
|
|
19269
19269
|
value: "date"
|
|
@@ -19281,35 +19281,35 @@ DatePicker.RangePicker = function e(t) {
|
|
|
19281
19281
|
value: "year"
|
|
19282
19282
|
}
|
|
19283
19283
|
]),
|
|
19284
|
-
onChange: (
|
|
19285
|
-
const
|
|
19286
|
-
|
|
19287
|
-
picker:
|
|
19288
|
-
format:
|
|
19289
|
-
}),
|
|
19290
|
-
picker:
|
|
19291
|
-
format:
|
|
19292
|
-
}),
|
|
19284
|
+
onChange: (v) => {
|
|
19285
|
+
const F = getPickerFormat(v), I = getDateTimeFormat(v, F, i, a);
|
|
19286
|
+
u.setComponentProps({
|
|
19287
|
+
picker: v,
|
|
19288
|
+
format: F
|
|
19289
|
+
}), b.picker = v, b.format = I, S(b), c["x-component-props"] = P(x({}, t), {
|
|
19290
|
+
picker: v,
|
|
19291
|
+
format: I
|
|
19292
|
+
}), u.value = void 0;
|
|
19293
19293
|
}
|
|
19294
19294
|
}
|
|
19295
19295
|
),
|
|
19296
|
-
/* @__PURE__ */ jsx(InternalRangePicker, P(x({},
|
|
19297
|
-
] }) : /* @__PURE__ */ jsx(InternalRangePicker, x({},
|
|
19296
|
+
/* @__PURE__ */ jsx(InternalRangePicker, P(x({}, y), { value: n }))
|
|
19297
|
+
] }) : /* @__PURE__ */ jsx(InternalRangePicker, x({}, b));
|
|
19298
19298
|
};
|
|
19299
19299
|
DatePicker.FilterWithPicker = function e(t) {
|
|
19300
|
-
const { picker: n = "date", format: o } = t, { utc:
|
|
19301
|
-
utc:
|
|
19300
|
+
const { picker: n = "date", format: o, showTime: r, timeFormat: i } = t, { utc: a = !0 } = useDatePickerContext(), l = Array.isArray(t.value) ? t.value[0] : t.value, c = useCompile(), u = useFieldSchema(), d = l ? inferPickerType(l) : n, p = getPickerFormat(d) || o, m = P(x({
|
|
19301
|
+
utc: a
|
|
19302
19302
|
}, t), {
|
|
19303
19303
|
underFilter: !0,
|
|
19304
|
-
showTime:
|
|
19305
|
-
format:
|
|
19306
|
-
picker:
|
|
19307
|
-
onChange: (
|
|
19304
|
+
showTime: r ? { defaultValue: dayjs("00:00:00", "HH:mm:ss") } : !1,
|
|
19305
|
+
format: getDateTimeFormat(d, p, r, i),
|
|
19306
|
+
picker: d,
|
|
19307
|
+
onChange: (C) => {
|
|
19308
19308
|
t.onChange(void 0), setTimeout(() => {
|
|
19309
|
-
t.onChange(
|
|
19309
|
+
t.onChange(C);
|
|
19310
19310
|
});
|
|
19311
19311
|
}
|
|
19312
|
-
}),
|
|
19312
|
+
}), h = useField(), [g, f] = useState(m);
|
|
19313
19313
|
return /* @__PURE__ */ jsxs(Space$1.Compact, { children: [
|
|
19314
19314
|
/* @__PURE__ */ jsx(
|
|
19315
19315
|
Select$1,
|
|
@@ -19318,8 +19318,8 @@ DatePicker.FilterWithPicker = function e(t) {
|
|
|
19318
19318
|
"data-testid": "select-picker",
|
|
19319
19319
|
style: { width: "100px" },
|
|
19320
19320
|
popupMatchSelectWidth: !1,
|
|
19321
|
-
defaultValue:
|
|
19322
|
-
options:
|
|
19321
|
+
defaultValue: d,
|
|
19322
|
+
options: c([
|
|
19323
19323
|
{
|
|
19324
19324
|
label: '{{t("Date")}}',
|
|
19325
19325
|
value: "date"
|
|
@@ -19337,19 +19337,19 @@ DatePicker.FilterWithPicker = function e(t) {
|
|
|
19337
19337
|
value: "year"
|
|
19338
19338
|
}
|
|
19339
19339
|
]),
|
|
19340
|
-
onChange: (
|
|
19341
|
-
const
|
|
19342
|
-
|
|
19343
|
-
picker:
|
|
19344
|
-
format:
|
|
19345
|
-
}),
|
|
19346
|
-
picker:
|
|
19347
|
-
format:
|
|
19348
|
-
}),
|
|
19340
|
+
onChange: (C) => {
|
|
19341
|
+
const b = getPickerFormat(C), y = getDateTimeFormat(C, b, r, i);
|
|
19342
|
+
h.setComponentProps({
|
|
19343
|
+
picker: C,
|
|
19344
|
+
format: b
|
|
19345
|
+
}), m.picker = C, m.format = y, f(m), u["x-component-props"] = P(x({}, t), {
|
|
19346
|
+
picker: C,
|
|
19347
|
+
format: y
|
|
19348
|
+
}), h.value = null;
|
|
19349
19349
|
}
|
|
19350
19350
|
}
|
|
19351
19351
|
),
|
|
19352
|
-
/* @__PURE__ */ jsx(InternalDatePicker, P(x({},
|
|
19352
|
+
/* @__PURE__ */ jsx(InternalDatePicker, P(x({}, g), { value: l }))
|
|
19353
19353
|
] });
|
|
19354
19354
|
};
|
|
19355
19355
|
const useDateVariable = ({ operator: e, schema: t, noDisabled: n }) => {
|
|
@@ -34936,7 +34936,7 @@ function addAppVersion(e, t) {
|
|
|
34936
34936
|
addAppVersion((o = e.properties) == null ? void 0 : o[n], t);
|
|
34937
34937
|
}), e;
|
|
34938
34938
|
}
|
|
34939
|
-
const name = "@nocobase/client", version = "1.5.0-beta.
|
|
34939
|
+
const name = "@nocobase/client", version = "1.5.0-beta.19", license = "AGPL-3.0", main = "lib/index.js", module = "es/index.mjs", types = "es/index.d.ts", dependencies = {
|
|
34940
34940
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
34941
34941
|
"@ant-design/cssinjs": "^1.11.1",
|
|
34942
34942
|
"@ant-design/icons": "^5.1.4",
|
|
@@ -34958,9 +34958,9 @@ const name = "@nocobase/client", version = "1.5.0-beta.18", license = "AGPL-3.0"
|
|
|
34958
34958
|
"@formily/reactive-react": "^2.2.27",
|
|
34959
34959
|
"@formily/shared": "^2.2.27",
|
|
34960
34960
|
"@formily/validator": "^2.2.27",
|
|
34961
|
-
"@nocobase/evaluators": "1.5.0-beta.
|
|
34962
|
-
"@nocobase/sdk": "1.5.0-beta.
|
|
34963
|
-
"@nocobase/utils": "1.5.0-beta.
|
|
34961
|
+
"@nocobase/evaluators": "1.5.0-beta.19",
|
|
34962
|
+
"@nocobase/sdk": "1.5.0-beta.19",
|
|
34963
|
+
"@nocobase/utils": "1.5.0-beta.19",
|
|
34964
34964
|
ahooks: "^3.7.2",
|
|
34965
34965
|
antd: "5.12.8",
|
|
34966
34966
|
"antd-style": "3.7.1",
|
|
@@ -39454,15 +39454,7 @@ const getSourceData = (e, t) => {
|
|
|
39454
39454
|
return r === !1 ? b : /* @__PURE__ */ jsx(PopupVisibleProvider, { visible: !1, children: /* @__PURE__ */ jsxs(ActionContextProvider, { value: y, children: [
|
|
39455
39455
|
b,
|
|
39456
39456
|
h && // The recordData here is only provided when the popup is opened, not the current row record
|
|
39457
|
-
/* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(
|
|
39458
|
-
NocoBaseRecursionField,
|
|
39459
|
-
{
|
|
39460
|
-
schema: o,
|
|
39461
|
-
onlyRenderProperties: !0,
|
|
39462
|
-
basePath: l.address,
|
|
39463
|
-
filterProperties: (v) => v["x-component"] === "AssociationField.Viewer"
|
|
39464
|
-
}
|
|
39465
|
-
) }) })
|
|
39457
|
+
/* @__PURE__ */ jsx(VariablePopupRecordProvider, { children: /* @__PURE__ */ jsx(WithoutTableFieldResource.Provider, { value: !0, children: /* @__PURE__ */ jsx(NocoBaseRecursionField, { schema: o, onlyRenderProperties: !0, basePath: l.address }) }) })
|
|
39466
39458
|
] }) });
|
|
39467
39459
|
}, InternalPopoverNesterContentCss = css`
|
|
39468
39460
|
min-width: 600px;
|