hakumi_components 0.1.3.pre
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.
Potentially problematic release.
This version of hakumi_components might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/CHANGELOG.md +60 -0
- data/LICENSE +21 -0
- data/app/assets/icons/filled/account-book.svg +1 -0
- data/app/assets/icons/filled/alert.svg +1 -0
- data/app/assets/icons/filled/alipay-circle.svg +1 -0
- data/app/assets/icons/filled/alipay-square.svg +1 -0
- data/app/assets/icons/filled/aliwangwang.svg +1 -0
- data/app/assets/icons/filled/amazon-circle.svg +1 -0
- data/app/assets/icons/filled/amazon-square.svg +1 -0
- data/app/assets/icons/filled/android.svg +1 -0
- data/app/assets/icons/filled/api.svg +1 -0
- data/app/assets/icons/filled/apple.svg +1 -0
- data/app/assets/icons/filled/appstore.svg +1 -0
- data/app/assets/icons/filled/audio.svg +1 -0
- data/app/assets/icons/filled/backward.svg +1 -0
- data/app/assets/icons/filled/bank.svg +1 -0
- data/app/assets/icons/filled/behance-circle.svg +1 -0
- data/app/assets/icons/filled/behance-square.svg +1 -0
- data/app/assets/icons/filled/bell.svg +1 -0
- data/app/assets/icons/filled/bilibili.svg +1 -0
- data/app/assets/icons/filled/book.svg +1 -0
- data/app/assets/icons/filled/box-plot.svg +1 -0
- data/app/assets/icons/filled/bug.svg +1 -0
- data/app/assets/icons/filled/build.svg +1 -0
- data/app/assets/icons/filled/bulb.svg +1 -0
- data/app/assets/icons/filled/calculator.svg +1 -0
- data/app/assets/icons/filled/calendar.svg +1 -0
- data/app/assets/icons/filled/camera.svg +1 -0
- data/app/assets/icons/filled/car.svg +1 -0
- data/app/assets/icons/filled/caret-down.svg +1 -0
- data/app/assets/icons/filled/caret-left.svg +1 -0
- data/app/assets/icons/filled/caret-right.svg +1 -0
- data/app/assets/icons/filled/caret-up.svg +1 -0
- data/app/assets/icons/filled/carry-out.svg +1 -0
- data/app/assets/icons/filled/check-circle.svg +1 -0
- data/app/assets/icons/filled/check-square.svg +1 -0
- data/app/assets/icons/filled/chrome.svg +1 -0
- data/app/assets/icons/filled/ci-circle.svg +1 -0
- data/app/assets/icons/filled/clock-circle.svg +1 -0
- data/app/assets/icons/filled/close-circle.svg +1 -0
- data/app/assets/icons/filled/close-square.svg +1 -0
- data/app/assets/icons/filled/cloud.svg +1 -0
- data/app/assets/icons/filled/code-sandbox-circle.svg +1 -0
- data/app/assets/icons/filled/code-sandbox-square.svg +1 -0
- data/app/assets/icons/filled/code.svg +1 -0
- data/app/assets/icons/filled/codepen-circle.svg +1 -0
- data/app/assets/icons/filled/codepen-square.svg +1 -0
- data/app/assets/icons/filled/compass.svg +1 -0
- data/app/assets/icons/filled/contacts.svg +1 -0
- data/app/assets/icons/filled/container.svg +1 -0
- data/app/assets/icons/filled/control.svg +1 -0
- data/app/assets/icons/filled/copy.svg +1 -0
- data/app/assets/icons/filled/copyright-circle.svg +1 -0
- data/app/assets/icons/filled/credit-card.svg +1 -0
- data/app/assets/icons/filled/crown.svg +1 -0
- data/app/assets/icons/filled/customer-service.svg +1 -0
- data/app/assets/icons/filled/dashboard.svg +1 -0
- data/app/assets/icons/filled/database.svg +1 -0
- data/app/assets/icons/filled/delete.svg +1 -0
- data/app/assets/icons/filled/diff.svg +1 -0
- data/app/assets/icons/filled/dingtalk-circle.svg +1 -0
- data/app/assets/icons/filled/dingtalk-square.svg +1 -0
- data/app/assets/icons/filled/discord.svg +1 -0
- data/app/assets/icons/filled/dislike.svg +1 -0
- data/app/assets/icons/filled/dollar-circle.svg +1 -0
- data/app/assets/icons/filled/down-circle.svg +1 -0
- data/app/assets/icons/filled/down-square.svg +1 -0
- data/app/assets/icons/filled/dribbble-circle.svg +1 -0
- data/app/assets/icons/filled/dribbble-square.svg +1 -0
- data/app/assets/icons/filled/dropbox-circle.svg +1 -0
- data/app/assets/icons/filled/dropbox-square.svg +1 -0
- data/app/assets/icons/filled/edit.svg +1 -0
- data/app/assets/icons/filled/environment.svg +1 -0
- data/app/assets/icons/filled/euro-circle.svg +1 -0
- data/app/assets/icons/filled/exclamation-circle.svg +1 -0
- data/app/assets/icons/filled/experiment.svg +1 -0
- data/app/assets/icons/filled/eye-invisible.svg +1 -0
- data/app/assets/icons/filled/eye.svg +1 -0
- data/app/assets/icons/filled/facebook.svg +1 -0
- data/app/assets/icons/filled/fast-backward.svg +1 -0
- data/app/assets/icons/filled/fast-forward.svg +1 -0
- data/app/assets/icons/filled/file-add.svg +1 -0
- data/app/assets/icons/filled/file-excel.svg +1 -0
- data/app/assets/icons/filled/file-exclamation.svg +1 -0
- data/app/assets/icons/filled/file-image.svg +1 -0
- data/app/assets/icons/filled/file-markdown.svg +1 -0
- data/app/assets/icons/filled/file-pdf.svg +1 -0
- data/app/assets/icons/filled/file-ppt.svg +1 -0
- data/app/assets/icons/filled/file-text.svg +1 -0
- data/app/assets/icons/filled/file-unknown.svg +1 -0
- data/app/assets/icons/filled/file-word.svg +1 -0
- data/app/assets/icons/filled/file-zip.svg +1 -0
- data/app/assets/icons/filled/file.svg +1 -0
- data/app/assets/icons/filled/filter.svg +1 -0
- data/app/assets/icons/filled/fire.svg +1 -0
- data/app/assets/icons/filled/flag.svg +1 -0
- data/app/assets/icons/filled/folder-add.svg +1 -0
- data/app/assets/icons/filled/folder-open.svg +1 -0
- data/app/assets/icons/filled/folder.svg +1 -0
- data/app/assets/icons/filled/format-painter.svg +1 -0
- data/app/assets/icons/filled/forward.svg +1 -0
- data/app/assets/icons/filled/frown.svg +1 -0
- data/app/assets/icons/filled/fund.svg +1 -0
- data/app/assets/icons/filled/funnel-plot.svg +1 -0
- data/app/assets/icons/filled/gift.svg +1 -0
- data/app/assets/icons/filled/github.svg +1 -0
- data/app/assets/icons/filled/gitlab.svg +1 -0
- data/app/assets/icons/filled/gold.svg +1 -0
- data/app/assets/icons/filled/golden.svg +1 -0
- data/app/assets/icons/filled/google-circle.svg +1 -0
- data/app/assets/icons/filled/google-plus-circle.svg +1 -0
- data/app/assets/icons/filled/google-plus-square.svg +1 -0
- data/app/assets/icons/filled/google-square.svg +1 -0
- data/app/assets/icons/filled/hdd.svg +1 -0
- data/app/assets/icons/filled/heart.svg +1 -0
- data/app/assets/icons/filled/highlight.svg +1 -0
- data/app/assets/icons/filled/home.svg +1 -0
- data/app/assets/icons/filled/hourglass.svg +1 -0
- data/app/assets/icons/filled/html5.svg +1 -0
- data/app/assets/icons/filled/idcard.svg +1 -0
- data/app/assets/icons/filled/ie-circle.svg +1 -0
- data/app/assets/icons/filled/ie-square.svg +1 -0
- data/app/assets/icons/filled/info-circle.svg +1 -0
- data/app/assets/icons/filled/instagram.svg +1 -0
- data/app/assets/icons/filled/insurance.svg +1 -0
- data/app/assets/icons/filled/interaction.svg +1 -0
- data/app/assets/icons/filled/layout.svg +1 -0
- data/app/assets/icons/filled/left-circle.svg +1 -0
- data/app/assets/icons/filled/left-square.svg +1 -0
- data/app/assets/icons/filled/like.svg +1 -0
- data/app/assets/icons/filled/linkedin.svg +1 -0
- data/app/assets/icons/filled/lock.svg +1 -0
- data/app/assets/icons/filled/mac-command.svg +1 -0
- data/app/assets/icons/filled/mail.svg +1 -0
- data/app/assets/icons/filled/medicine-box.svg +1 -0
- data/app/assets/icons/filled/medium-circle.svg +1 -0
- data/app/assets/icons/filled/medium-square.svg +1 -0
- data/app/assets/icons/filled/meh.svg +1 -0
- data/app/assets/icons/filled/merge.svg +1 -0
- data/app/assets/icons/filled/message.svg +1 -0
- data/app/assets/icons/filled/minus-circle.svg +1 -0
- data/app/assets/icons/filled/minus-square.svg +1 -0
- data/app/assets/icons/filled/mobile.svg +1 -0
- data/app/assets/icons/filled/money-collect.svg +1 -0
- data/app/assets/icons/filled/moon.svg +1 -0
- data/app/assets/icons/filled/muted.svg +1 -0
- data/app/assets/icons/filled/notification.svg +1 -0
- data/app/assets/icons/filled/open-a-i.svg +1 -0
- data/app/assets/icons/filled/pause-circle.svg +1 -0
- data/app/assets/icons/filled/pay-circle.svg +1 -0
- data/app/assets/icons/filled/phone.svg +1 -0
- data/app/assets/icons/filled/picture.svg +1 -0
- data/app/assets/icons/filled/pie-chart.svg +1 -0
- data/app/assets/icons/filled/pinterest.svg +1 -0
- data/app/assets/icons/filled/play-circle.svg +1 -0
- data/app/assets/icons/filled/play-square.svg +1 -0
- data/app/assets/icons/filled/plus-circle.svg +1 -0
- data/app/assets/icons/filled/plus-square.svg +1 -0
- data/app/assets/icons/filled/pound-circle.svg +1 -0
- data/app/assets/icons/filled/printer.svg +1 -0
- data/app/assets/icons/filled/product.svg +1 -0
- data/app/assets/icons/filled/profile.svg +1 -0
- data/app/assets/icons/filled/project.svg +1 -0
- data/app/assets/icons/filled/property-safety.svg +1 -0
- data/app/assets/icons/filled/pushpin.svg +1 -0
- data/app/assets/icons/filled/qq-circle.svg +1 -0
- data/app/assets/icons/filled/qq-square.svg +1 -0
- data/app/assets/icons/filled/question-circle.svg +1 -0
- data/app/assets/icons/filled/read.svg +1 -0
- data/app/assets/icons/filled/reconciliation.svg +1 -0
- data/app/assets/icons/filled/red-envelope.svg +1 -0
- data/app/assets/icons/filled/reddit-circle.svg +1 -0
- data/app/assets/icons/filled/reddit-square.svg +1 -0
- data/app/assets/icons/filled/rest.svg +1 -0
- data/app/assets/icons/filled/right-circle.svg +1 -0
- data/app/assets/icons/filled/right-square.svg +1 -0
- data/app/assets/icons/filled/robot.svg +1 -0
- data/app/assets/icons/filled/rocket.svg +1 -0
- data/app/assets/icons/filled/safety-certificate.svg +1 -0
- data/app/assets/icons/filled/save.svg +1 -0
- data/app/assets/icons/filled/schedule.svg +1 -0
- data/app/assets/icons/filled/security-scan.svg +1 -0
- data/app/assets/icons/filled/setting.svg +1 -0
- data/app/assets/icons/filled/shop.svg +1 -0
- data/app/assets/icons/filled/shopping.svg +1 -0
- data/app/assets/icons/filled/signal.svg +1 -0
- data/app/assets/icons/filled/signature.svg +1 -0
- data/app/assets/icons/filled/sketch-circle.svg +1 -0
- data/app/assets/icons/filled/sketch-square.svg +1 -0
- data/app/assets/icons/filled/skin.svg +1 -0
- data/app/assets/icons/filled/skype.svg +1 -0
- data/app/assets/icons/filled/slack-circle.svg +1 -0
- data/app/assets/icons/filled/slack-square.svg +1 -0
- data/app/assets/icons/filled/sliders.svg +1 -0
- data/app/assets/icons/filled/smile.svg +1 -0
- data/app/assets/icons/filled/snippets.svg +1 -0
- data/app/assets/icons/filled/sound.svg +1 -0
- data/app/assets/icons/filled/spotify.svg +1 -0
- data/app/assets/icons/filled/star.svg +1 -0
- data/app/assets/icons/filled/step-backward.svg +1 -0
- data/app/assets/icons/filled/step-forward.svg +1 -0
- data/app/assets/icons/filled/stop.svg +1 -0
- data/app/assets/icons/filled/sun.svg +1 -0
- data/app/assets/icons/filled/switcher.svg +1 -0
- data/app/assets/icons/filled/tablet.svg +1 -0
- data/app/assets/icons/filled/tag.svg +1 -0
- data/app/assets/icons/filled/tags.svg +1 -0
- data/app/assets/icons/filled/taobao-circle.svg +1 -0
- data/app/assets/icons/filled/taobao-square.svg +1 -0
- data/app/assets/icons/filled/thunderbolt.svg +1 -0
- data/app/assets/icons/filled/tik-tok.svg +1 -0
- data/app/assets/icons/filled/tool.svg +1 -0
- data/app/assets/icons/filled/trademark-circle.svg +1 -0
- data/app/assets/icons/filled/trophy.svg +1 -0
- data/app/assets/icons/filled/truck.svg +1 -0
- data/app/assets/icons/filled/twitch.svg +1 -0
- data/app/assets/icons/filled/twitter-circle.svg +1 -0
- data/app/assets/icons/filled/twitter-square.svg +1 -0
- data/app/assets/icons/filled/unlock.svg +1 -0
- data/app/assets/icons/filled/up-circle.svg +1 -0
- data/app/assets/icons/filled/up-square.svg +1 -0
- data/app/assets/icons/filled/usb.svg +1 -0
- data/app/assets/icons/filled/video-camera.svg +1 -0
- data/app/assets/icons/filled/wallet.svg +1 -0
- data/app/assets/icons/filled/warning.svg +1 -0
- data/app/assets/icons/filled/wechat-work.svg +1 -0
- data/app/assets/icons/filled/wechat.svg +1 -0
- data/app/assets/icons/filled/weibo-circle.svg +1 -0
- data/app/assets/icons/filled/weibo-square.svg +1 -0
- data/app/assets/icons/filled/windows.svg +1 -0
- data/app/assets/icons/filled/x.svg +1 -0
- data/app/assets/icons/filled/yahoo.svg +1 -0
- data/app/assets/icons/filled/youtube.svg +1 -0
- data/app/assets/icons/filled/yuque.svg +1 -0
- data/app/assets/icons/filled/zhihu-circle.svg +1 -0
- data/app/assets/icons/filled/zhihu-square.svg +1 -0
- data/app/assets/icons/outlined/account-book.svg +1 -0
- data/app/assets/icons/outlined/aim.svg +1 -0
- data/app/assets/icons/outlined/alert.svg +1 -0
- data/app/assets/icons/outlined/alibaba.svg +1 -0
- data/app/assets/icons/outlined/align-center.svg +1 -0
- data/app/assets/icons/outlined/align-left.svg +1 -0
- data/app/assets/icons/outlined/align-right.svg +1 -0
- data/app/assets/icons/outlined/alipay-circle.svg +1 -0
- data/app/assets/icons/outlined/alipay.svg +1 -0
- data/app/assets/icons/outlined/aliwangwang.svg +1 -0
- data/app/assets/icons/outlined/aliyun.svg +1 -0
- data/app/assets/icons/outlined/amazon.svg +1 -0
- data/app/assets/icons/outlined/android.svg +1 -0
- data/app/assets/icons/outlined/ant-cloud.svg +1 -0
- data/app/assets/icons/outlined/ant-design.svg +1 -0
- data/app/assets/icons/outlined/apartment.svg +1 -0
- data/app/assets/icons/outlined/api.svg +1 -0
- data/app/assets/icons/outlined/apple.svg +1 -0
- data/app/assets/icons/outlined/appstore-add.svg +1 -0
- data/app/assets/icons/outlined/appstore.svg +1 -0
- data/app/assets/icons/outlined/area-chart.svg +1 -0
- data/app/assets/icons/outlined/arrow-down.svg +1 -0
- data/app/assets/icons/outlined/arrow-left.svg +1 -0
- data/app/assets/icons/outlined/arrow-right.svg +1 -0
- data/app/assets/icons/outlined/arrow-up.svg +1 -0
- data/app/assets/icons/outlined/arrows-alt.svg +1 -0
- data/app/assets/icons/outlined/audio-muted.svg +1 -0
- data/app/assets/icons/outlined/audio.svg +1 -0
- data/app/assets/icons/outlined/audit.svg +1 -0
- data/app/assets/icons/outlined/backward.svg +1 -0
- data/app/assets/icons/outlined/baidu.svg +1 -0
- data/app/assets/icons/outlined/bank.svg +1 -0
- data/app/assets/icons/outlined/bar-chart.svg +1 -0
- data/app/assets/icons/outlined/barcode.svg +1 -0
- data/app/assets/icons/outlined/bars.svg +1 -0
- data/app/assets/icons/outlined/behance-square.svg +1 -0
- data/app/assets/icons/outlined/behance.svg +1 -0
- data/app/assets/icons/outlined/bell.svg +1 -0
- data/app/assets/icons/outlined/bg-colors.svg +1 -0
- data/app/assets/icons/outlined/bilibili.svg +1 -0
- data/app/assets/icons/outlined/block.svg +1 -0
- data/app/assets/icons/outlined/bold.svg +1 -0
- data/app/assets/icons/outlined/book.svg +1 -0
- data/app/assets/icons/outlined/border-bottom.svg +1 -0
- data/app/assets/icons/outlined/border-horizontal.svg +1 -0
- data/app/assets/icons/outlined/border-inner.svg +1 -0
- data/app/assets/icons/outlined/border-left.svg +1 -0
- data/app/assets/icons/outlined/border-outer.svg +1 -0
- data/app/assets/icons/outlined/border-right.svg +1 -0
- data/app/assets/icons/outlined/border-top.svg +1 -0
- data/app/assets/icons/outlined/border-verticle.svg +1 -0
- data/app/assets/icons/outlined/border.svg +1 -0
- data/app/assets/icons/outlined/borderless-table.svg +1 -0
- data/app/assets/icons/outlined/box-plot.svg +1 -0
- data/app/assets/icons/outlined/branches.svg +1 -0
- data/app/assets/icons/outlined/bug.svg +1 -0
- data/app/assets/icons/outlined/build.svg +1 -0
- data/app/assets/icons/outlined/bulb.svg +1 -0
- data/app/assets/icons/outlined/calculator.svg +1 -0
- data/app/assets/icons/outlined/calendar.svg +1 -0
- data/app/assets/icons/outlined/camera.svg +1 -0
- data/app/assets/icons/outlined/car.svg +1 -0
- data/app/assets/icons/outlined/caret-down.svg +1 -0
- data/app/assets/icons/outlined/caret-left.svg +1 -0
- data/app/assets/icons/outlined/caret-right.svg +1 -0
- data/app/assets/icons/outlined/caret-up.svg +1 -0
- data/app/assets/icons/outlined/carry-out.svg +1 -0
- data/app/assets/icons/outlined/check-circle.svg +1 -0
- data/app/assets/icons/outlined/check-square.svg +1 -0
- data/app/assets/icons/outlined/check.svg +1 -0
- data/app/assets/icons/outlined/chrome.svg +1 -0
- data/app/assets/icons/outlined/ci-circle.svg +1 -0
- data/app/assets/icons/outlined/ci.svg +1 -0
- data/app/assets/icons/outlined/clear.svg +1 -0
- data/app/assets/icons/outlined/clock-circle.svg +1 -0
- data/app/assets/icons/outlined/close-circle.svg +1 -0
- data/app/assets/icons/outlined/close-square.svg +1 -0
- data/app/assets/icons/outlined/close.svg +1 -0
- data/app/assets/icons/outlined/cloud-download.svg +1 -0
- data/app/assets/icons/outlined/cloud-server.svg +1 -0
- data/app/assets/icons/outlined/cloud-sync.svg +1 -0
- data/app/assets/icons/outlined/cloud-upload.svg +1 -0
- data/app/assets/icons/outlined/cloud.svg +1 -0
- data/app/assets/icons/outlined/cluster.svg +1 -0
- data/app/assets/icons/outlined/code-sandbox.svg +1 -0
- data/app/assets/icons/outlined/code.svg +1 -0
- data/app/assets/icons/outlined/codepen-circle.svg +1 -0
- data/app/assets/icons/outlined/codepen.svg +1 -0
- data/app/assets/icons/outlined/coffee.svg +1 -0
- data/app/assets/icons/outlined/column-height.svg +1 -0
- data/app/assets/icons/outlined/column-width.svg +1 -0
- data/app/assets/icons/outlined/comment.svg +1 -0
- data/app/assets/icons/outlined/compass.svg +1 -0
- data/app/assets/icons/outlined/compress.svg +1 -0
- data/app/assets/icons/outlined/console-sql.svg +1 -0
- data/app/assets/icons/outlined/contacts.svg +1 -0
- data/app/assets/icons/outlined/container.svg +1 -0
- data/app/assets/icons/outlined/control.svg +1 -0
- data/app/assets/icons/outlined/copy.svg +1 -0
- data/app/assets/icons/outlined/copyright-circle.svg +1 -0
- data/app/assets/icons/outlined/copyright.svg +1 -0
- data/app/assets/icons/outlined/credit-card.svg +1 -0
- data/app/assets/icons/outlined/crown.svg +1 -0
- data/app/assets/icons/outlined/customer-service.svg +1 -0
- data/app/assets/icons/outlined/dash.svg +1 -0
- data/app/assets/icons/outlined/dashboard.svg +1 -0
- data/app/assets/icons/outlined/database.svg +1 -0
- data/app/assets/icons/outlined/delete-column.svg +1 -0
- data/app/assets/icons/outlined/delete-row.svg +1 -0
- data/app/assets/icons/outlined/delete.svg +1 -0
- data/app/assets/icons/outlined/delivered-procedure.svg +1 -0
- data/app/assets/icons/outlined/deployment-unit.svg +1 -0
- data/app/assets/icons/outlined/desktop.svg +1 -0
- data/app/assets/icons/outlined/diff.svg +1 -0
- data/app/assets/icons/outlined/dingding.svg +1 -0
- data/app/assets/icons/outlined/dingtalk.svg +1 -0
- data/app/assets/icons/outlined/disconnect.svg +1 -0
- data/app/assets/icons/outlined/discord.svg +1 -0
- data/app/assets/icons/outlined/dislike.svg +1 -0
- data/app/assets/icons/outlined/docker.svg +1 -0
- data/app/assets/icons/outlined/dollar-circle.svg +1 -0
- data/app/assets/icons/outlined/dollar.svg +1 -0
- data/app/assets/icons/outlined/dot-chart.svg +1 -0
- data/app/assets/icons/outlined/dot-net.svg +1 -0
- data/app/assets/icons/outlined/double-left.svg +1 -0
- data/app/assets/icons/outlined/double-right.svg +1 -0
- data/app/assets/icons/outlined/down-circle.svg +1 -0
- data/app/assets/icons/outlined/down-square.svg +1 -0
- data/app/assets/icons/outlined/down.svg +1 -0
- data/app/assets/icons/outlined/download.svg +1 -0
- data/app/assets/icons/outlined/drag.svg +1 -0
- data/app/assets/icons/outlined/dribbble-square.svg +1 -0
- data/app/assets/icons/outlined/dribbble.svg +1 -0
- data/app/assets/icons/outlined/dropbox.svg +1 -0
- data/app/assets/icons/outlined/edit.svg +1 -0
- data/app/assets/icons/outlined/ellipsis.svg +1 -0
- data/app/assets/icons/outlined/enter.svg +1 -0
- data/app/assets/icons/outlined/environment.svg +1 -0
- data/app/assets/icons/outlined/euro-circle.svg +1 -0
- data/app/assets/icons/outlined/euro.svg +1 -0
- data/app/assets/icons/outlined/exception.svg +1 -0
- data/app/assets/icons/outlined/exclamation-circle.svg +1 -0
- data/app/assets/icons/outlined/exclamation.svg +1 -0
- data/app/assets/icons/outlined/expand-alt.svg +1 -0
- data/app/assets/icons/outlined/expand.svg +1 -0
- data/app/assets/icons/outlined/experiment.svg +1 -0
- data/app/assets/icons/outlined/export.svg +1 -0
- data/app/assets/icons/outlined/eye-invisible.svg +1 -0
- data/app/assets/icons/outlined/eye.svg +1 -0
- data/app/assets/icons/outlined/facebook.svg +1 -0
- data/app/assets/icons/outlined/fall.svg +1 -0
- data/app/assets/icons/outlined/fast-backward.svg +1 -0
- data/app/assets/icons/outlined/fast-forward.svg +1 -0
- data/app/assets/icons/outlined/field-binary.svg +1 -0
- data/app/assets/icons/outlined/field-number.svg +1 -0
- data/app/assets/icons/outlined/field-string.svg +1 -0
- data/app/assets/icons/outlined/field-time.svg +1 -0
- data/app/assets/icons/outlined/file-add.svg +1 -0
- data/app/assets/icons/outlined/file-done.svg +1 -0
- data/app/assets/icons/outlined/file-excel.svg +1 -0
- data/app/assets/icons/outlined/file-exclamation.svg +1 -0
- data/app/assets/icons/outlined/file-gif.svg +1 -0
- data/app/assets/icons/outlined/file-image.svg +1 -0
- data/app/assets/icons/outlined/file-jpg.svg +1 -0
- data/app/assets/icons/outlined/file-markdown.svg +1 -0
- data/app/assets/icons/outlined/file-pdf.svg +1 -0
- data/app/assets/icons/outlined/file-ppt.svg +1 -0
- data/app/assets/icons/outlined/file-protect.svg +1 -0
- data/app/assets/icons/outlined/file-search.svg +1 -0
- data/app/assets/icons/outlined/file-sync.svg +1 -0
- data/app/assets/icons/outlined/file-text.svg +1 -0
- data/app/assets/icons/outlined/file-unknown.svg +1 -0
- data/app/assets/icons/outlined/file-word.svg +1 -0
- data/app/assets/icons/outlined/file-zip.svg +1 -0
- data/app/assets/icons/outlined/file.svg +1 -0
- data/app/assets/icons/outlined/filter.svg +1 -0
- data/app/assets/icons/outlined/fire.svg +1 -0
- data/app/assets/icons/outlined/flag.svg +1 -0
- data/app/assets/icons/outlined/folder-add.svg +1 -0
- data/app/assets/icons/outlined/folder-open.svg +1 -0
- data/app/assets/icons/outlined/folder-view.svg +1 -0
- data/app/assets/icons/outlined/folder.svg +1 -0
- data/app/assets/icons/outlined/font-colors.svg +1 -0
- data/app/assets/icons/outlined/font-size.svg +1 -0
- data/app/assets/icons/outlined/fork.svg +1 -0
- data/app/assets/icons/outlined/form.svg +1 -0
- data/app/assets/icons/outlined/format-painter.svg +1 -0
- data/app/assets/icons/outlined/forward.svg +1 -0
- data/app/assets/icons/outlined/frown.svg +1 -0
- data/app/assets/icons/outlined/fullscreen-exit.svg +1 -0
- data/app/assets/icons/outlined/fullscreen.svg +1 -0
- data/app/assets/icons/outlined/function.svg +1 -0
- data/app/assets/icons/outlined/fund-projection-screen.svg +1 -0
- data/app/assets/icons/outlined/fund-view.svg +1 -0
- data/app/assets/icons/outlined/fund.svg +1 -0
- data/app/assets/icons/outlined/funnel-plot.svg +1 -0
- data/app/assets/icons/outlined/gateway.svg +1 -0
- data/app/assets/icons/outlined/gif.svg +1 -0
- data/app/assets/icons/outlined/gift.svg +1 -0
- data/app/assets/icons/outlined/github.svg +1 -0
- data/app/assets/icons/outlined/gitlab.svg +1 -0
- data/app/assets/icons/outlined/global.svg +1 -0
- data/app/assets/icons/outlined/gold.svg +1 -0
- data/app/assets/icons/outlined/google-plus.svg +1 -0
- data/app/assets/icons/outlined/google.svg +1 -0
- data/app/assets/icons/outlined/group.svg +1 -0
- data/app/assets/icons/outlined/harmony-o-s.svg +1 -0
- data/app/assets/icons/outlined/hdd.svg +1 -0
- data/app/assets/icons/outlined/heart.svg +1 -0
- data/app/assets/icons/outlined/heat-map.svg +1 -0
- data/app/assets/icons/outlined/highlight.svg +1 -0
- data/app/assets/icons/outlined/history.svg +1 -0
- data/app/assets/icons/outlined/holder.svg +1 -0
- data/app/assets/icons/outlined/home.svg +1 -0
- data/app/assets/icons/outlined/hourglass.svg +1 -0
- data/app/assets/icons/outlined/html5.svg +1 -0
- data/app/assets/icons/outlined/idcard.svg +1 -0
- data/app/assets/icons/outlined/ie.svg +1 -0
- data/app/assets/icons/outlined/import.svg +1 -0
- data/app/assets/icons/outlined/inbox.svg +1 -0
- data/app/assets/icons/outlined/info-circle.svg +1 -0
- data/app/assets/icons/outlined/info.svg +1 -0
- data/app/assets/icons/outlined/insert-row-above.svg +1 -0
- data/app/assets/icons/outlined/insert-row-below.svg +1 -0
- data/app/assets/icons/outlined/insert-row-left.svg +1 -0
- data/app/assets/icons/outlined/insert-row-right.svg +1 -0
- data/app/assets/icons/outlined/instagram.svg +1 -0
- data/app/assets/icons/outlined/insurance.svg +1 -0
- data/app/assets/icons/outlined/interaction.svg +1 -0
- data/app/assets/icons/outlined/issues-close.svg +1 -0
- data/app/assets/icons/outlined/italic.svg +1 -0
- data/app/assets/icons/outlined/java-script.svg +1 -0
- data/app/assets/icons/outlined/java.svg +1 -0
- data/app/assets/icons/outlined/key.svg +1 -0
- data/app/assets/icons/outlined/kubernetes.svg +1 -0
- data/app/assets/icons/outlined/laptop.svg +1 -0
- data/app/assets/icons/outlined/layout.svg +1 -0
- data/app/assets/icons/outlined/left-circle.svg +1 -0
- data/app/assets/icons/outlined/left-square.svg +1 -0
- data/app/assets/icons/outlined/left.svg +1 -0
- data/app/assets/icons/outlined/like.svg +1 -0
- data/app/assets/icons/outlined/line-chart.svg +1 -0
- data/app/assets/icons/outlined/line-height.svg +1 -0
- data/app/assets/icons/outlined/line.svg +1 -0
- data/app/assets/icons/outlined/link.svg +1 -0
- data/app/assets/icons/outlined/linkedin.svg +1 -0
- data/app/assets/icons/outlined/linux.svg +1 -0
- data/app/assets/icons/outlined/loading-3-quarters.svg +1 -0
- data/app/assets/icons/outlined/loading.svg +1 -0
- data/app/assets/icons/outlined/lock.svg +1 -0
- data/app/assets/icons/outlined/login.svg +1 -0
- data/app/assets/icons/outlined/logout.svg +1 -0
- data/app/assets/icons/outlined/mac-command.svg +1 -0
- data/app/assets/icons/outlined/mail.svg +1 -0
- data/app/assets/icons/outlined/man.svg +1 -0
- data/app/assets/icons/outlined/medicine-box.svg +1 -0
- data/app/assets/icons/outlined/medium-workmark.svg +1 -0
- data/app/assets/icons/outlined/medium.svg +1 -0
- data/app/assets/icons/outlined/meh.svg +1 -0
- data/app/assets/icons/outlined/menu-fold.svg +1 -0
- data/app/assets/icons/outlined/menu-unfold.svg +1 -0
- data/app/assets/icons/outlined/menu.svg +1 -0
- data/app/assets/icons/outlined/merge-cells.svg +1 -0
- data/app/assets/icons/outlined/merge.svg +1 -0
- data/app/assets/icons/outlined/message.svg +1 -0
- data/app/assets/icons/outlined/minus-circle.svg +1 -0
- data/app/assets/icons/outlined/minus-square.svg +1 -0
- data/app/assets/icons/outlined/minus.svg +1 -0
- data/app/assets/icons/outlined/mobile.svg +1 -0
- data/app/assets/icons/outlined/money-collect.svg +1 -0
- data/app/assets/icons/outlined/monitor.svg +1 -0
- data/app/assets/icons/outlined/moon.svg +1 -0
- data/app/assets/icons/outlined/more.svg +1 -0
- data/app/assets/icons/outlined/muted.svg +1 -0
- data/app/assets/icons/outlined/node-collapse.svg +1 -0
- data/app/assets/icons/outlined/node-expand.svg +1 -0
- data/app/assets/icons/outlined/node-index.svg +1 -0
- data/app/assets/icons/outlined/notification.svg +1 -0
- data/app/assets/icons/outlined/number.svg +1 -0
- data/app/assets/icons/outlined/one-to-one.svg +1 -0
- data/app/assets/icons/outlined/open-a-i.svg +1 -0
- data/app/assets/icons/outlined/ordered-list.svg +1 -0
- data/app/assets/icons/outlined/paper-clip.svg +1 -0
- data/app/assets/icons/outlined/partition.svg +1 -0
- data/app/assets/icons/outlined/pause-circle.svg +1 -0
- data/app/assets/icons/outlined/pause.svg +1 -0
- data/app/assets/icons/outlined/pay-circle.svg +1 -0
- data/app/assets/icons/outlined/percentage.svg +1 -0
- data/app/assets/icons/outlined/phone.svg +1 -0
- data/app/assets/icons/outlined/pic-center.svg +1 -0
- data/app/assets/icons/outlined/pic-left.svg +1 -0
- data/app/assets/icons/outlined/pic-right.svg +1 -0
- data/app/assets/icons/outlined/picture.svg +1 -0
- data/app/assets/icons/outlined/pie-chart.svg +1 -0
- data/app/assets/icons/outlined/pinterest.svg +1 -0
- data/app/assets/icons/outlined/play-circle.svg +1 -0
- data/app/assets/icons/outlined/play-square.svg +1 -0
- data/app/assets/icons/outlined/plus-circle.svg +1 -0
- data/app/assets/icons/outlined/plus-square.svg +1 -0
- data/app/assets/icons/outlined/plus.svg +1 -0
- data/app/assets/icons/outlined/pound-circle.svg +1 -0
- data/app/assets/icons/outlined/pound.svg +1 -0
- data/app/assets/icons/outlined/poweroff.svg +1 -0
- data/app/assets/icons/outlined/printer.svg +1 -0
- data/app/assets/icons/outlined/product.svg +1 -0
- data/app/assets/icons/outlined/profile.svg +1 -0
- data/app/assets/icons/outlined/project.svg +1 -0
- data/app/assets/icons/outlined/property-safety.svg +1 -0
- data/app/assets/icons/outlined/pull-request.svg +1 -0
- data/app/assets/icons/outlined/pushpin.svg +1 -0
- data/app/assets/icons/outlined/python.svg +1 -0
- data/app/assets/icons/outlined/qq.svg +1 -0
- data/app/assets/icons/outlined/qrcode.svg +1 -0
- data/app/assets/icons/outlined/question-circle.svg +1 -0
- data/app/assets/icons/outlined/question.svg +1 -0
- data/app/assets/icons/outlined/radar-chart.svg +1 -0
- data/app/assets/icons/outlined/radius-bottomleft.svg +1 -0
- data/app/assets/icons/outlined/radius-bottomright.svg +1 -0
- data/app/assets/icons/outlined/radius-setting.svg +1 -0
- data/app/assets/icons/outlined/radius-upleft.svg +1 -0
- data/app/assets/icons/outlined/radius-upright.svg +1 -0
- data/app/assets/icons/outlined/read.svg +1 -0
- data/app/assets/icons/outlined/reconciliation.svg +1 -0
- data/app/assets/icons/outlined/red-envelope.svg +1 -0
- data/app/assets/icons/outlined/reddit.svg +1 -0
- data/app/assets/icons/outlined/redo.svg +1 -0
- data/app/assets/icons/outlined/reload.svg +1 -0
- data/app/assets/icons/outlined/rest.svg +1 -0
- data/app/assets/icons/outlined/retweet.svg +1 -0
- data/app/assets/icons/outlined/right-circle.svg +1 -0
- data/app/assets/icons/outlined/right-square.svg +1 -0
- data/app/assets/icons/outlined/right.svg +1 -0
- data/app/assets/icons/outlined/rise.svg +1 -0
- data/app/assets/icons/outlined/robot.svg +1 -0
- data/app/assets/icons/outlined/rocket.svg +1 -0
- data/app/assets/icons/outlined/rollback.svg +1 -0
- data/app/assets/icons/outlined/rotate-left.svg +1 -0
- data/app/assets/icons/outlined/rotate-right.svg +1 -0
- data/app/assets/icons/outlined/ruby.svg +1 -0
- data/app/assets/icons/outlined/safety-certificate.svg +1 -0
- data/app/assets/icons/outlined/safety.svg +1 -0
- data/app/assets/icons/outlined/save.svg +1 -0
- data/app/assets/icons/outlined/scan.svg +1 -0
- data/app/assets/icons/outlined/schedule.svg +1 -0
- data/app/assets/icons/outlined/scissor.svg +1 -0
- data/app/assets/icons/outlined/search.svg +1 -0
- data/app/assets/icons/outlined/security-scan.svg +1 -0
- data/app/assets/icons/outlined/select.svg +1 -0
- data/app/assets/icons/outlined/send.svg +1 -0
- data/app/assets/icons/outlined/setting.svg +1 -0
- data/app/assets/icons/outlined/shake.svg +1 -0
- data/app/assets/icons/outlined/share-alt.svg +1 -0
- data/app/assets/icons/outlined/shop.svg +1 -0
- data/app/assets/icons/outlined/shopping-cart.svg +1 -0
- data/app/assets/icons/outlined/shopping.svg +1 -0
- data/app/assets/icons/outlined/shrink.svg +1 -0
- data/app/assets/icons/outlined/signature.svg +1 -0
- data/app/assets/icons/outlined/sisternode.svg +1 -0
- data/app/assets/icons/outlined/sketch.svg +1 -0
- data/app/assets/icons/outlined/skin.svg +1 -0
- data/app/assets/icons/outlined/skype.svg +1 -0
- data/app/assets/icons/outlined/slack-square.svg +1 -0
- data/app/assets/icons/outlined/slack.svg +1 -0
- data/app/assets/icons/outlined/sliders.svg +1 -0
- data/app/assets/icons/outlined/small-dash.svg +1 -0
- data/app/assets/icons/outlined/smile.svg +1 -0
- data/app/assets/icons/outlined/snippets.svg +1 -0
- data/app/assets/icons/outlined/solution.svg +1 -0
- data/app/assets/icons/outlined/sort-ascending.svg +1 -0
- data/app/assets/icons/outlined/sort-descending.svg +1 -0
- data/app/assets/icons/outlined/sound.svg +1 -0
- data/app/assets/icons/outlined/split-cells.svg +1 -0
- data/app/assets/icons/outlined/spotify.svg +1 -0
- data/app/assets/icons/outlined/star.svg +1 -0
- data/app/assets/icons/outlined/step-backward.svg +1 -0
- data/app/assets/icons/outlined/step-forward.svg +1 -0
- data/app/assets/icons/outlined/stock.svg +1 -0
- data/app/assets/icons/outlined/stop.svg +1 -0
- data/app/assets/icons/outlined/strikethrough.svg +1 -0
- data/app/assets/icons/outlined/subnode.svg +1 -0
- data/app/assets/icons/outlined/sun.svg +1 -0
- data/app/assets/icons/outlined/swap-left.svg +1 -0
- data/app/assets/icons/outlined/swap-right.svg +1 -0
- data/app/assets/icons/outlined/swap.svg +1 -0
- data/app/assets/icons/outlined/switcher.svg +1 -0
- data/app/assets/icons/outlined/sync.svg +1 -0
- data/app/assets/icons/outlined/table.svg +1 -0
- data/app/assets/icons/outlined/tablet.svg +1 -0
- data/app/assets/icons/outlined/tag.svg +1 -0
- data/app/assets/icons/outlined/tags.svg +1 -0
- data/app/assets/icons/outlined/taobao-circle.svg +1 -0
- data/app/assets/icons/outlined/taobao.svg +1 -0
- data/app/assets/icons/outlined/team.svg +1 -0
- data/app/assets/icons/outlined/thunderbolt.svg +1 -0
- data/app/assets/icons/outlined/tik-tok.svg +1 -0
- data/app/assets/icons/outlined/to-top.svg +1 -0
- data/app/assets/icons/outlined/tool.svg +1 -0
- data/app/assets/icons/outlined/trademark-circle.svg +1 -0
- data/app/assets/icons/outlined/trademark.svg +1 -0
- data/app/assets/icons/outlined/transaction.svg +1 -0
- data/app/assets/icons/outlined/translation.svg +1 -0
- data/app/assets/icons/outlined/trophy.svg +1 -0
- data/app/assets/icons/outlined/truck.svg +1 -0
- data/app/assets/icons/outlined/twitch.svg +1 -0
- data/app/assets/icons/outlined/twitter.svg +1 -0
- data/app/assets/icons/outlined/underline.svg +1 -0
- data/app/assets/icons/outlined/undo.svg +1 -0
- data/app/assets/icons/outlined/ungroup.svg +1 -0
- data/app/assets/icons/outlined/unlock.svg +1 -0
- data/app/assets/icons/outlined/unordered-list.svg +1 -0
- data/app/assets/icons/outlined/up-circle.svg +1 -0
- data/app/assets/icons/outlined/up-square.svg +1 -0
- data/app/assets/icons/outlined/up.svg +1 -0
- data/app/assets/icons/outlined/upload.svg +1 -0
- data/app/assets/icons/outlined/usb.svg +1 -0
- data/app/assets/icons/outlined/user-add.svg +1 -0
- data/app/assets/icons/outlined/user-delete.svg +1 -0
- data/app/assets/icons/outlined/user-switch.svg +1 -0
- data/app/assets/icons/outlined/user.svg +1 -0
- data/app/assets/icons/outlined/usergroup-add.svg +1 -0
- data/app/assets/icons/outlined/usergroup-delete.svg +1 -0
- data/app/assets/icons/outlined/verified.svg +1 -0
- data/app/assets/icons/outlined/vertical-align-bottom.svg +1 -0
- data/app/assets/icons/outlined/vertical-align-middle.svg +1 -0
- data/app/assets/icons/outlined/vertical-align-top.svg +1 -0
- data/app/assets/icons/outlined/vertical-left.svg +1 -0
- data/app/assets/icons/outlined/vertical-right.svg +1 -0
- data/app/assets/icons/outlined/video-camera-add.svg +1 -0
- data/app/assets/icons/outlined/video-camera.svg +1 -0
- data/app/assets/icons/outlined/wallet.svg +1 -0
- data/app/assets/icons/outlined/warning.svg +1 -0
- data/app/assets/icons/outlined/wechat-work.svg +1 -0
- data/app/assets/icons/outlined/wechat.svg +1 -0
- data/app/assets/icons/outlined/weibo-circle.svg +1 -0
- data/app/assets/icons/outlined/weibo-square.svg +1 -0
- data/app/assets/icons/outlined/weibo.svg +1 -0
- data/app/assets/icons/outlined/whats-app.svg +1 -0
- data/app/assets/icons/outlined/wifi.svg +1 -0
- data/app/assets/icons/outlined/windows.svg +1 -0
- data/app/assets/icons/outlined/woman.svg +1 -0
- data/app/assets/icons/outlined/x.svg +1 -0
- data/app/assets/icons/outlined/yahoo.svg +1 -0
- data/app/assets/icons/outlined/youtube.svg +1 -0
- data/app/assets/icons/outlined/yuque.svg +1 -0
- data/app/assets/icons/outlined/zhihu.svg +1 -0
- data/app/assets/icons/outlined/zoom-in.svg +1 -0
- data/app/assets/icons/outlined/zoom-out.svg +1 -0
- data/app/assets/icons/twotone/account-book.svg +1 -0
- data/app/assets/icons/twotone/alert.svg +1 -0
- data/app/assets/icons/twotone/api.svg +1 -0
- data/app/assets/icons/twotone/appstore.svg +1 -0
- data/app/assets/icons/twotone/audio.svg +1 -0
- data/app/assets/icons/twotone/bank.svg +1 -0
- data/app/assets/icons/twotone/bell.svg +1 -0
- data/app/assets/icons/twotone/book.svg +1 -0
- data/app/assets/icons/twotone/box-plot.svg +1 -0
- data/app/assets/icons/twotone/bug.svg +1 -0
- data/app/assets/icons/twotone/build.svg +1 -0
- data/app/assets/icons/twotone/bulb.svg +1 -0
- data/app/assets/icons/twotone/calculator.svg +1 -0
- data/app/assets/icons/twotone/calendar.svg +1 -0
- data/app/assets/icons/twotone/camera.svg +1 -0
- data/app/assets/icons/twotone/car.svg +1 -0
- data/app/assets/icons/twotone/carry-out.svg +1 -0
- data/app/assets/icons/twotone/check-circle.svg +1 -0
- data/app/assets/icons/twotone/check-square.svg +1 -0
- data/app/assets/icons/twotone/ci-circle.svg +1 -0
- data/app/assets/icons/twotone/ci.svg +1 -0
- data/app/assets/icons/twotone/clock-circle.svg +1 -0
- data/app/assets/icons/twotone/close-circle.svg +1 -0
- data/app/assets/icons/twotone/close-square.svg +1 -0
- data/app/assets/icons/twotone/cloud.svg +1 -0
- data/app/assets/icons/twotone/code.svg +1 -0
- data/app/assets/icons/twotone/compass.svg +1 -0
- data/app/assets/icons/twotone/contacts.svg +1 -0
- data/app/assets/icons/twotone/container.svg +1 -0
- data/app/assets/icons/twotone/control.svg +1 -0
- data/app/assets/icons/twotone/copy.svg +1 -0
- data/app/assets/icons/twotone/copyright-circle.svg +1 -0
- data/app/assets/icons/twotone/copyright.svg +1 -0
- data/app/assets/icons/twotone/credit-card.svg +1 -0
- data/app/assets/icons/twotone/crown.svg +1 -0
- data/app/assets/icons/twotone/customer-service.svg +1 -0
- data/app/assets/icons/twotone/dashboard.svg +1 -0
- data/app/assets/icons/twotone/database.svg +1 -0
- data/app/assets/icons/twotone/delete.svg +1 -0
- data/app/assets/icons/twotone/diff.svg +1 -0
- data/app/assets/icons/twotone/dislike.svg +1 -0
- data/app/assets/icons/twotone/dollar-circle.svg +1 -0
- data/app/assets/icons/twotone/dollar.svg +1 -0
- data/app/assets/icons/twotone/down-circle.svg +1 -0
- data/app/assets/icons/twotone/down-square.svg +1 -0
- data/app/assets/icons/twotone/edit.svg +1 -0
- data/app/assets/icons/twotone/environment.svg +1 -0
- data/app/assets/icons/twotone/euro-circle.svg +1 -0
- data/app/assets/icons/twotone/euro.svg +1 -0
- data/app/assets/icons/twotone/exclamation-circle.svg +1 -0
- data/app/assets/icons/twotone/experiment.svg +1 -0
- data/app/assets/icons/twotone/eye-invisible.svg +1 -0
- data/app/assets/icons/twotone/eye.svg +1 -0
- data/app/assets/icons/twotone/file-add.svg +1 -0
- data/app/assets/icons/twotone/file-excel.svg +1 -0
- data/app/assets/icons/twotone/file-exclamation.svg +1 -0
- data/app/assets/icons/twotone/file-image.svg +1 -0
- data/app/assets/icons/twotone/file-markdown.svg +1 -0
- data/app/assets/icons/twotone/file-pdf.svg +1 -0
- data/app/assets/icons/twotone/file-ppt.svg +1 -0
- data/app/assets/icons/twotone/file-text.svg +1 -0
- data/app/assets/icons/twotone/file-unknown.svg +1 -0
- data/app/assets/icons/twotone/file-word.svg +1 -0
- data/app/assets/icons/twotone/file-zip.svg +1 -0
- data/app/assets/icons/twotone/file.svg +1 -0
- data/app/assets/icons/twotone/filter.svg +1 -0
- data/app/assets/icons/twotone/fire.svg +1 -0
- data/app/assets/icons/twotone/flag.svg +1 -0
- data/app/assets/icons/twotone/folder-add.svg +1 -0
- data/app/assets/icons/twotone/folder-open.svg +1 -0
- data/app/assets/icons/twotone/folder.svg +1 -0
- data/app/assets/icons/twotone/frown.svg +1 -0
- data/app/assets/icons/twotone/fund.svg +1 -0
- data/app/assets/icons/twotone/funnel-plot.svg +1 -0
- data/app/assets/icons/twotone/gift.svg +1 -0
- data/app/assets/icons/twotone/gold.svg +1 -0
- data/app/assets/icons/twotone/hdd.svg +1 -0
- data/app/assets/icons/twotone/heart.svg +1 -0
- data/app/assets/icons/twotone/highlight.svg +1 -0
- data/app/assets/icons/twotone/home.svg +1 -0
- data/app/assets/icons/twotone/hourglass.svg +1 -0
- data/app/assets/icons/twotone/html5.svg +1 -0
- data/app/assets/icons/twotone/idcard.svg +1 -0
- data/app/assets/icons/twotone/info-circle.svg +1 -0
- data/app/assets/icons/twotone/insurance.svg +1 -0
- data/app/assets/icons/twotone/interaction.svg +1 -0
- data/app/assets/icons/twotone/layout.svg +1 -0
- data/app/assets/icons/twotone/left-circle.svg +1 -0
- data/app/assets/icons/twotone/left-square.svg +1 -0
- data/app/assets/icons/twotone/like.svg +1 -0
- data/app/assets/icons/twotone/lock.svg +1 -0
- data/app/assets/icons/twotone/mail.svg +1 -0
- data/app/assets/icons/twotone/medicine-box.svg +1 -0
- data/app/assets/icons/twotone/meh.svg +1 -0
- data/app/assets/icons/twotone/message.svg +1 -0
- data/app/assets/icons/twotone/minus-circle.svg +1 -0
- data/app/assets/icons/twotone/minus-square.svg +1 -0
- data/app/assets/icons/twotone/mobile.svg +1 -0
- data/app/assets/icons/twotone/money-collect.svg +1 -0
- data/app/assets/icons/twotone/notification.svg +1 -0
- data/app/assets/icons/twotone/pause-circle.svg +1 -0
- data/app/assets/icons/twotone/phone.svg +1 -0
- data/app/assets/icons/twotone/picture.svg +1 -0
- data/app/assets/icons/twotone/pie-chart.svg +1 -0
- data/app/assets/icons/twotone/play-circle.svg +1 -0
- data/app/assets/icons/twotone/play-square.svg +1 -0
- data/app/assets/icons/twotone/plus-circle.svg +1 -0
- data/app/assets/icons/twotone/plus-square.svg +1 -0
- data/app/assets/icons/twotone/pound-circle.svg +1 -0
- data/app/assets/icons/twotone/printer.svg +1 -0
- data/app/assets/icons/twotone/profile.svg +1 -0
- data/app/assets/icons/twotone/project.svg +1 -0
- data/app/assets/icons/twotone/property-safety.svg +1 -0
- data/app/assets/icons/twotone/pushpin.svg +1 -0
- data/app/assets/icons/twotone/question-circle.svg +1 -0
- data/app/assets/icons/twotone/reconciliation.svg +1 -0
- data/app/assets/icons/twotone/red-envelope.svg +1 -0
- data/app/assets/icons/twotone/rest.svg +1 -0
- data/app/assets/icons/twotone/right-circle.svg +1 -0
- data/app/assets/icons/twotone/right-square.svg +1 -0
- data/app/assets/icons/twotone/rocket.svg +1 -0
- data/app/assets/icons/twotone/safety-certificate.svg +1 -0
- data/app/assets/icons/twotone/save.svg +1 -0
- data/app/assets/icons/twotone/schedule.svg +1 -0
- data/app/assets/icons/twotone/security-scan.svg +1 -0
- data/app/assets/icons/twotone/setting.svg +1 -0
- data/app/assets/icons/twotone/shop.svg +1 -0
- data/app/assets/icons/twotone/shopping.svg +1 -0
- data/app/assets/icons/twotone/skin.svg +1 -0
- data/app/assets/icons/twotone/sliders.svg +1 -0
- data/app/assets/icons/twotone/smile.svg +1 -0
- data/app/assets/icons/twotone/snippets.svg +1 -0
- data/app/assets/icons/twotone/sound.svg +1 -0
- data/app/assets/icons/twotone/star.svg +1 -0
- data/app/assets/icons/twotone/stop.svg +1 -0
- data/app/assets/icons/twotone/switcher.svg +1 -0
- data/app/assets/icons/twotone/tablet.svg +1 -0
- data/app/assets/icons/twotone/tag.svg +1 -0
- data/app/assets/icons/twotone/tags.svg +1 -0
- data/app/assets/icons/twotone/thunderbolt.svg +1 -0
- data/app/assets/icons/twotone/tool.svg +1 -0
- data/app/assets/icons/twotone/trademark-circle.svg +1 -0
- data/app/assets/icons/twotone/trophy.svg +1 -0
- data/app/assets/icons/twotone/unlock.svg +1 -0
- data/app/assets/icons/twotone/up-circle.svg +1 -0
- data/app/assets/icons/twotone/up-square.svg +1 -0
- data/app/assets/icons/twotone/usb.svg +1 -0
- data/app/assets/icons/twotone/video-camera.svg +1 -0
- data/app/assets/icons/twotone/wallet.svg +1 -0
- data/app/assets/icons/twotone/warning.svg +1 -0
- data/app/assets/illustrations/success.svg +1 -0
- data/app/assets/javascripts/hakumi_components.js +1 -0
- data/app/assets/stylesheets/hakumi/alert.scss +1 -0
- data/app/assets/stylesheets/hakumi_components.css +1 -0
- data/app/components/hakumi/admin_panel/component.html.erb +61 -0
- data/app/components/hakumi/admin_panel/component.rb +40 -0
- data/app/components/hakumi/affix/component.html.erb +7 -0
- data/app/components/hakumi/affix/component.rb +88 -0
- data/app/components/hakumi/alert/component.html.erb +30 -0
- data/app/components/hakumi/alert/component.rb +128 -0
- data/app/components/hakumi/anchor/component.html.erb +8 -0
- data/app/components/hakumi/anchor/component.rb +80 -0
- data/app/components/hakumi/anchor/link/component.html.erb +12 -0
- data/app/components/hakumi/anchor/link/component.rb +34 -0
- data/app/components/hakumi/autocomplete/component.html.erb +74 -0
- data/app/components/hakumi/autocomplete/component.rb +202 -0
- data/app/components/hakumi/avatar/component.rb +91 -0
- data/app/components/hakumi/badge/component.rb +85 -0
- data/app/components/hakumi/base_component.rb +179 -0
- data/app/components/hakumi/breadcrumb/component.html.erb +12 -0
- data/app/components/hakumi/breadcrumb/component.rb +27 -0
- data/app/components/hakumi/breadcrumb/item/component.html.erb +17 -0
- data/app/components/hakumi/breadcrumb/item/component.rb +35 -0
- data/app/components/hakumi/button/component.rb +121 -0
- data/app/components/hakumi/calendar/component.html.erb +163 -0
- data/app/components/hakumi/calendar/component.rb +448 -0
- data/app/components/hakumi/card/component.html.erb +65 -0
- data/app/components/hakumi/card/component.rb +87 -0
- data/app/components/hakumi/card/grid/component.html.erb +3 -0
- data/app/components/hakumi/card/grid/component.rb +37 -0
- data/app/components/hakumi/card/meta/component.html.erb +23 -0
- data/app/components/hakumi/card/meta/component.rb +46 -0
- data/app/components/hakumi/carousel/component.html.erb +56 -0
- data/app/components/hakumi/carousel/component.rb +147 -0
- data/app/components/hakumi/cascader/component.html.erb +41 -0
- data/app/components/hakumi/cascader/component.rb +119 -0
- data/app/components/hakumi/checkbox/component.html.erb +21 -0
- data/app/components/hakumi/checkbox/component.rb +54 -0
- data/app/components/hakumi/checkbox/group/component.html.erb +12 -0
- data/app/components/hakumi/checkbox/group/component.rb +64 -0
- data/app/components/hakumi/collapse/component.html.erb +31 -0
- data/app/components/hakumi/collapse/component.rb +117 -0
- data/app/components/hakumi/collapse/panel/component.rb +56 -0
- data/app/components/hakumi/color_picker/component.html.erb +166 -0
- data/app/components/hakumi/color_picker/component.rb +173 -0
- data/app/components/hakumi/concerns/form_field.rb +135 -0
- data/app/components/hakumi/container/component.rb +76 -0
- data/app/components/hakumi/date_picker/component.html.erb +80 -0
- data/app/components/hakumi/date_picker/component.rb +140 -0
- data/app/components/hakumi/date_picker/range_picker.html.erb +54 -0
- data/app/components/hakumi/date_picker/range_picker.rb +136 -0
- data/app/components/hakumi/date_picker/shared_rendering.rb +199 -0
- data/app/components/hakumi/descriptions/component.html.erb +52 -0
- data/app/components/hakumi/descriptions/component.rb +182 -0
- data/app/components/hakumi/descriptions/item/component.rb +28 -0
- data/app/components/hakumi/divider/component.rb +66 -0
- data/app/components/hakumi/drawer/component.html.erb +44 -0
- data/app/components/hakumi/drawer/component.rb +115 -0
- data/app/components/hakumi/dropdown/component.html.erb +20 -0
- data/app/components/hakumi/dropdown/component.rb +97 -0
- data/app/components/hakumi/dropdown/divider/component.rb +13 -0
- data/app/components/hakumi/dropdown/item/component.html.erb +17 -0
- data/app/components/hakumi/dropdown/item/component.rb +47 -0
- data/app/components/hakumi/empty/component.rb +110 -0
- data/app/components/hakumi/flex/component.rb +78 -0
- data/app/components/hakumi/float_button/back_top/component.rb +79 -0
- data/app/components/hakumi/float_button/component.rb +203 -0
- data/app/components/hakumi/float_button/group/component.rb +227 -0
- data/app/components/hakumi/float_button/group_cluster/component.rb +141 -0
- data/app/components/hakumi/form/item/component.rb +114 -0
- data/app/components/hakumi/grid/col/component.rb +98 -0
- data/app/components/hakumi/grid/row/component.rb +79 -0
- data/app/components/hakumi/icon/component.html.erb +3 -0
- data/app/components/hakumi/icon/component.rb +167 -0
- data/app/components/hakumi/image/component.html.erb +81 -0
- data/app/components/hakumi/image/component.rb +112 -0
- data/app/components/hakumi/image/preview_group/component.html.erb +83 -0
- data/app/components/hakumi/image/preview_group/component.rb +70 -0
- data/app/components/hakumi/input/component.html.erb +27 -0
- data/app/components/hakumi/input/component.rb +187 -0
- data/app/components/hakumi/input/password/component.rb +95 -0
- data/app/components/hakumi/input/text_area/component.html.erb +21 -0
- data/app/components/hakumi/input/text_area/component.rb +133 -0
- data/app/components/hakumi/input_number/component.html.erb +73 -0
- data/app/components/hakumi/input_number/component.rb +199 -0
- data/app/components/hakumi/layout/component.html.erb +1 -0
- data/app/components/hakumi/layout/component.rb +21 -0
- data/app/components/hakumi/layout/content/component.html.erb +1 -0
- data/app/components/hakumi/layout/content/component.rb +19 -0
- data/app/components/hakumi/layout/footer/component.html.erb +1 -0
- data/app/components/hakumi/layout/footer/component.rb +19 -0
- data/app/components/hakumi/layout/header/component.html.erb +1 -0
- data/app/components/hakumi/layout/header/component.rb +19 -0
- data/app/components/hakumi/layout/sider/component.html.erb +1 -0
- data/app/components/hakumi/layout/sider/component.rb +56 -0
- data/app/components/hakumi/mentions/component.html.erb +51 -0
- data/app/components/hakumi/mentions/component.rb +166 -0
- data/app/components/hakumi/menu/component.html.erb +5 -0
- data/app/components/hakumi/menu/component.rb +126 -0
- data/app/components/hakumi/menu/divider/component.rb +13 -0
- data/app/components/hakumi/menu/group/component.html.erb +8 -0
- data/app/components/hakumi/menu/group/component.rb +47 -0
- data/app/components/hakumi/menu/item/component.html.erb +22 -0
- data/app/components/hakumi/menu/item/component.rb +47 -0
- data/app/components/hakumi/menu/sub_menu/component.html.erb +23 -0
- data/app/components/hakumi/menu/sub_menu/component.rb +92 -0
- data/app/components/hakumi/message/component.html.erb +1 -0
- data/app/components/hakumi/message/component.rb +106 -0
- data/app/components/hakumi/modal/component.rb +177 -0
- data/app/components/hakumi/modal/confirm/component.rb +64 -0
- data/app/components/hakumi/modal/error/component.rb +50 -0
- data/app/components/hakumi/modal/info/component.rb +50 -0
- data/app/components/hakumi/modal/success/component.rb +50 -0
- data/app/components/hakumi/modal/warning/component.rb +51 -0
- data/app/components/hakumi/notification/component.rb +126 -0
- data/app/components/hakumi/pagination/component.html.erb +115 -0
- data/app/components/hakumi/pagination/component.rb +205 -0
- data/app/components/hakumi/popconfirm/component.html.erb +55 -0
- data/app/components/hakumi/popconfirm/component.rb +88 -0
- data/app/components/hakumi/popover/component.html.erb +25 -0
- data/app/components/hakumi/popover/component.rb +132 -0
- data/app/components/hakumi/progress/component.html.erb +81 -0
- data/app/components/hakumi/progress/component.rb +565 -0
- data/app/components/hakumi/qr_code/component.html.erb +15 -0
- data/app/components/hakumi/qr_code/component.rb +339 -0
- data/app/components/hakumi/radio/component.html.erb +43 -0
- data/app/components/hakumi/radio/component.rb +80 -0
- data/app/components/hakumi/radio/group/component.html.erb +49 -0
- data/app/components/hakumi/radio/group/component.rb +132 -0
- data/app/components/hakumi/rate/component.html.erb +48 -0
- data/app/components/hakumi/rate/component.rb +132 -0
- data/app/components/hakumi/result/component.html.erb +23 -0
- data/app/components/hakumi/result/component.rb +125 -0
- data/app/components/hakumi/segmented/component.html.erb +17 -0
- data/app/components/hakumi/segmented/component.rb +273 -0
- data/app/components/hakumi/select/component.html.erb +103 -0
- data/app/components/hakumi/select/component.rb +125 -0
- data/app/components/hakumi/skeleton/avatar/component.html.erb +3 -0
- data/app/components/hakumi/skeleton/avatar/component.rb +66 -0
- data/app/components/hakumi/skeleton/button/component.html.erb +3 -0
- data/app/components/hakumi/skeleton/button/component.rb +59 -0
- data/app/components/hakumi/skeleton/component.html.erb +25 -0
- data/app/components/hakumi/skeleton/component.rb +200 -0
- data/app/components/hakumi/skeleton/image/component.html.erb +5 -0
- data/app/components/hakumi/skeleton/image/component.rb +80 -0
- data/app/components/hakumi/skeleton/input/component.html.erb +3 -0
- data/app/components/hakumi/skeleton/input/component.rb +51 -0
- data/app/components/hakumi/skeleton/node/component.html.erb +5 -0
- data/app/components/hakumi/skeleton/node/component.rb +43 -0
- data/app/components/hakumi/slider/component.html.erb +67 -0
- data/app/components/hakumi/slider/component.rb +232 -0
- data/app/components/hakumi/space/compact/component.html.erb +3 -0
- data/app/components/hakumi/space/compact/component.rb +36 -0
- data/app/components/hakumi/space/component.html.erb +12 -0
- data/app/components/hakumi/space/component.rb +73 -0
- data/app/components/hakumi/spin/component.html.erb +13 -0
- data/app/components/hakumi/spin/component.rb +209 -0
- data/app/components/hakumi/splitter/component.html.erb +3 -0
- data/app/components/hakumi/splitter/component.rb +38 -0
- data/app/components/hakumi/splitter/panel/component.html.erb +3 -0
- data/app/components/hakumi/splitter/panel/component.rb +73 -0
- data/app/components/hakumi/statistic/component.html.erb +16 -0
- data/app/components/hakumi/statistic/component.rb +291 -0
- data/app/components/hakumi/steps/component.html.erb +57 -0
- data/app/components/hakumi/steps/component.rb +145 -0
- data/app/components/hakumi/steps/item/component.html.erb +1 -0
- data/app/components/hakumi/steps/item/component.rb +91 -0
- data/app/components/hakumi/switch/component.html.erb +28 -0
- data/app/components/hakumi/switch/component.rb +125 -0
- data/app/components/hakumi/table/column/component.rb +80 -0
- data/app/components/hakumi/table/column_group/component.rb +78 -0
- data/app/components/hakumi/table/component.html.erb +196 -0
- data/app/components/hakumi/table/component.rb +957 -0
- data/app/components/hakumi/table/concerns/columns.rb +219 -0
- data/app/components/hakumi/tabs/component.html.erb +84 -0
- data/app/components/hakumi/tabs/component.rb +196 -0
- data/app/components/hakumi/tabs/item/component.rb +87 -0
- data/app/components/hakumi/tag/component.rb +187 -0
- data/app/components/hakumi/tag/group/component.rb +48 -0
- data/app/components/hakumi/time_picker/component.html.erb +63 -0
- data/app/components/hakumi/time_picker/component.rb +159 -0
- data/app/components/hakumi/timeline/component.html.erb +7 -0
- data/app/components/hakumi/timeline/component.rb +168 -0
- data/app/components/hakumi/timeline/item/component.html.erb +19 -0
- data/app/components/hakumi/timeline/item/component.rb +137 -0
- data/app/components/hakumi/tooltip/component.html.erb +20 -0
- data/app/components/hakumi/tooltip/component.rb +121 -0
- data/app/components/hakumi/tour/component.html.erb +66 -0
- data/app/components/hakumi/tour/component.rb +158 -0
- data/app/components/hakumi/transfer/component.html.erb +173 -0
- data/app/components/hakumi/transfer/component.rb +249 -0
- data/app/components/hakumi/tree/component.html.erb +23 -0
- data/app/components/hakumi/tree/component.rb +523 -0
- data/app/components/hakumi/tree_select/component.html.erb +76 -0
- data/app/components/hakumi/tree_select/component.rb +261 -0
- data/app/components/hakumi/typography/base_component.rb +109 -0
- data/app/components/hakumi/typography/link/component.rb +34 -0
- data/app/components/hakumi/typography/paragraph/component.rb +13 -0
- data/app/components/hakumi/typography/text/component.rb +8 -0
- data/app/components/hakumi/typography/title/component.rb +29 -0
- data/app/components/hakumi/upload/component.html.erb +117 -0
- data/app/components/hakumi/upload/component.rb +193 -0
- data/app/controllers/hakumi_components/components_controller.rb +27 -0
- data/app/form_builders/hakumi/form_builder.rb +440 -0
- data/app/javascript/hakumi_components/boot.js +8 -0
- data/app/javascript/hakumi_components/controllers/base/registry_controller.js +101 -0
- data/app/javascript/hakumi_components/controllers/hakumi/admin_panel_controller.js +363 -0
- data/app/javascript/hakumi_components/controllers/hakumi/affix_controller.js +206 -0
- data/app/javascript/hakumi_components/controllers/hakumi/alert_controller.js +46 -0
- data/app/javascript/hakumi_components/controllers/hakumi/anchor_controller.js +212 -0
- data/app/javascript/hakumi_components/controllers/hakumi/autocomplete_controller.js +357 -0
- data/app/javascript/hakumi_components/controllers/hakumi/avatar_text_controller.js +48 -0
- data/app/javascript/hakumi_components/controllers/hakumi/back_top_controller.js +83 -0
- data/app/javascript/hakumi_components/controllers/hakumi/button_controller.js +65 -0
- data/app/javascript/hakumi_components/controllers/hakumi/calendar_controller.js +1101 -0
- data/app/javascript/hakumi_components/controllers/hakumi/carousel_controller.js +348 -0
- data/app/javascript/hakumi_components/controllers/hakumi/cascader_controller.js +287 -0
- data/app/javascript/hakumi_components/controllers/hakumi/checkbox_controller.js +84 -0
- data/app/javascript/hakumi_components/controllers/hakumi/checkbox_group_controller.js +132 -0
- data/app/javascript/hakumi_components/controllers/hakumi/collapse_controller.js +181 -0
- data/app/javascript/hakumi_components/controllers/hakumi/color_picker_controller.js +735 -0
- data/app/javascript/hakumi_components/controllers/hakumi/date_picker_controller.js +906 -0
- data/app/javascript/hakumi_components/controllers/hakumi/drawer_controller.js +126 -0
- data/app/javascript/hakumi_components/controllers/hakumi/dropdown_controller.js +103 -0
- data/app/javascript/hakumi_components/controllers/hakumi/float_button_group_controller.js +52 -0
- data/app/javascript/hakumi_components/controllers/hakumi/form_item_controller.js +348 -0
- data/app/javascript/hakumi_components/controllers/hakumi/image_controller.js +437 -0
- data/app/javascript/hakumi_components/controllers/hakumi/input_controller.js +84 -0
- data/app/javascript/hakumi_components/controllers/hakumi/input_number_controller.js +302 -0
- data/app/javascript/hakumi_components/controllers/hakumi/input_password_controller.js +112 -0
- data/app/javascript/hakumi_components/controllers/hakumi/input_textarea_controller.js +102 -0
- data/app/javascript/hakumi_components/controllers/hakumi/mentions_controller.js +412 -0
- data/app/javascript/hakumi_components/controllers/hakumi/menu_controller.js +485 -0
- data/app/javascript/hakumi_components/controllers/hakumi/message_controller.js +344 -0
- data/app/javascript/hakumi_components/controllers/hakumi/modal_controller.js +167 -0
- data/app/javascript/hakumi_components/controllers/hakumi/modal_trigger_controller.js +53 -0
- data/app/javascript/hakumi_components/controllers/hakumi/notification_controller.js +433 -0
- data/app/javascript/hakumi_components/controllers/hakumi/pagination_controller.js +406 -0
- data/app/javascript/hakumi_components/controllers/hakumi/popconfirm_controller.js +357 -0
- data/app/javascript/hakumi_components/controllers/hakumi/popover_controller.js +473 -0
- data/app/javascript/hakumi_components/controllers/hakumi/progress_controller.js +185 -0
- data/app/javascript/hakumi_components/controllers/hakumi/qr_code_controller.js +315 -0
- data/app/javascript/hakumi_components/controllers/hakumi/radio_controller.js +86 -0
- data/app/javascript/hakumi_components/controllers/hakumi/rate_controller.js +262 -0
- data/app/javascript/hakumi_components/controllers/hakumi/segmented_controller.js +171 -0
- data/app/javascript/hakumi_components/controllers/hakumi/select_controller.js +315 -0
- data/app/javascript/hakumi_components/controllers/hakumi/slider_controller.js +471 -0
- data/app/javascript/hakumi_components/controllers/hakumi/spin_controller.js +130 -0
- data/app/javascript/hakumi_components/controllers/hakumi/splitter_controller.js +184 -0
- data/app/javascript/hakumi_components/controllers/hakumi/statistic_controller.js +249 -0
- data/app/javascript/hakumi_components/controllers/hakumi/steps_controller.js +125 -0
- data/app/javascript/hakumi_components/controllers/hakumi/switch_controller.js +147 -0
- data/app/javascript/hakumi_components/controllers/hakumi/table_controller.js +1198 -0
- data/app/javascript/hakumi_components/controllers/hakumi/tabs_controller.js +567 -0
- data/app/javascript/hakumi_components/controllers/hakumi/tag_controller.js +103 -0
- data/app/javascript/hakumi_components/controllers/hakumi/tag_group_controller.js +94 -0
- data/app/javascript/hakumi_components/controllers/hakumi/theme_controller.js +114 -0
- data/app/javascript/hakumi_components/controllers/hakumi/time_picker_controller.js +291 -0
- data/app/javascript/hakumi_components/controllers/hakumi/timeline_controller.js +88 -0
- data/app/javascript/hakumi_components/controllers/hakumi/tooltip_controller.js +295 -0
- data/app/javascript/hakumi_components/controllers/hakumi/tour_controller.js +508 -0
- data/app/javascript/hakumi_components/controllers/hakumi/transfer_controller.js +315 -0
- data/app/javascript/hakumi_components/controllers/hakumi/tree_controller.js +708 -0
- data/app/javascript/hakumi_components/controllers/hakumi/tree_select_controller.js +281 -0
- data/app/javascript/hakumi_components/controllers/hakumi/typography_controller.js +100 -0
- data/app/javascript/hakumi_components/controllers/hakumi/upload_controller.js +1101 -0
- data/app/javascript/hakumi_components/core/config.js +7 -0
- data/app/javascript/hakumi_components/core/dom.js +27 -0
- data/app/javascript/hakumi_components/core/persistence.js +132 -0
- data/app/javascript/hakumi_components/core/registry.js +23 -0
- data/app/javascript/hakumi_components/core/render_component.js +177 -0
- data/app/javascript/hakumi_components/esbuild_loader.js +149 -0
- data/app/javascript/hakumi_components/index.js +79 -0
- data/app/javascript/hakumi_components/plugins/persisted_singletons.js +19 -0
- data/app/javascript/hakumi_components/utils/date_helper.js +111 -0
- data/app/javascript/lib/validation_manager.js +238 -0
- data/app/javascript/stylesheets/_base.scss +63 -0
- data/app/javascript/stylesheets/_hakumi_components.scss +83 -0
- data/app/javascript/stylesheets/_theme-helpers.scss +53 -0
- data/app/javascript/stylesheets/_theme-tokens.scss +270 -0
- data/app/javascript/stylesheets/_variables.scss +229 -0
- data/app/javascript/stylesheets/components/_admin_panel.scss +264 -0
- data/app/javascript/stylesheets/components/_affix.scss +33 -0
- data/app/javascript/stylesheets/components/_alert.scss +116 -0
- data/app/javascript/stylesheets/components/_anchor.scss +132 -0
- data/app/javascript/stylesheets/components/_autocomplete.scss +190 -0
- data/app/javascript/stylesheets/components/_avatar.scss +99 -0
- data/app/javascript/stylesheets/components/_badge.scss +121 -0
- data/app/javascript/stylesheets/components/_breadcrumb.scss +77 -0
- data/app/javascript/stylesheets/components/_button.scss +354 -0
- data/app/javascript/stylesheets/components/_calendar.scss +859 -0
- data/app/javascript/stylesheets/components/_card.scss +323 -0
- data/app/javascript/stylesheets/components/_carousel.scss +180 -0
- data/app/javascript/stylesheets/components/_cascader.scss +276 -0
- data/app/javascript/stylesheets/components/_checkbox.scss +217 -0
- data/app/javascript/stylesheets/components/_collapse.scss +148 -0
- data/app/javascript/stylesheets/components/_color_picker.scss +387 -0
- data/app/javascript/stylesheets/components/_container.scss +45 -0
- data/app/javascript/stylesheets/components/_date_picker.scss +312 -0
- data/app/javascript/stylesheets/components/_descriptions.scss +209 -0
- data/app/javascript/stylesheets/components/_divider.scss +110 -0
- data/app/javascript/stylesheets/components/_drawer.scss +168 -0
- data/app/javascript/stylesheets/components/_dropdown.scss +162 -0
- data/app/javascript/stylesheets/components/_empty.scss +151 -0
- data/app/javascript/stylesheets/components/_flex.scss +70 -0
- data/app/javascript/stylesheets/components/_float_button.scss +306 -0
- data/app/javascript/stylesheets/components/_grid.scss +138 -0
- data/app/javascript/stylesheets/components/_icon.scss +35 -0
- data/app/javascript/stylesheets/components/_image.scss +373 -0
- data/app/javascript/stylesheets/components/_input.scss +407 -0
- data/app/javascript/stylesheets/components/_input_number.scss +266 -0
- data/app/javascript/stylesheets/components/_layout.scss +198 -0
- data/app/javascript/stylesheets/components/_mentions.scss +211 -0
- data/app/javascript/stylesheets/components/_menu.scss +674 -0
- data/app/javascript/stylesheets/components/_message.scss +127 -0
- data/app/javascript/stylesheets/components/_modal.scss +210 -0
- data/app/javascript/stylesheets/components/_notification.scss +245 -0
- data/app/javascript/stylesheets/components/_pagination.scss +402 -0
- data/app/javascript/stylesheets/components/_popconfirm.scss +125 -0
- data/app/javascript/stylesheets/components/_popover.scss +162 -0
- data/app/javascript/stylesheets/components/_progress.scss +197 -0
- data/app/javascript/stylesheets/components/_qr_code.scss +121 -0
- data/app/javascript/stylesheets/components/_radio.scss +316 -0
- data/app/javascript/stylesheets/components/_rate.scss +96 -0
- data/app/javascript/stylesheets/components/_result.scss +90 -0
- data/app/javascript/stylesheets/components/_segmented.scss +163 -0
- data/app/javascript/stylesheets/components/_select.scss +414 -0
- data/app/javascript/stylesheets/components/_skeleton.scss +205 -0
- data/app/javascript/stylesheets/components/_slider.scss +222 -0
- data/app/javascript/stylesheets/components/_space.scss +161 -0
- data/app/javascript/stylesheets/components/_spin.scss +185 -0
- data/app/javascript/stylesheets/components/_splitter.scss +89 -0
- data/app/javascript/stylesheets/components/_statistic.scss +78 -0
- data/app/javascript/stylesheets/components/_steps.scss +1092 -0
- data/app/javascript/stylesheets/components/_switch.scss +232 -0
- data/app/javascript/stylesheets/components/_table.scss +493 -0
- data/app/javascript/stylesheets/components/_tabs.scss +522 -0
- data/app/javascript/stylesheets/components/_tag.scss +315 -0
- data/app/javascript/stylesheets/components/_time_picker.scss +317 -0
- data/app/javascript/stylesheets/components/_timeline.scss +361 -0
- data/app/javascript/stylesheets/components/_tooltip.scss +331 -0
- data/app/javascript/stylesheets/components/_tour.scss +196 -0
- data/app/javascript/stylesheets/components/_transfer.scss +244 -0
- data/app/javascript/stylesheets/components/_tree.scss +341 -0
- data/app/javascript/stylesheets/components/_tree_select.scss +295 -0
- data/app/javascript/stylesheets/components/_typography.scss +155 -0
- data/app/javascript/stylesheets/components/_upload.scss +528 -0
- data/app/services/hakumi/icon/loader.rb +95 -0
- data/app/services/hakumi/illustrations/loader.rb +43 -0
- data/app/services/hakumi_components/component_handler.rb +53 -0
- data/app/views/hakumi/time_picker/_columns.html.erb +73 -0
- data/app/views/hakumi_components/_admin_panel.html.erb +1 -0
- data/app/views/hakumi_components/_affix.html.erb +1 -0
- data/app/views/hakumi_components/_alert.html.erb +1 -0
- data/app/views/hakumi_components/_confirm.html.erb +1 -0
- data/app/views/hakumi_components/_drawer.html.erb +3 -0
- data/app/views/hakumi_components/_message.html.erb +1 -0
- data/app/views/hakumi_components/_modal.html.erb +3 -0
- data/app/views/hakumi_components/_notification.html.erb +1 -0
- data/app/views/hakumi_components/_popconfirm.html.erb +1 -0
- data/app/views/hakumi_components/_popover.html.erb +1 -0
- data/app/views/hakumi_components/_qr_code.html.erb +1 -0
- data/app/views/hakumi_components/_result.html.erb +1 -0
- data/app/views/hakumi_components/_segmented.html.erb +1 -0
- data/app/views/hakumi_components/_skeleton.html.erb +1 -0
- data/app/views/hakumi_components/_spin.html.erb +1 -0
- data/app/views/hakumi_components/_statistic.html.erb +13 -0
- data/app/views/hakumi_components/_table.html.erb +1 -0
- data/app/views/hakumi_components/_tag.html.erb +3 -0
- data/app/views/hakumi_components/_timeline.html.erb +16 -0
- data/app/views/hakumi_components/_tree.html.erb +1 -0
- data/lib/hakumi_components/engine.rb +29 -0
- data/lib/hakumi_components/rails/attribute_introspection.rb +156 -0
- data/lib/hakumi_components/rails/validation_introspection.rb +192 -0
- data/lib/hakumi_components/rails.rb +9 -0
- data/lib/hakumi_components/version.rb +5 -0
- data/lib/hakumi_components.rb +26 -0
- data/sig/action_view/tag_builder.rbs +24 -0
- data/sig/active_support/concern_patch.rbs +7 -0
- data/sig/hakumi/admin_panel/component.rbs +28 -0
- data/sig/hakumi/affix/component.rbs +44 -0
- data/sig/hakumi/alert/component.rbs +64 -0
- data/sig/hakumi/anchor/component.rbs +45 -0
- data/sig/hakumi/anchor/link/component.rbs +31 -0
- data/sig/hakumi/autocomplete/component.rbs +68 -0
- data/sig/hakumi/avatar/component.rbs +44 -0
- data/sig/hakumi/badge/component.rbs +41 -0
- data/sig/hakumi/base_component.rbs +77 -0
- data/sig/hakumi/breadcrumb/component.rbs +21 -0
- data/sig/hakumi/breadcrumb/item/component.rbs +36 -0
- data/sig/hakumi/button/component.rbs +56 -0
- data/sig/hakumi/calendar/component.rbs +41 -0
- data/sig/hakumi/card/component.rbs +50 -0
- data/sig/hakumi/card/grid/component.rbs +21 -0
- data/sig/hakumi/card/meta/component.rbs +25 -0
- data/sig/hakumi/carousel/component.rbs +88 -0
- data/sig/hakumi/cascader/component.rbs +52 -0
- data/sig/hakumi/checkbox/component.rbs +36 -0
- data/sig/hakumi/checkbox/group/component.rbs +34 -0
- data/sig/hakumi/collapse/component.rbs +57 -0
- data/sig/hakumi/collapse/panel/component.rbs +47 -0
- data/sig/hakumi/color_picker/component.rbs +81 -0
- data/sig/hakumi/concerns/form_field.rbs +89 -0
- data/sig/hakumi/container/component.rbs +37 -0
- data/sig/hakumi/date_picker/component.rbs +72 -0
- data/sig/hakumi/date_picker/range_picker.rbs +68 -0
- data/sig/hakumi/date_picker/shared_rendering.rbs +41 -0
- data/sig/hakumi/descriptions/component.rbs +59 -0
- data/sig/hakumi/descriptions/item/component.rbs +31 -0
- data/sig/hakumi/divider/component.rbs +39 -0
- data/sig/hakumi/drawer/component.rbs +66 -0
- data/sig/hakumi/dropdown/component.rbs +45 -0
- data/sig/hakumi/dropdown/divider/component.rbs +11 -0
- data/sig/hakumi/dropdown/item/component.rbs +45 -0
- data/sig/hakumi/empty/component.rbs +40 -0
- data/sig/hakumi/flex/component.rbs +47 -0
- data/sig/hakumi/float_button/back_top/component.rbs +45 -0
- data/sig/hakumi/float_button/component.rbs +80 -0
- data/sig/hakumi/float_button/group/component.rbs +95 -0
- data/sig/hakumi/float_button/group_cluster/component.rbs +60 -0
- data/sig/hakumi/form/item/component.rbs +39 -0
- data/sig/hakumi/grid/col/component.rbs +50 -0
- data/sig/hakumi/grid/row/component.rbs +46 -0
- data/sig/hakumi/icon/component.rbs +56 -0
- data/sig/hakumi/image/component.rbs +56 -0
- data/sig/hakumi/image/preview_group/component.rbs +28 -0
- data/sig/hakumi/input/component.rbs +71 -0
- data/sig/hakumi/input/password/component.rbs +27 -0
- data/sig/hakumi/input/text_area/component.rbs +42 -0
- data/sig/hakumi/input_number/component.rbs +85 -0
- data/sig/hakumi/layout/component.rbs +21 -0
- data/sig/hakumi/layout/content/component.rbs +19 -0
- data/sig/hakumi/layout/footer/component.rbs +19 -0
- data/sig/hakumi/layout/header/component.rbs +19 -0
- data/sig/hakumi/layout/sider/component.rbs +19 -0
- data/sig/hakumi/mentions/component.rbs +75 -0
- data/sig/hakumi/menu/component.rbs +52 -0
- data/sig/hakumi/menu/divider/component.rbs +11 -0
- data/sig/hakumi/menu/group/component.rbs +20 -0
- data/sig/hakumi/menu/item/component.rbs +42 -0
- data/sig/hakumi/menu/sub_menu/component.rbs +37 -0
- data/sig/hakumi/message/component.rbs +50 -0
- data/sig/hakumi/modal/component.rbs +76 -0
- data/sig/hakumi/modal/confirm/component.rbs +32 -0
- data/sig/hakumi/modal/error/component.rbs +27 -0
- data/sig/hakumi/modal/info/component.rbs +27 -0
- data/sig/hakumi/modal/success/component.rbs +27 -0
- data/sig/hakumi/modal/warning/component.rbs +27 -0
- data/sig/hakumi/notification/component.rbs +64 -0
- data/sig/hakumi/pagination/component.rbs +113 -0
- data/sig/hakumi/popconfirm/component.rbs +52 -0
- data/sig/hakumi/popover/component.rbs +66 -0
- data/sig/hakumi/progress/component.rbs +201 -0
- data/sig/hakumi/qr_code/component.rbs +111 -0
- data/sig/hakumi/radio/component.rbs +55 -0
- data/sig/hakumi/radio/group/component.rbs +71 -0
- data/sig/hakumi/rate/component.rbs +56 -0
- data/sig/hakumi/result/component.rbs +65 -0
- data/sig/hakumi/segmented/component.rbs +73 -0
- data/sig/hakumi/select/component.rbs +73 -0
- data/sig/hakumi/skeleton/avatar/component.rbs +23 -0
- data/sig/hakumi/skeleton/button/component.rbs +24 -0
- data/sig/hakumi/skeleton/component.rbs +76 -0
- data/sig/hakumi/skeleton/image/component.rbs +22 -0
- data/sig/hakumi/skeleton/input/component.rbs +23 -0
- data/sig/hakumi/skeleton/node/component.rbs +21 -0
- data/sig/hakumi/slider/component.rbs +86 -0
- data/sig/hakumi/space/compact/component.rbs +21 -0
- data/sig/hakumi/space/component.rbs +47 -0
- data/sig/hakumi/spin/component.rbs +77 -0
- data/sig/hakumi/splitter/component.rbs +27 -0
- data/sig/hakumi/splitter/panel/component.rbs +36 -0
- data/sig/hakumi/statistic/component.rbs +99 -0
- data/sig/hakumi/steps/component.rbs +82 -0
- data/sig/hakumi/steps/item/component.rbs +29 -0
- data/sig/hakumi/switch/component.rbs +52 -0
- data/sig/hakumi/table/column/component.rbs +57 -0
- data/sig/hakumi/table/column_group/component.rbs +20 -0
- data/sig/hakumi/table/component.rbs +280 -0
- data/sig/hakumi/table/concerns/columns.rbs +94 -0
- data/sig/hakumi/tabs/component.rbs +66 -0
- data/sig/hakumi/tabs/item/component.rbs +29 -0
- data/sig/hakumi/tag/component.rbs +86 -0
- data/sig/hakumi/tag/group/component.rbs +24 -0
- data/sig/hakumi/time_picker/component.rbs +72 -0
- data/sig/hakumi/timeline/component.rbs +61 -0
- data/sig/hakumi/timeline/item/component.rbs +70 -0
- data/sig/hakumi/tooltip/component.rbs +73 -0
- data/sig/hakumi/tour/component.rbs +84 -0
- data/sig/hakumi/transfer/component.rbs +76 -0
- data/sig/hakumi/tree/component.rbs +126 -0
- data/sig/hakumi/tree_select/component.rbs +122 -0
- data/sig/hakumi/typography/base_component.rbs +57 -0
- data/sig/hakumi/typography/link/component.rbs +28 -0
- data/sig/hakumi/typography/paragraph/component.rbs +13 -0
- data/sig/hakumi/typography/text/component.rbs +10 -0
- data/sig/hakumi/typography/title/component.rbs +28 -0
- data/sig/hakumi/upload/component.rbs +78 -0
- data/sig/hakumi_components/rails/attribute_introspection.rbs +16 -0
- data/sig/hakumi_components/rails/validation_introspection.rbs +18 -0
- data/sig/hakumi_components/rails.rbs +6 -0
- data/sig/hakumi_components.rbs +79 -0
- data/sig/rails.rbs +18 -0
- data/sig/view_component/base.rbs +28 -0
- metadata +1439 -0
|
@@ -0,0 +1,1198 @@
|
|
|
1
|
+
import RegistryController from "../base/registry_controller.js"
|
|
2
|
+
import Sortable from "sortablejs"
|
|
3
|
+
|
|
4
|
+
export default class extends RegistryController {
|
|
5
|
+
|
|
6
|
+
static targets = [
|
|
7
|
+
"row",
|
|
8
|
+
"selectionCheckbox",
|
|
9
|
+
"selectionAll",
|
|
10
|
+
"expandToggle",
|
|
11
|
+
"filterDropdown",
|
|
12
|
+
"filterOption",
|
|
13
|
+
"filterSearch",
|
|
14
|
+
"scrollContainer",
|
|
15
|
+
"dragHandle",
|
|
16
|
+
"scrollBar",
|
|
17
|
+
"scrollBarThumb"
|
|
18
|
+
]
|
|
19
|
+
static values = {
|
|
20
|
+
selectedRowKeys: String,
|
|
21
|
+
selectionType: String,
|
|
22
|
+
preserveSelectedRowKeys: Boolean,
|
|
23
|
+
sortDirections: String,
|
|
24
|
+
filterOnClose: Boolean,
|
|
25
|
+
filterMode: String,
|
|
26
|
+
filterSearch: Boolean,
|
|
27
|
+
editableConfig: Object,
|
|
28
|
+
serverSide: Boolean,
|
|
29
|
+
href: String,
|
|
30
|
+
sortFieldParam: { type: String, default: "sort_field" },
|
|
31
|
+
sortOrderParam: { type: String, default: "sort_order" },
|
|
32
|
+
turboFrame: String,
|
|
33
|
+
rowDrag: { type: Boolean, default: false },
|
|
34
|
+
rowDragHandle: { type: Boolean, default: false },
|
|
35
|
+
columnDrag: { type: Boolean, default: false },
|
|
36
|
+
dataUrl: String,
|
|
37
|
+
columnsConfig: String,
|
|
38
|
+
pageSize: { type: Number, default: 10 }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
setup() {
|
|
42
|
+
this._selectedRowKeys = new Set(this.#parseJson(this.selectedRowKeysValue, []))
|
|
43
|
+
this._selectionType = this.selectionTypeValue || "checkbox"
|
|
44
|
+
this._sortDirections = (this.sortDirectionsValue || "ascend,descend").split(",")
|
|
45
|
+
this._filters = new Map()
|
|
46
|
+
this._sorter = null
|
|
47
|
+
this._expandedRowKeys = new Set(this.#expandedRowKeysFromDom())
|
|
48
|
+
this._shouldCellUpdateHooks = new Map()
|
|
49
|
+
this._rowSortable = null
|
|
50
|
+
this._columnSortable = null
|
|
51
|
+
this._pagination = { current: 1, pageSize: this.pageSizeValue || 10, total: 0 }
|
|
52
|
+
this._columnsConfig = this.#parseJson(this.columnsConfigValue, [])
|
|
53
|
+
this.#syncSelection()
|
|
54
|
+
this.#syncDefaultFilters()
|
|
55
|
+
this.#syncDefaultSorter()
|
|
56
|
+
this.#syncExpandedRows()
|
|
57
|
+
this.#setupScrollSync()
|
|
58
|
+
this.#setupDragSorting()
|
|
59
|
+
this.#setupDataLoading()
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
registerApi() {
|
|
63
|
+
const api = {
|
|
64
|
+
getSelectedRowKeys: () => this.getSelectedRowKeys(),
|
|
65
|
+
setSelectedRowKeys: (keys) => this.setSelectedRowKeys(keys),
|
|
66
|
+
clearSelection: () => this.clearSelection(),
|
|
67
|
+
selectAll: () => this.selectAll(),
|
|
68
|
+
invertSelection: () => this.invertSelection(),
|
|
69
|
+
getSorter: () => this.getSorter(),
|
|
70
|
+
setSorter: (sorter) => this.setSorter(sorter),
|
|
71
|
+
clearSorter: () => this.clearSorter(),
|
|
72
|
+
getFilters: () => this.getFilters(),
|
|
73
|
+
setFilters: (filters) => this.setFilters(filters),
|
|
74
|
+
clearFilters: (options = {}) => this.clearFilters(options),
|
|
75
|
+
getExpandedRowKeys: () => this.getExpandedRowKeys(),
|
|
76
|
+
setExpandedRowKeys: (keys) => this.setExpandedRowKeys(keys),
|
|
77
|
+
toggleRowExpansion: (key) => this.toggleRowExpansion(key),
|
|
78
|
+
registerShouldCellUpdate: (name, fn) => this.registerShouldCellUpdate(name, fn),
|
|
79
|
+
unregisterShouldCellUpdate: (name) => this.unregisterShouldCellUpdate(name),
|
|
80
|
+
getRowOrder: () => this.getRowOrder(),
|
|
81
|
+
getColumnOrder: () => this.getColumnOrder(),
|
|
82
|
+
loadData: (options = {}) => this.loadData(options),
|
|
83
|
+
setPage: (page) => this.setPage(page),
|
|
84
|
+
setPageSize: (size) => this.setPageSize(size),
|
|
85
|
+
getPagination: () => this.getPagination(),
|
|
86
|
+
refresh: () => this.refresh()
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
this.element.hakumiComponent = {
|
|
90
|
+
name: "table",
|
|
91
|
+
version: 1,
|
|
92
|
+
singleton: false,
|
|
93
|
+
api
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
this.#exposeApi(api)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
disconnect() {
|
|
100
|
+
this.#teardownScrollSync()
|
|
101
|
+
|
|
102
|
+
// Clean up sortable instances
|
|
103
|
+
if (this._rowSortable) {
|
|
104
|
+
this._rowSortable.destroy()
|
|
105
|
+
this._rowSortable = null
|
|
106
|
+
}
|
|
107
|
+
if (this._columnSortable) {
|
|
108
|
+
this._columnSortable.destroy()
|
|
109
|
+
this._columnSortable = null
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
delete this.element.hakumiTable
|
|
113
|
+
super.disconnect()
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
toggleAll(event) {
|
|
117
|
+
if (this._selectionType !== "checkbox") return
|
|
118
|
+
const checked = event.target.checked
|
|
119
|
+
const keys = this.#rowKeys()
|
|
120
|
+
if (checked) {
|
|
121
|
+
keys.forEach((key) => this._selectedRowKeys.add(key))
|
|
122
|
+
} else if (!this.preserveSelectedRowKeysValue) {
|
|
123
|
+
this._selectedRowKeys.clear()
|
|
124
|
+
}
|
|
125
|
+
this.#syncSelection()
|
|
126
|
+
this.#dispatchSelectionChange()
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
toggleRow(event) {
|
|
130
|
+
const key = event.target.dataset.rowKey
|
|
131
|
+
if (!key) return
|
|
132
|
+
|
|
133
|
+
if (this._selectionType === "radio") {
|
|
134
|
+
this._selectedRowKeys.clear()
|
|
135
|
+
if (event.target.checked) this._selectedRowKeys.add(key)
|
|
136
|
+
} else {
|
|
137
|
+
if (event.target.checked) {
|
|
138
|
+
this._selectedRowKeys.add(key)
|
|
139
|
+
} else if (!this.preserveSelectedRowKeysValue) {
|
|
140
|
+
this._selectedRowKeys.delete(key)
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
this.#syncSelection()
|
|
144
|
+
this.#dispatchSelectionChange()
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
toggleExpand(event) {
|
|
148
|
+
event.preventDefault()
|
|
149
|
+
const key = event.currentTarget.dataset.rowKey
|
|
150
|
+
if (!key) return
|
|
151
|
+
this.toggleRowExpansion(key)
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
toggleSort(event) {
|
|
155
|
+
const th = event.currentTarget
|
|
156
|
+
if (!th.dataset.sortable || th.dataset.sortable === "false") return
|
|
157
|
+
if (event.target.closest(".hakumi-table-filter")) return
|
|
158
|
+
const key = th.dataset.columnKey
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
const currentOrder = (this._sorter?.field === key || this._sorter?.key === key)
|
|
162
|
+
? this._sorter.order
|
|
163
|
+
: null
|
|
164
|
+
const nextOrder = this.#nextSortOrder(currentOrder)
|
|
165
|
+
|
|
166
|
+
this.setSorter({ key, order: nextOrder })
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
toggleFilter(event) {
|
|
170
|
+
event.preventDefault()
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
applyFilters(event) {
|
|
174
|
+
const input = event.target
|
|
175
|
+
const dropdown = input.closest(".hakumi-table-filter-dropdown")
|
|
176
|
+
if (!dropdown) return
|
|
177
|
+
const key = dropdown.dataset.columnKey
|
|
178
|
+
const multiple = dropdown.dataset.filterMultiple === "true"
|
|
179
|
+
const selectedValues = Array.from(dropdown.querySelectorAll("input:checked")).map((el) => el.value)
|
|
180
|
+
|
|
181
|
+
if (!multiple && selectedValues.length > 1) {
|
|
182
|
+
const last = selectedValues[selectedValues.length - 1]
|
|
183
|
+
dropdown.querySelectorAll("input").forEach((el) => {
|
|
184
|
+
el.checked = el.value === last
|
|
185
|
+
})
|
|
186
|
+
this._filters.set(key, [last])
|
|
187
|
+
} else {
|
|
188
|
+
this._filters.set(key, selectedValues)
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (this.filterOnCloseValue) {
|
|
192
|
+
this.#applyFiltersToRows()
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
confirmFilters(event) {
|
|
197
|
+
event.preventDefault()
|
|
198
|
+
this.#applyFiltersToRows()
|
|
199
|
+
event.currentTarget.closest("details")?.removeAttribute("open")
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
clearFilters(eventOrOptions = {}) {
|
|
203
|
+
const options = eventOrOptions?.preventDefault ? { closeDropdown: true, confirm: true } : eventOrOptions
|
|
204
|
+
if (eventOrOptions?.preventDefault) eventOrOptions.preventDefault()
|
|
205
|
+
const { closeDropdown = true, confirm = true } = options
|
|
206
|
+
|
|
207
|
+
this._filters.clear()
|
|
208
|
+
this.filterOptionTargets.forEach((input) => {
|
|
209
|
+
input.checked = false
|
|
210
|
+
})
|
|
211
|
+
if (confirm) this.#applyFiltersToRows()
|
|
212
|
+
if (closeDropdown) {
|
|
213
|
+
this.element.querySelectorAll("details[open]").forEach((detail) => detail.removeAttribute("open"))
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
filterSearch(event) {
|
|
218
|
+
const input = event.target
|
|
219
|
+
const query = input.value.toLowerCase()
|
|
220
|
+
const options = input.closest(".hakumi-table-filter-dropdown")?.querySelectorAll(".hakumi-table-filter-option") || []
|
|
221
|
+
options.forEach((option) => {
|
|
222
|
+
const text = option.textContent.toLowerCase()
|
|
223
|
+
option.style.display = text.includes(query) ? "" : "none"
|
|
224
|
+
})
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
getSelectedRowKeys() {
|
|
228
|
+
return Array.from(this._selectedRowKeys)
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
setSelectedRowKeys(keys) {
|
|
232
|
+
this._selectedRowKeys = new Set(Array(keys).map(String))
|
|
233
|
+
this.#syncSelection()
|
|
234
|
+
this.#dispatchSelectionChange()
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
clearSelection() {
|
|
238
|
+
this._selectedRowKeys.clear()
|
|
239
|
+
this.#syncSelection()
|
|
240
|
+
this.#dispatchSelectionChange()
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
selectAll() {
|
|
244
|
+
this.#rowKeys().forEach((key) => this._selectedRowKeys.add(key))
|
|
245
|
+
this.#syncSelection()
|
|
246
|
+
this.#dispatchSelectionChange()
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
invertSelection() {
|
|
250
|
+
const keys = this.#rowKeys()
|
|
251
|
+
const next = new Set()
|
|
252
|
+
keys.forEach((key) => {
|
|
253
|
+
if (!this._selectedRowKeys.has(key)) next.add(key)
|
|
254
|
+
})
|
|
255
|
+
this._selectedRowKeys = next
|
|
256
|
+
this.#syncSelection()
|
|
257
|
+
this.#dispatchSelectionChange()
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
getSorter() {
|
|
261
|
+
return this._sorter
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
setSorter(sorter) {
|
|
265
|
+
if (!sorter || !sorter.key || !sorter.order) {
|
|
266
|
+
this.clearSorter()
|
|
267
|
+
return
|
|
268
|
+
}
|
|
269
|
+
this._sorter = { field: sorter.key, order: sorter.order }
|
|
270
|
+
this.#applySorterToHeaders()
|
|
271
|
+
|
|
272
|
+
if (this.hasDataUrlValue) {
|
|
273
|
+
this._pagination.current = 1
|
|
274
|
+
this.loadData()
|
|
275
|
+
} else if (this.#isServerSide()) {
|
|
276
|
+
this.#navigateWithSort()
|
|
277
|
+
} else {
|
|
278
|
+
this.#sortRows()
|
|
279
|
+
}
|
|
280
|
+
this.#dispatchChange()
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
clearSorter() {
|
|
284
|
+
this._sorter = null
|
|
285
|
+
this.#applySorterToHeaders()
|
|
286
|
+
|
|
287
|
+
if (this.hasDataUrlValue) {
|
|
288
|
+
this._pagination.current = 1
|
|
289
|
+
this.loadData()
|
|
290
|
+
} else if (this.#isServerSide()) {
|
|
291
|
+
this.#navigateWithSort()
|
|
292
|
+
}
|
|
293
|
+
this.#dispatchChange()
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
getFilters() {
|
|
297
|
+
return Object.fromEntries(this._filters.entries())
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
setFilters(filters = {}) {
|
|
301
|
+
this._filters = new Map(Object.entries(filters).map(([key, values]) => [key, Array(values)]))
|
|
302
|
+
this.#syncFilterInputs()
|
|
303
|
+
this.#applyFiltersToRows()
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
getExpandedRowKeys() {
|
|
307
|
+
return Array.from(this._expandedRowKeys)
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
setExpandedRowKeys(keys) {
|
|
311
|
+
this._expandedRowKeys = new Set(Array(keys).map(String))
|
|
312
|
+
this.#syncExpandedRows()
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
toggleRowExpansion(key) {
|
|
316
|
+
const stringKey = String(key)
|
|
317
|
+
if (this._expandedRowKeys.has(stringKey)) {
|
|
318
|
+
this._expandedRowKeys.delete(stringKey)
|
|
319
|
+
} else {
|
|
320
|
+
this._expandedRowKeys.add(stringKey)
|
|
321
|
+
}
|
|
322
|
+
this.#syncExpandedRows()
|
|
323
|
+
this.#dispatchChange()
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
registerShouldCellUpdate(name, fn) {
|
|
327
|
+
if (typeof fn !== "function") {
|
|
328
|
+
console.warn(`[Hakumi Table] registerShouldCellUpdate: "${name}" must be a function`)
|
|
329
|
+
return
|
|
330
|
+
}
|
|
331
|
+
this._shouldCellUpdateHooks.set(name, fn)
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
unregisterShouldCellUpdate(name) {
|
|
335
|
+
this._shouldCellUpdateHooks.delete(name)
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
getRowOrder() {
|
|
339
|
+
const rows = this.rowTargets.filter(row => row.dataset.rowType === "data")
|
|
340
|
+
return rows.map(row => row.dataset.rowKey)
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
getColumnOrder() {
|
|
344
|
+
const headerRow = this.element.querySelector(".hakumi-table-header-row")
|
|
345
|
+
if (!headerRow) return []
|
|
346
|
+
const ths = headerRow.querySelectorAll("th[data-column-key]")
|
|
347
|
+
return Array.from(ths).map(th => th.dataset.columnKey)
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
async loadData(options = {}) {
|
|
351
|
+
if (!this.hasDataUrlValue) return null
|
|
352
|
+
|
|
353
|
+
const page = options.page ?? this._pagination.current
|
|
354
|
+
const pageSize = options.pageSize ?? this._pagination.pageSize
|
|
355
|
+
const sorter = options.sorter ?? this._sorter
|
|
356
|
+
|
|
357
|
+
const params = new URLSearchParams()
|
|
358
|
+
params.set("page", page)
|
|
359
|
+
params.set("per_page", pageSize)
|
|
360
|
+
if (sorter?.field) {
|
|
361
|
+
params.set("sort_field", sorter.field)
|
|
362
|
+
params.set("sort_order", sorter.order || "ascend")
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
const fullUrl = `${this.dataUrlValue}?${params.toString()}`
|
|
366
|
+
|
|
367
|
+
this.element.classList.add("hakumi-table-loading")
|
|
368
|
+
|
|
369
|
+
try {
|
|
370
|
+
const response = await fetch(fullUrl, {
|
|
371
|
+
headers: { "Accept": "application/json" }
|
|
372
|
+
})
|
|
373
|
+
|
|
374
|
+
if (!response.ok) throw new Error(`HTTP ${response.status}`)
|
|
375
|
+
|
|
376
|
+
const json = await response.json()
|
|
377
|
+
|
|
378
|
+
this._pagination = {
|
|
379
|
+
current: json.pagination.current,
|
|
380
|
+
pageSize: json.pagination.pageSize,
|
|
381
|
+
total: json.pagination.total
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
if (json.sorter) {
|
|
385
|
+
this._sorter = json.sorter
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
this.#renderRows(json.data)
|
|
389
|
+
this.#updatePagination()
|
|
390
|
+
this.#dispatchLoadComplete(json)
|
|
391
|
+
return json
|
|
392
|
+
} catch (error) {
|
|
393
|
+
this.#dispatchLoadError(error)
|
|
394
|
+
throw error
|
|
395
|
+
} finally {
|
|
396
|
+
this.element.classList.remove("hakumi-table-loading")
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
setPage(page) {
|
|
401
|
+
if (page < 1) return
|
|
402
|
+
this._pagination.current = page
|
|
403
|
+
return this.loadData({ page })
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
setPageSize(size) {
|
|
407
|
+
this._pagination.pageSize = size
|
|
408
|
+
this._pagination.current = 1
|
|
409
|
+
return this.loadData({ page: 1, pageSize: size })
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
getPagination() {
|
|
413
|
+
return { ...this._pagination }
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
refresh() {
|
|
417
|
+
return this.loadData()
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
#renderRows(data) {
|
|
421
|
+
const tbody = this.element.querySelector("tbody")
|
|
422
|
+
if (!tbody) return
|
|
423
|
+
|
|
424
|
+
const columns = this.#getColumnConfig()
|
|
425
|
+
const rows = data.map((record, index) => this.#buildRow(record, index, columns))
|
|
426
|
+
|
|
427
|
+
tbody.innerHTML = rows.join("")
|
|
428
|
+
this.#syncSelection()
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
#getColumnConfig() {
|
|
432
|
+
const headerRow = this.element.querySelector(".hakumi-table-header-row")
|
|
433
|
+
if (!headerRow) return []
|
|
434
|
+
|
|
435
|
+
return Array.from(headerRow.querySelectorAll("th[data-column-key]")).map(th => ({
|
|
436
|
+
key: th.dataset.columnKey,
|
|
437
|
+
dataIndex: th.dataset.field || th.dataset.columnKey,
|
|
438
|
+
sortValue: th.dataset.sortField
|
|
439
|
+
}))
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
#buildRow(record, index, columns) {
|
|
443
|
+
const rowKey = record.key || record.id || index
|
|
444
|
+
const cells = columns.map(col => {
|
|
445
|
+
const displayValue = record[col.dataIndex] ?? ""
|
|
446
|
+
const sortValue = col.sortValue ? (record[col.sortValue] ?? displayValue) : displayValue
|
|
447
|
+
return `<td class="hakumi-table-cell" data-column-key="${col.key}" data-sort-value="${this.#escapeHtml(sortValue)}">${this.#escapeHtml(displayValue)}</td>`
|
|
448
|
+
}).join("")
|
|
449
|
+
|
|
450
|
+
return `<tr class="hakumi-table-row" data-row-key="${rowKey}" data-row-type="data" data-hakumi--table-target="row">${cells}</tr>`
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
#escapeHtml(text) {
|
|
454
|
+
const div = document.createElement("div")
|
|
455
|
+
div.textContent = String(text)
|
|
456
|
+
return div.innerHTML
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
#dispatchLoadComplete(json) {
|
|
460
|
+
this.dispatch("loadComplete", { detail: json })
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
#dispatchLoadError(error) {
|
|
464
|
+
this.dispatch("loadError", { detail: { error } })
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
#setupDataLoading() {
|
|
468
|
+
if (!this.hasDataUrlValue) return
|
|
469
|
+
this.#syncPaginationFromComponent()
|
|
470
|
+
this.#bindPaginationEvents()
|
|
471
|
+
this.loadData()
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
#syncPaginationFromComponent() {
|
|
475
|
+
const paginationEl = this.element.querySelector(".hakumi-table-pagination .hakumi-pagination")
|
|
476
|
+
if (!paginationEl) return
|
|
477
|
+
|
|
478
|
+
const controller = this.application.getControllerForElementAndIdentifier(paginationEl, "hakumi--pagination")
|
|
479
|
+
if (controller) {
|
|
480
|
+
this._pagination.pageSize = controller.pageSizeValue || this._pagination.pageSize
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
#getPaginationComponent() {
|
|
485
|
+
const paginationEl = this.element.querySelector(".hakumi-table-pagination .hakumi-pagination")
|
|
486
|
+
return paginationEl?.hakumiPagination || paginationEl?.hakumiComponent?.api
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
#updatePagination() {
|
|
490
|
+
const paginationEl = this.element.querySelector(".hakumi-table-pagination .hakumi-pagination")
|
|
491
|
+
if (!paginationEl) return
|
|
492
|
+
|
|
493
|
+
const controller = this.application.getControllerForElementAndIdentifier(paginationEl, "hakumi--pagination")
|
|
494
|
+
if (!controller) return
|
|
495
|
+
|
|
496
|
+
const { current, pageSize, total } = this._pagination
|
|
497
|
+
|
|
498
|
+
controller.totalValue = total
|
|
499
|
+
controller.pageSizeValue = pageSize
|
|
500
|
+
controller.currentValue = current
|
|
501
|
+
controller.refresh()
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
#bindPaginationEvents() {
|
|
505
|
+
const container = this.element.querySelector(".hakumi-table-pagination")
|
|
506
|
+
if (!container || container._paginationBound) return
|
|
507
|
+
container._paginationBound = true
|
|
508
|
+
|
|
509
|
+
container.addEventListener("hakumi--pagination:change", (e) => {
|
|
510
|
+
e.stopPropagation()
|
|
511
|
+
const page = e.detail.current
|
|
512
|
+
if (page !== this._pagination.current) {
|
|
513
|
+
this._pagination.current = page
|
|
514
|
+
this.loadData()
|
|
515
|
+
}
|
|
516
|
+
})
|
|
517
|
+
|
|
518
|
+
container.addEventListener("hakumi--pagination:sizeChange", (e) => {
|
|
519
|
+
e.stopPropagation()
|
|
520
|
+
const size = e.detail.pageSize
|
|
521
|
+
if (size !== this._pagination.pageSize) {
|
|
522
|
+
this._pagination.pageSize = size
|
|
523
|
+
this._pagination.current = 1
|
|
524
|
+
this.loadData()
|
|
525
|
+
}
|
|
526
|
+
})
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
editCell(event) {
|
|
530
|
+
const cell = event.currentTarget
|
|
531
|
+
if (cell.querySelector(".hakumi-table-cell-editor")) return
|
|
532
|
+
|
|
533
|
+
const tableConfig = this.editableConfigValue || {}
|
|
534
|
+
const mode = tableConfig.mode || "cell"
|
|
535
|
+
|
|
536
|
+
if (mode === "row") {
|
|
537
|
+
this.#editRow(cell)
|
|
538
|
+
} else {
|
|
539
|
+
this.#editSingleCell(cell)
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
#editSingleCell(cell) {
|
|
544
|
+
const { input, editor, originalContent, originalValue, config } = this.#createCellEditor(cell)
|
|
545
|
+
input.focus()
|
|
546
|
+
|
|
547
|
+
const rowElement = cell.closest("tr")
|
|
548
|
+
const rowKey = rowElement?.dataset.rowKey
|
|
549
|
+
const columnKey = config.key || cell.dataset.columnKey
|
|
550
|
+
const dataIndex = config.data_index
|
|
551
|
+
|
|
552
|
+
const save = () => {
|
|
553
|
+
if (!editor.isConnected) return
|
|
554
|
+
|
|
555
|
+
const newValue = input.value
|
|
556
|
+
const detail = { rowKey, columnKey, dataIndex, value: newValue, originalValue }
|
|
557
|
+
|
|
558
|
+
if (!this.#shouldUpdateCell(cell, detail)) {
|
|
559
|
+
if (originalContent) originalContent.style.display = ""
|
|
560
|
+
editor.remove()
|
|
561
|
+
return
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
if (originalContent) {
|
|
565
|
+
originalContent.textContent = newValue
|
|
566
|
+
originalContent.style.display = ""
|
|
567
|
+
}
|
|
568
|
+
cell.dataset.value = newValue
|
|
569
|
+
editor.remove()
|
|
570
|
+
|
|
571
|
+
this.#dispatchEdit(detail)
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
const cancel = () => {
|
|
575
|
+
if (!editor.isConnected) return
|
|
576
|
+
if (originalContent) originalContent.style.display = ""
|
|
577
|
+
editor.remove()
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
input.addEventListener("blur", save)
|
|
581
|
+
|
|
582
|
+
input.addEventListener("keydown", (e) => {
|
|
583
|
+
if (e.key === "Enter") {
|
|
584
|
+
e.preventDefault()
|
|
585
|
+
input.blur()
|
|
586
|
+
} else if (e.key === "Escape") {
|
|
587
|
+
e.preventDefault()
|
|
588
|
+
input.removeEventListener("blur", save)
|
|
589
|
+
cancel()
|
|
590
|
+
}
|
|
591
|
+
})
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
#editRow(clickedCell) {
|
|
595
|
+
const row = clickedCell.closest("tr")
|
|
596
|
+
if (!row || row.classList.contains("hakumi-table-row-editing")) return
|
|
597
|
+
|
|
598
|
+
row.classList.add("hakumi-table-row-editing")
|
|
599
|
+
const rowKey = row.dataset.rowKey
|
|
600
|
+
const editableCells = row.querySelectorAll("td[data-editable='true']")
|
|
601
|
+
const editors = []
|
|
602
|
+
|
|
603
|
+
editableCells.forEach((cell) => {
|
|
604
|
+
const { input, originalContent, originalValue, config } = this.#createCellEditor(cell)
|
|
605
|
+
input.dataset.columnKey = config.key || cell.dataset.columnKey
|
|
606
|
+
input.dataset.dataIndex = config.data_index
|
|
607
|
+
input.dataset.originalValue = originalValue
|
|
608
|
+
|
|
609
|
+
editors.push({ cell, input, originalContent, originalValue, config })
|
|
610
|
+
})
|
|
611
|
+
|
|
612
|
+
const clickedInput = clickedCell.querySelector(".hakumi-table-cell-input")
|
|
613
|
+
if (clickedInput) {
|
|
614
|
+
clickedInput.focus()
|
|
615
|
+
} else if (editors.length > 0) {
|
|
616
|
+
editors[0].input.focus()
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
const saveRow = () => {
|
|
620
|
+
const changes = []
|
|
621
|
+
let allValid = true
|
|
622
|
+
|
|
623
|
+
editors.forEach(({ cell, input, originalContent, originalValue, config }) => {
|
|
624
|
+
const newValue = input.value
|
|
625
|
+
const columnKey = config.key || cell.dataset.columnKey
|
|
626
|
+
const dataIndex = config.data_index
|
|
627
|
+
const detail = { rowKey, columnKey, dataIndex, value: newValue, originalValue }
|
|
628
|
+
|
|
629
|
+
if (!this.#shouldUpdateCell(cell, detail)) {
|
|
630
|
+
allValid = false
|
|
631
|
+
return
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
changes.push({ cell, originalContent, newValue, detail })
|
|
635
|
+
})
|
|
636
|
+
|
|
637
|
+
if (!allValid) {
|
|
638
|
+
cancelRow()
|
|
639
|
+
return
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
changes.forEach(({ cell, originalContent, newValue }) => {
|
|
643
|
+
if (originalContent) {
|
|
644
|
+
originalContent.textContent = newValue
|
|
645
|
+
originalContent.style.display = ""
|
|
646
|
+
}
|
|
647
|
+
cell.dataset.value = newValue
|
|
648
|
+
cell.querySelector(".hakumi-table-cell-editor")?.remove()
|
|
649
|
+
})
|
|
650
|
+
|
|
651
|
+
row.classList.remove("hakumi-table-row-editing")
|
|
652
|
+
|
|
653
|
+
this.#dispatchRowEdit({
|
|
654
|
+
rowKey,
|
|
655
|
+
changes: changes.map(({ detail }) => detail)
|
|
656
|
+
})
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
const cancelRow = () => {
|
|
660
|
+
editors.forEach(({ cell, originalContent }) => {
|
|
661
|
+
if (originalContent) originalContent.style.display = ""
|
|
662
|
+
cell.querySelector(".hakumi-table-cell-editor")?.remove()
|
|
663
|
+
})
|
|
664
|
+
row.classList.remove("hakumi-table-row-editing")
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
editors.forEach(({ input }) => {
|
|
668
|
+
input.addEventListener("keydown", (e) => {
|
|
669
|
+
if (e.key === "Enter") {
|
|
670
|
+
e.preventDefault()
|
|
671
|
+
saveRow()
|
|
672
|
+
} else if (e.key === "Escape") {
|
|
673
|
+
e.preventDefault()
|
|
674
|
+
cancelRow()
|
|
675
|
+
}
|
|
676
|
+
})
|
|
677
|
+
})
|
|
678
|
+
|
|
679
|
+
this.element.dispatchEvent(
|
|
680
|
+
new CustomEvent("hakumi:table:row-editing", {
|
|
681
|
+
bubbles: true,
|
|
682
|
+
detail: { rowKey, save: saveRow, cancel: cancelRow }
|
|
683
|
+
})
|
|
684
|
+
)
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
#dispatchEdit(detail) {
|
|
688
|
+
this.element.dispatchEvent(
|
|
689
|
+
new CustomEvent("hakumi:table:edit", {
|
|
690
|
+
bubbles: true,
|
|
691
|
+
detail
|
|
692
|
+
})
|
|
693
|
+
)
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
#dispatchRowEdit(detail) {
|
|
697
|
+
const params = this.#changesToParams(detail.changes)
|
|
698
|
+
|
|
699
|
+
this.element.dispatchEvent(
|
|
700
|
+
new CustomEvent("hakumi:table:row-edit", {
|
|
701
|
+
bubbles: true,
|
|
702
|
+
detail: {
|
|
703
|
+
...detail,
|
|
704
|
+
params
|
|
705
|
+
}
|
|
706
|
+
})
|
|
707
|
+
)
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
#changesToParams(changes) {
|
|
711
|
+
const params = {}
|
|
712
|
+
if (!changes || !Array.isArray(changes)) return params
|
|
713
|
+
|
|
714
|
+
changes.forEach(({ columnKey, dataIndex, value }) => {
|
|
715
|
+
const key = dataIndex || columnKey
|
|
716
|
+
if (key) {
|
|
717
|
+
params[key] = value
|
|
718
|
+
}
|
|
719
|
+
})
|
|
720
|
+
return params
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
#shouldUpdateCell(cell, detail) {
|
|
724
|
+
const hookName = cell?.dataset.shouldCellUpdate
|
|
725
|
+
if (!hookName) return true
|
|
726
|
+
|
|
727
|
+
const hook = this.#resolveHook(hookName)
|
|
728
|
+
if (typeof hook !== "function") {
|
|
729
|
+
console.warn(`[Hakumi Table] shouldCellUpdate hook "${hookName}" is not a function`)
|
|
730
|
+
return true
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
try {
|
|
734
|
+
const result = hook(detail)
|
|
735
|
+
if (result === false) return false
|
|
736
|
+
|
|
737
|
+
if (typeof result === "string") {
|
|
738
|
+
this.element.dispatchEvent(
|
|
739
|
+
new CustomEvent("hakumi:table:cell-update-prevented", {
|
|
740
|
+
bubbles: true,
|
|
741
|
+
detail: {
|
|
742
|
+
...detail,
|
|
743
|
+
reason: result
|
|
744
|
+
}
|
|
745
|
+
})
|
|
746
|
+
)
|
|
747
|
+
return false
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
return true
|
|
751
|
+
} catch (error) {
|
|
752
|
+
console.error(`[Hakumi Table] shouldCellUpdate hook "${hookName}" failed`, error)
|
|
753
|
+
return true
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
#resolveHook(name) {
|
|
758
|
+
if (!name) return null
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
if (this._shouldCellUpdateHooks.has(name)) {
|
|
762
|
+
return this._shouldCellUpdateHooks.get(name)
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
if (typeof window === "undefined") return null
|
|
767
|
+
|
|
768
|
+
if (window.HakumiTableShouldCellUpdate && typeof window.HakumiTableShouldCellUpdate[name] === "function") {
|
|
769
|
+
return window.HakumiTableShouldCellUpdate[name]
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
return name.split(".").reduce((acc, key) => (acc ? acc[key] : undefined), window)
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
#exposeApi(api) {
|
|
776
|
+
this.element.hakumiTable = api
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
#isServerSide() {
|
|
780
|
+
return this.serverSideValue || this.hasHrefValue
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
#navigateWithSort() {
|
|
784
|
+
if (!this.hasHrefValue) return
|
|
785
|
+
|
|
786
|
+
const url = new URL(this.hrefValue, window.location.origin)
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
const currentUrl = new URL(window.location.href)
|
|
790
|
+
currentUrl.searchParams.forEach((value, key) => {
|
|
791
|
+
if (!url.searchParams.has(key)) {
|
|
792
|
+
url.searchParams.set(key, value)
|
|
793
|
+
}
|
|
794
|
+
})
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
if (this._sorter && this._sorter.key && this._sorter.order) {
|
|
798
|
+
url.searchParams.set(this.sortFieldParamValue, this._sorter.key)
|
|
799
|
+
url.searchParams.set(this.sortOrderParamValue, this._sorter.order)
|
|
800
|
+
} else {
|
|
801
|
+
url.searchParams.delete(this.sortFieldParamValue)
|
|
802
|
+
url.searchParams.delete(this.sortOrderParamValue)
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
|
|
806
|
+
url.searchParams.set("page", "1")
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
if (this.hasTurboFrameValue && this.turboFrameValue) {
|
|
810
|
+
const frame = document.getElementById(this.turboFrameValue)
|
|
811
|
+
if (frame) {
|
|
812
|
+
frame.src = url.toString()
|
|
813
|
+
return
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
if (window.Turbo) {
|
|
819
|
+
window.Turbo.visit(url.toString())
|
|
820
|
+
} else {
|
|
821
|
+
window.location.href = url.toString()
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
#createCellEditor(cell) {
|
|
826
|
+
const config = this.#parseJson(cell.dataset.editableConfig, {})
|
|
827
|
+
const originalContent = cell.querySelector(".hakumi-table-cell-content")
|
|
828
|
+
const originalValue = cell.dataset.value ?? (originalContent?.textContent?.trim() || "")
|
|
829
|
+
|
|
830
|
+
const editor = document.createElement("div")
|
|
831
|
+
editor.className = "hakumi-table-cell-editor"
|
|
832
|
+
|
|
833
|
+
const input = document.createElement("input")
|
|
834
|
+
input.type = config.input_type || "text"
|
|
835
|
+
input.value = originalValue
|
|
836
|
+
input.className = "hakumi-table-cell-input"
|
|
837
|
+
|
|
838
|
+
editor.appendChild(input)
|
|
839
|
+
|
|
840
|
+
if (originalContent) originalContent.style.display = "none"
|
|
841
|
+
cell.appendChild(editor)
|
|
842
|
+
|
|
843
|
+
return { input, editor, originalContent, originalValue, config }
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
#syncSelection() {
|
|
847
|
+
const keys = this._selectedRowKeys
|
|
848
|
+
this.selectionCheckboxTargets.forEach((input) => {
|
|
849
|
+
const key = String(input.dataset.rowKey)
|
|
850
|
+
input.checked = keys.has(key)
|
|
851
|
+
const row = input.closest("tr")
|
|
852
|
+
if (row) row.classList.toggle("hakumi-table-row-selected", input.checked)
|
|
853
|
+
})
|
|
854
|
+
|
|
855
|
+
this.selectionAllTargets.forEach((input) => {
|
|
856
|
+
const total = this.#rowKeys().length
|
|
857
|
+
const selected = keys.size
|
|
858
|
+
input.checked = total > 0 && selected === total
|
|
859
|
+
input.indeterminate = selected > 0 && selected < total
|
|
860
|
+
})
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
#rowKeys() {
|
|
864
|
+
return this.rowTargets
|
|
865
|
+
.filter((row) => row.dataset.rowType === "data")
|
|
866
|
+
.map((row) => String(row.dataset.rowKey))
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
#expandedRowKeysFromDom() {
|
|
870
|
+
const expandedRows = this.element.querySelectorAll("tr[data-row-type='expanded'].is-expanded")
|
|
871
|
+
return Array.from(expandedRows).map((row) => String(row.dataset.rowKey))
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
#applySorterToHeaders() {
|
|
875
|
+
const ths = this.element.querySelectorAll("th[data-column-key]")
|
|
876
|
+
const sorterKey = this._sorter?.field || this._sorter?.key
|
|
877
|
+
ths.forEach((th) => {
|
|
878
|
+
if (sorterKey && th.dataset.columnKey === String(sorterKey)) {
|
|
879
|
+
th.dataset.sortOrder = this._sorter.order
|
|
880
|
+
th.classList.add("hakumi-table-header-sorted")
|
|
881
|
+
} else {
|
|
882
|
+
delete th.dataset.sortOrder
|
|
883
|
+
th.classList.remove("hakumi-table-header-sorted")
|
|
884
|
+
}
|
|
885
|
+
})
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
#sortRows() {
|
|
889
|
+
if (!this._sorter || !this._sorter.order) return
|
|
890
|
+
const tbody = this.element.querySelector("tbody")
|
|
891
|
+
if (!tbody) return
|
|
892
|
+
|
|
893
|
+
const sorterKey = this._sorter.field || this._sorter.key
|
|
894
|
+
const rows = this.rowTargets.filter((row) => row.dataset.rowType === "data")
|
|
895
|
+
const compare = (a, b) => {
|
|
896
|
+
const aValue = this.#cellValue(a, sorterKey)
|
|
897
|
+
const bValue = this.#cellValue(b, sorterKey)
|
|
898
|
+
if (aValue === bValue) return 0
|
|
899
|
+
if (this._sorter.order === "ascend") {
|
|
900
|
+
return aValue > bValue ? 1 : -1
|
|
901
|
+
}
|
|
902
|
+
return aValue < bValue ? 1 : -1
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
rows.sort(compare)
|
|
906
|
+
rows.forEach((row) => {
|
|
907
|
+
const expandedRow = tbody.querySelector(`tr[data-row-type='expanded'][data-row-key='${row.dataset.rowKey}']`)
|
|
908
|
+
tbody.appendChild(row)
|
|
909
|
+
if (expandedRow) tbody.appendChild(expandedRow)
|
|
910
|
+
})
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
#applyFiltersToRows() {
|
|
914
|
+
const filters = this._filters
|
|
915
|
+
this.rowTargets.forEach((row) => {
|
|
916
|
+
if (row.dataset.rowType !== "data") return
|
|
917
|
+
const match = Array.from(filters.entries()).every(([key, values]) => {
|
|
918
|
+
if (!values || values.length === 0) return true
|
|
919
|
+
const cellValue = this.#cellValue(row, key)
|
|
920
|
+
return values.includes(cellValue)
|
|
921
|
+
})
|
|
922
|
+
row.hidden = !match
|
|
923
|
+
const expandedRow = row.nextElementSibling
|
|
924
|
+
if (expandedRow?.dataset.rowType === "expanded") {
|
|
925
|
+
expandedRow.hidden = !match || !this._expandedRowKeys.has(String(row.dataset.rowKey))
|
|
926
|
+
}
|
|
927
|
+
})
|
|
928
|
+
this.#dispatchChange()
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
#cellValue(row, key) {
|
|
932
|
+
const cell = row.querySelector(`td[data-column-key='${key}']`)
|
|
933
|
+
const raw = cell?.dataset.sortValue || cell?.textContent?.trim() || ""
|
|
934
|
+
const number = Number.parseFloat(raw)
|
|
935
|
+
if (!Number.isNaN(number) && raw !== "") return number
|
|
936
|
+
return raw
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
#syncDefaultFilters() {
|
|
940
|
+
const ths = this.element.querySelectorAll("th[data-default-filter]")
|
|
941
|
+
ths.forEach((th) => {
|
|
942
|
+
const defaultValue = this.#parseJson(th.dataset.defaultFilter, [])
|
|
943
|
+
if (defaultValue.length > 0) this._filters.set(th.dataset.columnKey, defaultValue)
|
|
944
|
+
})
|
|
945
|
+
if (this._filters.size > 0) {
|
|
946
|
+
this.#syncFilterInputs()
|
|
947
|
+
this.#applyFiltersToRows()
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
#syncFilterInputs() {
|
|
952
|
+
this.filterOptionTargets.forEach((input) => {
|
|
953
|
+
const key = input.closest(".hakumi-table-filter-dropdown")?.dataset.columnKey
|
|
954
|
+
const values = this._filters.get(key) || []
|
|
955
|
+
input.checked = values.includes(input.value)
|
|
956
|
+
})
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
#syncDefaultSorter() {
|
|
960
|
+
|
|
961
|
+
const ths = this.element.querySelectorAll("th[data-default-sort]")
|
|
962
|
+
for (const th of ths) {
|
|
963
|
+
const defaultOrder = th.dataset.defaultSort
|
|
964
|
+
if (defaultOrder && defaultOrder !== "") {
|
|
965
|
+
this._sorter = { key: th.dataset.columnKey, order: defaultOrder }
|
|
966
|
+
this.#applySorterToHeaders()
|
|
967
|
+
|
|
968
|
+
if (!this.#isServerSide()) {
|
|
969
|
+
this.#sortRows()
|
|
970
|
+
}
|
|
971
|
+
break
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
#syncExpandedRows() {
|
|
977
|
+
this.rowTargets.forEach((row) => {
|
|
978
|
+
if (row.dataset.rowType !== "data") return
|
|
979
|
+
const key = String(row.dataset.rowKey)
|
|
980
|
+
const expandedRow = row.nextElementSibling
|
|
981
|
+
if (!expandedRow || expandedRow.dataset.rowType !== "expanded") return
|
|
982
|
+
const expanded = this._expandedRowKeys.has(key)
|
|
983
|
+
|
|
984
|
+
expandedRow.hidden = !expanded
|
|
985
|
+
expandedRow.classList.toggle("is-expanded", expanded)
|
|
986
|
+
|
|
987
|
+
const button = row.querySelector("[data-hakumi--table-target='expandToggle']")
|
|
988
|
+
if (button) {
|
|
989
|
+
button.setAttribute("aria-expanded", expanded)
|
|
990
|
+
button.classList.toggle("is-expanded", expanded)
|
|
991
|
+
}
|
|
992
|
+
})
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
#setupScrollSync() {
|
|
996
|
+
if (!this.hasScrollContainerTarget) return
|
|
997
|
+
|
|
998
|
+
this._scrollHandler ||= () => this.#syncScrollState()
|
|
999
|
+
this.scrollContainerTarget.addEventListener("scroll", this._scrollHandler, { passive: true })
|
|
1000
|
+
|
|
1001
|
+
if (this.hasScrollBarTarget) {
|
|
1002
|
+
this._scrollBarHandler ||= () => this.#syncFromScrollBar()
|
|
1003
|
+
this.scrollBarTarget.addEventListener("scroll", this._scrollBarHandler, { passive: true })
|
|
1004
|
+
this.#updateScrollBarThumb()
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
this.#syncScrollState()
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
#teardownScrollSync() {
|
|
1011
|
+
if (this._scrollHandler && this.hasScrollContainerTarget) {
|
|
1012
|
+
this.scrollContainerTarget.removeEventListener("scroll", this._scrollHandler)
|
|
1013
|
+
}
|
|
1014
|
+
if (this._scrollBarHandler && this.hasScrollBarTarget) {
|
|
1015
|
+
this.scrollBarTarget.removeEventListener("scroll", this._scrollBarHandler)
|
|
1016
|
+
}
|
|
1017
|
+
this._scrollHandler = null
|
|
1018
|
+
this._scrollBarHandler = null
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
#syncScrollState() {
|
|
1022
|
+
if (!this.hasScrollContainerTarget) return
|
|
1023
|
+
|
|
1024
|
+
const el = this.scrollContainerTarget
|
|
1025
|
+
const maxScrollLeft = el.scrollWidth - el.clientWidth
|
|
1026
|
+
const hasLeft = el.scrollLeft > 0
|
|
1027
|
+
const hasRight = el.scrollLeft < maxScrollLeft - 1
|
|
1028
|
+
|
|
1029
|
+
this.element.classList.toggle("hakumi-table-scroll-left", hasLeft)
|
|
1030
|
+
this.element.classList.toggle("hakumi-table-scroll-right", hasRight)
|
|
1031
|
+
|
|
1032
|
+
if (this.hasScrollBarTarget && !this._syncingFromBar) {
|
|
1033
|
+
this._syncingFromContainer = true
|
|
1034
|
+
this.scrollBarTarget.scrollLeft = el.scrollLeft
|
|
1035
|
+
this._syncingFromContainer = false
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
#syncFromScrollBar() {
|
|
1040
|
+
if (!this.hasScrollContainerTarget || this._syncingFromContainer) return
|
|
1041
|
+
|
|
1042
|
+
this._syncingFromBar = true
|
|
1043
|
+
this.scrollContainerTarget.scrollLeft = this.scrollBarTarget.scrollLeft
|
|
1044
|
+
this._syncingFromBar = false
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
#updateScrollBarThumb() {
|
|
1048
|
+
if (!this.hasScrollBarThumbTarget || !this.hasScrollContainerTarget) return
|
|
1049
|
+
|
|
1050
|
+
const el = this.scrollContainerTarget
|
|
1051
|
+
this.scrollBarThumbTarget.style.width = `${el.scrollWidth}px`
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
#nextSortOrder(currentOrder) {
|
|
1055
|
+
if (!currentOrder) return this._sortDirections[0]
|
|
1056
|
+
const index = this._sortDirections.indexOf(currentOrder)
|
|
1057
|
+
if (index === -1 || index === this._sortDirections.length - 1) return null
|
|
1058
|
+
return this._sortDirections[index + 1]
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
#dispatchSelectionChange() {
|
|
1062
|
+
this.element.dispatchEvent(
|
|
1063
|
+
new CustomEvent("hakumi:table:selection-change", {
|
|
1064
|
+
bubbles: true,
|
|
1065
|
+
detail: { selectedRowKeys: this.getSelectedRowKeys() }
|
|
1066
|
+
})
|
|
1067
|
+
)
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
#dispatchChange() {
|
|
1071
|
+
this.element.dispatchEvent(
|
|
1072
|
+
new CustomEvent("hakumi:table:change", {
|
|
1073
|
+
bubbles: true,
|
|
1074
|
+
detail: {
|
|
1075
|
+
selectedRowKeys: this.getSelectedRowKeys(),
|
|
1076
|
+
sorter: this._sorter,
|
|
1077
|
+
filters: this.getFilters()
|
|
1078
|
+
}
|
|
1079
|
+
})
|
|
1080
|
+
)
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
#parseJson(value, fallback) {
|
|
1084
|
+
try {
|
|
1085
|
+
return JSON.parse(value || "")
|
|
1086
|
+
} catch {
|
|
1087
|
+
return fallback
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
#setupDragSorting() {
|
|
1092
|
+
if (this.rowDragValue) {
|
|
1093
|
+
this.#setupRowDrag()
|
|
1094
|
+
}
|
|
1095
|
+
if (this.columnDragValue) {
|
|
1096
|
+
this.#setupColumnDrag()
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
#setupRowDrag() {
|
|
1101
|
+
const tbody = this.element.querySelector("tbody")
|
|
1102
|
+
if (!tbody) return
|
|
1103
|
+
|
|
1104
|
+
const options = {
|
|
1105
|
+
animation: 150,
|
|
1106
|
+
ghostClass: "hakumi-table-row-ghost",
|
|
1107
|
+
chosenClass: "hakumi-table-row-chosen",
|
|
1108
|
+
dragClass: "hakumi-table-row-drag",
|
|
1109
|
+
filter: ".hakumi-table-expanded-row",
|
|
1110
|
+
onEnd: (evt) => {
|
|
1111
|
+
if (evt.oldIndex === evt.newIndex) return
|
|
1112
|
+
|
|
1113
|
+
const row = evt.item
|
|
1114
|
+
const rowKey = row.dataset.rowKey
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
const expandedRow = row.nextElementSibling
|
|
1118
|
+
if (expandedRow?.dataset.rowType === "expanded") {
|
|
1119
|
+
row.parentNode.insertBefore(expandedRow, row.nextSibling)
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
this.#dispatchRowReorder(evt.oldIndex, evt.newIndex, rowKey)
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
if (this.rowDragHandleValue) {
|
|
1128
|
+
options.handle = ".hakumi-table-drag-handle"
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
this._rowSortable = Sortable.create(tbody, options)
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
#setupColumnDrag() {
|
|
1135
|
+
const headerRow = this.element.querySelector(".hakumi-table-header-row")
|
|
1136
|
+
if (!headerRow) return
|
|
1137
|
+
|
|
1138
|
+
this._columnSortable = Sortable.create(headerRow, {
|
|
1139
|
+
animation: 150,
|
|
1140
|
+
ghostClass: "hakumi-table-column-ghost",
|
|
1141
|
+
chosenClass: "hakumi-table-column-chosen",
|
|
1142
|
+
dragClass: "hakumi-table-column-drag",
|
|
1143
|
+
filter: ".hakumi-table-selection-column, .hakumi-table-expand-column",
|
|
1144
|
+
onEnd: (evt) => {
|
|
1145
|
+
if (evt.oldIndex === evt.newIndex) return
|
|
1146
|
+
|
|
1147
|
+
const th = evt.item
|
|
1148
|
+
const columnKey = th.dataset.columnKey
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
this.#reorderBodyColumns(evt.oldIndex, evt.newIndex)
|
|
1152
|
+
|
|
1153
|
+
this.#dispatchColumnReorder(evt.oldIndex, evt.newIndex, columnKey)
|
|
1154
|
+
}
|
|
1155
|
+
})
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
#reorderBodyColumns(oldIndex, newIndex) {
|
|
1159
|
+
const rows = this.element.querySelectorAll("tbody tr")
|
|
1160
|
+
rows.forEach(row => {
|
|
1161
|
+
const cells = Array.from(row.children)
|
|
1162
|
+
if (cells[oldIndex] && cells[newIndex]) {
|
|
1163
|
+
const cell = cells[oldIndex]
|
|
1164
|
+
const reference = oldIndex < newIndex ? cells[newIndex].nextSibling : cells[newIndex]
|
|
1165
|
+
row.insertBefore(cell, reference)
|
|
1166
|
+
}
|
|
1167
|
+
})
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
#dispatchRowReorder(oldIndex, newIndex, rowKey) {
|
|
1171
|
+
this.element.dispatchEvent(
|
|
1172
|
+
new CustomEvent("hakumi--table:rowReorder", {
|
|
1173
|
+
bubbles: true,
|
|
1174
|
+
detail: {
|
|
1175
|
+
oldIndex,
|
|
1176
|
+
newIndex,
|
|
1177
|
+
rowKey,
|
|
1178
|
+
order: this.getRowOrder()
|
|
1179
|
+
}
|
|
1180
|
+
})
|
|
1181
|
+
)
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
#dispatchColumnReorder(oldIndex, newIndex, columnKey) {
|
|
1185
|
+
this.element.dispatchEvent(
|
|
1186
|
+
new CustomEvent("hakumi--table:columnReorder", {
|
|
1187
|
+
bubbles: true,
|
|
1188
|
+
detail: {
|
|
1189
|
+
oldIndex,
|
|
1190
|
+
newIndex,
|
|
1191
|
+
columnKey,
|
|
1192
|
+
order: this.getColumnOrder()
|
|
1193
|
+
}
|
|
1194
|
+
})
|
|
1195
|
+
)
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
}
|