@rh-support/manage 0.2.66 → 0.2.69
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/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.d.ts.map +1 -1
- package/lib/esm/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.js +10 -5
- package/lib/esm/hooks/useVersionsDiffer.d.ts.map +1 -1
- package/lib/esm/hooks/useVersionsDiffer.js +5 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentSingleItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/TopContentManagement/TopContentEditor/TopContentCategoryContent/TopContentSingleItem.tsx"],"names":[],"mappings":"
|
|
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,gBAoYzF,CAAC"}
|
|
@@ -8,12 +8,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { search } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button,
|
|
11
|
+
import { Button, ValidatedOptions } from '@patternfly/react-core';
|
|
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 { ToastNotification } from '@rh-support/components';
|
|
15
|
+
import { CustomTextInput, ToastNotification } from '@rh-support/components';
|
|
16
16
|
import { formatDate, getDrupalResIdIfTypeFromUrl, getText } from '@rh-support/utils';
|
|
17
|
+
import { isEmpty } from 'lodash';
|
|
17
18
|
import cloneDeep from 'lodash/cloneDeep';
|
|
18
19
|
import React, { useEffect, useState } from 'react';
|
|
19
20
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -238,7 +239,11 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
238
239
|
if (isArrangingContent)
|
|
239
240
|
setIsPreview(true);
|
|
240
241
|
}, [isArrangingContent]);
|
|
241
|
-
|
|
242
|
+
// To check if input has spaces
|
|
243
|
+
const doesInputHasSpaces = isEmpty(localContentTitle.trim());
|
|
244
|
+
// To disable save button if empty depending on spaces
|
|
245
|
+
const isSaveButtonDisabled = doesInputHasSpaces ||
|
|
246
|
+
!(contentTitleIsValid && contentUrlIsValid && localContentTitle && localContentUrl) ||
|
|
242
247
|
(!newCategory && content.mode === ContentMode.NEW_SECTION_CONTENT) ||
|
|
243
248
|
(localContentUrl === content.contentUrl && localContentTitle === content.contentTitle);
|
|
244
249
|
const lastModifiedBy = t(`Last modified {{created}} by {{by}}`, {
|
|
@@ -261,13 +266,13 @@ export const TopContentSingleItem = ({ isArrangingContent, category, snapshot, i
|
|
|
261
266
|
' ',
|
|
262
267
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
263
268
|
React.createElement("div", { className: "input-wrapper" },
|
|
264
|
-
React.createElement(
|
|
269
|
+
React.createElement(CustomTextInput, { isRequired: true, isSpaceAllowed: false, className: `form-control${!contentTitleIsValid ? ' form-invalid' : ''}`, 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: onContentTitleChange, validated: contentTitleIsValid ? ValidatedOptions.default : ValidatedOptions.error }))),
|
|
265
270
|
React.createElement("div", { className: "form-group" },
|
|
266
271
|
React.createElement("label", { htmlFor: localContentUrl },
|
|
267
272
|
"Link to content",
|
|
268
273
|
' ',
|
|
269
274
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
270
|
-
React.createElement(
|
|
275
|
+
React.createElement(CustomTextInput, { type: "url", maxLength: 254, isRequired: true, isSpaceAllowed: false, className: `form-control${!contentUrlIsValid ? ' form-invalid' : ''}`, 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: onContentUrlChange, validated: contentUrlIsValid ? ValidatedOptions.default : ValidatedOptions.error }),
|
|
271
276
|
showDuplicateError && (React.createElement("p", { className: "form-instructions" },
|
|
272
277
|
React.createElement(ExclamationCircleIcon, { color: "#c9190b", className: "pf-u-mr-sm" }),
|
|
273
278
|
" Duplicate url. This url is already added in ",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useVersionsDiffer.d.ts","sourceRoot":"","sources":["../../../src/hooks/useVersionsDiffer.tsx"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,wBAAyB,MAAM,wBAAwB,MAAM,KAAG,CAAC,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"useVersionsDiffer.d.ts","sourceRoot":"","sources":["../../../src/hooks/useVersionsDiffer.tsx"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,wBAAyB,MAAM,wBAAwB,MAAM,KAAG,CAAC,OAAO,EAAE,MAAM,EAAE,CAsD/G,CAAC"}
|
|
@@ -32,12 +32,16 @@ export const useVersionsDiffer = (selectedProductName, selectedMajorVersion) =>
|
|
|
32
32
|
}, [selectedProductName, selectedMajorVersion]);
|
|
33
33
|
// In this effect we are calculating and finding difference between original version list and version with top content
|
|
34
34
|
useEffect(() => {
|
|
35
|
-
var _a, _b;
|
|
35
|
+
var _a, _b, _c;
|
|
36
36
|
// If versions list is empty, then set `majorVersion.x`
|
|
37
37
|
if (((_a = versions === null || versions === void 0 ? void 0 : versions.items) === null || _a === void 0 ? void 0 : _a.length) && (topContentVersion === null || topContentVersion === void 0 ? void 0 : topContentVersion.length)) {
|
|
38
38
|
const subVersions = (_b = versions === null || versions === void 0 ? void 0 : versions.items) === null || _b === void 0 ? void 0 : _b.filter((item) => item.startsWith(selectedMajorVersion)).map((item) => { var _a; return (_a = item.split('.')) === null || _a === void 0 ? void 0 : _a.splice(1).join('.'); }).sort();
|
|
39
39
|
setMajorVersion(difference(subVersions, topContentVersion));
|
|
40
40
|
}
|
|
41
|
+
else if ((_c = versions === null || versions === void 0 ? void 0 : versions.items) === null || _c === void 0 ? void 0 : _c.length) {
|
|
42
|
+
const subVersions = versions === null || versions === void 0 ? void 0 : versions.items.filter((item) => item.startsWith(selectedMajorVersion)).map((item) => { var _a; return (_a = item.split('.')) === null || _a === void 0 ? void 0 : _a.splice(1).join('.'); }).sort();
|
|
43
|
+
setMajorVersion(subVersions);
|
|
44
|
+
}
|
|
41
45
|
else {
|
|
42
46
|
setMajorVersion(['x']);
|
|
43
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.69",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
],
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@cee-eng/hydrajs": "4.7.22",
|
|
55
|
-
"@patternfly/patternfly": "4.
|
|
55
|
+
"@patternfly/patternfly": "4.185.1",
|
|
56
56
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
57
57
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
58
58
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
59
|
-
"@patternfly/react-core": "4.
|
|
60
|
-
"@patternfly/react-table": "4.
|
|
59
|
+
"@patternfly/react-core": "4.202.16",
|
|
60
|
+
"@patternfly/react-table": "4.71.16",
|
|
61
61
|
"@rh-support/api": "0.3.9",
|
|
62
62
|
"@rh-support/components": "^0.1.3",
|
|
63
63
|
"@rh-support/react-context": "^0.1.3",
|
|
@@ -90,19 +90,19 @@
|
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
92
|
"@cee-eng/hydrajs": "4.7.22",
|
|
93
|
-
"@patternfly/patternfly": "4.
|
|
93
|
+
"@patternfly/patternfly": "4.185.1",
|
|
94
94
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
95
95
|
"@patternfly/pfe-collapse": "1.12.3",
|
|
96
96
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
97
|
-
"@patternfly/react-core": "4.
|
|
98
|
-
"@patternfly/react-table": "4.
|
|
97
|
+
"@patternfly/react-core": "4.202.16",
|
|
98
|
+
"@patternfly/react-table": "4.71.16",
|
|
99
99
|
"@rh-support/api": "0.3.13",
|
|
100
|
-
"@rh-support/components": "1.1.
|
|
100
|
+
"@rh-support/components": "1.1.57",
|
|
101
101
|
"@rh-support/configs": "0.2.5",
|
|
102
|
-
"@rh-support/react-context": "0.2.
|
|
102
|
+
"@rh-support/react-context": "0.2.57",
|
|
103
103
|
"@rh-support/types": "0.2.0",
|
|
104
|
-
"@rh-support/user-permissions": "0.2.
|
|
105
|
-
"@rh-support/utils": "0.2.
|
|
104
|
+
"@rh-support/user-permissions": "0.2.45",
|
|
105
|
+
"@rh-support/utils": "0.2.34",
|
|
106
106
|
"@types/react-beautiful-dnd": "^13.0.0",
|
|
107
107
|
"i18next": ">=17.0.1",
|
|
108
108
|
"lodash": ">=4.17.15",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"react-i18next": ">=10.11.0",
|
|
114
114
|
"react-router-dom": ">=5.1.2"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "68dba2e1af032b0f24ddb0fac3d2ad3273b5364f"
|
|
117
117
|
}
|