@rhc-shared-components/rich-text-editor 0.7.0 → 1.0.0

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/dist/index.js CHANGED
@@ -27,7 +27,7 @@ function _interopNamespace(e) {
27
27
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
28
  var ClassicEditor__default = /*#__PURE__*/_interopDefaultLegacy(ClassicEditor);
29
29
 
30
- var css_248z$1 = ".rich-text-editor-custom {\n --pf-c-title--m-2xl--LineHeight: var(--pf-global--LineHeight--sm);\n --pf-c-title--m-2xl--FontSize: var(--pf-global--FontSize--2xl);\n --pf-c-title--m-2xl--FontWeight: var(--pf-global--FontWeight--normal);\n --pf-c-title--m-xl--LineHeight: var(--pf-global--LineHeight--md);\n --pf-c-title--m-xl--FontSize: var(--pf-global--FontSize--xl);\n --pf-c-title--m-xl--FontWeight: var(--pf-global--FontWeight--normal);\n --pf-c-title--m-lg--LineHeight: var(--pf-global--LineHeight--md);\n --pf-c-title--m-lg--FontSize: var(--pf-global--FontSize--lg);\n --pf-c-title--m-lg--FontWeight: var(--pf-global--FontWeight--normal);\n --pf-c-title--m-md--LineHeight: var(--pf-global--LineHeight--md);\n --pf-c-title--m-md--FontSize: var(--pf-global--FontSize--md);\n --pf-c-title--m-md--FontWeight: var(--pf-global--FontWeight--normal);\n}\n.rich-text-editor-custom .ck-editor__main {\n word-break: break-all;\n}\n.rich-text-editor-custom .ck-code-block-dropdown .ck-splitbutton__arrow {\n display: none;\n}\n.rich-text-editor-custom h1 {\n font-size: var(--pf-c-title--m-2xl--FontSize);\n font-weight: var(--pf-c-title--m-2xl--FontWeight);\n line-height: var(--pf-c-title--m-2xl--LineHeight);\n}\n.rich-text-editor-custom h2 {\n font-size: var(--pf-c-title--m-xl--FontSize);\n font-weight: var(--pf-c-title--m-xl--FontWeight);\n line-height: var(--pf-c-title--m-xl--LineHeight);\n}\n.rich-text-editor-custom h3 {\n font-size: var(--pf-c-title--m-lg--FontSize);\n font-weight: var(--pf-c-title--m-lg--FontWeight);\n line-height: var(--pf-c-title--m-lg--LineHeight);\n}\n.rich-text-editor-custom h4 {\n font-size: var(--pf-c-title--m-md--FontSize);\n font-weight: var(--pf-c-title--m-md--FontWeight);\n line-height: var(--pf-c-title--m-md--LineHeight);\n}\n.rich-text-editor-custom ul {\n display: block;\n list-style-type: disc;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0px;\n margin-inline-start: 0px;\n -webkit-margin-end: 0px;\n margin-inline-end: 0px;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}\n.rich-text-editor-custom ul li {\n display: list-item;\n}\n.rich-text-editor-custom ul ul {\n list-style-type: circle;\n -webkit-margin-before: 0px;\n margin-block-start: 0px;\n -webkit-margin-after: 0px;\n margin-block-end: 0px;\n}\n.rich-text-editor-custom ol {\n display: block;\n list-style-type: decimal;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0px;\n margin-inline-start: 0px;\n -webkit-margin-end: 0px;\n margin-inline-end: 0px;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}";
30
+ var css_248z$1 = ".rich-text-editor-custom {\n --rte-h1-internal-LineHeight: var(--pf-v5-global--LineHeight--sm, --pf-global--LineHeight--sm);\n --rte-h1-internal-FontSize: var(--pf-v5-global--FontSize--2xl, --pf-global--FontSize--2xl);\n --rte-h1-internal-FontWeight: var(--pf-v5-global--FontWeight--normal, --pf-global--FontWeight--normal);\n --rte-h2-internal-LineHeight: var(--pf-v5-global--LineHeight--md, -pf-global--LineHeight--mD);\n --rte-h2-internal-FontSize: var(--pf-v5-global--FontSize--xl, --pf-global--FontSize--xl);\n --rte-h2-internal-FontWeight: var(--pf-v5-global--FontWeight--normal, --pf-global--FontWeight--normal);\n --rte-h3-internal-LineHeight: var(--pf-v5-global--LineHeight--md, -pf-global--LineHeight--md);\n --rte-h3-internal-FontSize: var(--pf-v5-global--FontSize--lg, --pf-global--FontSize--lg);\n --rte-h3-internal-FontWeight: var(--pf-v5-global--FontWeight--normal, --pf-global--FontWeight--normal);\n --rte-h4-internal-LineHeight: var(--pf-v5-global--LineHeight--md, --pf-global--LineHeight--md);\n --rte-h4-internal-FontSize: var(--pf-v5-global--FontSize--md, --pf-global--FontSize--md);\n --rte-h4-internal-FontWeight: var( --pf-v5-global--FontWeight--normal, --pf-global--FontWeight--normal);\n}\n.rich-text-editor-custom .ck-editor__main {\n word-break: break-all;\n}\n.rich-text-editor-custom .ck-code-block-dropdown .ck-splitbutton__arrow {\n display: none;\n}\n.rich-text-editor-custom h1 {\n font-size: var(--rte-h1-internal-FontSize);\n font-weight: var(--rte-h1-internal-FontWeight);\n line-height: var(--rte-h1-internal-LineHeight);\n}\n.rich-text-editor-custom h2 {\n font-size: var(--rte-h2-internal-FontSize);\n font-weight: var(--rte-h2-internal-FontWeight);\n line-height: var(--rte-h2-internal-LineHeight);\n}\n.rich-text-editor-custom h3 {\n font-size: var(--rte-h3-internal-FontSize);\n font-weight: var(--rte-h3-internal-FontWeight);\n line-height: var(--rte-h3-internal-LineHeight);\n}\n.rich-text-editor-custom h4 {\n font-size: var(--rte-h4-internal-FontSize);\n font-weight: var(--rte-h4-internal-FontWeight);\n line-height: var(--rte-h4-internal-LineHeight);\n}\n.rich-text-editor-custom ul {\n display: block;\n list-style-type: disc;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0;\n margin-inline-start: 0;\n -webkit-margin-end: 0;\n margin-inline-end: 0;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}\n.rich-text-editor-custom ul li {\n display: list-item;\n}\n.rich-text-editor-custom ul ul {\n list-style-type: circle;\n -webkit-margin-before: 0;\n margin-block-start: 0;\n -webkit-margin-after: 0;\n margin-block-end: 0;\n}\n.rich-text-editor-custom ol {\n display: block;\n list-style-type: decimal;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0;\n margin-inline-start: 0;\n -webkit-margin-end: 0;\n margin-inline-end: 0;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}";
31
31
 
32
32
  var RichTextEditor = function RichTextEditor(_ref) {
33
33
  var value = _ref.value,
@@ -129,15 +129,18 @@ function _objectWithoutPropertiesLoose(source, excluded) {
129
129
  }
130
130
 
131
131
  var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-v5-c-form__helper-text--FontSize);\n margin-top: var(--pf-v5-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-v5-c-form--m-error--Color);\n}";
132
- var _excluded$1 = ["children", "helperTextInvalid", "validated", "helperText", "labelIcon", "onClick"];
133
132
 
134
- var FormGroupContainer = function FormGroupContainer(_ref) {
135
- var children = _ref.children,
136
- helperTextInvalid = _ref.helperTextInvalid,
137
- validated = _ref.validated,
138
- helperText = _ref.helperText,
139
- labelIcon = _ref.labelIcon,
140
- onClick = _ref.onClick,
133
+ const _excluded$1 = ["children", "helperTextInvalid", "validated", "helperText", "labelIcon", "onClick"];
134
+
135
+ const FormGroupContainer = _ref => {
136
+ let {
137
+ children,
138
+ helperTextInvalid,
139
+ validated,
140
+ helperText,
141
+ labelIcon,
142
+ onClick
143
+ } = _ref,
141
144
  rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
142
145
 
143
146
  InsertCss();
@@ -146,17 +149,17 @@ var FormGroupContainer = function FormGroupContainer(_ref) {
146
149
  }, labelIcon && {
147
150
  labelIcon: labelIcon
148
151
  }, onClick && {
149
- onClick: onClick
152
+ onClick
150
153
  }, rest), children, React__namespace.createElement(reactCore.FormHelperText, null, React__namespace.createElement(reactCore.HelperText, null, React__namespace.createElement(reactCore.HelperTextItem, {
151
154
  variant: validated
152
155
  }, validated === reactCore.ValidatedOptions.error ? helperTextInvalid : helperText))));
153
156
  };
154
157
 
155
- var InsertCss = function InsertCss() {
156
- var styleId = 'form-group-component-style';
158
+ const InsertCss = () => {
159
+ const styleId = 'form-group-component-style';
157
160
 
158
161
  if (!document.getElementById(styleId)) {
159
- var styleTag = document.createElement('style');
162
+ const styleTag = document.createElement('style');
160
163
  styleTag.id = styleId;
161
164
  styleTag.type = 'text/css';
162
165
  styleTag.innerHTML = css_248z;
@@ -4,7 +4,7 @@ import ClassicEditor from '@rhc-shared-components/rhc-ckeditor';
4
4
  import { FormGroup, FormHelperText, HelperText, HelperTextItem, ValidatedOptions } from '@patternfly/react-core';
5
5
  import { useField, useFormikContext } from 'formik';
6
6
 
7
- var css_248z$1 = ".rich-text-editor-custom {\n --pf-c-title--m-2xl--LineHeight: var(--pf-global--LineHeight--sm);\n --pf-c-title--m-2xl--FontSize: var(--pf-global--FontSize--2xl);\n --pf-c-title--m-2xl--FontWeight: var(--pf-global--FontWeight--normal);\n --pf-c-title--m-xl--LineHeight: var(--pf-global--LineHeight--md);\n --pf-c-title--m-xl--FontSize: var(--pf-global--FontSize--xl);\n --pf-c-title--m-xl--FontWeight: var(--pf-global--FontWeight--normal);\n --pf-c-title--m-lg--LineHeight: var(--pf-global--LineHeight--md);\n --pf-c-title--m-lg--FontSize: var(--pf-global--FontSize--lg);\n --pf-c-title--m-lg--FontWeight: var(--pf-global--FontWeight--normal);\n --pf-c-title--m-md--LineHeight: var(--pf-global--LineHeight--md);\n --pf-c-title--m-md--FontSize: var(--pf-global--FontSize--md);\n --pf-c-title--m-md--FontWeight: var(--pf-global--FontWeight--normal);\n}\n.rich-text-editor-custom .ck-editor__main {\n word-break: break-all;\n}\n.rich-text-editor-custom .ck-code-block-dropdown .ck-splitbutton__arrow {\n display: none;\n}\n.rich-text-editor-custom h1 {\n font-size: var(--pf-c-title--m-2xl--FontSize);\n font-weight: var(--pf-c-title--m-2xl--FontWeight);\n line-height: var(--pf-c-title--m-2xl--LineHeight);\n}\n.rich-text-editor-custom h2 {\n font-size: var(--pf-c-title--m-xl--FontSize);\n font-weight: var(--pf-c-title--m-xl--FontWeight);\n line-height: var(--pf-c-title--m-xl--LineHeight);\n}\n.rich-text-editor-custom h3 {\n font-size: var(--pf-c-title--m-lg--FontSize);\n font-weight: var(--pf-c-title--m-lg--FontWeight);\n line-height: var(--pf-c-title--m-lg--LineHeight);\n}\n.rich-text-editor-custom h4 {\n font-size: var(--pf-c-title--m-md--FontSize);\n font-weight: var(--pf-c-title--m-md--FontWeight);\n line-height: var(--pf-c-title--m-md--LineHeight);\n}\n.rich-text-editor-custom ul {\n display: block;\n list-style-type: disc;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0px;\n margin-inline-start: 0px;\n -webkit-margin-end: 0px;\n margin-inline-end: 0px;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}\n.rich-text-editor-custom ul li {\n display: list-item;\n}\n.rich-text-editor-custom ul ul {\n list-style-type: circle;\n -webkit-margin-before: 0px;\n margin-block-start: 0px;\n -webkit-margin-after: 0px;\n margin-block-end: 0px;\n}\n.rich-text-editor-custom ol {\n display: block;\n list-style-type: decimal;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0px;\n margin-inline-start: 0px;\n -webkit-margin-end: 0px;\n margin-inline-end: 0px;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}";
7
+ var css_248z$1 = ".rich-text-editor-custom {\n --rte-h1-internal-LineHeight: var(--pf-v5-global--LineHeight--sm, --pf-global--LineHeight--sm);\n --rte-h1-internal-FontSize: var(--pf-v5-global--FontSize--2xl, --pf-global--FontSize--2xl);\n --rte-h1-internal-FontWeight: var(--pf-v5-global--FontWeight--normal, --pf-global--FontWeight--normal);\n --rte-h2-internal-LineHeight: var(--pf-v5-global--LineHeight--md, -pf-global--LineHeight--mD);\n --rte-h2-internal-FontSize: var(--pf-v5-global--FontSize--xl, --pf-global--FontSize--xl);\n --rte-h2-internal-FontWeight: var(--pf-v5-global--FontWeight--normal, --pf-global--FontWeight--normal);\n --rte-h3-internal-LineHeight: var(--pf-v5-global--LineHeight--md, -pf-global--LineHeight--md);\n --rte-h3-internal-FontSize: var(--pf-v5-global--FontSize--lg, --pf-global--FontSize--lg);\n --rte-h3-internal-FontWeight: var(--pf-v5-global--FontWeight--normal, --pf-global--FontWeight--normal);\n --rte-h4-internal-LineHeight: var(--pf-v5-global--LineHeight--md, --pf-global--LineHeight--md);\n --rte-h4-internal-FontSize: var(--pf-v5-global--FontSize--md, --pf-global--FontSize--md);\n --rte-h4-internal-FontWeight: var( --pf-v5-global--FontWeight--normal, --pf-global--FontWeight--normal);\n}\n.rich-text-editor-custom .ck-editor__main {\n word-break: break-all;\n}\n.rich-text-editor-custom .ck-code-block-dropdown .ck-splitbutton__arrow {\n display: none;\n}\n.rich-text-editor-custom h1 {\n font-size: var(--rte-h1-internal-FontSize);\n font-weight: var(--rte-h1-internal-FontWeight);\n line-height: var(--rte-h1-internal-LineHeight);\n}\n.rich-text-editor-custom h2 {\n font-size: var(--rte-h2-internal-FontSize);\n font-weight: var(--rte-h2-internal-FontWeight);\n line-height: var(--rte-h2-internal-LineHeight);\n}\n.rich-text-editor-custom h3 {\n font-size: var(--rte-h3-internal-FontSize);\n font-weight: var(--rte-h3-internal-FontWeight);\n line-height: var(--rte-h3-internal-LineHeight);\n}\n.rich-text-editor-custom h4 {\n font-size: var(--rte-h4-internal-FontSize);\n font-weight: var(--rte-h4-internal-FontWeight);\n line-height: var(--rte-h4-internal-LineHeight);\n}\n.rich-text-editor-custom ul {\n display: block;\n list-style-type: disc;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0;\n margin-inline-start: 0;\n -webkit-margin-end: 0;\n margin-inline-end: 0;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}\n.rich-text-editor-custom ul li {\n display: list-item;\n}\n.rich-text-editor-custom ul ul {\n list-style-type: circle;\n -webkit-margin-before: 0;\n margin-block-start: 0;\n -webkit-margin-after: 0;\n margin-block-end: 0;\n}\n.rich-text-editor-custom ol {\n display: block;\n list-style-type: decimal;\n -webkit-margin-before: 1em;\n margin-block-start: 1em;\n -webkit-margin-after: 1em;\n margin-block-end: 1em;\n -webkit-margin-start: 0;\n margin-inline-start: 0;\n -webkit-margin-end: 0;\n margin-inline-end: 0;\n -webkit-padding-start: 40px;\n padding-inline-start: 40px;\n}";
8
8
 
9
9
  const RichTextEditor = ({
10
10
  value,
@@ -106,6 +106,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
106
106
  }
107
107
 
108
108
  var css_248z = ".form-group .max-char-length {\n float: right;\n color: #6A6E73;\n font-size: var(--pf-v5-c-form__helper-text--FontSize);\n margin-top: var(--pf-v5-c-form__helper-text--MarginTop);\n}\n.form-group .maxlength-error {\n color: var(--pf-v5-c-form--m-error--Color);\n}";
109
+
109
110
  const _excluded$1 = ["children", "helperTextInvalid", "validated", "helperText", "labelIcon", "onClick"];
110
111
 
111
112
  const FormGroupContainer = _ref => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhc-shared-components/rich-text-editor",
3
- "version": "0.7.0",
3
+ "version": "1.0.0",
4
4
  "description": "WYSWYG Editor for Red Hat Certified Apps",
5
5
  "author": "gautamkrishnar",
6
6
  "license": "MIT",
@@ -70,11 +70,10 @@
70
70
  ],
71
71
  "dependencies": {
72
72
  "@ckeditor/ckeditor5-react": "^3.0.2",
73
- "@patternfly/react-core": "^4.276.6",
73
+ "@patternfly/react-core": "^5.3.3",
74
74
  "@rhc-shared-components/rhc-ckeditor": "^1.0.2",
75
75
  "formik": "^2.1.4",
76
76
  "react": "^16.13.1",
77
77
  "react-dom": "^16.13.1"
78
- },
79
- "gitHead": "67ea9dbf7065a51b8b3f4058f7820c109670f2a2"
78
+ }
80
79
  }