@griddo/ax 1.75.258 → 10.1.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/package.json +2 -2
- package/src/GlobalStore.tsx +3 -0
- package/src/__tests__/components/ConfigPanel/GlobalPageForm/GlobalPageForm.test.tsx +10 -1
- package/src/__tests__/components/Fields/IntegrationsField/IntegrationsField.test.tsx +391 -0
- package/src/__tests__/modules/Settings/Integrations/Integrations.test.tsx +167 -0
- package/src/api/index.tsx +3 -1
- package/src/api/integrations.tsx +153 -0
- package/src/api/sites.tsx +4 -2
- package/src/components/ActionMenu/index.tsx +3 -1
- package/src/components/ActionMenu/style.tsx +1 -0
- package/src/components/ConfigPanel/Form/ConnectedField/PageConnectedField/Field/index.tsx +4 -1
- package/src/components/ConfigPanel/Form/ConnectedField/PageConnectedField/index.tsx +3 -0
- package/src/components/ConfigPanel/GlobalPageForm/index.tsx +11 -2
- package/src/components/FieldContainer/index.tsx +2 -1
- package/src/components/Fields/IntegrationsField/IntegrationItem/CustomPanel/index.tsx +101 -0
- package/src/components/Fields/IntegrationsField/IntegrationItem/CustomPanel/style.tsx +23 -0
- package/src/components/Fields/IntegrationsField/IntegrationItem/VariablesPanel/helpers.ts +31 -0
- package/src/components/Fields/IntegrationsField/IntegrationItem/VariablesPanel/index.tsx +120 -0
- package/src/components/Fields/IntegrationsField/IntegrationItem/VariablesPanel/style.tsx +23 -0
- package/src/components/Fields/IntegrationsField/IntegrationItem/atoms.tsx +27 -0
- package/src/components/Fields/IntegrationsField/IntegrationItem/index.tsx +132 -0
- package/src/components/Fields/IntegrationsField/IntegrationItem/style.tsx +63 -0
- package/src/components/Fields/IntegrationsField/PasteIntegrationButton/index.tsx +30 -0
- package/src/components/Fields/IntegrationsField/SideModal/SideModalOption/index.tsx +52 -0
- package/src/components/Fields/IntegrationsField/SideModal/SideModalOption/style.tsx +54 -0
- package/src/components/Fields/IntegrationsField/SideModal/index.tsx +57 -0
- package/src/components/Fields/IntegrationsField/SideModal/style.tsx +50 -0
- package/src/components/Fields/IntegrationsField/index.tsx +145 -0
- package/src/components/Fields/IntegrationsField/style.tsx +29 -0
- package/src/components/Fields/TextArea/index.tsx +1 -1
- package/src/components/Fields/ToggleField/index.tsx +5 -3
- package/src/components/Fields/UrlField/index.tsx +8 -8
- package/src/components/Fields/index.tsx +2 -0
- package/src/components/Icon/components/Deactivate.js +14 -0
- package/src/components/Icon/components/Lock.js +15 -0
- package/src/components/Icon/svgs/Deactivate.svg +8 -0
- package/src/components/Icon/svgs/Lock.svg +6 -0
- package/src/components/PageFinder/SelectionListItem/index.tsx +46 -0
- package/src/components/PageFinder/SelectionListItem/style.tsx +46 -0
- package/src/components/{Fields/UrlField/PageFinder → PageFinder}/index.tsx +99 -21
- package/src/components/{Fields/UrlField/PageFinder → PageFinder}/style.tsx +14 -1
- package/src/components/TableFilters/CheckGroupFilter/index.tsx +83 -0
- package/src/components/TableFilters/CheckGroupFilter/style.tsx +40 -0
- package/src/components/TableFilters/StateFilter/index.tsx +66 -0
- package/src/components/TableFilters/StateFilter/style.tsx +30 -0
- package/src/components/TableFilters/index.tsx +4 -0
- package/src/components/index.tsx +9 -1
- package/src/containers/Integrations/actions.tsx +190 -0
- package/src/containers/Integrations/constants.tsx +14 -0
- package/src/containers/Integrations/index.tsx +4 -0
- package/src/containers/Integrations/interfaces.tsx +24 -0
- package/src/containers/Integrations/reducer.tsx +31 -0
- package/src/containers/PageEditor/actions.tsx +11 -1
- package/src/containers/PageEditor/utils.tsx +30 -2
- package/src/hooks/content.tsx +46 -2
- package/src/hooks/index.tsx +2 -1
- package/src/hooks/modals.tsx +4 -2
- package/src/modules/App/Routing/NavMenu/NavItem/style.tsx +13 -12
- package/src/modules/Content/index.tsx +5 -0
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/Editor/ConfigPanel/IntegrationsField/index.tsx +47 -0
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/Editor/ConfigPanel/IntegrationsField/style.tsx +7 -0
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/Editor/ConfigPanel/{Field → NavigationField}/index.tsx +2 -2
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/Editor/ConfigPanel/index.tsx +7 -7
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/index.tsx +1 -1
- package/src/modules/Settings/Integrations/BulkHeader/TableHeader/index.tsx +81 -0
- package/src/modules/Settings/Integrations/BulkHeader/TableHeader/style.tsx +35 -0
- package/src/modules/Settings/Integrations/BulkHeader/index.tsx +69 -0
- package/src/modules/Settings/Integrations/IntegrationForm/VariableItem/index.tsx +95 -0
- package/src/modules/Settings/Integrations/IntegrationForm/VariableItem/style.tsx +62 -0
- package/src/modules/Settings/Integrations/IntegrationForm/VariablePanel/index.tsx +138 -0
- package/src/modules/Settings/Integrations/IntegrationForm/VariablePanel/style.tsx +28 -0
- package/src/modules/Settings/Integrations/IntegrationForm/index.tsx +319 -0
- package/src/modules/Settings/Integrations/IntegrationForm/style.tsx +77 -0
- package/src/modules/Settings/Integrations/IntegrationItem/CopyModal/index.tsx +44 -0
- package/src/modules/Settings/Integrations/IntegrationItem/CopyModal/style.tsx +13 -0
- package/src/modules/Settings/Integrations/IntegrationItem/index.tsx +197 -0
- package/src/modules/Settings/Integrations/IntegrationItem/style.tsx +81 -0
- package/src/modules/Settings/Integrations/atoms.tsx +49 -0
- package/src/modules/Settings/Integrations/hooks.tsx +72 -0
- package/src/modules/Settings/Integrations/index.tsx +299 -0
- package/src/modules/Settings/Integrations/style.tsx +48 -0
- package/src/modules/Settings/Integrations/utils.tsx +39 -0
- package/src/routes/site.tsx +19 -0
- package/src/schemas/pages/Page.tsx +5 -0
- package/src/types/index.tsx +35 -0
- package/tsconfig.paths.json +2 -0
- package/src/components/Fields/UrlField/PageFinder/SelectionListItem/index.tsx +0 -34
- package/src/components/Fields/UrlField/PageFinder/SelectionListItem/style.tsx +0 -35
- /package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/TemplateConfig/TemplateEditor/Editor/ConfigPanel/{Field → NavigationField}/style.tsx +0 -0
package/src/types/index.tsx
CHANGED
|
@@ -11,6 +11,7 @@ import { IGalleryState } from "@ax/containers/Gallery/reducer";
|
|
|
11
11
|
import { IDomainsState } from "@ax/containers/Domains/reducer";
|
|
12
12
|
import { IRedirectsState } from "@ax/containers/Redirects/reducer";
|
|
13
13
|
import { IAnalyticsState } from "@ax/containers/Analytics/reducer";
|
|
14
|
+
import { IIntegrationsState } from "@ax/containers/Integrations/reducer";
|
|
14
15
|
|
|
15
16
|
export interface IBreadcrumbItem {
|
|
16
17
|
editorID: number;
|
|
@@ -222,6 +223,7 @@ export interface IRootState {
|
|
|
222
223
|
domains: IDomainsState;
|
|
223
224
|
redirects: IRedirectsState;
|
|
224
225
|
analytics: IAnalyticsState;
|
|
226
|
+
integrations: IIntegrationsState;
|
|
225
227
|
}
|
|
226
228
|
|
|
227
229
|
export interface IStyledProps {
|
|
@@ -310,6 +312,7 @@ export interface IGetSitePagesParams {
|
|
|
310
312
|
filterStructuredData?: string;
|
|
311
313
|
format?: string;
|
|
312
314
|
filterPages?: number[];
|
|
315
|
+
ignoreLang?: boolean;
|
|
313
316
|
}
|
|
314
317
|
|
|
315
318
|
export interface IGetGlobalPagesParams {
|
|
@@ -789,6 +792,38 @@ export interface ILinkField {
|
|
|
789
792
|
modal: any;
|
|
790
793
|
}
|
|
791
794
|
|
|
795
|
+
export interface IIntegration {
|
|
796
|
+
id?: number;
|
|
797
|
+
name: string;
|
|
798
|
+
description?: string;
|
|
799
|
+
site?: number;
|
|
800
|
+
contentHead: string;
|
|
801
|
+
contentBody: string;
|
|
802
|
+
contentBodyPosition: string | null;
|
|
803
|
+
contentPresence: {
|
|
804
|
+
presenceType: string | null;
|
|
805
|
+
relatedPages: { id: number; title: string }[] | null;
|
|
806
|
+
};
|
|
807
|
+
active?: boolean;
|
|
808
|
+
variables: undefined | IIntegrationVariable[];
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
export interface IIntegrationVariable {
|
|
812
|
+
defaultValue: string;
|
|
813
|
+
value?: string;
|
|
814
|
+
id?: number;
|
|
815
|
+
isMultilanguage?: boolean;
|
|
816
|
+
multilanguage: null | IVariableLang[];
|
|
817
|
+
variableKey: string;
|
|
818
|
+
variableName: string;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
export interface IVariableLang {
|
|
822
|
+
id?: number;
|
|
823
|
+
languageId: number;
|
|
824
|
+
value: string;
|
|
825
|
+
}
|
|
826
|
+
|
|
792
827
|
export interface ICreatePasswordParams {
|
|
793
828
|
id: string;
|
|
794
829
|
token: string;
|
package/tsconfig.paths.json
CHANGED
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
"@ax/helpers": ["src/helpers"],
|
|
12
12
|
"@ax/hooks": ["src/hooks"],
|
|
13
13
|
"@ax/modules": ["src/modules"],
|
|
14
|
+
"@ax/modules/*": ["src/modules/*"],
|
|
14
15
|
"@ax/routes": ["src/routes"],
|
|
16
|
+
"@ax/routes/*": ["src/routes/*"],
|
|
15
17
|
"@ax/types": ["src/types"],
|
|
16
18
|
"@ax/schemas": ["src/schemas"],
|
|
17
19
|
"@ax/themes/*": ["src/themes/*"]
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { getFormattedDateWithTimezone } from "@ax/helpers";
|
|
3
|
-
|
|
4
|
-
import * as S from "./style";
|
|
5
|
-
|
|
6
|
-
const SelectionListItem = (props: ISelectionListItemProps): JSX.Element => {
|
|
7
|
-
const { option, title, type, date, onClick } = props;
|
|
8
|
-
|
|
9
|
-
const handleOnClick = () => {
|
|
10
|
-
onClick(option);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const pageType = type || "Page";
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<S.ListItem onClick={handleOnClick} data-testid="selection-list-item">
|
|
17
|
-
<S.Header>
|
|
18
|
-
<S.Type>{pageType}</S.Type>
|
|
19
|
-
<S.Date>{getFormattedDateWithTimezone(date, "d MMM Y")}</S.Date>
|
|
20
|
-
</S.Header>
|
|
21
|
-
<S.Content>{title}</S.Content>
|
|
22
|
-
</S.ListItem>
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
interface ISelectionListItemProps {
|
|
27
|
-
option: any;
|
|
28
|
-
title: string;
|
|
29
|
-
type: string;
|
|
30
|
-
date: Date;
|
|
31
|
-
onClick: (value: any) => void;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default SelectionListItem;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
|
|
3
|
-
export const ListItem = styled.li`
|
|
4
|
-
width: 100%;
|
|
5
|
-
padding: ${p => p.theme.spacing.s};
|
|
6
|
-
background-color: ${p => p.theme.color.uiBarBackground};
|
|
7
|
-
border: 1px solid ${p => p.theme.color.uiLine};
|
|
8
|
-
border-radius: ${p => p.theme.radii.s};
|
|
9
|
-
margin-bottom: ${p => p.theme.spacing.xxs};
|
|
10
|
-
:hover {
|
|
11
|
-
background-color: ${p => p.theme.color.overlayHoverPrimary};
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
export const Content = styled.div`
|
|
17
|
-
${p => p.theme.textStyle.fieldContent}
|
|
18
|
-
color: ${p => p.theme.colors.textHighEmphasis};
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
export const Header = styled.div`
|
|
22
|
-
display: flex;
|
|
23
|
-
margin-bottom: ${p => p.theme.spacing.xxs};
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
export const Type = styled.div`
|
|
27
|
-
${p => p.theme.textStyle.headingXXS};
|
|
28
|
-
color: ${p => p.theme.colors.textLowEmphasis};
|
|
29
|
-
`;
|
|
30
|
-
|
|
31
|
-
export const Date = styled.div`
|
|
32
|
-
${p => p.theme.textStyle.uiXS};
|
|
33
|
-
color: ${p => p.theme.colors.textLowEmphasis};
|
|
34
|
-
margin: 0 0 0 auto;
|
|
35
|
-
`;
|