@rh-support/components 2.5.226 → 2.5.231

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.
Files changed (61) hide show
  1. package/lib/esm/ConfirmationModal/ConfirmationDialog.js +1 -1
  2. package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts +0 -2
  3. package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts.map +1 -1
  4. package/lib/esm/Functional/CaseContactsSelectorExternal.js +82 -156
  5. package/lib/esm/InlineEdit/NewInlineEdit.d.ts +0 -2
  6. package/lib/esm/InlineEdit/NewInlineEdit.d.ts.map +1 -1
  7. package/lib/esm/InlineEdit/NewInlineEdit.js +2 -7
  8. package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts +49 -0
  9. package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts.map +1 -0
  10. package/lib/esm/MarkdownEditor/MarkdownEditor.js +601 -0
  11. package/lib/esm/MarkdownEditor/index.d.ts +2 -0
  12. package/lib/esm/MarkdownEditor/index.d.ts.map +1 -0
  13. package/lib/esm/MarkdownEditor/index.js +1 -0
  14. package/lib/esm/MarkdownEditor/markdownEditor.css +223 -0
  15. package/lib/esm/OwnerTypeaheadDropdown/OwnerTypeaheadDropdown.d.ts +0 -2
  16. package/lib/esm/OwnerTypeaheadDropdown/OwnerTypeaheadDropdown.d.ts.map +1 -1
  17. package/lib/esm/OwnerTypeaheadDropdown/OwnerTypeaheadDropdown.js +3 -8
  18. package/lib/esm/PhoneInput/PhoneInput.d.ts.map +1 -1
  19. package/lib/esm/PhoneInput/PhoneInput.js +1 -38
  20. package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.d.ts +0 -2
  21. package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.d.ts.map +1 -1
  22. package/lib/esm/SingleSelectDropdown/SingleSelectDropdown.js +3 -6
  23. package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +1 -1
  24. package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.js +80 -62
  25. package/lib/esm/Table/TablePagination.d.ts +0 -1
  26. package/lib/esm/Table/TablePagination.d.ts.map +1 -1
  27. package/lib/esm/Table/TablePagination.js +1 -1
  28. package/lib/esm/helperFunctions/errorMessage.d.ts +1 -2
  29. package/lib/esm/helperFunctions/errorMessage.d.ts.map +1 -1
  30. package/lib/esm/helperFunctions/errorMessage.js +5 -19
  31. package/lib/esm/hooks/useCopyToClipboard.d.ts +1 -1
  32. package/lib/esm/hooks/useCopyToClipboard.d.ts.map +1 -1
  33. package/lib/esm/hooks/useCopyToClipboard.js +1 -3
  34. package/lib/esm/index.d.ts +1 -3
  35. package/lib/esm/index.d.ts.map +1 -1
  36. package/lib/esm/index.js +1 -4
  37. package/package.json +6 -9
  38. package/lib/esm/CaseLabelLoadErrorModal/CaseLabelLoadErrorModal.d.ts +0 -10
  39. package/lib/esm/CaseLabelLoadErrorModal/CaseLabelLoadErrorModal.d.ts.map +0 -1
  40. package/lib/esm/CaseLabelLoadErrorModal/CaseLabelLoadErrorModal.js +0 -17
  41. package/lib/esm/CaseLabelLoadErrorModal/CaseLabelLoadErrorModal.scss +0 -13
  42. package/lib/esm/CaseLabelLoadErrorModal/index.d.ts +0 -2
  43. package/lib/esm/CaseLabelLoadErrorModal/index.d.ts.map +0 -1
  44. package/lib/esm/CaseLabelLoadErrorModal/index.js +0 -1
  45. package/lib/esm/CustomDatePicker/CustomDatePicker.d.ts +0 -18
  46. package/lib/esm/CustomDatePicker/CustomDatePicker.d.ts.map +0 -1
  47. package/lib/esm/CustomDatePicker/CustomDatePicker.js +0 -27
  48. package/lib/esm/CustomDatePicker/customDatePicker.css +0 -52
  49. package/lib/esm/CustomDatePicker/index.d.ts +0 -2
  50. package/lib/esm/CustomDatePicker/index.d.ts.map +0 -1
  51. package/lib/esm/CustomDatePicker/index.js +0 -1
  52. package/lib/esm/RichTextEditor/RichTextEditor.d.ts +0 -45
  53. package/lib/esm/RichTextEditor/RichTextEditor.d.ts.map +0 -1
  54. package/lib/esm/RichTextEditor/RichTextEditor.js +0 -463
  55. package/lib/esm/RichTextEditor/index.d.ts +0 -4
  56. package/lib/esm/RichTextEditor/index.d.ts.map +0 -1
  57. package/lib/esm/RichTextEditor/index.js +0 -2
  58. package/lib/esm/RichTextEditor/richTextEditor.css +0 -153
  59. package/lib/esm/RichTextEditor/useQuillEditor.d.ts +0 -20
  60. package/lib/esm/RichTextEditor/useQuillEditor.d.ts.map +0 -1
  61. package/lib/esm/RichTextEditor/useQuillEditor.js +0 -81
@@ -17,7 +17,7 @@ export function TablePagination(props) {
17
17
  props.currentPage && props.currentPage !== currentPage && setSelectedPage(props.currentPage);
18
18
  // eslint-disable-next-line react-hooks/exhaustive-deps
19
19
  }, [props.perPage, props.currentPage]);
20
- return (React.createElement(Pagination, { itemCount: props.itemCount || (data || []).length, widgetId: "pagination-options-menu-top", perPage: perPage, page: currentPage, variant: props.variant, isCompact: props.isCompact, titles: {
20
+ return (React.createElement(Pagination, { itemCount: props.itemCount || (data || []).length, widgetId: "pagination-options-menu-top", perPage: perPage, page: currentPage, variant: props.variant, titles: {
21
21
  paginationAriaLabel: props.variant === PaginationVariant.top ? 'Upper pagination' : 'Lower pagination',
22
22
  }, onSetPage: onSetPage, onPerPageSelect: onPerPageSelect }));
23
23
  }
@@ -6,8 +6,7 @@ export interface IAppErrorObj {
6
6
  export interface IAppError {
7
7
  [key: string]: Partial<IAppErrorObj>;
8
8
  }
9
- declare function getDirectErrorMessage(error: any): string;
10
9
  declare function formattedApiErrorMessage(error: any, customMessage?: IAppError, canManageCase?: boolean): string | JSX.Element;
11
10
  declare function errorMessageTitle(error: any, customError?: IAppError, canManageCase?: boolean): string;
12
- export { formattedApiErrorMessage, errorMessageTitle, getDirectErrorMessage };
11
+ export { formattedApiErrorMessage, errorMessageTitle };
13
12
  //# sourceMappingURL=errorMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../../../src/helperFunctions/errorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAQ7B,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,SAAS;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACxC;AAmED,iBAAS,qBAAqB,CAAC,KAAK,KAAA,GAAG,MAAM,CAI5C;AAGD,iBAAS,wBAAwB,CAAC,KAAK,KAAA,EAAE,aAAa,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,GAAG,CAAC,OAAO,CAmDjH;AAED,iBAAS,iBAAiB,CAAC,KAAK,KAAA,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAa1F;AAED,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC"}
1
+ {"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../../../src/helperFunctions/errorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAS7B,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,SAAS;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACxC;AA8DD,iBAAS,wBAAwB,CAAC,KAAK,KAAA,EAAE,aAAa,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,GAAG,CAAC,OAAO,CA2CjH;AAED,iBAAS,iBAAiB,CAAC,KAAK,KAAA,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAa1F;AAED,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import './errorMessage.scss';
2
2
  import { Button } from '@patternfly/react-core';
3
3
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
4
+ import isEmpty from 'lodash/isEmpty';
4
5
  import React from 'react';
5
6
  import { SupportFeedbackForm } from '../SupportFeedbackForm';
6
7
  const defaultTitle = "Sorry, we're experiencing an error";
@@ -42,15 +43,6 @@ const defaultErrorObj = {
42
43
  " for assistance.")),
43
44
  },
44
45
  };
45
- function getApiErrorMessage(error) {
46
- return [error === null || error === void 0 ? void 0 : error.message, error === null || error === void 0 ? void 0 : error.detailMessage].filter(Boolean).join(' ').trim();
47
- }
48
- // TODO: helper to pass API or status message directly in error popup
49
- function getDirectErrorMessage(error) {
50
- const apiMessage = getApiErrorMessage(error);
51
- const message = (error === null || error === void 0 ? void 0 : error.statusText) || (error === null || error === void 0 ? void 0 : error.responseText) || '';
52
- return apiMessage || message;
53
- }
54
46
  // the error argument need a better typing here. We want to make sure that user is passing an error object and not an error string
55
47
  function formattedApiErrorMessage(error, customMessage, canManageCase) {
56
48
  var _a, _b, _c;
@@ -92,15 +84,9 @@ function formattedApiErrorMessage(error, customMessage, canManageCase) {
92
84
  }
93
85
  // api call error
94
86
  const message = (error === null || error === void 0 ? void 0 : error.statusText) || (error === null || error === void 0 ? void 0 : error.responseText) || '';
95
- // TODO: original logic — showed default when error.message existed
96
- // // error.message -> javascript error
97
- // const isNotProperUXError = isEmpty(message) || message?.length > 200 || error?.message || error?.detailMessage;
98
- // return isNotProperUXError ? defaultErrorMessage : message;
99
- const apiMessage = getApiErrorMessage(error);
100
- if (apiMessage || message) {
101
- return apiMessage || message;
102
- }
103
- return defaultErrorMessage;
87
+ // error.message -> javascript error
88
+ const isNotProperUXError = isEmpty(message) || (message === null || message === void 0 ? void 0 : message.length) > 200 || (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.detailMessage);
89
+ return isNotProperUXError ? defaultErrorMessage : message;
104
90
  }
105
91
  }
106
92
  function errorMessageTitle(error, customError, canManageCase) {
@@ -116,4 +102,4 @@ function errorMessageTitle(error, customError, canManageCase) {
116
102
  }
117
103
  return defaultTitle;
118
104
  }
119
- export { formattedApiErrorMessage, errorMessageTitle, getDirectErrorMessage };
105
+ export { formattedApiErrorMessage, errorMessageTitle };
@@ -1,4 +1,4 @@
1
- export declare function useCopyToClipboard(ref: React.RefObject<HTMLElement>): {
1
+ export declare function useCopyToClipboard(ref: React.RefObject<HTMLInputElement>): {
2
2
  clipboardText: string;
3
3
  copyToClipboard: () => Promise<void>;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useCopyToClipboard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCopyToClipboard.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC;;;EA6BnE"}
1
+ {"version":3,"file":"useCopyToClipboard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCopyToClipboard.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;;;EA2BxE"}
@@ -14,11 +14,9 @@ export function useCopyToClipboard(ref) {
14
14
  // @ts-ignore
15
15
  const { t } = useTranslation();
16
16
  const copyToClipboard = () => __awaiter(this, void 0, void 0, function* () {
17
- var _a;
18
17
  if (!ref.current)
19
18
  return;
20
- const el = ref.current;
21
- const textToCopy = el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement ? el.value : (_a = el.textContent) !== null && _a !== void 0 ? _a : '';
19
+ const textToCopy = ref.current.value;
22
20
  try {
23
21
  yield navigator.clipboard.writeText(textToCopy);
24
22
  setClipboardText(t('Copied!'));
@@ -5,7 +5,7 @@ export * from './ErrorBoundary';
5
5
  export * from './ErrorPages';
6
6
  export * from './LoginModal';
7
7
  export * from './Table';
8
- export * from './RichTextEditor';
8
+ export * from './MarkdownEditor';
9
9
  export * from './InlineEdit';
10
10
  export * from './CoverSpinner';
11
11
  export * from './hooks';
@@ -29,10 +29,8 @@ export * from './SubscriptionAbuse';
29
29
  export * from './TermsAndConditions';
30
30
  export * from './TextAreaResizable';
31
31
  export * from './CustomTextInput';
32
- export * from './CustomDatePicker';
33
32
  export * from './PhoneInput';
34
33
  export * from './TagsSelector';
35
34
  export * from './SingleSelectDropdown';
36
35
  export * from './OwnerTypeaheadDropdown';
37
- export * from './CaseLabelLoadErrorModal';
38
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
package/lib/esm/index.js CHANGED
@@ -6,7 +6,7 @@ export * from './ErrorBoundary';
6
6
  export * from './ErrorPages';
7
7
  export * from './LoginModal';
8
8
  export * from './Table';
9
- export * from './RichTextEditor';
9
+ export * from './MarkdownEditor';
10
10
  export * from './InlineEdit';
11
11
  export * from './CoverSpinner';
12
12
  export * from './hooks';
@@ -30,10 +30,7 @@ export * from './SubscriptionAbuse';
30
30
  export * from './TermsAndConditions';
31
31
  export * from './TextAreaResizable';
32
32
  export * from './CustomTextInput';
33
- export * from './CustomDatePicker';
34
33
  export * from './PhoneInput';
35
34
  export * from './TagsSelector';
36
35
  export * from './SingleSelectDropdown';
37
36
  export * from './OwnerTypeaheadDropdown';
38
- export * from './CaseLabelLoadErrorModal';
39
- // dummy change for publish
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/components",
3
- "version": "2.5.226",
3
+ "version": "2.5.231",
4
4
  "description": "Contains all reusabel components for support app",
5
5
  "author": "Vikas Rathee <vrathee@redhat.com>",
6
6
  "license": "ISC",
@@ -40,7 +40,6 @@
40
40
  "prepublishOnly": "npm run build"
41
41
  },
42
42
  "peerDependencies": {
43
- "@apollo/client": "^4.1.6",
44
43
  "@cee-eng/ui-toolkit": "1.1.9",
45
44
  "@patternfly/patternfly": "6.2.1",
46
45
  "@patternfly/react-core": "6.2.1",
@@ -55,21 +54,21 @@
55
54
  "use-deep-compare-effect": "^1.6.1"
56
55
  },
57
56
  "dependencies": {
58
- "@cee-eng/hydrajs": "^4.18.114",
57
+ "@cee-eng/hydrajs": "^4.18.115",
59
58
  "@cee-eng/ui-toolkit": "1.1.9",
60
59
  "@patternfly/patternfly": "6.2.1",
61
60
  "@patternfly/react-core": "6.2.1",
62
61
  "@patternfly/react-icons": "6.2.1",
63
62
  "@patternfly/react-table": "6.2.1",
63
+ "@patternfly/react-tokens": "6.2.1",
64
64
  "@rh-support/types": "2.0.26",
65
- "@rh-support/user-permissions": "2.5.174",
66
- "@rh-support/utils": "2.5.153",
65
+ "@rh-support/user-permissions": "2.5.170",
66
+ "@rh-support/utils": "2.5.149",
67
67
  "dompurify": "^2.2.6",
68
68
  "js-worker-search": "^1.4.1",
69
69
  "lazysizes": "^5.3.2",
70
70
  "lodash": "^4.17.21",
71
71
  "mark.js": "^8.11.1",
72
- "quill": "~2.0.3",
73
72
  "react": "18.2.0",
74
73
  "react-dom": "18.2.0",
75
74
  "react-i18next": "15.6.0",
@@ -83,8 +82,6 @@
83
82
  "@types/react-dom": "^18.2.18"
84
83
  },
85
84
  "devDependencies": {
86
- "@patternfly/react-styles": "^6.2.1",
87
- "@patternfly/react-tokens": "^6.2.1",
88
85
  "@testing-library/jest-dom": "^6.2.0",
89
86
  "@testing-library/react": "^14.1.2",
90
87
  "@testing-library/user-event": "^14.5.1",
@@ -103,5 +100,5 @@
103
100
  "defaults and supports es6-module",
104
101
  "maintained node versions"
105
102
  ],
106
- "gitHead": "7e9d99cabdfd48a98e1fda53bd6747c1797c548c"
103
+ "gitHead": "a4db33129a9d9f0d6a6907d1c48df34784e57021"
107
104
  }
@@ -1,10 +0,0 @@
1
- import './CaseLabelLoadErrorModal.scss';
2
- import React from 'react';
3
- interface IProps {
4
- isOpen: boolean;
5
- onRetry: () => void;
6
- onClose: () => void;
7
- }
8
- export declare function CaseLabelLoadErrorModal({ isOpen, onRetry, onClose }: IProps): React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=CaseLabelLoadErrorModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CaseLabelLoadErrorModal.d.ts","sourceRoot":"","sources":["../../../src/CaseLabelLoadErrorModal/CaseLabelLoadErrorModal.tsx"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AAWxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,MAAM;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAKD,wBAAgB,uBAAuB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,qBAuC3E"}
@@ -1,17 +0,0 @@
1
- import './CaseLabelLoadErrorModal.scss';
2
- import { Button, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
3
- import React from 'react';
4
- import { Trans } from 'react-i18next';
5
- const MODAL_TITLE_ID = 'case-label-load-error-modal-title';
6
- const MODAL_DESCRIPTION_ID = 'case-label-load-error-modal-description';
7
- export function CaseLabelLoadErrorModal({ isOpen, onRetry, onClose }) {
8
- return (React.createElement(Modal, { id: "case-label-load-error-modal", className: "case-label-load-error-modal", "aria-labelledby": MODAL_TITLE_ID, "aria-describedby": MODAL_DESCRIPTION_ID, isOpen: isOpen, variant: ModalVariant.small, onClose: onClose },
9
- React.createElement(ModalHeader, { title: React.createElement(Trans, null, "Something went wrong"), titleIconVariant: "warning", labelId: MODAL_TITLE_ID }),
10
- React.createElement(ModalBody, { id: MODAL_DESCRIPTION_ID },
11
- React.createElement(Trans, null, "The case label(s) you selected failed to load, please try again")),
12
- React.createElement(ModalFooter, null,
13
- React.createElement(Button, { key: "retry", variant: ButtonVariant.primary, onClick: onRetry, "data-tracking-id": "case-label-load-error-retry" },
14
- React.createElement(Trans, null, "Try again")),
15
- React.createElement(Button, { key: "cancel", variant: ButtonVariant.link, onClick: onClose, "data-tracking-id": "case-label-load-error-cancel" },
16
- React.createElement(Trans, null, "Cancel")))));
17
- }
@@ -1,13 +0,0 @@
1
- .case-label-load-error-modal {
2
- .pf-v6-c-modal-box__title-icon {
3
- color: var(--pf-t--global--icon--color--status--warning--default);
4
- }
5
-
6
- .pf-v6-c-modal-box__body {
7
- padding-top: var(--pf-t--global--spacer--md);
8
- }
9
-
10
- .pf-v6-c-modal-box__footer {
11
- padding-top: var(--pf-t--global--spacer--lg);
12
- }
13
- }
@@ -1,2 +0,0 @@
1
- export * from './CaseLabelLoadErrorModal';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/CaseLabelLoadErrorModal/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -1 +0,0 @@
1
- export * from './CaseLabelLoadErrorModal';
@@ -1,18 +0,0 @@
1
- import './customDatePicker.css';
2
- import React from 'react';
3
- export interface ICustomDatePickerProps {
4
- id?: string;
5
- value?: string;
6
- 'aria-label'?: string;
7
- onChange?: (event: React.FormEvent<HTMLInputElement>, value: string, date?: Date) => void;
8
- validators?: Array<(date: Date) => string>;
9
- popoverPosition?: 'bottom' | 'bottom-start' | 'bottom-end';
10
- dateParse?: (value: string) => Date;
11
- placeholder?: string;
12
- invalidFormatText?: string;
13
- className?: string;
14
- isDisabled?: boolean;
15
- validationError?: string;
16
- }
17
- export declare function CustomDatePicker({ id, value, 'aria-label': ariaLabel, onChange, validators, popoverPosition, dateParse, placeholder, invalidFormatText, className, isDisabled, validationError, }: ICustomDatePickerProps): React.JSX.Element;
18
- //# sourceMappingURL=CustomDatePicker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomDatePicker.d.ts","sourceRoot":"","sources":["../../../src/CustomDatePicker/CustomDatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAGhC,OAAO,KAAiB,MAAM,OAAO,CAAC;AAKtC,MAAM,WAAW,sBAAsB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;IAC1F,UAAU,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC;IAC3C,eAAe,CAAC,EAAE,QAAQ,GAAG,cAAc,GAAG,YAAY,CAAC;IAC3D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,EAC7B,EAAE,EACF,KAAU,EACV,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,UAAU,EACV,eAAgC,EAChC,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,eAAe,GAClB,EAAE,sBAAsB,qBA4CxB"}
@@ -1,27 +0,0 @@
1
- import './customDatePicker.css';
2
- import { DatePicker, HelperText, HelperTextItem } from '@patternfly/react-core';
3
- import React, { useRef } from 'react';
4
- import { useTranslation } from 'react-i18next';
5
- export function CustomDatePicker({ id, value = '', 'aria-label': ariaLabel, onChange, validators, popoverPosition = 'bottom-start', dateParse, placeholder, invalidFormatText, className, isDisabled, validationError, }) {
6
- const { t } = useTranslation();
7
- const datePickerRef = useRef(null);
8
- const datePickerClassName = [
9
- 'custom-date-picker',
10
- 'custom-date-picker--input-only',
11
- validationError && 'custom-date-picker--has-error',
12
- validationError && 'custom-date-picker--external-validation',
13
- className,
14
- ]
15
- .filter(Boolean)
16
- .join(' ');
17
- return (React.createElement(React.Fragment, null,
18
- React.createElement(DatePicker, { ref: datePickerRef, id: id, value: value, isDisabled: isDisabled, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t('YYYY-MM-DD'), invalidFormatText: invalidFormatText !== null && invalidFormatText !== void 0 ? invalidFormatText : t('Invalid date format.'), dateParse: dateParse, "aria-label": ariaLabel, validators: validators, appendTo: () => document.body, className: datePickerClassName, popoverProps: {
19
- className: 'custom-date-picker-popover',
20
- hasAutoWidth: false,
21
- position: popoverPosition,
22
- }, onChange: onChange, inputProps: {
23
- onClick: () => { var _a; return (_a = datePickerRef.current) === null || _a === void 0 ? void 0 : _a.toggleCalendar(); },
24
- } }),
25
- validationError && (React.createElement(HelperText, null,
26
- React.createElement(HelperTextItem, { variant: "error" }, validationError)))));
27
- }
@@ -1,52 +0,0 @@
1
- .custom-date-picker--input-only {
2
- display: block;
3
- width: 100%;
4
- --pf-v6-c-date-picker__input--c-form-control--Width: 100%;
5
- }
6
-
7
- .custom-date-picker--has-error .pf-v6-c-form-control {
8
- --pf-v6-c-form-control--BorderColor: var(--pf-t--global--border--color--status--danger--default);
9
- }
10
-
11
- .custom-date-picker--external-validation .pf-v6-c-date-picker__helper-text {
12
- display: none;
13
- }
14
-
15
- .custom-date-picker--input-only .pf-v6-c-input-group {
16
- display: block;
17
- }
18
-
19
- .custom-date-picker--input-only .pf-v6-c-input-group__item:first-child {
20
- width: 100%;
21
- }
22
-
23
- .custom-date-picker--input-only .pf-v6-c-input-group__item:last-child {
24
- display: none;
25
- }
26
-
27
- .pf-v6-c-popover.custom-date-picker-popover {
28
- --pf-v6-c-popover--MaxWidth: 18.5rem;
29
- max-width: 18.5rem;
30
- width: 18.5rem;
31
- }
32
-
33
- .pf-v6-c-popover.custom-date-picker-popover .pf-v6-c-calendar-month {
34
- --pf-v6-c-calendar-month--PaddingBlockStart: var(--pf-t--global--spacer--sm);
35
- --pf-v6-c-calendar-month--PaddingInlineEnd: var(--pf-t--global--spacer--sm);
36
- --pf-v6-c-calendar-month--PaddingBlockEnd: var(--pf-t--global--spacer--sm);
37
- --pf-v6-c-calendar-month--PaddingInlineStart: var(--pf-t--global--spacer--sm);
38
- --pf-v6-c-calendar-month__header--MarginBlockEnd: var(--pf-t--global--spacer--sm);
39
- --pf-v6-c-calendar-month__date--Width: 2.25rem;
40
- --pf-v6-c-calendar-month__date--Height: 2.25rem;
41
- --pf-v6-c-calendar-month__day--PaddingBlockEnd: var(--pf-t--global--spacer--xs);
42
- width: 100%;
43
- }
44
-
45
- .pf-v6-c-popover.custom-date-picker-popover .pf-v6-c-calendar-month__header-month .pf-v6-c-menu-toggle {
46
- width: 100% !important;
47
- max-width: 6.5rem;
48
- }
49
-
50
- .pf-v6-c-popover.custom-date-picker-popover .pf-v6-c-calendar-month__calendar {
51
- width: 100%;
52
- }
@@ -1,2 +0,0 @@
1
- export * from './CustomDatePicker';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/CustomDatePicker/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- export * from './CustomDatePicker';
@@ -1,45 +0,0 @@
1
- import './richTextEditor.css';
2
- import Quill from 'quill';
3
- import React from 'react';
4
- export interface IRichTextEditorProps {
5
- /** HTML string value */
6
- value: string;
7
- /** Called with HTML string on change */
8
- onChange: (html: string) => void;
9
- /** Emit plain text for char counting or previews */
10
- onChangePlainText?: (text: string) => void;
11
- /** Placeholder text when editor is empty */
12
- placeholder?: string;
13
- /** Disable the editor */
14
- disabled?: boolean;
15
- /** CSS class for the outer container */
16
- className?: string;
17
- /** Unique ID */
18
- id?: string;
19
- /** Hide the formatting toolbar */
20
- hideToolbar?: boolean;
21
- /** Character limit (counted against plain text) */
22
- charLimit?: number;
23
- /** Threshold to show character counter */
24
- minCharsForCounter?: number;
25
- /** Callback when character limit is exceeded */
26
- onCharLimitExceeded?: (exceeded: boolean) => void;
27
- /** Editor height */
28
- height?: string | number;
29
- /** Focus handler */
30
- onFocus?: () => void;
31
- /** Blur handler */
32
- onBlur?: () => void;
33
- /** Ref binding for programmatic access to the Quill instance */
34
- bindEditor?: (editor: Quill) => void;
35
- /** Accessible label */
36
- 'aria-label'?: string;
37
- /**
38
- * Async callback invoked when the user selects an image file (via toolbar or paste).
39
- * Must upload the file and return the image URL to embed.
40
- */
41
- onImageUpload?: (file: File) => Promise<string>;
42
- }
43
- export declare function RichTextEditor(props: Readonly<IRichTextEditorProps>): React.JSX.Element;
44
- export default RichTextEditor;
45
- //# sourceMappingURL=RichTextEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../src/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AA+B9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,MAAM,WAAW,oBAAoB;IACjC,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gDAAgD;IAChD,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,gEAAgE;IAChE,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC;IACrC,uBAAuB;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACnD;AAQD,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,qBAgvBnE;AAED,eAAe,cAAc,CAAC"}