@webiny/app-admin 6.3.0 → 6.4.0-beta.0
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/assets/icons/add-18px.js +20 -0
- package/assets/icons/add-18px.js.map +1 -0
- package/assets/icons/arrow_drop_down-24px.js +20 -0
- package/assets/icons/arrow_drop_down-24px.js.map +1 -0
- package/assets/icons/attach_file_black_24dp.js +20 -0
- package/assets/icons/attach_file_black_24dp.js.map +1 -0
- package/assets/icons/baseline-menu-24px.js +20 -0
- package/assets/icons/baseline-menu-24px.js.map +1 -0
- package/assets/icons/baseline-notification_important-24px.js +19 -0
- package/assets/icons/baseline-notification_important-24px.js.map +1 -0
- package/assets/icons/baseline-security-24px.js +19 -0
- package/assets/icons/baseline-security-24px.js.map +1 -0
- package/assets/icons/file_download.js +19 -0
- package/assets/icons/file_download.js.map +1 -0
- package/assets/icons/file_upload.js +19 -0
- package/assets/icons/file_upload.js.map +1 -0
- package/assets/icons/filter-24px.js +23 -0
- package/assets/icons/filter-24px.js.map +1 -0
- package/assets/icons/github-brands.js +19 -0
- package/assets/icons/github-brands.js.map +1 -0
- package/assets/icons/highlight-24px.js +19 -0
- package/assets/icons/highlight-24px.js.map +1 -0
- package/assets/icons/icon-community.js +18 -0
- package/assets/icons/icon-community.js.map +1 -0
- package/assets/icons/icon-documentation.js +18 -0
- package/assets/icons/icon-documentation.js.map +1 -0
- package/assets/icons/info.js +19 -0
- package/assets/icons/info.js.map +1 -0
- package/assets/icons/insert_drive_file-24px.js +19 -0
- package/assets/icons/insert_drive_file-24px.js.map +1 -0
- package/assets/icons/insert_photo-24px.js +19 -0
- package/assets/icons/insert_photo-24px.js.map +1 -0
- package/assets/icons/label-24px.js +19 -0
- package/assets/icons/label-24px.js.map +1 -0
- package/assets/icons/round-account_circle-24px.js +19 -0
- package/assets/icons/round-account_circle-24px.js.map +1 -0
- package/assets/icons/round-add-24px.js +20 -0
- package/assets/icons/round-add-24px.js.map +1 -0
- package/assets/icons/round-arrow_drop_down-24px.js +19 -0
- package/assets/icons/round-arrow_drop_down-24px.js.map +1 -0
- package/assets/icons/round-chevron_right-24px.js +20 -0
- package/assets/icons/round-chevron_right-24px.js.map +1 -0
- package/assets/icons/round-feedback-24px.js +20 -0
- package/assets/icons/round-feedback-24px.js.map +1 -0
- package/assets/icons/round-help-24px.js +19 -0
- package/assets/icons/round-help-24px.js.map +1 -0
- package/assets/icons/round-invert_colors-24px.js +20 -0
- package/assets/icons/round-invert_colors-24px.js.map +1 -0
- package/assets/icons/round-keyboard_arrow_down-24px.js +17 -0
- package/assets/icons/round-keyboard_arrow_down-24px.js.map +1 -0
- package/assets/icons/round-keyboard_arrow_up-24px.js +17 -0
- package/assets/icons/round-keyboard_arrow_up-24px.js.map +1 -0
- package/assets/icons/round-lock_open-24px.js +22 -0
- package/assets/icons/round-lock_open-24px.js.map +1 -0
- package/assets/icons/round-more_vert-24px.js +20 -0
- package/assets/icons/round-more_vert-24px.js.map +1 -0
- package/assets/icons/round-open_in_new-24px.js +20 -0
- package/assets/icons/round-open_in_new-24px.js.map +1 -0
- package/assets/icons/round-settings-24px.js +20 -0
- package/assets/icons/round-settings-24px.js.map +1 -0
- package/assets/icons/search-24px.js +21 -0
- package/assets/icons/search-24px.js.map +1 -0
- package/assets/icons/slack-logo.js +14 -0
- package/assets/icons/slack-logo.js.map +1 -0
- package/assets/icons/today-24px.js +19 -0
- package/assets/icons/today-24px.js.map +1 -0
- package/assets/icons/touch_app.js +20 -0
- package/assets/icons/touch_app.js.map +1 -0
- package/assets/images/webiny-logo.js +34 -0
- package/assets/images/webiny-logo.js.map +1 -0
- package/assets/images/webiny-orange-logo.js +34 -0
- package/assets/images/webiny-orange-logo.js.map +1 -0
- package/base/Admin.js +37 -28
- package/base/Admin.js.map +1 -1
- package/base/Base/DefaultFieldRenderers.js +73 -70
- package/base/Base/DefaultFieldRenderers.js.map +1 -1
- package/base/Base/DefaultLayoutRenderers.js +9 -10
- package/base/Base/DefaultLayoutRenderers.js.map +1 -1
- package/base/Base/FieldRenderers/CheckboxesRenderer.js +22 -23
- package/base/Base/FieldRenderers/CheckboxesRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/CodeEditorRenderer.js +10 -13
- package/base/Base/FieldRenderers/CodeEditorRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.js +60 -60
- package/base/Base/FieldRenderers/DateTimeInputsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/DateTimeRenderer.js +38 -39
- package/base/Base/FieldRenderers/DateTimeRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/FilePickerRenderer.d.ts +2 -1
- package/base/Base/FieldRenderers/FilePickerRenderer.js +37 -40
- package/base/Base/FieldRenderers/FilePickerRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.js +15 -20
- package/base/Base/FieldRenderers/FileUrlPickerRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/HiddenRenderer.js +3 -3
- package/base/Base/FieldRenderers/HiddenRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.js +20 -21
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/InputRenderer.js +16 -20
- package/base/Base/FieldRenderers/InputRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/MultiFilePickerRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/MultiFilePickerRenderer.js +70 -0
- package/base/Base/FieldRenderers/MultiFilePickerRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/NumberInputRenderer.js +16 -19
- package/base/Base/FieldRenderers/NumberInputRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/NumberInputsRenderer.js +45 -44
- package/base/Base/FieldRenderers/NumberInputsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js +10 -13
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js +50 -56
- package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js +87 -99
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +41 -48
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +1 -2
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +62 -78
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +12 -15
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +48 -54
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +62 -79
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js +14 -17
- package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js.map +1 -1
- package/base/Base/FieldRenderers/PassthroughRenderer.js +8 -11
- package/base/Base/FieldRenderers/PassthroughRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js +21 -22
- package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/SelectRenderer.js +23 -24
- package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/SwitchRenderer.js +12 -15
- package/base/Base/FieldRenderers/SwitchRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/TagsRenderer.js +15 -16
- package/base/Base/FieldRenderers/TagsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/TextInputsRenderer.js +44 -43
- package/base/Base/FieldRenderers/TextInputsRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/TextareaRenderer.js +17 -21
- package/base/Base/FieldRenderers/TextareaRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/TextareasRenderer.js +47 -46
- package/base/Base/FieldRenderers/TextareasRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/VerticalTabsRenderer.js +35 -36
- package/base/Base/FieldRenderers/VerticalTabsRenderer.js.map +1 -1
- package/base/Base/LexicalPreset.js +56 -60
- package/base/Base/LexicalPreset.js.map +1 -1
- package/base/Base/Menus/SupportMenuItems.js +9 -13
- package/base/Base/Menus/SupportMenuItems.js.map +1 -1
- package/base/Base/Menus/WebinyVersion.js +19 -20
- package/base/Base/Menus/WebinyVersion.js.map +1 -1
- package/base/Base/Menus.js +52 -66
- package/base/Base/Menus.js.map +1 -1
- package/base/Base/RoutesConfig.js +21 -29
- package/base/Base/RoutesConfig.js.map +1 -1
- package/base/Base/Tenant/wby-horizontal.js +33 -0
- package/base/Base/Tenant/wby-horizontal.js.map +1 -0
- package/base/Base/Tenant/wby-square.js +20 -0
- package/base/Base/Tenant/wby-square.js.map +1 -0
- package/base/Base/Tenant.js +17 -19
- package/base/Base/Tenant.js.map +1 -1
- package/base/Base/UserMenu/ExitTenant.js +18 -29
- package/base/Base/UserMenu/ExitTenant.js.map +1 -1
- package/base/Base/UserMenu/SignOut.js +13 -14
- package/base/Base/UserMenu/SignOut.js.map +1 -1
- package/base/Base/UserMenu/UserInfo.js +23 -36
- package/base/Base/UserMenu/UserInfo.js.map +1 -1
- package/base/Base/UserMenu.js +12 -13
- package/base/Base/UserMenu.js.map +1 -1
- package/base/Base.js +4 -5
- package/base/Base.js.map +1 -1
- package/base/TelemetryAdminAppStart.js +9 -12
- package/base/TelemetryAdminAppStart.js.map +1 -1
- package/base/WebinyVersion.js +19 -20
- package/base/WebinyVersion.js.map +1 -1
- package/base/createRootContainer.js +42 -40
- package/base/createRootContainer.js.map +1 -1
- package/base/plugins/AddGraphQLQuerySelection.js +12 -11
- package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
- package/base/providers/AdminUiStateProvider.js +5 -10
- package/base/providers/AdminUiStateProvider.js.map +1 -1
- package/base/providers/ApolloProvider.js +8 -11
- package/base/providers/ApolloProvider.js.map +1 -1
- package/base/providers/UiProviders.js +18 -27
- package/base/providers/UiProviders.js.map +1 -1
- package/base/providers/UiStateProvider.js +5 -10
- package/base/providers/UiStateProvider.js.map +1 -1
- package/base/ui/Brand.js +4 -5
- package/base/ui/Brand.js.map +1 -1
- package/base/ui/CenteredView.d.ts +1 -1
- package/base/ui/CenteredView.js +9 -13
- package/base/ui/CenteredView.js.map +1 -1
- package/base/ui/Dashboard.js +4 -5
- package/base/ui/Dashboard.js.map +1 -1
- package/base/ui/FileManager.js +38 -60
- package/base/ui/FileManager.js.map +1 -1
- package/base/ui/Layout.js +4 -8
- package/base/ui/Layout.js.map +1 -1
- package/base/ui/LoginScreen.js +16 -21
- package/base/ui/LoginScreen.js.map +1 -1
- package/base/ui/Logo.js +4 -5
- package/base/ui/Logo.js.map +1 -1
- package/base/ui/Navigation.js +11 -14
- package/base/ui/Navigation.js.map +1 -1
- package/base/ui/NotFound.js +4 -5
- package/base/ui/NotFound.js.map +1 -1
- package/base/ui/Tags.js +12 -16
- package/base/ui/Tags.js.map +1 -1
- package/base/ui/TenantSelector.js +4 -5
- package/base/ui/TenantSelector.js.map +1 -1
- package/base/ui/UserMenu/UserMenu.js +4 -5
- package/base/ui/UserMenu/UserMenu.js.map +1 -1
- package/base/ui/UserMenu/UserMenuHandle.js +4 -5
- package/base/ui/UserMenu/UserMenuHandle.js.map +1 -1
- package/base/ui/UserMenu/UserMenuItem.d.ts +4 -4
- package/base/ui/UserMenu/UserMenuItem.js +5 -15
- package/base/ui/UserMenu/UserMenuItem.js.map +1 -1
- package/base/ui/UserMenu/UserMenuLink.d.ts +4 -4
- package/base/ui/UserMenu/UserMenuLink.js +5 -15
- package/base/ui/UserMenu/UserMenuLink.js.map +1 -1
- package/base/ui/UserMenu/UserMenuSeparator.d.ts +2 -2
- package/base/ui/UserMenu/UserMenuSeparator.js +3 -5
- package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -1
- package/base/ui/UserMenu.js +6 -13
- package/base/ui/UserMenu.js.map +1 -1
- package/components/AdminLayout.js +6 -10
- package/components/AdminLayout.js.map +1 -1
- package/components/BulkActions/Worker.js +57 -120
- package/components/BulkActions/Worker.js.map +1 -1
- package/components/BulkActions/index.js +0 -2
- package/components/BulkActions/useDialogWithReport/DialogMessage.js +17 -21
- package/components/BulkActions/useDialogWithReport/DialogMessage.js.map +1 -1
- package/components/BulkActions/useDialogWithReport/index.js +0 -2
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +33 -44
- package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -1
- package/components/Buttons/Buttons.js +44 -71
- package/components/Buttons/Buttons.js.map +1 -1
- package/components/Buttons/Buttons.styles.js +9 -15
- package/components/Buttons/Buttons.styles.js.map +1 -1
- package/components/Buttons/index.js +1 -3
- package/components/Buttons/useButtons.js +15 -20
- package/components/Buttons/useButtons.js.map +1 -1
- package/components/DeveloperMode/DeveloperMode.js +5 -14
- package/components/DeveloperMode/DeveloperMode.js.map +1 -1
- package/components/DeveloperMode/index.js +0 -2
- package/components/Dialogs/Dialog.d.ts +2 -2
- package/components/Dialogs/Dialog.js +46 -59
- package/components/Dialogs/Dialog.js.map +1 -1
- package/components/Dialogs/DialogParamsContext.js +6 -7
- package/components/Dialogs/DialogParamsContext.js.map +1 -1
- package/components/Dialogs/DialogsContext.d.ts +2 -2
- package/components/Dialogs/DialogsContext.js +129 -149
- package/components/Dialogs/DialogsContext.js.map +1 -1
- package/components/Dialogs/useDialogs.js +5 -6
- package/components/Dialogs/useDialogs.js.map +1 -1
- package/components/EmptyView.js +26 -31
- package/components/EmptyView.js.map +1 -1
- package/components/Filters/Filters.js +15 -16
- package/components/Filters/Filters.js.map +1 -1
- package/components/Filters/FiltersToggle.js +18 -23
- package/components/Filters/FiltersToggle.js.map +1 -1
- package/components/Filters/index.js +0 -2
- package/components/FloatingActionButton.js +13 -15
- package/components/FloatingActionButton.js.map +1 -1
- package/components/IconPicker/IconPicker.js +24 -26
- package/components/IconPicker/IconPicker.js.map +1 -1
- package/components/IconPicker/IconPickerComponent.js +56 -72
- package/components/IconPicker/IconPickerComponent.js.map +1 -1
- package/components/IconPicker/IconPickerPresenter.js +64 -70
- package/components/IconPicker/IconPickerPresenter.js.map +1 -1
- package/components/IconPicker/IconPickerPresenter.test.js +79 -105
- package/components/IconPicker/IconPickerPresenter.test.js.map +1 -1
- package/components/IconPicker/IconPickerPresenterProvider.js +10 -16
- package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -1
- package/components/IconPicker/IconPickerTab.js +97 -140
- package/components/IconPicker/IconPickerTab.js.map +1 -1
- package/components/IconPicker/IconRenderer.js +15 -23
- package/components/IconPicker/IconRenderer.js.map +1 -1
- package/components/IconPicker/IconRepository.js +41 -40
- package/components/IconPicker/IconRepository.js.map +1 -1
- package/components/IconPicker/IconRepository.test.js +56 -63
- package/components/IconPicker/IconRepository.test.js.map +1 -1
- package/components/IconPicker/IconRepositoryFactory.js +15 -11
- package/components/IconPicker/IconRepositoryFactory.js.map +1 -1
- package/components/IconPicker/Loading.js +47 -46
- package/components/IconPicker/Loading.js.map +1 -1
- package/components/IconPicker/components/IconPickerCell.js +18 -20
- package/components/IconPicker/components/IconPickerCell.js.map +1 -1
- package/components/IconPicker/components/IconPickerContent.js +27 -35
- package/components/IconPicker/components/IconPickerContent.js.map +1 -1
- package/components/IconPicker/components/IconPickerRow.js +5 -10
- package/components/IconPicker/components/IconPickerRow.js.map +1 -1
- package/components/IconPicker/components/IconPickerTrigger.js +42 -44
- package/components/IconPicker/components/IconPickerTrigger.js.map +1 -1
- package/components/IconPicker/components/index.js +0 -2
- package/components/IconPicker/config/Emojis.js +19 -21
- package/components/IconPicker/config/Emojis.js.map +1 -1
- package/components/IconPicker/config/FontAwesomeIcons.js +54 -58
- package/components/IconPicker/config/FontAwesomeIcons.js.map +1 -1
- package/components/IconPicker/config/IconPackProvider.js +17 -19
- package/components/IconPicker/config/IconPackProvider.js.map +1 -1
- package/components/IconPicker/config/IconType.js +48 -80
- package/components/IconPicker/config/IconType.js.map +1 -1
- package/components/IconPicker/config/index.js +28 -31
- package/components/IconPicker/config/index.js.map +1 -1
- package/components/IconPicker/defaultIcon.js +6 -5
- package/components/IconPicker/defaultIcon.js.map +1 -1
- package/components/IconPicker/index.js +0 -2
- package/components/IconPicker/plugins/customPlugin.js +87 -110
- package/components/IconPicker/plugins/customPlugin.js.map +1 -1
- package/components/IconPicker/plugins/emojisPlugin.js +90 -115
- package/components/IconPicker/plugins/emojisPlugin.js.map +1 -1
- package/components/IconPicker/plugins/graphql.js +3 -8
- package/components/IconPicker/plugins/graphql.js.map +1 -1
- package/components/IconPicker/plugins/iconsPlugin.js +73 -104
- package/components/IconPicker/plugins/iconsPlugin.js.map +1 -1
- package/components/IconPicker/types.js +4 -7
- package/components/IconPicker/types.js.map +1 -1
- package/components/LexicalEditor/LexicalEditor.js +40 -38
- package/components/LexicalEditor/LexicalEditor.js.map +1 -1
- package/components/LexicalEditor/LexicalLinkForm.js +80 -86
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -1
- package/components/LexicalEditor/index.js +0 -2
- package/components/LexicalEditor/lexicalValueFromHtml.js +21 -28
- package/components/LexicalEditor/lexicalValueFromHtml.js.map +1 -1
- package/components/LexicalEditor/lexicalValueWithHtml.js +24 -30
- package/components/LexicalEditor/lexicalValueWithHtml.js.map +1 -1
- package/components/MultiImageUpload.js +4 -13
- package/components/MultiImageUpload.js.map +1 -1
- package/components/NotAuthorizedError/NotAuthorizedError.js +16 -17
- package/components/NotAuthorizedError/NotAuthorizedError.js.map +1 -1
- package/components/NotAuthorizedError/SecureRouteError.js +297 -0
- package/components/NotAuthorizedError/SecureRouteError.js.map +1 -0
- package/components/NotAuthorizedError/index.js +0 -2
- package/components/OptionsMenu/OptionsMenu.js +20 -19
- package/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuItem.js +15 -14
- package/components/OptionsMenu/OptionsMenuItem.js.map +1 -1
- package/components/OptionsMenu/OptionsMenuLink.js +13 -14
- package/components/OptionsMenu/OptionsMenuLink.js.map +1 -1
- package/components/OptionsMenu/index.js +0 -2
- package/components/OptionsMenu/useOptionsMenuItem.js +13 -18
- package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -1
- package/components/OverlayLayout/OverlayLayout.js +35 -38
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/components/OverlayBackdrop.js +6 -11
- package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -1
- package/components/OverlayLayout/components/OverlayContent.js +18 -17
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -1
- package/components/OverlayLayout/components/OverlayHeader.js +30 -37
- package/components/OverlayLayout/components/OverlayHeader.js.map +1 -1
- package/components/OverlayLayout/components/OverlayRoot.js +13 -17
- package/components/OverlayLayout/components/OverlayRoot.js.map +1 -1
- package/components/OverlayLayout/components/index.js +0 -2
- package/components/OverlayLayout/index.js +0 -2
- package/components/Permissions/CannotUseAaclAlert.js +10 -11
- package/components/Permissions/CannotUseAaclAlert.js.map +1 -1
- package/components/Permissions/Permissions.js +32 -41
- package/components/Permissions/Permissions.js.map +1 -1
- package/components/Permissions/PermissionsGroup.js +9 -15
- package/components/Permissions/PermissionsGroup.js.map +1 -1
- package/components/Permissions/StyledComponents.js +9 -16
- package/components/Permissions/StyledComponents.js.map +1 -1
- package/components/Permissions/index.js +1 -3
- package/components/RegisterFeature.js +14 -21
- package/components/RegisterFeature.js.map +1 -1
- package/components/ResizablePanels/index.js +0 -2
- package/components/RoleAutocomplete/graphql.js +3 -2
- package/components/RoleAutocomplete/graphql.js.map +1 -1
- package/components/RoleAutocomplete/index.d.ts +5 -3
- package/components/RoleAutocomplete/index.js +21 -13
- package/components/RoleAutocomplete/index.js.map +1 -1
- package/components/RolesMultiAutocomplete/graphql.js +3 -2
- package/components/RolesMultiAutocomplete/graphql.js.map +1 -1
- package/components/RolesMultiAutocomplete/index.d.ts +5 -3
- package/components/RolesMultiAutocomplete/index.js +21 -14
- package/components/RolesMultiAutocomplete/index.js.map +1 -1
- package/components/SearchUI.js +18 -25
- package/components/SearchUI.js.map +1 -1
- package/components/SimpleForm/SimpleForm.d.ts +1 -1
- package/components/SimpleForm/SimpleForm.js +54 -73
- package/components/SimpleForm/SimpleForm.js.map +1 -1
- package/components/SimpleForm/index.js +1 -3
- package/components/SimpleUI/InputField.js +71 -64
- package/components/SimpleUI/InputField.js.map +1 -1
- package/components/SingleImageUpload.d.ts +2 -2
- package/components/SingleImageUpload.js +37 -58
- package/components/SingleImageUpload.js.map +1 -1
- package/components/SplitView/SplitView.js +47 -57
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/SplitView/index.js +1 -3
- package/components/TeamAutocomplete/graphql.js +3 -2
- package/components/TeamAutocomplete/graphql.js.map +1 -1
- package/components/TeamAutocomplete/index.d.ts +5 -3
- package/components/TeamAutocomplete/index.js +21 -13
- package/components/TeamAutocomplete/index.js.map +1 -1
- package/components/TeamsMultiAutocomplete/graphql.js +3 -2
- package/components/TeamsMultiAutocomplete/graphql.js.map +1 -1
- package/components/TeamsMultiAutocomplete/index.d.ts +5 -3
- package/components/TeamsMultiAutocomplete/index.js +21 -14
- package/components/TeamsMultiAutocomplete/index.js.map +1 -1
- package/components/Wcp.js +27 -38
- package/components/Wcp.js.map +1 -1
- package/components/index.js +10 -13
- package/config/AdminConfig/Dashboard.js +3 -2
- package/config/AdminConfig/Dashboard.js.map +1 -1
- package/config/AdminConfig/Dialog.js +15 -17
- package/config/AdminConfig/Dialog.js.map +1 -1
- package/config/AdminConfig/FieldRenderer.js +15 -17
- package/config/AdminConfig/FieldRenderer.js.map +1 -1
- package/config/AdminConfig/Form.js +4 -3
- package/config/AdminConfig/Form.js.map +1 -1
- package/config/AdminConfig/LayoutRenderer.js +15 -17
- package/config/AdminConfig/LayoutRenderer.js.map +1 -1
- package/config/AdminConfig/LexicalTheme/Color.js +34 -41
- package/config/AdminConfig/LexicalTheme/Color.js.map +1 -1
- package/config/AdminConfig/LexicalTheme/Typography.js +61 -74
- package/config/AdminConfig/LexicalTheme/Typography.js.map +1 -1
- package/config/AdminConfig/LexicalTheme.js +4 -3
- package/config/AdminConfig/LexicalTheme.js.map +1 -1
- package/config/AdminConfig/Logo.d.ts +1 -1
- package/config/AdminConfig/Logo.js +15 -17
- package/config/AdminConfig/Logo.js.map +1 -1
- package/config/AdminConfig/Menu/MenuGroup.d.ts +3 -3
- package/config/AdminConfig/Menu/MenuGroup.js +7 -9
- package/config/AdminConfig/Menu/MenuGroup.js.map +1 -1
- package/config/AdminConfig/Menu/MenuItem.d.ts +2 -2
- package/config/AdminConfig/Menu/MenuItem.js +5 -7
- package/config/AdminConfig/Menu/MenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/MenuLink.d.ts +2 -2
- package/config/AdminConfig/Menu/MenuLink.js +12 -15
- package/config/AdminConfig/Menu/MenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +2 -2
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js +6 -8
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +1 -1
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js +4 -6
- package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/SupportMenu.d.ts +3 -3
- package/config/AdminConfig/Menu/SupportMenu.js +30 -41
- package/config/AdminConfig/Menu/SupportMenu.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js +4 -4
- package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js +4 -4
- package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js.map +1 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js +0 -2
- package/config/AdminConfig/Menu/UserMenu/types.js +0 -3
- package/config/AdminConfig/Menu/UserMenu.d.ts +31 -31
- package/config/AdminConfig/Menu/UserMenu.js +39 -52
- package/config/AdminConfig/Menu/UserMenu.js.map +1 -1
- package/config/AdminConfig/Menu/types.js +0 -3
- package/config/AdminConfig/Menu.d.ts +42 -42
- package/config/AdminConfig/Menu.js +57 -73
- package/config/AdminConfig/Menu.js.map +1 -1
- package/config/AdminConfig/Route.js +4 -5
- package/config/AdminConfig/Route.js.map +1 -1
- package/config/AdminConfig/Security.js +3 -2
- package/config/AdminConfig/Security.js.map +1 -1
- package/config/AdminConfig/SecurityPermissions.js +20 -27
- package/config/AdminConfig/SecurityPermissions.js.map +1 -1
- package/config/AdminConfig/Tenant/TenantLogo.d.ts +1 -1
- package/config/AdminConfig/Tenant/TenantLogo.js +18 -20
- package/config/AdminConfig/Tenant/TenantLogo.js.map +1 -1
- package/config/AdminConfig/Tenant/TenantName.d.ts +1 -1
- package/config/AdminConfig/Tenant/TenantName.js +14 -15
- package/config/AdminConfig/Tenant/TenantName.js.map +1 -1
- package/config/AdminConfig/Tenant.js +6 -9
- package/config/AdminConfig/Tenant.js.map +1 -1
- package/config/AdminConfig/Theme/assignColor.js +51 -18
- package/config/AdminConfig/Theme/assignColor.js.map +1 -1
- package/config/AdminConfig/Theme/consts.js +20 -2
- package/config/AdminConfig/Theme/consts.js.map +1 -1
- package/config/AdminConfig/Theme/types.js +0 -3
- package/config/AdminConfig/Theme.js +8 -15
- package/config/AdminConfig/Theme.js.map +1 -1
- package/config/AdminConfig/Title.d.ts +1 -1
- package/config/AdminConfig/Title.js +11 -12
- package/config/AdminConfig/Title.js.map +1 -1
- package/config/AdminConfig/Widget.js +24 -31
- package/config/AdminConfig/Widget.js.map +1 -1
- package/config/AdminConfig.js +47 -59
- package/config/AdminConfig.js.map +1 -1
- package/config/createAdminConfig.js +55 -86
- package/config/createAdminConfig.js.map +1 -1
- package/domain/Identity.js +78 -88
- package/domain/Identity.js.map +1 -1
- package/errors/ErrorOverlayNetworkErrorHandler.js +37 -52
- package/errors/ErrorOverlayNetworkErrorHandler.js.map +1 -1
- package/errors/TenantIsDisabled.js +19 -20
- package/errors/TenantIsDisabled.js.map +1 -1
- package/exports/admin/build-params.js +0 -5
- package/exports/admin/configs.js +0 -2
- package/exports/admin/form.js +3 -18
- package/exports/admin/security.js +1 -7
- package/exports/admin/tenancy.js +0 -2
- package/exports/admin/ui.js +1 -4
- package/exports/admin.js +1 -4
- package/features/apolloClient/abstraction.js +2 -1
- package/features/apolloClient/abstraction.js.map +1 -1
- package/features/apolloClient/feature.js +22 -30
- package/features/apolloClient/feature.js.map +1 -1
- package/features/buildParams/BuildParams.js +20 -14
- package/features/buildParams/BuildParams.js.map +1 -1
- package/features/buildParams/abstractions.js +3 -2
- package/features/buildParams/abstractions.js.map +1 -1
- package/features/buildParams/feature.js +11 -10
- package/features/buildParams/feature.js.map +1 -1
- package/features/buildParams/index.js +0 -2
- package/features/formModel/ConditionRuleEvaluator.js +39 -46
- package/features/formModel/ConditionRuleEvaluator.js.map +1 -1
- package/features/formModel/Field.d.ts +1 -0
- package/features/formModel/Field.js +334 -411
- package/features/formModel/Field.js.map +1 -1
- package/features/formModel/FieldBuilder.d.ts +2 -1
- package/features/formModel/FieldBuilder.js +148 -171
- package/features/formModel/FieldBuilder.js.map +1 -1
- package/features/formModel/FieldBuilder.test.js +217 -201
- package/features/formModel/FieldBuilder.test.js.map +1 -1
- package/features/formModel/FieldBuilderRegistry.js +23 -25
- package/features/formModel/FieldBuilderRegistry.js.map +1 -1
- package/features/formModel/FocusManager.js +69 -95
- package/features/formModel/FocusManager.js.map +1 -1
- package/features/formModel/FormErrors.d.ts +9 -0
- package/features/formModel/FormErrors.js +35 -0
- package/features/formModel/FormErrors.js.map +1 -0
- package/features/formModel/FormModel.d.ts +2 -0
- package/features/formModel/FormModel.js +391 -396
- package/features/formModel/FormModel.js.map +1 -1
- package/features/formModel/FormModel.test.js +3791 -3354
- package/features/formModel/FormModel.test.js.map +1 -1
- package/features/formModel/FormModelFactory.js +27 -17
- package/features/formModel/FormModelFactory.js.map +1 -1
- package/features/formModel/FormView.d.ts +2 -1
- package/features/formModel/FormView.js +168 -156
- package/features/formModel/FormView.js.map +1 -1
- package/features/formModel/LayoutBuilderFactory.js +300 -370
- package/features/formModel/LayoutBuilderFactory.js.map +1 -1
- package/features/formModel/LayoutMutator.js +118 -125
- package/features/formModel/LayoutMutator.js.map +1 -1
- package/features/formModel/LayoutResolver.js +174 -214
- package/features/formModel/LayoutResolver.js.map +1 -1
- package/features/formModel/ObjectField.js +524 -724
- package/features/formModel/ObjectField.js.map +1 -1
- package/features/formModel/PresenterErrors.d.ts +9 -0
- package/features/formModel/PresenterErrors.js +32 -0
- package/features/formModel/PresenterErrors.js.map +1 -0
- package/features/formModel/Rules.test.js +311 -276
- package/features/formModel/Rules.test.js.map +1 -1
- package/features/formModel/abstractions.d.ts +10 -0
- package/features/formModel/abstractions.js +5 -114
- package/features/formModel/abstractions.js.map +1 -1
- package/features/formModel/createFieldRenderer.js +33 -10
- package/features/formModel/createFieldRenderer.js.map +1 -1
- package/features/formModel/demo/FieldRenderersDemoPresenter.js +289 -220
- package/features/formModel/demo/FieldRenderersDemoPresenter.js.map +1 -1
- package/features/formModel/demo/FormModelDemo.js +191 -215
- package/features/formModel/demo/FormModelDemo.js.map +1 -1
- package/features/formModel/demo/FormModelDemoPresenter.js +132 -113
- package/features/formModel/demo/FormModelDemoPresenter.js.map +1 -1
- package/features/formModel/demo/FormModelPhase11Presenter.js +101 -98
- package/features/formModel/demo/FormModelPhase11Presenter.js.map +1 -1
- package/features/formModel/demo/FormModelPhase8c1Presenter.js +64 -57
- package/features/formModel/demo/FormModelPhase8c1Presenter.js.map +1 -1
- package/features/formModel/feature.js +23 -22
- package/features/formModel/feature.js.map +1 -1
- package/features/formModel/fieldTypes/BooleanFieldType.js +18 -15
- package/features/formModel/fieldTypes/BooleanFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/DateTimeFieldType.js +218 -341
- package/features/formModel/fieldTypes/DateTimeFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/FileFieldType.d.ts +12 -1
- package/features/formModel/fieldTypes/FileFieldType.js +48 -12
- package/features/formModel/fieldTypes/FileFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/FileUrlFieldType.js +15 -12
- package/features/formModel/fieldTypes/FileUrlFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/NumberFieldType.js +19 -18
- package/features/formModel/fieldTypes/NumberFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/ObjectFieldType.js +80 -94
- package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/TextFieldType.js +15 -12
- package/features/formModel/fieldTypes/TextFieldType.js.map +1 -1
- package/features/formModel/fieldTypes/index.js +7 -9
- package/features/formModel/index.d.ts +2 -0
- package/features/formModel/index.js +11 -29
- package/features/formModel/renderers.js +0 -4
- package/features/formModel/useFieldRenderers.js +10 -14
- package/features/formModel/useFieldRenderers.js.map +1 -1
- package/features/formModel/useLayoutRenderers.js +10 -14
- package/features/formModel/useLayoutRenderers.js.map +1 -1
- package/features/listCache/ListCache.d.ts +28 -0
- package/features/listCache/ListCache.js +48 -0
- package/features/listCache/ListCache.js.map +1 -0
- package/features/listCache/index.d.ts +2 -0
- package/features/listCache/index.js +1 -0
- package/features/security/AuthenticationContext/AuthenticationContext.js +27 -26
- package/features/security/AuthenticationContext/AuthenticationContext.js.map +1 -1
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js +23 -22
- package/features/security/AuthenticationContext/GraphQLClientDecorator.js.map +1 -1
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js +15 -12
- package/features/security/AuthenticationContext/InternalIdTokenProvider.js.map +1 -1
- package/features/security/AuthenticationContext/abstractions.js +3 -2
- package/features/security/AuthenticationContext/abstractions.js.map +1 -1
- package/features/security/AuthenticationContext/feature.js +15 -14
- package/features/security/AuthenticationContext/feature.js.map +1 -1
- package/features/security/AuthenticationContext/index.js +0 -2
- package/features/security/AuthenticationContext/types.js +0 -3
- package/features/security/IdentityContext/IdentityContext.js +18 -17
- package/features/security/IdentityContext/IdentityContext.js.map +1 -1
- package/features/security/IdentityContext/abstractions.js +2 -1
- package/features/security/IdentityContext/abstractions.js.map +1 -1
- package/features/security/IdentityContext/feature.js +13 -12
- package/features/security/IdentityContext/feature.js.map +1 -1
- package/features/security/IdentityContext/index.js +0 -2
- package/features/security/LogIn/IdentityMapper.js +8 -7
- package/features/security/LogIn/IdentityMapper.js.map +1 -1
- package/features/security/LogIn/LogInGateway.js +17 -19
- package/features/security/LogIn/LogInGateway.js.map +1 -1
- package/features/security/LogIn/LogInRepository.js +16 -14
- package/features/security/LogIn/LogInRepository.js.map +1 -1
- package/features/security/LogIn/LogInUseCase.js +23 -31
- package/features/security/LogIn/LogInUseCase.js.map +1 -1
- package/features/security/LogIn/abstractions.js +5 -16
- package/features/security/LogIn/abstractions.js.map +1 -1
- package/features/security/LogIn/createLoginMutation.js +2 -3
- package/features/security/LogIn/createLoginMutation.js.map +1 -1
- package/features/security/LogIn/feature.js +16 -15
- package/features/security/LogIn/feature.js.map +1 -1
- package/features/security/LogIn/index.js +0 -2
- package/features/security/LogOut/LogOutUseCase.js +18 -16
- package/features/security/LogOut/LogOutUseCase.js.map +1 -1
- package/features/security/LogOut/abstractions.js +2 -1
- package/features/security/LogOut/abstractions.js.map +1 -1
- package/features/security/LogOut/feature.js +12 -11
- package/features/security/LogOut/feature.js.map +1 -1
- package/features/security/LogOut/index.js +0 -2
- package/features/security/SecurityFeature.js +9 -8
- package/features/security/SecurityFeature.js.map +1 -1
- package/features/telemetry/TelemetryService.js +11 -12
- package/features/telemetry/TelemetryService.js.map +1 -1
- package/features/telemetry/abstractions.js +2 -1
- package/features/telemetry/abstractions.js.map +1 -1
- package/features/telemetry/feature.js +13 -12
- package/features/telemetry/feature.js.map +1 -1
- package/features/telemetry/index.js +0 -2
- package/features/tenancy/GraphQLClientDecorator.js +23 -20
- package/features/tenancy/GraphQLClientDecorator.js.map +1 -1
- package/features/tenancy/TenantContext.js +46 -50
- package/features/tenancy/TenantContext.js.map +1 -1
- package/features/tenancy/abstractions.js +2 -1
- package/features/tenancy/abstractions.js.map +1 -1
- package/features/tenancy/feature.js +25 -35
- package/features/tenancy/feature.js.map +1 -1
- package/features/tenancy/types.js +0 -3
- package/features/tools/LexicalContext/LexicalContext.js +20 -17
- package/features/tools/LexicalContext/LexicalContext.js.map +1 -1
- package/features/tools/LexicalContext/abstractions.js +2 -1
- package/features/tools/LexicalContext/abstractions.js.map +1 -1
- package/features/tools/LexicalContext/index.js +0 -2
- package/features/tools/ToolPipelineRunner.js +26 -24
- package/features/tools/ToolPipelineRunner.js.map +1 -1
- package/features/tools/ToolRegistry.js +32 -23
- package/features/tools/ToolRegistry.js.map +1 -1
- package/features/tools/abstractions.js +4 -3
- package/features/tools/abstractions.js.map +1 -1
- package/features/tools/feature.js +17 -16
- package/features/tools/feature.js.map +1 -1
- package/features/tools/index.js +1 -3
- package/features/wcp/ReactLicense.js +53 -52
- package/features/wcp/ReactLicense.js.map +1 -1
- package/features/wcp/WcpGateway.js +21 -20
- package/features/wcp/WcpGateway.js.map +1 -1
- package/features/wcp/WcpService.js +57 -67
- package/features/wcp/WcpService.js.map +1 -1
- package/features/wcp/abstractions.js +3 -2
- package/features/wcp/abstractions.js.map +1 -1
- package/features/wcp/feature.js +14 -13
- package/features/wcp/feature.js.map +1 -1
- package/features/wcp/types.js +0 -3
- package/features/webinySdk/WebinySdk.js +19 -18
- package/features/webinySdk/WebinySdk.js.map +1 -1
- package/features/webinySdk/abstractions.js +2 -5
- package/features/webinySdk/abstractions.js.map +1 -1
- package/features/webinySdk/feature.js +13 -12
- package/features/webinySdk/feature.js.map +1 -1
- package/features/webinySdk/index.js +0 -2
- package/hooks/index.js +0 -2
- package/hooks/useConfirmationDialog.d.ts +1 -1
- package/hooks/useConfirmationDialog.js +31 -38
- package/hooks/useConfirmationDialog.js.map +1 -1
- package/hooks/useDialog.js +14 -15
- package/hooks/useDialog.js.map +1 -1
- package/hooks/useHotkeys.js +52 -85
- package/hooks/useHotkeys.js.map +1 -1
- package/hooks/useIsMounted.js +12 -11
- package/hooks/useIsMounted.js.map +1 -1
- package/hooks/useKeyHandler.js +45 -53
- package/hooks/useKeyHandler.js.map +1 -1
- package/hooks/useModKey.js +20 -25
- package/hooks/useModKey.js.map +1 -1
- package/hooks/useOpenDialog.js +13 -13
- package/hooks/useOpenDialog.js.map +1 -1
- package/hooks/useShiftKey.d.ts +5 -1
- package/hooks/useShiftKey.js +38 -29
- package/hooks/useShiftKey.js.map +1 -1
- package/hooks/useSnackbar.d.ts +3 -0
- package/hooks/useSnackbar.js +26 -28
- package/hooks/useSnackbar.js.map +1 -1
- package/hooks/useStateIfMounted.js +14 -12
- package/hooks/useStateIfMounted.js.map +1 -1
- package/hooks/useStateWithCallback.js +18 -14
- package/hooks/useStateWithCallback.js.map +1 -1
- package/hooks/useToggler.js +12 -11
- package/hooks/useToggler.js.map +1 -1
- package/index.d.ts +4 -1
- package/index.js +15 -31
- package/package.json +26 -28
- package/permissions/PermissionRenderer.js +179 -193
- package/permissions/PermissionRenderer.js.map +1 -1
- package/permissions/PermissionValueContext.js +13 -20
- package/permissions/PermissionValueContext.js.map +1 -1
- package/permissions/createHasPermission.js +32 -40
- package/permissions/createHasPermission.js.map +1 -1
- package/permissions/createPermissionSchema.js +6 -5
- package/permissions/createPermissionSchema.js.map +1 -1
- package/permissions/createPermissions.js +125 -185
- package/permissions/createPermissions.js.map +1 -1
- package/permissions/createPermissions.test.js +190 -158
- package/permissions/createPermissions.test.js.map +1 -1
- package/permissions/index.js +2 -4
- package/permissions/types.js +0 -3
- package/permissions/usePermissionForm.js +133 -232
- package/permissions/usePermissionForm.js.map +1 -1
- package/permissions/usePermissions.js +6 -5
- package/permissions/usePermissions.js.map +1 -1
- package/plugins/MenuPlugin.js +15 -14
- package/plugins/MenuPlugin.js.map +1 -1
- package/presentation/buildParams/useBuildParams.js +2 -3
- package/presentation/buildParams/useBuildParams.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js +46 -53
- package/presentation/installation/components/SystemInstaller/SystemInstaller.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js +9 -14
- package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/index.js +0 -2
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +14 -29
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +11 -10
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +60 -60
- package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js +75 -85
- package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/Center.js +5 -8
- package/presentation/installation/components/SystemInstaller/steps/Center.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/Container.js +18 -24
- package/presentation/installation/components/SystemInstaller/steps/Container.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js +48 -53
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js +13 -16
- package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js.map +1 -1
- package/presentation/installation/components/SystemInstaller/steps/introduction.js +723 -0
- package/presentation/installation/components/SystemInstaller/steps/introduction.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js +14 -1
- package/presentation/installation/components/SystemInstaller/steps/referralSources.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js +27 -28
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js +117 -124
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js +23 -21
- package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/abstractions.js +4 -3
- package/presentation/installation/presenters/SystemInstaller/abstractions.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/feature.js +15 -14
- package/presentation/installation/presenters/SystemInstaller/feature.js.map +1 -1
- package/presentation/installation/presenters/SystemInstaller/index.js +0 -2
- package/presentation/lexicalContext/useLexicalContext.js +11 -8
- package/presentation/lexicalContext/useLexicalContext.js.map +1 -1
- package/presentation/listPresenter/ListPresenter.d.ts +30 -0
- package/presentation/listPresenter/ListPresenter.js +216 -0
- package/presentation/listPresenter/ListPresenter.js.map +1 -0
- package/presentation/listPresenter/ListPresenter.test.d.ts +1 -0
- package/presentation/listPresenter/ListPresenter.test.js +816 -0
- package/presentation/listPresenter/ListPresenter.test.js.map +1 -0
- package/presentation/listPresenter/SelectionController.d.ts +21 -0
- package/presentation/listPresenter/SelectionController.js +74 -0
- package/presentation/listPresenter/SelectionController.js.map +1 -0
- package/presentation/listPresenter/abstractions.d.ts +107 -0
- package/presentation/listPresenter/abstractions.js +5 -0
- package/presentation/listPresenter/abstractions.js.map +1 -0
- package/presentation/listPresenter/feature.d.ts +3 -0
- package/presentation/listPresenter/feature.js +17 -0
- package/presentation/listPresenter/feature.js.map +1 -0
- package/presentation/listPresenter/index.d.ts +3 -0
- package/presentation/listPresenter/index.js +2 -0
- package/presentation/security/components/HasPermission.js +15 -25
- package/presentation/security/components/HasPermission.js.map +1 -1
- package/presentation/security/components/SecureRoute.js +6 -12
- package/presentation/security/components/SecureRoute.js.map +1 -1
- package/presentation/security/hooks/useAuthentication.js +11 -17
- package/presentation/security/hooks/useAuthentication.js.map +1 -1
- package/presentation/security/hooks/useIdentity.js +19 -18
- package/presentation/security/hooks/useIdentity.js.map +1 -1
- package/presentation/security/hooks/useSecurity.js +14 -24
- package/presentation/security/hooks/useSecurity.js.map +1 -1
- package/presentation/tenancy/TenancyProvider.js +23 -36
- package/presentation/tenancy/TenancyProvider.js.map +1 -1
- package/presentation/tenancy/createTenancyProvider.js +6 -11
- package/presentation/tenancy/createTenancyProvider.js.map +1 -1
- package/presentation/tenancy/useTenantContext.js +17 -18
- package/presentation/tenancy/useTenantContext.js.map +1 -1
- package/presentation/textToLexicalTool/TextToLexicalTool.js +20 -18
- package/presentation/textToLexicalTool/TextToLexicalTool.js.map +1 -1
- package/presentation/textToLexicalTool/feature.js +6 -5
- package/presentation/textToLexicalTool/feature.js.map +1 -1
- package/presentation/textToLexicalTool/textToLexicalState.js +28 -28
- package/presentation/textToLexicalTool/textToLexicalState.js.map +1 -1
- package/presentation/wcp/WcpProvider.js +16 -26
- package/presentation/wcp/WcpProvider.js.map +1 -1
- package/presentation/wcp/useWcp.js +11 -12
- package/presentation/wcp/useWcp.js.map +1 -1
- package/routes.d.ts +0 -1
- package/routes.js +14 -17
- package/routes.js.map +1 -1
- package/static/svg/SecureRouteError.e8b15981.svg +1 -0
- package/static/svg/add-18px.b3062af6.svg +3 -0
- package/static/svg/arrow_drop_down-24px.da74d713.svg +4 -0
- package/static/svg/attach_file_black_24dp.7fb13a7e.svg +1 -0
- package/static/svg/baseline-menu-24px.071b179d.svg +4 -0
- package/static/svg/baseline-notification_important-24px.29277e73.svg +4 -0
- package/static/svg/baseline-security-24px.12e519cc.svg +4 -0
- package/static/svg/file_download.afe3fbec.svg +1 -0
- package/static/svg/file_upload.6865d820.svg +1 -0
- package/static/svg/filter-24px.886d9ff0.svg +8 -0
- package/static/svg/github-brands.6311f0fa.svg +1 -0
- package/static/svg/highlight-24px.959a97f7.svg +1 -0
- package/static/svg/icon-community.cd087355.svg +16 -0
- package/static/svg/icon-documentation.a189d24c.svg +16 -0
- package/static/svg/info.fe810b72.svg +1 -0
- package/static/svg/insert_drive_file-24px.39d490eb.svg +1 -0
- package/static/svg/insert_photo-24px.81a5f945.svg +1 -0
- package/static/svg/introduction.108720aa.svg +154 -0
- package/static/svg/label-24px.9deafa4f.svg +1 -0
- package/static/svg/round-account_circle-24px.f0b48cb7.svg +1 -0
- package/static/svg/round-add-24px.4a5219b4.svg +16 -0
- package/static/svg/round-arrow_drop_down-24px.5fdf92d1.svg +1 -0
- package/static/svg/round-chevron_right-24px.34936511.svg +12 -0
- package/static/svg/round-feedback-24px.4dae7231.svg +54 -0
- package/static/svg/round-help-24px.a61b1d66.svg +1 -0
- package/static/svg/round-invert_colors-24px.a229a1dd.svg +52 -0
- package/static/svg/round-keyboard_arrow_down-24px.6febe804.svg +16 -0
- package/static/svg/round-keyboard_arrow_up-24px.b1f7db34.svg +16 -0
- package/static/svg/round-lock_open-24px.d527f6a5.svg +60 -0
- package/static/svg/round-more_vert-24px.68d41b07.svg +12 -0
- package/static/svg/round-open_in_new-24px.be5b4ddd.svg +44 -0
- package/static/svg/round-settings-24px.c0b3056f.svg +4 -0
- package/static/svg/search-24px.3c0f88dd.svg +20 -0
- package/static/svg/slack-logo.7ee35e7f.svg +1 -0
- package/static/svg/today-24px.df206362.svg +1 -0
- package/static/svg/touch_app.debf3744.svg +1 -0
- package/static/svg/wby-horizontal.03327bf6.svg +23 -0
- package/static/svg/wby-square.ff8f47c3.svg +3 -0
- package/static/svg/webiny-logo.ef56725c.svg +20 -0
- package/static/svg/webiny-orange-logo.4eccf0f2.svg +20 -0
- package/types.js +0 -3
- package/components/BulkActions/index.js.map +0 -1
- package/components/BulkActions/useDialogWithReport/index.js.map +0 -1
- package/components/Buttons/index.js.map +0 -1
- package/components/DeveloperMode/index.js.map +0 -1
- package/components/Filters/index.js.map +0 -1
- package/components/IconPicker/components/index.js.map +0 -1
- package/components/IconPicker/index.js.map +0 -1
- package/components/LexicalEditor/index.js.map +0 -1
- package/components/NotAuthorizedError/index.js.map +0 -1
- package/components/OptionsMenu/index.js.map +0 -1
- package/components/OverlayLayout/components/index.js.map +0 -1
- package/components/OverlayLayout/index.js.map +0 -1
- package/components/Permissions/index.js.map +0 -1
- package/components/ResizablePanels/index.js.map +0 -1
- package/components/SimpleForm/index.js.map +0 -1
- package/components/SplitView/index.js.map +0 -1
- package/components/index.js.map +0 -1
- package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js.map +0 -1
- package/config/AdminConfig/Menu/UserMenu/types.js.map +0 -1
- package/config/AdminConfig/Menu/types.js.map +0 -1
- package/config/AdminConfig/Theme/types.js.map +0 -1
- package/exports/admin/build-params.js.map +0 -1
- package/exports/admin/configs.js.map +0 -1
- package/exports/admin/form.js.map +0 -1
- package/exports/admin/security.js.map +0 -1
- package/exports/admin/tenancy.js.map +0 -1
- package/exports/admin/ui.js.map +0 -1
- package/exports/admin.js.map +0 -1
- package/features/buildParams/index.js.map +0 -1
- package/features/formModel/fieldTypes/index.js.map +0 -1
- package/features/formModel/index.js.map +0 -1
- package/features/formModel/renderers.js.map +0 -1
- package/features/security/AuthenticationContext/index.js.map +0 -1
- package/features/security/AuthenticationContext/types.js.map +0 -1
- package/features/security/IdentityContext/index.js.map +0 -1
- package/features/security/LogIn/index.js.map +0 -1
- package/features/security/LogOut/index.js.map +0 -1
- package/features/telemetry/index.js.map +0 -1
- package/features/tenancy/types.js.map +0 -1
- package/features/tools/LexicalContext/index.js.map +0 -1
- package/features/tools/index.js.map +0 -1
- package/features/wcp/types.js.map +0 -1
- package/features/webinySdk/index.js.map +0 -1
- package/hooks/index.js.map +0 -1
- package/index.js.map +0 -1
- package/permissions/index.js.map +0 -1
- package/permissions/types.js.map +0 -1
- package/presentation/installation/components/SystemInstaller/index.js.map +0 -1
- package/presentation/installation/presenters/SystemInstaller/index.js.map +0 -1
- package/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FieldType","FieldBuilder","DateTimeFieldBuilder","_subtype","constructor","_config","renderer","rendererSettings","type","list","dateOnly","timeOnly","withTimezone","withoutTimezone","monthOnly","weekOnly","options","startsOn","undefined","weekStartsOn","yearOnly","range","yearRange","dateRange","multipleDates","multipleMonths","multipleYears","presets","displayFormat","format","normalizeValue","value","normalizeDateOnly","String","normalizeTime","normalizeDateTimeWithoutTimezone","normalizeDateTimeWithTimezone","normalizeMonth","normalizeWeek","normalizeYear","normalizeMultipleYears","Date","toISOString","slice","includes","parts","split","length","normalized","replace","withZ","endsWith","test","initialDate","rest","date","sign","timePart","tz","time","d","y","getFullYear","m","getMonth","padStart","num","Number","isNaN","isFinite","Math","round","Array","isArray","map","v","DateTimeFieldTypeFactory","create","_registry","DateTimeFieldType","createImplementation","implementation","dependencies"],"sources":["DateTimeFieldType.ts"],"sourcesContent":["import { FieldType, type IFieldTypeFactory } from \"../abstractions.js\";\nimport { FieldBuilder } from \"../FieldBuilder.js\";\n\ntype DateTimeSubtype =\n | \"date\"\n | \"time\"\n | \"dateTimeWithTimezone\"\n | \"dateTimeWithoutTimezone\"\n | \"month\"\n | \"week\"\n | \"year\"\n | \"dateRange\"\n | \"multipleDates\"\n | \"multipleMonths\"\n | \"multipleYears\";\n\nexport class DateTimeFieldBuilder extends FieldBuilder<\"datetime\"> {\n private _subtype: DateTimeSubtype = \"date\";\n\n constructor() {\n super(\"datetime\");\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { type: \"date\" };\n }\n\n override list(): this {\n super.list();\n this._config.renderer = \"dateTimeInputs\";\n return this;\n }\n\n /**\n * Calendar date only.\n * @example datetime().dateOnly()\n *\n * Value format: `\"2026-05-01\"` (YYYY-MM-DD)\n */\n dateOnly(): this {\n this._subtype = \"date\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { ...this._config.rendererSettings, type: \"date\" };\n return this;\n }\n\n /**\n * Time only, no date component.\n * @example datetime().timeOnly()\n *\n * Value format: `\"14:30:00\"` (HH:mm:ss)\n */\n timeOnly(): this {\n this._subtype = \"time\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { ...this._config.rendererSettings, type: \"time\" };\n return this;\n }\n\n /**\n * Date and time with explicit timezone offset.\n * @example datetime().withTimezone()\n *\n * Value format: `\"2026-05-01T14:30:00+02:00\"` (ISO 8601 with offset)\n */\n withTimezone(): this {\n this._subtype = \"dateTimeWithTimezone\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"dateTimeWithTimezone\"\n };\n return this;\n }\n\n /**\n * Date and time in UTC, no timezone offset.\n * @example datetime().withoutTimezone()\n *\n * Value format: `\"2026-05-01T14:30:00.000Z\"` (ISO 8601 UTC)\n */\n withoutTimezone(): this {\n this._subtype = \"dateTimeWithoutTimezone\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"dateTimeWithoutTimezone\"\n };\n return this;\n }\n\n /**\n * Month and year picker.\n * @example datetime().monthOnly()\n *\n * Value format: `\"2026-05\"` (YYYY-MM)\n */\n monthOnly(): this {\n this._subtype = \"month\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { ...this._config.rendererSettings, type: \"month\" };\n return this;\n }\n\n /**\n * ISO week picker. Selecting any day highlights and selects the full week.\n * @example\n * datetime().weekOnly()\n * datetime().weekOnly({ startsOn: 1 }) // weeks start on Monday\n *\n * Value format: `\"2026-W18\"` (YYYY-Www)\n */\n weekOnly(options?: { startsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 }): this {\n this._subtype = \"week\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"week\",\n ...(options?.startsOn !== undefined && { weekStartsOn: options.startsOn })\n };\n return this;\n }\n\n /**\n * Year picker with a scrollable grid.\n * @example\n * datetime().yearOnly()\n * datetime().yearOnly({ range: [2010, 2030] })\n *\n * Value format: `2026` (number)\n */\n yearOnly(options?: { range?: [number, number] }): this {\n this._subtype = \"year\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"year\",\n ...(options?.range && { yearRange: options.range })\n };\n return this;\n }\n\n /**\n * Date range picker with a two-month calendar.\n * @example datetime().dateRange()\n *\n * Value format: `{ from: \"2026-05-01\", to: \"2026-05-15\" }`\n */\n dateRange(): this {\n this._subtype = \"dateRange\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { ...this._config.rendererSettings, type: \"dateRange\" };\n return this;\n }\n\n /**\n * Select multiple individual dates.\n * @example datetime().multipleDates()\n *\n * Value format: `[\"2026-05-01\", \"2026-05-03\"]`\n */\n multipleDates(): this {\n this._subtype = \"multipleDates\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"multipleDates\"\n };\n return this;\n }\n\n /**\n * Select multiple months.\n * @example datetime().multipleMonths()\n *\n * Value format: `[\"2026-01\", \"2026-03\"]`\n */\n multipleMonths(): this {\n this._subtype = \"multipleMonths\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"multipleMonths\"\n };\n return this;\n }\n\n /**\n * Select multiple years.\n * @example\n * datetime().multipleYears()\n * datetime().multipleYears({ range: [2020, 2035] })\n *\n * Value format: `[2024, 2025, 2026]`\n */\n multipleYears(options?: { range?: [number, number] }): this {\n this._subtype = \"multipleYears\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"multipleYears\",\n ...(options?.range && { yearRange: options.range })\n };\n return this;\n }\n\n /**\n * Add quick-select preset buttons to the picker. Available on all variants.\n * Each preset's `value` function is called at click time, and the variant\n * handles formatting the Date into its value type.\n * @example\n * datetime().dateOnly().presets([\n * { label: \"Today\", value: () => new Date() },\n * { label: \"In a week\", value: () => addDays(new Date(), 7) }\n * ])\n */\n presets(presets: Array<{ label: string; value: () => Date }>): this {\n this._config.rendererSettings = { ...this._config.rendererSettings, presets };\n return this;\n }\n\n /**\n * Customize the display format shown in the picker trigger.\n * Uses date-fns format tokens.\n * @example\n * datetime().dateOnly().displayFormat(\"MM/dd/yyyy\") // \"05/01/2026\"\n * datetime().dateOnly().displayFormat(\"dd MMM yyyy\") // \"01 May 2026\"\n * datetime().monthOnly().displayFormat(\"MMMM yyyy\") // \"May 2026\"\n */\n displayFormat(format: string): this {\n this._config.rendererSettings = { ...this._config.rendererSettings, displayFormat: format };\n return this;\n }\n\n override normalizeValue(value: unknown): unknown {\n if (value == null || value === \"\") {\n return value;\n }\n switch (this._subtype) {\n case \"date\":\n return normalizeDateOnly(String(value));\n case \"time\":\n return normalizeTime(String(value));\n case \"dateTimeWithoutTimezone\":\n return normalizeDateTimeWithoutTimezone(String(value));\n case \"dateTimeWithTimezone\":\n return normalizeDateTimeWithTimezone(String(value));\n case \"month\":\n return normalizeMonth(String(value));\n case \"week\":\n return normalizeWeek(String(value));\n case \"year\":\n return normalizeYear(value);\n case \"dateRange\":\n case \"multipleDates\":\n case \"multipleMonths\":\n return value;\n case \"multipleYears\":\n return normalizeMultipleYears(value);\n default:\n return value;\n }\n }\n}\n\nfunction normalizeDateOnly(value: string): string {\n try {\n return new Date(value).toISOString().slice(0, 10);\n } catch {\n return value;\n }\n}\n\nfunction normalizeTime(value: string): string {\n if (!value.includes(\":\")) {\n return value;\n }\n const parts = value.split(\":\");\n if (parts.length === 3) {\n return value;\n }\n if (parts.length === 2) {\n return `${value}:00`;\n }\n return value;\n}\n\nfunction normalizeDateTimeWithoutTimezone(value: string): string {\n if (!value.includes(\" \") && !value.includes(\"T\")) {\n return value;\n }\n try {\n const normalized = value.includes(\" \") ? value.replace(\" \", \"T\") : value;\n const withZ =\n normalized.endsWith(\"Z\") ||\n normalized.includes(\"+\") ||\n /\\d-\\d{2}:\\d{2}$/.test(normalized)\n ? normalized\n : `${normalized}.000Z`;\n return new Date(withZ).toISOString();\n } catch {\n return value;\n }\n}\n\nfunction normalizeDateTimeWithTimezone(value: string): string {\n if (!value.includes(\"T\")) {\n return value;\n }\n const [initialDate, rest] = value.split(\"T\");\n if (!rest) {\n return value;\n }\n\n let date: string;\n try {\n date = new Date(initialDate).toISOString().slice(0, 10);\n } catch {\n return value;\n }\n\n const sign = rest.includes(\"+\") ? \"+\" : \"-\";\n const [timePart, tz] = rest.split(sign);\n const time = normalizeTime(timePart);\n\n return `${date}T${time}${sign}${tz}`;\n}\n\nfunction normalizeMonth(value: string): string {\n if (/^\\d{4}-\\d{2}$/.test(value)) {\n return value;\n }\n try {\n const d = new Date(value);\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, \"0\");\n return `${y}-${m}`;\n } catch {\n return value;\n }\n}\n\nfunction normalizeWeek(value: string): string {\n if (/^\\d{4}-W\\d{2}$/.test(value)) {\n return value;\n }\n return value;\n}\n\nfunction normalizeYear(value: unknown): number | unknown {\n const num = Number(value);\n if (!Number.isNaN(num) && Number.isFinite(num)) {\n return Math.round(num);\n }\n return value;\n}\n\nfunction normalizeMultipleYears(value: unknown): unknown {\n if (!Array.isArray(value)) {\n return value;\n }\n return value.map(v => {\n const num = Number(v);\n return !Number.isNaN(num) && Number.isFinite(num) ? Math.round(num) : v;\n });\n}\n\nclass DateTimeFieldTypeFactory implements IFieldTypeFactory {\n readonly type = \"datetime\";\n create(_registry: any) {\n return new DateTimeFieldBuilder();\n }\n}\n\nexport const DateTimeFieldType = FieldType.createImplementation({\n implementation: DateTimeFieldTypeFactory,\n dependencies: []\n});\n\ndeclare module \"../abstractions.js\" {\n interface IFieldBuilderRegistry {\n /**\n * Defines a field that stores date and/or time values.\n *\n * Variant methods (pick one):\n * - `dateOnly()` — \"2026-05-01\"\n * - `timeOnly()` — \"14:30:00\"\n * - `withoutTimezone()` — \"2026-05-01T14:30:00.000Z\"\n * - `withTimezone()` — \"2026-05-01T14:30:00+02:00\"\n * - `monthOnly()` — \"2026-05\"\n * - `weekOnly()` — \"2026-W18\"\n * - `yearOnly()` — 2026\n * - `dateRange()` — { from: \"2026-05-01\", to: \"2026-05-15\" }\n * - `multipleDates()` — [\"2026-05-01\", \"2026-05-03\"]\n * - `multipleMonths()` — [\"2026-01\", \"2026-03\"]\n * - `multipleYears()` — [2024, 2025, 2026]\n *\n * Configuration methods (chain after variant):\n * - `.presets([...])` — quick-select buttons (all variants)\n * - `.displayFormat(\"MM/dd/yyyy\")` — customize trigger display\n *\n * Variant-specific options (passed to variant method):\n * - `yearOnly({ range: [2020, 2030] })` — year range\n * - `multipleYears({ range: [2020, 2035] })` — year range\n * - `weekOnly({ startsOn: 1 })` — first day of week (0=Sun, 1=Mon)\n *\n * @example\n * datetime() // full UTC datetime (default)\n * datetime().dateOnly() // birthdays, due dates, holidays\n * datetime().timeOnly() // opening hours, daily reminders\n * datetime().withTimezone() // events tied to a specific locale\n * datetime().withoutTimezone() // timestamps, logs, sortable moments\n * datetime().monthOnly() // billing cycles, report periods\n * datetime().weekOnly() // sprint planning, weekly schedules\n * datetime().yearOnly({ range: [2010, 2030] }) // fiscal years\n * datetime().dateRange() // vacation requests, booking windows\n * datetime().multipleDates() // blackout dates, recurring events\n * datetime().multipleMonths() // seasonal availability\n * datetime().multipleYears({ range: [2020, 2035] }) // multi-year budgets\n * datetime().dateOnly().presets([...]).displayFormat(\"dd/MM/yyyy\")\n */\n datetime(): DateTimeFieldBuilder;\n }\n}\n"],"mappings":"AAAA,SAASA,SAAS;AAClB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AACC,SAAc,EAAE;IACnB,OAAO,IAAI5E,oBAAoB,CAAC,CAAC;EACrC;AACJ;AAEA,OAAO,MAAM6E,iBAAiB,GAAG/E,SAAS,CAACgF,oBAAoB,CAAC;EAC5DC,cAAc,EAAEL,wBAAwB;EACxCM,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"features/formModel/fieldTypes/DateTimeFieldType.js","sources":["../../../../src/features/formModel/fieldTypes/DateTimeFieldType.ts"],"sourcesContent":["import { FieldType, type IFieldTypeFactory } from \"../abstractions.js\";\nimport { FieldBuilder } from \"../FieldBuilder.js\";\n\ntype DateTimeSubtype =\n | \"date\"\n | \"time\"\n | \"dateTimeWithTimezone\"\n | \"dateTimeWithoutTimezone\"\n | \"month\"\n | \"week\"\n | \"year\"\n | \"dateRange\"\n | \"multipleDates\"\n | \"multipleMonths\"\n | \"multipleYears\";\n\nexport class DateTimeFieldBuilder extends FieldBuilder<\"datetime\"> {\n private _subtype: DateTimeSubtype = \"date\";\n\n constructor() {\n super(\"datetime\");\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { type: \"date\" };\n }\n\n override list(): this {\n super.list();\n this._config.renderer = \"dateTimeInputs\";\n return this;\n }\n\n /**\n * Calendar date only.\n * @example datetime().dateOnly()\n *\n * Value format: `\"2026-05-01\"` (YYYY-MM-DD)\n */\n dateOnly(): this {\n this._subtype = \"date\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { ...this._config.rendererSettings, type: \"date\" };\n return this;\n }\n\n /**\n * Time only, no date component.\n * @example datetime().timeOnly()\n *\n * Value format: `\"14:30:00\"` (HH:mm:ss)\n */\n timeOnly(): this {\n this._subtype = \"time\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { ...this._config.rendererSettings, type: \"time\" };\n return this;\n }\n\n /**\n * Date and time with explicit timezone offset.\n * @example datetime().withTimezone()\n *\n * Value format: `\"2026-05-01T14:30:00+02:00\"` (ISO 8601 with offset)\n */\n withTimezone(): this {\n this._subtype = \"dateTimeWithTimezone\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"dateTimeWithTimezone\"\n };\n return this;\n }\n\n /**\n * Date and time in UTC, no timezone offset.\n * @example datetime().withoutTimezone()\n *\n * Value format: `\"2026-05-01T14:30:00.000Z\"` (ISO 8601 UTC)\n */\n withoutTimezone(): this {\n this._subtype = \"dateTimeWithoutTimezone\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"dateTimeWithoutTimezone\"\n };\n return this;\n }\n\n /**\n * Month and year picker.\n * @example datetime().monthOnly()\n *\n * Value format: `\"2026-05\"` (YYYY-MM)\n */\n monthOnly(): this {\n this._subtype = \"month\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { ...this._config.rendererSettings, type: \"month\" };\n return this;\n }\n\n /**\n * ISO week picker. Selecting any day highlights and selects the full week.\n * @example\n * datetime().weekOnly()\n * datetime().weekOnly({ startsOn: 1 }) // weeks start on Monday\n *\n * Value format: `\"2026-W18\"` (YYYY-Www)\n */\n weekOnly(options?: { startsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 }): this {\n this._subtype = \"week\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"week\",\n ...(options?.startsOn !== undefined && { weekStartsOn: options.startsOn })\n };\n return this;\n }\n\n /**\n * Year picker with a scrollable grid.\n * @example\n * datetime().yearOnly()\n * datetime().yearOnly({ range: [2010, 2030] })\n *\n * Value format: `2026` (number)\n */\n yearOnly(options?: { range?: [number, number] }): this {\n this._subtype = \"year\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"year\",\n ...(options?.range && { yearRange: options.range })\n };\n return this;\n }\n\n /**\n * Date range picker with a two-month calendar.\n * @example datetime().dateRange()\n *\n * Value format: `{ from: \"2026-05-01\", to: \"2026-05-15\" }`\n */\n dateRange(): this {\n this._subtype = \"dateRange\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = { ...this._config.rendererSettings, type: \"dateRange\" };\n return this;\n }\n\n /**\n * Select multiple individual dates.\n * @example datetime().multipleDates()\n *\n * Value format: `[\"2026-05-01\", \"2026-05-03\"]`\n */\n multipleDates(): this {\n this._subtype = \"multipleDates\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"multipleDates\"\n };\n return this;\n }\n\n /**\n * Select multiple months.\n * @example datetime().multipleMonths()\n *\n * Value format: `[\"2026-01\", \"2026-03\"]`\n */\n multipleMonths(): this {\n this._subtype = \"multipleMonths\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"multipleMonths\"\n };\n return this;\n }\n\n /**\n * Select multiple years.\n * @example\n * datetime().multipleYears()\n * datetime().multipleYears({ range: [2020, 2035] })\n *\n * Value format: `[2024, 2025, 2026]`\n */\n multipleYears(options?: { range?: [number, number] }): this {\n this._subtype = \"multipleYears\";\n this._config.renderer = \"dateTimeInput\";\n this._config.rendererSettings = {\n ...this._config.rendererSettings,\n type: \"multipleYears\",\n ...(options?.range && { yearRange: options.range })\n };\n return this;\n }\n\n /**\n * Add quick-select preset buttons to the picker. Available on all variants.\n * Each preset's `value` function is called at click time, and the variant\n * handles formatting the Date into its value type.\n * @example\n * datetime().dateOnly().presets([\n * { label: \"Today\", value: () => new Date() },\n * { label: \"In a week\", value: () => addDays(new Date(), 7) }\n * ])\n */\n presets(presets: Array<{ label: string; value: () => Date }>): this {\n this._config.rendererSettings = { ...this._config.rendererSettings, presets };\n return this;\n }\n\n /**\n * Customize the display format shown in the picker trigger.\n * Uses date-fns format tokens.\n * @example\n * datetime().dateOnly().displayFormat(\"MM/dd/yyyy\") // \"05/01/2026\"\n * datetime().dateOnly().displayFormat(\"dd MMM yyyy\") // \"01 May 2026\"\n * datetime().monthOnly().displayFormat(\"MMMM yyyy\") // \"May 2026\"\n */\n displayFormat(format: string): this {\n this._config.rendererSettings = { ...this._config.rendererSettings, displayFormat: format };\n return this;\n }\n\n override normalizeValue(value: unknown): unknown {\n if (value == null || value === \"\") {\n return value;\n }\n switch (this._subtype) {\n case \"date\":\n return normalizeDateOnly(String(value));\n case \"time\":\n return normalizeTime(String(value));\n case \"dateTimeWithoutTimezone\":\n return normalizeDateTimeWithoutTimezone(String(value));\n case \"dateTimeWithTimezone\":\n return normalizeDateTimeWithTimezone(String(value));\n case \"month\":\n return normalizeMonth(String(value));\n case \"week\":\n return normalizeWeek(String(value));\n case \"year\":\n return normalizeYear(value);\n case \"dateRange\":\n case \"multipleDates\":\n case \"multipleMonths\":\n return value;\n case \"multipleYears\":\n return normalizeMultipleYears(value);\n default:\n return value;\n }\n }\n}\n\nfunction normalizeDateOnly(value: string): string {\n try {\n return new Date(value).toISOString().slice(0, 10);\n } catch {\n return value;\n }\n}\n\nfunction normalizeTime(value: string): string {\n if (!value.includes(\":\")) {\n return value;\n }\n const parts = value.split(\":\");\n if (parts.length === 3) {\n return value;\n }\n if (parts.length === 2) {\n return `${value}:00`;\n }\n return value;\n}\n\nfunction normalizeDateTimeWithoutTimezone(value: string): string {\n if (!value.includes(\" \") && !value.includes(\"T\")) {\n return value;\n }\n try {\n const normalized = value.includes(\" \") ? value.replace(\" \", \"T\") : value;\n const withZ =\n normalized.endsWith(\"Z\") ||\n normalized.includes(\"+\") ||\n /\\d-\\d{2}:\\d{2}$/.test(normalized)\n ? normalized\n : `${normalized}.000Z`;\n return new Date(withZ).toISOString();\n } catch {\n return value;\n }\n}\n\nfunction normalizeDateTimeWithTimezone(value: string): string {\n if (!value.includes(\"T\")) {\n return value;\n }\n const [initialDate, rest] = value.split(\"T\");\n if (!rest) {\n return value;\n }\n\n let date: string;\n try {\n date = new Date(initialDate).toISOString().slice(0, 10);\n } catch {\n return value;\n }\n\n const sign = rest.includes(\"+\") ? \"+\" : \"-\";\n const [timePart, tz] = rest.split(sign);\n const time = normalizeTime(timePart);\n\n return `${date}T${time}${sign}${tz}`;\n}\n\nfunction normalizeMonth(value: string): string {\n if (/^\\d{4}-\\d{2}$/.test(value)) {\n return value;\n }\n try {\n const d = new Date(value);\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, \"0\");\n return `${y}-${m}`;\n } catch {\n return value;\n }\n}\n\nfunction normalizeWeek(value: string): string {\n if (/^\\d{4}-W\\d{2}$/.test(value)) {\n return value;\n }\n return value;\n}\n\nfunction normalizeYear(value: unknown): number | unknown {\n const num = Number(value);\n if (!Number.isNaN(num) && Number.isFinite(num)) {\n return Math.round(num);\n }\n return value;\n}\n\nfunction normalizeMultipleYears(value: unknown): unknown {\n if (!Array.isArray(value)) {\n return value;\n }\n return value.map(v => {\n const num = Number(v);\n return !Number.isNaN(num) && Number.isFinite(num) ? Math.round(num) : v;\n });\n}\n\nclass DateTimeFieldTypeFactory implements IFieldTypeFactory {\n readonly type = \"datetime\";\n create(_registry: any) {\n return new DateTimeFieldBuilder();\n }\n}\n\nexport const DateTimeFieldType = FieldType.createImplementation({\n implementation: DateTimeFieldTypeFactory,\n dependencies: []\n});\n\ndeclare module \"../abstractions.js\" {\n interface IFieldBuilderRegistry {\n /**\n * Defines a field that stores date and/or time values.\n *\n * Variant methods (pick one):\n * - `dateOnly()` — \"2026-05-01\"\n * - `timeOnly()` — \"14:30:00\"\n * - `withoutTimezone()` — \"2026-05-01T14:30:00.000Z\"\n * - `withTimezone()` — \"2026-05-01T14:30:00+02:00\"\n * - `monthOnly()` — \"2026-05\"\n * - `weekOnly()` — \"2026-W18\"\n * - `yearOnly()` — 2026\n * - `dateRange()` — { from: \"2026-05-01\", to: \"2026-05-15\" }\n * - `multipleDates()` — [\"2026-05-01\", \"2026-05-03\"]\n * - `multipleMonths()` — [\"2026-01\", \"2026-03\"]\n * - `multipleYears()` — [2024, 2025, 2026]\n *\n * Configuration methods (chain after variant):\n * - `.presets([...])` — quick-select buttons (all variants)\n * - `.displayFormat(\"MM/dd/yyyy\")` — customize trigger display\n *\n * Variant-specific options (passed to variant method):\n * - `yearOnly({ range: [2020, 2030] })` — year range\n * - `multipleYears({ range: [2020, 2035] })` — year range\n * - `weekOnly({ startsOn: 1 })` — first day of week (0=Sun, 1=Mon)\n *\n * @example\n * datetime() // full UTC datetime (default)\n * datetime().dateOnly() // birthdays, due dates, holidays\n * datetime().timeOnly() // opening hours, daily reminders\n * datetime().withTimezone() // events tied to a specific locale\n * datetime().withoutTimezone() // timestamps, logs, sortable moments\n * datetime().monthOnly() // billing cycles, report periods\n * datetime().weekOnly() // sprint planning, weekly schedules\n * datetime().yearOnly({ range: [2010, 2030] }) // fiscal years\n * datetime().dateRange() // vacation requests, booking windows\n * datetime().multipleDates() // blackout dates, recurring events\n * datetime().multipleMonths() // seasonal availability\n * datetime().multipleYears({ range: [2020, 2035] }) // multi-year budgets\n * datetime().dateOnly().presets([...]).displayFormat(\"dd/MM/yyyy\")\n */\n datetime(): DateTimeFieldBuilder;\n }\n}\n"],"names":["DateTimeFieldBuilder","FieldBuilder","options","undefined","presets","format","value","normalizeDateOnly","String","normalizeTime","normalizeDateTimeWithoutTimezone","normalizeDateTimeWithTimezone","normalizeMonth","normalizeWeek","normalizeYear","normalizeMultipleYears","Date","parts","normalized","withZ","initialDate","rest","date","sign","timePart","tz","time","d","y","m","num","Number","Math","Array","v","DateTimeFieldTypeFactory","_registry","DateTimeFieldType","FieldType"],"mappings":";;AAgBO,MAAMA,6BAA6BC;IAGtC,aAAc;QACV,KAAK,CAAC,kBAHF,QAAQ,GAAoB;QAIhC,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG;QACxB,IAAI,CAAC,OAAO,CAAC,gBAAgB,GAAG;YAAE,MAAM;QAAO;IACnD;IAES,OAAa;QAClB,KAAK,CAAC;QACN,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG;QACxB,OAAO,IAAI;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AAW;QACvB,MAAME,IAAIrB,OAAOmB,EAAE,QAAQ,KAAK,GAAG,QAAQ,CAAC,GAAG;QAC/C,OAAO,GAAGC,EAAE,CAAC,EAAEC,GAAG;IACtB,EAAE,OAAM;QACJ,OAAOvB;IACX;AACJ;AAEA,SAASO,cAAcP,KAAa;IAC5B,iBAAiB,IAAI,CAACA;IAG1B,OAAOA;AACX;AAEA,SAASQ,cAAcR,KAAc;IACjC,MAAMwB,MAAMC,OAAOzB;IACnB,IAAI,CAACyB,OAAO,KAAK,CAACD,QAAQC,OAAO,QAAQ,CAACD,MACtC,OAAOE,KAAK,KAAK,CAACF;IAEtB,OAAOxB;AACX;AAEA,SAASS,uBAAuBT,KAAc;IAC1C,IAAI,CAAC2B,MAAM,OAAO,CAAC3B,QACf,OAAOA;IAEX,OAAOA,MAAM,GAAG,CAAC4B,CAAAA;QACb,MAAMJ,MAAMC,OAAOG;QACnB,OAAO,CAACH,OAAO,KAAK,CAACD,QAAQC,OAAO,QAAQ,CAACD,OAAOE,KAAK,KAAK,CAACF,OAAOI;IAC1E;AACJ;AAEA,MAAMC;IAEF,OAAOC,SAAc,EAAE;QACnB,OAAO,IAAIpC;IACf;;aAHS,IAAI,GAAG;;AAIpB;AAEO,MAAMqC,oBAAoBC,UAAU,oBAAoB,CAAC;IAC5D,gBAAgBH;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { type IFieldTypeFactory } from "../abstractions.js";
|
|
2
2
|
import { FieldBuilder } from "../FieldBuilder.js";
|
|
3
|
+
export interface FileFieldSettings extends Record<string, unknown> {
|
|
4
|
+
images?: boolean;
|
|
5
|
+
accept?: string[];
|
|
6
|
+
own?: boolean;
|
|
7
|
+
scope?: string;
|
|
8
|
+
}
|
|
3
9
|
export declare class FileFieldBuilder extends FieldBuilder<"file"> {
|
|
4
10
|
constructor();
|
|
11
|
+
list(): this;
|
|
12
|
+
imagesOnly(): this;
|
|
13
|
+
accept(mimeTypes: string[]): this;
|
|
14
|
+
own(): this;
|
|
15
|
+
scope(scope: string): this;
|
|
5
16
|
}
|
|
6
17
|
declare class FileFieldTypeFactory implements IFieldTypeFactory {
|
|
7
18
|
readonly type = "file";
|
|
@@ -12,7 +23,7 @@ export declare const FileFieldType: typeof FileFieldTypeFactory & {
|
|
|
12
23
|
};
|
|
13
24
|
declare module "../abstractions.js" {
|
|
14
25
|
interface IFieldBuilderRegistry {
|
|
15
|
-
file():
|
|
26
|
+
file(): FileFieldBuilder;
|
|
16
27
|
}
|
|
17
28
|
}
|
|
18
29
|
export {};
|
|
@@ -1,20 +1,56 @@
|
|
|
1
1
|
import { FieldType } from "../abstractions.js";
|
|
2
2
|
import { FieldBuilder } from "../FieldBuilder.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
class FileFieldBuilder extends FieldBuilder {
|
|
4
|
+
constructor(){
|
|
5
|
+
super("file");
|
|
6
|
+
this._config.renderer = "filePicker";
|
|
7
|
+
}
|
|
8
|
+
list() {
|
|
9
|
+
super.list();
|
|
10
|
+
if ("filePicker" === this._config.renderer) this._config.renderer = "multiFilePicker";
|
|
11
|
+
return this;
|
|
12
|
+
}
|
|
13
|
+
imagesOnly() {
|
|
14
|
+
this._config.rendererSettings = {
|
|
15
|
+
...this._config.rendererSettings,
|
|
16
|
+
images: true
|
|
17
|
+
};
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
accept(mimeTypes) {
|
|
21
|
+
this._config.rendererSettings = {
|
|
22
|
+
...this._config.rendererSettings,
|
|
23
|
+
accept: mimeTypes
|
|
24
|
+
};
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
own() {
|
|
28
|
+
this._config.rendererSettings = {
|
|
29
|
+
...this._config.rendererSettings,
|
|
30
|
+
own: true
|
|
31
|
+
};
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
scope(scope) {
|
|
35
|
+
this._config.rendererSettings = {
|
|
36
|
+
...this._config.rendererSettings,
|
|
37
|
+
scope
|
|
38
|
+
};
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
8
41
|
}
|
|
9
42
|
class FileFieldTypeFactory {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
43
|
+
create(_registry) {
|
|
44
|
+
return new FileFieldBuilder();
|
|
45
|
+
}
|
|
46
|
+
constructor(){
|
|
47
|
+
this.type = "file";
|
|
48
|
+
}
|
|
14
49
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
50
|
+
const FileFieldType = FieldType.createImplementation({
|
|
51
|
+
implementation: FileFieldTypeFactory,
|
|
52
|
+
dependencies: []
|
|
18
53
|
});
|
|
54
|
+
export { FileFieldBuilder, FileFieldType };
|
|
19
55
|
|
|
20
56
|
//# sourceMappingURL=FileFieldType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/formModel/fieldTypes/FileFieldType.js","sources":["../../../../src/features/formModel/fieldTypes/FileFieldType.ts"],"sourcesContent":["import { FieldType, type IFieldTypeFactory } from \"../abstractions.js\";\nimport { FieldBuilder } from \"../FieldBuilder.js\";\n\nexport interface FileFieldSettings extends Record<string, unknown> {\n images?: boolean;\n accept?: string[];\n own?: boolean;\n scope?: string;\n}\n\nexport class FileFieldBuilder extends FieldBuilder<\"file\"> {\n constructor() {\n super(\"file\");\n this._config.renderer = \"filePicker\";\n }\n\n override list(): this {\n super.list();\n if (this._config.renderer === \"filePicker\") {\n this._config.renderer = \"multiFilePicker\";\n }\n return this;\n }\n\n imagesOnly(): this {\n this._config.rendererSettings = { ...this._config.rendererSettings, images: true };\n return this;\n }\n\n accept(mimeTypes: string[]): this {\n this._config.rendererSettings = { ...this._config.rendererSettings, accept: mimeTypes };\n return this;\n }\n\n own(): this {\n this._config.rendererSettings = { ...this._config.rendererSettings, own: true };\n return this;\n }\n\n scope(scope: string): this {\n this._config.rendererSettings = { ...this._config.rendererSettings, scope };\n return this;\n }\n}\n\nclass FileFieldTypeFactory implements IFieldTypeFactory {\n readonly type = \"file\";\n create(_registry: any) {\n return new FileFieldBuilder();\n }\n}\n\nexport const FileFieldType = FieldType.createImplementation({\n implementation: FileFieldTypeFactory,\n dependencies: []\n});\n\ndeclare module \"../abstractions.js\" {\n interface IFieldBuilderRegistry {\n file(): FileFieldBuilder;\n }\n}\n"],"names":["FileFieldBuilder","FieldBuilder","mimeTypes","scope","FileFieldTypeFactory","_registry","FileFieldType","FieldType"],"mappings":";;AAUO,MAAMA,yBAAyBC;IAClC,aAAc;QACV,KAAK,CAAC;QACN,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG;IAC5B;IAES,OAAa;QAClB,KAAK,CAAC;QACN,IAAI,AAA0B,iBAA1B,IAAI,CAAC,OAAO,CAAC,QAAQ,EACrB,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG;QAE5B,OAAO,IAAI;IACf;IAEA,aAAmB;QACf,IAAI,CAAC,OAAO,CAAC,gBAAgB,GAAG;YAAE,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB;YAAE,QAAQ;QAAK;QACjF,OAAO,IAAI;IACf;IAEA,OAAOC,SAAmB,EAAQ;QAC9B,IAAI,CAAC,OAAO,CAAC,gBAAgB,GAAG;YAAE,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB;YAAE,QAAQA;QAAU;QACtF,OAAO,IAAI;IACf;IAEA,MAAY;QACR,IAAI,CAAC,OAAO,CAAC,gBAAgB,GAAG;YAAE,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB;YAAE,KAAK;QAAK;QAC9E,OAAO,IAAI;IACf;IAEA,MAAMC,KAAa,EAAQ;QACvB,IAAI,CAAC,OAAO,CAAC,gBAAgB,GAAG;YAAE,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB;YAAEA;QAAM;QAC1E,OAAO,IAAI;IACf;AACJ;AAEA,MAAMC;IAEF,OAAOC,SAAc,EAAE;QACnB,OAAO,IAAIL;IACf;;aAHS,IAAI,GAAG;;AAIpB;AAEO,MAAMM,gBAAgBC,UAAU,oBAAoB,CAAC;IACxD,gBAAgBH;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { FieldType } from "../abstractions.js";
|
|
2
2
|
import { FieldBuilder } from "../FieldBuilder.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
class FileUrlFieldBuilder extends FieldBuilder {
|
|
4
|
+
constructor(){
|
|
5
|
+
super("fileUrl");
|
|
6
|
+
this._config.renderer = "fileUrlPicker";
|
|
7
|
+
}
|
|
8
8
|
}
|
|
9
9
|
class FileUrlFieldTypeFactory {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
create(_registry) {
|
|
11
|
+
return new FileUrlFieldBuilder();
|
|
12
|
+
}
|
|
13
|
+
constructor(){
|
|
14
|
+
this.type = "fileUrl";
|
|
15
|
+
}
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const FileUrlFieldType = FieldType.createImplementation({
|
|
18
|
+
implementation: FileUrlFieldTypeFactory,
|
|
19
|
+
dependencies: []
|
|
18
20
|
});
|
|
21
|
+
export { FileUrlFieldBuilder, FileUrlFieldType };
|
|
19
22
|
|
|
20
23
|
//# sourceMappingURL=FileUrlFieldType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/formModel/fieldTypes/FileUrlFieldType.js","sources":["../../../../src/features/formModel/fieldTypes/FileUrlFieldType.ts"],"sourcesContent":["import { FieldType, type IFieldTypeFactory, type IFieldBuilder } from \"../abstractions.js\";\nimport { FieldBuilder } from \"../FieldBuilder.js\";\n\nexport class FileUrlFieldBuilder extends FieldBuilder<\"fileUrl\"> {\n constructor() {\n super(\"fileUrl\");\n this._config.renderer = \"fileUrlPicker\";\n }\n}\n\nclass FileUrlFieldTypeFactory implements IFieldTypeFactory {\n readonly type = \"fileUrl\";\n create(_registry: any) {\n return new FileUrlFieldBuilder();\n }\n}\n\nexport const FileUrlFieldType = FieldType.createImplementation({\n implementation: FileUrlFieldTypeFactory,\n dependencies: []\n});\n\ndeclare module \"../abstractions.js\" {\n interface IFieldBuilderRegistry {\n fileUrl(): IFieldBuilder<\"fileUrl\", false, string | null>;\n }\n}\n"],"names":["FileUrlFieldBuilder","FieldBuilder","FileUrlFieldTypeFactory","_registry","FileUrlFieldType","FieldType"],"mappings":";;AAGO,MAAMA,4BAA4BC;IACrC,aAAc;QACV,KAAK,CAAC;QACN,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG;IAC5B;AACJ;AAEA,MAAMC;IAEF,OAAOC,SAAc,EAAE;QACnB,OAAO,IAAIH;IACf;;aAHS,IAAI,GAAG;;AAIpB;AAEO,MAAMI,mBAAmBC,UAAU,oBAAoB,CAAC;IAC3D,gBAAgBH;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { FieldType } from "../abstractions.js";
|
|
2
2
|
import { FieldBuilder } from "../FieldBuilder.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
class NumberFieldBuilder extends FieldBuilder {
|
|
4
|
+
constructor(){
|
|
5
|
+
super("number");
|
|
6
|
+
this._config.renderer = "numberInput";
|
|
7
|
+
}
|
|
8
|
+
normalizeValue(value) {
|
|
9
|
+
if (null == value || "" === value) return null;
|
|
10
|
+
const n = Number(value);
|
|
11
|
+
return Number.isNaN(n) ? null : n;
|
|
11
12
|
}
|
|
12
|
-
const n = Number(value);
|
|
13
|
-
return Number.isNaN(n) ? null : n;
|
|
14
|
-
}
|
|
15
13
|
}
|
|
16
14
|
class NumberFieldTypeFactory {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
create() {
|
|
16
|
+
return new NumberFieldBuilder();
|
|
17
|
+
}
|
|
18
|
+
constructor(){
|
|
19
|
+
this.type = "number";
|
|
20
|
+
}
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const NumberFieldType = FieldType.createImplementation({
|
|
23
|
+
implementation: NumberFieldTypeFactory,
|
|
24
|
+
dependencies: []
|
|
25
25
|
});
|
|
26
|
+
export { NumberFieldBuilder, NumberFieldType };
|
|
26
27
|
|
|
27
28
|
//# sourceMappingURL=NumberFieldType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/formModel/fieldTypes/NumberFieldType.js","sources":["../../../../src/features/formModel/fieldTypes/NumberFieldType.ts"],"sourcesContent":["import { FieldType, type IFieldTypeFactory } from \"../abstractions.js\";\nimport { FieldBuilder } from \"../FieldBuilder.js\";\n\nexport class NumberFieldBuilder extends FieldBuilder<\"number\"> {\n constructor() {\n super(\"number\");\n this._config.renderer = \"numberInput\";\n }\n\n override normalizeValue(value: unknown): unknown {\n if (value === null || value === undefined || value === \"\") {\n return null;\n }\n\n const n = Number(value);\n\n return Number.isNaN(n) ? null : n;\n }\n}\n\nclass NumberFieldTypeFactory implements IFieldTypeFactory {\n readonly type = \"number\";\n create() {\n return new NumberFieldBuilder();\n }\n}\n\nexport const NumberFieldType = FieldType.createImplementation({\n implementation: NumberFieldTypeFactory,\n dependencies: []\n});\n\ndeclare module \"../abstractions.js\" {\n interface IFieldBuilderRegistry {\n number(): IOptionsFieldBuilder<\"number\", number | null>;\n }\n}\n"],"names":["NumberFieldBuilder","FieldBuilder","value","n","Number","NumberFieldTypeFactory","NumberFieldType","FieldType"],"mappings":";;AAGO,MAAMA,2BAA2BC;IACpC,aAAc;QACV,KAAK,CAAC;QACN,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG;IAC5B;IAES,eAAeC,KAAc,EAAW;QAC7C,IAAIA,QAAAA,SAAyCA,AAAU,OAAVA,OACzC,OAAO;QAGX,MAAMC,IAAIC,OAAOF;QAEjB,OAAOE,OAAO,KAAK,CAACD,KAAK,OAAOA;IACpC;AACJ;AAEA,MAAME;IAEF,SAAS;QACL,OAAO,IAAIL;IACf;;aAHS,IAAI,GAAG;;AAIpB;AAEO,MAAMM,kBAAkBC,UAAU,oBAAoB,CAAC;IAC1D,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,109 +1,95 @@
|
|
|
1
1
|
import { FieldType } from "../abstractions.js";
|
|
2
2
|
import { FieldBuilder } from "../FieldBuilder.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
return builder;
|
|
3
|
+
function createTemplateBuilder() {
|
|
4
|
+
let label = "";
|
|
5
|
+
let icon;
|
|
6
|
+
let fieldsFactory;
|
|
7
|
+
let visibleFn;
|
|
8
|
+
const builder = {
|
|
9
|
+
label (text) {
|
|
10
|
+
label = text;
|
|
11
|
+
return builder;
|
|
12
|
+
},
|
|
13
|
+
icon (i) {
|
|
14
|
+
icon = i;
|
|
15
|
+
return builder;
|
|
16
|
+
},
|
|
17
|
+
fields (factory) {
|
|
18
|
+
fieldsFactory = factory;
|
|
19
|
+
return builder;
|
|
20
|
+
},
|
|
21
|
+
visible (predicate) {
|
|
22
|
+
visibleFn = predicate;
|
|
23
|
+
return builder;
|
|
24
|
+
},
|
|
25
|
+
_build (id, registry) {
|
|
26
|
+
const childBuilders = fieldsFactory ? fieldsFactory(registry) : {};
|
|
27
|
+
if ("_templateId" in childBuilders) throw new Error(`Template "${id}" defines a reserved field "_templateId". The discriminator is added automatically.`);
|
|
28
|
+
return {
|
|
29
|
+
id,
|
|
30
|
+
label,
|
|
31
|
+
icon,
|
|
32
|
+
childBuilders,
|
|
33
|
+
visible: visibleFn
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return builder;
|
|
40
38
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
super("object");
|
|
47
|
-
this._config.renderer = "objectAccordionSingle";
|
|
48
|
-
this._registry = registry;
|
|
49
|
-
}
|
|
50
|
-
fields(fn) {
|
|
51
|
-
this._childBuilders = fn(this._registry);
|
|
52
|
-
return this;
|
|
53
|
-
}
|
|
54
|
-
list() {
|
|
55
|
-
this._isList = true;
|
|
56
|
-
if (this._config.renderer === "objectAccordionSingle") {
|
|
57
|
-
this._config.renderer = "objectAccordionMultiple";
|
|
39
|
+
class ObjectFieldBuilder extends FieldBuilder {
|
|
40
|
+
constructor(registry){
|
|
41
|
+
super("object"), this._childBuilders = {}, this._isList = false, this._templateIds = new Set();
|
|
42
|
+
this._config.renderer = "objectAccordionSingle";
|
|
43
|
+
this._registry = registry;
|
|
58
44
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
this._listSchema = schema;
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
template(id, configure) {
|
|
66
|
-
if (id === "_templateId") {
|
|
67
|
-
throw new Error(`Template id "_templateId" is reserved. Choose a different id.`);
|
|
45
|
+
fields(fn) {
|
|
46
|
+
this._childBuilders = fn(this._registry);
|
|
47
|
+
return this;
|
|
68
48
|
}
|
|
69
|
-
|
|
70
|
-
|
|
49
|
+
list() {
|
|
50
|
+
this._isList = true;
|
|
51
|
+
if ("objectAccordionSingle" === this._config.renderer) this._config.renderer = "objectAccordionMultiple";
|
|
52
|
+
return this;
|
|
71
53
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (!this._templates) {
|
|
76
|
-
this._templates = [];
|
|
54
|
+
listSchema(schema) {
|
|
55
|
+
this._listSchema = schema;
|
|
56
|
+
return this;
|
|
77
57
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
58
|
+
template(id, configure) {
|
|
59
|
+
if ("_templateId" === id) throw new Error('Template id "_templateId" is reserved. Choose a different id.');
|
|
60
|
+
if (this._templateIds.has(id)) throw new Error(`Duplicate template id "${id}".`);
|
|
61
|
+
this._templateIds.add(id);
|
|
62
|
+
const tb = createTemplateBuilder();
|
|
63
|
+
configure(tb);
|
|
64
|
+
if (!this._templates) this._templates = [];
|
|
65
|
+
this._templates.push(tb._build(id, this._registry));
|
|
66
|
+
if ("objectAccordionSingle" === this._config.renderer || "objectAccordionMultiple" === this._config.renderer) this._config.renderer = "dynamicZone";
|
|
67
|
+
return this;
|
|
81
68
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
69
|
+
build(name) {
|
|
70
|
+
if (this._templates && Object.keys(this._childBuilders).length > 0) throw new Error(`Object field "${name}" has both .fields() and .template() defined. Templates are mutually exclusive with .fields(); each template defines its own children.`);
|
|
71
|
+
return {
|
|
72
|
+
...this._config,
|
|
73
|
+
name,
|
|
74
|
+
childBuilders: this._childBuilders,
|
|
75
|
+
isList: this._isList,
|
|
76
|
+
listSchema: this._listSchema,
|
|
77
|
+
templates: this._templates
|
|
78
|
+
};
|
|
87
79
|
}
|
|
88
|
-
return {
|
|
89
|
-
...this._config,
|
|
90
|
-
name,
|
|
91
|
-
childBuilders: this._childBuilders,
|
|
92
|
-
isList: this._isList,
|
|
93
|
-
listSchema: this._listSchema,
|
|
94
|
-
templates: this._templates
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
80
|
}
|
|
98
81
|
class ObjectFieldTypeFactory {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
82
|
+
create(registry) {
|
|
83
|
+
return new ObjectFieldBuilder(registry);
|
|
84
|
+
}
|
|
85
|
+
constructor(){
|
|
86
|
+
this.type = "object";
|
|
87
|
+
}
|
|
103
88
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
89
|
+
const ObjectFieldType = FieldType.createImplementation({
|
|
90
|
+
implementation: ObjectFieldTypeFactory,
|
|
91
|
+
dependencies: []
|
|
107
92
|
});
|
|
93
|
+
export { ObjectFieldBuilder, ObjectFieldType, createTemplateBuilder };
|
|
108
94
|
|
|
109
95
|
//# sourceMappingURL=ObjectFieldType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"features/formModel/fieldTypes/ObjectFieldType.js","sources":["../../../../src/features/formModel/fieldTypes/ObjectFieldType.ts"],"sourcesContent":["import type { z } from \"zod\";\nimport {\n FieldType,\n type IFieldTypeFactory,\n type IFieldBuilder,\n type IFieldBuilderRegistry,\n type IObjectFieldBuilder,\n type IObjectFieldConfig,\n type ITemplateBuilder,\n type ITemplateConfig,\n type ITemplateIcon\n} from \"../abstractions.js\";\nimport type { IFormModel } from \"../abstractions.js\";\nimport { FieldBuilder } from \"../FieldBuilder.js\";\n\ninterface TemplateBuilderInternal extends ITemplateBuilder {\n _build(id: string, registry: IFieldBuilderRegistry): ITemplateConfig;\n}\n\nexport function createTemplateBuilder(): TemplateBuilderInternal {\n let label = \"\";\n let icon: ITemplateIcon | undefined;\n let fieldsFactory:\n | ((registry: IFieldBuilderRegistry) => Record<string, IFieldBuilder>)\n | undefined;\n let visibleFn: ((form: IFormModel) => boolean) | undefined;\n\n const builder: TemplateBuilderInternal = {\n label(text: string) {\n label = text;\n return builder;\n },\n icon(i: ITemplateIcon) {\n icon = i;\n return builder;\n },\n fields(factory) {\n fieldsFactory = factory;\n return builder;\n },\n visible(predicate) {\n visibleFn = predicate;\n return builder;\n },\n _build(id: string, registry: IFieldBuilderRegistry): ITemplateConfig {\n const childBuilders = fieldsFactory ? fieldsFactory(registry) : {};\n if (\"_templateId\" in childBuilders) {\n throw new Error(\n `Template \"${id}\" defines a reserved field \"_templateId\". ` +\n `The discriminator is added automatically.`\n );\n }\n return { id, label, icon, childBuilders, visible: visibleFn };\n }\n };\n return builder;\n}\n\nexport class ObjectFieldBuilder extends FieldBuilder<\"object\"> implements IObjectFieldBuilder {\n private _childBuilders: Record<string, IFieldBuilder> = {};\n private _isList = false;\n private _listSchema?: z.ZodTypeAny;\n private _templates?: ITemplateConfig[];\n private _templateIds = new Set<string>();\n private _registry: IFieldBuilderRegistry;\n\n constructor(registry: IFieldBuilderRegistry) {\n super(\"object\");\n this._config.renderer = \"objectAccordionSingle\";\n this._registry = registry;\n }\n\n fields(fn: (registry: IFieldBuilderRegistry) => Record<string, IFieldBuilder>): this {\n this._childBuilders = fn(this._registry);\n return this;\n }\n\n override list(): this {\n this._isList = true;\n if (this._config.renderer === \"objectAccordionSingle\") {\n this._config.renderer = \"objectAccordionMultiple\";\n }\n return this;\n }\n\n listSchema(schema: z.ZodTypeAny): this {\n this._listSchema = schema;\n return this;\n }\n\n template(id: string, configure: (t: ITemplateBuilder) => void): this {\n if (id === \"_templateId\") {\n throw new Error(`Template id \"_templateId\" is reserved. Choose a different id.`);\n }\n if (this._templateIds.has(id)) {\n throw new Error(`Duplicate template id \"${id}\".`);\n }\n this._templateIds.add(id);\n\n const tb = createTemplateBuilder();\n configure(tb);\n\n if (!this._templates) {\n this._templates = [];\n }\n this._templates.push(tb._build(id, this._registry));\n\n if (\n this._config.renderer === \"objectAccordionSingle\" ||\n this._config.renderer === \"objectAccordionMultiple\"\n ) {\n this._config.renderer = \"dynamicZone\";\n }\n\n return this;\n }\n\n override build(name: string): IObjectFieldConfig {\n if (this._templates && Object.keys(this._childBuilders).length > 0) {\n throw new Error(\n `Object field \"${name}\" has both .fields() and .template() defined. ` +\n `Templates are mutually exclusive with .fields(); each template defines its own children.`\n );\n }\n\n return {\n ...this._config,\n name,\n childBuilders: this._childBuilders,\n isList: this._isList,\n listSchema: this._listSchema,\n templates: this._templates\n };\n }\n}\n\nclass ObjectFieldTypeFactory implements IFieldTypeFactory {\n readonly type = \"object\";\n create(registry: IFieldBuilderRegistry) {\n return new ObjectFieldBuilder(registry);\n }\n}\n\nexport const ObjectFieldType = FieldType.createImplementation({\n implementation: ObjectFieldTypeFactory,\n dependencies: []\n});\n\ndeclare module \"../abstractions.js\" {\n interface IFieldBuilderRegistry {\n object(): IObjectFieldBuilder;\n }\n}\n"],"names":["createTemplateBuilder","label","icon","fieldsFactory","visibleFn","builder","text","i","factory","predicate","id","registry","childBuilders","Error","ObjectFieldBuilder","FieldBuilder","Set","fn","schema","configure","tb","name","Object","ObjectFieldTypeFactory","ObjectFieldType","FieldType"],"mappings":";;AAmBO,SAASA;IACZ,IAAIC,QAAQ;IACZ,IAAIC;IACJ,IAAIC;IAGJ,IAAIC;IAEJ,MAAMC,UAAmC;QACrC,OAAMC,IAAY;YACdL,QAAQK;YACR,OAAOD;QACX;QACA,MAAKE,CAAgB;YACjBL,OAAOK;YACP,OAAOF;QACX;QACA,QAAOG,OAAO;YACVL,gBAAgBK;YAChB,OAAOH;QACX;QACA,SAAQI,SAAS;YACbL,YAAYK;YACZ,OAAOJ;QACX;QACA,QAAOK,EAAU,EAAEC,QAA+B;YAC9C,MAAMC,gBAAgBT,gBAAgBA,cAAcQ,YAAY,CAAC;YACjE,IAAI,iBAAiBC,eACjB,MAAM,IAAIC,MACN,CAAC,UAAU,EAAEH,GAAG,mFAA0C,CAAC;YAInE,OAAO;gBAAEA;gBAAIT;gBAAOC;gBAAMU;gBAAe,SAASR;YAAU;QAChE;IACJ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AAsB;QAC7C,IAAI,IAAI,CAAC,UAAU,IAAIC,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,GAC7D,MAAM,IAAIT,MACN,CAAC,cAAc,EAAEQ,KAAK,sIAA8C,CAAC;QAK7E,OAAO;YACH,GAAG,IAAI,CAAC,OAAO;YACfA;YACA,eAAe,IAAI,CAAC,cAAc;YAClC,QAAQ,IAAI,CAAC,OAAO;YACpB,YAAY,IAAI,CAAC,WAAW;YAC5B,WAAW,IAAI,CAAC,UAAU;QAC9B;IACJ;AACJ;AAEA,MAAME;IAEF,OAAOZ,QAA+B,EAAE;QACpC,OAAO,IAAIG,mBAAmBH;IAClC;;aAHS,IAAI,GAAG;;AAIpB;AAEO,MAAMa,kBAAkBC,UAAU,oBAAoB,CAAC;IAC1D,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { FieldType } from "../abstractions.js";
|
|
2
2
|
import { FieldBuilder } from "../FieldBuilder.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
class TextFieldBuilder extends FieldBuilder {
|
|
4
|
+
constructor(){
|
|
5
|
+
super("text");
|
|
6
|
+
this._config.renderer = "textInput";
|
|
7
|
+
}
|
|
8
8
|
}
|
|
9
9
|
class TextFieldTypeFactory {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
create(_registry) {
|
|
11
|
+
return new TextFieldBuilder();
|
|
12
|
+
}
|
|
13
|
+
constructor(){
|
|
14
|
+
this.type = "text";
|
|
15
|
+
}
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
const TextFieldType = FieldType.createImplementation({
|
|
18
|
+
implementation: TextFieldTypeFactory,
|
|
19
|
+
dependencies: []
|
|
18
20
|
});
|
|
21
|
+
export { TextFieldBuilder, TextFieldType };
|
|
19
22
|
|
|
20
23
|
//# sourceMappingURL=TextFieldType.js.map
|