@nocobase/plugin-snapshot-field 1.0.0-alpha.2 → 1.0.0-alpha.3

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,3 +1,11 @@
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
+ */
1
9
  import { CompatibleSchemaInitializer } from '@nocobase/client';
2
10
  /**
3
11
  * @deprecated
@@ -1,3 +1,11 @@
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
+ */
1
9
  import React from 'react';
2
10
  export declare const createSnapshotBlockSchema: (options: any) => import("@formily/react").Stringify<{
3
11
  [key: symbol]: any;
@@ -1,2 +1,10 @@
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
+ */
1
9
  import React from 'react';
2
10
  export declare const SnapshotBlockProvider: (props: any) => React.JSX.Element;
@@ -1,2 +1,10 @@
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
+ */
1
9
  import React from 'react';
2
10
  export declare const SnapshotFieldProvider: React.NamedExoticComponent<object>;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import React from 'react';
2
10
  export declare const SnapshotHistoryCollectionProvider: React.FC<{
3
11
  collectionName: string;
@@ -1,2 +1,10 @@
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
+ */
1
9
  import React from 'react';
2
10
  export declare const SnapshotRecordPicker: (props: any) => React.JSX.Element;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { SelectProps } from 'antd';
2
10
  import React from 'react';
3
11
  export type SnapshotOwnerCollectionFieldsSelectProps = Omit<SelectProps, 'options'>;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { Plugin } from '@nocobase/client';
2
10
  export declare class PluginSnapshotFieldClient extends Plugin {
3
11
  load(): Promise<void>;
@@ -1 +1,10 @@
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
+
1
10
  (function(r,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("react"),require("antd"),require("@formily/react"),require("lodash"),require("react-i18next"),require("@ant-design/icons"),require("@formily/shared"),require("@formily/core")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","react","antd","@formily/react","lodash","react-i18next","@ant-design/icons","@formily/shared","@formily/core"],e):(r=typeof globalThis!="undefined"?globalThis:r||self,e(r["@nocobase/plugin-snapshot-field"]={},r["@nocobase/client"],r.jsxRuntime,r.react,r.antd,r["@formily/react"],r.lodash,r["react-i18next"],r["@ant-design/icons"],r["@formily/shared"],r["@formily/core"]))})(this,function(r,e,o,d,v,y,z,B,C,I,L){"use strict";var ce=Object.defineProperty,le=Object.defineProperties;var de=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var _=(r,e,o)=>e in r?ce(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,f=(r,e)=>{for(var o in e||(e={}))H.call(e,o)&&_(r,o,e[o]);if(w)for(var o of w(e))W.call(e,o)&&_(r,o,e[o]);return r},S=(r,e)=>le(r,de(e));var M=(r,e)=>{var o={};for(var d in r)H.call(r,d)&&e.indexOf(d)<0&&(o[d]=r[d]);if(r!=null&&w)for(var d of w(r))e.indexOf(d)<0&&W.call(r,d)&&(o[d]=r[d]);return o};var g=(r,e,o)=>(_(r,typeof e!="symbol"?e+"":e,o),o);var A=(r,e,o)=>new Promise((d,v)=>{var y=C=>{try{B(o.next(C))}catch(I){v(I)}},z=C=>{try{B(o.throw(C))}catch(I){v(I)}},B=C=>C.done?d(C.value):Promise.resolve(C.value).then(y,z);B((o=o.apply(r,e)).next())});const P="snapshot-field",{defaultProps:J}=e.interfacesProperties,q="appends",T="targetField",$=()=>{let t=e.useRecord();for(;t!=null&&t.__parent&&Object.keys(t.__parent).length>0;)t=t.__parent;return t};function K(){var s;const{getCollectionField:t}=e.useCollectionManager_deprecated(),i=$(),a=y.useForm().values;return(s=t(`${i.name}.${a.targetField}`))==null?void 0:s.target}function O(t,i=[]){const{getCollection:a}=e.useCollectionManager_deprecated(),s=[];return t.forEach(n=>{var c,l,u,m;if(["belongsTo","hasOne","hasMany","belongsToMany"].includes(n.type)){const k=i.filter(h=>`${h}.`.startsWith(`${n.name}.`));if(k.length){const h=a(n.target),x=k.filter(p=>p!==n.name).map(p=>p.replace(`${n.name}.`,"")).filter(p=>p);s.push({label:(l=(c=n.uiSchema)==null?void 0:c.title)!=null?l:n.name,value:n.name,children:O(h.fields,x)})}}else s.push({label:(m=(u=n.uiSchema)==null?void 0:u.title)!=null?m:n.name,value:n.name})}),s}const Q={type:"void",title:"{{t('View record')}}","x-component":"RecordPicker.Viewer","x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},properties:{tab1:{type:"void",title:"{{t('Detail')}}","x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:snapshot:addBlock",properties:{}}}}}}}};class U extends e.CollectionFieldInterface{constructor(){super(...arguments);g(this,"name","snapshot");g(this,"type","object");g(this,"group","advanced");g(this,"title",`{{t('Snapshot', {ns: '${P}'})}}`);g(this,"description",`{{t('When adding a new record, create a snapshot for its relational record and save in the current record. The snapshot is not updated when the record is subsequently updated.', {ns: '${P}'})}}`);g(this,"default",{type:"snapshot",uiSchema:{"x-component":"SnapshotRecordPicker","x-component-props":{multiple:!0,fieldNames:{label:"id",value:"id"}}}});g(this,"properties",S(f({},J),{[T]:{type:"string",title:`{{t('The association field to snapshot', {ns: '${P}'})}}`,required:!0,"x-decorator":"FormItem","x-component":"SnapshotOwnerCollectionFieldsSelect","x-disabled":"{{ !createOnly || isOverride }}","x-reactions":[{target:q,when:"{{$self.value != undefined}}",fulfill:{state:{visible:!0}},otherwise:{state:{visible:!1}}}]},[q]:{type:"string",title:`{{t("Snapshot the snapshot's association fields", {ns: "${P}"})}}`,"x-decorator":"FormItem","x-component":"AppendsTreeSelect","x-component-props":{multiple:!0,useCollection:K},"x-reactions":[{dependencies:[T],when:"{{$deps[0]}}",fulfill:{run:"{{$self.setValue($self.value)}}"}}]}}))}schemaInitialize(a,{field:s,readPretty:n,action:c,block:l}){a.properties={viewer:z.cloneDeep(Q)}}initialize(a){}usePathOptions(a){const{appends:s=[],targetCollection:n}=a,{getCollection:c}=e.useCollectionManager_deprecated(),{fields:l}=c(n),u=O(l,s);return[{label:`{{t('Snapshot data', { ns: '${P}' })}}`,value:"data",children:u}]}}const X=()=>{const t=$(),{getCollection:i}=e.useCollectionManager_deprecated(),a=i(t.name),s=e.useCompile();return a.fields.filter(n=>!!n.target&&!!n.interface).map(n=>{var c;return S(f({},n),{label:s((c=n.uiSchema)==null?void 0:c.title),value:n.name})})},Y=t=>{const i=X();return o.jsx(v.Select,f({popupMatchSelectWidth:!1,options:i},t))},R=t=>{const h=t,{formItemInitializers:i="details:configureFields",actionInitializers:a="details:configureActions",collection:s,association:n,resource:c,template:l}=h,u=M(h,["formItemInitializers","actionInitializers","collection","association","resource","template"]),m=c||n||s;return{type:"void","x-acl-action":`${m}:get`,"x-decorator":"SnapshotBlockProvider","x-decorator-props":f({resource:m,collection:s,association:n,readPretty:!0,action:"get",useParams:"{{ useParamsFromRecord }}"},u),"x-designer":"FormV2.ReadPrettyDesigner","x-component":"CardItem",properties:{[I.uid()]:{type:"void","x-component":"FormV2","x-use-component-props":"useFormBlockProps","x-read-pretty":!0,properties:{grid:l||{type:"void","x-component":"Grid","x-initializer":i,properties:{}}}}}}},Z=()=>{const t=e.useSchemaInitializerItem(),b=t,{onCreateBlockSchema:i,componentType:a,createBlockSchema:s,icon:n=!0,targetCollection:c}=b,l=M(b,["onCreateBlockSchema","componentType","createBlockSchema","icon","targetCollection"]),{insert:u}=e.useSchemaInitializer(),{getTemplateSchemaByMode:m}=e.useSchemaTemplateManager(),k=c||e.useCollection_deprecated(),h=e.useAssociationName(),{block:x}=e.useBlockRequestContext(),p=x!=="TableField"?t.actionInitializers||"details:configureActions":null;return d.createElement(e.SchemaInitializerItem,S(f({icon:n&&o.jsx(C.FormOutlined,{})},l),{key:"snapshotDetail",onClick:me=>A(this,[me],function*({item:F}){if(F.template){const V=yield m(F);if(F.template.componentName==="ReadPrettyFormItem"){const G=R({actionInitializers:p,association:h,collection:k.name,action:"get",useSourceId:"{{ useSourceIdFromParentRecord }}",useParams:"{{ useParamsFromRecord }}",template:V});F.mode==="reference"&&(G["x-template-key"]=F.template.key),u(G)}else u(V)}else u(R({actionInitializers:p,association:h,collection:k.name,action:"get",useSourceId:"{{ useSourceIdFromParentRecord }}",useParams:"{{ useParamsFromRecord }}"}))}),items:e.useRecordCollectionDataSourceItems("ReadPrettyFormItem")}))},ee=t=>{var m;const{action:i,readPretty:a}=t,s=y.useField(),n=d.useMemo(()=>L.createForm({readPretty:a}),[]),{resource:c,service:l}=e.useBlockRequestContext(),u=d.useRef();return l.loading?o.jsx(v.Spin,{}):o.jsx(e.FormBlockContext.Provider,{value:{action:i,form:n,field:s,service:l,resource:c,updateAssociationValues:[],formBlockRef:u},children:a?o.jsx(e.RecordProvider,{record:(m=l==null?void 0:l.data)==null?void 0:m.data,children:o.jsx("div",{ref:u,children:t.children})}):o.jsx("div",{ref:u,children:t.children})})},te=t=>{const i=y.useField(),a=e.useBlockResource(),s={loading:!1,data:{data:e.useRecord()}},n=e.useBlockRequestContext();return o.jsx(e.BlockRequestContext_deprecated.Provider,{value:{block:t.block,props:t,field:i,service:s,resource:a,__parent:n},children:t.children})},oe=t=>{const{collection:i,association:a,dataSource:s}=t,n=e.useResource(t);return o.jsx(e.CollectionManagerProvider,{dataSource:s,children:o.jsx(e.MaybeCollectionProvider,{collection:i,children:o.jsx(e.BlockAssociationContext.Provider,{value:a,children:o.jsx(e.BlockResourceContext.Provider,{value:n,children:o.jsx(te,S(f({},t),{children:t.children}))})})})})},re=t=>{const i=e.useRecord(),{__tableName:a}=i,{getInheritCollections:s}=e.useCollectionManager_deprecated(t.dataSource),n=s(a),{designable:c}=e.useDesignable();return!(!c&&a&&!n.includes(t.collection)&&a!==t.collection)&&o.jsx(oe,S(f({},t),{children:o.jsx(ee,f({},t))}))},ne=t=>{var k,h,x;const{collectionName:i}=t,{collections:a}=e.useCollectionManager_deprecated(),s=(k=e.useHistoryCollectionsByNames([i]))==null?void 0:k[0],n=e.useHistoryCollectionsByNames((h=s==null?void 0:s.inherits)!=null?h:[]),c=e.useHistoryCollectionsByNames((x=s==null?void 0:s.fields.filter(p=>p.interface!=="snapshot").map(p=>p.target))!=null?x:[]),l=[s,...c,...n].filter(p=>p),m=[...a.filter(p=>!l.map(b=>b.name).includes(p.name)),...l];return o.jsx(e.ExtendCollectionsProvider,{collections:m,children:o.jsx(e.CollectionManagerProvider_deprecated,{children:t.children})})},D=t=>{const i=y.useFieldSchema(),{getField:a}=e.useCollection_deprecated(),s=a(i.name);return o.jsx(ne,{collectionName:s==null?void 0:s.targetCollection,children:o.jsx(e.ReadPrettyRecordPicker,f({},t))})},se=y.connect(D,y.mapReadPretty(D)),ae=t=>{const c=t,{value:i,onChange:a}=c,s=M(c,["value","onChange"]),n=S(f({},s),{value:i==null?void 0:i.data,onChange:l=>a({data:l})});return o.jsx(se,f({},n))},N=d.memo(t=>o.jsx(e.CollectionHistoryProvider,{children:o.jsx(e.SchemaComponentOptions,{components:{SnapshotRecordPicker:ae,SnapshotBlockProvider:re,SnapshotBlockInitializersDetailItem:Z,SnapshotOwnerCollectionFieldsSelect:Y},children:t.children})}));N.displayName="SnapshotFieldProvider";const j=new e.CompatibleSchemaInitializer({name:"SnapshotBlockInitializers",wrap:e.gridRowColWrap,title:`{{t("Add block", { ns: "${P}" })}}`,icon:"PlusOutlined",items:[{type:"itemGroup",title:'{{t("Current record blocks")}}',name:"currentRecordBlocks",children:[{name:"details",title:'{{t("Details")}}',Component:"SnapshotBlockInitializersDetailItem",actionInitializers:"details:configureActions"}]},{type:"itemGroup",title:'{{t("Other blocks")}}',name:"otherBlocks",children:[{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"}]}]}),ie=new e.CompatibleSchemaInitializer({name:"popup:snapshot:addBlock",wrap:e.gridRowColWrap,title:`{{t("Add block", { ns: "${P}" })}}`,icon:"PlusOutlined",items:[{type:"itemGroup",title:'{{t("Current record blocks")}}',name:"currentRecordBlocks",children:[{name:"details",title:'{{t("Details")}}',Component:"SnapshotBlockInitializersDetailItem",actionInitializers:"details:configureActions"}]},{type:"itemGroup",title:'{{t("Other blocks")}}',name:"otherBlocks",children:[{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"}]}]},j);class E extends e.Plugin{load(){return A(this,null,function*(){this.app.use(N),this.app.schemaInitializerManager.add(j),this.app.schemaInitializerManager.add(ie),this.app.dataSourceManager.addFieldInterfaces([U])})}}r.PluginSnapshotFieldClient=E,r.default=E,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { ISchema } from '@formily/react';
2
10
  import { CollectionFieldInterface } from '@nocobase/client';
3
11
  export declare const useTopRecord: () => any;
@@ -1,3 +1,11 @@
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
+ */
1
9
  export declare const NAMESPACE = "snapshot-field";
2
10
  export declare function lang(key: string): string;
3
11
  export declare function useSnapshotTranslation(): import("react-i18next").UseTranslationResponse<"snapshot-field", undefined>;
@@ -1,11 +1,20 @@
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
+
1
10
  module.exports = {
2
- "@nocobase/client": "1.0.0-alpha.2",
11
+ "@nocobase/client": "1.0.0-alpha.3",
3
12
  "react": "18.2.0",
4
13
  "@formily/react": "2.3.0",
5
14
  "@formily/core": "2.3.0",
6
15
  "lodash": "4.17.21",
7
- "@nocobase/database": "1.0.0-alpha.2",
8
- "@nocobase/server": "1.0.0-alpha.2",
16
+ "@nocobase/database": "1.0.0-alpha.3",
17
+ "@nocobase/server": "1.0.0-alpha.3",
9
18
  "antd": "5.12.8",
10
19
  "react-i18next": "11.18.6",
11
20
  "@ant-design/icons": "5.2.6",
package/dist/index.d.ts CHANGED
@@ -1,2 +1,10 @@
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
+ */
1
9
  export * from './server';
2
10
  export { default } from './server';
package/dist/index.js CHANGED
@@ -1,3 +1,12 @@
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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,2 +1,10 @@
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
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,2 +1,10 @@
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
+ */
1
9
  declare const _default: import("@nocobase/database").CollectionOptions;
2
10
  export default _default;
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { BaseColumnFieldOptions, CreateOptions, DataTypes, Field, Model } from '@nocobase/database';
2
10
  export declare class SnapshotField extends Field {
3
11
  get dataType(): DataTypes.AbstractDataTypeConstructor;
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1,9 @@
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
+ */
1
9
  export { default } from './plugin';
@@ -1,3 +1,12 @@
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
+
1
10
  var __create = Object.create;
2
11
  var __defProp = Object.defineProperty;
3
12
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,3 +1,11 @@
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
+ */
1
9
  import { Model } from '@nocobase/database';
2
10
  import { InstallOptions, Plugin } from '@nocobase/server';
3
11
  export declare class PluginSnapshotFieldServer extends Plugin {
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,11 @@
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
+ */
1
9
  declare const _default: {
2
10
  info: {
3
11
  title: string;
@@ -1,3 +1,12 @@
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
+
1
10
  var __defProp = Object.defineProperty;
2
11
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "数据表字段:关系快照",
5
5
  "description": "When adding a new record, create a snapshot for its relational record and save in the new record. The snapshot will not be updated when the relational record is updated.",
6
6
  "description.zh-CN": "在添加数据时,为它的关系数据创建快照,并保存在当前的数据中。关系数据更新时,快照不会更新。",
7
- "version": "1.0.0-alpha.2",
7
+ "version": "1.0.0-alpha.3",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/field-snapshot",
@@ -26,7 +26,7 @@
26
26
  "@nocobase/test": "1.x",
27
27
  "@nocobase/utils": "1.x"
28
28
  },
29
- "gitHead": "f89dbc9e67d58404a2e484a5e124f739f340dcf8",
29
+ "gitHead": "7ccb137c7616cba5d238f87368239640e1d9ace1",
30
30
  "keywords": [
31
31
  "Collection fields"
32
32
  ]