@nocobase/app 2.1.0-alpha.16 → 2.1.0-alpha.17
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-v2/src/.plugins/index.ts +14 -3
- package/client-v2/src/.plugins/packageMap.json +129 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_acl_allow.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_acl_middleware.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_action_group.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_block_custom_resource.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_block_filter_collection.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_block_timeline.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_collection_block.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_custom_details_block.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_custom_form_block.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_custom_table_block.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_custom_table_block_action_group.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_custom_table_block_field.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_custom_table_block_resource.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_data_block.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_field_simple.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_nested_action.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_nested_block.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_simple_action.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_simple_block.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_example_plugin_simple_popup_action.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_acl.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_action_bulk_edit.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_action_bulk_update.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_action_custom_request.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_action_duplicate.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_action_export.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_action_import.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_action_print.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_ai.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_ai_gigachat.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_api_doc.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_api_keys.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_async_task_manager.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_audit_logs.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_auth.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_auth_sms.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_backup_restore.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_block_grid_card.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_block_iframe.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_block_list.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_block_markdown.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_block_multi_step_form.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_block_template.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_block_tree.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_block_workbench.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_calendar.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_charts.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_client.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_collection_fdw.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_collection_sql.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_collection_tree.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_comments.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_custom_variables.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_data_source_main.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_data_source_manager.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_data_visualization.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_data_visualization_echarts.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_departments.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_disable_pm_add.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_embed.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_environment_variables.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_error_handler.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_field_attachment_url.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_field_china_region.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_field_code.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_field_formula.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_field_m2m_array.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_field_markdown_vditor.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_field_sequence.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_field_sort.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_file_manager.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_file_previewer_office.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_flow_engine.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_form_drafts.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_gantt.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_graph_collection_manager.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_hello.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_idp_oauth.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_kanban.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_license.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_locale_tester.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_localization.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_logger.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_map.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_mcp_server.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_mobile.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_mobile_client.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_mock_collections.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_multi_app_manager.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_multi_app_share_collection.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_multi_keyword_filter.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_notification_email.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_notification_in_app_message.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_notification_manager.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_notifications.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_public_forms.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_snapshot_field.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_system_settings.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_text_copy.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_theme_editor.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_ui_schema_storage.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_ui_templates.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_user_data_sync.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_users.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_verification.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_action_trigger.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_aggregate.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_cc.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_custom_action_trigger.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_date_calculation.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_delay.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_dynamic_calculation.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_javascript.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_json_query.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_json_variable_mapping.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_loop.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_mailer.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_manual.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_notification.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_parallel.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_request.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_request_interceptor.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_response_message.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_sql.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_test.ts +1 -0
- package/client-v2/src/.plugins/packages/nocobase_plugin_workflow_variable.ts +1 -0
- package/dist/client/assets/{index-8e933cba.js → index-27c2e9bc.js} +84 -84
- package/dist/client/assets/{vendor-misc-4fd76bfe.js → vendor-misc-5f2d5dc4.js} +6 -6
- package/dist/client/index.html +1 -1
- package/dist/client/index.html.tpl +1 -1
- package/package.json +7 -6
- package/dist/client/v2/assets/1020-0212416d.js +0 -2
- package/dist/client/v2/assets/1020-0212416d.js.LICENSE.txt +0 -7
- package/dist/client/v2/assets/1222-49e8dadb.css +0 -1
- package/dist/client/v2/assets/1222-c8810ac8.js +0 -2
- package/dist/client/v2/assets/1222-c8810ac8.js.LICENSE.txt +0 -9
- package/dist/client/v2/assets/1310-21e5c8a8.js +0 -59
- package/dist/client/v2/assets/1331-9092cf22.js +0 -1
- package/dist/client/v2/assets/1425-a2b446a6.js +0 -42
- package/dist/client/v2/assets/1507-a673a0c0.js +0 -7
- package/dist/client/v2/assets/158-6a033567.js +0 -23
- package/dist/client/v2/assets/1676-5db7433e.js +0 -9
- package/dist/client/v2/assets/1725-6f5b8d53.js +0 -83
- package/dist/client/v2/assets/1786-8969223a.js +0 -16
- package/dist/client/v2/assets/1951-f63bc4b3.js +0 -55
- package/dist/client/v2/assets/2017-b35f125d.js +0 -26
- package/dist/client/v2/assets/212-59d29e60.js +0 -18
- package/dist/client/v2/assets/2131-a150fed4.js +0 -1
- package/dist/client/v2/assets/22-9d12a303.js +0 -1
- package/dist/client/v2/assets/2203-9aa79271.js +0 -4
- package/dist/client/v2/assets/2335-1d33c3cf.js +0 -22
- package/dist/client/v2/assets/2555-dee484a1.js +0 -31
- package/dist/client/v2/assets/2702-8d5ab2a8.js +0 -5
- package/dist/client/v2/assets/2710-93d67bf0.js +0 -36
- package/dist/client/v2/assets/2726-f6cc5db9.js +0 -23
- package/dist/client/v2/assets/2861-48106fd8.js +0 -3
- package/dist/client/v2/assets/2898-2a7d5793.js +0 -17
- package/dist/client/v2/assets/2958-5a85effa.js +0 -27
- package/dist/client/v2/assets/3018-fc630932.js +0 -3
- package/dist/client/v2/assets/3117-3d38bb4d.js +0 -33
- package/dist/client/v2/assets/3279-1f24fe26.js +0 -1
- package/dist/client/v2/assets/338-2f192edd.js +0 -3
- package/dist/client/v2/assets/3475-c42974e1.js +0 -1
- package/dist/client/v2/assets/3660-27f9c6c5.js +0 -6
- package/dist/client/v2/assets/3662-135bbea1.js +0 -28
- package/dist/client/v2/assets/3690-4a8bdf43.js +0 -12
- package/dist/client/v2/assets/3727-b74fc29b.js +0 -44
- package/dist/client/v2/assets/3916-ba5b43b5.js +0 -6
- package/dist/client/v2/assets/3937-af967d62.js +0 -3
- package/dist/client/v2/assets/3989-e72345bb.js +0 -27
- package/dist/client/v2/assets/4222-29a8147d.js +0 -5
- package/dist/client/v2/assets/4313-9687f912.js +0 -28
- package/dist/client/v2/assets/5064-93d8e29e.js +0 -10
- package/dist/client/v2/assets/5501-a3b5b97f.js +0 -17
- package/dist/client/v2/assets/5721-f00ddbf2.js +0 -18
- package/dist/client/v2/assets/5759-d5b1d946.js +0 -47
- package/dist/client/v2/assets/5761-8ab1974d.js +0 -28
- package/dist/client/v2/assets/6064-1517304e.js +0 -2
- package/dist/client/v2/assets/6064-1517304e.js.LICENSE.txt +0 -236
- package/dist/client/v2/assets/6269-35e90156.js +0 -1
- package/dist/client/v2/assets/6373-9d047c6b.js +0 -13
- package/dist/client/v2/assets/6437-2f91d29a.js +0 -12
- package/dist/client/v2/assets/6581-51c928bf.js +0 -21
- package/dist/client/v2/assets/6738-eb09fa59.js +0 -20
- package/dist/client/v2/assets/700-5f166286.js +0 -15
- package/dist/client/v2/assets/7021-01608dc5.js +0 -45
- package/dist/client/v2/assets/7201-8e6e91a3.js +0 -14
- package/dist/client/v2/assets/7211-b8c71ed2.js +0 -9
- package/dist/client/v2/assets/7492-5c593f52.js +0 -5
- package/dist/client/v2/assets/754-41b763b9.js +0 -17
- package/dist/client/v2/assets/7761-637067c6.js +0 -123
- package/dist/client/v2/assets/7876-673cbc3c.js +0 -6
- package/dist/client/v2/assets/7946-09b77e08.js +0 -13
- package/dist/client/v2/assets/7959-ab57fce2.js +0 -40
- package/dist/client/v2/assets/8138-704104a5.js +0 -24
- package/dist/client/v2/assets/8262-7a324b59.js +0 -9
- package/dist/client/v2/assets/8434-79232eec.js +0 -25
- package/dist/client/v2/assets/8438-9d210970.js +0 -37
- package/dist/client/v2/assets/8562-215edc37.js +0 -17
- package/dist/client/v2/assets/9811-52d18c3d.js +0 -1
- package/dist/client/v2/assets/9827-d1f02095.js +0 -9
- package/dist/client/v2/assets/9836-288424d8.js +0 -22
- package/dist/client/v2/assets/index-e2c0ebd2.js +0 -261
- package/dist/client/v2/assets/index-e2c0ebd2.js.LICENSE.txt +0 -1
- package/dist/client/v2/assets/runtime-6f58b646.js +0 -1
- package/dist/client/v2/assets/vendor-antd-05d1c710.js +0 -451
- package/dist/client/v2/assets/vendor-antd-ecosystem-1ffc870c.js +0 -2
- package/dist/client/v2/assets/vendor-antd-ecosystem-1ffc870c.js.LICENSE.txt +0 -1
- package/dist/client/v2/assets/vendor-antd-icons-db04cf76.js +0 -2
- package/dist/client/v2/assets/vendor-antd-icons-db04cf76.js.LICENSE.txt +0 -1621
- package/dist/client/v2/assets/vendor-lodash-831bd1b8.js +0 -2
- package/dist/client/v2/assets/vendor-lodash-831bd1b8.js.LICENSE.txt +0 -8
- package/dist/client/v2/assets/vendor-moment-84b317dc.js +0 -2
- package/dist/client/v2/assets/vendor-moment-84b317dc.js.LICENSE.txt +0 -631
- package/dist/client/v2/assets/vendor-ses-b7bccbcd.js +0 -23
- package/dist/client/v2/browser-checker.js +0 -186
- 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 +0 -63
- package/dist/client/v2/index.html +0 -19
- package/dist/client/v2/nocobase.png +0 -0
- package/dist/client/v2/robots.txt +0 -2
- /package/dist/client/assets/{index-8e933cba.js.LICENSE.txt → index-27c2e9bc.js.LICENSE.txt} +0 -0
- /package/dist/client/assets/{vendor-misc-4fd76bfe.js.LICENSE.txt → vendor-misc-5f2d5dc4.js.LICENSE.txt} +0 -0
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
4
|
-
http://jedwatson.github.io/classnames
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
* Determine if an object is a Buffer
|
|
9
|
-
*
|
|
10
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
11
|
-
* @license MIT
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/*!
|
|
15
|
-
* MIT License
|
|
16
|
-
*
|
|
17
|
-
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
18
|
-
*
|
|
19
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
20
|
-
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
|
21
|
-
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
22
|
-
* persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
23
|
-
*
|
|
24
|
-
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
|
25
|
-
* Software.
|
|
26
|
-
*
|
|
27
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
|
28
|
-
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
29
|
-
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
30
|
-
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
/*!
|
|
34
|
-
* The buffer module from node.js, for the browser.
|
|
35
|
-
*
|
|
36
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
37
|
-
* @license MIT
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/*!
|
|
41
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
44
|
-
* Licensed under the MIT License.
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
/*!
|
|
48
|
-
* get-object <https://github.com/jonschlinkert/get-object>
|
|
49
|
-
*
|
|
50
|
-
* Copyright (c) 2014 Jon Schlinkert, contributors.
|
|
51
|
-
* Licensed under the MIT License
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
/*!
|
|
55
|
-
* get-value <https://github.com/jonschlinkert/get-value>
|
|
56
|
-
*
|
|
57
|
-
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
58
|
-
* Released under the MIT License.
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
/*!
|
|
62
|
-
* handlebars-helpers <https://github.com/helpers/handlebars-helpers>
|
|
63
|
-
*
|
|
64
|
-
* Copyright (c) 2013-2017, Jon Schlinkert, Brian Woodward.
|
|
65
|
-
* Released under the MIT License.
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
/*!
|
|
69
|
-
* has-value <https://github.com/jonschlinkert/has-value>
|
|
70
|
-
*
|
|
71
|
-
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
72
|
-
* Released under the MIT License.
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
/*!
|
|
76
|
-
* has-values <https://github.com/jonschlinkert/has-values>
|
|
77
|
-
*
|
|
78
|
-
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
79
|
-
* Released under the MIT License.
|
|
80
|
-
*/
|
|
81
|
-
|
|
82
|
-
/*!
|
|
83
|
-
* html-tag <https://github.com/jonschlinkert/html-tag>
|
|
84
|
-
*
|
|
85
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
86
|
-
* Released under the MIT License.
|
|
87
|
-
*/
|
|
88
|
-
|
|
89
|
-
/*!
|
|
90
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
91
|
-
*
|
|
92
|
-
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
93
|
-
* Licensed under the MIT License.
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
/*!
|
|
97
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
98
|
-
*
|
|
99
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
100
|
-
* Released under the MIT License.
|
|
101
|
-
*/
|
|
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
|
-
|
|
110
|
-
/*!
|
|
111
|
-
* isobject <https://github.com/jonschlinkert/isobject>
|
|
112
|
-
*
|
|
113
|
-
* Copyright (c) 2014-2015, Jon Schlinkert.
|
|
114
|
-
* Licensed under the MIT License.
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
/*!
|
|
118
|
-
* isobject <https://github.com/jonschlinkert/isobject>
|
|
119
|
-
*
|
|
120
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
121
|
-
* Released under the MIT License.
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
/*!
|
|
125
|
-
* to-gfm-code-block <https://github.com/jonschlinkert/to-gfm-code-block>
|
|
126
|
-
*
|
|
127
|
-
* Copyright (c) 2015, Jon Schlinkert.
|
|
128
|
-
* Licensed under the MIT License.
|
|
129
|
-
*/
|
|
130
|
-
|
|
131
|
-
/*!
|
|
132
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
133
|
-
*
|
|
134
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
135
|
-
* Released under the MIT License.
|
|
136
|
-
*/
|
|
137
|
-
|
|
138
|
-
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
|
139
|
-
|
|
140
|
-
/*! https://mths.be/punycode v1.4.1 by @mathias */
|
|
141
|
-
|
|
142
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
143
|
-
|
|
144
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* @license React
|
|
148
|
-
* react-dom.production.min.js
|
|
149
|
-
*
|
|
150
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
151
|
-
*
|
|
152
|
-
* This source code is licensed under the MIT license found in the
|
|
153
|
-
* LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* @license React
|
|
158
|
-
* react-is.production.min.js
|
|
159
|
-
*
|
|
160
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
161
|
-
*
|
|
162
|
-
* This source code is licensed under the MIT license found in the
|
|
163
|
-
* LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* @license React
|
|
168
|
-
* react-jsx-runtime.production.min.js
|
|
169
|
-
*
|
|
170
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the MIT license found in the
|
|
173
|
-
* LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* @license React
|
|
178
|
-
* react.production.min.js
|
|
179
|
-
*
|
|
180
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
181
|
-
*
|
|
182
|
-
* This source code is licensed under the MIT license found in the
|
|
183
|
-
* LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* @license React
|
|
188
|
-
* scheduler.production.min.js
|
|
189
|
-
*
|
|
190
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
191
|
-
*
|
|
192
|
-
* This source code is licensed under the MIT license found in the
|
|
193
|
-
* LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* @remix-run/router v1.23.0
|
|
198
|
-
*
|
|
199
|
-
* Copyright (c) Remix Software Inc.
|
|
200
|
-
*
|
|
201
|
-
* This source code is licensed under the MIT license found in the
|
|
202
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
203
|
-
*
|
|
204
|
-
* @license MIT
|
|
205
|
-
*/
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* React Router DOM v6.30.1
|
|
209
|
-
*
|
|
210
|
-
* Copyright (c) Remix Software Inc.
|
|
211
|
-
*
|
|
212
|
-
* This source code is licensed under the MIT license found in the
|
|
213
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
214
|
-
*
|
|
215
|
-
* @license MIT
|
|
216
|
-
*/
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* React Router v6.30.1
|
|
220
|
-
*
|
|
221
|
-
* Copyright (c) Remix Software Inc.
|
|
222
|
-
*
|
|
223
|
-
* This source code is licensed under the MIT license found in the
|
|
224
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
225
|
-
*
|
|
226
|
-
* @license MIT
|
|
227
|
-
*/
|
|
228
|
-
|
|
229
|
-
/** @license React v16.13.1
|
|
230
|
-
* react-is.production.min.js
|
|
231
|
-
*
|
|
232
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the MIT license found in the
|
|
235
|
-
* LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
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,13 +0,0 @@
|
|
|
1
|
-
export const __rspack_esm_id="6373";export const __rspack_esm_ids=["6373"];export const __webpack_modules__={25716(e,t,n){n.r(t),n.d(t,{default:()=>o});let o={contexts:["*"],prefix:"sn-import",label:"Import ESM module",description:"Dynamically import an ESM module by URL",locales:{"zh-CN":{label:"导入 ESM 模块",description:"按 URL 动态导入 ESM 模块"}},content:`
|
|
2
|
-
// Import an ESM module by URL
|
|
3
|
-
// Works in yarn dev and yarn start
|
|
4
|
-
const mod = await ctx.importAsync('lit-html@2');
|
|
5
|
-
const { html, render } = mod;
|
|
6
|
-
|
|
7
|
-
const container = document.createElement('div');
|
|
8
|
-
container.style.padding = '8px';
|
|
9
|
-
container.style.border = '1px dashed #999';
|
|
10
|
-
ctx.render(container);
|
|
11
|
-
|
|
12
|
-
render(html\`<span style="color:#52c41a;">lit-html loaded and rendered</span>\`, container);
|
|
13
|
-
`}}};
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
Supports innerHTML, append, and other DOM manipulation methods.`,resource:`Current resource instance (read-only).
|
|
3
|
-
Provides access to the data resource associated with the current form context.`,record:`Current record data object (read-only).
|
|
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.
|
|
5
|
-
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`}}),n.define({label:"JS 表单项 RunJS 上下文",properties:{element:"ElementProxy,表单项渲染容器,支持 innerHTML/append 等 DOM 操作",resource:"当前资源(只读)",record:"当前记录(只读)",formValues:{description:"当前表单值快照(对象)。仅表单相关上下文可用(Create/Edit Form)。",detail:"Record<string, any>",examples:["const { name, status } = ctx.formValues || {};"]}},methods:{onRefReady:"容器就绪后执行回调。参数:(ref, callback, timeout?)"}},{locale:"zh-CN"})},29924(e,t,r){r.r(t),r.d(t,{default:()=>o});let o={contexts:[r(32221).JSItemRunJSContext],prefix:"sn-jsitem-basic",label:"Render form item",description:"Render custom content inside a form item container",locales:{"zh-CN":{label:"渲染表单项",description:"在表单项容器中渲染自定义内容"}},content:`
|
|
6
|
-
ctx.render(\`
|
|
7
|
-
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6;">
|
|
8
|
-
<h3 style="color: #1890ff; margin: 0 0 12px 0; font-size: 18px; font-weight: 600;">\${ctx.t('JS Item')}</h3>
|
|
9
|
-
<div style="color:#555">\${ctx.t('This area is rendered by your JavaScript code.')}</div>
|
|
10
|
-
</div>
|
|
11
|
-
\`);
|
|
12
|
-
`}}};
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
Use ctx.resource.selectedRows to get selected records.
|
|
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
|
-
const rows = ctx.resource?.getSelectedRows?.() || [];
|
|
5
|
-
if (!rows.length) {
|
|
6
|
-
ctx.message.warning(ctx.t('Please select at least one row'));
|
|
7
|
-
return;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// Create JSON file and download
|
|
11
|
-
const jsonStr = JSON.stringify(rows, null, 2);
|
|
12
|
-
const blob = new Blob([jsonStr], { type: 'application/json' });
|
|
13
|
-
const url = URL.createObjectURL(blob);
|
|
14
|
-
const link = document.createElement('a');
|
|
15
|
-
link.href = url;
|
|
16
|
-
link.download = \`export-\${new Date().toISOString().split('T')[0]}.json\`;
|
|
17
|
-
link.click();
|
|
18
|
-
URL.revokeObjectURL(url);
|
|
19
|
-
|
|
20
|
-
ctx.message.success(ctx.t('Exported {{count}} records', { count: rows.length }));
|
|
21
|
-
`}}};
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
Supports innerHTML, append, and other DOM manipulation methods.
|
|
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
|
-
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.
|
|
5
|
-
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void
|
|
6
|
-
Example: ctx.onRefReady(ctx.ref, (el) => { el.innerHTML = "Ready!" })`,requireAsync:"Load external library: `const lib = await ctx.requireAsync(url)`",importAsync:"Dynamically import an ESM module by URL: `const mod = await ctx.importAsync(url)`.\nNote: if the module has only a default export, ctx.importAsync returns that default value directly (no `.default`)."}}),a.define({label:"RunJS 上下文",properties:{element:{description:"ElementProxy,安全的 DOM 容器,支持 innerHTML/append 等",detail:"ElementProxy",properties:{innerHTML:"读取或设置容器的 HTML 内容"}},record:"当前记录(只读,用于数据区块/详情等场景)",value:"当前值(若存在)",React:"React 库",antd:"Ant Design 库"},methods:{onRefReady:"容器 ref 就绪回调:\n```js\nctx.onRefReady(ctx.ref, el => { /* ... */ })\n```",requireAsync:"加载外部库:`const lib = await ctx.requireAsync(url)`",importAsync:"按 URL 动态导入 ESM 模块:`const mod = await ctx.importAsync(url)`。\n注意:当模块只有 default 一个导出时,ctx.importAsync 会直接返回 default 值(无需再写 `.default`)。"}},{locale:"zh-CN"})},25481(e,t,r){r.r(t),r.d(t,{default:()=>n});let n={contexts:[r(79271).JSBlockRunJSContext],prefix:"sn-resource-example",label:"Resource example",description:"Create a resource via ctx.makeResource and render JSON output",locales:{"zh-CN":{label:"资源示例",description:"使用 ctx.initResource 加载数据并渲染 JSON 输出"}},content:`
|
|
7
|
-
// Create a resource and load a single record
|
|
8
|
-
const resource = ctx.makeResource('SingleRecordResource');
|
|
9
|
-
resource.setDataSourceKey('main');
|
|
10
|
-
resource.setResourceName('users');
|
|
11
|
-
// Optionally set filterByTk to target a specific record:
|
|
12
|
-
// resource.setRequestOptions('params', { filterByTk: 1 });
|
|
13
|
-
await resource.refresh();
|
|
14
|
-
|
|
15
|
-
ctx.render(\`
|
|
16
|
-
<pre style="padding: 12px; background: #f5f5f5; border-radius: 6px;">
|
|
17
|
-
\${JSON.stringify(resource.getData(), null, 2)}
|
|
18
|
-
</pre>
|
|
19
|
-
\`);
|
|
20
|
-
`}}};
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
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
|
-
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
|
-
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`,setProps:`Set form field properties programmatically.
|
|
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(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
|
-
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
8
|
-
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
9
|
-
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
10
|
-
Provides schema information about the collection this field belongs to.`},methods:{onRefReady:`Wait for field container DOM element to be ready before executing callback.
|
|
11
|
-
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void
|
|
12
|
-
Example: ctx.onRefReady(ctx.ref, (el) => { el.innerHTML = ctx.value })`}}),a.define({label:"JS 字段 RunJS 上下文",properties:{element:"ElementProxy,字段渲染容器,支持 innerHTML/append 等 DOM 操作",value:"字段当前值(只读)",record:"当前记录对象(只读,包含父记录全部字段值)",collection:"集合定义元数据(只读,描述字段所属集合的 Schema)"},methods:{onRefReady:"在字段容器 DOM 就绪后执行回调。参数:(ref, callback, timeout?);示例:ctx.onRefReady(ctx.ref, el => { el.innerHTML = ctx.value })"}},{locale:"zh-CN"})},99287(e,t,o){o.r(t),o.d(t,{default:()=>l});var n=o(98542),a=o(25831);let l={contexts:[n.JSFieldRunJSContext,a.FormJSFieldItemRunJSContext],prefix:"sn-jsf-value",label:"Display text field as highlighted text",description:"Render the current text field value with simple highlight styling",locales:{"zh-CN":{label:"将文本字段显示为高亮文本",description:"将字段值写入容器并添加高亮样式"}},content:`
|
|
13
|
-
const v = String(ctx.value ?? '');
|
|
14
|
-
ctx.render(\`<span class="nb-js-field-value" style="color:#1890ff;font-weight:600">\${v}</span>\`);
|
|
15
|
-
`}}};
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
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
|
-
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
|
-
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void`,setProps:`Set form field properties programmatically.
|
|
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(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
|
-
Supports innerHTML, append, and other DOM manipulation methods.`,value:`Current value of the field (read-only).
|
|
8
|
-
Contains the data value stored in this field.`,record:`Current record data object (read-only).
|
|
9
|
-
Contains all field values of the parent record.`,collection:`Collection definition metadata (read-only).
|
|
10
|
-
Provides schema information about the collection this field belongs to.`},methods:{onRefReady:`Wait for field container DOM element to be ready before executing callback.
|
|
11
|
-
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void
|
|
12
|
-
Example: ctx.onRefReady(ctx.ref, (el) => { el.innerHTML = ctx.value })`}}),a.define({label:"JS 字段 RunJS 上下文",properties:{element:"ElementProxy,字段渲染容器,支持 innerHTML/append 等 DOM 操作",value:"字段当前值(只读)",record:"当前记录对象(只读,包含父记录全部字段值)",collection:"集合定义元数据(只读,描述字段所属集合的 Schema)"},methods:{onRefReady:"在字段容器 DOM 就绪后执行回调。参数:(ref, callback, timeout?);示例:ctx.onRefReady(ctx.ref, el => { el.innerHTML = ctx.value })"}},{locale:"zh-CN"})},37420(e,t,o){o.r(t),o.d(t,{default:()=>r});var n=o(98542),a=o(25831);let r={contexts:[n.JSFieldRunJSContext,a.FormJSFieldItemRunJSContext],prefix:"sn-jsf-relative-time",label:"Display date field as relative time",description:"Render date values as “3 days ago”, “just now”, etc.",locales:{"zh-CN":{label:"将日期字段显示为相对时间",description:"将日期显示为“3天前”、“刚刚”等相对时间"}},content:`
|
|
13
|
-
const formatRelativeTime = (date) => {
|
|
14
|
-
const now = new Date();
|
|
15
|
-
const diff = now - new Date(date);
|
|
16
|
-
const seconds = Math.floor(diff / 1000);
|
|
17
|
-
const minutes = Math.floor(seconds / 60);
|
|
18
|
-
const hours = Math.floor(minutes / 60);
|
|
19
|
-
const days = Math.floor(hours / 24);
|
|
20
|
-
const months = Math.floor(days / 30);
|
|
21
|
-
const years = Math.floor(days / 365);
|
|
22
|
-
|
|
23
|
-
if (seconds < 60) return ctx.t('just now');
|
|
24
|
-
if (minutes < 60) return ctx.t('{{count}} minutes ago', { count: minutes });
|
|
25
|
-
if (hours < 24) return ctx.t('{{count}} hours ago', { count: hours });
|
|
26
|
-
if (days < 30) return ctx.t('{{count}} days ago', { count: days });
|
|
27
|
-
if (months < 12) return ctx.t('{{count}} months ago', { count: months });
|
|
28
|
-
return ctx.t('{{count}} years ago', { count: years });
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const dateStr = ctx.value;
|
|
32
|
-
if (!dateStr) {
|
|
33
|
-
ctx.render('-');
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const relativeTime = formatRelativeTime(dateStr);
|
|
38
|
-
const fullDate = new Date(dateStr).toLocaleString();
|
|
39
|
-
|
|
40
|
-
ctx.render(\`
|
|
41
|
-
<span title="\${fullDate}" style="cursor: help; color: #666;">
|
|
42
|
-
\${relativeTime}
|
|
43
|
-
</span>
|
|
44
|
-
\`);
|
|
45
|
-
`}}};
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
-
Supports innerHTML, append, and other DOM manipulation methods.
|
|
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
|
-
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.
|
|
5
|
-
Parameters: (ref: React.RefObject, callback: (element: HTMLElement) => void, timeout?: number) => void
|
|
6
|
-
Example: ctx.onRefReady(ctx.ref, (el) => { el.innerHTML = "Ready!" })`,requireAsync:"Load external library: `const lib = await ctx.requireAsync(url)`",importAsync:"Dynamically import an ESM module by URL: `const mod = await ctx.importAsync(url)`.\nNote: if the module has only a default export, ctx.importAsync returns that default value directly (no `.default`)."}}),o.define({label:"RunJS 上下文",properties:{element:{description:"ElementProxy,安全的 DOM 容器,支持 innerHTML/append 等",detail:"ElementProxy",properties:{innerHTML:"读取或设置容器的 HTML 内容"}},record:"当前记录(只读,用于数据区块/详情等场景)",value:"当前值(若存在)",React:"React 库",antd:"Ant Design 库"},methods:{onRefReady:"容器 ref 就绪回调:\n```js\nctx.onRefReady(ctx.ref, el => { /* ... */ })\n```",requireAsync:"加载外部库:`const lib = await ctx.requireAsync(url)`",importAsync:"按 URL 动态导入 ESM 模块:`const mod = await ctx.importAsync(url)`。\n注意:当模块只有 default 一个导出时,ctx.importAsync 会直接返回 default 值(无需再写 `.default`)。"}},{locale:"zh-CN"})},93512(e,t,n){n.r(t),n.d(t,{default:()=>r});let r={contexts:[n(79271).JSBlockRunJSContext],prefix:"sn-jsb-button",label:"Render button handler",description:"Render a button and handle click events inside the block",locales:{"zh-CN":{label:"按钮事件处理",description:"在区块中渲染按钮并绑定点击处理逻辑"}},content:`
|
|
7
|
-
const { Button } = ctx.libs.antd;
|
|
8
|
-
|
|
9
|
-
ctx.render(
|
|
10
|
-
<Button type="primary" onClick={() => ctx.message.success(ctx.t('Clicked!'))}>
|
|
11
|
-
{ctx.t('Button')}
|
|
12
|
-
</Button>
|
|
13
|
-
);
|
|
14
|
-
`}}};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const __rspack_esm_id="7211";export const __rspack_esm_ids=["7211"];export const __webpack_modules__={29846(e,o,t){t.r(o),t.d(o,{default:()=>i});let i={contexts:["*"],versions:["*"],prefix:"sn-open-dialog",label:"Open view (dialog)",description:"Open a view in dialog via ctx.openView",locales:{"zh-CN":{label:"打开视图(对话框)",description:"通过 ctx.openView 以对话框方式打开视图"}},content:`
|
|
2
|
-
// Open a view as dialog and pass arguments at top-level
|
|
3
|
-
const popupUid = ctx.model.uid + '-1'; // popupUid should be stable and better bound to ctx.model.uid
|
|
4
|
-
await ctx.openView(popupUid, {
|
|
5
|
-
mode: 'dialog',
|
|
6
|
-
title: ctx.t('Sample dialog'),
|
|
7
|
-
size: 'medium',
|
|
8
|
-
});
|
|
9
|
-
`}}};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const __rspack_esm_id="7492";export const __rspack_esm_ids=["7492"];export const __webpack_modules__={40959(e,t,s){s.r(t),s.d(t,{default:()=>o});let o={contexts:["*"],scenes:["detailFieldEvent","formFieldEvent"],prefix:"sn-item-style",label:"Set form item/details item style",description:"Customize form item and details item container styles",locales:{"zh-CN":{label:"设置表单项/详情项样式",description:"自定义表单项和详情项容器样式"}},content:`
|
|
2
|
-
ctx.model.props.style = {
|
|
3
|
-
background: 'red',
|
|
4
|
-
};
|
|
5
|
-
`}}};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const __rspack_esm_id="754";export const __rspack_esm_ids=["754"];export const __webpack_modules__={38937(t,e,o){o.r(e),o.d(e,{default:()=>a});let a={contexts:["*"],prefix:"sn-clipboard-copy",label:"Copy text to clipboard (function)",description:"A reusable function that copies a given string to the clipboard.",locales:{"zh-CN":{label:"复制文本到剪贴板(函数)",description:"通用函数:接受一个字符串参数并复制到剪贴板。"}},content:`
|
|
2
|
-
// A general utility function that copies text to clipboard.
|
|
3
|
-
// Usage:
|
|
4
|
-
// const ok = await copyTextToClipboard('Hello');
|
|
5
|
-
// if (ok) { /* success */ } else { /* handle failure */ }
|
|
6
|
-
async function copyTextToClipboard(text) {
|
|
7
|
-
const s = String(text ?? '');
|
|
8
|
-
try {
|
|
9
|
-
if (navigator?.clipboard?.writeText) {
|
|
10
|
-
await navigator.clipboard.writeText(s);
|
|
11
|
-
return true;
|
|
12
|
-
}
|
|
13
|
-
} catch (_) {
|
|
14
|
-
// Fallback below
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
`}}};
|