@apexcura/ui-components 0.0.9-Beta6 → 0.0.9-Beta8

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
@@ -18,7 +18,7 @@ type ElementType = {
18
18
  maxLength?: number;
19
19
  fieldNames?: any[];
20
20
  onChange?: (value: string | number | boolean | any[]) => void;
21
- dropDownOptions: any[];
21
+ dropDownOptions?: any[];
22
22
  };
23
23
 
24
24
  interface ElementExecuterProps$3 extends ElementType {
@@ -65,4 +65,6 @@ declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element
65
65
 
66
66
  declare const ButtonElement: () => React$1.JSX.Element;
67
67
 
68
- export { ButtonElement, CheckboxElement, CkEditor, MultipleSelectElement, NumberElement, PasswordElement, RadioElement, SelectElement, SingleSelectElement, TextElement, TextareaElement };
68
+ declare const AddMoreTable: () => React$1.JSX.Element;
69
+
70
+ export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, MultipleSelectElement, NumberElement, PasswordElement, RadioElement, SelectElement, SingleSelectElement, TextElement, TextareaElement };
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ type ElementType = {
18
18
  maxLength?: number;
19
19
  fieldNames?: any[];
20
20
  onChange?: (value: string | number | boolean | any[]) => void;
21
- dropDownOptions: any[];
21
+ dropDownOptions?: any[];
22
22
  };
23
23
 
24
24
  interface ElementExecuterProps$3 extends ElementType {
@@ -65,4 +65,6 @@ declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element
65
65
 
66
66
  declare const ButtonElement: () => React$1.JSX.Element;
67
67
 
68
- export { ButtonElement, CheckboxElement, CkEditor, MultipleSelectElement, NumberElement, PasswordElement, RadioElement, SelectElement, SingleSelectElement, TextElement, TextareaElement };
68
+ declare const AddMoreTable: () => React$1.JSX.Element;
69
+
70
+ export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, MultipleSelectElement, NumberElement, PasswordElement, RadioElement, SelectElement, SingleSelectElement, TextElement, TextareaElement };
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
+ AddMoreTable: () => AddMoreTable,
33
34
  ButtonElement: () => ButtonElement,
34
35
  CheckboxElement: () => CheckboxElement,
35
36
  CkEditor: () => CkEditor,
@@ -309,7 +310,7 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
309
310
  var SingleSelectElement = (props) => {
310
311
  const handleChange = (values) => {
311
312
  if (props.onChange) {
312
- const option = props.dropDownOptions.find((option2) => String(option2.title) === values);
313
+ const option = props.dropDownOptions?.find((option2) => String(option2.title) === values);
313
314
  const selectedOption = { id: option?.id, value: values };
314
315
  props.onChange([selectedOption]);
315
316
  }
@@ -335,7 +336,7 @@ var MultipleSelectElement = (props) => {
335
336
  const handleChange = (values) => {
336
337
  if (props.onChange) {
337
338
  const selectedOptions = values.map((value) => {
338
- const option = props.dropDownOptions.find((option2) => String(option2.title) === value);
339
+ const option = props.dropDownOptions?.find((option2) => String(option2.title) === value);
339
340
  return { id: option?.id, value };
340
341
  });
341
342
  props.onChange(selectedOptions);
@@ -356,8 +357,72 @@ var MultipleSelectElement = (props) => {
356
357
  var import_react12 = __toESM(require("react"));
357
358
  var import_antd10 = require("antd");
358
359
  var ButtonElement = () => /* @__PURE__ */ import_react12.default.createElement(import_antd10.Flex, { gap: "small" }, /* @__PURE__ */ import_react12.default.createElement(import_antd10.Button, { type: "primary" }, "Primary Button"));
360
+
361
+ // src/Components/AddMoreTable.tsx
362
+ var import_react13 = __toESM(require("react"));
363
+ var import_antd11 = require("antd");
364
+ var AddMoreTable = () => {
365
+ const expandedRowRender = () => {
366
+ const data2 = [];
367
+ for (let i = 0; i < 3; ++i) {
368
+ data2.push({
369
+ key: i.toString(),
370
+ date: "2014-12-24 23:12:00",
371
+ name: "This is production name",
372
+ upgradeNum: "Upgraded: 56"
373
+ });
374
+ }
375
+ return /* @__PURE__ */ import_react13.default.createElement(import_antd11.Table, { dataSource: data2, pagination: false });
376
+ };
377
+ const columns = [
378
+ { title: "Name", dataIndex: "name", key: "name" },
379
+ { title: "Platform", dataIndex: "platform", key: "platform" },
380
+ { title: "Version", dataIndex: "version", key: "version" },
381
+ { title: "Upgraded", dataIndex: "upgradeNum", key: "upgradeNum" },
382
+ { title: "Creator", dataIndex: "creator", key: "creator" },
383
+ { title: "Date", dataIndex: "createdAt", key: "createdAt" },
384
+ { title: "Action", key: "operation", render: () => /* @__PURE__ */ import_react13.default.createElement("a", null, "Publish") }
385
+ ];
386
+ const data = [];
387
+ for (let i = 0; i < 3; ++i) {
388
+ data.push({
389
+ key: i.toString(),
390
+ name: "Screen",
391
+ platform: "iOS",
392
+ version: "10.3.4.5654",
393
+ upgradeNum: 500,
394
+ creator: "Jack",
395
+ createdAt: "2014-12-24 23:12:00"
396
+ });
397
+ }
398
+ return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, /* @__PURE__ */ import_react13.default.createElement(
399
+ import_antd11.Table,
400
+ {
401
+ columns,
402
+ expandable: { expandedRowRender, defaultExpandedRowKeys: ["0"] },
403
+ dataSource: data
404
+ }
405
+ ), /* @__PURE__ */ import_react13.default.createElement(
406
+ import_antd11.Table,
407
+ {
408
+ columns,
409
+ expandable: { expandedRowRender, defaultExpandedRowKeys: ["0"] },
410
+ dataSource: data,
411
+ size: "middle"
412
+ }
413
+ ), /* @__PURE__ */ import_react13.default.createElement(
414
+ import_antd11.Table,
415
+ {
416
+ columns,
417
+ expandable: { expandedRowRender, defaultExpandedRowKeys: ["0"] },
418
+ dataSource: data,
419
+ size: "small"
420
+ }
421
+ ));
422
+ };
359
423
  // Annotate the CommonJS export names for ESM import in node:
360
424
  0 && (module.exports = {
425
+ AddMoreTable,
361
426
  ButtonElement,
362
427
  CheckboxElement,
363
428
  CkEditor,
package/dist/index.mjs CHANGED
@@ -263,7 +263,7 @@ var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includ
263
263
  var SingleSelectElement = (props) => {
264
264
  const handleChange = (values) => {
265
265
  if (props.onChange) {
266
- const option = props.dropDownOptions.find((option2) => String(option2.title) === values);
266
+ const option = props.dropDownOptions?.find((option2) => String(option2.title) === values);
267
267
  const selectedOption = { id: option?.id, value: values };
268
268
  props.onChange([selectedOption]);
269
269
  }
@@ -289,7 +289,7 @@ var MultipleSelectElement = (props) => {
289
289
  const handleChange = (values) => {
290
290
  if (props.onChange) {
291
291
  const selectedOptions = values.map((value) => {
292
- const option = props.dropDownOptions.find((option2) => String(option2.title) === value);
292
+ const option = props.dropDownOptions?.find((option2) => String(option2.title) === value);
293
293
  return { id: option?.id, value };
294
294
  });
295
295
  props.onChange(selectedOptions);
@@ -310,7 +310,71 @@ var MultipleSelectElement = (props) => {
310
310
  import React11 from "react";
311
311
  import { Button as Button2, Flex as Flex2 } from "antd";
312
312
  var ButtonElement = () => /* @__PURE__ */ React11.createElement(Flex2, { gap: "small" }, /* @__PURE__ */ React11.createElement(Button2, { type: "primary" }, "Primary Button"));
313
+
314
+ // src/Components/AddMoreTable.tsx
315
+ import React12 from "react";
316
+ import { Table } from "antd";
317
+ var AddMoreTable = () => {
318
+ const expandedRowRender = () => {
319
+ const data2 = [];
320
+ for (let i = 0; i < 3; ++i) {
321
+ data2.push({
322
+ key: i.toString(),
323
+ date: "2014-12-24 23:12:00",
324
+ name: "This is production name",
325
+ upgradeNum: "Upgraded: 56"
326
+ });
327
+ }
328
+ return /* @__PURE__ */ React12.createElement(Table, { dataSource: data2, pagination: false });
329
+ };
330
+ const columns = [
331
+ { title: "Name", dataIndex: "name", key: "name" },
332
+ { title: "Platform", dataIndex: "platform", key: "platform" },
333
+ { title: "Version", dataIndex: "version", key: "version" },
334
+ { title: "Upgraded", dataIndex: "upgradeNum", key: "upgradeNum" },
335
+ { title: "Creator", dataIndex: "creator", key: "creator" },
336
+ { title: "Date", dataIndex: "createdAt", key: "createdAt" },
337
+ { title: "Action", key: "operation", render: () => /* @__PURE__ */ React12.createElement("a", null, "Publish") }
338
+ ];
339
+ const data = [];
340
+ for (let i = 0; i < 3; ++i) {
341
+ data.push({
342
+ key: i.toString(),
343
+ name: "Screen",
344
+ platform: "iOS",
345
+ version: "10.3.4.5654",
346
+ upgradeNum: 500,
347
+ creator: "Jack",
348
+ createdAt: "2014-12-24 23:12:00"
349
+ });
350
+ }
351
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
352
+ Table,
353
+ {
354
+ columns,
355
+ expandable: { expandedRowRender, defaultExpandedRowKeys: ["0"] },
356
+ dataSource: data
357
+ }
358
+ ), /* @__PURE__ */ React12.createElement(
359
+ Table,
360
+ {
361
+ columns,
362
+ expandable: { expandedRowRender, defaultExpandedRowKeys: ["0"] },
363
+ dataSource: data,
364
+ size: "middle"
365
+ }
366
+ ), /* @__PURE__ */ React12.createElement(
367
+ Table,
368
+ {
369
+ columns,
370
+ expandable: { expandedRowRender, defaultExpandedRowKeys: ["0"] },
371
+ dataSource: data,
372
+ size: "small"
373
+ }
374
+ ));
375
+ };
313
376
  export {
377
+ AddMoreTable,
314
378
  ButtonElement,
315
379
  CheckboxElement,
316
380
  CkEditor,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.9-Beta6",
3
+ "version": "0.0.9-Beta8",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",