@tachybase/client 1.3.9 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/api-client/APIClient.mjs +20 -20
- package/es/api-client/APIClientProvider.mjs +3 -3
- package/es/api-client/context.mjs +3 -3
- package/es/api-client/hooks/assign.mjs +8 -8
- package/es/api-client/hooks/useAPIClient.mjs +3 -3
- package/es/api-client/hooks/useRequest.mjs +14 -14
- package/es/api-client/hooks/useResource.mjs +2 -2
- package/es/application/AppSchemaComponentProvider.mjs +8 -8
- package/es/application/Application.mjs +95 -110
- package/es/application/CustomRouterContextProvider.mjs +72 -72
- package/es/application/NoticesManager.mjs +21 -21
- package/es/application/Plugin.mjs +1 -1
- package/es/application/PluginManager.mjs +5 -5
- package/es/application/RouterManager.mjs +26 -26
- package/es/application/SystemSettingsManager.mjs +9 -9
- package/es/application/UserSettingsManager.mjs +9 -9
- package/es/application/WebSocketClient.mjs +11 -11
- package/es/application/components/AppComponent.mjs +14 -14
- package/es/application/components/BlankComponent.mjs +2 -2
- package/es/application/components/MainComponent.mjs +8 -8
- package/es/application/components/RouterContextCleaner.mjs +5 -5
- package/es/application/components/SharePage.mjs +40 -40
- package/es/application/components/ShareSchemaComponent.mjs +5 -5
- package/es/application/components/defaultComponents.mjs +7 -7
- package/es/application/context.mjs +2 -2
- package/es/application/hoc/withDynamicSchemaProps.mjs +21 -21
- package/es/application/hooks/useApp.mjs +3 -3
- package/es/application/hooks/useGlobalVariable.mjs +6 -6
- package/es/application/hooks/usePlugin.mjs +2 -2
- package/es/application/hooks/useRouter.mjs +2 -2
- package/es/application/index.mjs +2 -3
- package/es/application/schema-initializer/components/SchemaInitializerActionModal.mjs +15 -15
- package/es/application/schema-initializer/components/SchemaInitializerButton.mjs +12 -12
- package/es/application/schema-initializer/components/SchemaInitializerChildren.mjs +12 -12
- package/es/application/schema-initializer/components/SchemaInitializerDivider.mjs +4 -4
- package/es/application/schema-initializer/components/SchemaInitializerItem.mjs +28 -28
- package/es/application/schema-initializer/components/SchemaInitializerItemGroup.mjs +16 -16
- package/es/application/schema-initializer/components/SchemaInitializerItems.mjs +3 -3
- package/es/application/schema-initializer/components/SchemaInitializerSelect.mjs +14 -14
- package/es/application/schema-initializer/components/SchemaInitializerSubMenu.mjs +29 -29
- package/es/application/schema-initializer/components/SchemaInitializerSwitch.mjs +11 -11
- package/es/application/schema-initializer/components/style.mjs +2 -2
- package/es/application/schema-initializer/context/index.mjs +5 -5
- package/es/application/schema-initializer/hoc/index.mjs +25 -25
- package/es/application/schema-initializer/hooks/index.mjs +20 -20
- package/es/application/schema-initializer/hooks/useAriaAttributeOfMenuItem.mjs +4 -4
- package/es/application/schema-settings/SchemaSettingsDefaults.mjs +25 -25
- package/es/application/schema-settings/SchemaSettingsManager.mjs +3 -6
- package/es/application/schema-settings/components/SchemaSettingsChildren.mjs +31 -31
- package/es/application/schema-settings/components/SchemaSettingsIcon.mjs +8 -8
- package/es/application/schema-settings/components/SchemaSettingsWrapper.mjs +15 -15
- package/es/application/schema-settings/context/index.mjs +3 -3
- package/es/application/schema-settings/hooks/index.mjs +8 -8
- package/es/application/schema-toolbar/context/index.mjs +5 -5
- package/es/application/schema-toolbar/hooks/index.mjs +9 -9
- package/es/application/utils/globalDeps.mjs +52 -52
- package/es/application/utils/index.mjs +7 -7
- package/es/async-data-provider/index.mjs +8 -8
- package/es/block-provider/BlockProvider.mjs +79 -79
- package/es/block-provider/DetailsBlockProvider.mjs +33 -33
- package/es/block-provider/FilterFormBlockProvider.mjs +8 -8
- package/es/block-provider/FormBlockProvider.mjs +50 -50
- package/es/block-provider/FormFieldProvider.mjs +34 -34
- package/es/block-provider/MobileProvider.mjs +4 -4
- package/es/block-provider/PageLayout.mjs +2 -2
- package/es/block-provider/TableBlockProvider.mjs +37 -39
- package/es/block-provider/TableFieldProvider.mjs +32 -32
- package/es/block-provider/TableSelectorProvider.mjs +75 -77
- package/es/block-provider/TreeBlockProvider.mjs +30 -30
- package/es/block-provider/hooks/index.mjs +270 -283
- package/es/block-provider/hooks/useDataBlockSourceId.mjs +6 -6
- package/es/block-provider/hooks/useFormActiveFields.mjs +8 -8
- package/es/block-provider/hooks/useIsMobile.mjs +3 -3
- package/es/block-provider/hooks/useParsedFilter.mjs +20 -20
- package/es/built-in/acl/ACLPlugin.mjs +7 -7
- package/es/built-in/acl/ACLProvider.mjs +71 -71
- package/es/built-in/acl/ACLShortcut.mjs +9 -9
- package/es/built-in/acl/Configuration/ConfigureCenter.mjs +29 -29
- package/es/built-in/acl/Configuration/MenuConfigure.mjs +23 -23
- package/es/built-in/acl/Configuration/MenuItemsProvider.mjs +12 -12
- package/es/built-in/acl/Configuration/PermisionProvider.mjs +16 -16
- package/es/built-in/acl/Configuration/RoleConfigure.mjs +29 -29
- package/es/built-in/acl/Configuration/RoleTable.mjs +21 -21
- package/es/built-in/acl/Configuration/RolesResourcesActions.mjs +43 -43
- package/es/built-in/acl/Configuration/ScopeSelect.mjs +14 -14
- package/es/built-in/acl/Configuration/StrategyActions.mjs +18 -18
- package/es/built-in/acl/Configuration/index.mjs +7 -14
- package/es/built-in/acl/Configuration/schemas/roles.mjs +14 -14
- package/es/built-in/acl/Configuration/schemas/scopes.mjs +15 -15
- package/es/built-in/acl/Configuration/schemas/useRoleResourceValues.mjs +9 -12
- package/es/built-in/acl/Configuration/schemas/useSaveRoleResourceAction.mjs +7 -7
- package/es/built-in/acl/style.mjs +2 -2
- package/es/built-in/admin-layout/AdminContent.mjs +5 -9
- package/es/built-in/admin-layout/AdminLayout.mjs +13 -13
- package/es/built-in/admin-layout/AdminLayoutPlugin.mjs +6 -6
- package/es/built-in/admin-layout/AdminProvider.mjs +13 -13
- package/es/built-in/admin-layout/AdminTabs.mjs +4 -4
- package/es/built-in/admin-layout/InternalAdminLayout.mjs +34 -34
- package/es/built-in/admin-layout/MenuEditor.mjs +39 -38
- package/es/built-in/admin-layout/NoticeArea.mjs +7 -7
- package/es/built-in/admin-layout/components/AddNewButton.mjs +22 -22
- package/es/built-in/admin-layout/components/WelcomeCard.mjs +24 -24
- package/es/built-in/admin-layout/style.mjs +2 -2
- package/es/built-in/attachment-preview/index.mjs +11 -11
- package/es/built-in/attachment-preview/previewers/file-default.mjs +11 -11
- package/es/built-in/attachment-preview/previewers/file-pdf.mjs +31 -31
- package/es/built-in/attachment-preview/previewers/file-pdf.style.mjs +2 -2
- package/es/built-in/attachment-preview/previewers/file-sheet.mjs +25 -25
- package/es/built-in/attachment-preview/previewers/file-sheet.style.mjs +2 -2
- package/es/built-in/attachment-preview/previewers/image-jpeg.mjs +3 -3
- package/es/built-in/attachment-preview/previewers/image-png.mjs +3 -3
- package/es/built-in/attachment-preview/previewers/image-svg.mjs +3 -3
- package/es/built-in/block-schema-component/index.mjs +73 -73
- package/es/built-in/built-in-collections/index.mjs +5 -5
- package/es/built-in/context-menu/ContextMenu.provider.mjs +21 -21
- package/es/built-in/context-menu/ContextMenuItemsProps.mjs +13 -13
- package/es/built-in/context-menu/index.mjs +14 -16
- package/es/built-in/context-menu/useContextMenu.mjs +3 -3
- package/es/built-in/document-title/index.mjs +20 -20
- package/es/built-in/dynamic-page/DynamicPage.mjs +14 -14
- package/es/built-in/dynamic-page/index.mjs +13 -13
- package/es/built-in/dynamic-page/style.mjs +3 -3
- package/es/built-in/dynamic-page/utils.mjs +1 -1
- package/es/built-in/index.mjs +112 -111
- package/es/built-in/locale/LocalePlugin.mjs +22 -22
- package/es/built-in/locale/loadConstrueLocale.mjs +2 -2
- package/es/built-in/page-style/CustomAdminHeader.mjs +5 -5
- package/es/built-in/page-style/PageStyle.provider.mjs +12 -12
- package/es/built-in/page-style/TabContent.mjs +18 -18
- package/es/built-in/page-style/TabHeader.mjs +23 -23
- package/es/built-in/page-style/TabHeader.style.mjs +2 -2
- package/es/built-in/page-style/index.mjs +8 -8
- package/es/built-in/page-style/usePageStyle.mjs +3 -3
- package/es/built-in/page-style/useTabSettings.mjs +17 -17
- package/es/built-in/pinned-list/PinnedPluginListProvider.mjs +17 -17
- package/es/built-in/pinned-list/PluginPinnedList.mjs +4 -4
- package/es/built-in/pinned-list/context.mjs +2 -2
- package/es/built-in/pm/PluginCard.mjs +54 -60
- package/es/built-in/pm/PluginDetail.mjs +83 -83
- package/es/built-in/pm/PluginDocument.mjs +20 -20
- package/es/built-in/pm/PluginForm/form/PluginNpmForm.mjs +17 -17
- package/es/built-in/pm/PluginForm/form/PluginUploadForm.mjs +15 -15
- package/es/built-in/pm/PluginForm/form/PluginUrlForm.mjs +15 -15
- package/es/built-in/pm/PluginForm/modal/PluginAddModal.mjs +20 -20
- package/es/built-in/pm/PluginForm/modal/PluginUpgradeModal.mjs +20 -20
- package/es/built-in/pm/PluginManager.mjs +66 -66
- package/es/built-in/pm/index.mjs +17 -21
- package/es/built-in/pm/style.mjs +2 -2
- package/es/built-in/quick-access/Action.mjs +25 -25
- package/es/built-in/quick-access/Block.mjs +40 -40
- package/es/built-in/quick-access/CustomRequestActionSchemaInitializerItem.mjs +12 -12
- package/es/built-in/quick-access/LinkActionSchemaInitializerItem.mjs +13 -13
- package/es/built-in/quick-access/ModalActionSchemaInitializerItem.mjs +19 -19
- package/es/built-in/quick-access/PopupActionSchemaInitializerItem.mjs +12 -12
- package/es/built-in/quick-access/SchemaSettingsBlockTitleItem.mjs +11 -11
- package/es/built-in/quick-access/blockInitializerItem.mjs +6 -6
- package/es/built-in/quick-access/blockSettings.mjs +15 -15
- package/es/built-in/quick-access/configureActions.mjs +4 -4
- package/es/built-in/quick-access/index.mjs +21 -21
- package/es/built-in/scroll-assistant/ScrollAssistant.provider.mjs +11 -11
- package/es/built-in/scroll-assistant/ScrollAssistantStatus.provider.mjs +6 -6
- package/es/built-in/scroll-assistant/index.mjs +8 -8
- package/es/built-in/scroll-assistant/useJoystick.mjs +5 -7
- package/es/built-in/setting-layout/AdminSettings.mjs +27 -27
- package/es/built-in/setting-layout/SettingLayout.mjs +38 -38
- package/es/built-in/setting-layout/SettingsCenterDropdown.mjs +18 -18
- package/es/built-in/setting-layout/style.mjs +2 -2
- package/es/built-in/system-settings/SystemSettingsProvider.mjs +7 -7
- package/es/built-in/system-settings/SystemSettingsShortcut.mjs +27 -27
- package/es/built-in/system-settings/index.mjs +5 -8
- package/es/built-in/system-version/SystemVersion.provider.mjs +12 -12
- package/es/built-in/system-version/index.mjs +4 -4
- package/es/built-in/user-settings/UserSettingsLayout.mjs +37 -37
- package/es/built-in/user-settings/index.mjs +9 -9
- package/es/built-in/user-settings/style.mjs +2 -2
- package/es/collection-manager/CollectionHistoryProvider.mjs +13 -13
- package/es/collection-manager/CollectionManagerProvider.mjs +18 -18
- package/es/collection-manager/CollectionManagerSchemaComponentProvider.mjs +13 -13
- package/es/collection-manager/CollectionProvider_deprecated.mjs +6 -6
- package/es/collection-manager/Configuration/AddCollectionAction.mjs +60 -60
- package/es/collection-manager/Configuration/AddFieldAction.mjs +64 -64
- package/es/collection-manager/Configuration/AddSubFieldAction.mjs +38 -38
- package/es/collection-manager/Configuration/DeleteCollectionAction.mjs +43 -43
- package/es/collection-manager/Configuration/EditCollectionAction.mjs +44 -44
- package/es/collection-manager/Configuration/EditFieldAction.mjs +55 -55
- package/es/collection-manager/Configuration/EditSubFieldAction.mjs +32 -32
- package/es/collection-manager/Configuration/ImportCollectionMetaAction.mjs +30 -30
- package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.mjs +53 -53
- package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.mjs +4 -4
- package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.mjs +17 -17
- package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.mjs +15 -21
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.mjs +53 -53
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.mjs +3 -3
- package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +39 -39
- package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.mjs +7 -7
- package/es/collection-manager/Configuration/OverridingCollectionField.mjs +51 -51
- package/es/collection-manager/Configuration/SyncFieldsAction.mjs +48 -48
- package/es/collection-manager/Configuration/SyncSQLFieldsAction.mjs +40 -40
- package/es/collection-manager/Configuration/ViewInheritedField.mjs +40 -40
- package/es/collection-manager/Configuration/components/CollectionCategory.mjs +8 -8
- package/es/collection-manager/Configuration/components/CollectionFieldInterfaceTag.mjs +9 -9
- package/es/collection-manager/Configuration/components/CollectionTemplateTag.mjs +9 -9
- package/es/collection-manager/Configuration/components/FieldSummary.mjs +9 -9
- package/es/collection-manager/Configuration/components/Summary.mjs +16 -16
- package/es/collection-manager/Configuration/components/TemplateSummary.mjs +9 -9
- package/es/collection-manager/Configuration/components/index.mjs +96 -96
- package/es/collection-manager/Configuration/index.mjs +2 -2
- package/es/collection-manager/Configuration/interfaces.mjs +4 -4
- package/es/collection-manager/ResourceActionProvider.mjs +33 -33
- package/es/collection-manager/action-hooks.mjs +103 -104
- package/es/collection-manager/collectionPlugin.mjs +61 -61
- package/es/collection-manager/context.mjs +2 -2
- package/es/collection-manager/hooks/useCollectionDataSource.mjs +6 -6
- package/es/collection-manager/hooks/useCollectionField_deprecated.mjs +10 -10
- package/es/collection-manager/hooks/useCollectionManager_deprecated.mjs +57 -57
- package/es/collection-manager/hooks/useCollection_deprecated.mjs +17 -17
- package/es/collection-manager/hooks/useDialect.mjs +5 -5
- package/es/collection-manager/index.mjs +5 -13
- package/es/collection-manager/interfaces/checkbox.mjs +5 -5
- package/es/collection-manager/interfaces/checkboxGroup.mjs +6 -6
- package/es/collection-manager/interfaces/chinaRegion.mjs +9 -9
- package/es/collection-manager/interfaces/collection.mjs +6 -6
- package/es/collection-manager/interfaces/color.mjs +5 -5
- package/es/collection-manager/interfaces/components/index.mjs +14 -14
- package/es/collection-manager/interfaces/createdAt.mjs +6 -6
- package/es/collection-manager/interfaces/createdBy.mjs +6 -6
- package/es/collection-manager/interfaces/datetime.mjs +6 -6
- package/es/collection-manager/interfaces/email.mjs +6 -6
- package/es/collection-manager/interfaces/icon.mjs +4 -4
- package/es/collection-manager/interfaces/id.mjs +4 -4
- package/es/collection-manager/interfaces/input.mjs +13 -13
- package/es/collection-manager/interfaces/integer.mjs +13 -13
- package/es/collection-manager/interfaces/json.mjs +11 -11
- package/es/collection-manager/interfaces/linkTo.mjs +8 -8
- package/es/collection-manager/interfaces/m2m.mjs +14 -14
- package/es/collection-manager/interfaces/m2o.mjs +10 -10
- package/es/collection-manager/interfaces/markdown.mjs +8 -8
- package/es/collection-manager/interfaces/multipleSelect.mjs +6 -6
- package/es/collection-manager/interfaces/nanoid.mjs +4 -4
- package/es/collection-manager/interfaces/number.mjs +9 -9
- package/es/collection-manager/interfaces/o2m.mjs +8 -8
- package/es/collection-manager/interfaces/o2o.mjs +22 -22
- package/es/collection-manager/interfaces/password.mjs +8 -8
- package/es/collection-manager/interfaces/percent.mjs +14 -14
- package/es/collection-manager/interfaces/phone.mjs +6 -6
- package/es/collection-manager/interfaces/properties/index.mjs +4 -4
- package/es/collection-manager/interfaces/properties/operators.mjs +5 -5
- package/es/collection-manager/interfaces/radioGroup.mjs +6 -6
- package/es/collection-manager/interfaces/richText.mjs +8 -8
- package/es/collection-manager/interfaces/select.mjs +6 -6
- package/es/collection-manager/interfaces/sort.mjs +8 -8
- package/es/collection-manager/interfaces/subTable.mjs +7 -7
- package/es/collection-manager/interfaces/tableoid.mjs +4 -4
- package/es/collection-manager/interfaces/textarea.mjs +8 -8
- package/es/collection-manager/interfaces/time.mjs +5 -5
- package/es/collection-manager/interfaces/unixTimestamp.mjs +5 -5
- package/es/collection-manager/interfaces/updatedAt.mjs +6 -6
- package/es/collection-manager/interfaces/updatedBy.mjs +6 -6
- package/es/collection-manager/interfaces/url.mjs +5 -5
- package/es/collection-manager/interfaces/uuid.mjs +4 -4
- package/es/collection-manager/mixins/InheritanceCollectionMixin.mjs +13 -13
- package/es/collection-manager/sub-table.mjs +42 -42
- package/es/collection-manager/templates/components/PresetFields.mjs +22 -22
- package/es/collection-manager/templates/components/PreviewFields.mjs +57 -57
- package/es/collection-manager/templates/components/PreviewTable.mjs +34 -34
- package/es/collection-manager/templates/components/sql-collection/FieldsConfigure.mjs +75 -77
- package/es/collection-manager/templates/components/sql-collection/PreviewTable.mjs +13 -13
- package/es/collection-manager/templates/components/sql-collection/SQLInput.mjs +21 -21
- package/es/collection-manager/templates/components/sql-collection/SQLRequestProvider.mjs +15 -15
- package/es/collection-manager/templates/expression.mjs +6 -6
- package/es/collection-manager/templates/general.mjs +4 -4
- package/es/collection-manager/templates/import.mjs +2 -2
- package/es/collection-manager/templates/properties/index.mjs +3 -3
- package/es/collection-manager/templates/sql.mjs +11 -11
- package/es/collection-manager/templates/tree.mjs +4 -4
- package/es/collection-manager/templates/view.mjs +8 -8
- package/es/collection-manager/templates/xlsx.mjs +2 -2
- package/es/collection-manager/utils.mjs +1 -1
- package/es/common/SelectWithTitle.mjs +7 -7
- package/es/common/appInfo/CurrentAppInfoProvider.mjs +7 -7
- package/es/common/useFieldComponentName.mjs +12 -12
- package/es/common/useNiceDropdownHeight.mjs +4 -4
- package/es/data-source/collection/AssociationProvider.mjs +17 -17
- package/es/data-source/collection/Collection.mjs +2 -2
- package/es/data-source/collection/CollectionManager.mjs +7 -10
- package/es/data-source/collection/CollectionManagerProvider.mjs +13 -13
- package/es/data-source/collection/CollectionProvider.mjs +12 -12
- package/es/data-source/collection/ExtendCollectionsProvider.mjs +10 -10
- package/es/data-source/collection-field/CollectionField.mjs +26 -26
- package/es/data-source/collection-field/CollectionFieldProvider.mjs +15 -15
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +2 -2
- package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.mjs +2 -2
- package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToFormInitializerItems.mjs +8 -8
- package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToInitializerItems.mjs +8 -8
- package/es/data-source/collection-fields-to-initializer-items/items/AssociationCollectionFields.mjs +7 -7
- package/es/data-source/collection-fields-to-initializer-items/items/ParentCollectionFields.mjs +6 -6
- package/es/data-source/collection-fields-to-initializer-items/items/SelfFields.mjs +6 -6
- package/es/data-source/collection-fields-to-initializer-items/items/index.mjs +4 -7
- package/es/data-source/collection-fields-to-initializer-items/utils/getInitializerItemsByFields.mjs +5 -5
- package/es/data-source/collection-fields-to-initializer-items/utils/useCollectionFieldContext.mjs +17 -17
- package/es/data-source/collection-record/CollectionRecordProvider.mjs +20 -21
- package/es/data-source/collection-record/isNewRecord.mjs +2 -2
- package/es/data-source/collection-template/CollectionTemplateManager.mjs +2 -2
- package/es/data-source/commonsSettingsItem/fieldComponent.mjs +20 -20
- package/es/data-source/components/CollectionDeletedPlaceholder.mjs +26 -26
- package/es/data-source/components/DataSourceApplicationProvider.mjs +5 -5
- package/es/data-source/data-block/DataBlockProvider.mjs +24 -24
- package/es/data-source/data-block/DataBlockRequestProvider.mjs +31 -31
- package/es/data-source/data-block/DataBlockResourceProvider.mjs +19 -19
- package/es/data-source/data-block/context/ConfigSetting.provider.mjs +3 -3
- package/es/data-source/data-source/DataSource.mjs +2 -2
- package/es/data-source/data-source/DataSourceManager.mjs +9 -9
- package/es/data-source/data-source/DataSourceManagerProvider.mjs +5 -5
- package/es/data-source/data-source/DataSourceProvider.mjs +22 -22
- package/es/data-source/utils.mjs +5 -5
- package/es/filter-provider/FilterProvider.mjs +29 -29
- package/es/filter-provider/utils.mjs +38 -38
- package/es/flag-provider/FlagProvider.mjs +4 -4
- package/es/flag-provider/hooks/useFlag.mjs +3 -3
- package/es/hooks/useMenuItem.mjs +21 -21
- package/es/hooks/useViewport.mjs +5 -5
- package/es/i18n/i18n.mjs +7 -7
- package/es/icon/Icon.mjs +19 -19
- package/es/icon/preloaded.mjs +24 -24
- package/es/index.mjs +5 -9
- package/es/locale/index.mjs +49 -49
- package/es/modules/actions/ActionSchemaToolbar.mjs +3 -3
- package/es/modules/actions/add-child/CreateChildInitializer.mjs +3 -3
- package/es/modules/actions/add-child/addChildActionSettings.mjs +19 -19
- package/es/modules/actions/add-new/CreateActionInitializer.mjs +5 -5
- package/es/modules/actions/add-new/addNewActionSettings.mjs +18 -18
- package/es/modules/actions/add-new/createFormBlockInitializers.mjs +8 -8
- package/es/modules/actions/add-record/CustomizeAddRecordActionInitializer.mjs +5 -5
- package/es/modules/actions/add-record/customizeAddRecordActionSettings.mjs +10 -10
- package/es/modules/actions/add-record/customizeCreateFormBlockInitializers.mjs +4 -4
- package/es/modules/actions/associate/AssociateActionInitializer.mjs +5 -5
- package/es/modules/actions/associate/AssociateActionProvider.mjs +20 -20
- package/es/modules/actions/associate/AssociateActionSettings.mjs +18 -18
- package/es/modules/actions/bulk-destroy/BulkDestroyActionInitializer.mjs +5 -5
- package/es/modules/actions/bulk-destroy/bulkDeleteActionSettings.mjs +9 -9
- package/es/modules/actions/delete/DestroyActionInitializer.mjs +3 -3
- package/es/modules/actions/delete/deleteActionSettings.mjs +16 -16
- package/es/modules/actions/disassociate/DisassociateActionInitializer.mjs +3 -3
- package/es/modules/actions/disassociate/disassociateActionSettings.mjs +12 -12
- package/es/modules/actions/expand-collapse/ExpandableActionInitializer.mjs +3 -3
- package/es/modules/actions/expand-collapse/expendableActionSettings.mjs +18 -18
- package/es/modules/actions/filter/FilterActionInitializer.mjs +3 -3
- package/es/modules/actions/filter/filterActionSettings.mjs +12 -12
- package/es/modules/actions/link/customizeLinkActionSettings.mjs +29 -29
- package/es/modules/actions/link/hooks.mjs +23 -23
- package/es/modules/actions/refresh/RefreshActionInitializer.mjs +3 -3
- package/es/modules/actions/refresh/refreshActionSettings.mjs +9 -9
- package/es/modules/actions/save-record/SaveRecordActionInitializer.mjs +5 -5
- package/es/modules/actions/save-record/customizeSaveRecordActionSettings.mjs +16 -16
- package/es/modules/actions/submit/CreateSubmitActionInitializer.mjs +3 -3
- package/es/modules/actions/submit/UpdateSubmitActionInitializer.mjs +3 -3
- package/es/modules/actions/submit/createSubmitActionSettings.mjs +40 -40
- package/es/modules/actions/submit/updateSubmitActionSettings.mjs +27 -27
- package/es/modules/actions/update-record/UpdateRecordActionInitializer.mjs +5 -5
- package/es/modules/actions/update-record/customizeUpdateRecordActionSettings.mjs +20 -20
- package/es/modules/actions/view-edit-popup/PopupActionInitializer.mjs +5 -5
- package/es/modules/actions/view-edit-popup/RecordFormBlockInitializers.mjs +4 -4
- package/es/modules/actions/view-edit-popup/UpdateActionInitializer.mjs +3 -3
- package/es/modules/actions/view-edit-popup/ViewActionInitializer.mjs +3 -3
- package/es/modules/actions/view-edit-popup/customizePopupActionSettings.mjs +15 -15
- package/es/modules/actions/view-edit-popup/editActionSettings.mjs +13 -13
- package/es/modules/actions/view-edit-popup/viewActionSettings.mjs +15 -15
- package/es/modules/blocks/BlockSchemaToolbar.mjs +17 -17
- package/es/modules/blocks/data-blocks/details-multi/DetailsActionInitializers.mjs +2 -2
- package/es/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.mjs +14 -14
- package/es/modules/blocks/data-blocks/details-multi/createDetailsWithPaginationUISchema.mjs +3 -3
- package/es/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.mjs +40 -40
- package/es/modules/blocks/data-blocks/details-multi/hooks/useDetailsWithPaginationDecoratorProps.mjs +2 -2
- package/es/modules/blocks/data-blocks/details-multi/hooks/useDetailsWithPaginationProps.mjs +2 -2
- package/es/modules/blocks/data-blocks/details-multi/setDataLoadingModeSettingsItem.mjs +19 -19
- package/es/modules/blocks/data-blocks/details-single/ReadPrettyFormActionInitializers.mjs +4 -4
- package/es/modules/blocks/data-blocks/details-single/ReadPrettyFormItemInitializers.mjs +16 -16
- package/es/modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer.mjs +21 -21
- package/es/modules/blocks/data-blocks/details-single/createDetailsUISchema.mjs +3 -3
- package/es/modules/blocks/data-blocks/details-single/detailsBlockSettings.mjs +11 -11
- package/es/modules/blocks/data-blocks/details-single/hooks/useDetailsDecoratorProps.mjs +7 -7
- package/es/modules/blocks/data-blocks/details-single/hooks/useDetailsProps.mjs +2 -2
- package/es/modules/blocks/data-blocks/form/CreateFormBlockInitializer.mjs +18 -18
- package/es/modules/blocks/data-blocks/form/FilterItemCustomSettings.mjs +59 -59
- package/es/modules/blocks/data-blocks/form/FormBlockInitializer.mjs +18 -18
- package/es/modules/blocks/data-blocks/form/FormItemSchemaToolbar.mjs +3 -3
- package/es/modules/blocks/data-blocks/form/RecordFormBlockInitializer.mjs +26 -26
- package/es/modules/blocks/data-blocks/form/createCreateFormBlockUISchema.mjs +3 -3
- package/es/modules/blocks/data-blocks/form/createEditFormBlockUISchema.mjs +3 -3
- package/es/modules/blocks/data-blocks/form/createFormActionInitializers.mjs +2 -2
- package/es/modules/blocks/data-blocks/form/createFormBlockSettings.mjs +27 -27
- package/es/modules/blocks/data-blocks/form/editFormBlockSettings.mjs +16 -16
- package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +87 -87
- package/es/modules/blocks/data-blocks/form/formActionInitializers.mjs +2 -2
- package/es/modules/blocks/data-blocks/form/formItemInitializers.mjs +9 -9
- package/es/modules/blocks/data-blocks/form/hooks/useCreateFormBlockDecoratorProps.mjs +2 -2
- package/es/modules/blocks/data-blocks/form/hooks/useCreateFormBlockProps.mjs +2 -2
- package/es/modules/blocks/data-blocks/form/hooks/useEditFormBlockDecoratorProps.mjs +4 -4
- package/es/modules/blocks/data-blocks/form/hooks/useEditFormBlockProps.mjs +2 -2
- package/es/modules/blocks/data-blocks/form/updateFormActionInitializers.mjs +2 -2
- package/es/modules/blocks/data-blocks/grid-card/GridCardActionInitializers.mjs +5 -5
- package/es/modules/blocks/data-blocks/grid-card/GridCardBlockInitializer.mjs +12 -12
- package/es/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.mjs +87 -87
- package/es/modules/blocks/data-blocks/grid-card/gridCardItemActionInitializers.mjs +7 -7
- package/es/modules/blocks/data-blocks/grid-card/hooks/useGridCardBlockDecoratorProps.mjs +4 -4
- package/es/modules/blocks/data-blocks/grid-card/hooks/useGridCardBlockParams.mjs +4 -4
- package/es/modules/blocks/data-blocks/list/ListActionInitializers.mjs +5 -5
- package/es/modules/blocks/data-blocks/list/ListBlockInitializer.mjs +12 -12
- package/es/modules/blocks/data-blocks/list/hooks/useListBlockDecoratorProps.mjs +2 -2
- package/es/modules/blocks/data-blocks/list/listBlockSettings.mjs +42 -42
- package/es/modules/blocks/data-blocks/list/listItemActionInitializers.mjs +7 -7
- package/es/modules/blocks/data-blocks/table/TableActionColumnInitializers.mjs +40 -40
- package/es/modules/blocks/data-blocks/table/TableActionInitializers.mjs +13 -13
- package/es/modules/blocks/data-blocks/table/TableBlockInitializer.mjs +12 -12
- package/es/modules/blocks/data-blocks/table/TableColumnInitializers.mjs +22 -22
- package/es/modules/blocks/data-blocks/table/TableColumnSchemaToolbar.mjs +7 -7
- package/es/modules/blocks/data-blocks/table/createTableBlockUISchema.mjs +3 -3
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockDecoratorProps.mjs +9 -9
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +39 -42
- package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +85 -85
- package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +61 -61
- package/es/modules/blocks/data-blocks/table/utils.mjs +8 -8
- package/es/modules/blocks/data-blocks/table-selector/TableSelectorInitializer.mjs +11 -11
- package/es/modules/blocks/data-blocks/table-selector/createTableSelectorUISchema.mjs +2 -2
- package/es/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.mjs +55 -55
- package/es/modules/blocks/filter-blocks/collapse/CollapseItemSchemaToolbar.mjs +3 -3
- package/es/modules/blocks/filter-blocks/collapse/FilterCollapseBlockInitializer.mjs +10 -10
- package/es/modules/blocks/filter-blocks/collapse/createFilterCollapseBlockSchema.mjs +2 -2
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseBlockSettings.mjs +15 -15
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +50 -50
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemInitializer.mjs +16 -16
- package/es/modules/blocks/filter-blocks/form/FilterFormActionInitializers.mjs +2 -2
- package/es/modules/blocks/filter-blocks/form/FilterFormBlockInitializer.mjs +11 -11
- package/es/modules/blocks/filter-blocks/form/createFilterFormBlockSchema.mjs +3 -3
- package/es/modules/blocks/filter-blocks/form/filterFormBlockSettings.mjs +17 -17
- package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +56 -56
- package/es/modules/blocks/filter-blocks/form/filterFormItemInitializers.mjs +8 -8
- package/es/modules/blocks/filter-blocks/form/hooks/useFilterFormBlockProps.mjs +2 -2
- package/es/modules/blocks/filter-blocks/tree/FilterTreeActionInitializers.mjs +2 -2
- package/es/modules/blocks/filter-blocks/tree/FilterTreeBlockInitializer.mjs +10 -10
- package/es/modules/blocks/filter-blocks/tree/filterTreeBlockSettings.mjs +17 -17
- package/es/modules/blocks/filter-blocks/tree/filterTreeItemFieldSettings.mjs +52 -52
- package/es/modules/blocks/filter-blocks/tree/filterTreeItemInitializers.mjs +8 -8
- package/es/modules/blocks/other-blocks/markdown/MarkdownBlockInitializer.mjs +9 -9
- package/es/modules/blocks/other-blocks/markdown/MarkdownFormItemInitializer.mjs +7 -7
- package/es/modules/blocks/other-blocks/markdown/markdownBlockSettings.mjs +6 -6
- package/es/modules/blocks/useParentRecordCommon.mjs +2 -2
- package/es/modules/blocks/useSourceId.mjs +5 -5
- package/es/modules/blocks/useSourceKey.mjs +2 -2
- package/es/modules/fields/component/CascadeSelect/cascadeSelectComponentFieldSettings.mjs +25 -25
- package/es/modules/fields/component/Cascader/cascaderComponentFieldSettings.mjs +92 -92
- package/es/modules/fields/component/Checkbox/checkboxComponentFieldSettings.mjs +12 -12
- package/es/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.mjs +27 -27
- package/es/modules/fields/component/DatePicker/datePickerComponentFieldSettings.mjs +8 -8
- package/es/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.mjs +35 -35
- package/es/modules/fields/component/FileManager/fileManagerComponentFieldSettings.mjs +48 -48
- package/es/modules/fields/component/FileManager/uploadAttachmentComponentFieldSettings.mjs +18 -18
- package/es/modules/fields/component/Input/inputComponentFieldsSettings.mjs +2 -2
- package/es/modules/fields/component/InputNumber/inputNumberComponentFieldSettings.mjs +31 -31
- package/es/modules/fields/component/Nester/subformComponentFieldSettings.mjs +32 -32
- package/es/modules/fields/component/Picker/TableSelectorInitializers.mjs +6 -6
- package/es/modules/fields/component/Picker/recordPickerComponentFieldSettings.mjs +44 -44
- package/es/modules/fields/component/PopoverNester/subformPopoverComponentFieldSettings.mjs +28 -28
- package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +12 -12
- package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +106 -106
- package/es/modules/fields/component/SubTable/secondLevelSelect.mjs +28 -28
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +61 -61
- package/es/modules/fields/component/Tag/tagComponentFieldSettings.mjs +43 -43
- package/es/modules/fields/component/UnixTimestamp/unixTimestampComponentFieldSettings.mjs +8 -8
- package/es/modules/fields/initializer/CollectionFieldInitializer.mjs +5 -5
- package/es/modules/fields/initializer/TableCollectionFieldInitializer.mjs +5 -5
- package/es/modules/menu/GroupItem.mjs +21 -21
- package/es/modules/menu/LinkMenuItem.mjs +21 -21
- package/es/modules/menu/PageMenuItem.mjs +22 -22
- package/es/modules/menu/UploadMenuItem.mjs +23 -23
- package/es/modules/menu/menuItemInitializer.mjs +8 -8
- package/es/modules/page/BlockInitializers.mjs +4 -4
- package/es/modules/variable/DeclareVariable.mjs +4 -4
- package/es/modules/variable/useVariable.mjs +3 -3
- package/es/powered-by/index.mjs +6 -6
- package/es/record-provider/index.mjs +16 -16
- package/es/route-switch/RouteSchemaComponent.mjs +5 -5
- package/es/schema-component/antd/AntdSchemaComponentProvider.mjs +22 -22
- package/es/schema-component/antd/__builtins__/hooks/useConfig.mjs +4 -4
- package/es/schema-component/antd/__builtins__/hooks/usePrefixCls.mjs +5 -5
- package/es/schema-component/antd/__builtins__/hooks/useToken.mjs +2 -2
- package/es/schema-component/antd/__builtins__/loading.mjs +4 -4
- package/es/schema-component/antd/__builtins__/portal.mjs +14 -14
- package/es/schema-component/antd/__builtins__/render.mjs +4 -7
- package/es/schema-component/antd/__builtins__/style.mjs +8 -8
- package/es/schema-component/antd/action/Action.Area.mjs +37 -37
- package/es/schema-component/antd/action/Action.Area.style.mjs +2 -2
- package/es/schema-component/antd/action/Action.Container.mjs +19 -19
- package/es/schema-component/antd/action/Action.Designer.mjs +175 -175
- package/es/schema-component/antd/action/Action.Drawer.mjs +35 -35
- package/es/schema-component/antd/action/Action.Drawer.style.mjs +2 -2
- package/es/schema-component/antd/action/Action.Link.mjs +7 -7
- package/es/schema-component/antd/action/Action.Modal.mjs +38 -38
- package/es/schema-component/antd/action/Action.Modal.style.mjs +2 -2
- package/es/schema-component/antd/action/Action.Page.mjs +23 -23
- package/es/schema-component/antd/action/Action.Sheet.mjs +26 -26
- package/es/schema-component/antd/action/Action.mjs +91 -91
- package/es/schema-component/antd/action/Action.style.mjs +4 -4
- package/es/schema-component/antd/action/ActionBar.mjs +37 -37
- package/es/schema-component/antd/action/context.mjs +6 -6
- package/es/schema-component/antd/action/hooks/useGetAriaLabelOfAction.mjs +13 -13
- package/es/schema-component/antd/action/hooks/useGetAriaLabelOfDrawer.mjs +8 -8
- package/es/schema-component/antd/action/hooks/useGetAriaLabelOfModal.mjs +8 -8
- package/es/schema-component/antd/action/hooks/useGetAriaLabelOfPopover.mjs +8 -8
- package/es/schema-component/antd/action/hooks/useSetAriaLabelForDrawer.mjs +4 -4
- package/es/schema-component/antd/action/hooks/useSetAriaLabelForModal.mjs +4 -4
- package/es/schema-component/antd/action/hooks/useSetAriaLabelForPopover.mjs +4 -4
- package/es/schema-component/antd/action/hooks.mjs +27 -29
- package/es/schema-component/antd/action/utils.mjs +18 -18
- package/es/schema-component/antd/appends-tree-select/AppendsTreeSelect.mjs +26 -29
- package/es/schema-component/antd/appends-tree-select/AppendsTreeSelectV2.mjs +26 -29
- package/es/schema-component/antd/association-cascader/AssociationCascader.mjs +18 -19
- package/es/schema-component/antd/association-field/AssociationFieldProvider.mjs +29 -32
- package/es/schema-component/antd/association-field/AssociationSelect.mjs +51 -51
- package/es/schema-component/antd/association-field/Editable.mjs +54 -56
- package/es/schema-component/antd/association-field/FileManager.mjs +57 -57
- package/es/schema-component/antd/association-field/InternalCascadeSelect.mjs +94 -97
- package/es/schema-component/antd/association-field/InternalCascader.mjs +92 -95
- package/es/schema-component/antd/association-field/InternalDrawerSubTable.mjs +33 -33
- package/es/schema-component/antd/association-field/InternalNester.mjs +26 -26
- package/es/schema-component/antd/association-field/InternalPicker.mjs +56 -56
- package/es/schema-component/antd/association-field/InternalPopoverNester.mjs +31 -31
- package/es/schema-component/antd/association-field/InternalSubTable.mjs +33 -33
- package/es/schema-component/antd/association-field/InternalTag.mjs +52 -52
- package/es/schema-component/antd/association-field/InternalViewer.mjs +61 -61
- package/es/schema-component/antd/association-field/Nester.mjs +68 -68
- package/es/schema-component/antd/association-field/ReadPretty.mjs +19 -19
- package/es/schema-component/antd/association-field/SubTable.mjs +62 -62
- package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +72 -72
- package/es/schema-component/antd/association-field/SubTabs/hook.mjs +20 -20
- package/es/schema-component/antd/association-field/SubTabs/styles.mjs +3 -3
- package/es/schema-component/antd/association-field/components/CreateRecordAction.mjs +24 -24
- package/es/schema-component/antd/association-field/context.mjs +2 -2
- package/es/schema-component/antd/association-field/hooks.mjs +52 -52
- package/es/schema-component/antd/association-field/index.mjs +15 -15
- package/es/schema-component/antd/association-field/schema.mjs +2 -2
- package/es/schema-component/antd/association-field/util.mjs +16 -16
- package/es/schema-component/antd/association-filter/ActionBarAssociationFilterAction.mjs +19 -19
- package/es/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.mjs +19 -19
- package/es/schema-component/antd/association-filter/AssociationFilter.Initializer.mjs +6 -6
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.Designer.mjs +34 -34
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.mjs +46 -46
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.style.mjs +4 -4
- package/es/schema-component/antd/association-filter/AssociationFilter.mjs +35 -35
- package/es/schema-component/antd/association-filter/AssociationFilterDesignerDelete.mjs +15 -15
- package/es/schema-component/antd/association-filter/AssociationFilterDesignerDisplayField.mjs +10 -10
- package/es/schema-component/antd/association-select/AssociationSelect.mjs +119 -119
- package/es/schema-component/antd/association-select/ReadPretty.mjs +9 -9
- package/es/schema-component/antd/association-select/useServiceOptions.mjs +19 -19
- package/es/schema-component/antd/auto-complete/AutoComplete.mjs +19 -19
- package/es/schema-component/antd/block-item/BlockItem.mjs +17 -17
- package/es/schema-component/antd/block-item/BlockToolbar.mjs +34 -34
- package/es/schema-component/antd/block-item/hooks/useGetAriaLabelOfBlockItem.mjs +13 -13
- package/es/schema-component/antd/block-item/useBlockToolbar.mjs +22 -22
- package/es/schema-component/antd/card-item/CardItem.mjs +11 -11
- package/es/schema-component/antd/card-item/style.mjs +4 -4
- package/es/schema-component/antd/cascader/Cascader.mjs +27 -27
- package/es/schema-component/antd/cascader/ReadPretty.mjs +8 -8
- package/es/schema-component/antd/checkbox/Checkbox.mjs +35 -35
- package/es/schema-component/antd/collection-select/CollectionSelect.mjs +45 -45
- package/es/schema-component/antd/color-picker/ColorPicker.mjs +18 -18
- package/es/schema-component/antd/color-picker/ReadPretty.mjs +8 -8
- package/es/schema-component/antd/color-picker/util.mjs +12 -12
- package/es/schema-component/antd/color-select/ColorSelect.mjs +18 -18
- package/es/schema-component/antd/cron/Cron.mjs +20 -20
- package/es/schema-component/antd/cron/CronSet.mjs +30 -30
- package/es/schema-component/antd/custom-cascader/CustomCascader.mjs +16 -16
- package/es/schema-component/antd/custom-cascader/ReadPretty.mjs +8 -8
- package/es/schema-component/antd/date-picker/DatePicker.mjs +25 -28
- package/es/schema-component/antd/date-picker/ReadPretty.mjs +20 -20
- package/es/schema-component/antd/date-picker/util.mjs +13 -13
- package/es/schema-component/antd/details/Details.mjs +11 -11
- package/es/schema-component/antd/error-fallback/ErrorFallback.mjs +15 -15
- package/es/schema-component/antd/expand-action/Expand.Action.Design.mjs +14 -14
- package/es/schema-component/antd/expand-action/Expand.Action.mjs +23 -23
- package/es/schema-component/antd/expand-action/index.mjs +5 -5
- package/es/schema-component/antd/filter/DynamicComponent.mjs +17 -17
- package/es/schema-component/antd/filter/Filter.Action.Designer.mjs +30 -30
- package/es/schema-component/antd/filter/Filter.mjs +24 -24
- package/es/schema-component/antd/filter/FilterAction.mjs +41 -41
- package/es/schema-component/antd/filter/FilterGroup.mjs +29 -29
- package/es/schema-component/antd/filter/FilterItem.mjs +27 -27
- package/es/schema-component/antd/filter/FilterItems.mjs +11 -11
- package/es/schema-component/antd/filter/SaveDefaultValue.mjs +11 -11
- package/es/schema-component/antd/filter/context.mjs +4 -4
- package/es/schema-component/antd/filter/useFilterActionProps.mjs +40 -40
- package/es/schema-component/antd/filter/useOperators.mjs +10 -10
- package/es/schema-component/antd/filter/useValues.mjs +32 -32
- package/es/schema-component/antd/form/Form.Designer.mjs +5 -5
- package/es/schema-component/antd/form/Form.Settings.mjs +6 -6
- package/es/schema-component/antd/form/Form.mjs +46 -46
- package/es/schema-component/antd/form-dialog/index.mjs +42 -42
- package/es/schema-component/antd/form-item/FormItem.FilterFormDesigner.mjs +3 -3
- package/es/schema-component/antd/form-item/FormItem.FilterFormSettings.mjs +45 -45
- package/es/schema-component/antd/form-item/FormItem.Settings.mjs +208 -208
- package/es/schema-component/antd/form-item/FormItem.mjs +49 -49
- package/es/schema-component/antd/form-item/SchemaSettingOptions.mjs +114 -114
- package/es/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.mjs +39 -39
- package/es/schema-component/antd/form-item/hooks/useParseDefaultValue.mjs +38 -38
- package/es/schema-component/antd/form-item/hooks/useSpecialCase.mjs +19 -19
- package/es/schema-component/antd/form-item/utils.mjs +2 -2
- package/es/schema-component/antd/form-tab/index.mjs +37 -37
- package/es/schema-component/antd/form-v2/Form.Designer.mjs +13 -13
- package/es/schema-component/antd/form-v2/Form.FilterDesigner.mjs +7 -7
- package/es/schema-component/antd/form-v2/Form.Settings.mjs +57 -57
- package/es/schema-component/antd/form-v2/Form.mjs +90 -90
- package/es/schema-component/antd/form-v2/FormField.mjs +15 -15
- package/es/schema-component/antd/form-v2/Templates.mjs +43 -43
- package/es/schema-component/antd/form-v2/index.mjs +9 -12
- package/es/schema-component/antd/form-v2/utils.mjs +33 -33
- package/es/schema-component/antd/grid/Block.mjs +7 -7
- package/es/schema-component/antd/grid/Grid.mjs +117 -121
- package/es/schema-component/antd/grid/Grid.style.mjs +4 -4
- package/es/schema-component/antd/grid-card/GridCard.Decorator.mjs +26 -26
- package/es/schema-component/antd/grid-card/GridCard.Decorator.style.mjs +4 -4
- package/es/schema-component/antd/grid-card/GridCard.Designer.mjs +54 -54
- package/es/schema-component/antd/grid-card/GridCard.Item.mjs +23 -23
- package/es/schema-component/antd/grid-card/GridCard.mjs +47 -47
- package/es/schema-component/antd/grid-card/hooks.mjs +1 -1
- package/es/schema-component/antd/grid-card/options.mjs +3 -3
- package/es/schema-component/antd/icon-picker/IconFilterInput.mjs +6 -6
- package/es/schema-component/antd/icon-picker/IconList.mjs +11 -11
- package/es/schema-component/antd/icon-picker/IconPicker.mjs +33 -33
- package/es/schema-component/antd/index.mjs +4 -7
- package/es/schema-component/antd/input/EllipsisWithTooltip.mjs +13 -13
- package/es/schema-component/antd/input/Input.mjs +17 -18
- package/es/schema-component/antd/input/Json.mjs +9 -9
- package/es/schema-component/antd/input/ReadPretty.mjs +37 -37
- package/es/schema-component/antd/input-number/InputNumber.mjs +10 -10
- package/es/schema-component/antd/input-number/ReadPretty.mjs +21 -22
- package/es/schema-component/antd/list/List.Decorator.mjs +27 -27
- package/es/schema-component/antd/list/List.Designer.mjs +41 -41
- package/es/schema-component/antd/list/List.Item.mjs +16 -16
- package/es/schema-component/antd/list/List.mjs +38 -38
- package/es/schema-component/antd/list/List.style.mjs +4 -4
- package/es/schema-component/antd/markdown/Markdown.Void.Designer.mjs +10 -10
- package/es/schema-component/antd/markdown/Markdown.Void.mjs +33 -34
- package/es/schema-component/antd/markdown/Markdown.mjs +23 -23
- package/es/schema-component/antd/markdown/style.mjs +5 -5
- package/es/schema-component/antd/markdown/util.mjs +6 -6
- package/es/schema-component/antd/media-card/MediaCard.mjs +10 -10
- package/es/schema-component/antd/media-card/style.mjs +2 -2
- package/es/schema-component/antd/menu/AdminMenu.mjs +24 -24
- package/es/schema-component/antd/menu/AdminMenu.style.mjs +2 -2
- package/es/schema-component/antd/menu/Menu.Designer.mjs +45 -45
- package/es/schema-component/antd/menu/Menu.mjs +160 -164
- package/es/schema-component/antd/menu/Menu.styles.mjs +3 -3
- package/es/schema-component/antd/menu/MenuAdd.mjs +8 -8
- package/es/schema-component/antd/menu/MenuItemInitializers/index.mjs +2 -2
- package/es/schema-component/antd/menu/MenuSearchAdd.mjs +15 -15
- package/es/schema-component/antd/menu/MenuSearchAdd.style.mjs +3 -3
- package/es/schema-component/antd/menu/locale.mjs +2 -2
- package/es/schema-component/antd/menu/tools.mjs +1 -1
- package/es/schema-component/antd/menu/util.mjs +4 -4
- package/es/schema-component/antd/nanoIDInput/NanoIDInput.mjs +19 -19
- package/es/schema-component/antd/page/FixedBlock.mjs +21 -21
- package/es/schema-component/antd/page/FixedBlockDesignerItem.mjs +18 -18
- package/es/schema-component/antd/page/Page.Settings.mjs +34 -34
- package/es/schema-component/antd/page/Page.mjs +125 -125
- package/es/schema-component/antd/page/Page.style.mjs +2 -2
- package/es/schema-component/antd/page/PageDesigner.mjs +13 -13
- package/es/schema-component/antd/page/PageTab.Settings.mjs +13 -13
- package/es/schema-component/antd/page/PageTabDesigner.mjs +9 -9
- package/es/schema-component/antd/page/hooks/useIsBlockInPage.mjs +4 -4
- package/es/schema-component/antd/page/hooks/useShareActions.mjs +43 -46
- package/es/schema-component/antd/page/style.mjs +4 -4
- package/es/schema-component/antd/pagination/index.mjs +10 -10
- package/es/schema-component/antd/password/Password.mjs +19 -19
- package/es/schema-component/antd/password/PasswordStrength.mjs +6 -6
- package/es/schema-component/antd/password/utils.mjs +2 -2
- package/es/schema-component/antd/percent/Percent.mjs +14 -14
- package/es/schema-component/antd/popover/Popover.mjs +10 -10
- package/es/schema-component/antd/preview/Preview.mjs +75 -75
- package/es/schema-component/antd/quick-edit/QuickEdit.mjs +28 -28
- package/es/schema-component/antd/radio/Radio.mjs +18 -18
- package/es/schema-component/antd/record-picker/InputRecordPicker.mjs +47 -47
- package/es/schema-component/antd/record-picker/ReadPrettyRecordPicker.mjs +49 -49
- package/es/schema-component/antd/record-picker/RecordPicker.mjs +4 -4
- package/es/schema-component/antd/record-picker/index.mjs +5 -6
- package/es/schema-component/antd/record-picker/useFieldNames.mjs +3 -3
- package/es/schema-component/antd/record-picker/util.mjs +11 -11
- package/es/schema-component/antd/remote-select/ReadPretty.mjs +16 -16
- package/es/schema-component/antd/remote-select/RemoteSelect.mjs +79 -81
- package/es/schema-component/antd/remote-select/shared.mjs +2 -2
- package/es/schema-component/antd/rich-text/RichText.mjs +12 -12
- package/es/schema-component/antd/rich-text/style.mjs +2 -2
- package/es/schema-component/antd/scroll-area/ScrollArea.mjs +10 -10
- package/es/schema-component/antd/select/FormulaSelect.mjs +38 -38
- package/es/schema-component/antd/select/ReadPretty.mjs +16 -16
- package/es/schema-component/antd/select/Select.mjs +47 -47
- package/es/schema-component/antd/select/utils.mjs +3 -3
- package/es/schema-component/antd/slider/slider.mjs +9 -9
- package/es/schema-component/antd/space/index.mjs +11 -11
- package/es/schema-component/antd/table/Table.Array.Designer.mjs +4 -4
- package/es/schema-component/antd/table/Table.Array.mjs +60 -60
- package/es/schema-component/antd/table/Table.Column.ActionBar.mjs +9 -9
- package/es/schema-component/antd/table/Table.Column.Decorator.mjs +16 -16
- package/es/schema-component/antd/table/Table.Column.Designer.mjs +30 -30
- package/es/schema-component/antd/table/Table.Column.mjs +4 -4
- package/es/schema-component/antd/table/Table.Designer.mjs +6 -6
- package/es/schema-component/antd/table/Table.RowActionDesigner.mjs +15 -15
- package/es/schema-component/antd/table/Table.RowSelection.mjs +7 -7
- package/es/schema-component/antd/table/Table.Void.Designer.mjs +39 -39
- package/es/schema-component/antd/table/Table.Void.mjs +30 -30
- package/es/schema-component/antd/table/index.mjs +22 -22
- package/es/schema-component/antd/table-v2/Table.ActionColumnDesigner.mjs +15 -15
- package/es/schema-component/antd/table-v2/Table.Column.ActionBar.mjs +11 -11
- package/es/schema-component/antd/table-v2/Table.Column.Decorator.mjs +21 -21
- package/es/schema-component/antd/table-v2/Table.Column.Designer.mjs +68 -68
- package/es/schema-component/antd/table-v2/Table.Column.mjs +4 -4
- package/es/schema-component/antd/table-v2/Table.Designer.mjs +6 -6
- package/es/schema-component/antd/table-v2/Table.Index.mjs +4 -4
- package/es/schema-component/antd/table-v2/Table.mjs +126 -129
- package/es/schema-component/antd/table-v2/Table.styles.mjs +5 -5
- package/es/schema-component/antd/table-v2/TableBlockDesigner.mjs +73 -73
- package/es/schema-component/antd/table-v2/TableField.mjs +21 -21
- package/es/schema-component/antd/table-v2/TableSelector.mjs +2 -2
- package/es/schema-component/antd/table-v2/TableSelectorDesigner.mjs +57 -57
- package/es/schema-component/antd/table-v2/components/ColumnFieldProvider.mjs +8 -8
- package/es/schema-component/antd/table-v2/index.mjs +17 -18
- package/es/schema-component/antd/table-v2/utils.mjs +1 -1
- package/es/schema-component/antd/tabs/Tabs.Designer.mjs +22 -23
- package/es/schema-component/antd/tabs/Tabs.mjs +34 -34
- package/es/schema-component/antd/tabs/context.mjs +5 -5
- package/es/schema-component/antd/time-picker/ReadPretty.mjs +10 -10
- package/es/schema-component/antd/time-picker/TimePicker.mjs +10 -10
- package/es/schema-component/antd/tracking-link/index.mjs +7 -7
- package/es/schema-component/antd/tree/Tree.mjs +21 -21
- package/es/schema-component/antd/tree/index.mjs +2 -3
- package/es/schema-component/antd/tree-select/ReadPretty.mjs +18 -20
- package/es/schema-component/antd/tree-select/TreeSelect.mjs +10 -10
- package/es/schema-component/antd/unixTimestamp/UnixTimestamp.mjs +14 -14
- package/es/schema-component/antd/upload/ReadPretty.mjs +55 -55
- package/es/schema-component/antd/upload/Upload.mjs +98 -98
- package/es/schema-component/antd/upload/shared.mjs +23 -23
- package/es/schema-component/antd/upload/style.mjs +2 -2
- package/es/schema-component/antd/variable/CodeMirror.mjs +23 -23
- package/es/schema-component/antd/variable/Input.mjs +58 -61
- package/es/schema-component/antd/variable/JSONInput.mjs +7 -7
- package/es/schema-component/antd/variable/RawTextArea.mjs +16 -16
- package/es/schema-component/antd/variable/TextArea.mjs +61 -65
- package/es/schema-component/antd/variable/TextAreaWithGlobalScope.mjs +18 -18
- package/es/schema-component/antd/variable/Variable.mjs +18 -18
- package/es/schema-component/antd/variable/VariableSelect.mjs +20 -20
- package/es/schema-component/antd/variable/VariableSelect.style.mjs +4 -4
- package/es/schema-component/antd/variable/XButton.mjs +6 -6
- package/es/schema-component/antd/variable/index.mjs +2 -3
- package/es/schema-component/antd/variable/style.mjs +4 -4
- package/es/schema-component/common/dnd-context/index.mjs +32 -32
- package/es/schema-component/common/infinite-scroll/infinite-scroll.mjs +29 -29
- package/es/schema-component/common/infinite-scroll/style.mjs +4 -4
- package/es/schema-component/common/sortable-item/DragHandleMenu.mjs +18 -18
- package/es/schema-component/common/sortable-item/DragHandleMenu.style.mjs +3 -3
- package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +15 -15
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +2 -2
- package/es/schema-component/common/sortable-item/SortableItem.mjs +32 -32
- package/es/schema-component/common/utils/logic.mjs +11 -9
- package/es/schema-component/common/utils/uitls.mjs +23 -25
- package/es/schema-component/context.mjs +2 -2
- package/es/schema-component/core/DesignableSwitch.mjs +14 -14
- package/es/schema-component/core/FormProvider.mjs +16 -16
- package/es/schema-component/core/RemoteSchemaComponent.mjs +14 -14
- package/es/schema-component/core/SchemaComponent.mjs +19 -19
- package/es/schema-component/core/SchemaComponentOptions.mjs +11 -11
- package/es/schema-component/core/SchemaComponentPlugin.mjs +4 -4
- package/es/schema-component/core/SchemaComponentProvider.mjs +21 -21
- package/es/schema-component/hooks/useAttach.mjs +3 -3
- package/es/schema-component/hooks/useCompile.mjs +9 -9
- package/es/schema-component/hooks/useComponent.mjs +5 -5
- package/es/schema-component/hooks/useDesignable.mjs +76 -88
- package/es/schema-component/hooks/useDesigner.mjs +9 -9
- package/es/schema-component/hooks/useFieldComponentOptions.mjs +10 -10
- package/es/schema-component/hooks/useFieldModeOptions.mjs +12 -12
- package/es/schema-component/hooks/useFieldProps.mjs +5 -5
- package/es/schema-component/hooks/useFieldTitle.mjs +12 -12
- package/es/schema-component/hooks/useSchemaComponentContext.mjs +3 -3
- package/es/schema-component/hooks/useTableSize.mjs +10 -10
- package/es/schema-component/types.mjs +0 -1
- package/es/schema-initializer/SchemaInitializerPlugin.mjs +124 -124
- package/es/schema-initializer/buttons/CustomFormItemInitializers.mjs +13 -13
- package/es/schema-initializer/buttons/FormItemInitializers.mjs +35 -35
- package/es/schema-initializer/buttons/RecordBlockInitializers.mjs +37 -37
- package/es/schema-initializer/buttons/SubTableActionInitializers.mjs +2 -2
- package/es/schema-initializer/buttons/TabPaneInitializers.mjs +23 -23
- package/es/schema-initializer/components/CreateRecordAction.mjs +75 -75
- package/es/schema-initializer/components/DeletedField.mjs +4 -4
- package/es/schema-initializer/components/assigned-field/AssignedField.mjs +43 -43
- package/es/schema-initializer/hooks/useGetAriaLabelOfSchemaInitializer.mjs +6 -6
- package/es/schema-initializer/index.mjs +2 -17
- package/es/schema-initializer/items/ActionInitializer.mjs +5 -5
- package/es/schema-initializer/items/BlockInitializer.mjs +10 -10
- package/es/schema-initializer/items/CreateFilterActionInitializer.mjs +3 -3
- package/es/schema-initializer/items/CreateResetActionInitializer.mjs +3 -3
- package/es/schema-initializer/items/CustomFilterFormItemInitializer.mjs +94 -94
- package/es/schema-initializer/items/CustomizeActionInitializer.mjs +5 -5
- package/es/schema-initializer/items/DataBlockInitializer.mjs +53 -53
- package/es/schema-initializer/items/DeleteEventActionInitializer.mjs +3 -3
- package/es/schema-initializer/items/FilterBlockInitializer.mjs +2 -2
- package/es/schema-initializer/items/G2PlotInitializer.mjs +5 -5
- package/es/schema-initializer/items/InitializerWithSwitch.mjs +9 -9
- package/es/schema-initializer/items/RecordAssociationBlockInitializer.mjs +20 -20
- package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.mjs +20 -20
- package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.mjs +24 -24
- package/es/schema-initializer/items/RecordAssociationGridCardBlockInitializer.mjs +20 -20
- package/es/schema-initializer/items/RecordAssociationListBlockInitializer.mjs +20 -20
- package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.mjs +23 -23
- package/es/schema-initializer/items/SelectActionInitializer.mjs +3 -3
- package/es/schema-initializer/items/SubmitActionInitializer.mjs +3 -3
- package/es/schema-initializer/items/TableActionColumnInitializer.mjs +7 -7
- package/es/schema-initializer/style.mjs +2 -2
- package/es/schema-initializer/utils.mjs +187 -190
- package/es/schema-items/GeneralSchemaItems.mjs +28 -28
- package/es/schema-items/GeneralSettings.mjs +43 -43
- package/es/schema-items/OpenModeSchemaItems.mjs +27 -27
- package/es/schema-settings/DataTemplates/FormDataTemplates.mjs +40 -40
- package/es/schema-settings/DataTemplates/TreeLabel.mjs +5 -5
- package/es/schema-settings/DataTemplates/components/AsDefaultTemplate.mjs +13 -13
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.mjs +61 -61
- package/es/schema-settings/DataTemplates/components/DataTemplateTitle.style.mjs +2 -2
- package/es/schema-settings/DataTemplates/components/Designer.mjs +36 -36
- package/es/schema-settings/DataTemplates/hooks/useCollectionState.mjs +31 -31
- package/es/schema-settings/DataTemplates/utils.mjs +37 -37
- package/es/schema-settings/DateFormat/ExpiresRadio.mjs +28 -28
- package/es/schema-settings/EditCustomDefaultValue.mjs +23 -23
- package/es/schema-settings/EditFormulaTitleField.mjs +26 -26
- package/es/schema-settings/EnableChildCollections/DynamicComponent.mjs +16 -16
- package/es/schema-settings/EnableChildCollections/index.mjs +14 -14
- package/es/schema-settings/GeneralSchemaDesigner.mjs +82 -82
- package/es/schema-settings/LinkageRules/DynamicComponent.mjs +16 -16
- package/es/schema-settings/LinkageRules/LinkageRuleAction.mjs +51 -51
- package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.mjs +26 -26
- package/es/schema-settings/LinkageRules/ValueDynamicComponent.mjs +35 -35
- package/es/schema-settings/LinkageRules/Variables.mjs +5 -5
- package/es/schema-settings/LinkageRules/action-hooks.mjs +17 -17
- package/es/schema-settings/LinkageRules/components/EnableLinkage.mjs +12 -12
- package/es/schema-settings/LinkageRules/components/LinkageHeader.mjs +59 -59
- package/es/schema-settings/LinkageRules/components/LinkageHeader.style.mjs +2 -2
- package/es/schema-settings/LinkageRules/context.mjs +4 -4
- package/es/schema-settings/LinkageRules/index.mjs +33 -33
- package/es/schema-settings/LinkageRules/type.mjs +2 -2
- package/es/schema-settings/LinkageRules/useValues.mjs +8 -8
- package/es/schema-settings/SchemaSettingCollection.mjs +11 -11
- package/es/schema-settings/SchemaSettingComponent.mjs +10 -10
- package/es/schema-settings/SchemaSettings.mjs +295 -295
- package/es/schema-settings/SchemaSettingsDataScope.mjs +27 -27
- package/es/schema-settings/SchemaSettingsDateFormat.mjs +26 -26
- package/es/schema-settings/SchemaSettingsDefaultValue.mjs +57 -57
- package/es/schema-settings/SchemaSettingsNumberFormat.mjs +17 -17
- package/es/schema-settings/SchemaSettingsPlugin.mjs +110 -110
- package/es/schema-settings/SchemaSettingsSortingRule.mjs +21 -21
- package/es/schema-settings/VariableInput/VariableInput.mjs +31 -31
- package/es/schema-settings/VariableInput/hooks/useBaseVariable.mjs +18 -18
- package/es/schema-settings/VariableInput/hooks/useBlockCollection.mjs +3 -3
- package/es/schema-settings/VariableInput/hooks/useContextAssociationFields.mjs +12 -12
- package/es/schema-settings/VariableInput/hooks/useDateVariable.mjs +8 -8
- package/es/schema-settings/VariableInput/hooks/useFilterVariable.mjs +15 -15
- package/es/schema-settings/VariableInput/hooks/useFormVariable.mjs +8 -8
- package/es/schema-settings/VariableInput/hooks/useIterationVariable.mjs +12 -12
- package/es/schema-settings/VariableInput/hooks/useParentRecordVariable.mjs +14 -14
- package/es/schema-settings/VariableInput/hooks/usePopupVariable.mjs +4 -4
- package/es/schema-settings/VariableInput/hooks/useRecordVariable.mjs +10 -10
- package/es/schema-settings/VariableInput/hooks/useRoleVariable.mjs +9 -9
- package/es/schema-settings/VariableInput/hooks/useUserVariable.mjs +11 -11
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.mjs +23 -23
- package/es/schema-settings/filter-form/FormFilterScope.mjs +25 -25
- package/es/schema-settings/filter-form/context.mjs +5 -5
- package/es/schema-settings/hooks/useFilterFormCustomProps.mjs +2 -2
- package/es/schema-settings/hooks/useGetAriaLabelOfDesigner.mjs +6 -6
- package/es/schema-settings/hooks/useIsAllowToSetDefaultValue.mjs +20 -20
- package/es/schema-settings/hooks/useIsShowMultipleSwitch.mjs +7 -7
- package/es/schema-settings/hooks/useParseDataScopeFilter.mjs +13 -13
- package/es/schema-settings/isPatternDisabled.mjs +1 -1
- package/es/schema-settings/styles.mjs +2 -2
- package/es/schema-settings/utils/createModalSettingsItem.mjs +12 -12
- package/es/schema-settings/utils/createSelectSettingsItem.mjs +12 -12
- package/es/schema-settings/utils/createSwitchSettingsItem.mjs +12 -12
- package/es/schema-settings/utils/createTextSettingsItem.mjs +6 -6
- package/es/schema-settings/utils/util.mjs +7 -7
- package/es/schema-templates/BlockTemplate.mjs +18 -18
- package/es/schema-templates/BlockTemplateDetails.mjs +29 -29
- package/es/schema-templates/BlockTemplatePage.mjs +13 -13
- package/es/schema-templates/SchemaTemplateManagerProvider.mjs +20 -20
- package/es/schema-templates/schemas/CollectionTitle.mjs +9 -9
- package/es/schema-templates/schemas/uiSchemaTemplates.mjs +17 -17
- package/es/schema-templates/useSchemaTemplateManager.mjs +18 -18
- package/es/style/css-variable/CSSVariableProvider.mjs +14 -14
- package/es/style/css-variable/index.mjs +2 -3
- package/es/style/index.mjs +4 -11
- package/es/style/theme/AntdAppProvider.mjs +15 -15
- package/es/style/theme/defaultTheme.mjs +2 -2
- package/es/style/theme/index.mjs +26 -28
- package/es/style/useToken.mjs +2 -2
- package/es/testUtils/mockAPIClient.mjs +4 -4
- package/es/user/ChangePassword.mjs +20 -20
- package/es/user/CurrentUser.mjs +47 -47
- package/es/user/CurrentUserProvider.mjs +19 -19
- package/es/user/CurrentUserSettingsMenuProvider.mjs +13 -13
- package/es/user/EditProfile.mjs +24 -24
- package/es/user/LanguageSettings.mjs +15 -15
- package/es/user/SwitchRole.mjs +11 -11
- package/es/user/VerificationCode.mjs +18 -18
- package/es/variables/VariablesProvider.mjs +66 -66
- package/es/variables/hooks/useBuiltinVariables.mjs +12 -12
- package/es/variables/hooks/useContextVariable.mjs +11 -11
- package/es/variables/hooks/useLocalVariables.mjs +21 -21
- package/es/variables/hooks/useVariables.mjs +5 -5
- package/es/variables/index.mjs +6 -12
- package/es/variables/utils/getPath.mjs +3 -3
- package/es/variables/utils/getVariableName.mjs +4 -4
- package/es/variables/utils/transformVariableValue.mjs +3 -3
- package/es/variables/utils/uniq.mjs +3 -3
- package/lib/api-client/APIClient.js +23 -27
- package/lib/api-client/APIClientProvider.js +8 -8
- package/lib/api-client/context.js +8 -8
- package/lib/api-client/hooks/assign.js +15 -17
- package/lib/api-client/hooks/index.js +28 -33
- package/lib/api-client/hooks/useAPIClient.js +8 -8
- package/lib/api-client/hooks/useRequest.js +9 -9
- package/lib/api-client/hooks/useResource.js +8 -8
- package/lib/api-client/index.js +36 -41
- package/lib/application/AppSchemaComponentProvider.js +9 -9
- package/lib/application/Application.js +20 -39
- package/lib/application/AttachmentPreviewManager.js +9 -11
- package/lib/application/CustomRouterContextProvider.js +60 -28
- package/lib/application/NoticesManager.js +33 -23
- package/lib/application/Plugin.js +10 -12
- package/lib/application/PluginContextMenu.js +9 -11
- package/lib/application/PluginManager.js +9 -9
- package/lib/application/RouterManager.js +12 -14
- package/lib/application/SystemSettingsManager.js +19 -13
- package/lib/application/TrackingManager.js +9 -11
- package/lib/application/UserSettingsManager.js +17 -11
- package/lib/application/WebSocketClient.js +12 -12
- package/lib/application/components/AppComponent.js +9 -9
- package/lib/application/components/BlankComponent.js +8 -8
- package/lib/application/components/MainComponent.js +10 -14
- package/lib/application/components/RouterContextCleaner.js +10 -14
- package/lib/application/components/SharePage.js +18 -12
- package/lib/application/components/ShareSchemaComponent.js +8 -8
- package/lib/application/components/defaultComponents.js +8 -8
- package/lib/application/components/index.js +46 -51
- package/lib/application/context.js +8 -8
- package/lib/application/hoc/index.js +16 -21
- package/lib/application/hoc/withDynamicSchemaProps.js +14 -16
- package/lib/application/hooks/index.js +34 -39
- package/lib/application/hooks/useApp.js +8 -8
- package/lib/application/hooks/useGlobalVariable.js +8 -8
- package/lib/application/hooks/usePlugin.js +8 -8
- package/lib/application/hooks/useRouter.js +8 -8
- package/lib/application/index.js +146 -150
- package/lib/application/schema-initializer/SchemaInitializer.js +9 -11
- package/lib/application/schema-initializer/SchemaInitializerManager.js +9 -11
- package/lib/application/schema-initializer/components/SchemaInitializerActionModal.js +12 -10
- package/lib/application/schema-initializer/components/SchemaInitializerButton.js +10 -14
- package/lib/application/schema-initializer/components/SchemaInitializerChildren.js +12 -10
- package/lib/application/schema-initializer/components/SchemaInitializerDivider.js +8 -8
- package/lib/application/schema-initializer/components/SchemaInitializerItem.js +14 -16
- package/lib/application/schema-initializer/components/SchemaInitializerItemGroup.js +12 -10
- package/lib/application/schema-initializer/components/SchemaInitializerItems.js +8 -8
- package/lib/application/schema-initializer/components/SchemaInitializerSelect.js +12 -10
- package/lib/application/schema-initializer/components/SchemaInitializerSubMenu.js +18 -16
- package/lib/application/schema-initializer/components/SchemaInitializerSwitch.js +12 -10
- package/lib/application/schema-initializer/components/index.js +71 -76
- package/lib/application/schema-initializer/components/style.js +8 -8
- package/lib/application/schema-initializer/context/index.js +18 -16
- package/lib/application/schema-initializer/hoc/index.js +10 -14
- package/lib/application/schema-initializer/hooks/index.js +173 -177
- package/lib/application/schema-initializer/hooks/useAriaAttributeOfMenuItem.js +8 -8
- package/lib/application/schema-initializer/index.js +54 -59
- package/lib/application/schema-initializer/types.js +3 -4
- package/lib/application/schema-settings/SchemaSettings.js +9 -11
- package/lib/application/schema-settings/SchemaSettingsDefaults.js +8 -8
- package/lib/application/schema-settings/SchemaSettingsManager.js +12 -17
- package/lib/application/schema-settings/components/SchemaSettingsChildren.js +12 -10
- package/lib/application/schema-settings/components/SchemaSettingsIcon.js +10 -14
- package/lib/application/schema-settings/components/SchemaSettingsWrapper.js +10 -14
- package/lib/application/schema-settings/components/index.js +22 -27
- package/lib/application/schema-settings/context/index.js +10 -8
- package/lib/application/schema-settings/hooks/index.js +10 -14
- package/lib/application/schema-settings/index.js +48 -53
- package/lib/application/schema-settings/types.js +3 -4
- package/lib/application/schema-toolbar/context/index.js +14 -10
- package/lib/application/schema-toolbar/hooks/index.js +8 -8
- package/lib/application/schema-toolbar/index.js +24 -29
- package/lib/application/utils/globalDeps.js +10 -14
- package/lib/application/utils/index.js +10 -8
- package/lib/application/utils/remotePlugins.js +24 -26
- package/lib/async-data-provider/index.js +14 -10
- package/lib/block-provider/BlockProvider.js +55 -29
- package/lib/block-provider/DetailsBlockProvider.js +23 -21
- package/lib/block-provider/FilterFormBlockProvider.js +8 -8
- package/lib/block-provider/FormBlockProvider.js +36 -28
- package/lib/block-provider/FormFieldProvider.js +25 -17
- package/lib/block-provider/MobileProvider.js +10 -8
- package/lib/block-provider/PageLayout.js +8 -8
- package/lib/block-provider/TableBlockProvider.js +27 -23
- package/lib/block-provider/TableFieldProvider.js +35 -25
- package/lib/block-provider/TableSelectorProvider.js +50 -46
- package/lib/block-provider/TreeBlockProvider.js +23 -17
- package/lib/block-provider/hooks/index.js +1371 -1388
- package/lib/block-provider/hooks/useDataBlockSourceId.js +9 -9
- package/lib/block-provider/hooks/useFormActiveFields.js +12 -10
- package/lib/block-provider/hooks/useIsMobile.js +8 -8
- package/lib/block-provider/hooks/useParsedFilter.js +10 -14
- package/lib/block-provider/index.js +77 -82
- package/lib/built-in/acl/ACLPlugin.js +8 -8
- package/lib/built-in/acl/ACLProvider.js +63 -35
- package/lib/built-in/acl/ACLShortcut.js +8 -8
- package/lib/built-in/acl/Configuration/ConfigureCenter.js +12 -10
- package/lib/built-in/acl/Configuration/MenuConfigure.js +9 -9
- package/lib/built-in/acl/Configuration/MenuItemsProvider.js +13 -9
- package/lib/built-in/acl/Configuration/PermisionProvider.js +15 -11
- package/lib/built-in/acl/Configuration/RoleConfigure.js +12 -16
- package/lib/built-in/acl/Configuration/RoleTable.js +10 -8
- package/lib/built-in/acl/Configuration/RolesResourcesActions.js +18 -16
- package/lib/built-in/acl/Configuration/ScopeSelect.js +11 -9
- package/lib/built-in/acl/Configuration/StrategyActions.js +9 -9
- package/lib/built-in/acl/Configuration/index.js +79 -83
- package/lib/built-in/acl/Configuration/schemas/roles.js +10 -14
- package/lib/built-in/acl/Configuration/schemas/scopes.js +10 -8
- package/lib/built-in/acl/Configuration/schemas/useRoleResourceValues.js +11 -14
- package/lib/built-in/acl/Configuration/schemas/useSaveRoleResourceAction.js +8 -8
- package/lib/built-in/acl/index.js +34 -39
- package/lib/built-in/acl/style.js +8 -8
- package/lib/built-in/admin-layout/AdminContent.js +8 -12
- package/lib/built-in/admin-layout/AdminLayout.js +8 -8
- package/lib/built-in/admin-layout/AdminLayoutPlugin.js +8 -8
- package/lib/built-in/admin-layout/AdminProvider.js +10 -14
- package/lib/built-in/admin-layout/AdminTabs.js +8 -8
- package/lib/built-in/admin-layout/InternalAdminLayout.js +10 -10
- package/lib/built-in/admin-layout/MenuEditor.js +18 -13
- package/lib/built-in/admin-layout/NoticeArea.js +8 -8
- package/lib/built-in/admin-layout/components/AddNewButton.js +9 -9
- package/lib/built-in/admin-layout/components/WelcomeCard.js +8 -8
- package/lib/built-in/admin-layout/filterByACL.js +9 -11
- package/lib/built-in/admin-layout/index.js +71 -76
- package/lib/built-in/admin-layout/style.js +8 -8
- package/lib/built-in/attachment-preview/index.js +8 -8
- package/lib/built-in/attachment-preview/interface.js +3 -4
- package/lib/built-in/attachment-preview/previewers/file-default.js +8 -8
- package/lib/built-in/attachment-preview/previewers/file-pdf.js +10 -10
- package/lib/built-in/attachment-preview/previewers/file-pdf.style.js +8 -8
- package/lib/built-in/attachment-preview/previewers/file-sheet.js +18 -18
- package/lib/built-in/attachment-preview/previewers/file-sheet.style.js +8 -8
- package/lib/built-in/attachment-preview/previewers/image-jpeg.js +8 -8
- package/lib/built-in/attachment-preview/previewers/image-png.js +8 -8
- package/lib/built-in/attachment-preview/previewers/image-svg.js +8 -8
- package/lib/built-in/attachment-preview/previewers/index.js +46 -51
- package/lib/built-in/block-schema-component/index.js +8 -8
- package/lib/built-in/built-in-collections/index.js +10 -8
- package/lib/built-in/context-menu/ContextMenu.provider.js +10 -8
- package/lib/built-in/context-menu/ContextMenuItemsProps.js +18 -12
- package/lib/built-in/context-menu/index.js +14 -10
- package/lib/built-in/context-menu/useContextMenu.js +12 -10
- package/lib/built-in/document-title/index.js +21 -11
- package/lib/built-in/dynamic-page/DynamicPage.js +8 -8
- package/lib/built-in/dynamic-page/index.js +19 -17
- package/lib/built-in/dynamic-page/style.js +10 -8
- package/lib/built-in/dynamic-page/utils.js +10 -12
- package/lib/built-in/index.js +519 -519
- package/lib/built-in/locale/LocalePlugin.js +88 -88
- package/lib/built-in/locale/loadConstrueLocale.js +10 -14
- package/lib/built-in/page-style/CustomAdminHeader.js +8 -8
- package/lib/built-in/page-style/PageStyle.provider.js +13 -11
- package/lib/built-in/page-style/TabContent.js +12 -8
- package/lib/built-in/page-style/TabHeader.js +12 -14
- package/lib/built-in/page-style/TabHeader.style.js +8 -8
- package/lib/built-in/page-style/index.js +8 -8
- package/lib/built-in/page-style/usePageStyle.js +8 -8
- package/lib/built-in/page-style/useTabSettings.js +16 -12
- package/lib/built-in/pinned-list/PinnedPluginListProvider.js +11 -9
- package/lib/built-in/pinned-list/PluginPinnedList.js +8 -8
- package/lib/built-in/pinned-list/context.js +8 -8
- package/lib/built-in/pinned-list/index.js +23 -28
- package/lib/built-in/pm/PluginCard.js +16 -24
- package/lib/built-in/pm/PluginDetail.js +25 -29
- package/lib/built-in/pm/PluginDocument.js +8 -8
- package/lib/built-in/pm/PluginForm/form/PluginNpmForm.js +10 -8
- package/lib/built-in/pm/PluginForm/form/PluginUploadForm.js +9 -9
- package/lib/built-in/pm/PluginForm/form/PluginUrlForm.js +8 -8
- package/lib/built-in/pm/PluginForm/modal/PluginAddModal.js +8 -8
- package/lib/built-in/pm/PluginForm/modal/PluginUpgradeModal.js +8 -8
- package/lib/built-in/pm/PluginManager.js +18 -22
- package/lib/built-in/pm/index.js +24 -14
- package/lib/built-in/pm/style.js +8 -8
- package/lib/built-in/pm/types.js +3 -4
- package/lib/built-in/quick-access/Action.js +10 -10
- package/lib/built-in/quick-access/Block.js +14 -12
- package/lib/built-in/quick-access/CustomRequestActionSchemaInitializerItem.js +12 -10
- package/lib/built-in/quick-access/LinkActionSchemaInitializerItem.js +10 -8
- package/lib/built-in/quick-access/ModalActionSchemaInitializerItem.js +11 -11
- package/lib/built-in/quick-access/PopupActionSchemaInitializerItem.js +12 -10
- package/lib/built-in/quick-access/SchemaSettingsBlockTitleItem.js +9 -9
- package/lib/built-in/quick-access/blockInitializerItem.js +8 -8
- package/lib/built-in/quick-access/blockSchema.js +9 -11
- package/lib/built-in/quick-access/blockSettings.js +11 -9
- package/lib/built-in/quick-access/configureActions.js +8 -8
- package/lib/built-in/quick-access/index.js +8 -8
- package/lib/built-in/scroll-assistant/ScrollAssistant.provider.js +8 -8
- package/lib/built-in/scroll-assistant/ScrollAssistantStatus.provider.js +12 -10
- package/lib/built-in/scroll-assistant/index.js +10 -8
- package/lib/built-in/scroll-assistant/useJoystick.js +11 -17
- package/lib/built-in/setting-layout/AdminSettings.js +16 -14
- package/lib/built-in/setting-layout/SettingLayout.js +11 -11
- package/lib/built-in/setting-layout/SettingsCenterDropdown.js +9 -9
- package/lib/built-in/setting-layout/style.js +8 -8
- package/lib/built-in/system-settings/SystemSettingsProvider.js +12 -8
- package/lib/built-in/system-settings/SystemSettingsShortcut.js +12 -16
- package/lib/built-in/system-settings/index.js +40 -44
- package/lib/built-in/system-version/SystemVersion.provider.js +8 -8
- package/lib/built-in/system-version/index.js +8 -8
- package/lib/built-in/user-settings/UserSettingsLayout.js +16 -16
- package/lib/built-in/user-settings/index.js +8 -8
- package/lib/built-in/user-settings/style.js +8 -8
- package/lib/collection-manager/CollectionHistoryProvider.js +15 -11
- package/lib/collection-manager/CollectionManagerProvider.js +15 -11
- package/lib/collection-manager/CollectionManagerSchemaComponentProvider.js +8 -8
- package/lib/collection-manager/CollectionProvider_deprecated.js +8 -8
- package/lib/collection-manager/Configuration/AddCollectionAction.js +13 -11
- package/lib/collection-manager/Configuration/AddFieldAction.js +24 -24
- package/lib/collection-manager/Configuration/AddSubFieldAction.js +8 -8
- package/lib/collection-manager/Configuration/DeleteCollectionAction.js +23 -13
- package/lib/collection-manager/Configuration/EditCollectionAction.js +19 -17
- package/lib/collection-manager/Configuration/EditFieldAction.js +18 -20
- package/lib/collection-manager/Configuration/EditSubFieldAction.js +11 -15
- package/lib/collection-manager/Configuration/ImportCollectionMetaAction.js +11 -15
- package/lib/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.js +12 -16
- package/lib/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.js +10 -10
- package/lib/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.js +8 -8
- package/lib/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.js +12 -18
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.js +15 -15
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.js +12 -14
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +11 -15
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.js +8 -8
- package/lib/collection-manager/Configuration/OverridingCollectionField.js +17 -19
- package/lib/collection-manager/Configuration/SyncFieldsAction.js +13 -11
- package/lib/collection-manager/Configuration/SyncSQLFieldsAction.js +8 -8
- package/lib/collection-manager/Configuration/ViewInheritedField.js +14 -16
- package/lib/collection-manager/Configuration/components/CollectionCategory.js +8 -8
- package/lib/collection-manager/Configuration/components/CollectionFieldInterfaceTag.js +8 -8
- package/lib/collection-manager/Configuration/components/CollectionTemplateTag.js +8 -8
- package/lib/collection-manager/Configuration/components/FieldSummary.js +10 -14
- package/lib/collection-manager/Configuration/components/Summary.js +10 -10
- package/lib/collection-manager/Configuration/components/TemplateSummary.js +10 -14
- package/lib/collection-manager/Configuration/components/index.js +47 -33
- package/lib/collection-manager/Configuration/index.js +122 -127
- package/lib/collection-manager/Configuration/interfaces.js +12 -10
- package/lib/collection-manager/ResourceActionProvider.js +25 -17
- package/lib/collection-manager/action-hooks.js +108 -59
- package/lib/collection-manager/collectionPlugin.js +9 -9
- package/lib/collection-manager/context.js +8 -8
- package/lib/collection-manager/hooks/index.js +34 -39
- package/lib/collection-manager/hooks/useCollectionDataSource.js +8 -8
- package/lib/collection-manager/hooks/useCollectionField_deprecated.js +8 -8
- package/lib/collection-manager/hooks/useCollectionManager_deprecated.js +30 -34
- package/lib/collection-manager/hooks/useCollection_deprecated.js +13 -13
- package/lib/collection-manager/hooks/useDialect.js +11 -11
- package/lib/collection-manager/index.js +327 -331
- package/lib/collection-manager/interfaces/checkbox.js +8 -8
- package/lib/collection-manager/interfaces/checkboxGroup.js +8 -8
- package/lib/collection-manager/interfaces/chinaRegion.js +8 -8
- package/lib/collection-manager/interfaces/collection.js +8 -8
- package/lib/collection-manager/interfaces/color.js +8 -8
- package/lib/collection-manager/interfaces/components/index.js +24 -14
- package/lib/collection-manager/interfaces/createdAt.js +8 -8
- package/lib/collection-manager/interfaces/createdBy.js +8 -8
- package/lib/collection-manager/interfaces/datetime.js +8 -8
- package/lib/collection-manager/interfaces/email.js +8 -8
- package/lib/collection-manager/interfaces/icon.js +8 -8
- package/lib/collection-manager/interfaces/id.js +8 -8
- package/lib/collection-manager/interfaces/index.js +253 -258
- package/lib/collection-manager/interfaces/input.js +8 -8
- package/lib/collection-manager/interfaces/integer.js +8 -8
- package/lib/collection-manager/interfaces/json.js +8 -8
- package/lib/collection-manager/interfaces/linkTo.js +8 -8
- package/lib/collection-manager/interfaces/m2m.js +9 -9
- package/lib/collection-manager/interfaces/m2o.js +9 -9
- package/lib/collection-manager/interfaces/markdown.js +8 -8
- package/lib/collection-manager/interfaces/multipleSelect.js +8 -8
- package/lib/collection-manager/interfaces/nanoid.js +8 -8
- package/lib/collection-manager/interfaces/number.js +8 -8
- package/lib/collection-manager/interfaces/o2m.js +13 -11
- package/lib/collection-manager/interfaces/o2o.js +14 -10
- package/lib/collection-manager/interfaces/password.js +8 -8
- package/lib/collection-manager/interfaces/percent.js +8 -8
- package/lib/collection-manager/interfaces/phone.js +8 -8
- package/lib/collection-manager/interfaces/properties/index.js +41 -17
- package/lib/collection-manager/interfaces/properties/operators.js +45 -47
- package/lib/collection-manager/interfaces/radioGroup.js +8 -8
- package/lib/collection-manager/interfaces/richText.js +8 -8
- package/lib/collection-manager/interfaces/select.js +8 -8
- package/lib/collection-manager/interfaces/sort.js +8 -8
- package/lib/collection-manager/interfaces/subTable.js +8 -8
- package/lib/collection-manager/interfaces/tableoid.js +8 -8
- package/lib/collection-manager/interfaces/textarea.js +8 -8
- package/lib/collection-manager/interfaces/time.js +8 -8
- package/lib/collection-manager/interfaces/types.js +3 -4
- package/lib/collection-manager/interfaces/unixTimestamp.js +8 -8
- package/lib/collection-manager/interfaces/updatedAt.js +8 -8
- package/lib/collection-manager/interfaces/updatedBy.js +8 -8
- package/lib/collection-manager/interfaces/url.js +8 -8
- package/lib/collection-manager/interfaces/uuid.js +8 -8
- package/lib/collection-manager/mixins/InheritanceCollectionMixin.js +13 -13
- package/lib/collection-manager/sub-table.js +21 -15
- package/lib/collection-manager/templates/components/PresetFields.js +13 -13
- package/lib/collection-manager/templates/components/PreviewFields.js +24 -28
- package/lib/collection-manager/templates/components/PreviewTable.js +13 -13
- package/lib/collection-manager/templates/components/sql-collection/FieldsConfigure.js +50 -56
- package/lib/collection-manager/templates/components/sql-collection/PreviewTable.js +9 -9
- package/lib/collection-manager/templates/components/sql-collection/SQLInput.js +8 -8
- package/lib/collection-manager/templates/components/sql-collection/SQLRequestProvider.js +10 -10
- package/lib/collection-manager/templates/components/sql-collection/index.js +34 -39
- package/lib/collection-manager/templates/expression.js +9 -9
- package/lib/collection-manager/templates/general.js +9 -9
- package/lib/collection-manager/templates/import.js +8 -8
- package/lib/collection-manager/templates/index.js +47 -52
- package/lib/collection-manager/templates/properties/index.js +11 -9
- package/lib/collection-manager/templates/sql.js +8 -8
- package/lib/collection-manager/templates/tree.js +9 -9
- package/lib/collection-manager/templates/types.js +3 -4
- package/lib/collection-manager/templates/view.js +9 -9
- package/lib/collection-manager/templates/xlsx.js +8 -8
- package/lib/collection-manager/types.js +3 -4
- package/lib/collection-manager/utils.js +13 -15
- package/lib/common/SelectWithTitle.js +8 -8
- package/lib/common/appInfo/CurrentAppInfoProvider.js +13 -9
- package/lib/common/appInfo/index.js +16 -21
- package/lib/common/index.js +28 -33
- package/lib/common/useFieldComponentName.js +10 -10
- package/lib/common/useNiceDropdownHeight.js +8 -8
- package/lib/data-source/collection/AssociationProvider.js +14 -10
- package/lib/data-source/collection/Collection.js +8 -8
- package/lib/data-source/collection/CollectionManager.js +10 -13
- package/lib/data-source/collection/CollectionManagerProvider.js +16 -10
- package/lib/data-source/collection/CollectionProvider.js +16 -10
- package/lib/data-source/collection/ExtendCollectionsProvider.js +14 -10
- package/lib/data-source/collection/index.js +46 -51
- package/lib/data-source/collection/utils.js +12 -14
- package/lib/data-source/collection-field/CollectionField.js +11 -9
- package/lib/data-source/collection-field/CollectionFieldProvider.js +15 -11
- package/lib/data-source/collection-field/index.js +22 -27
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +11 -13
- package/lib/data-source/collection-field-interface/CollectionFieldInterfaceManager.js +11 -13
- package/lib/data-source/collection-field-interface/index.js +22 -27
- package/lib/data-source/collection-fields-to-initializer-items/CollectionFieldsToFormInitializerItems.js +11 -9
- package/lib/data-source/collection-fields-to-initializer-items/CollectionFieldsToInitializerItems.js +8 -8
- package/lib/data-source/collection-fields-to-initializer-items/index.js +16 -21
- package/lib/data-source/collection-fields-to-initializer-items/items/AssociationCollectionFields.js +10 -10
- package/lib/data-source/collection-fields-to-initializer-items/items/ParentCollectionFields.js +8 -8
- package/lib/data-source/collection-fields-to-initializer-items/items/SelfFields.js +8 -8
- package/lib/data-source/collection-fields-to-initializer-items/items/index.js +12 -8
- package/lib/data-source/collection-fields-to-initializer-items/utils/getInitializerItemsByFields.js +14 -16
- package/lib/data-source/collection-fields-to-initializer-items/utils/index.js +28 -33
- package/lib/data-source/collection-fields-to-initializer-items/utils/type.js +3 -4
- package/lib/data-source/collection-fields-to-initializer-items/utils/useCollectionFieldContext.js +8 -8
- package/lib/data-source/collection-record/CollectionRecord.js +9 -11
- package/lib/data-source/collection-record/CollectionRecordProvider.js +31 -22
- package/lib/data-source/collection-record/index.js +22 -27
- package/lib/data-source/collection-record/isNewRecord.js +12 -10
- package/lib/data-source/collection-template/CollectionTemplate.js +9 -11
- package/lib/data-source/collection-template/CollectionTemplateManager.js +11 -13
- package/lib/data-source/collection-template/index.js +22 -27
- package/lib/data-source/commonsSettingsItem/fieldComponent.js +13 -17
- package/lib/data-source/commonsSettingsItem/index.js +16 -21
- package/lib/data-source/components/CollectionDeletedPlaceholder.js +8 -8
- package/lib/data-source/components/DataSourceApplicationProvider.js +8 -8
- package/lib/data-source/components/index.js +22 -27
- package/lib/data-source/data-block/DataBlockProvider.js +19 -11
- package/lib/data-source/data-block/DataBlockRequestProvider.js +16 -12
- package/lib/data-source/data-block/DataBlockResourceProvider.js +15 -11
- package/lib/data-source/data-block/context/ConfigSetting.provider.js +12 -8
- package/lib/data-source/data-block/index.js +34 -39
- package/lib/data-source/data-source/DataSource.js +10 -8
- package/lib/data-source/data-source/DataSourceManager.js +14 -14
- package/lib/data-source/data-source/DataSourceManagerProvider.js +14 -10
- package/lib/data-source/data-source/DataSourceProvider.js +19 -17
- package/lib/data-source/data-source/index.js +34 -39
- package/lib/data-source/index.js +78 -83
- package/lib/data-source/utils.js +13 -11
- package/lib/filter-provider/FilterProvider.js +18 -18
- package/lib/filter-provider/index.js +23 -28
- package/lib/filter-provider/utils.js +45 -29
- package/lib/flag-provider/FlagProvider.js +14 -16
- package/lib/flag-provider/hooks/useFlag.js +8 -8
- package/lib/flag-provider/index.js +22 -27
- package/lib/hooks/index.js +22 -27
- package/lib/hooks/useAdminSchemaUid.js +9 -11
- package/lib/hooks/useMenuItem.js +20 -16
- package/lib/hooks/useViewport.js +8 -8
- package/lib/i18n/i18n.js +12 -14
- package/lib/i18n/index.js +17 -22
- package/lib/icon/Icon.js +30 -24
- package/lib/icon/index.js +16 -21
- package/lib/icon/preloaded.js +27 -13
- package/lib/index.js +500 -504
- package/lib/modules/actions/ActionSchemaToolbar.js +8 -8
- package/lib/modules/actions/add-child/CreateChildInitializer.js +8 -8
- package/lib/modules/actions/add-child/addChildActionSettings.js +8 -8
- package/lib/modules/actions/add-new/CreateActionInitializer.js +8 -8
- package/lib/modules/actions/add-new/addNewActionSettings.js +8 -8
- package/lib/modules/actions/add-new/createFormBlockInitializers.js +8 -8
- package/lib/modules/actions/add-record/CustomizeAddRecordActionInitializer.js +8 -8
- package/lib/modules/actions/add-record/customizeAddRecordActionSettings.js +8 -8
- package/lib/modules/actions/add-record/customizeCreateFormBlockInitializers.js +8 -8
- package/lib/modules/actions/associate/AssociateActionInitializer.js +8 -8
- package/lib/modules/actions/associate/AssociateActionProvider.js +11 -11
- package/lib/modules/actions/associate/AssociateActionSettings.js +8 -8
- package/lib/modules/actions/bulk-destroy/BulkDestroyActionInitializer.js +8 -8
- package/lib/modules/actions/bulk-destroy/bulkDeleteActionSettings.js +8 -8
- package/lib/modules/actions/delete/DestroyActionInitializer.js +8 -8
- package/lib/modules/actions/delete/deleteActionSettings.js +9 -9
- package/lib/modules/actions/disassociate/DisassociateActionInitializer.js +8 -8
- package/lib/modules/actions/disassociate/disassociateActionSettings.js +8 -8
- package/lib/modules/actions/expand-collapse/ExpandableActionInitializer.js +8 -8
- package/lib/modules/actions/expand-collapse/expendableActionSettings.js +9 -9
- package/lib/modules/actions/filter/FilterActionInitializer.js +8 -8
- package/lib/modules/actions/filter/filterActionSettings.js +9 -9
- package/lib/modules/actions/link/customizeLinkActionSettings.js +14 -16
- package/lib/modules/actions/link/hooks.js +8 -8
- package/lib/modules/actions/refresh/RefreshActionInitializer.js +8 -8
- package/lib/modules/actions/refresh/refreshActionSettings.js +8 -8
- package/lib/modules/actions/save-record/SaveRecordActionInitializer.js +8 -8
- package/lib/modules/actions/save-record/customizeSaveRecordActionSettings.js +9 -9
- package/lib/modules/actions/submit/CreateSubmitActionInitializer.js +8 -8
- package/lib/modules/actions/submit/UpdateSubmitActionInitializer.js +8 -8
- package/lib/modules/actions/submit/createSubmitActionSettings.js +14 -12
- package/lib/modules/actions/submit/updateSubmitActionSettings.js +15 -13
- package/lib/modules/actions/update-record/UpdateRecordActionInitializer.js +8 -8
- package/lib/modules/actions/update-record/customizeUpdateRecordActionSettings.js +9 -9
- package/lib/modules/actions/view-edit-popup/PopupActionInitializer.js +8 -8
- package/lib/modules/actions/view-edit-popup/RecordFormBlockInitializers.js +8 -8
- package/lib/modules/actions/view-edit-popup/UpdateActionInitializer.js +8 -8
- package/lib/modules/actions/view-edit-popup/ViewActionInitializer.js +8 -8
- package/lib/modules/actions/view-edit-popup/customizePopupActionSettings.js +8 -8
- package/lib/modules/actions/view-edit-popup/editActionSettings.js +8 -8
- package/lib/modules/actions/view-edit-popup/viewActionSettings.js +8 -8
- package/lib/modules/blocks/BlockSchemaToolbar.js +9 -9
- package/lib/modules/blocks/data-blocks/details-multi/DetailsActionInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.js +12 -10
- package/lib/modules/blocks/data-blocks/details-multi/createDetailsWithPaginationUISchema.js +8 -8
- package/lib/modules/blocks/data-blocks/details-multi/detailsWithPaginationSettings.js +17 -15
- package/lib/modules/blocks/data-blocks/details-multi/hooks/useDetailsWithPaginationDecoratorProps.js +8 -8
- package/lib/modules/blocks/data-blocks/details-multi/hooks/useDetailsWithPaginationProps.js +8 -8
- package/lib/modules/blocks/data-blocks/details-multi/setDataLoadingModeSettingsItem.js +15 -15
- package/lib/modules/blocks/data-blocks/details-single/ReadPrettyFormActionInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/details-single/ReadPrettyFormItemInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer.js +12 -10
- package/lib/modules/blocks/data-blocks/details-single/createDetailsUISchema.js +8 -8
- package/lib/modules/blocks/data-blocks/details-single/detailsBlockSettings.js +11 -9
- package/lib/modules/blocks/data-blocks/details-single/hooks/useDetailsDecoratorProps.js +10 -8
- package/lib/modules/blocks/data-blocks/details-single/hooks/useDetailsProps.js +8 -8
- package/lib/modules/blocks/data-blocks/form/CreateFormBlockInitializer.js +8 -8
- package/lib/modules/blocks/data-blocks/form/FilterItemCustomSettings.js +21 -25
- package/lib/modules/blocks/data-blocks/form/FormBlockInitializer.js +10 -8
- package/lib/modules/blocks/data-blocks/form/FormItemSchemaToolbar.js +8 -8
- package/lib/modules/blocks/data-blocks/form/RecordFormBlockInitializer.js +10 -8
- package/lib/modules/blocks/data-blocks/form/createCreateFormBlockUISchema.js +8 -8
- package/lib/modules/blocks/data-blocks/form/createEditFormBlockUISchema.js +8 -8
- package/lib/modules/blocks/data-blocks/form/createFormActionInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/form/createFormBlockSettings.js +14 -12
- package/lib/modules/blocks/data-blocks/form/editFormBlockSettings.js +9 -9
- package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +19 -23
- package/lib/modules/blocks/data-blocks/form/formActionInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/form/formItemInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/form/hooks/useCreateFormBlockDecoratorProps.js +8 -8
- package/lib/modules/blocks/data-blocks/form/hooks/useCreateFormBlockProps.js +8 -8
- package/lib/modules/blocks/data-blocks/form/hooks/useEditFormBlockDecoratorProps.js +8 -8
- package/lib/modules/blocks/data-blocks/form/hooks/useEditFormBlockProps.js +8 -8
- package/lib/modules/blocks/data-blocks/form/index.js +94 -99
- package/lib/modules/blocks/data-blocks/form/updateFormActionInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/grid-card/GridCardActionInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/grid-card/GridCardBlockInitializer.js +10 -8
- package/lib/modules/blocks/data-blocks/grid-card/createGridCardBlockUISchema.js +9 -11
- package/lib/modules/blocks/data-blocks/grid-card/gridCardBlockSettings.js +22 -26
- package/lib/modules/blocks/data-blocks/grid-card/gridCardItemActionInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/grid-card/hooks/useGridCardBlockDecoratorProps.js +8 -8
- package/lib/modules/blocks/data-blocks/grid-card/hooks/useGridCardBlockParams.js +8 -8
- package/lib/modules/blocks/data-blocks/grid-card/utils.js +9 -11
- package/lib/modules/blocks/data-blocks/list/ListActionInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/list/ListBlockInitializer.js +12 -10
- package/lib/modules/blocks/data-blocks/list/createListBlockUISchema.js +9 -11
- package/lib/modules/blocks/data-blocks/list/hooks/useListBlockDecoratorProps.js +8 -8
- package/lib/modules/blocks/data-blocks/list/listBlockSettings.js +14 -18
- package/lib/modules/blocks/data-blocks/list/listItemActionInitializers.js +8 -8
- package/lib/modules/blocks/data-blocks/table/TableActionColumnInitializers.js +16 -18
- package/lib/modules/blocks/data-blocks/table/TableActionInitializers.js +9 -9
- package/lib/modules/blocks/data-blocks/table/TableBlockInitializer.js +12 -10
- package/lib/modules/blocks/data-blocks/table/TableColumnInitializers.js +9 -9
- package/lib/modules/blocks/data-blocks/table/TableColumnSchemaToolbar.js +10 -14
- package/lib/modules/blocks/data-blocks/table/createTableBlockUISchema.js +8 -8
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockDecoratorProps.js +11 -9
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +28 -35
- package/lib/modules/blocks/data-blocks/table/index.js +64 -69
- package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +24 -24
- package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +13 -13
- package/lib/modules/blocks/data-blocks/table/utils.js +9 -9
- package/lib/modules/blocks/data-blocks/table-selector/TableSelectorInitializer.js +8 -8
- package/lib/modules/blocks/data-blocks/table-selector/createTableSelectorUISchema.js +8 -8
- package/lib/modules/blocks/data-blocks/table-selector/hooks/useTableSelectorDecoratorProps.js +9 -11
- package/lib/modules/blocks/data-blocks/table-selector/index.js +22 -27
- package/lib/modules/blocks/data-blocks/table-selector/tableSelectorBlockSettings.js +16 -16
- package/lib/modules/blocks/filter-blocks/collapse/CollapseItemSchemaToolbar.js +8 -8
- package/lib/modules/blocks/filter-blocks/collapse/FilterCollapseBlockInitializer.js +8 -8
- package/lib/modules/blocks/filter-blocks/collapse/createFilterCollapseBlockSchema.js +8 -8
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseBlockSettings.js +9 -9
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +17 -21
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemInitializer.js +17 -15
- package/lib/modules/blocks/filter-blocks/collapse/hooks/useCollapseBlockDecoratorProps.js +9 -11
- package/lib/modules/blocks/filter-blocks/form/FilterFormActionInitializers.js +8 -8
- package/lib/modules/blocks/filter-blocks/form/FilterFormBlockInitializer.js +8 -8
- package/lib/modules/blocks/filter-blocks/form/createFilterFormBlockSchema.js +8 -8
- package/lib/modules/blocks/filter-blocks/form/filterFormBlockSettings.js +9 -9
- package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +17 -21
- package/lib/modules/blocks/filter-blocks/form/filterFormItemInitializers.js +8 -8
- package/lib/modules/blocks/filter-blocks/form/hooks/useFilterFormBlockDecoratorProps.js +9 -11
- package/lib/modules/blocks/filter-blocks/form/hooks/useFilterFormBlockProps.js +8 -8
- package/lib/modules/blocks/filter-blocks/tree/FilterTreeActionInitializers.js +8 -8
- package/lib/modules/blocks/filter-blocks/tree/FilterTreeBlockInitializer.js +10 -8
- package/lib/modules/blocks/filter-blocks/tree/filterTreeBlockSettings.js +9 -9
- package/lib/modules/blocks/filter-blocks/tree/filterTreeItemFieldSettings.js +17 -21
- package/lib/modules/blocks/filter-blocks/tree/filterTreeItemInitializers.js +8 -8
- package/lib/modules/blocks/other-blocks/markdown/MarkdownBlockInitializer.js +8 -8
- package/lib/modules/blocks/other-blocks/markdown/MarkdownFormItemInitializer.js +8 -8
- package/lib/modules/blocks/other-blocks/markdown/markdownBlockSettings.js +8 -8
- package/lib/modules/blocks/useParentRecordCommon.js +8 -8
- package/lib/modules/blocks/useSourceId.js +8 -8
- package/lib/modules/blocks/useSourceKey.js +8 -8
- package/lib/modules/fields/component/CascadeSelect/cascadeSelectComponentFieldSettings.js +10 -10
- package/lib/modules/fields/component/Cascader/cascaderComponentFieldSettings.js +35 -35
- package/lib/modules/fields/component/Checkbox/checkboxComponentFieldSettings.js +9 -9
- package/lib/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.js +8 -8
- package/lib/modules/fields/component/DatePicker/datePickerComponentFieldSettings.js +8 -8
- package/lib/modules/fields/component/DrawerSubTable/drawerSubTableComponentFieldSettings.js +10 -10
- package/lib/modules/fields/component/FileManager/fileManagerComponentFieldSettings.js +11 -11
- package/lib/modules/fields/component/FileManager/uploadAttachmentComponentFieldSettings.js +10 -10
- package/lib/modules/fields/component/Input/inputComponentFieldsSettings.js +8 -8
- package/lib/modules/fields/component/InputNumber/inputNumberComponentFieldSettings.js +14 -14
- package/lib/modules/fields/component/Nester/subformComponentFieldSettings.js +10 -10
- package/lib/modules/fields/component/Picker/TableSelectorInitializers.js +8 -8
- package/lib/modules/fields/component/Picker/recordPickerComponentFieldSettings.js +16 -14
- package/lib/modules/fields/component/PopoverNester/subformPopoverComponentFieldSettings.js +9 -9
- package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +9 -9
- package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +47 -35
- package/lib/modules/fields/component/SubTable/secondLevelSelect.js +11 -11
- package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +22 -16
- package/lib/modules/fields/component/Tag/tagComponentFieldSettings.js +13 -13
- package/lib/modules/fields/component/UnixTimestamp/unixTimestampComponentFieldSettings.js +8 -8
- package/lib/modules/fields/initializer/CollectionFieldInitializer.js +8 -8
- package/lib/modules/fields/initializer/TableCollectionFieldInitializer.js +8 -8
- package/lib/modules/menu/GroupItem.js +8 -8
- package/lib/modules/menu/LinkMenuItem.js +8 -8
- package/lib/modules/menu/PageMenuItem.js +8 -8
- package/lib/modules/menu/UploadMenuItem.js +8 -8
- package/lib/modules/menu/menuItemInitializer.js +8 -8
- package/lib/modules/page/BlockInitializers.js +8 -8
- package/lib/modules/variable/DeclareVariable.js +12 -10
- package/lib/modules/variable/useVariable.js +8 -8
- package/lib/powered-by/index.js +8 -8
- package/lib/record-provider/index.js +28 -14
- package/lib/route-switch/RouteSchemaComponent.js +8 -8
- package/lib/route-switch/index.js +16 -21
- package/lib/schema-component/antd/AntdSchemaComponentProvider.js +8 -8
- package/lib/schema-component/antd/__builtins__/hooks/index.js +28 -33
- package/lib/schema-component/antd/__builtins__/hooks/useConfig.js +8 -8
- package/lib/schema-component/antd/__builtins__/hooks/usePrefixCls.js +9 -9
- package/lib/schema-component/antd/__builtins__/hooks/useToken.js +8 -8
- package/lib/schema-component/antd/__builtins__/index.js +36 -41
- package/lib/schema-component/antd/__builtins__/loading.js +10 -10
- package/lib/schema-component/antd/__builtins__/portal.js +11 -9
- package/lib/schema-component/antd/__builtins__/render.js +14 -15
- package/lib/schema-component/antd/__builtins__/style.js +12 -10
- package/lib/schema-component/antd/action/Action.Area.js +24 -18
- package/lib/schema-component/antd/action/Action.Area.style.js +8 -8
- package/lib/schema-component/antd/action/Action.Container.js +13 -11
- package/lib/schema-component/antd/action/Action.Designer.js +78 -44
- package/lib/schema-component/antd/action/Action.Drawer.js +17 -17
- package/lib/schema-component/antd/action/Action.Drawer.style.js +8 -8
- package/lib/schema-component/antd/action/Action.Link.js +10 -14
- package/lib/schema-component/antd/action/Action.Modal.js +19 -19
- package/lib/schema-component/antd/action/Action.Modal.style.js +8 -8
- package/lib/schema-component/antd/action/Action.Page.js +13 -11
- package/lib/schema-component/antd/action/Action.Popover.js +2 -3
- package/lib/schema-component/antd/action/Action.Sheet.js +15 -17
- package/lib/schema-component/antd/action/Action.js +23 -25
- package/lib/schema-component/antd/action/Action.style.js +10 -10
- package/lib/schema-component/antd/action/ActionBar.js +16 -16
- package/lib/schema-component/antd/action/context.js +12 -10
- package/lib/schema-component/antd/action/hooks/useGetAriaLabelOfAction.js +8 -8
- package/lib/schema-component/antd/action/hooks/useGetAriaLabelOfDrawer.js +8 -8
- package/lib/schema-component/antd/action/hooks/useGetAriaLabelOfModal.js +8 -8
- package/lib/schema-component/antd/action/hooks/useGetAriaLabelOfPopover.js +8 -8
- package/lib/schema-component/antd/action/hooks/useSetAriaLabelForDrawer.js +8 -8
- package/lib/schema-component/antd/action/hooks/useSetAriaLabelForModal.js +8 -8
- package/lib/schema-component/antd/action/hooks/useSetAriaLabelForPopover.js +8 -8
- package/lib/schema-component/antd/action/hooks.js +31 -27
- package/lib/schema-component/antd/action/index.js +72 -77
- package/lib/schema-component/antd/action/types.js +3 -4
- package/lib/schema-component/antd/action/utils.js +15 -11
- package/lib/schema-component/antd/appends-tree-select/AppendsTreeSelect.js +12 -15
- package/lib/schema-component/antd/appends-tree-select/AppendsTreeSelectV2.js +12 -15
- package/lib/schema-component/antd/appends-tree-select/index.js +22 -27
- package/lib/schema-component/antd/association-cascader/AssociationCascader.js +18 -15
- package/lib/schema-component/antd/association-cascader/index.js +16 -21
- package/lib/schema-component/antd/association-field/AssociationFieldProvider.js +17 -20
- package/lib/schema-component/antd/association-field/AssociationSelect.js +22 -22
- package/lib/schema-component/antd/association-field/Editable.js +23 -29
- package/lib/schema-component/antd/association-field/FileManager.js +14 -16
- package/lib/schema-component/antd/association-field/InternalCascadeSelect.js +56 -61
- package/lib/schema-component/antd/association-field/InternalCascader.js +56 -59
- package/lib/schema-component/antd/association-field/InternalDrawerSubTable.js +10 -10
- package/lib/schema-component/antd/association-field/InternalNester.js +11 -15
- package/lib/schema-component/antd/association-field/InternalPicker.js +14 -16
- package/lib/schema-component/antd/association-field/InternalPopoverNester.js +9 -9
- package/lib/schema-component/antd/association-field/InternalSubTable.js +12 -16
- package/lib/schema-component/antd/association-field/InternalTag.js +13 -17
- package/lib/schema-component/antd/association-field/InternalViewer.js +24 -26
- package/lib/schema-component/antd/association-field/Nester.js +12 -16
- package/lib/schema-component/antd/association-field/ReadPretty.js +8 -8
- package/lib/schema-component/antd/association-field/SubTable.js +10 -10
- package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +32 -32
- package/lib/schema-component/antd/association-field/SubTabs/hook.js +10 -14
- package/lib/schema-component/antd/association-field/SubTabs/index.js +16 -21
- package/lib/schema-component/antd/association-field/SubTabs/styles.js +9 -9
- package/lib/schema-component/antd/association-field/components/CreateRecordAction.js +10 -14
- package/lib/schema-component/antd/association-field/context.js +8 -8
- package/lib/schema-component/antd/association-field/hooks.js +28 -22
- package/lib/schema-component/antd/association-field/index.js +40 -44
- package/lib/schema-component/antd/association-field/schema.js +9 -11
- package/lib/schema-component/antd/association-field/util.js +29 -19
- package/lib/schema-component/antd/association-filter/ActionBarAssociationFilterAction.js +10 -10
- package/lib/schema-component/antd/association-filter/AssociationFilter.BlockDesigner.js +9 -9
- package/lib/schema-component/antd/association-filter/AssociationFilter.Initializer.js +10 -10
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.Designer.js +17 -21
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +13 -17
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.style.js +10 -10
- package/lib/schema-component/antd/association-filter/AssociationFilter.js +12 -14
- package/lib/schema-component/antd/association-filter/AssociationFilterDesignerDelete.js +8 -8
- package/lib/schema-component/antd/association-filter/AssociationFilterDesignerDisplayField.js +9 -9
- package/lib/schema-component/antd/association-filter/utilts.js +9 -11
- package/lib/schema-component/antd/association-select/AssociationSelect.js +36 -38
- package/lib/schema-component/antd/association-select/ReadPretty.js +10 -14
- package/lib/schema-component/antd/association-select/index.js +16 -21
- package/lib/schema-component/antd/association-select/useServiceOptions.js +8 -8
- package/lib/schema-component/antd/auto-complete/AutoComplete.js +9 -9
- package/lib/schema-component/antd/auto-complete/index.js +16 -21
- package/lib/schema-component/antd/block-item/BlockItem.js +10 -14
- package/lib/schema-component/antd/block-item/BlockToolbar.js +34 -28
- package/lib/schema-component/antd/block-item/hooks/useGetAriaLabelOfBlockItem.js +12 -16
- package/lib/schema-component/antd/block-item/index.js +16 -21
- package/lib/schema-component/antd/block-item/useBlockToolbar.js +19 -17
- package/lib/schema-component/antd/card-item/CardItem.js +10 -14
- package/lib/schema-component/antd/card-item/index.js +16 -21
- package/lib/schema-component/antd/card-item/style.js +10 -10
- package/lib/schema-component/antd/cascader/Cascader.js +13 -11
- package/lib/schema-component/antd/cascader/ReadPretty.js +8 -8
- package/lib/schema-component/antd/cascader/defaultFieldNames.js +9 -11
- package/lib/schema-component/antd/cascader/index.js +16 -21
- package/lib/schema-component/antd/checkbox/Checkbox.js +23 -21
- package/lib/schema-component/antd/checkbox/index.js +16 -21
- package/lib/schema-component/antd/collection-select/CollectionSelect.js +19 -15
- package/lib/schema-component/antd/collection-select/index.js +16 -21
- package/lib/schema-component/antd/color-picker/ColorPicker.js +15 -17
- package/lib/schema-component/antd/color-picker/ReadPretty.js +11 -15
- package/lib/schema-component/antd/color-picker/index.js +16 -21
- package/lib/schema-component/antd/color-picker/util.js +17 -11
- package/lib/schema-component/antd/color-select/ColorSelect.js +12 -10
- package/lib/schema-component/antd/color-select/index.js +16 -21
- package/lib/schema-component/antd/cron/Cron.js +15 -17
- package/lib/schema-component/antd/cron/CronSet.js +14 -18
- package/lib/schema-component/antd/cron/index.js +22 -27
- package/lib/schema-component/antd/custom-cascader/CustomCascader.js +14 -12
- package/lib/schema-component/antd/custom-cascader/ReadPretty.js +8 -8
- package/lib/schema-component/antd/custom-cascader/defaultFieldNames.js +9 -11
- package/lib/schema-component/antd/custom-cascader/index.js +16 -21
- package/lib/schema-component/antd/date-picker/DatePicker.js +21 -22
- package/lib/schema-component/antd/date-picker/ReadPretty.js +12 -16
- package/lib/schema-component/antd/date-picker/index.js +16 -21
- package/lib/schema-component/antd/date-picker/util.js +17 -11
- package/lib/schema-component/antd/details/Details.js +11 -15
- package/lib/schema-component/antd/details/index.js +16 -21
- package/lib/schema-component/antd/error-fallback/ErrorFallback.js +8 -8
- package/lib/schema-component/antd/error-fallback/index.js +16 -21
- package/lib/schema-component/antd/expand-action/Expand.Action.Design.js +9 -9
- package/lib/schema-component/antd/expand-action/Expand.Action.js +10 -10
- package/lib/schema-component/antd/expand-action/index.js +8 -8
- package/lib/schema-component/antd/filter/DynamicComponent.js +12 -16
- package/lib/schema-component/antd/filter/Filter.Action.Designer.js +19 -15
- package/lib/schema-component/antd/filter/Filter.js +8 -8
- package/lib/schema-component/antd/filter/FilterAction.js +10 -8
- package/lib/schema-component/antd/filter/FilterGroup.js +8 -8
- package/lib/schema-component/antd/filter/FilterItem.js +8 -8
- package/lib/schema-component/antd/filter/FilterItems.js +9 -9
- package/lib/schema-component/antd/filter/SaveDefaultValue.js +9 -9
- package/lib/schema-component/antd/filter/context.js +13 -9
- package/lib/schema-component/antd/filter/index.js +28 -33
- package/lib/schema-component/antd/filter/useFilterActionProps.js +43 -33
- package/lib/schema-component/antd/filter/useOperators.js +11 -11
- package/lib/schema-component/antd/filter/useValues.js +15 -19
- package/lib/schema-component/antd/filter/utils.js +9 -11
- package/lib/schema-component/antd/form/Form.Designer.js +8 -8
- package/lib/schema-component/antd/form/Form.Settings.js +8 -8
- package/lib/schema-component/antd/form/Form.js +8 -8
- package/lib/schema-component/antd/form/index.js +22 -27
- package/lib/schema-component/antd/form-dialog/index.js +22 -24
- package/lib/schema-component/antd/form-item/FormItem.FilterFormDesigner.js +8 -8
- package/lib/schema-component/antd/form-item/FormItem.FilterFormSettings.js +12 -16
- package/lib/schema-component/antd/form-item/FormItem.Settings.js +67 -49
- package/lib/schema-component/antd/form-item/FormItem.js +14 -16
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +61 -43
- package/lib/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.js +14 -18
- package/lib/schema-component/antd/form-item/hooks/useParseDefaultValue.js +12 -16
- package/lib/schema-component/antd/form-item/hooks/useSpecialCase.js +24 -18
- package/lib/schema-component/antd/form-item/index.js +34 -39
- package/lib/schema-component/antd/form-item/utils.js +12 -14
- package/lib/schema-component/antd/form-tab/index.js +21 -23
- package/lib/schema-component/antd/form-v2/Form.Designer.js +14 -10
- package/lib/schema-component/antd/form-v2/Form.FilterDesigner.js +8 -8
- package/lib/schema-component/antd/form-v2/Form.Settings.js +20 -16
- package/lib/schema-component/antd/form-v2/Form.js +18 -18
- package/lib/schema-component/antd/form-v2/FormField.js +9 -9
- package/lib/schema-component/antd/form-v2/Templates.js +17 -19
- package/lib/schema-component/antd/form-v2/index.js +50 -54
- package/lib/schema-component/antd/form-v2/utils.js +23 -25
- package/lib/schema-component/antd/grid/Block.js +8 -8
- package/lib/schema-component/antd/grid/Grid.js +34 -36
- package/lib/schema-component/antd/grid/Grid.style.js +10 -10
- package/lib/schema-component/antd/grid/index.js +22 -27
- package/lib/schema-component/antd/grid-card/GridCard.Decorator.js +21 -19
- package/lib/schema-component/antd/grid-card/GridCard.Decorator.style.js +10 -10
- package/lib/schema-component/antd/grid-card/GridCard.Designer.js +14 -18
- package/lib/schema-component/antd/grid-card/GridCard.Item.js +10 -10
- package/lib/schema-component/antd/grid-card/GridCard.js +12 -16
- package/lib/schema-component/antd/grid-card/hooks.js +16 -18
- package/lib/schema-component/antd/grid-card/index.js +16 -21
- package/lib/schema-component/antd/grid-card/options.js +24 -26
- package/lib/schema-component/antd/icon-picker/IconFilterInput.js +11 -15
- package/lib/schema-component/antd/icon-picker/IconList.js +8 -8
- package/lib/schema-component/antd/icon-picker/IconPicker.js +14 -12
- package/lib/schema-component/antd/icon-picker/index.js +16 -21
- package/lib/schema-component/antd/index.js +693 -697
- package/lib/schema-component/antd/input/EllipsisWithTooltip.js +9 -9
- package/lib/schema-component/antd/input/Input.js +14 -10
- package/lib/schema-component/antd/input/Json.js +10 -14
- package/lib/schema-component/antd/input/ReadPretty.js +18 -22
- package/lib/schema-component/antd/input/index.js +40 -45
- package/lib/schema-component/antd/input/shared.js +9 -11
- package/lib/schema-component/antd/input-number/InputNumber.js +15 -13
- package/lib/schema-component/antd/input-number/ReadPretty.js +26 -19
- package/lib/schema-component/antd/input-number/index.js +16 -21
- package/lib/schema-component/antd/list/List.Decorator.js +19 -17
- package/lib/schema-component/antd/list/List.Designer.js +14 -18
- package/lib/schema-component/antd/list/List.Item.js +10 -14
- package/lib/schema-component/antd/list/List.js +13 -17
- package/lib/schema-component/antd/list/List.style.js +10 -10
- package/lib/schema-component/antd/list/hooks.js +9 -11
- package/lib/schema-component/antd/list/index.js +16 -21
- package/lib/schema-component/antd/markdown/Markdown.Void.Designer.js +8 -8
- package/lib/schema-component/antd/markdown/Markdown.Void.js +13 -18
- package/lib/schema-component/antd/markdown/Markdown.js +14 -10
- package/lib/schema-component/antd/markdown/index.js +16 -21
- package/lib/schema-component/antd/markdown/style.js +9 -9
- package/lib/schema-component/antd/markdown/util.js +15 -15
- package/lib/schema-component/antd/media-card/MediaCard.js +8 -8
- package/lib/schema-component/antd/media-card/index.js +16 -21
- package/lib/schema-component/antd/media-card/style.js +8 -8
- package/lib/schema-component/antd/menu/AdminMenu.js +8 -8
- package/lib/schema-component/antd/menu/AdminMenu.style.js +8 -8
- package/lib/schema-component/antd/menu/Menu.Designer.js +12 -10
- package/lib/schema-component/antd/menu/Menu.js +36 -40
- package/lib/schema-component/antd/menu/Menu.styles.js +9 -9
- package/lib/schema-component/antd/menu/MenuAdd.js +8 -8
- package/lib/schema-component/antd/menu/MenuItemInitializers/index.js +8 -8
- package/lib/schema-component/antd/menu/MenuSearchAdd.js +10 -14
- package/lib/schema-component/antd/menu/MenuSearchAdd.style.js +9 -9
- package/lib/schema-component/antd/menu/index.js +28 -33
- package/lib/schema-component/antd/menu/locale.js +8 -8
- package/lib/schema-component/antd/menu/tools.js +10 -12
- package/lib/schema-component/antd/menu/util.js +13 -9
- package/lib/schema-component/antd/nanoIDInput/NanoIDInput.js +8 -8
- package/lib/schema-component/antd/nanoIDInput/index.js +16 -21
- package/lib/schema-component/antd/page/FixedBlock.js +20 -18
- package/lib/schema-component/antd/page/FixedBlockDesignerItem.js +10 -10
- package/lib/schema-component/antd/page/Page.Settings.js +14 -14
- package/lib/schema-component/antd/page/Page.js +15 -19
- package/lib/schema-component/antd/page/Page.style.js +8 -8
- package/lib/schema-component/antd/page/PageDesigner.js +8 -8
- package/lib/schema-component/antd/page/PageTab.Settings.js +8 -8
- package/lib/schema-component/antd/page/PageTabDesigner.js +8 -8
- package/lib/schema-component/antd/page/hooks/index.js +16 -21
- package/lib/schema-component/antd/page/hooks/useIsBlockInPage.js +8 -8
- package/lib/schema-component/antd/page/hooks/useShareActions.js +13 -20
- package/lib/schema-component/antd/page/index.js +47 -52
- package/lib/schema-component/antd/page/style.js +10 -8
- package/lib/schema-component/antd/pagination/index.js +8 -8
- package/lib/schema-component/antd/password/Password.js +14 -12
- package/lib/schema-component/antd/password/PasswordStrength.js +8 -8
- package/lib/schema-component/antd/password/index.js +16 -21
- package/lib/schema-component/antd/password/utils.js +11 -13
- package/lib/schema-component/antd/percent/Percent.js +8 -8
- package/lib/schema-component/antd/percent/index.js +16 -21
- package/lib/schema-component/antd/popover/Popover.js +10 -10
- package/lib/schema-component/antd/popover/index.js +16 -21
- package/lib/schema-component/antd/preview/Preview.js +24 -24
- package/lib/schema-component/antd/preview/index.js +16 -21
- package/lib/schema-component/antd/quick-edit/QuickEdit.js +14 -16
- package/lib/schema-component/antd/quick-edit/index.js +16 -21
- package/lib/schema-component/antd/radio/Radio.js +13 -11
- package/lib/schema-component/antd/radio/index.js +16 -21
- package/lib/schema-component/antd/record-picker/InputRecordPicker.js +16 -10
- package/lib/schema-component/antd/record-picker/ReadPrettyRecordPicker.js +12 -12
- package/lib/schema-component/antd/record-picker/RecordPicker.js +8 -8
- package/lib/schema-component/antd/record-picker/index.js +56 -60
- package/lib/schema-component/antd/record-picker/useFieldNames.js +9 -9
- package/lib/schema-component/antd/record-picker/util.js +17 -17
- package/lib/schema-component/antd/remote-select/ReadPretty.js +8 -8
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +46 -50
- package/lib/schema-component/antd/remote-select/index.js +16 -21
- package/lib/schema-component/antd/remote-select/shared.js +8 -8
- package/lib/schema-component/antd/rich-text/RichText.js +10 -14
- package/lib/schema-component/antd/rich-text/index.js +16 -21
- package/lib/schema-component/antd/rich-text/style.js +8 -8
- package/lib/schema-component/antd/scroll-area/ScrollArea.js +13 -11
- package/lib/schema-component/antd/scroll-area/index.js +16 -21
- package/lib/schema-component/antd/select/FormulaSelect.js +15 -15
- package/lib/schema-component/antd/select/ReadPretty.js +9 -9
- package/lib/schema-component/antd/select/Select.js +22 -24
- package/lib/schema-component/antd/select/index.js +23 -28
- package/lib/schema-component/antd/select/utils.js +12 -10
- package/lib/schema-component/antd/slider/index.js +17 -22
- package/lib/schema-component/antd/slider/slider.js +13 -11
- package/lib/schema-component/antd/space/index.js +16 -18
- package/lib/schema-component/antd/table/Table.Array.Designer.js +8 -8
- package/lib/schema-component/antd/table/Table.Array.js +16 -20
- package/lib/schema-component/antd/table/Table.Column.ActionBar.js +12 -10
- package/lib/schema-component/antd/table/Table.Column.Decorator.js +12 -10
- package/lib/schema-component/antd/table/Table.Column.Designer.js +19 -23
- package/lib/schema-component/antd/table/Table.Column.js +8 -8
- package/lib/schema-component/antd/table/Table.Designer.js +8 -8
- package/lib/schema-component/antd/table/Table.RowActionDesigner.js +8 -8
- package/lib/schema-component/antd/table/Table.RowSelection.js +8 -8
- package/lib/schema-component/antd/table/Table.Void.Designer.js +19 -19
- package/lib/schema-component/antd/table/Table.Void.js +19 -19
- package/lib/schema-component/antd/table/index.js +8 -8
- package/lib/schema-component/antd/table-v2/Table.ActionColumnDesigner.js +8 -8
- package/lib/schema-component/antd/table-v2/Table.Column.ActionBar.js +12 -10
- package/lib/schema-component/antd/table-v2/Table.Column.Decorator.js +12 -10
- package/lib/schema-component/antd/table-v2/Table.Column.Designer.js +36 -36
- package/lib/schema-component/antd/table-v2/Table.Column.js +8 -8
- package/lib/schema-component/antd/table-v2/Table.Designer.js +8 -8
- package/lib/schema-component/antd/table-v2/Table.Index.js +8 -8
- package/lib/schema-component/antd/table-v2/Table.js +31 -38
- package/lib/schema-component/antd/table-v2/Table.styles.js +9 -9
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +27 -25
- package/lib/schema-component/antd/table-v2/TableField.js +9 -9
- package/lib/schema-component/antd/table-v2/TableSelector.js +8 -8
- package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +18 -22
- package/lib/schema-component/antd/table-v2/components/ColumnFieldProvider.js +8 -8
- package/lib/schema-component/antd/table-v2/index.js +64 -68
- package/lib/schema-component/antd/table-v2/utils.js +16 -18
- package/lib/schema-component/antd/tabs/Tabs.Designer.js +9 -10
- package/lib/schema-component/antd/tabs/Tabs.js +10 -14
- package/lib/schema-component/antd/tabs/context.js +12 -14
- package/lib/schema-component/antd/tabs/index.js +23 -28
- package/lib/schema-component/antd/time-picker/ReadPretty.js +11 -15
- package/lib/schema-component/antd/time-picker/TimePicker.js +12 -10
- package/lib/schema-component/antd/time-picker/index.js +16 -21
- package/lib/schema-component/antd/tracking-link/index.js +9 -9
- package/lib/schema-component/antd/tree/Tree.js +13 -13
- package/lib/schema-component/antd/tree/index.js +8 -8
- package/lib/schema-component/antd/tree-select/ReadPretty.js +17 -23
- package/lib/schema-component/antd/tree-select/TreeSelect.js +14 -12
- package/lib/schema-component/antd/tree-select/index.js +16 -21
- package/lib/schema-component/antd/unixTimestamp/UnixTimestamp.js +10 -14
- package/lib/schema-component/antd/unixTimestamp/index.js +16 -21
- package/lib/schema-component/antd/upload/ReadPretty.js +18 -20
- package/lib/schema-component/antd/upload/Upload.js +26 -26
- package/lib/schema-component/antd/upload/index.js +16 -21
- package/lib/schema-component/antd/upload/placeholder.js +9 -11
- package/lib/schema-component/antd/upload/shared.js +60 -26
- package/lib/schema-component/antd/upload/style.js +8 -8
- package/lib/schema-component/antd/variable/CodeMirror.js +9 -9
- package/lib/schema-component/antd/variable/Input.js +16 -23
- package/lib/schema-component/antd/variable/JSONInput.js +8 -8
- package/lib/schema-component/antd/variable/RawTextArea.js +10 -10
- package/lib/schema-component/antd/variable/TextArea.js +25 -33
- package/lib/schema-component/antd/variable/TextAreaWithGlobalScope.js +12 -10
- package/lib/schema-component/antd/variable/Variable.js +17 -11
- package/lib/schema-component/antd/variable/VariableSelect.js +13 -17
- package/lib/schema-component/antd/variable/VariableSelect.style.js +10 -10
- package/lib/schema-component/antd/variable/XButton.js +8 -8
- package/lib/schema-component/antd/variable/index.js +25 -29
- package/lib/schema-component/antd/variable/style.js +8 -8
- package/lib/schema-component/common/dnd-context/index.js +22 -22
- package/lib/schema-component/common/index.js +22 -27
- package/lib/schema-component/common/infinite-scroll/infinite-scroll.js +10 -14
- package/lib/schema-component/common/infinite-scroll/style.js +10 -10
- package/lib/schema-component/common/sortable-item/DragHandleMenu.js +8 -8
- package/lib/schema-component/common/sortable-item/DragHandleMenu.style.js +9 -9
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +8 -8
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +8 -8
- package/lib/schema-component/common/sortable-item/SortableItem.js +27 -21
- package/lib/schema-component/common/sortable-item/index.js +16 -21
- package/lib/schema-component/common/utils/logic.js +14 -16
- package/lib/schema-component/common/utils/uitls.js +27 -25
- package/lib/schema-component/context.js +8 -8
- package/lib/schema-component/core/DesignableSwitch.js +8 -8
- package/lib/schema-component/core/FormProvider.js +8 -8
- package/lib/schema-component/core/RemoteSchemaComponent.js +8 -8
- package/lib/schema-component/core/SchemaComponent.js +10 -10
- package/lib/schema-component/core/SchemaComponentOptions.js +10 -8
- package/lib/schema-component/core/SchemaComponentPlugin.js +8 -8
- package/lib/schema-component/core/SchemaComponentProvider.js +8 -8
- package/lib/schema-component/core/index.js +52 -57
- package/lib/schema-component/hooks/index.js +82 -87
- package/lib/schema-component/hooks/useAttach.js +8 -8
- package/lib/schema-component/hooks/useCompile.js +8 -8
- package/lib/schema-component/hooks/useComponent.js +8 -8
- package/lib/schema-component/hooks/useDesignable.js +37 -41
- package/lib/schema-component/hooks/useDesigner.js +8 -8
- package/lib/schema-component/hooks/useFieldComponentOptions.js +9 -9
- package/lib/schema-component/hooks/useFieldModeOptions.js +9 -9
- package/lib/schema-component/hooks/useFieldProps.js +8 -8
- package/lib/schema-component/hooks/useFieldTitle.js +10 -10
- package/lib/schema-component/hooks/useProps.js +9 -11
- package/lib/schema-component/hooks/useSchemaComponentContext.js +8 -8
- package/lib/schema-component/hooks/useTableSize.js +11 -11
- package/lib/schema-component/index.js +48 -53
- package/lib/schema-component/types.js +14 -4
- package/lib/schema-initializer/SchemaInitializerPlugin.js +8 -8
- package/lib/schema-initializer/buttons/CustomFormItemInitializers.js +8 -8
- package/lib/schema-initializer/buttons/FormItemInitializers.js +25 -17
- package/lib/schema-initializer/buttons/RecordBlockInitializers.js +12 -10
- package/lib/schema-initializer/buttons/SubTableActionInitializers.js +8 -8
- package/lib/schema-initializer/buttons/TabPaneInitializers.js +24 -12
- package/lib/schema-initializer/buttons/index.js +46 -51
- package/lib/schema-initializer/components/CreateRecordAction.js +23 -23
- package/lib/schema-initializer/components/DeletedField.js +8 -8
- package/lib/schema-initializer/components/assigned-field/AssignedField.js +15 -17
- package/lib/schema-initializer/components/assigned-field/index.js +16 -21
- package/lib/schema-initializer/components/index.js +22 -27
- package/lib/schema-initializer/hooks/useGetAriaLabelOfSchemaInitializer.js +8 -8
- package/lib/schema-initializer/index.js +119 -123
- package/lib/schema-initializer/items/ActionInitializer.js +8 -8
- package/lib/schema-initializer/items/BlockInitializer.js +14 -12
- package/lib/schema-initializer/items/CreateFilterActionInitializer.js +8 -8
- package/lib/schema-initializer/items/CreateResetActionInitializer.js +8 -8
- package/lib/schema-initializer/items/CustomFilterFormItemInitializer.js +32 -26
- package/lib/schema-initializer/items/CustomizeActionInitializer.js +8 -8
- package/lib/schema-initializer/items/DataBlockInitializer.js +19 -19
- package/lib/schema-initializer/items/DeleteEventActionInitializer.js +8 -8
- package/lib/schema-initializer/items/FilterBlockInitializer.js +8 -8
- package/lib/schema-initializer/items/G2PlotInitializer.js +8 -8
- package/lib/schema-initializer/items/InitializerWithSwitch.js +10 -10
- package/lib/schema-initializer/items/RecordAssociationBlockInitializer.js +10 -8
- package/lib/schema-initializer/items/RecordAssociationDetailsBlockInitializer.js +12 -10
- package/lib/schema-initializer/items/RecordAssociationFormBlockInitializer.js +12 -10
- package/lib/schema-initializer/items/RecordAssociationGridCardBlockInitializer.js +10 -8
- package/lib/schema-initializer/items/RecordAssociationListBlockInitializer.js +10 -8
- package/lib/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.js +12 -10
- package/lib/schema-initializer/items/SelectActionInitializer.js +8 -8
- package/lib/schema-initializer/items/SubmitActionInitializer.js +8 -8
- package/lib/schema-initializer/items/TableActionColumnInitializer.js +8 -8
- package/lib/schema-initializer/items/index.js +148 -153
- package/lib/schema-initializer/style.js +8 -8
- package/lib/schema-initializer/utils.js +174 -135
- package/lib/schema-items/GeneralSchemaItems.js +16 -20
- package/lib/schema-items/GeneralSettings.js +14 -14
- package/lib/schema-items/OpenModeSchemaItems.js +16 -14
- package/lib/schema-items/index.js +22 -27
- package/lib/schema-settings/DataTemplates/FormDataTemplates.js +20 -20
- package/lib/schema-settings/DataTemplates/TreeLabel.js +8 -8
- package/lib/schema-settings/DataTemplates/components/AsDefaultTemplate.js +13 -17
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.js +26 -28
- package/lib/schema-settings/DataTemplates/components/DataTemplateTitle.style.js +8 -8
- package/lib/schema-settings/DataTemplates/components/Designer.js +15 -17
- package/lib/schema-settings/DataTemplates/hooks/useCollectionState.js +28 -30
- package/lib/schema-settings/DataTemplates/index.js +16 -21
- package/lib/schema-settings/DataTemplates/utils.js +18 -22
- package/lib/schema-settings/DateFormat/ExpiresRadio.js +15 -17
- package/lib/schema-settings/EditCustomDefaultValue.js +11 -9
- package/lib/schema-settings/EditFormulaTitleField.js +19 -15
- package/lib/schema-settings/EnableChildCollections/DynamicComponent.js +8 -8
- package/lib/schema-settings/EnableChildCollections/index.js +10 -10
- package/lib/schema-settings/GeneralSchemaDesigner.js +18 -20
- package/lib/schema-settings/LinkageRules/DynamicComponent.js +12 -16
- package/lib/schema-settings/LinkageRules/LinkageRuleAction.js +14 -16
- package/lib/schema-settings/LinkageRules/LinkageRuleActionGroup.js +11 -9
- package/lib/schema-settings/LinkageRules/ValueDynamicComponent.js +10 -14
- package/lib/schema-settings/LinkageRules/Variables.js +9 -9
- package/lib/schema-settings/LinkageRules/action-hooks.js +10 -10
- package/lib/schema-settings/LinkageRules/components/EnableLinkage.js +12 -16
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.js +25 -27
- package/lib/schema-settings/LinkageRules/components/LinkageHeader.style.js +8 -8
- package/lib/schema-settings/LinkageRules/context.js +14 -10
- package/lib/schema-settings/LinkageRules/index.js +8 -8
- package/lib/schema-settings/LinkageRules/type.js +9 -11
- package/lib/schema-settings/LinkageRules/useValues.js +10 -10
- package/lib/schema-settings/SchemaSettingCollection.js +9 -9
- package/lib/schema-settings/SchemaSettingComponent.js +8 -8
- package/lib/schema-settings/SchemaSettings.js +94 -46
- package/lib/schema-settings/SchemaSettingsDataScope.js +10 -10
- package/lib/schema-settings/SchemaSettingsDateFormat.js +12 -12
- package/lib/schema-settings/SchemaSettingsDefaultValue.js +13 -17
- package/lib/schema-settings/SchemaSettingsNumberFormat.js +8 -8
- package/lib/schema-settings/SchemaSettingsPlugin.js +8 -8
- package/lib/schema-settings/SchemaSettingsSortingRule.js +13 -17
- package/lib/schema-settings/VariableInput/VariableInput.js +16 -16
- package/lib/schema-settings/VariableInput/hooks/index.js +28 -33
- package/lib/schema-settings/VariableInput/hooks/useBaseVariable.js +17 -19
- package/lib/schema-settings/VariableInput/hooks/useBlockCollection.js +9 -9
- package/lib/schema-settings/VariableInput/hooks/useContextAssociationFields.js +13 -11
- package/lib/schema-settings/VariableInput/hooks/useDateVariable.js +10 -10
- package/lib/schema-settings/VariableInput/hooks/useFilterVariable.js +13 -13
- package/lib/schema-settings/VariableInput/hooks/useFormVariable.js +10 -8
- package/lib/schema-settings/VariableInput/hooks/useIterationVariable.js +10 -8
- package/lib/schema-settings/VariableInput/hooks/useParentRecordVariable.js +12 -10
- package/lib/schema-settings/VariableInput/hooks/usePopupVariable.js +8 -8
- package/lib/schema-settings/VariableInput/hooks/useRecordVariable.js +14 -16
- package/lib/schema-settings/VariableInput/hooks/useRoleVariable.js +11 -9
- package/lib/schema-settings/VariableInput/hooks/useUserVariable.js +13 -11
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +9 -9
- package/lib/schema-settings/VariableInput/index.js +24 -29
- package/lib/schema-settings/VariableInput/type.js +3 -4
- package/lib/schema-settings/VariableInput/utils/formatVariableScop.js +9 -11
- package/lib/schema-settings/filter-form/FormFilterScope.js +8 -8
- package/lib/schema-settings/filter-form/context.js +17 -11
- package/lib/schema-settings/hooks/useFilterFormCustomProps.js +8 -8
- package/lib/schema-settings/hooks/useGetAriaLabelOfDesigner.js +8 -8
- package/lib/schema-settings/hooks/useIsAllowToSetDefaultValue.js +16 -16
- package/lib/schema-settings/hooks/useIsShowMultipleSwitch.js +10 -10
- package/lib/schema-settings/hooks/useParseDataScopeFilter.js +8 -8
- package/lib/schema-settings/index.js +125 -130
- package/lib/schema-settings/isPatternDisabled.js +10 -12
- package/lib/schema-settings/styles.js +8 -8
- package/lib/schema-settings/types.js +3 -4
- package/lib/schema-settings/utils/createModalSettingsItem.js +10 -14
- package/lib/schema-settings/utils/createSelectSettingsItem.js +10 -14
- package/lib/schema-settings/utils/createSwitchSettingsItem.js +10 -14
- package/lib/schema-settings/utils/createTextSettingsItem.js +8 -8
- package/lib/schema-settings/utils/index.js +34 -39
- package/lib/schema-settings/utils/util.js +16 -16
- package/lib/schema-templates/BlockTemplate.js +12 -10
- package/lib/schema-templates/BlockTemplateDetails.js +11 -11
- package/lib/schema-templates/BlockTemplatePage.js +10 -8
- package/lib/schema-templates/SchemaTemplateManagerProvider.js +23 -13
- package/lib/schema-templates/collections/uiSchemaTemplates.js +9 -11
- package/lib/schema-templates/index.js +34 -39
- package/lib/schema-templates/schemas/CollectionTitle.js +8 -8
- package/lib/schema-templates/schemas/uiSchemaTemplates.js +8 -8
- package/lib/schema-templates/useSchemaTemplateManager.js +10 -10
- package/lib/style/css-variable/CSSVariableProvider.js +13 -11
- package/lib/style/css-variable/index.js +10 -14
- package/lib/style/index.js +24 -12
- package/lib/style/theme/AntdAppProvider.js +10 -10
- package/lib/style/theme/defaultTheme.js +9 -11
- package/lib/style/theme/index.js +95 -99
- package/lib/style/theme/type.js +3 -4
- package/lib/style/useToken.js +8 -8
- package/lib/testUtils/index.js +16 -21
- package/lib/testUtils/mockAPIClient.js +27 -25
- package/lib/user/ChangePassword.js +8 -8
- package/lib/user/CurrentUser.js +16 -12
- package/lib/user/CurrentUserProvider.js +22 -14
- package/lib/user/CurrentUserSettingsMenuProvider.js +15 -13
- package/lib/user/EditProfile.js +9 -9
- package/lib/user/LanguageSettings.js +12 -16
- package/lib/user/SwitchRole.js +8 -8
- package/lib/user/VerificationCode.js +8 -8
- package/lib/user/index.js +28 -33
- package/lib/variables/VariablesProvider.js +24 -26
- package/lib/variables/constants.js +9 -11
- package/lib/variables/hooks/useBuiltinVariables.js +10 -10
- package/lib/variables/hooks/useContextVariable.js +14 -14
- package/lib/variables/hooks/useLocalVariables.js +11 -11
- package/lib/variables/hooks/useVariables.js +10 -10
- package/lib/variables/index.js +79 -83
- package/lib/variables/types.js +3 -4
- package/lib/variables/utils/filterEmptyValues.js +9 -11
- package/lib/variables/utils/getAction.js +9 -11
- package/lib/variables/utils/getPath.js +8 -8
- package/lib/variables/utils/getVariableName.js +10 -14
- package/lib/variables/utils/hasRequested.js +18 -20
- package/lib/variables/utils/isVariable.js +12 -14
- package/lib/variables/utils/transformVariableValue.js +10 -14
- package/lib/variables/utils/uniq.js +10 -14
- package/package.json +7 -7
- package/es/env.d.mjs +0 -0
- package/es/schema-component/antd/upload/type.d.mjs +0 -1
- package/lib/env.d.js +0 -6
- package/lib/schema-component/antd/upload/type.d.js +0 -8
|
@@ -105,12 +105,8 @@ function __webpack_require__(moduleId) {
|
|
|
105
105
|
return module.exports;
|
|
106
106
|
}
|
|
107
107
|
(()=>{
|
|
108
|
-
__webpack_require__.n =
|
|
109
|
-
var getter = module && module.__esModule ?
|
|
110
|
-
return module['default'];
|
|
111
|
-
} : function() {
|
|
112
|
-
return module;
|
|
113
|
-
};
|
|
108
|
+
__webpack_require__.n = (module)=>{
|
|
109
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
114
110
|
__webpack_require__.d(getter, {
|
|
115
111
|
a: getter
|
|
116
112
|
});
|
|
@@ -118,7 +114,7 @@ function __webpack_require__(moduleId) {
|
|
|
118
114
|
};
|
|
119
115
|
})();
|
|
120
116
|
(()=>{
|
|
121
|
-
__webpack_require__.d =
|
|
117
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
122
118
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
123
119
|
enumerable: true,
|
|
124
120
|
get: definition[key]
|
|
@@ -126,12 +122,10 @@ function __webpack_require__(moduleId) {
|
|
|
126
122
|
};
|
|
127
123
|
})();
|
|
128
124
|
(()=>{
|
|
129
|
-
__webpack_require__.o =
|
|
130
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
131
|
-
};
|
|
125
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
132
126
|
})();
|
|
133
127
|
(()=>{
|
|
134
|
-
__webpack_require__.r =
|
|
128
|
+
__webpack_require__.r = (exports1)=>{
|
|
135
129
|
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
136
130
|
value: 'Module'
|
|
137
131
|
});
|
|
@@ -141,569 +135,287 @@ function __webpack_require__(moduleId) {
|
|
|
141
135
|
};
|
|
142
136
|
})();
|
|
143
137
|
var __webpack_exports__ = {};
|
|
144
|
-
|
|
145
|
-
__webpack_require__.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
useAssociationNames: function() {
|
|
177
|
-
return useAssociationNames;
|
|
178
|
-
},
|
|
179
|
-
useBulkDestroyActionProps: function() {
|
|
180
|
-
return useBulkDestroyActionProps;
|
|
181
|
-
},
|
|
182
|
-
useCancelActionProps: function() {
|
|
183
|
-
return useCancelActionProps;
|
|
184
|
-
},
|
|
185
|
-
useCollectValuesToSubmit: function() {
|
|
186
|
-
return useCollectValuesToSubmit;
|
|
187
|
-
},
|
|
188
|
-
useCreateActionProps: function() {
|
|
189
|
-
return useCreateActionProps;
|
|
190
|
-
},
|
|
191
|
-
useCustomizeRequestActionProps: function() {
|
|
192
|
-
return useCustomizeRequestActionProps;
|
|
193
|
-
},
|
|
194
|
-
useCustomizeUpdateActionProps: function() {
|
|
195
|
-
return useCustomizeUpdateActionProps;
|
|
196
|
-
},
|
|
197
|
-
useDestroyActionProps: function() {
|
|
198
|
-
return useDestroyActionProps;
|
|
199
|
-
},
|
|
200
|
-
useDetailPrintActionProps: function() {
|
|
201
|
-
return useDetailPrintActionProps;
|
|
202
|
-
},
|
|
203
|
-
useDetailsPaginationProps: function() {
|
|
204
|
-
return useDetailsPaginationProps;
|
|
205
|
-
},
|
|
206
|
-
useDisassociateActionProps: function() {
|
|
207
|
-
return useDisassociateActionProps;
|
|
208
|
-
},
|
|
209
|
-
useFilterBlockActionProps: function() {
|
|
210
|
-
return useFilterBlockActionProps;
|
|
211
|
-
},
|
|
212
|
-
useInsertSchema: function() {
|
|
213
|
-
return useInsertSchema;
|
|
214
|
-
},
|
|
215
|
-
useOptionalFieldList: function() {
|
|
216
|
-
return useOptionalFieldList;
|
|
217
|
-
},
|
|
218
|
-
useRefreshActionProps: function() {
|
|
219
|
-
return useRefreshActionProps;
|
|
220
|
-
},
|
|
221
|
-
useRemoveActionProps: function() {
|
|
222
|
-
return useRemoveActionProps;
|
|
223
|
-
},
|
|
224
|
-
useResetBlockActionProps: function() {
|
|
225
|
-
return useResetBlockActionProps;
|
|
226
|
-
},
|
|
227
|
-
useUpdateActionProps: function() {
|
|
228
|
-
return useUpdateActionProps;
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
|
|
232
|
-
var _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("@tachybase/schema");
|
|
233
|
-
var _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("@tachybase/utils/client");
|
|
234
|
-
var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("antd");
|
|
235
|
-
var flat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("flat");
|
|
236
|
-
var flat__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/ __webpack_require__.n(flat__WEBPACK_IMPORTED_MODULE_4__);
|
|
237
|
-
var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("lodash");
|
|
238
|
-
var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/ __webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);
|
|
239
|
-
var lodash_get__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("lodash/get");
|
|
240
|
-
var lodash_get__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/ __webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_6__);
|
|
241
|
-
var lodash_omit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("lodash/omit");
|
|
242
|
-
var lodash_omit__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/ __webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_7__);
|
|
243
|
-
var react_i18next__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("react-i18next");
|
|
244
|
-
var react_router_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("react-router-dom");
|
|
245
|
-
var react_to_print__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("react-to-print");
|
|
246
|
-
var ___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../..");
|
|
247
|
-
var _api_client__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../api-client");
|
|
248
|
-
var _built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../../built-in/dynamic-page/utils");
|
|
249
|
-
var _collection_manager__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("../../collection-manager");
|
|
250
|
-
var _filter_provider_FilterProvider__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("../../filter-provider/FilterProvider");
|
|
251
|
-
var _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("../../filter-provider/utils");
|
|
252
|
-
var _record_provider__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("../../record-provider");
|
|
253
|
-
var _schema_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("../../schema-component");
|
|
254
|
-
var _schema_component_antd_association_field_util__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("../../schema-component/antd/association-field/util");
|
|
255
|
-
var _user__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("../../user");
|
|
256
|
-
var _variables__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("../../variables");
|
|
257
|
-
var _variables_utils_isVariable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("../../variables/utils/isVariable");
|
|
258
|
-
var _variables_utils_transformVariableValue__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("../../variables/utils/transformVariableValue");
|
|
259
|
-
var _BlockProvider__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("../BlockProvider");
|
|
260
|
-
var _DetailsBlockProvider__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("../DetailsBlockProvider");
|
|
261
|
-
var _TableFieldProvider__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("../TableFieldProvider");
|
|
262
|
-
var _useFormActiveFields__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("./useFormActiveFields");
|
|
263
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
264
|
-
for(var __WEBPACK_IMPORT_KEY__ in _useFormActiveFields__WEBPACK_IMPORTED_MODULE_27__)if ([
|
|
265
|
-
"useAssociationCreateActionProps",
|
|
266
|
-
"useResetBlockActionProps",
|
|
267
|
-
"findFilterTargets",
|
|
268
|
-
"useInsertSchema",
|
|
269
|
-
"filterByCleanedFields",
|
|
270
|
-
"useOptionalFieldList",
|
|
271
|
-
"useCollectValuesToSubmit",
|
|
272
|
-
"useCreateActionProps",
|
|
273
|
-
"useRemoveActionProps",
|
|
274
|
-
"useCustomizeUpdateActionProps",
|
|
275
|
-
"useRefreshActionProps",
|
|
276
|
-
"useAssociationFilterProps",
|
|
277
|
-
"default",
|
|
278
|
-
"useAssociationFilterBlockProps",
|
|
279
|
-
"useFilterBlockActionProps",
|
|
280
|
-
"getAfterWorkflows",
|
|
281
|
-
"updateFilterTargets",
|
|
282
|
-
"useUpdateActionProps",
|
|
283
|
-
"getFormValues",
|
|
284
|
-
"useDisassociateActionProps",
|
|
285
|
-
"useDetailPrintActionProps",
|
|
286
|
-
"useCustomizeRequestActionProps",
|
|
287
|
-
"useCancelActionProps",
|
|
288
|
-
"getBeforeWorkflows",
|
|
289
|
-
"useAssociationNames",
|
|
290
|
-
"useDetailsPaginationProps",
|
|
291
|
-
"useDestroyActionProps",
|
|
292
|
-
"useBulkDestroyActionProps",
|
|
293
|
-
"getAssociationPath"
|
|
294
|
-
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
295
|
-
return _useFormActiveFields__WEBPACK_IMPORTED_MODULE_27__[key];
|
|
296
|
-
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
297
|
-
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
298
|
-
var _useParsedFilter__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("./useParsedFilter");
|
|
299
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
300
|
-
for(var __WEBPACK_IMPORT_KEY__ in _useParsedFilter__WEBPACK_IMPORTED_MODULE_28__)if ([
|
|
301
|
-
"useAssociationCreateActionProps",
|
|
302
|
-
"useResetBlockActionProps",
|
|
303
|
-
"findFilterTargets",
|
|
304
|
-
"useInsertSchema",
|
|
305
|
-
"filterByCleanedFields",
|
|
306
|
-
"useOptionalFieldList",
|
|
307
|
-
"useCollectValuesToSubmit",
|
|
308
|
-
"useCreateActionProps",
|
|
309
|
-
"useRemoveActionProps",
|
|
310
|
-
"useCustomizeUpdateActionProps",
|
|
311
|
-
"useRefreshActionProps",
|
|
312
|
-
"useAssociationFilterProps",
|
|
313
|
-
"default",
|
|
314
|
-
"useAssociationFilterBlockProps",
|
|
315
|
-
"useFilterBlockActionProps",
|
|
316
|
-
"getAfterWorkflows",
|
|
317
|
-
"updateFilterTargets",
|
|
318
|
-
"useUpdateActionProps",
|
|
319
|
-
"getFormValues",
|
|
320
|
-
"useDisassociateActionProps",
|
|
321
|
-
"useDetailPrintActionProps",
|
|
322
|
-
"useCustomizeRequestActionProps",
|
|
323
|
-
"useCancelActionProps",
|
|
324
|
-
"getBeforeWorkflows",
|
|
325
|
-
"useAssociationNames",
|
|
326
|
-
"useDetailsPaginationProps",
|
|
327
|
-
"useDestroyActionProps",
|
|
328
|
-
"useBulkDestroyActionProps",
|
|
329
|
-
"getAssociationPath"
|
|
330
|
-
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
331
|
-
return _useParsedFilter__WEBPACK_IMPORTED_MODULE_28__[key];
|
|
332
|
-
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
333
|
-
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
334
|
-
var _useDataBlockSourceId__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__("./useDataBlockSourceId");
|
|
335
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
336
|
-
for(var __WEBPACK_IMPORT_KEY__ in _useDataBlockSourceId__WEBPACK_IMPORTED_MODULE_29__)if ([
|
|
337
|
-
"useAssociationCreateActionProps",
|
|
338
|
-
"useResetBlockActionProps",
|
|
339
|
-
"findFilterTargets",
|
|
340
|
-
"useInsertSchema",
|
|
341
|
-
"filterByCleanedFields",
|
|
342
|
-
"useOptionalFieldList",
|
|
343
|
-
"useCollectValuesToSubmit",
|
|
344
|
-
"useCreateActionProps",
|
|
345
|
-
"useRemoveActionProps",
|
|
346
|
-
"useCustomizeUpdateActionProps",
|
|
347
|
-
"useRefreshActionProps",
|
|
348
|
-
"useAssociationFilterProps",
|
|
349
|
-
"default",
|
|
350
|
-
"useAssociationFilterBlockProps",
|
|
351
|
-
"useFilterBlockActionProps",
|
|
352
|
-
"getAfterWorkflows",
|
|
353
|
-
"updateFilterTargets",
|
|
354
|
-
"useUpdateActionProps",
|
|
355
|
-
"getFormValues",
|
|
356
|
-
"useDisassociateActionProps",
|
|
357
|
-
"useDetailPrintActionProps",
|
|
358
|
-
"useCustomizeRequestActionProps",
|
|
359
|
-
"useCancelActionProps",
|
|
360
|
-
"getBeforeWorkflows",
|
|
361
|
-
"useAssociationNames",
|
|
362
|
-
"useDetailsPaginationProps",
|
|
363
|
-
"useDestroyActionProps",
|
|
364
|
-
"useBulkDestroyActionProps",
|
|
365
|
-
"getAssociationPath"
|
|
366
|
-
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
367
|
-
return _useDataBlockSourceId__WEBPACK_IMPORTED_MODULE_29__[key];
|
|
368
|
-
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
369
|
-
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
370
|
-
var _useIsMobile__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__("./useIsMobile");
|
|
371
|
-
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
372
|
-
for(var __WEBPACK_IMPORT_KEY__ in _useIsMobile__WEBPACK_IMPORTED_MODULE_30__)if ([
|
|
373
|
-
"useAssociationCreateActionProps",
|
|
374
|
-
"useResetBlockActionProps",
|
|
375
|
-
"findFilterTargets",
|
|
376
|
-
"useInsertSchema",
|
|
377
|
-
"filterByCleanedFields",
|
|
378
|
-
"useOptionalFieldList",
|
|
379
|
-
"useCollectValuesToSubmit",
|
|
380
|
-
"useCreateActionProps",
|
|
381
|
-
"useRemoveActionProps",
|
|
382
|
-
"useCustomizeUpdateActionProps",
|
|
383
|
-
"useRefreshActionProps",
|
|
384
|
-
"useAssociationFilterProps",
|
|
385
|
-
"default",
|
|
386
|
-
"useAssociationFilterBlockProps",
|
|
387
|
-
"useFilterBlockActionProps",
|
|
388
|
-
"getAfterWorkflows",
|
|
389
|
-
"updateFilterTargets",
|
|
390
|
-
"useUpdateActionProps",
|
|
391
|
-
"getFormValues",
|
|
392
|
-
"useDisassociateActionProps",
|
|
393
|
-
"useDetailPrintActionProps",
|
|
394
|
-
"useCustomizeRequestActionProps",
|
|
395
|
-
"useCancelActionProps",
|
|
396
|
-
"getBeforeWorkflows",
|
|
397
|
-
"useAssociationNames",
|
|
398
|
-
"useDetailsPaginationProps",
|
|
399
|
-
"useDestroyActionProps",
|
|
400
|
-
"useBulkDestroyActionProps",
|
|
401
|
-
"getAssociationPath"
|
|
402
|
-
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
403
|
-
return _useIsMobile__WEBPACK_IMPORTED_MODULE_30__[key];
|
|
404
|
-
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
405
|
-
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
406
|
-
function renderTemplate(str, data) {
|
|
407
|
-
const re = /\{\{\s*((\w+\.?)+)\s*\}\}/g;
|
|
408
|
-
return str.replace(re, function(_, key) {
|
|
409
|
-
return lodash_get__WEBPACK_IMPORTED_MODULE_6___default()(data, key) || '';
|
|
138
|
+
(()=>{
|
|
139
|
+
__webpack_require__.r(__webpack_exports__);
|
|
140
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
141
|
+
filterByCleanedFields: ()=>filterByCleanedFields,
|
|
142
|
+
findFilterTargets: ()=>findFilterTargets,
|
|
143
|
+
getAfterWorkflows: ()=>getAfterWorkflows,
|
|
144
|
+
getAssociationPath: ()=>getAssociationPath,
|
|
145
|
+
getBeforeWorkflows: ()=>getBeforeWorkflows,
|
|
146
|
+
getFormValues: ()=>getFormValues,
|
|
147
|
+
updateFilterTargets: ()=>updateFilterTargets,
|
|
148
|
+
useAssociationCreateActionProps: ()=>useAssociationCreateActionProps,
|
|
149
|
+
useAssociationFilterBlockProps: ()=>useAssociationFilterBlockProps,
|
|
150
|
+
useAssociationFilterProps: ()=>useAssociationFilterProps,
|
|
151
|
+
useAssociationNames: ()=>useAssociationNames,
|
|
152
|
+
useBulkDestroyActionProps: ()=>useBulkDestroyActionProps,
|
|
153
|
+
useCancelActionProps: ()=>useCancelActionProps,
|
|
154
|
+
useCollectValuesToSubmit: ()=>useCollectValuesToSubmit,
|
|
155
|
+
useCreateActionProps: ()=>useCreateActionProps,
|
|
156
|
+
useCustomizeRequestActionProps: ()=>useCustomizeRequestActionProps,
|
|
157
|
+
useCustomizeUpdateActionProps: ()=>useCustomizeUpdateActionProps,
|
|
158
|
+
useDestroyActionProps: ()=>useDestroyActionProps,
|
|
159
|
+
useDetailPrintActionProps: ()=>useDetailPrintActionProps,
|
|
160
|
+
useDetailsPaginationProps: ()=>useDetailsPaginationProps,
|
|
161
|
+
useDisassociateActionProps: ()=>useDisassociateActionProps,
|
|
162
|
+
useFilterBlockActionProps: ()=>useFilterBlockActionProps,
|
|
163
|
+
useInsertSchema: ()=>useInsertSchema,
|
|
164
|
+
useOptionalFieldList: ()=>useOptionalFieldList,
|
|
165
|
+
useRefreshActionProps: ()=>useRefreshActionProps,
|
|
166
|
+
useRemoveActionProps: ()=>useRemoveActionProps,
|
|
167
|
+
useResetBlockActionProps: ()=>useResetBlockActionProps,
|
|
168
|
+
useUpdateActionProps: ()=>useUpdateActionProps
|
|
410
169
|
});
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
170
|
+
var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react");
|
|
171
|
+
var _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("@tachybase/schema");
|
|
172
|
+
var _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("@tachybase/utils/client");
|
|
173
|
+
var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("antd");
|
|
174
|
+
var flat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("flat");
|
|
175
|
+
var flat__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/ __webpack_require__.n(flat__WEBPACK_IMPORTED_MODULE_4__);
|
|
176
|
+
var lodash__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("lodash");
|
|
177
|
+
var lodash__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/ __webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_5__);
|
|
178
|
+
var lodash_get__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("lodash/get");
|
|
179
|
+
var lodash_get__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/ __webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_6__);
|
|
180
|
+
var lodash_omit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("lodash/omit");
|
|
181
|
+
var lodash_omit__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/ __webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_7__);
|
|
182
|
+
var react_i18next__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("react-i18next");
|
|
183
|
+
var react_router_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("react-router-dom");
|
|
184
|
+
var react_to_print__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("react-to-print");
|
|
185
|
+
var ___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../..");
|
|
186
|
+
var _api_client__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../api-client");
|
|
187
|
+
var _built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../../built-in/dynamic-page/utils");
|
|
188
|
+
var _collection_manager__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("../../collection-manager");
|
|
189
|
+
var _filter_provider_FilterProvider__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("../../filter-provider/FilterProvider");
|
|
190
|
+
var _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("../../filter-provider/utils");
|
|
191
|
+
var _record_provider__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__("../../record-provider");
|
|
192
|
+
var _schema_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__("../../schema-component");
|
|
193
|
+
var _schema_component_antd_association_field_util__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__("../../schema-component/antd/association-field/util");
|
|
194
|
+
var _user__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__("../../user");
|
|
195
|
+
var _variables__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__("../../variables");
|
|
196
|
+
var _variables_utils_isVariable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__("../../variables/utils/isVariable");
|
|
197
|
+
var _variables_utils_transformVariableValue__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__("../../variables/utils/transformVariableValue");
|
|
198
|
+
var _BlockProvider__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__("../BlockProvider");
|
|
199
|
+
var _DetailsBlockProvider__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__("../DetailsBlockProvider");
|
|
200
|
+
var _TableFieldProvider__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__("../TableFieldProvider");
|
|
201
|
+
var _useFormActiveFields__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__("./useFormActiveFields");
|
|
202
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
203
|
+
for(var __WEBPACK_IMPORT_KEY__ in _useFormActiveFields__WEBPACK_IMPORTED_MODULE_27__)if ([
|
|
204
|
+
"useBulkDestroyActionProps",
|
|
205
|
+
"updateFilterTargets",
|
|
206
|
+
"useCustomizeUpdateActionProps",
|
|
207
|
+
"useAssociationFilterProps",
|
|
208
|
+
"useFilterBlockActionProps",
|
|
209
|
+
"useCancelActionProps",
|
|
210
|
+
"useCreateActionProps",
|
|
211
|
+
"useRemoveActionProps",
|
|
212
|
+
"useCollectValuesToSubmit",
|
|
213
|
+
"useDetailsPaginationProps",
|
|
214
|
+
"useInsertSchema",
|
|
215
|
+
"getAssociationPath",
|
|
216
|
+
"useAssociationNames",
|
|
217
|
+
"getBeforeWorkflows",
|
|
218
|
+
"useCustomizeRequestActionProps",
|
|
219
|
+
"getFormValues",
|
|
220
|
+
"findFilterTargets",
|
|
221
|
+
"getAfterWorkflows",
|
|
222
|
+
"useDetailPrintActionProps",
|
|
223
|
+
"useDisassociateActionProps",
|
|
224
|
+
"useAssociationFilterBlockProps",
|
|
225
|
+
"useAssociationCreateActionProps",
|
|
226
|
+
"useRefreshActionProps",
|
|
227
|
+
"useUpdateActionProps",
|
|
228
|
+
"default",
|
|
229
|
+
"useResetBlockActionProps",
|
|
230
|
+
"useDestroyActionProps",
|
|
231
|
+
"useOptionalFieldList",
|
|
232
|
+
"filterByCleanedFields"
|
|
233
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
234
|
+
return _useFormActiveFields__WEBPACK_IMPORTED_MODULE_27__[key];
|
|
235
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
236
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
237
|
+
var _useParsedFilter__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__("./useParsedFilter");
|
|
238
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
239
|
+
for(var __WEBPACK_IMPORT_KEY__ in _useParsedFilter__WEBPACK_IMPORTED_MODULE_28__)if ([
|
|
240
|
+
"useBulkDestroyActionProps",
|
|
241
|
+
"updateFilterTargets",
|
|
242
|
+
"useCustomizeUpdateActionProps",
|
|
243
|
+
"useAssociationFilterProps",
|
|
244
|
+
"useFilterBlockActionProps",
|
|
245
|
+
"useCancelActionProps",
|
|
246
|
+
"useCreateActionProps",
|
|
247
|
+
"useRemoveActionProps",
|
|
248
|
+
"useCollectValuesToSubmit",
|
|
249
|
+
"useDetailsPaginationProps",
|
|
250
|
+
"useInsertSchema",
|
|
251
|
+
"getAssociationPath",
|
|
252
|
+
"useAssociationNames",
|
|
253
|
+
"getBeforeWorkflows",
|
|
254
|
+
"useCustomizeRequestActionProps",
|
|
255
|
+
"getFormValues",
|
|
256
|
+
"findFilterTargets",
|
|
257
|
+
"getAfterWorkflows",
|
|
258
|
+
"useDetailPrintActionProps",
|
|
259
|
+
"useDisassociateActionProps",
|
|
260
|
+
"useAssociationFilterBlockProps",
|
|
261
|
+
"useAssociationCreateActionProps",
|
|
262
|
+
"useRefreshActionProps",
|
|
263
|
+
"useUpdateActionProps",
|
|
264
|
+
"default",
|
|
265
|
+
"useResetBlockActionProps",
|
|
266
|
+
"useDestroyActionProps",
|
|
267
|
+
"useOptionalFieldList",
|
|
268
|
+
"filterByCleanedFields"
|
|
269
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
270
|
+
return _useParsedFilter__WEBPACK_IMPORTED_MODULE_28__[key];
|
|
271
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
272
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
273
|
+
var _useDataBlockSourceId__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__("./useDataBlockSourceId");
|
|
274
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
275
|
+
for(var __WEBPACK_IMPORT_KEY__ in _useDataBlockSourceId__WEBPACK_IMPORTED_MODULE_29__)if ([
|
|
276
|
+
"useBulkDestroyActionProps",
|
|
277
|
+
"updateFilterTargets",
|
|
278
|
+
"useCustomizeUpdateActionProps",
|
|
279
|
+
"useAssociationFilterProps",
|
|
280
|
+
"useFilterBlockActionProps",
|
|
281
|
+
"useCancelActionProps",
|
|
282
|
+
"useCreateActionProps",
|
|
283
|
+
"useRemoveActionProps",
|
|
284
|
+
"useCollectValuesToSubmit",
|
|
285
|
+
"useDetailsPaginationProps",
|
|
286
|
+
"useInsertSchema",
|
|
287
|
+
"getAssociationPath",
|
|
288
|
+
"useAssociationNames",
|
|
289
|
+
"getBeforeWorkflows",
|
|
290
|
+
"useCustomizeRequestActionProps",
|
|
291
|
+
"getFormValues",
|
|
292
|
+
"findFilterTargets",
|
|
293
|
+
"getAfterWorkflows",
|
|
294
|
+
"useDetailPrintActionProps",
|
|
295
|
+
"useDisassociateActionProps",
|
|
296
|
+
"useAssociationFilterBlockProps",
|
|
297
|
+
"useAssociationCreateActionProps",
|
|
298
|
+
"useRefreshActionProps",
|
|
299
|
+
"useUpdateActionProps",
|
|
300
|
+
"default",
|
|
301
|
+
"useResetBlockActionProps",
|
|
302
|
+
"useDestroyActionProps",
|
|
303
|
+
"useOptionalFieldList",
|
|
304
|
+
"filterByCleanedFields"
|
|
305
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
306
|
+
return _useDataBlockSourceId__WEBPACK_IMPORTED_MODULE_29__[key];
|
|
307
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
308
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
309
|
+
var _useIsMobile__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__("./useIsMobile");
|
|
310
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
311
|
+
for(var __WEBPACK_IMPORT_KEY__ in _useIsMobile__WEBPACK_IMPORTED_MODULE_30__)if ([
|
|
312
|
+
"useBulkDestroyActionProps",
|
|
313
|
+
"updateFilterTargets",
|
|
314
|
+
"useCustomizeUpdateActionProps",
|
|
315
|
+
"useAssociationFilterProps",
|
|
316
|
+
"useFilterBlockActionProps",
|
|
317
|
+
"useCancelActionProps",
|
|
318
|
+
"useCreateActionProps",
|
|
319
|
+
"useRemoveActionProps",
|
|
320
|
+
"useCollectValuesToSubmit",
|
|
321
|
+
"useDetailsPaginationProps",
|
|
322
|
+
"useInsertSchema",
|
|
323
|
+
"getAssociationPath",
|
|
324
|
+
"useAssociationNames",
|
|
325
|
+
"getBeforeWorkflows",
|
|
326
|
+
"useCustomizeRequestActionProps",
|
|
327
|
+
"getFormValues",
|
|
328
|
+
"findFilterTargets",
|
|
329
|
+
"getAfterWorkflows",
|
|
330
|
+
"useDetailPrintActionProps",
|
|
331
|
+
"useDisassociateActionProps",
|
|
332
|
+
"useAssociationFilterBlockProps",
|
|
333
|
+
"useAssociationCreateActionProps",
|
|
334
|
+
"useRefreshActionProps",
|
|
335
|
+
"useUpdateActionProps",
|
|
336
|
+
"default",
|
|
337
|
+
"useResetBlockActionProps",
|
|
338
|
+
"useDestroyActionProps",
|
|
339
|
+
"useOptionalFieldList",
|
|
340
|
+
"filterByCleanedFields"
|
|
341
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
342
|
+
return _useIsMobile__WEBPACK_IMPORTED_MODULE_30__[key];
|
|
343
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
344
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
345
|
+
function renderTemplate(str, data) {
|
|
346
|
+
const re = /\{\{\s*((\w+\.?)+)\s*\}\}/g;
|
|
347
|
+
return str.replace(re, function(_, key) {
|
|
348
|
+
return lodash_get__WEBPACK_IMPORTED_MODULE_6___default()(data, key) || '';
|
|
349
|
+
});
|
|
430
350
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
'
|
|
441
|
-
'
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
}
|
|
351
|
+
function filterByCleanedFields(mergeFilter) {
|
|
352
|
+
const items = flat__WEBPACK_IMPORTED_MODULE_4___default()(mergeFilter);
|
|
353
|
+
const result = {};
|
|
354
|
+
const seen = new Set();
|
|
355
|
+
for(const key in items){
|
|
356
|
+
const value = items[key];
|
|
357
|
+
if (void 0 === value) continue;
|
|
358
|
+
const pathParts = key.split('.');
|
|
359
|
+
const filteredParts = pathParts.filter((p)=>!/^\d+$/.test(p) && ![
|
|
360
|
+
'$and',
|
|
361
|
+
'$or'
|
|
362
|
+
].includes(p));
|
|
363
|
+
const fieldPath = filteredParts.join('.');
|
|
364
|
+
const uniqueKey = "".concat(fieldPath, "|").concat(JSON.stringify(value));
|
|
365
|
+
if (!seen.has(uniqueKey)) {
|
|
366
|
+
seen.add(uniqueKey);
|
|
367
|
+
result[key] = value;
|
|
368
|
+
}
|
|
449
369
|
}
|
|
370
|
+
return flat__WEBPACK_IMPORTED_MODULE_4___default().unflatten(result);
|
|
450
371
|
}
|
|
451
|
-
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
currentForm: form
|
|
464
|
-
});
|
|
465
|
-
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
466
|
-
const currentRecord = (0, _record_provider__WEBPACK_IMPORTED_MODULE_17__.useRecord)();
|
|
467
|
-
return (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async ()=>{
|
|
468
|
-
var _fieldSchema_xcomponentprops;
|
|
469
|
-
var _actionSchema_xactionsettings;
|
|
470
|
-
const { assignedValues: originalAssignedValues = {}, overwriteValues } = null !== (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) && void 0 !== _actionSchema_xactionsettings ? _actionSchema_xactionsettings : {};
|
|
471
|
-
const values = getFormValues({
|
|
472
|
-
filterByTk,
|
|
473
|
-
field,
|
|
474
|
-
form,
|
|
475
|
-
fieldNames,
|
|
476
|
-
getField,
|
|
477
|
-
resource,
|
|
478
|
-
actionFields: (null == getActiveFieldsName ? void 0 : getActiveFieldsName('form')) || []
|
|
479
|
-
});
|
|
480
|
-
const assignedValues = {};
|
|
481
|
-
const waitList = Object.keys(originalAssignedValues).map(async (key)=>{
|
|
482
|
-
const value = originalAssignedValues[key];
|
|
483
|
-
const collectionField = getField(key);
|
|
484
|
-
if ((0, _variables_utils_isVariable__WEBPACK_IMPORTED_MODULE_22__.isVariable)(value)) {
|
|
485
|
-
const result = await (null == variables ? void 0 : variables.parseVariable(value, localVariables));
|
|
486
|
-
if (result) assignedValues[key] = (0, _variables_utils_transformVariableValue__WEBPACK_IMPORTED_MODULE_23__.transformVariableValue)(result, {
|
|
487
|
-
targetCollectionField: collectionField
|
|
372
|
+
function getFormValues(param) {
|
|
373
|
+
let { filterByTk, field, form, fieldNames, getField, resource, actionFields } = param;
|
|
374
|
+
if (filterByTk) {
|
|
375
|
+
if (actionFields) {
|
|
376
|
+
const keys = Object.keys(form.values).filter((key)=>{
|
|
377
|
+
const f = getField(key);
|
|
378
|
+
return !actionFields.includes(key) && [
|
|
379
|
+
'hasOne',
|
|
380
|
+
'hasMany',
|
|
381
|
+
'belongsTo',
|
|
382
|
+
'belongsToMany'
|
|
383
|
+
].includes(null == f ? void 0 : f.type);
|
|
488
384
|
});
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
const addChild = null == fieldSchema ? void 0 : null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops.addChild;
|
|
493
|
-
if (addChild) {
|
|
494
|
-
var _currentRecord___parent;
|
|
495
|
-
const treeParentField = getTreeParentField();
|
|
496
|
-
var _treeParentField_name;
|
|
497
|
-
values[null !== (_treeParentField_name = null == treeParentField ? void 0 : treeParentField.name) && void 0 !== _treeParentField_name ? _treeParentField_name : 'parent'] = lodash_omit__WEBPACK_IMPORTED_MODULE_7___default()(null == currentRecord ? void 0 : currentRecord.__parent, [
|
|
498
|
-
'children'
|
|
499
|
-
]);
|
|
500
|
-
var _treeParentField_foreignKey;
|
|
501
|
-
values[null !== (_treeParentField_foreignKey = null == treeParentField ? void 0 : treeParentField.foreignKey) && void 0 !== _treeParentField_foreignKey ? _treeParentField_foreignKey : 'parentId'] = null == currentRecord ? void 0 : null === (_currentRecord___parent = currentRecord.__parent) || void 0 === _currentRecord___parent ? void 0 : _currentRecord___parent.id;
|
|
502
|
-
}
|
|
503
|
-
return {
|
|
504
|
-
...values,
|
|
505
|
-
...overwriteValues,
|
|
506
|
-
...assignedValues
|
|
507
|
-
};
|
|
508
|
-
}, [
|
|
509
|
-
actionSchema,
|
|
510
|
-
null == currentRecord ? void 0 : currentRecord.__parent,
|
|
511
|
-
field,
|
|
512
|
-
fieldNames,
|
|
513
|
-
fieldSchema,
|
|
514
|
-
filterByTk,
|
|
515
|
-
form,
|
|
516
|
-
getActiveFieldsName,
|
|
517
|
-
getField,
|
|
518
|
-
getTreeParentField,
|
|
519
|
-
localVariables,
|
|
520
|
-
name,
|
|
521
|
-
resource,
|
|
522
|
-
variables
|
|
523
|
-
]);
|
|
524
|
-
}
|
|
525
|
-
const pageDetailsViewer = 'Action.Container';
|
|
526
|
-
const viewerSchema = {
|
|
527
|
-
type: 'void',
|
|
528
|
-
title: '{{t("View record")}}',
|
|
529
|
-
'x-component': 'Action.Container',
|
|
530
|
-
'x-component-props': {
|
|
531
|
-
className: 'tb-action-popup'
|
|
532
|
-
},
|
|
533
|
-
properties: {
|
|
534
|
-
page: {
|
|
535
|
-
type: 'void',
|
|
536
|
-
title: '{{t("Detail page")}}',
|
|
537
|
-
'x-designer': 'Page.Designer',
|
|
538
|
-
'x-component': 'Page',
|
|
539
|
-
'x-component-props': {
|
|
540
|
-
disablePageHeader: true
|
|
541
|
-
},
|
|
542
|
-
properties: {
|
|
543
|
-
grid: {
|
|
544
|
-
type: 'void',
|
|
545
|
-
'x-component': 'Grid',
|
|
546
|
-
'x-initializer': 'popup:common:addBlock',
|
|
547
|
-
properties: {}
|
|
548
|
-
}
|
|
385
|
+
return lodash_omit__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
386
|
+
...form.values
|
|
387
|
+
}, keys);
|
|
549
388
|
}
|
|
550
389
|
}
|
|
390
|
+
return form.values;
|
|
551
391
|
}
|
|
552
|
-
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
pageDetailsViewer
|
|
564
|
-
]);
|
|
565
|
-
return insert;
|
|
566
|
-
};
|
|
567
|
-
const useCancelActionProps = ()=>{
|
|
568
|
-
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
569
|
-
const ctx = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
570
|
-
return {
|
|
571
|
-
async onClick () {
|
|
572
|
-
ctx.setVisible(false);
|
|
573
|
-
form.reset();
|
|
574
|
-
}
|
|
575
|
-
};
|
|
576
|
-
};
|
|
577
|
-
const useJumpDetails = ()=>{
|
|
578
|
-
const collection = (0, ___WEBPACK_IMPORTED_MODULE_11__.useCollection)();
|
|
579
|
-
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
580
|
-
const dn = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useDesignable)();
|
|
581
|
-
const insert = useInsertSchema();
|
|
582
|
-
const navigate = (0, react_router_dom__WEBPACK_IMPORTED_MODULE_9__.useNavigate)();
|
|
583
|
-
return (filterByTk)=>{
|
|
584
|
-
if (dn.designable) insert(viewerSchema);
|
|
585
|
-
const targetSchema = fieldSchema.reduceProperties((buf, s)=>{
|
|
586
|
-
if (s['x-component'] === pageDetailsViewer) return s;
|
|
587
|
-
return buf;
|
|
392
|
+
function useCollectValuesToSubmit() {
|
|
393
|
+
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
394
|
+
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
395
|
+
const { field, resource } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
396
|
+
const { fields, getField, getTreeParentField, name } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollection_deprecated)();
|
|
397
|
+
const fieldNames = fields.map((field)=>field.name);
|
|
398
|
+
const { fieldSchema } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
399
|
+
const { getActiveFieldsName } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormActiveFields)() || {};
|
|
400
|
+
const variables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useVariables)();
|
|
401
|
+
const localVariables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useLocalVariables)({
|
|
402
|
+
currentForm: form
|
|
588
403
|
});
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
})));
|
|
593
|
-
};
|
|
594
|
-
};
|
|
595
|
-
function getAfterWorkflows(triggerWorkflows) {
|
|
596
|
-
if (!(null == triggerWorkflows ? void 0 : triggerWorkflows.length)) return;
|
|
597
|
-
return triggerWorkflows.filter((row)=>row && 'before' !== row.order).map((row)=>[
|
|
598
|
-
row.workflowKey,
|
|
599
|
-
row.context
|
|
600
|
-
].join('!')).join(',');
|
|
601
|
-
}
|
|
602
|
-
function getBeforeWorkflows(triggerWorkflows) {
|
|
603
|
-
if (!(null == triggerWorkflows ? void 0 : triggerWorkflows.length)) return;
|
|
604
|
-
return triggerWorkflows.filter((row)=>row && 'before' === row.order).map((row)=>[
|
|
605
|
-
row.workflowKey,
|
|
606
|
-
row.context
|
|
607
|
-
].join('!')).join(',');
|
|
608
|
-
}
|
|
609
|
-
const useCreateActionProps = ()=>{
|
|
610
|
-
var _actionField_componentProps_filterKeys;
|
|
611
|
-
const record = (0, ___WEBPACK_IMPORTED_MODULE_11__.useCollectionRecord)();
|
|
612
|
-
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
613
|
-
const { field, resource, __parent } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
614
|
-
const jumpDetails = useJumpDetails();
|
|
615
|
-
const { setVisible } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
616
|
-
const navigate = (0, react_router_dom__WEBPACK_IMPORTED_MODULE_9__.useNavigate)();
|
|
617
|
-
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
618
|
-
const actionField = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
619
|
-
const compile = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useCompile)();
|
|
620
|
-
const { modal, message } = antd__WEBPACK_IMPORTED_MODULE_3__.App.useApp();
|
|
621
|
-
const { t } = (0, react_i18next__WEBPACK_IMPORTED_MODULE_8__.useTranslation)();
|
|
622
|
-
const { updateAssociationValues } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormBlockContext)();
|
|
623
|
-
const collectValues = useCollectValuesToSubmit();
|
|
624
|
-
const action = record.isNew ? actionField.componentProps.saveMode || 'create' : 'update';
|
|
625
|
-
const filterKeys = (null === (_actionField_componentProps_filterKeys = actionField.componentProps.filterKeys) || void 0 === _actionField_componentProps_filterKeys ? void 0 : _actionField_componentProps_filterKeys.checked) || [];
|
|
626
|
-
return {
|
|
627
|
-
async onClick () {
|
|
628
|
-
var _actionSchema_xactionsettings;
|
|
629
|
-
const { onSuccess, skipValidator, triggerWorkflows, pageMode } = null !== (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) && void 0 !== _actionSchema_xactionsettings ? _actionSchema_xactionsettings : {};
|
|
630
|
-
if (!skipValidator) await form.submit();
|
|
631
|
-
actionField.data = field.data || {};
|
|
632
|
-
actionField.data.loading = true;
|
|
633
|
-
try {
|
|
634
|
-
var __parent_service_refresh, __parent_service;
|
|
635
|
-
const data = await resource[action]({
|
|
636
|
-
values: await collectValues(),
|
|
637
|
-
filterKeys: filterKeys,
|
|
638
|
-
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
639
|
-
beforeWorkflows: getBeforeWorkflows(triggerWorkflows),
|
|
640
|
-
updateAssociationValues
|
|
641
|
-
});
|
|
642
|
-
actionField.data.loading = false;
|
|
643
|
-
actionField.data.data = data;
|
|
644
|
-
null == __parent || null === (__parent_service = __parent.service) || void 0 === __parent_service || null === (__parent_service_refresh = __parent_service.refresh) || void 0 === __parent_service_refresh || __parent_service_refresh.call(__parent_service);
|
|
645
|
-
if (pageMode) {
|
|
646
|
-
var _data_data_data, _data_data;
|
|
647
|
-
await resetFormCorrectly(form);
|
|
648
|
-
jumpDetails(null == data ? void 0 : null === (_data_data = data.data) || void 0 === _data_data ? void 0 : null === (_data_data_data = _data_data.data) || void 0 === _data_data_data ? void 0 : _data_data_data.id);
|
|
649
|
-
return;
|
|
650
|
-
}
|
|
651
|
-
const successMessage = (null == onSuccess ? void 0 : onSuccess.successMessage) ? compile(null == onSuccess ? void 0 : onSuccess.successMessage) : t('Saved successfully');
|
|
652
|
-
if (null == onSuccess ? void 0 : onSuccess.manualClose) modal.success({
|
|
653
|
-
title: successMessage,
|
|
654
|
-
onOk: async ()=>{
|
|
655
|
-
await resetFormCorrectly(form);
|
|
656
|
-
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) {
|
|
657
|
-
if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
658
|
-
else navigate(onSuccess.redirectTo);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
});
|
|
662
|
-
else {
|
|
663
|
-
message.success(successMessage);
|
|
664
|
-
await resetFormCorrectly(form);
|
|
665
|
-
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) {
|
|
666
|
-
if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
667
|
-
else navigate(onSuccess.redirectTo);
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
if (!(null == onSuccess ? void 0 : onSuccess.popupClose)) {
|
|
671
|
-
await resetFormCorrectly(form);
|
|
672
|
-
null == setVisible || setVisible(false);
|
|
673
|
-
}
|
|
674
|
-
if (!onSuccess) null == setVisible || setVisible(false);
|
|
675
|
-
} catch (error) {
|
|
676
|
-
actionField.data.loading = false;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
};
|
|
680
|
-
};
|
|
681
|
-
const useAssociationCreateActionProps = ()=>{
|
|
682
|
-
var _actionField_componentProps_filterKeys;
|
|
683
|
-
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
684
|
-
const { field, resource, __parent } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
685
|
-
const { setVisible, fieldSchema } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
686
|
-
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
687
|
-
const actionField = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
688
|
-
const { message } = antd__WEBPACK_IMPORTED_MODULE_3__.App.useApp();
|
|
689
|
-
const { fields, getField, getTreeParentField, name } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollection_deprecated)();
|
|
690
|
-
const compile = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useCompile)();
|
|
691
|
-
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
692
|
-
const currentRecord = (0, _record_provider__WEBPACK_IMPORTED_MODULE_17__.useRecord)();
|
|
693
|
-
const variables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useVariables)();
|
|
694
|
-
const localVariables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useLocalVariables)({
|
|
695
|
-
currentForm: form
|
|
696
|
-
});
|
|
697
|
-
const { getActiveFieldsName } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormActiveFields)() || {};
|
|
698
|
-
const action = actionField.componentProps.saveMode || 'create';
|
|
699
|
-
const filterKeys = (null === (_actionField_componentProps_filterKeys = actionField.componentProps.filterKeys) || void 0 === _actionField_componentProps_filterKeys ? void 0 : _actionField_componentProps_filterKeys.checked) || [];
|
|
700
|
-
return {
|
|
701
|
-
async onClick () {
|
|
404
|
+
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
405
|
+
const currentRecord = (0, _record_provider__WEBPACK_IMPORTED_MODULE_17__.useRecord)();
|
|
406
|
+
return (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(async ()=>{
|
|
702
407
|
var _fieldSchema_xcomponentprops;
|
|
703
|
-
const fieldNames = fields.map((field)=>field.name);
|
|
704
408
|
var _actionSchema_xactionsettings;
|
|
705
|
-
const { assignedValues: originalAssignedValues = {},
|
|
706
|
-
const
|
|
409
|
+
const { assignedValues: originalAssignedValues = {}, overwriteValues } = null != (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) ? _actionSchema_xactionsettings : {};
|
|
410
|
+
const values = getFormValues({
|
|
411
|
+
filterByTk,
|
|
412
|
+
field,
|
|
413
|
+
form,
|
|
414
|
+
fieldNames,
|
|
415
|
+
getField,
|
|
416
|
+
resource,
|
|
417
|
+
actionFields: (null == getActiveFieldsName ? void 0 : getActiveFieldsName('form')) || []
|
|
418
|
+
});
|
|
707
419
|
const assignedValues = {};
|
|
708
420
|
const waitList = Object.keys(originalAssignedValues).map(async (key)=>{
|
|
709
421
|
const value = originalAssignedValues[key];
|
|
@@ -716,274 +428,230 @@ const useAssociationCreateActionProps = ()=>{
|
|
|
716
428
|
} else if (null != value && '' !== value) assignedValues[key] = value;
|
|
717
429
|
});
|
|
718
430
|
await Promise.all(waitList);
|
|
719
|
-
|
|
720
|
-
const values = getFormValues({
|
|
721
|
-
filterByTk,
|
|
722
|
-
field,
|
|
723
|
-
form,
|
|
724
|
-
fieldNames,
|
|
725
|
-
getField,
|
|
726
|
-
resource,
|
|
727
|
-
actionFields: (null == getActiveFieldsName ? void 0 : getActiveFieldsName('form')) || []
|
|
728
|
-
});
|
|
431
|
+
const addChild = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.addChild;
|
|
729
432
|
if (addChild) {
|
|
433
|
+
var _treeParentField_collection_model_rawAttributes_treeParentField_foreignKey, _currentRecord___parent;
|
|
730
434
|
const treeParentField = getTreeParentField();
|
|
731
435
|
var _treeParentField_name;
|
|
732
|
-
values[null
|
|
733
|
-
|
|
734
|
-
|
|
436
|
+
values[null != (_treeParentField_name = null == treeParentField ? void 0 : treeParentField.name) ? _treeParentField_name : 'parent'] = lodash_omit__WEBPACK_IMPORTED_MODULE_7___default()(null == currentRecord ? void 0 : currentRecord.__parent, [
|
|
437
|
+
'children'
|
|
438
|
+
]);
|
|
439
|
+
var _treeParentField_collection_model_rawAttributes_treeParentField_foreignKey_field;
|
|
440
|
+
values[null != (_treeParentField_collection_model_rawAttributes_treeParentField_foreignKey_field = null == treeParentField ? void 0 : null == (_treeParentField_collection_model_rawAttributes_treeParentField_foreignKey = treeParentField.collection.model.rawAttributes[null == treeParentField ? void 0 : treeParentField.foreignKey]) ? void 0 : _treeParentField_collection_model_rawAttributes_treeParentField_foreignKey.field) ? _treeParentField_collection_model_rawAttributes_treeParentField_foreignKey_field : 'parentId'] = null == currentRecord ? void 0 : null == (_currentRecord___parent = currentRecord.__parent) ? void 0 : _currentRecord___parent.id;
|
|
735
441
|
}
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
442
|
+
return {
|
|
443
|
+
...values,
|
|
444
|
+
...overwriteValues,
|
|
445
|
+
...assignedValues
|
|
446
|
+
};
|
|
447
|
+
}, [
|
|
448
|
+
actionSchema,
|
|
449
|
+
null == currentRecord ? void 0 : currentRecord.__parent,
|
|
450
|
+
field,
|
|
451
|
+
fieldNames,
|
|
452
|
+
fieldSchema,
|
|
453
|
+
filterByTk,
|
|
454
|
+
form,
|
|
455
|
+
getActiveFieldsName,
|
|
456
|
+
getField,
|
|
457
|
+
getTreeParentField,
|
|
458
|
+
localVariables,
|
|
459
|
+
name,
|
|
460
|
+
resource,
|
|
461
|
+
variables
|
|
462
|
+
]);
|
|
463
|
+
}
|
|
464
|
+
const pageDetailsViewer = 'Action.Container';
|
|
465
|
+
const viewerSchema = {
|
|
466
|
+
type: 'void',
|
|
467
|
+
title: '{{t("View record")}}',
|
|
468
|
+
'x-component': 'Action.Container',
|
|
469
|
+
'x-component-props': {
|
|
470
|
+
className: 'tb-action-popup'
|
|
471
|
+
},
|
|
472
|
+
properties: {
|
|
473
|
+
page: {
|
|
474
|
+
type: 'void',
|
|
475
|
+
title: '{{t("Detail page")}}',
|
|
476
|
+
'x-designer': 'Page.Designer',
|
|
477
|
+
'x-component': 'Page',
|
|
478
|
+
'x-component-props': {
|
|
479
|
+
disablePageHeader: true
|
|
480
|
+
},
|
|
481
|
+
properties: {
|
|
482
|
+
grid: {
|
|
483
|
+
type: 'void',
|
|
484
|
+
'x-component': 'Grid',
|
|
485
|
+
'x-initializer': 'popup:common:addBlock',
|
|
486
|
+
properties: {}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
759
489
|
}
|
|
760
490
|
}
|
|
761
491
|
};
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
492
|
+
const useInsertSchema = ()=>{
|
|
493
|
+
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
494
|
+
const { insertAfterBegin } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useDesignable)();
|
|
495
|
+
const insert = (0, react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((ss)=>{
|
|
496
|
+
const schema = fieldSchema.reduceProperties((buf, s)=>{
|
|
497
|
+
if (s['x-component'] === pageDetailsViewer) return s;
|
|
498
|
+
return buf;
|
|
499
|
+
}, null);
|
|
500
|
+
if (!schema) insertAfterBegin(lodash__WEBPACK_IMPORTED_MODULE_5___default().cloneDeep(ss));
|
|
501
|
+
}, [
|
|
502
|
+
pageDetailsViewer
|
|
503
|
+
]);
|
|
504
|
+
return insert;
|
|
505
|
+
};
|
|
506
|
+
const useCancelActionProps = ()=>{
|
|
507
|
+
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
508
|
+
const ctx = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
509
|
+
return {
|
|
510
|
+
async onClick () {
|
|
511
|
+
ctx.setVisible(false);
|
|
512
|
+
form.reset();
|
|
513
|
+
}
|
|
768
514
|
};
|
|
769
|
-
|
|
515
|
+
};
|
|
516
|
+
const useJumpDetails = ()=>{
|
|
517
|
+
const collection = (0, ___WEBPACK_IMPORTED_MODULE_11__.useCollection)();
|
|
518
|
+
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
519
|
+
const dn = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useDesignable)();
|
|
520
|
+
const insert = useInsertSchema();
|
|
521
|
+
const navigate = (0, react_router_dom__WEBPACK_IMPORTED_MODULE_9__.useNavigate)();
|
|
522
|
+
return (filterByTk)=>{
|
|
523
|
+
if (dn.designable) insert(viewerSchema);
|
|
524
|
+
const targetSchema = fieldSchema.reduceProperties((buf, s)=>{
|
|
525
|
+
if (s['x-component'] === pageDetailsViewer) return s;
|
|
526
|
+
return buf;
|
|
527
|
+
});
|
|
528
|
+
if (targetSchema) navigate("../".concat(targetSchema['x-uid'], "/").concat(_built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_13__.PathHandler.getInstance().toWildcardPath({
|
|
529
|
+
collection: collection.name,
|
|
530
|
+
filterByTk
|
|
531
|
+
})));
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
function getAfterWorkflows(triggerWorkflows) {
|
|
535
|
+
if (!(null == triggerWorkflows ? void 0 : triggerWorkflows.length)) return;
|
|
536
|
+
return triggerWorkflows.filter((row)=>row && 'before' !== row.order).map((row)=>[
|
|
537
|
+
row.workflowKey,
|
|
538
|
+
row.context
|
|
539
|
+
].join('!')).join(',');
|
|
770
540
|
}
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
return;
|
|
778
|
-
}
|
|
779
|
-
fieldSchema = fieldSchema.parent;
|
|
541
|
+
function getBeforeWorkflows(triggerWorkflows) {
|
|
542
|
+
if (!(null == triggerWorkflows ? void 0 : triggerWorkflows.length)) return;
|
|
543
|
+
return triggerWorkflows.filter((row)=>row && 'before' === row.order).map((row)=>[
|
|
544
|
+
row.workflowKey,
|
|
545
|
+
row.context
|
|
546
|
+
].join('!')).join(',');
|
|
780
547
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
};
|
|
814
|
-
delete values['__custom'];
|
|
815
|
-
filter.formValues = {
|
|
816
|
-
...values
|
|
817
|
-
};
|
|
818
|
-
for(const key in form.values['__custom'])if (form.values['__custom'][key]) filter.customValues[key] = form.values['__custom'][key];
|
|
819
|
-
filter.customFilter = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.getCustomCondition)(filter.customValues, fieldSchema);
|
|
820
|
-
}
|
|
821
|
-
storedFilter[uid] = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.removeNullCondition)((0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.transformToFilter)(filter.formValues, fieldSchema, getCollectionJoinField, name));
|
|
822
|
-
const mergedFilter = (0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.mergeFilter)([
|
|
823
|
-
...Object.values(storedFilter).map((filter)=>(0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.removeNullCondition)(filter)),
|
|
824
|
-
block.defaultFilter,
|
|
825
|
-
filter.customFilter,
|
|
826
|
-
prevMergedFilter
|
|
827
|
-
]);
|
|
828
|
-
const currFilter = filterByCleanedFields(mergedFilter);
|
|
829
|
-
prevMergedFilter = currFilter;
|
|
830
|
-
if ('manual' === block.dataLoadingMode && lodash__WEBPACK_IMPORTED_MODULE_5___default().isEmpty(currFilter)) return block.clearData();
|
|
831
|
-
return block.doFilter({
|
|
832
|
-
...param,
|
|
833
|
-
page: 1,
|
|
834
|
-
filter: currFilter
|
|
835
|
-
}, {
|
|
836
|
-
filters: storedFilter
|
|
837
|
-
});
|
|
838
|
-
}));
|
|
839
|
-
} catch (error) {
|
|
840
|
-
console.error(error);
|
|
841
|
-
}
|
|
842
|
-
actionField.data.loading = false;
|
|
843
|
-
}
|
|
844
|
-
};
|
|
845
|
-
};
|
|
846
|
-
const useResetBlockActionProps = ()=>{
|
|
847
|
-
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
848
|
-
const actionField = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
849
|
-
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
850
|
-
const { getDataBlocks } = (0, _filter_provider_FilterProvider__WEBPACK_IMPORTED_MODULE_15__.useFilterBlock)();
|
|
851
|
-
actionField.data = actionField.data || {};
|
|
852
|
-
return {
|
|
853
|
-
async onClick () {
|
|
854
|
-
const { targets, uid } = findFilterTargets(fieldSchema);
|
|
855
|
-
form.reset();
|
|
856
|
-
actionField.data.loading = true;
|
|
857
|
-
let prevMergedFilter = {};
|
|
858
|
-
try {
|
|
859
|
-
await Promise.all(getDataBlocks().map(async (block)=>{
|
|
860
|
-
var _block_service_params, _block_service_params_, _block_service_params1;
|
|
861
|
-
const target = targets.find((target)=>target.uid === block.uid);
|
|
862
|
-
if (!target) return;
|
|
863
|
-
if ('manual' === block.dataLoadingMode) return block.clearData();
|
|
864
|
-
const param = (null === (_block_service_params = block.service.params) || void 0 === _block_service_params ? void 0 : _block_service_params[0]) || {};
|
|
865
|
-
const storedFilter = (null === (_block_service_params1 = block.service.params) || void 0 === _block_service_params1 ? void 0 : null === (_block_service_params_ = _block_service_params1[1]) || void 0 === _block_service_params_ ? void 0 : _block_service_params_.filters) || {};
|
|
866
|
-
delete storedFilter[uid];
|
|
867
|
-
const currFilter = (0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.mergeFilter)([
|
|
868
|
-
...Object.values(storedFilter),
|
|
869
|
-
block.defaultFilter,
|
|
870
|
-
prevMergedFilter
|
|
871
|
-
]);
|
|
872
|
-
const mergedFilter = filterByCleanedFields(currFilter);
|
|
873
|
-
prevMergedFilter = mergedFilter;
|
|
874
|
-
return block.doFilter({
|
|
875
|
-
...param,
|
|
876
|
-
page: 1,
|
|
877
|
-
filter: mergedFilter
|
|
878
|
-
}, {
|
|
879
|
-
filters: storedFilter
|
|
548
|
+
const useCreateActionProps = ()=>{
|
|
549
|
+
var _actionField_componentProps_filterKeys;
|
|
550
|
+
const record = (0, ___WEBPACK_IMPORTED_MODULE_11__.useCollectionRecord)();
|
|
551
|
+
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
552
|
+
const { field, resource, __parent } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
553
|
+
const jumpDetails = useJumpDetails();
|
|
554
|
+
const { setVisible } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
555
|
+
const navigate = (0, react_router_dom__WEBPACK_IMPORTED_MODULE_9__.useNavigate)();
|
|
556
|
+
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
557
|
+
const actionField = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
558
|
+
const compile = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useCompile)();
|
|
559
|
+
const { modal, message } = antd__WEBPACK_IMPORTED_MODULE_3__.App.useApp();
|
|
560
|
+
const { t } = (0, react_i18next__WEBPACK_IMPORTED_MODULE_8__.useTranslation)();
|
|
561
|
+
const { updateAssociationValues } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormBlockContext)();
|
|
562
|
+
const collectValues = useCollectValuesToSubmit();
|
|
563
|
+
const action = record.isNew ? actionField.componentProps.saveMode || 'create' : 'update';
|
|
564
|
+
const filterKeys = (null == (_actionField_componentProps_filterKeys = actionField.componentProps.filterKeys) ? void 0 : _actionField_componentProps_filterKeys.checked) || [];
|
|
565
|
+
return {
|
|
566
|
+
async onClick () {
|
|
567
|
+
var _actionSchema_xactionsettings;
|
|
568
|
+
const { onSuccess, skipValidator, triggerWorkflows, pageMode } = null != (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) ? _actionSchema_xactionsettings : {};
|
|
569
|
+
if (!skipValidator) await form.submit();
|
|
570
|
+
actionField.data = field.data || {};
|
|
571
|
+
actionField.data.loading = true;
|
|
572
|
+
try {
|
|
573
|
+
var __parent_service_refresh, __parent_service;
|
|
574
|
+
const data = await resource[action]({
|
|
575
|
+
values: await collectValues(),
|
|
576
|
+
filterKeys: filterKeys,
|
|
577
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
578
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows),
|
|
579
|
+
updateAssociationValues
|
|
880
580
|
});
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
const localVariables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useLocalVariables)({
|
|
899
|
-
currentForm: form
|
|
900
|
-
});
|
|
901
|
-
const { name, getField } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollection_deprecated)();
|
|
902
|
-
return {
|
|
903
|
-
async onClick () {
|
|
904
|
-
var _service_refresh;
|
|
905
|
-
var _actionSchema_xactionsettings;
|
|
906
|
-
const { assignedValues: originalAssignedValues = {}, onSuccess, skipValidator, triggerWorkflows } = null !== (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) && void 0 !== _actionSchema_xactionsettings ? _actionSchema_xactionsettings : {};
|
|
907
|
-
const assignedValues = {};
|
|
908
|
-
const waitList = Object.keys(originalAssignedValues).map(async (key)=>{
|
|
909
|
-
const value = originalAssignedValues[key];
|
|
910
|
-
const collectionField = getField(key);
|
|
911
|
-
if ((0, _variables_utils_isVariable__WEBPACK_IMPORTED_MODULE_22__.isVariable)(value)) {
|
|
912
|
-
const result = await (null == variables ? void 0 : variables.parseVariable(value, localVariables));
|
|
913
|
-
if (result) assignedValues[key] = (0, _variables_utils_transformVariableValue__WEBPACK_IMPORTED_MODULE_23__.transformVariableValue)(result, {
|
|
914
|
-
targetCollectionField: collectionField
|
|
581
|
+
actionField.data.loading = false;
|
|
582
|
+
actionField.data.data = data;
|
|
583
|
+
null == __parent || null == (__parent_service = __parent.service) || null == (__parent_service_refresh = __parent_service.refresh) || __parent_service_refresh.call(__parent_service);
|
|
584
|
+
if (pageMode) {
|
|
585
|
+
var _data_data_data, _data_data;
|
|
586
|
+
await resetFormCorrectly(form);
|
|
587
|
+
jumpDetails(null == data ? void 0 : null == (_data_data = data.data) ? void 0 : null == (_data_data_data = _data_data.data) ? void 0 : _data_data_data.id);
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
const successMessage = (null == onSuccess ? void 0 : onSuccess.successMessage) ? compile(null == onSuccess ? void 0 : onSuccess.successMessage) : t('Saved successfully');
|
|
591
|
+
if (null == onSuccess ? void 0 : onSuccess.manualClose) modal.success({
|
|
592
|
+
title: successMessage,
|
|
593
|
+
onOk: async ()=>{
|
|
594
|
+
await resetFormCorrectly(form);
|
|
595
|
+
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
596
|
+
else navigate(onSuccess.redirectTo);
|
|
597
|
+
}
|
|
915
598
|
});
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
await resource.update({
|
|
921
|
-
filterByTk,
|
|
922
|
-
values: {
|
|
923
|
-
...assignedValues
|
|
924
|
-
},
|
|
925
|
-
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
926
|
-
beforeWorkflows: getBeforeWorkflows(triggerWorkflows)
|
|
927
|
-
});
|
|
928
|
-
null == service || null === (_service_refresh = service.refresh) || void 0 === _service_refresh || _service_refresh.call(service);
|
|
929
|
-
if (!(resource instanceof _TableFieldProvider__WEBPACK_IMPORTED_MODULE_26__.TableFieldResource)) {
|
|
930
|
-
var __parent_service_refresh, __parent_service;
|
|
931
|
-
null == __parent || null === (__parent_service = __parent.service) || void 0 === __parent_service || null === (__parent_service_refresh = __parent_service.refresh) || void 0 === __parent_service_refresh || __parent_service_refresh.call(__parent_service);
|
|
932
|
-
}
|
|
933
|
-
if (!(null == onSuccess ? void 0 : onSuccess.successMessage)) return;
|
|
934
|
-
if (null == onSuccess ? void 0 : onSuccess.manualClose) modal.success({
|
|
935
|
-
title: compile(null == onSuccess ? void 0 : onSuccess.successMessage),
|
|
936
|
-
onOk: async ()=>{
|
|
937
|
-
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) {
|
|
938
|
-
if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
599
|
+
else {
|
|
600
|
+
message.success(successMessage);
|
|
601
|
+
await resetFormCorrectly(form);
|
|
602
|
+
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
939
603
|
else navigate(onSuccess.redirectTo);
|
|
940
604
|
}
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
605
|
+
if (!(null == onSuccess ? void 0 : onSuccess.popupClose)) {
|
|
606
|
+
await resetFormCorrectly(form);
|
|
607
|
+
null == setVisible || setVisible(false);
|
|
608
|
+
}
|
|
609
|
+
if (!onSuccess) null == setVisible || setVisible(false);
|
|
610
|
+
} catch (error) {
|
|
611
|
+
actionField.data.loading = false;
|
|
948
612
|
}
|
|
949
613
|
}
|
|
950
|
-
}
|
|
614
|
+
};
|
|
951
615
|
};
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
const xAction = null == actionSchema ? void 0 : actionSchema['x-action'];
|
|
975
|
-
if (!requestSettings['url']) return;
|
|
976
|
-
if (true !== skipValidator && 'customize:form:request' === xAction) await form.submit();
|
|
977
|
-
const headers = requestSettings['headers'] ? JSON.parse(requestSettings['headers']) : {};
|
|
978
|
-
const params = requestSettings['params'] ? JSON.parse(requestSettings['params']) : {};
|
|
979
|
-
const data = requestSettings['data'] ? JSON.parse(requestSettings['data']) : {};
|
|
980
|
-
const methods = [
|
|
981
|
-
'POST',
|
|
982
|
-
'PUT',
|
|
983
|
-
'PATCH'
|
|
984
|
-
];
|
|
985
|
-
if ('customize:form:request' === xAction && methods.includes(requestSettings['method'])) {
|
|
616
|
+
const useAssociationCreateActionProps = ()=>{
|
|
617
|
+
var _actionField_componentProps_filterKeys;
|
|
618
|
+
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
619
|
+
const { field, resource, __parent } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
620
|
+
const { setVisible, fieldSchema } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
621
|
+
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
622
|
+
const actionField = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
623
|
+
const { message } = antd__WEBPACK_IMPORTED_MODULE_3__.App.useApp();
|
|
624
|
+
const { fields, getField, getTreeParentField, name } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollection_deprecated)();
|
|
625
|
+
const compile = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useCompile)();
|
|
626
|
+
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
627
|
+
const currentRecord = (0, _record_provider__WEBPACK_IMPORTED_MODULE_17__.useRecord)();
|
|
628
|
+
const variables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useVariables)();
|
|
629
|
+
const localVariables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useLocalVariables)({
|
|
630
|
+
currentForm: form
|
|
631
|
+
});
|
|
632
|
+
const { getActiveFieldsName } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormActiveFields)() || {};
|
|
633
|
+
const action = actionField.componentProps.saveMode || 'create';
|
|
634
|
+
const filterKeys = (null == (_actionField_componentProps_filterKeys = actionField.componentProps.filterKeys) ? void 0 : _actionField_componentProps_filterKeys.checked) || [];
|
|
635
|
+
return {
|
|
636
|
+
async onClick () {
|
|
637
|
+
var _fieldSchema_xcomponentprops;
|
|
986
638
|
const fieldNames = fields.map((field)=>field.name);
|
|
639
|
+
var _actionSchema_xactionsettings;
|
|
640
|
+
const { assignedValues: originalAssignedValues = {}, onSuccess, overwriteValues, skipValidator, triggerWorkflows } = null != (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) ? _actionSchema_xactionsettings : {};
|
|
641
|
+
const addChild = null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.addChild;
|
|
642
|
+
const assignedValues = {};
|
|
643
|
+
const waitList = Object.keys(originalAssignedValues).map(async (key)=>{
|
|
644
|
+
const value = originalAssignedValues[key];
|
|
645
|
+
const collectionField = getField(key);
|
|
646
|
+
if ((0, _variables_utils_isVariable__WEBPACK_IMPORTED_MODULE_22__.isVariable)(value)) {
|
|
647
|
+
const result = await (null == variables ? void 0 : variables.parseVariable(value, localVariables));
|
|
648
|
+
if (result) assignedValues[key] = (0, _variables_utils_transformVariableValue__WEBPACK_IMPORTED_MODULE_23__.transformVariableValue)(result, {
|
|
649
|
+
targetCollectionField: collectionField
|
|
650
|
+
});
|
|
651
|
+
} else if (null != value && '' !== value) assignedValues[key] = value;
|
|
652
|
+
});
|
|
653
|
+
await Promise.all(waitList);
|
|
654
|
+
if (!skipValidator) await form.submit();
|
|
987
655
|
const values = getFormValues({
|
|
988
656
|
filterByTk,
|
|
989
657
|
field,
|
|
@@ -993,451 +661,612 @@ const useCustomizeRequestActionProps = ()=>{
|
|
|
993
661
|
resource,
|
|
994
662
|
actionFields: (null == getActiveFieldsName ? void 0 : getActiveFieldsName('form')) || []
|
|
995
663
|
});
|
|
996
|
-
|
|
664
|
+
if (addChild) {
|
|
665
|
+
var _treeParentField_collection_model_rawAttributes_treeParentField_foreignKey;
|
|
666
|
+
const treeParentField = getTreeParentField();
|
|
667
|
+
var _treeParentField_name;
|
|
668
|
+
values[null != (_treeParentField_name = null == treeParentField ? void 0 : treeParentField.name) ? _treeParentField_name : 'parent'] = currentRecord;
|
|
669
|
+
var _treeParentField_collection_model_rawAttributes_treeParentField_foreignKey_field;
|
|
670
|
+
values[null != (_treeParentField_collection_model_rawAttributes_treeParentField_foreignKey_field = null == treeParentField ? void 0 : null == (_treeParentField_collection_model_rawAttributes_treeParentField_foreignKey = treeParentField.collection.model.rawAttributes[null == treeParentField ? void 0 : treeParentField.foreignKey]) ? void 0 : _treeParentField_collection_model_rawAttributes_treeParentField_foreignKey.field) ? _treeParentField_collection_model_rawAttributes_treeParentField_foreignKey_field : 'parentId'] = currentRecord.id;
|
|
671
|
+
}
|
|
672
|
+
actionField.data = field.data || {};
|
|
673
|
+
actionField.data.loading = true;
|
|
674
|
+
try {
|
|
675
|
+
var __parent_service_refresh, __parent_service;
|
|
676
|
+
const data = await resource[action]({
|
|
677
|
+
values: {
|
|
678
|
+
...values,
|
|
679
|
+
...overwriteValues,
|
|
680
|
+
...assignedValues
|
|
681
|
+
},
|
|
682
|
+
filterKeys: filterKeys,
|
|
683
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
684
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows)
|
|
685
|
+
});
|
|
686
|
+
actionField.data.loading = false;
|
|
687
|
+
actionField.data.data = data;
|
|
688
|
+
null == __parent || null == (__parent_service = __parent.service) || null == (__parent_service_refresh = __parent_service.refresh) || __parent_service_refresh.call(__parent_service);
|
|
689
|
+
null == setVisible || setVisible(false);
|
|
690
|
+
if (!(null == onSuccess ? void 0 : onSuccess.successMessage)) return;
|
|
691
|
+
message.success(compile(null == onSuccess ? void 0 : onSuccess.successMessage));
|
|
692
|
+
} catch (error) {
|
|
693
|
+
actionField.data.data = null;
|
|
694
|
+
actionField.data.loading = false;
|
|
695
|
+
}
|
|
997
696
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
currentRecord,
|
|
1006
|
-
currentUser
|
|
1007
|
-
}),
|
|
1008
|
-
params: (0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.parse)(params)({
|
|
1009
|
-
currentRecord,
|
|
1010
|
-
currentUser
|
|
1011
|
-
}),
|
|
1012
|
-
data: (0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.parse)(data)({
|
|
1013
|
-
currentRecord,
|
|
1014
|
-
currentUser
|
|
1015
|
-
})
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
const findFilterTargets = (fieldSchema)=>{
|
|
700
|
+
while(fieldSchema){
|
|
701
|
+
if (fieldSchema['x-filter-targets']) return {
|
|
702
|
+
targets: fieldSchema['x-filter-targets'],
|
|
703
|
+
uid: fieldSchema['x-uid']
|
|
1016
704
|
};
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
705
|
+
fieldSchema = fieldSchema.parent;
|
|
706
|
+
}
|
|
707
|
+
return {};
|
|
708
|
+
};
|
|
709
|
+
const updateFilterTargets = (fieldSchema, targets)=>{
|
|
710
|
+
while(fieldSchema){
|
|
711
|
+
if (fieldSchema['x-filter-targets']) {
|
|
712
|
+
fieldSchema['x-filter-targets'] = targets;
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
fieldSchema = fieldSchema.parent;
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
const useFilterBlockActionProps = ()=>{
|
|
719
|
+
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
720
|
+
const actionField = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
721
|
+
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
722
|
+
const { getDataBlocks } = (0, _filter_provider_FilterProvider__WEBPACK_IMPORTED_MODULE_15__.useFilterBlock)();
|
|
723
|
+
const { name } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollection_deprecated)();
|
|
724
|
+
const { getCollectionJoinField } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollectionManager_deprecated)();
|
|
725
|
+
actionField.data = actionField.data || {};
|
|
726
|
+
return {
|
|
727
|
+
async onClick () {
|
|
728
|
+
const { targets = [], uid } = findFilterTargets(fieldSchema);
|
|
729
|
+
actionField.data.loading = true;
|
|
730
|
+
let prevMergedFilter = {};
|
|
731
|
+
try {
|
|
732
|
+
await Promise.all(getDataBlocks().map(async (block)=>{
|
|
733
|
+
var _block_service_params, _block_service_params_, _block_service_params1, _Object_keys;
|
|
734
|
+
const target = targets.find((target)=>target.uid === block.uid);
|
|
735
|
+
if (!target) return;
|
|
736
|
+
const param = (null == (_block_service_params = block.service.params) ? void 0 : _block_service_params[0]) || {};
|
|
737
|
+
for(const key in form.values)if ('object' == typeof form.values[key] && ('{}' === JSON.stringify(form.values[key]) || '[]' === JSON.stringify(form.values[key])) || !form.values[key]) delete form.values[key];
|
|
738
|
+
const storedFilter = (null == (_block_service_params1 = block.service.params) ? void 0 : null == (_block_service_params_ = _block_service_params1[1]) ? void 0 : _block_service_params_.filters) || {};
|
|
739
|
+
const filter = {
|
|
740
|
+
formValues: {
|
|
741
|
+
...form.values
|
|
742
|
+
},
|
|
743
|
+
customValues: {},
|
|
744
|
+
customFilter: {}
|
|
745
|
+
};
|
|
746
|
+
if (null == (_Object_keys = Object.keys(filter.formValues)) ? void 0 : _Object_keys.includes('__custom')) {
|
|
747
|
+
const values = {
|
|
748
|
+
...form.values
|
|
749
|
+
};
|
|
750
|
+
delete values['__custom'];
|
|
751
|
+
filter.formValues = {
|
|
752
|
+
...values
|
|
753
|
+
};
|
|
754
|
+
for(const key in form.values['__custom'])if (form.values['__custom'][key]) filter.customValues[key] = form.values['__custom'][key];
|
|
755
|
+
filter.customFilter = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.getCustomCondition)(filter.customValues, fieldSchema);
|
|
756
|
+
}
|
|
757
|
+
storedFilter[uid] = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.removeNullCondition)((0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.transformToFilter)(filter.formValues, fieldSchema, getCollectionJoinField, name));
|
|
758
|
+
const mergedFilter = (0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.mergeFilter)([
|
|
759
|
+
...Object.values(storedFilter).map((filter)=>(0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.removeNullCondition)(filter)),
|
|
760
|
+
block.defaultFilter,
|
|
761
|
+
filter.customFilter,
|
|
762
|
+
prevMergedFilter
|
|
763
|
+
]);
|
|
764
|
+
const currFilter = filterByCleanedFields(mergedFilter);
|
|
765
|
+
prevMergedFilter = currFilter;
|
|
766
|
+
if ('manual' === block.dataLoadingMode && lodash__WEBPACK_IMPORTED_MODULE_5___default().isEmpty(currFilter)) return block.clearData();
|
|
767
|
+
return block.doFilter({
|
|
768
|
+
...param,
|
|
769
|
+
page: 1,
|
|
770
|
+
filter: currFilter
|
|
771
|
+
}, {
|
|
772
|
+
filters: storedFilter
|
|
773
|
+
});
|
|
774
|
+
}));
|
|
775
|
+
} catch (error) {
|
|
776
|
+
console.error(error);
|
|
777
|
+
}
|
|
778
|
+
actionField.data.loading = false;
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
};
|
|
782
|
+
const useResetBlockActionProps = ()=>{
|
|
783
|
+
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
784
|
+
const actionField = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
785
|
+
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
786
|
+
const { getDataBlocks } = (0, _filter_provider_FilterProvider__WEBPACK_IMPORTED_MODULE_15__.useFilterBlock)();
|
|
787
|
+
actionField.data = actionField.data || {};
|
|
788
|
+
return {
|
|
789
|
+
async onClick () {
|
|
790
|
+
const { targets, uid } = findFilterTargets(fieldSchema);
|
|
791
|
+
form.reset();
|
|
792
|
+
actionField.data.loading = true;
|
|
793
|
+
let prevMergedFilter = {};
|
|
794
|
+
try {
|
|
795
|
+
await Promise.all(getDataBlocks().map(async (block)=>{
|
|
796
|
+
var _block_service_params, _block_service_params_, _block_service_params1;
|
|
797
|
+
const target = targets.find((target)=>target.uid === block.uid);
|
|
798
|
+
if (!target) return;
|
|
799
|
+
if ('manual' === block.dataLoadingMode) return block.clearData();
|
|
800
|
+
const param = (null == (_block_service_params = block.service.params) ? void 0 : _block_service_params[0]) || {};
|
|
801
|
+
const storedFilter = (null == (_block_service_params1 = block.service.params) ? void 0 : null == (_block_service_params_ = _block_service_params1[1]) ? void 0 : _block_service_params_.filters) || {};
|
|
802
|
+
delete storedFilter[uid];
|
|
803
|
+
const currFilter = (0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.mergeFilter)([
|
|
804
|
+
...Object.values(storedFilter),
|
|
805
|
+
block.defaultFilter,
|
|
806
|
+
prevMergedFilter
|
|
807
|
+
]);
|
|
808
|
+
const mergedFilter = filterByCleanedFields(currFilter);
|
|
809
|
+
prevMergedFilter = mergedFilter;
|
|
810
|
+
return block.doFilter({
|
|
811
|
+
...param,
|
|
812
|
+
page: 1,
|
|
813
|
+
filter: mergedFilter
|
|
814
|
+
}, {
|
|
815
|
+
filters: storedFilter
|
|
816
|
+
});
|
|
817
|
+
}));
|
|
818
|
+
actionField.data.loading = false;
|
|
819
|
+
} catch (error) {
|
|
820
|
+
actionField.data.loading = false;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
};
|
|
825
|
+
const useCustomizeUpdateActionProps = ()=>{
|
|
826
|
+
const { resource, __parent, service } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
827
|
+
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
828
|
+
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
829
|
+
const navigate = (0, react_router_dom__WEBPACK_IMPORTED_MODULE_9__.useNavigate)();
|
|
830
|
+
const compile = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useCompile)();
|
|
831
|
+
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
832
|
+
const { modal, message } = antd__WEBPACK_IMPORTED_MODULE_3__.App.useApp();
|
|
833
|
+
const variables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useVariables)();
|
|
834
|
+
const localVariables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useLocalVariables)({
|
|
835
|
+
currentForm: form
|
|
836
|
+
});
|
|
837
|
+
const { name, getField } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollection_deprecated)();
|
|
838
|
+
return {
|
|
839
|
+
async onClick () {
|
|
1020
840
|
var _service_refresh;
|
|
1021
|
-
|
|
1022
|
-
|
|
841
|
+
var _actionSchema_xactionsettings;
|
|
842
|
+
const { assignedValues: originalAssignedValues = {}, onSuccess, skipValidator, triggerWorkflows } = null != (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) ? _actionSchema_xactionsettings : {};
|
|
843
|
+
const assignedValues = {};
|
|
844
|
+
const waitList = Object.keys(originalAssignedValues).map(async (key)=>{
|
|
845
|
+
const value = originalAssignedValues[key];
|
|
846
|
+
const collectionField = getField(key);
|
|
847
|
+
if ((0, _variables_utils_isVariable__WEBPACK_IMPORTED_MODULE_22__.isVariable)(value)) {
|
|
848
|
+
const result = await (null == variables ? void 0 : variables.parseVariable(value, localVariables));
|
|
849
|
+
if (result) assignedValues[key] = (0, _variables_utils_transformVariableValue__WEBPACK_IMPORTED_MODULE_23__.transformVariableValue)(result, {
|
|
850
|
+
targetCollectionField: collectionField
|
|
851
|
+
});
|
|
852
|
+
} else if (null != value && '' !== value) assignedValues[key] = value;
|
|
1023
853
|
});
|
|
1024
|
-
|
|
854
|
+
await Promise.all(waitList);
|
|
855
|
+
if (false === skipValidator) await form.submit();
|
|
856
|
+
await resource.update({
|
|
857
|
+
filterByTk,
|
|
858
|
+
values: {
|
|
859
|
+
...assignedValues
|
|
860
|
+
},
|
|
861
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
862
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows)
|
|
863
|
+
});
|
|
864
|
+
null == service || null == (_service_refresh = service.refresh) || _service_refresh.call(service);
|
|
1025
865
|
if (!(resource instanceof _TableFieldProvider__WEBPACK_IMPORTED_MODULE_26__.TableFieldResource)) {
|
|
1026
866
|
var __parent_service_refresh, __parent_service;
|
|
1027
|
-
null == __parent || null
|
|
867
|
+
null == __parent || null == (__parent_service = __parent.service) || null == (__parent_service_refresh = __parent_service.refresh) || __parent_service_refresh.call(__parent_service);
|
|
1028
868
|
}
|
|
1029
|
-
null == service || null === (_service_refresh = service.refresh) || void 0 === _service_refresh || _service_refresh.call(service);
|
|
1030
|
-
if ('customize:form:request' === xAction) null == setVisible || setVisible(false);
|
|
1031
869
|
if (!(null == onSuccess ? void 0 : onSuccess.successMessage)) return;
|
|
1032
870
|
if (null == onSuccess ? void 0 : onSuccess.manualClose) modal.success({
|
|
1033
871
|
title: compile(null == onSuccess ? void 0 : onSuccess.successMessage),
|
|
1034
872
|
onOk: async ()=>{
|
|
1035
|
-
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo))
|
|
1036
|
-
|
|
1037
|
-
else navigate(onSuccess.redirectTo);
|
|
1038
|
-
}
|
|
873
|
+
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
874
|
+
else navigate(onSuccess.redirectTo);
|
|
1039
875
|
}
|
|
1040
876
|
});
|
|
1041
|
-
else
|
|
1042
|
-
|
|
1043
|
-
|
|
877
|
+
else {
|
|
878
|
+
message.success(compile(null == onSuccess ? void 0 : onSuccess.successMessage));
|
|
879
|
+
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
880
|
+
else navigate(onSuccess.redirectTo);
|
|
881
|
+
}
|
|
1044
882
|
}
|
|
1045
|
-
}
|
|
883
|
+
};
|
|
1046
884
|
};
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
const
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
885
|
+
const useCustomizeRequestActionProps = ()=>{
|
|
886
|
+
var _currentUserContext_data;
|
|
887
|
+
const apiClient = (0, _api_client__WEBPACK_IMPORTED_MODULE_12__.useAPIClient)();
|
|
888
|
+
const navigate = (0, react_router_dom__WEBPACK_IMPORTED_MODULE_9__.useNavigate)();
|
|
889
|
+
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
890
|
+
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
891
|
+
const compile = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useCompile)();
|
|
892
|
+
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
893
|
+
const { fields, getField } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollection_deprecated)();
|
|
894
|
+
const { field, resource, __parent, service } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
895
|
+
const currentRecord = (0, _record_provider__WEBPACK_IMPORTED_MODULE_17__.useRecord)();
|
|
896
|
+
const currentUserContext = (0, _user__WEBPACK_IMPORTED_MODULE_20__.useCurrentUserContext)();
|
|
897
|
+
const currentUser = null == currentUserContext ? void 0 : null == (_currentUserContext_data = currentUserContext.data) ? void 0 : _currentUserContext_data.data;
|
|
898
|
+
const actionField = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
899
|
+
const { setVisible } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
900
|
+
const { modal, message } = antd__WEBPACK_IMPORTED_MODULE_3__.App.useApp();
|
|
901
|
+
const { getActiveFieldsName } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormActiveFields)() || {};
|
|
902
|
+
return {
|
|
903
|
+
async onClick () {
|
|
904
|
+
var _actionSchema_xactionsettings;
|
|
905
|
+
const { skipValidator, onSuccess, requestSettings } = null != (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) ? _actionSchema_xactionsettings : {};
|
|
906
|
+
const xAction = null == actionSchema ? void 0 : actionSchema['x-action'];
|
|
907
|
+
if (!requestSettings['url']) return;
|
|
908
|
+
if (true !== skipValidator && 'customize:form:request' === xAction) await form.submit();
|
|
909
|
+
const headers = requestSettings['headers'] ? JSON.parse(requestSettings['headers']) : {};
|
|
910
|
+
const params = requestSettings['params'] ? JSON.parse(requestSettings['params']) : {};
|
|
911
|
+
const data = requestSettings['data'] ? JSON.parse(requestSettings['data']) : {};
|
|
912
|
+
const methods = [
|
|
913
|
+
'POST',
|
|
914
|
+
'PUT',
|
|
915
|
+
'PATCH'
|
|
916
|
+
];
|
|
917
|
+
if ('customize:form:request' === xAction && methods.includes(requestSettings['method'])) {
|
|
918
|
+
const fieldNames = fields.map((field)=>field.name);
|
|
919
|
+
const values = getFormValues({
|
|
920
|
+
filterByTk,
|
|
921
|
+
field,
|
|
922
|
+
form,
|
|
923
|
+
fieldNames,
|
|
924
|
+
getField,
|
|
925
|
+
resource,
|
|
926
|
+
actionFields: (null == getActiveFieldsName ? void 0 : getActiveFieldsName('form')) || []
|
|
1078
927
|
});
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
};
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
928
|
+
Object.assign(data, values);
|
|
929
|
+
}
|
|
930
|
+
const requestBody = {
|
|
931
|
+
url: renderTemplate(requestSettings['url'], {
|
|
932
|
+
currentRecord,
|
|
933
|
+
currentUser
|
|
934
|
+
}),
|
|
935
|
+
method: requestSettings['method'],
|
|
936
|
+
headers: (0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.parse)(headers)({
|
|
937
|
+
currentRecord,
|
|
938
|
+
currentUser
|
|
939
|
+
}),
|
|
940
|
+
params: (0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.parse)(params)({
|
|
941
|
+
currentRecord,
|
|
942
|
+
currentUser
|
|
943
|
+
}),
|
|
944
|
+
data: (0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.parse)(data)({
|
|
945
|
+
currentRecord,
|
|
946
|
+
currentUser
|
|
947
|
+
})
|
|
948
|
+
};
|
|
949
|
+
actionField.data = field.data || {};
|
|
950
|
+
actionField.data.loading = true;
|
|
951
|
+
try {
|
|
952
|
+
var _service_refresh;
|
|
953
|
+
await apiClient.request({
|
|
954
|
+
...requestBody
|
|
955
|
+
});
|
|
956
|
+
actionField.data.loading = false;
|
|
957
|
+
if (!(resource instanceof _TableFieldProvider__WEBPACK_IMPORTED_MODULE_26__.TableFieldResource)) {
|
|
958
|
+
var __parent_service_refresh, __parent_service;
|
|
959
|
+
null == __parent || null == (__parent_service = __parent.service) || null == (__parent_service_refresh = __parent_service.refresh) || __parent_service_refresh.call(__parent_service);
|
|
960
|
+
}
|
|
961
|
+
null == service || null == (_service_refresh = service.refresh) || _service_refresh.call(service);
|
|
962
|
+
if ('customize:form:request' === xAction) null == setVisible || setVisible(false);
|
|
963
|
+
if (!(null == onSuccess ? void 0 : onSuccess.successMessage)) return;
|
|
964
|
+
if (null == onSuccess ? void 0 : onSuccess.manualClose) modal.success({
|
|
965
|
+
title: compile(null == onSuccess ? void 0 : onSuccess.successMessage),
|
|
966
|
+
onOk: async ()=>{
|
|
967
|
+
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
968
|
+
else navigate(onSuccess.redirectTo);
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
else message.success(compile(null == onSuccess ? void 0 : onSuccess.successMessage));
|
|
972
|
+
} finally{
|
|
973
|
+
actionField.data.loading = false;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
const useUpdateActionProps = ()=>{
|
|
979
|
+
const form = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useForm)();
|
|
980
|
+
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
981
|
+
const { field, resource, __parent } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
982
|
+
const { setVisible } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
983
|
+
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
984
|
+
const navigate = (0, react_router_dom__WEBPACK_IMPORTED_MODULE_9__.useNavigate)();
|
|
985
|
+
const { fields, getField, name } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollection_deprecated)();
|
|
986
|
+
const compile = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useCompile)();
|
|
987
|
+
const actionField = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
988
|
+
const { updateAssociationValues } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormBlockContext)();
|
|
989
|
+
const { modal, message } = antd__WEBPACK_IMPORTED_MODULE_3__.App.useApp();
|
|
990
|
+
const data = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useParamsFromRecord)();
|
|
991
|
+
const variables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useVariables)();
|
|
992
|
+
const localVariables = (0, _variables__WEBPACK_IMPORTED_MODULE_21__.useLocalVariables)({
|
|
993
|
+
currentForm: form
|
|
994
|
+
});
|
|
995
|
+
const { getActiveFieldsName } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormActiveFields)() || {};
|
|
996
|
+
return {
|
|
997
|
+
async onClick () {
|
|
998
|
+
var _actionSchema_xactionsettings;
|
|
999
|
+
const { assignedValues: originalAssignedValues = {}, onSuccess, overwriteValues, skipValidator, triggerWorkflows, isDeltaChanged } = null != (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) ? _actionSchema_xactionsettings : {};
|
|
1000
|
+
const assignedValues = {};
|
|
1001
|
+
const waitList = Object.keys(originalAssignedValues).map(async (key)=>{
|
|
1002
|
+
const value = originalAssignedValues[key];
|
|
1003
|
+
const collectionField = getField(key);
|
|
1004
|
+
if ((0, _variables_utils_isVariable__WEBPACK_IMPORTED_MODULE_22__.isVariable)(value)) {
|
|
1005
|
+
const result = await (null == variables ? void 0 : variables.parseVariable(value, localVariables));
|
|
1006
|
+
if (result) assignedValues[key] = (0, _variables_utils_transformVariableValue__WEBPACK_IMPORTED_MODULE_23__.transformVariableValue)(result, {
|
|
1007
|
+
targetCollectionField: collectionField
|
|
1008
|
+
});
|
|
1009
|
+
} else if (null != value && '' !== value) assignedValues[key] = value;
|
|
1010
|
+
});
|
|
1011
|
+
await Promise.all(waitList);
|
|
1012
|
+
if (!skipValidator) await form.submit();
|
|
1013
|
+
const fieldNames = fields.map((field)=>field.name);
|
|
1014
|
+
const actionFields = (null == getActiveFieldsName ? void 0 : getActiveFieldsName('form')) || [];
|
|
1015
|
+
const values = getFormValues({
|
|
1112
1016
|
filterByTk,
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1017
|
+
field,
|
|
1018
|
+
form,
|
|
1019
|
+
fieldNames,
|
|
1020
|
+
getField,
|
|
1021
|
+
resource,
|
|
1022
|
+
actionFields
|
|
1118
1023
|
});
|
|
1119
|
-
actionField.data
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1024
|
+
actionField.data = field.data || {};
|
|
1025
|
+
actionField.data.loading = true;
|
|
1026
|
+
const rawValues = {
|
|
1027
|
+
...values,
|
|
1028
|
+
...overwriteValues,
|
|
1029
|
+
...assignedValues
|
|
1030
|
+
};
|
|
1031
|
+
const filterValues = (srcValues)=>Object.entries(srcValues).reduce((obj, keyValuePair)=>{
|
|
1032
|
+
const [key, value] = keyValuePair;
|
|
1033
|
+
if (actionFields.includes(key)) obj = {
|
|
1034
|
+
...obj,
|
|
1035
|
+
[key]: value
|
|
1036
|
+
};
|
|
1037
|
+
return obj;
|
|
1038
|
+
}, {});
|
|
1039
|
+
try {
|
|
1040
|
+
var __parent_service_refresh, __parent_service;
|
|
1041
|
+
await resource.update({
|
|
1042
|
+
filterByTk,
|
|
1043
|
+
values: isDeltaChanged ? filterValues(rawValues) : rawValues,
|
|
1044
|
+
...data,
|
|
1045
|
+
updateAssociationValues,
|
|
1046
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
1047
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows)
|
|
1048
|
+
});
|
|
1049
|
+
actionField.data.loading = false;
|
|
1050
|
+
null == __parent || null == (__parent_service = __parent.service) || null == (__parent_service_refresh = __parent_service.refresh) || __parent_service_refresh.call(__parent_service);
|
|
1051
|
+
null == setVisible || setVisible(false);
|
|
1052
|
+
if (!(null == onSuccess ? void 0 : onSuccess.successMessage)) return;
|
|
1053
|
+
if (null == onSuccess ? void 0 : onSuccess.manualClose) modal.success({
|
|
1054
|
+
title: compile(null == onSuccess ? void 0 : onSuccess.successMessage),
|
|
1055
|
+
onOk: async ()=>{
|
|
1056
|
+
await form.reset();
|
|
1057
|
+
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
1129
1058
|
else navigate(onSuccess.redirectTo);
|
|
1130
1059
|
}
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) {
|
|
1136
|
-
if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
1060
|
+
});
|
|
1061
|
+
else {
|
|
1062
|
+
message.success(compile(null == onSuccess ? void 0 : onSuccess.successMessage));
|
|
1063
|
+
if ((null == onSuccess ? void 0 : onSuccess.redirecting) && (null == onSuccess ? void 0 : onSuccess.redirectTo)) if ((0, _tachybase_utils_client__WEBPACK_IMPORTED_MODULE_2__.isURL)(onSuccess.redirectTo)) window.location.href = onSuccess.redirectTo;
|
|
1137
1064
|
else navigate(onSuccess.redirectTo);
|
|
1138
1065
|
}
|
|
1066
|
+
} catch (error) {
|
|
1067
|
+
actionField.data.loading = false;
|
|
1139
1068
|
}
|
|
1140
|
-
} catch (error) {
|
|
1141
|
-
actionField.data.loading = false;
|
|
1142
1069
|
}
|
|
1143
|
-
}
|
|
1070
|
+
};
|
|
1144
1071
|
};
|
|
1145
|
-
|
|
1146
|
-
const
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
...data
|
|
1162
|
-
});
|
|
1163
|
-
const { count = 0, page = 0, pageSize = 0 } = (null == service ? void 0 : null === (_service_data = service.data) || void 0 === _service_data ? void 0 : _service_data.meta) || {};
|
|
1164
|
-
if (count % pageSize === 1 && 1 !== page) {
|
|
1165
|
-
var _service_params;
|
|
1166
|
-
service.run({
|
|
1167
|
-
...null == service ? void 0 : null === (_service_params = service.params) || void 0 === _service_params ? void 0 : _service_params[0],
|
|
1168
|
-
page: page - 1
|
|
1072
|
+
const useDestroyActionProps = ()=>{
|
|
1073
|
+
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
1074
|
+
const { resource, service, block, __parent } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
1075
|
+
const { setVisible } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
1076
|
+
const data = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useParamsFromRecord)();
|
|
1077
|
+
const actionSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
1078
|
+
return {
|
|
1079
|
+
async onClick () {
|
|
1080
|
+
var _service_data;
|
|
1081
|
+
var _actionSchema_xactionsettings;
|
|
1082
|
+
const { triggerWorkflows } = null != (_actionSchema_xactionsettings = null == actionSchema ? void 0 : actionSchema['x-action-settings']) ? _actionSchema_xactionsettings : {};
|
|
1083
|
+
await resource.destroy({
|
|
1084
|
+
filterByTk,
|
|
1085
|
+
triggerWorkflows: getAfterWorkflows(triggerWorkflows),
|
|
1086
|
+
beforeWorkflows: getBeforeWorkflows(triggerWorkflows),
|
|
1087
|
+
...data
|
|
1169
1088
|
});
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1089
|
+
const { count = 0, page = 0, pageSize = 0 } = (null == service ? void 0 : null == (_service_data = service.data) ? void 0 : _service_data.meta) || {};
|
|
1090
|
+
if (count % pageSize === 1 && 1 !== page) {
|
|
1091
|
+
var _service_params;
|
|
1092
|
+
service.run({
|
|
1093
|
+
...null == service ? void 0 : null == (_service_params = service.params) ? void 0 : _service_params[0],
|
|
1094
|
+
page: page - 1
|
|
1095
|
+
});
|
|
1096
|
+
} else {
|
|
1097
|
+
var _service_refresh;
|
|
1098
|
+
null == service || null == (_service_refresh = service.refresh) || _service_refresh.call(service);
|
|
1099
|
+
}
|
|
1100
|
+
if (block && 'TableField' !== block) {
|
|
1101
|
+
var __parent_service_refresh, __parent_service;
|
|
1102
|
+
null == __parent || null == (__parent_service = __parent.service) || null == (__parent_service_refresh = __parent_service.refresh) || __parent_service_refresh.call(__parent_service);
|
|
1103
|
+
null == setVisible || setVisible(false);
|
|
1104
|
+
}
|
|
1178
1105
|
}
|
|
1179
|
-
}
|
|
1180
|
-
};
|
|
1181
|
-
};
|
|
1182
|
-
const useRemoveActionProps = (associationName)=>{
|
|
1183
|
-
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
1184
|
-
const api = (0, _api_client__WEBPACK_IMPORTED_MODULE_12__.useAPIClient)();
|
|
1185
|
-
const resource = api.resource(associationName, filterByTk);
|
|
1186
|
-
return {
|
|
1187
|
-
async onClick (value) {
|
|
1188
|
-
await resource.remove({
|
|
1189
|
-
values: [
|
|
1190
|
-
value.id
|
|
1191
|
-
]
|
|
1192
|
-
});
|
|
1193
|
-
}
|
|
1106
|
+
};
|
|
1194
1107
|
};
|
|
1195
|
-
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
filterByTk
|
|
1206
|
-
]
|
|
1207
|
-
});
|
|
1208
|
-
const { count = 0, page = 0, pageSize = 0 } = (null == service ? void 0 : null === (_service_data = service.data) || void 0 === _service_data ? void 0 : _service_data.meta) || {};
|
|
1209
|
-
if (count % pageSize === 1 && 1 !== page) {
|
|
1210
|
-
var _service_params;
|
|
1211
|
-
service.run({
|
|
1212
|
-
...null == service ? void 0 : null === (_service_params = service.params) || void 0 === _service_params ? void 0 : _service_params[0],
|
|
1213
|
-
page: page - 1
|
|
1108
|
+
const useRemoveActionProps = (associationName)=>{
|
|
1109
|
+
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
1110
|
+
const api = (0, _api_client__WEBPACK_IMPORTED_MODULE_12__.useAPIClient)();
|
|
1111
|
+
const resource = api.resource(associationName, filterByTk);
|
|
1112
|
+
return {
|
|
1113
|
+
async onClick (value) {
|
|
1114
|
+
await resource.remove({
|
|
1115
|
+
values: [
|
|
1116
|
+
value.id
|
|
1117
|
+
]
|
|
1214
1118
|
});
|
|
1215
|
-
} else {
|
|
1216
|
-
var _service_refresh;
|
|
1217
|
-
null == service || null === (_service_refresh = service.refresh) || void 0 === _service_refresh || _service_refresh.call(service);
|
|
1218
|
-
}
|
|
1219
|
-
if (block && 'TableField' !== block) {
|
|
1220
|
-
var __parent_service_refresh, __parent_service;
|
|
1221
|
-
null == __parent || null === (__parent_service = __parent.service) || void 0 === __parent_service || null === (__parent_service_refresh = __parent_service.refresh) || void 0 === __parent_service_refresh || __parent_service_refresh.call(__parent_service);
|
|
1222
|
-
null == setVisible || setVisible(false);
|
|
1223
1119
|
}
|
|
1224
|
-
}
|
|
1225
|
-
};
|
|
1226
|
-
};
|
|
1227
|
-
const useDetailPrintActionProps = ()=>{
|
|
1228
|
-
const { formBlockRef } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormBlockContext)();
|
|
1229
|
-
const printHandler = (0, react_to_print__WEBPACK_IMPORTED_MODULE_10__.useReactToPrint)({
|
|
1230
|
-
content: ()=>formBlockRef.current,
|
|
1231
|
-
pageStyle: "@media print {\n * {\n margin: 0;\n }\n :not(.ant-formily-item-control-content-component) > div.ant-formily-layout>div:first-child {\n overflow: hidden; height: 0;\n }\n }"
|
|
1232
|
-
});
|
|
1233
|
-
return {
|
|
1234
|
-
async onClick () {
|
|
1235
|
-
printHandler();
|
|
1236
|
-
}
|
|
1237
|
-
};
|
|
1238
|
-
};
|
|
1239
|
-
const useBulkDestroyActionProps = ()=>{
|
|
1240
|
-
const { field } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
1241
|
-
const { resource, service } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
1242
|
-
return {
|
|
1243
|
-
async onClick () {
|
|
1244
|
-
var _field_data_selectedRowKeys, _field_data, _field_data1, _service_params_, _service_data_meta, _service_data, _service_refresh;
|
|
1245
|
-
if (!(null == field ? void 0 : null === (_field_data = field.data) || void 0 === _field_data ? void 0 : null === (_field_data_selectedRowKeys = _field_data.selectedRowKeys) || void 0 === _field_data_selectedRowKeys ? void 0 : _field_data_selectedRowKeys.length)) return;
|
|
1246
|
-
await resource.destroy({
|
|
1247
|
-
filterByTk: null === (_field_data1 = field.data) || void 0 === _field_data1 ? void 0 : _field_data1.selectedRowKeys
|
|
1248
|
-
});
|
|
1249
|
-
field.data.selectedRowKeys = [];
|
|
1250
|
-
const currentPage = null === (_service_params_ = service.params[0]) || void 0 === _service_params_ ? void 0 : _service_params_.page;
|
|
1251
|
-
const totalPage = null === (_service_data = service.data) || void 0 === _service_data ? void 0 : null === (_service_data_meta = _service_data.meta) || void 0 === _service_data_meta ? void 0 : _service_data_meta.totalPage;
|
|
1252
|
-
if (currentPage === totalPage) service.params[0].page = currentPage - 1;
|
|
1253
|
-
null == service || null === (_service_refresh = service.refresh) || void 0 === _service_refresh || _service_refresh.call(service);
|
|
1254
|
-
}
|
|
1120
|
+
};
|
|
1255
1121
|
};
|
|
1256
|
-
|
|
1257
|
-
const
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1122
|
+
const useDisassociateActionProps = ()=>{
|
|
1123
|
+
const filterByTk = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useFilterByTk)();
|
|
1124
|
+
const { resource, service, block, __parent } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
1125
|
+
const { setVisible } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_18__.useActionContext)();
|
|
1126
|
+
return {
|
|
1127
|
+
async onClick () {
|
|
1128
|
+
var _service_data;
|
|
1129
|
+
await resource.remove({
|
|
1130
|
+
values: [
|
|
1131
|
+
filterByTk
|
|
1132
|
+
]
|
|
1133
|
+
});
|
|
1134
|
+
const { count = 0, page = 0, pageSize = 0 } = (null == service ? void 0 : null == (_service_data = service.data) ? void 0 : _service_data.meta) || {};
|
|
1135
|
+
if (count % pageSize === 1 && 1 !== page) {
|
|
1136
|
+
var _service_params;
|
|
1137
|
+
service.run({
|
|
1138
|
+
...null == service ? void 0 : null == (_service_params = service.params) ? void 0 : _service_params[0],
|
|
1139
|
+
page: page - 1
|
|
1140
|
+
});
|
|
1141
|
+
} else {
|
|
1142
|
+
var _service_refresh;
|
|
1143
|
+
null == service || null == (_service_refresh = service.refresh) || _service_refresh.call(service);
|
|
1144
|
+
}
|
|
1145
|
+
if (block && 'TableField' !== block) {
|
|
1146
|
+
var __parent_service_refresh, __parent_service;
|
|
1147
|
+
null == __parent || null == (__parent_service = __parent.service) || null == (__parent_service_refresh = __parent_service.refresh) || __parent_service_refresh.call(__parent_service);
|
|
1148
|
+
null == setVisible || setVisible(false);
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
};
|
|
1264
1152
|
};
|
|
1265
|
-
|
|
1266
|
-
const
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
showSizeChanger: false,
|
|
1277
|
-
async onChange (page) {
|
|
1278
|
-
var _ctx_service_params, _ctx_service;
|
|
1279
|
-
const params = null === (_ctx_service = ctx.service) || void 0 === _ctx_service ? void 0 : null === (_ctx_service_params = _ctx_service.params) || void 0 === _ctx_service_params ? void 0 : _ctx_service_params[0];
|
|
1280
|
-
ctx.service.run({
|
|
1281
|
-
...params,
|
|
1282
|
-
page
|
|
1283
|
-
});
|
|
1284
|
-
},
|
|
1285
|
-
style: {
|
|
1286
|
-
marginTop: 24,
|
|
1287
|
-
textAlign: 'center'
|
|
1288
|
-
}
|
|
1153
|
+
const useDetailPrintActionProps = ()=>{
|
|
1154
|
+
const { formBlockRef } = (0, ___WEBPACK_IMPORTED_MODULE_11__.useFormBlockContext)();
|
|
1155
|
+
const printHandler = (0, react_to_print__WEBPACK_IMPORTED_MODULE_10__.useReactToPrint)({
|
|
1156
|
+
content: ()=>formBlockRef.current,
|
|
1157
|
+
pageStyle: "@media print {\n * {\n margin: 0;\n }\n :not(.ant-formily-item-control-content-component) > div.ant-formily-layout>div:first-child {\n overflow: hidden; height: 0;\n }\n }"
|
|
1158
|
+
});
|
|
1159
|
+
return {
|
|
1160
|
+
async onClick () {
|
|
1161
|
+
printHandler();
|
|
1162
|
+
}
|
|
1163
|
+
};
|
|
1289
1164
|
};
|
|
1290
|
-
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
params: {
|
|
1307
|
-
fields: [
|
|
1308
|
-
labelKey,
|
|
1309
|
-
valueKey
|
|
1310
|
-
],
|
|
1311
|
-
pageSize: 200,
|
|
1312
|
-
page: 1,
|
|
1313
|
-
...null === (_field_componentProps = field.componentProps) || void 0 === _field_componentProps ? void 0 : _field_componentProps.params
|
|
1314
|
-
}
|
|
1315
|
-
}, {
|
|
1316
|
-
refreshDeps: [
|
|
1317
|
-
labelKey,
|
|
1318
|
-
valueKey,
|
|
1319
|
-
JSON.stringify((null === (_field_componentProps1 = field.componentProps) || void 0 === _field_componentProps1 ? void 0 : _field_componentProps1.params) || {})
|
|
1320
|
-
],
|
|
1321
|
-
debounceWait: 300
|
|
1322
|
-
});
|
|
1323
|
-
const list = (null == data ? void 0 : data.data) || [];
|
|
1324
|
-
const onSelected = (value)=>{
|
|
1325
|
-
var _service_params_, _service_params, _service_params1, _blockProps_params;
|
|
1326
|
-
const filters = (null === (_service_params = service.params) || void 0 === _service_params ? void 0 : null === (_service_params_ = _service_params[1]) || void 0 === _service_params_ ? void 0 : _service_params_.filters) || {};
|
|
1327
|
-
if (value.length) filters["af.".concat(collectionFieldName)] = {
|
|
1328
|
-
["".concat(collectionFieldName, ".").concat(valueKey, ".$in")]: value
|
|
1165
|
+
const useBulkDestroyActionProps = ()=>{
|
|
1166
|
+
const { field } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
1167
|
+
const { resource, service } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
1168
|
+
return {
|
|
1169
|
+
async onClick () {
|
|
1170
|
+
var _field_data_selectedRowKeys, _field_data, _field_data1, _service_params_, _service_data_meta, _service_data, _service_refresh;
|
|
1171
|
+
if (!(null == field ? void 0 : null == (_field_data = field.data) ? void 0 : null == (_field_data_selectedRowKeys = _field_data.selectedRowKeys) ? void 0 : _field_data_selectedRowKeys.length)) return;
|
|
1172
|
+
await resource.destroy({
|
|
1173
|
+
filterByTk: null == (_field_data1 = field.data) ? void 0 : _field_data1.selectedRowKeys
|
|
1174
|
+
});
|
|
1175
|
+
field.data.selectedRowKeys = [];
|
|
1176
|
+
const currentPage = null == (_service_params_ = service.params[0]) ? void 0 : _service_params_.page;
|
|
1177
|
+
const totalPage = null == (_service_data = service.data) ? void 0 : null == (_service_data_meta = _service_data.meta) ? void 0 : _service_data_meta.totalPage;
|
|
1178
|
+
if (currentPage === totalPage) service.params[0].page = currentPage - 1;
|
|
1179
|
+
null == service || null == (_service_refresh = service.refresh) || _service_refresh.call(service);
|
|
1180
|
+
}
|
|
1329
1181
|
};
|
|
1330
|
-
else delete filters["af.".concat(collectionFieldName)];
|
|
1331
|
-
service.run({
|
|
1332
|
-
...null === (_service_params1 = service.params) || void 0 === _service_params1 ? void 0 : _service_params1[0],
|
|
1333
|
-
pageSize: 200,
|
|
1334
|
-
page: 1,
|
|
1335
|
-
filter: (0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.mergeFilter)([
|
|
1336
|
-
...Object.values(filters),
|
|
1337
|
-
null == blockProps ? void 0 : null === (_blockProps_params = blockProps.params) || void 0 === _blockProps_params ? void 0 : _blockProps_params.filter
|
|
1338
|
-
])
|
|
1339
|
-
}, {
|
|
1340
|
-
filters
|
|
1341
|
-
});
|
|
1342
1182
|
};
|
|
1343
|
-
const
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1183
|
+
const useRefreshActionProps = ()=>{
|
|
1184
|
+
const { service } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
1185
|
+
return {
|
|
1186
|
+
async onClick () {
|
|
1187
|
+
var _service_refresh;
|
|
1188
|
+
null == service || null == (_service_refresh = service.refresh) || _service_refresh.call(service);
|
|
1348
1189
|
}
|
|
1349
|
-
}
|
|
1190
|
+
};
|
|
1350
1191
|
};
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1192
|
+
const useDetailsPaginationProps = ()=>{
|
|
1193
|
+
var _ctx_service_data_meta, _ctx_service_data, _ctx_service, _ctx_service_data_meta1, _ctx_service_data1, _ctx_service1;
|
|
1194
|
+
const ctx = (0, _DetailsBlockProvider__WEBPACK_IMPORTED_MODULE_25__.useDetailsBlockContext)();
|
|
1195
|
+
const count = (null == (_ctx_service = ctx.service) ? void 0 : null == (_ctx_service_data = _ctx_service.data) ? void 0 : null == (_ctx_service_data_meta = _ctx_service_data.meta) ? void 0 : _ctx_service_data_meta.count) || 0;
|
|
1196
|
+
return {
|
|
1197
|
+
simple: true,
|
|
1198
|
+
hidden: count <= 1,
|
|
1199
|
+
current: (null == (_ctx_service1 = ctx.service) ? void 0 : null == (_ctx_service_data1 = _ctx_service1.data) ? void 0 : null == (_ctx_service_data_meta1 = _ctx_service_data1.meta) ? void 0 : _ctx_service_data_meta1.page) || 1,
|
|
1200
|
+
total: count,
|
|
1201
|
+
pageSize: 1,
|
|
1202
|
+
showSizeChanger: false,
|
|
1203
|
+
async onChange (page) {
|
|
1204
|
+
var _ctx_service_params, _ctx_service;
|
|
1205
|
+
const params = null == (_ctx_service = ctx.service) ? void 0 : null == (_ctx_service_params = _ctx_service.params) ? void 0 : _ctx_service_params[0];
|
|
1206
|
+
ctx.service.run({
|
|
1207
|
+
...params,
|
|
1208
|
+
page
|
|
1209
|
+
});
|
|
1210
|
+
},
|
|
1211
|
+
style: {
|
|
1212
|
+
marginTop: 24,
|
|
1213
|
+
textAlign: 'center'
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1357
1216
|
};
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
const
|
|
1364
|
-
|
|
1365
|
-
'
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
let list, handleSearchInput, params, run, data, valueKey, labelKey, filterKey;
|
|
1385
|
-
valueKey = (null == collectionField ? void 0 : collectionField.target) ? null === (_cm_getCollection = cm.getCollection(collectionField.target)) || void 0 === _cm_getCollection ? void 0 : _cm_getCollection.getPrimaryKey() : 'id';
|
|
1386
|
-
labelKey = (null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : null === (_fieldSchema_xcomponentprops_fieldNames = _fieldSchema_xcomponentprops.fieldNames) || void 0 === _fieldSchema_xcomponentprops_fieldNames ? void 0 : _fieldSchema_xcomponentprops_fieldNames.label) || valueKey;
|
|
1387
|
-
({ data, params, run } = (0, _api_client__WEBPACK_IMPORTED_MODULE_12__.useRequest)({
|
|
1388
|
-
headers,
|
|
1389
|
-
resource: null == collectionField ? void 0 : collectionField.target,
|
|
1390
|
-
action: 'list',
|
|
1391
|
-
params: {
|
|
1392
|
-
fields: [
|
|
1217
|
+
const useAssociationFilterProps = ()=>{
|
|
1218
|
+
var _cm_getCollection, _fieldSchema_xcomponentprops_fieldNames, _fieldSchema_xcomponentprops, _field_componentProps, _field_componentProps1;
|
|
1219
|
+
const collectionField = ___WEBPACK_IMPORTED_MODULE_11__.AssociationFilter.useAssociationField();
|
|
1220
|
+
const { service, props: blockProps } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
1221
|
+
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
1222
|
+
const cm = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollectionManager_deprecated)();
|
|
1223
|
+
const valueKey = (null == collectionField ? void 0 : collectionField.target) ? null == (_cm_getCollection = cm.getCollection(collectionField.target)) ? void 0 : _cm_getCollection.getPrimaryKey() : 'id';
|
|
1224
|
+
const labelKey = (null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : null == (_fieldSchema_xcomponentprops_fieldNames = _fieldSchema_xcomponentprops.fieldNames) ? void 0 : _fieldSchema_xcomponentprops_fieldNames.label) || valueKey;
|
|
1225
|
+
const field = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
1226
|
+
const collectionFieldName = collectionField.name;
|
|
1227
|
+
const headers = (0, ___WEBPACK_IMPORTED_MODULE_11__.useDataSourceHeaders)(null == blockProps ? void 0 : blockProps.dataSource);
|
|
1228
|
+
const { data, params, run } = (0, _api_client__WEBPACK_IMPORTED_MODULE_12__.useRequest)({
|
|
1229
|
+
headers,
|
|
1230
|
+
resource: collectionField.target,
|
|
1231
|
+
action: 'list',
|
|
1232
|
+
params: {
|
|
1233
|
+
fields: [
|
|
1234
|
+
labelKey,
|
|
1235
|
+
valueKey
|
|
1236
|
+
],
|
|
1237
|
+
pageSize: 200,
|
|
1238
|
+
page: 1,
|
|
1239
|
+
...null == (_field_componentProps = field.componentProps) ? void 0 : _field_componentProps.params
|
|
1240
|
+
}
|
|
1241
|
+
}, {
|
|
1242
|
+
refreshDeps: [
|
|
1393
1243
|
labelKey,
|
|
1394
|
-
valueKey
|
|
1244
|
+
valueKey,
|
|
1245
|
+
JSON.stringify((null == (_field_componentProps1 = field.componentProps) ? void 0 : _field_componentProps1.params) || {})
|
|
1395
1246
|
],
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
select: '$in',
|
|
1418
|
-
multipleSelect: '$anyOf',
|
|
1419
|
-
checkbox: '$in',
|
|
1420
|
-
checkboxGroup: '$anyOf'
|
|
1421
|
-
};
|
|
1422
|
-
const _list = (null == field ? void 0 : null === (_field_uiSchema = field.uiSchema) || void 0 === _field_uiSchema ? void 0 : _field_uiSchema.enum) || [];
|
|
1423
|
-
valueKey = 'value';
|
|
1424
|
-
labelKey = 'label';
|
|
1425
|
-
list = _list;
|
|
1426
|
-
params = {};
|
|
1427
|
-
run = ()=>{};
|
|
1428
|
-
filterKey = "".concat(field.name, ".").concat(operatorMap[field.interface]);
|
|
1429
|
-
handleSearchInput = (e)=>{
|
|
1430
|
-
const value = e.target.value;
|
|
1431
|
-
if (!value) {
|
|
1432
|
-
list = _list;
|
|
1433
|
-
return;
|
|
1434
|
-
}
|
|
1435
|
-
list = _list.filter((item)=>item.label.includes(value));
|
|
1247
|
+
debounceWait: 300
|
|
1248
|
+
});
|
|
1249
|
+
const list = (null == data ? void 0 : data.data) || [];
|
|
1250
|
+
const onSelected = (value)=>{
|
|
1251
|
+
var _service_params_, _service_params, _service_params1, _blockProps_params;
|
|
1252
|
+
const filters = (null == (_service_params = service.params) ? void 0 : null == (_service_params_ = _service_params[1]) ? void 0 : _service_params_.filters) || {};
|
|
1253
|
+
if (value.length) filters["af.".concat(collectionFieldName)] = {
|
|
1254
|
+
["".concat(collectionFieldName, ".").concat(valueKey, ".$in")]: value
|
|
1255
|
+
};
|
|
1256
|
+
else delete filters["af.".concat(collectionFieldName)];
|
|
1257
|
+
service.run({
|
|
1258
|
+
...null == (_service_params1 = service.params) ? void 0 : _service_params1[0],
|
|
1259
|
+
pageSize: 200,
|
|
1260
|
+
page: 1,
|
|
1261
|
+
filter: (0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.mergeFilter)([
|
|
1262
|
+
...Object.values(filters),
|
|
1263
|
+
null == blockProps ? void 0 : null == (_blockProps_params = blockProps.params) ? void 0 : _blockProps_params.filter
|
|
1264
|
+
])
|
|
1265
|
+
}, {
|
|
1266
|
+
filters
|
|
1267
|
+
});
|
|
1436
1268
|
};
|
|
1437
|
-
|
|
1438
|
-
filterKey = "".concat(collectionFieldName, ".").concat(valueKey, ".$in");
|
|
1439
|
-
list = (null == data ? void 0 : data.data) || [];
|
|
1440
|
-
handleSearchInput = (e)=>{
|
|
1269
|
+
const handleSearchInput = (e)=>{
|
|
1441
1270
|
run({
|
|
1442
1271
|
...null == params ? void 0 : params[0],
|
|
1443
1272
|
filter: {
|
|
@@ -1445,190 +1274,344 @@ const useAssociationFilterBlockProps = ()=>{
|
|
|
1445
1274
|
}
|
|
1446
1275
|
});
|
|
1447
1276
|
};
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
const key = "".concat(uid).concat(fieldSchema.name);
|
|
1456
|
-
const param = (null === (_block_service_params = block.service.params) || void 0 === _block_service_params ? void 0 : _block_service_params[0]) || {};
|
|
1457
|
-
const storedFilter = (null === (_block_service_params1 = block.service.params) || void 0 === _block_service_params1 ? void 0 : null === (_block_service_params_ = _block_service_params1[1]) || void 0 === _block_service_params_ ? void 0 : _block_service_params_.filters) || {};
|
|
1458
|
-
if (value.length) storedFilter[key] = {
|
|
1459
|
-
[filterKey]: value
|
|
1460
|
-
};
|
|
1461
|
-
else {
|
|
1462
|
-
if ('manual' === block.dataLoadingMode) return block.clearData();
|
|
1463
|
-
delete storedFilter[key];
|
|
1464
|
-
}
|
|
1465
|
-
const mergedFilter = (0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.mergeFilter)([
|
|
1466
|
-
...Object.values(storedFilter),
|
|
1467
|
-
block.defaultFilter
|
|
1468
|
-
]);
|
|
1469
|
-
return block.doFilter({
|
|
1470
|
-
...param,
|
|
1471
|
-
page: 1,
|
|
1472
|
-
filter: mergedFilter
|
|
1473
|
-
}, {
|
|
1474
|
-
filters: storedFilter
|
|
1475
|
-
});
|
|
1476
|
-
});
|
|
1277
|
+
return {
|
|
1278
|
+
list,
|
|
1279
|
+
onSelected,
|
|
1280
|
+
handleSearchInput,
|
|
1281
|
+
params,
|
|
1282
|
+
run
|
|
1283
|
+
};
|
|
1477
1284
|
};
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
handleSearchInput,
|
|
1482
|
-
params,
|
|
1483
|
-
run,
|
|
1484
|
-
valueKey,
|
|
1485
|
-
labelKey
|
|
1285
|
+
const useOptionalFieldList = ()=>{
|
|
1286
|
+
const { currentFields = [] } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollection_deprecated)();
|
|
1287
|
+
return currentFields.filter((field)=>isOptionalField(field) && field.uiSchema.enum);
|
|
1486
1288
|
};
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1289
|
+
const isOptionalField = (field)=>{
|
|
1290
|
+
const optionalInterfaces = [
|
|
1291
|
+
'select',
|
|
1292
|
+
'multipleSelect',
|
|
1293
|
+
'checkbox',
|
|
1294
|
+
'checkboxGroup',
|
|
1295
|
+
'chinaRegion'
|
|
1296
|
+
];
|
|
1297
|
+
return optionalInterfaces.includes(field.interface);
|
|
1298
|
+
};
|
|
1299
|
+
const useAssociationFilterBlockProps = ()=>{
|
|
1300
|
+
var _cm_getCollection, _fieldSchema_xcomponentprops_fieldNames, _fieldSchema_xcomponentprops, _field_componentProps, _field_componentProps1;
|
|
1301
|
+
const collectionField = ___WEBPACK_IMPORTED_MODULE_11__.AssociationFilter.useAssociationField();
|
|
1302
|
+
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
1303
|
+
const optionalFieldList = useOptionalFieldList();
|
|
1304
|
+
const { getDataBlocks } = (0, _filter_provider_FilterProvider__WEBPACK_IMPORTED_MODULE_15__.useFilterBlock)();
|
|
1305
|
+
const collectionFieldName = null == collectionField ? void 0 : collectionField.name;
|
|
1306
|
+
const field = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useField)();
|
|
1307
|
+
const { props: blockProps } = (0, _BlockProvider__WEBPACK_IMPORTED_MODULE_24__.useBlockRequestContext)();
|
|
1308
|
+
const headers = (0, ___WEBPACK_IMPORTED_MODULE_11__.useDataSourceHeaders)(null == blockProps ? void 0 : blockProps.dataSource);
|
|
1309
|
+
const cm = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollectionManager_deprecated)();
|
|
1310
|
+
let list, handleSearchInput, params, run, data, valueKey, labelKey, filterKey;
|
|
1311
|
+
valueKey = (null == collectionField ? void 0 : collectionField.target) ? null == (_cm_getCollection = cm.getCollection(collectionField.target)) ? void 0 : _cm_getCollection.getPrimaryKey() : 'id';
|
|
1312
|
+
labelKey = (null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : null == (_fieldSchema_xcomponentprops_fieldNames = _fieldSchema_xcomponentprops.fieldNames) ? void 0 : _fieldSchema_xcomponentprops_fieldNames.label) || valueKey;
|
|
1313
|
+
({ data, params, run } = (0, _api_client__WEBPACK_IMPORTED_MODULE_12__.useRequest)({
|
|
1314
|
+
headers,
|
|
1315
|
+
resource: null == collectionField ? void 0 : collectionField.target,
|
|
1316
|
+
action: 'list',
|
|
1317
|
+
params: {
|
|
1318
|
+
fields: [
|
|
1319
|
+
labelKey,
|
|
1320
|
+
valueKey
|
|
1321
|
+
],
|
|
1322
|
+
pageSize: 200,
|
|
1323
|
+
page: 1,
|
|
1324
|
+
...null == (_field_componentProps = field.componentProps) ? void 0 : _field_componentProps.params
|
|
1515
1325
|
}
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1326
|
+
}, {
|
|
1327
|
+
manual: true,
|
|
1328
|
+
debounceWait: 300
|
|
1329
|
+
}));
|
|
1330
|
+
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{
|
|
1331
|
+
if (!isOptionalField(fieldSchema)) run();
|
|
1332
|
+
}, [
|
|
1333
|
+
labelKey,
|
|
1334
|
+
valueKey,
|
|
1335
|
+
JSON.stringify((null == (_field_componentProps1 = field.componentProps) ? void 0 : _field_componentProps1.params) || {}),
|
|
1336
|
+
isOptionalField(fieldSchema)
|
|
1337
|
+
]);
|
|
1338
|
+
if (!collectionField) return {};
|
|
1339
|
+
if (isOptionalField(fieldSchema)) {
|
|
1340
|
+
var _field_uiSchema;
|
|
1341
|
+
const field = optionalFieldList.find((field)=>field.name === fieldSchema.name);
|
|
1342
|
+
const operatorMap = {
|
|
1343
|
+
select: '$in',
|
|
1344
|
+
multipleSelect: '$anyOf',
|
|
1345
|
+
checkbox: '$in',
|
|
1346
|
+
checkboxGroup: '$anyOf'
|
|
1347
|
+
};
|
|
1348
|
+
const _list = (null == field ? void 0 : null == (_field_uiSchema = field.uiSchema) ? void 0 : _field_uiSchema.enum) || [];
|
|
1349
|
+
valueKey = 'value';
|
|
1350
|
+
labelKey = 'label';
|
|
1351
|
+
list = _list;
|
|
1352
|
+
params = {};
|
|
1353
|
+
run = ()=>{};
|
|
1354
|
+
filterKey = "".concat(field.name, ".").concat(operatorMap[field.interface]);
|
|
1355
|
+
handleSearchInput = (e)=>{
|
|
1356
|
+
const value = e.target.value;
|
|
1357
|
+
if (!value) {
|
|
1358
|
+
list = _list;
|
|
1359
|
+
return;
|
|
1530
1360
|
}
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1361
|
+
list = _list.filter((item)=>item.label.includes(value));
|
|
1362
|
+
};
|
|
1363
|
+
} else {
|
|
1364
|
+
filterKey = "".concat(collectionFieldName, ".").concat(valueKey, ".$in");
|
|
1365
|
+
list = (null == data ? void 0 : data.data) || [];
|
|
1366
|
+
handleSearchInput = (e)=>{
|
|
1367
|
+
run({
|
|
1368
|
+
...null == params ? void 0 : params[0],
|
|
1369
|
+
filter: {
|
|
1370
|
+
["".concat(labelKey, ".$includes")]: e.target.value
|
|
1371
|
+
}
|
|
1372
|
+
});
|
|
1373
|
+
};
|
|
1374
|
+
}
|
|
1375
|
+
const onSelected = (value)=>{
|
|
1376
|
+
const { targets, uid } = findFilterTargets(fieldSchema);
|
|
1377
|
+
getDataBlocks().forEach((block)=>{
|
|
1378
|
+
var _block_service_params, _block_service_params_, _block_service_params1;
|
|
1379
|
+
const target = targets.find((target)=>target.uid === block.uid);
|
|
1380
|
+
if (!target) return;
|
|
1381
|
+
const key = "".concat(uid).concat(fieldSchema.name);
|
|
1382
|
+
const param = (null == (_block_service_params = block.service.params) ? void 0 : _block_service_params[0]) || {};
|
|
1383
|
+
const storedFilter = (null == (_block_service_params1 = block.service.params) ? void 0 : null == (_block_service_params_ = _block_service_params1[1]) ? void 0 : _block_service_params_.filters) || {};
|
|
1384
|
+
if (value.length) storedFilter[key] = {
|
|
1385
|
+
[filterKey]: value
|
|
1541
1386
|
};
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1387
|
+
else {
|
|
1388
|
+
if ('manual' === block.dataLoadingMode) return block.clearData();
|
|
1389
|
+
delete storedFilter[key];
|
|
1390
|
+
}
|
|
1391
|
+
const mergedFilter = (0, _filter_provider_utils__WEBPACK_IMPORTED_MODULE_16__.mergeFilter)([
|
|
1392
|
+
...Object.values(storedFilter),
|
|
1393
|
+
block.defaultFilter
|
|
1394
|
+
]);
|
|
1395
|
+
return block.doFilter({
|
|
1396
|
+
...param,
|
|
1397
|
+
page: 1,
|
|
1398
|
+
filter: mergedFilter
|
|
1399
|
+
}, {
|
|
1400
|
+
filters: storedFilter
|
|
1546
1401
|
});
|
|
1547
|
-
}
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1402
|
+
});
|
|
1403
|
+
};
|
|
1404
|
+
return {
|
|
1405
|
+
list,
|
|
1406
|
+
onSelected,
|
|
1407
|
+
handleSearchInput,
|
|
1408
|
+
params,
|
|
1409
|
+
run,
|
|
1410
|
+
valueKey,
|
|
1411
|
+
labelKey
|
|
1412
|
+
};
|
|
1413
|
+
};
|
|
1414
|
+
function getAssociationPath(str) {
|
|
1415
|
+
const lastIndex = str.lastIndexOf('.');
|
|
1416
|
+
if (-1 !== lastIndex) return str.substring(0, lastIndex);
|
|
1417
|
+
return str;
|
|
1418
|
+
}
|
|
1419
|
+
const useAssociationNames = (dataSource)=>{
|
|
1420
|
+
let updateAssociationValues = new Set([]);
|
|
1421
|
+
let appends = new Set([]);
|
|
1422
|
+
const { getCollectionJoinField, getCollection } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_14__.useCollectionManager_deprecated)(dataSource);
|
|
1423
|
+
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.useFieldSchema)();
|
|
1424
|
+
const _getAssociationAppends = (schema, str)=>{
|
|
1425
|
+
schema.reduceProperties((pre, s)=>{
|
|
1426
|
+
var _s_xcomponentprops, _s_xcomponentprops_fieldNames, _s_xcomponentprops1, _s_xcomponentprops2, _getCollection;
|
|
1427
|
+
const prefix = pre || str;
|
|
1428
|
+
const collectionField = s['x-collection-field'] && getCollectionJoinField(s['x-collection-field'], dataSource);
|
|
1429
|
+
const isAssociationSubfield = s.name.includes('.');
|
|
1430
|
+
const isAssociationField = collectionField && [
|
|
1431
|
+
'hasOne',
|
|
1432
|
+
'hasMany',
|
|
1433
|
+
'belongsTo',
|
|
1434
|
+
'belongsToMany'
|
|
1435
|
+
].includes(collectionField.type);
|
|
1436
|
+
if (null == (_s_xcomponentprops = s['x-component-props']) ? void 0 : _s_xcomponentprops['appends']) {
|
|
1437
|
+
var _s_xcomponentprops3;
|
|
1438
|
+
lodash__WEBPACK_IMPORTED_MODULE_5___default().forEach(null == (_s_xcomponentprops3 = s['x-component-props']) ? void 0 : _s_xcomponentprops3['appends'], (append)=>{
|
|
1439
|
+
appends.add(append);
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1442
|
+
if (null == (_s_xcomponentprops1 = s['x-component-props']) ? void 0 : null == (_s_xcomponentprops_fieldNames = _s_xcomponentprops1.fieldNames) ? void 0 : _s_xcomponentprops_fieldNames.formula) {
|
|
1443
|
+
var _s_xcomponentprops_fieldNames1, _s_xcomponentprops4;
|
|
1444
|
+
appends.add(s['name']);
|
|
1445
|
+
const regex = /{{(.*?)}}/g;
|
|
1446
|
+
const formula = null == (_s_xcomponentprops4 = s['x-component-props']) ? void 0 : null == (_s_xcomponentprops_fieldNames1 = _s_xcomponentprops4.fieldNames) ? void 0 : _s_xcomponentprops_fieldNames1.formula;
|
|
1447
|
+
let match;
|
|
1448
|
+
while(match = regex.exec(formula))if (match[1].includes('.')) {
|
|
1449
|
+
const matchList = match[1].split('.');
|
|
1450
|
+
let appendsValue = s['name'];
|
|
1451
|
+
matchList.forEach((item, index)=>{
|
|
1452
|
+
if (index === matchList.length - 1) return;
|
|
1453
|
+
appendsValue += '.' + item;
|
|
1454
|
+
appends.add(appendsValue);
|
|
1455
|
+
});
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
if (s['x-linkage-rules']) {
|
|
1459
|
+
const collectAppends = (obj)=>{
|
|
1460
|
+
const type = Object.keys(obj)[0] || '$and';
|
|
1461
|
+
const list = obj[type];
|
|
1462
|
+
list.forEach((item)=>{
|
|
1463
|
+
if ('$and' in item || '$or' in item) return collectAppends(item);
|
|
1464
|
+
const fieldNames = getTargetField(item);
|
|
1465
|
+
if (fieldNames.length > 1) appends.add(fieldNames.join('.'));
|
|
1466
|
+
});
|
|
1467
|
+
};
|
|
1468
|
+
const rules = s['x-linkage-rules'];
|
|
1469
|
+
rules.forEach((param)=>{
|
|
1470
|
+
let { condition } = param;
|
|
1471
|
+
collectAppends(condition);
|
|
1472
|
+
});
|
|
1473
|
+
}
|
|
1474
|
+
if (null == (_s_xcomponentprops2 = s['x-component-props']) ? void 0 : _s_xcomponentprops2['x-next-title']) {
|
|
1475
|
+
const pre = prefix && '' !== prefix ? prefix + '.' + s.name : s.name;
|
|
1476
|
+
const title = s['x-component-props']['x-next-title'];
|
|
1477
|
+
const path = pre + '.' + title.label;
|
|
1560
1478
|
appends.add(path);
|
|
1561
|
-
appends.add("".concat(path, ".parent") + '(recursively=true)');
|
|
1562
|
-
} else appends.add(path);
|
|
1563
|
-
if ([
|
|
1564
|
-
'Nester',
|
|
1565
|
-
'SubTable',
|
|
1566
|
-
'PopoverNester'
|
|
1567
|
-
].includes(null === (_s_xcomponentprops5 = s['x-component-props']) || void 0 === _s_xcomponentprops5 ? void 0 : _s_xcomponentprops5.mode)) {
|
|
1568
|
-
updateAssociationValues.add(path);
|
|
1569
|
-
const bufPrefix = prefix && '' !== prefix ? prefix + '.' + s.name : s.name;
|
|
1570
|
-
_getAssociationAppends(s, bufPrefix);
|
|
1571
1479
|
}
|
|
1572
|
-
|
|
1573
|
-
'
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1480
|
+
const isTreeCollection = isAssociationField && (null == (_getCollection = getCollection(collectionField.target, dataSource)) ? void 0 : _getCollection.template) === 'tree';
|
|
1481
|
+
if (collectionField && (isAssociationField || isAssociationSubfield) && 'TableField' !== s['x-component']) {
|
|
1482
|
+
var _s_xcomponentprops5;
|
|
1483
|
+
const fieldPath = !isAssociationField && isAssociationSubfield ? getAssociationPath(s.name) : s.name;
|
|
1484
|
+
const path = '' !== prefix && prefix ? prefix + '.' + fieldPath : fieldPath;
|
|
1485
|
+
if (isTreeCollection) {
|
|
1486
|
+
appends.add(path);
|
|
1487
|
+
appends.add("".concat(path, ".parent") + '(recursively=true)');
|
|
1488
|
+
} else appends.add(path);
|
|
1489
|
+
if ([
|
|
1490
|
+
'Nester',
|
|
1491
|
+
'SubTable',
|
|
1492
|
+
'PopoverNester'
|
|
1493
|
+
].includes(null == (_s_xcomponentprops5 = s['x-component-props']) ? void 0 : _s_xcomponentprops5.mode)) {
|
|
1494
|
+
updateAssociationValues.add(path);
|
|
1495
|
+
const bufPrefix = prefix && '' !== prefix ? prefix + '.' + s.name : s.name;
|
|
1496
|
+
_getAssociationAppends(s, bufPrefix);
|
|
1497
|
+
}
|
|
1498
|
+
} else if (![
|
|
1499
|
+
'ActionBar',
|
|
1500
|
+
'Action',
|
|
1501
|
+
'Action.Link',
|
|
1502
|
+
'Action.Modal',
|
|
1503
|
+
'Selector',
|
|
1504
|
+
'Viewer',
|
|
1505
|
+
'AddNewer',
|
|
1506
|
+
'AssociationField.Selector',
|
|
1507
|
+
'AssociationField.AddNewer',
|
|
1508
|
+
'TableField'
|
|
1509
|
+
].includes(s['x-component'])) _getAssociationAppends(s, str);
|
|
1510
|
+
}, str);
|
|
1511
|
+
};
|
|
1512
|
+
const getAssociationAppends = ()=>{
|
|
1513
|
+
updateAssociationValues = new Set([]);
|
|
1514
|
+
appends = new Set([]);
|
|
1515
|
+
_getAssociationAppends(fieldSchema, '');
|
|
1516
|
+
return {
|
|
1517
|
+
appends: [
|
|
1518
|
+
...appends
|
|
1519
|
+
],
|
|
1520
|
+
updateAssociationValues: [
|
|
1521
|
+
...updateAssociationValues
|
|
1522
|
+
]
|
|
1523
|
+
};
|
|
1524
|
+
};
|
|
1590
1525
|
return {
|
|
1591
|
-
|
|
1592
|
-
...appends
|
|
1593
|
-
],
|
|
1594
|
-
updateAssociationValues: [
|
|
1595
|
-
...updateAssociationValues
|
|
1596
|
-
]
|
|
1526
|
+
getAssociationAppends
|
|
1597
1527
|
};
|
|
1598
1528
|
};
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
function
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
});
|
|
1529
|
+
function getTargetField(obj) {
|
|
1530
|
+
function getAllKeys(obj) {
|
|
1531
|
+
const keys = [];
|
|
1532
|
+
function traverse(o) {
|
|
1533
|
+
Object.keys(o).sort().forEach(function(key) {
|
|
1534
|
+
keys.push(key);
|
|
1535
|
+
if (o[key] && 'object' == typeof o[key]) traverse(o[key]);
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
traverse(obj);
|
|
1539
|
+
return keys;
|
|
1611
1540
|
}
|
|
1612
|
-
|
|
1613
|
-
|
|
1541
|
+
const keys = getAllKeys(obj);
|
|
1542
|
+
const index = lodash__WEBPACK_IMPORTED_MODULE_5___default().findIndex(keys, (key, index)=>{
|
|
1543
|
+
if (key.includes('$') && index > 0) return true;
|
|
1544
|
+
});
|
|
1545
|
+
const result = keys.slice(0, index);
|
|
1546
|
+
return result;
|
|
1614
1547
|
}
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
return result;
|
|
1621
|
-
}
|
|
1622
|
-
async function resetFormCorrectly(form) {
|
|
1623
|
-
(0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.untracked)(()=>{
|
|
1624
|
-
Object.keys(form.fields).forEach((key)=>{
|
|
1625
|
-
if ((0, _schema_component_antd_association_field_util__WEBPACK_IMPORTED_MODULE_19__.isSubMode)(form.fields[key])) form.fields[key].initialValue = null;
|
|
1548
|
+
async function resetFormCorrectly(form) {
|
|
1549
|
+
(0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_1__.untracked)(()=>{
|
|
1550
|
+
Object.keys(form.fields).forEach((key)=>{
|
|
1551
|
+
if ((0, _schema_component_antd_association_field_util__WEBPACK_IMPORTED_MODULE_19__.isSubMode)(form.fields[key])) form.fields[key].initialValue = null;
|
|
1552
|
+
});
|
|
1626
1553
|
});
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1554
|
+
await form.reset();
|
|
1555
|
+
}
|
|
1556
|
+
})();
|
|
1557
|
+
exports.filterByCleanedFields = __webpack_exports__.filterByCleanedFields;
|
|
1558
|
+
exports.findFilterTargets = __webpack_exports__.findFilterTargets;
|
|
1559
|
+
exports.getAfterWorkflows = __webpack_exports__.getAfterWorkflows;
|
|
1560
|
+
exports.getAssociationPath = __webpack_exports__.getAssociationPath;
|
|
1561
|
+
exports.getBeforeWorkflows = __webpack_exports__.getBeforeWorkflows;
|
|
1562
|
+
exports.getFormValues = __webpack_exports__.getFormValues;
|
|
1563
|
+
exports.updateFilterTargets = __webpack_exports__.updateFilterTargets;
|
|
1564
|
+
exports.useAssociationCreateActionProps = __webpack_exports__.useAssociationCreateActionProps;
|
|
1565
|
+
exports.useAssociationFilterBlockProps = __webpack_exports__.useAssociationFilterBlockProps;
|
|
1566
|
+
exports.useAssociationFilterProps = __webpack_exports__.useAssociationFilterProps;
|
|
1567
|
+
exports.useAssociationNames = __webpack_exports__.useAssociationNames;
|
|
1568
|
+
exports.useBulkDestroyActionProps = __webpack_exports__.useBulkDestroyActionProps;
|
|
1569
|
+
exports.useCancelActionProps = __webpack_exports__.useCancelActionProps;
|
|
1570
|
+
exports.useCollectValuesToSubmit = __webpack_exports__.useCollectValuesToSubmit;
|
|
1571
|
+
exports.useCreateActionProps = __webpack_exports__.useCreateActionProps;
|
|
1572
|
+
exports.useCustomizeRequestActionProps = __webpack_exports__.useCustomizeRequestActionProps;
|
|
1573
|
+
exports.useCustomizeUpdateActionProps = __webpack_exports__.useCustomizeUpdateActionProps;
|
|
1574
|
+
exports.useDestroyActionProps = __webpack_exports__.useDestroyActionProps;
|
|
1575
|
+
exports.useDetailPrintActionProps = __webpack_exports__.useDetailPrintActionProps;
|
|
1576
|
+
exports.useDetailsPaginationProps = __webpack_exports__.useDetailsPaginationProps;
|
|
1577
|
+
exports.useDisassociateActionProps = __webpack_exports__.useDisassociateActionProps;
|
|
1578
|
+
exports.useFilterBlockActionProps = __webpack_exports__.useFilterBlockActionProps;
|
|
1579
|
+
exports.useInsertSchema = __webpack_exports__.useInsertSchema;
|
|
1580
|
+
exports.useOptionalFieldList = __webpack_exports__.useOptionalFieldList;
|
|
1581
|
+
exports.useRefreshActionProps = __webpack_exports__.useRefreshActionProps;
|
|
1582
|
+
exports.useRemoveActionProps = __webpack_exports__.useRemoveActionProps;
|
|
1583
|
+
exports.useResetBlockActionProps = __webpack_exports__.useResetBlockActionProps;
|
|
1584
|
+
exports.useUpdateActionProps = __webpack_exports__.useUpdateActionProps;
|
|
1585
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
1586
|
+
"filterByCleanedFields",
|
|
1587
|
+
"findFilterTargets",
|
|
1588
|
+
"getAfterWorkflows",
|
|
1589
|
+
"getAssociationPath",
|
|
1590
|
+
"getBeforeWorkflows",
|
|
1591
|
+
"getFormValues",
|
|
1592
|
+
"updateFilterTargets",
|
|
1593
|
+
"useAssociationCreateActionProps",
|
|
1594
|
+
"useAssociationFilterBlockProps",
|
|
1595
|
+
"useAssociationFilterProps",
|
|
1596
|
+
"useAssociationNames",
|
|
1597
|
+
"useBulkDestroyActionProps",
|
|
1598
|
+
"useCancelActionProps",
|
|
1599
|
+
"useCollectValuesToSubmit",
|
|
1600
|
+
"useCreateActionProps",
|
|
1601
|
+
"useCustomizeRequestActionProps",
|
|
1602
|
+
"useCustomizeUpdateActionProps",
|
|
1603
|
+
"useDestroyActionProps",
|
|
1604
|
+
"useDetailPrintActionProps",
|
|
1605
|
+
"useDetailsPaginationProps",
|
|
1606
|
+
"useDisassociateActionProps",
|
|
1607
|
+
"useFilterBlockActionProps",
|
|
1608
|
+
"useInsertSchema",
|
|
1609
|
+
"useOptionalFieldList",
|
|
1610
|
+
"useRefreshActionProps",
|
|
1611
|
+
"useRemoveActionProps",
|
|
1612
|
+
"useResetBlockActionProps",
|
|
1613
|
+
"useUpdateActionProps"
|
|
1614
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
1615
|
+
Object.defineProperty(exports, '__esModule', {
|
|
1633
1616
|
value: true
|
|
1634
1617
|
});
|