@sunggang/ui-lib 0.3.9 → 0.3.10
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/BaseCkeditor.esm.js +13 -3
- package/package.json +1 -1
- package/src/lib/Form/types.d.ts +2 -0
package/BaseCkeditor.esm.js
CHANGED
|
@@ -66794,7 +66794,7 @@ var BaseCkeditor = function(param) {
|
|
|
66794
66794
|
var _item_validateOption;
|
|
66795
66795
|
var _useFormContext = useFormContext(), control = _useFormContext.control, errors = _useFormContext.formState.errors;
|
|
66796
66796
|
return /*#__PURE__*/ jsx(Controller, {
|
|
66797
|
-
name: item.name,
|
|
66797
|
+
name: item === null || item === void 0 ? void 0 : item.name,
|
|
66798
66798
|
control: control,
|
|
66799
66799
|
rules: (item === null || item === void 0 ? void 0 : (_item_validateOption = item.validateOption) === null || _item_validateOption === void 0 ? void 0 : _item_validateOption.required) ? {
|
|
66800
66800
|
required: item === null || item === void 0 ? void 0 : item.errorText
|
|
@@ -66821,8 +66821,18 @@ var BaseCkeditor = function(param) {
|
|
|
66821
66821
|
onChange(data);
|
|
66822
66822
|
},
|
|
66823
66823
|
onReady: function(editor) {
|
|
66824
|
-
if (item === null || item === void 0 ? void 0 : item.disabled) {
|
|
66825
|
-
editor.enableReadOnlyMode(item.name);
|
|
66824
|
+
if ((item === null || item === void 0 ? void 0 : item.disable) || (item === null || item === void 0 ? void 0 : item.disabled)) {
|
|
66825
|
+
editor.enableReadOnlyMode(item === null || item === void 0 ? void 0 : item.name);
|
|
66826
|
+
}
|
|
66827
|
+
var editorElement = editor.ui.view.editable.element;
|
|
66828
|
+
if (editorElement) {
|
|
66829
|
+
editorElement.style.minHeight = (item === null || item === void 0 ? void 0 : item.height) || "200px";
|
|
66830
|
+
editorElement.style.backgroundColor = (item === null || item === void 0 ? void 0 : item.bgColor) || "white";
|
|
66831
|
+
// Focus時高度維持一樣
|
|
66832
|
+
editor.ui.view.editable.on("change:isFocused", function() {
|
|
66833
|
+
editorElement.style.minHeight = (item === null || item === void 0 ? void 0 : item.height) || "200px";
|
|
66834
|
+
editorElement.style.backgroundColor = (item === null || item === void 0 ? void 0 : item.bgColor) || "white";
|
|
66835
|
+
});
|
|
66826
66836
|
}
|
|
66827
66837
|
}
|
|
66828
66838
|
}),
|
package/package.json
CHANGED