@rh-support/manage 2.1.30 → 2.1.32

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.
@@ -1 +1 @@
1
- {"version":3,"file":"BookmarkAccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAIhF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAUtD,UAAU,MAAM;IACZ,uBAAuB,EAAE,SAAS,EAAE,CAAC;IACrC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yBAAyB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,eAwPpD;yBAxPe,uBAAuB"}
1
+ {"version":3,"file":"BookmarkAccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ManageBookmarkedAccountsTab/BookmarkAccountSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAIhF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAUtD,UAAU,MAAM;IACZ,uBAAuB,EAAE,SAAS,EAAE,CAAC;IACrC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yBAAyB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,eA0PpD;yBA1Pe,uBAAuB"}
@@ -95,7 +95,7 @@ export function BookmarkAccountSelector(props) {
95
95
  ];
96
96
  setSelected(selectedAccounts);
97
97
  props.onBookMarkAccountSelected(selectedAccounts);
98
- setIsOpen(!isOpen);
98
+ setIsOpen(false);
99
99
  };
100
100
  const duplicateAccounts = (props.selectedGroup &&
101
101
  props.addMode &&
@@ -105,13 +105,14 @@ export function BookmarkAccountSelector(props) {
105
105
  })
106
106
  .map((a) => a.accountNumber)) ||
107
107
  [];
108
- const removeAccountLabel = (removedAccount) => {
108
+ const removeAccountLabel = (event, removedAccount) => {
109
+ event.stopPropagation();
109
110
  const updatedSelectedAccounts = remove(selected, (account) => account.accountNumber !== removedAccount.accountNumber);
110
111
  setSelected(updatedSelectedAccounts);
111
112
  props.onBookMarkAccountSelected(updatedSelectedAccounts);
112
113
  };
113
114
  const labelGroupComponent = () => {
114
- return (React.createElement(LabelGroup, { numLabels: 2 }, (selected || []).map((currentLabel) => (React.createElement(Label, { key: currentLabel.accountNumber, onClose: () => removeAccountLabel(currentLabel), color: "cyan" },
115
+ return (React.createElement(LabelGroup, { numLabels: 2 }, (selected || []).map((currentLabel) => (React.createElement(Label, { key: currentLabel.accountNumber, onClose: (event) => removeAccountLabel(event, currentLabel), color: "cyan", onClick: (event) => event.stopPropagation() },
115
116
  currentLabel.name,
116
117
  " (",
117
118
  currentLabel.accountNumber,
@@ -21,7 +21,7 @@ const noResultFoundRow = (noResultString = '') => [
21
21
  {
22
22
  props: { colSpan: 10 },
23
23
  title: (React.createElement(Bullseye, null,
24
- React.createElement(EmptyState, { variant: EmptyStateVariant.sm },
24
+ React.createElement(EmptyState, { variant: EmptyStateVariant.xs },
25
25
  React.createElement(EmptyStateHeader, { titleText: React.createElement(React.Fragment, null,
26
26
  React.createElement(Trans, null, "No results found")), icon: React.createElement(EmptyStateIcon, { icon: SearchIcon }), headingLevel: "h3" }),
27
27
  React.createElement(EmptyStateBody, null, noResultString ? noResultString : React.createElement(Trans, null, "There are no results to display."))))),
@@ -45,7 +45,7 @@ export function NoTopContentFound({ version, product, dataLength, onAddCategory,
45
45
  version)))));
46
46
  const noContent = dataLength === 0 && !isContentOnlyForMajorVersion;
47
47
  const noMinorButHaveMajorContent = dataLength !== 0 && isContentOnlyForMajorVersion;
48
- return (React.createElement(EmptyState, { variant: EmptyStateVariant.full },
48
+ return (React.createElement(EmptyState, { variant: EmptyStateVariant.xs },
49
49
  React.createElement(EmptyStateHeader, { titleText: React.createElement(React.Fragment, null, isEmpty(product) || isEmpty(version) ? (React.createElement(Trans, null, "No top content found")) : isRegularVersion(version) && isNumber(version.split('.')[1]) && dataLength === 0 ? (React.createElement(Trans, null,
50
50
  "No content available for ",
51
51
  version,
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAK7D,OAAO,EAIH,oBAAoB,EAOvB,MAAM,wCAAwC,CAAC;AAIhD,UAAU,MAAM;IACZ,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,CAAC,EAAE,MAAM,CAAC;CACb;AAaD,eAAO,MAAM,oBAAoB,kDAAmD,MAAM,gBAmYzF,CAAC"}
1
+ {"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAK7D,OAAO,EAIH,oBAAoB,EAOvB,MAAM,wCAAwC,CAAC;AAIhD,UAAU,MAAM;IACZ,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,CAAC,EAAE,MAAM,CAAC;CACb;AAaD,eAAO,MAAM,oBAAoB,kDAAmD,MAAM,gBA+XzF,CAAC"}
@@ -12,9 +12,10 @@ import { Button, Icon, TextInput, ValidatedOptions } from '@patternfly/react-cor
12
12
  import EditAltIcon from '@patternfly/react-icons/dist/js/icons/edit-alt-icon';
13
13
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
14
14
  import GripVerticalIcon from '@patternfly/react-icons/dist/js/icons/grip-vertical-icon';
15
- import { CustomTextInput, ToastNotification } from '@rh-support/components';
16
- import { formatDate, getDrupalResIdIfTypeFromUrl, getText } from '@rh-support/utils';
15
+ import { ToastNotification } from '@rh-support/components';
16
+ import { formatDate, getDrupalResIdIfTypeFromUrl, getText, isValidUrl } from '@rh-support/utils';
17
17
  import cloneDeep from 'lodash/cloneDeep';
18
+ import findIndex from 'lodash/findIndex';
18
19
  import isEmpty from 'lodash/isEmpty';
19
20
  import React, { useEffect, useState } from 'react';
20
21
  import { Trans, useTranslation } from 'react-i18next';
@@ -52,6 +53,8 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
52
53
  const [showDuplicateError, setShowDuplicateError] = useState(false);
53
54
  const [duplicatUrlErrorArray, setDuplicatUrlErrorArray] = useState([]);
54
55
  const [isSaving, setIsSaving] = useState(false);
56
+ const duplicateTitleCategoryIndex = findIndex(category.content, (c) => c.contentTitle === localContentTitle.trim());
57
+ const isDuplicateTitle = duplicateTitleCategoryIndex !== -1 && duplicateTitleCategoryIndex !== i && !isEmpty(localContentTitle.trim());
55
58
  const onContentTitleChange = (contentTitle, event) => {
56
59
  const contentTitleIsValid = event.target.validity.valid;
57
60
  setContentTitleIsValid(contentTitleIsValid);
@@ -95,34 +98,17 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
95
98
  const checkDuplicateUrls = (contentUrl) => {
96
99
  const dupObjCopy = cloneDeep(contentUrls);
97
100
  const selectedCategory = category.categoryName;
98
- // remove old url that is edited from obj
101
+ //we are storing encoded urls in contentUrls
102
+ const contentUrlEncoded = encodeURI(contentUrl);
99
103
  if (dupObjCopy[content.contentUrl] && dupObjCopy[content.contentUrl][selectedCategory] > 1) {
100
104
  dupObjCopy[content.contentUrl][selectedCategory]--;
101
105
  }
102
106
  else {
103
107
  delete dupObjCopy[content.contentUrl];
104
108
  }
105
- //remove prev url from dup obj
106
- if (dupObjCopy[localContentUrl]) {
107
- if (dupObjCopy[localContentUrl][selectedCategory]) {
108
- dupObjCopy[localContentUrl][selectedCategory]--;
109
- }
110
- }
111
- //add new typed url to dup
112
- if (dupObjCopy[contentUrl]) {
113
- if (dupObjCopy[contentUrl][selectedCategory]) {
114
- dupObjCopy[contentUrl][selectedCategory]++;
115
- }
116
- else {
117
- dupObjCopy[contentUrl][selectedCategory] = 1;
118
- }
119
- }
120
- else {
121
- dupObjCopy[contentUrl] = { [selectedCategory]: 1 };
122
- }
123
- if (dupObjCopy[contentUrl][selectedCategory] > 1 || Object.keys(dupObjCopy[contentUrl]).length > 1) {
109
+ if (!isEmpty(dupObjCopy[contentUrlEncoded])) {
124
110
  const dupArrays = [];
125
- for (const cat in dupObjCopy[contentUrl]) {
111
+ for (const cat in dupObjCopy[contentUrlEncoded]) {
126
112
  if (cat !== 'undefined') {
127
113
  cat === category.categoryName
128
114
  ? dupArrays.unshift(React.createElement("strong", { key: `${cat}` }, "this section"))
@@ -138,7 +124,7 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
138
124
  }
139
125
  };
140
126
  const onContentUrlChange = (contentUrl, event) => __awaiter(void 0, void 0, void 0, function* () {
141
- setContentUrlIsValid(event.target.validity.valid);
127
+ setContentUrlIsValid(isValidUrl(contentUrl));
142
128
  checkDuplicateUrls(contentUrl);
143
129
  setLocalContentUrl(contentUrl);
144
130
  setIsFetchingSolrSearch(true);
@@ -243,6 +229,7 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
243
229
  const doesInputHasSpaces = isEmpty(localContentTitle.trim());
244
230
  // To disable save button if empty depending on spaces
245
231
  const isSaveButtonDisabled = doesInputHasSpaces ||
232
+ isDuplicateTitle ||
246
233
  !(contentTitleIsValid && contentUrlIsValid && localContentTitle && localContentUrl) ||
247
234
  (!newCategory && content.mode === ContentMode.NEW_SECTION_CONTENT) ||
248
235
  (localContentUrl === content.contentUrl && localContentTitle === content.contentTitle);
@@ -266,15 +253,20 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
266
253
  "Heading",
267
254
  ' ',
268
255
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
269
- React.createElement("div", { className: "input-wrapper" },
270
- React.createElement(CustomTextInput, { isRequired: true, isSpaceAllowed: false, type: "text", maxLength: 254, required: true, value: localContentTitle, isDisabled: isFetchingSolrSearch, "aria-label": t('Copy and paste the heading for consistency'), placeholder: t('Copy and paste the heading for consistency'), onChange: (e, v) => onContentTitleChange(v, e), validated: contentTitleIsValid ? ValidatedOptions.default : ValidatedOptions.error }))),
256
+ React.createElement(TextInput, { isRequired: true, type: "text", maxLength: 254, required: true, value: localContentTitle, isDisabled: isFetchingSolrSearch, "aria-label": t('Copy and paste the heading for consistency'), placeholder: t('Copy and paste the heading for consistency'), onChange: (e, v) => onContentTitleChange(v, e), validated: contentTitleIsValid && !isDuplicateTitle
257
+ ? ValidatedOptions.default
258
+ : ValidatedOptions.error }),
259
+ isDuplicateTitle && (React.createElement("p", { className: "form-instructions form-invalid " },
260
+ React.createElement(ExclamationCircleIcon, { color: "#c9190b", className: "pf-u-mr-sm" }),
261
+ ' ',
262
+ React.createElement(Trans, null, "Duplicate heading. Content with this heading is already present.")))),
271
263
  React.createElement("div", { className: "form-group" },
272
264
  React.createElement("label", { htmlFor: localContentUrl },
273
265
  "Link to content",
274
266
  ' ',
275
267
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
276
268
  React.createElement(TextInput, { type: "url", maxLength: 254, isRequired: true, pattern: "^(http(s)?:\\/\\/)+[\\w\\-\\._~:\\/?#[\\]@!\\$&'\\(\\)\\*\\+,;=.]+$", value: getTopContentUrl(localContentUrl), "aria-label": t('Entering a solution or article link first will automatically generate the heading for you'), placeholder: t('Entering a solution or article link first will automatically generate the heading for you'), onChange: (evt, val) => onContentUrlChange(val, evt), validated: contentUrlIsValid ? ValidatedOptions.default : ValidatedOptions.error }),
277
- showDuplicateError && (React.createElement("p", { className: "form-instructions" },
269
+ showDuplicateError && (React.createElement("p", { className: "form-instructions form-invalid" },
278
270
  React.createElement(ExclamationCircleIcon, { color: "#c9190b", className: "pf-v5-u-mr-sm" }),
279
271
  " Duplicate url. This url is already added in ",
280
272
  formatDuplicateWarning(duplicatUrlErrorArray),
@@ -24,14 +24,14 @@ export const getContentUrls = (contentsArray) => {
24
24
  return contentsArray.reduce((result, category) => {
25
25
  category.content.forEach((content) => {
26
26
  if (isEmpty(result[encodeURI(content.contentUrl)])) {
27
- result[content.contentUrl] = { [encodeURI(category.categoryName)]: 1 };
27
+ result[encodeURI(content.contentUrl)] = { [category.categoryName]: 1 };
28
28
  }
29
29
  else {
30
- if (result[content.contentUrl][encodeURI(category.categoryName)]) {
31
- result[content.contentUrl][encodeURI(category.categoryName)]++;
30
+ if (result[encodeURI(content.contentUrl)][category.categoryName]) {
31
+ result[encodeURI(content.contentUrl)][category.categoryName]++;
32
32
  }
33
33
  else {
34
- result[content.contentUrl][encodeURI(category.categoryName)] = 1;
34
+ result[encodeURI(content.contentUrl)][category.categoryName] = 1;
35
35
  }
36
36
  }
37
37
  });
@@ -1 +1 @@
1
- {"version":3,"file":"TopContentReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/TopContentReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,aAAa,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,EACH,WAAW,EAEX,mBAAmB,EACnB,eAAe,EAGf,iCAAiC,EAEpC,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAOxE,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACrD,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;;EAOE;AACF,UAAU,YAAY;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC;CAC/B;AAED,UAAU,oCAAoC;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;CAC3B;AACD,MAAM,WAAW,qBAAqB;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,C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AC;AAGF,eAAO,MAAM,gBAAgB,aACf,6BAA6B,uBAClB,oBAAoB,EAAE,cAC/B,MAAM,mBA+BrB,CAAC;AAGF,eAAO,MAAM,iBAAiB,aAChB,6BAA6B,uBAClB,oBAAoB,EAAE,mBA2B9C,CAAC;AAEF,eAAO,MAAM,eAAe,aAAoB,6BAA6B,mBAwB5E,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,6BAA6B,uBAAuB,OAAO,SAK3G,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAAc,6BAA6B,SAKxE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,aACzB,6BAA6B,eAC1B,MAAM,WACV,MAAM,kBAsBlB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,aACzB,6BAA6B,cAC3B,qBAAqB,gBACnB,MAAM,mBAavB,CAAC"}
@@ -372,14 +372,15 @@ export const saveAddToTopContent = (dispatch, topContentEditState, id, categoryI
372
372
  const toAdd = {
373
373
  categoryName: categoryToBeSave.categoryName,
374
374
  categoryId,
375
- topContentMasterDataId: categoryToBeSave.topContentMasterDataId,
375
+ topContentMasterDataId: categoryToBeSave === null || categoryToBeSave === void 0 ? void 0 : categoryToBeSave.topContentMasterDataId,
376
376
  contentTitle: content.contentTitle,
377
377
  contentUrl: content.contentUrl,
378
378
  contentRank: index,
379
379
  isActive: 1,
380
380
  };
381
381
  const res = yield pcm.topContent.postTopContent({ topContents: [toAdd] });
382
- topContentEditState.forEach((cat) => {
382
+ const newTopContentEditState = [...topContentEditState];
383
+ newTopContentEditState.forEach((cat) => {
383
384
  var _a, _b, _c, _d, _e, _f;
384
385
  if (cat.id === id) {
385
386
  if (index === -1) {
@@ -397,7 +398,7 @@ export const saveAddToTopContent = (dispatch, topContentEditState, id, categoryI
397
398
  dispatch({
398
399
  type: TopContentReducerConstants.changeTopContentStateOnSave,
399
400
  payload: {
400
- topContentEditState,
401
+ topContentEditState: newTopContentEditState,
401
402
  topContentResponse: getApiResourceObject(cloneDeep(topContentEditState)),
402
403
  contentUrls: getContentUrls(topContentEditState),
403
404
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "2.1.30",
3
+ "version": "2.1.32",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "homepage": "",
@@ -84,12 +84,12 @@
84
84
  "@patternfly/pfe-tabs": "1.12.3",
85
85
  "@patternfly/react-core": "5.1.1",
86
86
  "@patternfly/react-table": "5.1.1",
87
- "@rh-support/components": "2.1.25",
87
+ "@rh-support/components": "2.1.26",
88
88
  "@rh-support/configs": "2.0.10",
89
- "@rh-support/react-context": "2.1.27",
89
+ "@rh-support/react-context": "2.1.28",
90
90
  "@rh-support/types": "2.0.2",
91
- "@rh-support/user-permissions": "2.1.18",
92
- "@rh-support/utils": "2.1.11",
91
+ "@rh-support/user-permissions": "2.1.19",
92
+ "@rh-support/utils": "2.1.12",
93
93
  "@types/react-beautiful-dnd": "^13.0.0",
94
94
  "i18next": ">=17.0.1",
95
95
  "lodash": ">=4.17.15",
@@ -103,5 +103,5 @@
103
103
  "defaults and supports es6-module",
104
104
  "maintained node versions"
105
105
  ],
106
- "gitHead": "e67736e7b8a06c4617cc8e49a905ba7819e5ae63"
106
+ "gitHead": "672a8f5024aded7ed6ce4edb5c0991bc3f5570bb"
107
107
  }