@arc-fusion/content-integrations
Advanced tools
Comparing version 0.0.29 to 1.0.0
@@ -29,3 +29,4 @@ "use strict"; | ||
_meta$defaultField = meta.defaultField, | ||
defaultField = _meta$defaultField === void 0 ? 'last_updated_date' : _meta$defaultField; | ||
defaultField = _meta$defaultField === void 0 ? 'last_updated_date' : _meta$defaultField, | ||
testId = meta.testId; | ||
var _useState = (0, _react2.useState)(defaultField), | ||
@@ -115,3 +116,4 @@ _useState2 = _slicedToArray(_useState, 2), | ||
checked: radioState === 'all', | ||
isDarkMode: true | ||
isDarkMode: true, | ||
testId: "".concat(testId, "-all") | ||
})), (0, _react.jsx)("li", null, (0, _react.jsx)(_Radio.default, { | ||
@@ -129,3 +131,4 @@ label: (0, _react.jsx)(_reactIntl.FormattedMessage, { | ||
checked: radioState === 'day', | ||
isDarkMode: true | ||
isDarkMode: true, | ||
testId: "".concat(testId, "-day") | ||
})), (0, _react.jsx)("li", null, (0, _react.jsx)(_Radio.default, { | ||
@@ -143,3 +146,4 @@ label: (0, _react.jsx)(_reactIntl.FormattedMessage, { | ||
checked: radioState === 'week', | ||
isDarkMode: true | ||
isDarkMode: true, | ||
testId: "".concat(testId, "-week") | ||
})), (0, _react.jsx)("li", null, (0, _react.jsx)(_Radio.default, { | ||
@@ -157,3 +161,4 @@ label: (0, _react.jsx)(_reactIntl.FormattedMessage, { | ||
checked: radioState === 'month', | ||
isDarkMode: true | ||
isDarkMode: true, | ||
testId: "".concat(testId, "-month") | ||
})))); | ||
@@ -160,0 +165,0 @@ }; |
@@ -39,3 +39,4 @@ "use strict"; | ||
labelText = meta.labelText, | ||
placeholder = meta.placeholder; | ||
placeholder = meta.placeholder, | ||
testId = meta.testId; | ||
var nameField = dataMeta.nameField, | ||
@@ -89,2 +90,3 @@ idField = dataMeta.idField; | ||
return /*#__PURE__*/_react.default.createElement("li", { | ||
"data-testid": "".concat(testId, "-selectSearchOption"), | ||
onClick: function onClick(e) { | ||
@@ -113,3 +115,4 @@ onSelectHandler(item); | ||
type: "button", | ||
onClick: openDropOptionsBtnClick | ||
onClick: openDropOptionsBtnClick, | ||
"data-testid": "".concat(testId, "-selectSearchOptionCaret") | ||
}, _icons.default.carets.selectCaret)), enableDropChoices && generateSearchOptions()); | ||
@@ -116,0 +119,0 @@ }; |
@@ -41,3 +41,4 @@ "use strict"; | ||
callback = _ref.callback, | ||
website = _ref.website; | ||
website = _ref.website, | ||
testId = _ref.testId; | ||
var _useState = (0, _react.useState)(false), | ||
@@ -96,3 +97,3 @@ _useState2 = _slicedToArray(_useState, 2), | ||
key: id, | ||
"data-testid": "MultiSelectComboBox-item" | ||
"data-testid": "".concat(testId, "-MultiSelectComboBox-item") | ||
}, listItemObj === null || listItemObj === void 0 ? void 0 : listItemObj.display_name, !isDisabled ? /*#__PURE__*/_react.default.createElement("i", { | ||
@@ -121,10 +122,11 @@ onClick: function onClick(event) { | ||
className: "MultiSelectComboBox__wrapper", | ||
ref: wrapperRef, | ||
"data-testid": "MultiSelectComboBox" | ||
ref: wrapperRef | ||
}, /*#__PURE__*/_react.default.createElement("div", { | ||
onClick: openClickHandler, | ||
className: "MultiSelectComboBox" | ||
className: "MultiSelectComboBox", | ||
"data-testid": "".concat(testId, "-MultiSelectComboBox") | ||
}, /*#__PURE__*/_react.default.createElement("div", { | ||
onClick: openClickHandler, | ||
className: "MultiSelectComboBox__caret" | ||
className: "MultiSelectComboBox__caret", | ||
"data-testid": "".concat(testId, "-MultiSelectComboBox-caret") | ||
}, isOpen ? _editorIcons.default.toolbar.dropdown.closed : _editorIcons.default.toolbar.dropdown.opened), renderSelectedList(returnListObject)), isOpen && /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -131,0 +133,0 @@ className: "MultiSelectComboBox__items" |
@@ -17,3 +17,4 @@ "use strict"; | ||
checked = _ref.checked, | ||
defaultChecked = _ref.defaultChecked; | ||
defaultChecked = _ref.defaultChecked, | ||
testId = _ref.testId; | ||
var styles = { | ||
@@ -81,3 +82,4 @@ radio: { | ||
value: id, | ||
defaultChecked: defaultChecked | ||
defaultChecked: defaultChecked, | ||
"data-testid": testId | ||
}) : (0, _react.jsx)("input", { | ||
@@ -89,3 +91,4 @@ type: "radio", | ||
checked: checked, | ||
onChange: onChange | ||
onChange: onChange, | ||
"data-testid": testId | ||
}), (0, _react.jsx)("label", { | ||
@@ -92,0 +95,0 @@ htmlFor: id, |
@@ -14,3 +14,4 @@ "use strict"; | ||
fill: "none", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
xmlns: "http://www.w3.org/2000/svg", | ||
"data-testid": "content-integration-icons-caret" | ||
}, /*#__PURE__*/_react.default.createElement("path", { | ||
@@ -17,0 +18,0 @@ d: "M0.438401 2.0054L5.01457 7.20165C5.09833 7.28903 5.21412 7.33844 5.33516 7.33844C5.45619 7.33844 5.57198 7.28903 5.65575 7.20165L10.2298 2.0054C10.3037 1.92212 10.3407 1.81242 10.3323 1.70138C10.3239 1.59034 10.2709 1.48745 10.1853 1.41624L9.4145 0.767487C9.23568 0.616708 8.96897 0.637298 8.8154 0.813737L5.41369 4.75249C5.3939 4.77548 5.36507 4.78871 5.33474 4.78871C5.3044 4.78871 5.27558 4.77548 5.25579 4.75249L1.85283 0.813319C1.77896 0.728909 1.67474 0.677095 1.56286 0.669153C1.45079 0.65916 1.33944 0.694928 1.25415 0.768319L0.48298 1.41624C0.396884 1.48732 0.343353 1.59033 0.334663 1.70165C0.326235 1.81283 0.363727 1.92261 0.438401 2.0054Z", |
@@ -14,3 +14,4 @@ "use strict"; | ||
fill: "currentColor", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
xmlns: "http://www.w3.org/2000/svg", | ||
"data-testid": "content-integration-icons-collection-linkout" | ||
}, /*#__PURE__*/_react.default.createElement("path", { | ||
@@ -28,3 +29,4 @@ d: "M7.66667 7.22012V8.50012C7.66667 9.5605 6.77124 10.4201 5.66667 10.4201C4.5621 10.4201 3.66667 9.5605 3.66667 8.50012V7.22012C3.6665 6.74779 3.7306 6.27747 3.85733 5.82108C3.87056 5.77314 3.85988 5.72203 3.82843 5.6827C3.79699 5.64336 3.74832 5.62025 3.69667 5.62012H1.33333C0.596954 5.62012 0 6.19319 0 6.90012V15.2201C0 15.927 0.596954 16.5001 1.33333 16.5001H10C10.7364 16.5001 11.3333 15.927 11.3333 15.2201V6.90012C11.3333 6.19319 10.7364 5.62012 10 5.62012H9.33333C8.41286 5.62012 7.66667 6.33646 7.66667 7.22012Z", | ||
fill: "currentColor", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
xmlns: "http://www.w3.org/2000/svg", | ||
"data-testid": "content-integration-icons-collection--open-folder" | ||
}, /*#__PURE__*/_react.default.createElement("g", { | ||
@@ -47,3 +49,4 @@ clipPath: "url(#clip0_2958_1993)" | ||
fill: "currentColor", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
xmlns: "http://www.w3.org/2000/svg", | ||
"data-testid": "content-integration-icons-collection-search" | ||
}, /*#__PURE__*/_react.default.createElement("path", { | ||
@@ -60,3 +63,4 @@ fillRule: "evenodd", | ||
fill: "currentColor", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
xmlns: "http://www.w3.org/2000/svg", | ||
"data-testid": "content-integration-icons-collection-icon" | ||
}, /*#__PURE__*/_react.default.createElement("path", { | ||
@@ -63,0 +67,0 @@ fillRule: "evenodd", |
@@ -14,3 +14,4 @@ "use strict"; | ||
fill: "currentColor", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
xmlns: "http://www.w3.org/2000/svg", | ||
"data-testid": "content-integration-icons-story-linkOut" | ||
}, /*#__PURE__*/_react.default.createElement("path", { | ||
@@ -28,3 +29,4 @@ d: "M7.66667 7.22012V8.50012C7.66667 9.5605 6.77124 10.4201 5.66667 10.4201C4.5621 10.4201 3.66667 9.5605 3.66667 8.50012V7.22012C3.6665 6.74779 3.7306 6.27747 3.85733 5.82108C3.87056 5.77314 3.85988 5.72203 3.82843 5.6827C3.79699 5.64336 3.74832 5.62025 3.69667 5.62012H1.33333C0.596954 5.62012 0 6.19319 0 6.90012V15.2201C0 15.927 0.596954 16.5001 1.33333 16.5001H10C10.7364 16.5001 11.3333 15.927 11.3333 15.2201V6.90012C11.3333 6.19319 10.7364 5.62012 10 5.62012H9.33333C8.41286 5.62012 7.66667 6.33646 7.66667 7.22012Z", | ||
fill: "currentColor", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
xmlns: "http://www.w3.org/2000/svg", | ||
"data-testid": "content-integration-icons-story-openFolder" | ||
}, /*#__PURE__*/_react.default.createElement("g", { | ||
@@ -47,3 +49,4 @@ "clip-path": "url(#clip0_2958_1993)" | ||
fill: "currentColor", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
xmlns: "http://www.w3.org/2000/svg", | ||
"data-testid": "content-integration-icons-story-search" | ||
}, /*#__PURE__*/_react.default.createElement("path", { | ||
@@ -60,3 +63,4 @@ fillRule: "evenodd", | ||
fill: "currentColor", | ||
xmlns: "http://www.w3.org/2000/svg" | ||
xmlns: "http://www.w3.org/2000/svg", | ||
"data-testid": "content-integration-icons-story" | ||
}, /*#__PURE__*/_react.default.createElement("path", { | ||
@@ -63,0 +67,0 @@ fillRule: "evenodd", |
@@ -9,3 +9,2 @@ "use strict"; | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _format = _interopRequireDefault(require("date-fns/format")); | ||
var _reactIntl = require("react-intl"); | ||
@@ -76,3 +75,3 @@ var _context = require("./context"); | ||
return txt; | ||
})), /*#__PURE__*/_react.default.createElement("span", null, (0, _dates.getFormatDate)(last_updated_date))); | ||
})), /*#__PURE__*/_react.default.createElement("span", null, last_updated_date ? (0, _dates.getFormatDate)(last_updated_date) : '--')); | ||
}; | ||
@@ -83,3 +82,4 @@ | ||
var generateSectionsList = function generateSectionsList(taxonomy) { | ||
var sections = taxonomy.sections; | ||
var _taxonomy$sections = taxonomy.sections, | ||
sections = _taxonomy$sections === void 0 ? [] : _taxonomy$sections; | ||
@@ -119,6 +119,9 @@ // show only sections related to this website | ||
var _id = story._id, | ||
headlines = story.headlines, | ||
credits = story.credits, | ||
_story$headlines = story.headlines, | ||
headlines = _story$headlines === void 0 ? {} : _story$headlines, | ||
_story$credits = story.credits, | ||
credits = _story$credits === void 0 ? {} : _story$credits, | ||
last_updated_date = story.last_updated_date, | ||
taxonomy = story.taxonomy; | ||
_story$taxonomy = story.taxonomy, | ||
taxonomy = _story$taxonomy === void 0 ? {} : _story$taxonomy; | ||
var _credits$by = credits.by, | ||
@@ -146,3 +149,4 @@ by = _credits$by === void 0 ? [] : _credits$by; | ||
target: "_blank", | ||
rel: "noreferrer" | ||
rel: "noreferrer", | ||
"data-testid": "StorySearch-linkout" | ||
}, _icons.default.storyIcons.linkOut)), showLinkOutHelp && /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -149,0 +153,0 @@ className: "story__integration__linkOut" |
@@ -18,17 +18,17 @@ "use strict"; | ||
// Sections - meta data for select component | ||
var sectionsMeta = { | ||
fieldName: 'int_select_sections', | ||
fieldId: 'int_select_sections', | ||
labelText: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, { | ||
id: "integrations.shared.filters.primarySection" | ||
}, function (txt) { | ||
return txt; | ||
}) | ||
}; | ||
// const sectionsMeta = { | ||
// fieldName: 'int_select_sections', | ||
// fieldId: 'int_select_sections', | ||
// labelText: ( | ||
// <FormattedMessage id="integrations.shared.filters.primarySection"> | ||
// {txt => txt} | ||
// </FormattedMessage> | ||
// ) | ||
// } | ||
// Sections - json property keys to get data from | ||
var sectionsDataMeta = { | ||
nameField: 'name', | ||
idField: '_id' | ||
}; | ||
// // Sections - json property keys to get data from | ||
// const sectionsDataMeta = { | ||
// nameField: 'name', | ||
// idField: '_id' | ||
// } | ||
@@ -43,3 +43,4 @@ // Authors - meta data for select component | ||
return txt; | ||
}) | ||
}), | ||
testId: 'StorySearch-filter-selectAuthor' | ||
}; | ||
@@ -62,3 +63,4 @@ | ||
}), | ||
defaultField: 'last_updated_date' | ||
defaultField: 'last_updated_date', | ||
testId: 'StorySearch-filter-dateRange' | ||
}; | ||
@@ -65,0 +67,0 @@ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_filters.IntSharedSearchText, { |
{ | ||
"name": "@arc-fusion/content-integrations", | ||
"version": "0.0.29", | ||
"version": "1.0.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -13,3 +13,3 @@ /** @jsxRuntime classic */ | ||
const DateRangeContext = ({ meta = {}, dataObject, dataObjectSetter }) => { | ||
const { fieldName, fieldId, labelText, defaultField = 'last_updated_date' } = meta | ||
const { fieldName, fieldId, labelText, defaultField = 'last_updated_date', testId } = meta | ||
const [rangeType, setRangeType] = useState(defaultField) | ||
@@ -95,2 +95,3 @@ const [radioState, setRadioState] = useState('all') | ||
isDarkMode | ||
testId={`${testId}-all`} | ||
/> | ||
@@ -110,2 +111,3 @@ </li> | ||
isDarkMode | ||
testId={`${testId}-day`} | ||
/> | ||
@@ -125,2 +127,3 @@ </li> | ||
isDarkMode | ||
testId={`${testId}-week`} | ||
/> | ||
@@ -140,2 +143,3 @@ </li> | ||
isDarkMode | ||
testId={`${testId}-month`} | ||
/> | ||
@@ -142,0 +146,0 @@ </li> |
@@ -14,3 +14,3 @@ import React, { useState } from 'react' | ||
}) => { | ||
const { fieldName, fieldId, labelText, placeholder } = meta | ||
const { fieldName, fieldId, labelText, placeholder, testId } = meta | ||
const { nameField, idField } = dataMeta | ||
@@ -66,2 +66,3 @@ const localDataArray = [...dataArray] | ||
<li | ||
data-testid={`${testId}-selectSearchOption`} | ||
onClick={e => { | ||
@@ -96,3 +97,6 @@ onSelectHandler(item) | ||
{enableDropChoices && ( | ||
<button type="button" onClick={openDropOptionsBtnClick}> | ||
<button | ||
type="button" | ||
onClick={openDropOptionsBtnClick} | ||
data-testid={`${testId}-selectSearchOptionCaret`}> | ||
{Icons.carets.selectCaret} | ||
@@ -99,0 +103,0 @@ </button> |
@@ -22,3 +22,4 @@ import React, { useState, useRef, useEffect } from 'react' | ||
callback, | ||
website | ||
website, | ||
testId | ||
}) => { | ||
@@ -79,3 +80,3 @@ const [isOpen, setIsOpen] = useState(false) | ||
key={id} | ||
data-testid="MultiSelectComboBox-item"> | ||
data-testid={`${testId}-MultiSelectComboBox-item`}> | ||
{listItemObj?.display_name} | ||
@@ -112,8 +113,11 @@ {!isDisabled ? ( | ||
return ( | ||
<div | ||
className="MultiSelectComboBox__wrapper" | ||
ref={wrapperRef} | ||
data-testid="MultiSelectComboBox"> | ||
<div onClick={openClickHandler} className="MultiSelectComboBox"> | ||
<div onClick={openClickHandler} className="MultiSelectComboBox__caret"> | ||
<div className="MultiSelectComboBox__wrapper" ref={wrapperRef}> | ||
<div | ||
onClick={openClickHandler} | ||
className="MultiSelectComboBox" | ||
data-testid={`${testId}-MultiSelectComboBox`}> | ||
<div | ||
onClick={openClickHandler} | ||
className="MultiSelectComboBox__caret" | ||
data-testid={`${testId}-MultiSelectComboBox-caret`}> | ||
{isOpen ? EditorIcons.toolbar.dropdown.closed : EditorIcons.toolbar.dropdown.opened} | ||
@@ -120,0 +124,0 @@ </div> |
@@ -5,10 +5,3 @@ /** @jsxRuntime classic */ | ||
const Radio = ({ | ||
onChange, | ||
label, | ||
id, | ||
groupName, | ||
checked, | ||
defaultChecked | ||
}) => { | ||
const Radio = ({ onChange, label, id, groupName, checked, defaultChecked, testId }) => { | ||
const styles = { | ||
@@ -33,3 +26,3 @@ radio: { | ||
left: 0, | ||
right: 0, | ||
right: 0 | ||
}, | ||
@@ -42,4 +35,4 @@ '&:before': { | ||
borderColor: 'var(--__arc--colors-dmGray200)', | ||
cursor: 'pointer', | ||
}, | ||
cursor: 'pointer' | ||
} | ||
}, | ||
@@ -58,3 +51,3 @@ '& input[type="radio"]': { | ||
border: '2px solid', | ||
borderColor: 'var(--__arc--colors-dmPurple100)', | ||
borderColor: 'var(--__arc--colors-dmPurple100)' | ||
}, | ||
@@ -66,9 +59,9 @@ '+ label:after': { | ||
height: '6px', | ||
margin: '5px', | ||
}, | ||
}, | ||
}, | ||
}, | ||
margin: '5px' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
return ( | ||
@@ -83,2 +76,3 @@ <div css={styles.radio}> | ||
defaultChecked={defaultChecked} | ||
data-testid={testId} | ||
/> | ||
@@ -93,2 +87,3 @@ ) : ( | ||
onChange={onChange} | ||
data-testid={testId} | ||
/> | ||
@@ -95,0 +90,0 @@ )} |
import React from 'react' | ||
const selectCaret = ( | ||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg" data-testid="content-integration-icons-caret"> | ||
<path | ||
@@ -6,0 +6,0 @@ d="M0.438401 2.0054L5.01457 7.20165C5.09833 7.28903 5.21412 7.33844 5.33516 7.33844C5.45619 7.33844 5.57198 7.28903 5.65575 7.20165L10.2298 2.0054C10.3037 1.92212 10.3407 1.81242 10.3323 1.70138C10.3239 1.59034 10.2709 1.48745 10.1853 1.41624L9.4145 0.767487C9.23568 0.616708 8.96897 0.637298 8.8154 0.813737L5.41369 4.75249C5.3939 4.77548 5.36507 4.78871 5.33474 4.78871C5.3044 4.78871 5.27558 4.77548 5.25579 4.75249L1.85283 0.813319C1.77896 0.728909 1.67474 0.677095 1.56286 0.669153C1.45079 0.65916 1.33944 0.694928 1.25415 0.768319L0.48298 1.41624C0.396884 1.48732 0.343353 1.59033 0.334663 1.70165C0.326235 1.81283 0.363727 1.92261 0.438401 2.0054Z" |
@@ -9,3 +9,4 @@ import React from 'react' | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
xmlns="http://www.w3.org/2000/svg" | ||
data-testid="content-integration-icons-collection-linkout"> | ||
<path | ||
@@ -28,3 +29,4 @@ d="M7.66667 7.22012V8.50012C7.66667 9.5605 6.77124 10.4201 5.66667 10.4201C4.5621 10.4201 3.66667 9.5605 3.66667 8.50012V7.22012C3.6665 6.74779 3.7306 6.27747 3.85733 5.82108C3.87056 5.77314 3.85988 5.72203 3.82843 5.6827C3.79699 5.64336 3.74832 5.62025 3.69667 5.62012H1.33333C0.596954 5.62012 0 6.19319 0 6.90012V15.2201C0 15.927 0.596954 16.5001 1.33333 16.5001H10C10.7364 16.5001 11.3333 15.927 11.3333 15.2201V6.90012C11.3333 6.19319 10.7364 5.62012 10 5.62012H9.33333C8.41286 5.62012 7.66667 6.33646 7.66667 7.22012Z" | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
xmlns="http://www.w3.org/2000/svg" | ||
data-testid="content-integration-icons-collection--open-folder"> | ||
<g clipPath="url(#clip0_2958_1993)"> | ||
@@ -50,3 +52,4 @@ <path | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
xmlns="http://www.w3.org/2000/svg" | ||
data-testid="content-integration-icons-collection-search"> | ||
<path | ||
@@ -67,3 +70,4 @@ fillRule="evenodd" | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
xmlns="http://www.w3.org/2000/svg" | ||
data-testid="content-integration-icons-collection-icon"> | ||
<path | ||
@@ -70,0 +74,0 @@ fillRule="evenodd" |
@@ -9,3 +9,4 @@ import React from 'react' | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
xmlns="http://www.w3.org/2000/svg" | ||
data-testid="content-integration-icons-story-linkOut"> | ||
<path | ||
@@ -28,3 +29,4 @@ d="M7.66667 7.22012V8.50012C7.66667 9.5605 6.77124 10.4201 5.66667 10.4201C4.5621 10.4201 3.66667 9.5605 3.66667 8.50012V7.22012C3.6665 6.74779 3.7306 6.27747 3.85733 5.82108C3.87056 5.77314 3.85988 5.72203 3.82843 5.6827C3.79699 5.64336 3.74832 5.62025 3.69667 5.62012H1.33333C0.596954 5.62012 0 6.19319 0 6.90012V15.2201C0 15.927 0.596954 16.5001 1.33333 16.5001H10C10.7364 16.5001 11.3333 15.927 11.3333 15.2201V6.90012C11.3333 6.19319 10.7364 5.62012 10 5.62012H9.33333C8.41286 5.62012 7.66667 6.33646 7.66667 7.22012Z" | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
xmlns="http://www.w3.org/2000/svg" | ||
data-testid="content-integration-icons-story-openFolder"> | ||
<g clip-path="url(#clip0_2958_1993)"> | ||
@@ -50,3 +52,4 @@ <path | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
xmlns="http://www.w3.org/2000/svg" | ||
data-testid="content-integration-icons-story-search"> | ||
<path | ||
@@ -67,3 +70,4 @@ fillRule="evenodd" | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg"> | ||
xmlns="http://www.w3.org/2000/svg" | ||
data-testid="content-integration-icons-story"> | ||
<path | ||
@@ -70,0 +74,0 @@ fillRule="evenodd" |
import React, { useState } from 'react' | ||
import format from 'date-fns/format' | ||
import { FormattedMessage } from 'react-intl' | ||
@@ -56,3 +55,3 @@ | ||
</p> | ||
<span>{getFormatDate(last_updated_date)}</span> | ||
<span>{last_updated_date ? getFormatDate(last_updated_date) : '--'}</span> | ||
</div> | ||
@@ -65,3 +64,3 @@ ) | ||
const generateSectionsList = taxonomy => { | ||
const { sections } = taxonomy | ||
const { sections = [] } = taxonomy | ||
@@ -106,3 +105,3 @@ // show only sections related to this website | ||
const { _id, headlines, credits, last_updated_date, taxonomy } = story | ||
const { _id, headlines = {}, credits = {}, last_updated_date, taxonomy = {} } = story | ||
const { by = [] } = credits | ||
@@ -119,3 +118,3 @@ return ( | ||
onMouseLeave={() => isShowLinkOutHelp(false)}> | ||
<a href={`/composer/edit/${_id}/`} target="_blank" rel="noreferrer"> | ||
<a href={`/composer/edit/${_id}/`} target="_blank" rel="noreferrer" data-testid="StorySearch-linkout"> | ||
{Icons.storyIcons.linkOut} | ||
@@ -122,0 +121,0 @@ </a> |
@@ -9,3 +9,3 @@ import React from 'react' | ||
DateRangeContext, | ||
IntSharedSelect, | ||
// IntSharedSelect, | ||
IntSharedSearchText | ||
@@ -18,17 +18,17 @@ } from '../../shared/components/filters' | ||
// Sections - meta data for select component | ||
const sectionsMeta = { | ||
fieldName: 'int_select_sections', | ||
fieldId: 'int_select_sections', | ||
labelText: ( | ||
<FormattedMessage id="integrations.shared.filters.primarySection"> | ||
{txt => txt} | ||
</FormattedMessage> | ||
) | ||
} | ||
// const sectionsMeta = { | ||
// fieldName: 'int_select_sections', | ||
// fieldId: 'int_select_sections', | ||
// labelText: ( | ||
// <FormattedMessage id="integrations.shared.filters.primarySection"> | ||
// {txt => txt} | ||
// </FormattedMessage> | ||
// ) | ||
// } | ||
// Sections - json property keys to get data from | ||
const sectionsDataMeta = { | ||
nameField: 'name', | ||
idField: '_id' | ||
} | ||
// // Sections - json property keys to get data from | ||
// const sectionsDataMeta = { | ||
// nameField: 'name', | ||
// idField: '_id' | ||
// } | ||
@@ -41,3 +41,4 @@ // Authors - meta data for select component | ||
<FormattedMessage id="integrations.shared.filters.author">{txt => txt}</FormattedMessage> | ||
) | ||
), | ||
testId: 'StorySearch-filter-selectAuthor' | ||
} | ||
@@ -60,3 +61,4 @@ | ||
), | ||
defaultField: 'last_updated_date' | ||
defaultField: 'last_updated_date', | ||
testId: 'StorySearch-filter-dateRange' | ||
} | ||
@@ -63,0 +65,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
499178
9506
2
2