@apexcura/ui-components 0.0.11-Beta22 → 0.0.11-Beta24
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 +16 -6
- package/dist/index.mjs +16 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -379,15 +379,20 @@ var AddMoreTable = (props) => {
|
|
|
379
379
|
let newRow;
|
|
380
380
|
if (lastRow && lastRow.variable_data && lastRow.variable_data.length > 0) {
|
|
381
381
|
const lastVariable = lastRow.variable_data[lastRow.variable_data.length - 1];
|
|
382
|
-
const newVariableId = lastVariable.id + 1;
|
|
382
|
+
const newVariableId = lastVariable.id.id + 1;
|
|
383
383
|
newRow = {
|
|
384
384
|
...lastRow,
|
|
385
385
|
id: newId,
|
|
386
386
|
variable_data: [
|
|
387
387
|
...lastRow.variable_data,
|
|
388
388
|
{
|
|
389
|
-
id: newVariableId,
|
|
390
|
-
|
|
389
|
+
id: { id: newVariableId },
|
|
390
|
+
Route: { label: "Route", element: "single-select", type: "text" },
|
|
391
|
+
Dose: { label: "Dose", element: "single-select", type: "text" },
|
|
392
|
+
Frequency: { label: "Frequency", element: "single-select", type: "text" },
|
|
393
|
+
When: { label: "When", element: "textarea", type: "text" },
|
|
394
|
+
Duration: { label: "Duration", element: "textarea", type: "text" },
|
|
395
|
+
Instructions: { label: "Instructions", element: "textarea", type: "text" }
|
|
391
396
|
}
|
|
392
397
|
]
|
|
393
398
|
};
|
|
@@ -408,14 +413,19 @@ var AddMoreTable = (props) => {
|
|
|
408
413
|
return prevRows.map((row, index) => {
|
|
409
414
|
if (index === rowIndex && row.variable_data && row.variable_data.length > 0) {
|
|
410
415
|
const lastVariable = row.variable_data[row.variable_data.length - 1];
|
|
411
|
-
const newVariableId = lastVariable.id + 1;
|
|
416
|
+
const newVariableId = lastVariable.id.id + 1;
|
|
412
417
|
return {
|
|
413
418
|
...row,
|
|
414
419
|
variable_data: [
|
|
415
420
|
...row.variable_data,
|
|
416
421
|
{
|
|
417
|
-
id: newVariableId,
|
|
418
|
-
|
|
422
|
+
id: { id: newVariableId },
|
|
423
|
+
Route: { label: "Route", element: "single-select", type: "text" },
|
|
424
|
+
Dose: { label: "Dose", element: "single-select", type: "text" },
|
|
425
|
+
Frequency: { label: "Frequency", element: "single-select", type: "text" },
|
|
426
|
+
When: { label: "When", element: "textarea", type: "text" },
|
|
427
|
+
Duration: { label: "Duration", element: "textarea", type: "text" },
|
|
428
|
+
Instructions: { label: "Instructions", element: "textarea", type: "text" }
|
|
419
429
|
}
|
|
420
430
|
]
|
|
421
431
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -332,15 +332,20 @@ var AddMoreTable = (props) => {
|
|
|
332
332
|
let newRow;
|
|
333
333
|
if (lastRow && lastRow.variable_data && lastRow.variable_data.length > 0) {
|
|
334
334
|
const lastVariable = lastRow.variable_data[lastRow.variable_data.length - 1];
|
|
335
|
-
const newVariableId = lastVariable.id + 1;
|
|
335
|
+
const newVariableId = lastVariable.id.id + 1;
|
|
336
336
|
newRow = {
|
|
337
337
|
...lastRow,
|
|
338
338
|
id: newId,
|
|
339
339
|
variable_data: [
|
|
340
340
|
...lastRow.variable_data,
|
|
341
341
|
{
|
|
342
|
-
id: newVariableId,
|
|
343
|
-
|
|
342
|
+
id: { id: newVariableId },
|
|
343
|
+
Route: { label: "Route", element: "single-select", type: "text" },
|
|
344
|
+
Dose: { label: "Dose", element: "single-select", type: "text" },
|
|
345
|
+
Frequency: { label: "Frequency", element: "single-select", type: "text" },
|
|
346
|
+
When: { label: "When", element: "textarea", type: "text" },
|
|
347
|
+
Duration: { label: "Duration", element: "textarea", type: "text" },
|
|
348
|
+
Instructions: { label: "Instructions", element: "textarea", type: "text" }
|
|
344
349
|
}
|
|
345
350
|
]
|
|
346
351
|
};
|
|
@@ -361,14 +366,19 @@ var AddMoreTable = (props) => {
|
|
|
361
366
|
return prevRows.map((row, index) => {
|
|
362
367
|
if (index === rowIndex && row.variable_data && row.variable_data.length > 0) {
|
|
363
368
|
const lastVariable = row.variable_data[row.variable_data.length - 1];
|
|
364
|
-
const newVariableId = lastVariable.id + 1;
|
|
369
|
+
const newVariableId = lastVariable.id.id + 1;
|
|
365
370
|
return {
|
|
366
371
|
...row,
|
|
367
372
|
variable_data: [
|
|
368
373
|
...row.variable_data,
|
|
369
374
|
{
|
|
370
|
-
id: newVariableId,
|
|
371
|
-
|
|
375
|
+
id: { id: newVariableId },
|
|
376
|
+
Route: { label: "Route", element: "single-select", type: "text" },
|
|
377
|
+
Dose: { label: "Dose", element: "single-select", type: "text" },
|
|
378
|
+
Frequency: { label: "Frequency", element: "single-select", type: "text" },
|
|
379
|
+
When: { label: "When", element: "textarea", type: "text" },
|
|
380
|
+
Duration: { label: "Duration", element: "textarea", type: "text" },
|
|
381
|
+
Instructions: { label: "Instructions", element: "textarea", type: "text" }
|
|
372
382
|
}
|
|
373
383
|
]
|
|
374
384
|
};
|