@nocobase/plugin-snapshot-field 0.18.0-alpha.9 → 0.19.0-alpha.2

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.
@@ -1,2 +1,2 @@
1
1
  import { SchemaInitializer } from '@nocobase/client';
2
- export declare const snapshotBlockInitializers: SchemaInitializer<import("antd").ButtonProps, {}>;
2
+ export declare const snapshotBlockInitializers: SchemaInitializer;
@@ -1,12 +1,12 @@
1
1
  module.exports = {
2
- "@nocobase/client": "0.18.0-alpha.9",
2
+ "@nocobase/client": "0.19.0-alpha.2",
3
3
  "react": "18.2.0",
4
4
  "@formily/react": "2.3.0",
5
5
  "@formily/core": "2.3.0",
6
6
  "lodash": "4.17.21",
7
- "@nocobase/database": "0.18.0-alpha.9",
8
- "@nocobase/server": "0.18.0-alpha.9",
9
- "antd": "5.12.2",
7
+ "@nocobase/database": "0.19.0-alpha.2",
8
+ "@nocobase/server": "0.19.0-alpha.2",
9
+ "antd": "5.12.8",
10
10
  "react-i18next": "11.18.6",
11
11
  "@ant-design/icons": "5.2.6",
12
12
  "@formily/shared": "2.3.0"
@@ -1,3 +1,2 @@
1
- import { CollectionOptions } from '@nocobase/database';
2
- declare const _default: CollectionOptions;
1
+ declare const _default: import("@nocobase/database").CollectionOptions;
3
2
  export default _default;
@@ -20,17 +20,17 @@ __export(collectionsHistory_exports, {
20
20
  default: () => collectionsHistory_default
21
21
  });
22
22
  module.exports = __toCommonJS(collectionsHistory_exports);
23
- var collectionsHistory_default = {
24
- namespace: "snapshot-field.snapshot-field",
25
- duplicator: "required",
23
+ var import_database = require("@nocobase/database");
24
+ var collectionsHistory_default = (0, import_database.defineCollection)({
25
+ dumpRules: "required",
26
26
  name: "collectionsHistory",
27
- title: "\u6570\u636E\u8868\u5386\u53F2",
28
27
  sortable: "sort",
29
28
  autoGenId: false,
30
29
  model: "CollectionModel",
31
30
  repository: "CollectionRepository",
32
31
  timestamps: false,
33
32
  filterTargetKey: "name",
33
+ shared: true,
34
34
  fields: [
35
35
  {
36
36
  type: "uid",
@@ -74,4 +74,4 @@ var collectionsHistory_default = {
74
74
  sortBy: "sort"
75
75
  }
76
76
  ]
77
- };
77
+ });
@@ -1,3 +1,2 @@
1
- import { CollectionOptions } from '@nocobase/database';
2
- declare const _default: CollectionOptions;
1
+ declare const _default: import("@nocobase/database").CollectionOptions;
3
2
  export default _default;
@@ -20,14 +20,14 @@ __export(fieldsHistory_exports, {
20
20
  default: () => fieldsHistory_default
21
21
  });
22
22
  module.exports = __toCommonJS(fieldsHistory_exports);
23
- var fieldsHistory_default = {
24
- namespace: "snapshot-field.snapshot-field",
25
- duplicator: "required",
23
+ var import_database = require("@nocobase/database");
24
+ var fieldsHistory_default = (0, import_database.defineCollection)({
25
+ dumpRules: "required",
26
26
  name: "fieldsHistory",
27
- title: '{{t("Fields history")}}',
28
27
  autoGenId: false,
29
28
  model: "FieldModel",
30
29
  timestamps: false,
30
+ shared: true,
31
31
  sortable: {
32
32
  name: "sort",
33
33
  scopeKey: "collectionName"
@@ -92,4 +92,4 @@ var fieldsHistory_default = {
92
92
  defaultValue: {}
93
93
  }
94
94
  ]
95
- };
95
+ });
@@ -89,9 +89,7 @@ class SnapshotFieldPlugin extends import_server.Plugin {
89
89
  }
90
90
  };
91
91
  async load() {
92
- await this.db.import({
93
- directory: (0, import_path.resolve)(__dirname, "collections")
94
- });
92
+ await this.importCollections((0, import_path.resolve)(__dirname, "collections"));
95
93
  this.app.db.registerFieldTypes({
96
94
  snapshot: import_snapshot_field.SnapshotField
97
95
  });
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "关系快照字段",
5
5
  "description": "",
6
6
  "description.zh-CN": "",
7
- "version": "0.18.0-alpha.9",
7
+ "version": "0.19.0-alpha.2",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "devDependencies": {
@@ -24,5 +24,5 @@
24
24
  "@nocobase/test": "0.x",
25
25
  "@nocobase/utils": "0.x"
26
26
  },
27
- "gitHead": "34ca0df4eede2e83fc86297b0fe19eba970e2b1b"
27
+ "gitHead": "cff5b77ecf12ccdb450d50d505b3aa44a68478c8"
28
28
  }