@nocobase/app 2.1.0-alpha.10 → 2.1.0-alpha.11
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 +2 -2
- package/client/index.html +14 -0
- package/client/rsbuild.config.ts +261 -0
- package/{client-v2/src/routes/AppInfoDemoRoute.tsx → client/src/main.tsx} +2 -4
- package/client-v2/index.html +3 -17
- package/client-v2/public/browser-checker.js +186 -0
- package/client-v2/public/favicon/favicon.ico +0 -0
- package/client-v2/public/file-placeholder/ai-200-200.png +0 -0
- package/client-v2/public/file-placeholder/audio-200-200.png +0 -0
- package/client-v2/public/file-placeholder/docx-200-200.png +0 -0
- package/client-v2/public/file-placeholder/eps-200-200.png +0 -0
- package/client-v2/public/file-placeholder/gif-200-200.png +0 -0
- package/client-v2/public/file-placeholder/jpeg-200-200.png +0 -0
- package/client-v2/public/file-placeholder/pdf-200-200.png +0 -0
- package/client-v2/public/file-placeholder/png-200-200.png +0 -0
- package/client-v2/public/file-placeholder/pptx-200-200.png +0 -0
- package/client-v2/public/file-placeholder/psd-200-200.png +0 -0
- package/client-v2/public/file-placeholder/svg-200-200.png +0 -0
- package/client-v2/public/file-placeholder/unknown-200-200.png +0 -0
- package/client-v2/public/file-placeholder/video-200-200.png +0 -0
- package/client-v2/public/file-placeholder/xlsx-200-200.png +0 -0
- package/client-v2/public/file-placeholder/zip-200-200.png +0 -0
- package/client-v2/public/global.css +63 -0
- package/client-v2/public/nocobase.png +0 -0
- package/client-v2/public/robots.txt +2 -0
- package/client-v2/rsbuild.config.ts +85 -23
- package/client-v2/src/.plugins/index.ts +4 -0
- package/client-v2/src/main.tsx +3 -3
- package/dist/client/{1708.645e826c.async.js → 600.1751a15d.async.js} +23 -23
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.tpl +1 -1
- package/dist/client/p__index.482f66b1.async.js +2752 -0
- package/dist/client/umi.96c93a47.js +63 -0
- package/dist/client/v2/assets/{1310-fbaee3cb.js → 1310-21e5c8a8.js} +1 -1
- package/dist/client/v2/assets/1331-9092cf22.js +1 -0
- package/dist/client/v2/assets/{1425-0d0cc788.js → 1425-a2b446a6.js} +1 -1
- package/dist/client/v2/assets/{1507-3a78eb3b.js → 1507-a673a0c0.js} +1 -1
- package/dist/client/v2/assets/{158-9800497f.js → 158-6a033567.js} +1 -1
- package/dist/client/v2/assets/{1725-6bb35fdf.js → 1725-6f5b8d53.js} +1 -1
- package/dist/client/v2/assets/{1786-8fd8cc53.js → 1786-8969223a.js} +2 -2
- package/dist/client/v2/assets/{1951-3af0a41f.js → 1951-f63bc4b3.js} +1 -1
- package/dist/client/v2/assets/{2017-7bc3cc87.js → 2017-b35f125d.js} +1 -1
- package/dist/client/v2/assets/{212-30d011b4.js → 212-59d29e60.js} +1 -1
- package/dist/client/v2/assets/{2335-40fc71a2.js → 2335-1d33c3cf.js} +1 -1
- package/dist/client/v2/assets/{2555-0744d7fe.js → 2555-dee484a1.js} +1 -1
- package/dist/client/v2/assets/{2702-2f40d8de.js → 2702-8d5ab2a8.js} +1 -1
- package/dist/client/v2/assets/2710-93d67bf0.js +36 -0
- package/dist/client/v2/assets/{2726-927c9cfb.js → 2726-f6cc5db9.js} +1 -1
- package/dist/client/v2/assets/{2861-da0bb151.js → 2861-48106fd8.js} +1 -1
- package/dist/client/v2/assets/{2898-cf256b0e.js → 2898-2a7d5793.js} +2 -2
- package/dist/client/v2/assets/{2958-e4b6ff73.js → 2958-5a85effa.js} +3 -3
- package/dist/client/v2/assets/{3117-54ef67b5.js → 3117-3d38bb4d.js} +1 -1
- package/dist/client/v2/assets/{338-3d2099ef.js → 338-2f192edd.js} +1 -1
- package/dist/client/v2/assets/3475-c42974e1.js +1 -0
- package/dist/client/v2/assets/{3660-c7fcb199.js → 3660-27f9c6c5.js} +1 -1
- package/dist/client/v2/assets/{3662-b25a5e70.js → 3662-135bbea1.js} +1 -1
- package/dist/client/v2/assets/{3690-3dd94e4c.js → 3690-4a8bdf43.js} +1 -1
- package/dist/client/v2/assets/{3727-da97de5f.js → 3727-b74fc29b.js} +1 -1
- package/dist/client/v2/assets/{3916-250bcfe2.js → 3916-ba5b43b5.js} +1 -1
- package/dist/client/v2/assets/{3989-f2860cc7.js → 3989-e72345bb.js} +1 -1
- package/dist/client/v2/assets/{4313-afee0e7e.js → 4313-9687f912.js} +1 -1
- package/dist/client/v2/assets/{5064-2ca0d32b.js → 5064-93d8e29e.js} +1 -1
- package/dist/client/v2/assets/{5501-a146926a.js → 5501-a3b5b97f.js} +1 -1
- package/dist/client/v2/assets/{5721-b76fecc5.js → 5721-f00ddbf2.js} +1 -1
- package/dist/client/v2/assets/{5759-11ca4d36.js → 5759-d5b1d946.js} +2 -2
- package/dist/client/v2/assets/{5761-5b4fcc0f.js → 5761-8ab1974d.js} +1 -1
- package/dist/client/v2/assets/6064-1517304e.js +2 -0
- package/dist/client/v2/assets/{9261-5b0e2178.js.LICENSE.txt → 6064-1517304e.js.LICENSE.txt} +7 -0
- package/dist/client/v2/assets/6269-35e90156.js +1 -0
- package/dist/client/v2/assets/{6437-18d1e044.js → 6437-2f91d29a.js} +1 -1
- package/dist/client/v2/assets/{6581-4874c6dc.js → 6581-51c928bf.js} +1 -1
- package/dist/client/v2/assets/{6738-06ce7af7.js → 6738-eb09fa59.js} +1 -1
- package/dist/client/v2/assets/{700-8f6e9747.js → 700-5f166286.js} +2 -2
- package/dist/client/v2/assets/{7021-32b49ced.js → 7021-01608dc5.js} +2 -2
- package/dist/client/v2/assets/{7201-2049816a.js → 7201-8e6e91a3.js} +1 -1
- package/dist/client/v2/assets/{7959-f9145d32.js → 7959-ab57fce2.js} +1 -1
- package/dist/client/v2/assets/{8138-f2234325.js → 8138-704104a5.js} +1 -1
- package/dist/client/v2/assets/{8262-09946e21.js → 8262-7a324b59.js} +1 -1
- package/dist/client/v2/assets/{8434-7296f545.js → 8434-79232eec.js} +1 -1
- package/dist/client/v2/assets/{8438-55cc74f0.js → 8438-9d210970.js} +2 -2
- package/dist/client/v2/assets/{8562-022da9fa.js → 8562-215edc37.js} +1 -1
- package/dist/client/v2/assets/9836-288424d8.js +22 -0
- package/dist/client/v2/assets/index-a2c43823.js +269 -0
- package/dist/client/v2/assets/runtime-d6e0ee3d.js +1 -0
- package/dist/client/v2/assets/vendor-antd-ecosystem-1ffc870c.js +2 -0
- package/dist/client/v2/assets/vendor-antd-icons-db04cf76.js +2 -0
- package/dist/client/v2/browser-checker.js +186 -0
- package/dist/client/v2/favicon/favicon.ico +0 -0
- package/dist/client/v2/file-placeholder/ai-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/audio-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/docx-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/eps-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/gif-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/jpeg-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/pdf-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/png-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/pptx-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/psd-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/svg-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/unknown-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/video-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/xlsx-200-200.png +0 -0
- package/dist/client/v2/file-placeholder/zip-200-200.png +0 -0
- package/dist/client/v2/global.css +63 -0
- package/dist/client/v2/index.html +12 -18
- package/dist/client/v2/nocobase.png +0 -0
- package/dist/client/v2/robots.txt +2 -0
- package/package.json +6 -6
- package/client-v2/src/plugins/AppInfoDemoPlugin.ts +0 -40
- package/client-v2/src/routes/DemoHomepageRoute.tsx +0 -28
- package/client-v2/src/routes/FlowSettingsComponentLoaderDemoRoute.tsx +0 -40
- package/client-v2/src/settings/DemoFlowSettingsLazyField.tsx +0 -14
- package/dist/client/p__index.ce72fd4e.async.js +0 -2738
- package/dist/client/umi.daa4a9d2.js +0 -63
- package/dist/client/v2/assets/2710-ddca03eb.js +0 -36
- package/dist/client/v2/assets/3475-d92f065a.js +0 -1
- package/dist/client/v2/assets/465-1cb2158a.js +0 -1
- package/dist/client/v2/assets/5366-53bf100a.js +0 -1
- package/dist/client/v2/assets/6269-1fd42a11.js +0 -1
- package/dist/client/v2/assets/6830-d23120a0.js +0 -1
- package/dist/client/v2/assets/7482-c3d402ea.js +0 -1
- package/dist/client/v2/assets/7928-c2116323.js +0 -1
- package/dist/client/v2/assets/9261-5b0e2178.js +0 -2
- package/dist/client/v2/assets/9836-65eadc90.js +0 -22
- package/dist/client/v2/assets/index-df3f23f2.js +0 -236
- package/dist/client/v2/assets/runtime-9ee03ea7.js +0 -1
- package/dist/client/v2/assets/vendor-antd-ecosystem-3072b8fa.js +0 -2
- package/dist/client/v2/assets/vendor-antd-icons-b7d99c50.js +0 -2
- /package/dist/client/v2/assets/{index-df3f23f2.js.LICENSE.txt → index-a2c43823.js.LICENSE.txt} +0 -0
- /package/dist/client/v2/assets/{vendor-antd-ecosystem-3072b8fa.js.LICENSE.txt → vendor-antd-ecosystem-1ffc870c.js.LICENSE.txt} +0 -0
- /package/dist/client/v2/assets/{vendor-antd-icons-b7d99c50.js.LICENSE.txt → vendor-antd-icons-db04cf76.js.LICENSE.txt} +0 -0
|
@@ -100,6 +100,13 @@
|
|
|
100
100
|
* Released under the MIT License.
|
|
101
101
|
*/
|
|
102
102
|
|
|
103
|
+
/*!
|
|
104
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
105
|
+
*
|
|
106
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
107
|
+
* Released under the MIT License.
|
|
108
|
+
*/
|
|
109
|
+
|
|
103
110
|
/*!
|
|
104
111
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
105
112
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __rspack_esm_id="6269";export const __rspack_esm_ids=["6269"];export const __webpack_modules__={96108(e,r,t){t.r(r),t.d(r,{JSColumnRunJSContext:()=>o});var n=t(29007);class o extends n.uk{}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 列 RunJS 上下文",properties:{element:"ElementProxy,表格单元格的安全 DOM 容器,支持 innerHTML/append 等",record:"当前行记录对象(只读)",recordIndex:"当前行索引(从 0 开始)",collection:"集合定义元数据(只读)",viewer:"视图控制器,可用于在单元格中触发抽屉/对话框/内嵌等交互",React:"React 库",antd:"Ant Design 库"},methods:{onRefReady:"等待单元格 DOM 就绪后执行回调。参数:(ref, callback, timeout?)",requireAsync:"按 URL 异步加载外部库:`const lib = await ctx.requireAsync(url)`",importAsync:"按 URL 动态导入 ESM 模块:`const mod = await ctx.importAsync(url)`"}},{locale:"zh-CN"})}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const __rspack_esm_id="6437";export const __rspack_esm_ids=["6437"];export const __webpack_modules__={32221(e,t,r){r.r(t),r.d(t,{JSItemRunJSContext:()=>n});var o=r(
|
|
1
|
+
export const __rspack_esm_id="6437";export const __rspack_esm_ids=["6437"];export const __webpack_modules__={32221(e,t,r){r.r(t),r.d(t,{JSItemRunJSContext:()=>n});var o=r(29007);class n extends o.uk{}n.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.`,formValues:{description:"Snapshot of current form values (object). Available in form contexts (CreateForm/EditForm).",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const __rspack_esm_id="6581";export const __rspack_esm_ids=["6581"];export const __webpack_modules__={64700(e,t,o){o.r(t),o.d(t,{JSCollectionActionRunJSContext:()=>n});var s=o(
|
|
1
|
+
export const __rspack_esm_id="6581";export const __rspack_esm_ids=["6581"];export const __webpack_modules__={64700(e,t,o){o.r(t),o.d(t,{JSCollectionActionRunJSContext:()=>n});var s=o(29007);class n extends s.uk{}n.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.`}}),n.define({label:"JS 集合动作 RunJS 上下文",properties:{resource:"列表资源(包含选中行/分页信息等)"}},{locale:"zh-CN"})},56100(e,t,o){o.r(t),o.d(t,{default:()=>s});let s={contexts:[o(64700).JSCollectionActionRunJSContext],prefix:"sn-act-export",label:"Export selected rows as JSON",description:"Download selected rows as a JSON file",locales:{"zh-CN":{label:"导出选中行为 JSON",description:"将选中的行导出为 JSON 文件下载"}},content:`
|
|
4
4
|
const rows = ctx.resource?.getSelectedRows?.() || [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const __rspack_esm_id="6738";export const __rspack_esm_ids=["6738"];export const __webpack_modules__={79271(e,t,r){r.r(t),r.d(t,{JSBlockRunJSContext:()=>a});var n=r(
|
|
1
|
+
export const __rspack_esm_id="6738";export const __rspack_esm_ids=["6738"];export const __webpack_modules__={79271(e,t,r){r.r(t),r.d(t,{JSBlockRunJSContext:()=>a});var n=r(29007);class a extends n.uk{}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
|
-
export const __rspack_esm_id="700";export const __rspack_esm_ids=["700"];export const __webpack_modules__={25831(e,t,o){o.r(t),o.d(t,{FormJSFieldItemRunJSContext:()=>a});var n=o(
|
|
1
|
+
export const __rspack_esm_id="700";export const __rspack_esm_ids=["700"];export const __webpack_modules__={25831(e,t,o){o.r(t),o.d(t,{FormJSFieldItemRunJSContext:()=>a});var n=o(29007);class a extends n.uk{}a.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.`,formValues:{description:"Snapshot of current form values (object). Available in form contexts (CreateForm/EditForm).",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},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" })`}}),a.define({label:"表单 JS 字段项 RunJS 上下文",properties:{element:"ElementProxy,表单字段容器",value:"字段值(展示模式为只读;受控场景用 setProps 修改)",record:"当前记录(只读)",formValues:{description:"当前表单值快照(对象)。仅表单相关上下文可用(Create/Edit Form)。",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},methods:{onRefReady:"容器就绪回调",setProps:"设置表单项属性:`setProps(fieldModel, { value })`(由联动/表单上下文提供)"}},{locale:"zh-CN"})},98542(e,t,o){o.r(t),o.d(t,{JSFieldRunJSContext:()=>a});var n=o(
|
|
6
|
+
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),a.define({label:"表单 JS 字段项 RunJS 上下文",properties:{element:"ElementProxy,表单字段容器",value:"字段值(展示模式为只读;受控场景用 setProps 修改)",record:"当前记录(只读)",formValues:{description:"当前表单值快照(对象)。仅表单相关上下文可用(Create/Edit Form)。",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},methods:{onRefReady:"容器就绪回调",setProps:"设置表单项属性:`setProps(fieldModel, { value })`(由联动/表单上下文提供)"}},{locale:"zh-CN"})},98542(e,t,o){o.r(t),o.d(t,{JSFieldRunJSContext:()=>a});var n=o(29007);class a extends n.uk{}a.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
|
-
export const __rspack_esm_id="7021";export const __rspack_esm_ids=["7021"];export const __webpack_modules__={25831(e,t,o){o.r(t),o.d(t,{FormJSFieldItemRunJSContext:()=>a});var n=o(
|
|
1
|
+
export const __rspack_esm_id="7021";export const __rspack_esm_ids=["7021"];export const __webpack_modules__={25831(e,t,o){o.r(t),o.d(t,{FormJSFieldItemRunJSContext:()=>a});var n=o(29007);class a extends n.uk{}a.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.`,formValues:{description:"Snapshot of current form values (object). Available in form contexts (CreateForm/EditForm).",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},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" })`}}),a.define({label:"表单 JS 字段项 RunJS 上下文",properties:{element:"ElementProxy,表单字段容器",value:"字段值(展示模式为只读;受控场景用 setProps 修改)",record:"当前记录(只读)",formValues:{description:"当前表单值快照(对象)。仅表单相关上下文可用(Create/Edit Form)。",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},methods:{onRefReady:"容器就绪回调",setProps:"设置表单项属性:`setProps(fieldModel, { value })`(由联动/表单上下文提供)"}},{locale:"zh-CN"})},98542(e,t,o){o.r(t),o.d(t,{JSFieldRunJSContext:()=>a});var n=o(
|
|
6
|
+
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),a.define({label:"表单 JS 字段项 RunJS 上下文",properties:{element:"ElementProxy,表单字段容器",value:"字段值(展示模式为只读;受控场景用 setProps 修改)",record:"当前记录(只读)",formValues:{description:"当前表单值快照(对象)。仅表单相关上下文可用(Create/Edit Form)。",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},methods:{onRefReady:"容器就绪回调",setProps:"设置表单项属性:`setProps(fieldModel, { value })`(由联动/表单上下文提供)"}},{locale:"zh-CN"})},98542(e,t,o){o.r(t),o.d(t,{JSFieldRunJSContext:()=>a});var n=o(29007);class a extends n.uk{}a.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
|
-
export const __rspack_esm_id="7201";export const __rspack_esm_ids=["7201"];export const __webpack_modules__={79271(e,t,n){n.r(t),n.d(t,{JSBlockRunJSContext:()=>o});var r=n(
|
|
1
|
+
export const __rspack_esm_id="7201";export const __rspack_esm_ids=["7201"];export const __webpack_modules__={79271(e,t,n){n.r(t),n.d(t,{JSBlockRunJSContext:()=>o});var r=n(29007);class o extends r.uk{}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
|
-
export const __rspack_esm_id="7959";export const __rspack_esm_ids=["7959"];export const __webpack_modules__={32221(e,t,r){r.r(t),r.d(t,{JSItemRunJSContext:()=>a});var o=r(
|
|
1
|
+
export const __rspack_esm_id="7959";export const __rspack_esm_ids=["7959"];export const __webpack_modules__={32221(e,t,r){r.r(t),r.d(t,{JSItemRunJSContext:()=>a});var o=r(29007);class a extends o.uk{}a.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.`,formValues:{description:"Snapshot of current form values (object). Available in form contexts (CreateForm/EditForm).",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},methods:{onRefReady:`Wait for form item container DOM element to be ready before executing callback.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const __rspack_esm_id="8138";export const __rspack_esm_ids=["8138"];export const __webpack_modules__={79271(e,t,a){a.r(t),a.d(t,{JSBlockRunJSContext:()=>n});var r=a(
|
|
1
|
+
export const __rspack_esm_id="8138";export const __rspack_esm_ids=["8138"];export const __webpack_modules__={79271(e,t,a){a.r(t),a.d(t,{JSBlockRunJSContext:()=>n});var r=a(29007);class n extends r.uk{}n.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
|
-
export const __rspack_esm_id="8262";export const __rspack_esm_ids=["8262"];export const __webpack_modules__={64700(e,o,t){t.r(o),t.d(o,{JSCollectionActionRunJSContext:()=>c});var s=t(
|
|
1
|
+
export const __rspack_esm_id="8262";export const __rspack_esm_ids=["8262"];export const __webpack_modules__={64700(e,o,t){t.r(o),t.d(o,{JSCollectionActionRunJSContext:()=>c});var s=t(29007);class c extends s.uk{}c.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.`}}),c.define({label:"JS 集合动作 RunJS 上下文",properties:{resource:"列表资源(包含选中行/分页信息等)"}},{locale:"zh-CN"})},86949(e,o,t){t.r(o),t.d(o,{default:()=>s});let s={contexts:[t(64700).JSCollectionActionRunJSContext],prefix:"sn-act-iterate",label:"Iterate selected rows",description:"Loop through selected rows and process each record",locales:{"zh-CN":{label:"遍历选中行",description:"遍历选中行并处理每条记录"}},content:`
|
|
4
4
|
const rows = ctx.resource?.getSelectedRows?.() || [];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const __rspack_esm_id="8434";export const __rspack_esm_ids=["8434"];export const __webpack_modules__={79271(e,t,n){n.r(t),n.d(t,{JSBlockRunJSContext:()=>i});var o=n(
|
|
1
|
+
export const __rspack_esm_id="8434";export const __rspack_esm_ids=["8434"];export const __webpack_modules__={79271(e,t,n){n.r(t),n.d(t,{JSBlockRunJSContext:()=>i});var o=n(29007);class i extends o.uk{}i.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
|
-
export const __rspack_esm_id="8438";export const __rspack_esm_ids=["8438"];export const __webpack_modules__={25831(e,t,o){o.r(t),o.d(t,{FormJSFieldItemRunJSContext:()=>n});var r=o(
|
|
1
|
+
export const __rspack_esm_id="8438";export const __rspack_esm_ids=["8438"];export const __webpack_modules__={25831(e,t,o){o.r(t),o.d(t,{FormJSFieldItemRunJSContext:()=>n});var r=o(29007);class n extends r.uk{}n.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.`,formValues:{description:"Snapshot of current form values (object). Available in form contexts (CreateForm/EditForm).",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},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" })`}}),n.define({label:"表单 JS 字段项 RunJS 上下文",properties:{element:"ElementProxy,表单字段容器",value:"字段值(展示模式为只读;受控场景用 setProps 修改)",record:"当前记录(只读)",formValues:{description:"当前表单值快照(对象)。仅表单相关上下文可用(Create/Edit Form)。",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},methods:{onRefReady:"容器就绪回调",setProps:"设置表单项属性:`setProps(fieldModel, { value })`(由联动/表单上下文提供)"}},{locale:"zh-CN"})},96108(e,t,o){o.r(t),o.d(t,{JSColumnRunJSContext:()=>n});var r=o(
|
|
6
|
+
Example: ctx.setProps(fieldModel, { value: "new value" })`}}),n.define({label:"表单 JS 字段项 RunJS 上下文",properties:{element:"ElementProxy,表单字段容器",value:"字段值(展示模式为只读;受控场景用 setProps 修改)",record:"当前记录(只读)",formValues:{description:"当前表单值快照(对象)。仅表单相关上下文可用(Create/Edit Form)。",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},methods:{onRefReady:"容器就绪回调",setProps:"设置表单项属性:`setProps(fieldModel, { value })`(由联动/表单上下文提供)"}},{locale:"zh-CN"})},96108(e,t,o){o.r(t),o.d(t,{JSColumnRunJSContext:()=>n});var r=o(29007);class n extends r.uk{}n.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)`"}}),n.define({label:"JS 列 RunJS 上下文",properties:{element:"ElementProxy,表格单元格的安全 DOM 容器,支持 innerHTML/append 等",record:"当前行记录对象(只读)",recordIndex:"当前行索引(从 0 开始)",collection:"集合定义元数据(只读)",viewer:"视图控制器,可用于在单元格中触发抽屉/对话框/内嵌等交互",React:"React 库",antd:"Ant Design 库"},methods:{onRefReady:"等待单元格 DOM 就绪后执行回调。参数:(ref, callback, timeout?)",requireAsync:"按 URL 异步加载外部库:`const lib = await ctx.requireAsync(url)`",importAsync:"按 URL 动态导入 ESM 模块:`const mod = await ctx.importAsync(url)`"}},{locale:"zh-CN"})},98542(e,t,o){o.r(t),o.d(t,{JSFieldRunJSContext:()=>n});var r=o(29007);class n extends r.uk{}n.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
|
-
export const __rspack_esm_id="8562";export const __rspack_esm_ids=["8562"];export const __webpack_modules__={79271(e,t,n){n.r(t),n.d(t,{JSBlockRunJSContext:()=>a});var r=n(
|
|
1
|
+
export const __rspack_esm_id="8562";export const __rspack_esm_ids=["8562"];export const __webpack_modules__={79271(e,t,n){n.r(t),n.d(t,{JSBlockRunJSContext:()=>a});var r=n(29007);class a extends r.uk{}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.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const __rspack_esm_id="9836";export const __rspack_esm_ids=["9836"];export const __webpack_modules__={96108(e,t,n){n.r(t),n.d(t,{JSColumnRunJSContext:()=>r});var o=n(29007);class r extends o.uk{}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 列 RunJS 上下文",properties:{element:"ElementProxy,表格单元格的安全 DOM 容器,支持 innerHTML/append 等",record:"当前行记录对象(只读)",recordIndex:"当前行索引(从 0 开始)",collection:"集合定义元数据(只读)",viewer:"视图控制器,可用于在单元格中触发抽屉/对话框/内嵌等交互",React:"React 库",antd:"Ant Design 库"},methods:{onRefReady:"等待单元格 DOM 就绪后执行回调。参数:(ref, callback, timeout?)",requireAsync:"按 URL 异步加载外部库:`const lib = await ctx.requireAsync(url)`",importAsync:"按 URL 动态导入 ESM 模块:`const mod = await ctx.importAsync(url)`"}},{locale:"zh-CN"})},72103(e,t,n){n.r(t),n.d(t,{default:()=>o});let o={contexts:[n(96108).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:"单元格对话框(显示行数据)",description:"在单元格渲染按钮,点击后通过 ctx.openView 打开弹窗并传入当前行上下文"}},content:`
|
|
2
|
+
// Render a button inside the cell
|
|
3
|
+
const button = document.createElement('button');
|
|
4
|
+
button.className = 'nb-cell-btn';
|
|
5
|
+
button.style.padding = '4px 8px';
|
|
6
|
+
button.textContent = ctx.t('View');
|
|
7
|
+
const popupUid = ctx.model.uid + '-1'; // popupUid should be stable and better bound to ctx.model.uid
|
|
8
|
+
const primaryKey = ctx.collection?.primaryKey || 'id';
|
|
9
|
+
|
|
10
|
+
button?.addEventListener('click', async () => {
|
|
11
|
+
await ctx.openView(popupUid, {
|
|
12
|
+
mode: 'dialog',
|
|
13
|
+
title: ctx.t('Row detail'),
|
|
14
|
+
params: {
|
|
15
|
+
filterByTk: ctx.record?.[primaryKey],
|
|
16
|
+
record: ctx.record,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
ctx.render(button);
|
|
22
|
+
`}}};
|