wini-web-components 2.3.9 → 2.4.1

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/README.md CHANGED
@@ -14,5 +14,8 @@ add this cdn link into your App.css file. \
14
14
  @import url(https://cdn.jsdelivr.net/gh/WiniGit/web-component@latest/src/skin/typography.css); \
15
15
  @import url(https://cdn.jsdelivr.net/gh/WiniGit/web-component@latest/src/skin/layout.css);
16
16
 
17
+ add this import css into your App.js \
18
+ import 'ckeditor5/ckeditor5.css';
19
+
17
20
 
18
21
 
@@ -1,6 +1,5 @@
1
1
  import React, { CSSProperties } from 'react';
2
2
  import { ClassicEditor, EventInfo } from 'ckeditor5';
3
- import 'ckeditor5/ckeditor5.css';
4
3
  import './ck-editor.css';
5
4
  /**
6
5
  * Please update the following values with your tokens.
@@ -33,5 +32,5 @@ interface Props {
33
32
  helperText?: string;
34
33
  helperTextColor?: string;
35
34
  }
36
- export default function CustomCkEditor5(props: Props): React.JSX.Element;
35
+ export declare function CustomCkEditor5(props: Props): React.JSX.Element;
37
36
  export {};
@@ -14,12 +14,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.default = CustomCkEditor5;
17
+ exports.CustomCkEditor5 = CustomCkEditor5;
18
18
  var react_1 = __importDefault(require("react"));
19
19
  var react_2 = require("react");
20
20
  var ckeditor5_react_1 = require("@ckeditor/ckeditor5-react");
21
21
  var ckeditor5_1 = require("ckeditor5");
22
- require("ckeditor5/ckeditor5.css");
23
22
  require("./ck-editor.css");
24
23
  var react_i18next_1 = require("react-i18next");
25
24
  /**
@@ -100,7 +100,7 @@ var TImportFile = /** @class */ (function (_super) {
100
100
  };
101
101
  TImportFile.prototype.componentDidUpdate = function (prevProps, prevState) {
102
102
  if (prevProps.value !== this.props.value || prevProps.status !== this.props.status) {
103
- this.setState(__assign(__assign({}, this.state), { status: this.props.status, preview: Array.isArray(this.props.value) ? this.props.value : [this.props.value] }));
103
+ this.setState(__assign(__assign({}, this.state), { status: this.props.status, preview: this.props.value ? Array.isArray(this.props.value) ? this.props.value : [this.props.value] : undefined }));
104
104
  }
105
105
  };
106
106
  TImportFile.prototype.render = function () {
@@ -76,7 +76,7 @@ var TextArea = /** @class */ (function (_super) {
76
76
  TextArea.prototype.render = function () {
77
77
  var _a, _b, _c, _d;
78
78
  return react_1.default.createElement("div", { ref: this.containerRef, id: this.props.id, className: "text-area-container row ".concat((_a = this.props.className) !== null && _a !== void 0 ? _a : 'body-3', " ").concat(((_b = this.props.helperText) === null || _b === void 0 ? void 0 : _b.length) && 'helper-text'), "helper-text": this.props.helperText, style: this.props.style ? __assign(__assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' } }, this.props.register ?
79
- react_1.default.createElement("textarea", __assign({ autoFocus: this.props.autoFocus }, this.props.register, { maxLength: this.props.maxLength, name: this.props.name, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onFocus: this.props.onFocus })) : react_1.default.createElement("textarea", { autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur }));
79
+ react_1.default.createElement("textarea", __assign({ name: this.props.name, autoFocus: this.props.autoFocus }, this.props.register, { maxLength: this.props.maxLength, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onFocus: this.props.onFocus })) : react_1.default.createElement("textarea", { autoFocus: this.props.autoFocus, maxLength: this.props.maxLength, name: this.props.name, defaultValue: this.props.defaultValue, value: this.props.value, placeholder: this.props.placeholder, readOnly: this.props.readOnly, disabled: this.props.disabled, onChange: this.props.onChange, onFocus: this.props.onFocus, onBlur: this.props.onBlur }));
80
80
  };
81
81
  return TextArea;
82
82
  }(react_1.default.Component));
package/dist/index.d.ts CHANGED
@@ -27,6 +27,7 @@ import { Winicon } from './component/wini-icon/winicon';
27
27
  import { NumberPicker } from './component/number-picker/number-picker';
28
28
  import { InputOpt } from './component/input-opt/input-opt';
29
29
  import { WLoginView } from './form/login/view';
30
- export { Calendar, CalendarType, ComponentStatus, getStatusIcon, Checkbox, Select1, Switch, Popup, showPopup, closePopup, Dialog, showDialog, DialogAlignment, DatePicker, SelectMultiple, ProgressBar, Text, Pagination, Table, TbCell, TbHeader, TbBody, TbRow, CellAlignItems, TextField, RadioButton, TextArea, ImportFile, ToastMessage, InfiniteScroll, Rating, ProgressCircle, CustomSlider, ToastContainer, Button, Tag, Winicon, NumberPicker, InputOpt, WLoginView, };
30
+ import { CustomCkEditor5 } from './component/ck-editor/ckeditor';
31
+ export { Calendar, CalendarType, ComponentStatus, getStatusIcon, Checkbox, Select1, Switch, Popup, showPopup, closePopup, Dialog, showDialog, DialogAlignment, DatePicker, SelectMultiple, ProgressBar, Text, Pagination, Table, TbCell, TbHeader, TbBody, TbRow, CellAlignItems, TextField, RadioButton, TextArea, ImportFile, ToastMessage, InfiniteScroll, Rating, ProgressCircle, CustomSlider, ToastContainer, Button, Tag, Winicon, NumberPicker, InputOpt, WLoginView, CustomCkEditor5 };
31
32
  export type { OptionsItem };
32
33
  export { i18n } from './language/i18n';