@webiny/app-admin 6.6.0-alpha.0 → 6.6.0-alpha.2
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/base/Admin.js +17 -2
- package/base/Admin.js.map +1 -1
- package/base/Base/DefaultFieldRenderers.js +17 -2
- package/base/Base/DefaultFieldRenderers.js.map +1 -1
- package/base/Base/FieldRenderers/AutoCompleteRenderer.d.ts +13 -0
- package/base/Base/FieldRenderers/AutoCompleteRenderer.js +29 -0
- package/base/Base/FieldRenderers/AutoCompleteRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/HorizontalTabsRenderer.d.ts +2 -2
- package/base/Base/FieldRenderers/LexicalRenderer.js +10 -6
- package/base/Base/FieldRenderers/LexicalRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/MultiFilePickerRenderer.js +8 -5
- package/base/Base/FieldRenderers/MultiFilePickerRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/MultiSelectRenderer.d.ts +15 -0
- package/base/Base/FieldRenderers/MultiSelectRenderer.js +31 -0
- package/base/Base/FieldRenderers/MultiSelectRenderer.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.d.ts +2 -0
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js +5 -2
- package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.d.ts +11 -0
- package/base/Base/FieldRenderers/ObjectRenderer/{MultiValueDynamicZone.js → MultiValueDynamicZone/MultiValueDynamicZone.js} +65 -14
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZonePresenter.d.ts +13 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZonePresenter.js +28 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZonePresenter.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/abstractions.d.ts +15 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/abstractions.js +5 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/abstractions.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/feature.d.ts +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/feature.js +11 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/feature.js.map +1 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/index.d.ts +2 -0
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/index.js +2 -0
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.d.ts +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +19 -3
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +10 -8
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +34 -3
- package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.d.ts +3 -2
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +11 -5
- package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +1 -1
- package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +1 -1
- package/base/Base/FieldRenderers/SelectRenderer.d.ts +6 -0
- package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -1
- package/base/Base/FieldRenderers/VerticalTabsRenderer.d.ts +2 -2
- package/base/Base/Menus.js +4 -4
- package/base/Base/Menus.js.map +1 -1
- package/base/createRootContainer.js +4 -2
- package/base/createRootContainer.js.map +1 -1
- package/components/Drawers/DrawerParamsContext.d.ts +6 -0
- package/components/Drawers/DrawerParamsContext.js +10 -0
- package/components/Drawers/DrawerParamsContext.js.map +1 -0
- package/components/Drawers/DrawersContext.d.ts +13 -0
- package/components/Drawers/DrawersContext.js +50 -0
- package/components/Drawers/DrawersContext.js.map +1 -0
- package/components/Drawers/useDrawers.d.ts +2 -0
- package/components/Drawers/useDrawers.js +10 -0
- package/components/Drawers/useDrawers.js.map +1 -0
- package/components/Filters/Filters.js +4 -3
- package/components/Filters/Filters.js.map +1 -1
- package/components/IconPicker/IconPickerComponent.d.ts +2 -2
- package/components/LexicalEditor/LexicalLinkForm.js +3 -0
- package/components/LexicalEditor/LexicalLinkForm.js.map +1 -1
- package/components/ListView/ListViewBulkActions.d.ts +2 -2
- package/components/ListView/ListViewContent.d.ts +2 -2
- package/components/ListView/ListViewFilters.d.ts +2 -2
- package/components/ListView/index.d.ts +6 -6
- package/components/OverlayLayout/OverlayLayout.js +4 -2
- package/components/OverlayLayout/OverlayLayout.js.map +1 -1
- package/components/OverlayLayout/components/OverlayContent.js +1 -0
- package/components/OverlayLayout/components/OverlayContent.js.map +1 -1
- package/components/RolesMultiAutocomplete/index.d.ts +4 -2
- package/components/SplitView/SplitView.js +1 -1
- package/components/SplitView/SplitView.js.map +1 -1
- package/components/Table/components/Table/TableInner.d.ts +2 -2
- package/components/TeamAutocomplete/index.d.ts +4 -2
- package/components/TeamsMultiAutocomplete/index.d.ts +4 -2
- package/components/index.d.ts +0 -1
- package/components/index.js +0 -1
- package/config/AdminConfig/Breadcrumbs.d.ts +42 -0
- package/config/AdminConfig/Breadcrumbs.js +24 -0
- package/config/AdminConfig/Breadcrumbs.js.map +1 -0
- package/config/AdminConfig/Drawer.d.ts +10 -0
- package/config/AdminConfig/Drawer.js +19 -0
- package/config/AdminConfig/Drawer.js.map +1 -0
- package/config/AdminConfig/LexicalTheme/AllowCustomColors.d.ts +5 -0
- package/config/AdminConfig/LexicalTheme/AllowCustomColors.js +18 -0
- package/config/AdminConfig/LexicalTheme/AllowCustomColors.js.map +1 -0
- package/config/AdminConfig/LexicalTheme.d.ts +2 -0
- package/config/AdminConfig/LexicalTheme.js +2 -0
- package/config/AdminConfig/LexicalTheme.js.map +1 -1
- package/config/AdminConfig.d.ts +8 -0
- package/config/AdminConfig.js +8 -1
- package/config/AdminConfig.js.map +1 -1
- package/exports/admin.d.ts +3 -0
- package/exports/admin.js +3 -0
- package/features/accessManagement/types.d.ts +3 -3
- package/features/aiChat/AiChatGateway.d.ts +30 -0
- package/features/aiChat/AiChatGateway.js +41 -0
- package/features/aiChat/AiChatGateway.js.map +1 -0
- package/features/aiChat/AiChatPresenter.d.ts +32 -0
- package/features/aiChat/AiChatPresenter.js +220 -0
- package/features/aiChat/AiChatPresenter.js.map +1 -0
- package/features/aiChat/abstractions.d.ts +124 -0
- package/features/aiChat/abstractions.js +6 -0
- package/features/aiChat/abstractions.js.map +1 -0
- package/features/aiChat/feature.d.ts +3 -0
- package/features/aiChat/feature.js +19 -0
- package/features/aiChat/feature.js.map +1 -0
- package/features/aiChat/index.d.ts +6 -0
- package/features/aiChat/index.js +3 -0
- package/features/dateFormatter/DefaultDateFormatter.d.ts +8 -0
- package/features/dateFormatter/DefaultDateFormatter.js +25 -0
- package/features/dateFormatter/DefaultDateFormatter.js.map +1 -0
- package/features/dateFormatter/abstractions.d.ts +13 -0
- package/features/dateFormatter/abstractions.js +5 -0
- package/features/dateFormatter/abstractions.js.map +1 -0
- package/features/dateFormatter/feature.d.ts +3 -0
- package/features/dateFormatter/feature.js +17 -0
- package/features/dateFormatter/feature.js.map +1 -0
- package/features/dateFormatter/index.d.ts +4 -0
- package/features/dateFormatter/index.js +4 -0
- package/features/dateFormatter/useDateFormatter.d.ts +5 -0
- package/features/dateFormatter/useDateFormatter.js +8 -0
- package/features/dateFormatter/useDateFormatter.js.map +1 -0
- package/features/featureFlags/FeatureFlagsGateway.d.ts +10 -0
- package/features/featureFlags/FeatureFlagsGateway.js +40 -0
- package/features/featureFlags/FeatureFlagsGateway.js.map +1 -0
- package/features/featureFlags/FeatureFlagsService.d.ts +16 -0
- package/features/featureFlags/FeatureFlagsService.js +64 -0
- package/features/featureFlags/FeatureFlagsService.js.map +1 -0
- package/features/featureFlags/abstractions.d.ts +19 -0
- package/features/featureFlags/abstractions.js +6 -0
- package/features/featureFlags/abstractions.js.map +1 -0
- package/features/featureFlags/feature.d.ts +3 -0
- package/features/featureFlags/feature.js +19 -0
- package/features/featureFlags/feature.js.map +1 -0
- package/features/formModel/Field.js +10 -0
- package/features/formModel/Field.js.map +1 -1
- package/features/formModel/FieldBuilder.js +1 -1
- package/features/formModel/FieldBuilder.js.map +1 -1
- package/features/formModel/FieldBuilder.test.js +4 -4
- package/features/formModel/FieldBuilder.test.js.map +1 -1
- package/features/formModel/FormErrors.d.ts +2 -2
- package/features/formModel/FormModel.test.js +50 -0
- package/features/formModel/FormModel.test.js.map +1 -1
- package/features/formModel/FormView.d.ts +8 -4
- package/features/formModel/PresenterErrors.d.ts +2 -2
- package/features/formModel/demo/FormModelDemo.d.ts +2 -2
- package/features/formModel/renderers.d.ts +1 -0
- package/features/formModel/renderers.js +1 -0
- package/features/notifications/NotificationsRenderer.d.ts +2 -2
- package/features/security/AuthenticationContext/ApiStreamClientDecorator.d.ts +22 -0
- package/features/security/AuthenticationContext/ApiStreamClientDecorator.js +32 -0
- package/features/security/AuthenticationContext/ApiStreamClientDecorator.js.map +1 -0
- package/features/security/AuthenticationContext/feature.js +2 -0
- package/features/security/AuthenticationContext/feature.js.map +1 -1
- package/features/slugify/DefaultSlugify.d.ts +8 -0
- package/features/slugify/DefaultSlugify.js +20 -0
- package/features/slugify/DefaultSlugify.js.map +1 -0
- package/features/slugify/abstractions.d.ts +12 -0
- package/features/slugify/abstractions.js +5 -0
- package/features/slugify/abstractions.js.map +1 -0
- package/features/slugify/feature.d.ts +1 -0
- package/features/slugify/feature.js +11 -0
- package/features/slugify/feature.js.map +1 -0
- package/features/slugify/index.d.ts +3 -0
- package/features/slugify/index.js +3 -0
- package/features/stringFormatter/DefaultStringFormatter.d.ts +17 -0
- package/features/stringFormatter/DefaultStringFormatter.js +19 -0
- package/features/stringFormatter/DefaultStringFormatter.js.map +1 -0
- package/features/stringFormatter/abstractions.d.ts +11 -0
- package/features/stringFormatter/abstractions.js +5 -0
- package/features/stringFormatter/abstractions.js.map +1 -0
- package/features/stringFormatter/feature.d.ts +3 -0
- package/features/stringFormatter/feature.js +19 -0
- package/features/stringFormatter/feature.js.map +1 -0
- package/features/stringFormatter/index.d.ts +4 -0
- package/features/stringFormatter/index.js +4 -0
- package/features/stringFormatter/useStringFormatter.d.ts +5 -0
- package/features/stringFormatter/useStringFormatter.js +8 -0
- package/features/stringFormatter/useStringFormatter.js.map +1 -0
- package/features/tenancy/ApiStreamClientDecorator.d.ts +16 -0
- package/features/tenancy/ApiStreamClientDecorator.js +30 -0
- package/features/tenancy/ApiStreamClientDecorator.js.map +1 -0
- package/features/tenancy/feature.js +2 -0
- package/features/tenancy/feature.js.map +1 -1
- package/features/wcp/ReactLicense.d.ts +6 -0
- package/features/wcp/ReactLicense.js +18 -0
- package/features/wcp/ReactLicense.js.map +1 -1
- package/features/wcp/WcpGateway.js +3 -0
- package/features/wcp/WcpGateway.js.map +1 -1
- package/hooks/index.d.ts +3 -0
- package/hooks/index.js +3 -0
- package/hooks/useDrawer.d.ts +9 -0
- package/hooks/useDrawer.js +19 -0
- package/hooks/useDrawer.js.map +1 -0
- package/hooks/useHotkeys.js +5 -3
- package/hooks/useHotkeys.js.map +1 -1
- package/hooks/useOpenDrawer.d.ts +7 -0
- package/hooks/useOpenDrawer.js +18 -0
- package/hooks/useOpenDrawer.js.map +1 -0
- package/hooks/useSnackbar.js.map +1 -1
- package/index.d.ts +18 -1
- package/index.js +23 -12
- package/modules/AccessManagementExtension.js +46 -22
- package/modules/AccessManagementExtension.js.map +1 -1
- package/package.json +31 -28
- package/presentation/accessManagement/SecurityPermissions.js +3 -3
- package/presentation/accessManagement/SecurityPermissions.js.map +1 -1
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.d.ts +3 -1
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js +13 -16
- package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js.map +1 -1
- package/presentation/accessManagement/apiKeys/components/ApiKeysView.d.ts +2 -2
- package/presentation/accessManagement/apiKeys/components/ApiKeysView.js +13 -7
- package/presentation/accessManagement/apiKeys/components/ApiKeysView.js.map +1 -1
- package/presentation/accessManagement/roles/RolesPresenter.d.ts +3 -1
- package/presentation/accessManagement/roles/RolesPresenter.js +11 -14
- package/presentation/accessManagement/roles/RolesPresenter.js.map +1 -1
- package/presentation/accessManagement/roles/components/RolesView.d.ts +2 -2
- package/presentation/accessManagement/roles/components/RolesView.js +10 -6
- package/presentation/accessManagement/roles/components/RolesView.js.map +1 -1
- package/presentation/accessManagement/teams/TeamsPresenter.d.ts +3 -1
- package/presentation/accessManagement/teams/TeamsPresenter.js +11 -14
- package/presentation/accessManagement/teams/TeamsPresenter.js.map +1 -1
- package/presentation/accessManagement/teams/components/TeamsView.d.ts +2 -2
- package/presentation/accessManagement/teams/components/TeamsView.js +10 -6
- package/presentation/accessManagement/teams/components/TeamsView.js.map +1 -1
- package/presentation/commandPalette/CommandPalettePresenter.d.ts +21 -0
- package/presentation/commandPalette/CommandPalettePresenter.js +91 -0
- package/presentation/commandPalette/CommandPalettePresenter.js.map +1 -0
- package/presentation/commandPalette/abstractions.d.ts +76 -0
- package/presentation/commandPalette/abstractions.js +7 -0
- package/presentation/commandPalette/abstractions.js.map +1 -0
- package/presentation/commandPalette/commands/AskAiCommand.d.ts +25 -0
- package/presentation/commandPalette/commands/AskAiCommand.js +33 -0
- package/presentation/commandPalette/commands/AskAiCommand.js.map +1 -0
- package/presentation/commandPalette/commands/CopyCurrentUrlCommand.d.ts +15 -0
- package/presentation/commandPalette/commands/CopyCurrentUrlCommand.js +33 -0
- package/presentation/commandPalette/commands/CopyCurrentUrlCommand.js.map +1 -0
- package/presentation/commandPalette/commands/SendMessageCommand.d.ts +23 -0
- package/presentation/commandPalette/commands/SendMessageCommand.js +66 -0
- package/presentation/commandPalette/commands/SendMessageCommand.js.map +1 -0
- package/presentation/commandPalette/commands/SignOutCommand.d.ts +18 -0
- package/presentation/commandPalette/commands/SignOutCommand.js +37 -0
- package/presentation/commandPalette/commands/SignOutCommand.js.map +1 -0
- package/presentation/commandPalette/commands/feature.d.ts +5 -0
- package/presentation/commandPalette/commands/feature.js +17 -0
- package/presentation/commandPalette/commands/feature.js.map +1 -0
- package/presentation/commandPalette/feature.d.ts +3 -0
- package/presentation/commandPalette/feature.js +17 -0
- package/presentation/commandPalette/feature.js.map +1 -0
- package/presentation/commandPalette/index.d.ts +3 -0
- package/presentation/commandPalette/index.js +2 -0
- package/presentation/featureFlags/FeatureFlagsProvider.d.ts +7 -0
- package/presentation/featureFlags/FeatureFlagsProvider.js +22 -0
- package/presentation/featureFlags/FeatureFlagsProvider.js.map +1 -0
- package/presentation/featureFlags/useFeatureFlags.d.ts +2 -0
- package/presentation/featureFlags/useFeatureFlags.js +17 -0
- package/presentation/featureFlags/useFeatureFlags.js.map +1 -0
- package/presentation/installation/components/SystemInstaller/SystemInstaller.d.ts +2 -2
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js +0 -3
- package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js.map +1 -1
- package/presentation/listPresenter/FolderAwareDataSource.js +4 -1
- package/presentation/listPresenter/FolderAwareDataSource.js.map +1 -1
- package/presentation/listPresenter/QueryMatcher.js +2 -2
- package/presentation/listPresenter/QueryMatcher.js.map +1 -1
- package/presentation/sortable/SortablePresenter.d.ts +23 -0
- package/presentation/sortable/SortablePresenter.js +175 -0
- package/presentation/sortable/SortablePresenter.js.map +1 -0
- package/presentation/sortable/abstractions.d.ts +24 -0
- package/presentation/sortable/abstractions.js +5 -0
- package/presentation/sortable/abstractions.js.map +1 -0
- package/presentation/sortable/feature.d.ts +1 -0
- package/presentation/sortable/feature.js +11 -0
- package/presentation/sortable/feature.js.map +1 -0
- package/presentation/sortable/index.d.ts +2 -0
- package/presentation/sortable/index.js +2 -0
- package/presentation/trashBin/components/BulkActions/DeleteItems.d.ts +2 -2
- package/presentation/trashBin/components/BulkActions/RestoreItems.d.ts +2 -2
- package/presentation/trashBin/components/TrashBinOverlay.d.ts +2 -2
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.d.ts +0 -10
- package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js.map +0 -1
- package/base/Base/Menus/WebinyVersion.d.ts +0 -2
- package/base/Base/Menus/WebinyVersion.js +0 -23
- package/base/Base/Menus/WebinyVersion.js.map +0 -1
- package/base/WebinyVersion.d.ts +0 -2
- package/base/WebinyVersion.js +0 -23
- package/base/WebinyVersion.js.map +0 -1
- package/components/Wcp.d.ts +0 -19
- package/components/Wcp.js +0 -37
- package/components/Wcp.js.map +0 -1
|
@@ -33,13 +33,17 @@ interface FormViewProps {
|
|
|
33
33
|
* Generic form view that walks layout nodes and renders fields.
|
|
34
34
|
* This component is stateless — it reads from the FormVM and delegates to renderers.
|
|
35
35
|
*/
|
|
36
|
-
export declare const FormView: (({ name, form, renderers, layoutRenderers }: FormViewProps) => React.JSX.Element) & {
|
|
37
|
-
|
|
36
|
+
export declare const FormView: (({ name, form, renderers, layoutRenderers }: FormViewProps) => React.JSX.Element) & React.NamedExoticComponent<FormViewProps> & {
|
|
37
|
+
readonly type: ({ name, form, renderers, layoutRenderers }: FormViewProps) => React.JSX.Element;
|
|
38
38
|
};
|
|
39
39
|
export declare const LayoutNodeRenderer: (({ node }: {
|
|
40
40
|
node: LayoutNodeVM;
|
|
41
|
-
}) => React.JSX.Element | null) & {
|
|
42
|
-
|
|
41
|
+
}) => React.JSX.Element | null) & React.NamedExoticComponent<{
|
|
42
|
+
node: LayoutNodeVM;
|
|
43
|
+
}> & {
|
|
44
|
+
readonly type: ({ node }: {
|
|
45
|
+
node: LayoutNodeVM;
|
|
46
|
+
}) => React.JSX.Element | null;
|
|
43
47
|
};
|
|
44
48
|
export interface TabsNodeRendererProps {
|
|
45
49
|
node: ITabsNodeVM;
|
|
@@ -3,7 +3,7 @@ interface PresenterErrorsProps {
|
|
|
3
3
|
title?: string;
|
|
4
4
|
errors: string[];
|
|
5
5
|
}
|
|
6
|
-
export declare const PresenterErrors: (({ errors, ...props }: PresenterErrorsProps) => React.JSX.Element | null) & {
|
|
7
|
-
|
|
6
|
+
export declare const PresenterErrors: (({ errors, ...props }: PresenterErrorsProps) => React.JSX.Element | null) & React.NamedExoticComponent<PresenterErrorsProps> & {
|
|
7
|
+
readonly type: ({ errors, ...props }: PresenterErrorsProps) => React.JSX.Element | null;
|
|
8
8
|
};
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export declare const FormModelDemo: (() => React.JSX.Element) & {
|
|
3
|
-
|
|
2
|
+
export declare const FormModelDemo: (() => React.JSX.Element) & React.NamedExoticComponent<unknown> & {
|
|
3
|
+
readonly type: () => React.JSX.Element;
|
|
4
4
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "../../base/Base/FieldRenderers/InputRenderer.js";
|
|
2
2
|
import "../../base/Base/FieldRenderers/SelectRenderer.js";
|
|
3
|
+
import "../../base/Base/FieldRenderers/AutoCompleteRenderer.js";
|
|
3
4
|
import "../../base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js";
|
|
4
5
|
import "../../base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js";
|
|
5
6
|
import "../../base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "../../base/Base/FieldRenderers/InputRenderer.js";
|
|
2
2
|
import "../../base/Base/FieldRenderers/SelectRenderer.js";
|
|
3
|
+
import "../../base/Base/FieldRenderers/AutoCompleteRenderer.js";
|
|
3
4
|
import "../../base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js";
|
|
4
5
|
import "../../base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js";
|
|
5
6
|
import "../../base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Standalone consumer of the Notifications queue. Drains queued notifications oldest-first
|
|
3
3
|
* and shows each one as a toast, then removes it from the queue. Mounted once, app-wide.
|
|
4
4
|
*/
|
|
5
|
-
export declare const NotificationsRenderer: (() => null) & {
|
|
6
|
-
|
|
5
|
+
export declare const NotificationsRenderer: (() => null) & import("react").NamedExoticComponent<unknown> & {
|
|
6
|
+
readonly type: () => null;
|
|
7
7
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ApiStreamClient } from "@webiny/app/features/apiStreamClient/index.js";
|
|
2
|
+
import { InternalIdTokenProvider } from "../../../features/security/AuthenticationContext/abstractions.js";
|
|
3
|
+
export declare const WEBINY_AUTHORIZATION_HEADER = "x-webiny-authorization";
|
|
4
|
+
/**
|
|
5
|
+
* Attaches the admin id token to streaming API requests. Mirrors `GraphQLClientDecorator` — the two
|
|
6
|
+
* clients are separate abstractions, so neither decorator covers the other.
|
|
7
|
+
*
|
|
8
|
+
* Uses `x-webiny-authorization` rather than `Authorization`, because on AWS the streaming route is
|
|
9
|
+
* served by a Lambda Function URL behind CloudFront with Origin Access Control: OAC signs the request
|
|
10
|
+
* with SigV4, which occupies the `Authorization` header, so a bearer token there would not survive to
|
|
11
|
+
* the origin. Both the AWS and the self-hosted identity extractors read this header first.
|
|
12
|
+
*/
|
|
13
|
+
declare class ApiStreamClientWithIdToken implements ApiStreamClient.Interface {
|
|
14
|
+
private idTokenProvider;
|
|
15
|
+
private decoratee;
|
|
16
|
+
constructor(idTokenProvider: InternalIdTokenProvider.Interface, decoratee: ApiStreamClient.Interface);
|
|
17
|
+
execute(params: ApiStreamClient.Request): Promise<ApiStreamClient.Response>;
|
|
18
|
+
}
|
|
19
|
+
export declare const ApiStreamClientDecorator: typeof ApiStreamClientWithIdToken & {
|
|
20
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/app/features/apiStreamClient/abstractions").IApiStreamClient>;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ApiStreamClient } from "@webiny/app/features/apiStreamClient/index.js";
|
|
2
|
+
import { InternalIdTokenProvider } from "./abstractions.js";
|
|
3
|
+
const WEBINY_AUTHORIZATION_HEADER = "x-webiny-authorization";
|
|
4
|
+
class ApiStreamClientWithIdToken {
|
|
5
|
+
constructor(idTokenProvider, decoratee){
|
|
6
|
+
this.idTokenProvider = idTokenProvider;
|
|
7
|
+
this.decoratee = decoratee;
|
|
8
|
+
}
|
|
9
|
+
async execute(params) {
|
|
10
|
+
if (params.headers?.[WEBINY_AUTHORIZATION_HEADER]) return this.decoratee.execute(params);
|
|
11
|
+
const idToken = await this.idTokenProvider.getTokenProvider()();
|
|
12
|
+
const authHeaders = idToken ? {
|
|
13
|
+
[WEBINY_AUTHORIZATION_HEADER]: `Bearer ${idToken}`
|
|
14
|
+
} : {};
|
|
15
|
+
return this.decoratee.execute({
|
|
16
|
+
...params,
|
|
17
|
+
headers: {
|
|
18
|
+
...params.headers,
|
|
19
|
+
...authHeaders
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const ApiStreamClientDecorator = ApiStreamClient.createDecorator({
|
|
25
|
+
decorator: ApiStreamClientWithIdToken,
|
|
26
|
+
dependencies: [
|
|
27
|
+
InternalIdTokenProvider
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
export { ApiStreamClientDecorator, WEBINY_AUTHORIZATION_HEADER };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=ApiStreamClientDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/security/AuthenticationContext/ApiStreamClientDecorator.js","sources":["../../../../src/features/security/AuthenticationContext/ApiStreamClientDecorator.ts"],"sourcesContent":["import { ApiStreamClient } from \"@webiny/app/features/apiStreamClient/index.js\";\nimport { InternalIdTokenProvider } from \"~/features/security/AuthenticationContext/abstractions.js\";\n\nexport const WEBINY_AUTHORIZATION_HEADER = \"x-webiny-authorization\";\n\n/**\n * Attaches the admin id token to streaming API requests. Mirrors `GraphQLClientDecorator` — the two\n * clients are separate abstractions, so neither decorator covers the other.\n *\n * Uses `x-webiny-authorization` rather than `Authorization`, because on AWS the streaming route is\n * served by a Lambda Function URL behind CloudFront with Origin Access Control: OAC signs the request\n * with SigV4, which occupies the `Authorization` header, so a bearer token there would not survive to\n * the origin. Both the AWS and the self-hosted identity extractors read this header first.\n */\nclass ApiStreamClientWithIdToken implements ApiStreamClient.Interface {\n constructor(\n private idTokenProvider: InternalIdTokenProvider.Interface,\n private decoratee: ApiStreamClient.Interface\n ) {}\n\n async execute(params: ApiStreamClient.Request): Promise<ApiStreamClient.Response> {\n if (params.headers?.[WEBINY_AUTHORIZATION_HEADER]) {\n return this.decoratee.execute(params);\n }\n\n const idToken = await this.idTokenProvider.getTokenProvider()();\n\n const authHeaders = idToken ? { [WEBINY_AUTHORIZATION_HEADER]: `Bearer ${idToken}` } : {};\n\n return this.decoratee.execute({\n ...params,\n headers: { ...params.headers, ...authHeaders }\n });\n }\n}\n\nexport const ApiStreamClientDecorator = ApiStreamClient.createDecorator({\n decorator: ApiStreamClientWithIdToken,\n dependencies: [InternalIdTokenProvider]\n});\n"],"names":["WEBINY_AUTHORIZATION_HEADER","ApiStreamClientWithIdToken","idTokenProvider","decoratee","params","idToken","authHeaders","ApiStreamClientDecorator","ApiStreamClient","InternalIdTokenProvider"],"mappings":";;AAGO,MAAMA,8BAA8B;AAW3C,MAAMC;IACF,YACYC,eAAkD,EAClDC,SAAoC,CAC9C;aAFUD,eAAe,GAAfA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,QAAQC,MAA+B,EAAqC;QAC9E,IAAIA,OAAO,OAAO,EAAE,CAACJ,4BAA4B,EAC7C,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAACI;QAGlC,MAAMC,UAAU,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB;QAE3D,MAAMC,cAAcD,UAAU;YAAE,CAACL,4BAA4B,EAAE,CAAC,OAAO,EAAEK,SAAS;QAAC,IAAI,CAAC;QAExF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC1B,GAAGD,MAAM;YACT,SAAS;gBAAE,GAAGA,OAAO,OAAO;gBAAE,GAAGE,WAAW;YAAC;QACjD;IACJ;AACJ;AAEO,MAAMC,2BAA2BC,gBAAgB,eAAe,CAAC;IACpE,WAAWP;IACX,cAAc;QAACQ;KAAwB;AAC3C"}
|
|
@@ -2,6 +2,7 @@ import { createFeature } from "@webiny/feature/admin";
|
|
|
2
2
|
import { AuthenticationContext } from "./abstractions.js";
|
|
3
3
|
import { AuthenticationContext as external_AuthenticationContext_js_AuthenticationContext } from "./AuthenticationContext.js";
|
|
4
4
|
import { GraphQLClientDecorator } from "./GraphQLClientDecorator.js";
|
|
5
|
+
import { ApiStreamClientDecorator } from "./ApiStreamClientDecorator.js";
|
|
5
6
|
import { InternalIdTokenProvider } from "./InternalIdTokenProvider.js";
|
|
6
7
|
const AuthenticationContextFeature = createFeature({
|
|
7
8
|
name: "AuthenticationContext",
|
|
@@ -9,6 +10,7 @@ const AuthenticationContextFeature = createFeature({
|
|
|
9
10
|
container.register(InternalIdTokenProvider).inSingletonScope();
|
|
10
11
|
container.register(external_AuthenticationContext_js_AuthenticationContext).inSingletonScope();
|
|
11
12
|
container.registerDecorator(GraphQLClientDecorator);
|
|
13
|
+
container.registerDecorator(ApiStreamClientDecorator);
|
|
12
14
|
},
|
|
13
15
|
resolve (container) {
|
|
14
16
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/security/AuthenticationContext/feature.js","sources":["../../../../src/features/security/AuthenticationContext/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { AuthenticationContext as AuthenticationContextAbstraction } from \"./abstractions.js\";\nimport { AuthenticationContext } from \"./AuthenticationContext.js\";\nimport { GraphQLClientDecorator } from \"./GraphQLClientDecorator.js\";\nimport { InternalIdTokenProvider } from \"./InternalIdTokenProvider.js\";\n\nexport const AuthenticationContextFeature = createFeature({\n name: \"AuthenticationContext\",\n register(container) {\n container.register(InternalIdTokenProvider).inSingletonScope();\n container.register(AuthenticationContext).inSingletonScope();\n container.registerDecorator(GraphQLClientDecorator);\n },\n resolve(container) {\n return {\n authenticationContext: container.resolve(AuthenticationContextAbstraction)\n };\n }\n});\n"],"names":["AuthenticationContextFeature","createFeature","container","InternalIdTokenProvider","AuthenticationContext","GraphQLClientDecorator","AuthenticationContextAbstraction"],"mappings":"
|
|
1
|
+
{"version":3,"file":"features/security/AuthenticationContext/feature.js","sources":["../../../../src/features/security/AuthenticationContext/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { AuthenticationContext as AuthenticationContextAbstraction } from \"./abstractions.js\";\nimport { AuthenticationContext } from \"./AuthenticationContext.js\";\nimport { GraphQLClientDecorator } from \"./GraphQLClientDecorator.js\";\nimport { ApiStreamClientDecorator } from \"./ApiStreamClientDecorator.js\";\nimport { InternalIdTokenProvider } from \"./InternalIdTokenProvider.js\";\n\nexport const AuthenticationContextFeature = createFeature({\n name: \"AuthenticationContext\",\n register(container) {\n container.register(InternalIdTokenProvider).inSingletonScope();\n container.register(AuthenticationContext).inSingletonScope();\n container.registerDecorator(GraphQLClientDecorator);\n container.registerDecorator(ApiStreamClientDecorator);\n },\n resolve(container) {\n return {\n authenticationContext: container.resolve(AuthenticationContextAbstraction)\n };\n }\n});\n"],"names":["AuthenticationContextFeature","createFeature","container","InternalIdTokenProvider","AuthenticationContext","GraphQLClientDecorator","ApiStreamClientDecorator","AuthenticationContextAbstraction"],"mappings":";;;;;;AAOO,MAAMA,+BAA+BC,cAAc;IACtD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,yBAAyB,gBAAgB;QAC5DD,UAAU,QAAQ,CAACE,yDAAuB,gBAAgB;QAC1DF,UAAU,iBAAiB,CAACG;QAC5BH,UAAU,iBAAiB,CAACI;IAChC;IACA,SAAQJ,SAAS;QACb,OAAO;YACH,uBAAuBA,UAAU,OAAO,CAACK;QAC7C;IACJ;AACJ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ISlugify } from "./abstractions.js";
|
|
2
|
+
declare class DefaultSlugifyImpl implements ISlugify {
|
|
3
|
+
execute(value: string): string;
|
|
4
|
+
}
|
|
5
|
+
export declare const DefaultSlugify: typeof DefaultSlugifyImpl & {
|
|
6
|
+
__abstraction: import("@webiny/di").Abstraction<ISlugify>;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import slugify from "slugify";
|
|
2
|
+
import { Slugify } from "./abstractions.js";
|
|
3
|
+
const DEFAULT_OPTIONS = {
|
|
4
|
+
replacement: "-",
|
|
5
|
+
lower: true,
|
|
6
|
+
remove: /[*#?<>_{}[\]+~.()'"!:;@]/g,
|
|
7
|
+
trim: false
|
|
8
|
+
};
|
|
9
|
+
class DefaultSlugifyImpl {
|
|
10
|
+
execute(value) {
|
|
11
|
+
return slugify(value, DEFAULT_OPTIONS);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
const DefaultSlugify = Slugify.createImplementation({
|
|
15
|
+
implementation: DefaultSlugifyImpl,
|
|
16
|
+
dependencies: []
|
|
17
|
+
});
|
|
18
|
+
export { DefaultSlugify };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=DefaultSlugify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/slugify/DefaultSlugify.js","sources":["../../../src/features/slugify/DefaultSlugify.ts"],"sourcesContent":["import baseSlugify from \"slugify\";\nimport { Slugify } from \"./abstractions.js\";\nimport type { ISlugify } from \"./abstractions.js\";\n\n/**\n * Webiny's canonical slug options. These were previously duplicated at every call site; keeping them\n * in one private place means projects can change slug generation everywhere at once by decorating\n * Slugify — not by passing per-call options, so the abstraction stays independent of this library.\n */\nconst DEFAULT_OPTIONS = {\n replacement: \"-\",\n lower: true,\n remove: /[*#?<>_{}[\\]+~.()'\"!:;@]/g,\n trim: false\n};\n\nclass DefaultSlugifyImpl implements ISlugify {\n execute(value: string): string {\n return baseSlugify(value, DEFAULT_OPTIONS);\n }\n}\n\nexport const DefaultSlugify = Slugify.createImplementation({\n implementation: DefaultSlugifyImpl,\n dependencies: []\n});\n"],"names":["DEFAULT_OPTIONS","DefaultSlugifyImpl","value","baseSlugify","DefaultSlugify","Slugify"],"mappings":";;AASA,MAAMA,kBAAkB;IACpB,aAAa;IACb,OAAO;IACP,QAAQ;IACR,MAAM;AACV;AAEA,MAAMC;IACF,QAAQC,KAAa,EAAU;QAC3B,OAAOC,QAAYD,OAAOF;IAC9B;AACJ;AAEO,MAAMI,iBAAiBC,QAAQ,oBAAoB,CAAC;IACvD,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ISlugify {
|
|
2
|
+
/**
|
|
3
|
+
* Turns a value into a URL-friendly slug using Webiny's canonical options. This is the
|
|
4
|
+
* fine-grained seam behind `StringFormatter.slugify()` — decorate `Slugify` alone to change slug
|
|
5
|
+
* logic without touching the rest of the string formatter.
|
|
6
|
+
*/
|
|
7
|
+
execute(value: string): string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Slugify: import("@webiny/di").Abstraction<ISlugify>;
|
|
10
|
+
export declare namespace Slugify {
|
|
11
|
+
type Interface = ISlugify;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/slugify/abstractions.js","sources":["../../../src/features/slugify/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface ISlugify {\n /**\n * Turns a value into a URL-friendly slug using Webiny's canonical options. This is the\n * fine-grained seam behind `StringFormatter.slugify()` — decorate `Slugify` alone to change slug\n * logic without touching the rest of the string formatter.\n */\n execute(value: string): string;\n}\n\nexport const Slugify = createAbstraction<ISlugify>(\"Slugify\");\n\nexport namespace Slugify {\n export type Interface = ISlugify;\n}\n"],"names":["Slugify","createAbstraction"],"mappings":";AAWO,MAAMA,UAAUC,kBAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SlugifyFeature: import("@webiny/feature/admin").FeatureDefinition<any, []>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { DefaultSlugify } from "./DefaultSlugify.js";
|
|
3
|
+
const SlugifyFeature = createFeature({
|
|
4
|
+
name: "Slugify",
|
|
5
|
+
register (container) {
|
|
6
|
+
container.register(DefaultSlugify).inSingletonScope();
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export { SlugifyFeature };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/slugify/feature.js","sources":["../../../src/features/slugify/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { DefaultSlugify } from \"./DefaultSlugify.js\";\n\nexport const SlugifyFeature = createFeature({\n name: \"Slugify\",\n register(container) {\n container.register(DefaultSlugify).inSingletonScope();\n }\n});\n"],"names":["SlugifyFeature","createFeature","container","DefaultSlugify"],"mappings":";;AAGO,MAAMA,iBAAiBC,cAAc;IACxC,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,gBAAgB,gBAAgB;IACvD;AACJ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Slugify } from "../../features/slugify/abstractions.js";
|
|
2
|
+
import type { IStringFormatter } from "./abstractions.js";
|
|
3
|
+
/**
|
|
4
|
+
* The string formatter is the consumer-facing API for string transforms. It keeps each transform's
|
|
5
|
+
* logic in its own fine-grained, decoratable feature (e.g. `Slugify`) and just delegates to it, so a
|
|
6
|
+
* project can change one transform without reimplementing the whole formatter. More methods will be
|
|
7
|
+
* added here over time.
|
|
8
|
+
*/
|
|
9
|
+
declare class DefaultStringFormatterImpl implements IStringFormatter {
|
|
10
|
+
private readonly slugifier;
|
|
11
|
+
constructor(slugifier: Slugify.Interface);
|
|
12
|
+
slugify(value: string): string;
|
|
13
|
+
}
|
|
14
|
+
export declare const DefaultStringFormatter: typeof DefaultStringFormatterImpl & {
|
|
15
|
+
__abstraction: import("@webiny/di").Abstraction<IStringFormatter>;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Slugify } from "../slugify/abstractions.js";
|
|
2
|
+
import { StringFormatter } from "./abstractions.js";
|
|
3
|
+
class DefaultStringFormatterImpl {
|
|
4
|
+
constructor(slugifier){
|
|
5
|
+
this.slugifier = slugifier;
|
|
6
|
+
}
|
|
7
|
+
slugify(value) {
|
|
8
|
+
return this.slugifier.execute(value);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const DefaultStringFormatter = StringFormatter.createImplementation({
|
|
12
|
+
implementation: DefaultStringFormatterImpl,
|
|
13
|
+
dependencies: [
|
|
14
|
+
Slugify
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
export { DefaultStringFormatter };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=DefaultStringFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/stringFormatter/DefaultStringFormatter.js","sources":["../../../src/features/stringFormatter/DefaultStringFormatter.ts"],"sourcesContent":["import { Slugify } from \"~/features/slugify/abstractions.js\";\nimport { StringFormatter } from \"./abstractions.js\";\nimport type { IStringFormatter } from \"./abstractions.js\";\n\n/**\n * The string formatter is the consumer-facing API for string transforms. It keeps each transform's\n * logic in its own fine-grained, decoratable feature (e.g. `Slugify`) and just delegates to it, so a\n * project can change one transform without reimplementing the whole formatter. More methods will be\n * added here over time.\n */\nclass DefaultStringFormatterImpl implements IStringFormatter {\n constructor(private readonly slugifier: Slugify.Interface) {}\n\n slugify(value: string): string {\n return this.slugifier.execute(value);\n }\n}\n\nexport const DefaultStringFormatter = StringFormatter.createImplementation({\n implementation: DefaultStringFormatterImpl,\n dependencies: [Slugify]\n});\n"],"names":["DefaultStringFormatterImpl","slugifier","value","DefaultStringFormatter","StringFormatter","Slugify"],"mappings":";;AAUA,MAAMA;IACF,YAA6BC,SAA4B,CAAE;aAA9BA,SAAS,GAATA;IAA+B;IAE5D,QAAQC,KAAa,EAAU;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAACA;IAClC;AACJ;AAEO,MAAMC,yBAAyBC,gBAAgB,oBAAoB,CAAC;IACvE,gBAAgBJ;IAChB,cAAc;QAACK;KAAQ;AAC3B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface IStringFormatter {
|
|
2
|
+
/**
|
|
3
|
+
* Turns a value into a URL-friendly slug. Delegates to the `Slugify` feature, so to change slug
|
|
4
|
+
* logic decorate `Slugify` alone rather than the whole string formatter.
|
|
5
|
+
*/
|
|
6
|
+
slugify(value: string): string;
|
|
7
|
+
}
|
|
8
|
+
export declare const StringFormatter: import("@webiny/di").Abstraction<IStringFormatter>;
|
|
9
|
+
export declare namespace StringFormatter {
|
|
10
|
+
type Interface = IStringFormatter;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/stringFormatter/abstractions.js","sources":["../../../src/features/stringFormatter/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport interface IStringFormatter {\n /**\n * Turns a value into a URL-friendly slug. Delegates to the `Slugify` feature, so to change slug\n * logic decorate `Slugify` alone rather than the whole string formatter.\n */\n slugify(value: string): string;\n}\n\nexport const StringFormatter = createAbstraction<IStringFormatter>(\"StringFormatter\");\n\nexport namespace StringFormatter {\n export type Interface = IStringFormatter;\n}\n"],"names":["StringFormatter","createAbstraction"],"mappings":";AAUO,MAAMA,kBAAkBC,kBAAoC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { SlugifyFeature } from "../slugify/feature.js";
|
|
3
|
+
import { StringFormatter } from "./abstractions.js";
|
|
4
|
+
import { DefaultStringFormatter } from "./DefaultStringFormatter.js";
|
|
5
|
+
const StringFormatterFeature = createFeature({
|
|
6
|
+
name: "StringFormatter",
|
|
7
|
+
register (container) {
|
|
8
|
+
SlugifyFeature.register(container);
|
|
9
|
+
container.register(DefaultStringFormatter).inSingletonScope();
|
|
10
|
+
},
|
|
11
|
+
resolve (container) {
|
|
12
|
+
return {
|
|
13
|
+
stringFormatter: container.resolve(StringFormatter)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export { StringFormatterFeature };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/stringFormatter/feature.js","sources":["../../../src/features/stringFormatter/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { SlugifyFeature } from \"~/features/slugify/feature.js\";\nimport { StringFormatter } from \"./abstractions.js\";\nimport { DefaultStringFormatter } from \"./DefaultStringFormatter.js\";\n\nexport const StringFormatterFeature = createFeature({\n name: \"StringFormatter\",\n register(container) {\n // Register the transforms the formatter delegates to, then the formatter itself.\n SlugifyFeature.register(container);\n container.register(DefaultStringFormatter).inSingletonScope();\n },\n resolve(container) {\n return {\n stringFormatter: container.resolve(StringFormatter)\n };\n }\n});\n"],"names":["StringFormatterFeature","createFeature","container","SlugifyFeature","DefaultStringFormatter","StringFormatter"],"mappings":";;;;AAKO,MAAMA,yBAAyBC,cAAc;IAChD,MAAM;IACN,UAASC,SAAS;QAEdC,eAAe,QAAQ,CAACD;QACxBA,UAAU,QAAQ,CAACE,wBAAwB,gBAAgB;IAC/D;IACA,SAAQF,SAAS;QACb,OAAO;YACH,iBAAiBA,UAAU,OAAO,CAACG;QACvC;IACJ;AACJ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useFeature } from "@webiny/app";
|
|
2
|
+
import { StringFormatterFeature } from "./feature.js";
|
|
3
|
+
function useStringFormatter() {
|
|
4
|
+
return useFeature(StringFormatterFeature).stringFormatter;
|
|
5
|
+
}
|
|
6
|
+
export { useStringFormatter };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=useStringFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/stringFormatter/useStringFormatter.js","sources":["../../../src/features/stringFormatter/useStringFormatter.ts"],"sourcesContent":["import { useFeature } from \"@webiny/app\";\nimport { StringFormatterFeature } from \"./feature.js\";\n\n/**\n * Resolves the shared StringFormatter for components that have no presenter of their own. Prefer\n * formatting in a presenter where one exists.\n */\nexport function useStringFormatter() {\n return useFeature(StringFormatterFeature).stringFormatter;\n}\n"],"names":["useStringFormatter","useFeature","StringFormatterFeature"],"mappings":";;AAOO,SAASA;IACZ,OAAOC,WAAWC,wBAAwB,eAAe;AAC7D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApiStreamClient } from "@webiny/app/features/apiStreamClient/index.js";
|
|
2
|
+
import { TenantContext } from "../../features/tenancy/abstractions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Adds the current tenant to streaming API requests, so a streaming route resolves the same tenant
|
|
5
|
+
* as an equivalent GraphQL call. Mirrors the tenancy `GraphQLClientDecorator`.
|
|
6
|
+
*/
|
|
7
|
+
declare class ApiStreamClientWithTenantId implements ApiStreamClient.Interface {
|
|
8
|
+
private context;
|
|
9
|
+
private decoratee;
|
|
10
|
+
constructor(context: TenantContext.Interface, decoratee: ApiStreamClient.Interface);
|
|
11
|
+
execute(params: ApiStreamClient.Request): Promise<ApiStreamClient.Response>;
|
|
12
|
+
}
|
|
13
|
+
export declare const ApiStreamClientDecorator: typeof ApiStreamClientWithTenantId & {
|
|
14
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/app/features/apiStreamClient/abstractions").IApiStreamClient>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ApiStreamClient } from "@webiny/app/features/apiStreamClient/index.js";
|
|
2
|
+
import { TenantContext } from "./abstractions.js";
|
|
3
|
+
class ApiStreamClientWithTenantId {
|
|
4
|
+
constructor(context, decoratee){
|
|
5
|
+
this.context = context;
|
|
6
|
+
this.decoratee = decoratee;
|
|
7
|
+
}
|
|
8
|
+
async execute(params) {
|
|
9
|
+
const tenant = this.context.getCurrentTenant();
|
|
10
|
+
const tenantHeaders = tenant ? {
|
|
11
|
+
"x-tenant": tenant
|
|
12
|
+
} : {};
|
|
13
|
+
return this.decoratee.execute({
|
|
14
|
+
...params,
|
|
15
|
+
headers: {
|
|
16
|
+
...params.headers,
|
|
17
|
+
...tenantHeaders
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const ApiStreamClientDecorator = ApiStreamClient.createDecorator({
|
|
23
|
+
decorator: ApiStreamClientWithTenantId,
|
|
24
|
+
dependencies: [
|
|
25
|
+
TenantContext
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
export { ApiStreamClientDecorator };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=ApiStreamClientDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/tenancy/ApiStreamClientDecorator.js","sources":["../../../src/features/tenancy/ApiStreamClientDecorator.ts"],"sourcesContent":["import { ApiStreamClient } from \"@webiny/app/features/apiStreamClient/index.js\";\nimport { TenantContext } from \"~/features/tenancy/abstractions.js\";\n\n/**\n * Adds the current tenant to streaming API requests, so a streaming route resolves the same tenant\n * as an equivalent GraphQL call. Mirrors the tenancy `GraphQLClientDecorator`.\n */\nclass ApiStreamClientWithTenantId implements ApiStreamClient.Interface {\n constructor(\n private context: TenantContext.Interface,\n private decoratee: ApiStreamClient.Interface\n ) {}\n\n async execute(params: ApiStreamClient.Request): Promise<ApiStreamClient.Response> {\n const tenant = this.context.getCurrentTenant();\n\n const tenantHeaders = tenant ? { \"x-tenant\": tenant } : {};\n\n return this.decoratee.execute({\n ...params,\n headers: { ...params.headers, ...tenantHeaders }\n });\n }\n}\n\nexport const ApiStreamClientDecorator = ApiStreamClient.createDecorator({\n decorator: ApiStreamClientWithTenantId,\n dependencies: [TenantContext]\n});\n"],"names":["ApiStreamClientWithTenantId","context","decoratee","params","tenant","tenantHeaders","ApiStreamClientDecorator","ApiStreamClient","TenantContext"],"mappings":";;AAOA,MAAMA;IACF,YACYC,OAAgC,EAChCC,SAAoC,CAC9C;aAFUD,OAAO,GAAPA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,QAAQC,MAA+B,EAAqC;QAC9E,MAAMC,SAAS,IAAI,CAAC,OAAO,CAAC,gBAAgB;QAE5C,MAAMC,gBAAgBD,SAAS;YAAE,YAAYA;QAAO,IAAI,CAAC;QAEzD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC1B,GAAGD,MAAM;YACT,SAAS;gBAAE,GAAGA,OAAO,OAAO;gBAAE,GAAGE,aAAa;YAAC;QACnD;IACJ;AACJ;AAEO,MAAMC,2BAA2BC,gBAAgB,eAAe,CAAC;IACpE,WAAWP;IACX,cAAc;QAACQ;KAAc;AACjC"}
|
|
@@ -3,11 +3,13 @@ import { LocalStorageFeature } from "@webiny/app/features/localStorage/feature.j
|
|
|
3
3
|
import { TenantContext } from "./abstractions.js";
|
|
4
4
|
import { TenantContext as external_TenantContext_js_TenantContext } from "./TenantContext.js";
|
|
5
5
|
import { GraphQLClientDecorator } from "./GraphQLClientDecorator.js";
|
|
6
|
+
import { ApiStreamClientDecorator } from "./ApiStreamClientDecorator.js";
|
|
6
7
|
const TenancyFeature = createFeature({
|
|
7
8
|
name: "Tenancy",
|
|
8
9
|
register (container) {
|
|
9
10
|
container.register(external_TenantContext_js_TenantContext).inSingletonScope();
|
|
10
11
|
container.registerDecorator(GraphQLClientDecorator);
|
|
12
|
+
container.registerDecorator(ApiStreamClientDecorator);
|
|
11
13
|
},
|
|
12
14
|
resolve (container) {
|
|
13
15
|
const service = container.resolve(TenantContext);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/tenancy/feature.js","sources":["../../../src/features/tenancy/feature.ts"],"sourcesContent":["import { Container } from \"@webiny/di\";\nimport { createFeature } from \"@webiny/feature/admin\";\nimport { LocalStorageFeature } from \"@webiny/app/features/localStorage/feature.js\";\nimport { TenantContext as TenantContextAbstraction } from \"./abstractions.js\";\nimport { TenantContext } from \"./TenantContext.js\";\nimport { GraphQLClientDecorator } from \"./GraphQLClientDecorator.js\";\n\nexport const TenancyFeature = createFeature({\n name: \"Tenancy\",\n register(container: Container) {\n container.register(TenantContext).inSingletonScope();\n container.registerDecorator(GraphQLClientDecorator);\n },\n resolve(container: Container) {\n const service = container.resolve(TenantContextAbstraction);\n\n return {\n service,\n\n // Helper to create tenant-scoped container\n createTenantContainer: () => {\n const currentTenant = service.getCurrentTenant();\n\n if (!currentTenant) {\n return container;\n }\n\n // Get current localStorage config\n const { localStorageConfig } = LocalStorageFeature.resolve(container);\n\n // Create tenant-scoped child container\n const tenantContainer = container.createChildContainer();\n\n // Re-register localStorage with tenant-specific prefix\n LocalStorageFeature.register(tenantContainer, {\n prefix: `${localStorageConfig.prefix}/${currentTenant}`\n });\n\n return tenantContainer;\n }\n };\n }\n});\n"],"names":["TenancyFeature","createFeature","container","TenantContext","GraphQLClientDecorator","service","TenantContextAbstraction","currentTenant","localStorageConfig","LocalStorageFeature","tenantContainer"],"mappings":"
|
|
1
|
+
{"version":3,"file":"features/tenancy/feature.js","sources":["../../../src/features/tenancy/feature.ts"],"sourcesContent":["import { Container } from \"@webiny/di\";\nimport { createFeature } from \"@webiny/feature/admin\";\nimport { LocalStorageFeature } from \"@webiny/app/features/localStorage/feature.js\";\nimport { TenantContext as TenantContextAbstraction } from \"./abstractions.js\";\nimport { TenantContext } from \"./TenantContext.js\";\nimport { GraphQLClientDecorator } from \"./GraphQLClientDecorator.js\";\nimport { ApiStreamClientDecorator } from \"./ApiStreamClientDecorator.js\";\n\nexport const TenancyFeature = createFeature({\n name: \"Tenancy\",\n register(container: Container) {\n container.register(TenantContext).inSingletonScope();\n container.registerDecorator(GraphQLClientDecorator);\n container.registerDecorator(ApiStreamClientDecorator);\n },\n resolve(container: Container) {\n const service = container.resolve(TenantContextAbstraction);\n\n return {\n service,\n\n // Helper to create tenant-scoped container\n createTenantContainer: () => {\n const currentTenant = service.getCurrentTenant();\n\n if (!currentTenant) {\n return container;\n }\n\n // Get current localStorage config\n const { localStorageConfig } = LocalStorageFeature.resolve(container);\n\n // Create tenant-scoped child container\n const tenantContainer = container.createChildContainer();\n\n // Re-register localStorage with tenant-specific prefix\n LocalStorageFeature.register(tenantContainer, {\n prefix: `${localStorageConfig.prefix}/${currentTenant}`\n });\n\n return tenantContainer;\n }\n };\n }\n});\n"],"names":["TenancyFeature","createFeature","container","TenantContext","GraphQLClientDecorator","ApiStreamClientDecorator","service","TenantContextAbstraction","currentTenant","localStorageConfig","LocalStorageFeature","tenantContainer"],"mappings":";;;;;;AAQO,MAAMA,iBAAiBC,cAAc;IACxC,MAAM;IACN,UAASC,SAAoB;QACzBA,UAAU,QAAQ,CAACC,yCAAe,gBAAgB;QAClDD,UAAU,iBAAiB,CAACE;QAC5BF,UAAU,iBAAiB,CAACG;IAChC;IACA,SAAQH,SAAoB;QACxB,MAAMI,UAAUJ,UAAU,OAAO,CAACK;QAElC,OAAO;YACHD;YAGA,uBAAuB;gBACnB,MAAME,gBAAgBF,QAAQ,gBAAgB;gBAE9C,IAAI,CAACE,eACD,OAAON;gBAIX,MAAM,EAAEO,kBAAkB,EAAE,GAAGC,oBAAoB,OAAO,CAACR;gBAG3D,MAAMS,kBAAkBT,UAAU,oBAAoB;gBAGtDQ,oBAAoB,QAAQ,CAACC,iBAAiB;oBAC1C,QAAQ,GAAGF,mBAAmB,MAAM,CAAC,CAAC,EAAED,eAAe;gBAC3D;gBAEA,OAAOG;YACX;QACJ;IACJ;AACJ"}
|
|
@@ -17,6 +17,12 @@ export declare class ReactLicense implements ILicense {
|
|
|
17
17
|
canUseWorkflows(): boolean;
|
|
18
18
|
canUseAiImageEnrichment(): boolean;
|
|
19
19
|
canUseAiPageGeneration(): boolean;
|
|
20
|
+
canUseAiPageTranslation(): boolean;
|
|
20
21
|
canUseAiLexicalGeneration(): boolean;
|
|
22
|
+
canUseAiEntryGeneration(): boolean;
|
|
23
|
+
canUseAiEntryComparison(): boolean;
|
|
24
|
+
canUseAiEntryTranslation(): boolean;
|
|
25
|
+
canUseAbTesting(): boolean;
|
|
26
|
+
canUseRemoteComponents(): boolean;
|
|
21
27
|
toDto(): DecryptedWcpProjectLicense | null;
|
|
22
28
|
}
|
|
@@ -44,9 +44,27 @@ class ReactLicense {
|
|
|
44
44
|
canUseAiPageGeneration() {
|
|
45
45
|
return this.license.canUseAiPageGeneration();
|
|
46
46
|
}
|
|
47
|
+
canUseAiPageTranslation() {
|
|
48
|
+
return this.license.canUseAiPageTranslation();
|
|
49
|
+
}
|
|
47
50
|
canUseAiLexicalGeneration() {
|
|
48
51
|
return this.license.canUseAiLexicalGeneration();
|
|
49
52
|
}
|
|
53
|
+
canUseAiEntryGeneration() {
|
|
54
|
+
return this.license.canUseAiEntryGeneration();
|
|
55
|
+
}
|
|
56
|
+
canUseAiEntryComparison() {
|
|
57
|
+
return this.license.canUseAiEntryComparison();
|
|
58
|
+
}
|
|
59
|
+
canUseAiEntryTranslation() {
|
|
60
|
+
return this.license.canUseAiEntryTranslation();
|
|
61
|
+
}
|
|
62
|
+
canUseAbTesting() {
|
|
63
|
+
return this.license.canUseAbTesting();
|
|
64
|
+
}
|
|
65
|
+
canUseRemoteComponents() {
|
|
66
|
+
return this.license.canUseRemoteComponents();
|
|
67
|
+
}
|
|
50
68
|
toDto() {
|
|
51
69
|
return this.license.toDto();
|
|
52
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/wcp/ReactLicense.js","sources":["../../../src/features/wcp/ReactLicense.ts"],"sourcesContent":["import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from \"@webiny/wcp/types.js\";\nimport type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\n\nexport class ReactLicense implements ILicense {\n private readonly license: ILicense;\n\n constructor(license: ILicense) {\n this.license = license;\n }\n\n getProject(): WcpProject | null {\n return this.license.getProject();\n }\n\n canUseAacl(): boolean {\n return this.license.canUseAacl();\n }\n\n canUseAuditLogs(): boolean {\n return this.license.canUseAuditLogs();\n }\n\n canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean {\n return this.license.canUseFeature(featureId);\n }\n\n canUseFileManagerThreatDetection(): boolean {\n return this.license.canUseFileManagerThreatDetection();\n }\n\n canUseFolderLevelPermissions(): boolean {\n return this.license.canUseFolderLevelPermissions();\n }\n\n canUseHcmsFieldPermissions(): boolean {\n return this.license.canUseHcmsFieldPermissions();\n }\n\n canUsePrivateFiles(): boolean {\n return this.license.canUsePrivateFiles();\n }\n\n canUseRecordLocking(): boolean {\n return this.license.canUseRecordLocking();\n }\n\n canUseTeams(): boolean {\n return this.license.canUseTeams();\n }\n\n getRawLicense(): DecryptedWcpProjectLicense | null {\n return this.license.getRawLicense();\n }\n\n public canUseWorkflows(): boolean {\n return this.license.canUseWorkflows();\n }\n\n canUseAiImageEnrichment(): boolean {\n return this.license.canUseAiImageEnrichment();\n }\n\n canUseAiPageGeneration(): boolean {\n return this.license.canUseAiPageGeneration();\n }\n\n canUseAiLexicalGeneration(): boolean {\n return this.license.canUseAiLexicalGeneration();\n }\n\n toDto(): DecryptedWcpProjectLicense | null {\n return this.license.toDto();\n }\n}\n"],"names":["ReactLicense","license","featureId"],"mappings":"AAGO,MAAMA;IAGT,YAAYC,OAAiB,CAAE;QAC3B,IAAI,CAAC,OAAO,GAAGA;IACnB;IAEA,aAAgC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU;IAClC;IAEA,aAAsB;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU;IAClC;IAEA,kBAA2B;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,cAAcC,SAAyC,EAAW;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAACA;IACtC;IAEA,mCAA4C;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC;IACxD;IAEA,+BAAwC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,4BAA4B;IACpD;IAEA,6BAAsC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,0BAA0B;IAClD;IAEA,qBAA8B;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB;IAC1C;IAEA,sBAA+B;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB;IAC3C;IAEA,cAAuB;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW;IACnC;IAEA,gBAAmD;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa;IACrC;IAEO,kBAA2B;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,yBAAkC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB;IAC9C;IAEA,4BAAqC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB;IACjD;IAEA,QAA2C;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK;IAC7B;AACJ"}
|
|
1
|
+
{"version":3,"file":"features/wcp/ReactLicense.js","sources":["../../../src/features/wcp/ReactLicense.ts"],"sourcesContent":["import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from \"@webiny/wcp/types.js\";\nimport type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\n\nexport class ReactLicense implements ILicense {\n private readonly license: ILicense;\n\n constructor(license: ILicense) {\n this.license = license;\n }\n\n getProject(): WcpProject | null {\n return this.license.getProject();\n }\n\n canUseAacl(): boolean {\n return this.license.canUseAacl();\n }\n\n canUseAuditLogs(): boolean {\n return this.license.canUseAuditLogs();\n }\n\n canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean {\n return this.license.canUseFeature(featureId);\n }\n\n canUseFileManagerThreatDetection(): boolean {\n return this.license.canUseFileManagerThreatDetection();\n }\n\n canUseFolderLevelPermissions(): boolean {\n return this.license.canUseFolderLevelPermissions();\n }\n\n canUseHcmsFieldPermissions(): boolean {\n return this.license.canUseHcmsFieldPermissions();\n }\n\n canUsePrivateFiles(): boolean {\n return this.license.canUsePrivateFiles();\n }\n\n canUseRecordLocking(): boolean {\n return this.license.canUseRecordLocking();\n }\n\n canUseTeams(): boolean {\n return this.license.canUseTeams();\n }\n\n getRawLicense(): DecryptedWcpProjectLicense | null {\n return this.license.getRawLicense();\n }\n\n public canUseWorkflows(): boolean {\n return this.license.canUseWorkflows();\n }\n\n canUseAiImageEnrichment(): boolean {\n return this.license.canUseAiImageEnrichment();\n }\n\n canUseAiPageGeneration(): boolean {\n return this.license.canUseAiPageGeneration();\n }\n\n canUseAiPageTranslation(): boolean {\n return this.license.canUseAiPageTranslation();\n }\n\n canUseAiLexicalGeneration(): boolean {\n return this.license.canUseAiLexicalGeneration();\n }\n\n canUseAiEntryGeneration(): boolean {\n return this.license.canUseAiEntryGeneration();\n }\n\n canUseAiEntryComparison(): boolean {\n return this.license.canUseAiEntryComparison();\n }\n\n canUseAiEntryTranslation(): boolean {\n return this.license.canUseAiEntryTranslation();\n }\n\n canUseAbTesting(): boolean {\n return this.license.canUseAbTesting();\n }\n\n canUseRemoteComponents(): boolean {\n return this.license.canUseRemoteComponents();\n }\n\n toDto(): DecryptedWcpProjectLicense | null {\n return this.license.toDto();\n }\n}\n"],"names":["ReactLicense","license","featureId"],"mappings":"AAGO,MAAMA;IAGT,YAAYC,OAAiB,CAAE;QAC3B,IAAI,CAAC,OAAO,GAAGA;IACnB;IAEA,aAAgC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU;IAClC;IAEA,aAAsB;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU;IAClC;IAEA,kBAA2B;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,cAAcC,SAAyC,EAAW;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAACA;IACtC;IAEA,mCAA4C;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC;IACxD;IAEA,+BAAwC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,4BAA4B;IACpD;IAEA,6BAAsC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,0BAA0B;IAClD;IAEA,qBAA8B;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB;IAC1C;IAEA,sBAA+B;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB;IAC3C;IAEA,cAAuB;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW;IACnC;IAEA,gBAAmD;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa;IACrC;IAEO,kBAA2B;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,yBAAkC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB;IAC9C;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,4BAAqC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB;IACjD;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,2BAAoC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB;IAChD;IAEA,kBAA2B;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,yBAAkC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB;IAC9C;IAEA,QAA2C;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK;IAC7B;AACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/wcp/WcpGateway.js","sources":["../../../src/features/wcp/WcpGateway.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { WcpGateway as WcpGatewayAbstraction } from \"./abstractions.js\";\nimport { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { GetWcpProjectResponse, WcpProjectData } from \"./types.js\";\n\nconst GET_WCP_PROJECT = /* GraphQL */ `\n query GetWcpProject {\n wcp {\n getProject {\n data {\n orgId\n projectId\n package {\n features {\n seats {\n enabled\n options\n }\n multiTenancy {\n enabled\n options\n }\n advancedPublishingWorkflow {\n enabled\n }\n advancedAccessControlLayer {\n enabled\n options\n }\n auditLogs {\n enabled\n }\n recordLocking {\n enabled\n }\n fileManager {\n enabled\n options\n }\n aiPowerups {\n enabled\n options\n }\n }\n }\n }\n error {\n message\n code\n data\n }\n }\n }\n }\n`;\n\nclass WcpGraphQLGateway implements WcpGatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async fetchProject(): Promise<WcpProjectData | null> {\n const response = await this.client.execute<GetWcpProjectResponse>({\n query: GET_WCP_PROJECT,\n headers: {\n \"x-tenant\": \"root\"\n }\n });\n\n if (response.wcp.getProject.error) {\n throw new Error(response.wcp.getProject.error.message);\n }\n\n return response.wcp.getProject.data;\n }\n}\n\nexport const WcpGateway = createImplementation({\n abstraction: WcpGatewayAbstraction,\n implementation: WcpGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["GET_WCP_PROJECT","WcpGraphQLGateway","client","response","Error","WcpGateway","createImplementation","WcpGatewayAbstraction","MainGraphQLClient"],"mappings":";;;AAKA,MAAMA,kBAAgC,CAAC
|
|
1
|
+
{"version":3,"file":"features/wcp/WcpGateway.js","sources":["../../../src/features/wcp/WcpGateway.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { WcpGateway as WcpGatewayAbstraction } from \"./abstractions.js\";\nimport { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { GetWcpProjectResponse, WcpProjectData } from \"./types.js\";\n\nconst GET_WCP_PROJECT = /* GraphQL */ `\n query GetWcpProject {\n wcp {\n getProject {\n data {\n orgId\n projectId\n package {\n features {\n seats {\n enabled\n options\n }\n multiTenancy {\n enabled\n options\n }\n advancedPublishingWorkflow {\n enabled\n }\n advancedAccessControlLayer {\n enabled\n options\n }\n auditLogs {\n enabled\n }\n recordLocking {\n enabled\n }\n fileManager {\n enabled\n options\n }\n aiPowerups {\n enabled\n options\n }\n abTesting {\n enabled\n }\n }\n }\n }\n error {\n message\n code\n data\n }\n }\n }\n }\n`;\n\nclass WcpGraphQLGateway implements WcpGatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async fetchProject(): Promise<WcpProjectData | null> {\n const response = await this.client.execute<GetWcpProjectResponse>({\n query: GET_WCP_PROJECT,\n headers: {\n \"x-tenant\": \"root\"\n }\n });\n\n if (response.wcp.getProject.error) {\n throw new Error(response.wcp.getProject.error.message);\n }\n\n return response.wcp.getProject.data;\n }\n}\n\nexport const WcpGateway = createImplementation({\n abstraction: WcpGatewayAbstraction,\n implementation: WcpGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["GET_WCP_PROJECT","WcpGraphQLGateway","client","response","Error","WcpGateway","createImplementation","WcpGatewayAbstraction","MainGraphQLClient"],"mappings":";;;AAKA,MAAMA,kBAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDvC,CAAC;AAED,MAAMC;IACF,YAAoBC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAE1D,MAAM,eAA+C;QACjD,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwB;YAC9D,OAAOH;YACP,SAAS;gBACL,YAAY;YAChB;QACJ;QAEA,IAAIG,SAAS,GAAG,CAAC,UAAU,CAAC,KAAK,EAC7B,MAAM,IAAIC,MAAMD,SAAS,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO;QAGzD,OAAOA,SAAS,GAAG,CAAC,UAAU,CAAC,IAAI;IACvC;AACJ;AAEO,MAAME,wBAAaC,qBAAqB;IAC3C,aAAaC;IACb,gBAAgBN;IAChB,cAAc;QAACO;KAAkB;AACrC"}
|
package/hooks/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ export * from "./useConfirmationDialog.js";
|
|
|
3
3
|
export * from "./useDialog.js";
|
|
4
4
|
export * from "./useOpenDialog.js";
|
|
5
5
|
export * from "../components/Dialogs/useDialogs.js";
|
|
6
|
+
export * from "./useDrawer.js";
|
|
7
|
+
export * from "./useOpenDrawer.js";
|
|
8
|
+
export * from "../components/Drawers/useDrawers.js";
|
|
6
9
|
export * from "./useSnackbar.js";
|
|
7
10
|
export * from "./useKeyHandler.js";
|
|
8
11
|
export * from "./useShiftKey.js";
|
package/hooks/index.js
CHANGED
|
@@ -3,6 +3,9 @@ export * from "./useConfirmationDialog.js";
|
|
|
3
3
|
export * from "./useDialog.js";
|
|
4
4
|
export * from "./useOpenDialog.js";
|
|
5
5
|
export * from "../components/Dialogs/useDialogs.js";
|
|
6
|
+
export * from "./useDrawer.js";
|
|
7
|
+
export * from "./useOpenDrawer.js";
|
|
8
|
+
export * from "../components/Drawers/useDrawers.js";
|
|
6
9
|
export * from "./useSnackbar.js";
|
|
7
10
|
export * from "./useKeyHandler.js";
|
|
8
11
|
export * from "./useShiftKey.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
export declare function useDrawer<T extends z.ZodTypeAny>(schema: T): {
|
|
3
|
+
params: z.infer<T>;
|
|
4
|
+
closeDrawer: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare function useDrawer(): {
|
|
7
|
+
params: Record<string, unknown>;
|
|
8
|
+
closeDrawer: () => void;
|
|
9
|
+
};
|