@sme.up/ketchup 8.3.3 → 9.1.0
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/{component-24811409.js → component-cb3b32f5.js} +7 -2
- package/dist/cjs/{f-button-7687085a.js → f-button-733664a5.js} +2 -2
- package/dist/cjs/{f-cell-37ef6f00.js → f-cell-f37757a6.js} +201 -22
- package/dist/cjs/{f-checkbox-758d1d34.js → f-checkbox-556771e8.js} +1 -1
- package/dist/cjs/{f-chip-cf59bdb3.js → f-chip-3349d130.js} +3 -3
- package/dist/cjs/{f-image-1245b0cf.js → f-image-b7a5816b.js} +2 -2
- package/dist/cjs/{f-paginator-utils-b1af2a8f.js → f-paginator-utils-1fe1df76.js} +49 -50
- package/dist/cjs/{f-text-field-9c745112.js → f-text-field-8557fc3f.js} +38 -4
- package/dist/cjs/{f-text-field-mdc-b1fa6fd6.js → f-text-field-mdc-4fda9705.js} +1 -1
- package/dist/cjs/{index-eac07680.js → index-4b3a5567.js} +134 -26
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +295 -338
- package/dist/cjs/kup-box.cjs.entry.js +25 -17
- package/dist/cjs/kup-calendar.cjs.entry.js +6 -6
- package/dist/cjs/kup-card-list.cjs.entry.js +244 -0
- package/dist/cjs/kup-cell.cjs.entry.js +9 -7
- package/dist/cjs/kup-dashboard.cjs.entry.js +8 -8
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +4579 -4431
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-grid.cjs.entry.js +109 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +9 -9
- package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/{kup-manager-38caaef3.js → kup-manager-cb73c128.js} +64 -14
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +5 -5
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/card-list.js +709 -0
- package/dist/collection/assets/data-table-performance.js +6 -0
- package/dist/collection/assets/data-table.js +44 -0
- package/dist/collection/assets/image-list.js +2 -12
- package/dist/collection/assets/index.js +8 -4
- package/dist/collection/assets/progress-bar.js +0 -0
- package/dist/collection/assets/radio.js +30 -0
- package/dist/collection/collection-manifest.json +3 -4
- package/dist/collection/components/kup-box/kup-box.js +14 -6
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +1 -1
- package/dist/collection/components/kup-card/kup-card.css +34 -7
- package/dist/collection/components/kup-card/kup-card.js +25 -22
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +45 -54
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +10 -5
- package/dist/collection/components/kup-card-list/kup-card-list-declarations.js +13 -0
- package/dist/collection/components/kup-card-list/kup-card-list.css +34 -0
- package/dist/collection/components/kup-card-list/kup-card-list.js +481 -0
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +47 -48
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +36 -22
- package/dist/collection/components/kup-echart/kup-echart.js +0 -2
- package/dist/collection/components/kup-grid/kup-grid.css +10 -0
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.css +1 -242
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +37 -84
- package/dist/collection/components/kup-radio/kup-radio.css +0 -161
- package/dist/collection/components/kup-radio/kup-radio.js +31 -26
- package/dist/collection/components/kup-rating/kup-rating.css +0 -8
- package/dist/collection/components/kup-rating/kup-rating.js +27 -52
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +2 -0
- package/dist/collection/f-components/f-cell/f-cell.js +38 -17
- package/dist/collection/f-components/f-progress-bar/f-progress-bar-declarations.js +1 -0
- package/dist/collection/f-components/f-progress-bar/f-progress-bar.js +88 -0
- package/dist/collection/f-components/f-radio/f-radio-declarations.js +1 -0
- package/dist/collection/f-components/f-radio/f-radio.js +28 -0
- package/dist/collection/f-components/f-rating/f-rating-declarations.js +1 -0
- package/dist/collection/f-components/f-rating/f-rating.js +26 -0
- package/dist/collection/f-components/f-text-field/f-text-field.js +36 -2
- package/dist/collection/managers/kup-data/kup-data.js +2 -0
- package/dist/collection/managers/kup-math/kup-math.js +1 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +33 -0
- package/dist/collection/managers/kup-theme/kup-theme.js +13 -1
- package/dist/collection/types/GenericTypes.js +1 -2
- package/dist/collection/utils/cell-utils.js +6 -7
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -0
- package/dist/components/kup-autocomplete2.js +1555 -1387
- package/dist/components/kup-box2.js +24 -6
- package/dist/components/kup-calendar.js +4 -1
- package/dist/components/{kup-dash-list.d.ts → kup-card-list.d.ts} +4 -4
- package/dist/components/kup-card-list.js +408 -0
- package/dist/components/kup-cell.js +1 -1
- 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 +3 -1
- 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-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +4578 -4430
- package/dist/components/kup-family-tree.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid2.js +1 -1
- package/dist/components/kup-image-list.js +3 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-planner.js +3 -1
- package/dist/esm/{component-cc25b031.js → component-879e99bf.js} +7 -2
- package/dist/esm/{f-button-e54ce8d5.js → f-button-f247ce10.js} +2 -2
- package/dist/esm/{f-cell-4149a05d.js → f-cell-ba94f1b3.js} +199 -23
- package/dist/esm/{f-checkbox-7b113dd8.js → f-checkbox-cbf7b3de.js} +1 -1
- package/dist/esm/{f-chip-c3c86f7b.js → f-chip-104c4a64.js} +3 -3
- package/dist/esm/{f-image-adceee49.js → f-image-d2a9603c.js} +2 -2
- package/dist/esm/{f-paginator-utils-e559dac8.js → f-paginator-utils-743522fa.js} +49 -50
- package/dist/esm/{f-text-field-aa4497a8.js → f-text-field-4d91ccfc.js} +38 -4
- package/dist/esm/{f-text-field-mdc-32a1ffd9.js → f-text-field-mdc-1143cf21.js} +1 -1
- package/dist/esm/{index-d413187a.js → index-c161a33e.js} +134 -26
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +295 -338
- package/dist/esm/kup-box.entry.js +25 -17
- package/dist/esm/kup-calendar.entry.js +6 -6
- package/dist/esm/kup-card-list.entry.js +240 -0
- package/dist/esm/kup-cell.entry.js +9 -7
- package/dist/esm/kup-dashboard.entry.js +8 -8
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +4579 -4431
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-grid.entry.js +105 -0
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +9 -9
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/{kup-manager-a4153fb2.js → kup-manager-94b3d177.js} +64 -14
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +5 -5
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +5 -5
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +4 -4
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-12e47371.js +1 -0
- package/dist/ketchup/{p-3c44e838.entry.js → p-15548f51.entry.js} +1 -1
- package/dist/ketchup/p-20e8ab84.js +2 -0
- package/dist/ketchup/{p-2739b7ac.entry.js → p-21f1b22a.entry.js} +1 -1
- package/dist/ketchup/{p-e76b646c.js → p-2c47b88f.js} +3 -3
- package/dist/ketchup/{p-23d54fb2.entry.js → p-304f296e.entry.js} +1 -1
- package/dist/ketchup/p-48f8b0d5.entry.js +9 -0
- package/dist/ketchup/p-4ca502ce.entry.js +1 -0
- package/dist/ketchup/{p-698442ed.js → p-4d7c02f4.js} +1 -1
- package/dist/ketchup/{p-3d671241.entry.js → p-5abbf31b.entry.js} +1 -1
- package/dist/ketchup/{p-44b5c573.entry.js → p-5c9b10a5.entry.js} +1 -1
- package/dist/ketchup/{p-b415fe84.entry.js → p-5cb2dbf3.entry.js} +1 -1
- package/dist/ketchup/p-679ccbf8.js +1 -0
- package/dist/ketchup/p-6a0ac578.entry.js +1 -0
- package/dist/ketchup/{p-f3c8c1da.entry.js → p-87e13738.entry.js} +1 -1
- package/dist/ketchup/p-8e5db599.entry.js +1 -0
- package/dist/ketchup/{p-c0878519.entry.js → p-a14ede8c.entry.js} +1 -1
- package/dist/ketchup/{p-2f0798d3.js → p-a2007880.js} +1 -1
- package/dist/ketchup/p-a2b75445.entry.js +39 -0
- package/dist/ketchup/{p-47752f3b.js → p-b0678a34.js} +1 -1
- package/dist/ketchup/{p-7360a410.js → p-ba003975.js} +1 -1
- package/dist/ketchup/{p-d817be2a.js → p-bb80719e.js} +1 -1
- package/dist/ketchup/{p-c39ddeae.entry.js → p-bf41d71f.entry.js} +1 -1
- package/dist/ketchup/p-c32e8755.entry.js +1 -0
- package/dist/ketchup/p-c4b1bde1.entry.js +1 -0
- package/dist/ketchup/p-c6b58be6.entry.js +1 -0
- package/dist/ketchup/{p-6d9ffb32.js → p-cd2af1a6.js} +1 -1
- package/dist/ketchup/{p-124f3f42.js → p-d4a879fc.js} +1 -1
- package/dist/ketchup/{p-b623c774.entry.js → p-d56763cf.entry.js} +1 -1
- package/dist/ketchup/{p-3081ed82.entry.js → p-e7f57bee.entry.js} +1 -1
- package/dist/ketchup/{p-eec864dd.entry.js → p-eb12225c.entry.js} +1 -1
- package/dist/ketchup/{p-3bbcae45.entry.js → p-f22abf4e.entry.js} +1 -1
- package/dist/ketchup/{p-e917200c.entry.js → p-f82db512.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box.d.ts +1 -0
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +1 -1
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +1 -1
- package/dist/types/components/kup-card/kup-card.d.ts +3 -3
- package/dist/types/components/kup-card-list/kup-card-list-declarations.d.ts +35 -0
- package/dist/types/components/kup-card-list/kup-card-list.d.ts +62 -0
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +0 -1
- package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +1 -9
- package/dist/types/components/kup-radio/kup-radio.d.ts +3 -2
- package/dist/types/components/kup-rating/kup-rating.d.ts +2 -7
- package/dist/types/components.d.ts +103 -96
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +2 -0
- package/dist/types/f-components/f-progress-bar/f-progress-bar-declarations.d.ts +16 -0
- package/dist/types/f-components/f-progress-bar/f-progress-bar.d.ts +3 -0
- package/dist/types/f-components/f-radio/f-radio-declarations.d.ts +22 -0
- package/dist/types/f-components/f-radio/f-radio.d.ts +3 -0
- package/dist/types/f-components/f-rating/f-rating-declarations.d.ts +10 -0
- package/dist/types/f-components/f-rating/f-rating.d.ts +3 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +1 -1
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +16 -4
- package/dist/types/types/GenericTypes.d.ts +1 -2
- package/package.json +6 -3
- package/dist/cjs/kup-dash-list.cjs.entry.js +0 -116
- package/dist/cjs/kup-dash_2.cjs.entry.js +0 -179
- package/dist/collection/assets/dash-list.js +0 -474
- package/dist/collection/components/kup-dash/kup-dash.css +0 -136
- package/dist/collection/components/kup-dash/kup-dash.js +0 -171
- package/dist/collection/components/kup-dash-list/kup-dash-list.css +0 -10
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +0 -331
- package/dist/components/kup-dash-list.js +0 -288
- package/dist/components/kup-dash.d.ts +0 -11
- package/dist/components/kup-dash.js +0 -6
- package/dist/components/kup-dash2.js +0 -228
- package/dist/esm/kup-dash-list.entry.js +0 -112
- package/dist/esm/kup-dash_2.entry.js +0 -174
- package/dist/ketchup/p-0848391f.entry.js +0 -1
- package/dist/ketchup/p-25d45dc9.entry.js +0 -1
- package/dist/ketchup/p-283ca113.entry.js +0 -1
- package/dist/ketchup/p-384137d7.entry.js +0 -39
- package/dist/ketchup/p-3972b97c.entry.js +0 -1
- package/dist/ketchup/p-5ce0e645.entry.js +0 -1
- package/dist/ketchup/p-b8fcbcc9.entry.js +0 -1
- package/dist/ketchup/p-be864593.entry.js +0 -9
- package/dist/ketchup/p-d680bdde.js +0 -1
- package/dist/ketchup/p-f79d544a.js +0 -1
- package/dist/ketchup/p-fd75d5bf.js +0 -2
- package/dist/types/components/kup-dash/kup-dash.d.ts +0 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +0 -22
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as Filters, J as FilterInterval, H as getValueForDisplay, D as getValueForDisplay2, af as getCellValueForDisplay, v as getColumnByName, z as KupObjects, ah as KupData, ai as compareCell, N as TotalMode, h as KupDatesFormats, a2 as SortMode, aj as KupLanguagePage, r as KupLanguageRow, m as KupLanguageGeneric } from './kup-manager-
|
|
2
|
-
import { h } from './index-
|
|
3
|
-
import { F as FButton } from './f-button-
|
|
1
|
+
import { E as Filters, J as FilterInterval, H as getValueForDisplay, D as getValueForDisplay2, af as getCellValueForDisplay, v as getColumnByName, z as KupObjects, ah as KupData, ai as compareCell, N as TotalMode, h as KupDatesFormats, a2 as SortMode, aj as KupLanguagePage, r as KupLanguageRow, m as KupLanguageGeneric } from './kup-manager-94b3d177.js';
|
|
2
|
+
import { h } from './index-c161a33e.js';
|
|
3
|
+
import { F as FButton } from './f-button-f247ce10.js';
|
|
4
4
|
import { F as FButtonStyling } from './f-button-declarations-8a009df1.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -869,19 +869,19 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
869
869
|
return;
|
|
870
870
|
}
|
|
871
871
|
keys.forEach((key) => {
|
|
872
|
-
const currentTotalValue = dom$2.ketchup.math.numberify(groupRow.group.totals[key] || 0);
|
|
873
872
|
const cell = addedRow.cells[key];
|
|
874
873
|
if (cell) {
|
|
875
|
-
|
|
874
|
+
const _isNumber = dom$2.ketchup.objects.isNumber(cell.obj);
|
|
876
875
|
const totalMode = totals[key];
|
|
877
876
|
switch (totalMode) {
|
|
878
877
|
case TotalMode.COUNT:
|
|
879
|
-
groupRow.group.totals[key]
|
|
878
|
+
let currentTotalValue = groupRow.group.totals[key] || 0;
|
|
879
|
+
groupRow.group.totals[key] = ++currentTotalValue;
|
|
880
880
|
// updating parents
|
|
881
881
|
let parent = groupRow.group.parent;
|
|
882
882
|
while (parent != null) {
|
|
883
|
-
|
|
884
|
-
parent.group.totals[key] = currentParentCount
|
|
883
|
+
let currentParentCount = parent.group.totals[key] || 0;
|
|
884
|
+
parent.group.totals[key] = ++currentParentCount;
|
|
885
885
|
parent = parent.group.parent;
|
|
886
886
|
}
|
|
887
887
|
break;
|
|
@@ -939,8 +939,9 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
939
939
|
break;
|
|
940
940
|
case TotalMode.SUM:
|
|
941
941
|
case TotalMode.AVERAGE:
|
|
942
|
-
if (_isNumber) {
|
|
942
|
+
if (_isNumber && cell.value) {
|
|
943
943
|
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
944
|
+
const currentTotalValue = groupRow.group.totals[key] || 0;
|
|
944
945
|
groupRow.group.totals[key] =
|
|
945
946
|
cellValue + currentTotalValue;
|
|
946
947
|
// updating parents
|
|
@@ -955,11 +956,11 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
955
956
|
break;
|
|
956
957
|
// TODO DRY the MIN and MAX functions
|
|
957
958
|
case TotalMode.MIN:
|
|
958
|
-
if (_isNumber) {
|
|
959
|
-
const
|
|
959
|
+
if (_isNumber && cell.value) {
|
|
960
|
+
const currentMinValue = groupRow.group.totals[key];
|
|
960
961
|
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
961
|
-
if (
|
|
962
|
-
groupRow.group.totals[key] = Math.min(
|
|
962
|
+
if (currentMinValue) {
|
|
963
|
+
groupRow.group.totals[key] = Math.min(currentMinValue, cellValue);
|
|
963
964
|
}
|
|
964
965
|
else {
|
|
965
966
|
// first round
|
|
@@ -979,22 +980,21 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
979
980
|
parent = parent.group.parent;
|
|
980
981
|
}
|
|
981
982
|
}
|
|
982
|
-
else if (
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
const currentTotalValue = groupRow.group.totals[key];
|
|
989
|
-
if (currentTotalValue) {
|
|
983
|
+
else if (cell.value &&
|
|
984
|
+
dom$2.ketchup.objects.isDate(cell.obj)) {
|
|
985
|
+
const cellValue = dom$2.ketchup.dates.toDayjs(cell.value);
|
|
986
|
+
if (dom$2.ketchup.dates.isValid(cellValue)) {
|
|
987
|
+
const currentMinValue = groupRow.group.totals[key];
|
|
988
|
+
if (currentMinValue) {
|
|
990
989
|
let moments = [];
|
|
991
990
|
moments.push(cellValue);
|
|
992
|
-
moments.push(dom$2.ketchup.dates.
|
|
991
|
+
moments.push(dom$2.ketchup.dates.toDayjs(currentMinValue));
|
|
993
992
|
groupRow.group.totals[key] =
|
|
994
|
-
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments));
|
|
993
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments), KupDatesFormats.ISO_DATE);
|
|
995
994
|
}
|
|
996
995
|
else {
|
|
997
|
-
groupRow.group.totals[key] =
|
|
996
|
+
groupRow.group.totals[key] =
|
|
997
|
+
dom$2.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
998
998
|
}
|
|
999
999
|
// updating parents
|
|
1000
1000
|
let parent = groupRow.group.parent;
|
|
@@ -1003,13 +1003,14 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1003
1003
|
if (currentParentMin) {
|
|
1004
1004
|
let moments = [];
|
|
1005
1005
|
moments.push(cellValue);
|
|
1006
|
-
moments.push(dom$2.ketchup.dates.
|
|
1006
|
+
moments.push(dom$2.ketchup.dates.toDayjs(currentParentMin));
|
|
1007
1007
|
parent.group.totals[key] =
|
|
1008
|
-
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments));
|
|
1008
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments), KupDatesFormats.ISO_DATE);
|
|
1009
1009
|
}
|
|
1010
1010
|
else {
|
|
1011
1011
|
// first round
|
|
1012
|
-
parent.group.totals[key] =
|
|
1012
|
+
parent.group.totals[key] =
|
|
1013
|
+
dom$2.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
1013
1014
|
}
|
|
1014
1015
|
parent = parent.group.parent;
|
|
1015
1016
|
}
|
|
@@ -1018,11 +1019,11 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1018
1019
|
break;
|
|
1019
1020
|
// TODO DRY the MIN and MAX functions
|
|
1020
1021
|
case TotalMode.MAX:
|
|
1021
|
-
if (_isNumber) {
|
|
1022
|
-
const
|
|
1022
|
+
if (_isNumber && cell.value) {
|
|
1023
|
+
const currentMaxValue = groupRow.group.totals[key];
|
|
1023
1024
|
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
1024
|
-
if (
|
|
1025
|
-
groupRow.group.totals[key] = Math.max(
|
|
1025
|
+
if (currentMaxValue) {
|
|
1026
|
+
groupRow.group.totals[key] = Math.max(currentMaxValue, cellValue);
|
|
1026
1027
|
}
|
|
1027
1028
|
else {
|
|
1028
1029
|
// first round
|
|
@@ -1042,37 +1043,37 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1042
1043
|
parent = parent.group.parent;
|
|
1043
1044
|
}
|
|
1044
1045
|
}
|
|
1045
|
-
else if (
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
const currentTotalValue = groupRow.group.totals[key];
|
|
1052
|
-
if (currentTotalValue) {
|
|
1046
|
+
else if (cell.value &&
|
|
1047
|
+
dom$2.ketchup.objects.isDate(cell.obj)) {
|
|
1048
|
+
const cellValue = dom$2.ketchup.dates.toDayjs(cell.value);
|
|
1049
|
+
if (dom$2.ketchup.dates.isValid(cellValue)) {
|
|
1050
|
+
const currentMaxValue = groupRow.group.totals[key];
|
|
1051
|
+
if (currentMaxValue) {
|
|
1053
1052
|
let moments = [];
|
|
1054
1053
|
moments.push(cellValue);
|
|
1055
|
-
moments.push(dom$2.ketchup.dates.
|
|
1054
|
+
moments.push(dom$2.ketchup.dates.toDayjs(currentMaxValue));
|
|
1056
1055
|
groupRow.group.totals[key] =
|
|
1057
|
-
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments));
|
|
1056
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments), KupDatesFormats.ISO_DATE);
|
|
1058
1057
|
}
|
|
1059
1058
|
else {
|
|
1060
|
-
groupRow.group.totals[key] =
|
|
1059
|
+
groupRow.group.totals[key] =
|
|
1060
|
+
dom$2.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
1061
1061
|
}
|
|
1062
1062
|
// updating parents
|
|
1063
1063
|
let parent = groupRow.group.parent;
|
|
1064
1064
|
while (parent != null) {
|
|
1065
|
-
const
|
|
1066
|
-
if (
|
|
1065
|
+
const currentParentMax = parent.group.totals[key];
|
|
1066
|
+
if (currentParentMax) {
|
|
1067
1067
|
let moments = [];
|
|
1068
1068
|
moments.push(cellValue);
|
|
1069
|
-
moments.push(dom$2.ketchup.dates.
|
|
1069
|
+
moments.push(dom$2.ketchup.dates.toDayjs(currentParentMax));
|
|
1070
1070
|
parent.group.totals[key] =
|
|
1071
|
-
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments));
|
|
1071
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments), KupDatesFormats.ISO_DATE);
|
|
1072
1072
|
}
|
|
1073
1073
|
else {
|
|
1074
1074
|
// first round
|
|
1075
|
-
parent.group.totals[key] =
|
|
1075
|
+
parent.group.totals[key] =
|
|
1076
|
+
dom$2.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
1076
1077
|
}
|
|
1077
1078
|
parent = parent.group.parent;
|
|
1078
1079
|
}
|
|
@@ -1161,9 +1162,7 @@ function adjustGroupAverageOrFormula(row, type, toAdjustKeys, totals) {
|
|
|
1161
1162
|
// adjust average/formulas
|
|
1162
1163
|
toAdjustKeys.forEach((key) => {
|
|
1163
1164
|
if (type == TotalMode.AVERAGE) {
|
|
1164
|
-
row.group.totals[key] =
|
|
1165
|
-
dom$2.ketchup.math.numberify(row.group.totals[key]) /
|
|
1166
|
-
numberOfLeaf;
|
|
1165
|
+
row.group.totals[key] = row.group.totals[key] / numberOfLeaf;
|
|
1167
1166
|
}
|
|
1168
1167
|
if (type == TotalMode.MATH) {
|
|
1169
1168
|
let formula = totals[key].substring(TotalMode.MATH.length);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h, a as getAssetPath } from './index-
|
|
2
|
-
import { K as KupThemeIconValues } from './kup-manager-
|
|
1
|
+
import { h, a as getAssetPath } from './index-c161a33e.js';
|
|
2
|
+
import { K as KupThemeIconValues } from './kup-manager-94b3d177.js';
|
|
3
3
|
|
|
4
4
|
const dom = document.documentElement;
|
|
5
5
|
/*-------------------------------------------------*/
|
|
@@ -55,7 +55,8 @@ function setContent(props) {
|
|
|
55
55
|
let value = props.value;
|
|
56
56
|
let inputType = (_a = props.inputType) !== null && _a !== void 0 ? _a : 'text';
|
|
57
57
|
let persManageForNumberFormat = false;
|
|
58
|
-
if (props.inputType === 'number' &&
|
|
58
|
+
if (props.inputType === 'number' &&
|
|
59
|
+
((props.decimals && props.decimals > 0) || props.group)) {
|
|
59
60
|
inputType = 'text';
|
|
60
61
|
persManageForNumberFormat = true;
|
|
61
62
|
}
|
|
@@ -99,7 +100,40 @@ function setContent(props) {
|
|
|
99
100
|
group: props.group,
|
|
100
101
|
integer: props.integers,
|
|
101
102
|
};
|
|
102
|
-
|
|
103
|
+
if (props.min !== undefined &&
|
|
104
|
+
props.min !== null &&
|
|
105
|
+
props.min >
|
|
106
|
+
parseFloat(e.target.value)) {
|
|
107
|
+
e.target.value =
|
|
108
|
+
formatValue(props.min.toString(), options, true);
|
|
109
|
+
}
|
|
110
|
+
else if (props.max !== undefined &&
|
|
111
|
+
props.max !== null &&
|
|
112
|
+
props.max <
|
|
113
|
+
parseFloat(e.target.value)) {
|
|
114
|
+
e.target.value =
|
|
115
|
+
formatValue(props.max.toString(), options, true);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
e.target.value =
|
|
119
|
+
formatValue(e.target.value, options, true);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (props.min !== undefined &&
|
|
124
|
+
props.min !== null &&
|
|
125
|
+
props.min >
|
|
126
|
+
parseFloat(e.target.value)) {
|
|
127
|
+
e.target.value =
|
|
128
|
+
props.min.toString();
|
|
129
|
+
}
|
|
130
|
+
else if (props.max !== undefined &&
|
|
131
|
+
props.max !== null &&
|
|
132
|
+
props.max <
|
|
133
|
+
parseFloat(e.target.value)) {
|
|
134
|
+
e.target.value =
|
|
135
|
+
props.max.toString();
|
|
136
|
+
}
|
|
103
137
|
}
|
|
104
138
|
if (props.onChange) {
|
|
105
139
|
props.onChange(e);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __extends, a as __assign, b as MDCFoundation, c as MDCComponent, e as estimateScrollWidth, d as __values, f as applyPassive, M as MDCRipple, m as matches, g as MDCRippleFoundation } from './component-
|
|
1
|
+
import { _ as __extends, a as __assign, b as MDCFoundation, c as MDCComponent, e as estimateScrollWidth, d as __values, f as applyPassive, M as MDCRipple, m as matches, g as MDCRippleFoundation } from './component-879e99bf.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -111,10 +111,10 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
111
111
|
};
|
|
112
112
|
walk(children);
|
|
113
113
|
if (vnodeData) {
|
|
114
|
-
// normalize class / classname attributes
|
|
115
114
|
if (vnodeData.key) {
|
|
116
115
|
key = vnodeData.key;
|
|
117
116
|
}
|
|
117
|
+
// normalize class / className attributes
|
|
118
118
|
{
|
|
119
119
|
const classData = vnodeData.className || vnodeData.class;
|
|
120
120
|
if (classData) {
|
|
@@ -381,6 +381,21 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
381
381
|
*
|
|
382
382
|
* Modified for Stencil's compiler and vdom
|
|
383
383
|
*/
|
|
384
|
+
/**
|
|
385
|
+
* When running a VDom render set properties present on a VDom node onto the
|
|
386
|
+
* corresponding HTML element.
|
|
387
|
+
*
|
|
388
|
+
* Note that this function has special functionality for the `class`,
|
|
389
|
+
* `style`, `key`, and `ref` attributes, as well as event handlers (like
|
|
390
|
+
* `onClick`, etc). All others are just passed through as-is.
|
|
391
|
+
*
|
|
392
|
+
* @param elm the HTMLElement onto which attributes should be set
|
|
393
|
+
* @param memberName the name of the attribute to set
|
|
394
|
+
* @param oldValue the old value for the attribute
|
|
395
|
+
* @param newValue the new value for the attribute
|
|
396
|
+
* @param isSvg whether we're in an svg context or not
|
|
397
|
+
* @param flags bitflags for Vdom variables
|
|
398
|
+
*/
|
|
384
399
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
385
400
|
if (oldValue !== newValue) {
|
|
386
401
|
let isProp = isMemberInElement(elm, memberName);
|
|
@@ -982,17 +997,44 @@ const nullifyVNodeRefs = (vNode) => {
|
|
|
982
997
|
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
983
998
|
* the DOM node into which it should be rendered.
|
|
984
999
|
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
1000
|
+
* @param isInitialLoad whether or not this is the first call after page load
|
|
985
1001
|
*/
|
|
986
|
-
const renderVdom = (hostRef, renderFnResults) => {
|
|
1002
|
+
const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
987
1003
|
const hostElm = hostRef.$hostElement$;
|
|
988
1004
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
989
1005
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1006
|
+
// if `renderFnResults` is a Host node then we can use it directly. If not,
|
|
1007
|
+
// we need to call `h` again to wrap the children of our component in a
|
|
1008
|
+
// 'dummy' Host node (well, an empty vnode) since `renderVdom` assumes
|
|
1009
|
+
// implicitly that the top-level vdom node is 1) an only child and 2)
|
|
1010
|
+
// contains attrs that need to be set on the host element.
|
|
990
1011
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
991
1012
|
hostTagName = hostElm.tagName;
|
|
992
1013
|
if (cmpMeta.$attrsToReflect$) {
|
|
993
1014
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
994
1015
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
995
1016
|
}
|
|
1017
|
+
// On the first render and *only* on the first render we want to check for
|
|
1018
|
+
// any attributes set on the host element which are also set on the vdom
|
|
1019
|
+
// node. If we find them, we override the value on the VDom node attrs with
|
|
1020
|
+
// the value from the host element, which allows developers building apps
|
|
1021
|
+
// with Stencil components to override e.g. the `role` attribute on a
|
|
1022
|
+
// component even if it's already set on the `Host`.
|
|
1023
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1024
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1025
|
+
// We have a special implementation in `setAccessor` for `style` and
|
|
1026
|
+
// `class` which reconciles values coming from the VDom with values
|
|
1027
|
+
// already present on the DOM element, so we don't want to override those
|
|
1028
|
+
// attributes on the VDom tree with values from the host element if they
|
|
1029
|
+
// are present.
|
|
1030
|
+
//
|
|
1031
|
+
// Likewise, `ref` and `key` are special internal values for the Stencil
|
|
1032
|
+
// runtime and we don't want to override those either.
|
|
1033
|
+
if (hostElm.hasAttribute(key) && !['key', 'ref', 'style', 'class'].includes(key)) {
|
|
1034
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
996
1038
|
rootVnode.$tag$ = null;
|
|
997
1039
|
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
998
1040
|
hostRef.$vnode$ = rootVnode;
|
|
@@ -1111,6 +1153,16 @@ const enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.th
|
|
|
1111
1153
|
*/
|
|
1112
1154
|
const isPromisey = (maybePromise) => maybePromise instanceof Promise ||
|
|
1113
1155
|
(maybePromise && maybePromise.then && typeof maybePromise.then === 'function');
|
|
1156
|
+
/**
|
|
1157
|
+
* Update a component given reference to its host elements and so on.
|
|
1158
|
+
*
|
|
1159
|
+
* @param hostRef an object containing references to the element's host node,
|
|
1160
|
+
* VDom nodes, and other metadata
|
|
1161
|
+
* @param instance a reference to the underlying host element where it will be
|
|
1162
|
+
* rendered
|
|
1163
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
1164
|
+
* the first render cycle
|
|
1165
|
+
*/
|
|
1114
1166
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1115
1167
|
var _a;
|
|
1116
1168
|
const elm = hostRef.$hostElement$;
|
|
@@ -1122,7 +1174,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1122
1174
|
}
|
|
1123
1175
|
const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
|
|
1124
1176
|
{
|
|
1125
|
-
callRender(hostRef, instance);
|
|
1177
|
+
callRender(hostRef, instance, elm, isInitialLoad);
|
|
1126
1178
|
}
|
|
1127
1179
|
if (rc) {
|
|
1128
1180
|
// ok, so turns out there are some child host elements
|
|
@@ -1146,7 +1198,19 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1146
1198
|
}
|
|
1147
1199
|
}
|
|
1148
1200
|
};
|
|
1149
|
-
|
|
1201
|
+
/**
|
|
1202
|
+
* Handle making the call to the VDom renderer with the proper context given
|
|
1203
|
+
* various build variables
|
|
1204
|
+
*
|
|
1205
|
+
* @param hostRef an object containing references to the element's host node,
|
|
1206
|
+
* VDom nodes, and other metadata
|
|
1207
|
+
* @param instance a reference to the underlying host element where it will be
|
|
1208
|
+
* rendered
|
|
1209
|
+
* @param elm the Host element for the component
|
|
1210
|
+
* @param isInitialLoad whether or not this function is being called as part of
|
|
1211
|
+
* @returns an empty promise
|
|
1212
|
+
*/
|
|
1213
|
+
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1150
1214
|
try {
|
|
1151
1215
|
instance = instance.render() ;
|
|
1152
1216
|
{
|
|
@@ -1161,7 +1225,7 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1161
1225
|
// or we need to update the css class/attrs on the host element
|
|
1162
1226
|
// DOM WRITE!
|
|
1163
1227
|
{
|
|
1164
|
-
renderVdom(hostRef, instance);
|
|
1228
|
+
renderVdom(hostRef, instance, isInitialLoad);
|
|
1165
1229
|
}
|
|
1166
1230
|
}
|
|
1167
1231
|
}
|
|
@@ -1309,6 +1373,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1309
1373
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1310
1374
|
*/
|
|
1311
1375
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1376
|
+
var _a;
|
|
1312
1377
|
if (cmpMeta.$members$) {
|
|
1313
1378
|
if (Cstr.watchers) {
|
|
1314
1379
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
@@ -1346,7 +1411,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1346
1411
|
});
|
|
1347
1412
|
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1348
1413
|
const attrNameToPropName = new Map();
|
|
1349
|
-
prototype.attributeChangedCallback = function (attrName,
|
|
1414
|
+
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1350
1415
|
plt.jmp(() => {
|
|
1351
1416
|
const propName = attrNameToPropName.get(attrName);
|
|
1352
1417
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
@@ -1369,12 +1434,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1369
1434
|
// customElements.define('my-component', MyComponent);
|
|
1370
1435
|
// </script>
|
|
1371
1436
|
// ```
|
|
1372
|
-
// In this case if we do not
|
|
1437
|
+
// In this case if we do not un-shadow here and use the value of the shadowing property, attributeChangedCallback
|
|
1373
1438
|
// will be called with `newValue = "some-value"` and will set the shadowed property (this.someAttribute = "another-value")
|
|
1374
1439
|
// to the value that was set inline i.e. "some-value" from above example. When
|
|
1375
|
-
// the connectedCallback attempts to
|
|
1440
|
+
// the connectedCallback attempts to un-shadow it will use "some-value" as the initial value rather than "another-value"
|
|
1376
1441
|
//
|
|
1377
|
-
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/
|
|
1442
|
+
// The case where the attribute was NOT set inline but was not set programmatically shall be handled/un-shadowed
|
|
1378
1443
|
// by connectedCallback as this attributeChangedCallback will not fire.
|
|
1379
1444
|
//
|
|
1380
1445
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
@@ -1394,21 +1459,49 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1394
1459
|
// `propName` to be converted to a `DOMString`, which may not be what we want for other primitive props.
|
|
1395
1460
|
return;
|
|
1396
1461
|
}
|
|
1462
|
+
else if (propName == null) {
|
|
1463
|
+
// At this point we should know this is not a "member", so we can treat it like watching an attribute
|
|
1464
|
+
// on a vanilla web component
|
|
1465
|
+
const hostRef = getHostRef(this);
|
|
1466
|
+
const flags = hostRef === null || hostRef === void 0 ? void 0 : hostRef.$flags$;
|
|
1467
|
+
// We only want to trigger the callback(s) if:
|
|
1468
|
+
// 1. The instance is ready
|
|
1469
|
+
// 2. The watchers are ready
|
|
1470
|
+
// 3. The value has changed
|
|
1471
|
+
if (!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
1472
|
+
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
1473
|
+
newValue !== oldValue) {
|
|
1474
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1475
|
+
const entry = cmpMeta.$watchers$[attrName];
|
|
1476
|
+
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
1477
|
+
if (instance[callbackName] != null) {
|
|
1478
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1479
|
+
}
|
|
1480
|
+
});
|
|
1481
|
+
}
|
|
1482
|
+
return;
|
|
1483
|
+
}
|
|
1397
1484
|
this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;
|
|
1398
1485
|
});
|
|
1399
1486
|
};
|
|
1400
|
-
//
|
|
1401
|
-
//
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1487
|
+
// Create an array of attributes to observe
|
|
1488
|
+
// This list in comprised of all strings used within a `@Watch()` decorator
|
|
1489
|
+
// on a component as well as any Stencil-specific "members" (`@Prop()`s and `@State()`s).
|
|
1490
|
+
// As such, there is no way to guarantee type-safety here that a user hasn't entered
|
|
1491
|
+
// an invalid attribute.
|
|
1492
|
+
Cstr.observedAttributes = Array.from(new Set([
|
|
1493
|
+
...Object.keys((_a = cmpMeta.$watchers$) !== null && _a !== void 0 ? _a : {}),
|
|
1494
|
+
...members
|
|
1495
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
1496
|
+
.map(([propName, m]) => {
|
|
1497
|
+
const attrName = m[1] || propName;
|
|
1498
|
+
attrNameToPropName.set(attrName, propName);
|
|
1499
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1500
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1501
|
+
}
|
|
1502
|
+
return attrName;
|
|
1503
|
+
}),
|
|
1504
|
+
]));
|
|
1412
1505
|
}
|
|
1413
1506
|
}
|
|
1414
1507
|
return Cstr;
|
|
@@ -1491,6 +1584,8 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1491
1584
|
schedule();
|
|
1492
1585
|
}
|
|
1493
1586
|
};
|
|
1587
|
+
const fireConnectedCallback = (instance) => {
|
|
1588
|
+
};
|
|
1494
1589
|
const connectedCallback = (elm) => {
|
|
1495
1590
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1496
1591
|
const hostRef = getHostRef(elm);
|
|
@@ -1534,22 +1629,34 @@ const connectedCallback = (elm) => {
|
|
|
1534
1629
|
// reattach any event listeners to the host
|
|
1535
1630
|
// since they would have been removed when disconnected
|
|
1536
1631
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1632
|
+
// fire off connectedCallback() on component instance
|
|
1633
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) ;
|
|
1634
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
1635
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
|
|
1636
|
+
}
|
|
1537
1637
|
}
|
|
1538
1638
|
endConnected();
|
|
1539
1639
|
}
|
|
1540
1640
|
};
|
|
1541
|
-
const
|
|
1641
|
+
const disconnectInstance = (instance) => {
|
|
1642
|
+
{
|
|
1643
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1644
|
+
}
|
|
1645
|
+
};
|
|
1646
|
+
const disconnectedCallback = async (elm) => {
|
|
1542
1647
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1543
1648
|
const hostRef = getHostRef(elm);
|
|
1544
|
-
const instance = hostRef.$lazyInstance$ ;
|
|
1545
1649
|
{
|
|
1546
1650
|
if (hostRef.$rmListeners$) {
|
|
1547
1651
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1548
1652
|
hostRef.$rmListeners$ = undefined;
|
|
1549
1653
|
}
|
|
1550
1654
|
}
|
|
1551
|
-
{
|
|
1552
|
-
|
|
1655
|
+
if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$lazyInstance$) {
|
|
1656
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1657
|
+
}
|
|
1658
|
+
else if (hostRef === null || hostRef === void 0 ? void 0 : hostRef.$onReadyPromise$) {
|
|
1659
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1553
1660
|
}
|
|
1554
1661
|
}
|
|
1555
1662
|
};
|
|
@@ -1569,6 +1676,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1569
1676
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1570
1677
|
lazyBundles.map((lazyBundle) => {
|
|
1571
1678
|
lazyBundle[1].map((compactMeta) => {
|
|
1679
|
+
var _a;
|
|
1572
1680
|
const cmpMeta = {
|
|
1573
1681
|
$flags$: compactMeta[0],
|
|
1574
1682
|
$tagName$: compactMeta[1],
|
|
@@ -1585,7 +1693,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1585
1693
|
cmpMeta.$attrsToReflect$ = [];
|
|
1586
1694
|
}
|
|
1587
1695
|
{
|
|
1588
|
-
cmpMeta.$watchers$ = {};
|
|
1696
|
+
cmpMeta.$watchers$ = (_a = compactMeta[4]) !== null && _a !== void 0 ? _a : {};
|
|
1589
1697
|
}
|
|
1590
1698
|
const tagName = cmpMeta.$tagName$;
|
|
1591
1699
|
const HostElement = class extends HTMLElement {
|