@apexcura/ui-components 0.0.15-Beta79 → 0.0.15-Beta80

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.d.mts CHANGED
@@ -139,7 +139,7 @@ declare const FileUpload: (props: ElementType) => React$1.JSX.Element;
139
139
 
140
140
  declare const TabsElement: (props: ElementType) => React$1.JSX.Element;
141
141
 
142
- declare const SwitchElement: () => React$1.JSX.Element;
142
+ declare const SwitchElement: (props: ElementType) => React$1.JSX.Element;
143
143
 
144
144
  declare const Upload: (props: ElementType) => React$1.JSX.Element;
145
145
 
package/dist/index.d.ts CHANGED
@@ -139,7 +139,7 @@ declare const FileUpload: (props: ElementType) => React$1.JSX.Element;
139
139
 
140
140
  declare const TabsElement: (props: ElementType) => React$1.JSX.Element;
141
141
 
142
- declare const SwitchElement: () => React$1.JSX.Element;
142
+ declare const SwitchElement: (props: ElementType) => React$1.JSX.Element;
143
143
 
144
144
  declare const Upload: (props: ElementType) => React$1.JSX.Element;
145
145
 
package/dist/index.js CHANGED
@@ -328,14 +328,6 @@ var import_tinymce_react = require("@tinymce/tinymce-react");
328
328
  var import_react9 = __toESM(require("react"));
329
329
  var CkEditor = (props) => {
330
330
  const editorRef = (0, import_react8.useRef)(null);
331
- const log = () => {
332
- if (editorRef.current) {
333
- let content = editorRef.current.getContent();
334
- if (props.onChange) {
335
- props.onChange(content);
336
- }
337
- }
338
- };
339
331
  return /* @__PURE__ */ import_react9.default.createElement("div", null, /* @__PURE__ */ import_react9.default.createElement(
340
332
  import_tinymce_react.Editor,
341
333
  {
@@ -369,9 +361,13 @@ var CkEditor = (props) => {
369
361
  ],
370
362
  toolbar: "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
371
363
  content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
364
+ },
365
+ onChange: (event, editor) => {
366
+ const data = editor.getData();
367
+ props.onChange && props.onChange(data);
372
368
  }
373
369
  }
374
- ), /* @__PURE__ */ import_react9.default.createElement("button", { onClick: log }, "Log editor content"));
370
+ ));
375
371
  };
376
372
 
377
373
  // src/Components/Editor.tsx
@@ -1224,9 +1220,12 @@ var TabsElement = (props) => {
1224
1220
  // src/Components/SwitchElement.tsx
1225
1221
  var import_react29 = __toESM(require("react"));
1226
1222
  var import_antd20 = require("antd");
1227
- var onChange = (checked) => {
1223
+ var SwitchElement = (props) => {
1224
+ const onChange = (checked) => {
1225
+ props.onChange && props.onChange(checked);
1226
+ };
1227
+ return /* @__PURE__ */ import_react29.default.createElement(import_antd20.Switch, { defaultChecked: true, onChange });
1228
1228
  };
1229
- var SwitchElement = () => /* @__PURE__ */ import_react29.default.createElement(import_antd20.Switch, { defaultChecked: true, onChange });
1230
1229
 
1231
1230
  // src/Components/Upload.tsx
1232
1231
  var import_react30 = __toESM(require("react"));
package/dist/index.mjs CHANGED
@@ -258,14 +258,6 @@ import { Editor } from "@tinymce/tinymce-react";
258
258
  import React8 from "react";
259
259
  var CkEditor = (props) => {
260
260
  const editorRef = useRef(null);
261
- const log = () => {
262
- if (editorRef.current) {
263
- let content = editorRef.current.getContent();
264
- if (props.onChange) {
265
- props.onChange(content);
266
- }
267
- }
268
- };
269
261
  return /* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement(
270
262
  Editor,
271
263
  {
@@ -299,9 +291,13 @@ var CkEditor = (props) => {
299
291
  ],
300
292
  toolbar: "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
301
293
  content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
294
+ },
295
+ onChange: (event, editor) => {
296
+ const data = editor.getData();
297
+ props.onChange && props.onChange(data);
302
298
  }
303
299
  }
304
- ), /* @__PURE__ */ React8.createElement("button", { onClick: log }, "Log editor content"));
300
+ ));
305
301
  };
306
302
 
307
303
  // src/Components/Editor.tsx
@@ -1154,9 +1150,12 @@ var TabsElement = (props) => {
1154
1150
  // src/Components/SwitchElement.tsx
1155
1151
  import React28 from "react";
1156
1152
  import { Switch } from "antd";
1157
- var onChange = (checked) => {
1153
+ var SwitchElement = (props) => {
1154
+ const onChange = (checked) => {
1155
+ props.onChange && props.onChange(checked);
1156
+ };
1157
+ return /* @__PURE__ */ React28.createElement(Switch, { defaultChecked: true, onChange });
1158
1158
  };
1159
- var SwitchElement = () => /* @__PURE__ */ React28.createElement(Switch, { defaultChecked: true, onChange });
1160
1159
 
1161
1160
  // src/Components/Upload.tsx
1162
1161
  import React29, { useState as useState10 } from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.15-Beta79",
3
+ "version": "0.0.15-Beta80",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",