@sme.up/ketchup 4.3.0-SNAPSHOT → 5.1.0-SNAPSHOT
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/README.md +107 -3
- package/dist/cjs/{cell-utils-dc0884a3.js → cell-utils-9b1d6563.js} +4 -4
- package/dist/cjs/{component-8fbc31a2.js → component-d1496215.js} +203 -174
- package/dist/cjs/{f-button-2ba74fb5.js → f-button-02a7cde4.js} +2 -2
- package/dist/cjs/{f-cell-fe60a08d.js → f-cell-4d1450a8.js} +38 -28
- package/dist/cjs/f-chip-a50b9f00.js +130 -0
- package/dist/cjs/{f-image-d3bd4e08.js → f-image-db55ac49.js} +3 -3
- package/dist/cjs/{index-0416afab.js → index-ab119fad.js} +23 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +7 -7
- package/dist/cjs/{kup-autocomplete_28.cjs.entry.js → kup-autocomplete_27.cjs.entry.js} +4636 -4073
- package/dist/cjs/kup-calendar.cjs.entry.js +626 -359
- package/dist/cjs/kup-cell.cjs.entry.js +15 -13
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +8 -7
- package/dist/cjs/kup-drawer.cjs.entry.js +3 -3
- package/dist/cjs/kup-echart.cjs.entry.js +93039 -0
- package/dist/cjs/kup-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-lazy.cjs.entry.js +22 -5
- package/dist/cjs/kup-magic-box.cjs.entry.js +95 -42
- package/dist/cjs/{kup-manager-1a2688ca.js → kup-manager-5877b2ee.js} +3392 -753
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- 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 +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{tslib.es6-4360c099.js → tslib.es6-0ee02c67.js} +13 -0
- package/dist/cjs/utils-1b5c8c70.js +482 -0
- package/dist/collection/assets/calendar.js +46 -1
- package/dist/collection/assets/card.js +15 -15
- package/dist/collection/assets/data-table.js +18 -6
- package/dist/collection/assets/index.js +8 -0
- package/dist/collection/assets/kupdata.js +937 -0
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/kup-accordion/kup-accordion.css +0 -1
- package/dist/collection/components/kup-accordion/kup-accordion.js +2 -2
- package/dist/collection/components/kup-autocomplete/kup-autocomplete-declarations.js +2 -0
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +148 -52
- package/dist/collection/components/kup-badge/kup-badge.js +2 -2
- package/dist/collection/components/kup-box/kup-box.js +31 -17
- package/dist/collection/components/kup-button/kup-button.js +2 -2
- package/dist/collection/components/kup-button-list/kup-button-list.js +26 -8
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +14 -8
- package/dist/collection/components/kup-calendar/kup-calendar.css +2 -2
- package/dist/collection/components/kup-calendar/kup-calendar.js +185 -315
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +38 -0
- package/dist/collection/components/kup-card/{builtin → built-in}/kup-card-calendar.js +1 -1
- package/dist/collection/components/kup-card/{builtin → built-in}/kup-card-clock.js +32 -32
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +167 -0
- package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +1 -1
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +2 -2
- package/dist/collection/components/kup-card/free/kup-card-free.js +11 -2
- package/dist/collection/components/kup-card/kup-card-declarations.js +14 -14
- package/dist/collection/components/kup-card/kup-card-helper.js +3 -3
- package/dist/collection/components/kup-card/kup-card.css +423 -137
- package/dist/collection/components/kup-card/kup-card.js +62 -11
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +1 -1
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +18 -5
- package/dist/collection/components/kup-cell/kup-cell.js +15 -13
- package/dist/collection/components/kup-chart/kup-chart-builder.js +3 -4
- package/dist/collection/components/kup-chart/kup-chart.js +7 -7
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +1 -1
- package/dist/collection/components/kup-chip/kup-chip.css +1 -0
- package/dist/collection/components/kup-chip/kup-chip.js +51 -92
- package/dist/collection/components/kup-color-picker/kup-color-picker.css +1 -265
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +93 -48
- package/dist/collection/components/kup-combobox/kup-combobox.js +148 -115
- package/dist/collection/components/kup-dash/kup-dash.js +1 -1
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +5 -5
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +3 -1
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +28 -56
- package/dist/collection/components/kup-data-table/kup-data-table.css +4 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +345 -158
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +8 -5
- package/dist/collection/components/kup-drawer/kup-drawer.js +1 -1
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +2 -2
- package/dist/collection/components/kup-echart/assets/maps/africa.json +6116 -0
- package/dist/collection/components/kup-echart/assets/maps/america.json +5416 -0
- package/dist/collection/components/kup-echart/assets/maps/asia.json +6053 -0
- package/dist/collection/components/kup-echart/assets/maps/europe.json +5051 -0
- package/dist/collection/components/kup-echart/assets/maps/italy.json +3562 -0
- package/dist/collection/components/kup-echart/assets/maps/oceania.json +1069 -0
- package/dist/collection/components/kup-echart/assets/maps/world.json +23685 -0
- package/dist/collection/components/kup-echart/kup-echart-declarations.js +45 -0
- package/dist/collection/components/kup-echart/kup-echart.css +13 -0
- package/dist/collection/components/kup-echart/kup-echart.js +1165 -0
- package/dist/collection/components/kup-field/kup-field.js +2 -2
- package/dist/collection/components/kup-gauge/kup-gauge.js +3 -3
- package/dist/collection/components/kup-grid/kup-grid.css +2 -2
- package/dist/collection/components/kup-grid/kup-grid.js +6 -5
- package/dist/collection/components/kup-iframe/kup-iframe.js +2 -2
- package/dist/collection/components/kup-image/assets/svg/science.svg +1 -0
- package/dist/collection/components/kup-image/kup-image.js +3 -3
- package/dist/collection/components/kup-lazy/kup-lazy.css +21 -11
- package/dist/collection/components/kup-lazy/kup-lazy.js +62 -3
- package/dist/collection/components/kup-list/kup-list-helper.js +7 -1
- package/dist/collection/components/kup-list/kup-list.css +3 -0
- package/dist/collection/components/kup-list/kup-list.js +219 -288
- package/dist/collection/components/kup-magic-box/kup-magic-box-declarations.js +11 -7
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +90 -41
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
- package/dist/collection/components/kup-probe/kup-probe.js +1 -1
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
- package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
- package/dist/collection/components/kup-radio/kup-radio.js +1 -1
- package/dist/collection/components/kup-rating/kup-rating.js +1 -1
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
- package/dist/collection/components/kup-spinner/kup-spinner.js +1 -1
- package/dist/collection/components/kup-state/mock-store.js +1 -1
- package/dist/collection/components/kup-switch/kup-switch.js +1 -1
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +3 -3
- package/dist/collection/components/kup-text-field/kup-text-field.css +2 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +2 -2
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +8 -5
- package/dist/collection/components/kup-tooltip/kup-tooltip.js +3 -3
- package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -5
- package/dist/collection/components/kup-tree/kup-tree-faker.js +2 -3
- package/dist/collection/components/kup-tree/kup-tree.css +2 -0
- package/dist/collection/components/kup-tree/kup-tree.js +145 -70
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +3 -1
- package/dist/collection/f-components/f-cell/f-cell.js +29 -19
- package/dist/collection/f-components/f-chip/f-chip.js +76 -87
- package/dist/collection/f-components/f-image/f-image.js +2 -2
- package/dist/collection/f-components/f-paginator/f-paginator-declarations.js +5 -0
- package/dist/collection/f-components/f-paginator/f-paginator-utils.js +28 -0
- package/dist/collection/f-components/f-paginator/f-paginator.js +91 -0
- package/dist/collection/f-components/f-text-field/f-text-field.js +4 -4
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +52 -0
- package/dist/collection/managers/kup-data/kup-data-column-helper.js +272 -0
- package/dist/collection/managers/kup-data/kup-data-declarations.js +9 -0
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +72 -0
- package/dist/collection/managers/kup-data/kup-data-row-helper.js +28 -0
- package/dist/collection/managers/kup-data/kup-data.js +382 -0
- package/dist/collection/{utils → managers}/kup-dates/kup-dates-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-dates/kup-dates.js +53 -19
- package/dist/collection/{utils → managers}/kup-debug/kup-debug-browser-utils.js +1 -1
- package/dist/collection/{utils → managers}/kup-debug/kup-debug-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-debug/kup-debug.js +79 -124
- package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-dynamic-position/kup-dynamic-position.js +10 -1
- package/dist/collection/{utils → managers}/kup-interact/kup-interact-declarations.js +1 -0
- package/dist/collection/{utils → managers}/kup-interact/kup-interact.js +22 -13
- package/dist/collection/{utils → managers}/kup-language/kup-language-declarations.js +10 -0
- package/dist/collection/{utils → managers}/kup-language/kup-language.js +5 -5
- package/dist/collection/{utils → managers}/kup-manager/kup-manager-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-manager/kup-manager.js +45 -4
- package/dist/collection/managers/kup-math/kup-math-declarations.js +13 -0
- package/dist/collection/managers/kup-math/kup-math-helper.js +39 -0
- package/dist/collection/managers/kup-math/kup-math.js +151 -0
- package/dist/collection/{utils → managers}/kup-objects/kup-objects-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-objects/kup-objects.js +15 -0
- package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.js +0 -0
- package/dist/collection/{utils → managers}/kup-search/kup-search-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-search/kup-search.js +0 -0
- package/dist/collection/{utils → managers}/kup-theme/kup-theme-declarations.js +99 -0
- package/dist/collection/{utils → managers}/kup-theme/kup-theme.js +117 -68
- package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar-declarations.js +0 -0
- package/dist/collection/{utils → managers}/kup-toolbar/kup-toolbar.js +0 -0
- package/dist/collection/types/GenericTypes.js +48 -1
- package/dist/collection/utils/cell-utils.js +3 -4
- package/dist/collection/utils/filters/filters-column-menu.js +7 -7
- package/dist/collection/utils/filters/filters-rows.js +2 -2
- package/dist/collection/utils/filters/filters-tree-items.js +12 -12
- package/dist/collection/utils/filters/filters.js +3 -2
- package/dist/collection/utils/kup-column-menu/kup-column-menu-declarations.js +1 -0
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +100 -68
- package/dist/collection/utils/utils.js +4 -4
- package/dist/esm/{cell-utils-8f512ea9.js → cell-utils-571978d6.js} +4 -4
- package/dist/esm/{component-d2803feb.js → component-c4eb6153.js} +204 -170
- package/dist/esm/{f-button-30dbcaa9.js → f-button-b3011cc2.js} +2 -2
- package/dist/esm/{f-cell-95c186c6.js → f-cell-b88b2731.js} +38 -28
- package/dist/esm/f-chip-a52489ec.js +128 -0
- package/dist/esm/{f-image-3bc8b24f.js → f-image-5e5ed7e2.js} +3 -3
- package/dist/esm/{index-e0e67c23.js → index-78f3699d.js} +23 -0
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +7 -7
- package/dist/esm/{kup-autocomplete_28.entry.js → kup-autocomplete_27.entry.js} +4420 -3856
- package/dist/esm/kup-calendar.entry.js +626 -359
- package/dist/esm/kup-cell.entry.js +15 -13
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +8 -7
- package/dist/esm/kup-drawer.entry.js +3 -3
- package/dist/esm/kup-echart.entry.js +93035 -0
- package/dist/esm/kup-field.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-lazy.entry.js +22 -5
- package/dist/esm/kup-magic-box.entry.js +95 -42
- package/dist/esm/{kup-manager-7fc234da.js → kup-manager-1f76a3ef.js} +3388 -753
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- 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 +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{tslib.es6-e6137777.js → tslib.es6-8f2d44b6.js} +13 -1
- package/dist/esm/utils-93ae800f.js +461 -0
- package/dist/ketchup/assets/maps/africa.json +6116 -0
- package/dist/ketchup/assets/maps/america.json +5416 -0
- package/dist/ketchup/assets/maps/asia.json +6053 -0
- package/dist/ketchup/assets/maps/europe.json +5051 -0
- package/dist/ketchup/assets/maps/italy.json +3562 -0
- package/dist/ketchup/assets/maps/oceania.json +1069 -0
- package/dist/ketchup/assets/maps/world.json +23685 -0
- package/dist/ketchup/assets/svg/science.svg +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-a878016f.entry.js → p-088a886c.entry.js} +1 -1
- package/dist/ketchup/p-135cabdc.entry.js +1 -0
- package/dist/ketchup/{p-1c6178e4.entry.js → p-1c1e830f.entry.js} +1 -1
- package/dist/ketchup/{p-62816d0b.entry.js → p-29208220.entry.js} +1 -1
- package/dist/ketchup/{p-ca0ca27f.entry.js → p-2b9f2019.entry.js} +1 -1
- package/dist/ketchup/p-52d0582a.js +1 -0
- package/dist/ketchup/p-554bd5f0.entry.js +39 -0
- package/dist/ketchup/{p-de83f2f6.js → p-5f52e313.js} +1 -1
- package/dist/ketchup/{p-ccda584a.entry.js → p-65449480.entry.js} +1 -1
- package/dist/ketchup/p-79cf3874.entry.js +1 -0
- package/dist/ketchup/p-7a85cda4.js +1 -0
- package/dist/ketchup/p-84cce555.entry.js +27 -0
- package/dist/ketchup/p-8c44c3b9.js +135 -0
- package/dist/ketchup/{p-65adc15b.entry.js → p-9d49cdb2.entry.js} +1 -1
- package/dist/ketchup/{p-5a4a5fdc.js → p-a0b1d769.js} +1 -1
- package/dist/ketchup/{p-dbb6998b.entry.js → p-a2b6672e.entry.js} +1 -1
- package/dist/ketchup/{p-a378ba56.entry.js → p-a4be630b.entry.js} +1 -1
- package/dist/ketchup/p-c072b270.js +1 -0
- package/dist/ketchup/{p-1baf1205.entry.js → p-c648972c.entry.js} +1 -1
- package/dist/ketchup/{p-af4a6191.entry.js → p-d67d39c0.entry.js} +1 -1
- package/dist/ketchup/p-d6e2f2b0.entry.js +1 -0
- package/dist/ketchup/{p-44375e49.js → p-da387e0e.js} +1 -1
- package/dist/ketchup/p-e5c9ec9e.js +1 -0
- package/dist/ketchup/{p-cb5f4994.js → p-ed0b8666.js} +0 -0
- package/dist/ketchup/p-ef539eda.js +9 -0
- package/dist/ketchup/p-f316234c.entry.js +143 -0
- package/dist/types/components/kup-accordion/kup-accordion-declarations.d.ts +2 -2
- package/dist/types/components/kup-autocomplete/kup-autocomplete-declarations.d.ts +6 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +29 -22
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +7 -11
- package/dist/types/components/kup-box/kup-box.d.ts +4 -4
- package/dist/types/components/kup-button-list/kup-button-list-declarations.d.ts +6 -1
- package/dist/types/components/kup-button-list/kup-button-list.d.ts +4 -3
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +28 -10
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +19 -47
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +27 -0
- package/dist/types/components/kup-card/{builtin → built-in}/kup-card-calendar.d.ts +0 -0
- package/dist/types/components/kup-card/{builtin → built-in}/kup-card-clock.d.ts +0 -0
- package/dist/types/components/kup-card/built-in/kup-card-column-drop-menu.d.ts +3 -0
- package/dist/types/components/kup-card/free/kup-card-free.d.ts +7 -1
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +46 -21
- package/dist/types/components/kup-card/kup-card.d.ts +9 -2
- package/dist/types/components/kup-cell/kup-cell.d.ts +3 -3
- package/dist/types/components/kup-chart/kup-chart-builder.d.ts +5 -5
- package/dist/types/components/kup-chart/kup-chart-declarations.d.ts +3 -3
- package/dist/types/components/kup-chart/kup-chart.d.ts +2 -2
- package/dist/types/components/kup-chip/kup-chip-declarations.d.ts +6 -3
- package/dist/types/components/kup-chip/kup-chip.d.ts +9 -13
- package/dist/types/components/kup-color-picker/kup-color-picker.d.ts +7 -3
- package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +4 -0
- package/dist/types/components/kup-combobox/kup-combobox.d.ts +11 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +2 -2
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +45 -104
- package/dist/types/components/kup-data-table/kup-data-table-helper.d.ts +8 -11
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +49 -27
- package/dist/types/components/kup-echart/kup-echart-declarations.d.ts +55 -0
- package/dist/types/components/kup-echart/kup-echart.d.ts +100 -0
- package/dist/types/components/kup-lazy/kup-lazy.d.ts +13 -1
- package/dist/types/components/kup-list/kup-list-declarations.d.ts +2 -1
- package/dist/types/components/kup-list/kup-list.d.ts +4 -35
- package/dist/types/components/kup-magic-box/kup-magic-box-declarations.d.ts +6 -10
- package/dist/types/components/kup-magic-box/kup-magic-box.d.ts +7 -11
- package/dist/types/components/kup-tooltip/kup-tooltip-declarations.d.ts +11 -13
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +14 -35
- package/dist/types/components/kup-tree/kup-tree-faker.d.ts +10 -10
- package/dist/types/components/kup-tree/kup-tree.d.ts +45 -35
- package/dist/types/components.d.ts +305 -186
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +11 -10
- package/dist/types/f-components/f-chip/f-chip-declarations.d.ts +7 -22
- package/dist/types/f-components/f-paginator/f-paginator-declarations.d.ts +22 -0
- package/dist/types/f-components/f-paginator/f-paginator-utils.d.ts +2 -0
- package/dist/types/f-components/f-paginator/f-paginator.d.ts +3 -0
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +24 -0
- package/dist/types/managers/kup-data/kup-data-column-helper.d.ts +31 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +160 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +23 -0
- package/dist/types/managers/kup-data/kup-data-row-helper.d.ts +14 -0
- package/dist/types/managers/kup-data/kup-data.d.ts +77 -0
- package/dist/types/{utils → managers}/kup-dates/kup-dates-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-dates/kup-dates.d.ts +24 -2
- package/dist/types/{utils → managers}/kup-debug/kup-debug-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-debug/kup-debug.d.ts +6 -13
- package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position-declarations.d.ts +1 -0
- package/dist/types/{utils → managers}/kup-dynamic-position/kup-dynamic-position.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-interact/kup-interact-declarations.d.ts +9 -8
- package/dist/types/{utils → managers}/kup-interact/kup-interact.d.ts +7 -6
- package/dist/types/{utils → managers}/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/{utils → managers}/kup-language/kup-language.d.ts +3 -3
- package/dist/types/{utils → managers}/kup-manager/kup-manager-declarations.d.ts +21 -2
- package/dist/types/{utils → managers}/kup-manager/kup-manager.d.ts +4 -0
- package/dist/types/managers/kup-math/kup-math-declarations.d.ts +21 -0
- package/dist/types/managers/kup-math/kup-math-helper.d.ts +17 -0
- package/dist/types/managers/kup-math/kup-math.d.ts +60 -0
- package/dist/types/{utils → managers}/kup-objects/kup-objects-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-search/kup-search-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-search/kup-search.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-theme/kup-theme-declarations.d.ts +37 -1
- package/dist/types/{utils → managers}/kup-theme/kup-theme.d.ts +19 -19
- package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar-declarations.d.ts +0 -0
- package/dist/types/{utils → managers}/kup-toolbar/kup-toolbar.d.ts +0 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/types/types/GenericTypes.d.ts +53 -6
- package/dist/types/utils/cell-utils.d.ts +7 -6
- package/dist/types/utils/filters/filters-column-menu.d.ts +16 -16
- package/dist/types/utils/filters/filters-rows.d.ts +10 -10
- package/dist/types/utils/filters/filters-tree-items.d.ts +7 -7
- package/dist/types/utils/helpers.d.ts +2 -2
- package/dist/types/utils/kup-column-menu/kup-column-menu-declarations.d.ts +1 -0
- package/dist/types/utils/kup-column-menu/kup-column-menu.d.ts +27 -33
- package/dist/types/utils/utils.d.ts +4 -2
- package/package.json +31 -26
- package/dist/cjs/f-chip-90d95d22.js +0 -141
- package/dist/cjs/utils-0cc466b9.js +0 -1492
- package/dist/collection/components/kup-card/builtin/kup-card-builtin.js +0 -20
- package/dist/collection/components/kup-paginator/kup-paginator-declarations.js +0 -5
- package/dist/collection/components/kup-paginator/kup-paginator.css +0 -46
- package/dist/collection/components/kup-paginator/kup-paginator.js +0 -408
- package/dist/esm/f-chip-c0e9c0ff.js +0 -139
- package/dist/esm/utils-6c73709d.js +0 -1470
- package/dist/ketchup/p-15321eae.js +0 -1
- package/dist/ketchup/p-5a5f2a53.js +0 -1
- package/dist/ketchup/p-61faaa38.js +0 -8
- package/dist/ketchup/p-7e23ea7c.entry.js +0 -1
- package/dist/ketchup/p-9d02a676.js +0 -134
- package/dist/ketchup/p-a96e6e32.entry.js +0 -1
- package/dist/ketchup/p-ad32821e.entry.js +0 -1
- package/dist/ketchup/p-c18c7bb0.entry.js +0 -27
- package/dist/ketchup/p-d4aa4922.js +0 -1
- package/dist/ketchup/p-ec3a3db9.js +0 -1
- package/dist/ketchup/p-ecccb3a4.entry.js +0 -45
- package/dist/types/components/kup-card/builtin/kup-card-builtin.d.ts +0 -14
- package/dist/types/components/kup-paginator/kup-paginator-declarations.d.ts +0 -11
- package/dist/types/components/kup-paginator/kup-paginator.d.ts +0 -48
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
|
|
2
|
+
import { KupLanguageTotals } from '../kup-language/kup-language-declarations';
|
|
3
|
+
import { KupDataNewColumnTypes, } from './kup-data-declarations';
|
|
4
|
+
const dom = document.documentElement;
|
|
5
|
+
/**
|
|
6
|
+
* Finds the columns matching the criteria specified in the filters argument.
|
|
7
|
+
* @param {KupDataDataset | Column[]} dataset - Input dataset or array of columns.
|
|
8
|
+
* @param {Partial<Column>} filters - Column interface containing the filters to match.
|
|
9
|
+
* @returns {Column[]} Columns matching the criteria.
|
|
10
|
+
*/
|
|
11
|
+
export function findColumns(dataset, filters) {
|
|
12
|
+
const columns = dataset.columns
|
|
13
|
+
? dataset.columns
|
|
14
|
+
: dataset;
|
|
15
|
+
const result = [];
|
|
16
|
+
for (let index = 0; index < columns.length; index++) {
|
|
17
|
+
const column = columns[index];
|
|
18
|
+
for (const key in filters) {
|
|
19
|
+
const filter = filters[key];
|
|
20
|
+
if (column[key] === filter) {
|
|
21
|
+
result.push(column);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Sets the given columns of the input dataset to be hidden.
|
|
29
|
+
* @param {KupDataDataset | Column[]} dataset - Input dataset or array of columns.
|
|
30
|
+
* @param {string[]} columns2hide - Names of columns to hide.
|
|
31
|
+
* @returns {KupDataColumn[]} Columns that were set to hidden.
|
|
32
|
+
*/
|
|
33
|
+
export function hideColumns(dataset, columns2hide) {
|
|
34
|
+
const columns = dataset.columns
|
|
35
|
+
? dataset.columns
|
|
36
|
+
: dataset;
|
|
37
|
+
const hidden = [];
|
|
38
|
+
for (let index = 0; index < columns.length; index++) {
|
|
39
|
+
const column = columns[index];
|
|
40
|
+
if (columns2hide.includes(column.name)) {
|
|
41
|
+
column.visible = false;
|
|
42
|
+
hidden.push(column);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return hidden;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Creates a new column with the specified options.
|
|
49
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
50
|
+
* @param {KupDataNewColumnTypes} type - Type of column creation.
|
|
51
|
+
* @param {KupDataNewColumnOptions} options - Options used by the submethods to create the column.
|
|
52
|
+
* @returns {string | Column} Returns the new column created or a string containing the error message (if something went wrong).
|
|
53
|
+
*/
|
|
54
|
+
export function newColumn(dataset, type, options) {
|
|
55
|
+
switch (type) {
|
|
56
|
+
case KupDataNewColumnTypes.CONCATENATE:
|
|
57
|
+
return newColumnFromConcatenate(dataset, options.columns, options.separator);
|
|
58
|
+
case KupDataNewColumnTypes.MATH:
|
|
59
|
+
return newColumnFromMath(dataset, options.operation, options.columns);
|
|
60
|
+
case KupDataNewColumnTypes.MERGE:
|
|
61
|
+
return newColumnFromMerge(dataset, options.columns, options.newColumn);
|
|
62
|
+
default:
|
|
63
|
+
const message = 'Wrong type used to invoke new column creation!(' + type + ')';
|
|
64
|
+
dom.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
65
|
+
return message;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* This method concatenates all the columns specified in the argument into a single one.
|
|
70
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
71
|
+
* @param {string[]} columns - Array of column names.
|
|
72
|
+
* @param {string} separator - Characters used to separate values.
|
|
73
|
+
* @returns {string|Column} Returns the new column created or a string containing the error message (if something went wrong).
|
|
74
|
+
*/
|
|
75
|
+
function newColumnFromConcatenate(dataset, columns, separator) {
|
|
76
|
+
if (!columns || columns.length === 0) {
|
|
77
|
+
const message = 'Invalid array, interrupting column merging!(' + columns + ')';
|
|
78
|
+
dom.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
79
|
+
return message;
|
|
80
|
+
}
|
|
81
|
+
let firstColumn = null;
|
|
82
|
+
const titles = [];
|
|
83
|
+
const objs = [];
|
|
84
|
+
separator = separator ? separator : ' ';
|
|
85
|
+
for (let index = 0; index < dataset.columns.length; index++) {
|
|
86
|
+
const col = dataset.columns[index];
|
|
87
|
+
if (columns.includes(col.name)) {
|
|
88
|
+
objs.push(col.obj);
|
|
89
|
+
titles[columns.indexOf(col.name)] = col.title;
|
|
90
|
+
}
|
|
91
|
+
if (columns[0] === col.name) {
|
|
92
|
+
firstColumn = col;
|
|
93
|
+
}
|
|
94
|
+
if (col.mergedFrom &&
|
|
95
|
+
col.mergedFrom.toString() === columns.toString()) {
|
|
96
|
+
const message = 'The product of these columns in the same order already exists!(' +
|
|
97
|
+
columns.toString() +
|
|
98
|
+
')';
|
|
99
|
+
dom.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
100
|
+
return message;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const newName = columns.join('_');
|
|
104
|
+
const newObj = objs.length > 0 && dom.ketchup.objects.isSameKupObj(objs)
|
|
105
|
+
? objs[0]
|
|
106
|
+
: null;
|
|
107
|
+
const newTitle = titles.join(separator);
|
|
108
|
+
dataset.rows.forEach((row) => {
|
|
109
|
+
const cells = row.cells;
|
|
110
|
+
const values = [];
|
|
111
|
+
let base = null;
|
|
112
|
+
if (cells) {
|
|
113
|
+
for (let index = 0; index < columns.length; index++) {
|
|
114
|
+
const column = columns[index];
|
|
115
|
+
const cell = cells[column];
|
|
116
|
+
if (cell) {
|
|
117
|
+
if (!base) {
|
|
118
|
+
base = cell;
|
|
119
|
+
}
|
|
120
|
+
values.push(cell.value);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const value = values.join(separator);
|
|
125
|
+
if (values.length > 0) {
|
|
126
|
+
cells[newName] = Object.assign(Object.assign({}, base), { displayedValue: null, obj: newObj ? Object.assign(Object.assign({}, newObj), { k: value }) : null, value: value });
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
const newColumn = Object.assign(Object.assign({}, firstColumn), { name: newName, title: newTitle, obj: newObj, mergedFrom: columns });
|
|
130
|
+
dataset.columns.splice(dataset.columns.indexOf(firstColumn) + 1, 0, newColumn);
|
|
131
|
+
return newColumn;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* This method is used to create a new column from a mathematical formula.
|
|
135
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
136
|
+
* @param {string} operation - Mathematical operation to apply (i.e.: "sum", "average", ([COL1] - [COL2]) * 100 / [COL3]).
|
|
137
|
+
* @param {string[]} columns - Column names used for the mathematical operation. When missing, they will be extracted from the formula.
|
|
138
|
+
* @returns {string | KupDataColumn} Returns the new column created or a string containing the error message (if something went wrong).
|
|
139
|
+
*/
|
|
140
|
+
function newColumnFromMath(dataset, operation, columns) {
|
|
141
|
+
if (!columns) {
|
|
142
|
+
columns = [];
|
|
143
|
+
}
|
|
144
|
+
if (columns.length === 0) {
|
|
145
|
+
const names = operation.split('[');
|
|
146
|
+
for (let i = 1; i < names.length; i++) {
|
|
147
|
+
columns.push(names[i].split(']')[0]);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (columns.length === 0) {
|
|
151
|
+
const message = "Can't apply math formulas without columns!(" + columns + ')';
|
|
152
|
+
dom.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
153
|
+
return message;
|
|
154
|
+
}
|
|
155
|
+
const titles = [];
|
|
156
|
+
const formulaRow = {};
|
|
157
|
+
let firstColumn = null;
|
|
158
|
+
let formula = '';
|
|
159
|
+
switch (operation) {
|
|
160
|
+
case KupLanguageTotals.AVERAGE:
|
|
161
|
+
formula = `(${columns.join(' + ')}) / ${columns.length}`;
|
|
162
|
+
break;
|
|
163
|
+
case KupLanguageTotals.DIFFERENCE:
|
|
164
|
+
formula = columns.join(' - ');
|
|
165
|
+
break;
|
|
166
|
+
case KupLanguageTotals.PRODUCT:
|
|
167
|
+
formula = columns.join(' * ');
|
|
168
|
+
break;
|
|
169
|
+
case KupLanguageTotals.SUM:
|
|
170
|
+
formula = columns.join(' + ');
|
|
171
|
+
break;
|
|
172
|
+
default:
|
|
173
|
+
formula = operation;
|
|
174
|
+
}
|
|
175
|
+
for (let index = 0; index < dataset.columns.length; index++) {
|
|
176
|
+
const col = dataset.columns[index];
|
|
177
|
+
if (columns.includes(col.name)) {
|
|
178
|
+
titles[columns.indexOf(col.name)] = col.title;
|
|
179
|
+
if (!dom.ketchup.objects.isNumber(col.obj)) {
|
|
180
|
+
const message = "Can't apply math formulas on non-numerical columns!(" +
|
|
181
|
+
columns +
|
|
182
|
+
')';
|
|
183
|
+
dom.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
184
|
+
return message;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (columns[0] === col.name) {
|
|
188
|
+
firstColumn = col;
|
|
189
|
+
}
|
|
190
|
+
if (col.resultOf && col.resultOf === formula) {
|
|
191
|
+
const message = 'This mathematical operation on these columns was already performed!(' +
|
|
192
|
+
formula +
|
|
193
|
+
')';
|
|
194
|
+
dom.ketchup.debug.logMessage('kup-data', message, KupDebugCategory.WARNING);
|
|
195
|
+
return message;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
let prog = 0;
|
|
199
|
+
let newName = 'MATH_';
|
|
200
|
+
while (findColumns(dataset, { name: newName + prog }).length > 0) {
|
|
201
|
+
prog++;
|
|
202
|
+
}
|
|
203
|
+
newName = newName + prog;
|
|
204
|
+
const newObj = firstColumn.obj;
|
|
205
|
+
let newTitle = formula;
|
|
206
|
+
for (let i = 0; i < columns.length; i++) {
|
|
207
|
+
const column = columns[i];
|
|
208
|
+
let re = new RegExp(column, 'g');
|
|
209
|
+
newTitle = newTitle.replace(re, titles[i]);
|
|
210
|
+
}
|
|
211
|
+
dataset.rows.forEach((row) => {
|
|
212
|
+
const cells = row.cells;
|
|
213
|
+
let base = null;
|
|
214
|
+
if (cells) {
|
|
215
|
+
for (let index = 0; index < columns.length; index++) {
|
|
216
|
+
const column = columns[index];
|
|
217
|
+
const cell = cells[column];
|
|
218
|
+
if (cell) {
|
|
219
|
+
if (!base) {
|
|
220
|
+
base = cell;
|
|
221
|
+
}
|
|
222
|
+
formulaRow[column] = dom.ketchup.math.numberify(cell.value);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
const value = dom.ketchup.math.formulas
|
|
227
|
+
.custom(formula, formulaRow)
|
|
228
|
+
.toString();
|
|
229
|
+
cells[newName] = Object.assign(Object.assign({}, base), { displayedValue: null, obj: Object.assign(Object.assign({}, newObj), { k: value }), value: value });
|
|
230
|
+
});
|
|
231
|
+
const newColumn = Object.assign(Object.assign({}, firstColumn), { name: newName, title: newTitle, obj: newObj, resultOf: formula });
|
|
232
|
+
dataset.columns.splice(dataset.columns.indexOf(firstColumn) + 1, 0, newColumn);
|
|
233
|
+
return newColumn;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Takes the columns to merge and creates a new column with their cells. The merged columns will then be removed.
|
|
237
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
238
|
+
* @param {string[]} columns2merge - Names of columns to merge.
|
|
239
|
+
* @param {KupDataColumn} newColumn - Column created.
|
|
240
|
+
* @returns {KupDataColumn} Resulting column.
|
|
241
|
+
*/
|
|
242
|
+
export function newColumnFromMerge(dataset, columns2merge, newColumn) {
|
|
243
|
+
const outputCells = [];
|
|
244
|
+
for (let index = 0; index < dataset.rows.length; index++) {
|
|
245
|
+
const row = dataset.rows[index];
|
|
246
|
+
const cells = row.cells;
|
|
247
|
+
for (const key in cells) {
|
|
248
|
+
const cell = cells[key];
|
|
249
|
+
if (columns2merge.includes(key)) {
|
|
250
|
+
outputCells.push(Object.assign({}, cell));
|
|
251
|
+
delete cells[key];
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
for (let index = 0; index < columns2merge.length; index++) {
|
|
256
|
+
const column2removeIndex = dataset.columns.findIndex((col) => col.name === columns2merge[index]);
|
|
257
|
+
dataset.columns.splice(column2removeIndex, 1);
|
|
258
|
+
}
|
|
259
|
+
let rowIndex = 0;
|
|
260
|
+
for (let index = 0; index < outputCells.length; index++) {
|
|
261
|
+
const outputCell = outputCells[index];
|
|
262
|
+
let row = null;
|
|
263
|
+
if (!dataset.rows[rowIndex]) {
|
|
264
|
+
dataset.rows[rowIndex] = { cells: {} };
|
|
265
|
+
}
|
|
266
|
+
row = dataset.rows[rowIndex];
|
|
267
|
+
row.cells[newColumn.name] = outputCell;
|
|
268
|
+
rowIndex++;
|
|
269
|
+
}
|
|
270
|
+
dataset.columns.push(newColumn);
|
|
271
|
+
return newColumn;
|
|
272
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types of column creation when invoking column.new.
|
|
3
|
+
*/
|
|
4
|
+
export var KupDataNewColumnTypes;
|
|
5
|
+
(function (KupDataNewColumnTypes) {
|
|
6
|
+
KupDataNewColumnTypes["CONCATENATE"] = "concatenate";
|
|
7
|
+
KupDataNewColumnTypes["MATH"] = "math";
|
|
8
|
+
KupDataNewColumnTypes["MERGE"] = "merge";
|
|
9
|
+
})(KupDataNewColumnTypes || (KupDataNewColumnTypes = {}));
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes the given node from the input array, by searching even children.
|
|
3
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
4
|
+
* @param {KupDataNode} node2remove - Node to remove.
|
|
5
|
+
* @returns {KupDataNode} Copy of the removed node.
|
|
6
|
+
*/
|
|
7
|
+
export function removeNode(nodes, node2remove) {
|
|
8
|
+
let removed = null;
|
|
9
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
10
|
+
recursive(nodes[index], nodes);
|
|
11
|
+
function recursive(node, array) {
|
|
12
|
+
const i = array.indexOf(node2remove);
|
|
13
|
+
if (i > -1) {
|
|
14
|
+
removed = Object.assign({}, node2remove);
|
|
15
|
+
array.splice(i, 1);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
for (let index = 0; node.children && index < node.children.length; index++) {
|
|
19
|
+
if (node.children[index]) {
|
|
20
|
+
recursive(node.children[index], node.children);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return removed;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Sets the values specified in the properties to every node of the input array.
|
|
29
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
30
|
+
* @param {Partial<KupDataNode>} properties - New properties values to set.
|
|
31
|
+
* @param {boolean} recursively - Sets values to every child node.
|
|
32
|
+
* @param {KupDataNode[]} exclude - Nodes to exclude (they won't be updated).
|
|
33
|
+
* @returns {KupDataNode[]} Array of the updated nodes.
|
|
34
|
+
*/
|
|
35
|
+
export function setPropertiesNode(nodes, properties, recursively, exclude) {
|
|
36
|
+
const updated = [];
|
|
37
|
+
if (!exclude) {
|
|
38
|
+
exclude = [];
|
|
39
|
+
}
|
|
40
|
+
if (recursively) {
|
|
41
|
+
nodes = toStreamNode(nodes);
|
|
42
|
+
}
|
|
43
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
44
|
+
const node = nodes[index];
|
|
45
|
+
for (const key in properties) {
|
|
46
|
+
if (!exclude.includes(node)) {
|
|
47
|
+
node[key] = properties[key];
|
|
48
|
+
updated.push(node);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return updated;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Streamlines an array of nodes by recursively fetching every child node.
|
|
56
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
57
|
+
* @returns {KupDataNode[]} Streamlined array of every node and their children.
|
|
58
|
+
*/
|
|
59
|
+
export function toStreamNode(nodes) {
|
|
60
|
+
const streamlined = [];
|
|
61
|
+
for (let index = 0; index < nodes.length; index++) {
|
|
62
|
+
const node = nodes[index];
|
|
63
|
+
recursive(node);
|
|
64
|
+
function recursive(node) {
|
|
65
|
+
streamlined.push(node);
|
|
66
|
+
for (let index = 0; node.children && index < node.children.length; index++) {
|
|
67
|
+
recursive(node.children[index]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return streamlined;
|
|
72
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const dom = document.documentElement;
|
|
2
|
+
/**
|
|
3
|
+
* Finds all the rows containing cells matching the filters criteria in the input dataset.
|
|
4
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
5
|
+
* @param {KupDataFindCellFilters} filters - Filters of the research.
|
|
6
|
+
* @returns {KupDataRow[]} Array of rows fetched after applying the filters.
|
|
7
|
+
*/
|
|
8
|
+
export function findRow(dataset, filters) {
|
|
9
|
+
return dom.ketchup.data.finder(dataset, filters).rows;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Converts the rows of the input dataset to tree nodes.
|
|
13
|
+
* @param {KupDataDataset} dataset - Input dataset.
|
|
14
|
+
* @returns {KupDataNode[]} Array of tree nodes.
|
|
15
|
+
*/
|
|
16
|
+
export function toNode(dataset) {
|
|
17
|
+
const nodes = [];
|
|
18
|
+
for (let index = 0; index < dataset.rows.length; index++) {
|
|
19
|
+
const node = Object.assign({}, dataset.rows[index]);
|
|
20
|
+
if (!node.value) {
|
|
21
|
+
node.value = dataset.rows[index].id
|
|
22
|
+
? dataset.rows[index].id
|
|
23
|
+
: '#' + (index + 1);
|
|
24
|
+
}
|
|
25
|
+
nodes.push(node);
|
|
26
|
+
}
|
|
27
|
+
return nodes;
|
|
28
|
+
}
|