@sme.up/ketchup 10.4.11 → 10.4.12
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/cjs/{f-cell-34af9b5c.js → f-cell-05f3233c.js} +4 -4
- package/dist/cjs/{f-chip-0f6c163f.js → f-chip-b4db804b.js} +1 -1
- package/dist/cjs/{f-object-field-51d22c3c.js → f-object-field-8dd8fc0e.js} +2 -2
- package/dist/cjs/{f-paginator-utils-85d4a027.js → f-paginator-utils-37c9a1cb.js} +1 -1
- package/dist/cjs/{f-text-field-dd61a24a.js → f-text-field-e780da48.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_30.cjs.entry.js +7 -7
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +118 -6
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-8ff2d35e.js → kup-data-table-helper-5daa5c82.js} +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-htm.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-input-panel.cjs.entry.js +5 -5
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
- package/dist/cjs/{kup-manager-8a2eb175.js → kup-manager-3ab94bba.js} +1 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-object-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/kup-txt.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/calendar.js +136 -24
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +1 -0
- package/dist/collection/components/kup-calendar/kup-calendar.css +19 -0
- package/dist/collection/components/kup-calendar/kup-calendar.js +136 -2
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -2
- package/dist/components/kup-activity-timeline.js +2 -2
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +121 -7
- package/dist/components/kup-card-list.js +3 -3
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -2
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +3 -3
- package/dist/components/kup-file-upload.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +2 -2
- package/dist/components/kup-iframe.js +2 -2
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +3 -3
- package/dist/components/kup-lazy.js +2 -2
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-nav-bar.js +2 -2
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-object-field.js +2 -2
- package/dist/components/kup-planner.js +2 -2
- package/dist/components/kup-probe.js +2 -2
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -2
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -2
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +2 -2
- package/dist/components/kup-typography-list.js +2 -2
- package/dist/components/kup-typography.js +2 -2
- package/dist/components/{p-4a62a8d7.js → p-05b01a8c.js} +2 -2
- package/dist/components/{p-3353919d.js → p-0c45cb9d.js} +2 -2
- package/dist/components/{p-984fea54.js → p-22770377.js} +2 -2
- package/dist/components/{p-118fa840.js → p-41c8d9eb.js} +1 -1
- package/dist/components/{p-0b0a24a5.js → p-4f899661.js} +1 -1
- package/dist/components/{p-30d33a81.js → p-eb55f5ed.js} +2 -2
- package/dist/esm/{f-cell-6428839d.js → f-cell-3491806c.js} +4 -4
- package/dist/esm/{f-chip-19922fc0.js → f-chip-bd823a3f.js} +1 -1
- package/dist/esm/{f-object-field-6e450be4.js → f-object-field-89d2049a.js} +2 -2
- package/dist/esm/{f-paginator-utils-50d88733.js → f-paginator-utils-946c53e2.js} +1 -1
- package/dist/esm/{f-text-field-12ece8b0.js → f-text-field-3e176c29.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +2 -2
- package/dist/esm/kup-autocomplete_30.entry.js +7 -7
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +118 -6
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-e006ef28.js → kup-data-table-helper-537ea105.js} +1 -1
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +1 -1
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-htm.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-input-panel.entry.js +5 -5
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-2538de17.js → kup-manager-408fac87.js} +1 -1
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-object-field.entry.js +3 -3
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +1 -1
- package/dist/esm/kup-txt.entry.js +1 -1
- package/dist/esm/kup-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-028b51a2.js +1 -0
- package/dist/ketchup/{p-ee148d3a.entry.js → p-20abd2d1.entry.js} +1 -1
- package/dist/ketchup/{p-908ee4e3.entry.js → p-23a8c8db.entry.js} +1 -1
- package/dist/ketchup/p-23c54a8e.entry.js +1 -0
- package/dist/ketchup/{p-ea19a99f.js → p-240eb11a.js} +1 -1
- package/dist/ketchup/{p-381ccf39.entry.js → p-309e6dc8.entry.js} +1 -1
- package/dist/ketchup/{p-2aa635d7.js → p-33b2e604.js} +1 -1
- package/dist/ketchup/{p-f420d42e.entry.js → p-489df979.entry.js} +1 -1
- package/dist/ketchup/{p-a40cfeb3.entry.js → p-527bc998.entry.js} +1 -1
- package/dist/ketchup/{p-e499761b.entry.js → p-62bba00f.entry.js} +1 -1
- package/dist/ketchup/{p-faa4ae0b.js → p-67358173.js} +1 -1
- package/dist/ketchup/{p-eee31725.entry.js → p-6cbe8817.entry.js} +1 -1
- package/dist/ketchup/{p-869d5146.js → p-6f19471c.js} +1 -1
- package/dist/ketchup/{p-2a0cf04a.entry.js → p-7f34b0f8.entry.js} +1 -1
- package/dist/ketchup/{p-8a55df25.entry.js → p-848bb2a2.entry.js} +1 -1
- package/dist/ketchup/{p-854ac6a9.entry.js → p-876c925b.entry.js} +1 -1
- package/dist/ketchup/{p-59d08a05.entry.js → p-8a9e8dcb.entry.js} +1 -1
- package/dist/ketchup/{p-0298a281.entry.js → p-9013fe3c.entry.js} +1 -1
- package/dist/ketchup/{p-19309d65.entry.js → p-a182a401.entry.js} +1 -1
- package/dist/ketchup/{p-5ede6476.js → p-ab58e222.js} +1 -1
- package/dist/ketchup/{p-51d50796.entry.js → p-b8796ad4.entry.js} +1 -1
- package/dist/ketchup/{p-0e0f50d7.entry.js → p-bc67dea1.entry.js} +1 -1
- package/dist/ketchup/{p-5c19f18f.entry.js → p-c346ce06.entry.js} +1 -1
- package/dist/ketchup/{p-adc108ba.js → p-c7245604.js} +1 -1
- package/dist/ketchup/{p-d8a174d1.entry.js → p-caaf60af.entry.js} +1 -1
- package/dist/ketchup/{p-e7b0d802.entry.js → p-cc57c356.entry.js} +1 -1
- package/dist/ketchup/{p-ab7a7b39.entry.js → p-cf17fa03.entry.js} +1 -1
- package/dist/ketchup/{p-5b3527dd.entry.js → p-d07fbb31.entry.js} +1 -1
- package/dist/ketchup/{p-2900dfb6.entry.js → p-da566c60.entry.js} +1 -1
- package/dist/ketchup/{p-2ad43847.entry.js → p-da764d68.entry.js} +1 -1
- package/dist/ketchup/{p-b910ece1.entry.js → p-da81990d.entry.js} +1 -1
- package/dist/ketchup/{p-a1558a31.entry.js → p-e3601415.entry.js} +1 -1
- package/dist/ketchup/{p-ac415f31.entry.js → p-f04e9ca2.entry.js} +1 -1
- package/dist/ketchup/{p-8ca36863.entry.js → p-f2d71f07.entry.js} +1 -1
- package/dist/ketchup/{p-65e59d3b.entry.js → p-fe7a60ec.entry.js} +1 -1
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +1 -0
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +13 -0
- package/dist/types/components.d.ts +10 -0
- package/package.json +1 -1
- package/dist/ketchup/p-09c2d8dc.entry.js +0 -1
- package/dist/ketchup/p-9b8f40ce.js +0 -1
|
@@ -40,9 +40,12 @@ export class KupCalendar {
|
|
|
40
40
|
this.imageCol = null;
|
|
41
41
|
this.startCol = null;
|
|
42
42
|
this.styleCol = null;
|
|
43
|
+
this.formulaOperation = null;
|
|
44
|
+
this.formulaColumn = null;
|
|
43
45
|
this.currentDate = null;
|
|
44
46
|
this.customStyle = '';
|
|
45
47
|
this.data = null;
|
|
48
|
+
this.totals = null;
|
|
46
49
|
this.calendarColumns = {
|
|
47
50
|
[KupCalendarOptions.DATE]: '',
|
|
48
51
|
[KupCalendarOptions.DESCR]: '',
|
|
@@ -104,6 +107,8 @@ export class KupCalendar {
|
|
|
104
107
|
if (this.calendar) {
|
|
105
108
|
this.calendar.destroy();
|
|
106
109
|
}
|
|
110
|
+
// Parse formula if provided
|
|
111
|
+
this.parseFormula();
|
|
107
112
|
if ((_a = this.data) === null || _a === void 0 ? void 0 : _a.columns) {
|
|
108
113
|
this.data.columns.forEach((column) => {
|
|
109
114
|
for (const key in this.calendarColumns) {
|
|
@@ -129,6 +134,9 @@ export class KupCalendar {
|
|
|
129
134
|
}
|
|
130
135
|
this.persistState();
|
|
131
136
|
},
|
|
137
|
+
dayCellDidMount: this.formulaOperation
|
|
138
|
+
? (arg) => this.renderDayCellFormula(arg)
|
|
139
|
+
: undefined,
|
|
132
140
|
dateClick: ({ date }) => {
|
|
133
141
|
this.kupCalendarDateClick.emit({
|
|
134
142
|
comp: this,
|
|
@@ -456,6 +464,108 @@ export class KupCalendar {
|
|
|
456
464
|
this.calendar.updateSize();
|
|
457
465
|
}
|
|
458
466
|
}
|
|
467
|
+
parseFormula() {
|
|
468
|
+
this.formulaOperation = null;
|
|
469
|
+
this.formulaColumn = null;
|
|
470
|
+
if (!this.totals) {
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
const formulaRegex = /^(SUM|AVG|COUNT|MAX|MIN)\(([^)]+)\)$/i;
|
|
474
|
+
const match = this.totals.trim().match(formulaRegex);
|
|
475
|
+
if (match) {
|
|
476
|
+
this.formulaOperation = match[1].toUpperCase();
|
|
477
|
+
this.formulaColumn = match[2].trim();
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
this.kupManager.debug.logMessage(this, `Invalid totals format: ${this.totals}. Expected format: OPERATION(columnName)`, KupDebugCategory.WARNING);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
calculateFormulaForDay(date) {
|
|
484
|
+
var _a;
|
|
485
|
+
if (!this.formulaOperation || !this.formulaColumn) {
|
|
486
|
+
return null;
|
|
487
|
+
}
|
|
488
|
+
if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.rows) || !this.dateCol) {
|
|
489
|
+
return null;
|
|
490
|
+
}
|
|
491
|
+
// Get the date as ISO string (YYYY-MM-DD) for comparison
|
|
492
|
+
const targetDate = this.kupManager.dates
|
|
493
|
+
.toDayjs(date)
|
|
494
|
+
.format('YYYY-MM-DD');
|
|
495
|
+
// Filter rows for the specific day
|
|
496
|
+
const dayRows = this.data.rows.filter((row) => {
|
|
497
|
+
const cell = row.cells[this.dateCol];
|
|
498
|
+
if (!cell || !cell.value) {
|
|
499
|
+
return false;
|
|
500
|
+
}
|
|
501
|
+
const rowDate = this.kupManager.dates
|
|
502
|
+
.toDayjs(cell.value)
|
|
503
|
+
.format('YYYY-MM-DD');
|
|
504
|
+
return rowDate === targetDate;
|
|
505
|
+
});
|
|
506
|
+
if (dayRows.length === 0) {
|
|
507
|
+
return null;
|
|
508
|
+
}
|
|
509
|
+
// For COUNT operation, count all non-null values (numeric or not)
|
|
510
|
+
if (this.formulaOperation === 'COUNT') {
|
|
511
|
+
let count = 0;
|
|
512
|
+
dayRows.forEach((row) => {
|
|
513
|
+
const cell = row.cells[this.formulaColumn];
|
|
514
|
+
if (cell && cell.value !== null && cell.value !== undefined) {
|
|
515
|
+
count++;
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
return count > 0 ? count : null;
|
|
519
|
+
}
|
|
520
|
+
// For SUM and AVG, extract only numeric values
|
|
521
|
+
const values = [];
|
|
522
|
+
dayRows.forEach((row) => {
|
|
523
|
+
const cell = row.cells[this.formulaColumn];
|
|
524
|
+
if (cell && cell.value !== null && cell.value !== undefined) {
|
|
525
|
+
const numValue = parseFloat(cell.value);
|
|
526
|
+
if (!isNaN(numValue)) {
|
|
527
|
+
values.push(numValue);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
if (values.length === 0) {
|
|
532
|
+
return null;
|
|
533
|
+
}
|
|
534
|
+
// Calculate based on operation
|
|
535
|
+
switch (this.formulaOperation) {
|
|
536
|
+
case 'SUM':
|
|
537
|
+
return values.reduce((acc, val) => acc + val, 0);
|
|
538
|
+
case 'AVG':
|
|
539
|
+
return (values.reduce((acc, val) => acc + val, 0) / values.length);
|
|
540
|
+
case 'MAX':
|
|
541
|
+
return Math.max(...values);
|
|
542
|
+
case 'MIN':
|
|
543
|
+
return Math.min(...values);
|
|
544
|
+
default:
|
|
545
|
+
return null;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
renderDayCellFormula(arg) {
|
|
549
|
+
const date = arg.date;
|
|
550
|
+
const formulaResult = this.calculateFormulaForDay(date);
|
|
551
|
+
if (formulaResult !== null) {
|
|
552
|
+
// Find the day frame container
|
|
553
|
+
const dayFrame = arg.el.querySelector('.fc-daygrid-day-frame');
|
|
554
|
+
if (dayFrame) {
|
|
555
|
+
// Create formula result element
|
|
556
|
+
const resultDiv = document.createElement('div');
|
|
557
|
+
resultDiv.classList.add('kup-calendar-formula-result');
|
|
558
|
+
resultDiv.textContent = this.formatFormulaResult(formulaResult);
|
|
559
|
+
// Append to day frame
|
|
560
|
+
dayFrame.appendChild(resultDiv);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
formatFormulaResult(value) {
|
|
565
|
+
// Use KupManager to format numbers with locale-specific separators
|
|
566
|
+
const decimals = this.formulaOperation === 'COUNT' ? 0 : 2;
|
|
567
|
+
return this.kupManager.math.numberToFormattedString(value, decimals, '');
|
|
568
|
+
}
|
|
459
569
|
/*-------------------------------------------------*/
|
|
460
570
|
/* L i f e c y c l e H o o k s */
|
|
461
571
|
/*-------------------------------------------------*/
|
|
@@ -480,11 +590,11 @@ export class KupCalendar {
|
|
|
480
590
|
this.kupManager.debug.logRender(this, true);
|
|
481
591
|
}
|
|
482
592
|
render() {
|
|
483
|
-
return (h(Host, { key: '
|
|
593
|
+
return (h(Host, { key: '7998e6f8c76632a6703738efa59767e6b2bf04b6' }, h("style", { key: '48f322043b150fb757efd18b7b5f2dfbf6fff512' }, this.kupManager.theme.setKupStyle(this.rootElement)), h("div", { key: '3db3413823be3d4a49f5ebe3b7c58883f05f608d', id: componentWrapperId }, h("div", { key: 'f56ad6c224c581252e12a370a4fcb50ab2abda7c', class: "navigation" }, !this.hideNavigation ? (h("div", { class: "navigation__left" }, h(FButton, { icon: "chevron_left", onClick: () => this.onPrev(), title: this.kupManager.language.translate(KupLanguageGeneric.PREVIOUS), wrapperClass: "navigation__prev" }), h(FButton, { icon: "calendar", onClick: () => this.onToday(), title: this.kupManager.language.translate(KupLanguageGeneric.TODAY), wrapperClass: "navigation__today" }), h(FButton, { icon: "chevron_right", onClick: () => this.onNext(), title: this.kupManager.language.translate(KupLanguageGeneric.NEXT), wrapperClass: "navigation__next" }))) : null, h("div", { key: '443d8e7206c9244c5c5fc2d1584d495d26265c03', class: `navigation__title ${this.hideNavigation
|
|
484
594
|
? 'navigation__title--centered'
|
|
485
595
|
: ''}`, ref: (el) => {
|
|
486
596
|
this.navTitle = el;
|
|
487
|
-
} }), h("div", { key: '
|
|
597
|
+
} }), h("div", { key: '48bc7f6e9fbe40cccea4599ee9df5b9b2b1bfa3c', class: "navigation__right" }, this.enableChangeView ? (h(FChip, Object.assign({}, this.setChipProps()))) : null)), h("div", { key: '94cee398522dd36799665989b52d4c75fd77ca1d', class: "calendar", ref: (el) => (this.calendarContainer = el) }))));
|
|
488
598
|
}
|
|
489
599
|
disconnectedCallback() {
|
|
490
600
|
if (this.calendar) {
|
|
@@ -579,6 +689,27 @@ export class KupCalendar {
|
|
|
579
689
|
},
|
|
580
690
|
"defaultValue": "null"
|
|
581
691
|
},
|
|
692
|
+
"totals": {
|
|
693
|
+
"type": "string",
|
|
694
|
+
"mutable": false,
|
|
695
|
+
"complexType": {
|
|
696
|
+
"original": "string",
|
|
697
|
+
"resolved": "string",
|
|
698
|
+
"references": {}
|
|
699
|
+
},
|
|
700
|
+
"required": false,
|
|
701
|
+
"optional": false,
|
|
702
|
+
"docs": {
|
|
703
|
+
"tags": [{
|
|
704
|
+
"name": "default",
|
|
705
|
+
"text": "null"
|
|
706
|
+
}],
|
|
707
|
+
"text": "Formula to calculate and display totals on each cell.\r\nFormat: OPERATION(columnName) where OPERATION is SUM, AVG, COUNT, MAX, or MIN.\r\nExample: \"SUM(amount)\" or \"AVG(hours)\" or \"COUNT(tasks)\" or \"MAX(price)\" or \"MIN(price)\""
|
|
708
|
+
},
|
|
709
|
+
"attribute": "totals",
|
|
710
|
+
"reflect": false,
|
|
711
|
+
"defaultValue": "null"
|
|
712
|
+
},
|
|
582
713
|
"calendarColumns": {
|
|
583
714
|
"type": "unknown",
|
|
584
715
|
"mutable": false,
|
|
@@ -950,6 +1081,9 @@ export class KupCalendar {
|
|
|
950
1081
|
}, {
|
|
951
1082
|
"propName": "currentDate",
|
|
952
1083
|
"methodName": "setCalendarData"
|
|
1084
|
+
}, {
|
|
1085
|
+
"propName": "totals",
|
|
1086
|
+
"methodName": "setCalendarData"
|
|
953
1087
|
}];
|
|
954
1088
|
}
|
|
955
1089
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-ef8cbd35.js';
|
|
2
|
-
import { K as KupManager } from './p-
|
|
2
|
+
import { K as KupManager } from './p-41c8d9eb.js';
|
|
3
3
|
|
|
4
4
|
/** used for obtain a KupManager instance without a dom document (for UT) */
|
|
5
5
|
function newKupManager(init) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-ef8cbd35.js';
|
|
2
|
-
import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeIconValues, c as KupThemeColorValues, d as KupDynamicPositionPlacement } from './p-
|
|
3
|
-
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v } from './p-
|
|
2
|
+
import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeIconValues, c as KupThemeColorValues, d as KupDynamicPositionPlacement } from './p-41c8d9eb.js';
|
|
3
|
+
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v } from './p-4f899661.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Props of the kup-accordion component.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, F as Fragment, d as Host } from './p-ef8cbd35.js';
|
|
2
|
-
import { k as kupManagerInstance, g as getProps, s as setProps, u as KupDebugCategory, n as getCellValueForDisplay } from './p-
|
|
3
|
-
import { c as componentWrapperId, G as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v, F as FImage } from './p-
|
|
2
|
+
import { k as kupManagerInstance, g as getProps, s as setProps, u as KupDebugCategory, n as getCellValueForDisplay } from './p-41c8d9eb.js';
|
|
3
|
+
import { c as componentWrapperId, G as sortRows, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v, F as FImage } from './p-4f899661.js';
|
|
4
4
|
|
|
5
5
|
var KupActivityTimelineProps;
|
|
6
6
|
(function (KupActivityTimelineProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as KupAutocomplete$1, E as defineCustomElement$1 } from './p-
|
|
1
|
+
import { K as KupAutocomplete$1, E as defineCustomElement$1 } from './p-4f899661.js';
|
|
2
2
|
|
|
3
3
|
const KupAutocomplete = KupAutocomplete$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H as H$2, c as createEvent, f as forceUpdate, h as h$1, d as Host } from './p-ef8cbd35.js';
|
|
2
|
-
import { k as kupManagerInstance, g as getProps, s as setProps, e as KupLanguageGeneric, L as getColumnByName, u as KupDebugCategory } from './p-
|
|
3
|
-
import { c as componentWrapperId, U as FButton, P as FChip, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v, V as FChipType } from './p-
|
|
2
|
+
import { k as kupManagerInstance, g as getProps, s as setProps, e as KupLanguageGeneric, L as getColumnByName, u as KupDebugCategory } from './p-41c8d9eb.js';
|
|
3
|
+
import { c as componentWrapperId, U as FButton, P as FChip, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v, V as FChipType } from './p-4f899661.js';
|
|
4
4
|
import { b as KupDatesLocales, K as KupDatesFormats } from './p-d7365aa4.js';
|
|
5
5
|
|
|
6
6
|
var n,l$1,u$1,i$1,t,r$1,o,f$1,e$1,c$1={},s=[],a$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y(l,u,i){var t,r,o,f={};for(o in u)"key"==o?t=u[o]:"ref"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,t,r,null)}function p(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u$1:o};return null==o&&null!=l$1.vnode&&l$1.vnode(f),f}function d(){return {current:null}}function _(n){return n.children}function k$1(n,l,u,i,t){var r;for(r in u)"children"===r||"key"===r||r in l||g$2(n,r,null,u[r],i);for(r in l)t&&"function"!=typeof l[r]||"children"===r||"key"===r||"value"===r||"checked"===r||u[r]===l[r]||g$2(n,r,l[r],u[r],i);}function b$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$1.test(l)?u:u+"px";}function g$2(n,l,u,i,t){var r;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||b$1(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||b$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])r=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?w$2:m$1,r):n.removeEventListener(l,r?w$2:m$1,r);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function m$1(n){t=!0;try{return this.l[n.type+!1](l$1.event?l$1.event(n):n)}finally{t=!1;}}function w$2(n){t=!0;try{return this.l[n.type+!0](l$1.event?l$1.event(n):n)}finally{t=!1;}}function x$1(n,l){this.props=n,this.context=l;}function A(n,l){if(null==l)return n.__?A(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?A(n):null}function P$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return P$1(n)}}function C$1(n){t?setTimeout(n):f$1(n);}function T$1(n){(!n.__d&&(n.__d=!0)&&r$1.push(n)&&!$$1.__r++||o!==l$1.debounceRendering)&&((o=l$1.debounceRendering)||C$1)($$1);}function $$1(){var n,l,u,i,t,o,f,e;for(r$1.sort(function(n,l){return n.__v.__b-l.__v.__b});n=r$1.shift();)n.__d&&(l=r$1.length,i=void 0,t=void 0,f=(o=(u=n).__v).__e,(e=u.__P)&&(i=[],(t=h({},o)).__v=o.__v+1,M(e,o,t,u.__n,void 0!==e.ownerSVGElement,null!=o.__h?[f]:null,i,null==f?A(o):f,o.__h),N(i,o),o.__e!=f&&P$1(o)),r$1.length>l&&r$1.sort(function(n,l){return n.__v.__b-l.__v.__b}));$$1.__r=0;}function H$1(n,l,u,i,t,r,o,f,e,a){var h,v,y,d,k,b,g,m=i&&i.__k||s,w=m.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(d=u.__k[h]=null==(d=l[h])||"boolean"==typeof d?null:"string"==typeof d||"number"==typeof d||"bigint"==typeof d?p(null,d,null,null,d):Array.isArray(d)?p(_,{children:d},null,null,null):d.__b>0?p(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=u,d.__b=u.__b+1,null===(y=m[h])||y&&d.key==y.key&&d.type===y.type)m[h]=void 0;else for(v=0;v<w;v++){if((y=m[v])&&d.key==y.key&&d.type===y.type){m[v]=void 0;break}y=null;}M(n,d,y=y||c$1,t,r,o,f,e,a),k=d.__e,(v=d.ref)&&y.ref!=v&&(g||(g=[]),y.ref&&g.push(y.ref,null,d),g.push(v,d.__c||k,d)),null!=k?(null==b&&(b=k),"function"==typeof d.type&&d.__k===y.__k?d.__d=e=I$1(d,e,n):e=z$1(n,d,y,m,k,e),"function"==typeof u.type&&(u.__d=e)):e&&y.__e==e&&e.parentNode!=n&&(e=A(y));}for(u.__e=b,h=w;h--;)null!=m[h]&&("function"==typeof u.type&&null!=m[h].__e&&m[h].__e==u.__d&&(u.__d=L$1(i).nextSibling),q(m[h],m[h]));if(g)for(h=0;h<g.length;h++)S(g[h],g[++h],g[++h]);}function I$1(n,l,u){for(var i,t=n.__k,r=0;t&&r<t.length;r++)(i=t[r])&&(i.__=n,l="function"==typeof i.type?I$1(i,l,u):z$1(u,i,i,t,i.__e,l));return l}function j$2(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){j$2(n,l);}):l.push(n)),l}function z$1(n,l,u,i,t,r){var o,f,e;if(void 0!==l.__d)o=l.__d,l.__d=void 0;else if(null==u||t!=r||null==t.parentNode)n:if(null==r||r.parentNode!==n)n.appendChild(t),o=null;else {for(f=r,e=0;(f=f.nextSibling)&&e<i.length;e+=1)if(f==t)break n;n.insertBefore(t,r),o=r;}return void 0!==o?o:t.nextSibling}function L$1(n){var l,u,i;if(null==n.type||"string"==typeof n.type)return n.__e;if(n.__k)for(l=n.__k.length-1;l>=0;l--)if((u=n.__k[l])&&(i=L$1(u)))return i;return null}function M(n,u,i,t,r,o,f,e,c){var s,a,v,y,p,d,k,b,g,m,w,A,P,C,T,$=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l$1.__b)&&s(u);try{n:if("function"==typeof $){if(b=u.props,g=(s=$.contextType)&&t[s.__c],m=s?g?g.props.value:s.__:t,i.__c?k=(a=u.__c=i.__c).__=a.__E:("prototype"in $&&$.prototype.render?u.__c=a=new $(b,m):(u.__c=a=new x$1(b,m),a.constructor=$,a.render=B$1),g&&g.sub(a),a.props=b,a.state||(a.state={}),a.context=m,a.__n=t,v=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=$.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,$.getDerivedStateFromProps(b,a.__s))),y=a.props,p=a.state,a.__v=u,v)null==$.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else {if(null==$.getDerivedStateFromProps&&b!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(b,m),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(b,a.__s,m)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=b,a.state=a.__s,a.__d=!1),u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),w=0;w<a._sb.length;w++)a.__h.push(a._sb[w]);a._sb=[],a.__h.length&&f.push(a);break n}null!=a.componentWillUpdate&&a.componentWillUpdate(b,a.__s,m),null!=a.componentDidUpdate&&a.__h.push(function(){a.componentDidUpdate(y,p,d);});}if(a.context=m,a.props=b,a.__P=n,A=l$1.__r,P=0,"prototype"in $&&$.prototype.render){for(a.state=a.__s,a.__d=!1,A&&A(u),s=a.render(a.props,a.state,a.context),C=0;C<a._sb.length;C++)a.__h.push(a._sb[C]);a._sb=[];}else do{a.__d=!1,A&&A(u),s=a.render(a.props,a.state,a.context),a.state=a.__s;}while(a.__d&&++P<25);a.state=a.__s,null!=a.getChildContext&&(t=h(h({},t),a.getChildContext())),v||null==a.getSnapshotBeforeUpdate||(d=a.getSnapshotBeforeUpdate(y,p)),T=null!=s&&s.type===_&&null==s.key?s.props.children:s,H$1(n,Array.isArray(T)?T:[T],u,i,t,r,o,f,e,c),a.base=u.__e,u.__h=null,a.__h.length&&f.push(a),k&&(a.__E=a.__=null),a.__e=!1;}else null==o&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=O(i.__e,u,i,t,r,o,f,c);(s=l$1.diffed)&&s(u);}catch(n){u.__v=null,(c||null!=o)&&(u.__e=e,u.__h=!!c,o[o.indexOf(e)]=null),l$1.__e(n,u,i);}}function N(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function O(l,u,i,t,r,o,f,e){var s,a,h,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(r=!0),null!=o)for(;_<o.length;_++)if((s=o[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,o[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=r?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),o=null,e=!1;}if(null===d)y===p||e&&l.data===p||(l.data=p);else {if(o=o&&n.call(l.childNodes),a=(y=i.props||c$1).dangerouslySetInnerHTML,h=p.dangerouslySetInnerHTML,!e){if(null!=o)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(h||a)&&(h&&(a&&h.__html==a.__html||h.__html===l.innerHTML)||(l.innerHTML=h&&h.__html||""));}if(k$1(l,p,y,r,e),h)u.__k=[];else if(_=u.props.children,H$1(l,Array.isArray(_)?_:[_],u,i,t,r&&"foreignObject"!==d,o,f,o?o[0]:i.__k&&A(i,0),e),null!=o)for(_=o.length;_--;)null!=o[_]&&v$1(o[_]);e||("value"in p&&void 0!==(_=p.value)&&(_!==l.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&g$2(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&g$2(l,"checked",_,y.checked,!1));}return l}function S(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function q(n,u,i){var t,r;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||S(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(r=0;r<t.length;r++)t[r]&&q(t[r],u,i||"function"!=typeof n.type);i||null==n.__e||v$1(n.__e),n.__=n.__e=n.__d=void 0;}function B$1(n,l,u){return this.constructor(n,u)}function D$1(u,i,t){var r,o,f;l$1.__&&l$1.__(u,i),o=(r="function"==typeof t)?null:t&&t.__k||i.__k,f=[],M(i,u=(!r&&t||i).__k=y(_,null,[u]),o||c$1,c$1,void 0!==i.ownerSVGElement,!r&&t?[t]:o?null:i.firstChild?n.call(i.childNodes):null,f,!r&&t?t:o?o.__e:i.firstChild,r),N(f,u);}function G$1(n,l){var u={__c:l="__cC"+e$1++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,T$1(n);});},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n);};}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l$1={__e:function(n,l,u,i){for(var t,r,o;l=l.__;)if((t=l.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(n)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),o=t.__d),o)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,i$1=function(n){return null!=n&&void 0===n.constructor},t=!1,x$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),T$1(this));},x$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),T$1(this));},x$1.prototype.render=_,r$1=[],f$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$$1.__r=0,e$1=0;
|
|
@@ -14764,6 +14764,7 @@ var KupCalendarProps;
|
|
|
14764
14764
|
KupCalendarProps["currentDate"] = "Sets the date of the calendar. Must be in ISO format (YYYY-MM-DD).";
|
|
14765
14765
|
KupCalendarProps["customStyle"] = "Custom style of the component.";
|
|
14766
14766
|
KupCalendarProps["data"] = "Actual data of the calendar.";
|
|
14767
|
+
KupCalendarProps["totals"] = "Formula to calculate and display totals on each cell. Format: OPERATION(columnName) where OPERATION is SUM, AVG, COUNT, MAX, or MIN.";
|
|
14767
14768
|
KupCalendarProps["editableEvents"] = "When true, events are editable.";
|
|
14768
14769
|
KupCalendarProps["hideNavigation"] = "When disabled, the navigation toolbar won't be displayed.";
|
|
14769
14770
|
KupCalendarProps["viewType"] = "Type of the view.";
|
|
@@ -14799,7 +14800,7 @@ class KupCalendarState {
|
|
|
14799
14800
|
}
|
|
14800
14801
|
}
|
|
14801
14802
|
|
|
14802
|
-
const kupCalendarCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_calendar_background_color:var(\n --kup-calendar-background-color,\n var(--kup-layer-1)\n );--kup_calendar_border_color:var(\n --kup-calendar-border-color,\n var(--kup-border-subtle)\n );--kup_calendar_event_background_color:var(\n --kup-calendar-event-background-color,\n var(--kup-gray-color-30)\n );--kup_calendar_event_border_radius:var(\n --kup-calendar-event-border-radius,\n 4px\n );--kup_calendar_event_color:var(\n --kup-calendar-event-color,\n var(--kup-text-secondary)\n );--kup_calendar_font_family:var(\n --kup-calendar-font-family,\n var(--kup-font-family)\n );--kup_calendar_font_size:var(--kup-calendar-font-size, var(--kup-font-size));--kup_calendar_header_background_color:var(\n --kup-calendar-header-background-color,\n var(--kup-layer-2)\n );--kup_calendar_header_color:var(\n --kup-calendar-header-color,\n var(--kup-text-secondary)\n );--kup_calendar_navigator_border:var(\n --kup-calendar-navigator-border,\n 1px solid var(--kup-border-subtle)\n );--kup_calendar_no_work_day_background_color:var(\n --kup-calendar-no-work-day-background-color,\n var(--kup-layer-0)\n );--kup_calendar_no_work_day_color:var(\n --kup-calendar-no-work-day-color,\n var(--kup-text-secondary)\n );--kup_calendar_today_background_color:var(\n --kup-calendar-today-background-color,\n var(--kup-layer-2)\n );--kup_calendar_border_top_color:var(\n --kup-calendar-border-top-color,\n var(--kup-border-interactive)\n );--fc-border-color:var(--kup_calendar_border_color);background-color:var(--kup_calendar_background_color);display:block;font-family:var(--kup_calendar_font_family);font-size:var(--kup_calendar_font_size);height:100%;width:100%}.navigation{align-items:center;display:flex;justify-content:space-between;background-color:var(--kup_calendar_background_color)}.navigation__left{--kup-font-size:0.875em;display:flex;margin-left:var(--kup-space-03)}.navigation__right{display:flex;margin-right:var(--kup-space-03)}.navigation__title{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0;margin:0px;padding:0px 0.5em}.navigation__title--centered{padding:0.35em 0;text-align:center;width:100%}.icon-wrapper{display:flex;justify-content:flex-end;flex-wrap:wrap}.image-wrapper{display:flex;justify-content:space-between;flex-wrap:wrap}.image-wrapper img{width:20px;height:20px}.custom-icon{background-color:var(--kup_calendar_event_color);height:1.5em;width:1.5em}#kup-component .fc-toolbar.fc-header-toolbar{margin-top:1.5rem}#kup-component .fc-ltr .fc-dayGrid-view .fc-day-top{text-align:center;padding:0.5rem}#kup-component .fc-ltr .fc-dayGrid-view .fc-day-top .fc-day-number{float:none}#kup-component .fc-content{padding:0.25rem}#kup-component .fc-event-title{white-space:normal;word-break:break-word}#kup-component .fc-content,#kup-component .fc-divider,#kup-component .fc-list-heading td,#kup-component .fc-list-view,#kup-component .fc-popover,#kup-component .fc-row,#kup-component .fc-scrollgrid,#kup-component tbody,#kup-component td{border-color:var(--kup_calendar_border_color)}#kup-component .fc-col-header-cell{background:var(--kup_calendar_header_background_color);color:var(--kup_calendar_header_color)}#kup-component .fc-h-event{background:none;border:none}#kup-component .fc-list-event-dot{border-color:var(--kup_calendar_event_background_color)}#kup-component .fc-list-day-cushion{background:var(--kup_calendar_header_background_color);color:var(--kup_calendar_header_color);font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}#kup-component .fc-list-event:hover td{background:var(--kup-hover-background-color);color:var(--kup-hover-color)}#kup-component .fc-daygrid-event,#kup-component .fc-timegrid-event{background:var(--kup_calendar_event_background_color);border:none;border-color:var(--kup_calendar_event_background_color);color:var(--kup_calendar_event_color)}#kup-component .fc-event{padding:0.5rem}#kup-component .fc-event-main{color:inherit;display:flex}#kup-component .fc-event-title .fc-event-time{padding:0.25em}#kup-component .fc-event-time{white-space:pre}#kup-component td.fc-day-today{background-color:var(--kup_calendar_today_background_color);border-top:2px solid var(--kup_calendar_border_top_color)}#kup-component td.fc-day-sun,#kup-component td.fc-day-sat{background-color:var(--kup_calendar_no_work_day_background_color);color:var(--kup_calendar_no_work_day_color);opacity:0.7}@media (max-width: 599px){.navigation{flex-direction:column}.calendar{height:100%}.calendar .fc-view-harness{min-height:450px}.fc-event{display:flex;flex-direction:column;padding:0.2rem;gap:var(--kup-space-03)}.fc-event .fc-event-main{display:flex;flex-direction:column}.fc-event .fc-daygrid-event-dot{display:none}.navigation .navigation__left{font-size:20px;gap:8px}.navigation .navigation__right .f-chip .chip-set .chip-set__item{font-size:16px}}@media (min-width: 599px){#kup-component .fc-daygrid-event{align-items:baseline;white-space:pre-line}}";
|
|
14803
|
+
const kupCalendarCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_calendar_background_color:var(\n --kup-calendar-background-color,\n var(--kup-layer-1)\n );--kup_calendar_border_color:var(\n --kup-calendar-border-color,\n var(--kup-border-subtle)\n );--kup_calendar_event_background_color:var(\n --kup-calendar-event-background-color,\n var(--kup-gray-color-30)\n );--kup_calendar_event_border_radius:var(\n --kup-calendar-event-border-radius,\n 4px\n );--kup_calendar_event_color:var(\n --kup-calendar-event-color,\n var(--kup-text-secondary)\n );--kup_calendar_font_family:var(\n --kup-calendar-font-family,\n var(--kup-font-family)\n );--kup_calendar_font_size:var(--kup-calendar-font-size, var(--kup-font-size));--kup_calendar_header_background_color:var(\n --kup-calendar-header-background-color,\n var(--kup-layer-2)\n );--kup_calendar_header_color:var(\n --kup-calendar-header-color,\n var(--kup-text-secondary)\n );--kup_calendar_navigator_border:var(\n --kup-calendar-navigator-border,\n 1px solid var(--kup-border-subtle)\n );--kup_calendar_no_work_day_background_color:var(\n --kup-calendar-no-work-day-background-color,\n var(--kup-layer-0)\n );--kup_calendar_no_work_day_color:var(\n --kup-calendar-no-work-day-color,\n var(--kup-text-secondary)\n );--kup_calendar_today_background_color:var(\n --kup-calendar-today-background-color,\n var(--kup-layer-2)\n );--kup_calendar_border_top_color:var(\n --kup-calendar-border-top-color,\n var(--kup-border-interactive)\n );--fc-border-color:var(--kup_calendar_border_color);background-color:var(--kup_calendar_background_color);display:block;font-family:var(--kup_calendar_font_family);font-size:var(--kup_calendar_font_size);height:100%;width:100%}.navigation{align-items:center;display:flex;justify-content:space-between;background-color:var(--kup_calendar_background_color)}.navigation__left{--kup-font-size:0.875em;display:flex;margin-left:var(--kup-space-03)}.navigation__right{display:flex;margin-right:var(--kup-space-03)}.navigation__title{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0;margin:0px;padding:0px 0.5em}.navigation__title--centered{padding:0.35em 0;text-align:center;width:100%}.icon-wrapper{display:flex;justify-content:flex-end;flex-wrap:wrap}.image-wrapper{display:flex;justify-content:space-between;flex-wrap:wrap}.image-wrapper img{width:20px;height:20px}.custom-icon{background-color:var(--kup_calendar_event_color);height:1.5em;width:1.5em}#kup-component .fc-toolbar.fc-header-toolbar{margin-top:1.5rem}#kup-component .fc-ltr .fc-dayGrid-view .fc-day-top{text-align:center;padding:0.5rem}#kup-component .fc-ltr .fc-dayGrid-view .fc-day-top .fc-day-number{float:none}#kup-component .fc-content{padding:0.25rem}#kup-component .fc-event-title{white-space:normal;word-break:break-word}#kup-component .fc-content,#kup-component .fc-divider,#kup-component .fc-list-heading td,#kup-component .fc-list-view,#kup-component .fc-popover,#kup-component .fc-row,#kup-component .fc-scrollgrid,#kup-component tbody,#kup-component td{border-color:var(--kup_calendar_border_color)}#kup-component .fc-col-header-cell{background:var(--kup_calendar_header_background_color);color:var(--kup_calendar_header_color)}#kup-component .fc-h-event{background:none;border:none}#kup-component .fc-list-event-dot{border-color:var(--kup_calendar_event_background_color)}#kup-component .fc-list-day-cushion{background:var(--kup_calendar_header_background_color);color:var(--kup_calendar_header_color);font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}#kup-component .fc-list-event:hover td{background:var(--kup-hover-background-color);color:var(--kup-hover-color)}#kup-component .fc-daygrid-event,#kup-component .fc-timegrid-event{background:var(--kup_calendar_event_background_color);border:none;border-color:var(--kup_calendar_event_background_color);color:var(--kup_calendar_event_color)}#kup-component .fc-event{padding:0.5rem}#kup-component .fc-event-main{color:inherit;display:flex}#kup-component .fc-event-title .fc-event-time{padding:0.25em}#kup-component .fc-event-time{white-space:pre}#kup-component td.fc-day-today{background-color:var(--kup_calendar_today_background_color);border-top:2px solid var(--kup_calendar_border_top_color)}#kup-component td.fc-day-sun,#kup-component td.fc-day-sat{background-color:var(--kup_calendar_no_work_day_background_color);color:var(--kup_calendar_no_work_day_color);opacity:0.7}#kup-component .fc-daygrid-day-frame{display:flex;flex-direction:column;min-height:100%}#kup-component .fc-daygrid-day-events{flex:1}#kup-component .kup-calendar-formula-result{align-self:flex-end;font-size:0.85em;font-weight:bold;color:var(--kup-primary-color);padding:0.25em 0.5em;margin-top:auto}#kup-component .fc-daygrid-day-top{width:100%}@media (max-width: 599px){.navigation{flex-direction:column}.calendar{height:100%}.calendar .fc-view-harness{min-height:450px}.fc-event{display:flex;flex-direction:column;padding:0.2rem;gap:var(--kup-space-03)}.fc-event .fc-event-main{display:flex;flex-direction:column}.fc-event .fc-daygrid-event-dot{display:none}.navigation .navigation__left{font-size:20px;gap:8px}.navigation .navigation__right .f-chip .chip-set .chip-set__item{font-size:16px}}@media (min-width: 599px){#kup-component .fc-daygrid-event{align-items:baseline;white-space:pre-line}}";
|
|
14803
14804
|
const KupCalendarStyle0 = kupCalendarCss;
|
|
14804
14805
|
|
|
14805
14806
|
const KupCalendar$1 = /*@__PURE__*/ proxyCustomElement(class KupCalendar extends H$2 {
|
|
@@ -14827,9 +14828,12 @@ const KupCalendar$1 = /*@__PURE__*/ proxyCustomElement(class KupCalendar extends
|
|
|
14827
14828
|
this.imageCol = null;
|
|
14828
14829
|
this.startCol = null;
|
|
14829
14830
|
this.styleCol = null;
|
|
14831
|
+
this.formulaOperation = null;
|
|
14832
|
+
this.formulaColumn = null;
|
|
14830
14833
|
this.currentDate = null;
|
|
14831
14834
|
this.customStyle = '';
|
|
14832
14835
|
this.data = null;
|
|
14836
|
+
this.totals = null;
|
|
14833
14837
|
this.calendarColumns = {
|
|
14834
14838
|
[KupCalendarOptions.DATE]: '',
|
|
14835
14839
|
[KupCalendarOptions.DESCR]: '',
|
|
@@ -14891,6 +14895,8 @@ const KupCalendar$1 = /*@__PURE__*/ proxyCustomElement(class KupCalendar extends
|
|
|
14891
14895
|
if (this.calendar) {
|
|
14892
14896
|
this.calendar.destroy();
|
|
14893
14897
|
}
|
|
14898
|
+
// Parse formula if provided
|
|
14899
|
+
this.parseFormula();
|
|
14894
14900
|
if ((_a = this.data) === null || _a === void 0 ? void 0 : _a.columns) {
|
|
14895
14901
|
this.data.columns.forEach((column) => {
|
|
14896
14902
|
for (const key in this.calendarColumns) {
|
|
@@ -14916,6 +14922,9 @@ const KupCalendar$1 = /*@__PURE__*/ proxyCustomElement(class KupCalendar extends
|
|
|
14916
14922
|
}
|
|
14917
14923
|
this.persistState();
|
|
14918
14924
|
},
|
|
14925
|
+
dayCellDidMount: this.formulaOperation
|
|
14926
|
+
? (arg) => this.renderDayCellFormula(arg)
|
|
14927
|
+
: undefined,
|
|
14919
14928
|
dateClick: ({ date }) => {
|
|
14920
14929
|
this.kupCalendarDateClick.emit({
|
|
14921
14930
|
comp: this,
|
|
@@ -15243,6 +15252,108 @@ const KupCalendar$1 = /*@__PURE__*/ proxyCustomElement(class KupCalendar extends
|
|
|
15243
15252
|
this.calendar.updateSize();
|
|
15244
15253
|
}
|
|
15245
15254
|
}
|
|
15255
|
+
parseFormula() {
|
|
15256
|
+
this.formulaOperation = null;
|
|
15257
|
+
this.formulaColumn = null;
|
|
15258
|
+
if (!this.totals) {
|
|
15259
|
+
return;
|
|
15260
|
+
}
|
|
15261
|
+
const formulaRegex = /^(SUM|AVG|COUNT|MAX|MIN)\(([^)]+)\)$/i;
|
|
15262
|
+
const match = this.totals.trim().match(formulaRegex);
|
|
15263
|
+
if (match) {
|
|
15264
|
+
this.formulaOperation = match[1].toUpperCase();
|
|
15265
|
+
this.formulaColumn = match[2].trim();
|
|
15266
|
+
}
|
|
15267
|
+
else {
|
|
15268
|
+
this.kupManager.debug.logMessage(this, `Invalid totals format: ${this.totals}. Expected format: OPERATION(columnName)`, KupDebugCategory.WARNING);
|
|
15269
|
+
}
|
|
15270
|
+
}
|
|
15271
|
+
calculateFormulaForDay(date) {
|
|
15272
|
+
var _a;
|
|
15273
|
+
if (!this.formulaOperation || !this.formulaColumn) {
|
|
15274
|
+
return null;
|
|
15275
|
+
}
|
|
15276
|
+
if (!((_a = this.data) === null || _a === void 0 ? void 0 : _a.rows) || !this.dateCol) {
|
|
15277
|
+
return null;
|
|
15278
|
+
}
|
|
15279
|
+
// Get the date as ISO string (YYYY-MM-DD) for comparison
|
|
15280
|
+
const targetDate = this.kupManager.dates
|
|
15281
|
+
.toDayjs(date)
|
|
15282
|
+
.format('YYYY-MM-DD');
|
|
15283
|
+
// Filter rows for the specific day
|
|
15284
|
+
const dayRows = this.data.rows.filter((row) => {
|
|
15285
|
+
const cell = row.cells[this.dateCol];
|
|
15286
|
+
if (!cell || !cell.value) {
|
|
15287
|
+
return false;
|
|
15288
|
+
}
|
|
15289
|
+
const rowDate = this.kupManager.dates
|
|
15290
|
+
.toDayjs(cell.value)
|
|
15291
|
+
.format('YYYY-MM-DD');
|
|
15292
|
+
return rowDate === targetDate;
|
|
15293
|
+
});
|
|
15294
|
+
if (dayRows.length === 0) {
|
|
15295
|
+
return null;
|
|
15296
|
+
}
|
|
15297
|
+
// For COUNT operation, count all non-null values (numeric or not)
|
|
15298
|
+
if (this.formulaOperation === 'COUNT') {
|
|
15299
|
+
let count = 0;
|
|
15300
|
+
dayRows.forEach((row) => {
|
|
15301
|
+
const cell = row.cells[this.formulaColumn];
|
|
15302
|
+
if (cell && cell.value !== null && cell.value !== undefined) {
|
|
15303
|
+
count++;
|
|
15304
|
+
}
|
|
15305
|
+
});
|
|
15306
|
+
return count > 0 ? count : null;
|
|
15307
|
+
}
|
|
15308
|
+
// For SUM and AVG, extract only numeric values
|
|
15309
|
+
const values = [];
|
|
15310
|
+
dayRows.forEach((row) => {
|
|
15311
|
+
const cell = row.cells[this.formulaColumn];
|
|
15312
|
+
if (cell && cell.value !== null && cell.value !== undefined) {
|
|
15313
|
+
const numValue = parseFloat(cell.value);
|
|
15314
|
+
if (!isNaN(numValue)) {
|
|
15315
|
+
values.push(numValue);
|
|
15316
|
+
}
|
|
15317
|
+
}
|
|
15318
|
+
});
|
|
15319
|
+
if (values.length === 0) {
|
|
15320
|
+
return null;
|
|
15321
|
+
}
|
|
15322
|
+
// Calculate based on operation
|
|
15323
|
+
switch (this.formulaOperation) {
|
|
15324
|
+
case 'SUM':
|
|
15325
|
+
return values.reduce((acc, val) => acc + val, 0);
|
|
15326
|
+
case 'AVG':
|
|
15327
|
+
return (values.reduce((acc, val) => acc + val, 0) / values.length);
|
|
15328
|
+
case 'MAX':
|
|
15329
|
+
return Math.max(...values);
|
|
15330
|
+
case 'MIN':
|
|
15331
|
+
return Math.min(...values);
|
|
15332
|
+
default:
|
|
15333
|
+
return null;
|
|
15334
|
+
}
|
|
15335
|
+
}
|
|
15336
|
+
renderDayCellFormula(arg) {
|
|
15337
|
+
const date = arg.date;
|
|
15338
|
+
const formulaResult = this.calculateFormulaForDay(date);
|
|
15339
|
+
if (formulaResult !== null) {
|
|
15340
|
+
// Find the day frame container
|
|
15341
|
+
const dayFrame = arg.el.querySelector('.fc-daygrid-day-frame');
|
|
15342
|
+
if (dayFrame) {
|
|
15343
|
+
// Create formula result element
|
|
15344
|
+
const resultDiv = document.createElement('div');
|
|
15345
|
+
resultDiv.classList.add('kup-calendar-formula-result');
|
|
15346
|
+
resultDiv.textContent = this.formatFormulaResult(formulaResult);
|
|
15347
|
+
// Append to day frame
|
|
15348
|
+
dayFrame.appendChild(resultDiv);
|
|
15349
|
+
}
|
|
15350
|
+
}
|
|
15351
|
+
}
|
|
15352
|
+
formatFormulaResult(value) {
|
|
15353
|
+
// Use KupManager to format numbers with locale-specific separators
|
|
15354
|
+
const decimals = this.formulaOperation === 'COUNT' ? 0 : 2;
|
|
15355
|
+
return this.kupManager.math.numberToFormattedString(value, decimals, '');
|
|
15356
|
+
}
|
|
15246
15357
|
/*-------------------------------------------------*/
|
|
15247
15358
|
/* L i f e c y c l e H o o k s */
|
|
15248
15359
|
/*-------------------------------------------------*/
|
|
@@ -15267,11 +15378,11 @@ const KupCalendar$1 = /*@__PURE__*/ proxyCustomElement(class KupCalendar extends
|
|
|
15267
15378
|
this.kupManager.debug.logRender(this, true);
|
|
15268
15379
|
}
|
|
15269
15380
|
render() {
|
|
15270
|
-
return (h$1(Host, { key: '
|
|
15381
|
+
return (h$1(Host, { key: '7998e6f8c76632a6703738efa59767e6b2bf04b6' }, h$1("style", { key: '48f322043b150fb757efd18b7b5f2dfbf6fff512' }, this.kupManager.theme.setKupStyle(this.rootElement)), h$1("div", { key: '3db3413823be3d4a49f5ebe3b7c58883f05f608d', id: componentWrapperId }, h$1("div", { key: 'f56ad6c224c581252e12a370a4fcb50ab2abda7c', class: "navigation" }, !this.hideNavigation ? (h$1("div", { class: "navigation__left" }, h$1(FButton, { icon: "chevron_left", onClick: () => this.onPrev(), title: this.kupManager.language.translate(KupLanguageGeneric.PREVIOUS), wrapperClass: "navigation__prev" }), h$1(FButton, { icon: "calendar", onClick: () => this.onToday(), title: this.kupManager.language.translate(KupLanguageGeneric.TODAY), wrapperClass: "navigation__today" }), h$1(FButton, { icon: "chevron_right", onClick: () => this.onNext(), title: this.kupManager.language.translate(KupLanguageGeneric.NEXT), wrapperClass: "navigation__next" }))) : null, h$1("div", { key: '443d8e7206c9244c5c5fc2d1584d495d26265c03', class: `navigation__title ${this.hideNavigation
|
|
15271
15382
|
? 'navigation__title--centered'
|
|
15272
15383
|
: ''}`, ref: (el) => {
|
|
15273
15384
|
this.navTitle = el;
|
|
15274
|
-
} }), h$1("div", { key: '
|
|
15385
|
+
} }), h$1("div", { key: '48bc7f6e9fbe40cccea4599ee9df5b9b2b1bfa3c', class: "navigation__right" }, this.enableChangeView ? (h$1(FChip, Object.assign({}, this.setChipProps()))) : null)), h$1("div", { key: '94cee398522dd36799665989b52d4c75fd77ca1d', class: "calendar", ref: (el) => (this.calendarContainer = el) }))));
|
|
15275
15386
|
}
|
|
15276
15387
|
disconnectedCallback() {
|
|
15277
15388
|
if (this.calendar) {
|
|
@@ -15285,13 +15396,15 @@ const KupCalendar$1 = /*@__PURE__*/ proxyCustomElement(class KupCalendar extends
|
|
|
15285
15396
|
get rootElement() { return this; }
|
|
15286
15397
|
static get watchers() { return {
|
|
15287
15398
|
"data": ["setCalendarData"],
|
|
15288
|
-
"currentDate": ["setCalendarData"]
|
|
15399
|
+
"currentDate": ["setCalendarData"],
|
|
15400
|
+
"totals": ["setCalendarData"]
|
|
15289
15401
|
}; }
|
|
15290
15402
|
static get style() { return KupCalendarStyle0; }
|
|
15291
15403
|
}, [1, "kup-calendar", {
|
|
15292
15404
|
"currentDate": [1, "current-date"],
|
|
15293
15405
|
"customStyle": [1, "custom-style"],
|
|
15294
15406
|
"data": [16],
|
|
15407
|
+
"totals": [1],
|
|
15295
15408
|
"calendarColumns": [16],
|
|
15296
15409
|
"hideNavigation": [4, "hide-navigation"],
|
|
15297
15410
|
"editableEvents": [4, "editable-events"],
|
|
@@ -15305,7 +15418,8 @@ const KupCalendar$1 = /*@__PURE__*/ proxyCustomElement(class KupCalendar extends
|
|
|
15305
15418
|
"setProps": [64]
|
|
15306
15419
|
}, undefined, {
|
|
15307
15420
|
"data": ["setCalendarData"],
|
|
15308
|
-
"currentDate": ["setCalendarData"]
|
|
15421
|
+
"currentDate": ["setCalendarData"],
|
|
15422
|
+
"totals": ["setCalendarData"]
|
|
15309
15423
|
}]);
|
|
15310
15424
|
function defineCustomElement$1() {
|
|
15311
15425
|
if (typeof customElements === "undefined") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-ef8cbd35.js';
|
|
2
|
-
import { k as kupManagerInstance, g as getProps, s as setProps, ac as KupCardFamily, n as getCellValueForDisplay } from './p-
|
|
3
|
-
import { c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$g, p as defineCustomElement$h, q as defineCustomElement$i, r as defineCustomElement$j, s as defineCustomElement$k, t as defineCustomElement$l, u as defineCustomElement$m, v as defineCustomElement$n, w as defineCustomElement$o, x as defineCustomElement$p, y as defineCustomElement$q, z as defineCustomElement$r, A as defineCustomElement$s, B as defineCustomElement$t, C as defineCustomElement$u, D as defineCustomElement$v, E as defineCustomElement$w } from './p-
|
|
4
|
-
import { d as defineCustomElement$f } from './p-
|
|
2
|
+
import { k as kupManagerInstance, g as getProps, s as setProps, ac as KupCardFamily, n as getCellValueForDisplay } from './p-41c8d9eb.js';
|
|
3
|
+
import { c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$g, p as defineCustomElement$h, q as defineCustomElement$i, r as defineCustomElement$j, s as defineCustomElement$k, t as defineCustomElement$l, u as defineCustomElement$m, v as defineCustomElement$n, w as defineCustomElement$o, x as defineCustomElement$p, y as defineCustomElement$q, z as defineCustomElement$r, A as defineCustomElement$s, B as defineCustomElement$t, C as defineCustomElement$u, D as defineCustomElement$v, E as defineCustomElement$w } from './p-4f899661.js';
|
|
4
|
+
import { d as defineCustomElement$f } from './p-0c45cb9d.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Props of the kup-card-list component.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-ef8cbd35.js';
|
|
2
|
-
import { k as kupManagerInstance, w as FCellPadding, aC as KupCellElementsPosition, g as getProps, s as setProps, ak as KupDragEffect, aD as submitPositionAdapter, e as KupLanguageGeneric, aE as KupCellProps } from './p-
|
|
3
|
-
import { c as componentWrapperId, O as FCell, U as FButton, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v } from './p-
|
|
2
|
+
import { k as kupManagerInstance, w as FCellPadding, aC as KupCellElementsPosition, g as getProps, s as setProps, ak as KupDragEffect, aD as submitPositionAdapter, e as KupLanguageGeneric, aE as KupCellProps } from './p-41c8d9eb.js';
|
|
3
|
+
import { c as componentWrapperId, O as FCell, U as FButton, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v } from './p-4f899661.js';
|
|
4
4
|
|
|
5
5
|
const kupCellCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{display:block;height:fit-content;width:100%}#kup-component{height:fit-content;width:100%}";
|
|
6
6
|
const KupCellStyle0 = kupCellCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-ef8cbd35.js';
|
|
2
|
-
import { U as FButton, a0 as FTextField, a1 as FCheckbox, Q as FTextFieldMDC, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v } from './p-
|
|
3
|
-
import { k as kupManagerInstance, g as getProps, s as setProps, aF as KupLanguageDashboard, e as KupLanguageGeneric, ak as KupDragEffect, u as KupDebugCategory } from './p-
|
|
2
|
+
import { U as FButton, a0 as FTextField, a1 as FCheckbox, Q as FTextFieldMDC, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t, D as defineCustomElement$u, E as defineCustomElement$v } from './p-4f899661.js';
|
|
3
|
+
import { k as kupManagerInstance, g as getProps, s as setProps, aF as KupLanguageDashboard, e as KupLanguageGeneric, ak as KupDragEffect, u as KupDebugCategory } from './p-41c8d9eb.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Props of the kup-dashboard component.
|