@nocobase/app 2.0.0-beta.17 → 2.0.0-beta.18
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/client/.umirc.ts +4 -0
- package/dist/client/{113.736e29a0.async.js → 113.470c21ad.async.js} +1 -1
- package/dist/client/{1161.0b3b5766.async.js → 1161.cfb9aa6a.async.js} +1 -1
- package/dist/client/{1442.be509f94.async.js → 1442.1692e030.async.js} +1 -1
- package/dist/client/{1595.9f992743.async.js → 1595.f3d71f31.async.js} +1 -1
- package/dist/client/{1883.6ee256ab.async.js → 1883.9a059d9c.async.js} +1 -1
- package/dist/client/{1905.ff0793ff.async.js → 1905.b546fd90.async.js} +1 -1
- package/dist/client/{2042.feb4b9ac.async.js → 2042.7da1cbfb.async.js} +1 -1
- package/dist/client/{2097.919e4d8a.async.js → 2097.682e266e.async.js} +1 -1
- package/dist/client/{2380.900b7a22.async.js → 2380.8298c573.async.js} +1 -1
- package/dist/client/2612.33bc9729.async.js +19 -0
- package/dist/client/{2775.455c3402.async.js → 2775.39407a48.async.js} +2 -2
- package/dist/client/{2936.902710e4.async.js → 2936.c875b061.async.js} +1 -1
- package/dist/client/{3357.be95167c.async.js → 3357.b82bd041.async.js} +1 -1
- package/dist/client/{341.fba65e23.async.js → 341.3c086bf4.async.js} +1 -1
- package/dist/client/{3451.a9466e73.async.js → 3451.3c01f5ab.async.js} +1 -1
- package/dist/client/{4327.68c0f17b.async.js → 4327.a4b050e3.async.js} +2 -2
- package/dist/client/{4351.efe05af2.async.js → 4351.57614a08.async.js} +2 -2
- package/dist/client/{4356.d61392c6.async.js → 4356.c4b269d3.async.js} +1 -1
- package/dist/client/4727.09926a61.async.js +1 -0
- package/dist/client/{4750.ce3051f3.async.js → 4750.bf97ff2e.async.js} +1 -1
- package/dist/client/{4926.58238954.async.js → 4926.3d530cd7.async.js} +2 -2
- package/dist/client/{5013.b14730ba.async.js → 5013.eaaaceb4.async.js} +1 -1
- package/dist/client/{5501.22d50b3a.async.js → 5501.d2a75c24.async.js} +1 -1
- package/dist/client/{5662.8c643e63.async.js → 5662.1729c315.async.js} +1 -1
- package/dist/client/{6021.cdefa0d3.async.js → 6021.d883e164.async.js} +1 -1
- package/dist/client/{645.ab5af584.async.js → 645.fc351075.async.js} +1 -1
- package/dist/client/{6474.49632e37.async.js → 6474.8e54befa.async.js} +1 -1
- package/dist/client/{6534.6ea6468b.async.js → 6534.8552e64c.async.js} +1 -1
- package/dist/client/{6747.de538558.async.js → 6747.b91a9f29.async.js} +3 -3
- package/dist/client/{689.4de33d65.async.js → 689.4dc252d6.async.js} +1 -1
- package/dist/client/{6920.497d7e80.async.js → 6920.a8417eba.async.js} +1 -1
- package/dist/client/{703.7ad807b0.async.js → 703.1a5ec139.async.js} +1 -1
- package/dist/client/{7087.5646e199.async.js → 7087.af51c764.async.js} +1 -1
- package/dist/client/{7483.546ddcb6.async.js → 7483.9b86876d.async.js} +1 -1
- package/dist/client/7534.bf71a760.async.js +34 -0
- package/dist/client/{7764.a3ae7727.async.js → 7764.00328ea3.async.js} +1 -1
- package/dist/client/{8183.4c6f7e21.async.js → 8183.5418c6c8.async.js} +1 -1
- package/dist/client/{8408.c0ef773c.async.js → 8408.731c795f.async.js} +1 -1
- package/dist/client/{8805.819c4f44.async.js → 8805.3ba17917.async.js} +1 -1
- package/dist/client/{9042.3d21f631.async.js → 9042.8b5abb9d.async.js} +2 -2
- package/dist/client/{935.97d45ffa.async.js → 935.c46b3064.async.js} +1 -1
- package/dist/client/{95.24aa76c4.async.js → 95.4ac502e9.async.js} +1 -1
- package/dist/client/{9547.a442df93.async.js → 9547.b466fb1c.async.js} +1 -1
- package/dist/client/{9801.34b13a74.async.js → 9801.dacad822.async.js} +1 -1
- package/dist/client/{9844.6f484975.async.js → 9844.02aff90e.async.js} +2 -2
- package/dist/client/index.html +3 -1
- package/dist/client/index.html.tpl +3 -1
- package/dist/client/p__index.41d14115.async.js +2590 -0
- package/dist/client/{umi.80a261c5.js → umi.454ce38e.js} +1 -1
- package/package.json +6 -6
- package/dist/client/2612.0865e67e.async.js +0 -19
- package/dist/client/4727.0f6df8fb.async.js +0 -1
- package/dist/client/7534.0d69e071.async.js +0 -34
- package/dist/client/p__index.3ddf5c47.async.js +0 -2590
package/client/.umirc.ts
CHANGED
|
@@ -25,6 +25,8 @@ export default defineConfig({
|
|
|
25
25
|
? `
|
|
26
26
|
window['__nocobase_public_path__'] = "${process.env.APP_PUBLIC_PATH || '/'}";
|
|
27
27
|
window['__nocobase_dev_public_path__'] = "/";
|
|
28
|
+
window['__esm_cdn_base_url__'] = '${process.env.ESM_CDN_BASE_URL || ''}';
|
|
29
|
+
window['__esm_cdn_suffix__'] = '${process.env.ESM_CDN_SUFFIX || ''}';
|
|
28
30
|
`
|
|
29
31
|
: `
|
|
30
32
|
window['__webpack_public_path__'] = '{{env.CDN_BASE_URL}}';
|
|
@@ -35,6 +37,8 @@ export default defineConfig({
|
|
|
35
37
|
window['__nocobase_api_client_share_token__'] = {{env.API_CLIENT_SHARE_TOKEN}};
|
|
36
38
|
window['__nocobase_ws_url__'] = '{{env.WS_URL}}';
|
|
37
39
|
window['__nocobase_ws_path__'] = '{{env.WS_PATH}}';
|
|
40
|
+
window['__esm_cdn_base_url__'] = '{{env.ESM_CDN_BASE_URL}}';
|
|
41
|
+
window['__esm_cdn_suffix__'] = '{{env.ESM_CDN_SUFFIX}}';
|
|
38
42
|
`,
|
|
39
43
|
},
|
|
40
44
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[113],{40113:function(h,o,e){e.r(o),e.d(o,{JSFieldRunJSContext:function(){return n}});var l=e(72004),a=e.n(l),t=e(12444),r=e.n(t),s=e(31996),u=e.n(s),d=e(26037),i=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[113],{40113:function(h,o,e){e.r(o),e.d(o,{JSFieldRunJSContext:function(){return n}});var l=e(72004),a=e.n(l),t=e(12444),r=e.n(t),s=e(31996),u=e.n(s),d=e(26037),i=e.n(d),m=e(67946),n=function(c){u()(_,c);var b=i()(_);function _(){return r()(this,_),b.apply(this,arguments)}return a()(_)}(m.Uo);n.define({label:"JSField RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for field rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
3
3
|
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1161,1442],{41442:function(s,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return r}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),d=e(31996),u=e.n(d),m=e(26037),i=e.n(m),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1161,1442],{41442:function(s,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return r}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),d=e(31996),u=e.n(d),m=e(26037),i=e.n(m),c=e(67946),r=function(b){u()(o,b);var p=i()(o);function o(){return l()(this,o),p.apply(this,arguments)}return t()(o)}(c.Uo);r.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1442],{41442:function(h,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return o}});var r=e(72004),s=e.n(r),t=e(12444),a=e.n(t),l=e(31996),u=e.n(l),m=e(26037),d=e.n(m),i=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1442],{41442:function(h,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return o}});var r=e(72004),s=e.n(r),t=e(12444),a=e.n(t),l=e(31996),u=e.n(l),m=e(26037),d=e.n(m),i=e(67946),o=function(b){u()(_,b);var c=d()(_);function _(){return a()(this,_),c.apply(this,arguments)}return s()(_)}(i.Uo);o.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1595,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var t=e(72004),r=e.n(t),s=e(12444),l=e.n(s),i=e(31996),d=e.n(i),c=e(26037),m=e.n(c),u=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1595,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var t=e(72004),r=e.n(t),s=e(12444),l=e.n(s),i=e(31996),d=e.n(i),c=e(26037),m=e.n(c),u=e(67946),_=function(b){d()(o,b);var p=m()(o);function o(){return l()(this,o),p.apply(this,arguments)}return r()(o)}(u.Uo);_.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1883,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var t=e(72004),r=e.n(t),l=e(12444),s=e.n(l),i=e(31996),c=e.n(i),m=e(26037),u=e.n(m),d=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1883,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var t=e(72004),r=e.n(t),l=e(12444),s=e.n(l),i=e(31996),c=e.n(i),m=e(26037),u=e.n(m),d=e(67946),_=function(b){c()(o,b);var h=u()(o);function o(){return s()(this,o),h.apply(this,arguments)}return r()(o)}(d.Uo);_.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1905,1442],{41442:function(r,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),m=e(31996),u=e.n(m),i=e(26037),d=e.n(i),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1905,1442],{41442:function(r,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),m=e(31996),u=e.n(m),i=e(26037),d=e.n(i),c=e(67946),s=function(b){u()(o,b);var h=d()(o);function o(){return l()(this,o),h.apply(this,arguments)}return t()(o)}(c.Uo);s.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2042,689],{689:function(l,_,e){e.r(_),e.d(_,{JSCollectionActionRunJSContext:function(){return t}});var n=e(72004),s=e.n(n),r=e(12444),u=e.n(r),a=e(31996),c=e.n(a),i=e(26037),d=e.n(i),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2042,689],{689:function(l,_,e){e.r(_),e.d(_,{JSCollectionActionRunJSContext:function(){return t}});var n=e(72004),s=e.n(n),r=e(12444),u=e.n(r),a=e(31996),c=e.n(a),i=e(26037),d=e.n(i),m=e(67946),t=function(b){c()(o,b);var C=d()(o);function o(){return u()(this,o),C.apply(this,arguments)}return s()(o)}(m.Uo);t.define({label:"JSCollectionAction RunJS context",properties:{resource:`Collection resource instance providing access to selected rows, pagination, and data operations.
|
|
2
2
|
Use ctx.resource.selectedRows to get selected records.
|
|
3
3
|
Use ctx.resource.pagination for page info.`}}),t.define({label:"JS \u96C6\u5408\u52A8\u4F5C RunJS \u4E0A\u4E0B\u6587",properties:{resource:"\u5217\u8868\u8D44\u6E90\uFF08\u5305\u542B\u9009\u4E2D\u884C/\u5206\u9875\u4FE1\u606F\u7B49\uFF09"}},{locale:"zh-CN"})},32042:function(l,_,e){e.r(_);var n=e(689),s={contexts:[n.JSCollectionActionRunJSContext],prefix:"sn-act-selected-count",label:"Selected count",description:"Show number of selected rows in list action",locales:{"zh-CN":{label:"\u9009\u4E2D\u6570\u91CF",description:"\u63D0\u793A\u5F53\u524D\u9009\u4E2D\u884C\u7684\u6570\u91CF"}},content:`
|
|
4
4
|
const rows = ctx.resource?.getSelectedRows?.() || [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2097,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return r}});var t=e(72004),_=e.n(t),s=e(12444),l=e.n(s),i=e(31996),c=e.n(i),u=e(26037),d=e.n(u),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2097,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return r}});var t=e(72004),_=e.n(t),s=e(12444),l=e.n(s),i=e(31996),c=e.n(i),u=e(26037),d=e.n(u),m=e(67946),r=function(b){c()(o,b);var h=d()(o);function o(){return l()(this,o),h.apply(this,arguments)}return _()(o)}(m.Uo);r.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2380,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return r}});var o=e(72004),_=e.n(o),l=e(12444),s=e.n(l),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2380,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return r}});var o=e(72004),_=e.n(o),l=e(12444),s=e.n(l),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(67946),r=function(b){c()(t,b);var p=u()(t);function t(){return s()(this,t),p.apply(this,arguments)}return _()(t)}(m.Uo);r.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2612,4727],{64727:function(l,n,e){e.r(n),e.d(n,{JSColumnRunJSContext:function(){return r}});var t=e(72004),_=e.n(t),a=e(12444),s=e.n(a),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(67946),r=function(b){c()(o,b);var p=u()(o);function o(){return s()(this,o),p.apply(this,arguments)}return _()(o)}(m.Uo);r.define({label:"JSColumn RunJS context",properties:{element:"ElementProxy instance providing a safe DOM container for the current table cell. Supports innerHTML/append and basic DOM APIs.",record:"Current row record object (read-only).",recordIndex:"Index of the current row in the page (0-based).",collection:"Collection definition metadata (read-only).",viewer:"View controller providing dialog/drawer/embed helpers for interactions initiated from the cell (e.g., open details).",React:"React library",antd:"Ant Design library"},methods:{onRefReady:"Wait for cell DOM element to be ready before executing callback. Parameters: (ref, callback, timeout?) => void",requireAsync:"Load external library by URL: `const lib = await ctx.requireAsync(url)`",importAsync:"Dynamically import ESM module by URL: `const mod = await ctx.importAsync(url)`"}}),r.define({label:"JS \u5217 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u683C\u5355\u5143\u683C\u7684\u5B89\u5168 DOM \u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49",record:"\u5F53\u524D\u884C\u8BB0\u5F55\u5BF9\u8C61\uFF08\u53EA\u8BFB\uFF09",recordIndex:"\u5F53\u524D\u884C\u7D22\u5F15\uFF08\u4ECE 0 \u5F00\u59CB\uFF09",collection:"\u96C6\u5408\u5B9A\u4E49\u5143\u6570\u636E\uFF08\u53EA\u8BFB\uFF09",viewer:"\u89C6\u56FE\u63A7\u5236\u5668\uFF0C\u53EF\u7528\u4E8E\u5728\u5355\u5143\u683C\u4E2D\u89E6\u53D1\u62BD\u5C49/\u5BF9\u8BDD\u6846/\u5185\u5D4C\u7B49\u4EA4\u4E92",React:"React \u5E93",antd:"Ant Design \u5E93"},methods:{onRefReady:"\u7B49\u5F85\u5355\u5143\u683C DOM \u5C31\u7EEA\u540E\u6267\u884C\u56DE\u8C03\u3002\u53C2\u6570\uFF1A(ref, callback, timeout?)",requireAsync:"\u6309 URL \u5F02\u6B65\u52A0\u8F7D\u5916\u90E8\u5E93\uFF1A`const lib = await ctx.requireAsync(url)`",importAsync:"\u6309 URL \u52A8\u6001\u5BFC\u5165 ESM \u6A21\u5757\uFF1A`const mod = await ctx.importAsync(url)`"}},{locale:"zh-CN"})},82612:function(l,n,e){e.r(n);var t=e(64727),_={contexts:[t.JSColumnRunJSContext],prefix:"sn-col-open-dialog",label:"Cell dialog with row data",description:"Render a button in cell to open dialog via ctx.openView with current row context",locales:{"zh-CN":{label:"\u5355\u5143\u683C\u5BF9\u8BDD\u6846\uFF08\u663E\u793A\u884C\u6570\u636E\uFF09",description:"\u5728\u5355\u5143\u683C\u6E32\u67D3\u6309\u94AE\uFF0C\u70B9\u51FB\u540E\u901A\u8FC7 ctx.openView \u6253\u5F00\u5F39\u7A97\u5E76\u4F20\u5165\u5F53\u524D\u884C\u4E0A\u4E0B\u6587"}},content:`
|
|
2
|
+
// Render a button inside the cell
|
|
3
|
+
ctx.element.innerHTML = '<button class="nb-cell-btn" style="padding:4px 8px">' + ctx.t('View') + '</button>';
|
|
4
|
+
|
|
5
|
+
const button = ctx.element.querySelector('.nb-cell-btn');
|
|
6
|
+
const popupUid = ctx.model.uid + '-1'; // popupUid should be stable and better bound to ctx.model.uid
|
|
7
|
+
const primaryKey = ctx.collection?.primaryKey || 'id';
|
|
8
|
+
|
|
9
|
+
button?.addEventListener('click', async () => {
|
|
10
|
+
await ctx.openView(popupUid, {
|
|
11
|
+
mode: 'dialog',
|
|
12
|
+
title: ctx.t('Row detail'),
|
|
13
|
+
params: {
|
|
14
|
+
filterByTk: ctx.record?.[primaryKey],
|
|
15
|
+
record: ctx.record,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
`};n.default=_}}]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2775,113,7087],{67087:function(f,o,e){e.r(o),e.d(o,{FormJSFieldItemRunJSContext:function(){return _}});var t=e(72004),l=e.n(t),r=e(12444),a=e.n(r),s=e(31996),d=e.n(s),u=e(26037),i=e.n(u),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2775,113,7087],{67087:function(f,o,e){e.r(o),e.d(o,{FormJSFieldItemRunJSContext:function(){return _}});var t=e(72004),l=e.n(t),r=e(12444),a=e.n(r),s=e(31996),d=e.n(s),u=e(26037),i=e.n(u),m=e(67946),_=function(c){d()(n,c);var b=i()(n);function n(){return a()(this,n),b.apply(this,arguments)}return l()(n)}(m.Uo);_.define({label:"FormJSFieldItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form field rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:"Current field value (read-only in display mode; in controlled scenarios, use setProps to modify).",record:`Current record data object (read-only).
|
|
3
3
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form field container DOM element to be ready before executing callback.
|
|
4
4
|
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`,setProps:`Set form field properties programmatically.
|
|
5
5
|
Parameters: (fieldModel: any, props: { value?: any, disabled?: boolean, visible?: boolean }) => void
|
|
6
|
-
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),_.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,o,e){e.r(o),e.d(o,{JSFieldRunJSContext:function(){return _}});var t=e(72004),l=e.n(t),r=e(12444),a=e.n(r),s=e(31996),d=e.n(s),u=e(26037),i=e.n(u),m=e(
|
|
6
|
+
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),_.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,o,e){e.r(o),e.d(o,{JSFieldRunJSContext:function(){return _}});var t=e(72004),l=e.n(t),r=e(12444),a=e.n(r),s=e(31996),d=e.n(s),u=e(26037),i=e.n(u),m=e(67946),_=function(c){d()(n,c);var b=i()(n);function n(){return a()(this,n),b.apply(this,arguments)}return l()(n)}(m.Uo);_.define({label:"JSField RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for field rendering.
|
|
7
7
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
8
8
|
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
9
9
|
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2936,1442],{41442:function(s,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return r}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),d=e(31996),i=e.n(d),u=e(26037),m=e.n(u),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[2936,1442],{41442:function(s,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return r}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),d=e(31996),i=e.n(d),u=e(26037),m=e.n(u),c=e(67946),r=function(b){i()(o,b);var f=m()(o);function o(){return l()(this,o),f.apply(this,arguments)}return t()(o)}(c.Uo);r.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[3357,1442],{41442:function(r,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),d=e(31996),i=e.n(d),m=e(26037),u=e.n(m),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[3357,1442],{41442:function(r,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),d=e(31996),i=e.n(d),m=e(26037),u=e.n(m),c=e(67946),s=function(b){i()(o,b);var h=u()(o);function o(){return l()(this,o),h.apply(this,arguments)}return t()(o)}(c.Uo);s.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[341,1442],{41442:function(r,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),d=e(31996),i=e.n(d),m=e(26037),u=e.n(m),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[341,1442],{41442:function(r,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var _=e(72004),t=e.n(_),a=e(12444),l=e.n(a),d=e(31996),i=e.n(d),m=e(26037),u=e.n(m),c=e(67946),s=function(b){i()(o,b);var f=u()(o);function o(){return l()(this,o),f.apply(this,arguments)}return t()(o)}(c.Uo);s.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[3451,95],{10095:function(_,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return a}});var o=e(72004),r=e.n(o),s=e(12444),l=e.n(s),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[3451,95],{10095:function(_,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return a}});var o=e(72004),r=e.n(o),s=e(12444),l=e.n(s),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(67946),a=function(b){c()(t,b);var p=u()(t);function t(){return l()(this,t),p.apply(this,arguments)}return r()(t)}(m.Uo);a.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4327,113,7087],{67087:function(f,n,e){e.r(n),e.d(n,{FormJSFieldItemRunJSContext:function(){return o}});var l=e(72004),r=e.n(l),t=e(12444),s=e.n(t),a=e(31996),u=e.n(a),d=e(26037),m=e.n(d),i=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4327,113,7087],{67087:function(f,n,e){e.r(n),e.d(n,{FormJSFieldItemRunJSContext:function(){return o}});var l=e(72004),r=e.n(l),t=e(12444),s=e.n(t),a=e(31996),u=e.n(a),d=e(26037),m=e.n(d),i=e(67946),o=function(b){u()(_,b);var c=m()(_);function _(){return s()(this,_),c.apply(this,arguments)}return r()(_)}(i.Uo);o.define({label:"FormJSFieldItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form field rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:"Current field value (read-only in display mode; in controlled scenarios, use setProps to modify).",record:`Current record data object (read-only).
|
|
3
3
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form field container DOM element to be ready before executing callback.
|
|
4
4
|
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`,setProps:`Set form field properties programmatically.
|
|
5
5
|
Parameters: (fieldModel: any, props: { value?: any, disabled?: boolean, visible?: boolean }) => void
|
|
6
|
-
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),o.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,n,e){e.r(n),e.d(n,{JSFieldRunJSContext:function(){return o}});var l=e(72004),r=e.n(l),t=e(12444),s=e.n(t),a=e(31996),u=e.n(a),d=e(26037),m=e.n(d),i=e(
|
|
6
|
+
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),o.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,n,e){e.r(n),e.d(n,{JSFieldRunJSContext:function(){return o}});var l=e(72004),r=e.n(l),t=e(12444),s=e.n(t),a=e(31996),u=e.n(a),d=e(26037),m=e.n(d),i=e(67946),o=function(b){u()(_,b);var c=m()(_);function _(){return s()(this,_),c.apply(this,arguments)}return r()(_)}(i.Uo);o.define({label:"JSField RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for field rendering.
|
|
7
7
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
8
8
|
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
9
9
|
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4351,113,7087],{67087:function(f,n,e){e.r(n),e.d(n,{FormJSFieldItemRunJSContext:function(){return o}});var l=e(72004),t=e.n(l),s=e(12444),r=e.n(s),a=e(31996),d=e.n(a),u=e(26037),i=e.n(u),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4351,113,7087],{67087:function(f,n,e){e.r(n),e.d(n,{FormJSFieldItemRunJSContext:function(){return o}});var l=e(72004),t=e.n(l),s=e(12444),r=e.n(s),a=e(31996),d=e.n(a),u=e(26037),i=e.n(u),m=e(67946),o=function(c){d()(_,c);var b=i()(_);function _(){return r()(this,_),b.apply(this,arguments)}return t()(_)}(m.Uo);o.define({label:"FormJSFieldItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form field rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:"Current field value (read-only in display mode; in controlled scenarios, use setProps to modify).",record:`Current record data object (read-only).
|
|
3
3
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form field container DOM element to be ready before executing callback.
|
|
4
4
|
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`,setProps:`Set form field properties programmatically.
|
|
5
5
|
Parameters: (fieldModel: any, props: { value?: any, disabled?: boolean, visible?: boolean }) => void
|
|
6
|
-
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),o.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,n,e){e.r(n),e.d(n,{JSFieldRunJSContext:function(){return o}});var l=e(72004),t=e.n(l),s=e(12444),r=e.n(s),a=e(31996),d=e.n(a),u=e(26037),i=e.n(u),m=e(
|
|
6
|
+
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),o.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,n,e){e.r(n),e.d(n,{JSFieldRunJSContext:function(){return o}});var l=e(72004),t=e.n(l),s=e(12444),r=e.n(s),a=e(31996),d=e.n(a),u=e(26037),i=e.n(u),m=e(67946),o=function(c){d()(_,c);var b=i()(_);function _(){return r()(this,_),b.apply(this,arguments)}return t()(_)}(m.Uo);o.define({label:"JSField RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for field rendering.
|
|
7
7
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
8
8
|
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
9
9
|
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4356,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return r}});var t=e(72004),_=e.n(t),s=e(12444),l=e.n(s),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4356,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return r}});var t=e(72004),_=e.n(t),s=e(12444),l=e.n(s),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(67946),r=function(b){c()(o,b);var p=u()(o);function o(){return l()(this,o),p.apply(this,arguments)}return _()(o)}(m.Uo);r.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4727],{64727:function(h,n,e){e.r(n),e.d(n,{JSColumnRunJSContext:function(){return o}});var r=e(72004),t=e.n(r),s=e(12444),l=e.n(s),a=e(31996),u=e.n(a),i=e(26037),d=e.n(i),m=e(67946),o=function(c){u()(_,c);var b=d()(_);function _(){return l()(this,_),b.apply(this,arguments)}return t()(_)}(m.Uo);o.define({label:"JSColumn RunJS context",properties:{element:"ElementProxy instance providing a safe DOM container for the current table cell. Supports innerHTML/append and basic DOM APIs.",record:"Current row record object (read-only).",recordIndex:"Index of the current row in the page (0-based).",collection:"Collection definition metadata (read-only).",viewer:"View controller providing dialog/drawer/embed helpers for interactions initiated from the cell (e.g., open details).",React:"React library",antd:"Ant Design library"},methods:{onRefReady:"Wait for cell DOM element to be ready before executing callback. Parameters: (ref, callback, timeout?) => void",requireAsync:"Load external library by URL: `const lib = await ctx.requireAsync(url)`",importAsync:"Dynamically import ESM module by URL: `const mod = await ctx.importAsync(url)`"}}),o.define({label:"JS \u5217 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u683C\u5355\u5143\u683C\u7684\u5B89\u5168 DOM \u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49",record:"\u5F53\u524D\u884C\u8BB0\u5F55\u5BF9\u8C61\uFF08\u53EA\u8BFB\uFF09",recordIndex:"\u5F53\u524D\u884C\u7D22\u5F15\uFF08\u4ECE 0 \u5F00\u59CB\uFF09",collection:"\u96C6\u5408\u5B9A\u4E49\u5143\u6570\u636E\uFF08\u53EA\u8BFB\uFF09",viewer:"\u89C6\u56FE\u63A7\u5236\u5668\uFF0C\u53EF\u7528\u4E8E\u5728\u5355\u5143\u683C\u4E2D\u89E6\u53D1\u62BD\u5C49/\u5BF9\u8BDD\u6846/\u5185\u5D4C\u7B49\u4EA4\u4E92",React:"React \u5E93",antd:"Ant Design \u5E93"},methods:{onRefReady:"\u7B49\u5F85\u5355\u5143\u683C DOM \u5C31\u7EEA\u540E\u6267\u884C\u56DE\u8C03\u3002\u53C2\u6570\uFF1A(ref, callback, timeout?)",requireAsync:"\u6309 URL \u5F02\u6B65\u52A0\u8F7D\u5916\u90E8\u5E93\uFF1A`const lib = await ctx.requireAsync(url)`",importAsync:"\u6309 URL \u52A8\u6001\u5BFC\u5165 ESM \u6A21\u5757\uFF1A`const mod = await ctx.importAsync(url)`"}},{locale:"zh-CN"})}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4750,95],{10095:function(s,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var o=e(72004),r=e.n(o),a=e(12444),l=e.n(a),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4750,95],{10095:function(s,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var o=e(72004),r=e.n(o),a=e(12444),l=e.n(a),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(67946),_=function(b){c()(t,b);var p=u()(t);function t(){return l()(this,t),p.apply(this,arguments)}return r()(t)}(m.Uo);_.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4926,113,7087],{67087:function(f,o,e){e.r(o),e.d(o,{FormJSFieldItemRunJSContext:function(){return _}});var l=e(72004),r=e.n(l),s=e(12444),t=e.n(s),a=e(31996),d=e.n(a),u=e(26037),i=e.n(u),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[4926,113,7087],{67087:function(f,o,e){e.r(o),e.d(o,{FormJSFieldItemRunJSContext:function(){return _}});var l=e(72004),r=e.n(l),s=e(12444),t=e.n(s),a=e(31996),d=e.n(a),u=e(26037),i=e.n(u),m=e(67946),_=function(c){d()(n,c);var b=i()(n);function n(){return t()(this,n),b.apply(this,arguments)}return r()(n)}(m.Uo);_.define({label:"FormJSFieldItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form field rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:"Current field value (read-only in display mode; in controlled scenarios, use setProps to modify).",record:`Current record data object (read-only).
|
|
3
3
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form field container DOM element to be ready before executing callback.
|
|
4
4
|
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`,setProps:`Set form field properties programmatically.
|
|
5
5
|
Parameters: (fieldModel: any, props: { value?: any, disabled?: boolean, visible?: boolean }) => void
|
|
6
|
-
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),_.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,o,e){e.r(o),e.d(o,{JSFieldRunJSContext:function(){return _}});var l=e(72004),r=e.n(l),s=e(12444),t=e.n(s),a=e(31996),d=e.n(a),u=e(26037),i=e.n(u),m=e(
|
|
6
|
+
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),_.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,o,e){e.r(o),e.d(o,{JSFieldRunJSContext:function(){return _}});var l=e(72004),r=e.n(l),s=e(12444),t=e.n(s),a=e(31996),d=e.n(a),u=e(26037),i=e.n(u),m=e(67946),_=function(c){d()(n,c);var b=i()(n);function n(){return t()(this,n),b.apply(this,arguments)}return r()(n)}(m.Uo);_.define({label:"JSField RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for field rendering.
|
|
7
7
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
8
8
|
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
9
9
|
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[5013],{55013:function(h,n,e){e.r(n),e.d(n,{JSRecordActionRunJSContext:function(){return o}});var s=e(72004),r=e.n(s),l=e(12444),t=e.n(l),a=e(31996),u=e.n(a),d=e(26037),m=e.n(d),i=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[5013],{55013:function(h,n,e){e.r(n),e.d(n,{JSRecordActionRunJSContext:function(){return o}});var s=e(72004),r=e.n(s),l=e(12444),t=e.n(l),a=e(31996),u=e.n(a),d=e(26037),m=e.n(d),i=e(67946),o=function(b){u()(_,b);var c=m()(_);function _(){return t()(this,_),c.apply(this,arguments)}return r()(_)}(i.Uo);o.define({label:"JSRecordAction RunJS context",properties:{record:`Current record data object (read-only).
|
|
2
2
|
Contains all field values of the record associated with this action.`,filterByTk:`Primary key or filter key of the current record (read-only).
|
|
3
3
|
Used to identify the specific record in database operations.`}}),o.define({label:"JS \u8BB0\u5F55\u52A8\u4F5C RunJS \u4E0A\u4E0B\u6587",properties:{record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09",filterByTk:"\u4E3B\u952E/\u8FC7\u6EE4\u952E\uFF08\u53EA\u8BFB\uFF09"}},{locale:"zh-CN"})}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[5501,1442],{41442:function(t,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var _=e(72004),r=e.n(_),a=e(12444),l=e.n(a),d=e(31996),i=e.n(d),u=e(26037),m=e.n(u),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[5501,1442],{41442:function(t,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var _=e(72004),r=e.n(_),a=e(12444),l=e.n(a),d=e(31996),i=e.n(d),u=e(26037),m=e.n(u),c=e(67946),s=function(b){i()(o,b);var p=m()(o);function o(){return l()(this,o),p.apply(this,arguments)}return r()(o)}(c.Uo);s.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[5662,1442],{41442:function(a,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return t}});var _=e(72004),s=e.n(_),r=e(12444),l=e.n(r),d=e(31996),i=e.n(d),m=e(26037),u=e.n(m),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[5662,1442],{41442:function(a,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return t}});var _=e(72004),s=e.n(_),r=e(12444),l=e.n(r),d=e(31996),i=e.n(d),m=e(26037),u=e.n(m),c=e(67946),t=function(b){i()(o,b);var h=u()(o);function o(){return l()(this,o),h.apply(this,arguments)}return s()(o)}(c.Uo);t.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6021,1442],{41442:function(s,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return r}});var t=e(72004),_=e.n(t),a=e(12444),l=e.n(a),u=e(31996),i=e.n(u),d=e(26037),m=e.n(d),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6021,1442],{41442:function(s,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return r}});var t=e(72004),_=e.n(t),a=e(12444),l=e.n(a),u=e(31996),i=e.n(u),d=e(26037),m=e.n(d),c=e(67946),r=function(b){i()(o,b);var p=m()(o);function o(){return l()(this,o),p.apply(this,arguments)}return _()(o)}(c.Uo);r.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[645,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return s}});var o=e(72004),r=e.n(o),l=e(12444),_=e.n(l),i=e(31996),u=e.n(i),c=e(26037),d=e.n(c),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[645,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return s}});var o=e(72004),r=e.n(o),l=e(12444),_=e.n(l),i=e(31996),u=e.n(i),c=e(26037),d=e.n(c),m=e(67946),s=function(b){u()(t,b);var p=d()(t);function t(){return _()(this,t),p.apply(this,arguments)}return r()(t)}(m.Uo);s.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6474,689],{689:function(l,o,e){e.r(o),e.d(o,{JSCollectionActionRunJSContext:function(){return t}});var _=e(72004),s=e.n(_),r=e(12444),a=e.n(r),c=e(31996),u=e.n(c),i=e(26037),d=e.n(i),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6474,689],{689:function(l,o,e){e.r(o),e.d(o,{JSCollectionActionRunJSContext:function(){return t}});var _=e(72004),s=e.n(_),r=e(12444),a=e.n(r),c=e(31996),u=e.n(c),i=e(26037),d=e.n(i),m=e(67946),t=function(b){u()(n,b);var C=d()(n);function n(){return a()(this,n),C.apply(this,arguments)}return s()(n)}(m.Uo);t.define({label:"JSCollectionAction RunJS context",properties:{resource:`Collection resource instance providing access to selected rows, pagination, and data operations.
|
|
2
2
|
Use ctx.resource.selectedRows to get selected records.
|
|
3
3
|
Use ctx.resource.pagination for page info.`}}),t.define({label:"JS \u96C6\u5408\u52A8\u4F5C RunJS \u4E0A\u4E0B\u6587",properties:{resource:"\u5217\u8868\u8D44\u6E90\uFF08\u5305\u542B\u9009\u4E2D\u884C/\u5206\u9875\u4FE1\u606F\u7B49\uFF09"}},{locale:"zh-CN"})},36474:function(l,o,e){e.r(o);var _=e(689),s={contexts:[_.JSCollectionActionRunJSContext],prefix:"sn-act-export",label:"Export selected rows as JSON",description:"Download selected rows as a JSON file",locales:{"zh-CN":{label:"\u5BFC\u51FA\u9009\u4E2D\u884C\u4E3A JSON",description:"\u5C06\u9009\u4E2D\u7684\u884C\u5BFC\u51FA\u4E3A JSON \u6587\u4EF6\u4E0B\u8F7D"}},content:`
|
|
4
4
|
const rows = ctx.resource?.getSelectedRows?.() || [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6534,1442],{41442:function(r,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return t}});var s=e(72004),_=e.n(s),a=e(12444),l=e.n(a),i=e(31996),d=e.n(i),m=e(26037),u=e.n(m),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6534,1442],{41442:function(r,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return t}});var s=e(72004),_=e.n(s),a=e(12444),l=e.n(a),i=e(31996),d=e.n(i),m=e(26037),u=e.n(m),c=e(67946),t=function(b){d()(o,b);var p=u()(o);function o(){return l()(this,o),p.apply(this,arguments)}return _()(o)}(c.Uo);t.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6747,95,113,7087],{67087:function(h,_,e){e.r(_),e.d(_,{FormJSFieldItemRunJSContext:function(){return o}});var t=e(72004),l=e.n(t),r=e(12444),s=e.n(r),a=e(31996),u=e.n(a),d=e(26037),i=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6747,95,113,7087],{67087:function(h,_,e){e.r(_),e.d(_,{FormJSFieldItemRunJSContext:function(){return o}});var t=e(72004),l=e.n(t),r=e(12444),s=e.n(r),a=e(31996),u=e.n(a),d=e(26037),i=e.n(d),m=e(67946),o=function(c){u()(n,c);var b=i()(n);function n(){return s()(this,n),b.apply(this,arguments)}return l()(n)}(m.Uo);o.define({label:"FormJSFieldItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form field rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:"Current field value (read-only in display mode; in controlled scenarios, use setProps to modify).",record:`Current record data object (read-only).
|
|
3
3
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form field container DOM element to be ready before executing callback.
|
|
4
4
|
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`,setProps:`Set form field properties programmatically.
|
|
5
5
|
Parameters: (fieldModel: any, props: { value?: any, disabled?: boolean, visible?: boolean }) => void
|
|
6
|
-
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),o.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},10095:function(h,_,e){e.r(_),e.d(_,{JSBlockRunJSContext:function(){return o}});var t=e(72004),l=e.n(t),r=e(12444),s=e.n(r),a=e(31996),u=e.n(a),d=e(26037),i=e.n(d),m=e(
|
|
6
|
+
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),o.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},10095:function(h,_,e){e.r(_),e.d(_,{JSBlockRunJSContext:function(){return o}});var t=e(72004),l=e.n(t),r=e(12444),s=e.n(r),a=e(31996),u=e.n(a),d=e(26037),i=e.n(d),m=e(67946),o=function(c){u()(n,c);var b=i()(n);function n(){return s()(this,n),b.apply(this,arguments)}return l()(n)}(m.Uo);o.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
7
7
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
8
8
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
9
9
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
10
10
|
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void
|
|
11
|
-
Example: ctx.onRefReady(ctx.ref, (el) => { el.innerHTML = "Ready!" })`,requireAsync:"Load external library: `const lib = await ctx.requireAsync(url)`",importAsync:"Dynamically import ESM module: `const mod = await ctx.importAsync(url)`"}}),o.define({label:"RunJS \u4E0A\u4E0B\u6587",properties:{element:{description:"ElementProxy\uFF0C\u5B89\u5168\u7684 DOM \u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49",detail:"ElementProxy",properties:{innerHTML:"\u8BFB\u53D6\u6216\u8BBE\u7F6E\u5BB9\u5668\u7684 HTML \u5185\u5BB9"}},record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF0C\u7528\u4E8E\u6570\u636E\u533A\u5757/\u8BE6\u60C5\u7B49\u573A\u666F\uFF09",value:"\u5F53\u524D\u503C\uFF08\u82E5\u5B58\u5728\uFF09",React:"React \u5E93",antd:"Ant Design \u5E93"},methods:{onRefReady:"\u5BB9\u5668 ref \u5C31\u7EEA\u56DE\u8C03\uFF1A\n```js\nctx.onRefReady(ctx.ref, el => { /* ... */ })\n```",requireAsync:"\u52A0\u8F7D\u5916\u90E8\u5E93\uFF1A`const lib = await ctx.requireAsync(url)`",importAsync:"\u6309 URL \u52A8\u6001\u5BFC\u5165 ESM \u6A21\u5757\uFF1A`const mod = await ctx.importAsync(url)`"}},{locale:"zh-CN"})},40113:function(h,_,e){e.r(_),e.d(_,{JSFieldRunJSContext:function(){return o}});var t=e(72004),l=e.n(t),r=e(12444),s=e.n(r),a=e(31996),u=e.n(a),d=e(26037),i=e.n(d),m=e(
|
|
11
|
+
Example: ctx.onRefReady(ctx.ref, (el) => { el.innerHTML = "Ready!" })`,requireAsync:"Load external library: `const lib = await ctx.requireAsync(url)`",importAsync:"Dynamically import ESM module: `const mod = await ctx.importAsync(url)`"}}),o.define({label:"RunJS \u4E0A\u4E0B\u6587",properties:{element:{description:"ElementProxy\uFF0C\u5B89\u5168\u7684 DOM \u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49",detail:"ElementProxy",properties:{innerHTML:"\u8BFB\u53D6\u6216\u8BBE\u7F6E\u5BB9\u5668\u7684 HTML \u5185\u5BB9"}},record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF0C\u7528\u4E8E\u6570\u636E\u533A\u5757/\u8BE6\u60C5\u7B49\u573A\u666F\uFF09",value:"\u5F53\u524D\u503C\uFF08\u82E5\u5B58\u5728\uFF09",React:"React \u5E93",antd:"Ant Design \u5E93"},methods:{onRefReady:"\u5BB9\u5668 ref \u5C31\u7EEA\u56DE\u8C03\uFF1A\n```js\nctx.onRefReady(ctx.ref, el => { /* ... */ })\n```",requireAsync:"\u52A0\u8F7D\u5916\u90E8\u5E93\uFF1A`const lib = await ctx.requireAsync(url)`",importAsync:"\u6309 URL \u52A8\u6001\u5BFC\u5165 ESM \u6A21\u5757\uFF1A`const mod = await ctx.importAsync(url)`"}},{locale:"zh-CN"})},40113:function(h,_,e){e.r(_),e.d(_,{JSFieldRunJSContext:function(){return o}});var t=e(72004),l=e.n(t),r=e(12444),s=e.n(r),a=e(31996),u=e.n(a),d=e(26037),i=e.n(d),m=e(67946),o=function(c){u()(n,c);var b=i()(n);function n(){return s()(this,n),b.apply(this,arguments)}return l()(n)}(m.Uo);o.define({label:"JSField RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for field rendering.
|
|
12
12
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
13
13
|
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
14
14
|
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[689],{689:function(C,n,e){e.r(n),e.d(n,{JSCollectionActionRunJSContext:function(){return o}});var s=e(72004),l=e.n(s),r=e(12444),t=e.n(r),u=e(31996),a=e.n(u),m=e(26037),c=e.n(m),d=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[689],{689:function(C,n,e){e.r(n),e.d(n,{JSCollectionActionRunJSContext:function(){return o}});var s=e(72004),l=e.n(s),r=e(12444),t=e.n(r),u=e(31996),a=e.n(u),m=e(26037),c=e.n(m),d=e(67946),o=function(i){a()(_,i);var b=c()(_);function _(){return t()(this,_),b.apply(this,arguments)}return l()(_)}(d.Uo);o.define({label:"JSCollectionAction RunJS context",properties:{resource:`Collection resource instance providing access to selected rows, pagination, and data operations.
|
|
2
2
|
Use ctx.resource.selectedRows to get selected records.
|
|
3
3
|
Use ctx.resource.pagination for page info.`}}),o.define({label:"JS \u96C6\u5408\u52A8\u4F5C RunJS \u4E0A\u4E0B\u6587",properties:{resource:"\u5217\u8868\u8D44\u6E90\uFF08\u5305\u542B\u9009\u4E2D\u884C/\u5206\u9875\u4FE1\u606F\u7B49\uFF09"}},{locale:"zh-CN"})}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6920,95],{10095:function(s,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return a}});var r=e(72004),o=e.n(r),_=e(12444),l=e.n(_),i=e(31996),d=e.n(i),c=e(26037),u=e.n(c),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[6920,95],{10095:function(s,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return a}});var r=e(72004),o=e.n(r),_=e(12444),l=e.n(_),i=e(31996),d=e.n(i),c=e(26037),u=e.n(c),m=e(67946),a=function(b){d()(t,b);var p=u()(t);function t(){return l()(this,t),p.apply(this,arguments)}return o()(t)}(m.Uo);a.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[703,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return r}});var o=e(72004),_=e.n(o),s=e(12444),l=e.n(s),c=e(31996),i=e.n(c),u=e(26037),d=e.n(u),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[703,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return r}});var o=e(72004),_=e.n(o),s=e(12444),l=e.n(s),c=e(31996),i=e.n(c),u=e(26037),d=e.n(u),m=e(67946),r=function(b){i()(t,b);var p=d()(t);function t(){return l()(this,t),p.apply(this,arguments)}return _()(t)}(m.Uo);r.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[7087],{67087:function(p,n,e){e.r(n),e.d(n,{FormJSFieldItemRunJSContext:function(){return o}});var s=e(72004),r=e.n(s),l=e(12444),a=e.n(l),t=e(31996),d=e.n(t),m=e(26037),u=e.n(m),i=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[7087],{67087:function(p,n,e){e.r(n),e.d(n,{FormJSFieldItemRunJSContext:function(){return o}});var s=e(72004),r=e.n(s),l=e(12444),a=e.n(l),t=e(31996),d=e.n(t),m=e(26037),u=e.n(m),i=e(67946),o=function(b){d()(_,b);var c=u()(_);function _(){return a()(this,_),c.apply(this,arguments)}return r()(_)}(i.Uo);o.define({label:"FormJSFieldItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form field rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:"Current field value (read-only in display mode; in controlled scenarios, use setProps to modify).",record:`Current record data object (read-only).
|
|
3
3
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form field container DOM element to be ready before executing callback.
|
|
4
4
|
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`,setProps:`Set form field properties programmatically.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[7483,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var o=e(72004),r=e.n(o),s=e(12444),l=e.n(s),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[7483,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var o=e(72004),r=e.n(o),s=e(12444),l=e.n(s),i=e(31996),c=e.n(i),d=e(26037),u=e.n(d),m=e(67946),_=function(b){c()(t,b);var h=u()(t);function t(){return l()(this,t),h.apply(this,arguments)}return r()(t)}(m.Uo);_.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[7534,4727],{64727:function(s,n,e){e.r(n),e.d(n,{JSColumnRunJSContext:function(){return l}});var t=e(72004),r=e.n(t),a=e(12444),_=e.n(a),i=e(31996),u=e.n(i),d=e(26037),c=e.n(d),m=e(67946),l=function(b){u()(o,b);var p=c()(o);function o(){return _()(this,o),p.apply(this,arguments)}return r()(o)}(m.Uo);l.define({label:"JSColumn RunJS context",properties:{element:"ElementProxy instance providing a safe DOM container for the current table cell. Supports innerHTML/append and basic DOM APIs.",record:"Current row record object (read-only).",recordIndex:"Index of the current row in the page (0-based).",collection:"Collection definition metadata (read-only).",viewer:"View controller providing dialog/drawer/embed helpers for interactions initiated from the cell (e.g., open details).",React:"React library",antd:"Ant Design library"},methods:{onRefReady:"Wait for cell DOM element to be ready before executing callback. Parameters: (ref, callback, timeout?) => void",requireAsync:"Load external library by URL: `const lib = await ctx.requireAsync(url)`",importAsync:"Dynamically import ESM module by URL: `const mod = await ctx.importAsync(url)`"}}),l.define({label:"JS \u5217 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u683C\u5355\u5143\u683C\u7684\u5B89\u5168 DOM \u5BB9\u5668\uFF0C\u652F\u6301 innerHTML/append \u7B49",record:"\u5F53\u524D\u884C\u8BB0\u5F55\u5BF9\u8C61\uFF08\u53EA\u8BFB\uFF09",recordIndex:"\u5F53\u524D\u884C\u7D22\u5F15\uFF08\u4ECE 0 \u5F00\u59CB\uFF09",collection:"\u96C6\u5408\u5B9A\u4E49\u5143\u6570\u636E\uFF08\u53EA\u8BFB\uFF09",viewer:"\u89C6\u56FE\u63A7\u5236\u5668\uFF0C\u53EF\u7528\u4E8E\u5728\u5355\u5143\u683C\u4E2D\u89E6\u53D1\u62BD\u5C49/\u5BF9\u8BDD\u6846/\u5185\u5D4C\u7B49\u4EA4\u4E92",React:"React \u5E93",antd:"Ant Design \u5E93"},methods:{onRefReady:"\u7B49\u5F85\u5355\u5143\u683C DOM \u5C31\u7EEA\u540E\u6267\u884C\u56DE\u8C03\u3002\u53C2\u6570\uFF1A(ref, callback, timeout?)",requireAsync:"\u6309 URL \u5F02\u6B65\u52A0\u8F7D\u5916\u90E8\u5E93\uFF1A`const lib = await ctx.requireAsync(url)`",importAsync:"\u6309 URL \u52A8\u6001\u5BFC\u5165 ESM \u6A21\u5757\uFF1A`const mod = await ctx.importAsync(url)`"}},{locale:"zh-CN"})},67534:function(s,n,e){e.r(n);var t=e(64727),r={contexts:[t.JSColumnRunJSContext],prefix:"sn-col-concat",label:"Concat two fields",description:"Combine two field values into the current column cell",locales:{"zh-CN":{label:"\u62FC\u63A5\u4E24\u4E2A\u5B57\u6BB5\u503C",description:"\u5728\u81EA\u5B9A\u4E49\u5217\u4E2D\u62FC\u63A5\u4E24\u4E2A\u5B57\u6BB5\u7684\u503C\u4F5C\u4E3A\u663E\u793A\u5185\u5BB9"}},content:`
|
|
2
|
+
// Demo helper: infer previous columns' dataIndex values based on the current column position
|
|
3
|
+
// In production, hardcode field names to avoid surprises when columns are reordered
|
|
4
|
+
function resolvePreviousDataIndexes() {
|
|
5
|
+
const parent = ctx.model?.parent;
|
|
6
|
+
const list = parent?.subModels?.columns;
|
|
7
|
+
if (!Array.isArray(list)) return [];
|
|
8
|
+
const currentUid = ctx.model?.uid;
|
|
9
|
+
const currentIndex = list.findIndex((item) => item?.uid === currentUid);
|
|
10
|
+
if (currentIndex <= 0) return [];
|
|
11
|
+
return list
|
|
12
|
+
.slice(Math.max(0, currentIndex - 2), currentIndex)
|
|
13
|
+
.map((item) => (item && item.props ? item.props.dataIndex : undefined))
|
|
14
|
+
.filter((key) => typeof key === 'string' && key.length > 0);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const [autoFieldA, autoFieldB] = resolvePreviousDataIndexes();
|
|
18
|
+
|
|
19
|
+
// Fallback: manually specify field keys when auto detection is not enough
|
|
20
|
+
const fieldA = autoFieldA || 'firstName';
|
|
21
|
+
const fieldB = autoFieldB || 'lastName';
|
|
22
|
+
|
|
23
|
+
const normalize = (value) => {
|
|
24
|
+
if (value === undefined || value === null) return '';
|
|
25
|
+
return String(value).trim();
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const valueA = normalize(ctx.record?.[fieldA]);
|
|
29
|
+
const valueB = normalize(ctx.record?.[fieldB]);
|
|
30
|
+
|
|
31
|
+
const parts = [valueA, valueB].filter((item) => item.length > 0);
|
|
32
|
+
|
|
33
|
+
ctx.element.textContent = parts.length ? parts.join(' / ') : ctx.t('N/A');
|
|
34
|
+
`};n.default=r}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[7764,95],{10095:function(r,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return s}});var o=e(72004),_=e.n(o),a=e(12444),l=e.n(a),i=e(31996),c=e.n(i),u=e(26037),d=e.n(u),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[7764,95],{10095:function(r,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return s}});var o=e(72004),_=e.n(o),a=e(12444),l=e.n(a),i=e(31996),c=e.n(i),u=e(26037),d=e.n(u),m=e(67946),s=function(b){c()(t,b);var p=d()(t);function t(){return l()(this,t),p.apply(this,arguments)}return _()(t)}(m.Uo);s.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[8183,689],{689:function(l,o,e){e.r(o),e.d(o,{JSCollectionActionRunJSContext:function(){return t}});var n=e(72004),s=e.n(n),r=e(12444),u=e.n(r),a=e(31996),c=e.n(a),d=e(26037),i=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[8183,689],{689:function(l,o,e){e.r(o),e.d(o,{JSCollectionActionRunJSContext:function(){return t}});var n=e(72004),s=e.n(n),r=e(12444),u=e.n(r),a=e(31996),c=e.n(a),d=e(26037),i=e.n(d),m=e(67946),t=function(b){c()(_,b);var C=i()(_);function _(){return u()(this,_),C.apply(this,arguments)}return s()(_)}(m.Uo);t.define({label:"JSCollectionAction RunJS context",properties:{resource:`Collection resource instance providing access to selected rows, pagination, and data operations.
|
|
2
2
|
Use ctx.resource.selectedRows to get selected records.
|
|
3
3
|
Use ctx.resource.pagination for page info.`}}),t.define({label:"JS \u96C6\u5408\u52A8\u4F5C RunJS \u4E0A\u4E0B\u6587",properties:{resource:"\u5217\u8868\u8D44\u6E90\uFF08\u5305\u542B\u9009\u4E2D\u884C/\u5206\u9875\u4FE1\u606F\u7B49\uFF09"}},{locale:"zh-CN"})},58183:function(l,o,e){e.r(o);var n=e(689),s={contexts:[n.JSCollectionActionRunJSContext],prefix:"sn-act-destroy-selected",label:"Destroy selected rows",description:"Delete selected rows via resource.destroySelectedRows()",locales:{"zh-CN":{label:"\u5220\u9664\u9009\u4E2D\u884C",description:"\u901A\u8FC7 resource.destroySelectedRows() \u5220\u9664\u9009\u4E2D\u884C"}},content:`
|
|
4
4
|
const rows = ctx.resource?.getSelectedRows?.() || [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[8408,95],{10095:function(s,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return a}});var t=e(72004),r=e.n(t),l=e(12444),u=e.n(l),_=e(31996),c=e.n(_),i=e(26037),d=e.n(i),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[8408,95],{10095:function(s,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return a}});var t=e(72004),r=e.n(t),l=e(12444),u=e.n(l),_=e(31996),c=e.n(_),i=e(26037),d=e.n(i),m=e(67946),a=function(p){c()(o,p);var b=d()(o);function o(){return u()(this,o),b.apply(this,arguments)}return r()(o)}(m.Uo);a.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[8805,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var r=e(72004),t=e.n(r),s=e(12444),l=e.n(s),c=e(31996),u=e.n(c),i=e(26037),d=e.n(i),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[8805,95],{10095:function(a,n,e){e.r(n),e.d(n,{JSBlockRunJSContext:function(){return _}});var r=e(72004),t=e.n(r),s=e(12444),l=e.n(s),c=e(31996),u=e.n(c),i=e(26037),d=e.n(i),m=e(67946),_=function(b){u()(o,b);var p=d()(o);function o(){return l()(this,o),p.apply(this,arguments)}return t()(o)}(m.Uo);_.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9042,113,7087],{67087:function(f,o,e){e.r(o),e.d(o,{FormJSFieldItemRunJSContext:function(){return _}});var t=e(72004),s=e.n(t),r=e(12444),a=e.n(r),l=e(31996),u=e.n(l),d=e(26037),i=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9042,113,7087],{67087:function(f,o,e){e.r(o),e.d(o,{FormJSFieldItemRunJSContext:function(){return _}});var t=e(72004),s=e.n(t),r=e(12444),a=e.n(r),l=e(31996),u=e.n(l),d=e(26037),i=e.n(d),m=e(67946),_=function(c){u()(n,c);var b=i()(n);function n(){return a()(this,n),b.apply(this,arguments)}return s()(n)}(m.Uo);_.define({label:"FormJSFieldItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form field rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:"Current field value (read-only in display mode; in controlled scenarios, use setProps to modify).",record:`Current record data object (read-only).
|
|
3
3
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form field container DOM element to be ready before executing callback.
|
|
4
4
|
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`,setProps:`Set form field properties programmatically.
|
|
5
5
|
Parameters: (fieldModel: any, props: { value?: any, disabled?: boolean, visible?: boolean }) => void
|
|
6
|
-
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),_.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,o,e){e.r(o),e.d(o,{JSFieldRunJSContext:function(){return _}});var t=e(72004),s=e.n(t),r=e(12444),a=e.n(r),l=e(31996),u=e.n(l),d=e(26037),i=e.n(d),m=e(
|
|
6
|
+
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),_.define({label:"\u8868\u5355 JS \u5B57\u6BB5\u9879 RunJS \u4E0A\u4E0B\u6587",properties:{element:"ElementProxy\uFF0C\u8868\u5355\u5B57\u6BB5\u5BB9\u5668",value:"\u5B57\u6BB5\u503C\uFF08\u5C55\u793A\u6A21\u5F0F\u4E3A\u53EA\u8BFB\uFF1B\u53D7\u63A7\u573A\u666F\u7528 setProps \u4FEE\u6539\uFF09",record:"\u5F53\u524D\u8BB0\u5F55\uFF08\u53EA\u8BFB\uFF09"},methods:{onRefReady:"\u5BB9\u5668\u5C31\u7EEA\u56DE\u8C03",setProps:"\u8BBE\u7F6E\u8868\u5355\u9879\u5C5E\u6027\uFF1A`setProps(fieldModel, { value })`\uFF08\u7531\u8054\u52A8/\u8868\u5355\u4E0A\u4E0B\u6587\u63D0\u4F9B\uFF09"}},{locale:"zh-CN"})},40113:function(f,o,e){e.r(o),e.d(o,{JSFieldRunJSContext:function(){return _}});var t=e(72004),s=e.n(t),r=e(12444),a=e.n(r),l=e(31996),u=e.n(l),d=e(26037),i=e.n(d),m=e(67946),_=function(c){u()(n,c);var b=i()(n);function n(){return a()(this,n),b.apply(this,arguments)}return s()(n)}(m.Uo);_.define({label:"JSField RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for field rendering.
|
|
7
7
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
8
8
|
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
9
9
|
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[935,1442],{41442:function(a,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var t=e(72004),_=e.n(t),r=e(12444),l=e.n(r),d=e(31996),i=e.n(d),m=e(26037),u=e.n(m),c=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[935,1442],{41442:function(a,n,e){e.r(n),e.d(n,{JSItemRunJSContext:function(){return s}});var t=e(72004),_=e.n(t),r=e(12444),l=e.n(r),d=e(31996),i=e.n(d),m=e(26037),u=e.n(m),c=e(67946),s=function(b){i()(o,b);var f=u()(o);function o(){return l()(this,o),f.apply(this,arguments)}return _()(o)}(c.Uo);s.define({label:"JSItem RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for form item rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
3
|
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[95],{10095:function(h,_,e){e.r(_),e.d(_,{JSBlockRunJSContext:function(){return o}});var t=e(72004),r=e.n(t),a=e(12444),s=e.n(a),l=e(31996),i=e.n(l),u=e(26037),c=e.n(u),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[95],{10095:function(h,_,e){e.r(_),e.d(_,{JSBlockRunJSContext:function(){return o}});var t=e(72004),r=e.n(t),a=e(12444),s=e.n(a),l=e(31996),i=e.n(l),u=e(26037),c=e.n(u),m=e(67946),o=function(d){i()(n,d);var b=c()(n);function n(){return s()(this,n),b.apply(this,arguments)}return r()(n)}(m.Uo);o.define({label:"RunJS context",properties:{element:{description:`ElementProxy instance providing a safe DOM container.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.
|
|
3
3
|
Use this to render content in the JS block.`,detail:"ElementProxy",properties:{innerHTML:"Set or read the HTML content of the container element."}},record:`Current record data object (read-only).
|
|
4
4
|
Available when the JS block is within a data block or detail view context.`,value:"Current value of the field or component, if available in the current context.",React:"React library",antd:"Ant Design library"},methods:{onRefReady:`Wait for container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9547,113],{40113:function(a,n,e){e.r(n),e.d(n,{JSFieldRunJSContext:function(){return l}});var t=e(72004),_=e.n(t),s=e(12444),r=e.n(s),d=e(31996),i=e.n(d),u=e(26037),c=e.n(u),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9547,113],{40113:function(a,n,e){e.r(n),e.d(n,{JSFieldRunJSContext:function(){return l}});var t=e(72004),_=e.n(t),s=e(12444),r=e.n(s),d=e(31996),i=e.n(d),u=e(26037),c=e.n(u),m=e(67946),l=function(b){i()(o,b);var f=c()(o);function o(){return r()(this,o),f.apply(this,arguments)}return _()(o)}(m.Uo);l.define({label:"JSField RunJS context",properties:{element:`ElementProxy instance providing a safe DOM container for field rendering.
|
|
2
2
|
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
3
3
|
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
4
4
|
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9801,689],{689:function(r,o,e){e.r(o),e.d(o,{JSCollectionActionRunJSContext:function(){return t}});var n=e(72004),s=e.n(n),l=e(12444),u=e.n(l),c=e(31996),a=e.n(c),d=e(26037),i=e.n(d),m=e(
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9801,689],{689:function(r,o,e){e.r(o),e.d(o,{JSCollectionActionRunJSContext:function(){return t}});var n=e(72004),s=e.n(n),l=e(12444),u=e.n(l),c=e(31996),a=e.n(c),d=e(26037),i=e.n(d),m=e(67946),t=function(b){a()(_,b);var C=i()(_);function _(){return u()(this,_),C.apply(this,arguments)}return s()(_)}(m.Uo);t.define({label:"JSCollectionAction RunJS context",properties:{resource:`Collection resource instance providing access to selected rows, pagination, and data operations.
|
|
2
2
|
Use ctx.resource.selectedRows to get selected records.
|
|
3
3
|
Use ctx.resource.pagination for page info.`}}),t.define({label:"JS \u96C6\u5408\u52A8\u4F5C RunJS \u4E0A\u4E0B\u6587",properties:{resource:"\u5217\u8868\u8D44\u6E90\uFF08\u5305\u542B\u9009\u4E2D\u884C/\u5206\u9875\u4FE1\u606F\u7B49\uFF09"}},{locale:"zh-CN"})},29801:function(r,o,e){e.r(o);var n=e(689),s={contexts:[n.JSCollectionActionRunJSContext],prefix:"sn-act-iterate",label:"Iterate selected rows",description:"Loop through selected rows and process each record",locales:{"zh-CN":{label:"\u904D\u5386\u9009\u4E2D\u884C",description:"\u904D\u5386\u9009\u4E2D\u884C\u5E76\u5904\u7406\u6BCF\u6761\u8BB0\u5F55"}},content:`
|
|
4
4
|
const rows = ctx.resource?.getSelectedRows?.() || [];
|