@kne/form-creator 0.1.29 → 0.1.31
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/README.md +623 -0
- package/dist/index.css +348 -13
- package/dist/index.css.map +1 -1
- package/dist/index.js +566 -61
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +568 -62
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createContext, useContext, useRef, useCallback, useEffect, useState, us
|
|
|
5
5
|
import { Button, Input as Input$1, Space, Tag, Tooltip, Typography, Flex, Dropdown, Empty, message, Checkbox as Checkbox$1, InputNumber as InputNumber$1, Card, Switch as Switch$1, Radio, Select as Select$1 } from 'antd';
|
|
6
6
|
import { createWithIntlProvider, useIntl } from '@kne/react-intl';
|
|
7
7
|
import { useIsMobile, RESPONSIVE_BOUNDARY_CLASS } from '@kne/responsive-utils';
|
|
8
|
-
import { FormOutlined, FontSizeOutlined, AlignLeftOutlined, NumberOutlined, DownSquareOutlined, CheckCircleOutlined, CheckSquareOutlined, AppstoreOutlined, ApartmentOutlined, ShopOutlined, EnvironmentOutlined, SwapOutlined, CalendarOutlined, HolderOutlined, LockOutlined, EyeInvisibleOutlined, BranchesOutlined, WarningOutlined, ColumnWidthOutlined, ArrowUpOutlined, ArrowDownOutlined, EditOutlined, DeleteOutlined, PlusOutlined, SettingOutlined, RightOutlined, UnorderedListOutlined, TableOutlined, ProfileOutlined, ClusterOutlined, PartitionOutlined, BorderOuterOutlined, OrderedListOutlined, SelectOutlined, ArrowLeftOutlined, ArrowRightOutlined, QuestionCircleOutlined } from '@ant-design/icons';
|
|
8
|
+
import { FormOutlined, FontSizeOutlined, AlignLeftOutlined, NumberOutlined, DownSquareOutlined, CheckCircleOutlined, CheckSquareOutlined, AppstoreOutlined, ApartmentOutlined, ShopOutlined, EnvironmentOutlined, SwapOutlined, CalendarOutlined, HolderOutlined, LockOutlined, EyeInvisibleOutlined, BranchesOutlined, WarningOutlined, ColumnWidthOutlined, ArrowUpOutlined, ArrowDownOutlined, EditOutlined, DeleteOutlined, PlusOutlined, SettingOutlined, RightOutlined, UnorderedListOutlined, TableOutlined, ProfileOutlined, ClusterOutlined, PartitionOutlined, BorderOuterOutlined, OrderedListOutlined, SelectOutlined, ArrowLeftOutlined, ArrowRightOutlined, QuestionCircleOutlined, CheckOutlined } from '@ant-design/icons';
|
|
9
9
|
import { hooks, Input, TextArea, InputNumber, Select, RadioGroup, CheckboxGroup, RadioGroupOther, CheckboxGroupOther, Switch, Checkbox, DatePicker, useFormContext, Slider, RULES, SubmitButton, ResetButton, CancelButton, preset as preset$1 } from '@kne/react-form-antd';
|
|
10
10
|
import SelectList, { SelectTableList, SelectTree, SelectCascader } from '@kne/super-select';
|
|
11
11
|
import { SelectFunction, SelectIndustry, SelectAddress } from '@kne/super-select-plus';
|
|
@@ -18,7 +18,7 @@ import FormInfo, { FormModal, Steps, validateFieldsByName, Form, MatrixScale, Mu
|
|
|
18
18
|
import InfoPage from '@kne/info-page';
|
|
19
19
|
import { createWithRemoteLoader } from '@kne/remote-loader';
|
|
20
20
|
|
|
21
|
-
var style = {"kne-responsive-boundary":"kne-form-creator_gh14z","kne-responsive-scroll":"kne-form-creator_Kfn6L","option-group-stack":"kne-form-creator_TgBT-","form-info-show-index":"kne-form-creator_rqCos","field-label-index":"kne-form-creator_MLY0O","field-label-main":"kne-form-creator_UOUb4","form-creator":"kne-form-creator_Xrjrk","editor-pane":"kne-form-creator_Skfuv","preview-pane":"kne-form-creator_v4Lsp","editor-header":"kne-form-creator_WaSS-","block-list-panel":"kne-form-creator_lx8An","form-actions-setting-btn":"kne-form-creator_NekU2","panel-toolbar":"kne-form-creator_t0WxZ","panel-toolbar-extra":"kne-form-creator_O22ZM","schema-content":"kne-form-creator_9bWOD","schema-content-fields":"kne-form-creator_EmRDV","schema-content-field":"kne-form-creator_0Lanz","schema-content-field-block":"kne-form-creator_TQd-w","schema-content-field-label":"kne-form-creator_czEK3","schema-content-field-value":"kne-form-creator_YFKTK","schema-content-file-list":"kne-form-creator_UGdXA","schema-content-file":"kne-form-creator_75EtE","schema-content-file-image":"kne-form-creator_P-be6","schema-content-file-name":"kne-form-creator_NXpTS","add-block-btn":"kne-form-creator_16Zre","add-inline-btn":"kne-form-creator_iCYdB","ant-btn-disabled":"kne-form-creator_LdGtv","block-list":"kne-form-creator_wK5eK","block-section":"kne-form-creator_15IiK","block-kind-formInfo":"kne-form-creator_D0hoK","block-kind-list":"kne-form-creator_JdPhy","block-kind-tableList":"kne-form-creator_gzd64","block-kind-editableList":"kne-form-creator_JzwrQ","block-kind-multiField":"kne-form-creator_t0iOJ","block-kind-matrixScale":"kne-form-creator_CFlQv","matrix-scale-editor-title":"kne-form-creator_Zo1Rz","block-kind-steps":"kne-form-creator_QNF9W","step-section":"kne-form-creator_22ajp","block-section-header":"kne-form-creator_wS4rL","block-header-meta":"kne-form-creator_PQiYV","block-title":"kne-form-creator_wSVJf","block-collapse-btn":"kne-form-creator_Ufp-W","is-expanded":"kne-form-creator_OjfBl","drag-handle":"kne-form-creator_7GuXk","more-btn":"kne-form-creator_paWIZ","drag-handle-action":"kne-form-creator_lhTrX","sortable-ghost":"kne-form-creator_7ZIH8","sortable-drag":"kne-form-creator_dxhFH","action-group":"kne-form-creator_773yo","hover-reveal":"kne-form-creator_S234h","block-summary":"kne-form-creator_GzeW8","block-summary-type":"kne-form-creator_0iyhP","block-header-actions":"kne-form-creator_Ue-nT","block-body":"kne-form-creator_je1H0","item-blocks-section":"kne-form-creator_wq4bT","nested-block-list":"kne-form-creator_4NWH4","block-section-nested":"kne-form-creator_mUKom","add-field-dropdown":"kne-form-creator_9JS0d","add-field-dropdown-item":"kne-form-creator_Ql1z3","add-field-dropdown-item-icon":"kne-form-creator_ZHB5O","add-field-dropdown-item-desc":"kne-form-creator_dcsOS","add-field-dropdown-divider":"kne-form-creator_CUK0H","add-field-dropdown-label":"kne-form-creator_bPJ-2","section-toolbar":"kne-form-creator_LUO8S","section-toolbar-label":"kne-form-creator_7KQ79","field-list":"kne-form-creator_-B7WZ","step-list":"kne-form-creator_kc1pH","step-section-header":"kne-form-creator_wkhEX","step-section-title":"kne-form-creator_NBinE","step-index":"kne-form-creator_CCKZZ","step-section-text":"kne-form-creator_hRFew","step-section-count":"kne-form-creator_G6Quc","step-section-actions":"kne-form-creator_es-FC","field-row":"kne-form-creator_XMkdt","field-row-index":"kne-form-creator_a-cDo","has-handle":"kne-form-creator_vbTgK","field-row-index-num":"kne-form-creator_e4yEp","field-row-main":"kne-form-creator_ftlwp","field-row-label":"kne-form-creator_XAxbE","inline-empty":"kne-form-creator_yP-RF","hover-reveal-active":"kne-form-creator_AE-6r","action-btn":"kne-form-creator_mLgqh","add-block-dropdown":"kne-form-creator_vmS-e","add-block-option":"kne-form-creator_gjg2Y","add-block-option-icon":"kne-form-creator_qh1hh","add-block-option-text":"kne-form-creator_G8iJO","add-block-option-title":"kne-form-creator_ETSvm","add-block-option-desc":"kne-form-creator_O0C3l","field-empty":"kne-form-creator_Nmpfl","field-label-tips-icon":"kne-form-creator_0VVaO","preview-header":"kne-form-creator_c4BT0","preview-title":"kne-form-creator_fPkK4","preview-body":"kne-form-creator_6JntQ","schema-form":"kne-form-creator_MxCWP","schema-body":"kne-form-creator_q9ydz","schema-actions":"kne-form-creator_Y4eEH","schema-actions-inner":"kne-form-creator_FT9Zf","choice-block":"kne-form-creator_RllJe","choice-selector":"kne-form-creator_5A1eM","choice-panels":"kne-form-creator_IO0MY","choice-panels-empty":"kne-form-creator_T0nND","choice-option-panel":"kne-form-creator_FQixN","choice-option-panel-title":"kne-form-creator_ofRo2","choice-option-summary":"kne-form-creator_pksH8","property-modal":"kne-form-creator_wRSZC","editor-intro":"kne-form-creator_uOGOq","field-editor-form":"kne-form-creator_PGPHL","editor-toggles":"kne-form-creator_Dfyhx","options-editor":"kne-form-creator_AK4yO","columns-editor":"kne-form-creator_DQW1N","table-rows-editor":"kne-form-creator_-meJG","is-plain":"kne-form-creator_IiViE","form-actions-editor":"kne-form-creator_fchMy","form-actions-switch-field":"kne-form-creator_6JE9x","form-actions-align-group":"kne-form-creator_51ZsV","form-actions-gap-slider":"kne-form-creator_Gq0bk","editor-section":"kne-form-creator_jJy85","section-divider":"kne-form-creator_zA7L-","rule-editor":"kne-form-creator_bAlGU","super-select-props":"kne-form-creator_Iawhh","field-props-editor":"kne-form-creator_Gabf2","prop-row":"kne-form-creator_7K54P","prop-label":"kne-form-creator_HAAyH","options-item":"kne-form-creator_dnOd2","table-row-card":"kne-form-creator_cwCYp","tree-options-editor":"kne-form-creator_s3nHO","tree-options-list":"kne-form-creator_Djs-E","tree-option-node":"kne-form-creator_XAcut","tree-option-row":"kne-form-creator_4K4Rj","tree-option-fields":"kne-form-creator_-4cjc","tree-option-actions":"kne-form-creator_IjCNI","tree-option-children":"kne-form-creator_pVPGJ","tree-add-sibling":"kne-form-creator_bl46P","rule-checkbox-group":"kne-form-creator_tDgVP","rule-len-row":"kne-form-creator_ATsae","rule-len-input":"kne-form-creator_jY4Ld","rule-len-sep":"kne-form-creator_jBDC8","options-list":"kne-form-creator_GUBNS","options-row":"kne-form-creator_uohD0","options-header":"kne-form-creator_As4L6","options-locale-text":"kne-form-creator_7-99l","options-header-label":"kne-form-creator_UhnVH","options-header-value":"kne-form-creator_2c35V","options-header-description":"kne-form-creator_ibWvX","icon-square-btn-sm":"kne-form-creator_GAh-t","options-header-action":"kne-form-creator_nTN1E","visible-when-editor":"kne-form-creator_ttGnB","visible-when-hint":"kne-form-creator_hPtdv","visible-when-list":"kne-form-creator_aoAt6","visible-when-row":"kne-form-creator_phRgr","visible-when-row-main":"kne-form-creator_l-J7d","visible-when-field":"kne-form-creator_YRh5W","visible-when-operator":"kne-form-creator_DIqFq","visible-when-value":"kne-form-creator_CHcia","visible-when-regex":"kne-form-creator_lKpVo","visible-when-flags":"kne-form-creator_Ps-cu","visible-when-regex-tester":"kne-form-creator_Wf4eG","options-tip":"kne-form-creator_vrTmK","icon-square-btn":"kne-form-creator_DZjCf","locale-text":"kne-form-creator_hMXkE","is-compact":"kne-form-creator_jBFpL","locale-text-item":"kne-form-creator_NqCQD","locale-text-prefix":"kne-form-creator_BQl2X","locale-text-tag":"kne-form-creator_65OWA","
|
|
21
|
+
var style = {"kne-responsive-boundary":"kne-form-creator_gh14z","kne-responsive-scroll":"kne-form-creator_Kfn6L","option-group-stack":"kne-form-creator_TgBT-","form-info-show-index":"kne-form-creator_rqCos","field-label-index":"kne-form-creator_MLY0O","field-label-main":"kne-form-creator_UOUb4","form-creator":"kne-form-creator_Xrjrk","editor-pane":"kne-form-creator_Skfuv","preview-pane":"kne-form-creator_v4Lsp","editor-header":"kne-form-creator_WaSS-","block-list-panel":"kne-form-creator_lx8An","form-actions-setting-btn":"kne-form-creator_NekU2","panel-toolbar":"kne-form-creator_t0WxZ","panel-toolbar-extra":"kne-form-creator_O22ZM","schema-content":"kne-form-creator_9bWOD","schema-content-fields":"kne-form-creator_EmRDV","schema-content-list-items":"kne-form-creator_Xpl6K","_":"kne-form-creator_jWWXR","schema-content-list-item":"kne-form-creator_dBG5B","schema-content-field":"kne-form-creator_0Lanz","schema-content-field-block":"kne-form-creator_TQd-w","schema-content-field-label":"kne-form-creator_czEK3","schema-content-field-value":"kne-form-creator_YFKTK","schema-content-file-list":"kne-form-creator_UGdXA","schema-content-file":"kne-form-creator_75EtE","schema-content-file-image":"kne-form-creator_P-be6","schema-content-file-name":"kne-form-creator_NXpTS","schema-content-matrix":"kne-form-creator_Wj4Oi","schema-content-matrix-inner":"kne-form-creator_g0-ex","schema-content-matrix-header":"kne-form-creator_6Ew-1","schema-content-matrix-row-title":"kne-form-creator_QQ9-w","schema-content-matrix-option-title":"kne-form-creator_OuEl1","is-choice":"kne-form-creator_xnHgj","schema-content-matrix-row":"kne-form-creator_fFwMK","schema-content-matrix-row-label":"kne-form-creator_W09sG","schema-content-matrix-cell":"kne-form-creator_T3bcF","is-cells":"kne-form-creator_buqr3","is-selected":"kne-form-creator_NadyF","is-mobile":"kne-form-creator_LtgJz","schema-content-matrix-mobile-row":"kne-form-creator_MCWtM","schema-content-matrix-mobile-label":"kne-form-creator_CSjHH","schema-content-matrix-mobile-value":"kne-form-creator_qtvEn","schema-content-matrix-mobile-cell":"kne-form-creator_G-a37","schema-content-matrix-mobile-cell-label":"kne-form-creator_Mjuwi","schema-content-steps":"kne-form-creator_WUBdi","schema-content-step":"kne-form-creator_WJ8b8","schema-content-step-body":"kne-form-creator_JH8KR","schema-content-step-subtitle":"kne-form-creator_jfPgO","add-block-btn":"kne-form-creator_16Zre","add-inline-btn":"kne-form-creator_iCYdB","ant-btn-disabled":"kne-form-creator_LdGtv","block-list":"kne-form-creator_wK5eK","block-section":"kne-form-creator_15IiK","block-kind-formInfo":"kne-form-creator_D0hoK","block-kind-list":"kne-form-creator_JdPhy","block-kind-tableList":"kne-form-creator_gzd64","block-kind-editableList":"kne-form-creator_JzwrQ","block-kind-multiField":"kne-form-creator_t0iOJ","block-kind-matrixScale":"kne-form-creator_CFlQv","matrix-scale-editor-title":"kne-form-creator_Zo1Rz","block-kind-steps":"kne-form-creator_QNF9W","step-section":"kne-form-creator_22ajp","block-section-header":"kne-form-creator_wS4rL","block-header-meta":"kne-form-creator_PQiYV","block-title":"kne-form-creator_wSVJf","block-collapse-btn":"kne-form-creator_Ufp-W","is-expanded":"kne-form-creator_OjfBl","drag-handle":"kne-form-creator_7GuXk","more-btn":"kne-form-creator_paWIZ","drag-handle-action":"kne-form-creator_lhTrX","sortable-ghost":"kne-form-creator_7ZIH8","sortable-drag":"kne-form-creator_dxhFH","action-group":"kne-form-creator_773yo","hover-reveal":"kne-form-creator_S234h","block-summary":"kne-form-creator_GzeW8","block-summary-type":"kne-form-creator_0iyhP","block-header-actions":"kne-form-creator_Ue-nT","block-body":"kne-form-creator_je1H0","item-blocks-section":"kne-form-creator_wq4bT","nested-block-list":"kne-form-creator_4NWH4","block-section-nested":"kne-form-creator_mUKom","add-field-dropdown":"kne-form-creator_9JS0d","add-field-dropdown-item":"kne-form-creator_Ql1z3","add-field-dropdown-item-icon":"kne-form-creator_ZHB5O","add-field-dropdown-item-desc":"kne-form-creator_dcsOS","add-field-dropdown-divider":"kne-form-creator_CUK0H","add-field-dropdown-label":"kne-form-creator_bPJ-2","section-toolbar":"kne-form-creator_LUO8S","section-toolbar-label":"kne-form-creator_7KQ79","field-list":"kne-form-creator_-B7WZ","step-list":"kne-form-creator_kc1pH","step-section-header":"kne-form-creator_wkhEX","step-section-title":"kne-form-creator_NBinE","step-index":"kne-form-creator_CCKZZ","step-section-text":"kne-form-creator_hRFew","step-section-count":"kne-form-creator_G6Quc","step-section-actions":"kne-form-creator_es-FC","field-row":"kne-form-creator_XMkdt","field-row-index":"kne-form-creator_a-cDo","has-handle":"kne-form-creator_vbTgK","field-row-index-num":"kne-form-creator_e4yEp","field-row-main":"kne-form-creator_ftlwp","field-row-label":"kne-form-creator_XAxbE","inline-empty":"kne-form-creator_yP-RF","hover-reveal-active":"kne-form-creator_AE-6r","action-btn":"kne-form-creator_mLgqh","add-block-dropdown":"kne-form-creator_vmS-e","add-block-option":"kne-form-creator_gjg2Y","add-block-option-icon":"kne-form-creator_qh1hh","add-block-option-text":"kne-form-creator_G8iJO","add-block-option-title":"kne-form-creator_ETSvm","add-block-option-desc":"kne-form-creator_O0C3l","field-empty":"kne-form-creator_Nmpfl","field-label-tips-icon":"kne-form-creator_0VVaO","preview-header":"kne-form-creator_c4BT0","preview-title":"kne-form-creator_fPkK4","preview-body":"kne-form-creator_6JntQ","schema-form":"kne-form-creator_MxCWP","schema-body":"kne-form-creator_q9ydz","schema-actions":"kne-form-creator_Y4eEH","schema-actions-inner":"kne-form-creator_FT9Zf","choice-block":"kne-form-creator_RllJe","choice-selector":"kne-form-creator_5A1eM","choice-panels":"kne-form-creator_IO0MY","choice-panels-empty":"kne-form-creator_T0nND","choice-option-panel":"kne-form-creator_FQixN","choice-option-panel-title":"kne-form-creator_ofRo2","choice-option-summary":"kne-form-creator_pksH8","property-modal":"kne-form-creator_wRSZC","editor-intro":"kne-form-creator_uOGOq","field-editor-form":"kne-form-creator_PGPHL","editor-toggles":"kne-form-creator_Dfyhx","options-editor":"kne-form-creator_AK4yO","columns-editor":"kne-form-creator_DQW1N","table-rows-editor":"kne-form-creator_-meJG","is-plain":"kne-form-creator_IiViE","form-actions-editor":"kne-form-creator_fchMy","form-actions-switch-field":"kne-form-creator_6JE9x","form-actions-align-group":"kne-form-creator_51ZsV","form-actions-gap-slider":"kne-form-creator_Gq0bk","editor-section":"kne-form-creator_jJy85","section-divider":"kne-form-creator_zA7L-","rule-editor":"kne-form-creator_bAlGU","super-select-props":"kne-form-creator_Iawhh","field-props-editor":"kne-form-creator_Gabf2","prop-row":"kne-form-creator_7K54P","prop-label":"kne-form-creator_HAAyH","options-item":"kne-form-creator_dnOd2","table-row-card":"kne-form-creator_cwCYp","tree-options-editor":"kne-form-creator_s3nHO","tree-options-list":"kne-form-creator_Djs-E","tree-option-node":"kne-form-creator_XAcut","tree-option-row":"kne-form-creator_4K4Rj","tree-option-fields":"kne-form-creator_-4cjc","tree-option-actions":"kne-form-creator_IjCNI","tree-option-children":"kne-form-creator_pVPGJ","tree-add-sibling":"kne-form-creator_bl46P","rule-checkbox-group":"kne-form-creator_tDgVP","rule-len-row":"kne-form-creator_ATsae","rule-len-input":"kne-form-creator_jY4Ld","rule-len-sep":"kne-form-creator_jBDC8","options-list":"kne-form-creator_GUBNS","options-row":"kne-form-creator_uohD0","options-header":"kne-form-creator_As4L6","options-locale-text":"kne-form-creator_7-99l","options-header-label":"kne-form-creator_UhnVH","options-header-value":"kne-form-creator_2c35V","options-header-description":"kne-form-creator_ibWvX","icon-square-btn-sm":"kne-form-creator_GAh-t","options-header-action":"kne-form-creator_nTN1E","visible-when-editor":"kne-form-creator_ttGnB","visible-when-hint":"kne-form-creator_hPtdv","visible-when-list":"kne-form-creator_aoAt6","visible-when-row":"kne-form-creator_phRgr","visible-when-row-main":"kne-form-creator_l-J7d","visible-when-field":"kne-form-creator_YRh5W","visible-when-operator":"kne-form-creator_DIqFq","visible-when-value":"kne-form-creator_CHcia","visible-when-regex":"kne-form-creator_lKpVo","visible-when-flags":"kne-form-creator_Ps-cu","visible-when-regex-tester":"kne-form-creator_Wf4eG","options-tip":"kne-form-creator_vrTmK","icon-square-btn":"kne-form-creator_DZjCf","locale-text":"kne-form-creator_hMXkE","is-compact":"kne-form-creator_jBFpL","locale-text-item":"kne-form-creator_NqCQD","locale-text-prefix":"kne-form-creator_BQl2X","locale-text-tag":"kne-form-creator_65OWA","add-inline-btn-icon":"kne-form-creator_jbBze","steps-focus":"kne-form-creator_BzrAJ","steps-focus-header":"kne-form-creator_fF02T","steps-focus-meta":"kne-form-creator_4Q3Nt","steps-focus-count":"kne-form-creator_-vGec","steps-focus-count-current":"kne-form-creator_vXk2o","steps-focus-count-total":"kne-form-creator_bpGjx","steps-focus-next":"kne-form-creator_a2ZfJ","steps-focus-title":"kne-form-creator_Q5bvO","steps-focus-track":"kne-form-creator_Cdvj5","steps-focus-segment":"kne-form-creator_4z3t0","is-done":"kne-form-creator_nBNzi","is-current":"kne-form-creator_a8lqo","steps-focus-actions":"kne-form-creator_NgZBR","steps-focus-actions-side":"kne-form-creator_ynPls","is-end":"kne-form-creator_syD91","steps-focus-prev":"kne-form-creator_5NtBV","steps-focus-next-btn":"kne-form-creator_1mMAJ","steps-focus-next-btn-icon":"kne-form-creator_OQvek","steps-focus-done-hint":"kne-form-creator_b0T7j"};
|
|
22
22
|
|
|
23
23
|
function _extends() {
|
|
24
24
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -5296,6 +5296,11 @@ const BlockConfigFields = ({
|
|
|
5296
5296
|
value
|
|
5297
5297
|
}))
|
|
5298
5298
|
}, "stepsStyle"), borderedCheckbox, /*#__PURE__*/jsx(Checkbox, {
|
|
5299
|
+
name: "showIndex",
|
|
5300
|
+
children: formatMessage({
|
|
5301
|
+
id: 'blockShowIndex'
|
|
5302
|
+
})
|
|
5303
|
+
}, "showIndex"), /*#__PURE__*/jsx(Checkbox, {
|
|
5299
5304
|
name: "autoStep",
|
|
5300
5305
|
children: formatMessage({
|
|
5301
5306
|
id: 'blockAutoStep'
|
|
@@ -8143,6 +8148,160 @@ const createLocalizedRules = formatMessage => {
|
|
|
8143
8148
|
return rules;
|
|
8144
8149
|
};
|
|
8145
8150
|
|
|
8151
|
+
/**
|
|
8152
|
+
* showIndex 连续编号(同一作用域内含子模块字段,不从 1 重起)。
|
|
8153
|
+
*
|
|
8154
|
+
* 作用域根:
|
|
8155
|
+
* - formInfo.showIndex === true
|
|
8156
|
+
* - steps 上 showIndex(或 step.showIndex 覆盖)时,**每一步**各自从 1 起
|
|
8157
|
+
*
|
|
8158
|
+
* 规则:
|
|
8159
|
+
* - 作用域内 DFS:自身 list 字段 → 子 blocks / itemBlocks,连续 1,2,3…
|
|
8160
|
+
* - 嵌套 formInfo / object / choice 继续父级计数,不重起
|
|
8161
|
+
* - choice:各 option 从同一起点编号;计数按「字段数最多的 option」推进,避免切换选项影响后续序号
|
|
8162
|
+
* - list / tableList / editableList:只给「单条模板」编号(每行数字相同),与填写态 List 复用同一套字段节点一致
|
|
8163
|
+
* - matrixScale / multiField / 嵌套 steps:不占题干序号
|
|
8164
|
+
*/
|
|
8165
|
+
|
|
8166
|
+
const isIndexableField = field => !!(field && !field.hidden && field.name && field.id);
|
|
8167
|
+
const createIndexCounter = (start = 0) => ({
|
|
8168
|
+
value: start,
|
|
8169
|
+
take() {
|
|
8170
|
+
this.value += 1;
|
|
8171
|
+
return this.value;
|
|
8172
|
+
},
|
|
8173
|
+
peek() {
|
|
8174
|
+
return this.value;
|
|
8175
|
+
}
|
|
8176
|
+
});
|
|
8177
|
+
const assignFields = (fields, counter, map) => {
|
|
8178
|
+
(fields || []).forEach(field => {
|
|
8179
|
+
if (!isIndexableField(field)) {
|
|
8180
|
+
return;
|
|
8181
|
+
}
|
|
8182
|
+
map.set(field.id, counter.take());
|
|
8183
|
+
});
|
|
8184
|
+
};
|
|
8185
|
+
const assignBlock = (block, counter, map) => {
|
|
8186
|
+
if (!block || !block.kind) {
|
|
8187
|
+
return;
|
|
8188
|
+
}
|
|
8189
|
+
switch (block.kind) {
|
|
8190
|
+
case 'formInfo':
|
|
8191
|
+
case 'object':
|
|
8192
|
+
{
|
|
8193
|
+
assignFields(block.list, counter, map);
|
|
8194
|
+
(block.blocks || []).forEach(child => assignBlock(child, counter, map));
|
|
8195
|
+
break;
|
|
8196
|
+
}
|
|
8197
|
+
case 'choice':
|
|
8198
|
+
{
|
|
8199
|
+
const start = counter.peek();
|
|
8200
|
+
let maxEnd = start;
|
|
8201
|
+
(block.options || []).forEach(option => {
|
|
8202
|
+
const optionCounter = createIndexCounter(start);
|
|
8203
|
+
assignFields(option.list, optionCounter, map);
|
|
8204
|
+
(option.blocks || []).forEach(child => assignBlock(child, optionCounter, map));
|
|
8205
|
+
maxEnd = Math.max(maxEnd, optionCounter.peek());
|
|
8206
|
+
});
|
|
8207
|
+
counter.value = maxEnd;
|
|
8208
|
+
break;
|
|
8209
|
+
}
|
|
8210
|
+
case 'list':
|
|
8211
|
+
case 'tableList':
|
|
8212
|
+
case 'editableList':
|
|
8213
|
+
{
|
|
8214
|
+
assignFields(block.list, counter, map);
|
|
8215
|
+
(block.itemBlocks || []).forEach(child => assignBlock(child, counter, map));
|
|
8216
|
+
break;
|
|
8217
|
+
}
|
|
8218
|
+
}
|
|
8219
|
+
};
|
|
8220
|
+
|
|
8221
|
+
/**
|
|
8222
|
+
* 为作用域根(formInfo / object / step 的 { list, blocks })生成 fieldId → 1-based 序号。
|
|
8223
|
+
* @param {object} root
|
|
8224
|
+
* @param {{ enabled?: boolean }} [options]
|
|
8225
|
+
* @returns {Map<string, number>}
|
|
8226
|
+
*/
|
|
8227
|
+
const buildFieldIndexMap = (root, {
|
|
8228
|
+
enabled: _enabled = false
|
|
8229
|
+
} = {}) => {
|
|
8230
|
+
const map = new Map();
|
|
8231
|
+
if (!_enabled || !root) {
|
|
8232
|
+
return map;
|
|
8233
|
+
}
|
|
8234
|
+
const counter = createIndexCounter(0);
|
|
8235
|
+
if (root.kind === 'formInfo' || root.kind === 'object') {
|
|
8236
|
+
assignBlock(root, counter, map);
|
|
8237
|
+
return map;
|
|
8238
|
+
}
|
|
8239
|
+
// step 或其它 { list, blocks } 容器
|
|
8240
|
+
assignFields(root.list, counter, map);
|
|
8241
|
+
(root.blocks || []).forEach(child => assignBlock(child, counter, map));
|
|
8242
|
+
return map;
|
|
8243
|
+
};
|
|
8244
|
+
|
|
8245
|
+
/**
|
|
8246
|
+
* 进入子块时的序号上下文:父级已启用则继续同一 map;
|
|
8247
|
+
* 否则仅 formInfo/object 在 showIndex 时新建作用域(steps 按 step 单独建,见 resolveStepIndexContext)。
|
|
8248
|
+
*/
|
|
8249
|
+
const resolveIndexContext = (block, parentCtx = {}) => {
|
|
8250
|
+
if (parentCtx.indexMap) {
|
|
8251
|
+
return {
|
|
8252
|
+
indexMap: parentCtx.indexMap,
|
|
8253
|
+
indexEnabled: true
|
|
8254
|
+
};
|
|
8255
|
+
}
|
|
8256
|
+
if (!block || !block.showIndex) {
|
|
8257
|
+
return {
|
|
8258
|
+
indexMap: null,
|
|
8259
|
+
indexEnabled: false
|
|
8260
|
+
};
|
|
8261
|
+
}
|
|
8262
|
+
if (block.kind !== 'formInfo' && block.kind !== 'object') {
|
|
8263
|
+
return {
|
|
8264
|
+
indexMap: null,
|
|
8265
|
+
indexEnabled: false
|
|
8266
|
+
};
|
|
8267
|
+
}
|
|
8268
|
+
return {
|
|
8269
|
+
indexMap: buildFieldIndexMap(block, {
|
|
8270
|
+
enabled: true
|
|
8271
|
+
}),
|
|
8272
|
+
indexEnabled: true
|
|
8273
|
+
};
|
|
8274
|
+
};
|
|
8275
|
+
const resolveStepIndexContext = (step, blockShowIndex) => {
|
|
8276
|
+
const enabled = step && step.showIndex != null ? !!step.showIndex : !!blockShowIndex;
|
|
8277
|
+
if (!enabled) {
|
|
8278
|
+
return {
|
|
8279
|
+
indexMap: null,
|
|
8280
|
+
indexEnabled: false
|
|
8281
|
+
};
|
|
8282
|
+
}
|
|
8283
|
+
const indexMap = buildFieldIndexMap(step, {
|
|
8284
|
+
enabled: true
|
|
8285
|
+
});
|
|
8286
|
+
return {
|
|
8287
|
+
indexMap,
|
|
8288
|
+
indexEnabled: true
|
|
8289
|
+
};
|
|
8290
|
+
};
|
|
8291
|
+
const fieldDisplayIndex = (indexMap, field) => {
|
|
8292
|
+
if (!indexMap || !field || !field.id) {
|
|
8293
|
+
return null;
|
|
8294
|
+
}
|
|
8295
|
+
const value = indexMap.get(field.id);
|
|
8296
|
+
return value == null ? null : value;
|
|
8297
|
+
};
|
|
8298
|
+
const blockHasIndexedFields = (block, indexMap) => {
|
|
8299
|
+
if (!indexMap || !block) {
|
|
8300
|
+
return false;
|
|
8301
|
+
}
|
|
8302
|
+
return (block.list || []).some(field => field && indexMap.has(field.id));
|
|
8303
|
+
};
|
|
8304
|
+
|
|
8146
8305
|
const buildLabelTips = tips => {
|
|
8147
8306
|
if (tips == null || !String(tips).trim()) {
|
|
8148
8307
|
return undefined;
|
|
@@ -8162,14 +8321,16 @@ const buildFieldLabel = field => {
|
|
|
8162
8321
|
const base = (field == null ? void 0 : field.label) != null && String(field.label).trim() ? String(field.label).trim() : (field == null ? void 0 : field.name) || '';
|
|
8163
8322
|
return base || undefined;
|
|
8164
8323
|
};
|
|
8165
|
-
|
|
8324
|
+
|
|
8325
|
+
/** displayIndex 为 1-based 连续序号 */
|
|
8326
|
+
const buildIndexedLabelRender = displayIndex => {
|
|
8166
8327
|
return ({
|
|
8167
8328
|
label
|
|
8168
8329
|
}) => {
|
|
8169
8330
|
const text = label != null ? String(label).replace(/\u200b/g, '') : '';
|
|
8170
8331
|
return /*#__PURE__*/createElement(Fragment$1, null, /*#__PURE__*/createElement('span', {
|
|
8171
8332
|
className: style['field-label-index']
|
|
8172
|
-
}, `${
|
|
8333
|
+
}, `${displayIndex}.`), text ? /*#__PURE__*/createElement('span', {
|
|
8173
8334
|
className: style['field-label-main']
|
|
8174
8335
|
}, text) : null);
|
|
8175
8336
|
};
|
|
@@ -8177,8 +8338,8 @@ const buildIndexedLabelRender = index => {
|
|
|
8177
8338
|
const renderFieldEntries = (fields = [], preview = false, {
|
|
8178
8339
|
namePrefix,
|
|
8179
8340
|
locale,
|
|
8180
|
-
|
|
8181
|
-
} = {}) => (fields || []).filter(field => !field.hidden).map(
|
|
8341
|
+
indexMap: _indexMap = null
|
|
8342
|
+
} = {}) => (fields || []).filter(field => !field.hidden).map(field => {
|
|
8182
8343
|
var _props$options;
|
|
8183
8344
|
const Component = getFieldComponent(field.type, field);
|
|
8184
8345
|
if (!Component) {
|
|
@@ -8213,12 +8374,13 @@ const renderFieldEntries = (fields = [], preview = false, {
|
|
|
8213
8374
|
locale
|
|
8214
8375
|
} : {};
|
|
8215
8376
|
const label = buildFieldLabel(field);
|
|
8377
|
+
const displayIndex = fieldDisplayIndex(_indexMap, field);
|
|
8216
8378
|
const element = /*#__PURE__*/createElement(Component, _extends({
|
|
8217
8379
|
key: field.id,
|
|
8218
8380
|
name: fieldName,
|
|
8219
|
-
label:
|
|
8220
|
-
},
|
|
8221
|
-
labelRender: buildIndexedLabelRender(
|
|
8381
|
+
label: displayIndex != null ? label || '\u200b' : label
|
|
8382
|
+
}, displayIndex != null ? {
|
|
8383
|
+
labelRender: buildIndexedLabelRender(displayIndex)
|
|
8222
8384
|
} : null, {
|
|
8223
8385
|
rule: field.rule || undefined,
|
|
8224
8386
|
block: field.block || undefined
|
|
@@ -8289,16 +8451,21 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8289
8451
|
if (!block || depth > MAX_BLOCK_DEPTH) {
|
|
8290
8452
|
return null;
|
|
8291
8453
|
}
|
|
8454
|
+
const indexCtx = resolveIndexContext(block, ctx);
|
|
8292
8455
|
const nextCtx = _extends({}, ctx, {
|
|
8293
8456
|
depth: depth + 1,
|
|
8294
|
-
asListItem: false
|
|
8457
|
+
asListItem: false,
|
|
8458
|
+
indexMap: indexCtx.indexMap,
|
|
8459
|
+
indexEnabled: indexCtx.indexEnabled
|
|
8295
8460
|
});
|
|
8296
8461
|
const fieldRenderOpts = {
|
|
8297
|
-
locale
|
|
8462
|
+
locale,
|
|
8463
|
+
indexMap: indexCtx.indexMap
|
|
8298
8464
|
};
|
|
8299
8465
|
const bordered = isMobile ? false : block.bordered || undefined;
|
|
8300
8466
|
// 仅 FormInfo/object 吃列表项 Part 样式;List 等交给 form-info nestDepth
|
|
8301
8467
|
const listItemPartProps = asListItem && isFormInfoLikeBlock(block.kind) ? nestedListItemPartProps : null;
|
|
8468
|
+
const indexClassName = blockHasIndexedFields(block, indexCtx.indexMap) ? style['form-info-show-index'] : null;
|
|
8302
8469
|
const renderChildBlocks = (blocks = [], childCtx = nextCtx) => (blocks || []).map(child => renderBlockElement(child, preview, childCtx)).filter(Boolean);
|
|
8303
8470
|
|
|
8304
8471
|
/** list.itemBlocks:object/formInfo 走 asListItem;嵌套 list 等保持 nestDepth 链路 */
|
|
@@ -8311,10 +8478,7 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8311
8478
|
switch (block.kind) {
|
|
8312
8479
|
case 'formInfo':
|
|
8313
8480
|
{
|
|
8314
|
-
const
|
|
8315
|
-
const entries = renderFieldEntries(block.list, preview, _extends({}, fieldRenderOpts, {
|
|
8316
|
-
showIndex
|
|
8317
|
-
}));
|
|
8481
|
+
const entries = renderFieldEntries(block.list, preview, fieldRenderOpts);
|
|
8318
8482
|
const nested = renderChildBlocks(block.blocks || [], nextCtx).map(node => withBlockLayout(node, true));
|
|
8319
8483
|
return withBlockLayout(createFieldsFormInfo(_extends({
|
|
8320
8484
|
key: block.id,
|
|
@@ -8324,7 +8488,7 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8324
8488
|
gap: block.gap,
|
|
8325
8489
|
bordered
|
|
8326
8490
|
}, listItemPartProps || {}, {
|
|
8327
|
-
className: resolvePartRootClassName(depth,
|
|
8491
|
+
className: resolvePartRootClassName(depth, indexClassName)
|
|
8328
8492
|
}), entries, nested, knownNames), asListItem);
|
|
8329
8493
|
}
|
|
8330
8494
|
case 'object':
|
|
@@ -8341,7 +8505,7 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8341
8505
|
gap: block.gap,
|
|
8342
8506
|
bordered
|
|
8343
8507
|
}, listItemPartProps || {}, {
|
|
8344
|
-
className: resolvePartRootClassName(depth)
|
|
8508
|
+
className: resolvePartRootClassName(depth, indexClassName)
|
|
8345
8509
|
}), entries, nested, knownNames), asListItem);
|
|
8346
8510
|
}
|
|
8347
8511
|
case 'list':
|
|
@@ -8354,7 +8518,7 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8354
8518
|
title: block.title || undefined,
|
|
8355
8519
|
important: block.important || undefined,
|
|
8356
8520
|
bordered,
|
|
8357
|
-
className: resolvePartRootClassName(depth),
|
|
8521
|
+
className: resolvePartRootClassName(depth, indexClassName),
|
|
8358
8522
|
maxLength: block.maxLength,
|
|
8359
8523
|
minLength: block.minLength
|
|
8360
8524
|
}, block.addText ? {
|
|
@@ -8380,7 +8544,7 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8380
8544
|
} : {}, {
|
|
8381
8545
|
list: fields
|
|
8382
8546
|
}, listItemPartProps || {}, {
|
|
8383
|
-
className: resolvePartRootClassName(depth)
|
|
8547
|
+
className: resolvePartRootClassName(depth, indexClassName)
|
|
8384
8548
|
})), asListItem);
|
|
8385
8549
|
}
|
|
8386
8550
|
case 'editableList':
|
|
@@ -8392,7 +8556,7 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8392
8556
|
name: block.name,
|
|
8393
8557
|
title: block.title || undefined,
|
|
8394
8558
|
bordered,
|
|
8395
|
-
className: resolvePartRootClassName(depth),
|
|
8559
|
+
className: resolvePartRootClassName(depth, indexClassName),
|
|
8396
8560
|
column: block.column,
|
|
8397
8561
|
maxLength: block.maxLength,
|
|
8398
8562
|
minLength: block.minLength
|
|
@@ -8451,7 +8615,7 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8451
8615
|
case 'steps':
|
|
8452
8616
|
{
|
|
8453
8617
|
const isFocusSteps = block.stepsStyle === 'focus';
|
|
8454
|
-
//
|
|
8618
|
+
// 每步独立作用域;步内嵌套子模块连续编号
|
|
8455
8619
|
const blockShowIndex = !!block.showIndex;
|
|
8456
8620
|
return withBlockLayout(/*#__PURE__*/createElement(isFocusSteps ? FocusSteps$1 : Steps, _extends({
|
|
8457
8621
|
key: block.id,
|
|
@@ -8465,14 +8629,19 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8465
8629
|
prevIcon: /*#__PURE__*/createElement(ArrowLeftOutlined),
|
|
8466
8630
|
nextIcon: /*#__PURE__*/createElement(ArrowRightOutlined),
|
|
8467
8631
|
items: (block.items || []).map(step => {
|
|
8468
|
-
const
|
|
8469
|
-
const
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8632
|
+
const stepIndexCtx = resolveStepIndexContext(step, blockShowIndex);
|
|
8633
|
+
const stepCtx = _extends({}, nextCtx, {
|
|
8634
|
+
indexMap: stepIndexCtx.indexMap,
|
|
8635
|
+
indexEnabled: stepIndexCtx.indexEnabled
|
|
8636
|
+
});
|
|
8637
|
+
const entries = renderFieldEntries(step.list, preview, {
|
|
8638
|
+
locale,
|
|
8639
|
+
indexMap: stepIndexCtx.indexMap
|
|
8640
|
+
});
|
|
8641
|
+
const nested = renderChildBlocks(step.blocks || [], stepCtx);
|
|
8473
8642
|
const fieldNames = [...(step.list || []).filter(field => field && !field.hidden && field.name).map(field => field.name), ...collectBlockFieldNames(step.blocks || [])];
|
|
8474
8643
|
const hasConditional = entries.some(entry => entry.visibleWhen);
|
|
8475
|
-
const
|
|
8644
|
+
const stepIndexClassName = stepIndexCtx.indexEnabled ? style['form-info-show-index'] : null;
|
|
8476
8645
|
if (nested.length || hasConditional) {
|
|
8477
8646
|
return {
|
|
8478
8647
|
key: step.id,
|
|
@@ -8486,7 +8655,7 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8486
8655
|
key: `${step.id}-fields`,
|
|
8487
8656
|
column: step.column,
|
|
8488
8657
|
gap: block.gap,
|
|
8489
|
-
className:
|
|
8658
|
+
className: stepIndexClassName
|
|
8490
8659
|
}, entries, [], knownNames) : null, ...nested)
|
|
8491
8660
|
};
|
|
8492
8661
|
}
|
|
@@ -8496,7 +8665,7 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8496
8665
|
column: step.column,
|
|
8497
8666
|
gap: block.gap,
|
|
8498
8667
|
list: entries.map(entry => entry.element),
|
|
8499
|
-
className:
|
|
8668
|
+
className: stepIndexClassName,
|
|
8500
8669
|
fieldNames
|
|
8501
8670
|
};
|
|
8502
8671
|
})
|
|
@@ -8513,11 +8682,16 @@ const renderBlockElement = (block, preview = false, ctx = {}) => {
|
|
|
8513
8682
|
renderOptionContent: option => {
|
|
8514
8683
|
const nodes = [];
|
|
8515
8684
|
if ((option.list || []).length) {
|
|
8685
|
+
const optionIndexClassName = (option.list || []).some(field => fieldDisplayIndex(indexCtx.indexMap, field) != null) ? style['form-info-show-index'] : null;
|
|
8516
8686
|
nodes.push(createFieldsFormInfo({
|
|
8517
8687
|
key: `${option.id}-fields`,
|
|
8518
8688
|
column: block.column || 2,
|
|
8519
|
-
gap: block.gap
|
|
8520
|
-
|
|
8689
|
+
gap: block.gap,
|
|
8690
|
+
className: optionIndexClassName
|
|
8691
|
+
}, renderFieldEntries(option.list, preview, {
|
|
8692
|
+
locale,
|
|
8693
|
+
indexMap: indexCtx.indexMap
|
|
8694
|
+
}), [], knownNames));
|
|
8521
8695
|
}
|
|
8522
8696
|
nodes.push(...renderChildBlocks(option.blocks || [], nextCtx));
|
|
8523
8697
|
return nodes.filter(Boolean);
|
|
@@ -10207,6 +10381,217 @@ const schemaToDataSchema = (schema, options = {}) => {
|
|
|
10207
10381
|
return root;
|
|
10208
10382
|
};
|
|
10209
10383
|
|
|
10384
|
+
const isMatrixChoiceSelected = (cellValue, optionValue) => {
|
|
10385
|
+
if (Array.isArray(cellValue)) {
|
|
10386
|
+
return cellValue.some(item => item === optionValue || item && typeof item === 'object' && (item.value === optionValue || item.id === optionValue));
|
|
10387
|
+
}
|
|
10388
|
+
if (cellValue && typeof cellValue === 'object') {
|
|
10389
|
+
return cellValue.value === optionValue || cellValue.id === optionValue;
|
|
10390
|
+
}
|
|
10391
|
+
return cellValue === optionValue;
|
|
10392
|
+
};
|
|
10393
|
+
|
|
10394
|
+
/** 只读矩阵:对齐填写态 MatrixScale 的表头 + 行列网格,而不是摊成普通字段列表 */
|
|
10395
|
+
const renderMatrixScaleContent = (block, matrixData, formatMessage, isMobile) => {
|
|
10396
|
+
const layout = block.layout === 'columns' || block.layout === 'field' ? block.layout : 'options';
|
|
10397
|
+
const fieldType = block.fieldType || 'RadioGroup';
|
|
10398
|
+
const rows = (block.rows || []).filter(row => row && row.name != null && String(row.name).trim());
|
|
10399
|
+
if (!rows.length) {
|
|
10400
|
+
return null;
|
|
10401
|
+
}
|
|
10402
|
+
const emptyText = formatMessage({
|
|
10403
|
+
id: 'schemaContentEmptyValue'
|
|
10404
|
+
});
|
|
10405
|
+
const rowTitle = block.rowTitle || '';
|
|
10406
|
+
if (layout === 'options') {
|
|
10407
|
+
const options = (block.options || []).filter(option => option && (option.value != null || option.label != null));
|
|
10408
|
+
const optionCount = Math.max(options.length, 1);
|
|
10409
|
+
const formatRowValue = rowValue => formatFieldValue({
|
|
10410
|
+
type: fieldType,
|
|
10411
|
+
props: {
|
|
10412
|
+
options: block.options || []
|
|
10413
|
+
}
|
|
10414
|
+
}, rowValue, formatMessage) || emptyText;
|
|
10415
|
+
if (isMobile || !options.length) {
|
|
10416
|
+
return /*#__PURE__*/jsx("div", {
|
|
10417
|
+
className: [style['schema-content-matrix'], style['is-mobile']].join(' '),
|
|
10418
|
+
children: rows.map(row => {
|
|
10419
|
+
const rowName = String(row.name).trim();
|
|
10420
|
+
return /*#__PURE__*/jsxs("div", {
|
|
10421
|
+
className: style['schema-content-matrix-mobile-row'],
|
|
10422
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10423
|
+
className: style['schema-content-matrix-mobile-label'],
|
|
10424
|
+
children: row.label || rowName
|
|
10425
|
+
}), /*#__PURE__*/jsx("div", {
|
|
10426
|
+
className: style['schema-content-matrix-mobile-value'],
|
|
10427
|
+
children: formatRowValue(matrixData == null ? void 0 : matrixData[rowName])
|
|
10428
|
+
})]
|
|
10429
|
+
}, rowName);
|
|
10430
|
+
})
|
|
10431
|
+
});
|
|
10432
|
+
}
|
|
10433
|
+
return /*#__PURE__*/jsx("div", {
|
|
10434
|
+
className: [style['schema-content-matrix'], style['is-choice']].join(' '),
|
|
10435
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
10436
|
+
className: style['schema-content-matrix-inner'],
|
|
10437
|
+
style: {
|
|
10438
|
+
'--matrix-scale-option-count': optionCount
|
|
10439
|
+
},
|
|
10440
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
10441
|
+
className: style['schema-content-matrix-header'],
|
|
10442
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10443
|
+
className: style['schema-content-matrix-row-title'],
|
|
10444
|
+
children: rowTitle
|
|
10445
|
+
}), options.map(option => {
|
|
10446
|
+
var _option$label;
|
|
10447
|
+
return /*#__PURE__*/jsx("div", {
|
|
10448
|
+
className: style['schema-content-matrix-option-title'],
|
|
10449
|
+
children: (_option$label = option.label) != null ? _option$label : String(option.value)
|
|
10450
|
+
}, String(option.value));
|
|
10451
|
+
})]
|
|
10452
|
+
}), rows.map(row => {
|
|
10453
|
+
const rowName = String(row.name).trim();
|
|
10454
|
+
const rowValue = matrixData == null ? void 0 : matrixData[rowName];
|
|
10455
|
+
return /*#__PURE__*/jsxs("div", {
|
|
10456
|
+
className: style['schema-content-matrix-row'],
|
|
10457
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10458
|
+
className: style['schema-content-matrix-row-label'],
|
|
10459
|
+
children: row.label || rowName
|
|
10460
|
+
}), options.map(option => {
|
|
10461
|
+
const selected = isMatrixChoiceSelected(rowValue, option.value);
|
|
10462
|
+
return /*#__PURE__*/jsx("div", {
|
|
10463
|
+
className: [style['schema-content-matrix-cell'], selected ? style['is-selected'] : null].filter(Boolean).join(' '),
|
|
10464
|
+
children: selected ? /*#__PURE__*/jsx(CheckOutlined, {}) : null
|
|
10465
|
+
}, String(option.value));
|
|
10466
|
+
})]
|
|
10467
|
+
}, rowName);
|
|
10468
|
+
})]
|
|
10469
|
+
})
|
|
10470
|
+
});
|
|
10471
|
+
}
|
|
10472
|
+
if (layout === 'columns') {
|
|
10473
|
+
const columns = (block.columns || []).filter(column => column && column.name != null && String(column.name).trim());
|
|
10474
|
+
const optionCount = Math.max(columns.length, 1);
|
|
10475
|
+
const formatCell = value => formatFieldValue({
|
|
10476
|
+
type: fieldType,
|
|
10477
|
+
props: {}
|
|
10478
|
+
}, value, formatMessage) || emptyText;
|
|
10479
|
+
if (isMobile || !columns.length) {
|
|
10480
|
+
return /*#__PURE__*/jsx("div", {
|
|
10481
|
+
className: [style['schema-content-matrix'], style['is-mobile']].join(' '),
|
|
10482
|
+
children: rows.map(row => {
|
|
10483
|
+
const rowName = String(row.name).trim();
|
|
10484
|
+
const rowData = (matrixData == null ? void 0 : matrixData[rowName]) || {};
|
|
10485
|
+
return /*#__PURE__*/jsxs("div", {
|
|
10486
|
+
className: style['schema-content-matrix-mobile-row'],
|
|
10487
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10488
|
+
className: style['schema-content-matrix-mobile-label'],
|
|
10489
|
+
children: row.label || rowName
|
|
10490
|
+
}), columns.length ? columns.map(column => {
|
|
10491
|
+
const columnName = String(column.name).trim();
|
|
10492
|
+
return /*#__PURE__*/jsxs("div", {
|
|
10493
|
+
className: style['schema-content-matrix-mobile-cell'],
|
|
10494
|
+
children: [/*#__PURE__*/jsxs("span", {
|
|
10495
|
+
className: style['schema-content-matrix-mobile-cell-label'],
|
|
10496
|
+
children: [column.label || columnName, "\uFF1A"]
|
|
10497
|
+
}), /*#__PURE__*/jsx("span", {
|
|
10498
|
+
children: formatCell(rowData == null ? void 0 : rowData[columnName])
|
|
10499
|
+
})]
|
|
10500
|
+
}, columnName);
|
|
10501
|
+
}) : null]
|
|
10502
|
+
}, rowName);
|
|
10503
|
+
})
|
|
10504
|
+
});
|
|
10505
|
+
}
|
|
10506
|
+
return /*#__PURE__*/jsx("div", {
|
|
10507
|
+
className: style['schema-content-matrix'],
|
|
10508
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
10509
|
+
className: style['schema-content-matrix-inner'],
|
|
10510
|
+
style: {
|
|
10511
|
+
'--matrix-scale-option-count': optionCount
|
|
10512
|
+
},
|
|
10513
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
10514
|
+
className: style['schema-content-matrix-header'],
|
|
10515
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10516
|
+
className: style['schema-content-matrix-row-title'],
|
|
10517
|
+
children: rowTitle
|
|
10518
|
+
}), columns.map(column => /*#__PURE__*/jsx("div", {
|
|
10519
|
+
className: style['schema-content-matrix-option-title'],
|
|
10520
|
+
children: column.label || String(column.name)
|
|
10521
|
+
}, String(column.name)))]
|
|
10522
|
+
}), rows.map(row => {
|
|
10523
|
+
const rowName = String(row.name).trim();
|
|
10524
|
+
const rowData = (matrixData == null ? void 0 : matrixData[rowName]) || {};
|
|
10525
|
+
return /*#__PURE__*/jsxs("div", {
|
|
10526
|
+
className: [style['schema-content-matrix-row'], style['is-cells']].join(' '),
|
|
10527
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10528
|
+
className: style['schema-content-matrix-row-label'],
|
|
10529
|
+
children: row.label || rowName
|
|
10530
|
+
}), columns.map(column => {
|
|
10531
|
+
const columnName = String(column.name).trim();
|
|
10532
|
+
return /*#__PURE__*/jsx("div", {
|
|
10533
|
+
className: style['schema-content-matrix-cell'],
|
|
10534
|
+
children: formatCell(rowData == null ? void 0 : rowData[columnName])
|
|
10535
|
+
}, columnName);
|
|
10536
|
+
})]
|
|
10537
|
+
}, rowName);
|
|
10538
|
+
})]
|
|
10539
|
+
})
|
|
10540
|
+
});
|
|
10541
|
+
}
|
|
10542
|
+
|
|
10543
|
+
// field:每行一个值,仍保留行标题列的矩阵观感
|
|
10544
|
+
return /*#__PURE__*/jsx("div", {
|
|
10545
|
+
className: [style['schema-content-matrix'], isMobile ? style['is-mobile'] : null].filter(Boolean).join(' '),
|
|
10546
|
+
children: isMobile ? rows.map(row => {
|
|
10547
|
+
const rowName = String(row.name).trim();
|
|
10548
|
+
const text = formatFieldValue({
|
|
10549
|
+
type: fieldType,
|
|
10550
|
+
props: {}
|
|
10551
|
+
}, matrixData == null ? void 0 : matrixData[rowName], formatMessage) || emptyText;
|
|
10552
|
+
return /*#__PURE__*/jsxs("div", {
|
|
10553
|
+
className: style['schema-content-matrix-mobile-row'],
|
|
10554
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10555
|
+
className: style['schema-content-matrix-mobile-label'],
|
|
10556
|
+
children: row.label || rowName
|
|
10557
|
+
}), /*#__PURE__*/jsx("div", {
|
|
10558
|
+
className: style['schema-content-matrix-mobile-value'],
|
|
10559
|
+
children: text
|
|
10560
|
+
})]
|
|
10561
|
+
}, rowName);
|
|
10562
|
+
}) : /*#__PURE__*/jsxs("div", {
|
|
10563
|
+
className: style['schema-content-matrix-inner'],
|
|
10564
|
+
style: {
|
|
10565
|
+
'--matrix-scale-option-count': 1
|
|
10566
|
+
},
|
|
10567
|
+
children: [rowTitle ? /*#__PURE__*/jsxs("div", {
|
|
10568
|
+
className: style['schema-content-matrix-header'],
|
|
10569
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10570
|
+
className: style['schema-content-matrix-row-title'],
|
|
10571
|
+
children: rowTitle
|
|
10572
|
+
}), /*#__PURE__*/jsx("div", {
|
|
10573
|
+
className: style['schema-content-matrix-option-title']
|
|
10574
|
+
})]
|
|
10575
|
+
}) : null, rows.map(row => {
|
|
10576
|
+
const rowName = String(row.name).trim();
|
|
10577
|
+
const text = formatFieldValue({
|
|
10578
|
+
type: fieldType,
|
|
10579
|
+
props: {}
|
|
10580
|
+
}, matrixData == null ? void 0 : matrixData[rowName], formatMessage) || emptyText;
|
|
10581
|
+
return /*#__PURE__*/jsxs("div", {
|
|
10582
|
+
className: [style['schema-content-matrix-row'], style['is-cells']].join(' '),
|
|
10583
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10584
|
+
className: style['schema-content-matrix-row-label'],
|
|
10585
|
+
children: row.label || rowName
|
|
10586
|
+
}), /*#__PURE__*/jsx("div", {
|
|
10587
|
+
className: style['schema-content-matrix-cell'],
|
|
10588
|
+
children: text
|
|
10589
|
+
})]
|
|
10590
|
+
}, rowName);
|
|
10591
|
+
})]
|
|
10592
|
+
})
|
|
10593
|
+
});
|
|
10594
|
+
};
|
|
10210
10595
|
const getByPath = (data, path) => {
|
|
10211
10596
|
if (data == null || path == null || path === '') {
|
|
10212
10597
|
return data;
|
|
@@ -10232,12 +10617,13 @@ const formatFieldValue = (field, value, formatMessage) => formatFieldDisplayValu
|
|
|
10232
10617
|
* 改为 label 在上、值在下,避免窄栏(如弹窗双栏预览)被撑乱。
|
|
10233
10618
|
*/
|
|
10234
10619
|
const renderFieldsContent = (fields, data, formatMessage, column, {
|
|
10235
|
-
|
|
10620
|
+
indexMap: _indexMap = null,
|
|
10236
10621
|
isFieldVisible
|
|
10237
10622
|
} = {}) => {
|
|
10238
|
-
const list = (fields || []).filter(field => field && !field.hidden && field.name && (!isFieldVisible || isFieldVisible(field))).map(
|
|
10623
|
+
const list = (fields || []).filter(field => field && !field.hidden && field.name && (!isFieldVisible || isFieldVisible(field))).map(field => {
|
|
10239
10624
|
const baseLabel = field.label || field.name;
|
|
10240
|
-
const
|
|
10625
|
+
const displayIndex = fieldDisplayIndex(_indexMap, field);
|
|
10626
|
+
const label = displayIndex != null ? `${displayIndex}. ${baseLabel}` : baseLabel;
|
|
10241
10627
|
return {
|
|
10242
10628
|
label,
|
|
10243
10629
|
content: formatFieldValue(field, getByPath(data, field.name), formatMessage),
|
|
@@ -10266,6 +10652,42 @@ const renderFieldsContent = (fields, data, formatMessage, column, {
|
|
|
10266
10652
|
});
|
|
10267
10653
|
};
|
|
10268
10654
|
const renderBlockList = (blocks, data, ctx) => (blocks || []).map(block => renderBlock(block, data, ctx)).filter(Boolean);
|
|
10655
|
+
|
|
10656
|
+
/** 列表项标题:优先 itemTitle,其次首个带标题的 itemBlock(与填写态 List 常见结构对齐),避免只显示「第 N 项」 */
|
|
10657
|
+
const resolveListItemTitle = (block, item, index, formatMessage) => {
|
|
10658
|
+
if (typeof block.itemTitle === 'function') {
|
|
10659
|
+
try {
|
|
10660
|
+
const title = block.itemTitle({
|
|
10661
|
+
index,
|
|
10662
|
+
data: item
|
|
10663
|
+
});
|
|
10664
|
+
if (title != null && title !== '') {
|
|
10665
|
+
return {
|
|
10666
|
+
title,
|
|
10667
|
+
titleFromItemBlockId: null
|
|
10668
|
+
};
|
|
10669
|
+
}
|
|
10670
|
+
} catch (e) {
|
|
10671
|
+
// ignore bad itemTitle
|
|
10672
|
+
}
|
|
10673
|
+
}
|
|
10674
|
+
// 只有列表自身没有字段、首个子块即项头时才借用其标题;否则会把「时间窗口」等子块标题误当成项标题
|
|
10675
|
+
const head = (block.list || []).length ? null : (block.itemBlocks || [])[0];
|
|
10676
|
+
if (head && (head.title || head.label)) {
|
|
10677
|
+
return {
|
|
10678
|
+
title: head.title || head.label,
|
|
10679
|
+
titleFromItemBlockId: head.id
|
|
10680
|
+
};
|
|
10681
|
+
}
|
|
10682
|
+
return {
|
|
10683
|
+
title: formatMessage({
|
|
10684
|
+
id: 'schemaContentItemIndex'
|
|
10685
|
+
}, {
|
|
10686
|
+
index: index + 1
|
|
10687
|
+
}),
|
|
10688
|
+
titleFromItemBlockId: null
|
|
10689
|
+
};
|
|
10690
|
+
};
|
|
10269
10691
|
const renderBlock = (block, data, ctx) => {
|
|
10270
10692
|
const {
|
|
10271
10693
|
formatMessage,
|
|
@@ -10276,8 +10698,11 @@ const renderBlock = (block, data, ctx) => {
|
|
|
10276
10698
|
if (!block || depth > MAX_BLOCK_DEPTH) {
|
|
10277
10699
|
return null;
|
|
10278
10700
|
}
|
|
10701
|
+
const indexCtx = resolveIndexContext(block, ctx);
|
|
10279
10702
|
const nextCtx = _extends({}, ctx, {
|
|
10280
|
-
depth: depth + 1
|
|
10703
|
+
depth: depth + 1,
|
|
10704
|
+
indexMap: indexCtx.indexMap,
|
|
10705
|
+
indexEnabled: indexCtx.indexEnabled
|
|
10281
10706
|
});
|
|
10282
10707
|
const bordered = isMobile ? false : block.bordered || undefined;
|
|
10283
10708
|
const partProps = {
|
|
@@ -10287,14 +10712,15 @@ const renderBlock = (block, data, ctx) => {
|
|
|
10287
10712
|
bordered,
|
|
10288
10713
|
className: depth === 0 ? InfoPage.partRootClassName : undefined
|
|
10289
10714
|
};
|
|
10715
|
+
const fieldIndexOpts = {
|
|
10716
|
+
indexMap: indexCtx.indexMap,
|
|
10717
|
+
isFieldVisible
|
|
10718
|
+
};
|
|
10290
10719
|
switch (block.kind) {
|
|
10291
10720
|
case 'formInfo':
|
|
10292
10721
|
{
|
|
10293
10722
|
return /*#__PURE__*/jsxs(InfoPage.Part, _extends({}, partProps, {
|
|
10294
|
-
children: [renderFieldsContent(block.list, data, formatMessage, block.column,
|
|
10295
|
-
showIndex: !!block.showIndex,
|
|
10296
|
-
isFieldVisible
|
|
10297
|
-
}), renderBlockList(block.blocks, data, nextCtx)]
|
|
10723
|
+
children: [renderFieldsContent(block.list, data, formatMessage, block.column, fieldIndexOpts), renderBlockList(block.blocks, data, nextCtx)]
|
|
10298
10724
|
}));
|
|
10299
10725
|
}
|
|
10300
10726
|
case 'object':
|
|
@@ -10302,9 +10728,7 @@ const renderBlock = (block, data, ctx) => {
|
|
|
10302
10728
|
const name = block.name != null && String(block.name).trim() ? String(block.name).trim() : '';
|
|
10303
10729
|
const nestedData = name ? getByPath(data, name) || {} : data;
|
|
10304
10730
|
return /*#__PURE__*/jsxs(InfoPage.Part, _extends({}, partProps, {
|
|
10305
|
-
children: [renderFieldsContent(block.list, nestedData, formatMessage, block.column,
|
|
10306
|
-
isFieldVisible
|
|
10307
|
-
}), renderBlockList(block.blocks, nestedData, nextCtx)]
|
|
10731
|
+
children: [renderFieldsContent(block.list, nestedData, formatMessage, block.column, fieldIndexOpts), renderBlockList(block.blocks, nestedData, nextCtx)]
|
|
10308
10732
|
}));
|
|
10309
10733
|
}
|
|
10310
10734
|
case 'list':
|
|
@@ -10315,15 +10739,27 @@ const renderBlock = (block, data, ctx) => {
|
|
|
10315
10739
|
const items = name ? getByPath(data, name) : null;
|
|
10316
10740
|
const rows = Array.isArray(items) ? items : [];
|
|
10317
10741
|
return /*#__PURE__*/jsx(InfoPage.Part, _extends({}, partProps, {
|
|
10318
|
-
children: rows.length ?
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10742
|
+
children: rows.length ? /*#__PURE__*/jsx("div", {
|
|
10743
|
+
className: style['schema-content-list-items'],
|
|
10744
|
+
children: rows.map((item, index) => {
|
|
10745
|
+
const {
|
|
10746
|
+
title: itemTitle,
|
|
10747
|
+
titleFromItemBlockId
|
|
10748
|
+
} = resolveListItemTitle(block, item || {}, index, formatMessage);
|
|
10749
|
+
// 标题已提到列表项头部,原 itemBlock 只剩字段:去掉边框,避免留下无标题空框
|
|
10750
|
+
const itemBlocks = supportsItemBlocks(block.kind) && titleFromItemBlockId ? (block.itemBlocks || []).map(child => child && child.id === titleFromItemBlockId ? _extends({}, child, {
|
|
10751
|
+
title: undefined,
|
|
10752
|
+
label: undefined,
|
|
10753
|
+
bordered: false
|
|
10754
|
+
}) : child) : block.itemBlocks;
|
|
10755
|
+
return /*#__PURE__*/jsxs(InfoPage.Part, {
|
|
10756
|
+
className: style['schema-content-list-item'],
|
|
10757
|
+
title: itemTitle,
|
|
10758
|
+
bordered: false,
|
|
10759
|
+
children: [renderFieldsContent(block.list, item || {}, formatMessage, 2, fieldIndexOpts), supportsItemBlocks(block.kind) ? renderBlockList(itemBlocks, item || {}, nextCtx) : null]
|
|
10760
|
+
}, `${block.id}-${index}`);
|
|
10761
|
+
})
|
|
10762
|
+
}) : formatMessage({
|
|
10327
10763
|
id: 'schemaContentEmptyValue'
|
|
10328
10764
|
})
|
|
10329
10765
|
}));
|
|
@@ -10357,16 +10793,88 @@ const renderBlock = (block, data, ctx) => {
|
|
|
10357
10793
|
})
|
|
10358
10794
|
}));
|
|
10359
10795
|
}
|
|
10796
|
+
case 'matrixScale':
|
|
10797
|
+
{
|
|
10798
|
+
const name = block.name != null && String(block.name).trim() ? String(block.name).trim() : '';
|
|
10799
|
+
if (!name) {
|
|
10800
|
+
return null;
|
|
10801
|
+
}
|
|
10802
|
+
const matrixData = getByPath(data, name) || {};
|
|
10803
|
+
const content = renderMatrixScaleContent(block, matrixData, formatMessage, isMobile);
|
|
10804
|
+
const title = block.title || block.label || undefined;
|
|
10805
|
+
// 矩阵表头已展示 rowTitle,Part 副标题不再重复挂它
|
|
10806
|
+
const subtitle = block.subtitle || undefined;
|
|
10807
|
+
if (!content && !title && !subtitle) {
|
|
10808
|
+
return null;
|
|
10809
|
+
}
|
|
10810
|
+
return /*#__PURE__*/jsx(InfoPage.Part, _extends({}, partProps, {
|
|
10811
|
+
title: title,
|
|
10812
|
+
subtitle: subtitle,
|
|
10813
|
+
children: content
|
|
10814
|
+
}));
|
|
10815
|
+
}
|
|
10360
10816
|
case 'steps':
|
|
10361
10817
|
{
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10818
|
+
const items = block.items || [];
|
|
10819
|
+
const total = items.length;
|
|
10820
|
+
const isFocus = block.stepsStyle === 'focus';
|
|
10821
|
+
const blockShowIndex = !!block.showIndex;
|
|
10822
|
+
return /*#__PURE__*/jsx("div", {
|
|
10823
|
+
className: style['schema-content-steps'],
|
|
10824
|
+
children: items.map((step, index) => {
|
|
10825
|
+
const stepTitle = step.title || formatMessage({
|
|
10826
|
+
id: 'untitledStep'
|
|
10827
|
+
}, {
|
|
10828
|
+
index: index + 1
|
|
10829
|
+
});
|
|
10830
|
+
const stepIndexCtx = resolveStepIndexContext(step, blockShowIndex);
|
|
10831
|
+
const stepCtx = _extends({}, nextCtx, {
|
|
10832
|
+
indexMap: stepIndexCtx.indexMap,
|
|
10833
|
+
indexEnabled: stepIndexCtx.indexEnabled
|
|
10834
|
+
});
|
|
10835
|
+
const body = /*#__PURE__*/jsxs(Fragment, {
|
|
10836
|
+
children: [renderFieldsContent(step.list, data, formatMessage, step.column || 1, {
|
|
10837
|
+
indexMap: stepIndexCtx.indexMap,
|
|
10838
|
+
isFieldVisible
|
|
10839
|
+
}), renderBlockList(step.blocks, data, stepCtx)]
|
|
10840
|
+
});
|
|
10841
|
+
if (isFocus) {
|
|
10842
|
+
return /*#__PURE__*/jsxs("section", {
|
|
10843
|
+
className: style['schema-content-step'],
|
|
10844
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
10845
|
+
className: style['steps-focus-header'],
|
|
10846
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
10847
|
+
className: style['steps-focus-meta'],
|
|
10848
|
+
children: /*#__PURE__*/jsxs("span", {
|
|
10849
|
+
className: style['steps-focus-count'],
|
|
10850
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
10851
|
+
className: style['steps-focus-count-current'],
|
|
10852
|
+
children: String(index + 1).padStart(2, '0')
|
|
10853
|
+
}), /*#__PURE__*/jsxs("span", {
|
|
10854
|
+
className: style['steps-focus-count-total'],
|
|
10855
|
+
children: ["/ ", String(total).padStart(2, '0')]
|
|
10856
|
+
})]
|
|
10857
|
+
})
|
|
10858
|
+
}), /*#__PURE__*/jsx("div", {
|
|
10859
|
+
className: style['steps-focus-title'],
|
|
10860
|
+
children: stepTitle
|
|
10861
|
+
}), step.subtitle ? /*#__PURE__*/jsx("div", {
|
|
10862
|
+
className: style['schema-content-step-subtitle'],
|
|
10863
|
+
children: step.subtitle
|
|
10864
|
+
}) : null]
|
|
10865
|
+
}), /*#__PURE__*/jsx("div", {
|
|
10866
|
+
className: style['schema-content-step-body'],
|
|
10867
|
+
children: body
|
|
10868
|
+
})]
|
|
10869
|
+
}, step.id || index);
|
|
10870
|
+
}
|
|
10871
|
+
return /*#__PURE__*/jsx(InfoPage.Part, {
|
|
10872
|
+
title: stepTitle,
|
|
10873
|
+
subtitle: step.subtitle || undefined,
|
|
10874
|
+
bordered: bordered,
|
|
10875
|
+
children: body
|
|
10876
|
+
}, step.id || index);
|
|
10877
|
+
})
|
|
10370
10878
|
}, block.id);
|
|
10371
10879
|
}
|
|
10372
10880
|
case 'choice':
|
|
@@ -10380,9 +10888,7 @@ const renderBlock = (block, data, ctx) => {
|
|
|
10380
10888
|
children: visibleOptions.map(option => /*#__PURE__*/jsxs(InfoPage.Part, {
|
|
10381
10889
|
title: option.title || undefined,
|
|
10382
10890
|
bordered: false,
|
|
10383
|
-
children: [renderFieldsContent(option.list, data, formatMessage, block.column,
|
|
10384
|
-
isFieldVisible
|
|
10385
|
-
}), renderBlockList(option.blocks, data, nextCtx)]
|
|
10891
|
+
children: [renderFieldsContent(option.list, data, formatMessage, block.column, fieldIndexOpts), renderBlockList(option.blocks, data, nextCtx)]
|
|
10386
10892
|
}, option.id))
|
|
10387
10893
|
}));
|
|
10388
10894
|
}
|