@griddo/ax 10.6.13 → 10.6.15
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/TableFilters/StatusFilter/StatusFilter.test.tsx +1 -1
- package/src/components/Fields/ComponentContainer/index.tsx +4 -1
- package/src/components/Fields/ComponentContainer/style.tsx +4 -0
- package/src/components/Fields/ReferenceField/ItemList/Item/index.tsx +5 -3
- package/src/components/Fields/ReferenceField/ManualPanel/index.tsx +1 -20
- package/src/components/TableFilters/StatusFilter/index.tsx +1 -1
- package/src/modules/App/Routing/NavMenu/index.tsx +2 -1
- package/src/modules/Categories/CategoriesList/CategoryItem/index.tsx +10 -6
- package/src/modules/Categories/CategoriesList/index.tsx +2 -0
- package/src/modules/Settings/ContentTypes/DataPacks/Config/Form/index.tsx +25 -14
- package/src/modules/Settings/Integrations/IntegrationItem/index.tsx +14 -11
- package/src/modules/Settings/Integrations/IntegrationItem/style.tsx +10 -9
- package/src/types/index.tsx +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/ax",
|
|
3
3
|
"description": "Griddo Author Experience",
|
|
4
|
-
"version": "10.6.
|
|
4
|
+
"version": "10.6.15",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -233,5 +233,5 @@
|
|
|
233
233
|
"publishConfig": {
|
|
234
234
|
"access": "public"
|
|
235
235
|
},
|
|
236
|
-
"gitHead": "
|
|
236
|
+
"gitHead": "de546166a5eb00ce859620aca66c69baa6434482"
|
|
237
237
|
}
|
|
@@ -27,7 +27,7 @@ describe("StatusFilter component rendering", () => {
|
|
|
27
27
|
|
|
28
28
|
const statusFilter = screen.getByTestId("status-filter-header");
|
|
29
29
|
expect(statusFilter).toBeTruthy();
|
|
30
|
-
expect(statusFilter.textContent).toEqual("
|
|
30
|
+
expect(statusFilter.textContent).toEqual("Last update");
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
it("should render interactive arrow if not filter selected", () => {
|
|
@@ -157,6 +157,8 @@ const ComponentContainer = (props: IComponentContainerProps): JSX.Element => {
|
|
|
157
157
|
</>
|
|
158
158
|
);
|
|
159
159
|
|
|
160
|
+
const dragProps = provided && isArray && arrayLength >= 2 ? provided.dragHandleProps : {};
|
|
161
|
+
|
|
160
162
|
return isEmpty ? (
|
|
161
163
|
<EmptyContainer
|
|
162
164
|
whiteList={whiteList}
|
|
@@ -177,9 +179,10 @@ const ComponentContainer = (props: IComponentContainerProps): JSX.Element => {
|
|
|
177
179
|
ref={innerRef}
|
|
178
180
|
data-testid="component-container"
|
|
179
181
|
{...provided?.draggableProps}
|
|
182
|
+
{...dragProps}
|
|
180
183
|
>
|
|
181
184
|
{isArray && provided && (
|
|
182
|
-
<S.HandleWrapper
|
|
185
|
+
<S.HandleWrapper hidden={arrayLength < 2} data-testid="handle-wrapper">
|
|
183
186
|
<S.IconHandleWrapper>
|
|
184
187
|
<Icon name="drag" size="16" />
|
|
185
188
|
</S.IconHandleWrapper>
|
|
@@ -43,6 +43,7 @@ const Component = styled.span<{ disabled?: boolean }>`
|
|
|
43
43
|
|
|
44
44
|
&:hover {
|
|
45
45
|
border: 1px solid ${(p) => p.theme.color.overlayHoverPrimary};
|
|
46
|
+
cursor: pointer;
|
|
46
47
|
&:before {
|
|
47
48
|
content: "";
|
|
48
49
|
position: absolute;
|
|
@@ -140,6 +141,9 @@ const HandleWrapper = styled.div<{ hidden?: boolean }>`
|
|
|
140
141
|
display: ${(p) => (p.hidden ? "none" : "flex")};
|
|
141
142
|
align-items: center;
|
|
142
143
|
z-index: 1;
|
|
144
|
+
:hover {
|
|
145
|
+
cursor: grab;
|
|
146
|
+
}
|
|
143
147
|
`;
|
|
144
148
|
|
|
145
149
|
const IconHandleWrapper = styled.div`
|
|
@@ -8,7 +8,7 @@ import { Icon } from "@ax/components";
|
|
|
8
8
|
|
|
9
9
|
import * as S from "./style";
|
|
10
10
|
|
|
11
|
-
const Item = (props: IProps) => {
|
|
11
|
+
const Item = (props: IProps): JSX.Element => {
|
|
12
12
|
const { item, handleDelete, listLength, source, innerRef, provided } = props;
|
|
13
13
|
|
|
14
14
|
const removeItem = () => {
|
|
@@ -23,9 +23,11 @@ const Item = (props: IProps) => {
|
|
|
23
23
|
},
|
|
24
24
|
];
|
|
25
25
|
|
|
26
|
+
const dragProps = listLength < 2 ? {} : provided?.dragHandleProps;
|
|
27
|
+
|
|
26
28
|
return (
|
|
27
|
-
<S.Item ref={innerRef} data-testid="reference-field-item" {...provided?.draggableProps}>
|
|
28
|
-
<S.HandleWrapper
|
|
29
|
+
<S.Item ref={innerRef} data-testid="reference-field-item" {...provided?.draggableProps} {...dragProps}>
|
|
30
|
+
<S.HandleWrapper hidden={listLength < 2} data-testid="handle-wrapper">
|
|
29
31
|
<S.IconHandleWrapper>
|
|
30
32
|
<Icon name="drag" size="16" />
|
|
31
33
|
</S.IconHandleWrapper>
|
|
@@ -30,7 +30,6 @@ const ManualPanel = (props: IProps) => {
|
|
|
30
30
|
site: state.site || currentSite,
|
|
31
31
|
};
|
|
32
32
|
const [form, setForm] = useState(initForm);
|
|
33
|
-
const [itemSite, setItemSite] = useState<number | null>(state.site || currentSite);
|
|
34
33
|
const debouncedSearch = useDebounce(state.search);
|
|
35
34
|
|
|
36
35
|
const langOptions = globalLangs.map((lang) => ({ label: lang.label, value: lang.id.toString() }));
|
|
@@ -83,13 +82,9 @@ const ManualPanel = (props: IProps) => {
|
|
|
83
82
|
if (itemSelectedID) {
|
|
84
83
|
newSelIds = state.fixed.filter((a: number) => a !== itemSelectedID);
|
|
85
84
|
selItems = state.selectedItems.filter((b: IStructuredDataContent) => b.id !== itemSelectedID);
|
|
86
|
-
if (selItems.length === 0) {
|
|
87
|
-
setItemSite(form.site);
|
|
88
|
-
}
|
|
89
85
|
} else {
|
|
90
86
|
newSelIds = [...state.fixed, item.id];
|
|
91
87
|
selItems = [...state.selectedItems, item];
|
|
92
|
-
setItemSite(form.site);
|
|
93
88
|
}
|
|
94
89
|
const showSelected = state.showSelected && newSelIds.length === 0 ? false : state.showSelected;
|
|
95
90
|
setState((state: IReferenceState) => ({ ...state, fixed: newSelIds, selectedItems: selItems, showSelected }));
|
|
@@ -131,8 +126,6 @@ const ManualPanel = (props: IProps) => {
|
|
|
131
126
|
setState((state: IReferenceState) => ({ ...state, site: siteID }));
|
|
132
127
|
};
|
|
133
128
|
|
|
134
|
-
const hasContentFromOtherSite = state.fixed.length > 0 && form.site !== itemSite && !state.showSelected;
|
|
135
|
-
|
|
136
129
|
return (
|
|
137
130
|
<S.Wrapper>
|
|
138
131
|
{state.fixed.length > 0 && (
|
|
@@ -191,17 +184,6 @@ const ManualPanel = (props: IProps) => {
|
|
|
191
184
|
) : (
|
|
192
185
|
<S.ListWrapper>
|
|
193
186
|
<S.Order>Most recent</S.Order>
|
|
194
|
-
{state.site && !hasContentFromOtherSite && !state.showSelected && (
|
|
195
|
-
<S.Note>
|
|
196
|
-
You can only select content <strong>from 1 site</strong>.
|
|
197
|
-
</S.Note>
|
|
198
|
-
)}
|
|
199
|
-
{hasContentFromOtherSite && (
|
|
200
|
-
<S.Note>
|
|
201
|
-
Select content from one site at a time. <strong>Remove previous selection</strong> to choose from other
|
|
202
|
-
site.
|
|
203
|
-
</S.Note>
|
|
204
|
-
)}
|
|
205
187
|
<S.ItemList>
|
|
206
188
|
{showedItems &&
|
|
207
189
|
showedItems.map((item: IStructuredDataContent) => {
|
|
@@ -216,8 +198,7 @@ const ManualPanel = (props: IProps) => {
|
|
|
216
198
|
const disabled =
|
|
217
199
|
(hasMaxItems && !isChecked) ||
|
|
218
200
|
!!hasVersionInPageLanguage ||
|
|
219
|
-
(maxItems && state.fixed.length >= maxItems && !isChecked)
|
|
220
|
-
hasContentFromOtherSite;
|
|
201
|
+
(!!maxItems && state.fixed.length >= maxItems && !isChecked);
|
|
221
202
|
return (
|
|
222
203
|
<React.Fragment key={`${item.content.title}-${item.id}`}>
|
|
223
204
|
{source && (
|
|
@@ -46,7 +46,8 @@ const NavMenu = (props: IProps) => {
|
|
|
46
46
|
const goToPublishedSite = () => {
|
|
47
47
|
const language = siteLanguages.find((l) => l.id === lang.id);
|
|
48
48
|
if (language && language.home) {
|
|
49
|
-
|
|
49
|
+
const urlHome = `${language.home}${language.home.endsWith("/") ? "" : "/"}`;
|
|
50
|
+
window.open(urlHome, "_blank");
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
|
|
@@ -29,6 +29,7 @@ const CategoryItem = (props: ICategoryItemProps): JSX.Element => {
|
|
|
29
29
|
icon,
|
|
30
30
|
deleteCategoryGroup,
|
|
31
31
|
hoverCheck,
|
|
32
|
+
isDragging,
|
|
32
33
|
} = props;
|
|
33
34
|
|
|
34
35
|
const { isOpen, toggleModal } = useModal();
|
|
@@ -52,7 +53,7 @@ const CategoryItem = (props: ICategoryItemProps): JSX.Element => {
|
|
|
52
53
|
const { dataLanguages = [], content } = category;
|
|
53
54
|
const isGroup = category.type === "group";
|
|
54
55
|
|
|
55
|
-
const handleClick = () => toggleModal();
|
|
56
|
+
const handleClick = () => !isDragging && toggleModal();
|
|
56
57
|
|
|
57
58
|
const handleCloseModal = () => {
|
|
58
59
|
setTranslation(null);
|
|
@@ -61,6 +62,8 @@ const CategoryItem = (props: ICategoryItemProps): JSX.Element => {
|
|
|
61
62
|
|
|
62
63
|
const handleOnChange = (value: ICheck) => onChange(value);
|
|
63
64
|
|
|
65
|
+
const handleCheckClick = (e: React.MouseEvent<HTMLDivElement>) => e.stopPropagation();
|
|
66
|
+
|
|
64
67
|
const removeCategory = async () => {
|
|
65
68
|
const categoryIDs = dataLanguages.length > 0 ? dataLanguages.map((lang: IDataLanguage) => lang.id) : category.id;
|
|
66
69
|
const deleted = await deleteStructuredDataContent(categoryIDs);
|
|
@@ -186,17 +189,17 @@ const CategoryItem = (props: ICategoryItemProps): JSX.Element => {
|
|
|
186
189
|
|
|
187
190
|
return (
|
|
188
191
|
<>
|
|
189
|
-
<S.CategoryRow role="rowgroup" selected={isSelected}>
|
|
192
|
+
<S.CategoryRow role="rowgroup" selected={isSelected} onClick={handleClick} {...dragHandleProps}>
|
|
190
193
|
<S.HandleCell>
|
|
191
|
-
<S.IconWrapperDrag role="cell"
|
|
194
|
+
<S.IconWrapperDrag role="cell">
|
|
192
195
|
<Icon name="drag" size="16" />
|
|
193
196
|
</S.IconWrapperDrag>
|
|
194
197
|
<S.IconWrapper>{icon}</S.IconWrapper>
|
|
195
198
|
</S.HandleCell>
|
|
196
|
-
<S.CheckCell role="cell">
|
|
199
|
+
<S.CheckCell role="cell" onClick={handleCheckClick}>
|
|
197
200
|
<CheckField name="check" value={category.id} checked={isSelected || hoverCheck} onChange={handleOnChange} />
|
|
198
201
|
</S.CheckCell>
|
|
199
|
-
<S.NameCell role="cell"
|
|
202
|
+
<S.NameCell role="cell" clickable={allowedToEditTaxonomy} isGroup={isGroup}>
|
|
200
203
|
{isGroup && (
|
|
201
204
|
<S.FolderWrapper>
|
|
202
205
|
<Icon name="project" size="24" />
|
|
@@ -204,7 +207,7 @@ const CategoryItem = (props: ICategoryItemProps): JSX.Element => {
|
|
|
204
207
|
)}
|
|
205
208
|
<div>{content?.title || ""}</div>
|
|
206
209
|
</S.NameCell>
|
|
207
|
-
<S.CodeCell role="cell"
|
|
210
|
+
<S.CodeCell role="cell" clickable={allowedToEditTaxonomy}>
|
|
208
211
|
{isCategory(category) && category.content ? category.content.code : ""}
|
|
209
212
|
</S.CodeCell>
|
|
210
213
|
<S.SelectableCell role="cell">
|
|
@@ -265,6 +268,7 @@ interface IProps {
|
|
|
265
268
|
icon: JSX.Element;
|
|
266
269
|
dragHandleProps?: any;
|
|
267
270
|
hoverCheck?: boolean;
|
|
271
|
+
isDragging: boolean;
|
|
268
272
|
}
|
|
269
273
|
|
|
270
274
|
interface IDispatchProps {
|
|
@@ -264,6 +264,7 @@ const CategoriesList = (props: IProps): JSX.Element => {
|
|
|
264
264
|
const renderItem = ({ item, onExpand, onCollapse, provided }: RenderItemParams) => {
|
|
265
265
|
const category = formatItem(item, tree);
|
|
266
266
|
const isItemSelected = isSelected(category.id);
|
|
267
|
+
const isDragging = !!itemDragging && itemDragging !== category.id;
|
|
267
268
|
return (
|
|
268
269
|
<S.Draggable ref={provided.innerRef} {...provided.draggableProps}>
|
|
269
270
|
<CategoryItem
|
|
@@ -279,6 +280,7 @@ const CategoriesList = (props: IProps): JSX.Element => {
|
|
|
279
280
|
icon={getIcon(item, onExpand, onCollapse)}
|
|
280
281
|
dragHandleProps={provided.dragHandleProps}
|
|
281
282
|
hoverCheck={checkState.hoverCheck}
|
|
283
|
+
isDragging={isDragging}
|
|
282
284
|
/>
|
|
283
285
|
</S.Draggable>
|
|
284
286
|
);
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { connect } from "react-redux";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
IDataPack,
|
|
6
|
+
IDataPackConfigImport,
|
|
7
|
+
IDataPackConfigImportCategory,
|
|
8
|
+
IRootState,
|
|
9
|
+
ISite,
|
|
10
|
+
IStructuredData,
|
|
11
|
+
ITemplate,
|
|
12
|
+
} from "@ax/types";
|
|
5
13
|
import { dataPacksActions } from "@ax/containers/Settings";
|
|
6
14
|
import { FieldsBehavior, Modal, Tag } from "@ax/components";
|
|
7
15
|
import { useModal } from "@ax/hooks";
|
|
@@ -11,12 +19,17 @@ import * as S from "./style";
|
|
|
11
19
|
|
|
12
20
|
const Form = (props: IProps): JSX.Element => {
|
|
13
21
|
const { currentSite, selected, updateFormValue, configFormData, allStructuredData } = props;
|
|
14
|
-
const { templates, categories, structuredData } = selected;
|
|
15
22
|
|
|
16
23
|
if (!currentSite) {
|
|
17
24
|
throw new Error(`ERROR: User reached Data Pack form with null site info`);
|
|
18
25
|
}
|
|
19
26
|
|
|
27
|
+
if (!selected) {
|
|
28
|
+
throw new Error(`ERROR: User reached Data Pack form without one selected`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const { templates, categories, structuredData } = selected;
|
|
32
|
+
|
|
20
33
|
const getSubscribedData = (importValue: IDataPackConfigImport[]) => {
|
|
21
34
|
const value: Record<string, ICategoryValue[]> = {};
|
|
22
35
|
if (!importValue) return value;
|
|
@@ -82,21 +95,21 @@ const Form = (props: IProps): JSX.Element => {
|
|
|
82
95
|
const secondaryAction = { title: "Cancel", onClick: toggleModal };
|
|
83
96
|
|
|
84
97
|
const getCategoryText = (id: string): string => {
|
|
85
|
-
const data = [...categories, ...allStructuredData.global, ...allStructuredData.site].find(
|
|
86
|
-
(elem: any) => elem.id === id
|
|
87
|
-
);
|
|
98
|
+
const data = [...categories, ...allStructuredData.global, ...allStructuredData.site].find((elem) => elem.id === id);
|
|
88
99
|
return data ? data.title : id;
|
|
89
100
|
};
|
|
90
101
|
|
|
91
102
|
const getIsGlobal = (id: string): boolean => {
|
|
92
|
-
const data = allStructuredData && allStructuredData.site.find((elem
|
|
103
|
+
const data = allStructuredData && allStructuredData.site.find((elem) => elem.id === id);
|
|
93
104
|
return data && data.local ? false : true;
|
|
94
105
|
};
|
|
95
106
|
|
|
107
|
+
const globalPageData = structuredData.find((data) => data.fromPage && !data.local);
|
|
108
|
+
|
|
96
109
|
const elements =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
110
|
+
globalPageData &&
|
|
111
|
+
globalPageData.relatedCategories &&
|
|
112
|
+
globalPageData.relatedCategories.map((cat) => {
|
|
100
113
|
return { source: cat, key: cat, placeholder: getCategoryText(cat), isGlobal: getIsGlobal(cat) };
|
|
101
114
|
});
|
|
102
115
|
|
|
@@ -132,12 +145,10 @@ const Form = (props: IProps): JSX.Element => {
|
|
|
132
145
|
</S.CategoriesWrapper>
|
|
133
146
|
);
|
|
134
147
|
|
|
135
|
-
const isGlobalDataPage = structuredData[0] && structuredData[0].fromPage && !structuredData[0].local;
|
|
136
|
-
|
|
137
148
|
return (
|
|
138
149
|
<>
|
|
139
150
|
<S.Config>
|
|
140
|
-
{
|
|
151
|
+
{!!globalPageData && (
|
|
141
152
|
<S.SectionContent>
|
|
142
153
|
<S.SubscribeWrapper>
|
|
143
154
|
<S.Heading>Subscribe to data</S.Heading>
|
|
@@ -215,11 +226,11 @@ interface ICategoryValue {
|
|
|
215
226
|
}
|
|
216
227
|
|
|
217
228
|
interface IProps {
|
|
218
|
-
selected:
|
|
229
|
+
selected: IDataPack | null;
|
|
219
230
|
currentSite: ISite | null;
|
|
220
231
|
updateFormValue: (config?: any) => void;
|
|
221
232
|
configFormData: any;
|
|
222
|
-
allStructuredData:
|
|
233
|
+
allStructuredData: { global: IStructuredData[]; site: IStructuredData[] };
|
|
223
234
|
}
|
|
224
235
|
|
|
225
236
|
const mapDispatchToProps = {
|
|
@@ -127,6 +127,8 @@ const IntegrationItem = (props: IIntegrationItemProps): JSX.Element => {
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
+
const handleCheckClick = (e: React.MouseEvent<HTMLDivElement>) => e.stopPropagation();
|
|
131
|
+
|
|
130
132
|
const isToggleDisabled =
|
|
131
133
|
(integration.active && !isAllowedToDeactivateIntegrations) ||
|
|
132
134
|
(!integration.active && !isAllowedToActivateIntegrations);
|
|
@@ -187,6 +189,8 @@ const IntegrationItem = (props: IIntegrationItemProps): JSX.Element => {
|
|
|
187
189
|
/>
|
|
188
190
|
);
|
|
189
191
|
|
|
192
|
+
const dragProps = listLength < 2 ? {} : provided?.dragHandleProps;
|
|
193
|
+
|
|
190
194
|
return (
|
|
191
195
|
<>
|
|
192
196
|
<S.ItemRow
|
|
@@ -195,14 +199,17 @@ const IntegrationItem = (props: IIntegrationItemProps): JSX.Element => {
|
|
|
195
199
|
ref={innerRef}
|
|
196
200
|
data-testid="integration-item-row"
|
|
197
201
|
disabled={!integration.editable}
|
|
202
|
+
onClick={handleClick}
|
|
203
|
+
clickable={isAllowedToManageIntegrations}
|
|
198
204
|
{...provided?.draggableProps}
|
|
205
|
+
{...dragProps}
|
|
199
206
|
>
|
|
200
|
-
<S.HandleWrapper
|
|
207
|
+
<S.HandleWrapper hidden={listLength < 2} data-testid="handle-wrapper">
|
|
201
208
|
<S.IconHandleWrapper>
|
|
202
209
|
<Icon name="drag" size="16" />
|
|
203
210
|
</S.IconHandleWrapper>
|
|
204
211
|
</S.HandleWrapper>
|
|
205
|
-
<S.CheckCell role="cell" hasHandle={listLength >= 2}>
|
|
212
|
+
<S.CheckCell role="cell" hasHandle={listLength >= 2} onClick={handleCheckClick}>
|
|
206
213
|
{!integration.editable ? (
|
|
207
214
|
<Tooltip content="This cannot be selected. You can only reorder it" left={60}>
|
|
208
215
|
{checkBox}
|
|
@@ -211,24 +218,20 @@ const IntegrationItem = (props: IIntegrationItemProps): JSX.Element => {
|
|
|
211
218
|
<>{checkBox}</>
|
|
212
219
|
)}
|
|
213
220
|
</S.CheckCell>
|
|
214
|
-
<S.NameCell role="cell"
|
|
221
|
+
<S.NameCell role="cell">
|
|
215
222
|
<S.Order>#{integration.correlativeScriptOrder}</S.Order>
|
|
216
223
|
<div>{integration.name}</div>
|
|
217
224
|
</S.NameCell>
|
|
218
|
-
<S.DescriptionCell role="cell"
|
|
219
|
-
{getIntegrationDescription()}
|
|
220
|
-
</S.DescriptionCell>
|
|
225
|
+
<S.DescriptionCell role="cell">{getIntegrationDescription()}</S.DescriptionCell>
|
|
221
226
|
{integration.type === "addon" && (
|
|
222
227
|
<>
|
|
223
|
-
<S.AppliedOnCell role="cell"
|
|
228
|
+
<S.AppliedOnCell role="cell">
|
|
224
229
|
<div>
|
|
225
230
|
Applied on: <S.ContentPresence>{getContentPresence(integration.contentPresence)}</S.ContentPresence>
|
|
226
231
|
</div>
|
|
227
232
|
</S.AppliedOnCell>
|
|
228
|
-
<S.CodeCell role="cell"
|
|
229
|
-
|
|
230
|
-
</S.CodeCell>
|
|
231
|
-
<S.StateCell role="cell">
|
|
233
|
+
<S.CodeCell role="cell">{getIntegrationTag()}</S.CodeCell>
|
|
234
|
+
<S.StateCell role="cell" onClick={handleCheckClick}>
|
|
232
235
|
<ToggleField
|
|
233
236
|
name="state"
|
|
234
237
|
value={integration.active}
|
|
@@ -12,9 +12,8 @@ const CheckCell = styled(Cell)<{ hasHandle: boolean }>`
|
|
|
12
12
|
}
|
|
13
13
|
`;
|
|
14
14
|
|
|
15
|
-
const NameCell = styled(Cell)
|
|
15
|
+
const NameCell = styled(Cell)`
|
|
16
16
|
${(p) => p.theme.textStyle.uiM};
|
|
17
|
-
pointer-events: ${(p) => (p.clickable ? "auto" : "none")};
|
|
18
17
|
color: ${(p) => p.theme.color.textHighEmphasis};
|
|
19
18
|
flex: 0 0 350px;
|
|
20
19
|
flex-flow: row wrap;
|
|
@@ -27,9 +26,8 @@ const Order = styled.div`
|
|
|
27
26
|
margin-right: ${(p) => p.theme.spacing.xxs};
|
|
28
27
|
`;
|
|
29
28
|
|
|
30
|
-
const DescriptionCell = styled(Cell)
|
|
29
|
+
const DescriptionCell = styled(Cell)`
|
|
31
30
|
${(p) => p.theme.textStyle.uiXS};
|
|
32
|
-
pointer-events: ${(p) => (p.clickable ? "auto" : "none")};
|
|
33
31
|
color: ${(p) => p.theme.color.textMediumEmphasis};
|
|
34
32
|
flex: 1;
|
|
35
33
|
a {
|
|
@@ -38,15 +36,13 @@ const DescriptionCell = styled(Cell)<{ clickable: boolean }>`
|
|
|
38
36
|
}
|
|
39
37
|
`;
|
|
40
38
|
|
|
41
|
-
const AppliedOnCell = styled(Cell)
|
|
39
|
+
const AppliedOnCell = styled(Cell)`
|
|
42
40
|
${(p) => p.theme.textStyle.uiXS};
|
|
43
|
-
pointer-events: ${(p) => (p.clickable ? "auto" : "none")};
|
|
44
41
|
color: ${(p) => p.theme.color.textMediumEmphasis};
|
|
45
42
|
flex: 0 0 200px;
|
|
46
43
|
`;
|
|
47
44
|
|
|
48
|
-
const CodeCell = styled(Cell)
|
|
49
|
-
pointer-events: ${(p) => (p.clickable ? "auto" : "none")};
|
|
45
|
+
const CodeCell = styled(Cell)`
|
|
50
46
|
flex: 0 0 130px;
|
|
51
47
|
align-items: center;
|
|
52
48
|
`;
|
|
@@ -80,9 +76,11 @@ const StyledActionMenu = styled(ActionMenu)`
|
|
|
80
76
|
margin-left: auto;
|
|
81
77
|
`;
|
|
82
78
|
|
|
83
|
-
const ItemRow = styled(Row)<{ disabled: boolean }>`
|
|
79
|
+
const ItemRow = styled(Row)<{ disabled: boolean; clickable: boolean }>`
|
|
84
80
|
cursor: ${(p) => (p.disabled ? "default" : "pointer")};
|
|
81
|
+
pointer-events: ${(p) => (p.clickable ? "auto" : "none")};
|
|
85
82
|
&:hover {
|
|
83
|
+
cursor: pointer;
|
|
86
84
|
${StyledActionMenu} {
|
|
87
85
|
opacity: 1;
|
|
88
86
|
}
|
|
@@ -93,6 +91,9 @@ const HandleWrapper = styled.div<{ hidden?: boolean }>`
|
|
|
93
91
|
padding-left: ${(p) => p.theme.spacing.xs};
|
|
94
92
|
display: ${(p) => (p.hidden ? "none" : "flex")};
|
|
95
93
|
align-items: center;
|
|
94
|
+
:hover {
|
|
95
|
+
cursor: grab;
|
|
96
|
+
}
|
|
96
97
|
`;
|
|
97
98
|
|
|
98
99
|
const IconHandleWrapper = styled.div`
|
package/src/types/index.tsx
CHANGED
|
@@ -454,6 +454,7 @@ export interface IStructuredData {
|
|
|
454
454
|
dataPacks: string[];
|
|
455
455
|
private?: boolean;
|
|
456
456
|
exportable?: boolean;
|
|
457
|
+
relatedCategories: string[];
|
|
457
458
|
}
|
|
458
459
|
|
|
459
460
|
export interface IDataLanguage {
|
|
@@ -628,6 +629,7 @@ export interface IDataPack {
|
|
|
628
629
|
categories: any[];
|
|
629
630
|
activated: boolean;
|
|
630
631
|
config: string;
|
|
632
|
+
structuredData: IStructuredData[];
|
|
631
633
|
}
|
|
632
634
|
|
|
633
635
|
export interface ISocialState {
|