@tachybase/client 1.3.20 → 1.3.22
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/es/api-client/APIClient.d.ts +1 -1
- package/es/api-client/APIClient.mjs +1 -1
- package/es/api-client/hooks/assign.mjs +1 -1
- package/es/api-client/hooks/useResource.d.ts +1 -1
- package/es/application/Application.d.ts +1 -2
- package/es/application/Application.mjs +2 -11
- package/es/application/WebSocketClient.mjs +1 -1
- package/es/application/components/index.d.ts +0 -2
- package/es/application/components/index.mjs +0 -2
- package/es/application/schema-initializer/context/index.d.ts +1 -1
- package/es/application/utils/globalDeps.d.ts +1 -1
- package/es/application/utils/globalDeps.mjs +4 -12
- package/es/application/utils/remotePlugins.d.ts +1 -1
- package/es/block-provider/FormFieldProvider.mjs +1 -1
- package/es/block-provider/hooks/index.mjs +2 -2
- package/es/block-provider/hooks/useParsedFilter.mjs +1 -1
- package/es/built-in/acl/Configuration/RolesResourcesActions.mjs +1 -1
- package/es/built-in/context-menu/ContextMenuItemsProps.mjs +1 -1
- package/es/built-in/index.d.ts +2 -1
- package/es/built-in/index.mjs +4 -3
- package/es/built-in/page-style/useTabSettings.mjs +3 -3
- package/es/built-in/pm/PluginManager.mjs +1 -1
- package/es/built-in/quick-access/ModalActionSchemaInitializerItem.mjs +1 -1
- package/es/collection-manager/Configuration/AddCollectionAction.mjs +1 -1
- package/es/collection-manager/Configuration/AddFieldAction.mjs +1 -1
- package/es/collection-manager/Configuration/AddSubFieldAction.mjs +1 -1
- package/es/collection-manager/Configuration/EditCollectionAction.mjs +1 -1
- package/es/collection-manager/Configuration/EditFieldAction.mjs +1 -1
- package/es/collection-manager/Configuration/EditSubFieldAction.mjs +1 -1
- package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +1 -1
- package/es/collection-manager/Configuration/OverridingCollectionField.mjs +1 -1
- package/es/collection-manager/Configuration/SyncFieldsAction.mjs +1 -1
- package/es/collection-manager/Configuration/SyncSQLFieldsAction.mjs +1 -1
- package/es/collection-manager/Configuration/ViewInheritedField.mjs +1 -1
- package/es/collection-manager/collectionPlugin.mjs +36 -0
- package/es/collection-manager/hooks/useCollection_deprecated.d.ts +1 -1
- package/es/collection-manager/interfaces/json.mjs +1 -1
- package/es/collection-manager/interfaces/radioGroup.d.ts +11 -11
- package/es/collection-manager/interfaces/url.d.ts +4 -0
- package/es/collection-manager/interfaces/url.mjs +10 -1
- package/es/collection-manager/templates/expression.mjs +1 -1
- package/es/collection-manager/templates/properties/index.d.ts +1 -1
- package/es/collection-manager/templates/sql.d.ts +3 -3
- package/es/collection-manager/templates/view.d.ts +3 -3
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +1 -15
- package/es/data-source/data-block/DataBlockResourceProvider.d.ts +1 -1
- package/es/filter-provider/utils.mjs +1 -1
- package/es/modules/actions/link/customizeLinkActionSettings.mjs +1 -1
- package/es/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.mjs +1 -1
- package/es/modules/blocks/data-blocks/form/FormBlockInitializer.d.ts +11 -11
- package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +2 -5
- package/es/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.mjs +1 -1
- package/es/modules/blocks/data-blocks/list/listBlockSettings.mjs +1 -1
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +14 -2
- package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +1 -1
- package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +1 -3
- package/es/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.mjs +1 -1
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +0 -4
- package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +1 -5
- package/es/modules/blocks/filter-blocks/tree/filterTreeItemFieldSettings.mjs +1 -1
- package/es/modules/fields/component/Cascader/cascaderComponentFieldSettings.mjs +1 -1
- package/es/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.mjs +95 -5
- package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.d.ts +2 -0
- package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.mjs +99 -0
- package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.d.ts +2 -0
- package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.mjs +64 -0
- package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +15 -2
- package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +26 -7
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +1 -1
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +1 -1
- package/es/modules/menu/GroupItem.mjs +1 -1
- package/es/modules/menu/LinkMenuItem.mjs +1 -1
- package/es/modules/menu/PageMenuItem.mjs +1 -1
- package/es/modules/menu/UploadMenuItem.mjs +1 -1
- package/es/schema-component/antd/action/Action.Designer.mjs +1 -1
- package/es/schema-component/antd/action/Action.mjs +1 -1
- package/es/schema-component/antd/association-field/InternalCascadeSelect.mjs +1 -1
- package/es/schema-component/antd/association-field/InternalCascader.mjs +1 -2
- package/es/schema-component/antd/association-field/InternalNester.mjs +1 -1
- package/es/schema-component/antd/association-field/InternalSubTable.mjs +1 -1
- package/es/schema-component/antd/association-field/InternalViewer.mjs +4 -58
- package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +1 -1
- package/es/schema-component/antd/association-field/SubTabs/hook.mjs +1 -1
- package/es/schema-component/antd/association-field/hooks.d.ts +4 -0
- package/es/schema-component/antd/association-field/hooks.mjs +53 -2
- package/es/schema-component/antd/association-field/util.mjs +1 -1
- package/es/schema-component/antd/association-select/AssociationSelect.mjs +2 -2
- package/es/schema-component/antd/auto-complete/AutoComplete.mjs +1 -1
- package/es/schema-component/antd/color-picker/ColorPicker.mjs +1 -1
- package/es/schema-component/antd/color-picker/util.d.ts +1 -1
- package/es/schema-component/antd/color-picker/util.mjs +1 -1
- package/es/schema-component/antd/cron/Cron.mjs +1 -1
- package/es/schema-component/antd/date-picker/ReadPretty.mjs +1 -1
- package/es/schema-component/antd/date-picker/util.d.ts +1 -1
- package/es/schema-component/antd/date-picker/util.mjs +1 -1
- package/es/schema-component/antd/filter/FilterAction.mjs +1 -1
- package/es/schema-component/antd/form/Form.mjs +1 -1
- package/es/schema-component/antd/form-item/FormItem.Settings.mjs +1 -1
- package/es/schema-component/antd/form-item/FormItem.mjs +1 -1
- package/es/schema-component/antd/form-item/SchemaSettingOptions.mjs +1 -1
- package/es/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.mjs +1 -1
- package/es/schema-component/antd/form-item/hooks/useParseDefaultValue.mjs +1 -1
- package/es/schema-component/antd/form-v2/Form.Settings.mjs +1 -1
- package/es/schema-component/antd/form-v2/Form.mjs +1 -2
- package/es/schema-component/antd/form-v2/Templates.mjs +1 -1
- package/es/schema-component/antd/form-v2/utils.mjs +1 -2
- package/es/schema-component/antd/grid-card/GridCard.Decorator.mjs +1 -1
- package/es/schema-component/antd/grid-card/GridCard.Designer.mjs +1 -1
- package/es/schema-component/antd/icon-picker/IconPicker.mjs +1 -1
- package/es/schema-component/antd/index.d.ts +0 -1
- package/es/schema-component/antd/index.mjs +1 -2
- package/es/schema-component/antd/input/Input.mjs +2 -1
- package/es/schema-component/antd/input/ReadPretty.d.ts +1 -0
- package/es/schema-component/antd/input/ReadPretty.mjs +30 -2
- package/es/schema-component/antd/input-number/ReadPretty.mjs +1 -1
- package/es/schema-component/antd/list/List.Decorator.mjs +1 -1
- package/es/schema-component/antd/list/List.Designer.mjs +1 -1
- package/es/schema-component/antd/menu/Menu.Designer.mjs +1 -1
- package/es/schema-component/antd/menu/Menu.mjs +1 -1
- package/es/schema-component/antd/page/Page.Settings.mjs +0 -33
- package/es/schema-component/antd/page/Page.mjs +47 -96
- package/es/schema-component/antd/page/hooks/index.d.ts +1 -1
- package/es/schema-component/antd/page/hooks/index.mjs +1 -1
- package/es/schema-component/antd/page/index.d.ts +1 -0
- package/es/schema-component/antd/page/index.mjs +1 -0
- package/es/schema-component/antd/page/pageExtendComponentProvider.d.ts +3 -0
- package/es/schema-component/antd/page/pageExtendComponentProvider.mjs +9 -0
- package/es/schema-component/antd/page/style.d.ts +0 -5
- package/es/schema-component/antd/page/style.mjs +1 -45
- package/es/schema-component/antd/preview/Preview.mjs +1 -1
- package/es/schema-component/antd/quick-edit/QuickEdit.mjs +1 -1
- package/es/schema-component/antd/record-picker/util.mjs +1 -1
- package/es/schema-component/antd/select/FormulaSelect.mjs +17 -5
- package/es/schema-component/antd/select/ReadPretty.mjs +16 -3
- package/es/schema-component/antd/select/Select.mjs +7 -2
- package/es/schema-component/antd/select/utils.mjs +2 -2
- package/es/schema-component/antd/space/index.mjs +1 -1
- package/es/schema-component/antd/table/Table.Void.Designer.mjs +1 -1
- package/es/schema-component/antd/table-v2/Table.mjs +1 -1
- package/es/schema-component/antd/table-v2/TableBlockDesigner.mjs +1 -1
- package/es/schema-component/antd/table-v2/TableSelectorDesigner.mjs +1 -1
- package/es/schema-component/antd/time-picker/ReadPretty.mjs +1 -1
- package/es/schema-component/antd/time-picker/TimePicker.mjs +1 -1
- package/es/schema-component/antd/tree-select/ReadPretty.mjs +1 -1
- package/es/schema-component/antd/upload/ReadPretty.mjs +1 -2
- package/es/schema-component/antd/upload/Upload.mjs +1 -1
- package/es/schema-component/antd/variable/CodeMirror.mjs +1 -1
- package/es/schema-component/antd/variable/Input.mjs +1 -1
- package/es/schema-component/antd/variable/TextArea.mjs +1 -1
- package/es/schema-component/common/infinite-scroll/infinite-scroll.mjs +1 -1
- package/es/schema-component/hooks/useFieldModeOptions.mjs +13 -10
- package/es/schema-initializer/items/CustomFilterFormItemInitializer.mjs +2 -2
- package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.mjs +1 -1
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.mjs +1 -1
- package/es/schema-settings/DataTemplates/components/Designer.mjs +1 -1
- package/es/schema-settings/DataTemplates/utils.mjs +1 -1
- package/es/schema-settings/EditFormulaTitleField.mjs +19 -1
- package/es/schema-settings/LinkageRules/LinkageRuleAction.mjs +1 -1
- package/es/schema-settings/LinkageRules/components/EnableLinkage.mjs +1 -1
- package/es/schema-settings/LinkageRules/components/LinkageHeader.mjs +1 -1
- package/es/schema-settings/SchemaSettings.mjs +2 -3
- package/es/schema-settings/SchemaSettingsDefaultValue.mjs +1 -1
- package/es/schema-settings/SchemaSettingsPlugin.mjs +4 -0
- package/es/schema-settings/SchemaSettingsSortingRule.mjs +1 -1
- package/es/schema-settings/VariableInput/hooks/useContextAssociationFields.mjs +1 -1
- package/es/schema-settings/filter-form/FormFilterScope.mjs +1 -1
- package/es/schema-settings/hooks/useParseDataScopeFilter.mjs +1 -1
- package/es/user/ChangePassword.mjs +2 -2
- package/es/user/CurrentUser.mjs +1 -1
- package/es/user/CurrentUserSettingsMenuProvider.mjs +1 -1
- package/es/variables/VariablesProvider.mjs +2 -2
- package/es/variables/hooks/useBuiltinVariables.mjs +1 -1
- package/lib/api-client/APIClient.js +2 -2
- package/lib/api-client/hooks/assign.js +1 -1
- package/lib/application/Application.js +6 -15
- package/lib/application/WebSocketClient.js +2 -2
- package/lib/application/components/index.js +0 -18
- package/lib/application/utils/globalDeps.js +3 -11
- package/lib/block-provider/FormFieldProvider.js +1 -1
- package/lib/block-provider/hooks/index.js +14 -14
- package/lib/block-provider/hooks/useParsedFilter.js +1 -1
- package/lib/built-in/acl/Configuration/RolesResourcesActions.js +4 -4
- package/lib/built-in/context-menu/ContextMenuItemsProps.js +1 -1
- package/lib/built-in/index.js +42 -16
- package/lib/built-in/page-style/useTabSettings.js +3 -3
- package/lib/built-in/pm/PluginManager.js +1 -1
- package/lib/built-in/quick-access/ModalActionSchemaInitializerItem.js +1 -1
- package/lib/collection-manager/Configuration/AddCollectionAction.js +2 -2
- package/lib/collection-manager/Configuration/AddFieldAction.js +2 -2
- package/lib/collection-manager/Configuration/AddSubFieldAction.js +2 -2
- package/lib/collection-manager/Configuration/EditCollectionAction.js +2 -2
- package/lib/collection-manager/Configuration/EditFieldAction.js +2 -2
- package/lib/collection-manager/Configuration/EditSubFieldAction.js +2 -2
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +2 -2
- package/lib/collection-manager/Configuration/OverridingCollectionField.js +2 -2
- package/lib/collection-manager/Configuration/SyncFieldsAction.js +2 -2
- package/lib/collection-manager/Configuration/SyncSQLFieldsAction.js +2 -2
- package/lib/collection-manager/Configuration/ViewInheritedField.js +2 -2
- package/lib/collection-manager/collectionPlugin.js +36 -0
- package/lib/collection-manager/interfaces/json.js +3 -3
- package/lib/collection-manager/interfaces/url.js +10 -1
- package/lib/collection-manager/templates/expression.js +1 -1
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +1 -15
- package/lib/filter-provider/utils.js +1 -1
- package/lib/locale/zh-CN.js +1 -0
- package/lib/modules/actions/link/customizeLinkActionSettings.js +2 -2
- package/lib/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.js +2 -2
- package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +3 -6
- package/lib/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.js +2 -2
- package/lib/modules/blocks/data-blocks/list/listBlockSettings.js +2 -2
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +14 -2
- package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +2 -2
- package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +1 -3
- package/lib/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.js +2 -2
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +0 -4
- package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +3 -7
- package/lib/modules/blocks/filter-blocks/tree/filterTreeItemFieldSettings.js +3 -3
- package/lib/modules/fields/component/Cascader/cascaderComponentFieldSettings.js +2 -2
- package/lib/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.js +93 -3
- package/lib/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.js +133 -0
- package/lib/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.js +98 -0
- package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +16 -3
- package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +23 -4
- package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +3 -3
- package/lib/modules/menu/GroupItem.js +2 -2
- package/lib/modules/menu/LinkMenuItem.js +2 -2
- package/lib/modules/menu/PageMenuItem.js +2 -2
- package/lib/modules/menu/UploadMenuItem.js +2 -2
- package/lib/schema-component/antd/action/Action.Designer.js +3 -3
- package/lib/schema-component/antd/action/Action.js +1 -1
- package/lib/schema-component/antd/association-field/InternalCascadeSelect.js +4 -4
- package/lib/schema-component/antd/association-field/InternalCascader.js +4 -5
- package/lib/schema-component/antd/association-field/InternalNester.js +2 -2
- package/lib/schema-component/antd/association-field/InternalSubTable.js +2 -2
- package/lib/schema-component/antd/association-field/InternalViewer.js +1 -55
- package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +1 -1
- package/lib/schema-component/antd/association-field/SubTabs/hook.js +1 -1
- package/lib/schema-component/antd/association-field/hooks.js +55 -1
- package/lib/schema-component/antd/association-field/util.js +1 -1
- package/lib/schema-component/antd/association-select/AssociationSelect.js +12 -12
- package/lib/schema-component/antd/auto-complete/AutoComplete.js +1 -1
- package/lib/schema-component/antd/color-picker/ColorPicker.js +2 -2
- package/lib/schema-component/antd/color-picker/util.js +1 -1
- package/lib/schema-component/antd/cron/Cron.js +1 -1
- package/lib/schema-component/antd/date-picker/ReadPretty.js +1 -1
- package/lib/schema-component/antd/date-picker/util.js +1 -1
- package/lib/schema-component/antd/filter/FilterAction.js +1 -1
- package/lib/schema-component/antd/form/Form.js +3 -3
- package/lib/schema-component/antd/form-item/FormItem.Settings.js +3 -3
- package/lib/schema-component/antd/form-item/FormItem.js +2 -2
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +5 -5
- package/lib/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.js +1 -1
- package/lib/schema-component/antd/form-item/hooks/useParseDefaultValue.js +1 -1
- package/lib/schema-component/antd/form-v2/Form.Settings.js +2 -2
- package/lib/schema-component/antd/form-v2/Form.js +3 -4
- package/lib/schema-component/antd/form-v2/Templates.js +1 -1
- package/lib/schema-component/antd/form-v2/utils.js +2 -3
- package/lib/schema-component/antd/grid-card/GridCard.Decorator.js +2 -2
- package/lib/schema-component/antd/grid-card/GridCard.Designer.js +2 -2
- package/lib/schema-component/antd/icon-picker/IconPicker.js +2 -2
- package/lib/schema-component/antd/index.js +120 -187
- package/lib/schema-component/antd/input/Input.js +2 -1
- package/lib/schema-component/antd/input/ReadPretty.js +34 -6
- package/lib/schema-component/antd/input-number/ReadPretty.js +1 -1
- package/lib/schema-component/antd/list/List.Decorator.js +2 -2
- package/lib/schema-component/antd/list/List.Designer.js +2 -2
- package/lib/schema-component/antd/menu/Menu.Designer.js +2 -2
- package/lib/schema-component/antd/menu/Menu.js +1 -1
- package/lib/schema-component/antd/page/Page.Settings.js +0 -33
- package/lib/schema-component/antd/page/Page.js +43 -92
- package/lib/schema-component/antd/page/hooks/index.js +5 -5
- package/lib/schema-component/antd/page/index.js +9 -0
- package/lib/{application/components/ShareSchemaComponent.js → schema-component/antd/page/pageExtendComponentProvider.js} +15 -10
- package/lib/schema-component/antd/page/style.js +2 -49
- package/lib/schema-component/antd/preview/Preview.js +2 -2
- package/lib/schema-component/antd/quick-edit/QuickEdit.js +3 -3
- package/lib/schema-component/antd/record-picker/util.js +1 -1
- package/lib/schema-component/antd/select/FormulaSelect.js +17 -5
- package/lib/schema-component/antd/select/ReadPretty.js +15 -2
- package/lib/schema-component/antd/select/Select.js +7 -2
- package/lib/schema-component/antd/select/utils.js +2 -2
- package/lib/schema-component/antd/space/index.js +2 -2
- package/lib/schema-component/antd/table/Table.Void.Designer.js +2 -2
- package/lib/schema-component/antd/table-v2/Table.js +1 -1
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +2 -2
- package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +2 -2
- package/lib/schema-component/antd/time-picker/ReadPretty.js +2 -2
- package/lib/schema-component/antd/time-picker/TimePicker.js +3 -3
- package/lib/schema-component/antd/tree-select/ReadPretty.js +2 -2
- package/lib/schema-component/antd/upload/ReadPretty.js +2 -3
- package/lib/schema-component/antd/upload/Upload.js +2 -2
- package/lib/schema-component/antd/variable/CodeMirror.js +2 -2
- package/lib/schema-component/antd/variable/Input.js +1 -1
- package/lib/schema-component/antd/variable/TextArea.js +1 -1
- package/lib/schema-component/common/infinite-scroll/infinite-scroll.js +1 -1
- package/lib/schema-component/hooks/useFieldModeOptions.js +13 -10
- package/lib/schema-initializer/items/CustomFilterFormItemInitializer.js +4 -4
- package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.js +3 -3
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.js +10 -10
- package/lib/schema-settings/DataTemplates/components/Designer.js +1 -1
- package/lib/schema-settings/DataTemplates/utils.js +4 -4
- package/lib/schema-settings/EditFormulaTitleField.js +19 -1
- package/lib/schema-settings/LinkageRules/LinkageRuleAction.js +2 -2
- package/lib/schema-settings/LinkageRules/components/EnableLinkage.js +3 -3
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.js +10 -10
- package/lib/schema-settings/SchemaSettings.js +17 -18
- package/lib/schema-settings/SchemaSettingsDefaultValue.js +3 -3
- package/lib/schema-settings/SchemaSettingsPlugin.js +4 -0
- package/lib/schema-settings/SchemaSettingsSortingRule.js +2 -2
- package/lib/schema-settings/VariableInput/hooks/useContextAssociationFields.js +1 -1
- package/lib/schema-settings/filter-form/FormFilterScope.js +2 -2
- package/lib/schema-settings/hooks/useParseDataScopeFilter.js +1 -1
- package/lib/user/ChangePassword.js +2 -2
- package/lib/user/CurrentUser.js +1 -1
- package/lib/user/CurrentUserSettingsMenuProvider.js +1 -1
- package/lib/variables/VariablesProvider.js +2 -2
- package/lib/variables/hooks/useBuiltinVariables.js +1 -1
- package/package.json +9 -23
- package/es/application/components/SharePage.d.ts +0 -4
- package/es/application/components/SharePage.mjs +0 -113
- package/es/application/components/ShareSchemaComponent.d.ts +0 -1
- package/es/application/components/ShareSchemaComponent.mjs +0 -10
- package/es/schema-component/antd/page/hooks/useShareActions.d.ts +0 -7
- package/es/schema-component/antd/page/hooks/useShareActions.mjs +0 -242
- package/lib/application/components/SharePage.js +0 -156
- package/lib/schema-component/antd/page/hooks/useShareActions.js +0 -286
|
@@ -7,11 +7,11 @@ import { SchemaSettings } from "../../../../application/schema-settings/SchemaSe
|
|
|
7
7
|
import { useFormBlockContext } from "../../../../block-provider/index.mjs";
|
|
8
8
|
import { useCollectionManager_deprecated, useCollection_deprecated } from "../../../../collection-manager/index.mjs";
|
|
9
9
|
import { useFieldComponentName } from "../../../../common/useFieldComponentName.mjs";
|
|
10
|
-
import { useCollectionField } from "../../../../data-source/index.mjs";
|
|
10
|
+
import { useCollectionField, useDataSourceManager } from "../../../../data-source/index.mjs";
|
|
11
11
|
import { useRecord } from "../../../../record-provider/index.mjs";
|
|
12
|
-
import { removeNullCondition, useDesignable, useFieldModeOptions, useIsAddNewForm } from "../../../../schema-component/index.mjs";
|
|
12
|
+
import { removeNullCondition, useCompile, useDesignable, useFieldModeOptions, useIsAddNewForm } from "../../../../schema-component/index.mjs";
|
|
13
13
|
import { isSubMode } from "../../../../schema-component/antd/association-field/util.mjs";
|
|
14
|
-
import { useIsAssociationField, useIsFieldReadPretty,
|
|
14
|
+
import { useIsAssociationField, useIsFieldReadPretty, useIsSelectFieldMode, useTitleFieldOptions } from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
|
|
15
15
|
import { useColumnSchema } from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
|
|
16
16
|
import { VariableInput, getShouldChange, useFormulaTitleOptions } from "../../../../schema-settings/index.mjs";
|
|
17
17
|
import { useIsShowMultipleSwitch } from "../../../../schema-settings/hooks/useIsShowMultipleSwitch.mjs";
|
|
@@ -271,6 +271,7 @@ const fieldComponent = {
|
|
|
271
271
|
name: 'fieldComponent',
|
|
272
272
|
type: 'select',
|
|
273
273
|
useComponentProps () {
|
|
274
|
+
var _collectionInterface_componentOptions_filter, _collectionInterface_componentOptions;
|
|
274
275
|
const { t } = useTranslation();
|
|
275
276
|
const field = useField();
|
|
276
277
|
const collectionFieldCurrent = useCollectionField();
|
|
@@ -285,7 +286,8 @@ const fieldComponent = {
|
|
|
285
286
|
const fieldMode = useFieldComponentName();
|
|
286
287
|
const { dn } = useDesignable();
|
|
287
288
|
const isMuiltipleSelect = [
|
|
288
|
-
'select'
|
|
289
|
+
'select',
|
|
290
|
+
'multipleSelect'
|
|
289
291
|
].includes(null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface);
|
|
290
292
|
const optionsMuiltipleSelect = [
|
|
291
293
|
{
|
|
@@ -297,9 +299,27 @@ const fieldComponent = {
|
|
|
297
299
|
value: 'Radio group'
|
|
298
300
|
}
|
|
299
301
|
];
|
|
302
|
+
if ((null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface) === 'multipleSelect') {
|
|
303
|
+
const index = optionsMuiltipleSelect.findIndex((item)=>'Radio group' === item.value);
|
|
304
|
+
optionsMuiltipleSelect.splice(index, 1);
|
|
305
|
+
}
|
|
306
|
+
const dm = useDataSourceManager();
|
|
307
|
+
const collectionInterface = dm.collectionFieldInterfaceManager.getFieldInterface(null == collectionFieldCurrent ? void 0 : collectionFieldCurrent.interface);
|
|
308
|
+
const compile = useCompile();
|
|
309
|
+
if (fieldSchema['x-component-props']['multiple']) {
|
|
310
|
+
const index = fieldModeOptions.findIndex((item)=>'Radio group' === item.value);
|
|
311
|
+
fieldModeOptions.splice(index, 1);
|
|
312
|
+
}
|
|
313
|
+
const componentOptions = isMuiltipleSelect ? optionsMuiltipleSelect : fieldModeOptions;
|
|
314
|
+
null == collectionInterface || null == (_collectionInterface_componentOptions = collectionInterface.componentOptions) || null == (_collectionInterface_componentOptions_filter = _collectionInterface_componentOptions.filter((item)=>!item.useVisible || item.useVisible())) || _collectionInterface_componentOptions_filter.forEach((item)=>{
|
|
315
|
+
if (!(null == componentOptions ? void 0 : componentOptions.find((modeItem)=>modeItem.value === item.value))) null == componentOptions || componentOptions.push({
|
|
316
|
+
label: compile(item.label),
|
|
317
|
+
value: item.value
|
|
318
|
+
});
|
|
319
|
+
});
|
|
300
320
|
return {
|
|
301
321
|
title: t('Field component'),
|
|
302
|
-
options:
|
|
322
|
+
options: componentOptions,
|
|
303
323
|
value: fieldMode,
|
|
304
324
|
onChange (mode) {
|
|
305
325
|
const schema = {
|
|
@@ -390,8 +410,7 @@ const selectComponentFieldSettings = new SchemaSettings({
|
|
|
390
410
|
name: 'fieldSettings:component:Select',
|
|
391
411
|
items: [
|
|
392
412
|
{
|
|
393
|
-
...fieldComponent
|
|
394
|
-
useVisible: useIsMuiltipleAble
|
|
413
|
+
...fieldComponent
|
|
395
414
|
},
|
|
396
415
|
{
|
|
397
416
|
...setTheDataScope,
|
|
@@ -7,7 +7,7 @@ export declare const setDefaultSortingRules: {
|
|
|
7
7
|
useComponentProps(): {
|
|
8
8
|
title: string;
|
|
9
9
|
components: {
|
|
10
|
-
ArrayItems: import("@tachybase/schema").ReactFC<import("react").HTMLAttributes<HTMLDivElement>> & import("@
|
|
10
|
+
ArrayItems: import("@tachybase/schema").ReactFC<import("react").HTMLAttributes<HTMLDivElement>> & import("@tego/client").ArrayBaseMixins & {
|
|
11
11
|
Item: import("@tachybase/schema").ReactFC<React.HTMLAttributes<HTMLDivElement> & {
|
|
12
12
|
type?: "card" | "divide";
|
|
13
13
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
import { ArrayItems, Switch } from "@tachybase/components";
|
|
3
2
|
import { useField, useFieldSchema } from "@tachybase/schema";
|
|
3
|
+
import { ArrayItems, Switch } from "@tego/client";
|
|
4
4
|
import { useTranslation } from "react-i18next";
|
|
5
5
|
import { SchemaSettings } from "../../../../application/schema-settings/SchemaSettings.mjs";
|
|
6
6
|
import { useCollectionManager_deprecated, useSortFields } from "../../../../collection-manager/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useContext } from "react";
|
|
3
|
-
import { FormLayout } from "@tachybase/components";
|
|
4
3
|
import { SchemaOptionsContext } from "@tachybase/schema";
|
|
4
|
+
import { FormLayout } from "@tego/client";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { SchemaInitializerItem, useSchemaInitializer } from "../../application/index.mjs";
|
|
7
7
|
import { Icon } from "../../icon/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useContext } from "react";
|
|
3
|
-
import { FormLayout } from "@tachybase/components";
|
|
4
3
|
import { SchemaOptionsContext } from "@tachybase/schema";
|
|
4
|
+
import { FormLayout } from "@tego/client";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { SchemaInitializerItem, useSchemaInitializer } from "../../application/index.mjs";
|
|
7
7
|
import { Icon } from "../../icon/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useContext } from "react";
|
|
3
|
-
import { FormLayout } from "@tachybase/components";
|
|
4
3
|
import { SchemaOptionsContext, uid } from "@tachybase/schema";
|
|
4
|
+
import { FormLayout } from "@tego/client";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { SchemaInitializerItem, useSchemaInitializer } from "../../application/index.mjs";
|
|
7
7
|
import { Icon } from "../../icon/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useContext } from "react";
|
|
3
|
-
import { FormLayout } from "@tachybase/components";
|
|
4
3
|
import { SchemaOptionsContext } from "@tachybase/schema";
|
|
4
|
+
import { FormLayout } from "@tego/client";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { useAPIClient } from "../../api-client/hooks/useAPIClient.mjs";
|
|
7
7
|
import { SchemaInitializerItem, useSchemaInitializer } from "../../application/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useMemo, useState } from "react";
|
|
3
|
-
import { ArrayTable } from "@tachybase/components";
|
|
4
3
|
import { isValid, onFieldValueChange, uid as schema_uid, useField, useFieldSchema, useForm, useFormEffects } from "@tachybase/schema";
|
|
4
|
+
import { ArrayTable } from "@tego/client";
|
|
5
5
|
import { Alert, Flex, Tag } from "antd";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
import { RemoteSelect, useCompile, useDesignable } from "../../index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { RecursionField, observer, useField, useFieldSchema, useForm } from "@tachybase/schema";
|
|
4
|
-
import { isPortalInBody } from "@
|
|
4
|
+
import { isPortalInBody } from "@tego/client";
|
|
5
5
|
import { App, Button } from "antd";
|
|
6
6
|
import classnames from "classnames";
|
|
7
7
|
import lodash from "lodash";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
-
import { ArrayItems, FormItem } from "@tachybase/components";
|
|
4
3
|
import { FormProvider, connect, createForm, createSchemaField, observer, onFormValuesChange, uid, useField, useFieldSchema } from "@tachybase/schema";
|
|
4
|
+
import { ArrayItems, FormItem } from "@tego/client";
|
|
5
5
|
import { Input, Select, Space, Spin, Tag } from "antd";
|
|
6
6
|
import dayjs from "dayjs";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo, useState } from "react";
|
|
3
|
-
import { ArrayItems, FormItem } from "@tachybase/components";
|
|
4
3
|
import { FormProvider, connect, createForm, createSchemaField, observer, onFormValuesChange, uid, useField, useFieldSchema } from "@tachybase/schema";
|
|
5
|
-
import { fuzzysearch } from "@
|
|
4
|
+
import { ArrayItems, FormItem, fuzzysearch } from "@tego/client";
|
|
6
5
|
import { Input, Space } from "antd";
|
|
7
6
|
import { createStyles } from "antd-style";
|
|
8
7
|
import { useTranslation } from "react-i18next";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
-
import { FormLayout } from "@tachybase/components";
|
|
4
3
|
import { RecursionField, observer, useField, useFieldSchema } from "@tachybase/schema";
|
|
4
|
+
import { FormLayout } from "@tego/client";
|
|
5
5
|
import { createStyles } from "antd-style";
|
|
6
6
|
import classnames from "classnames";
|
|
7
7
|
import { ACLCollectionProvider, useACLActionParamsContext } from "../../../built-in/acl/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
-
import { FormLayout } from "@tachybase/components";
|
|
4
3
|
import { RecursionField, SchemaOptionsContext, observer, useField, useFieldSchema } from "@tachybase/schema";
|
|
4
|
+
import { FormLayout } from "@tego/client";
|
|
5
5
|
import { createStyles } from "antd-style";
|
|
6
6
|
import { ACLCollectionProvider, useACLActionParamsContext } from "../../../built-in/acl/index.mjs";
|
|
7
7
|
import { CollectionProvider_deprecated } from "../../../collection-manager/index.mjs";
|
|
@@ -11,9 +11,9 @@ import { FormProvider } from "../../core/index.mjs";
|
|
|
11
11
|
import { useCompile } from "../../hooks/index.mjs";
|
|
12
12
|
import { ActionContextProvider, useActionContext } from "../action/index.mjs";
|
|
13
13
|
import { EllipsisWithTooltip } from "../input/EllipsisWithTooltip.mjs";
|
|
14
|
-
import { useAssociationFieldContext, useFieldNames, useInsertSchema } from "./hooks.mjs";
|
|
14
|
+
import { useAssociationFieldContext, useCustomTitle, useFieldNames, useInsertSchema } from "./hooks.mjs";
|
|
15
15
|
import { transformNestedData } from "./InternalCascadeSelect.mjs";
|
|
16
|
-
import
|
|
16
|
+
import schema from "./schema.mjs";
|
|
17
17
|
import { getLabelFormatValue, useLabelUiSchemaV2 } from "./util.mjs";
|
|
18
18
|
const toValue = (value, placeholder)=>{
|
|
19
19
|
if (null == value) return placeholder;
|
|
@@ -41,7 +41,7 @@ const ReadPrettyInternalViewer = observer((props)=>{
|
|
|
41
41
|
const isTreeCollection = (null == targetCollection ? void 0 : targetCollection.template) === 'tree';
|
|
42
42
|
const ellipsisWithTooltipRef = useRef();
|
|
43
43
|
const getLabelUiSchema = useLabelUiSchemaV2();
|
|
44
|
-
const { formulaRecord, fieldNames } =
|
|
44
|
+
const { formulaRecord, fieldNames } = useCustomTitle(recordCtx, fieldSchema, defFieldNames);
|
|
45
45
|
const renderRecords = ()=>toArr(formulaRecord[fieldSchema['name']] || props.value).map((record, index, arr)=>{
|
|
46
46
|
var _getCollection_options, _getCollection, _targetCollection_fieldsMap_, _targetCollection_fieldsMap, _getCollection_options1, _getCollection1, _targetCollection_fieldsMap_1, _targetCollection_fieldsMap1;
|
|
47
47
|
const value = null == record ? void 0 : record[(null == fieldNames ? void 0 : fieldNames.label) || 'label'];
|
|
@@ -57,7 +57,7 @@ const ReadPrettyInternalViewer = observer((props)=>{
|
|
|
57
57
|
var _ellipsisWithTooltipRef_current;
|
|
58
58
|
e.stopPropagation();
|
|
59
59
|
e.preventDefault();
|
|
60
|
-
if (designable) insertViewer(
|
|
60
|
+
if (designable) insertViewer(schema.Viewer);
|
|
61
61
|
setVisible(true);
|
|
62
62
|
setRecord(record);
|
|
63
63
|
null == ellipsisWithTooltipRef || null == (_ellipsisWithTooltipRef_current = ellipsisWithTooltipRef.current) || _ellipsisWithTooltipRef_current.setPopoverVisible(false);
|
|
@@ -134,58 +134,4 @@ const ReadPrettyInternalViewer = observer((props)=>{
|
|
|
134
134
|
}, {
|
|
135
135
|
displayName: 'ReadPrettyInternalViewer'
|
|
136
136
|
});
|
|
137
|
-
const customTitle = (record, schema, fieldNames)=>{
|
|
138
|
-
var _schema_xcomponentprops, _schema_xcomponentprops_fieldNames, _schema_xcomponentprops1;
|
|
139
|
-
if ((null == (_schema_xcomponentprops = schema['x-component-props']) ? void 0 : _schema_xcomponentprops.mode) === 'CustomTitle' && (null == (_schema_xcomponentprops1 = schema['x-component-props']) ? void 0 : null == (_schema_xcomponentprops_fieldNames = _schema_xcomponentprops1.fieldNames) ? void 0 : _schema_xcomponentprops_fieldNames.formula)) {
|
|
140
|
-
var _schema_xcomponentprops_fieldNames1, _schema_xcomponentprops2;
|
|
141
|
-
const regex = /{{(.*?)}}/g;
|
|
142
|
-
const valueOject = {};
|
|
143
|
-
let outputStr = '';
|
|
144
|
-
let match;
|
|
145
|
-
const formula = null == (_schema_xcomponentprops2 = schema['x-component-props']) ? void 0 : null == (_schema_xcomponentprops_fieldNames1 = _schema_xcomponentprops2.fieldNames) ? void 0 : _schema_xcomponentprops_fieldNames1.formula;
|
|
146
|
-
while(match = regex.exec(formula))if (match[1].includes('.')) {
|
|
147
|
-
const fieldList = [
|
|
148
|
-
schema.name
|
|
149
|
-
];
|
|
150
|
-
fieldList.push(...match[1].split('.'));
|
|
151
|
-
const result = {
|
|
152
|
-
currRecord: record,
|
|
153
|
-
value: ''
|
|
154
|
-
};
|
|
155
|
-
fieldList.forEach((value, index)=>{
|
|
156
|
-
var _result_currRecord;
|
|
157
|
-
if (fieldList.length - 1 !== index) {
|
|
158
|
-
var _result_currRecord1;
|
|
159
|
-
result.currRecord = null == (_result_currRecord1 = result.currRecord) ? void 0 : _result_currRecord1[value];
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
result.value = null == (_result_currRecord = result.currRecord) ? void 0 : _result_currRecord[value];
|
|
163
|
-
});
|
|
164
|
-
var _result_value;
|
|
165
|
-
valueOject[match[1]] = null != (_result_value = result.value) ? _result_value : '';
|
|
166
|
-
} else {
|
|
167
|
-
var _record_schema_name;
|
|
168
|
-
valueOject[match[1]] = (null == (_record_schema_name = record[schema['name']]) ? void 0 : _record_schema_name[match[1]]) || '';
|
|
169
|
-
}
|
|
170
|
-
outputStr = replacePlaceholders(formula, valueOject);
|
|
171
|
-
record[schema['name']] = {
|
|
172
|
-
...record[schema['name']],
|
|
173
|
-
customLabel: outputStr
|
|
174
|
-
};
|
|
175
|
-
return {
|
|
176
|
-
formulaRecord: record,
|
|
177
|
-
fieldNames: {
|
|
178
|
-
...fieldNames,
|
|
179
|
-
label: 'customLabel'
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
formulaRecord: record,
|
|
185
|
-
fieldNames
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
const replacePlaceholders = (inputStr, values)=>inputStr.replace(/{{(.*?)}}/g, function(match, placeholder) {
|
|
189
|
-
return Object.prototype.hasOwnProperty.call(values, placeholder) ? values[placeholder] : match;
|
|
190
|
-
});
|
|
191
137
|
export { ReadPrettyInternalViewer, isObject };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState } from "react";
|
|
3
3
|
import { Schema, observer, onFieldChange, useFieldSchema, useFormEffects } from "@tachybase/schema";
|
|
4
|
-
import { fuzzysearch } from "@tachybase/utils/client";
|
|
5
4
|
import { CheckOutlined, SearchOutlined } from "@ant-design/icons";
|
|
5
|
+
import { fuzzysearch } from "@tego/client";
|
|
6
6
|
import { useAsyncEffect, useDeepCompareEffect } from "ahooks";
|
|
7
7
|
import { Button, Collapse, Input, Space } from "antd";
|
|
8
8
|
import flat from "flat";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { reaction } from "@tachybase/schema";
|
|
3
|
-
import { flatten, getValuesByPath } from "@
|
|
3
|
+
import { flatten, getValuesByPath } from "@tego/client";
|
|
4
4
|
import lodash from "lodash";
|
|
5
5
|
import { mergeFilter } from "../../../../filter-provider/index.mjs";
|
|
6
6
|
import { useParseDataScopeFilter } from "../../../../schema-settings/index.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
2
2
|
import { reaction, useField, useFieldSchema } from "@tachybase/schema";
|
|
3
|
-
import { flatten, getValuesByPath } from "@
|
|
3
|
+
import { flatten, getValuesByPath } from "@tego/client";
|
|
4
4
|
import lodash, { isString } from "lodash";
|
|
5
5
|
import cloneDeep from "lodash/cloneDeep";
|
|
6
6
|
import { useCollectionManager_deprecated, useCollection_deprecated } from "../../../collection-manager/index.mjs";
|
|
@@ -147,4 +147,55 @@ const useSubFormValue = ()=>{
|
|
|
147
147
|
collection
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
-
|
|
150
|
+
const useCustomTitle = (record, schema, fieldNames)=>{
|
|
151
|
+
var _schema_xcomponentprops, _schema_xcomponentprops_fieldNames, _schema_xcomponentprops1;
|
|
152
|
+
if ((null == (_schema_xcomponentprops = schema['x-component-props']) ? void 0 : _schema_xcomponentprops.mode) === 'CustomTitle' && (null == (_schema_xcomponentprops1 = schema['x-component-props']) ? void 0 : null == (_schema_xcomponentprops_fieldNames = _schema_xcomponentprops1.fieldNames) ? void 0 : _schema_xcomponentprops_fieldNames.formula)) {
|
|
153
|
+
if (Array.isArray(record[schema['name']])) record[schema['name']].forEach((recordItem)=>{
|
|
154
|
+
recordItem['customLabel'] = getCustomLabel(recordItem, schema);
|
|
155
|
+
});
|
|
156
|
+
else record[schema['name']]['customLabel'] = getCustomLabel(record[schema['name']], schema);
|
|
157
|
+
return {
|
|
158
|
+
formulaRecord: record,
|
|
159
|
+
fieldNames: {
|
|
160
|
+
...fieldNames,
|
|
161
|
+
label: 'customLabel'
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
formulaRecord: record,
|
|
167
|
+
fieldNames
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
const getCustomLabel = (record, schema)=>{
|
|
171
|
+
var _schema_xcomponentprops_fieldNames, _schema_xcomponentprops;
|
|
172
|
+
const regex = /{{(.*?)}}/g;
|
|
173
|
+
const valueOject = {};
|
|
174
|
+
let outputStr = '';
|
|
175
|
+
let match;
|
|
176
|
+
const formula = null == (_schema_xcomponentprops = schema['x-component-props']) ? void 0 : null == (_schema_xcomponentprops_fieldNames = _schema_xcomponentprops.fieldNames) ? void 0 : _schema_xcomponentprops_fieldNames.formula;
|
|
177
|
+
while(match = regex.exec(formula))if (match[1].includes('.')) {
|
|
178
|
+
const fieldList = match[1].split('.');
|
|
179
|
+
const result = {
|
|
180
|
+
currRecord: record,
|
|
181
|
+
value: ''
|
|
182
|
+
};
|
|
183
|
+
fieldList.forEach((value, index)=>{
|
|
184
|
+
var _result_currRecord;
|
|
185
|
+
if (fieldList.length - 1 !== index) {
|
|
186
|
+
var _result_currRecord1;
|
|
187
|
+
result.currRecord = null == (_result_currRecord1 = result.currRecord) ? void 0 : _result_currRecord1[value];
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
result.value = null == (_result_currRecord = result.currRecord) ? void 0 : _result_currRecord[value];
|
|
191
|
+
});
|
|
192
|
+
var _result_value;
|
|
193
|
+
valueOject[match[1]] = null != (_result_value = result.value) ? _result_value : '';
|
|
194
|
+
} else valueOject[match[1]] = record[match[1]] || '';
|
|
195
|
+
outputStr = replacePlaceholders(formula, valueOject);
|
|
196
|
+
return outputStr;
|
|
197
|
+
};
|
|
198
|
+
const replacePlaceholders = (inputStr, values)=>inputStr.replace(/{{(.*?)}}/g, function(match, placeholder) {
|
|
199
|
+
return Object.prototype.hasOwnProperty.call(values, placeholder) ? values[placeholder] : match;
|
|
200
|
+
});
|
|
201
|
+
export { SubFormProvider, useServiceOptions as default, useAssociationFieldContext, useCustomTitle, useFieldNames, useInsertSchema, useSubFormValue };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import react from "react";
|
|
2
2
|
import { isArr } from "@tachybase/schema";
|
|
3
|
-
import { getDefaultFormat, str2moment } from "@
|
|
3
|
+
import { getDefaultFormat, str2moment } from "@tego/client";
|
|
4
4
|
import { Tag } from "antd";
|
|
5
5
|
import { useCollectionManager_deprecated } from "../../../collection-manager/index.mjs";
|
|
6
6
|
const useLabelUiSchemaV2 = ()=>{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo } from "react";
|
|
3
|
-
import { ArrayCollapse, ArrayItems, FormLayout } from "@tachybase/components";
|
|
4
3
|
import { connect, mapProps, mapReadPretty, uid, useField, useFieldSchema } from "@tachybase/schema";
|
|
5
4
|
import { LoadingOutlined } from "@ant-design/icons";
|
|
5
|
+
import { ArrayCollapse, ArrayItems, FormLayout } from "@tego/client";
|
|
6
6
|
import lodash from "lodash";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
8
8
|
import { useFilterByTk, useFormBlockContext } from "../../../block-provider/index.mjs";
|
|
@@ -242,7 +242,7 @@ AssociationSelect.Designer = function() {
|
|
|
242
242
|
title: t('Set default value'),
|
|
243
243
|
properties: {
|
|
244
244
|
default: {
|
|
245
|
-
...fieldSchemaWithoutRequired
|
|
245
|
+
...fieldSchemaWithoutRequired,
|
|
246
246
|
'x-decorator': 'FormItem',
|
|
247
247
|
'x-component-props': {
|
|
248
248
|
...fieldSchemaWithoutRequired['x-component-props'],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { connect, mapProps, mapReadPretty, useFieldSchema } from "@tachybase/schema";
|
|
4
|
-
import { fuzzysearch } from "@
|
|
4
|
+
import { fuzzysearch } from "@tego/client";
|
|
5
5
|
import { useAsyncEffect } from "ahooks";
|
|
6
6
|
import { AutoComplete } from "antd";
|
|
7
7
|
import { useAPIClient } from "../../../api-client/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { usePrefixCls } from "@tachybase/components";
|
|
4
3
|
import { connect, mapProps, mapReadPretty } from "@tachybase/schema";
|
|
4
|
+
import { usePrefixCls } from "@tego/client";
|
|
5
5
|
import { ColorPicker } from "antd";
|
|
6
6
|
import { createStyles } from "antd-style";
|
|
7
7
|
import classnames from "classnames";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dayjs, getDefaultFormat, str2moment, toGmt, toLocal } from "@
|
|
1
|
+
import { dayjs, getDefaultFormat, str2moment, toGmt, toLocal } from "@tego/client";
|
|
2
2
|
const toStringByPicker = (value, picker, timezone)=>{
|
|
3
3
|
if (!dayjs.isDayjs(value)) return value;
|
|
4
4
|
if ('local' === timezone) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { connect, mapReadPretty } from "@tachybase/schema";
|
|
4
|
-
import { error } from "@
|
|
4
|
+
import { error } from "@tego/client";
|
|
5
5
|
import { createStyles } from "antd-style";
|
|
6
6
|
import cronstrue from "cronstrue";
|
|
7
7
|
import { Cron } from "react-js-cron";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { isArr } from "@tachybase/schema";
|
|
4
|
-
import { getDefaultFormat, str2moment } from "@
|
|
4
|
+
import { getDefaultFormat, str2moment } from "@tego/client";
|
|
5
5
|
import classnames from "classnames";
|
|
6
6
|
import dayjs from "dayjs";
|
|
7
7
|
import { usePrefixCls } from "../__builtins__/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dayjs, getDefaultFormat, str2moment, toGmt, toLocal } from "@
|
|
1
|
+
import { dayjs, getDefaultFormat, str2moment, toGmt, toLocal } from "@tego/client";
|
|
2
2
|
const toStringByPicker = (value, picker, timezone)=>{
|
|
3
3
|
if (!dayjs.isDayjs(value)) return value;
|
|
4
4
|
if ('local' === timezone) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
3
3
|
import { createForm, observer, useField, useFieldSchema, useForm } from "@tachybase/schema";
|
|
4
|
-
import { flatten, unflatten } from "@
|
|
4
|
+
import { flatten, unflatten } from "@tego/client";
|
|
5
5
|
import { Button, Space } from "antd";
|
|
6
6
|
import { createStyles } from "antd-style";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useContext, useEffect, useMemo } from "react";
|
|
3
|
-
import { FormLayout } from "@tachybase/components";
|
|
4
3
|
import { FieldContext, FormContext, RecursionField, createForm, observer, useField, useFieldSchema } from "@tachybase/schema";
|
|
4
|
+
import { FormLayout } from "@tego/client";
|
|
5
5
|
import { ConfigProvider, Spin } from "antd";
|
|
6
6
|
import { useAttach, useComponent } from "../../index.mjs";
|
|
7
7
|
import { useRequest } from "../../../api-client/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { ArrayCollapse, FormLayout } from "@tachybase/components";
|
|
4
3
|
import { useField, useFieldSchema } from "@tachybase/schema";
|
|
4
|
+
import { ArrayCollapse, FormLayout } from "@tego/client";
|
|
5
5
|
import lodash from "lodash";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
import { SchemaSettings } from "../../../application/schema-settings/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo } from "react";
|
|
3
|
-
import { FormItem } from "@tachybase/components";
|
|
4
3
|
import { useField, useFieldSchema } from "@tachybase/schema";
|
|
4
|
+
import { FormItem } from "@tego/client";
|
|
5
5
|
import { createStyles } from "antd-style";
|
|
6
6
|
import classnames from "classnames";
|
|
7
7
|
import { useApp } from "../../../application/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { ArrayCollapse, FormLayout } from "@tachybase/components";
|
|
4
3
|
import { useField, useFieldSchema } from "@tachybase/schema";
|
|
4
|
+
import { ArrayCollapse, FormLayout } from "@tego/client";
|
|
5
5
|
import lodash from "lodash";
|
|
6
6
|
import { useTranslation } from "react-i18next";
|
|
7
7
|
import { useFormBlockContext } from "../../../block-provider/index.mjs";
|
package/es/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef } from "react";
|
|
2
2
|
import { useField, useFieldSchema, useForm } from "@tachybase/schema";
|
|
3
|
-
import { nextTick } from "@
|
|
3
|
+
import { nextTick } from "@tego/client";
|
|
4
4
|
import lodash from "lodash";
|
|
5
5
|
import { useAssociationNames } from "../../../../block-provider/hooks/index.mjs";
|
|
6
6
|
import { useCollectionManager_deprecated, useCollection_deprecated } from "../../../../collection-manager/index.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback, useEffect } from "react";
|
|
2
2
|
import { reaction, useField, useFieldSchema } from "@tachybase/schema";
|
|
3
|
-
import { getValuesByPath } from "@
|
|
3
|
+
import { getValuesByPath } from "@tego/client";
|
|
4
4
|
import lodash from "lodash";
|
|
5
5
|
import { useRecordIndex } from "../../../../record-provider/index.mjs";
|
|
6
6
|
import { useCollection_deprecated } from "../../../../collection-manager/index.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArrayItems } from "@tachybase/components";
|
|
2
1
|
import { useField, useFieldSchema } from "@tachybase/schema";
|
|
2
|
+
import { ArrayItems } from "@tego/client";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { SchemaSettings } from "../../../application/schema-settings/index.mjs";
|
|
5
5
|
import { useFormBlockContext } from "../../../block-provider/index.mjs";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo } from "react";
|
|
3
|
-
import { FormLayout } from "@tachybase/components";
|
|
4
3
|
import { FieldContext, FormContext, RecursionField, createForm, observer, onFieldInit, onFormInputChange, reaction, uid, useField, useFieldSchema } from "@tachybase/schema";
|
|
5
|
-
import { getValuesByPath } from "@
|
|
4
|
+
import { FormLayout, getValuesByPath } from "@tego/client";
|
|
6
5
|
import { ConfigProvider, Spin } from "antd";
|
|
7
6
|
import { createStyles } from "antd-style";
|
|
8
7
|
import { useActionContext } from "../index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { useFieldSchema } from "@tachybase/schema";
|
|
4
|
-
import { error, forEach } from "@
|
|
4
|
+
import { error, forEach } from "@tego/client";
|
|
5
5
|
import { Select, Space } from "antd";
|
|
6
6
|
import lodash from "lodash";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { evaluators } from "@
|
|
2
|
-
import { uid } from "@tachybase/utils/client";
|
|
1
|
+
import { evaluators, uid } from "@tego/client";
|
|
3
2
|
import lodash from "lodash";
|
|
4
3
|
import { ActionType } from "../../../schema-settings/LinkageRules/type.mjs";
|
|
5
4
|
import { REGEX_OF_VARIABLE } from "../../../variables/utils/isVariable.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useContext, useEffect, useMemo } from "react";
|
|
3
|
-
import { FormLayout } from "@tachybase/components";
|
|
4
3
|
import { FormContext, createForm, useField, useFieldSchema } from "@tachybase/schema";
|
|
4
|
+
import { FormLayout } from "@tego/client";
|
|
5
5
|
import { withDynamicSchemaProps } from "../../../application/hoc/withDynamicSchemaProps.mjs";
|
|
6
6
|
import { BlockProvider, useBlockRequestContext } from "../../../block-provider/index.mjs";
|
|
7
7
|
import { useGridCardBlockParams } from "../../../modules/blocks/data-blocks/grid-card/hooks/useGridCardBlockParams.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { ArrayItems } from "@tachybase/components";
|
|
4
3
|
import { useField, useFieldSchema } from "@tachybase/schema";
|
|
4
|
+
import { ArrayItems } from "@tego/client";
|
|
5
5
|
import { Slider } from "antd";
|
|
6
6
|
import lodash from "lodash";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { useFormLayout } from "@tachybase/components";
|
|
4
3
|
import { connect, isValid, mapProps, mapReadPretty } from "@tachybase/schema";
|
|
5
4
|
import { CloseOutlined, LoadingOutlined } from "@ant-design/icons";
|
|
5
|
+
import { useFormLayout } from "@tego/client";
|
|
6
6
|
import { Button, Space } from "antd";
|
|
7
7
|
import { useTranslation } from "react-i18next";
|
|
8
8
|
import { Icon, hasIcon } from "../../../icon/index.mjs";
|