@nocobase/plugin-multi-app-share-collection 0.21.0-alpha.6 → 0.21.0-alpha.7
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/dist/client/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from '@nocobase/client';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class PluginMultiAppShareCollectionClient extends Plugin {
|
|
3
3
|
load(): Promise<void>;
|
|
4
4
|
}
|
|
5
|
-
export default
|
|
5
|
+
export default PluginMultiAppShareCollectionClient;
|
package/dist/client/index.js
CHANGED
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
width: 100%;
|
|
17
17
|
margin-bottom: 8px;
|
|
18
|
-
`,children:[e.jsx("strong",{style:{fontSize:z.fontSizeLG,color:z.colorText},children:g("Shared collections")}),e.jsxs(r.Input.Group,{compact:!0,style:{width:360},children:[e.jsx(r.Select,{popupMatchSelectWidth:!1,onChange:u=>{K.setCategoryFilter(u)},mode:"multiple",style:{width:"35%"},size:"middle",placeholder:g("All categories"),options:m,allowClear:!0}),e.jsx(r.Input,{onChange:u=>K.setNameFilter(u.target.value),style:{width:"65%"},placeholder:g("Enter name or title..."),allowClear:!0})]})]}),e.jsx(r.Table,{bordered:!0,rowKey:"name",rowSelection:{type:"checkbox",selectedRowKeys:w,onChange(u){const p=C.lodash.uniq(c.concat(u));l(p),a(p),f([])}},pagination:!1,size:"small",columns:I,dataSource:K.dataSource,scroll:{y:"calc(100vh - 260px)"},onRow:({name:u})=>({onClick:()=>{const p=Y(u),x=()=>{c.push(...p);const A=C.lodash.uniq([...c]);l(A),a(A)};if(p.length===1)return x();L.confirm({title:g("Are you sure to remove the following collections?"),width:"60%",content:e.jsx("div",{children:e.jsx(r.Table,{size:"small",columns:I,dataSource:i.filter(A=>p.includes(A.name)),pagination:!1,scroll:{y:"60vh"}})}),onOk(){x()}})}})})]})]})})}),D=n=>`{{t("${n}", { ns: 'multi-app-share-collection' })}}`,H=()=>{const n=M.useForm(),a=t.useActionContext(),s=t.useAPIClient(),i=t.useRecord();return{run(){return G(this,null,function*(){console.log(n.values.names),yield s.request({url:`applications/${i.name}/collectionBlacklist`,data:n.values.names,method:"post"}),a.setVisible(!1),n.reset(),r.message.success("Saved successfully")})}}},J=y.tableActionColumnSchema.properties.update,Q=y.tableActionColumnSchema.properties.delete;delete y.tableActionColumnSchema.properties.update,delete y.tableActionColumnSchema.properties.delete,y.tableActionColumnSchema.properties.collection={type:"void",title:D("Share collections"),"x-component":"Action.Link","x-component-props":{},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-component-props":{width:"95vw"},"x-decorator":"Form",title:D("Share collections"),properties:{names:{type:"array","x-component":V,"x-decorator":"FormItem"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:H}}}}}}}},y.tableActionColumnSchema.properties.update=J,y.tableActionColumnSchema.properties.delete=Q;const X=n=>e.jsx(e.Fragment,{children:n.children});class P extends t.Plugin{load(){return G(this,null,function*(){this.app.use(X)})}}o.
|
|
18
|
+
`,children:[e.jsx("strong",{style:{fontSize:z.fontSizeLG,color:z.colorText},children:g("Shared collections")}),e.jsxs(r.Input.Group,{compact:!0,style:{width:360},children:[e.jsx(r.Select,{popupMatchSelectWidth:!1,onChange:u=>{K.setCategoryFilter(u)},mode:"multiple",style:{width:"35%"},size:"middle",placeholder:g("All categories"),options:m,allowClear:!0}),e.jsx(r.Input,{onChange:u=>K.setNameFilter(u.target.value),style:{width:"65%"},placeholder:g("Enter name or title..."),allowClear:!0})]})]}),e.jsx(r.Table,{bordered:!0,rowKey:"name",rowSelection:{type:"checkbox",selectedRowKeys:w,onChange(u){const p=C.lodash.uniq(c.concat(u));l(p),a(p),f([])}},pagination:!1,size:"small",columns:I,dataSource:K.dataSource,scroll:{y:"calc(100vh - 260px)"},onRow:({name:u})=>({onClick:()=>{const p=Y(u),x=()=>{c.push(...p);const A=C.lodash.uniq([...c]);l(A),a(A)};if(p.length===1)return x();L.confirm({title:g("Are you sure to remove the following collections?"),width:"60%",content:e.jsx("div",{children:e.jsx(r.Table,{size:"small",columns:I,dataSource:i.filter(A=>p.includes(A.name)),pagination:!1,scroll:{y:"60vh"}})}),onOk(){x()}})}})})]})]})})}),D=n=>`{{t("${n}", { ns: 'multi-app-share-collection' })}}`,H=()=>{const n=M.useForm(),a=t.useActionContext(),s=t.useAPIClient(),i=t.useRecord();return{run(){return G(this,null,function*(){console.log(n.values.names),yield s.request({url:`applications/${i.name}/collectionBlacklist`,data:n.values.names,method:"post"}),a.setVisible(!1),n.reset(),r.message.success("Saved successfully")})}}},J=y.tableActionColumnSchema.properties.update,Q=y.tableActionColumnSchema.properties.delete;delete y.tableActionColumnSchema.properties.update,delete y.tableActionColumnSchema.properties.delete,y.tableActionColumnSchema.properties.collection={type:"void",title:D("Share collections"),"x-component":"Action.Link","x-component-props":{},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-component-props":{width:"95vw"},"x-decorator":"Form",title:D("Share collections"),properties:{names:{type:"array","x-component":V,"x-decorator":"FormItem"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:H}}}}}}}},y.tableActionColumnSchema.properties.update=J,y.tableActionColumnSchema.properties.delete=Q;const X=n=>e.jsx(e.Fragment,{children:n.children});class P extends t.Plugin{load(){return G(this,null,function*(){this.app.use(X)})}}o.PluginMultiAppShareCollectionClient=P,o.default=P,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"@formily/react": "2.3.0",
|
|
3
|
-
"@nocobase/client": "0.21.0-alpha.
|
|
4
|
-
"@nocobase/plugin-multi-app-manager": "0.21.0-alpha.
|
|
3
|
+
"@nocobase/client": "0.21.0-alpha.7",
|
|
4
|
+
"@nocobase/plugin-multi-app-manager": "0.21.0-alpha.7",
|
|
5
5
|
"antd": "5.12.8",
|
|
6
6
|
"react": "18.2.0",
|
|
7
|
-
"@nocobase/utils": "0.21.0-alpha.
|
|
7
|
+
"@nocobase/utils": "0.21.0-alpha.7",
|
|
8
8
|
"react-i18next": "11.18.6",
|
|
9
|
-
"@nocobase/database": "0.21.0-alpha.
|
|
10
|
-
"@nocobase/server": "0.21.0-alpha.
|
|
9
|
+
"@nocobase/database": "0.21.0-alpha.7",
|
|
10
|
+
"@nocobase/server": "0.21.0-alpha.7",
|
|
11
11
|
"lodash": "4.17.21"
|
|
12
12
|
};
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "多应用数据表共享",
|
|
5
5
|
"description": "",
|
|
6
6
|
"description.zh-CN": "",
|
|
7
|
-
"version": "0.21.0-alpha.
|
|
7
|
+
"version": "0.21.0-alpha.7",
|
|
8
8
|
"main": "./dist/server/index.js",
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@formily/react": "2.x",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@nocobase/test": "0.x",
|
|
24
24
|
"@nocobase/utils": "0.x"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "b1be3993f8aa81173d01bc390aa8e4c5adcc0e2d",
|
|
27
27
|
"keywords": [
|
|
28
28
|
"System management"
|
|
29
29
|
]
|