@xlabs-store/core 0.0.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/LICENSE +21 -0
- package/components/index.d.ts +35 -0
- package/components/index.js +1 -0
- package/components/p-5c86X8JO.js +1 -0
- package/components/p-6KpqCGp9.js +1 -0
- package/components/p-ADwHM_jT.js +1 -0
- package/components/p-AgSyA7Ia.js +1 -0
- package/components/p-B-7Hwizp.js +1 -0
- package/components/p-B-ClGFfy.js +1 -0
- package/components/p-B4R9Mtmk.js +1 -0
- package/components/p-B4rO7Sgt.js +1 -0
- package/components/p-B5Syz0fw.js +1 -0
- package/components/p-B6p-mzW-.js +1 -0
- package/components/p-B8SZP5Xz.js +1 -0
- package/components/p-BBGHXZqR.js +1 -0
- package/components/p-BHLvuyOq.js +1 -0
- package/components/p-BM-ap7lt.js +1 -0
- package/components/p-BOCR5Zk0.js +1 -0
- package/components/p-BPeosvTA.js +1 -0
- package/components/p-BRBrLtOz.js +1 -0
- package/components/p-BSRP2TGa.js +1 -0
- package/components/p-BUjRcJoK.js +1 -0
- package/components/p-BVeQ5W_G.js +1 -0
- package/components/p-BVnVlCcd.js +1 -0
- package/components/p-BZQcq9R_.js +1 -0
- package/components/p-BeIFU-wn.js +1 -0
- package/components/p-BkEgl31q.js +1 -0
- package/components/p-BkPJ1Whr.js +1 -0
- package/components/p-BkevSugc.js +1 -0
- package/components/p-BkiOFW3H.js +1 -0
- package/components/p-BskMfHyY.js +1 -0
- package/components/p-Bu2JqZs8.js +1 -0
- package/components/p-BvjR2Q5Q.js +1 -0
- package/components/p-Bz7MhZ4K.js +1 -0
- package/components/p-C3gvR6nN.js +1 -0
- package/components/p-C70KKm8p.js +1 -0
- package/components/p-C7csgUoA.js +1 -0
- package/components/p-CAPfC5Vn.js +1 -0
- package/components/p-CEBSDVyp.js +1 -0
- package/components/p-CFB6xkAX.js +1 -0
- package/components/p-CGIxdOEm.js +1 -0
- package/components/p-CGYOWZnh.js +1 -0
- package/components/p-CHRrsVXB.js +1 -0
- package/components/p-CKUzvJue.js +1 -0
- package/components/p-CKVSyuIH.js +1 -0
- package/components/p-COpzIi1n.js +1 -0
- package/components/p-CRBPzT4B.js +1 -0
- package/components/p-CSfrs76m.js +1 -0
- package/components/p-C_ZBjXFP.js +1 -0
- package/components/p-Cd919NAP.js +1 -0
- package/components/p-Ce32Mo_Q.js +1 -0
- package/components/p-Ce5L9qbY.js +1 -0
- package/components/p-CeBfFEIa.js +1 -0
- package/components/p-CfhgoXyB.js +1 -0
- package/components/p-Ck6SW8G3.js +1 -0
- package/components/p-Co3Y9VjQ.js +1 -0
- package/components/p-D66tF8_2.js +1 -0
- package/components/p-D7ijqXRY.js +1 -0
- package/components/p-D7n-26Q5.js +1 -0
- package/components/p-D8ew7Rgv.js +1 -0
- package/components/p-DBk4T-b-.js +1 -0
- package/components/p-DD-W_fMF.js +1 -0
- package/components/p-DElCk9ta.js +1 -0
- package/components/p-DEumEVI3.js +1 -0
- package/components/p-DGqQ8PT4.js +1 -0
- package/components/p-DJ1WhSJ4.js +1 -0
- package/components/p-DOxXxhXb.js +1 -0
- package/components/p-DRa4o4c6.js +1 -0
- package/components/p-DTlSrH8_.js +1 -0
- package/components/p-DTvD0UO5.js +1 -0
- package/components/p-DVz50Dd3.js +1 -0
- package/components/p-DZFphzg1.js +1 -0
- package/components/p-DZPUUptR.js +1 -0
- package/components/p-D_xaGiZU.js +1 -0
- package/components/p-DaL42JUi.js +1 -0
- package/components/p-DbRpEXwX.js +1 -0
- package/components/p-DcRlYBIl.js +1 -0
- package/components/p-Dg0xgMke.js +1 -0
- package/components/p-Dgxy93Bg.js +1 -0
- package/components/p-Dky_8i8S.js +1 -0
- package/components/p-DlwlBBr4.js +1 -0
- package/components/p-DoTf8yXn.js +1 -0
- package/components/p-DphUq6Z5.js +1 -0
- package/components/p-DsgWQbJY.js +1 -0
- package/components/p-Dx3yBe39.js +1 -0
- package/components/p-DxKMnrS8.js +1 -0
- package/components/p-O88oQkR1.js +1 -0
- package/components/p-PlUkLT0A.js +1 -0
- package/components/p-QTSiPk0I.js +1 -0
- package/components/p-TC9DZAbC.js +1 -0
- package/components/p-XBF88YT_.js +1 -0
- package/components/p-bVsOg7S9.js +1 -0
- package/components/p-ccpcKv5U.js +1 -0
- package/components/p-en06CSUT.js +1 -0
- package/components/p-g6ZBqIze.js +1 -0
- package/components/p-noTpj1Kh.js +1 -0
- package/components/x-address.d.ts +11 -0
- package/components/x-address.js +1 -0
- package/components/x-affix.d.ts +11 -0
- package/components/x-affix.js +1 -0
- package/components/x-alert.d.ts +11 -0
- package/components/x-alert.js +1 -0
- package/components/x-anchor-link.d.ts +11 -0
- package/components/x-anchor-link.js +1 -0
- package/components/x-anchor.d.ts +11 -0
- package/components/x-anchor.js +1 -0
- package/components/x-app.d.ts +11 -0
- package/components/x-app.js +1 -0
- package/components/x-auto-complete-dropdown-content.d.ts +11 -0
- package/components/x-auto-complete-dropdown-content.js +1 -0
- package/components/x-auto-complete.d.ts +11 -0
- package/components/x-auto-complete.js +1 -0
- package/components/x-avatar.d.ts +11 -0
- package/components/x-avatar.js +1 -0
- package/components/x-back-top.d.ts +11 -0
- package/components/x-back-top.js +1 -0
- package/components/x-badge.d.ts +11 -0
- package/components/x-badge.js +1 -0
- package/components/x-breadcrumb-item.d.ts +11 -0
- package/components/x-breadcrumb-item.js +1 -0
- package/components/x-breadcrumb.d.ts +11 -0
- package/components/x-breadcrumb.js +1 -0
- package/components/x-button.d.ts +11 -0
- package/components/x-button.js +1 -0
- package/components/x-captcha.d.ts +11 -0
- package/components/x-captcha.js +1 -0
- package/components/x-card.d.ts +11 -0
- package/components/x-card.js +1 -0
- package/components/x-carousel.d.ts +11 -0
- package/components/x-carousel.js +1 -0
- package/components/x-cascader-dropdown-content.d.ts +11 -0
- package/components/x-cascader-dropdown-content.js +1 -0
- package/components/x-cascader.d.ts +11 -0
- package/components/x-cascader.js +1 -0
- package/components/x-checkbox.d.ts +11 -0
- package/components/x-checkbox.js +1 -0
- package/components/x-col.d.ts +11 -0
- package/components/x-col.js +1 -0
- package/components/x-collapse-panel.d.ts +11 -0
- package/components/x-collapse-panel.js +1 -0
- package/components/x-collapse.d.ts +11 -0
- package/components/x-collapse.js +1 -0
- package/components/x-color-picker-panel.d.ts +11 -0
- package/components/x-color-picker-panel.js +1 -0
- package/components/x-color-picker.d.ts +11 -0
- package/components/x-color-picker.js +1 -0
- package/components/x-comment.d.ts +11 -0
- package/components/x-comment.js +1 -0
- package/components/x-content.d.ts +11 -0
- package/components/x-content.js +1 -0
- package/components/x-date-picker-dropdown-content.d.ts +11 -0
- package/components/x-date-picker-dropdown-content.js +1 -0
- package/components/x-date-picker.d.ts +11 -0
- package/components/x-date-picker.js +1 -0
- package/components/x-descriptions-item.d.ts +11 -0
- package/components/x-descriptions-item.js +1 -0
- package/components/x-descriptions.d.ts +11 -0
- package/components/x-descriptions.js +1 -0
- package/components/x-divider.d.ts +11 -0
- package/components/x-divider.js +1 -0
- package/components/x-drawer-content.d.ts +11 -0
- package/components/x-drawer-content.js +1 -0
- package/components/x-drawer.d.ts +11 -0
- package/components/x-drawer.js +1 -0
- package/components/x-dropdown-content.d.ts +11 -0
- package/components/x-dropdown-content.js +1 -0
- package/components/x-dropdown.d.ts +11 -0
- package/components/x-dropdown.js +1 -0
- package/components/x-editor.d.ts +11 -0
- package/components/x-editor.js +1 -0
- package/components/x-empty.d.ts +11 -0
- package/components/x-empty.js +1 -0
- package/components/x-finder.d.ts +11 -0
- package/components/x-finder.js +1 -0
- package/components/x-flex.d.ts +11 -0
- package/components/x-flex.js +1 -0
- package/components/x-float-button.d.ts +11 -0
- package/components/x-float-button.js +1 -0
- package/components/x-footer.d.ts +11 -0
- package/components/x-footer.js +1 -0
- package/components/x-form-builder.d.ts +11 -0
- package/components/x-form-builder.js +1 -0
- package/components/x-form-item.d.ts +11 -0
- package/components/x-form-item.js +1 -0
- package/components/x-form.d.ts +11 -0
- package/components/x-form.js +1 -0
- package/components/x-header.d.ts +11 -0
- package/components/x-header.js +1 -0
- package/components/x-icon.d.ts +11 -0
- package/components/x-icon.js +1 -0
- package/components/x-image.d.ts +11 -0
- package/components/x-image.js +1 -0
- package/components/x-infinite-scroll.d.ts +11 -0
- package/components/x-infinite-scroll.js +1 -0
- package/components/x-input-number.d.ts +11 -0
- package/components/x-input-number.js +1 -0
- package/components/x-input.d.ts +11 -0
- package/components/x-input.js +1 -0
- package/components/x-layout.d.ts +11 -0
- package/components/x-layout.js +1 -0
- package/components/x-list-item.d.ts +11 -0
- package/components/x-list-item.js +1 -0
- package/components/x-list.d.ts +11 -0
- package/components/x-list.js +1 -0
- package/components/x-mentions.d.ts +11 -0
- package/components/x-mentions.js +1 -0
- package/components/x-menu-divider.d.ts +11 -0
- package/components/x-menu-divider.js +1 -0
- package/components/x-menu-item-group.d.ts +11 -0
- package/components/x-menu-item-group.js +1 -0
- package/components/x-menu-item.d.ts +11 -0
- package/components/x-menu-item.js +1 -0
- package/components/x-menu-submenu.d.ts +11 -0
- package/components/x-menu-submenu.js +1 -0
- package/components/x-menu.d.ts +11 -0
- package/components/x-menu.js +1 -0
- package/components/x-message.d.ts +11 -0
- package/components/x-message.js +1 -0
- package/components/x-modal-content.d.ts +11 -0
- package/components/x-modal-content.js +1 -0
- package/components/x-modal.d.ts +11 -0
- package/components/x-modal.js +1 -0
- package/components/x-notification.d.ts +11 -0
- package/components/x-notification.js +1 -0
- package/components/x-page-header.d.ts +11 -0
- package/components/x-page-header.js +1 -0
- package/components/x-pagination.d.ts +11 -0
- package/components/x-pagination.js +1 -0
- package/components/x-popconfirm-content.d.ts +11 -0
- package/components/x-popconfirm-content.js +1 -0
- package/components/x-popconfirm.d.ts +11 -0
- package/components/x-popconfirm.js +1 -0
- package/components/x-popover-content.d.ts +11 -0
- package/components/x-popover-content.js +1 -0
- package/components/x-popover.d.ts +11 -0
- package/components/x-popover.js +1 -0
- package/components/x-progress.d.ts +11 -0
- package/components/x-progress.js +1 -0
- package/components/x-qr-code.d.ts +11 -0
- package/components/x-qr-code.js +1 -0
- package/components/x-radio-group.d.ts +11 -0
- package/components/x-radio-group.js +1 -0
- package/components/x-radio.d.ts +11 -0
- package/components/x-radio.js +1 -0
- package/components/x-range-picker-dropdown-content.d.ts +11 -0
- package/components/x-range-picker-dropdown-content.js +1 -0
- package/components/x-range-picker.d.ts +11 -0
- package/components/x-range-picker.js +1 -0
- package/components/x-rate.d.ts +11 -0
- package/components/x-rate.js +1 -0
- package/components/x-result.d.ts +11 -0
- package/components/x-result.js +1 -0
- package/components/x-row.d.ts +11 -0
- package/components/x-row.js +1 -0
- package/components/x-segmented.d.ts +11 -0
- package/components/x-segmented.js +1 -0
- package/components/x-select-dropdown-content.d.ts +11 -0
- package/components/x-select-dropdown-content.js +1 -0
- package/components/x-select-option.d.ts +11 -0
- package/components/x-select-option.js +1 -0
- package/components/x-select.d.ts +11 -0
- package/components/x-select.js +1 -0
- package/components/x-sider.d.ts +11 -0
- package/components/x-sider.js +1 -0
- package/components/x-skeleton.d.ts +11 -0
- package/components/x-skeleton.js +1 -0
- package/components/x-slider.d.ts +11 -0
- package/components/x-slider.js +1 -0
- package/components/x-space.d.ts +11 -0
- package/components/x-space.js +1 -0
- package/components/x-spin.d.ts +11 -0
- package/components/x-spin.js +1 -0
- package/components/x-splitter-panel.d.ts +11 -0
- package/components/x-splitter-panel.js +1 -0
- package/components/x-splitter.d.ts +11 -0
- package/components/x-splitter.js +1 -0
- package/components/x-statistic.d.ts +11 -0
- package/components/x-statistic.js +1 -0
- package/components/x-step.d.ts +11 -0
- package/components/x-step.js +1 -0
- package/components/x-steps.d.ts +11 -0
- package/components/x-steps.js +1 -0
- package/components/x-switch.d.ts +11 -0
- package/components/x-switch.js +1 -0
- package/components/x-tab-pane.d.ts +11 -0
- package/components/x-tab-pane.js +1 -0
- package/components/x-table-cell.d.ts +11 -0
- package/components/x-table-cell.js +1 -0
- package/components/x-table-row.d.ts +11 -0
- package/components/x-table-row.js +1 -0
- package/components/x-table.d.ts +11 -0
- package/components/x-table.js +1 -0
- package/components/x-tabs.d.ts +11 -0
- package/components/x-tabs.js +1 -0
- package/components/x-tag.d.ts +11 -0
- package/components/x-tag.js +1 -0
- package/components/x-textarea.d.ts +11 -0
- package/components/x-textarea.js +1 -0
- package/components/x-time-picker-dropdown-content.d.ts +11 -0
- package/components/x-time-picker-dropdown-content.js +1 -0
- package/components/x-time-picker.d.ts +11 -0
- package/components/x-time-picker.js +1 -0
- package/components/x-timeline-item.d.ts +11 -0
- package/components/x-timeline-item.js +1 -0
- package/components/x-timeline.d.ts +11 -0
- package/components/x-timeline.js +1 -0
- package/components/x-tooltip-content.d.ts +11 -0
- package/components/x-tooltip-content.js +1 -0
- package/components/x-tooltip.d.ts +11 -0
- package/components/x-tooltip.js +1 -0
- package/components/x-tour-panel.d.ts +11 -0
- package/components/x-tour-panel.js +1 -0
- package/components/x-tour.d.ts +11 -0
- package/components/x-tour.js +1 -0
- package/components/x-transfer.d.ts +11 -0
- package/components/x-transfer.js +1 -0
- package/components/x-tree-select-dropdown-content.d.ts +11 -0
- package/components/x-tree-select-dropdown-content.js +1 -0
- package/components/x-tree-select.d.ts +11 -0
- package/components/x-tree-select.js +1 -0
- package/components/x-tree.d.ts +11 -0
- package/components/x-tree.js +1 -0
- package/components/x-typography.d.ts +11 -0
- package/components/x-typography.js +1 -0
- package/components/x-upload.d.ts +11 -0
- package/components/x-upload.js +1 -0
- package/components/x-virtual-scroll.d.ts +11 -0
- package/components/x-virtual-scroll.js +1 -0
- package/components/x-workflow-builder.d.ts +11 -0
- package/components/x-workflow-builder.js +1 -0
- package/components/x-workflow.d.ts +11 -0
- package/components/x-workflow.js +1 -0
- package/dist/cjs/abstract-control-C4D0eNCC.js +277 -0
- package/dist/cjs/config-BP9bROYD.js +63 -0
- package/dist/cjs/index-C7sKs9A2.js +2170 -0
- package/dist/cjs/index.cjs.js +14 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/locale.service-Cz-aZQnr.js +8203 -0
- package/dist/cjs/modal-service-BtAF0mFq.js +399 -0
- package/dist/cjs/notification-service-m6I5U9aG.js +602 -0
- package/dist/cjs/portal-controller-CtYVbhXL.js +504 -0
- package/dist/cjs/schema-builder-CYnX7lKi.js +1505 -0
- package/dist/cjs/tree.service-fxLOCSpD.js +339 -0
- package/dist/cjs/types-DQ-V76ZQ.js +255 -0
- package/dist/cjs/x-address_14.cjs.entry.js +12577 -0
- package/dist/cjs/x-affix.cjs.entry.js +182 -0
- package/dist/cjs/x-alert_11.cjs.entry.js +3239 -0
- package/dist/cjs/x-anchor-link.cjs.entry.js +67 -0
- package/dist/cjs/x-anchor.cjs.entry.js +158 -0
- package/dist/cjs/x-app.cjs.entry.js +137 -0
- package/dist/cjs/x-auto-complete-dropdown-content.cjs.entry.js +69 -0
- package/dist/cjs/x-avatar.cjs.entry.js +269 -0
- package/dist/cjs/x-back-top.cjs.entry.js +89 -0
- package/dist/cjs/x-breadcrumb_5.cjs.entry.js +1554 -0
- package/dist/cjs/x-button.cjs.entry.js +174 -0
- package/dist/cjs/x-card_12.cjs.entry.js +1386 -0
- package/dist/cjs/x-carousel.cjs.entry.js +147 -0
- package/dist/cjs/x-cascader-dropdown-content.cjs.entry.js +364 -0
- package/dist/cjs/x-checkbox_5.cjs.entry.js +1376 -0
- package/dist/cjs/x-collapse-panel.cjs.entry.js +243 -0
- package/dist/cjs/x-collapse.cjs.entry.js +291 -0
- package/dist/cjs/x-color-picker-panel_2.cjs.entry.js +873 -0
- package/dist/cjs/x-color-picker_9.cjs.entry.js +3085 -0
- package/dist/cjs/x-comment.cjs.entry.js +189 -0
- package/dist/cjs/x-date-picker-dropdown-content.cjs.entry.js +757 -0
- package/dist/cjs/x-descriptions-item.cjs.entry.js +108 -0
- package/dist/cjs/x-drawer-content.cjs.entry.js +197 -0
- package/dist/cjs/x-drawer.cjs.entry.js +294 -0
- package/dist/cjs/x-dropdown_2.cjs.entry.js +735 -0
- package/dist/cjs/x-empty.cjs.entry.js +64 -0
- package/dist/cjs/x-finder.cjs.entry.js +647 -0
- package/dist/cjs/x-form-builder.cjs.entry.js +807 -0
- package/dist/cjs/x-icon.cjs.entry.js +144 -0
- package/dist/cjs/x-infinite-scroll.cjs.entry.js +129 -0
- package/dist/cjs/x-list-item.cjs.entry.js +27 -0
- package/dist/cjs/x-list.cjs.entry.js +138 -0
- package/dist/cjs/x-mentions.cjs.entry.js +275 -0
- package/dist/cjs/x-menu-divider.cjs.entry.js +49 -0
- package/dist/cjs/x-menu-item-group.cjs.entry.js +149 -0
- package/dist/cjs/x-menu-submenu.cjs.entry.js +373 -0
- package/dist/cjs/x-message.cjs.entry.js +219 -0
- package/dist/cjs/x-modal-content.cjs.entry.js +217 -0
- package/dist/cjs/x-notification.cjs.entry.js +325 -0
- package/dist/cjs/x-page-header.cjs.entry.js +67 -0
- package/dist/cjs/x-popconfirm-content.cjs.entry.js +72 -0
- package/dist/cjs/x-popconfirm.cjs.entry.js +181 -0
- package/dist/cjs/x-progress.cjs.entry.js +136 -0
- package/dist/cjs/x-qr-code.cjs.entry.js +446 -0
- package/dist/cjs/x-range-picker-dropdown-content.cjs.entry.js +821 -0
- package/dist/cjs/x-select_2.cjs.entry.js +1316 -0
- package/dist/cjs/x-skeleton.cjs.entry.js +75 -0
- package/dist/cjs/x-spin.cjs.entry.js +62 -0
- package/dist/cjs/x-splitter-panel.cjs.entry.js +91 -0
- package/dist/cjs/x-splitter.cjs.entry.js +612 -0
- package/dist/cjs/x-statistic.cjs.entry.js +104 -0
- package/dist/cjs/x-step.cjs.entry.js +179 -0
- package/dist/cjs/x-steps.cjs.entry.js +439 -0
- package/dist/cjs/x-tab-pane.cjs.entry.js +73 -0
- package/dist/cjs/x-table-cell.cjs.entry.js +45 -0
- package/dist/cjs/x-table-row.cjs.entry.js +85 -0
- package/dist/cjs/x-tabs.cjs.entry.js +609 -0
- package/dist/cjs/x-time-picker-dropdown-content.cjs.entry.js +389 -0
- package/dist/cjs/x-timeline-item.cjs.entry.js +50 -0
- package/dist/cjs/x-timeline.cjs.entry.js +52 -0
- package/dist/cjs/x-tour-panel.cjs.entry.js +89 -0
- package/dist/cjs/x-tour.cjs.entry.js +344 -0
- package/dist/cjs/x-tree-select-dropdown-content.cjs.entry.js +439 -0
- package/dist/cjs/x-virtual-scroll.cjs.entry.js +203 -0
- package/dist/cjs/x-workflow-builder.cjs.entry.js +366 -0
- package/dist/cjs/xlabs-store.cjs.js +24 -0
- package/dist/collection/collection-manifest.json +130 -0
- package/dist/collection/components/x-address/vietnam-data.js +28 -0
- package/dist/collection/components/x-address/x-address.css +367 -0
- package/dist/collection/components/x-address/x-address.js +403 -0
- package/dist/collection/components/x-affix/x-affix.css +27 -0
- package/dist/collection/components/x-affix/x-affix.js +299 -0
- package/dist/collection/components/x-alert/x-alert.css +475 -0
- package/dist/collection/components/x-alert/x-alert.js +273 -0
- package/dist/collection/components/x-anchor/x-anchor.css +74 -0
- package/dist/collection/components/x-anchor/x-anchor.js +371 -0
- package/dist/collection/components/x-anchor-link/x-anchor-link.css +43 -0
- package/dist/collection/components/x-anchor-link/x-anchor-link.js +145 -0
- package/dist/collection/components/x-app/x-app.css +14 -0
- package/dist/collection/components/x-app/x-app.js +308 -0
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/auto-complete-dropdown-content.css +410 -0
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/auto-complete-dropdown-content.js +166 -0
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-auto-complete/auto-complete-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-auto-complete/types.js +61 -0
- package/dist/collection/components/x-auto-complete/x-auto-complete.css +535 -0
- package/dist/collection/components/x-auto-complete/x-auto-complete.js +1829 -0
- package/dist/collection/components/x-avatar/types.js +1 -0
- package/dist/collection/components/x-avatar/x-avatar.css +128 -0
- package/dist/collection/components/x-avatar/x-avatar.js +533 -0
- package/dist/collection/components/x-back-top/x-back-top.css +56 -0
- package/dist/collection/components/x-back-top/x-back-top.js +148 -0
- package/dist/collection/components/x-badge/types.js +1 -0
- package/dist/collection/components/x-badge/x-badge.css +233 -0
- package/dist/collection/components/x-badge/x-badge.js +618 -0
- package/dist/collection/components/x-breadcrumb/x-breadcrumb.css +44 -0
- package/dist/collection/components/x-breadcrumb/x-breadcrumb.js +96 -0
- package/dist/collection/components/x-breadcrumb-item/x-breadcrumb-item.css +63 -0
- package/dist/collection/components/x-breadcrumb-item/x-breadcrumb-item.js +147 -0
- package/dist/collection/components/x-button/x-button.css +278 -0
- package/dist/collection/components/x-button/x-button.js +488 -0
- package/dist/collection/components/x-captcha/x-captcha.css +125 -0
- package/dist/collection/components/x-captcha/x-captcha.js +408 -0
- package/dist/collection/components/x-card/x-card.css +523 -0
- package/dist/collection/components/x-card/x-card.js +389 -0
- package/dist/collection/components/x-carousel/x-carousel.css +417 -0
- package/dist/collection/components/x-carousel/x-carousel.js +257 -0
- package/dist/collection/components/x-cascader/cascader-dropdown-content/cascader-dropdown-content.css +529 -0
- package/dist/collection/components/x-cascader/cascader-dropdown-content/cascader-dropdown-content.js +771 -0
- package/dist/collection/components/x-cascader/cascader-dropdown-content/index.js +2 -0
- package/dist/collection/components/x-cascader/cascader-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-cascader/types.js +1 -0
- package/dist/collection/components/x-cascader/x-cascader.css +691 -0
- package/dist/collection/components/x-cascader/x-cascader.js +1841 -0
- package/dist/collection/components/x-checkbox/types.js +1 -0
- package/dist/collection/components/x-checkbox/x-checkbox.css +541 -0
- package/dist/collection/components/x-checkbox/x-checkbox.js +681 -0
- package/dist/collection/components/x-col/x-col.css +1704 -0
- package/dist/collection/components/x-col/x-col.js +479 -0
- package/dist/collection/components/x-collapse/types.js +1 -0
- package/dist/collection/components/x-collapse/x-collapse.css +384 -0
- package/dist/collection/components/x-collapse/x-collapse.js +579 -0
- package/dist/collection/components/x-collapse-panel/x-collapse-panel.css +486 -0
- package/dist/collection/components/x-collapse-panel/x-collapse-panel.js +500 -0
- package/dist/collection/components/x-color-picker/types.js +251 -0
- package/dist/collection/components/x-color-picker/x-color-picker-panel.css +310 -0
- package/dist/collection/components/x-color-picker/x-color-picker-panel.js +575 -0
- package/dist/collection/components/x-color-picker/x-color-picker.css +446 -0
- package/dist/collection/components/x-color-picker/x-color-picker.js +1209 -0
- package/dist/collection/components/x-comment/types.js +1 -0
- package/dist/collection/components/x-comment/x-comment.css +442 -0
- package/dist/collection/components/x-comment/x-comment.js +306 -0
- package/dist/collection/components/x-content/types.js +1 -0
- package/dist/collection/components/x-content/x-content.css +361 -0
- package/dist/collection/components/x-content/x-content.js +402 -0
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/date-picker-dropdown-content.css +691 -0
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/date-picker-dropdown-content.js +1496 -0
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-date-picker/date-picker-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-date-picker/types.js +1 -0
- package/dist/collection/components/x-date-picker/x-date-picker.css +804 -0
- package/dist/collection/components/x-date-picker/x-date-picker.js +2110 -0
- package/dist/collection/components/x-descriptions/types.js +1 -0
- package/dist/collection/components/x-descriptions/x-descriptions.css +417 -0
- package/dist/collection/components/x-descriptions/x-descriptions.js +494 -0
- package/dist/collection/components/x-descriptions-item/x-descriptions-item.css +387 -0
- package/dist/collection/components/x-descriptions-item/x-descriptions-item.js +238 -0
- package/dist/collection/components/x-divider/x-divider.css +417 -0
- package/dist/collection/components/x-divider/x-divider.js +263 -0
- package/dist/collection/components/x-drawer/x-drawer.css +333 -0
- package/dist/collection/components/x-drawer/x-drawer.js +623 -0
- package/dist/collection/components/x-drawer-content/x-drawer-content.css +481 -0
- package/dist/collection/components/x-drawer-content/x-drawer-content.js +579 -0
- package/dist/collection/components/x-dropdown/dropdown-content/dropdown-content.css +673 -0
- package/dist/collection/components/x-dropdown/dropdown-content/dropdown-content.js +294 -0
- package/dist/collection/components/x-dropdown/dropdown-content/types.js +1 -0
- package/dist/collection/components/x-dropdown/types.js +1 -0
- package/dist/collection/components/x-dropdown/x-dropdown.css +669 -0
- package/dist/collection/components/x-dropdown/x-dropdown.js +1004 -0
- package/dist/collection/components/x-editor/editor-history.js +118 -0
- package/dist/collection/components/x-editor/editor-normalizer.js +263 -0
- package/dist/collection/components/x-editor/editor-parser.js +326 -0
- package/dist/collection/components/x-editor/editor-selection.js +415 -0
- package/dist/collection/components/x-editor/types.js +33 -0
- package/dist/collection/components/x-editor/x-editor.css +599 -0
- package/dist/collection/components/x-editor/x-editor.js +1636 -0
- package/dist/collection/components/x-empty/x-empty.css +357 -0
- package/dist/collection/components/x-empty/x-empty.js +117 -0
- package/dist/collection/components/x-finder/services/finder-service.js +250 -0
- package/dist/collection/components/x-finder/types.js +1 -0
- package/dist/collection/components/x-finder/x-finder.css +633 -0
- package/dist/collection/components/x-finder/x-finder.js +540 -0
- package/dist/collection/components/x-flex/x-flex.css +344 -0
- package/dist/collection/components/x-flex/x-flex.js +285 -0
- package/dist/collection/components/x-float-button/x-float-button.css +389 -0
- package/dist/collection/components/x-float-button/x-float-button.js +265 -0
- package/dist/collection/components/x-footer/x-footer.css +346 -0
- package/dist/collection/components/x-footer/x-footer.js +29 -0
- package/dist/collection/components/x-form/x-form.css +365 -0
- package/dist/collection/components/x-form/x-form.js +355 -0
- package/dist/collection/components/x-form-builder/services/apis/api-client.js +240 -0
- package/dist/collection/components/x-form-builder/services/constants/index.js +33 -0
- package/dist/collection/components/x-form-builder/services/forms/abstract-control.js +175 -0
- package/dist/collection/components/x-form-builder/services/forms/form-array.js +92 -0
- package/dist/collection/components/x-form-builder/services/forms/form-builder.js +40 -0
- package/dist/collection/components/x-form-builder/services/forms/form-control.js +33 -0
- package/dist/collection/components/x-form-builder/services/forms/form-group.js +150 -0
- package/dist/collection/components/x-form-builder/services/forms/index.js +7 -0
- package/dist/collection/components/x-form-builder/services/forms/types.js +1 -0
- package/dist/collection/components/x-form-builder/services/forms/validators.js +83 -0
- package/dist/collection/components/x-form-builder/services/schema/condition-builder.js +337 -0
- package/dist/collection/components/x-form-builder/services/schema/default-registry.js +440 -0
- package/dist/collection/components/x-form-builder/services/schema/form-mapping.js +176 -0
- package/dist/collection/components/x-form-builder/services/schema/form-registry.js +30 -0
- package/dist/collection/components/x-form-builder/services/schema/schema-actions.js +3 -0
- package/dist/collection/components/x-form-builder/services/schema/schema-builder.js +52 -0
- package/dist/collection/components/x-form-builder/services/schema/schema-validator.js +53 -0
- package/dist/collection/components/x-form-builder/types/api/api-common-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/api/api-interfaces.js +1 -0
- package/dist/collection/components/x-form-builder/types/api/index.js +2 -0
- package/dist/collection/components/x-form-builder/types/common/common-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/condition-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/field-types-enum.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/index.js +7 -0
- package/dist/collection/components/x-form-builder/types/common/shared-interfaces.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/validation-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/common/value-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/event/event-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/event/index.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/advanced-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/base-field.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/datetime-file-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/display-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/form-field-union.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/index.js +9 -0
- package/dist/collection/components/x-form-builder/types/fields/input-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/layout-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/fields/selection-fields.js +10 -0
- package/dist/collection/components/x-form-builder/types/fields/special-input-fields.js +1 -0
- package/dist/collection/components/x-form-builder/types/form/events-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/form/form-config.js +50 -0
- package/dist/collection/components/x-form-builder/types/form/index.js +2 -0
- package/dist/collection/components/x-form-builder/types/form/schema-types.js +1 -0
- package/dist/collection/components/x-form-builder/types/index.js +4 -0
- package/dist/collection/components/x-form-builder/utils/condition-engine.js +118 -0
- package/dist/collection/components/x-form-builder/utils/utils.js +138 -0
- package/dist/collection/components/x-form-builder/utils/values.js +36 -0
- package/dist/collection/components/x-form-builder/x-form-builder.css +3 -0
- package/dist/collection/components/x-form-builder/x-form-builder.js +1017 -0
- package/dist/collection/components/x-form-item/x-form-item.css +564 -0
- package/dist/collection/components/x-form-item/x-form-item.js +538 -0
- package/dist/collection/components/x-header/x-header.css +344 -0
- package/dist/collection/components/x-header/x-header.js +29 -0
- package/dist/collection/components/x-icon/fonts/xlabs-outlined.woff2 +0 -0
- package/dist/collection/components/x-icon/fonts/xlabs-rounded.woff2 +0 -0
- package/dist/collection/components/x-icon/fonts/xlabs-solided.woff2 +0 -0
- package/dist/collection/components/x-icon/icons.js +2716 -0
- package/dist/collection/components/x-icon/x-icon.css +378 -0
- package/dist/collection/components/x-icon/x-icon.js +353 -0
- package/dist/collection/components/x-image/types.js +1 -0
- package/dist/collection/components/x-image/x-image.css +556 -0
- package/dist/collection/components/x-image/x-image.js +628 -0
- package/dist/collection/components/x-infinite-scroll/x-infinite-scroll.css +345 -0
- package/dist/collection/components/x-infinite-scroll/x-infinite-scroll.js +294 -0
- package/dist/collection/components/x-input/types.js +1 -0
- package/dist/collection/components/x-input/x-input.css +640 -0
- package/dist/collection/components/x-input/x-input.js +1449 -0
- package/dist/collection/components/x-input-number/types.js +96 -0
- package/dist/collection/components/x-input-number/x-input-number.css +612 -0
- package/dist/collection/components/x-input-number/x-input-number.js +1488 -0
- package/dist/collection/components/x-layout/x-layout.css +361 -0
- package/dist/collection/components/x-layout/x-layout.js +188 -0
- package/dist/collection/components/x-list/x-list.css +382 -0
- package/dist/collection/components/x-list/x-list.js +373 -0
- package/dist/collection/components/x-list-item/x-list-item.css +351 -0
- package/dist/collection/components/x-list-item/x-list-item.js +31 -0
- package/dist/collection/components/x-mentions/types.js +1 -0
- package/dist/collection/components/x-mentions/x-mentions.css +388 -0
- package/dist/collection/components/x-mentions/x-mentions.js +528 -0
- package/dist/collection/components/x-menu/types.js +1 -0
- package/dist/collection/components/x-menu/x-menu.css +78 -0
- package/dist/collection/components/x-menu/x-menu.js +793 -0
- package/dist/collection/components/x-menu-divider/types.js +1 -0
- package/dist/collection/components/x-menu-divider/x-menu-divider.css +31 -0
- package/dist/collection/components/x-menu-divider/x-menu-divider.js +126 -0
- package/dist/collection/components/x-menu-item/types.js +1 -0
- package/dist/collection/components/x-menu-item/x-menu-item.css +183 -0
- package/dist/collection/components/x-menu-item/x-menu-item.js +449 -0
- package/dist/collection/components/x-menu-item-group/types.js +1 -0
- package/dist/collection/components/x-menu-item-group/x-menu-item-group.css +45 -0
- package/dist/collection/components/x-menu-item-group/x-menu-item-group.js +299 -0
- package/dist/collection/components/x-menu-submenu/types.js +1 -0
- package/dist/collection/components/x-menu-submenu/x-menu-submenu.css +236 -0
- package/dist/collection/components/x-menu-submenu/x-menu-submenu.js +775 -0
- package/dist/collection/components/x-message/message-service.js +263 -0
- package/dist/collection/components/x-message/types.js +1 -0
- package/dist/collection/components/x-message/x-message.css +402 -0
- package/dist/collection/components/x-message/x-message.js +487 -0
- package/dist/collection/components/x-modal/modal-service.js +402 -0
- package/dist/collection/components/x-modal/modal-service.types.js +1 -0
- package/dist/collection/components/x-modal/x-modal.css +468 -0
- package/dist/collection/components/x-modal/x-modal.js +683 -0
- package/dist/collection/components/x-modal-content/index.js +1 -0
- package/dist/collection/components/x-modal-content/types.js +1 -0
- package/dist/collection/components/x-modal-content/x-modal-content.css +749 -0
- package/dist/collection/components/x-modal-content/x-modal-content.js +701 -0
- package/dist/collection/components/x-notification/notification-service.js +335 -0
- package/dist/collection/components/x-notification/types.js +1 -0
- package/dist/collection/components/x-notification/x-notification.css +486 -0
- package/dist/collection/components/x-notification/x-notification.js +788 -0
- package/dist/collection/components/x-page-header/x-page-header.css +406 -0
- package/dist/collection/components/x-page-header/x-page-header.js +159 -0
- package/dist/collection/components/x-pagination/types.js +1 -0
- package/dist/collection/components/x-pagination/x-pagination.css +705 -0
- package/dist/collection/components/x-pagination/x-pagination.js +1241 -0
- package/dist/collection/components/x-popconfirm/popconfirm-content/popconfirm-content.css +456 -0
- package/dist/collection/components/x-popconfirm/popconfirm-content/popconfirm-content.js +244 -0
- package/dist/collection/components/x-popconfirm/x-popconfirm.css +412 -0
- package/dist/collection/components/x-popconfirm/x-popconfirm.js +355 -0
- package/dist/collection/components/x-popover/popover-content/popover-content.css +437 -0
- package/dist/collection/components/x-popover/popover-content/popover-content.js +261 -0
- package/dist/collection/components/x-popover/x-popover.css +442 -0
- package/dist/collection/components/x-popover/x-popover.js +390 -0
- package/dist/collection/components/x-portal/debug.js +42 -0
- package/dist/collection/components/x-portal/index.js +1 -0
- package/dist/collection/components/x-portal/portal-controller.js +146 -0
- package/dist/collection/components/x-portal/positioning.js +332 -0
- package/dist/collection/components/x-portal/types.js +1 -0
- package/dist/collection/components/x-portal/x-portal.js +21 -0
- package/dist/collection/components/x-progress/x-progress.css +424 -0
- package/dist/collection/components/x-progress/x-progress.js +326 -0
- package/dist/collection/components/x-qr-code/x-qr-code.css +37 -0
- package/dist/collection/components/x-qr-code/x-qr-code.js +292 -0
- package/dist/collection/components/x-radio/types.js +1 -0
- package/dist/collection/components/x-radio/x-radio.css +523 -0
- package/dist/collection/components/x-radio/x-radio.js +689 -0
- package/dist/collection/components/x-radio-group/types.js +1 -0
- package/dist/collection/components/x-radio-group/x-radio-group.css +326 -0
- package/dist/collection/components/x-radio-group/x-radio-group.js +531 -0
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/range-picker-dropdown-content.css +609 -0
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/range-picker-dropdown-content.js +1497 -0
- package/dist/collection/components/x-range-picker/range-picker-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-range-picker/types.js +1 -0
- package/dist/collection/components/x-range-picker/x-range-picker.css +775 -0
- package/dist/collection/components/x-range-picker/x-range-picker.js +1883 -0
- package/dist/collection/components/x-rate/x-rate.css +396 -0
- package/dist/collection/components/x-rate/x-rate.js +445 -0
- package/dist/collection/components/x-result/types.js +1 -0
- package/dist/collection/components/x-result/x-result.css +434 -0
- package/dist/collection/components/x-result/x-result.js +376 -0
- package/dist/collection/components/x-row/x-row.css +345 -0
- package/dist/collection/components/x-row/x-row.js +196 -0
- package/dist/collection/components/x-segmented/types.js +1 -0
- package/dist/collection/components/x-segmented/x-segmented.css +407 -0
- package/dist/collection/components/x-segmented/x-segmented.js +414 -0
- package/dist/collection/components/x-select/select-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-select/select-dropdown-content/select-dropdown-content.css +827 -0
- package/dist/collection/components/x-select/select-dropdown-content/select-dropdown-content.js +163 -0
- package/dist/collection/components/x-select/select-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-select/types.js +9 -0
- package/dist/collection/components/x-select/x-select.css +823 -0
- package/dist/collection/components/x-select/x-select.js +2247 -0
- package/dist/collection/components/x-select-option/x-select-option.css +379 -0
- package/dist/collection/components/x-select-option/x-select-option.js +207 -0
- package/dist/collection/components/x-sider/x-sider.css +379 -0
- package/dist/collection/components/x-sider/x-sider.js +379 -0
- package/dist/collection/components/x-skeleton/x-skeleton.css +400 -0
- package/dist/collection/components/x-skeleton/x-skeleton.js +221 -0
- package/dist/collection/components/x-slider/types.js +1 -0
- package/dist/collection/components/x-slider/x-slider.css +511 -0
- package/dist/collection/components/x-slider/x-slider.js +785 -0
- package/dist/collection/components/x-space/x-space.css +339 -0
- package/dist/collection/components/x-space/x-space.js +228 -0
- package/dist/collection/components/x-spin/x-spin.css +465 -0
- package/dist/collection/components/x-spin/x-spin.js +142 -0
- package/dist/collection/components/x-splitter/types.js +1 -0
- package/dist/collection/components/x-splitter/x-splitter.css +181 -0
- package/dist/collection/components/x-splitter/x-splitter.js +884 -0
- package/dist/collection/components/x-splitter-panel/types.js +1 -0
- package/dist/collection/components/x-splitter-panel/x-splitter-panel.css +25 -0
- package/dist/collection/components/x-splitter-panel/x-splitter-panel.js +292 -0
- package/dist/collection/components/x-statistic/x-statistic.css +366 -0
- package/dist/collection/components/x-statistic/x-statistic.js +291 -0
- package/dist/collection/components/x-step/types.js +1 -0
- package/dist/collection/components/x-step/x-step.css +801 -0
- package/dist/collection/components/x-step/x-step.js +539 -0
- package/dist/collection/components/x-steps/types.js +1 -0
- package/dist/collection/components/x-steps/x-steps.css +830 -0
- package/dist/collection/components/x-steps/x-steps.js +1032 -0
- package/dist/collection/components/x-switch/types.js +1 -0
- package/dist/collection/components/x-switch/x-switch.css +463 -0
- package/dist/collection/components/x-switch/x-switch.js +356 -0
- package/dist/collection/components/x-tab-pane/x-tab-pane.css +337 -0
- package/dist/collection/components/x-tab-pane/x-tab-pane.js +243 -0
- package/dist/collection/components/x-table/column-util.js +87 -0
- package/dist/collection/components/x-table/types.js +1 -0
- package/dist/collection/components/x-table/x-table.css +898 -0
- package/dist/collection/components/x-table/x-table.js +2464 -0
- package/dist/collection/components/x-table-cell/x-table-cell.css +337 -0
- package/dist/collection/components/x-table-cell/x-table-cell.js +167 -0
- package/dist/collection/components/x-table-row/x-table-row.css +336 -0
- package/dist/collection/components/x-table-row/x-table-row.js +172 -0
- package/dist/collection/components/x-tabs/types.js +1 -0
- package/dist/collection/components/x-tabs/x-tabs.css +664 -0
- package/dist/collection/components/x-tabs/x-tabs.js +1264 -0
- package/dist/collection/components/x-tag/types.js +1 -0
- package/dist/collection/components/x-tag/x-tag.css +1047 -0
- package/dist/collection/components/x-tag/x-tag.js +535 -0
- package/dist/collection/components/x-textarea/x-textarea.css +446 -0
- package/dist/collection/components/x-textarea/x-textarea.js +553 -0
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/index.js +1 -0
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/time-picker-dropdown-content.css +409 -0
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/time-picker-dropdown-content.js +855 -0
- package/dist/collection/components/x-time-picker/time-picker-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-time-picker/types.js +1 -0
- package/dist/collection/components/x-time-picker/x-time-picker.css +653 -0
- package/dist/collection/components/x-time-picker/x-time-picker.js +1454 -0
- package/dist/collection/components/x-timeline/x-timeline.css +404 -0
- package/dist/collection/components/x-timeline/x-timeline.js +129 -0
- package/dist/collection/components/x-timeline-item/x-timeline-item.css +400 -0
- package/dist/collection/components/x-timeline-item/x-timeline-item.js +125 -0
- package/dist/collection/components/x-tooltip/types.js +1 -0
- package/dist/collection/components/x-tooltip/x-tooltip.css +528 -0
- package/dist/collection/components/x-tooltip/x-tooltip.js +1006 -0
- package/dist/collection/components/x-tooltip-content/index.js +1 -0
- package/dist/collection/components/x-tooltip-content/types.js +1 -0
- package/dist/collection/components/x-tooltip-content/x-tooltip-content.css +217 -0
- package/dist/collection/components/x-tooltip-content/x-tooltip-content.js +238 -0
- package/dist/collection/components/x-tour/index.js +1 -0
- package/dist/collection/components/x-tour/types.js +1 -0
- package/dist/collection/components/x-tour/x-tour-panel.css +467 -0
- package/dist/collection/components/x-tour/x-tour-panel.js +265 -0
- package/dist/collection/components/x-tour/x-tour.css +353 -0
- package/dist/collection/components/x-tour/x-tour.js +555 -0
- package/dist/collection/components/x-transfer/types.js +1 -0
- package/dist/collection/components/x-transfer/x-transfer.css +626 -0
- package/dist/collection/components/x-transfer/x-transfer.js +956 -0
- package/dist/collection/components/x-tree/types.js +1 -0
- package/dist/collection/components/x-tree/x-tree.css +703 -0
- package/dist/collection/components/x-tree/x-tree.js +1793 -0
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/index.js +2 -0
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/tree-select-dropdown-content.css +635 -0
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/tree-select-dropdown-content.js +890 -0
- package/dist/collection/components/x-tree-select/tree-select-dropdown-content/types.js +1 -0
- package/dist/collection/components/x-tree-select/types.js +2 -0
- package/dist/collection/components/x-tree-select/x-tree-select.css +790 -0
- package/dist/collection/components/x-tree-select/x-tree-select.js +2750 -0
- package/dist/collection/components/x-typography/x-typography.css +409 -0
- package/dist/collection/components/x-typography/x-typography.js +431 -0
- package/dist/collection/components/x-upload/types.js +1 -0
- package/dist/collection/components/x-upload/x-upload.css +774 -0
- package/dist/collection/components/x-upload/x-upload.js +1452 -0
- package/dist/collection/components/x-virtual-scroll/x-virtual-scroll.css +79 -0
- package/dist/collection/components/x-virtual-scroll/x-virtual-scroll.js +478 -0
- package/dist/collection/components/x-workflow/x-workflow.css +486 -0
- package/dist/collection/components/x-workflow/x-workflow.js +1403 -0
- package/dist/collection/components/x-workflow-builder/x-workflow-builder.css +538 -0
- package/dist/collection/components/x-workflow-builder/x-workflow-builder.js +468 -0
- package/dist/collection/index.js +5 -0
- package/dist/collection/locales/index.js +2 -0
- package/dist/collection/locales/languages/ar_EG.js +120 -0
- package/dist/collection/locales/languages/az_AZ.js +120 -0
- package/dist/collection/locales/languages/bg_BG.js +120 -0
- package/dist/collection/locales/languages/bn_BD.js +120 -0
- package/dist/collection/locales/languages/by_BY.js +120 -0
- package/dist/collection/locales/languages/ca_ES.js +120 -0
- package/dist/collection/locales/languages/cs_CZ.js +120 -0
- package/dist/collection/locales/languages/da_DK.js +120 -0
- package/dist/collection/locales/languages/de_DE.js +120 -0
- package/dist/collection/locales/languages/el_GR.js +120 -0
- package/dist/collection/locales/languages/en_AU.js +120 -0
- package/dist/collection/locales/languages/en_GB.js +120 -0
- package/dist/collection/locales/languages/en_US.js +120 -0
- package/dist/collection/locales/languages/es_ES.js +120 -0
- package/dist/collection/locales/languages/et_EE.js +120 -0
- package/dist/collection/locales/languages/fa_IR.js +120 -0
- package/dist/collection/locales/languages/fi_FI.js +120 -0
- package/dist/collection/locales/languages/fr_BE.js +120 -0
- package/dist/collection/locales/languages/fr_CA.js +120 -0
- package/dist/collection/locales/languages/fr_FR.js +120 -0
- package/dist/collection/locales/languages/ga_IE.js +120 -0
- package/dist/collection/locales/languages/gl_ES.js +120 -0
- package/dist/collection/locales/languages/he_IL.js +120 -0
- package/dist/collection/locales/languages/hi_IN.js +120 -0
- package/dist/collection/locales/languages/hr_HR.js +120 -0
- package/dist/collection/locales/languages/hu_HU.js +120 -0
- package/dist/collection/locales/languages/hy_AM.js +120 -0
- package/dist/collection/locales/languages/id_ID.js +120 -0
- package/dist/collection/locales/languages/index.js +137 -0
- package/dist/collection/locales/languages/is_IS.js +120 -0
- package/dist/collection/locales/languages/it_IT.js +120 -0
- package/dist/collection/locales/languages/ja_JP.js +120 -0
- package/dist/collection/locales/languages/ka_GE.js +120 -0
- package/dist/collection/locales/languages/kk_KZ.js +120 -0
- package/dist/collection/locales/languages/km_KH.js +120 -0
- package/dist/collection/locales/languages/kmr_IQ.js +120 -0
- package/dist/collection/locales/languages/kn_IN.js +120 -0
- package/dist/collection/locales/languages/ko_KR.js +120 -0
- package/dist/collection/locales/languages/ku_IQ.js +120 -0
- package/dist/collection/locales/languages/lt_LT.js +120 -0
- package/dist/collection/locales/languages/lv_LV.js +120 -0
- package/dist/collection/locales/languages/mk_MK.js +120 -0
- package/dist/collection/locales/languages/ml_IN.js +120 -0
- package/dist/collection/locales/languages/mn_MN.js +120 -0
- package/dist/collection/locales/languages/ms_MY.js +120 -0
- package/dist/collection/locales/languages/nb_NO.js +120 -0
- package/dist/collection/locales/languages/ne_NP.js +120 -0
- package/dist/collection/locales/languages/nl_BE.js +120 -0
- package/dist/collection/locales/languages/nl_NL.js +120 -0
- package/dist/collection/locales/languages/pl_PL.js +120 -0
- package/dist/collection/locales/languages/pt_BR.js +120 -0
- package/dist/collection/locales/languages/pt_PT.js +120 -0
- package/dist/collection/locales/languages/ro_RO.js +120 -0
- package/dist/collection/locales/languages/ru_RU.js +120 -0
- package/dist/collection/locales/languages/sk_SK.js +120 -0
- package/dist/collection/locales/languages/sl_SI.js +120 -0
- package/dist/collection/locales/languages/sr_RS.js +120 -0
- package/dist/collection/locales/languages/sv_SE.js +120 -0
- package/dist/collection/locales/languages/ta_IN.js +120 -0
- package/dist/collection/locales/languages/th_TH.js +120 -0
- package/dist/collection/locales/languages/tr_TR.js +120 -0
- package/dist/collection/locales/languages/uk_UA.js +120 -0
- package/dist/collection/locales/languages/ur_PK.js +120 -0
- package/dist/collection/locales/languages/vi_VN.js +120 -0
- package/dist/collection/locales/languages/zh_CN.js +120 -0
- package/dist/collection/locales/languages/zh_HK.js +120 -0
- package/dist/collection/locales/languages/zh_TW.js +120 -0
- package/dist/collection/locales/locale.service.js +179 -0
- package/dist/collection/types.js +11 -0
- package/dist/collection/utils/app-service.js +19 -0
- package/dist/collection/utils/cascader.service.js +142 -0
- package/dist/collection/utils/config.js +59 -0
- package/dist/collection/utils/form/core/abstract-control.js +273 -0
- package/dist/collection/utils/form/core/form-array.js +131 -0
- package/dist/collection/utils/form/core/form-builder.js +56 -0
- package/dist/collection/utils/form/core/form-control.js +69 -0
- package/dist/collection/utils/form/core/form-group.js +163 -0
- package/dist/collection/utils/form/frameworks.js +37 -0
- package/dist/collection/utils/form/types.js +1 -0
- package/dist/collection/utils/form/validators/validators.js +198 -0
- package/dist/collection/utils/index.js +3 -0
- package/dist/collection/utils/qr-code/cache/qr.cache.js +20 -0
- package/dist/collection/utils/qr-code/engine/qr.engine.js +130 -0
- package/dist/collection/utils/qr-code/engine/qr.gf.js +22 -0
- package/dist/collection/utils/qr-code/engine/qr.mask.js +54 -0
- package/dist/collection/utils/qr-code/engine/qr.rs.js +29 -0
- package/dist/collection/utils/qr-code/engine/qr.util.js +0 -0
- package/dist/collection/utils/qr-code/engine/qr.version.js +11 -0
- package/dist/collection/utils/qr-code/renderer/canvas.renderer.js +36 -0
- package/dist/collection/utils/qr-code/renderer/svg.renderer.js +33 -0
- package/dist/collection/utils/qr-code/worker/worker.manager.js +24 -0
- package/dist/collection/utils/table.service.js +150 -0
- package/dist/collection/utils/tree.service.js +335 -0
- package/dist/collection/utils/workflow/flow.service.js +382 -0
- package/dist/collection/utils/workflow/types.js +1 -0
- package/dist/esm/abstract-control-XBF88YT_.js +275 -0
- package/dist/esm/config-BPeosvTA.js +60 -0
- package/dist/esm/index-ig_mFsVk.js +2159 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/locale.service-D66tF8_2.js +8199 -0
- package/dist/esm/modal-service-C_e0SaFZ.js +397 -0
- package/dist/esm/notification-service-DJTSPOq7.js +599 -0
- package/dist/esm/portal-controller-COpzIi1n.js +499 -0
- package/dist/esm/schema-builder-DBPGgJBx.js +1502 -0
- package/dist/esm/tree.service-Dgxy93Bg.js +337 -0
- package/dist/esm/types-C_QdJRdB.js +253 -0
- package/dist/esm/x-address_14.entry.js +12562 -0
- package/dist/esm/x-affix.entry.js +180 -0
- package/dist/esm/x-alert_11.entry.js +3227 -0
- package/dist/esm/x-anchor-link.entry.js +65 -0
- package/dist/esm/x-anchor.entry.js +156 -0
- package/dist/esm/x-app.entry.js +135 -0
- package/dist/esm/x-auto-complete-dropdown-content.entry.js +67 -0
- package/dist/esm/x-avatar.entry.js +267 -0
- package/dist/esm/x-back-top.entry.js +87 -0
- package/dist/esm/x-breadcrumb_5.entry.js +1548 -0
- package/dist/esm/x-button.entry.js +172 -0
- package/dist/esm/x-card_12.entry.js +1373 -0
- package/dist/esm/x-carousel.entry.js +145 -0
- package/dist/esm/x-cascader-dropdown-content.entry.js +362 -0
- package/dist/esm/x-checkbox_5.entry.js +1370 -0
- package/dist/esm/x-collapse-panel.entry.js +241 -0
- package/dist/esm/x-collapse.entry.js +289 -0
- package/dist/esm/x-color-picker-panel_2.entry.js +870 -0
- package/dist/esm/x-color-picker_9.entry.js +3075 -0
- package/dist/esm/x-comment.entry.js +187 -0
- package/dist/esm/x-date-picker-dropdown-content.entry.js +755 -0
- package/dist/esm/x-descriptions-item.entry.js +106 -0
- package/dist/esm/x-drawer-content.entry.js +195 -0
- package/dist/esm/x-drawer.entry.js +292 -0
- package/dist/esm/x-dropdown_2.entry.js +732 -0
- package/dist/esm/x-empty.entry.js +62 -0
- package/dist/esm/x-finder.entry.js +645 -0
- package/dist/esm/x-form-builder.entry.js +805 -0
- package/dist/esm/x-icon.entry.js +142 -0
- package/dist/esm/x-infinite-scroll.entry.js +127 -0
- package/dist/esm/x-list-item.entry.js +25 -0
- package/dist/esm/x-list.entry.js +136 -0
- package/dist/esm/x-mentions.entry.js +273 -0
- package/dist/esm/x-menu-divider.entry.js +47 -0
- package/dist/esm/x-menu-item-group.entry.js +147 -0
- package/dist/esm/x-menu-submenu.entry.js +371 -0
- package/dist/esm/x-message.entry.js +217 -0
- package/dist/esm/x-modal-content.entry.js +215 -0
- package/dist/esm/x-notification.entry.js +323 -0
- package/dist/esm/x-page-header.entry.js +65 -0
- package/dist/esm/x-popconfirm-content.entry.js +70 -0
- package/dist/esm/x-popconfirm.entry.js +179 -0
- package/dist/esm/x-progress.entry.js +134 -0
- package/dist/esm/x-qr-code.entry.js +444 -0
- package/dist/esm/x-range-picker-dropdown-content.entry.js +819 -0
- package/dist/esm/x-select_2.entry.js +1313 -0
- package/dist/esm/x-skeleton.entry.js +73 -0
- package/dist/esm/x-spin.entry.js +60 -0
- package/dist/esm/x-splitter-panel.entry.js +89 -0
- package/dist/esm/x-splitter.entry.js +610 -0
- package/dist/esm/x-statistic.entry.js +102 -0
- package/dist/esm/x-step.entry.js +177 -0
- package/dist/esm/x-steps.entry.js +437 -0
- package/dist/esm/x-tab-pane.entry.js +71 -0
- package/dist/esm/x-table-cell.entry.js +43 -0
- package/dist/esm/x-table-row.entry.js +83 -0
- package/dist/esm/x-tabs.entry.js +607 -0
- package/dist/esm/x-time-picker-dropdown-content.entry.js +387 -0
- package/dist/esm/x-timeline-item.entry.js +48 -0
- package/dist/esm/x-timeline.entry.js +50 -0
- package/dist/esm/x-tour-panel.entry.js +87 -0
- package/dist/esm/x-tour.entry.js +342 -0
- package/dist/esm/x-tree-select-dropdown-content.entry.js +437 -0
- package/dist/esm/x-virtual-scroll.entry.js +201 -0
- package/dist/esm/x-workflow-builder.entry.js +364 -0
- package/dist/esm/xlabs-store.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/x-address/vietnam-data.d.ts +14 -0
- package/dist/types/components/x-address/x-address.d.ts +64 -0
- package/dist/types/components/x-affix/x-affix.d.ts +111 -0
- package/dist/types/components/x-alert/x-alert.d.ts +74 -0
- package/dist/types/components/x-anchor/x-anchor.d.ts +120 -0
- package/dist/types/components/x-anchor-link/x-anchor-link.d.ts +47 -0
- package/dist/types/components/x-app/x-app.d.ts +93 -0
- package/dist/types/components/x-auto-complete/auto-complete-dropdown-content/auto-complete-dropdown-content.d.ts +58 -0
- package/dist/types/components/x-auto-complete/auto-complete-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-auto-complete/auto-complete-dropdown-content/types.d.ts +14 -0
- package/dist/types/components/x-auto-complete/types.d.ts +150 -0
- package/dist/types/components/x-auto-complete/x-auto-complete.d.ts +480 -0
- package/dist/types/components/x-avatar/types.d.ts +38 -0
- package/dist/types/components/x-avatar/x-avatar.d.ts +171 -0
- package/dist/types/components/x-back-top/x-back-top.d.ts +59 -0
- package/dist/types/components/x-badge/types.d.ts +23 -0
- package/dist/types/components/x-badge/x-badge.d.ts +184 -0
- package/dist/types/components/x-breadcrumb/x-breadcrumb.d.ts +43 -0
- package/dist/types/components/x-breadcrumb-item/x-breadcrumb-item.d.ts +43 -0
- package/dist/types/components/x-button/x-button.d.ts +121 -0
- package/dist/types/components/x-captcha/x-captcha.d.ts +78 -0
- package/dist/types/components/x-card/x-card.d.ts +139 -0
- package/dist/types/components/x-carousel/x-carousel.d.ts +104 -0
- package/dist/types/components/x-cascader/cascader-dropdown-content/cascader-dropdown-content.d.ts +255 -0
- package/dist/types/components/x-cascader/cascader-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-cascader/cascader-dropdown-content/types.d.ts +20 -0
- package/dist/types/components/x-cascader/types.d.ts +143 -0
- package/dist/types/components/x-cascader/x-cascader.d.ts +520 -0
- package/dist/types/components/x-checkbox/types.d.ts +83 -0
- package/dist/types/components/x-checkbox/x-checkbox.d.ts +156 -0
- package/dist/types/components/x-col/x-col.d.ts +89 -0
- package/dist/types/components/x-collapse/types.d.ts +55 -0
- package/dist/types/components/x-collapse/x-collapse.d.ts +157 -0
- package/dist/types/components/x-collapse-panel/x-collapse-panel.d.ts +143 -0
- package/dist/types/components/x-color-picker/types.d.ts +135 -0
- package/dist/types/components/x-color-picker/x-color-picker-panel.d.ts +80 -0
- package/dist/types/components/x-color-picker/x-color-picker.d.ts +328 -0
- package/dist/types/components/x-comment/types.d.ts +20 -0
- package/dist/types/components/x-comment/x-comment.d.ts +111 -0
- package/dist/types/components/x-content/types.d.ts +6 -0
- package/dist/types/components/x-content/x-content.d.ts +64 -0
- package/dist/types/components/x-date-picker/date-picker-dropdown-content/date-picker-dropdown-content.d.ts +376 -0
- package/dist/types/components/x-date-picker/date-picker-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-date-picker/date-picker-dropdown-content/types.d.ts +61 -0
- package/dist/types/components/x-date-picker/types.d.ts +28 -0
- package/dist/types/components/x-date-picker/x-date-picker.d.ts +512 -0
- package/dist/types/components/x-descriptions/types.d.ts +41 -0
- package/dist/types/components/x-descriptions/x-descriptions.d.ts +141 -0
- package/dist/types/components/x-descriptions-item/x-descriptions-item.d.ts +70 -0
- package/dist/types/components/x-divider/x-divider.d.ts +82 -0
- package/dist/types/components/x-drawer/x-drawer.d.ts +156 -0
- package/dist/types/components/x-drawer-content/x-drawer-content.d.ts +142 -0
- package/dist/types/components/x-dropdown/dropdown-content/dropdown-content.d.ts +83 -0
- package/dist/types/components/x-dropdown/dropdown-content/types.d.ts +16 -0
- package/dist/types/components/x-dropdown/types.d.ts +119 -0
- package/dist/types/components/x-dropdown/x-dropdown.d.ts +292 -0
- package/dist/types/components/x-editor/editor-history.d.ts +62 -0
- package/dist/types/components/x-editor/editor-normalizer.d.ts +70 -0
- package/dist/types/components/x-editor/editor-parser.d.ts +34 -0
- package/dist/types/components/x-editor/editor-selection.d.ts +92 -0
- package/dist/types/components/x-editor/types.d.ts +62 -0
- package/dist/types/components/x-editor/x-editor.d.ts +279 -0
- package/dist/types/components/x-empty/x-empty.d.ts +45 -0
- package/dist/types/components/x-finder/services/finder-service.d.ts +38 -0
- package/dist/types/components/x-finder/types.d.ts +63 -0
- package/dist/types/components/x-finder/x-finder.d.ts +66 -0
- package/dist/types/components/x-flex/x-flex.d.ts +62 -0
- package/dist/types/components/x-float-button/x-float-button.d.ts +66 -0
- package/dist/types/components/x-footer/x-footer.d.ts +11 -0
- package/dist/types/components/x-form/x-form.d.ts +64 -0
- package/dist/types/components/x-form-builder/services/apis/api-client.d.ts +63 -0
- package/dist/types/components/x-form-builder/services/constants/index.d.ts +2 -0
- package/dist/types/components/x-form-builder/services/forms/abstract-control.d.ts +59 -0
- package/dist/types/components/x-form-builder/services/forms/form-array.d.ts +25 -0
- package/dist/types/components/x-form-builder/services/forms/form-builder.d.ts +17 -0
- package/dist/types/components/x-form-builder/services/forms/form-control.d.ts +14 -0
- package/dist/types/components/x-form-builder/services/forms/form-group.d.ts +33 -0
- package/dist/types/components/x-form-builder/services/forms/index.d.ts +11 -0
- package/dist/types/components/x-form-builder/services/forms/types.d.ts +11 -0
- package/dist/types/components/x-form-builder/services/forms/validators.d.ts +16 -0
- package/dist/types/components/x-form-builder/services/schema/condition-builder.d.ts +39 -0
- package/dist/types/components/x-form-builder/services/schema/default-registry.d.ts +1 -0
- package/dist/types/components/x-form-builder/services/schema/form-mapping.d.ts +26 -0
- package/dist/types/components/x-form-builder/services/schema/form-registry.d.ts +27 -0
- package/dist/types/components/x-form-builder/services/schema/schema-actions.d.ts +3 -0
- package/dist/types/components/x-form-builder/services/schema/schema-builder.d.ts +19 -0
- package/dist/types/components/x-form-builder/services/schema/schema-validator.d.ts +9 -0
- package/dist/types/components/x-form-builder/types/api/api-common-types.d.ts +5 -0
- package/dist/types/components/x-form-builder/types/api/api-interfaces.d.ts +52 -0
- package/dist/types/components/x-form-builder/types/api/index.d.ts +2 -0
- package/dist/types/components/x-form-builder/types/common/common-types.d.ts +49 -0
- package/dist/types/components/x-form-builder/types/common/condition-types.d.ts +53 -0
- package/dist/types/components/x-form-builder/types/common/field-types-enum.d.ts +2 -0
- package/dist/types/components/x-form-builder/types/common/index.d.ts +7 -0
- package/dist/types/components/x-form-builder/types/common/shared-interfaces.d.ts +37 -0
- package/dist/types/components/x-form-builder/types/common/validation-types.d.ts +36 -0
- package/dist/types/components/x-form-builder/types/common/value-types.d.ts +15 -0
- package/dist/types/components/x-form-builder/types/event/event-types.d.ts +16 -0
- package/dist/types/components/x-form-builder/types/event/index.d.ts +1 -0
- package/dist/types/components/x-form-builder/types/fields/advanced-fields.d.ts +125 -0
- package/dist/types/components/x-form-builder/types/fields/base-field.d.ts +49 -0
- package/dist/types/components/x-form-builder/types/fields/datetime-file-fields.d.ts +37 -0
- package/dist/types/components/x-form-builder/types/fields/display-fields.d.ts +92 -0
- package/dist/types/components/x-form-builder/types/fields/form-field-union.d.ts +9 -0
- package/dist/types/components/x-form-builder/types/fields/index.d.ts +9 -0
- package/dist/types/components/x-form-builder/types/fields/input-fields.d.ts +53 -0
- package/dist/types/components/x-form-builder/types/fields/layout-fields.d.ts +55 -0
- package/dist/types/components/x-form-builder/types/fields/selection-fields.d.ts +130 -0
- package/dist/types/components/x-form-builder/types/fields/special-input-fields.d.ts +99 -0
- package/dist/types/components/x-form-builder/types/form/events-types.d.ts +29 -0
- package/dist/types/components/x-form-builder/types/form/form-config.d.ts +0 -0
- package/dist/types/components/x-form-builder/types/form/index.d.ts +2 -0
- package/dist/types/components/x-form-builder/types/form/schema-types.d.ts +134 -0
- package/dist/types/components/x-form-builder/types/index.d.ts +4 -0
- package/dist/types/components/x-form-builder/utils/condition-engine.d.ts +23 -0
- package/dist/types/components/x-form-builder/utils/utils.d.ts +19 -0
- package/dist/types/components/x-form-builder/utils/values.d.ts +8 -0
- package/dist/types/components/x-form-builder/x-form-builder.d.ts +65 -0
- package/dist/types/components/x-form-item/x-form-item.d.ts +94 -0
- package/dist/types/components/x-header/x-header.d.ts +11 -0
- package/dist/types/components/x-icon/icons.d.ts +2717 -0
- package/dist/types/components/x-icon/x-icon.d.ts +89 -0
- package/dist/types/components/x-image/types.d.ts +94 -0
- package/dist/types/components/x-image/x-image.d.ts +150 -0
- package/dist/types/components/x-infinite-scroll/x-infinite-scroll.d.ts +75 -0
- package/dist/types/components/x-input/types.d.ts +14 -0
- package/dist/types/components/x-input/x-input.d.ts +385 -0
- package/dist/types/components/x-input-number/types.d.ts +98 -0
- package/dist/types/components/x-input-number/x-input-number.d.ts +395 -0
- package/dist/types/components/x-layout/x-layout.d.ts +61 -0
- package/dist/types/components/x-list/x-list.d.ts +100 -0
- package/dist/types/components/x-list-item/x-list-item.d.ts +13 -0
- package/dist/types/components/x-mentions/types.d.ts +7 -0
- package/dist/types/components/x-mentions/x-mentions.d.ts +159 -0
- package/dist/types/components/x-menu/types.d.ts +83 -0
- package/dist/types/components/x-menu/x-menu.d.ts +153 -0
- package/dist/types/components/x-menu-divider/types.d.ts +6 -0
- package/dist/types/components/x-menu-divider/x-menu-divider.d.ts +19 -0
- package/dist/types/components/x-menu-item/types.d.ts +8 -0
- package/dist/types/components/x-menu-item/x-menu-item.d.ts +80 -0
- package/dist/types/components/x-menu-item-group/types.d.ts +6 -0
- package/dist/types/components/x-menu-item-group/x-menu-item-group.d.ts +60 -0
- package/dist/types/components/x-menu-submenu/types.d.ts +15 -0
- package/dist/types/components/x-menu-submenu/x-menu-submenu.d.ts +135 -0
- package/dist/types/components/x-message/message-service.d.ts +58 -0
- package/dist/types/components/x-message/types.d.ts +90 -0
- package/dist/types/components/x-message/x-message.d.ts +133 -0
- package/dist/types/components/x-modal/modal-service.d.ts +6 -0
- package/dist/types/components/x-modal/modal-service.types.d.ts +278 -0
- package/dist/types/components/x-modal/x-modal.d.ts +160 -0
- package/dist/types/components/x-modal-content/index.d.ts +1 -0
- package/dist/types/components/x-modal-content/types.d.ts +83 -0
- package/dist/types/components/x-modal-content/x-modal-content.d.ts +174 -0
- package/dist/types/components/x-notification/notification-service.d.ts +83 -0
- package/dist/types/components/x-notification/types.d.ts +112 -0
- package/dist/types/components/x-notification/x-notification.d.ts +212 -0
- package/dist/types/components/x-page-header/x-page-header.d.ts +51 -0
- package/dist/types/components/x-pagination/types.d.ts +104 -0
- package/dist/types/components/x-pagination/x-pagination.d.ts +274 -0
- package/dist/types/components/x-popconfirm/popconfirm-content/popconfirm-content.d.ts +62 -0
- package/dist/types/components/x-popconfirm/x-popconfirm.d.ts +97 -0
- package/dist/types/components/x-popover/popover-content/popover-content.d.ts +71 -0
- package/dist/types/components/x-popover/x-popover.d.ts +99 -0
- package/dist/types/components/x-portal/debug.d.ts +5 -0
- package/dist/types/components/x-portal/index.d.ts +2 -0
- package/dist/types/components/x-portal/portal-controller.d.ts +20 -0
- package/dist/types/components/x-portal/positioning.d.ts +102 -0
- package/dist/types/components/x-portal/types.d.ts +43 -0
- package/dist/types/components/x-portal/x-portal.d.ts +19 -0
- package/dist/types/components/x-progress/x-progress.d.ts +85 -0
- package/dist/types/components/x-qr-code/x-qr-code.d.ts +26 -0
- package/dist/types/components/x-radio/types.d.ts +94 -0
- package/dist/types/components/x-radio/x-radio.d.ts +186 -0
- package/dist/types/components/x-radio-group/types.d.ts +20 -0
- package/dist/types/components/x-radio-group/x-radio-group.d.ts +90 -0
- package/dist/types/components/x-range-picker/range-picker-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-range-picker/range-picker-dropdown-content/range-picker-dropdown-content.d.ts +437 -0
- package/dist/types/components/x-range-picker/range-picker-dropdown-content/types.d.ts +48 -0
- package/dist/types/components/x-range-picker/types.d.ts +35 -0
- package/dist/types/components/x-range-picker/x-range-picker.d.ts +457 -0
- package/dist/types/components/x-rate/x-rate.d.ts +129 -0
- package/dist/types/components/x-result/types.d.ts +45 -0
- package/dist/types/components/x-result/x-result.d.ts +120 -0
- package/dist/types/components/x-row/x-row.d.ts +44 -0
- package/dist/types/components/x-segmented/types.d.ts +10 -0
- package/dist/types/components/x-segmented/x-segmented.d.ts +128 -0
- package/dist/types/components/x-select/select-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-select/select-dropdown-content/select-dropdown-content.d.ts +52 -0
- package/dist/types/components/x-select/select-dropdown-content/types.d.ts +14 -0
- package/dist/types/components/x-select/types.d.ts +41 -0
- package/dist/types/components/x-select/x-select.d.ts +635 -0
- package/dist/types/components/x-select-option/x-select-option.d.ts +51 -0
- package/dist/types/components/x-sider/x-sider.d.ts +99 -0
- package/dist/types/components/x-skeleton/x-skeleton.d.ts +54 -0
- package/dist/types/components/x-slider/types.d.ts +1 -0
- package/dist/types/components/x-slider/x-slider.d.ts +240 -0
- package/dist/types/components/x-space/x-space.d.ts +54 -0
- package/dist/types/components/x-spin/x-spin.d.ts +41 -0
- package/dist/types/components/x-splitter/types.d.ts +41 -0
- package/dist/types/components/x-splitter/x-splitter.d.ts +187 -0
- package/dist/types/components/x-splitter-panel/types.d.ts +23 -0
- package/dist/types/components/x-splitter-panel/x-splitter-panel.d.ts +67 -0
- package/dist/types/components/x-statistic/x-statistic.d.ts +80 -0
- package/dist/types/components/x-step/types.d.ts +14 -0
- package/dist/types/components/x-step/x-step.d.ts +104 -0
- package/dist/types/components/x-steps/types.d.ts +124 -0
- package/dist/types/components/x-steps/x-steps.d.ts +270 -0
- package/dist/types/components/x-switch/types.d.ts +5 -0
- package/dist/types/components/x-switch/x-switch.d.ts +92 -0
- package/dist/types/components/x-tab-pane/x-tab-pane.d.ts +55 -0
- package/dist/types/components/x-table/column-util.d.ts +26 -0
- package/dist/types/components/x-table/types.d.ts +386 -0
- package/dist/types/components/x-table/x-table.d.ts +552 -0
- package/dist/types/components/x-table-cell/x-table-cell.d.ts +27 -0
- package/dist/types/components/x-table-row/x-table-row.d.ts +24 -0
- package/dist/types/components/x-tabs/types.d.ts +190 -0
- package/dist/types/components/x-tabs/x-tabs.d.ts +359 -0
- package/dist/types/components/x-tag/types.d.ts +27 -0
- package/dist/types/components/x-tag/x-tag.d.ts +148 -0
- package/dist/types/components/x-textarea/x-textarea.d.ts +165 -0
- package/dist/types/components/x-time-picker/time-picker-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-time-picker/time-picker-dropdown-content/time-picker-dropdown-content.d.ts +239 -0
- package/dist/types/components/x-time-picker/time-picker-dropdown-content/types.d.ts +28 -0
- package/dist/types/components/x-time-picker/types.d.ts +18 -0
- package/dist/types/components/x-time-picker/x-time-picker.d.ts +378 -0
- package/dist/types/components/x-timeline/x-timeline.d.ts +33 -0
- package/dist/types/components/x-timeline-item/x-timeline-item.d.ts +33 -0
- package/dist/types/components/x-tooltip/types.d.ts +53 -0
- package/dist/types/components/x-tooltip/x-tooltip.d.ts +274 -0
- package/dist/types/components/x-tooltip-content/index.d.ts +1 -0
- package/dist/types/components/x-tooltip-content/types.d.ts +25 -0
- package/dist/types/components/x-tooltip-content/x-tooltip-content.d.ts +57 -0
- package/dist/types/components/x-tour/index.d.ts +1 -0
- package/dist/types/components/x-tour/types.d.ts +71 -0
- package/dist/types/components/x-tour/x-tour-panel.d.ts +73 -0
- package/dist/types/components/x-tour/x-tour.d.ts +158 -0
- package/dist/types/components/x-transfer/types.d.ts +89 -0
- package/dist/types/components/x-transfer/x-transfer.d.ts +291 -0
- package/dist/types/components/x-tree/types.d.ts +163 -0
- package/dist/types/components/x-tree/x-tree.d.ts +406 -0
- package/dist/types/components/x-tree-select/tree-select-dropdown-content/index.d.ts +2 -0
- package/dist/types/components/x-tree-select/tree-select-dropdown-content/tree-select-dropdown-content.d.ts +268 -0
- package/dist/types/components/x-tree-select/tree-select-dropdown-content/types.d.ts +24 -0
- package/dist/types/components/x-tree-select/types.d.ts +100 -0
- package/dist/types/components/x-tree-select/x-tree-select.d.ts +750 -0
- package/dist/types/components/x-typography/x-typography.d.ts +89 -0
- package/dist/types/components/x-upload/types.d.ts +177 -0
- package/dist/types/components/x-upload/x-upload.d.ts +361 -0
- package/dist/types/components/x-virtual-scroll/x-virtual-scroll.d.ts +127 -0
- package/dist/types/components/x-workflow/x-workflow.d.ts +126 -0
- package/dist/types/components/x-workflow-builder/x-workflow-builder.d.ts +69 -0
- package/dist/types/components.d.ts +19048 -0
- package/dist/types/index.d.ts +63 -0
- package/dist/types/locales/index.d.ts +2 -0
- package/dist/types/locales/languages/ar_EG.d.ts +119 -0
- package/dist/types/locales/languages/az_AZ.d.ts +119 -0
- package/dist/types/locales/languages/bg_BG.d.ts +119 -0
- package/dist/types/locales/languages/bn_BD.d.ts +119 -0
- package/dist/types/locales/languages/by_BY.d.ts +119 -0
- package/dist/types/locales/languages/ca_ES.d.ts +119 -0
- package/dist/types/locales/languages/cs_CZ.d.ts +119 -0
- package/dist/types/locales/languages/da_DK.d.ts +119 -0
- package/dist/types/locales/languages/de_DE.d.ts +119 -0
- package/dist/types/locales/languages/el_GR.d.ts +119 -0
- package/dist/types/locales/languages/en_AU.d.ts +119 -0
- package/dist/types/locales/languages/en_GB.d.ts +119 -0
- package/dist/types/locales/languages/en_US.d.ts +119 -0
- package/dist/types/locales/languages/es_ES.d.ts +119 -0
- package/dist/types/locales/languages/et_EE.d.ts +119 -0
- package/dist/types/locales/languages/fa_IR.d.ts +119 -0
- package/dist/types/locales/languages/fi_FI.d.ts +119 -0
- package/dist/types/locales/languages/fr_BE.d.ts +119 -0
- package/dist/types/locales/languages/fr_CA.d.ts +119 -0
- package/dist/types/locales/languages/fr_FR.d.ts +119 -0
- package/dist/types/locales/languages/ga_IE.d.ts +119 -0
- package/dist/types/locales/languages/gl_ES.d.ts +119 -0
- package/dist/types/locales/languages/he_IL.d.ts +119 -0
- package/dist/types/locales/languages/hi_IN.d.ts +119 -0
- package/dist/types/locales/languages/hr_HR.d.ts +119 -0
- package/dist/types/locales/languages/hu_HU.d.ts +119 -0
- package/dist/types/locales/languages/hy_AM.d.ts +119 -0
- package/dist/types/locales/languages/id_ID.d.ts +119 -0
- package/dist/types/locales/languages/index.d.ts +13 -0
- package/dist/types/locales/languages/is_IS.d.ts +119 -0
- package/dist/types/locales/languages/it_IT.d.ts +119 -0
- package/dist/types/locales/languages/ja_JP.d.ts +119 -0
- package/dist/types/locales/languages/ka_GE.d.ts +119 -0
- package/dist/types/locales/languages/kk_KZ.d.ts +119 -0
- package/dist/types/locales/languages/km_KH.d.ts +119 -0
- package/dist/types/locales/languages/kmr_IQ.d.ts +119 -0
- package/dist/types/locales/languages/kn_IN.d.ts +119 -0
- package/dist/types/locales/languages/ko_KR.d.ts +119 -0
- package/dist/types/locales/languages/ku_IQ.d.ts +119 -0
- package/dist/types/locales/languages/lt_LT.d.ts +119 -0
- package/dist/types/locales/languages/lv_LV.d.ts +119 -0
- package/dist/types/locales/languages/mk_MK.d.ts +119 -0
- package/dist/types/locales/languages/ml_IN.d.ts +119 -0
- package/dist/types/locales/languages/mn_MN.d.ts +119 -0
- package/dist/types/locales/languages/ms_MY.d.ts +119 -0
- package/dist/types/locales/languages/nb_NO.d.ts +119 -0
- package/dist/types/locales/languages/ne_NP.d.ts +119 -0
- package/dist/types/locales/languages/nl_BE.d.ts +119 -0
- package/dist/types/locales/languages/nl_NL.d.ts +119 -0
- package/dist/types/locales/languages/pl_PL.d.ts +119 -0
- package/dist/types/locales/languages/pt_BR.d.ts +119 -0
- package/dist/types/locales/languages/pt_PT.d.ts +119 -0
- package/dist/types/locales/languages/ro_RO.d.ts +119 -0
- package/dist/types/locales/languages/ru_RU.d.ts +119 -0
- package/dist/types/locales/languages/sk_SK.d.ts +119 -0
- package/dist/types/locales/languages/sl_SI.d.ts +119 -0
- package/dist/types/locales/languages/sr_RS.d.ts +119 -0
- package/dist/types/locales/languages/sv_SE.d.ts +119 -0
- package/dist/types/locales/languages/ta_IN.d.ts +119 -0
- package/dist/types/locales/languages/th_TH.d.ts +119 -0
- package/dist/types/locales/languages/tr_TR.d.ts +119 -0
- package/dist/types/locales/languages/uk_UA.d.ts +119 -0
- package/dist/types/locales/languages/ur_PK.d.ts +119 -0
- package/dist/types/locales/languages/vi_VN.d.ts +119 -0
- package/dist/types/locales/languages/zh_CN.d.ts +119 -0
- package/dist/types/locales/languages/zh_HK.d.ts +119 -0
- package/dist/types/locales/languages/zh_TW.d.ts +119 -0
- package/dist/types/locales/locale.service.d.ts +93 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/types.d.ts +59 -0
- package/dist/types/utils/app-service.d.ts +20 -0
- package/dist/types/utils/cascader.service.d.ts +45 -0
- package/dist/types/utils/config.d.ts +47 -0
- package/dist/types/utils/form/core/abstract-control.d.ts +121 -0
- package/dist/types/utils/form/core/form-array.d.ts +51 -0
- package/dist/types/utils/form/core/form-builder.d.ts +45 -0
- package/dist/types/utils/form/core/form-control.d.ts +37 -0
- package/dist/types/utils/form/core/form-group.d.ts +63 -0
- package/dist/types/utils/form/frameworks.d.ts +18 -0
- package/dist/types/utils/form/types.d.ts +8 -0
- package/dist/types/utils/form/validators/validators.d.ts +39 -0
- package/dist/types/utils/index.d.ts +10 -0
- package/dist/types/utils/qr-code/cache/qr.cache.d.ts +7 -0
- package/dist/types/utils/qr-code/engine/qr.engine.d.ts +15 -0
- package/dist/types/utils/qr-code/engine/qr.gf.d.ts +4 -0
- package/dist/types/utils/qr-code/engine/qr.mask.d.ts +2 -0
- package/dist/types/utils/qr-code/engine/qr.rs.d.ts +1 -0
- package/dist/types/utils/qr-code/engine/qr.util.d.ts +0 -0
- package/dist/types/utils/qr-code/engine/qr.version.d.ts +16 -0
- package/dist/types/utils/qr-code/renderer/canvas.renderer.d.ts +6 -0
- package/dist/types/utils/qr-code/renderer/svg.renderer.d.ts +7 -0
- package/dist/types/utils/qr-code/worker/worker.manager.d.ts +12 -0
- package/dist/types/utils/table.service.d.ts +48 -0
- package/dist/types/utils/tree.service.d.ts +85 -0
- package/dist/types/utils/workflow/flow.service.d.ts +61 -0
- package/dist/types/utils/workflow/types.d.ts +120 -0
- package/dist/xlabs-store/fonts/xlabs-outlined.woff2 +0 -0
- package/dist/xlabs-store/fonts/xlabs-rounded.woff2 +0 -0
- package/dist/xlabs-store/fonts/xlabs-solided.woff2 +0 -0
- package/dist/xlabs-store/index.esm.js +1 -0
- package/dist/xlabs-store/p-016194dc.entry.js +1 -0
- package/dist/xlabs-store/p-023259c9.entry.js +1 -0
- package/dist/xlabs-store/p-04a3721a.entry.js +1 -0
- package/dist/xlabs-store/p-072445b7.entry.js +1 -0
- package/dist/xlabs-store/p-0ec21454.entry.js +1 -0
- package/dist/xlabs-store/p-12b6a843.entry.js +1 -0
- package/dist/xlabs-store/p-1a81cf09.entry.js +1 -0
- package/dist/xlabs-store/p-1b019aeb.entry.js +1 -0
- package/dist/xlabs-store/p-262a0673.entry.js +1 -0
- package/dist/xlabs-store/p-34cce823.entry.js +1 -0
- package/dist/xlabs-store/p-3a9fdefe.entry.js +1 -0
- package/dist/xlabs-store/p-40036100.entry.js +1 -0
- package/dist/xlabs-store/p-45f04e8d.entry.js +1 -0
- package/dist/xlabs-store/p-48ba7c34.entry.js +1 -0
- package/dist/xlabs-store/p-48e2c26e.entry.js +1 -0
- package/dist/xlabs-store/p-4ac2e915.entry.js +1 -0
- package/dist/xlabs-store/p-4d7c2a35.entry.js +1 -0
- package/dist/xlabs-store/p-4f67cb33.entry.js +1 -0
- package/dist/xlabs-store/p-502b345e.entry.js +1 -0
- package/dist/xlabs-store/p-555c5e48.entry.js +1 -0
- package/dist/xlabs-store/p-5878525f.entry.js +1 -0
- package/dist/xlabs-store/p-5abbdca7.entry.js +1 -0
- package/dist/xlabs-store/p-6243ca69.entry.js +1 -0
- package/dist/xlabs-store/p-64e7a057.entry.js +1 -0
- package/dist/xlabs-store/p-6530d2ef.entry.js +1 -0
- package/dist/xlabs-store/p-675a39e1.entry.js +1 -0
- package/dist/xlabs-store/p-689c52ef.entry.js +1 -0
- package/dist/xlabs-store/p-69b8cb7d.entry.js +1 -0
- package/dist/xlabs-store/p-6b121c60.entry.js +1 -0
- package/dist/xlabs-store/p-6c75fc39.entry.js +1 -0
- package/dist/xlabs-store/p-6f705deb.entry.js +1 -0
- package/dist/xlabs-store/p-723d362c.entry.js +1 -0
- package/dist/xlabs-store/p-783545e3.entry.js +1 -0
- package/dist/xlabs-store/p-7a8f11b4.entry.js +1 -0
- package/dist/xlabs-store/p-81fb4caf.entry.js +1 -0
- package/dist/xlabs-store/p-863dd67d.entry.js +1 -0
- package/dist/xlabs-store/p-8bcbb4e3.entry.js +1 -0
- package/dist/xlabs-store/p-8bcc219a.entry.js +1 -0
- package/dist/xlabs-store/p-914b0ae2.entry.js +1 -0
- package/dist/xlabs-store/p-96b1939d.entry.js +1 -0
- package/dist/xlabs-store/p-9ac291ea.entry.js +1 -0
- package/dist/xlabs-store/p-9de03a07.entry.js +1 -0
- package/dist/xlabs-store/p-BPeosvTA.js +1 -0
- package/dist/xlabs-store/p-COpzIi1n.js +1 -0
- package/dist/xlabs-store/p-C_QdJRdB.js +1 -0
- package/dist/xlabs-store/p-Ce5L9qbY.js +1 -0
- package/dist/xlabs-store/p-Co3Y9VjQ.js +1 -0
- package/dist/xlabs-store/p-D66tF8_2.js +1 -0
- package/dist/xlabs-store/p-DElCk9ta.js +1 -0
- package/dist/xlabs-store/p-Dgxy93Bg.js +1 -0
- package/dist/xlabs-store/p-XBF88YT_.js +1 -0
- package/dist/xlabs-store/p-a4223feb.entry.js +1 -0
- package/dist/xlabs-store/p-a8c2eca7.entry.js +1 -0
- package/dist/xlabs-store/p-ac9ba3aa.entry.js +1 -0
- package/dist/xlabs-store/p-bd5084b8.entry.js +1 -0
- package/dist/xlabs-store/p-bda322db.entry.js +1 -0
- package/dist/xlabs-store/p-c0ca6f7d.entry.js +1 -0
- package/dist/xlabs-store/p-c4c8840c.entry.js +1 -0
- package/dist/xlabs-store/p-c4d0ce0d.entry.js +1 -0
- package/dist/xlabs-store/p-cd3c3374.entry.js +1 -0
- package/dist/xlabs-store/p-cf4697bc.entry.js +1 -0
- package/dist/xlabs-store/p-d2ec3d4a.entry.js +1 -0
- package/dist/xlabs-store/p-d4d00aff.entry.js +1 -0
- package/dist/xlabs-store/p-d9d0147b.entry.js +1 -0
- package/dist/xlabs-store/p-dd930f2a.entry.js +1 -0
- package/dist/xlabs-store/p-e04836e8.entry.js +1 -0
- package/dist/xlabs-store/p-e14b5f6d.entry.js +1 -0
- package/dist/xlabs-store/p-eb1dd3c2.entry.js +1 -0
- package/dist/xlabs-store/p-f02155e4.entry.js +1 -0
- package/dist/xlabs-store/p-f1331938.entry.js +1 -0
- package/dist/xlabs-store/p-fac0b689.entry.js +1 -0
- package/dist/xlabs-store/p-fd2e1d9c.entry.js +1 -0
- package/dist/xlabs-store/p-fdec5d89.entry.js +1 -0
- package/dist/xlabs-store/p-ffba56b2.entry.js +1 -0
- package/dist/xlabs-store/p-ig_mFsVk.js +2 -0
- package/dist/xlabs-store/xlabs-store.css +1 -0
- package/dist/xlabs-store/xlabs-store.esm.js +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +69 -0
- package/readme.md +50 -0
|
@@ -0,0 +1,2464 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { translate } from "../../locales/locale.service";
|
|
3
|
+
import { ColumnUtil } from "./column-util";
|
|
4
|
+
import { TableService } from "../../utils";
|
|
5
|
+
/**
|
|
6
|
+
* @component x-table
|
|
7
|
+
* @description A table displays rows of data.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <x-table
|
|
11
|
+
* [columns]="columns"
|
|
12
|
+
* [dataSource]="data"
|
|
13
|
+
* row-key="id"
|
|
14
|
+
* ></x-table>
|
|
15
|
+
*/
|
|
16
|
+
export class XTable {
|
|
17
|
+
// We'll move common logic to a base class in a future step if needed,
|
|
18
|
+
// but for now let's just make the members more accessible.
|
|
19
|
+
/**
|
|
20
|
+
* Host element reference.
|
|
21
|
+
*/
|
|
22
|
+
el;
|
|
23
|
+
tableService;
|
|
24
|
+
// ==================== Props ====================
|
|
25
|
+
/**
|
|
26
|
+
* Columns configuration.
|
|
27
|
+
* @example
|
|
28
|
+
* <x-table columns={[{ title: 'Name', dataIndex: 'name' }]}></x-table>
|
|
29
|
+
*/
|
|
30
|
+
columns = [];
|
|
31
|
+
/**
|
|
32
|
+
* Data source array.
|
|
33
|
+
* @example
|
|
34
|
+
* <x-table dataSource={[{ key: '1', name: 'Alice' }]}></x-table>
|
|
35
|
+
*/
|
|
36
|
+
dataSource = [];
|
|
37
|
+
/**
|
|
38
|
+
* Row key field or function.
|
|
39
|
+
* @example
|
|
40
|
+
* <x-table rowKey="id"></x-table>
|
|
41
|
+
*/
|
|
42
|
+
rowKey = 'key';
|
|
43
|
+
/**
|
|
44
|
+
* Table size.
|
|
45
|
+
* @default 'large'
|
|
46
|
+
* @example
|
|
47
|
+
* <x-table size="small"></x-table>
|
|
48
|
+
*/
|
|
49
|
+
size = 'large';
|
|
50
|
+
/**
|
|
51
|
+
* Table layout.
|
|
52
|
+
* @default 'auto'
|
|
53
|
+
* @example
|
|
54
|
+
* <x-table tableLayout="fixed"></x-table>
|
|
55
|
+
*/
|
|
56
|
+
tableLayout = 'auto';
|
|
57
|
+
/**
|
|
58
|
+
* Whether to show all borders.
|
|
59
|
+
* @default false
|
|
60
|
+
* @example
|
|
61
|
+
* <x-table bordered></x-table>
|
|
62
|
+
*/
|
|
63
|
+
bordered = false;
|
|
64
|
+
/**
|
|
65
|
+
* Loading state.
|
|
66
|
+
* @default false
|
|
67
|
+
* @example
|
|
68
|
+
* <x-table loading></x-table>
|
|
69
|
+
*/
|
|
70
|
+
loading = false;
|
|
71
|
+
/**
|
|
72
|
+
* Show table header.
|
|
73
|
+
* @default true
|
|
74
|
+
* @example
|
|
75
|
+
* <x-table showHeader={false}></x-table>
|
|
76
|
+
*/
|
|
77
|
+
showHeader = true;
|
|
78
|
+
/**
|
|
79
|
+
* Table title.
|
|
80
|
+
* @example
|
|
81
|
+
* <x-table tableTitle="Users"></x-table>
|
|
82
|
+
*/
|
|
83
|
+
tableTitle;
|
|
84
|
+
/**
|
|
85
|
+
* Table footer.
|
|
86
|
+
* @example
|
|
87
|
+
* <x-table tableFooter="Total: 20"></x-table>
|
|
88
|
+
*/
|
|
89
|
+
tableFooter;
|
|
90
|
+
/**
|
|
91
|
+
* Row selection configuration.
|
|
92
|
+
* @example
|
|
93
|
+
* <x-table rowSelection={{ type: 'checkbox' }}></x-table>
|
|
94
|
+
*/
|
|
95
|
+
rowSelection;
|
|
96
|
+
/**
|
|
97
|
+
* Expandable configuration.
|
|
98
|
+
* @example
|
|
99
|
+
* <x-table expandable={{ expandedRowRender: (r) => r.description }}></x-table>
|
|
100
|
+
*/
|
|
101
|
+
expandable;
|
|
102
|
+
/**
|
|
103
|
+
* Scroll configuration for table body.
|
|
104
|
+
* @example
|
|
105
|
+
* <x-table tableScroll={{ y: 300 }}></x-table>
|
|
106
|
+
*/
|
|
107
|
+
tableScroll;
|
|
108
|
+
/**
|
|
109
|
+
* Pagination configuration. Set to false to disable.
|
|
110
|
+
* @example
|
|
111
|
+
* <x-table pagination={{ pageSize: 20 }}></x-table>
|
|
112
|
+
*/
|
|
113
|
+
pagination;
|
|
114
|
+
/**
|
|
115
|
+
* Whether to show sorter tooltip.
|
|
116
|
+
* @default true
|
|
117
|
+
* @example
|
|
118
|
+
* <x-table showSorterTooltip={false}></x-table>
|
|
119
|
+
*/
|
|
120
|
+
showSorterTooltip = true;
|
|
121
|
+
/**
|
|
122
|
+
* Sort directions.
|
|
123
|
+
* @default ['ascend', 'descend']
|
|
124
|
+
* @example
|
|
125
|
+
* <x-table sortDirections={['descend','ascend']}></x-table>
|
|
126
|
+
*/
|
|
127
|
+
sortDirections = ['ascend', 'descend'];
|
|
128
|
+
/**
|
|
129
|
+
* Sticky header and scroll bar.
|
|
130
|
+
* @example
|
|
131
|
+
* <x-table sticky></x-table>
|
|
132
|
+
*/
|
|
133
|
+
sticky;
|
|
134
|
+
/**
|
|
135
|
+
* Virtual scroll mode.
|
|
136
|
+
* @default false
|
|
137
|
+
* @example
|
|
138
|
+
* <x-table virtual></x-table>
|
|
139
|
+
*/
|
|
140
|
+
virtual = false;
|
|
141
|
+
/**
|
|
142
|
+
* Empty text when no data.
|
|
143
|
+
* @example
|
|
144
|
+
* <x-table emptyText="No records"></x-table>
|
|
145
|
+
*/
|
|
146
|
+
emptyText = translate('Empty.description', {}, 'No Data');
|
|
147
|
+
/**
|
|
148
|
+
* Row class name or function.
|
|
149
|
+
* @example
|
|
150
|
+
* <x-table rowClassName={(r) => r.active ? 'active' : ''}></x-table>
|
|
151
|
+
*/
|
|
152
|
+
rowClassName;
|
|
153
|
+
/**
|
|
154
|
+
* Row events handler.
|
|
155
|
+
* @example
|
|
156
|
+
* <x-table rowEvents={(r) => ({ onClick: () => console.log(r) })}></x-table>
|
|
157
|
+
*/
|
|
158
|
+
rowEvents;
|
|
159
|
+
/**
|
|
160
|
+
* Enable column resizing.
|
|
161
|
+
* @default false
|
|
162
|
+
*/
|
|
163
|
+
resizableColumns = false;
|
|
164
|
+
/**
|
|
165
|
+
* Enable column dragging (reordering).
|
|
166
|
+
* @default false
|
|
167
|
+
*/
|
|
168
|
+
draggableColumns = false;
|
|
169
|
+
/**
|
|
170
|
+
* Enable row dragging (reordering).
|
|
171
|
+
* @default false
|
|
172
|
+
*/
|
|
173
|
+
draggableRows = false;
|
|
174
|
+
/**
|
|
175
|
+
* Header row events handler.
|
|
176
|
+
* @example
|
|
177
|
+
* <x-table headerRowEvents={() => ({ onClick: () => {} })}></x-table>
|
|
178
|
+
*/
|
|
179
|
+
headerRowEvents;
|
|
180
|
+
/**
|
|
181
|
+
* Custom class names for parts.
|
|
182
|
+
* @example
|
|
183
|
+
* <x-table classNames={{ root: 'my-table' }}></x-table>
|
|
184
|
+
*/
|
|
185
|
+
classNames;
|
|
186
|
+
/**
|
|
187
|
+
* Custom styles for parts.
|
|
188
|
+
* @example
|
|
189
|
+
* <x-table styles={{ root: { minWidth: '600px' } }}></x-table>
|
|
190
|
+
*/
|
|
191
|
+
styles;
|
|
192
|
+
// ==================== Events ====================
|
|
193
|
+
/**
|
|
194
|
+
* Callback when pagination, filters or sorter is changed.
|
|
195
|
+
* @example
|
|
196
|
+
* <x-table onXChange={(ev) => console.log(ev.detail)}></x-table>
|
|
197
|
+
*/
|
|
198
|
+
xChange;
|
|
199
|
+
/**
|
|
200
|
+
* Callback when row is clicked.
|
|
201
|
+
* @example
|
|
202
|
+
* <x-table onXRowClick={(ev) => console.log(ev.detail)}></x-table>
|
|
203
|
+
*/
|
|
204
|
+
xRowClick;
|
|
205
|
+
/**
|
|
206
|
+
* Callback when row is double clicked.
|
|
207
|
+
* @example
|
|
208
|
+
* <x-table onXRowDoubleClick={(ev) => console.log(ev.detail)}></x-table>
|
|
209
|
+
*/
|
|
210
|
+
xRowDoubleClick;
|
|
211
|
+
/**
|
|
212
|
+
* Callback when selection changes.
|
|
213
|
+
* @example
|
|
214
|
+
* <x-table onXSelectionChange={(ev) => console.log(ev.detail)}></x-table>
|
|
215
|
+
*/
|
|
216
|
+
xSelectionChange;
|
|
217
|
+
/**
|
|
218
|
+
* Callback when row expand state changes.
|
|
219
|
+
* @example
|
|
220
|
+
* <x-table onXExpand={(ev) => console.log(ev.detail)}></x-table>
|
|
221
|
+
*/
|
|
222
|
+
xExpand;
|
|
223
|
+
/**
|
|
224
|
+
* Callback when expanded rows change.
|
|
225
|
+
* @example
|
|
226
|
+
* <x-table onXExpandedRowsChange={(ev) => console.log(ev.detail)}></x-table>
|
|
227
|
+
*/
|
|
228
|
+
xExpandedRowsChange;
|
|
229
|
+
/**
|
|
230
|
+
* Callback when columns are reordered via drag and drop.
|
|
231
|
+
*/
|
|
232
|
+
xColumnSort;
|
|
233
|
+
/**
|
|
234
|
+
* Callback when rows are reordered via drag and drop.
|
|
235
|
+
*/
|
|
236
|
+
xDragSort;
|
|
237
|
+
/**
|
|
238
|
+
* Callback when displayed data changes (due to pagination, filtering or sorting)
|
|
239
|
+
*/
|
|
240
|
+
xDataDisplayChange;
|
|
241
|
+
// ==================== State ====================
|
|
242
|
+
/**
|
|
243
|
+
* Current page number.
|
|
244
|
+
*/
|
|
245
|
+
currentPage = 1;
|
|
246
|
+
/**
|
|
247
|
+
* Current page size.
|
|
248
|
+
*/
|
|
249
|
+
currentPageSize = 10;
|
|
250
|
+
/**
|
|
251
|
+
* Sort state.
|
|
252
|
+
*/
|
|
253
|
+
sortState = {};
|
|
254
|
+
/**
|
|
255
|
+
* Filter state.
|
|
256
|
+
*/
|
|
257
|
+
filterState = {};
|
|
258
|
+
/**
|
|
259
|
+
* Selected row keys.
|
|
260
|
+
*/
|
|
261
|
+
selectedRowKeys = [];
|
|
262
|
+
/**
|
|
263
|
+
* Expanded row keys.
|
|
264
|
+
*/
|
|
265
|
+
expandedRowKeys = [];
|
|
266
|
+
/**
|
|
267
|
+
* Hovered row key.
|
|
268
|
+
*/
|
|
269
|
+
hoveredRowKey = null;
|
|
270
|
+
/**
|
|
271
|
+
* Internal columns state for resizing and reordering.
|
|
272
|
+
*/
|
|
273
|
+
internalColumns = []; // Changed from private to public for sub-components
|
|
274
|
+
/**
|
|
275
|
+
* Internal data source state for row reordering.
|
|
276
|
+
*/
|
|
277
|
+
internalDataSource = [];
|
|
278
|
+
resizeState = null;
|
|
279
|
+
draggedColumnKey = null;
|
|
280
|
+
dragOverColumnKey = null;
|
|
281
|
+
dragOverColumnSide = null;
|
|
282
|
+
draggedRowKey = null;
|
|
283
|
+
dragOverRowKey = null;
|
|
284
|
+
dragOverRowSide = null;
|
|
285
|
+
// ==================== Lifecycle ====================
|
|
286
|
+
/**
|
|
287
|
+
* @returns void
|
|
288
|
+
*/
|
|
289
|
+
componentWillLoad() {
|
|
290
|
+
this.tableService = new TableService(this.rowKey);
|
|
291
|
+
this.tableService.state.columns = ColumnUtil.getFlattenColumns(this.columns);
|
|
292
|
+
this.tableService.state.dataSource = this.dataSource;
|
|
293
|
+
// Subscribe to service state changes to trigger re-renders
|
|
294
|
+
this.tableService.subscribe(() => {
|
|
295
|
+
// Just trigger re-render if needed, though Stencil handles its own @State
|
|
296
|
+
// In a full refactor, we would map this.state back to @State
|
|
297
|
+
});
|
|
298
|
+
this.internalColumns = this.tableService.state.columns;
|
|
299
|
+
this.internalDataSource = [...this.dataSource];
|
|
300
|
+
// Initialize pagination
|
|
301
|
+
if (this.pagination) {
|
|
302
|
+
const pag = this.pagination;
|
|
303
|
+
this.tableService.state.currentPage = pag.defaultCurrent || pag.current || 1;
|
|
304
|
+
this.tableService.state.pageSize = pag.defaultPageSize || pag.pageSize || 10;
|
|
305
|
+
this.currentPage = this.tableService.state.currentPage;
|
|
306
|
+
this.currentPageSize = this.tableService.state.pageSize;
|
|
307
|
+
}
|
|
308
|
+
// Initialize selection
|
|
309
|
+
if (this.rowSelection) {
|
|
310
|
+
this.tableService.state.selectedRowKeys = this.rowSelection.defaultSelectedRowKeys || this.rowSelection.selectedRowKeys || [];
|
|
311
|
+
this.selectedRowKeys = this.tableService.state.selectedRowKeys;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
// ==================== Watchers ====================
|
|
315
|
+
handleRowKeyChange() {
|
|
316
|
+
this.tableService.setRowKey(this.rowKey);
|
|
317
|
+
}
|
|
318
|
+
handleColumnsChange() {
|
|
319
|
+
this.internalColumns = ColumnUtil.getFlattenColumns(this.columns);
|
|
320
|
+
}
|
|
321
|
+
handleDataSourceChange() {
|
|
322
|
+
this.internalDataSource = [...this.dataSource];
|
|
323
|
+
}
|
|
324
|
+
handleRowSelectionChange() {
|
|
325
|
+
if (this.rowSelection?.selectedRowKeys !== undefined) {
|
|
326
|
+
this.selectedRowKeys = this.rowSelection.selectedRowKeys;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
handleExpandableChange() {
|
|
330
|
+
if (this.expandable?.expandedRowKeys !== undefined) {
|
|
331
|
+
this.expandedRowKeys = this.expandable.expandedRowKeys;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
handlePaginationChange() {
|
|
335
|
+
if (this.pagination && typeof this.pagination === 'object') {
|
|
336
|
+
if (this.pagination.current !== undefined) {
|
|
337
|
+
this.currentPage = this.pagination.current;
|
|
338
|
+
}
|
|
339
|
+
if (this.pagination.pageSize !== undefined) {
|
|
340
|
+
this.currentPageSize = this.pagination.pageSize;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
// ==================== Methods ====================
|
|
345
|
+
/**
|
|
346
|
+
* Get current selected row keys.
|
|
347
|
+
* @returns Promise<(string | number)[]>
|
|
348
|
+
* @example
|
|
349
|
+
* const keys = await el.getSelectedRowKeys()
|
|
350
|
+
*/
|
|
351
|
+
async getSelectedRowKeys() {
|
|
352
|
+
return this.selectedRowKeys;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Set selected row keys.
|
|
356
|
+
* @param keys - Row keys.
|
|
357
|
+
* @returns Promise<void>
|
|
358
|
+
* @example
|
|
359
|
+
* await el.setSelectedRowKeys(['1'])
|
|
360
|
+
*/
|
|
361
|
+
async setSelectedRowKeys(keys) {
|
|
362
|
+
this.selectedRowKeys = keys;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Clear all selections.
|
|
366
|
+
* @returns Promise<void>
|
|
367
|
+
* @example
|
|
368
|
+
* await el.clearSelection()
|
|
369
|
+
*/
|
|
370
|
+
async clearSelection() {
|
|
371
|
+
this.selectedRowKeys = [];
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Get current expanded row keys.
|
|
375
|
+
* @returns Promise<(string | number)[]>
|
|
376
|
+
* @example
|
|
377
|
+
* const keys = await el.getExpandedRowKeys()
|
|
378
|
+
*/
|
|
379
|
+
async getExpandedRowKeys() {
|
|
380
|
+
return this.expandedRowKeys;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Scroll to a specific row.
|
|
384
|
+
* @param config - Scroll config.
|
|
385
|
+
* @returns Promise<void>
|
|
386
|
+
* @example
|
|
387
|
+
* await el.scrollToRow({ top: 120 })
|
|
388
|
+
*/
|
|
389
|
+
async scrollToRow(config) {
|
|
390
|
+
const tableBody = this.el.shadowRoot?.querySelector('.x-table-body');
|
|
391
|
+
if (tableBody && config.top !== undefined) {
|
|
392
|
+
tableBody.scrollTop = config.top;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
// ==================== Private Methods ====================
|
|
396
|
+
getRowKey(record, index) {
|
|
397
|
+
if (typeof this.rowKey === 'function') {
|
|
398
|
+
return this.rowKey(record);
|
|
399
|
+
}
|
|
400
|
+
return record[this.rowKey] ?? index ?? 0;
|
|
401
|
+
}
|
|
402
|
+
getRowClassName(record, index) {
|
|
403
|
+
if (!this.rowClassName)
|
|
404
|
+
return '';
|
|
405
|
+
if (typeof this.rowClassName === 'function') {
|
|
406
|
+
return this.rowClassName(record, index);
|
|
407
|
+
}
|
|
408
|
+
return this.rowClassName;
|
|
409
|
+
}
|
|
410
|
+
getCellValue(record, dataIndex) {
|
|
411
|
+
if (!dataIndex)
|
|
412
|
+
return undefined;
|
|
413
|
+
if (Array.isArray(dataIndex)) {
|
|
414
|
+
return dataIndex.reduce((obj, key) => obj?.[key], record);
|
|
415
|
+
}
|
|
416
|
+
return record[dataIndex];
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Processes the data source by applying filters and sorting.
|
|
420
|
+
*
|
|
421
|
+
* Flow:
|
|
422
|
+
* 1. Copies the `dataSource` to avoid mutating the original.
|
|
423
|
+
* 2. Iterates through `filterState` to apply active filters:
|
|
424
|
+
* - Finds the corresponding column.
|
|
425
|
+
* - Calls the column's `onFilter` function for each record.
|
|
426
|
+
* 3. Checks `sortState` for active sorting:
|
|
427
|
+
* - Finds the corresponding column.
|
|
428
|
+
* - Uses the column's `sorter` function or a default comparator.
|
|
429
|
+
* - Sorts the data based on `ascend` or `descend` order.
|
|
430
|
+
*
|
|
431
|
+
* @returns any[] - The filtered and sorted data array.
|
|
432
|
+
*/
|
|
433
|
+
getProcessedData() {
|
|
434
|
+
this.tableService.setState({
|
|
435
|
+
dataSource: this.internalDataSource,
|
|
436
|
+
columns: this.internalColumns,
|
|
437
|
+
filterState: this.filterState,
|
|
438
|
+
sortState: this.sortState
|
|
439
|
+
});
|
|
440
|
+
return this.tableService.getProcessedData();
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Paginates the processed data based on current page and page size.
|
|
444
|
+
*
|
|
445
|
+
* Flow:
|
|
446
|
+
* 1. Gets the full filtered/sorted data from `getProcessedData`.
|
|
447
|
+
* 2. If pagination is disabled, returns all data.
|
|
448
|
+
* 3. Calculates start and end indices.
|
|
449
|
+
* 4. Slices the data array to return only the current page's records.
|
|
450
|
+
*
|
|
451
|
+
* @returns any[] - The paginated data array.
|
|
452
|
+
*/
|
|
453
|
+
getPaginatedData() {
|
|
454
|
+
const processededData = this.getProcessedData();
|
|
455
|
+
if (this.pagination === false)
|
|
456
|
+
return processededData;
|
|
457
|
+
this.tableService.setState({
|
|
458
|
+
currentPage: this.currentPage,
|
|
459
|
+
pageSize: this.currentPageSize
|
|
460
|
+
});
|
|
461
|
+
return this.tableService.getPaginatedData(processededData);
|
|
462
|
+
}
|
|
463
|
+
handleSort(column) {
|
|
464
|
+
if (!column.sorter)
|
|
465
|
+
return;
|
|
466
|
+
this.tableService.sort(column, this.sortDirections);
|
|
467
|
+
this.sortState = this.tableService.state.sortState;
|
|
468
|
+
this.emitChange('sort');
|
|
469
|
+
}
|
|
470
|
+
handlePageChange(page, pageSize) {
|
|
471
|
+
this.tableService.goToPage(page);
|
|
472
|
+
this.tableService.setPageSize(pageSize);
|
|
473
|
+
this.currentPage = this.tableService.state.currentPage;
|
|
474
|
+
this.currentPageSize = this.tableService.state.pageSize;
|
|
475
|
+
this.emitChange('paginate');
|
|
476
|
+
}
|
|
477
|
+
handleRowClick(record, index, event) {
|
|
478
|
+
this.xRowClick.emit({ record, index, event });
|
|
479
|
+
// Handle row selection on click
|
|
480
|
+
if (this.rowSelection) {
|
|
481
|
+
this.toggleRowSelection(record);
|
|
482
|
+
}
|
|
483
|
+
// Handle expand on row click
|
|
484
|
+
if (this.expandable?.expandRowByClick) {
|
|
485
|
+
this.toggleRowExpand(record);
|
|
486
|
+
}
|
|
487
|
+
// Custom rowEvents handler
|
|
488
|
+
const rowHandler = this.rowEvents?.(record, index);
|
|
489
|
+
rowHandler?.onClick?.(event);
|
|
490
|
+
}
|
|
491
|
+
handleRowDoubleClick(record, index, event) {
|
|
492
|
+
this.xRowDoubleClick.emit({ record, index, event });
|
|
493
|
+
const rowHandler = this.rowEvents?.(record, index);
|
|
494
|
+
rowHandler?.onDoubleClick?.(event);
|
|
495
|
+
}
|
|
496
|
+
toggleRowSelection(record) {
|
|
497
|
+
const isSelected = this.selectedRowKeys.includes(this.getRowKey(record));
|
|
498
|
+
const newSelectedKeys = this.tableService.toggleSelection(record, this.rowSelection?.type);
|
|
499
|
+
this.selectedRowKeys = newSelectedKeys;
|
|
500
|
+
const selectedRows = this.internalDataSource.filter(r => newSelectedKeys.includes(this.getRowKey(r)));
|
|
501
|
+
this.xSelectionChange.emit({
|
|
502
|
+
selectedRowKeys: newSelectedKeys,
|
|
503
|
+
selectedRows,
|
|
504
|
+
info: { type: isSelected ? 'single' : 'single' },
|
|
505
|
+
});
|
|
506
|
+
this.rowSelection?.onChange?.(newSelectedKeys, selectedRows, { type: 'single' });
|
|
507
|
+
}
|
|
508
|
+
toggleRowExpand(record) {
|
|
509
|
+
const isExpanded = this.expandedRowKeys.includes(this.getRowKey(record));
|
|
510
|
+
const newExpandedKeys = this.tableService.toggleExpand(record);
|
|
511
|
+
this.expandedRowKeys = newExpandedKeys;
|
|
512
|
+
this.xExpand.emit({ expanded: !isExpanded, record });
|
|
513
|
+
this.xExpandedRowsChange.emit({ expandedKeys: newExpandedKeys });
|
|
514
|
+
this.expandable?.onExpand?.(!isExpanded, record);
|
|
515
|
+
this.expandable?.onExpandedRowsChange?.(newExpandedKeys);
|
|
516
|
+
}
|
|
517
|
+
handleSelectAll(checked) {
|
|
518
|
+
const newSelectedKeys = this.tableService.selectAll(checked, this.rowSelection?.getCheckboxProps);
|
|
519
|
+
this.selectedRowKeys = newSelectedKeys;
|
|
520
|
+
const selectedRows = this.internalDataSource.filter(r => newSelectedKeys.includes(this.getRowKey(r)));
|
|
521
|
+
const selectableRecords = this.internalDataSource.filter(record => !this.rowSelection?.getCheckboxProps?.(record)?.disabled);
|
|
522
|
+
this.xSelectionChange.emit({
|
|
523
|
+
selectedRowKeys: newSelectedKeys,
|
|
524
|
+
selectedRows,
|
|
525
|
+
info: { type: checked ? 'all' : 'none' },
|
|
526
|
+
});
|
|
527
|
+
this.rowSelection?.onChange?.(newSelectedKeys, selectedRows, { type: checked ? 'all' : 'none' });
|
|
528
|
+
this.rowSelection?.onSelectAll?.(checked, selectedRows, selectableRecords);
|
|
529
|
+
}
|
|
530
|
+
emitChange(action) {
|
|
531
|
+
console.log('emitChange', action);
|
|
532
|
+
this.xChange.emit({
|
|
533
|
+
pagination: {
|
|
534
|
+
current: this.currentPage,
|
|
535
|
+
pageSize: this.currentPageSize,
|
|
536
|
+
total: this.getProcessedData().length,
|
|
537
|
+
},
|
|
538
|
+
filters: this.filterState,
|
|
539
|
+
sorter: this.sortState,
|
|
540
|
+
extra: {
|
|
541
|
+
currentDataSource: this.getProcessedData(),
|
|
542
|
+
action,
|
|
543
|
+
},
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
// ==================== Render Methods ====================
|
|
547
|
+
renderSortIcon(column) {
|
|
548
|
+
if (!column.sorter)
|
|
549
|
+
return null;
|
|
550
|
+
const columnKey = column.key || column.dataIndex;
|
|
551
|
+
const isActive = this.sortState.columnKey === columnKey;
|
|
552
|
+
const order = isActive ? this.sortState.order : null;
|
|
553
|
+
return (h("span", { class: "x-table-column-sorter" }, h("span", { class: "x-table-column-sorter-inner" }, h("span", { class: { 'x-table-column-sorter-up': true, 'active': order === 'ascend' } }, h("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor" }, h("path", { d: "M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z" }))), h("span", { class: { 'x-table-column-sorter-down': true, 'active': order === 'descend' } }, h("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor" }, h("path", { d: "M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z" }))))));
|
|
554
|
+
}
|
|
555
|
+
renderSelectionColumn(rowSpan = 1) {
|
|
556
|
+
if (!this.rowSelection)
|
|
557
|
+
return null;
|
|
558
|
+
const allSelected = this.internalDataSource.length > 0 &&
|
|
559
|
+
this.internalDataSource.every(record => {
|
|
560
|
+
const checkboxProps = this.rowSelection?.getCheckboxProps?.(record);
|
|
561
|
+
return checkboxProps?.disabled || this.selectedRowKeys.includes(this.getRowKey(record));
|
|
562
|
+
});
|
|
563
|
+
const someSelected = this.selectedRowKeys.length > 0 && !allSelected;
|
|
564
|
+
return (h("th", { class: "x-table-cell x-table-selection-column", rowSpan: rowSpan }, this.rowSelection.type !== 'radio' && !this.rowSelection.hideSelectAll && (h("label", { class: "x-table-selection-checkbox" }, h("input", { type: "checkbox", checked: allSelected, indeterminate: someSelected, onChange: (e) => this.handleSelectAll(e.target.checked) }), h("span", { class: "x-table-checkbox-inner" })))));
|
|
565
|
+
}
|
|
566
|
+
renderExpandColumn(rowSpan = 1) {
|
|
567
|
+
if (!this.expandable?.expandedRowRender)
|
|
568
|
+
return null;
|
|
569
|
+
return (h("th", { class: "x-table-cell x-table-expand-column", rowSpan: rowSpan }, this.expandable.columnTitle || ''));
|
|
570
|
+
}
|
|
571
|
+
activeFilterColumn = null;
|
|
572
|
+
handleFilterDropdownOpenChange(columnKey, visible) {
|
|
573
|
+
if (visible) {
|
|
574
|
+
this.activeFilterColumn = columnKey;
|
|
575
|
+
}
|
|
576
|
+
else if (this.activeFilterColumn === columnKey) {
|
|
577
|
+
this.activeFilterColumn = null;
|
|
578
|
+
}
|
|
579
|
+
// Find column and trigger callback
|
|
580
|
+
const column = this.internalColumns.find(col => (col.key || col.dataIndex) === columnKey);
|
|
581
|
+
column?.onFilterDropdownOpenChange?.(visible);
|
|
582
|
+
}
|
|
583
|
+
handleFilterChange(columnKey, value, checked, multiple) {
|
|
584
|
+
const currentFilters = this.filterState[columnKey] || [];
|
|
585
|
+
let newFilters;
|
|
586
|
+
if (multiple) {
|
|
587
|
+
if (checked) {
|
|
588
|
+
newFilters = [...currentFilters, value];
|
|
589
|
+
}
|
|
590
|
+
else {
|
|
591
|
+
newFilters = currentFilters.filter(v => v !== value);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
else {
|
|
595
|
+
newFilters = checked ? [value] : [];
|
|
596
|
+
}
|
|
597
|
+
this.filterState = {
|
|
598
|
+
...this.filterState,
|
|
599
|
+
[columnKey]: newFilters
|
|
600
|
+
};
|
|
601
|
+
// emit change if needed immediately? AntD usually waits for OK.
|
|
602
|
+
// implementing "Apply on OK" pattern basically means we should use temp state, but for simplicity here we update state.
|
|
603
|
+
// If we want rigorous "OK" button behavior, use temp state.
|
|
604
|
+
// Given the prompt "complete table ... according to AntD React",
|
|
605
|
+
// AntD updates the UI checkbox state but does NOT filter the table data until OK (unless filtering is controlled or we use realtime).
|
|
606
|
+
// Let's implement realtime update for simplicity + "OK" simply closes.
|
|
607
|
+
// Actually, "Reset" should clear.
|
|
608
|
+
// "OK" should just confirm/close.
|
|
609
|
+
// Realtime filtering is often better UX anyway.
|
|
610
|
+
// But wait, if I filter realtime, data changes immediately.
|
|
611
|
+
// "OK" button becomes just "Close".
|
|
612
|
+
this.emitChange('filter');
|
|
613
|
+
}
|
|
614
|
+
handleFilterReset(columnKey) {
|
|
615
|
+
this.filterState = {
|
|
616
|
+
...this.filterState,
|
|
617
|
+
[columnKey]: null
|
|
618
|
+
};
|
|
619
|
+
this.emitChange('filter');
|
|
620
|
+
this.activeFilterColumn = null;
|
|
621
|
+
}
|
|
622
|
+
handleFilterConfirm() {
|
|
623
|
+
// Just close, as we filter in realtime
|
|
624
|
+
this.activeFilterColumn = null;
|
|
625
|
+
}
|
|
626
|
+
renderFilterDropdown(column) {
|
|
627
|
+
if (!column.filters || column.filters.length === 0)
|
|
628
|
+
return null;
|
|
629
|
+
const columnKey = (column.key || column.dataIndex);
|
|
630
|
+
const isMultiple = column.filterMultiple !== false;
|
|
631
|
+
const selectedValues = this.filterState[columnKey] || [];
|
|
632
|
+
return (h("div", { class: "x-table-filter-dropdown-content", slot: "content" }, h("ul", { class: "x-table-filter-menu" }, column.filters.map(filter => {
|
|
633
|
+
const isSelected = selectedValues.includes(filter.value);
|
|
634
|
+
return (h("li", { class: "x-table-filter-menu-item", onClick: (e) => {
|
|
635
|
+
// Prevent toggling checkbox from double triggering if label handles it
|
|
636
|
+
// Actually click on LI should toggle
|
|
637
|
+
e.stopPropagation();
|
|
638
|
+
this.handleFilterChange(columnKey, filter.value, !isSelected, isMultiple);
|
|
639
|
+
} }, isMultiple ? (h("x-checkbox", { checked: isSelected, onClick: (e) => e.stopPropagation(), onChange: () => {
|
|
640
|
+
// x-checkbox emits onChange or onInput? assuming standard event or CustomEvent
|
|
641
|
+
// Stencil components usually emit CustomEvent named 'change' etc.
|
|
642
|
+
// x-checkbox likely has prop 'checked' and event 'xChange' or similar?
|
|
643
|
+
// I'll check x-checkbox later if this fails, but usually click handler on parent LI is enough if pointer-events allows
|
|
644
|
+
// Let's rely on LI click for now, and make checkbox readonly-ish or just display
|
|
645
|
+
} }, filter.text)) : (h("x-radio", { checked: isSelected }, filter.text))));
|
|
646
|
+
})), h("div", { class: "x-table-filter-dropdown-btns" }, h("x-button", { size: "small", type: "text", onClick: () => this.handleFilterReset(columnKey) }, translate('Table.filterReset', {}, 'Reset')), h("x-button", { size: "small", type: "primary", onClick: () => this.handleFilterConfirm() }, translate('Table.filterConfirm', {}, 'OK')))));
|
|
647
|
+
}
|
|
648
|
+
renderFilterIcon(column) {
|
|
649
|
+
if (!column.filters)
|
|
650
|
+
return null;
|
|
651
|
+
const columnKey = (column.key || column.dataIndex);
|
|
652
|
+
const isOpen = this.activeFilterColumn === columnKey;
|
|
653
|
+
const hasActiveFilter = this.filterState[columnKey]?.length > 0;
|
|
654
|
+
return (h("x-popover", { trigger: "click", placement: "bottom", open: isOpen, class: "x-table-filter-trigger-container", onXOpenChange: (e) => this.handleFilterDropdownOpenChange(columnKey, e.detail) }, h("span", { class: {
|
|
655
|
+
'x-table-filter-trigger': true,
|
|
656
|
+
'active': hasActiveFilter || isOpen
|
|
657
|
+
} }, h("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor" }, h("path", { d: "M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z" }))), this.renderFilterDropdown(column)));
|
|
658
|
+
}
|
|
659
|
+
// ==================== Drag & Resize Handlers ====================
|
|
660
|
+
handleResizeStart(e, column) {
|
|
661
|
+
e.stopPropagation();
|
|
662
|
+
e.preventDefault();
|
|
663
|
+
const visibleColumns = this.internalColumns.filter(col => !col.hidden);
|
|
664
|
+
const colKey = column.key || column.dataIndex;
|
|
665
|
+
const index = visibleColumns.findIndex(c => (c.key || c.dataIndex) === colKey);
|
|
666
|
+
const nextColumn = visibleColumns[index + 1];
|
|
667
|
+
const th = e.target.closest('th');
|
|
668
|
+
// Prefer state width to avoid jumps if the actual element is slightly different due to content/layout
|
|
669
|
+
const startPrevWidth = (typeof column.width === 'number' ? column.width : th?.getBoundingClientRect().width) || 100;
|
|
670
|
+
let startNextWidth = null;
|
|
671
|
+
if (nextColumn) {
|
|
672
|
+
startNextWidth = (typeof nextColumn.width === 'number' ? nextColumn.width : th?.nextElementSibling?.getBoundingClientRect().width) || 100;
|
|
673
|
+
}
|
|
674
|
+
this.resizeState = {
|
|
675
|
+
prevKey: column.key || column.dataIndex,
|
|
676
|
+
nextKey: nextColumn ? (nextColumn.key || nextColumn.dataIndex) : null,
|
|
677
|
+
startX: e.pageX,
|
|
678
|
+
startPrevWidth: startPrevWidth,
|
|
679
|
+
startNextWidth: startNextWidth,
|
|
680
|
+
isResizing: false, // Don't trigger resize layout yet
|
|
681
|
+
};
|
|
682
|
+
window.addEventListener('mousemove', this.handleResizeMove);
|
|
683
|
+
window.addEventListener('mouseup', this.handleResizeEnd);
|
|
684
|
+
document.body.style.cursor = 'col-resize';
|
|
685
|
+
document.body.style.userSelect = 'none';
|
|
686
|
+
}
|
|
687
|
+
handleResizeMove = (e) => {
|
|
688
|
+
if (!this.resizeState)
|
|
689
|
+
return;
|
|
690
|
+
const { prevKey, nextKey, startX, startPrevWidth, startNextWidth, isResizing } = this.resizeState;
|
|
691
|
+
const delta = e.pageX - startX;
|
|
692
|
+
// Only trigger resize if moved at least 2px to avoid jitter on click
|
|
693
|
+
if (!isResizing && Math.abs(delta) < 2)
|
|
694
|
+
return;
|
|
695
|
+
if (!isResizing) {
|
|
696
|
+
this.resizeState = { ...this.resizeState, isResizing: true };
|
|
697
|
+
}
|
|
698
|
+
const visibleColumns = this.internalColumns.filter(col => !col.hidden);
|
|
699
|
+
const prevCol = visibleColumns.find(c => (c.key || c.dataIndex) === prevKey);
|
|
700
|
+
const nextCol = nextKey ? visibleColumns.find(c => (c.key || c.dataIndex) === nextKey) : null;
|
|
701
|
+
if (!prevCol)
|
|
702
|
+
return;
|
|
703
|
+
if (nextCol && startNextWidth !== null) {
|
|
704
|
+
// Splitter flow: stable total size between current and next column
|
|
705
|
+
const S = startPrevWidth + startNextWidth;
|
|
706
|
+
const minP = Math.max(prevCol.minWidth || 50, S - (nextCol.maxWidth || 2000));
|
|
707
|
+
const maxP = Math.min(prevCol.maxWidth || 2000, S - (nextCol.minWidth || 50));
|
|
708
|
+
let newPrevSize = startPrevWidth + delta;
|
|
709
|
+
newPrevSize = Math.max(minP, Math.min(maxP, newPrevSize));
|
|
710
|
+
const newNextSize = S - newPrevSize;
|
|
711
|
+
this.internalColumns = this.internalColumns.map(col => {
|
|
712
|
+
const key = col.key || col.dataIndex;
|
|
713
|
+
if (key === prevKey)
|
|
714
|
+
return { ...col, width: newPrevSize };
|
|
715
|
+
if (key === nextKey)
|
|
716
|
+
return { ...col, width: newNextSize };
|
|
717
|
+
return col;
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
else {
|
|
721
|
+
// Fallback for last column: standard resize
|
|
722
|
+
const newWidth = Math.max(startPrevWidth + delta, prevCol.minWidth || 50);
|
|
723
|
+
this.internalColumns = this.internalColumns.map(col => {
|
|
724
|
+
if ((col.key || col.dataIndex) === prevKey) {
|
|
725
|
+
return { ...col, width: newWidth };
|
|
726
|
+
}
|
|
727
|
+
return col;
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
handleResizeEnd = () => {
|
|
732
|
+
this.resizeState = null;
|
|
733
|
+
window.removeEventListener('mousemove', this.handleResizeMove);
|
|
734
|
+
window.removeEventListener('mouseup', this.handleResizeEnd);
|
|
735
|
+
document.body.style.cursor = '';
|
|
736
|
+
document.body.style.userSelect = '';
|
|
737
|
+
this.emitChange('sort'); // Using 'sort' as proxy for layout change, or could add 'resize'
|
|
738
|
+
};
|
|
739
|
+
handleColumnDragStart(e, column) {
|
|
740
|
+
const key = column.key || column.dataIndex;
|
|
741
|
+
this.draggedColumnKey = key;
|
|
742
|
+
if (e.dataTransfer) {
|
|
743
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
handleColumnDragOver(e, column) {
|
|
747
|
+
e.preventDefault(); // Allow drop
|
|
748
|
+
const key = column.key || column.dataIndex;
|
|
749
|
+
if (this.draggedColumnKey === key) {
|
|
750
|
+
this.dragOverColumnKey = null;
|
|
751
|
+
this.dragOverColumnSide = null;
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
755
|
+
const x = e.clientX - rect.left;
|
|
756
|
+
this.dragOverColumnSide = x < rect.width / 2 ? 'left' : 'right';
|
|
757
|
+
this.dragOverColumnKey = key;
|
|
758
|
+
e.dataTransfer.dropEffect = 'move';
|
|
759
|
+
}
|
|
760
|
+
handleColumnDragLeave = () => {
|
|
761
|
+
this.dragOverColumnKey = null;
|
|
762
|
+
this.dragOverColumnSide = null;
|
|
763
|
+
};
|
|
764
|
+
handleColumnDrop(e, targetColumn) {
|
|
765
|
+
e.preventDefault();
|
|
766
|
+
const targetKey = targetColumn.key || targetColumn.dataIndex;
|
|
767
|
+
const sourceKey = this.draggedColumnKey;
|
|
768
|
+
const side = this.dragOverColumnSide;
|
|
769
|
+
this.draggedColumnKey = null;
|
|
770
|
+
this.dragOverColumnKey = null;
|
|
771
|
+
this.dragOverColumnSide = null;
|
|
772
|
+
if (!sourceKey || sourceKey === targetKey)
|
|
773
|
+
return;
|
|
774
|
+
const fromIndex = this.internalColumns.findIndex(col => (col.key || col.dataIndex) === sourceKey);
|
|
775
|
+
let toIndex = this.internalColumns.findIndex(col => (col.key || col.dataIndex) === targetKey);
|
|
776
|
+
if (fromIndex > -1 && toIndex > -1) {
|
|
777
|
+
const newColumns = [...this.internalColumns];
|
|
778
|
+
const [movedColumn] = newColumns.splice(fromIndex, 1);
|
|
779
|
+
// Re-calculate toIndex after splice if needed
|
|
780
|
+
toIndex = newColumns.findIndex(col => (col.key || col.dataIndex) === targetKey);
|
|
781
|
+
if (side === 'right') {
|
|
782
|
+
toIndex += 1;
|
|
783
|
+
}
|
|
784
|
+
newColumns.splice(toIndex, 0, movedColumn);
|
|
785
|
+
this.internalColumns = newColumns;
|
|
786
|
+
this.xColumnSort.emit({ columns: newColumns });
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
handleRowDragStart(e, record) {
|
|
790
|
+
const key = this.getRowKey(record);
|
|
791
|
+
this.draggedRowKey = key;
|
|
792
|
+
if (e.dataTransfer) {
|
|
793
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
794
|
+
e.dataTransfer.setData('text/plain', String(key));
|
|
795
|
+
}
|
|
796
|
+
const target = e.currentTarget;
|
|
797
|
+
// Create a temporary container for the drag image
|
|
798
|
+
// Browsers have trouble with <tr> as a drag image outside of a <table>
|
|
799
|
+
// We create a div that replicates the row's appearance
|
|
800
|
+
const ghost = document.createElement('div');
|
|
801
|
+
ghost.style.position = 'absolute';
|
|
802
|
+
ghost.style.top = '-1000px';
|
|
803
|
+
ghost.style.left = '-1000px';
|
|
804
|
+
ghost.style.width = `${target.offsetWidth}px`;
|
|
805
|
+
ghost.style.height = `${target.offsetHeight}px`;
|
|
806
|
+
ghost.style.background = 'var(--x-color-bg-container, #fff)';
|
|
807
|
+
ghost.style.boxShadow = '0 8px 16px rgba(0,0,0,0.15)';
|
|
808
|
+
ghost.style.borderRadius = '4px';
|
|
809
|
+
ghost.style.display = 'flex';
|
|
810
|
+
ghost.style.alignItems = 'center';
|
|
811
|
+
ghost.style.padding = '0 16px';
|
|
812
|
+
ghost.style.border = '1px solid var(--x-color-primary, #1677ff)';
|
|
813
|
+
ghost.style.zIndex = '9999';
|
|
814
|
+
ghost.style.pointerEvents = 'none';
|
|
815
|
+
// Simple text content for the ghost
|
|
816
|
+
const title = target.querySelector('.x-table-cell:not(.x-table-drag-column)')?.textContent || 'Dragging row...';
|
|
817
|
+
ghost.innerText = title;
|
|
818
|
+
document.body.appendChild(ghost);
|
|
819
|
+
if (e.dataTransfer) {
|
|
820
|
+
e.dataTransfer.setDragImage(ghost, 20, 20);
|
|
821
|
+
}
|
|
822
|
+
// Clean up
|
|
823
|
+
setTimeout(() => {
|
|
824
|
+
if (document.body.contains(ghost)) {
|
|
825
|
+
document.body.removeChild(ghost);
|
|
826
|
+
}
|
|
827
|
+
}, 0);
|
|
828
|
+
}
|
|
829
|
+
handleRowDragOver(e, record) {
|
|
830
|
+
e.preventDefault();
|
|
831
|
+
const key = this.getRowKey(record);
|
|
832
|
+
if (this.draggedRowKey === key) {
|
|
833
|
+
this.dragOverRowKey = null;
|
|
834
|
+
this.dragOverRowSide = null;
|
|
835
|
+
return;
|
|
836
|
+
}
|
|
837
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
838
|
+
const y = e.clientY - rect.top;
|
|
839
|
+
this.dragOverRowSide = y < rect.height / 2 ? 'top' : 'bottom';
|
|
840
|
+
this.dragOverRowKey = key;
|
|
841
|
+
e.dataTransfer.dropEffect = 'move';
|
|
842
|
+
}
|
|
843
|
+
handleRowDragLeave = () => {
|
|
844
|
+
this.dragOverRowKey = null;
|
|
845
|
+
this.dragOverRowSide = null;
|
|
846
|
+
};
|
|
847
|
+
handleRowDrop(e, targetRecord) {
|
|
848
|
+
e.preventDefault();
|
|
849
|
+
const targetKey = this.getRowKey(targetRecord);
|
|
850
|
+
const sourceKey = this.draggedRowKey;
|
|
851
|
+
const side = this.dragOverRowSide;
|
|
852
|
+
this.draggedRowKey = null;
|
|
853
|
+
this.dragOverRowKey = null;
|
|
854
|
+
this.dragOverRowSide = null;
|
|
855
|
+
if (sourceKey === null || sourceKey === targetKey)
|
|
856
|
+
return;
|
|
857
|
+
const fromIndex = this.internalDataSource.findIndex(r => this.getRowKey(r) === sourceKey);
|
|
858
|
+
let toIndex = this.internalDataSource.findIndex(r => this.getRowKey(r) === targetKey);
|
|
859
|
+
if (fromIndex > -1 && toIndex > -1) {
|
|
860
|
+
const newData = [...this.internalDataSource];
|
|
861
|
+
const [movedRow] = newData.splice(fromIndex, 1);
|
|
862
|
+
// Re-calculate toIndex after splice
|
|
863
|
+
toIndex = newData.findIndex(r => this.getRowKey(r) === targetKey);
|
|
864
|
+
if (side === 'bottom') {
|
|
865
|
+
toIndex += 1;
|
|
866
|
+
}
|
|
867
|
+
newData.splice(toIndex, 0, movedRow);
|
|
868
|
+
this.internalDataSource = newData;
|
|
869
|
+
this.xDragSort.emit({ dataSource: newData });
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
getStickyOffsets() {
|
|
873
|
+
const leftOffsets = {};
|
|
874
|
+
const rightOffsets = {};
|
|
875
|
+
const visibleColumns = this.internalColumns.filter(col => !col.hidden);
|
|
876
|
+
let left = 0;
|
|
877
|
+
visibleColumns.forEach(col => {
|
|
878
|
+
const key = col.key || col.dataIndex;
|
|
879
|
+
if (col.fixed === 'left' || col.fixed === true) {
|
|
880
|
+
leftOffsets[key] = left;
|
|
881
|
+
const width = typeof col.width === 'number' ? col.width : 0; // Simple fallback
|
|
882
|
+
left += width;
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
let right = 0;
|
|
886
|
+
for (let i = visibleColumns.length - 1; i >= 0; i--) {
|
|
887
|
+
const col = visibleColumns[i];
|
|
888
|
+
const key = col.key || col.dataIndex;
|
|
889
|
+
if (col.fixed === 'right') {
|
|
890
|
+
rightOffsets[key] = right;
|
|
891
|
+
const width = typeof col.width === 'number' ? col.width : 0;
|
|
892
|
+
right += width;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
return { leftOffsets, rightOffsets };
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* Renders a single header cell (th).
|
|
899
|
+
*
|
|
900
|
+
* Flow:
|
|
901
|
+
* 1. Checks if column is hidden.
|
|
902
|
+
* 2. Sets width and min/max width styles.
|
|
903
|
+
* 3. Handles sticky positioning (`fixed` prop):
|
|
904
|
+
* - Calculates `left` or `right` offset using `stickyOffsets`.
|
|
905
|
+
* - Applies `position: sticky` and z-index.
|
|
906
|
+
* 4. Determines classes for sorting, filtering, and alignment.
|
|
907
|
+
* 5. Attaches click handler for sorting.
|
|
908
|
+
* 6. Renders content: Title, Sort Icon, Filter Icon.
|
|
909
|
+
*
|
|
910
|
+
* @param column - The column configuration.
|
|
911
|
+
* @param stickyOffsets - Calculated offsets for sticky columns.
|
|
912
|
+
* @param isLast - Whether this is the last visible column.
|
|
913
|
+
* @returns JSX.Element - The th element.
|
|
914
|
+
*/
|
|
915
|
+
renderHeaderCell(column, stickyOffsets, isLast, rowSpan = 1, colSpan = 1) {
|
|
916
|
+
if (column.hidden)
|
|
917
|
+
return null;
|
|
918
|
+
const style = {};
|
|
919
|
+
if (column.minWidth) {
|
|
920
|
+
style.minWidth = `${column.minWidth}px`;
|
|
921
|
+
}
|
|
922
|
+
if (column.maxWidth) {
|
|
923
|
+
style.maxWidth = `${column.maxWidth}px`;
|
|
924
|
+
}
|
|
925
|
+
// Sticky
|
|
926
|
+
// Find the leaf columns to determine sticky offsets
|
|
927
|
+
const leaves = ColumnUtil.getFlattenColumns([column]);
|
|
928
|
+
const firstLeaf = leaves[0];
|
|
929
|
+
const lastLeaf = leaves[leaves.length - 1];
|
|
930
|
+
const firstKey = firstLeaf ? (firstLeaf.key || firstLeaf.dataIndex) : (column.key || column.dataIndex);
|
|
931
|
+
const lastKey = lastLeaf ? (lastLeaf.key || lastLeaf.dataIndex) : (column.key || column.dataIndex);
|
|
932
|
+
const isFixedLeft = (column.fixed === 'left' || column.fixed === true) || (firstLeaf && (firstLeaf.fixed === 'left' || firstLeaf.fixed === true));
|
|
933
|
+
const isFixedRight = column.fixed === 'right' || (lastLeaf && lastLeaf.fixed === 'right');
|
|
934
|
+
if (isFixedLeft && firstKey && stickyOffsets.left[firstKey] !== undefined) {
|
|
935
|
+
style.position = 'sticky';
|
|
936
|
+
style.left = `${stickyOffsets.left[firstKey]}px`;
|
|
937
|
+
style.zIndex = '3';
|
|
938
|
+
}
|
|
939
|
+
if (isFixedRight && lastKey && stickyOffsets.right[lastKey] !== undefined) {
|
|
940
|
+
style.position = 'sticky';
|
|
941
|
+
style.right = `${stickyOffsets.right[lastKey]}px`;
|
|
942
|
+
style.zIndex = '3';
|
|
943
|
+
}
|
|
944
|
+
const key = column.key || column.dataIndex;
|
|
945
|
+
const isSortable = !!column.sorter;
|
|
946
|
+
const isFiltered = !!this.filterState[key]?.length;
|
|
947
|
+
// Only show resize handle if column.resize is explicitly true
|
|
948
|
+
const isResizable = column.resize === true && colSpan === 1;
|
|
949
|
+
const isDraggable = this.draggableColumns && colSpan === 1;
|
|
950
|
+
return (h("th", { class: {
|
|
951
|
+
'x-table-cell': true,
|
|
952
|
+
'x-table-cell-sortable': isSortable,
|
|
953
|
+
'x-table-cell-filtered': isFiltered,
|
|
954
|
+
'x-table-cell-fix-left': isFixedLeft,
|
|
955
|
+
'x-table-cell-fix-right': isFixedRight,
|
|
956
|
+
[`x-table-align-${column.align || 'left'}`]: true,
|
|
957
|
+
[column.className || '']: !!column.className,
|
|
958
|
+
'x-table-cell-resizable': isResizable,
|
|
959
|
+
'x-table-cell-draggable': isDraggable,
|
|
960
|
+
'x-table-cell-dragging': this.draggedColumnKey === key,
|
|
961
|
+
'x-table-cell-drag-over-left': this.dragOverColumnKey === key && this.dragOverColumnSide === 'left',
|
|
962
|
+
'x-table-cell-drag-over-right': this.dragOverColumnKey === key && this.dragOverColumnSide === 'right',
|
|
963
|
+
}, style: style, colSpan: colSpan, rowSpan: rowSpan, draggable: isDraggable, onDragStart: isDraggable ? (e) => this.handleColumnDragStart(e, column) : undefined, onDragOver: isDraggable ? (e) => this.handleColumnDragOver(e, column) : undefined, onDragLeave: isDraggable ? this.handleColumnDragLeave : undefined, onDrop: isDraggable ? (e) => this.handleColumnDrop(e, column) : undefined, onClick: (e) => {
|
|
964
|
+
if (isSortable && !e.target.closest('.x-table-filter-trigger-container') && !e.target.closest('.x-table-resize-handle')) {
|
|
965
|
+
this.handleSort(column);
|
|
966
|
+
}
|
|
967
|
+
} }, h("div", { class: "x-table-column-title" }, h("span", { class: "x-table-column-title-text" }, column.title), this.renderSortIcon(column), this.renderFilterIcon(column)), isResizable && !isLast && (h("div", { class: "x-table-resize-handle", onMouseDown: (e) => this.handleResizeStart(e, column), onClick: (e) => e.stopPropagation() }))));
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* Renders the table header (thead).
|
|
971
|
+
*
|
|
972
|
+
* Flow:
|
|
973
|
+
* 1. Checks `showHeader` prop.
|
|
974
|
+
* 2. Generates header rows using ColumnUtil.
|
|
975
|
+
* 3. Renders selection, expand, and drag columns in the first row with proper rowSpan.
|
|
976
|
+
* 4. Renders each header cell.
|
|
977
|
+
*
|
|
978
|
+
* @param stickyOffsets - Calculated offsets for sticky columns.
|
|
979
|
+
* @returns JSX.Element - The thead element.
|
|
980
|
+
*/
|
|
981
|
+
renderHeader(stickyOffsets) {
|
|
982
|
+
if (!this.showHeader)
|
|
983
|
+
return null;
|
|
984
|
+
const rows = ColumnUtil.getTableHeaderRows(this.columns);
|
|
985
|
+
const rowCount = rows.length;
|
|
986
|
+
return (h("thead", { class: {
|
|
987
|
+
'x-table-thead': true,
|
|
988
|
+
[this.classNames?.header || '']: !!this.classNames?.header,
|
|
989
|
+
}, style: this.styles?.header }, rows.map((row, rowIndex) => (h("tr", null, rowIndex === 0 && this.renderDragColumn(rowCount), rowIndex === 0 && this.renderSelectionColumn(rowCount), rowIndex === 0 && this.renderExpandColumn(rowCount), row.map((cell, index) => this.renderHeaderCell(cell.cell, stickyOffsets, index === row.length - 1, cell.rowSpan, cell.colSpan)))))));
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Renders the drag handle column header.
|
|
993
|
+
*/
|
|
994
|
+
renderDragColumn(rowSpan = 1) {
|
|
995
|
+
if (!this.draggableRows)
|
|
996
|
+
return null;
|
|
997
|
+
return h("th", { class: "x-table-cell x-table-drag-column", rowSpan: rowSpan });
|
|
998
|
+
}
|
|
999
|
+
/**
|
|
1000
|
+
* Renders the selection checkbox/radio cell for a row.
|
|
1001
|
+
*
|
|
1002
|
+
* Flow:
|
|
1003
|
+
* 1. Checks if row selection is enabled.
|
|
1004
|
+
* 2. Determines checked state based on `selectedRowKeys`.
|
|
1005
|
+
* 3. Determines disabled state via `getCheckboxProps`.
|
|
1006
|
+
* 4. Renders checkbox or radio input.
|
|
1007
|
+
*
|
|
1008
|
+
* @param record - The data record for the row.
|
|
1009
|
+
* @returns JSX.Element - The td element.
|
|
1010
|
+
*/
|
|
1011
|
+
// private renderSelectionCell(record: any) {
|
|
1012
|
+
// if (!this.rowSelection) return null;
|
|
1013
|
+
// const key = this.getRowKey(record);
|
|
1014
|
+
// const isSelected = this.selectedRowKeys.includes(key);
|
|
1015
|
+
// const checkboxProps = this.rowSelection.getCheckboxProps?.(record);
|
|
1016
|
+
// const isRadio = this.rowSelection.type === 'radio';
|
|
1017
|
+
// return (
|
|
1018
|
+
// <td class="x-table-cell x-table-selection-column">
|
|
1019
|
+
// <label class="x-table-selection-checkbox">
|
|
1020
|
+
// <input
|
|
1021
|
+
// type={isRadio ? 'radio' : 'checkbox'}
|
|
1022
|
+
// name={isRadio ? 'table-radio-group' : undefined}
|
|
1023
|
+
// checked={isSelected}
|
|
1024
|
+
// disabled={checkboxProps?.disabled}
|
|
1025
|
+
// onChange={() => this.toggleRowSelection(record)}
|
|
1026
|
+
// />
|
|
1027
|
+
// <span class={isRadio ? 'x-table-radio-inner' : 'x-table-checkbox-inner'}></span>
|
|
1028
|
+
// </label>
|
|
1029
|
+
// </td>
|
|
1030
|
+
// );
|
|
1031
|
+
// }
|
|
1032
|
+
/**
|
|
1033
|
+
* Renders the expand icon cell for a row.
|
|
1034
|
+
*
|
|
1035
|
+
* Flow:
|
|
1036
|
+
* 1. Checks if expandable is enabled.
|
|
1037
|
+
* 2. Determines expanded state based on `expandedRowKeys`.
|
|
1038
|
+
* 3. Checks if specific row is expandable via `rowExpandable`.
|
|
1039
|
+
* 4. Renders toggle button with icon.
|
|
1040
|
+
*
|
|
1041
|
+
* @param record - The data record for the row.
|
|
1042
|
+
* @returns JSX.Element - The td element.
|
|
1043
|
+
*/
|
|
1044
|
+
renderExpandCell(record) {
|
|
1045
|
+
if (!this.expandable?.expandedRowRender)
|
|
1046
|
+
return null;
|
|
1047
|
+
const key = this.getRowKey(record);
|
|
1048
|
+
const isExpanded = this.expandedRowKeys.includes(key);
|
|
1049
|
+
const isExpandable = this.expandable.rowExpandable?.(record) !== false;
|
|
1050
|
+
if (!isExpandable && !this.expandable.showExpandColumn) {
|
|
1051
|
+
return h("td", { class: "x-table-cell x-table-expand-column" });
|
|
1052
|
+
}
|
|
1053
|
+
return (h("td", { class: "x-table-cell x-table-expand-column" }, h("button", { class: {
|
|
1054
|
+
'x-table-row-expand-icon': true,
|
|
1055
|
+
'x-table-row-expand-icon-expanded': isExpanded,
|
|
1056
|
+
'x-table-row-expand-icon-collapsed': !isExpanded,
|
|
1057
|
+
}, onClick: (e) => {
|
|
1058
|
+
e.stopPropagation();
|
|
1059
|
+
this.toggleRowExpand(record);
|
|
1060
|
+
}, disabled: !isExpandable }, h("svg", { viewBox: "0 0 1024 1024", width: "1em", height: "1em", fill: "currentColor" }, isExpanded ? (h("path", { d: "M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" })) : (h("path", { d: "M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z" }))))));
|
|
1061
|
+
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Renders the drag handle cell for a row.
|
|
1064
|
+
*/
|
|
1065
|
+
renderDragCell(_record) {
|
|
1066
|
+
void _record; // Suppress unused warning
|
|
1067
|
+
if (!this.draggableRows)
|
|
1068
|
+
return null;
|
|
1069
|
+
return (h("td", { class: "x-table-cell x-table-drag-column" }, h("div", { class: "x-table-drag-handle" }, h("svg", { viewBox: "0 0 24 24", width: "1em", height: "1em", fill: "currentColor" }, h("path", { d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" })))));
|
|
1070
|
+
}
|
|
1071
|
+
renderColGroup() {
|
|
1072
|
+
const visibleColumns = this.internalColumns.filter(col => !col.hidden);
|
|
1073
|
+
const hasDrag = this.draggableRows;
|
|
1074
|
+
const hasSelection = !!this.rowSelection;
|
|
1075
|
+
const hasExpand = !!this.expandable;
|
|
1076
|
+
const selectionWidth = typeof this.rowSelection?.columnWidth === 'number' ? `${this.rowSelection.columnWidth}px` : this.rowSelection?.columnWidth || '32px';
|
|
1077
|
+
const expandWidth = typeof this.expandable?.columnWidth === 'number' ? `${this.expandable.columnWidth}px` : this.expandable?.columnWidth || '32px';
|
|
1078
|
+
return (h("colgroup", null, hasDrag && h("col", { style: { width: '32px' } }), hasSelection && h("col", { style: { width: selectionWidth } }), hasExpand && h("col", { style: { width: expandWidth } }), visibleColumns.map(col => {
|
|
1079
|
+
const style = {};
|
|
1080
|
+
if (col.width) {
|
|
1081
|
+
style.width = typeof col.width === 'number' ? `${col.width}px` : col.width;
|
|
1082
|
+
}
|
|
1083
|
+
if (col.minWidth) {
|
|
1084
|
+
style.minWidth = typeof col.minWidth === 'number' ? `${col.minWidth}px` : col.minWidth;
|
|
1085
|
+
}
|
|
1086
|
+
if (col.maxWidth) {
|
|
1087
|
+
style.maxWidth = typeof col.maxWidth === 'number' ? `${col.maxWidth}px` : col.maxWidth;
|
|
1088
|
+
}
|
|
1089
|
+
return h("col", { style: style });
|
|
1090
|
+
})));
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Renders a single body cell (td).
|
|
1094
|
+
*
|
|
1095
|
+
* Flow:
|
|
1096
|
+
* 1. Checks if column is hidden.
|
|
1097
|
+
* 2. Retrieves cell value using `getCellValue`.
|
|
1098
|
+
* 3. Renders content using custom `render` function if provided, otherwise displays value.
|
|
1099
|
+
* 4. Handles ellipsis and tooltip if configured.
|
|
1100
|
+
* 5. Applies sticky positioning styles.
|
|
1101
|
+
*
|
|
1102
|
+
* @param column - The column configuration.
|
|
1103
|
+
* @param record - The data record.
|
|
1104
|
+
* @param index - The row index.
|
|
1105
|
+
* @param stickyOffsets - Calculated sticky offsets.
|
|
1106
|
+
* @returns JSX.Element - The td element.
|
|
1107
|
+
*/
|
|
1108
|
+
renderBodyCell(column, record, index, stickyOffsets) {
|
|
1109
|
+
if (column.hidden)
|
|
1110
|
+
return null;
|
|
1111
|
+
const value = this.getCellValue(record, column.dataIndex);
|
|
1112
|
+
let cellContent;
|
|
1113
|
+
if (column.slot) {
|
|
1114
|
+
cellContent = h("slot", { name: `${column.slot}-${index}` });
|
|
1115
|
+
}
|
|
1116
|
+
else {
|
|
1117
|
+
// We get the cell content by applying the column.render function if it exists.
|
|
1118
|
+
cellContent = column.render ? column.render(value, record, index) : value;
|
|
1119
|
+
}
|
|
1120
|
+
const style = {};
|
|
1121
|
+
// Sticky
|
|
1122
|
+
const key = column.key || column.dataIndex;
|
|
1123
|
+
const isFixedLeft = column.fixed === 'left' || column.fixed === true;
|
|
1124
|
+
const isFixedRight = column.fixed === 'right';
|
|
1125
|
+
if (isFixedLeft) {
|
|
1126
|
+
style.position = 'sticky';
|
|
1127
|
+
style.left = `${stickyOffsets.left[key]}px`;
|
|
1128
|
+
}
|
|
1129
|
+
if (isFixedRight) {
|
|
1130
|
+
style.position = 'sticky';
|
|
1131
|
+
style.right = `${stickyOffsets.right[key]}px`;
|
|
1132
|
+
}
|
|
1133
|
+
return (h("td", { class: {
|
|
1134
|
+
'x-table-cell': true,
|
|
1135
|
+
'x-table-cell-ellipsis': !!column.ellipsis,
|
|
1136
|
+
'x-table-cell-fix-left': isFixedLeft,
|
|
1137
|
+
'x-table-cell-fix-right': isFixedRight,
|
|
1138
|
+
[`x-table-align-${column.align || 'left'}`]: true,
|
|
1139
|
+
[column.className || '']: !!column.className,
|
|
1140
|
+
[this.classNames?.cell || '']: !!this.classNames?.cell,
|
|
1141
|
+
}, style: { ...style, ...this.styles?.cell }, colSpan: column.colSpan, rowSpan: column.rowSpan, innerHTML: typeof cellContent === 'string' ? cellContent : undefined }, cellContent instanceof HTMLElement ? (h("div", { ref: el => {
|
|
1142
|
+
if (el) {
|
|
1143
|
+
el.innerHTML = '';
|
|
1144
|
+
el.appendChild(cellContent);
|
|
1145
|
+
}
|
|
1146
|
+
} })) : (typeof cellContent !== 'string' ? cellContent : null)));
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Renders the expanded content row if the row is expanded.
|
|
1150
|
+
*
|
|
1151
|
+
* Flow:
|
|
1152
|
+
* 1. Checks if `expandedRowRender` is provided.
|
|
1153
|
+
* 2. Checks if the row key is in `expandedRowKeys`.
|
|
1154
|
+
* 3. Calculates colspan to span all visible columns.
|
|
1155
|
+
* 4. Renders the content returned by `expandedRowRender`.
|
|
1156
|
+
*
|
|
1157
|
+
* @param record - The data record.
|
|
1158
|
+
* @param index - The row index.
|
|
1159
|
+
* @returns JSX.Element - The tr element.
|
|
1160
|
+
*/
|
|
1161
|
+
renderExpandedRow(record, index) {
|
|
1162
|
+
if (!this.expandable?.expandedRowRender)
|
|
1163
|
+
return null;
|
|
1164
|
+
const key = this.getRowKey(record);
|
|
1165
|
+
if (!this.expandedRowKeys.includes(key))
|
|
1166
|
+
return null;
|
|
1167
|
+
const colSpan = this.internalColumns.filter(col => !col.hidden).length +
|
|
1168
|
+
(this.rowSelection ? 1 : 0) +
|
|
1169
|
+
(this.expandable ? 1 : 0) +
|
|
1170
|
+
(this.draggableRows ? 1 : 0);
|
|
1171
|
+
const indent = 0;
|
|
1172
|
+
const content = this.expandable.expandedRowRender(record, index, indent, true);
|
|
1173
|
+
return (h("tr", { class: "x-table-expanded-row" }, h("td", { colSpan: colSpan, class: "x-table-expanded-row-cell" }, content)));
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Renders a table row (tr) and optionally an expanded row.
|
|
1177
|
+
*
|
|
1178
|
+
* Flow:
|
|
1179
|
+
* 1. Determines row key and state (selected, expanded, hovered).
|
|
1180
|
+
* 2. Renders the main `tr` with:
|
|
1181
|
+
* - Selection cell (if enabled).
|
|
1182
|
+
* - Expand icon cell (if enabled).
|
|
1183
|
+
* - Body cells for each visible column.
|
|
1184
|
+
* 3. Attaches handlers for click, double-click, mouse enter/leave.
|
|
1185
|
+
* 4. Renders the expanded row if the row is currently expanded.
|
|
1186
|
+
*
|
|
1187
|
+
* @param record - The data record.
|
|
1188
|
+
* @param index - The row index.
|
|
1189
|
+
* @param stickyOffsets - Calculated sticky offsets.
|
|
1190
|
+
* @returns JSX.Element[] - Array containing the row and potential expanded row.
|
|
1191
|
+
*/
|
|
1192
|
+
renderRow(record, index, stickyOffsets) {
|
|
1193
|
+
const key = this.getRowKey(record, index);
|
|
1194
|
+
const isSelected = this.selectedRowKeys.includes(key);
|
|
1195
|
+
const isExpanded = this.expandedRowKeys.includes(key);
|
|
1196
|
+
const isHovered = this.hoveredRowKey === key;
|
|
1197
|
+
const visibleColumns = this.internalColumns.filter(col => !col.hidden);
|
|
1198
|
+
return [
|
|
1199
|
+
h("tr", { key: key, class: {
|
|
1200
|
+
'x-table-row': true,
|
|
1201
|
+
'x-table-row-selected': isSelected,
|
|
1202
|
+
'x-table-row-expanded': isExpanded,
|
|
1203
|
+
'x-table-row-hover': isHovered,
|
|
1204
|
+
'x-table-row-dragging': this.draggedRowKey === key,
|
|
1205
|
+
'x-table-row-drag-over-top': this.dragOverRowKey === key && this.dragOverRowSide === 'top',
|
|
1206
|
+
'x-table-row-drag-over-bottom': this.dragOverRowKey === key && this.dragOverRowSide === 'bottom',
|
|
1207
|
+
[this.getRowClassName(record, index)]: !!this.getRowClassName(record, index),
|
|
1208
|
+
[this.classNames?.row || '']: !!this.classNames?.row,
|
|
1209
|
+
}, style: this.styles?.row, onClick: (e) => this.handleRowClick(record, index, e), onDblClick: (e) => this.handleRowDoubleClick(record, index, e), onMouseEnter: () => this.hoveredRowKey = key, onMouseLeave: () => this.hoveredRowKey = null, draggable: this.draggableRows, onDragStart: this.draggableRows ? (e) => this.handleRowDragStart(e, record) : undefined, onDragOver: this.draggableRows ? (e) => this.handleRowDragOver(e, record) : undefined, onDragLeave: this.draggableRows ? this.handleRowDragLeave : undefined, onDrop: this.draggableRows ? (e) => this.handleRowDrop(e, record) : undefined }, this.renderDragCell(record), this.renderSelectionColumn(), this.renderExpandCell(record), visibleColumns.map(column => this.renderBodyCell(column, record, index, stickyOffsets))),
|
|
1210
|
+
this.renderExpandedRow(record, index),
|
|
1211
|
+
];
|
|
1212
|
+
}
|
|
1213
|
+
hasCustomRows() {
|
|
1214
|
+
return Array.from(this.el.children).some(child => child.tagName === 'X-TABLE-ROW');
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* Renders the table body (tbody).
|
|
1218
|
+
*
|
|
1219
|
+
* Flow:
|
|
1220
|
+
* 1. Check if user provided custom rows via children.
|
|
1221
|
+
* 2. Retrieves paginated data.
|
|
1222
|
+
* 3. If no data, renders an empty state placeholder row.
|
|
1223
|
+
* 4. Otherwise, iterates through data and calls `renderRow` for each record.
|
|
1224
|
+
*
|
|
1225
|
+
* @param stickyOffsets - Calculated sticky offsets.
|
|
1226
|
+
* @returns JSX.Element - The tbody element.
|
|
1227
|
+
*/
|
|
1228
|
+
renderBody(stickyOffsets) {
|
|
1229
|
+
if (this.hasCustomRows()) {
|
|
1230
|
+
return (h("tbody", { class: {
|
|
1231
|
+
'x-table-tbody': true,
|
|
1232
|
+
[this.classNames?.body || '']: !!this.classNames?.body,
|
|
1233
|
+
}, style: this.styles?.body }, h("slot", null)));
|
|
1234
|
+
}
|
|
1235
|
+
const data = this.getPaginatedData();
|
|
1236
|
+
if (data.length === 0) {
|
|
1237
|
+
const colSpan = this.internalColumns.filter(col => !col.hidden).length +
|
|
1238
|
+
(this.rowSelection ? 1 : 0) +
|
|
1239
|
+
(this.expandable?.expandedRowRender ? 1 : 0);
|
|
1240
|
+
return (h("tbody", { class: {
|
|
1241
|
+
'x-table-tbody': true,
|
|
1242
|
+
[this.classNames?.body || '']: !!this.classNames?.body,
|
|
1243
|
+
}, style: this.styles?.body }, h("tr", { class: "x-table-placeholder" }, h("td", { colSpan: colSpan, class: "x-table-cell" }, h("div", { class: "x-table-empty" }, h("x-empty", { description: this.emptyText }))))));
|
|
1244
|
+
}
|
|
1245
|
+
return (h("tbody", { class: {
|
|
1246
|
+
'x-table-tbody': true,
|
|
1247
|
+
[this.classNames?.body || '']: !!this.classNames?.body,
|
|
1248
|
+
}, style: this.styles?.body }, data.map((record, index) => this.renderRow(record, index, stickyOffsets))));
|
|
1249
|
+
}
|
|
1250
|
+
renderPagination() {
|
|
1251
|
+
if (this.pagination === false)
|
|
1252
|
+
return null;
|
|
1253
|
+
const total = this.getProcessedData().length;
|
|
1254
|
+
const paginationConfig = this.pagination || {};
|
|
1255
|
+
// Hide on single page
|
|
1256
|
+
if (paginationConfig.hideOnSinglePage && total <= this.currentPageSize) {
|
|
1257
|
+
return null;
|
|
1258
|
+
}
|
|
1259
|
+
const positions = paginationConfig.position || ['bottomRight'];
|
|
1260
|
+
return positions.map(position => {
|
|
1261
|
+
const isTop = position.startsWith('top');
|
|
1262
|
+
const align = position.replace('top', '').replace('bottom', '').toLowerCase() || 'right';
|
|
1263
|
+
return (h("div", { class: {
|
|
1264
|
+
'x-table-pagination': true,
|
|
1265
|
+
[`x-table-pagination-${isTop ? 'top' : 'bottom'}`]: true,
|
|
1266
|
+
[`x-table-pagination-${align}`]: true,
|
|
1267
|
+
} }, h("x-pagination", { current: this.currentPage, pageSize: this.currentPageSize, total: total, showSizeChanger: paginationConfig.showSizeChanger, showQuickJumper: paginationConfig.showQuickJumper, simple: paginationConfig.simple, size: paginationConfig.size === 'small' ? 'small' : 'middle', disabled: paginationConfig.disabled, onXChange: (e) => {
|
|
1268
|
+
const { current, pageSize } = e.detail;
|
|
1269
|
+
this.handlePageChange(current, pageSize);
|
|
1270
|
+
} })));
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
renderTitle() {
|
|
1274
|
+
if (!this.tableTitle)
|
|
1275
|
+
return null;
|
|
1276
|
+
return (h("div", { class: "x-table-title" }, this.tableTitle));
|
|
1277
|
+
}
|
|
1278
|
+
renderFooter() {
|
|
1279
|
+
if (!this.tableFooter)
|
|
1280
|
+
return null;
|
|
1281
|
+
return (h("div", { class: {
|
|
1282
|
+
'x-table-footer': true,
|
|
1283
|
+
[this.classNames?.footer || '']: !!this.classNames?.footer,
|
|
1284
|
+
}, style: this.styles?.footer }, this.tableFooter));
|
|
1285
|
+
}
|
|
1286
|
+
/**
|
|
1287
|
+
* Render table with header, body and pagination.
|
|
1288
|
+
* @returns JSX.Element
|
|
1289
|
+
* @example
|
|
1290
|
+
* <x-table columns={[{ title: 'Name', dataIndex: 'name' }]} dataSource={[{ key: '1', name: 'Alice' }]}></x-table>
|
|
1291
|
+
*/
|
|
1292
|
+
render() {
|
|
1293
|
+
const scrollStyle = {};
|
|
1294
|
+
if (this.tableScroll?.x) {
|
|
1295
|
+
scrollStyle.overflowX = 'auto';
|
|
1296
|
+
if (typeof this.tableScroll.x === 'number') {
|
|
1297
|
+
scrollStyle.minWidth = `${this.tableScroll.x}px`;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
if (this.tableScroll?.y) {
|
|
1301
|
+
scrollStyle.overflowY = 'auto';
|
|
1302
|
+
scrollStyle.maxHeight = typeof this.tableScroll.y === 'number' ? `${this.tableScroll.y}px` : this.tableScroll.y;
|
|
1303
|
+
}
|
|
1304
|
+
const tableStyle = {
|
|
1305
|
+
tableLayout: this.tableLayout,
|
|
1306
|
+
};
|
|
1307
|
+
const hasPagination = this.pagination && typeof this.pagination === 'object';
|
|
1308
|
+
const paginationConfig = hasPagination ? this.pagination : null;
|
|
1309
|
+
const topPagination = hasPagination &&
|
|
1310
|
+
paginationConfig?.position?.some(p => p.startsWith('top'));
|
|
1311
|
+
const bottomPagination = this.pagination === undefined ||
|
|
1312
|
+
(hasPagination &&
|
|
1313
|
+
(paginationConfig?.position?.some(p => p.startsWith('bottom')) || !paginationConfig?.position));
|
|
1314
|
+
const { leftOffsets, rightOffsets } = this.getStickyOffsets();
|
|
1315
|
+
const stickyOffsets = { left: leftOffsets, right: rightOffsets };
|
|
1316
|
+
// Emit data change event for wrappers to sync slots
|
|
1317
|
+
const displayData = this.getPaginatedData();
|
|
1318
|
+
const total = this.getProcessedData().length;
|
|
1319
|
+
const startIndex = (this.currentPage - 1) * this.currentPageSize;
|
|
1320
|
+
// We emit in a small timeout or just during render if we're careful.
|
|
1321
|
+
// In Stencil, emitting during render is generally OK if it's a side-effect for property sync.
|
|
1322
|
+
// BUT better in componentDidUpdate / componentWillUpdate.
|
|
1323
|
+
this.xDataDisplayChange.emit({
|
|
1324
|
+
data: displayData,
|
|
1325
|
+
total,
|
|
1326
|
+
startIndex
|
|
1327
|
+
});
|
|
1328
|
+
return (h(Host, { key: 'b62a59af9b7c2828ed58cd32ad7f506225d768bb', class: {
|
|
1329
|
+
'x-table': true,
|
|
1330
|
+
'x-table-bordered': this.bordered,
|
|
1331
|
+
'x-table-loading': this.loading,
|
|
1332
|
+
[`x-table-${this.size}`]: true,
|
|
1333
|
+
'x-table-sticky': !!this.sticky,
|
|
1334
|
+
[this.classNames?.root || '']: !!this.classNames?.root,
|
|
1335
|
+
}, style: this.styles?.root }, h("div", { key: '7c6a43499deddd806e19ce2c743e649c3c8c85fb', class: "x-table-wrapper" }, this.renderTitle(), topPagination && this.renderPagination(), h("div", { key: '109d170bdc71dc14d570439c62ec2691a4c84684', class: "x-table-container" }, this.loading && (h("div", { key: '189af679b8bf1c7bc460c788a072a43f98c922f9', class: "x-table-loading-overlay" }, h("x-spin", { key: '9e45db0adf6e7b45741b9b7affe386c2d77160aa' }))), h("div", { key: '819ef65a6dd6a37f8d77374879376d16678d3666', class: "x-table-content", style: scrollStyle }, h("table", { key: '69fd63f7a7bec1e36876e562f01e779be5caa30b', style: {
|
|
1336
|
+
...tableStyle,
|
|
1337
|
+
tableLayout: (this.resizeState || this.internalColumns.some(c => c.width)) ? 'fixed' : this.tableLayout
|
|
1338
|
+
} }, this.renderColGroup(), this.renderHeader(stickyOffsets), this.renderBody(stickyOffsets)))), bottomPagination && this.renderPagination(), this.renderFooter())));
|
|
1339
|
+
}
|
|
1340
|
+
static get is() { return "x-table"; }
|
|
1341
|
+
static get encapsulation() { return "shadow"; }
|
|
1342
|
+
static get originalStyleUrls() {
|
|
1343
|
+
return {
|
|
1344
|
+
"$": ["x-table.scss"]
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
1347
|
+
static get styleUrls() {
|
|
1348
|
+
return {
|
|
1349
|
+
"$": ["x-table.css"]
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
static get properties() {
|
|
1353
|
+
return {
|
|
1354
|
+
"columns": {
|
|
1355
|
+
"type": "unknown",
|
|
1356
|
+
"mutable": false,
|
|
1357
|
+
"complexType": {
|
|
1358
|
+
"original": "TableColumn[]",
|
|
1359
|
+
"resolved": "TableColumn<Record<string, unknown>>[]",
|
|
1360
|
+
"references": {
|
|
1361
|
+
"TableColumn": {
|
|
1362
|
+
"location": "import",
|
|
1363
|
+
"path": "./types",
|
|
1364
|
+
"id": "src/components/x-table/types.ts::TableColumn",
|
|
1365
|
+
"referenceLocation": "TableColumn"
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
"required": false,
|
|
1370
|
+
"optional": false,
|
|
1371
|
+
"docs": {
|
|
1372
|
+
"tags": [{
|
|
1373
|
+
"name": "example",
|
|
1374
|
+
"text": "<x-table columns={[{ title: 'Name', dataIndex: 'name' }]}></x-table>"
|
|
1375
|
+
}],
|
|
1376
|
+
"text": "Columns configuration."
|
|
1377
|
+
},
|
|
1378
|
+
"getter": false,
|
|
1379
|
+
"setter": false,
|
|
1380
|
+
"defaultValue": "[]"
|
|
1381
|
+
},
|
|
1382
|
+
"dataSource": {
|
|
1383
|
+
"type": "unknown",
|
|
1384
|
+
"mutable": false,
|
|
1385
|
+
"complexType": {
|
|
1386
|
+
"original": "Record<string, unknown>[]",
|
|
1387
|
+
"resolved": "Record<string, unknown>[]",
|
|
1388
|
+
"references": {
|
|
1389
|
+
"Record": {
|
|
1390
|
+
"location": "global",
|
|
1391
|
+
"id": "global::Record"
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
"required": false,
|
|
1396
|
+
"optional": false,
|
|
1397
|
+
"docs": {
|
|
1398
|
+
"tags": [{
|
|
1399
|
+
"name": "example",
|
|
1400
|
+
"text": "<x-table dataSource={[{ key: '1', name: 'Alice' }]}></x-table>"
|
|
1401
|
+
}],
|
|
1402
|
+
"text": "Data source array."
|
|
1403
|
+
},
|
|
1404
|
+
"getter": false,
|
|
1405
|
+
"setter": false,
|
|
1406
|
+
"defaultValue": "[]"
|
|
1407
|
+
},
|
|
1408
|
+
"rowKey": {
|
|
1409
|
+
"type": "string",
|
|
1410
|
+
"mutable": false,
|
|
1411
|
+
"complexType": {
|
|
1412
|
+
"original": "string | ((record: Record<string, unknown>) => string)",
|
|
1413
|
+
"resolved": "((record: Record<string, unknown>) => string) | string",
|
|
1414
|
+
"references": {
|
|
1415
|
+
"Record": {
|
|
1416
|
+
"location": "global",
|
|
1417
|
+
"id": "global::Record"
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1421
|
+
"required": false,
|
|
1422
|
+
"optional": false,
|
|
1423
|
+
"docs": {
|
|
1424
|
+
"tags": [{
|
|
1425
|
+
"name": "example",
|
|
1426
|
+
"text": "<x-table rowKey=\"id\"></x-table>"
|
|
1427
|
+
}],
|
|
1428
|
+
"text": "Row key field or function."
|
|
1429
|
+
},
|
|
1430
|
+
"getter": false,
|
|
1431
|
+
"setter": false,
|
|
1432
|
+
"reflect": false,
|
|
1433
|
+
"attribute": "row-key",
|
|
1434
|
+
"defaultValue": "'key'"
|
|
1435
|
+
},
|
|
1436
|
+
"size": {
|
|
1437
|
+
"type": "string",
|
|
1438
|
+
"mutable": false,
|
|
1439
|
+
"complexType": {
|
|
1440
|
+
"original": "TableSize",
|
|
1441
|
+
"resolved": "\"large\" | \"middle\" | \"small\"",
|
|
1442
|
+
"references": {
|
|
1443
|
+
"TableSize": {
|
|
1444
|
+
"location": "import",
|
|
1445
|
+
"path": "./types",
|
|
1446
|
+
"id": "src/components/x-table/types.ts::TableSize",
|
|
1447
|
+
"referenceLocation": "TableSize"
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1451
|
+
"required": false,
|
|
1452
|
+
"optional": false,
|
|
1453
|
+
"docs": {
|
|
1454
|
+
"tags": [{
|
|
1455
|
+
"name": "default",
|
|
1456
|
+
"text": "'large'"
|
|
1457
|
+
}, {
|
|
1458
|
+
"name": "example",
|
|
1459
|
+
"text": "<x-table size=\"small\"></x-table>"
|
|
1460
|
+
}],
|
|
1461
|
+
"text": "Table size."
|
|
1462
|
+
},
|
|
1463
|
+
"getter": false,
|
|
1464
|
+
"setter": false,
|
|
1465
|
+
"reflect": false,
|
|
1466
|
+
"attribute": "size",
|
|
1467
|
+
"defaultValue": "'large'"
|
|
1468
|
+
},
|
|
1469
|
+
"tableLayout": {
|
|
1470
|
+
"type": "string",
|
|
1471
|
+
"mutable": false,
|
|
1472
|
+
"complexType": {
|
|
1473
|
+
"original": "TableLayout",
|
|
1474
|
+
"resolved": "\"auto\" | \"fixed\"",
|
|
1475
|
+
"references": {
|
|
1476
|
+
"TableLayout": {
|
|
1477
|
+
"location": "import",
|
|
1478
|
+
"path": "./types",
|
|
1479
|
+
"id": "src/components/x-table/types.ts::TableLayout",
|
|
1480
|
+
"referenceLocation": "TableLayout"
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
"required": false,
|
|
1485
|
+
"optional": false,
|
|
1486
|
+
"docs": {
|
|
1487
|
+
"tags": [{
|
|
1488
|
+
"name": "default",
|
|
1489
|
+
"text": "'auto'"
|
|
1490
|
+
}, {
|
|
1491
|
+
"name": "example",
|
|
1492
|
+
"text": "<x-table tableLayout=\"fixed\"></x-table>"
|
|
1493
|
+
}],
|
|
1494
|
+
"text": "Table layout."
|
|
1495
|
+
},
|
|
1496
|
+
"getter": false,
|
|
1497
|
+
"setter": false,
|
|
1498
|
+
"reflect": false,
|
|
1499
|
+
"attribute": "table-layout",
|
|
1500
|
+
"defaultValue": "'auto'"
|
|
1501
|
+
},
|
|
1502
|
+
"bordered": {
|
|
1503
|
+
"type": "boolean",
|
|
1504
|
+
"mutable": false,
|
|
1505
|
+
"complexType": {
|
|
1506
|
+
"original": "boolean",
|
|
1507
|
+
"resolved": "boolean",
|
|
1508
|
+
"references": {}
|
|
1509
|
+
},
|
|
1510
|
+
"required": false,
|
|
1511
|
+
"optional": false,
|
|
1512
|
+
"docs": {
|
|
1513
|
+
"tags": [{
|
|
1514
|
+
"name": "default",
|
|
1515
|
+
"text": "false"
|
|
1516
|
+
}, {
|
|
1517
|
+
"name": "example",
|
|
1518
|
+
"text": "<x-table bordered></x-table>"
|
|
1519
|
+
}],
|
|
1520
|
+
"text": "Whether to show all borders."
|
|
1521
|
+
},
|
|
1522
|
+
"getter": false,
|
|
1523
|
+
"setter": false,
|
|
1524
|
+
"reflect": false,
|
|
1525
|
+
"attribute": "bordered",
|
|
1526
|
+
"defaultValue": "false"
|
|
1527
|
+
},
|
|
1528
|
+
"loading": {
|
|
1529
|
+
"type": "boolean",
|
|
1530
|
+
"mutable": false,
|
|
1531
|
+
"complexType": {
|
|
1532
|
+
"original": "boolean",
|
|
1533
|
+
"resolved": "boolean",
|
|
1534
|
+
"references": {}
|
|
1535
|
+
},
|
|
1536
|
+
"required": false,
|
|
1537
|
+
"optional": false,
|
|
1538
|
+
"docs": {
|
|
1539
|
+
"tags": [{
|
|
1540
|
+
"name": "default",
|
|
1541
|
+
"text": "false"
|
|
1542
|
+
}, {
|
|
1543
|
+
"name": "example",
|
|
1544
|
+
"text": "<x-table loading></x-table>"
|
|
1545
|
+
}],
|
|
1546
|
+
"text": "Loading state."
|
|
1547
|
+
},
|
|
1548
|
+
"getter": false,
|
|
1549
|
+
"setter": false,
|
|
1550
|
+
"reflect": false,
|
|
1551
|
+
"attribute": "loading",
|
|
1552
|
+
"defaultValue": "false"
|
|
1553
|
+
},
|
|
1554
|
+
"showHeader": {
|
|
1555
|
+
"type": "boolean",
|
|
1556
|
+
"mutable": false,
|
|
1557
|
+
"complexType": {
|
|
1558
|
+
"original": "boolean",
|
|
1559
|
+
"resolved": "boolean",
|
|
1560
|
+
"references": {}
|
|
1561
|
+
},
|
|
1562
|
+
"required": false,
|
|
1563
|
+
"optional": false,
|
|
1564
|
+
"docs": {
|
|
1565
|
+
"tags": [{
|
|
1566
|
+
"name": "default",
|
|
1567
|
+
"text": "true"
|
|
1568
|
+
}, {
|
|
1569
|
+
"name": "example",
|
|
1570
|
+
"text": "<x-table showHeader={false}></x-table>"
|
|
1571
|
+
}],
|
|
1572
|
+
"text": "Show table header."
|
|
1573
|
+
},
|
|
1574
|
+
"getter": false,
|
|
1575
|
+
"setter": false,
|
|
1576
|
+
"reflect": false,
|
|
1577
|
+
"attribute": "show-header",
|
|
1578
|
+
"defaultValue": "true"
|
|
1579
|
+
},
|
|
1580
|
+
"tableTitle": {
|
|
1581
|
+
"type": "string",
|
|
1582
|
+
"mutable": false,
|
|
1583
|
+
"complexType": {
|
|
1584
|
+
"original": "string",
|
|
1585
|
+
"resolved": "string",
|
|
1586
|
+
"references": {}
|
|
1587
|
+
},
|
|
1588
|
+
"required": false,
|
|
1589
|
+
"optional": true,
|
|
1590
|
+
"docs": {
|
|
1591
|
+
"tags": [{
|
|
1592
|
+
"name": "example",
|
|
1593
|
+
"text": "<x-table tableTitle=\"Users\"></x-table>"
|
|
1594
|
+
}],
|
|
1595
|
+
"text": "Table title."
|
|
1596
|
+
},
|
|
1597
|
+
"getter": false,
|
|
1598
|
+
"setter": false,
|
|
1599
|
+
"reflect": false,
|
|
1600
|
+
"attribute": "table-title"
|
|
1601
|
+
},
|
|
1602
|
+
"tableFooter": {
|
|
1603
|
+
"type": "string",
|
|
1604
|
+
"mutable": false,
|
|
1605
|
+
"complexType": {
|
|
1606
|
+
"original": "string",
|
|
1607
|
+
"resolved": "string",
|
|
1608
|
+
"references": {}
|
|
1609
|
+
},
|
|
1610
|
+
"required": false,
|
|
1611
|
+
"optional": true,
|
|
1612
|
+
"docs": {
|
|
1613
|
+
"tags": [{
|
|
1614
|
+
"name": "example",
|
|
1615
|
+
"text": "<x-table tableFooter=\"Total: 20\"></x-table>"
|
|
1616
|
+
}],
|
|
1617
|
+
"text": "Table footer."
|
|
1618
|
+
},
|
|
1619
|
+
"getter": false,
|
|
1620
|
+
"setter": false,
|
|
1621
|
+
"reflect": false,
|
|
1622
|
+
"attribute": "table-footer"
|
|
1623
|
+
},
|
|
1624
|
+
"rowSelection": {
|
|
1625
|
+
"type": "unknown",
|
|
1626
|
+
"mutable": false,
|
|
1627
|
+
"complexType": {
|
|
1628
|
+
"original": "TableRowSelection",
|
|
1629
|
+
"resolved": "TableRowSelection<Record<string, unknown>>",
|
|
1630
|
+
"references": {
|
|
1631
|
+
"TableRowSelection": {
|
|
1632
|
+
"location": "import",
|
|
1633
|
+
"path": "./types",
|
|
1634
|
+
"id": "src/components/x-table/types.ts::TableRowSelection",
|
|
1635
|
+
"referenceLocation": "TableRowSelection"
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
},
|
|
1639
|
+
"required": false,
|
|
1640
|
+
"optional": true,
|
|
1641
|
+
"docs": {
|
|
1642
|
+
"tags": [{
|
|
1643
|
+
"name": "example",
|
|
1644
|
+
"text": "<x-table rowSelection={{ type: 'checkbox' }}></x-table>"
|
|
1645
|
+
}],
|
|
1646
|
+
"text": "Row selection configuration."
|
|
1647
|
+
},
|
|
1648
|
+
"getter": false,
|
|
1649
|
+
"setter": false
|
|
1650
|
+
},
|
|
1651
|
+
"expandable": {
|
|
1652
|
+
"type": "unknown",
|
|
1653
|
+
"mutable": false,
|
|
1654
|
+
"complexType": {
|
|
1655
|
+
"original": "TableExpandable",
|
|
1656
|
+
"resolved": "TableExpandable<Record<string, unknown>>",
|
|
1657
|
+
"references": {
|
|
1658
|
+
"TableExpandable": {
|
|
1659
|
+
"location": "import",
|
|
1660
|
+
"path": "./types",
|
|
1661
|
+
"id": "src/components/x-table/types.ts::TableExpandable",
|
|
1662
|
+
"referenceLocation": "TableExpandable"
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
},
|
|
1666
|
+
"required": false,
|
|
1667
|
+
"optional": true,
|
|
1668
|
+
"docs": {
|
|
1669
|
+
"tags": [{
|
|
1670
|
+
"name": "example",
|
|
1671
|
+
"text": "<x-table expandable={{ expandedRowRender: (r) => r.description }}></x-table>"
|
|
1672
|
+
}],
|
|
1673
|
+
"text": "Expandable configuration."
|
|
1674
|
+
},
|
|
1675
|
+
"getter": false,
|
|
1676
|
+
"setter": false
|
|
1677
|
+
},
|
|
1678
|
+
"tableScroll": {
|
|
1679
|
+
"type": "unknown",
|
|
1680
|
+
"mutable": false,
|
|
1681
|
+
"complexType": {
|
|
1682
|
+
"original": "TableScroll",
|
|
1683
|
+
"resolved": "TableScroll",
|
|
1684
|
+
"references": {
|
|
1685
|
+
"TableScroll": {
|
|
1686
|
+
"location": "import",
|
|
1687
|
+
"path": "./types",
|
|
1688
|
+
"id": "src/components/x-table/types.ts::TableScroll",
|
|
1689
|
+
"referenceLocation": "TableScroll"
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
},
|
|
1693
|
+
"required": false,
|
|
1694
|
+
"optional": true,
|
|
1695
|
+
"docs": {
|
|
1696
|
+
"tags": [{
|
|
1697
|
+
"name": "example",
|
|
1698
|
+
"text": "<x-table tableScroll={{ y: 300 }}></x-table>"
|
|
1699
|
+
}],
|
|
1700
|
+
"text": "Scroll configuration for table body."
|
|
1701
|
+
},
|
|
1702
|
+
"getter": false,
|
|
1703
|
+
"setter": false
|
|
1704
|
+
},
|
|
1705
|
+
"pagination": {
|
|
1706
|
+
"type": "boolean",
|
|
1707
|
+
"mutable": false,
|
|
1708
|
+
"complexType": {
|
|
1709
|
+
"original": "TablePagination | false",
|
|
1710
|
+
"resolved": "TablePagination | boolean",
|
|
1711
|
+
"references": {
|
|
1712
|
+
"TablePagination": {
|
|
1713
|
+
"location": "import",
|
|
1714
|
+
"path": "./types",
|
|
1715
|
+
"id": "src/components/x-table/types.ts::TablePagination",
|
|
1716
|
+
"referenceLocation": "TablePagination"
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
},
|
|
1720
|
+
"required": false,
|
|
1721
|
+
"optional": true,
|
|
1722
|
+
"docs": {
|
|
1723
|
+
"tags": [{
|
|
1724
|
+
"name": "example",
|
|
1725
|
+
"text": "<x-table pagination={{ pageSize: 20 }}></x-table>"
|
|
1726
|
+
}],
|
|
1727
|
+
"text": "Pagination configuration. Set to false to disable."
|
|
1728
|
+
},
|
|
1729
|
+
"getter": false,
|
|
1730
|
+
"setter": false,
|
|
1731
|
+
"reflect": false,
|
|
1732
|
+
"attribute": "pagination"
|
|
1733
|
+
},
|
|
1734
|
+
"showSorterTooltip": {
|
|
1735
|
+
"type": "boolean",
|
|
1736
|
+
"mutable": false,
|
|
1737
|
+
"complexType": {
|
|
1738
|
+
"original": "boolean",
|
|
1739
|
+
"resolved": "boolean",
|
|
1740
|
+
"references": {}
|
|
1741
|
+
},
|
|
1742
|
+
"required": false,
|
|
1743
|
+
"optional": false,
|
|
1744
|
+
"docs": {
|
|
1745
|
+
"tags": [{
|
|
1746
|
+
"name": "default",
|
|
1747
|
+
"text": "true"
|
|
1748
|
+
}, {
|
|
1749
|
+
"name": "example",
|
|
1750
|
+
"text": "<x-table showSorterTooltip={false}></x-table>"
|
|
1751
|
+
}],
|
|
1752
|
+
"text": "Whether to show sorter tooltip."
|
|
1753
|
+
},
|
|
1754
|
+
"getter": false,
|
|
1755
|
+
"setter": false,
|
|
1756
|
+
"reflect": false,
|
|
1757
|
+
"attribute": "show-sorter-tooltip",
|
|
1758
|
+
"defaultValue": "true"
|
|
1759
|
+
},
|
|
1760
|
+
"sortDirections": {
|
|
1761
|
+
"type": "unknown",
|
|
1762
|
+
"mutable": false,
|
|
1763
|
+
"complexType": {
|
|
1764
|
+
"original": "SortOrder[]",
|
|
1765
|
+
"resolved": "SortOrder[]",
|
|
1766
|
+
"references": {
|
|
1767
|
+
"SortOrder": {
|
|
1768
|
+
"location": "import",
|
|
1769
|
+
"path": "./types",
|
|
1770
|
+
"id": "src/components/x-table/types.ts::SortOrder",
|
|
1771
|
+
"referenceLocation": "SortOrder"
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
},
|
|
1775
|
+
"required": false,
|
|
1776
|
+
"optional": false,
|
|
1777
|
+
"docs": {
|
|
1778
|
+
"tags": [{
|
|
1779
|
+
"name": "default",
|
|
1780
|
+
"text": "['ascend', 'descend']"
|
|
1781
|
+
}, {
|
|
1782
|
+
"name": "example",
|
|
1783
|
+
"text": "<x-table sortDirections={['descend','ascend']}></x-table>"
|
|
1784
|
+
}],
|
|
1785
|
+
"text": "Sort directions."
|
|
1786
|
+
},
|
|
1787
|
+
"getter": false,
|
|
1788
|
+
"setter": false,
|
|
1789
|
+
"defaultValue": "['ascend', 'descend']"
|
|
1790
|
+
},
|
|
1791
|
+
"sticky": {
|
|
1792
|
+
"type": "boolean",
|
|
1793
|
+
"mutable": false,
|
|
1794
|
+
"complexType": {
|
|
1795
|
+
"original": "boolean | { offsetHeader?: number; offsetScroll?: number }",
|
|
1796
|
+
"resolved": "boolean | { offsetHeader?: number; offsetScroll?: number; }",
|
|
1797
|
+
"references": {}
|
|
1798
|
+
},
|
|
1799
|
+
"required": false,
|
|
1800
|
+
"optional": true,
|
|
1801
|
+
"docs": {
|
|
1802
|
+
"tags": [{
|
|
1803
|
+
"name": "example",
|
|
1804
|
+
"text": "<x-table sticky></x-table>"
|
|
1805
|
+
}],
|
|
1806
|
+
"text": "Sticky header and scroll bar."
|
|
1807
|
+
},
|
|
1808
|
+
"getter": false,
|
|
1809
|
+
"setter": false,
|
|
1810
|
+
"reflect": false,
|
|
1811
|
+
"attribute": "sticky"
|
|
1812
|
+
},
|
|
1813
|
+
"virtual": {
|
|
1814
|
+
"type": "boolean",
|
|
1815
|
+
"mutable": false,
|
|
1816
|
+
"complexType": {
|
|
1817
|
+
"original": "boolean",
|
|
1818
|
+
"resolved": "boolean",
|
|
1819
|
+
"references": {}
|
|
1820
|
+
},
|
|
1821
|
+
"required": false,
|
|
1822
|
+
"optional": false,
|
|
1823
|
+
"docs": {
|
|
1824
|
+
"tags": [{
|
|
1825
|
+
"name": "default",
|
|
1826
|
+
"text": "false"
|
|
1827
|
+
}, {
|
|
1828
|
+
"name": "example",
|
|
1829
|
+
"text": "<x-table virtual></x-table>"
|
|
1830
|
+
}],
|
|
1831
|
+
"text": "Virtual scroll mode."
|
|
1832
|
+
},
|
|
1833
|
+
"getter": false,
|
|
1834
|
+
"setter": false,
|
|
1835
|
+
"reflect": false,
|
|
1836
|
+
"attribute": "virtual",
|
|
1837
|
+
"defaultValue": "false"
|
|
1838
|
+
},
|
|
1839
|
+
"emptyText": {
|
|
1840
|
+
"type": "string",
|
|
1841
|
+
"mutable": false,
|
|
1842
|
+
"complexType": {
|
|
1843
|
+
"original": "string",
|
|
1844
|
+
"resolved": "string",
|
|
1845
|
+
"references": {}
|
|
1846
|
+
},
|
|
1847
|
+
"required": false,
|
|
1848
|
+
"optional": false,
|
|
1849
|
+
"docs": {
|
|
1850
|
+
"tags": [{
|
|
1851
|
+
"name": "example",
|
|
1852
|
+
"text": "<x-table emptyText=\"No records\"></x-table>"
|
|
1853
|
+
}],
|
|
1854
|
+
"text": "Empty text when no data."
|
|
1855
|
+
},
|
|
1856
|
+
"getter": false,
|
|
1857
|
+
"setter": false,
|
|
1858
|
+
"reflect": false,
|
|
1859
|
+
"attribute": "empty-text",
|
|
1860
|
+
"defaultValue": "translate('Empty.description', {}, 'No Data')"
|
|
1861
|
+
},
|
|
1862
|
+
"rowClassName": {
|
|
1863
|
+
"type": "string",
|
|
1864
|
+
"mutable": false,
|
|
1865
|
+
"complexType": {
|
|
1866
|
+
"original": "string | ((record: Record<string, unknown>, index: number) => string)",
|
|
1867
|
+
"resolved": "((record: Record<string, unknown>, index: number) => string) | string",
|
|
1868
|
+
"references": {
|
|
1869
|
+
"Record": {
|
|
1870
|
+
"location": "global",
|
|
1871
|
+
"id": "global::Record"
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
},
|
|
1875
|
+
"required": false,
|
|
1876
|
+
"optional": true,
|
|
1877
|
+
"docs": {
|
|
1878
|
+
"tags": [{
|
|
1879
|
+
"name": "example",
|
|
1880
|
+
"text": "<x-table rowClassName={(r) => r.active ? 'active' : ''}></x-table>"
|
|
1881
|
+
}],
|
|
1882
|
+
"text": "Row class name or function."
|
|
1883
|
+
},
|
|
1884
|
+
"getter": false,
|
|
1885
|
+
"setter": false,
|
|
1886
|
+
"reflect": false,
|
|
1887
|
+
"attribute": "row-class-name"
|
|
1888
|
+
},
|
|
1889
|
+
"rowEvents": {
|
|
1890
|
+
"type": "unknown",
|
|
1891
|
+
"mutable": false,
|
|
1892
|
+
"complexType": {
|
|
1893
|
+
"original": "(record: Record<string, unknown>, index: number) => { onClick?: (e: Event) => void; onDoubleClick?: (e: Event) => void; onMouseEnter?: (e: Event) => void; onMouseLeave?: (e: Event) => void }",
|
|
1894
|
+
"resolved": "(record: Record<string, unknown>, index: number) => { onClick?: (e: Event) => void; onDoubleClick?: (e: Event) => void; onMouseEnter?: (e: Event) => void; onMouseLeave?: (e: Event) => void; }",
|
|
1895
|
+
"references": {
|
|
1896
|
+
"Record": {
|
|
1897
|
+
"location": "global",
|
|
1898
|
+
"id": "global::Record"
|
|
1899
|
+
},
|
|
1900
|
+
"Event": {
|
|
1901
|
+
"location": "import",
|
|
1902
|
+
"path": "@stencil/core",
|
|
1903
|
+
"id": "../../node_modules/@stencil/core/internal/stencil-core/index.d.ts::Event",
|
|
1904
|
+
"referenceLocation": "Event"
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
},
|
|
1908
|
+
"required": false,
|
|
1909
|
+
"optional": true,
|
|
1910
|
+
"docs": {
|
|
1911
|
+
"tags": [{
|
|
1912
|
+
"name": "example",
|
|
1913
|
+
"text": "<x-table rowEvents={(r) => ({ onClick: () => console.log(r) })}></x-table>"
|
|
1914
|
+
}],
|
|
1915
|
+
"text": "Row events handler."
|
|
1916
|
+
},
|
|
1917
|
+
"getter": false,
|
|
1918
|
+
"setter": false
|
|
1919
|
+
},
|
|
1920
|
+
"resizableColumns": {
|
|
1921
|
+
"type": "boolean",
|
|
1922
|
+
"mutable": false,
|
|
1923
|
+
"complexType": {
|
|
1924
|
+
"original": "boolean",
|
|
1925
|
+
"resolved": "boolean",
|
|
1926
|
+
"references": {}
|
|
1927
|
+
},
|
|
1928
|
+
"required": false,
|
|
1929
|
+
"optional": false,
|
|
1930
|
+
"docs": {
|
|
1931
|
+
"tags": [{
|
|
1932
|
+
"name": "default",
|
|
1933
|
+
"text": "false"
|
|
1934
|
+
}],
|
|
1935
|
+
"text": "Enable column resizing."
|
|
1936
|
+
},
|
|
1937
|
+
"getter": false,
|
|
1938
|
+
"setter": false,
|
|
1939
|
+
"reflect": false,
|
|
1940
|
+
"attribute": "resizable-columns",
|
|
1941
|
+
"defaultValue": "false"
|
|
1942
|
+
},
|
|
1943
|
+
"draggableColumns": {
|
|
1944
|
+
"type": "boolean",
|
|
1945
|
+
"mutable": false,
|
|
1946
|
+
"complexType": {
|
|
1947
|
+
"original": "boolean",
|
|
1948
|
+
"resolved": "boolean",
|
|
1949
|
+
"references": {}
|
|
1950
|
+
},
|
|
1951
|
+
"required": false,
|
|
1952
|
+
"optional": false,
|
|
1953
|
+
"docs": {
|
|
1954
|
+
"tags": [{
|
|
1955
|
+
"name": "default",
|
|
1956
|
+
"text": "false"
|
|
1957
|
+
}],
|
|
1958
|
+
"text": "Enable column dragging (reordering)."
|
|
1959
|
+
},
|
|
1960
|
+
"getter": false,
|
|
1961
|
+
"setter": false,
|
|
1962
|
+
"reflect": false,
|
|
1963
|
+
"attribute": "draggable-columns",
|
|
1964
|
+
"defaultValue": "false"
|
|
1965
|
+
},
|
|
1966
|
+
"draggableRows": {
|
|
1967
|
+
"type": "boolean",
|
|
1968
|
+
"mutable": false,
|
|
1969
|
+
"complexType": {
|
|
1970
|
+
"original": "boolean",
|
|
1971
|
+
"resolved": "boolean",
|
|
1972
|
+
"references": {}
|
|
1973
|
+
},
|
|
1974
|
+
"required": false,
|
|
1975
|
+
"optional": false,
|
|
1976
|
+
"docs": {
|
|
1977
|
+
"tags": [{
|
|
1978
|
+
"name": "default",
|
|
1979
|
+
"text": "false"
|
|
1980
|
+
}],
|
|
1981
|
+
"text": "Enable row dragging (reordering)."
|
|
1982
|
+
},
|
|
1983
|
+
"getter": false,
|
|
1984
|
+
"setter": false,
|
|
1985
|
+
"reflect": false,
|
|
1986
|
+
"attribute": "draggable-rows",
|
|
1987
|
+
"defaultValue": "false"
|
|
1988
|
+
},
|
|
1989
|
+
"headerRowEvents": {
|
|
1990
|
+
"type": "unknown",
|
|
1991
|
+
"mutable": false,
|
|
1992
|
+
"complexType": {
|
|
1993
|
+
"original": "(columns: TableColumn[], index: number) => { onClick?: (e: Event) => void }",
|
|
1994
|
+
"resolved": "(columns: TableColumn<Record<string, unknown>>[], index: number) => { onClick?: (e: Event) => void; }",
|
|
1995
|
+
"references": {
|
|
1996
|
+
"TableColumn": {
|
|
1997
|
+
"location": "import",
|
|
1998
|
+
"path": "./types",
|
|
1999
|
+
"id": "src/components/x-table/types.ts::TableColumn",
|
|
2000
|
+
"referenceLocation": "TableColumn"
|
|
2001
|
+
},
|
|
2002
|
+
"Event": {
|
|
2003
|
+
"location": "import",
|
|
2004
|
+
"path": "@stencil/core",
|
|
2005
|
+
"id": "../../node_modules/@stencil/core/internal/stencil-core/index.d.ts::Event",
|
|
2006
|
+
"referenceLocation": "Event"
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
},
|
|
2010
|
+
"required": false,
|
|
2011
|
+
"optional": true,
|
|
2012
|
+
"docs": {
|
|
2013
|
+
"tags": [{
|
|
2014
|
+
"name": "example",
|
|
2015
|
+
"text": "<x-table headerRowEvents={() => ({ onClick: () => {} })}></x-table>"
|
|
2016
|
+
}],
|
|
2017
|
+
"text": "Header row events handler."
|
|
2018
|
+
},
|
|
2019
|
+
"getter": false,
|
|
2020
|
+
"setter": false
|
|
2021
|
+
},
|
|
2022
|
+
"classNames": {
|
|
2023
|
+
"type": "unknown",
|
|
2024
|
+
"mutable": false,
|
|
2025
|
+
"complexType": {
|
|
2026
|
+
"original": "TableClassNames",
|
|
2027
|
+
"resolved": "TableClassNames",
|
|
2028
|
+
"references": {
|
|
2029
|
+
"TableClassNames": {
|
|
2030
|
+
"location": "import",
|
|
2031
|
+
"path": "./types",
|
|
2032
|
+
"id": "src/components/x-table/types.ts::TableClassNames",
|
|
2033
|
+
"referenceLocation": "TableClassNames"
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
},
|
|
2037
|
+
"required": false,
|
|
2038
|
+
"optional": true,
|
|
2039
|
+
"docs": {
|
|
2040
|
+
"tags": [{
|
|
2041
|
+
"name": "example",
|
|
2042
|
+
"text": "<x-table classNames={{ root: 'my-table' }}></x-table>"
|
|
2043
|
+
}],
|
|
2044
|
+
"text": "Custom class names for parts."
|
|
2045
|
+
},
|
|
2046
|
+
"getter": false,
|
|
2047
|
+
"setter": false
|
|
2048
|
+
},
|
|
2049
|
+
"styles": {
|
|
2050
|
+
"type": "unknown",
|
|
2051
|
+
"mutable": false,
|
|
2052
|
+
"complexType": {
|
|
2053
|
+
"original": "TableStyles",
|
|
2054
|
+
"resolved": "TableStyles",
|
|
2055
|
+
"references": {
|
|
2056
|
+
"TableStyles": {
|
|
2057
|
+
"location": "import",
|
|
2058
|
+
"path": "./types",
|
|
2059
|
+
"id": "src/components/x-table/types.ts::TableStyles",
|
|
2060
|
+
"referenceLocation": "TableStyles"
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
},
|
|
2064
|
+
"required": false,
|
|
2065
|
+
"optional": true,
|
|
2066
|
+
"docs": {
|
|
2067
|
+
"tags": [{
|
|
2068
|
+
"name": "example",
|
|
2069
|
+
"text": "<x-table styles={{ root: { minWidth: '600px' } }}></x-table>"
|
|
2070
|
+
}],
|
|
2071
|
+
"text": "Custom styles for parts."
|
|
2072
|
+
},
|
|
2073
|
+
"getter": false,
|
|
2074
|
+
"setter": false
|
|
2075
|
+
}
|
|
2076
|
+
};
|
|
2077
|
+
}
|
|
2078
|
+
static get states() {
|
|
2079
|
+
return {
|
|
2080
|
+
"currentPage": {},
|
|
2081
|
+
"currentPageSize": {},
|
|
2082
|
+
"sortState": {},
|
|
2083
|
+
"filterState": {},
|
|
2084
|
+
"selectedRowKeys": {},
|
|
2085
|
+
"expandedRowKeys": {},
|
|
2086
|
+
"hoveredRowKey": {},
|
|
2087
|
+
"internalColumns": {},
|
|
2088
|
+
"internalDataSource": {},
|
|
2089
|
+
"resizeState": {},
|
|
2090
|
+
"draggedColumnKey": {},
|
|
2091
|
+
"dragOverColumnKey": {},
|
|
2092
|
+
"dragOverColumnSide": {},
|
|
2093
|
+
"draggedRowKey": {},
|
|
2094
|
+
"dragOverRowKey": {},
|
|
2095
|
+
"dragOverRowSide": {},
|
|
2096
|
+
"activeFilterColumn": {}
|
|
2097
|
+
};
|
|
2098
|
+
}
|
|
2099
|
+
static get events() {
|
|
2100
|
+
return [{
|
|
2101
|
+
"method": "xChange",
|
|
2102
|
+
"name": "xChange",
|
|
2103
|
+
"bubbles": true,
|
|
2104
|
+
"cancelable": true,
|
|
2105
|
+
"composed": true,
|
|
2106
|
+
"docs": {
|
|
2107
|
+
"tags": [{
|
|
2108
|
+
"name": "example",
|
|
2109
|
+
"text": "<x-table onXChange={(ev) => console.log(ev.detail)}></x-table>"
|
|
2110
|
+
}],
|
|
2111
|
+
"text": "Callback when pagination, filters or sorter is changed."
|
|
2112
|
+
},
|
|
2113
|
+
"complexType": {
|
|
2114
|
+
"original": "TableChangeEventDetail",
|
|
2115
|
+
"resolved": "TableChangeEventDetail",
|
|
2116
|
+
"references": {
|
|
2117
|
+
"TableChangeEventDetail": {
|
|
2118
|
+
"location": "import",
|
|
2119
|
+
"path": "./types",
|
|
2120
|
+
"id": "src/components/x-table/types.ts::TableChangeEventDetail",
|
|
2121
|
+
"referenceLocation": "TableChangeEventDetail"
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
}, {
|
|
2126
|
+
"method": "xRowClick",
|
|
2127
|
+
"name": "xRowClick",
|
|
2128
|
+
"bubbles": true,
|
|
2129
|
+
"cancelable": true,
|
|
2130
|
+
"composed": true,
|
|
2131
|
+
"docs": {
|
|
2132
|
+
"tags": [{
|
|
2133
|
+
"name": "example",
|
|
2134
|
+
"text": "<x-table onXRowClick={(ev) => console.log(ev.detail)}></x-table>"
|
|
2135
|
+
}],
|
|
2136
|
+
"text": "Callback when row is clicked."
|
|
2137
|
+
},
|
|
2138
|
+
"complexType": {
|
|
2139
|
+
"original": "TableRowEventDetail",
|
|
2140
|
+
"resolved": "TableRowEventDetail<any>",
|
|
2141
|
+
"references": {
|
|
2142
|
+
"TableRowEventDetail": {
|
|
2143
|
+
"location": "import",
|
|
2144
|
+
"path": "./types",
|
|
2145
|
+
"id": "src/components/x-table/types.ts::TableRowEventDetail",
|
|
2146
|
+
"referenceLocation": "TableRowEventDetail"
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
}, {
|
|
2151
|
+
"method": "xRowDoubleClick",
|
|
2152
|
+
"name": "xRowDoubleClick",
|
|
2153
|
+
"bubbles": true,
|
|
2154
|
+
"cancelable": true,
|
|
2155
|
+
"composed": true,
|
|
2156
|
+
"docs": {
|
|
2157
|
+
"tags": [{
|
|
2158
|
+
"name": "example",
|
|
2159
|
+
"text": "<x-table onXRowDoubleClick={(ev) => console.log(ev.detail)}></x-table>"
|
|
2160
|
+
}],
|
|
2161
|
+
"text": "Callback when row is double clicked."
|
|
2162
|
+
},
|
|
2163
|
+
"complexType": {
|
|
2164
|
+
"original": "TableRowEventDetail",
|
|
2165
|
+
"resolved": "TableRowEventDetail<any>",
|
|
2166
|
+
"references": {
|
|
2167
|
+
"TableRowEventDetail": {
|
|
2168
|
+
"location": "import",
|
|
2169
|
+
"path": "./types",
|
|
2170
|
+
"id": "src/components/x-table/types.ts::TableRowEventDetail",
|
|
2171
|
+
"referenceLocation": "TableRowEventDetail"
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
}, {
|
|
2176
|
+
"method": "xSelectionChange",
|
|
2177
|
+
"name": "xSelectionChange",
|
|
2178
|
+
"bubbles": true,
|
|
2179
|
+
"cancelable": true,
|
|
2180
|
+
"composed": true,
|
|
2181
|
+
"docs": {
|
|
2182
|
+
"tags": [{
|
|
2183
|
+
"name": "example",
|
|
2184
|
+
"text": "<x-table onXSelectionChange={(ev) => console.log(ev.detail)}></x-table>"
|
|
2185
|
+
}],
|
|
2186
|
+
"text": "Callback when selection changes."
|
|
2187
|
+
},
|
|
2188
|
+
"complexType": {
|
|
2189
|
+
"original": "TableSelectionChangeEventDetail",
|
|
2190
|
+
"resolved": "TableSelectionChangeEventDetail<any>",
|
|
2191
|
+
"references": {
|
|
2192
|
+
"TableSelectionChangeEventDetail": {
|
|
2193
|
+
"location": "import",
|
|
2194
|
+
"path": "./types",
|
|
2195
|
+
"id": "src/components/x-table/types.ts::TableSelectionChangeEventDetail",
|
|
2196
|
+
"referenceLocation": "TableSelectionChangeEventDetail"
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
}, {
|
|
2201
|
+
"method": "xExpand",
|
|
2202
|
+
"name": "xExpand",
|
|
2203
|
+
"bubbles": true,
|
|
2204
|
+
"cancelable": true,
|
|
2205
|
+
"composed": true,
|
|
2206
|
+
"docs": {
|
|
2207
|
+
"tags": [{
|
|
2208
|
+
"name": "example",
|
|
2209
|
+
"text": "<x-table onXExpand={(ev) => console.log(ev.detail)}></x-table>"
|
|
2210
|
+
}],
|
|
2211
|
+
"text": "Callback when row expand state changes."
|
|
2212
|
+
},
|
|
2213
|
+
"complexType": {
|
|
2214
|
+
"original": "TableExpandEventDetail",
|
|
2215
|
+
"resolved": "TableExpandEventDetail<any>",
|
|
2216
|
+
"references": {
|
|
2217
|
+
"TableExpandEventDetail": {
|
|
2218
|
+
"location": "import",
|
|
2219
|
+
"path": "./types",
|
|
2220
|
+
"id": "src/components/x-table/types.ts::TableExpandEventDetail",
|
|
2221
|
+
"referenceLocation": "TableExpandEventDetail"
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
}, {
|
|
2226
|
+
"method": "xExpandedRowsChange",
|
|
2227
|
+
"name": "xExpandedRowsChange",
|
|
2228
|
+
"bubbles": true,
|
|
2229
|
+
"cancelable": true,
|
|
2230
|
+
"composed": true,
|
|
2231
|
+
"docs": {
|
|
2232
|
+
"tags": [{
|
|
2233
|
+
"name": "example",
|
|
2234
|
+
"text": "<x-table onXExpandedRowsChange={(ev) => console.log(ev.detail)}></x-table>"
|
|
2235
|
+
}],
|
|
2236
|
+
"text": "Callback when expanded rows change."
|
|
2237
|
+
},
|
|
2238
|
+
"complexType": {
|
|
2239
|
+
"original": "{ expandedKeys: (string | number)[] }",
|
|
2240
|
+
"resolved": "{ expandedKeys: (string | number)[]; }",
|
|
2241
|
+
"references": {}
|
|
2242
|
+
}
|
|
2243
|
+
}, {
|
|
2244
|
+
"method": "xColumnSort",
|
|
2245
|
+
"name": "xColumnSort",
|
|
2246
|
+
"bubbles": true,
|
|
2247
|
+
"cancelable": true,
|
|
2248
|
+
"composed": true,
|
|
2249
|
+
"docs": {
|
|
2250
|
+
"tags": [],
|
|
2251
|
+
"text": "Callback when columns are reordered via drag and drop."
|
|
2252
|
+
},
|
|
2253
|
+
"complexType": {
|
|
2254
|
+
"original": "TableColumnSortEventDetail",
|
|
2255
|
+
"resolved": "TableColumnSortEventDetail",
|
|
2256
|
+
"references": {
|
|
2257
|
+
"TableColumnSortEventDetail": {
|
|
2258
|
+
"location": "import",
|
|
2259
|
+
"path": "./types",
|
|
2260
|
+
"id": "src/components/x-table/types.ts::TableColumnSortEventDetail",
|
|
2261
|
+
"referenceLocation": "TableColumnSortEventDetail"
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
}
|
|
2265
|
+
}, {
|
|
2266
|
+
"method": "xDragSort",
|
|
2267
|
+
"name": "xDragSort",
|
|
2268
|
+
"bubbles": true,
|
|
2269
|
+
"cancelable": true,
|
|
2270
|
+
"composed": true,
|
|
2271
|
+
"docs": {
|
|
2272
|
+
"tags": [],
|
|
2273
|
+
"text": "Callback when rows are reordered via drag and drop."
|
|
2274
|
+
},
|
|
2275
|
+
"complexType": {
|
|
2276
|
+
"original": "TableRowSortEventDetail",
|
|
2277
|
+
"resolved": "TableRowSortEventDetail",
|
|
2278
|
+
"references": {
|
|
2279
|
+
"TableRowSortEventDetail": {
|
|
2280
|
+
"location": "import",
|
|
2281
|
+
"path": "./types",
|
|
2282
|
+
"id": "src/components/x-table/types.ts::TableRowSortEventDetail",
|
|
2283
|
+
"referenceLocation": "TableRowSortEventDetail"
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
}, {
|
|
2288
|
+
"method": "xDataDisplayChange",
|
|
2289
|
+
"name": "xDataDisplayChange",
|
|
2290
|
+
"bubbles": true,
|
|
2291
|
+
"cancelable": true,
|
|
2292
|
+
"composed": true,
|
|
2293
|
+
"docs": {
|
|
2294
|
+
"tags": [],
|
|
2295
|
+
"text": "Callback when displayed data changes (due to pagination, filtering or sorting)"
|
|
2296
|
+
},
|
|
2297
|
+
"complexType": {
|
|
2298
|
+
"original": "{\r\n data: Record<string, unknown>[];\r\n total: number;\r\n startIndex: number;\r\n }",
|
|
2299
|
+
"resolved": "{ data: Record<string, unknown>[]; total: number; startIndex: number; }",
|
|
2300
|
+
"references": {
|
|
2301
|
+
"Record": {
|
|
2302
|
+
"location": "global",
|
|
2303
|
+
"id": "global::Record"
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
}];
|
|
2308
|
+
}
|
|
2309
|
+
static get methods() {
|
|
2310
|
+
return {
|
|
2311
|
+
"getSelectedRowKeys": {
|
|
2312
|
+
"complexType": {
|
|
2313
|
+
"signature": "() => Promise<(string | number)[]>",
|
|
2314
|
+
"parameters": [],
|
|
2315
|
+
"references": {
|
|
2316
|
+
"Promise": {
|
|
2317
|
+
"location": "global",
|
|
2318
|
+
"id": "global::Promise"
|
|
2319
|
+
}
|
|
2320
|
+
},
|
|
2321
|
+
"return": "Promise<(string | number)[]>"
|
|
2322
|
+
},
|
|
2323
|
+
"docs": {
|
|
2324
|
+
"text": "Get current selected row keys.",
|
|
2325
|
+
"tags": [{
|
|
2326
|
+
"name": "returns",
|
|
2327
|
+
"text": "Promise<(string | number)[]>"
|
|
2328
|
+
}, {
|
|
2329
|
+
"name": "example",
|
|
2330
|
+
"text": "const keys = await el.getSelectedRowKeys()"
|
|
2331
|
+
}]
|
|
2332
|
+
}
|
|
2333
|
+
},
|
|
2334
|
+
"setSelectedRowKeys": {
|
|
2335
|
+
"complexType": {
|
|
2336
|
+
"signature": "(keys: (string | number)[]) => Promise<void>",
|
|
2337
|
+
"parameters": [{
|
|
2338
|
+
"name": "keys",
|
|
2339
|
+
"type": "(string | number)[]",
|
|
2340
|
+
"docs": "- Row keys."
|
|
2341
|
+
}],
|
|
2342
|
+
"references": {
|
|
2343
|
+
"Promise": {
|
|
2344
|
+
"location": "global",
|
|
2345
|
+
"id": "global::Promise"
|
|
2346
|
+
}
|
|
2347
|
+
},
|
|
2348
|
+
"return": "Promise<void>"
|
|
2349
|
+
},
|
|
2350
|
+
"docs": {
|
|
2351
|
+
"text": "Set selected row keys.",
|
|
2352
|
+
"tags": [{
|
|
2353
|
+
"name": "param",
|
|
2354
|
+
"text": "keys - Row keys."
|
|
2355
|
+
}, {
|
|
2356
|
+
"name": "returns",
|
|
2357
|
+
"text": "Promise<void>"
|
|
2358
|
+
}, {
|
|
2359
|
+
"name": "example",
|
|
2360
|
+
"text": "await el.setSelectedRowKeys(['1'])"
|
|
2361
|
+
}]
|
|
2362
|
+
}
|
|
2363
|
+
},
|
|
2364
|
+
"clearSelection": {
|
|
2365
|
+
"complexType": {
|
|
2366
|
+
"signature": "() => Promise<void>",
|
|
2367
|
+
"parameters": [],
|
|
2368
|
+
"references": {
|
|
2369
|
+
"Promise": {
|
|
2370
|
+
"location": "global",
|
|
2371
|
+
"id": "global::Promise"
|
|
2372
|
+
}
|
|
2373
|
+
},
|
|
2374
|
+
"return": "Promise<void>"
|
|
2375
|
+
},
|
|
2376
|
+
"docs": {
|
|
2377
|
+
"text": "Clear all selections.",
|
|
2378
|
+
"tags": [{
|
|
2379
|
+
"name": "returns",
|
|
2380
|
+
"text": "Promise<void>"
|
|
2381
|
+
}, {
|
|
2382
|
+
"name": "example",
|
|
2383
|
+
"text": "await el.clearSelection()"
|
|
2384
|
+
}]
|
|
2385
|
+
}
|
|
2386
|
+
},
|
|
2387
|
+
"getExpandedRowKeys": {
|
|
2388
|
+
"complexType": {
|
|
2389
|
+
"signature": "() => Promise<(string | number)[]>",
|
|
2390
|
+
"parameters": [],
|
|
2391
|
+
"references": {
|
|
2392
|
+
"Promise": {
|
|
2393
|
+
"location": "global",
|
|
2394
|
+
"id": "global::Promise"
|
|
2395
|
+
}
|
|
2396
|
+
},
|
|
2397
|
+
"return": "Promise<(string | number)[]>"
|
|
2398
|
+
},
|
|
2399
|
+
"docs": {
|
|
2400
|
+
"text": "Get current expanded row keys.",
|
|
2401
|
+
"tags": [{
|
|
2402
|
+
"name": "returns",
|
|
2403
|
+
"text": "Promise<(string | number)[]>"
|
|
2404
|
+
}, {
|
|
2405
|
+
"name": "example",
|
|
2406
|
+
"text": "const keys = await el.getExpandedRowKeys()"
|
|
2407
|
+
}]
|
|
2408
|
+
}
|
|
2409
|
+
},
|
|
2410
|
+
"scrollToRow": {
|
|
2411
|
+
"complexType": {
|
|
2412
|
+
"signature": "(config: { index?: number; key?: string | number; top?: number; }) => Promise<void>",
|
|
2413
|
+
"parameters": [{
|
|
2414
|
+
"name": "config",
|
|
2415
|
+
"type": "{ index?: number; key?: string | number; top?: number; }",
|
|
2416
|
+
"docs": "- Scroll config."
|
|
2417
|
+
}],
|
|
2418
|
+
"references": {
|
|
2419
|
+
"Promise": {
|
|
2420
|
+
"location": "global",
|
|
2421
|
+
"id": "global::Promise"
|
|
2422
|
+
}
|
|
2423
|
+
},
|
|
2424
|
+
"return": "Promise<void>"
|
|
2425
|
+
},
|
|
2426
|
+
"docs": {
|
|
2427
|
+
"text": "Scroll to a specific row.",
|
|
2428
|
+
"tags": [{
|
|
2429
|
+
"name": "param",
|
|
2430
|
+
"text": "config - Scroll config."
|
|
2431
|
+
}, {
|
|
2432
|
+
"name": "returns",
|
|
2433
|
+
"text": "Promise<void>"
|
|
2434
|
+
}, {
|
|
2435
|
+
"name": "example",
|
|
2436
|
+
"text": "await el.scrollToRow({ top: 120 })"
|
|
2437
|
+
}]
|
|
2438
|
+
}
|
|
2439
|
+
}
|
|
2440
|
+
};
|
|
2441
|
+
}
|
|
2442
|
+
static get elementRef() { return "el"; }
|
|
2443
|
+
static get watchers() {
|
|
2444
|
+
return [{
|
|
2445
|
+
"propName": "rowKey",
|
|
2446
|
+
"methodName": "handleRowKeyChange"
|
|
2447
|
+
}, {
|
|
2448
|
+
"propName": "columns",
|
|
2449
|
+
"methodName": "handleColumnsChange"
|
|
2450
|
+
}, {
|
|
2451
|
+
"propName": "dataSource",
|
|
2452
|
+
"methodName": "handleDataSourceChange"
|
|
2453
|
+
}, {
|
|
2454
|
+
"propName": "rowSelection",
|
|
2455
|
+
"methodName": "handleRowSelectionChange"
|
|
2456
|
+
}, {
|
|
2457
|
+
"propName": "expandable",
|
|
2458
|
+
"methodName": "handleExpandableChange"
|
|
2459
|
+
}, {
|
|
2460
|
+
"propName": "pagination",
|
|
2461
|
+
"methodName": "handlePaginationChange"
|
|
2462
|
+
}];
|
|
2463
|
+
}
|
|
2464
|
+
}
|