@six-group/ui-library 4.0.0-beta.0 → 4.0.0-beta.1
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/{form-control-8e2ae807.js → form-control-2c17c573.js} +2 -2
- package/dist/cjs/{form-control-8e2ae807.js.map → form-control-2c17c573.js.map} +1 -1
- package/dist/cjs/{index-b3257a77.js → index-2f6daa5b.js} +1 -3
- package/dist/cjs/index-2f6daa5b.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/set-attributes_2.cjs.entry.js +1 -1
- package/dist/cjs/six-alert.cjs.entry.js +1 -1
- package/dist/cjs/six-avatar.cjs.entry.js +1 -1
- package/dist/cjs/six-badge.cjs.entry.js +1 -1
- package/dist/cjs/six-button.cjs.entry.js +1 -1
- package/dist/cjs/six-card.cjs.entry.js +1 -1
- package/dist/cjs/six-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/six-datepicker.cjs.entry.js +2 -2
- package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/six-details.cjs.entry.js +1 -1
- package/dist/cjs/six-dialog.cjs.entry.js +1 -1
- package/dist/cjs/six-drawer.cjs.entry.js +1 -1
- package/dist/cjs/{six-dropdown_3.cjs.entry.js → six-dropdown_2.cjs.entry.js} +2 -54
- package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -0
- package/dist/cjs/six-error-page.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
- package/dist/cjs/six-file-list.cjs.entry.js +1 -1
- package/dist/cjs/six-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/six-footer.cjs.entry.js +1 -1
- package/dist/cjs/six-form.cjs.entry.js +1 -1
- package/dist/cjs/six-group-label.cjs.entry.js +2 -2
- package/dist/cjs/six-header.cjs.entry.js +1 -1
- package/dist/cjs/six-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/six-icon.cjs.entry.js +1 -1
- package/dist/cjs/six-input.cjs.entry.js +2 -2
- package/dist/cjs/six-item-picker.cjs.entry.js +1 -1
- package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
- package/dist/cjs/six-layout-grid.cjs.entry.js +1 -1
- package/dist/cjs/six-main-container.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-divider.cjs.entry.js +1 -1
- package/dist/cjs/six-menu-item.cjs.entry.js +61 -0
- package/dist/cjs/six-menu-item.cjs.entry.js.map +1 -0
- package/dist/cjs/six-menu-label.cjs.entry.js +1 -1
- package/dist/cjs/six-picto.cjs.entry.js +1 -1
- package/dist/cjs/six-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/six-progress-ring.cjs.entry.js +1 -1
- package/dist/cjs/six-radio.cjs.entry.js +1 -1
- package/dist/cjs/six-range.cjs.entry.js +2 -2
- package/dist/cjs/six-root.cjs.entry.js +1 -1
- package/dist/cjs/six-search-field.cjs.entry.js +1 -1
- package/dist/cjs/six-select.cjs.entry.js +2 -2
- package/dist/cjs/six-sidebar-item-group.cjs.entry.js +1 -1
- package/dist/cjs/six-sidebar-item.cjs.entry.js +1 -1
- package/dist/cjs/six-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/six-spinner.cjs.entry.js +1 -1
- package/dist/cjs/six-switch.cjs.entry.js +1 -1
- package/dist/cjs/six-tab-group.cjs.entry.js +1 -1
- package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/six-tab.cjs.entry.js +1 -1
- package/dist/cjs/six-tag.cjs.entry.js +1 -1
- package/dist/cjs/six-textarea.cjs.entry.js +2 -2
- package/dist/cjs/six-tile.cjs.entry.js +1 -1
- package/dist/cjs/six-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/six-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ui-library.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +0 -5
- package/dist/collection/components/six-datepicker/six-datepicker.css +1 -1
- package/dist/collection/components/six-datepicker/six-datepicker.js +2 -2
- package/dist/collection/components/six-dropdown/six-dropdown.js +3 -3
- package/dist/collection/components/six-file-list-item/six-file-list-item.js +2 -2
- package/dist/collection/components/six-file-upload/six-file-upload.js +2 -2
- package/dist/collection/components/six-form/six-form.js +2 -2
- package/dist/collection/components/six-header/six-header.js +3 -3
- package/dist/collection/components/six-item-picker/six-item-picker.js +2 -2
- package/dist/collection/components/six-language-switcher/six-language-switcher.js +2 -2
- package/dist/collection/components/six-menu/six-menu.js +2 -2
- package/dist/collection/components/six-root/six-root.js +1 -1
- package/dist/collection/components/six-search-field/six-search-field.js +1 -1
- package/dist/collection/components/six-select/six-select.js +1 -1
- package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +1 -1
- package/dist/collection/components/six-tab-group/six-tab-group.js +2 -2
- package/dist/collection/components/six-timepicker/six-timepicker.js +2 -2
- package/dist/components/index.js +0 -10
- package/dist/components/index.js.map +1 -1
- package/dist/components/six-datepicker.js +1 -1
- package/dist/components/six-datepicker.js.map +1 -1
- package/dist/components.json +3 -488
- package/dist/esm/{form-control-bdd1478a.js → form-control-3b440ea1.js} +2 -2
- package/dist/esm/{form-control-bdd1478a.js.map → form-control-3b440ea1.js.map} +1 -1
- package/dist/esm/{index-96b1af5d.js → index-5c0f6628.js} +2 -3
- package/dist/esm/index-5c0f6628.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/set-attributes_2.entry.js +1 -1
- package/dist/esm/six-alert.entry.js +1 -1
- package/dist/esm/six-avatar.entry.js +1 -1
- package/dist/esm/six-badge.entry.js +1 -1
- package/dist/esm/six-button.entry.js +1 -1
- package/dist/esm/six-card.entry.js +1 -1
- package/dist/esm/six-checkbox.entry.js +2 -2
- package/dist/esm/six-datepicker.entry.js +2 -2
- package/dist/esm/six-datepicker.entry.js.map +1 -1
- package/dist/esm/six-details.entry.js +1 -1
- package/dist/esm/six-dialog.entry.js +1 -1
- package/dist/esm/six-drawer.entry.js +1 -1
- package/dist/esm/{six-dropdown_3.entry.js → six-dropdown_2.entry.js} +3 -54
- package/dist/esm/six-dropdown_2.entry.js.map +1 -0
- package/dist/esm/six-error-page.entry.js +1 -1
- package/dist/esm/six-file-list-item.entry.js +1 -1
- package/dist/esm/six-file-list.entry.js +1 -1
- package/dist/esm/six-file-upload.entry.js +1 -1
- package/dist/esm/six-footer.entry.js +1 -1
- package/dist/esm/six-form.entry.js +1 -1
- package/dist/esm/six-group-label.entry.js +2 -2
- package/dist/esm/six-header.entry.js +1 -1
- package/dist/esm/six-icon-button.entry.js +1 -1
- package/dist/esm/six-icon.entry.js +1 -1
- package/dist/esm/six-input.entry.js +2 -2
- package/dist/esm/six-item-picker.entry.js +1 -1
- package/dist/esm/six-language-switcher.entry.js +1 -1
- package/dist/esm/six-layout-grid.entry.js +1 -1
- package/dist/esm/six-main-container.entry.js +1 -1
- package/dist/esm/six-menu-divider.entry.js +1 -1
- package/dist/esm/six-menu-item.entry.js +57 -0
- package/dist/esm/six-menu-item.entry.js.map +1 -0
- package/dist/esm/six-menu-label.entry.js +1 -1
- package/dist/esm/six-picto.entry.js +1 -1
- package/dist/esm/six-progress-bar.entry.js +1 -1
- package/dist/esm/six-progress-ring.entry.js +1 -1
- package/dist/esm/six-radio.entry.js +1 -1
- package/dist/esm/six-range.entry.js +2 -2
- package/dist/esm/six-root.entry.js +1 -1
- package/dist/esm/six-search-field.entry.js +1 -1
- package/dist/esm/six-select.entry.js +2 -2
- package/dist/esm/six-sidebar-item-group.entry.js +1 -1
- package/dist/esm/six-sidebar-item.entry.js +1 -1
- package/dist/esm/six-sidebar.entry.js +1 -1
- package/dist/esm/six-spinner.entry.js +1 -1
- package/dist/esm/six-switch.entry.js +1 -1
- package/dist/esm/six-tab-group.entry.js +1 -1
- package/dist/esm/six-tab-panel.entry.js +1 -1
- package/dist/esm/six-tab.entry.js +1 -1
- package/dist/esm/six-tag.entry.js +1 -1
- package/dist/esm/six-textarea.entry.js +2 -2
- package/dist/esm/six-tile.entry.js +1 -1
- package/dist/esm/six-timepicker.entry.js +1 -1
- package/dist/esm/six-tooltip.entry.js +1 -1
- package/dist/esm/ui-library.js +3 -3
- package/dist/types/components.d.ts +0 -232
- package/dist/ui-library/{p-b1683e9c.entry.js → p-054e12cc.entry.js} +2 -2
- package/dist/ui-library/{p-b3974ad4.entry.js → p-097cced4.entry.js} +2 -2
- package/dist/ui-library/{p-0d1fdc4e.entry.js → p-0d79b0c6.entry.js} +2 -2
- package/dist/ui-library/{p-9eba5c71.entry.js → p-14f20bbb.entry.js} +2 -2
- package/dist/ui-library/{p-3d5cad2d.entry.js → p-18e5f772.entry.js} +2 -2
- package/dist/ui-library/{p-14db57aa.entry.js → p-19364560.entry.js} +2 -2
- package/dist/ui-library/{p-94ab37b2.entry.js → p-19b50b5a.entry.js} +2 -2
- package/dist/ui-library/{p-eb1ec1b7.entry.js → p-21859bca.entry.js} +2 -2
- package/dist/ui-library/{p-7cbc261b.entry.js → p-2e48c8d2.entry.js} +2 -2
- package/dist/ui-library/{p-80f32909.entry.js → p-308261c4.entry.js} +2 -2
- package/dist/ui-library/{p-5eb21538.entry.js → p-33f7e22b.entry.js} +2 -2
- package/dist/ui-library/{p-b66c5c48.entry.js → p-4ae91795.entry.js} +2 -2
- package/dist/ui-library/{p-1414a242.entry.js → p-53a13db5.entry.js} +2 -2
- package/dist/ui-library/{p-f9c50f81.entry.js → p-559c87f0.entry.js} +2 -2
- package/dist/ui-library/{p-12000282.entry.js → p-611e1978.entry.js} +2 -2
- package/dist/ui-library/{p-524e5804.entry.js → p-63703ba3.entry.js} +2 -2
- package/dist/ui-library/{p-c799a6bf.entry.js → p-6403fd87.entry.js} +2 -2
- package/dist/ui-library/p-6433c0da.entry.js +2 -0
- package/dist/ui-library/{p-f65aa796.entry.js.map → p-6433c0da.entry.js.map} +1 -1
- package/dist/ui-library/{p-52cb61bd.entry.js → p-6d75f216.entry.js} +2 -2
- package/dist/ui-library/{p-788281d0.entry.js → p-73597d13.entry.js} +2 -2
- package/dist/ui-library/{p-3c100309.js → p-79eee01b.js} +2 -2
- package/dist/ui-library/{p-9f9bef35.entry.js → p-7e0cc4ae.entry.js} +2 -2
- package/dist/ui-library/{p-4d4829db.entry.js → p-820c23f0.entry.js} +2 -2
- package/dist/ui-library/{p-232d43a6.entry.js → p-835c3ff7.entry.js} +2 -2
- package/dist/ui-library/{p-e4b6264b.entry.js → p-8a970a40.entry.js} +2 -2
- package/dist/ui-library/{p-3e3edcbc.entry.js → p-90824648.entry.js} +2 -2
- package/dist/ui-library/{p-4bcebd5a.entry.js → p-90dc6af4.entry.js} +2 -2
- package/dist/ui-library/{p-16732ac1.entry.js → p-9328e5bc.entry.js} +2 -2
- package/dist/ui-library/{p-3efe46cf.entry.js → p-97323ad7.entry.js} +2 -2
- package/dist/ui-library/{p-028a2f77.entry.js → p-9d1d222f.entry.js} +2 -2
- package/dist/ui-library/{p-f68b5c54.entry.js → p-a1d4f6cf.entry.js} +2 -2
- package/dist/ui-library/{p-16b99232.js → p-ac4f4d45.js} +3 -3
- package/dist/ui-library/p-ac4f4d45.js.map +1 -0
- package/dist/ui-library/{p-57a84d7f.entry.js → p-af793d04.entry.js} +2 -2
- package/dist/ui-library/{p-dd0ac344.entry.js → p-b0e5658f.entry.js} +2 -2
- package/dist/ui-library/p-b997e43c.entry.js +2 -0
- package/dist/ui-library/p-b997e43c.entry.js.map +1 -0
- package/dist/ui-library/{p-e1aed7ed.entry.js → p-baa03951.entry.js} +2 -2
- package/dist/ui-library/{p-6cc82df5.entry.js → p-c0cb6436.entry.js} +2 -2
- package/dist/ui-library/{p-ccee090e.entry.js → p-c30f9e0b.entry.js} +2 -2
- package/dist/ui-library/p-c349d1d4.entry.js +2 -0
- package/dist/ui-library/p-c349d1d4.entry.js.map +1 -0
- package/dist/ui-library/{p-4b44fa83.entry.js → p-c53a63f9.entry.js} +2 -2
- package/dist/ui-library/{p-cf2bdd34.entry.js → p-c640c2d8.entry.js} +2 -2
- package/dist/ui-library/{p-0c89817e.entry.js → p-c94d0b07.entry.js} +2 -2
- package/dist/ui-library/{p-694829b8.entry.js → p-d5633a29.entry.js} +2 -2
- package/dist/ui-library/{p-028a2c54.entry.js → p-dd3c76f1.entry.js} +2 -2
- package/dist/ui-library/{p-def4a925.entry.js → p-df655bc9.entry.js} +2 -2
- package/dist/ui-library/{p-8187701c.entry.js → p-e19a6c95.entry.js} +2 -2
- package/dist/ui-library/{p-ba6e1f0e.entry.js → p-edc96efc.entry.js} +2 -2
- package/dist/ui-library/p-f18ba86f.entry.js +2 -0
- package/dist/ui-library/p-f18ba86f.entry.js.map +1 -0
- package/dist/ui-library/{p-2a02734a.entry.js → p-f4938771.entry.js} +2 -2
- package/dist/ui-library/{p-e0bda772.entry.js → p-f70e2403.entry.js} +2 -2
- package/dist/ui-library/{p-55dc28ad.entry.js → p-f9d345e0.entry.js} +2 -2
- package/dist/ui-library/{p-28e6c2eb.entry.js → p-fed07a1f.entry.js} +2 -2
- package/dist/ui-library/{p-00507165.entry.js → p-ff0257bf.entry.js} +2 -2
- package/dist/ui-library/ui-library.css +2 -2
- package/dist/ui-library/ui-library.esm.js +1 -1
- package/dist/ui-library/ui-library.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-b3257a77.js.map +0 -1
- package/dist/cjs/six-dropdown_3.cjs.entry.js.map +0 -1
- package/dist/cjs/six-table-cell_4.cjs.entry.js +0 -107
- package/dist/cjs/six-table-cell_4.cjs.entry.js.map +0 -1
- package/dist/cjs/six-table.cjs.entry.js +0 -167
- package/dist/cjs/six-table.cjs.entry.js.map +0 -1
- package/dist/collection/components/six-table/six-table.css +0 -44
- package/dist/collection/components/six-table/six-table.js +0 -219
- package/dist/collection/components/six-table/six-table.js.map +0 -1
- package/dist/collection/components/six-table/test/helpers.js +0 -14
- package/dist/collection/components/six-table/test/helpers.js.map +0 -1
- package/dist/collection/components/six-table/types.js +0 -9
- package/dist/collection/components/six-table/types.js.map +0 -1
- package/dist/collection/components/six-table/util/filter-by.js +0 -34
- package/dist/collection/components/six-table/util/filter-by.js.map +0 -1
- package/dist/collection/components/six-table/util/from-data.js +0 -32
- package/dist/collection/components/six-table/util/from-data.js.map +0 -1
- package/dist/collection/components/six-table/util/is.js +0 -4
- package/dist/collection/components/six-table/util/is.js.map +0 -1
- package/dist/collection/components/six-table/util/quick-filter-by.js +0 -14
- package/dist/collection/components/six-table/util/quick-filter-by.js.map +0 -1
- package/dist/collection/components/six-table/util/sort-by.js +0 -25
- package/dist/collection/components/six-table/util/sort-by.js.map +0 -1
- package/dist/collection/components/six-table-cell/six-table-cell.css +0 -13
- package/dist/collection/components/six-table-cell/six-table-cell.js +0 -25
- package/dist/collection/components/six-table-cell/six-table-cell.js.map +0 -1
- package/dist/collection/components/six-table-header/six-table-header.css +0 -17
- package/dist/collection/components/six-table-header/six-table-header.js +0 -25
- package/dist/collection/components/six-table-header/six-table-header.js.map +0 -1
- package/dist/collection/components/six-table-header-cell/get-next-state.js +0 -7
- package/dist/collection/components/six-table-header-cell/get-next-state.js.map +0 -1
- package/dist/collection/components/six-table-header-cell/icons.js +0 -12
- package/dist/collection/components/six-table-header-cell/icons.js.map +0 -1
- package/dist/collection/components/six-table-header-cell/six-table-header-cell.css +0 -37
- package/dist/collection/components/six-table-header-cell/six-table-header-cell.js +0 -179
- package/dist/collection/components/six-table-header-cell/six-table-header-cell.js.map +0 -1
- package/dist/collection/components/six-table-header-cell/types.js +0 -2
- package/dist/collection/components/six-table-header-cell/types.js.map +0 -1
- package/dist/collection/components/six-table-header-cell/util/create-model.js +0 -7
- package/dist/collection/components/six-table-header-cell/util/create-model.js.map +0 -1
- package/dist/collection/components/six-table-header-cell/util/get-next-state.js +0 -7
- package/dist/collection/components/six-table-header-cell/util/get-next-state.js.map +0 -1
- package/dist/collection/components/six-table-row/six-table-row.css +0 -16
- package/dist/collection/components/six-table-row/six-table-row.js +0 -25
- package/dist/collection/components/six-table-row/six-table-row.js.map +0 -1
- package/dist/components/six-table-cell.d.ts +0 -11
- package/dist/components/six-table-cell.js +0 -8
- package/dist/components/six-table-cell.js.map +0 -1
- package/dist/components/six-table-cell2.js +0 -32
- package/dist/components/six-table-cell2.js.map +0 -1
- package/dist/components/six-table-header-cell.d.ts +0 -11
- package/dist/components/six-table-header-cell.js +0 -8
- package/dist/components/six-table-header-cell.js.map +0 -1
- package/dist/components/six-table-header-cell2.js +0 -120
- package/dist/components/six-table-header-cell2.js.map +0 -1
- package/dist/components/six-table-header.d.ts +0 -11
- package/dist/components/six-table-header.js +0 -8
- package/dist/components/six-table-header.js.map +0 -1
- package/dist/components/six-table-header2.js +0 -32
- package/dist/components/six-table-header2.js.map +0 -1
- package/dist/components/six-table-row.d.ts +0 -11
- package/dist/components/six-table-row.js +0 -8
- package/dist/components/six-table-row.js.map +0 -1
- package/dist/components/six-table-row2.js +0 -32
- package/dist/components/six-table-row2.js.map +0 -1
- package/dist/components/six-table.d.ts +0 -11
- package/dist/components/six-table.js +0 -252
- package/dist/components/six-table.js.map +0 -1
- package/dist/esm/index-96b1af5d.js.map +0 -1
- package/dist/esm/six-dropdown_3.entry.js.map +0 -1
- package/dist/esm/six-table-cell_4.entry.js +0 -100
- package/dist/esm/six-table-cell_4.entry.js.map +0 -1
- package/dist/esm/six-table.entry.js +0 -163
- package/dist/esm/six-table.entry.js.map +0 -1
- package/dist/types/components/six-table/six-table.d.ts +0 -30
- package/dist/types/components/six-table/test/helpers.d.ts +0 -2
- package/dist/types/components/six-table/types.d.ts +0 -33
- package/dist/types/components/six-table/util/filter-by.d.ts +0 -2
- package/dist/types/components/six-table/util/from-data.d.ts +0 -8
- package/dist/types/components/six-table/util/is.d.ts +0 -3
- package/dist/types/components/six-table/util/quick-filter-by.d.ts +0 -2
- package/dist/types/components/six-table/util/sort-by.d.ts +0 -2
- package/dist/types/components/six-table-cell/six-table-cell.d.ts +0 -9
- package/dist/types/components/six-table-header/six-table-header.d.ts +0 -9
- package/dist/types/components/six-table-header-cell/get-next-state.d.ts +0 -2
- package/dist/types/components/six-table-header-cell/icons.d.ts +0 -3
- package/dist/types/components/six-table-header-cell/six-table-header-cell.d.ts +0 -32
- package/dist/types/components/six-table-header-cell/types.d.ts +0 -2
- package/dist/types/components/six-table-header-cell/util/create-model.d.ts +0 -4
- package/dist/types/components/six-table-header-cell/util/get-next-state.d.ts +0 -3
- package/dist/types/components/six-table-row/six-table-row.d.ts +0 -9
- package/dist/ui-library/p-0d9cbb51.entry.js +0 -2
- package/dist/ui-library/p-0d9cbb51.entry.js.map +0 -1
- package/dist/ui-library/p-16b99232.js.map +0 -1
- package/dist/ui-library/p-2a61cc66.entry.js +0 -2
- package/dist/ui-library/p-2a61cc66.entry.js.map +0 -1
- package/dist/ui-library/p-60c5395c.entry.js +0 -2
- package/dist/ui-library/p-60c5395c.entry.js.map +0 -1
- package/dist/ui-library/p-7115416e.entry.js +0 -2
- package/dist/ui-library/p-7115416e.entry.js.map +0 -1
- package/dist/ui-library/p-f65aa796.entry.js +0 -2
- /package/dist/ui-library/{p-b1683e9c.entry.js.map → p-054e12cc.entry.js.map} +0 -0
- /package/dist/ui-library/{p-b3974ad4.entry.js.map → p-097cced4.entry.js.map} +0 -0
- /package/dist/ui-library/{p-0d1fdc4e.entry.js.map → p-0d79b0c6.entry.js.map} +0 -0
- /package/dist/ui-library/{p-9eba5c71.entry.js.map → p-14f20bbb.entry.js.map} +0 -0
- /package/dist/ui-library/{p-3d5cad2d.entry.js.map → p-18e5f772.entry.js.map} +0 -0
- /package/dist/ui-library/{p-14db57aa.entry.js.map → p-19364560.entry.js.map} +0 -0
- /package/dist/ui-library/{p-94ab37b2.entry.js.map → p-19b50b5a.entry.js.map} +0 -0
- /package/dist/ui-library/{p-eb1ec1b7.entry.js.map → p-21859bca.entry.js.map} +0 -0
- /package/dist/ui-library/{p-7cbc261b.entry.js.map → p-2e48c8d2.entry.js.map} +0 -0
- /package/dist/ui-library/{p-80f32909.entry.js.map → p-308261c4.entry.js.map} +0 -0
- /package/dist/ui-library/{p-5eb21538.entry.js.map → p-33f7e22b.entry.js.map} +0 -0
- /package/dist/ui-library/{p-b66c5c48.entry.js.map → p-4ae91795.entry.js.map} +0 -0
- /package/dist/ui-library/{p-1414a242.entry.js.map → p-53a13db5.entry.js.map} +0 -0
- /package/dist/ui-library/{p-f9c50f81.entry.js.map → p-559c87f0.entry.js.map} +0 -0
- /package/dist/ui-library/{p-12000282.entry.js.map → p-611e1978.entry.js.map} +0 -0
- /package/dist/ui-library/{p-524e5804.entry.js.map → p-63703ba3.entry.js.map} +0 -0
- /package/dist/ui-library/{p-c799a6bf.entry.js.map → p-6403fd87.entry.js.map} +0 -0
- /package/dist/ui-library/{p-52cb61bd.entry.js.map → p-6d75f216.entry.js.map} +0 -0
- /package/dist/ui-library/{p-788281d0.entry.js.map → p-73597d13.entry.js.map} +0 -0
- /package/dist/ui-library/{p-3c100309.js.map → p-79eee01b.js.map} +0 -0
- /package/dist/ui-library/{p-9f9bef35.entry.js.map → p-7e0cc4ae.entry.js.map} +0 -0
- /package/dist/ui-library/{p-4d4829db.entry.js.map → p-820c23f0.entry.js.map} +0 -0
- /package/dist/ui-library/{p-232d43a6.entry.js.map → p-835c3ff7.entry.js.map} +0 -0
- /package/dist/ui-library/{p-e4b6264b.entry.js.map → p-8a970a40.entry.js.map} +0 -0
- /package/dist/ui-library/{p-3e3edcbc.entry.js.map → p-90824648.entry.js.map} +0 -0
- /package/dist/ui-library/{p-4bcebd5a.entry.js.map → p-90dc6af4.entry.js.map} +0 -0
- /package/dist/ui-library/{p-16732ac1.entry.js.map → p-9328e5bc.entry.js.map} +0 -0
- /package/dist/ui-library/{p-3efe46cf.entry.js.map → p-97323ad7.entry.js.map} +0 -0
- /package/dist/ui-library/{p-028a2f77.entry.js.map → p-9d1d222f.entry.js.map} +0 -0
- /package/dist/ui-library/{p-f68b5c54.entry.js.map → p-a1d4f6cf.entry.js.map} +0 -0
- /package/dist/ui-library/{p-57a84d7f.entry.js.map → p-af793d04.entry.js.map} +0 -0
- /package/dist/ui-library/{p-dd0ac344.entry.js.map → p-b0e5658f.entry.js.map} +0 -0
- /package/dist/ui-library/{p-e1aed7ed.entry.js.map → p-baa03951.entry.js.map} +0 -0
- /package/dist/ui-library/{p-6cc82df5.entry.js.map → p-c0cb6436.entry.js.map} +0 -0
- /package/dist/ui-library/{p-ccee090e.entry.js.map → p-c30f9e0b.entry.js.map} +0 -0
- /package/dist/ui-library/{p-4b44fa83.entry.js.map → p-c53a63f9.entry.js.map} +0 -0
- /package/dist/ui-library/{p-cf2bdd34.entry.js.map → p-c640c2d8.entry.js.map} +0 -0
- /package/dist/ui-library/{p-0c89817e.entry.js.map → p-c94d0b07.entry.js.map} +0 -0
- /package/dist/ui-library/{p-694829b8.entry.js.map → p-d5633a29.entry.js.map} +0 -0
- /package/dist/ui-library/{p-028a2c54.entry.js.map → p-dd3c76f1.entry.js.map} +0 -0
- /package/dist/ui-library/{p-def4a925.entry.js.map → p-df655bc9.entry.js.map} +0 -0
- /package/dist/ui-library/{p-8187701c.entry.js.map → p-e19a6c95.entry.js.map} +0 -0
- /package/dist/ui-library/{p-ba6e1f0e.entry.js.map → p-edc96efc.entry.js.map} +0 -0
- /package/dist/ui-library/{p-2a02734a.entry.js.map → p-f4938771.entry.js.map} +0 -0
- /package/dist/ui-library/{p-e0bda772.entry.js.map → p-f70e2403.entry.js.map} +0 -0
- /package/dist/ui-library/{p-55dc28ad.entry.js.map → p-f9d345e0.entry.js.map} +0 -0
- /package/dist/ui-library/{p-28e6c2eb.entry.js.map → p-fed07a1f.entry.js.map} +0 -0
- /package/dist/ui-library/{p-00507165.entry.js.map → p-ff0257bf.entry.js.map} +0 -0
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { Host, h } from '@stencil/core';
|
|
2
|
-
import { isData } from './types';
|
|
3
|
-
import { fromData } from './util/from-data';
|
|
4
|
-
/**
|
|
5
|
-
* @since 1.0
|
|
6
|
-
* @status stable
|
|
7
|
-
*
|
|
8
|
-
* @slot - Used to define header and the rows of the table.
|
|
9
|
-
* @Deprecated - six-table will be removed with the next table. Use fate table instead.
|
|
10
|
-
*/
|
|
11
|
-
export class SixTable {
|
|
12
|
-
handleData({ detail }) {
|
|
13
|
-
if (!isData(detail)) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
this.data = detail;
|
|
17
|
-
}
|
|
18
|
-
async setData(value) {
|
|
19
|
-
if (!isData(value)) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
this.data = value;
|
|
23
|
-
}
|
|
24
|
-
componentDidLoad() {
|
|
25
|
-
this.tableReady.emit();
|
|
26
|
-
}
|
|
27
|
-
constructor() {
|
|
28
|
-
this.handleRowClick = (item) => (event) => {
|
|
29
|
-
this.tableRowClicked.emit({ event, item });
|
|
30
|
-
};
|
|
31
|
-
this.handleCellClick = (item, key) => (event) => {
|
|
32
|
-
this.tableCellClicked.emit({ event, item, key });
|
|
33
|
-
};
|
|
34
|
-
this.striped = false;
|
|
35
|
-
this.loading = false;
|
|
36
|
-
this.data = {
|
|
37
|
-
columns: {},
|
|
38
|
-
rows: [],
|
|
39
|
-
};
|
|
40
|
-
console.warn('six-table will be removed with the next table. Use fate table instead. In case of any question contact Daniel Häusler');
|
|
41
|
-
}
|
|
42
|
-
render() {
|
|
43
|
-
const loading = this.loading && (h("div", { class: "loading" }, h("six-spinner", { "data-testid": "loading-spinner" })));
|
|
44
|
-
return (h(Host, null, h("slot", null, fromData(this)), loading));
|
|
45
|
-
}
|
|
46
|
-
static get is() { return "six-table"; }
|
|
47
|
-
static get encapsulation() { return "shadow"; }
|
|
48
|
-
static get originalStyleUrls() {
|
|
49
|
-
return {
|
|
50
|
-
"$": ["six-table.scss"]
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
static get styleUrls() {
|
|
54
|
-
return {
|
|
55
|
-
"$": ["six-table.css"]
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
static get properties() {
|
|
59
|
-
return {
|
|
60
|
-
"striped": {
|
|
61
|
-
"type": "boolean",
|
|
62
|
-
"mutable": false,
|
|
63
|
-
"complexType": {
|
|
64
|
-
"original": "boolean",
|
|
65
|
-
"resolved": "boolean",
|
|
66
|
-
"references": {}
|
|
67
|
-
},
|
|
68
|
-
"required": false,
|
|
69
|
-
"optional": false,
|
|
70
|
-
"docs": {
|
|
71
|
-
"tags": [],
|
|
72
|
-
"text": "Set to true to stripe the table."
|
|
73
|
-
},
|
|
74
|
-
"attribute": "striped",
|
|
75
|
-
"reflect": false,
|
|
76
|
-
"defaultValue": "false"
|
|
77
|
-
},
|
|
78
|
-
"loading": {
|
|
79
|
-
"type": "boolean",
|
|
80
|
-
"mutable": false,
|
|
81
|
-
"complexType": {
|
|
82
|
-
"original": "boolean",
|
|
83
|
-
"resolved": "boolean",
|
|
84
|
-
"references": {}
|
|
85
|
-
},
|
|
86
|
-
"required": false,
|
|
87
|
-
"optional": false,
|
|
88
|
-
"docs": {
|
|
89
|
-
"tags": [],
|
|
90
|
-
"text": "Set to true to display loading indicator."
|
|
91
|
-
},
|
|
92
|
-
"attribute": "loading",
|
|
93
|
-
"reflect": false,
|
|
94
|
-
"defaultValue": "false"
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
static get states() {
|
|
99
|
-
return {
|
|
100
|
-
"data": {}
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
static get events() {
|
|
104
|
-
return [{
|
|
105
|
-
"method": "tableReady",
|
|
106
|
-
"name": "six-table-ready",
|
|
107
|
-
"bubbles": true,
|
|
108
|
-
"cancelable": true,
|
|
109
|
-
"composed": true,
|
|
110
|
-
"docs": {
|
|
111
|
-
"tags": [],
|
|
112
|
-
"text": "Emitted when table is ready."
|
|
113
|
-
},
|
|
114
|
-
"complexType": {
|
|
115
|
-
"original": "TableReadyPayload",
|
|
116
|
-
"resolved": "TableReadyPayload",
|
|
117
|
-
"references": {
|
|
118
|
-
"TableReadyPayload": {
|
|
119
|
-
"location": "import",
|
|
120
|
-
"path": "./types"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}, {
|
|
125
|
-
"method": "tableRowClicked",
|
|
126
|
-
"name": "six-table-row-clicked",
|
|
127
|
-
"bubbles": true,
|
|
128
|
-
"cancelable": true,
|
|
129
|
-
"composed": true,
|
|
130
|
-
"docs": {
|
|
131
|
-
"tags": [],
|
|
132
|
-
"text": "Emitted when table row is clicked."
|
|
133
|
-
},
|
|
134
|
-
"complexType": {
|
|
135
|
-
"original": "TableRowClickedPayload<Item>",
|
|
136
|
-
"resolved": "TableRowClickedPayload<Item>",
|
|
137
|
-
"references": {
|
|
138
|
-
"TableRowClickedPayload": {
|
|
139
|
-
"location": "import",
|
|
140
|
-
"path": "./types"
|
|
141
|
-
},
|
|
142
|
-
"Item": {
|
|
143
|
-
"location": "import",
|
|
144
|
-
"path": "./types"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}, {
|
|
149
|
-
"method": "tableCellClicked",
|
|
150
|
-
"name": "six-table-cell-clicked",
|
|
151
|
-
"bubbles": true,
|
|
152
|
-
"cancelable": true,
|
|
153
|
-
"composed": true,
|
|
154
|
-
"docs": {
|
|
155
|
-
"tags": [],
|
|
156
|
-
"text": "Emitted when table cell is clicked."
|
|
157
|
-
},
|
|
158
|
-
"complexType": {
|
|
159
|
-
"original": "TableCellClickedPayload<Item>",
|
|
160
|
-
"resolved": "TableCellClickedPayload<Item>",
|
|
161
|
-
"references": {
|
|
162
|
-
"TableCellClickedPayload": {
|
|
163
|
-
"location": "import",
|
|
164
|
-
"path": "./types"
|
|
165
|
-
},
|
|
166
|
-
"Item": {
|
|
167
|
-
"location": "import",
|
|
168
|
-
"path": "./types"
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}];
|
|
173
|
-
}
|
|
174
|
-
static get methods() {
|
|
175
|
-
return {
|
|
176
|
-
"setData": {
|
|
177
|
-
"complexType": {
|
|
178
|
-
"signature": "<T extends Item>(value: Data<T>) => Promise<void>",
|
|
179
|
-
"parameters": [{
|
|
180
|
-
"tags": [],
|
|
181
|
-
"text": ""
|
|
182
|
-
}],
|
|
183
|
-
"references": {
|
|
184
|
-
"Promise": {
|
|
185
|
-
"location": "global"
|
|
186
|
-
},
|
|
187
|
-
"Item": {
|
|
188
|
-
"location": "import",
|
|
189
|
-
"path": "./types"
|
|
190
|
-
},
|
|
191
|
-
"Data": {
|
|
192
|
-
"location": "import",
|
|
193
|
-
"path": "./types"
|
|
194
|
-
},
|
|
195
|
-
"T": {
|
|
196
|
-
"location": "global"
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
"return": "Promise<void>"
|
|
200
|
-
},
|
|
201
|
-
"docs": {
|
|
202
|
-
"text": "",
|
|
203
|
-
"tags": []
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
static get elementRef() { return "host"; }
|
|
209
|
-
static get listeners() {
|
|
210
|
-
return [{
|
|
211
|
-
"name": "data",
|
|
212
|
-
"method": "handleData",
|
|
213
|
-
"target": undefined,
|
|
214
|
-
"capture": false,
|
|
215
|
-
"passive": false
|
|
216
|
-
}];
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
//# sourceMappingURL=six-table.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"six-table.js","sourceRoot":"","sources":["../../../src/components/six-table/six-table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC9G,OAAO,EAAQ,MAAM,EAA4E,MAAM,SAAS,CAAC;AACjH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;;;;;;GAMG;AAOH,MAAM,OAAO,QAAQ;EAgBnB,UAAU,CAAiB,EAAE,MAAM,EAAwB;IACzD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;MACnB,OAAO;KACR;IAED,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC;EACrB,CAAC;EAGD,KAAK,CAAC,OAAO,CAAiB,KAAc;IAC1C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;MAClB,OAAO;KACR;IAED,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;EACpB,CAAC;EAOD,gBAAgB;IACd,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;EACzB,CAAC;EAcD;IAZA,mBAAc,GACZ,CAAiB,IAAO,EAAE,EAAE,CAC5B,CAAC,KAAiB,EAAE,EAAE;MACpB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;IAEJ,oBAAe,GACb,CAAiB,IAAO,EAAE,GAAW,EAAE,EAAE,CACzC,CAAC,KAAiB,EAAE,EAAE;MACpB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;IACnD,CAAC,CAAC;mBAhDc,KAAK;mBAEL,KAAK;gBA2BK;MAC1B,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,EAAE;KACT;IAmBC,OAAO,CAAC,IAAI,CACV,uHAAuH,CACxH,CAAC;GACH;EAED,MAAM;IACJ,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,CAC9B,WAAK,KAAK,EAAC,SAAS;MAClB,kCAAyB,iBAAiB,GAAG,CACzC,CACP,CAAC;IAEF,OAAO,CACL,EAAC,IAAI;MACH,gBAAO,QAAQ,CAAC,IAAI,CAAC,CAAQ;MAC5B,OAAO,CACH,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, State, Listen, Method, Element } from '@stencil/core';\nimport { Data, isData, TableReadyPayload, TableRowClickedPayload, TableCellClickedPayload, Item } from './types';\nimport { fromData } from './util/from-data';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define header and the rows of the table.\n * @Deprecated - six-table will be removed with the next table. Use fate table instead.\n */\n\n@Component({\n tag: 'six-table',\n styleUrl: 'six-table.scss',\n shadow: true,\n})\nexport class SixTable {\n @Element() host: HTMLSixTableElement;\n\n /** Set to true to stripe the table. */\n @Prop() striped = false;\n /** Set to true to display loading indicator. */\n @Prop() loading = false;\n\n /** Emitted when table is ready. */\n @Event({ eventName: 'six-table-ready' }) tableReady: EventEmitter<TableReadyPayload>;\n /** Emitted when table row is clicked. */\n @Event({ eventName: 'six-table-row-clicked' }) tableRowClicked: EventEmitter<TableRowClickedPayload<Item>>;\n /** Emitted when table cell is clicked. */\n @Event({ eventName: 'six-table-cell-clicked' }) tableCellClicked: EventEmitter<TableCellClickedPayload<Item>>;\n\n @Listen('data')\n handleData<T extends Item>({ detail }: CustomEvent<Data<T>>) {\n if (!isData(detail)) {\n return;\n }\n\n this.data = detail;\n }\n\n @Method()\n async setData<T extends Item>(value: Data<T>) {\n if (!isData(value)) {\n return;\n }\n\n this.data = value;\n }\n\n @State() data: Data<Item> = {\n columns: {},\n rows: [],\n };\n\n componentDidLoad() {\n this.tableReady.emit();\n }\n\n handleRowClick =\n <T extends Item>(item: T) =>\n (event: MouseEvent) => {\n this.tableRowClicked.emit({ event, item });\n };\n\n handleCellClick =\n <T extends Item>(item: T, key: string) =>\n (event: MouseEvent) => {\n this.tableCellClicked.emit({ event, item, key });\n };\n\n constructor() {\n console.warn(\n 'six-table will be removed with the next table. Use fate table instead. In case of any question contact Daniel Häusler'\n );\n }\n\n render() {\n const loading = this.loading && (\n <div class=\"loading\">\n <six-spinner data-testid=\"loading-spinner\" />\n </div>\n );\n\n return (\n <Host>\n <slot>{fromData(this)}</slot>\n {loading}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export const getTableRows = async (page) => {
|
|
2
|
-
const json = await page.evaluate(() => {
|
|
3
|
-
const rows = [
|
|
4
|
-
// when constructed from data
|
|
5
|
-
...Array.from(document.querySelector('six-table').shadowRoot.querySelectorAll('six-table-row')),
|
|
6
|
-
// when constructed from a template
|
|
7
|
-
...Array.from(document.querySelector('six-table').querySelectorAll('six-table-row')),
|
|
8
|
-
];
|
|
9
|
-
const data = rows.map((row) => Array.from(row.querySelectorAll('six-table-cell')).map((cell) => cell.textContent));
|
|
10
|
-
return JSON.stringify(data);
|
|
11
|
-
});
|
|
12
|
-
return JSON.parse(json);
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../src/components/six-table/test/helpers.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,IAAa,EAAE,EAAE;EAClD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;IACpC,MAAM,IAAI,GAAG;MACX,6BAA6B;MAC7B,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;MAC/F,mCAAmC;MACnC,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;KACrF,CAAC;IACF,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACnH,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;EAC9B,CAAC,CAAC,CAAC;EACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["import { E2EPage } from '@stencil/core/testing';\n\nexport const getTableRows = async (page: E2EPage) => {\n const json = await page.evaluate(() => {\n const rows = [\n // when constructed from data\n ...Array.from(document.querySelector('six-table').shadowRoot.querySelectorAll('six-table-row')),\n // when constructed from a template\n ...Array.from(document.querySelector('six-table').querySelectorAll('six-table-row')),\n ];\n const data = rows.map((row) => Array.from(row.querySelectorAll('six-table-cell')).map((cell) => cell.textContent));\n return JSON.stringify(data);\n });\n return JSON.parse(json);\n};\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const assertions = [
|
|
2
|
-
(value) => typeof value === 'object',
|
|
3
|
-
(value) => typeof value.columns === 'object',
|
|
4
|
-
(value) => Array.isArray(value.rows),
|
|
5
|
-
(value) => value.sort === undefined || typeof value.sort === 'object',
|
|
6
|
-
];
|
|
7
|
-
const apply = (value) => (f) => f(value);
|
|
8
|
-
export const isData = (value) => assertions.every(apply(value));
|
|
9
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/six-table/types.ts"],"names":[],"mappings":"AAgCA,MAAM,UAAU,GAAG;EACjB,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ;EACpC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ;EAC5C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;EACpC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ;CACtE,CAAC;AAEF,MAAM,KAAK,GACT,CAAI,KAAQ,EAAE,EAAE,CAChB,CAAC,CAAwB,EAAE,EAAE,CAC3B,CAAC,CAAC,KAAK,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,MAAM,GAAG,CAAI,KAAe,EAAoB,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC","sourcesContent":["import { SortDirection, FilterMode } from '../six-table-header-cell/types';\n\nexport type Item = Record<string, unknown>;\n\nexport type BasedOnKeys<T extends keyof any, B> = {\n [K in T]?: B;\n};\n\nexport type Columns<T> = BasedOnKeys<keyof T, string>;\n\nexport type SortModel<T> = BasedOnKeys<keyof T, SortDirection>;\n\nexport type Comparator<T> = (a: T, b: T) => number;\n\nexport type CompareModel<T> = BasedOnKeys<keyof T, Comparator<T>>;\n\nexport type FilterModel<T> = BasedOnKeys<keyof T, BasedOnKeys<FilterMode, string>>;\n\nexport type Renderer<T> = (value: T) => string;\n\nexport type RenderModel<T> = BasedOnKeys<keyof T, Renderer<T>>;\n\nexport type Data<T> = {\n columns: Columns<T>;\n sort?: SortModel<T>;\n compare?: CompareModel<T>;\n render?: RenderModel<T>;\n filter?: FilterModel<T>;\n quickFilter?: string;\n rows: T[];\n};\n\nconst assertions = [\n (value) => typeof value === 'object',\n (value) => typeof value.columns === 'object',\n (value) => Array.isArray(value.rows),\n (value) => value.sort === undefined || typeof value.sort === 'object',\n];\n\nconst apply =\n <T>(value: T) =>\n (f: (value: T) => boolean) =>\n f(value);\n\nexport const isData = <T>(value?: unknown): value is Data<T> => assertions.every(apply(value));\n\nexport interface TableReadyPayload {}\n\nexport interface TableRowClickedPayload<T extends Item> {\n event: MouseEvent;\n item: T;\n}\n\nexport interface TableCellClickedPayload<T extends Item> {\n event: MouseEvent;\n item: T;\n key: string;\n}\n"]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Invalid } from './is';
|
|
2
|
-
const modes = {
|
|
3
|
-
in: (a, b) => a.includes(b),
|
|
4
|
-
ni: (a, b) => !a.includes(b),
|
|
5
|
-
eq: (a, b) => a === b,
|
|
6
|
-
ne: (a, b) => a !== b,
|
|
7
|
-
};
|
|
8
|
-
export const filterBy = (filterModel = {}) => (item) => {
|
|
9
|
-
var _a;
|
|
10
|
-
const keys = Object.keys(filterModel);
|
|
11
|
-
if (keys.length === 0) {
|
|
12
|
-
return true;
|
|
13
|
-
}
|
|
14
|
-
for (const key of keys) {
|
|
15
|
-
const filter = filterModel[key];
|
|
16
|
-
if (!filter) {
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
for (const [mode, term] of Object.entries(filter)) {
|
|
20
|
-
if (Invalid.Term(term)) {
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
const value = String((_a = item[key]) !== null && _a !== void 0 ? _a : '');
|
|
24
|
-
if (Invalid.Term(value)) {
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
if (!modes[mode](value, term)) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return true;
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=filter-by.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-by.js","sourceRoot":"","sources":["../../../../src/components/six-table/util/filter-by.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAI/B,MAAM,KAAK,GAA+B;EACxC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;EAC3B,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;EAC5B,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;EACrB,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GACnB,CAAiB,cAA8B,EAAE,EAAE,EAAE,CACrD,CAAC,IAAO,EAAW,EAAE;;EACnB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;EAEtC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;IACrB,OAAO,IAAI,CAAC;GACb;EAED,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;IACtB,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IAEhC,IAAI,CAAC,MAAM,EAAE;MACX,OAAO,IAAI,CAAC;KACb;IAED,KAAK,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;MACjD,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACtB,SAAS;OACV;MAED,MAAM,KAAK,GAAG,MAAM,CAAC,MAAA,IAAI,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAC,CAAC;MAEtC,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;QACvB,SAAS;OACV;MAED,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;QAC7B,OAAO,KAAK,CAAC;OACd;KACF;GACF;EAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import { FilterModel, Item } from '../types';\nimport { FilterMode } from '../../six-table-header-cell/types';\nimport { Invalid } from './is';\n\ntype Filter = (a: string, b: string) => boolean;\n\nconst modes: Record<FilterMode, Filter> = {\n in: (a, b) => a.includes(b),\n ni: (a, b) => !a.includes(b),\n eq: (a, b) => a === b,\n ne: (a, b) => a !== b,\n};\n\nexport const filterBy =\n <T extends Item>(filterModel: FilterModel<T> = {}) =>\n (item: T): boolean => {\n const keys = Object.keys(filterModel);\n\n if (keys.length === 0) {\n return true;\n }\n\n for (const key of keys) {\n const filter = filterModel[key];\n\n if (!filter) {\n return true;\n }\n\n for (const [mode, term] of Object.entries(filter)) {\n if (Invalid.Term(term)) {\n continue;\n }\n\n const value = String(item[key] ?? '');\n\n if (Invalid.Term(value)) {\n continue;\n }\n\n if (!modes[mode](value, term)) {\n return false;\n }\n }\n }\n\n return true;\n };\n"]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { isData } from '../types';
|
|
2
|
-
import { filterBy } from './filter-by';
|
|
3
|
-
import { Fragment, h } from '@stencil/core';
|
|
4
|
-
import { sortBy } from './sort-by';
|
|
5
|
-
import { quickFilterBy } from './quick-filter-by';
|
|
6
|
-
const propOr = (k) => (o = {}, defaults) => o[k] || defaults;
|
|
7
|
-
export const fromData = ({ data, handleRowClick, handleCellClick }) => {
|
|
8
|
-
if (!isData(data)) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
const keys = Object.keys(data.columns);
|
|
12
|
-
const columns = keys.map((key) => {
|
|
13
|
-
const byKey = propOr(key);
|
|
14
|
-
const sort = byKey(data.sort, undefined);
|
|
15
|
-
const [[filter, value] = []] = Object.entries(byKey(data.filter, {}));
|
|
16
|
-
return (h("six-table-header-cell", { name: key, sort: sort, filter: filter, value: value }, data.columns[key]));
|
|
17
|
-
});
|
|
18
|
-
const quickFilter = quickFilterBy(Object.keys(data.columns), data.quickFilter);
|
|
19
|
-
const filter = filterBy(data.filter);
|
|
20
|
-
const sort = sortBy(data.sort, data.compare);
|
|
21
|
-
const rows = sort(data.rows.filter(quickFilter).filter(filter)).map((item, index) => {
|
|
22
|
-
const cells = keys.map((key) => {
|
|
23
|
-
const renderer = data.render && data.render[key];
|
|
24
|
-
// HTML is not escaped, responsibility lays on the caller
|
|
25
|
-
const html = typeof renderer === 'function' ? renderer(item) : String(item[key]);
|
|
26
|
-
return (h("six-table-cell", { onClick: handleCellClick(item, key), "data-testid": `table-cell-${key}-${index}`, innerHTML: html }));
|
|
27
|
-
});
|
|
28
|
-
return (h("six-table-row", { onClick: handleRowClick(item), "data-testid": `table-row-${index}` }, cells));
|
|
29
|
-
});
|
|
30
|
-
return (h(Fragment, null, h("six-table-header", { "data-testid": "table-header" }, columns), rows));
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=from-data.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"from-data.js","sourceRoot":"","sources":["../../../../src/components/six-table/util/from-data.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,MAAM,EAAQ,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AASlD,MAAM,MAAM,GACV,CAAC,CAAS,EAAE,EAAE,CACd,CAAoB,CAAC,GAAG,EAAE,EAAE,QAAW,EAAK,EAAE,CAC5C,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC;AAErB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAiB,EAAE,IAAI,EAAE,cAAc,EAAE,eAAe,EAAoB,EAAE,EAAE;EACtG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;IACjB,OAAO;GACR;EAED,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;EAEvC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;IAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAE1B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACzC,MAAM,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC,OAAO,CAAS,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;IAE9E,OAAO,CACL,6BAAuB,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAoB,EAAE,KAAK,EAAE,KAAK,IACrF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CACI,CACzB,CAAC;EACJ,CAAC,CAAC,CAAC;EAEH,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;EAC/E,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;EACrC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;EAE7C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;IAClF,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;MAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;MACjD,yDAAyD;MACzD,MAAM,IAAI,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;MAEjF,OAAO,CACL,sBACE,OAAO,EAAE,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,iBACtB,cAAc,GAAG,IAAI,KAAK,EAAE,EACzC,SAAS,EAAE,IAAI,GACf,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,qBAAe,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,iBAAe,aAAa,KAAK,EAAE,IAC5E,KAAK,CACQ,CACjB,CAAC;EACJ,CAAC,CAAC,CAAC;EAEH,OAAO,CACL,EAAC,QAAQ;IACP,uCAA8B,cAAc,IAAE,OAAO,CAAoB;IACxE,IAAI,CACI,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Data, isData, Item } from '../types';\nimport { filterBy } from './filter-by';\nimport { Fragment, h } from '@stencil/core';\nimport { sortBy } from './sort-by';\nimport { quickFilterBy } from './quick-filter-by';\nimport { FilterMode } from '../../six-table-header-cell/types';\n\ninterface FromDataProps<T extends Item> {\n data: Data<T>;\n handleRowClick: (item: T) => (event: MouseEvent) => void;\n handleCellClick: (item: T, key: string) => (event: MouseEvent) => void;\n}\n\nconst propOr =\n (k: string) =>\n <T extends unknown>(o = {}, defaults: T): T =>\n o[k] || defaults;\n\nexport const fromData = <T extends Item>({ data, handleRowClick, handleCellClick }: FromDataProps<T>) => {\n if (!isData(data)) {\n return;\n }\n\n const keys = Object.keys(data.columns);\n\n const columns = keys.map((key) => {\n const byKey = propOr(key);\n\n const sort = byKey(data.sort, undefined);\n const [[filter, value] = []] = Object.entries<string>(byKey(data.filter, {}));\n\n return (\n <six-table-header-cell name={key} sort={sort} filter={filter as FilterMode} value={value}>\n {data.columns[key]}\n </six-table-header-cell>\n );\n });\n\n const quickFilter = quickFilterBy(Object.keys(data.columns), data.quickFilter);\n const filter = filterBy(data.filter);\n const sort = sortBy(data.sort, data.compare);\n\n const rows = sort(data.rows.filter(quickFilter).filter(filter)).map((item, index) => {\n const cells = keys.map((key) => {\n const renderer = data.render && data.render[key];\n // HTML is not escaped, responsibility lays on the caller\n const html = typeof renderer === 'function' ? renderer(item) : String(item[key]);\n\n return (\n <six-table-cell\n onClick={handleCellClick(item, key)}\n data-testid={`table-cell-${key}-${index}`}\n innerHTML={html}\n />\n );\n });\n\n return (\n <six-table-row onClick={handleRowClick(item)} data-testid={`table-row-${index}`}>\n {cells}\n </six-table-row>\n );\n });\n\n return (\n <Fragment>\n <six-table-header data-testid=\"table-header\">{columns}</six-table-header>\n {rows}\n </Fragment>\n );\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is.js","sourceRoot":"","sources":["../../../../src/components/six-table/util/is.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG;EACrB,IAAI,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;CACzE,CAAC","sourcesContent":["export const Invalid = {\n Term: (value?: unknown) => typeof value !== 'string' || value.length < 1,\n};\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Invalid } from './is';
|
|
2
|
-
export const quickFilterBy = (keys, value) => (item) => {
|
|
3
|
-
if (Invalid.Term(value)) {
|
|
4
|
-
return true;
|
|
5
|
-
}
|
|
6
|
-
const term = value.toLowerCase();
|
|
7
|
-
const source = keys
|
|
8
|
-
.map((key) => { var _a; return (_a = item[key]) !== null && _a !== void 0 ? _a : ''; })
|
|
9
|
-
.map(String)
|
|
10
|
-
.join()
|
|
11
|
-
.toLowerCase();
|
|
12
|
-
return source.includes(term);
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=quick-filter-by.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quick-filter-by.js","sourceRoot":"","sources":["../../../../src/components/six-table/util/quick-filter-by.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,CAAC,MAAM,aAAa,GACxB,CAAiB,IAAc,EAAE,KAAc,EAAE,EAAE,CACnD,CAAC,IAAO,EAAW,EAAE;EACnB,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;IACvB,OAAO,IAAI,CAAC;GACb;EAED,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;EAEjC,MAAM,MAAM,GAAG,IAAI;KAChB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,WAAC,OAAA,MAAA,IAAI,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAA,EAAA,CAAC;KAC7B,GAAG,CAAC,MAAM,CAAC;KACX,IAAI,EAAE;KACN,WAAW,EAAE,CAAC;EAEjB,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC,CAAC","sourcesContent":["import { Item } from '../types';\nimport { Invalid } from './is';\n\nexport const quickFilterBy =\n <T extends Item>(keys: string[], value?: string) =>\n (item: T): boolean => {\n if (Invalid.Term(value)) {\n return true;\n }\n\n const term = value.toLowerCase();\n\n const source = keys\n .map((key) => item[key] ?? '')\n .map(String)\n .join()\n .toLowerCase();\n\n return source.includes(term);\n };\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const unordered = (value) => value === 'none';
|
|
2
|
-
const DEFAULT_COMPARATOR = (a, b) => String(a).localeCompare(String(b));
|
|
3
|
-
export const sortBy = (sort = {}, compare = {}) => (items) => {
|
|
4
|
-
const values = Object.values(sort);
|
|
5
|
-
if (values.length === 0 || values.every(unordered)) {
|
|
6
|
-
return items;
|
|
7
|
-
}
|
|
8
|
-
return [...items].sort((a, b) => {
|
|
9
|
-
return Object.entries(sort).reduce((acc, [k, v], index) => {
|
|
10
|
-
if (v === 'none') {
|
|
11
|
-
return acc;
|
|
12
|
-
}
|
|
13
|
-
const comparator = compare[k];
|
|
14
|
-
const direction = {
|
|
15
|
-
asc: +1,
|
|
16
|
-
desc: -1,
|
|
17
|
-
}[v];
|
|
18
|
-
if (comparator) {
|
|
19
|
-
return acc + direction * (comparator(a, b) << index);
|
|
20
|
-
}
|
|
21
|
-
return acc + direction * (DEFAULT_COMPARATOR(a[k], b[k]) << index);
|
|
22
|
-
}, 0);
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=sort-by.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sort-by.js","sourceRoot":"","sources":["../../../../src/components/six-table/util/sort-by.ts"],"names":[],"mappings":"AAGA,MAAM,SAAS,GAAG,CAAC,KAAoB,EAAE,EAAE,CAAC,KAAK,KAAK,MAAM,CAAC;AAE7D,MAAM,kBAAkB,GAAwB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7F,MAAM,CAAC,MAAM,MAAM,GACjB,CAAiB,OAAqB,EAAE,EAAE,UAA2B,EAAE,EAAE,EAAE,CAC3E,CAAC,KAAU,EAAE,EAAE;EACb,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;EAEnC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;IAClD,OAAO,KAAK,CAAC;GACd;EAED,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;IAC9B,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;MACxD,IAAI,CAAC,KAAK,MAAM,EAAE;QAChB,OAAO,GAAG,CAAC;OACZ;MAED,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;MAE9B,MAAM,SAAS,GAAG;QAChB,GAAG,EAAE,CAAC,CAAC;QACP,IAAI,EAAE,CAAC,CAAC;OACT,CAAC,CAAC,CAAC,CAAC;MAEL,IAAI,UAAU,EAAE;QACd,OAAO,GAAG,GAAG,SAAS,GAAG,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC;OACtD;MAED,OAAO,GAAG,GAAG,SAAS,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC;IACrE,CAAC,EAAE,CAAC,CAAC,CAAC;EACR,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { Comparator, CompareModel, Item, SortModel } from '../types';\nimport { SortDirection } from '../../six-table-header-cell/types';\n\nconst unordered = (value: SortDirection) => value === 'none';\n\nconst DEFAULT_COMPARATOR: Comparator<unknown> = (a, b) => String(a).localeCompare(String(b));\n\nexport const sortBy =\n <T extends Item>(sort: SortModel<T> = {}, compare: CompareModel<T> = {}) =>\n (items: T[]) => {\n const values = Object.values(sort);\n\n if (values.length === 0 || values.every(unordered)) {\n return items;\n }\n\n return [...items].sort((a, b) => {\n return Object.entries(sort).reduce((acc, [k, v], index) => {\n if (v === 'none') {\n return acc;\n }\n\n const comparator = compare[k];\n\n const direction = {\n asc: +1,\n desc: -1,\n }[v];\n\n if (comparator) {\n return acc + direction * (comparator(a, b) << index);\n }\n\n return acc + direction * (DEFAULT_COMPARATOR(a[k], b[k]) << index);\n }, 0);\n });\n };\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { h, Host } from '@stencil/core';
|
|
2
|
-
/**
|
|
3
|
-
* @since 1.0
|
|
4
|
-
* @status stable
|
|
5
|
-
*
|
|
6
|
-
* @slot - Used to define the content of the cell.
|
|
7
|
-
*/
|
|
8
|
-
export class SixTableCell {
|
|
9
|
-
render() {
|
|
10
|
-
return (h(Host, null, h("slot", null)));
|
|
11
|
-
}
|
|
12
|
-
static get is() { return "six-table-cell"; }
|
|
13
|
-
static get encapsulation() { return "shadow"; }
|
|
14
|
-
static get originalStyleUrls() {
|
|
15
|
-
return {
|
|
16
|
-
"$": ["six-table-cell.scss"]
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
static get styleUrls() {
|
|
20
|
-
return {
|
|
21
|
-
"$": ["six-table-cell.css"]
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=six-table-cell.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"six-table-cell.js","sourceRoot":"","sources":["../../../src/components/six-table-cell/six-table-cell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AAOH,MAAM,OAAO,YAAY;EACvB,MAAM;IACJ,OAAO,CACL,EAAC,IAAI;MACH,eAAQ,CACH,CACR,CAAC;EACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, h, Host } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the content of the cell.\n */\n\n@Component({\n tag: 'six-table-cell',\n styleUrl: 'six-table-cell.scss',\n shadow: true,\n})\nexport class SixTableCell {\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
position: relative;
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
}
|
|
5
|
-
:host *, :host *:before, :host *:after {
|
|
6
|
-
box-sizing: inherit;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host {
|
|
10
|
-
display: table-header-group;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
font-family: var(--six-font-family);
|
|
13
|
-
font-weight: var(--six-font-weight-bold);
|
|
14
|
-
color: var(--six-table-header-color);
|
|
15
|
-
border-bottom: solid 2px var(--six-table-header-border-color);
|
|
16
|
-
padding: 0.75rem;
|
|
17
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Host, h } from '@stencil/core';
|
|
2
|
-
/**
|
|
3
|
-
* @since 1.0
|
|
4
|
-
* @status stable
|
|
5
|
-
*
|
|
6
|
-
* @slot - Used to define the cells of the header.
|
|
7
|
-
*/
|
|
8
|
-
export class SixTableHeader {
|
|
9
|
-
render() {
|
|
10
|
-
return (h(Host, null, h("slot", null)));
|
|
11
|
-
}
|
|
12
|
-
static get is() { return "six-table-header"; }
|
|
13
|
-
static get encapsulation() { return "shadow"; }
|
|
14
|
-
static get originalStyleUrls() {
|
|
15
|
-
return {
|
|
16
|
-
"$": ["six-table-header.scss"]
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
static get styleUrls() {
|
|
20
|
-
return {
|
|
21
|
-
"$": ["six-table-header.css"]
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=six-table-header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"six-table-header.js","sourceRoot":"","sources":["../../../src/components/six-table-header/six-table-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEnD;;;;;GAKG;AAOH,MAAM,OAAO,cAAc;EACzB,MAAM;IACJ,OAAO,CACL,EAAC,IAAI;MACH,eAAQ,CACH,CACR,CAAC;EACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * @slot - Used to define the cells of the header.\n */\n\n@Component({\n tag: 'six-table-header',\n styleUrl: 'six-table-header.scss',\n shadow: true,\n})\nexport class SixTableHeader {\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const getNextState = (states) => (current) => {
|
|
2
|
-
const next = states.indexOf(current) + 1;
|
|
3
|
-
return states[next < states.length ? next : 0];
|
|
4
|
-
};
|
|
5
|
-
export const getNextSortState = getNextState(['none', 'asc', 'desc']);
|
|
6
|
-
export const getNextFilterState = getNextState(Object.values(['eq', 'ne', 'in', 'ni']));
|
|
7
|
-
//# sourceMappingURL=get-next-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-next-state.js","sourceRoot":"","sources":["../../../src/components/six-table-header-cell/get-next-state.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAChB,CAAmC,MAAmB,EAAE,EAAE,CAC1D,CAAC,OAAgB,EAAE,EAAE;EACnB,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;EACzC,OAAO,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;AACtE,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC","sourcesContent":["const getNextState =\n <T extends Record<string, string>>(states: (keyof T)[]) =>\n (current: keyof T) => {\n const next = states.indexOf(current) + 1;\n return states[next < states.length ? next : 0];\n };\n\nexport const getNextSortState = getNextState(['none', 'asc', 'desc']);\nexport const getNextFilterState = getNextState(Object.values(['eq', 'ne', 'in', 'ni']));\n"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const SortIcon = {
|
|
2
|
-
['asc']: 'arrow_drop_up',
|
|
3
|
-
['desc']: 'arrow_drop_down',
|
|
4
|
-
['none']: 'swap_vert',
|
|
5
|
-
};
|
|
6
|
-
export const FilterIcon = {
|
|
7
|
-
['eq']: '=',
|
|
8
|
-
['ne']: '≠',
|
|
9
|
-
['in']: '∈',
|
|
10
|
-
['ni']: '∉',
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=icons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../src/components/six-table-header-cell/icons.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAkC;EACrD,CAAC,KAAK,CAAC,EAAE,eAAe;EACxB,CAAC,MAAM,CAAC,EAAE,iBAAiB;EAC3B,CAAC,MAAM,CAAC,EAAE,WAAW;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA+B;EACpD,CAAC,IAAI,CAAC,EAAE,GAAG;EACX,CAAC,IAAI,CAAC,EAAE,MAAM;EACd,CAAC,IAAI,CAAC,EAAE,QAAQ;EAChB,CAAC,IAAI,CAAC,EAAE,SAAS;CAClB,CAAC","sourcesContent":["import { FilterMode, SortDirection } from './types';\n\nexport const SortIcon: Record<SortDirection, string> = {\n ['asc']: 'arrow_drop_up',\n ['desc']: 'arrow_drop_down',\n ['none']: 'swap_vert',\n};\n\nexport const FilterIcon: Record<FilterMode, string> = {\n ['eq']: '=',\n ['ne']: '≠',\n ['in']: '∈',\n ['ni']: '∉',\n};\n"]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
position: relative;
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
}
|
|
5
|
-
:host *, :host *:before, :host *:after {
|
|
6
|
-
box-sizing: inherit;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host {
|
|
10
|
-
display: table-cell;
|
|
11
|
-
padding: var(--six-spacing-medium) var(--six-spacing-medium) var(--six-spacing-x-small);
|
|
12
|
-
font-size: var(--six-font-size-small);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
six-icon {
|
|
16
|
-
vertical-align: text-top;
|
|
17
|
-
width: 1.5rem;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.header:hover .header__trigger-icon, .header--selected .header__trigger-icon {
|
|
21
|
-
opacity: 1;
|
|
22
|
-
}
|
|
23
|
-
.header__trigger-icon {
|
|
24
|
-
color: var(--six-color-web-rock-600);
|
|
25
|
-
opacity: 0;
|
|
26
|
-
}
|
|
27
|
-
.header__trigger-icon-box {
|
|
28
|
-
float: right;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[slot=prefix] {
|
|
32
|
-
font-size: 1.5em;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
six-dropdown::part(panel) {
|
|
36
|
-
overflow: inherit;
|
|
37
|
-
}
|