@griddo/ax 10.2.11 → 10.2.12
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/__tests__/components/Fields/UrlField/UrlField.test.tsx +1 -1
- package/src/components/Fields/AsyncSelect/index.tsx +12 -8
- package/src/components/Fields/AsyncSelect/style.tsx +58 -1
- package/src/components/Fields/CheckField/index.tsx +15 -2
- package/src/components/Fields/IntegrationsField/IntegrationItem/CustomPanel/index.tsx +49 -47
- package/src/components/Fields/IntegrationsField/IntegrationItem/CustomPanel/style.tsx +6 -1
- package/src/components/Fields/IntegrationsField/IntegrationItem/VariablesPanel/index.tsx +13 -11
- package/src/components/Fields/IntegrationsField/IntegrationItem/VariablesPanel/style.tsx +6 -3
- package/src/components/Fields/MultiCheckSelect/style.tsx +1 -0
- package/src/components/Fields/ReferenceField/AutoPanel/index.tsx +274 -38
- package/src/components/Fields/ReferenceField/AutoPanel/style.tsx +112 -15
- package/src/components/Fields/ReferenceField/Context/index.tsx +18 -10
- package/src/components/Fields/ReferenceField/ItemList/Item/index.tsx +9 -30
- package/src/components/Fields/ReferenceField/ItemList/Item/style.tsx +9 -51
- package/src/components/Fields/ReferenceField/ItemList/index.tsx +10 -6
- package/src/components/Fields/ReferenceField/ManualPanel/index.tsx +36 -18
- package/src/components/Fields/ReferenceField/ManualPanel/style.tsx +2 -0
- package/src/components/Fields/ReferenceField/index.tsx +1 -0
- package/src/components/Fields/Select/index.tsx +10 -13
- package/src/components/Fields/Select/style.tsx +13 -7
- package/src/components/Fields/TimeField/index.tsx +1 -0
- package/src/components/Fields/UniqueCheck/index.tsx +3 -1
- package/src/components/Fields/UrlField/index.tsx +3 -1
- package/src/components/Fields/UrlField/style.tsx +6 -1
- package/src/components/FloatingPanel/style.tsx +0 -1
- package/src/components/PageFinder/index.tsx +8 -7
- package/src/components/SearchField/index.tsx +2 -3
- package/src/helpers/arrays.tsx +2 -2
- package/src/modules/Analytics/DimensionPanel/index.tsx +44 -42
- package/src/modules/Analytics/DimensionPanel/style.tsx +6 -1
- package/src/modules/Analytics/GroupPanel/index.tsx +57 -64
- package/src/modules/Analytics/GroupPanel/style.tsx +6 -0
- package/src/modules/Categories/CategoriesList/CategoryPanel/index.tsx +15 -13
- package/src/modules/Categories/CategoriesList/CategoryPanel/style.tsx +11 -4
- package/src/modules/GlobalSettings/Robots/Item/RobotsPanel/index.tsx +20 -18
- package/src/modules/GlobalSettings/Robots/Item/RobotsPanel/style.tsx +6 -1
- package/src/modules/Navigation/Menus/List/Table/ConfigPanel/index.tsx +8 -6
- package/src/modules/Navigation/Menus/List/Table/ConfigPanel/style.tsx +6 -1
- package/src/modules/Navigation/Menus/List/Table/SidePanel/index.tsx +15 -13
- package/src/modules/Navigation/Menus/List/Table/SidePanel/style.tsx +9 -2
- package/src/modules/Redirects/RedirectPanel/index.tsx +33 -31
- package/src/modules/Redirects/RedirectPanel/style.tsx +6 -1
- package/src/modules/Redirects/index.tsx +0 -1
- package/src/modules/Settings/Integrations/IntegrationForm/VariablePanel/index.tsx +63 -61
- package/src/modules/Settings/Integrations/IntegrationForm/VariablePanel/style.tsx +6 -1
- package/src/modules/Settings/Integrations/IntegrationForm/index.tsx +5 -3
- package/src/modules/Settings/Integrations/IntegrationForm/style.tsx +6 -0
- package/src/modules/Settings/Languages/LanguagePanel/index.tsx +14 -12
- package/src/modules/Settings/Languages/LanguagePanel/style.tsx +8 -1
|
@@ -54,75 +54,77 @@ function VariablePanel(props: IProps): JSX.Element {
|
|
|
54
54
|
return (
|
|
55
55
|
<FloatingPanel title={title} toggleModal={toggleModal} isOpen={isOpen}>
|
|
56
56
|
<S.Wrapper>
|
|
57
|
-
<S.
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
title="Is this variable language-dependent?"
|
|
62
|
-
name="isMultilanguage"
|
|
63
|
-
fieldType="RadioGroup"
|
|
64
|
-
value={!!state.multilanguage?.length}
|
|
65
|
-
options={variableOptions}
|
|
66
|
-
onChange={handleIsMultilanguage}
|
|
67
|
-
/>
|
|
68
|
-
<FieldsBehavior
|
|
69
|
-
title="Variable Name"
|
|
70
|
-
name="variableName"
|
|
71
|
-
fieldType="TextField"
|
|
72
|
-
placeholder="Type a variable name"
|
|
73
|
-
mandatory
|
|
74
|
-
value={state.variableName}
|
|
75
|
-
onChange={handleNameChange}
|
|
76
|
-
/>
|
|
77
|
-
<FieldsBehavior
|
|
78
|
-
title="Variable Key"
|
|
79
|
-
name="variableKey"
|
|
80
|
-
fieldType="TextField"
|
|
81
|
-
placeholder="Type a variable {key}"
|
|
82
|
-
mandatory
|
|
83
|
-
value={state.variableKey}
|
|
84
|
-
onChange={handleKeyChange}
|
|
85
|
-
helptext="Define a Key to this variable"
|
|
86
|
-
/>
|
|
87
|
-
{!state.multilanguage?.length && (
|
|
57
|
+
<S.ContentWrapper>
|
|
58
|
+
<S.NoteWrapper>
|
|
59
|
+
<NoteField value={{ title: "", text: "Make sure you include the variable key in the code." }} />
|
|
60
|
+
</S.NoteWrapper>
|
|
88
61
|
<FieldsBehavior
|
|
89
|
-
title="
|
|
90
|
-
name="
|
|
91
|
-
fieldType="
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
onChange={
|
|
95
|
-
helptext="You can define a default value to this variable"
|
|
62
|
+
title="Is this variable language-dependent?"
|
|
63
|
+
name="isMultilanguage"
|
|
64
|
+
fieldType="RadioGroup"
|
|
65
|
+
value={!!state.multilanguage?.length}
|
|
66
|
+
options={variableOptions}
|
|
67
|
+
onChange={handleIsMultilanguage}
|
|
96
68
|
/>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
69
|
+
<FieldsBehavior
|
|
70
|
+
title="Variable Name"
|
|
71
|
+
name="variableName"
|
|
72
|
+
fieldType="TextField"
|
|
73
|
+
placeholder="Type a variable name"
|
|
74
|
+
mandatory
|
|
75
|
+
value={state.variableName}
|
|
76
|
+
onChange={handleNameChange}
|
|
77
|
+
/>
|
|
78
|
+
<FieldsBehavior
|
|
79
|
+
title="Variable Key"
|
|
80
|
+
name="variableKey"
|
|
81
|
+
fieldType="TextField"
|
|
82
|
+
placeholder="Type a variable {key}"
|
|
83
|
+
mandatory
|
|
84
|
+
value={state.variableKey}
|
|
85
|
+
onChange={handleKeyChange}
|
|
86
|
+
helptext="Define a Key to this variable"
|
|
87
|
+
/>
|
|
88
|
+
{!state.multilanguage?.length && (
|
|
108
89
|
<FieldsBehavior
|
|
109
|
-
title=
|
|
90
|
+
title="Default Value"
|
|
110
91
|
name="defaulValue"
|
|
111
92
|
fieldType="TextArea"
|
|
112
93
|
placeholder="Type a default value"
|
|
113
|
-
value={
|
|
114
|
-
onChange={
|
|
115
|
-
helptext=
|
|
116
|
-
key={field.languageId}
|
|
94
|
+
value={state.defaultValue}
|
|
95
|
+
onChange={handleValueChange}
|
|
96
|
+
helptext="You can define a default value to this variable"
|
|
117
97
|
/>
|
|
118
|
-
)
|
|
119
|
-
|
|
98
|
+
)}
|
|
99
|
+
{state.multilanguage?.map((field: IVariableLang, index: number) => {
|
|
100
|
+
const language = langs.find((lang: ILanguage) => lang.id === field.languageId);
|
|
101
|
+
|
|
102
|
+
const handleLangChange = (value: string) => {
|
|
103
|
+
const langs = state.multilanguage ? [...state.multilanguage] : [];
|
|
104
|
+
langs[index].value = value;
|
|
105
|
+
setState({ ...state, multilanguage: langs });
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<FieldsBehavior
|
|
110
|
+
title={`Default ${language?.language} Value`}
|
|
111
|
+
name="defaulValue"
|
|
112
|
+
fieldType="TextArea"
|
|
113
|
+
placeholder="Type a default value"
|
|
114
|
+
value={field.value}
|
|
115
|
+
onChange={handleLangChange}
|
|
116
|
+
helptext={`You can define a ${language?.language} default value to this variable`}
|
|
117
|
+
key={field.languageId}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
})}
|
|
121
|
+
</S.ContentWrapper>
|
|
122
|
+
<S.ActionWrapper>
|
|
123
|
+
<Button type="button" onClick={handleButtonClick}>
|
|
124
|
+
{title}
|
|
125
|
+
</Button>
|
|
126
|
+
</S.ActionWrapper>
|
|
120
127
|
</S.Wrapper>
|
|
121
|
-
<S.ActionWrapper>
|
|
122
|
-
<Button type="button" onClick={handleButtonClick}>
|
|
123
|
-
{title}
|
|
124
|
-
</Button>
|
|
125
|
-
</S.ActionWrapper>
|
|
126
128
|
</FloatingPanel>
|
|
127
129
|
);
|
|
128
130
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
|
|
3
3
|
const Wrapper = styled.div`
|
|
4
|
+
padding: ${(p) => p.theme.spacing.m};
|
|
5
|
+
height: 100%;
|
|
6
|
+
`;
|
|
7
|
+
|
|
8
|
+
const ContentWrapper = styled.div`
|
|
4
9
|
overflow-y: scroll;
|
|
5
10
|
border-bottom: 1px solid ${(p) => p.theme.color.uiLine};
|
|
6
11
|
position: absolute;
|
|
@@ -25,4 +30,4 @@ const NoteWrapper = styled.div`
|
|
|
25
30
|
margin-bottom: ${(p) => p.theme.spacing.m};
|
|
26
31
|
`;
|
|
27
32
|
|
|
28
|
-
export { Wrapper, ActionWrapper, NoteWrapper };
|
|
33
|
+
export { Wrapper, ContentWrapper, ActionWrapper, NoteWrapper };
|
|
@@ -270,9 +270,11 @@ const IntegrationForm = (props: IProps) => {
|
|
|
270
270
|
</S.SettingContent>
|
|
271
271
|
</S.SettingsWrapper>
|
|
272
272
|
<FloatingPanel title="Select pages" toggleModal={toggleModal} isOpen={isOpen}>
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
<S.ContentWrapper>
|
|
274
|
+
{isOpen && (
|
|
275
|
+
<PageFinder onClick={handleSetPage} isOpen={isOpen} multiple={true} hideSites={true} pages={pageIDs} />
|
|
276
|
+
)}
|
|
277
|
+
</S.ContentWrapper>
|
|
276
278
|
</FloatingPanel>
|
|
277
279
|
{isVariableOpen && (
|
|
278
280
|
<VariablePanel
|
|
@@ -63,6 +63,11 @@ const PageElement = styled.div`
|
|
|
63
63
|
white-space: nowrap;
|
|
64
64
|
`;
|
|
65
65
|
|
|
66
|
+
const ContentWrapper = styled.div`
|
|
67
|
+
padding: ${(p) => p.theme.spacing.m};
|
|
68
|
+
height: 100%;
|
|
69
|
+
`;
|
|
70
|
+
|
|
66
71
|
export {
|
|
67
72
|
Wrapper,
|
|
68
73
|
Heading,
|
|
@@ -74,4 +79,5 @@ export {
|
|
|
74
79
|
PagesWrapper,
|
|
75
80
|
ButtonWrapper,
|
|
76
81
|
PageElement,
|
|
82
|
+
ContentWrapper,
|
|
77
83
|
};
|
|
@@ -42,18 +42,20 @@ const LanguagePanel = (props: IProps): JSX.Element => {
|
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
44
|
<FloatingPanel title={title} toggleModal={toggleModal} isOpen={isOpen}>
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{editButton.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
{addButton.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
<S.Wrapper>
|
|
46
|
+
<Form item={item} />
|
|
47
|
+
<S.Footer>
|
|
48
|
+
{item ? (
|
|
49
|
+
<Button className="button" type="button" onClick={editButton.action} disabled={editButton.disabled}>
|
|
50
|
+
{editButton.label}
|
|
51
|
+
</Button>
|
|
52
|
+
) : (
|
|
53
|
+
<Button className="button" type="button" onClick={addButton.action} disabled={addButton.disabled}>
|
|
54
|
+
{addButton.label}
|
|
55
|
+
</Button>
|
|
56
|
+
)}
|
|
57
|
+
</S.Footer>
|
|
58
|
+
</S.Wrapper>
|
|
57
59
|
</FloatingPanel>
|
|
58
60
|
);
|
|
59
61
|
};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Wrapper = styled.div`
|
|
4
|
+
padding: ${(p) => p.theme.spacing.m};
|
|
5
|
+
height: 100%;
|
|
6
|
+
`;
|
|
7
|
+
|
|
8
|
+
const Footer = styled.div`
|
|
4
9
|
position: absolute;
|
|
5
10
|
bottom: ${(p) => p.theme.spacing.m};
|
|
6
11
|
right: ${(p) => p.theme.spacing.m};
|
|
7
12
|
`;
|
|
13
|
+
|
|
14
|
+
export { Wrapper, Footer };
|