@tachybase/client 1.3.22 → 1.3.23
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/application/schema-settings/SchemaSettings.d.ts +1 -1
- package/es/application/schema-settings/SchemaSettings.mjs +5 -3
- package/es/application/schema-settings/SchemaSettingsManager.d.ts +6 -0
- package/es/application/schema-settings/SchemaSettingsManager.mjs +15 -0
- package/es/application/utils/globalDeps.mjs +2 -1
- package/es/built-in/attachment-preview/previewers/file-pdf.mjs +1 -1
- package/es/built-in/locale/LocalePlugin.mjs +0 -2
- package/es/built-in/pm/PluginDetail.mjs +0 -2
- package/es/collection-manager/Configuration/components/index.mjs +1 -1
- package/es/collection-manager/Configuration/index.d.ts +1 -0
- package/es/collection-manager/Configuration/index.mjs +2 -0
- package/es/collection-manager/hooks/index.d.ts +1 -0
- package/es/collection-manager/hooks/index.mjs +2 -0
- package/es/collection-manager/index.d.ts +1 -1
- package/es/collection-manager/index.mjs +2 -2
- package/es/collection-manager/interfaces/checkbox.d.ts +1 -0
- package/es/collection-manager/interfaces/checkbox.mjs +1 -1
- package/es/collection-manager/interfaces/checkboxGroup.d.ts +1 -0
- package/es/collection-manager/interfaces/checkboxGroup.mjs +1 -1
- package/es/collection-manager/interfaces/chinaRegion.d.ts +1 -0
- package/es/collection-manager/interfaces/chinaRegion.mjs +1 -1
- package/es/collection-manager/interfaces/collection.d.ts +1 -0
- package/es/collection-manager/interfaces/collection.mjs +2 -2
- package/es/collection-manager/interfaces/color.d.ts +1 -0
- package/es/collection-manager/interfaces/color.mjs +1 -1
- package/es/collection-manager/interfaces/createdAt.d.ts +1 -0
- package/es/collection-manager/interfaces/createdAt.mjs +1 -1
- package/es/collection-manager/interfaces/createdBy.d.ts +1 -0
- package/es/collection-manager/interfaces/createdBy.mjs +1 -1
- package/es/collection-manager/interfaces/datetime.d.ts +1 -0
- package/es/collection-manager/interfaces/datetime.mjs +1 -1
- package/es/collection-manager/interfaces/email.d.ts +1 -0
- package/es/collection-manager/interfaces/email.mjs +1 -1
- package/es/collection-manager/interfaces/icon.d.ts +1 -0
- package/es/collection-manager/interfaces/icon.mjs +1 -1
- package/es/collection-manager/interfaces/input.d.ts +1 -0
- package/es/collection-manager/interfaces/input.mjs +1 -1
- package/es/collection-manager/interfaces/integer.d.ts +1 -0
- package/es/collection-manager/interfaces/integer.mjs +1 -1
- package/es/collection-manager/interfaces/json.d.ts +1 -0
- package/es/collection-manager/interfaces/json.mjs +1 -1
- package/es/collection-manager/interfaces/m2m.d.ts +1 -0
- package/es/collection-manager/interfaces/m2m.mjs +1 -1
- package/es/collection-manager/interfaces/m2o.d.ts +1 -0
- package/es/collection-manager/interfaces/m2o.mjs +1 -1
- package/es/collection-manager/interfaces/markdown.d.ts +1 -0
- package/es/collection-manager/interfaces/markdown.mjs +1 -1
- package/es/collection-manager/interfaces/multipleSelect.d.ts +1 -0
- package/es/collection-manager/interfaces/multipleSelect.mjs +2 -2
- package/es/collection-manager/interfaces/nanoid.d.ts +1 -0
- package/es/collection-manager/interfaces/nanoid.mjs +1 -1
- package/es/collection-manager/interfaces/number.d.ts +1 -0
- package/es/collection-manager/interfaces/number.mjs +1 -1
- package/es/collection-manager/interfaces/o2m.d.ts +1 -0
- package/es/collection-manager/interfaces/o2m.mjs +1 -1
- package/es/collection-manager/interfaces/o2o.d.ts +1 -0
- package/es/collection-manager/interfaces/o2o.mjs +1 -1
- package/es/collection-manager/interfaces/password.d.ts +1 -0
- package/es/collection-manager/interfaces/password.mjs +1 -1
- package/es/collection-manager/interfaces/percent.d.ts +1 -0
- package/es/collection-manager/interfaces/percent.mjs +2 -2
- package/es/collection-manager/interfaces/phone.d.ts +1 -0
- package/es/collection-manager/interfaces/phone.mjs +1 -1
- package/es/collection-manager/interfaces/radioGroup.d.ts +1 -0
- package/es/collection-manager/interfaces/radioGroup.mjs +1 -1
- package/es/collection-manager/interfaces/richText.d.ts +1 -0
- package/es/collection-manager/interfaces/richText.mjs +1 -1
- package/es/collection-manager/interfaces/select.d.ts +1 -0
- package/es/collection-manager/interfaces/select.mjs +2 -2
- package/es/collection-manager/interfaces/sort.d.ts +1 -0
- package/es/collection-manager/interfaces/sort.mjs +1 -1
- package/es/collection-manager/interfaces/subTable.d.ts +1 -0
- package/es/collection-manager/interfaces/subTable.mjs +1 -1
- package/es/collection-manager/interfaces/tableoid.d.ts +1 -0
- package/es/collection-manager/interfaces/tableoid.mjs +1 -1
- package/es/collection-manager/interfaces/textarea.d.ts +1 -0
- package/es/collection-manager/interfaces/textarea.mjs +1 -1
- package/es/collection-manager/interfaces/time.d.ts +1 -0
- package/es/collection-manager/interfaces/time.mjs +1 -1
- package/es/collection-manager/interfaces/unixTimestamp.d.ts +1 -0
- package/es/collection-manager/interfaces/unixTimestamp.mjs +1 -1
- package/es/collection-manager/interfaces/updatedAt.d.ts +1 -0
- package/es/collection-manager/interfaces/updatedAt.mjs +1 -1
- package/es/collection-manager/interfaces/updatedBy.d.ts +1 -0
- package/es/collection-manager/interfaces/updatedBy.mjs +1 -1
- package/es/collection-manager/interfaces/url.d.ts +1 -0
- package/es/collection-manager/interfaces/url.mjs +1 -1
- package/es/collection-manager/interfaces/uuid.d.ts +1 -0
- package/es/collection-manager/interfaces/uuid.mjs +1 -1
- package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +1 -0
- package/es/filter-provider/utils.mjs +2 -1
- package/es/icon/preloaded.mjs +0 -1
- package/es/index.d.ts +3 -0
- package/es/index.mjs +4 -1
- package/es/preload.d.ts +16 -0
- package/es/preload.mjs +33 -0
- package/es/schema-component/antd/association-field/index.d.ts +1 -0
- package/es/schema-component/antd/association-field/index.mjs +2 -1
- package/es/schema-component/antd/color-picker/util.d.ts +1 -1
- package/es/schema-component/antd/color-picker/util.mjs +2 -1
- package/es/schema-component/antd/date-picker/util.d.ts +1 -1
- package/es/schema-component/antd/date-picker/util.mjs +2 -1
- package/es/schema-component/antd/filter/index.d.ts +1 -0
- package/es/schema-component/antd/filter/index.mjs +1 -0
- package/es/schema-component/antd/form-v2/index.d.ts +1 -0
- package/es/schema-component/antd/form-v2/index.mjs +1 -0
- package/es/schema-component/antd/table-v2/index.d.ts +1 -0
- package/es/schema-component/antd/table-v2/index.mjs +1 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +6 -7
- package/es/schema-settings/LinkageRules/index.d.ts +2 -0
- package/es/schema-settings/LinkageRules/index.mjs +2 -0
- package/es/schema-settings/VariableInput/index.d.ts +1 -0
- package/es/schema-settings/VariableInput/index.mjs +1 -0
- package/es/schema-settings/index.d.ts +3 -0
- package/es/schema-settings/index.mjs +3 -0
- package/es/variables/hooks/useBuiltinVariables.mjs +1 -1
- package/lib/application/schema-settings/SchemaSettings.js +5 -3
- package/lib/application/schema-settings/SchemaSettingsManager.js +15 -0
- package/lib/application/utils/globalDeps.js +3 -1
- package/lib/built-in/attachment-preview/previewers/file-pdf.js +1 -1
- package/lib/built-in/locale/LocalePlugin.js +72 -92
- package/lib/built-in/pm/PluginDetail.js +0 -3
- package/lib/collection-manager/Configuration/components/index.js +1 -1
- package/lib/collection-manager/Configuration/index.js +79 -19
- package/lib/collection-manager/hooks/index.js +28 -5
- package/lib/collection-manager/index.js +37 -17
- package/lib/collection-manager/interfaces/checkbox.js +1 -1
- package/lib/collection-manager/interfaces/checkboxGroup.js +1 -1
- package/lib/collection-manager/interfaces/chinaRegion.js +1 -1
- package/lib/collection-manager/interfaces/collection.js +2 -2
- package/lib/collection-manager/interfaces/color.js +1 -1
- package/lib/collection-manager/interfaces/createdAt.js +1 -1
- package/lib/collection-manager/interfaces/createdBy.js +1 -1
- package/lib/collection-manager/interfaces/datetime.js +1 -1
- package/lib/collection-manager/interfaces/email.js +1 -1
- package/lib/collection-manager/interfaces/icon.js +1 -1
- package/lib/collection-manager/interfaces/input.js +1 -1
- package/lib/collection-manager/interfaces/integer.js +1 -1
- package/lib/collection-manager/interfaces/json.js +1 -1
- package/lib/collection-manager/interfaces/m2m.js +1 -1
- package/lib/collection-manager/interfaces/m2o.js +1 -1
- package/lib/collection-manager/interfaces/markdown.js +1 -1
- package/lib/collection-manager/interfaces/multipleSelect.js +2 -2
- package/lib/collection-manager/interfaces/nanoid.js +1 -1
- package/lib/collection-manager/interfaces/number.js +1 -1
- package/lib/collection-manager/interfaces/o2m.js +1 -1
- package/lib/collection-manager/interfaces/o2o.js +1 -1
- package/lib/collection-manager/interfaces/password.js +1 -1
- package/lib/collection-manager/interfaces/percent.js +2 -2
- package/lib/collection-manager/interfaces/phone.js +1 -1
- package/lib/collection-manager/interfaces/radioGroup.js +1 -1
- package/lib/collection-manager/interfaces/richText.js +1 -1
- package/lib/collection-manager/interfaces/select.js +2 -2
- package/lib/collection-manager/interfaces/sort.js +1 -1
- package/lib/collection-manager/interfaces/subTable.js +1 -1
- package/lib/collection-manager/interfaces/tableoid.js +1 -1
- package/lib/collection-manager/interfaces/textarea.js +1 -1
- package/lib/collection-manager/interfaces/time.js +1 -1
- package/lib/collection-manager/interfaces/unixTimestamp.js +1 -1
- package/lib/collection-manager/interfaces/updatedAt.js +1 -1
- package/lib/collection-manager/interfaces/updatedBy.js +1 -1
- package/lib/collection-manager/interfaces/url.js +1 -1
- package/lib/collection-manager/interfaces/uuid.js +1 -1
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +1 -0
- package/lib/filter-provider/utils.js +3 -1
- package/lib/icon/preloaded.js +0 -1
- package/lib/index.js +234 -125
- package/lib/locale/zh-CN.js +3 -0
- package/lib/preload.js +77 -0
- package/lib/schema-component/antd/association-field/index.js +10 -2
- package/lib/schema-component/antd/color-picker/util.js +17 -6
- package/lib/schema-component/antd/date-picker/util.js +29 -18
- package/lib/schema-component/antd/filter/index.js +9 -0
- package/lib/schema-component/antd/form-v2/index.js +14 -0
- package/lib/schema-component/antd/table-v2/index.js +9 -0
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +6 -7
- package/lib/schema-settings/LinkageRules/index.js +271 -180
- package/lib/schema-settings/VariableInput/index.js +9 -0
- package/lib/schema-settings/index.js +75 -48
- package/lib/variables/hooks/useBuiltinVariables.js +13 -3
- package/package.json +6 -6
|
@@ -4,7 +4,7 @@ export declare class SchemaSettings<T = {}> {
|
|
|
4
4
|
name: string;
|
|
5
5
|
get items(): SchemaSettingsItemType[];
|
|
6
6
|
constructor(options: SchemaSettingOptions<T>);
|
|
7
|
-
add(name: string, item: SchemaSettingsItemTypeWithoutName): void;
|
|
7
|
+
add(name: string, item: SchemaSettingsItemTypeWithoutName, targetIndex?: number): void;
|
|
8
8
|
get(nestedName: string): SchemaSettingsItemType | undefined;
|
|
9
9
|
remove(nestedName: string): void;
|
|
10
10
|
}
|
|
@@ -12,7 +12,7 @@ class SchemaSettings {
|
|
|
12
12
|
get items() {
|
|
13
13
|
return this.options.items;
|
|
14
14
|
}
|
|
15
|
-
add(name, item) {
|
|
15
|
+
add(name, item, targetIndex) {
|
|
16
16
|
const arr = name.split('.');
|
|
17
17
|
const data = {
|
|
18
18
|
...item,
|
|
@@ -20,7 +20,8 @@ class SchemaSettings {
|
|
|
20
20
|
};
|
|
21
21
|
if (1 === arr.length) {
|
|
22
22
|
const index = this.items.findIndex((item)=>item.name === name);
|
|
23
|
-
if (-1 === index) this.items.
|
|
23
|
+
if (-1 === index) if (targetIndex) this.items.splice(targetIndex, 0, data);
|
|
24
|
+
else this.items.push(data);
|
|
24
25
|
else this.items[index] = data;
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
@@ -29,7 +30,8 @@ class SchemaSettings {
|
|
|
29
30
|
if (parentItem) {
|
|
30
31
|
if (!parentItem.children) parentItem.children = [];
|
|
31
32
|
const index = parentItem.children.findIndex((item)=>item.name === name);
|
|
32
|
-
if (-1 === index) parentItem.children.
|
|
33
|
+
if (-1 === index) if (targetIndex) parentItem.children.splice(targetIndex, 0, data);
|
|
34
|
+
else parentItem.children.push(data);
|
|
33
35
|
else parentItem.children[index] = data;
|
|
34
36
|
}
|
|
35
37
|
}
|
|
@@ -14,6 +14,12 @@ export declare class SchemaSettingsManager {
|
|
|
14
14
|
constructor(_schemaSettings: SchemaSettings<any>[], app: Application);
|
|
15
15
|
add<T = any>(...schemaSettingList: SchemaSettings<T>[]): void;
|
|
16
16
|
addItem(schemaSettingName: string | string[], itemName: string, data: SchemaSettingsItemTypeWithoutName): void;
|
|
17
|
+
addItemWithIndex({ schemaSettingName, itemName, index, data, }: {
|
|
18
|
+
schemaSettingName: string | string[];
|
|
19
|
+
itemName: string;
|
|
20
|
+
index?: number | number[];
|
|
21
|
+
data?: SchemaSettingsItemTypeWithoutName;
|
|
22
|
+
}): void;
|
|
17
23
|
get<T>(name: string): SchemaSettings<T> | undefined;
|
|
18
24
|
getAll(): Record<string, SchemaSettings<any>>;
|
|
19
25
|
has(name: string): boolean;
|
|
@@ -36,6 +36,21 @@ class SchemaSettingsManager {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
addItemWithIndex(param) {
|
|
40
|
+
let { schemaSettingName, itemName, index, data } = param;
|
|
41
|
+
if (Array.isArray(schemaSettingName)) return void schemaSettingName.forEach((name, i)=>{
|
|
42
|
+
this.addItemWithIndex({
|
|
43
|
+
schemaSettingName: name,
|
|
44
|
+
itemName,
|
|
45
|
+
index: Array.isArray(index) ? index[i] : index,
|
|
46
|
+
data
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
const schemaSetting = this.get(schemaSettingName);
|
|
50
|
+
if (!schemaSetting) return;
|
|
51
|
+
const targetIndex = Array.isArray(index) ? index[0] : index;
|
|
52
|
+
schemaSetting.add(itemName, data, targetIndex);
|
|
53
|
+
}
|
|
39
54
|
get(name) {
|
|
40
55
|
return this.schemaSettings[name];
|
|
41
56
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import react from "react";
|
|
2
2
|
import axios from "axios";
|
|
3
|
+
import dayjs from "dayjs";
|
|
3
4
|
import lodash from "lodash";
|
|
4
5
|
import react_dom from "react-dom";
|
|
5
6
|
import jsx_runtime from "react/jsx-runtime";
|
|
@@ -43,7 +44,7 @@ function defineGlobalDeps(requirejs) {
|
|
|
43
44
|
requirejs.define('@dnd-kit/sortable', ()=>__WEBPACK_EXTERNAL_MODULE__dnd_kit_sortable_a8361dd8__);
|
|
44
45
|
requirejs.define('@dnd-kit/utilities', ()=>__WEBPACK_EXTERNAL_MODULE__dnd_kit_utilities_3c8eb4c2__);
|
|
45
46
|
requirejs.define('axios', ()=>axios);
|
|
46
|
-
requirejs.define('dayjs', ()=>
|
|
47
|
+
requirejs.define('dayjs', ()=>dayjs);
|
|
47
48
|
requirejs.define('lodash', ()=>lodash);
|
|
48
49
|
requirejs.define('ahooks', ()=>__WEBPACK_EXTERNAL_MODULE_ahooks__);
|
|
49
50
|
requirejs.define('@emotion/css', ()=>__WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__);
|
|
@@ -13,7 +13,7 @@ const options = {
|
|
|
13
13
|
cMapPacked: true,
|
|
14
14
|
standardFontDataUrl: "https://assets.tachybase.com/pdfjs-dist@".concat(pdfjs.version, "/standard_fonts/")
|
|
15
15
|
};
|
|
16
|
-
pdfjs.GlobalWorkerOptions.workerSrc = "https://assets.tachybase.com/pdfjs-dist@".concat(pdfjs.version, "/build/pdf.worker.min.
|
|
16
|
+
pdfjs.GlobalWorkerOptions.workerSrc = "https://assets.tachybase.com/pdfjs-dist@".concat(pdfjs.version, "/build/pdf.worker.min.mjs");
|
|
17
17
|
const TransformInternal = (param)=>{
|
|
18
18
|
let { noTransformWrapper = false, children } = param;
|
|
19
19
|
return noTransformWrapper ? children : /*#__PURE__*/ jsx(TransformWrapper, {
|
|
@@ -52,8 +52,6 @@ class LocalePlugin extends Plugin {
|
|
|
52
52
|
const dayjsLang = dayjsLocale[null == data ? void 0 : null == (_data_data3 = data.data) ? void 0 : _data_data3.lang] || 'en';
|
|
53
53
|
await import("dayjs/locale/".concat(dayjsLang, ".js"));
|
|
54
54
|
dayjs.locale(dayjsLang);
|
|
55
|
-
const updateLocale = await import("dayjs/plugin/updateLocale");
|
|
56
|
-
dayjs.extend(updateLocale.default);
|
|
57
55
|
const localeSetting = {
|
|
58
56
|
invalidDate: '-'
|
|
59
57
|
};
|
|
@@ -2,12 +2,10 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { Alert, Col, Modal, Row, Space, Spin, Table, Tabs, Tag, Typography } from "antd";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
|
-
import relativeTime from "dayjs/plugin/relativeTime";
|
|
6
5
|
import { useTranslation } from "react-i18next";
|
|
7
6
|
import { useRequest } from "../../api-client/index.mjs";
|
|
8
7
|
import { PluginDocument } from "./PluginDocument.mjs";
|
|
9
8
|
import { useStyles } from "./style.mjs";
|
|
10
|
-
dayjs.extend(relativeTime);
|
|
11
9
|
const PluginDetail = (param)=>{
|
|
12
10
|
let { plugin, onCancel } = param;
|
|
13
11
|
var _data_data, _data_data1, _data_data2, _data_data3, _data_data4, _data_data5, _data_data6, _data_data7, _data_data8, _data_data9;
|
|
@@ -144,7 +144,7 @@ const TargetKey = observer((props)=>{
|
|
|
144
144
|
const field = useField();
|
|
145
145
|
field.required = true;
|
|
146
146
|
useEffect(()=>{
|
|
147
|
-
if (target) {
|
|
147
|
+
if (target && '__temp__' !== target) {
|
|
148
148
|
var _getCollection_fields;
|
|
149
149
|
setOptions(null == (_getCollection_fields = getCollection(target).fields) ? void 0 : _getCollection_fields.filter((v)=>{
|
|
150
150
|
if ('hasMany' !== type) return v.primaryKey || v.unique;
|
|
@@ -16,3 +16,4 @@ export * from './components/CollectionFieldInterfaceTag';
|
|
|
16
16
|
export * from './components/CollectionCategory';
|
|
17
17
|
export * from './components/CollectionTemplateTag';
|
|
18
18
|
export * from './ImportCollectionMetaAction';
|
|
19
|
+
export * as CMConfigurationComponents from './components';
|
|
@@ -17,6 +17,8 @@ export * from "./components/CollectionFieldInterfaceTag.mjs";
|
|
|
17
17
|
export * from "./components/CollectionCategory.mjs";
|
|
18
18
|
export * from "./components/CollectionTemplateTag.mjs";
|
|
19
19
|
export * from "./ImportCollectionMetaAction.mjs";
|
|
20
|
+
import * as __WEBPACK_EXTERNAL_MODULE__components_index_mjs_99c14d58__ from "./components/index.mjs";
|
|
20
21
|
registerValidateFormats({
|
|
21
22
|
uid: /^[a-zA-Z][a-zA-Z0-9_-]*$/
|
|
22
23
|
});
|
|
24
|
+
export { __WEBPACK_EXTERNAL_MODULE__components_index_mjs_99c14d58__ as CMConfigurationComponents };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import useDialect from "./useDialect.mjs";
|
|
1
2
|
export * from "./useCollection_deprecated.mjs";
|
|
2
3
|
export * from "./useCollectionField_deprecated.mjs";
|
|
3
4
|
export * from "./useCollectionManager_deprecated.mjs";
|
|
4
5
|
export * from "./useCollectionDataSource.mjs";
|
|
6
|
+
export { useDialect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useCancelAction, useCollectionFilterOptions, useSortFields, useLinkageCollectionFilterOptions, useCollectionFieldsOptions, isDeleteButtonDisabled, } from './action-hooks';
|
|
1
|
+
export { useCancelAction, useCollectionFilterOptions, useSortFields, useLinkageCollectionFilterOptions, useCollectionFieldsOptions, isDeleteButtonDisabled, useCollectionFilterOptionsV2, } from './action-hooks';
|
|
2
2
|
export * from './CollectionManagerProvider';
|
|
3
3
|
export * from './CollectionManagerSchemaComponentProvider';
|
|
4
4
|
export * from './CollectionProvider_deprecated';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isDeleteButtonDisabled, useCancelAction, useCollectionFieldsOptions, useCollectionFilterOptions, useLinkageCollectionFilterOptions, useSortFields } from "./action-hooks.mjs";
|
|
1
|
+
import { isDeleteButtonDisabled, useCancelAction, useCollectionFieldsOptions, useCollectionFilterOptions, useCollectionFilterOptionsV2, useLinkageCollectionFilterOptions, useSortFields } from "./action-hooks.mjs";
|
|
2
2
|
import { useFieldInterfaceOptions } from "./Configuration/interfaces.mjs";
|
|
3
3
|
import { getConfigurableProperties } from "./templates/properties/index.mjs";
|
|
4
4
|
export * from "./CollectionManagerProvider.mjs";
|
|
@@ -19,4 +19,4 @@ export * from "./sub-table.mjs";
|
|
|
19
19
|
export * from "./CollectionHistoryProvider.mjs";
|
|
20
20
|
export * from "./utils.mjs";
|
|
21
21
|
import * as __WEBPACK_EXTERNAL_MODULE__interfaces_properties_index_mjs_a68377dd__ from "./interfaces/properties/index.mjs";
|
|
22
|
-
export { getConfigurableProperties, __WEBPACK_EXTERNAL_MODULE__interfaces_properties_index_mjs_a68377dd__ as interfacesProperties, isDeleteButtonDisabled, useCancelAction, useCollectionFieldsOptions, useCollectionFilterOptions, useFieldInterfaceOptions, useLinkageCollectionFilterOptions, useSortFields };
|
|
22
|
+
export { getConfigurableProperties, __WEBPACK_EXTERNAL_MODULE__interfaces_properties_index_mjs_a68377dd__ as interfacesProperties, isDeleteButtonDisabled, useCancelAction, useCollectionFieldsOptions, useCollectionFilterOptions, useCollectionFilterOptionsV2, useFieldInterfaceOptions, useLinkageCollectionFilterOptions, useSortFields };
|
|
@@ -22,7 +22,7 @@ class CheckboxFieldInterface extends CollectionFieldInterface {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
constructor(...args){
|
|
25
|
-
super(...args), _define_property(this, "name", 'checkbox'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Checkbox")}}'), _define_property(this, "default", {
|
|
25
|
+
super(...args), _define_property(this, "name", 'checkbox'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "icon", 'CheckSquareOutlined'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Checkbox")}}'), _define_property(this, "default", {
|
|
26
26
|
type: 'boolean',
|
|
27
27
|
uiSchema: {
|
|
28
28
|
type: 'boolean',
|
|
@@ -22,7 +22,7 @@ class CheckboxGroupFieldInterface extends CollectionFieldInterface {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
constructor(...args){
|
|
25
|
-
super(...args), _define_property(this, "name", 'checkboxGroup'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "order", 5), _define_property(this, "title", '{{t("Checkbox group")}}'), _define_property(this, "default", {
|
|
25
|
+
super(...args), _define_property(this, "name", 'checkboxGroup'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "icon", 'UnorderedListOutlined'), _define_property(this, "order", 5), _define_property(this, "title", '{{t("Checkbox group")}}'), _define_property(this, "default", {
|
|
26
26
|
interface: 'checkboxGroup',
|
|
27
27
|
type: 'array',
|
|
28
28
|
defaultValue: [],
|
|
@@ -20,7 +20,7 @@ class ChinaRegionFieldInterface extends CollectionFieldInterface {
|
|
|
20
20
|
if (!values.targetKey) values.targetKey = 'id';
|
|
21
21
|
}
|
|
22
22
|
constructor(...args){
|
|
23
|
-
super(...args), _define_property(this, "name", 'chinaRegion'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "order", 7), _define_property(this, "title", '{{t("China region")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
|
|
23
|
+
super(...args), _define_property(this, "name", 'chinaRegion'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "icon", 'CompassOutlined'), _define_property(this, "order", 7), _define_property(this, "title", '{{t("China region")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
|
|
24
24
|
interface: 'chinaRegion',
|
|
25
25
|
type: 'belongsToMany',
|
|
26
26
|
target: 'chinaRegions',
|
|
@@ -15,7 +15,7 @@ class CollectionSelectFieldInterface extends CollectionFieldInterface {
|
|
|
15
15
|
let { block } = param;
|
|
16
16
|
const props = schema['x-component-props'] = schema['x-component-props'] || {};
|
|
17
17
|
props.style = {
|
|
18
|
-
...props.style
|
|
18
|
+
...props.style,
|
|
19
19
|
width: '100%'
|
|
20
20
|
};
|
|
21
21
|
if ([
|
|
@@ -24,7 +24,7 @@ class CollectionSelectFieldInterface extends CollectionFieldInterface {
|
|
|
24
24
|
].includes(block)) props['ellipsis'] = true;
|
|
25
25
|
}
|
|
26
26
|
constructor(...args){
|
|
27
|
-
super(...args), _define_property(this, "name", 'collection'), _define_property(this, "type", 'string'), _define_property(this, "group", 'advanced'), _define_property(this, "order", 5), _define_property(this, "title", '{{t("Collection selector")}}'), _define_property(this, "description", '{{t("Providing certain collections as options for users, typically used in polymorphic or inheritance scenarios")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
27
|
+
super(...args), _define_property(this, "name", 'collection'), _define_property(this, "type", 'string'), _define_property(this, "group", 'advanced'), _define_property(this, "icon", 'ClusterOutlined'), _define_property(this, "order", 5), _define_property(this, "title", '{{t("Collection selector")}}'), _define_property(this, "description", '{{t("Providing certain collections as options for users, typically used in polymorphic or inheritance scenarios")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
28
28
|
type: 'string',
|
|
29
29
|
uiSchema: {
|
|
30
30
|
type: 'string',
|
|
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
|
|
|
12
12
|
}
|
|
13
13
|
class ColorFieldInterface extends CollectionFieldInterface {
|
|
14
14
|
constructor(...args){
|
|
15
|
-
super(...args), _define_property(this, "name", 'color'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 10), _define_property(this, "title", '{{t("Color")}}'), _define_property(this, "default", {
|
|
15
|
+
super(...args), _define_property(this, "name", 'color'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 10), _define_property(this, "icon", 'BgColorsOutlined'), _define_property(this, "title", '{{t("Color")}}'), _define_property(this, "default", {
|
|
16
16
|
type: 'string',
|
|
17
17
|
uiSchema: {
|
|
18
18
|
type: 'string',
|
|
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
|
|
|
12
12
|
}
|
|
13
13
|
class CreatedAtFieldInterface extends CollectionFieldInterface {
|
|
14
14
|
constructor(...args){
|
|
15
|
-
super(...args), _define_property(this, "name", 'createdAt'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Created at")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
15
|
+
super(...args), _define_property(this, "name", 'createdAt'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Created at")}}'), _define_property(this, "sortable", true), _define_property(this, "icon", 'FieldTimeOutlined'), _define_property(this, "default", {
|
|
16
16
|
type: 'date',
|
|
17
17
|
field: 'createdAt',
|
|
18
18
|
uiSchema: {
|
|
@@ -26,7 +26,7 @@ class CreatedByFieldInterface extends CollectionFieldInterface {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
constructor(...args){
|
|
29
|
-
super(...args), _define_property(this, "name", 'createdBy'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 3), _define_property(this, "title", '{{t("Created by")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
|
|
29
|
+
super(...args), _define_property(this, "name", 'createdBy'), _define_property(this, "type", 'object'), _define_property(this, "group", 'systemInfo'), _define_property(this, "order", 3), _define_property(this, "title", '{{t("Created by")}}'), _define_property(this, "icon", 'UserOutlined'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
|
|
30
30
|
type: 'belongsTo',
|
|
31
31
|
target: 'users',
|
|
32
32
|
foreignKey: 'createdById',
|
|
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
|
|
|
12
12
|
}
|
|
13
13
|
class DatetimeFieldInterface extends CollectionFieldInterface {
|
|
14
14
|
constructor(...args){
|
|
15
|
-
super(...args), _define_property(this, "name", 'datetime'), _define_property(this, "type", 'object'), _define_property(this, "group", 'datetime'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Datetime")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
15
|
+
super(...args), _define_property(this, "name", 'datetime'), _define_property(this, "type", 'object'), _define_property(this, "group", 'datetime'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Datetime")}}'), _define_property(this, "icon", 'dateTimeField'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
16
16
|
type: 'date',
|
|
17
17
|
uiSchema: {
|
|
18
18
|
type: 'string',
|
|
@@ -22,7 +22,7 @@ class EmailFieldInterface extends CollectionFieldInterface {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
constructor(...args){
|
|
25
|
-
super(...args), _define_property(this, "name", 'email'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("Email")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
25
|
+
super(...args), _define_property(this, "name", 'email'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("Email")}}'), _define_property(this, "icon", 'CommentOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
26
26
|
type: 'string',
|
|
27
27
|
uiSchema: {
|
|
28
28
|
type: 'string',
|
|
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
|
|
|
12
12
|
}
|
|
13
13
|
class IconFieldInterface extends CollectionFieldInterface {
|
|
14
14
|
constructor(...args){
|
|
15
|
-
super(...args), _define_property(this, "name", 'icon'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 10), _define_property(this, "title", '{{t("Icon")}}'), _define_property(this, "default", {
|
|
15
|
+
super(...args), _define_property(this, "name", 'icon'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 10), _define_property(this, "title", '{{t("Icon")}}'), _define_property(this, "icon", 'FieldNumberOutlined'), _define_property(this, "default", {
|
|
16
16
|
type: 'string',
|
|
17
17
|
uiSchema: {
|
|
18
18
|
type: 'string',
|
|
@@ -147,7 +147,7 @@ class InputFieldInterface extends CollectionFieldInterface {
|
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
constructor(...args){
|
|
150
|
-
super(...args), _define_property(this, "name", 'input'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Single line text")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
150
|
+
super(...args), _define_property(this, "name", 'input'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 1), _define_property(this, "title", '{{t("Single line text")}}'), _define_property(this, "icon", 'inputField'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
151
151
|
interface: 'input',
|
|
152
152
|
type: 'string',
|
|
153
153
|
uiSchema: {
|
|
@@ -18,7 +18,7 @@ registerValidateFormats({
|
|
|
18
18
|
});
|
|
19
19
|
class IntegerFieldInterface extends CollectionFieldInterface {
|
|
20
20
|
constructor(...args){
|
|
21
|
-
super(...args), _define_property(this, "name", 'integer'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 6), _define_property(this, "title", '{{t("Integer")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
21
|
+
super(...args), _define_property(this, "name", 'integer'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 6), _define_property(this, "title", '{{t("Integer")}}'), _define_property(this, "icon", 'FieldBinaryOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
22
22
|
type: 'bigInt',
|
|
23
23
|
uiSchema: {
|
|
24
24
|
type: 'number',
|
|
@@ -29,7 +29,7 @@ registerValidateRules({
|
|
|
29
29
|
});
|
|
30
30
|
class JsonFieldInterface extends CollectionFieldInterface {
|
|
31
31
|
constructor(...args){
|
|
32
|
-
super(...args), _define_property(this, "name", 'json'), _define_property(this, "type", 'object'), _define_property(this, "group", 'advanced'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("JSON")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
32
|
+
super(...args), _define_property(this, "name", 'json'), _define_property(this, "type", 'object'), _define_property(this, "group", 'advanced'), _define_property(this, "order", 4), _define_property(this, "title", '{{t("JSON")}}'), _define_property(this, "icon", 'CodeOutlined'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
33
33
|
type: 'json',
|
|
34
34
|
uiSchema: {
|
|
35
35
|
type: 'object',
|
|
@@ -40,7 +40,7 @@ class M2MFieldInterface extends CollectionFieldInterface {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
constructor(...args){
|
|
43
|
-
super(...args), _define_property(this, "name", 'm2m'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 6), _define_property(this, "title", '{{t("Many to many")}}'), _define_property(this, "description", '{{t("Many to many description")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
|
|
43
|
+
super(...args), _define_property(this, "name", 'm2m'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 6), _define_property(this, "title", '{{t("Many to many")}}'), _define_property(this, "icon", 'DeploymentUnitOutlined'), _define_property(this, "description", '{{t("Many to many description")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
|
|
44
44
|
type: 'belongsToMany',
|
|
45
45
|
uiSchema: {
|
|
46
46
|
'x-component': 'AssociationField',
|
|
@@ -30,7 +30,7 @@ class M2OFieldInterface extends CollectionFieldInterface {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
constructor(...args){
|
|
33
|
-
super(...args), _define_property(this, "name", 'm2o'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 5), _define_property(this, "title", '{{t("Many to one")}}'), _define_property(this, "description", '{{t("Many to one description")}}'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
|
|
33
|
+
super(...args), _define_property(this, "name", 'm2o'), _define_property(this, "type", 'object'), _define_property(this, "group", 'relation'), _define_property(this, "order", 5), _define_property(this, "title", '{{t("Many to one")}}'), _define_property(this, "description", '{{t("Many to one description")}}'), _define_property(this, "icon", 'DeploymentUnitOutlined'), _define_property(this, "isAssociation", true), _define_property(this, "default", {
|
|
34
34
|
type: 'belongsTo',
|
|
35
35
|
uiSchema: {
|
|
36
36
|
'x-component': 'AssociationField',
|
|
@@ -58,7 +58,7 @@ class MarkdownFieldInterface extends CollectionFieldInterface {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
constructor(...args){
|
|
61
|
-
super(...args), _define_property(this, "name", 'markdown'), _define_property(this, "type", 'object'), _define_property(this, "title", '{{t("Markdown")}}'), _define_property(this, "group", 'media'), _define_property(this, "default", {
|
|
61
|
+
super(...args), _define_property(this, "name", 'markdown'), _define_property(this, "type", 'object'), _define_property(this, "title", '{{t("Markdown")}}'), _define_property(this, "group", 'media'), _define_property(this, "icon", 'CodeOutlined'), _define_property(this, "default", {
|
|
62
62
|
type: 'text',
|
|
63
63
|
uiSchema: {
|
|
64
64
|
type: 'string',
|
|
@@ -15,7 +15,7 @@ class MultipleSelectFieldInterface extends CollectionFieldInterface {
|
|
|
15
15
|
let { block } = param;
|
|
16
16
|
const props = schema['x-component-props'] = schema['x-component-props'] || {};
|
|
17
17
|
props.style = {
|
|
18
|
-
...props.style
|
|
18
|
+
...props.style,
|
|
19
19
|
width: '100%'
|
|
20
20
|
};
|
|
21
21
|
if ([
|
|
@@ -24,7 +24,7 @@ class MultipleSelectFieldInterface extends CollectionFieldInterface {
|
|
|
24
24
|
].includes(block)) props['ellipsis'] = true;
|
|
25
25
|
}
|
|
26
26
|
constructor(...args){
|
|
27
|
-
super(...args), _define_property(this, "name", 'multipleSelect'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "order", 3), _define_property(this, "title", '{{t("Multiple select")}}'), _define_property(this, "default", {
|
|
27
|
+
super(...args), _define_property(this, "name", 'multipleSelect'), _define_property(this, "type", 'object'), _define_property(this, "group", 'choices'), _define_property(this, "order", 3), _define_property(this, "title", '{{t("Multiple select")}}'), _define_property(this, "icon", 'multipleSelectField'), _define_property(this, "default", {
|
|
28
28
|
type: 'array',
|
|
29
29
|
defaultValue: [],
|
|
30
30
|
uiSchema: {
|
|
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
|
|
|
12
12
|
}
|
|
13
13
|
class NanoidFieldInterface extends CollectionFieldInterface {
|
|
14
14
|
constructor(...args){
|
|
15
|
-
super(...args), _define_property(this, "name", 'nanoid'), _define_property(this, "type", 'object'), _define_property(this, "group", 'advanced'), _define_property(this, "order", 0), _define_property(this, "title", '{{t("Nano ID")}}'), _define_property(this, "hidden", false), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
15
|
+
super(...args), _define_property(this, "name", 'nanoid'), _define_property(this, "type", 'object'), _define_property(this, "group", 'advanced'), _define_property(this, "order", 0), _define_property(this, "title", '{{t("Nano ID")}}'), _define_property(this, "hidden", false), _define_property(this, "sortable", true), _define_property(this, "icon", 'FieldNumberOutlined'), _define_property(this, "default", {
|
|
16
16
|
type: 'nanoid',
|
|
17
17
|
uiSchema: {
|
|
18
18
|
type: 'string',
|
|
@@ -73,7 +73,7 @@ class NumberFieldInterface extends CollectionFieldInterface {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
constructor(...args){
|
|
76
|
-
super(...args), _define_property(this, "name", 'number'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 7), _define_property(this, "title", '{{t("Number")}}'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
76
|
+
super(...args), _define_property(this, "name", 'number'), _define_property(this, "type", 'object'), _define_property(this, "group", 'basic'), _define_property(this, "order", 7), _define_property(this, "title", '{{t("Number")}}'), _define_property(this, "icon", 'numberField'), _define_property(this, "sortable", true), _define_property(this, "default", {
|
|
77
77
|
type: 'double',
|
|
78
78
|
uiSchema: {
|
|
79
79
|
type: 'number',
|