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.
- 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,1101 @@
|
|
|
1
|
+
import RegistryController from "../base/registry_controller.js"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const ALLOWED_URL_PROTOCOLS = ["http:", "https:", "data:"]
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const VALID_STATUSES = ["ready", "uploading", "done", "error", "aborted"]
|
|
8
|
+
|
|
9
|
+
export default class extends RegistryController {
|
|
10
|
+
static targets = ["input", "list", "dropzone", "inlineTrigger", "avatar", "avatarWrapper"]
|
|
11
|
+
|
|
12
|
+
static values = {
|
|
13
|
+
action: String,
|
|
14
|
+
name: String,
|
|
15
|
+
accept: String,
|
|
16
|
+
multiple: Boolean,
|
|
17
|
+
maxCount: Number,
|
|
18
|
+
maxSize: Number,
|
|
19
|
+
disabled: Boolean,
|
|
20
|
+
listType: String,
|
|
21
|
+
showUploadList: Boolean,
|
|
22
|
+
drag: Boolean,
|
|
23
|
+
headers: Object,
|
|
24
|
+
data: Object,
|
|
25
|
+
defaultFileList: Array,
|
|
26
|
+
withCredentials: Boolean,
|
|
27
|
+
autoUpload: { type: Boolean, default: true },
|
|
28
|
+
inlineTrigger: { type: Boolean, default: false },
|
|
29
|
+
avatarShape: String,
|
|
30
|
+
avatarSize: Number,
|
|
31
|
+
avatarIcon: String
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
setup() {
|
|
36
|
+
this.fileList = this.normalizeFileList(this.defaultFileListValue || [])
|
|
37
|
+
this.renderFileList()
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
teardown() {
|
|
42
|
+
|
|
43
|
+
this.fileList.forEach((record) => {
|
|
44
|
+
if (record.xhr) {
|
|
45
|
+
record.xhr.abort()
|
|
46
|
+
}
|
|
47
|
+
if (record.blobUrl && record.url) {
|
|
48
|
+
URL.revokeObjectURL(record.url)
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
registerApi() {
|
|
55
|
+
const api = {
|
|
56
|
+
|
|
57
|
+
upload: (file) => this.upload(file),
|
|
58
|
+
uploadAll: () => this.uploadAll(),
|
|
59
|
+
remove: (file) => this.remove(file),
|
|
60
|
+
removeAll: () => this.removeAll(),
|
|
61
|
+
getFileList: () => this.getFileList(),
|
|
62
|
+
setFileList: (list) => this.setFileList(list),
|
|
63
|
+
abort: (file) => this.abort(file),
|
|
64
|
+
abortAll: () => this.abortAll(),
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
addFile: (fileData) => this.addFile(fileData),
|
|
68
|
+
setProgress: (uid, percent) => this.setProgress(uid, percent),
|
|
69
|
+
setStatus: (uid, status, error) => this.setStatus(uid, status, error),
|
|
70
|
+
simulateUpload: (uid, options) => this.simulateUpload(uid, options),
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
openPreview: (file) => this.openPreview(file),
|
|
74
|
+
getPreviewItems: () => this.getPreviewItems()
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
this.element.hakumiComponent = {
|
|
78
|
+
name: "upload",
|
|
79
|
+
version: 1,
|
|
80
|
+
singleton: false,
|
|
81
|
+
api
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
addFile(fileData) {
|
|
92
|
+
if (!fileData || typeof fileData !== "object") return null
|
|
93
|
+
|
|
94
|
+
const record = {
|
|
95
|
+
uid: `upload_${Date.now()}_${Math.random().toString(16).slice(2)}`,
|
|
96
|
+
name: this.sanitizeFileName(fileData.name || "file"),
|
|
97
|
+
status: this.validateStatus(fileData.status) || "ready",
|
|
98
|
+
url: this.sanitizeUrl(fileData.url),
|
|
99
|
+
percent: this.clampPercent(fileData.percent || 0),
|
|
100
|
+
size: typeof fileData.size === "number" ? fileData.size : null,
|
|
101
|
+
error: typeof fileData.error === "string" ? fileData.error : null
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
if (this.hasMaxCountValue && this.fileList.length >= this.maxCountValue) {
|
|
106
|
+
return null
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
this.fileList.push(record)
|
|
110
|
+
this.renderFileList()
|
|
111
|
+
this.dispatchChange(record)
|
|
112
|
+
|
|
113
|
+
return record
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
setProgress(uid, percent) {
|
|
119
|
+
const record = this.resolveRecord(uid)
|
|
120
|
+
if (!record) return
|
|
121
|
+
|
|
122
|
+
record.percent = this.clampPercent(percent)
|
|
123
|
+
this.renderFileList()
|
|
124
|
+
this.dispatchProgress(record, null)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
setStatus(uid, status, error) {
|
|
130
|
+
const record = this.resolveRecord(uid)
|
|
131
|
+
if (!record) return
|
|
132
|
+
|
|
133
|
+
const validStatus = this.validateStatus(status)
|
|
134
|
+
if (!validStatus) return
|
|
135
|
+
|
|
136
|
+
record.status = validStatus
|
|
137
|
+
|
|
138
|
+
if (validStatus === "error" && error) {
|
|
139
|
+
record.error = String(error).slice(0, 500)
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (validStatus === "done") {
|
|
143
|
+
record.percent = 100
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
this.renderFileList()
|
|
147
|
+
this.dispatchChange(record)
|
|
148
|
+
|
|
149
|
+
if (validStatus === "done") {
|
|
150
|
+
this.dispatchSuccess(record)
|
|
151
|
+
} else if (validStatus === "error") {
|
|
152
|
+
this.dispatchError(record, record.error)
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
simulateUpload(uid, options = {}) {
|
|
159
|
+
const record = this.resolveRecord(uid)
|
|
160
|
+
if (!record) return Promise.reject(new Error("File not found"))
|
|
161
|
+
|
|
162
|
+
const duration = Math.min(Math.max(options.duration || 2000, 500), 30000)
|
|
163
|
+
const shouldSucceed = options.success !== false
|
|
164
|
+
|
|
165
|
+
return new Promise((resolve) => {
|
|
166
|
+
record.status = "uploading"
|
|
167
|
+
record.percent = 0
|
|
168
|
+
this.renderFileList()
|
|
169
|
+
this.dispatchChange(record)
|
|
170
|
+
|
|
171
|
+
const startTime = Date.now()
|
|
172
|
+
const animate = () => {
|
|
173
|
+
const elapsed = Date.now() - startTime
|
|
174
|
+
const progress = Math.min((elapsed / duration) * 100, 100)
|
|
175
|
+
|
|
176
|
+
record.percent = Math.round(progress)
|
|
177
|
+
this.renderFileList()
|
|
178
|
+
this.dispatchProgress(record, null)
|
|
179
|
+
|
|
180
|
+
if (progress < 100) {
|
|
181
|
+
requestAnimationFrame(animate)
|
|
182
|
+
} else {
|
|
183
|
+
|
|
184
|
+
if (shouldSucceed) {
|
|
185
|
+
record.status = "done"
|
|
186
|
+
this.dispatchSuccess(record)
|
|
187
|
+
} else {
|
|
188
|
+
record.status = "error"
|
|
189
|
+
record.error = options.error || "Upload failed"
|
|
190
|
+
this.dispatchError(record, record.error)
|
|
191
|
+
}
|
|
192
|
+
this.renderFileList()
|
|
193
|
+
this.dispatchChange(record)
|
|
194
|
+
resolve(record)
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
requestAnimationFrame(animate)
|
|
199
|
+
})
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
sanitizeFileName(name) {
|
|
209
|
+
if (typeof name !== "string") return "file"
|
|
210
|
+
|
|
211
|
+
return name
|
|
212
|
+
.replace(/[<>:"\/\\|?*\x00-\x1f]/g, "_")
|
|
213
|
+
.slice(0, 255)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
sanitizeUrl(url) {
|
|
219
|
+
if (!url || typeof url !== "string") return null
|
|
220
|
+
|
|
221
|
+
try {
|
|
222
|
+
|
|
223
|
+
if (url.startsWith("data:")) {
|
|
224
|
+
|
|
225
|
+
if (url.startsWith("data:image/")) {
|
|
226
|
+
return url.slice(0, 1024 * 100)
|
|
227
|
+
}
|
|
228
|
+
return null
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const parsed = new URL(url)
|
|
232
|
+
if (ALLOWED_URL_PROTOCOLS.includes(parsed.protocol)) {
|
|
233
|
+
return parsed.href
|
|
234
|
+
}
|
|
235
|
+
} catch {
|
|
236
|
+
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return null
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
validateStatus(status) {
|
|
245
|
+
if (typeof status !== "string") return null
|
|
246
|
+
const normalized = status.toLowerCase()
|
|
247
|
+
return VALID_STATUSES.includes(normalized) ? normalized : null
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
clampPercent(percent) {
|
|
253
|
+
const num = Number(percent)
|
|
254
|
+
if (isNaN(num)) return 0
|
|
255
|
+
return Math.max(0, Math.min(100, Math.round(num)))
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
validateFileType(file) {
|
|
261
|
+
if (!this.acceptValue) return true
|
|
262
|
+
|
|
263
|
+
const acceptTypes = this.acceptValue.split(",").map((t) => t.trim().toLowerCase())
|
|
264
|
+
const fileName = file.name.toLowerCase()
|
|
265
|
+
const fileType = file.type.toLowerCase()
|
|
266
|
+
|
|
267
|
+
return acceptTypes.some((accept) => {
|
|
268
|
+
if (accept.startsWith(".")) {
|
|
269
|
+
return fileName.endsWith(accept)
|
|
270
|
+
} else if (accept.endsWith("/*")) {
|
|
271
|
+
return fileType.startsWith(accept.slice(0, -2))
|
|
272
|
+
} else {
|
|
273
|
+
return fileType === accept
|
|
274
|
+
}
|
|
275
|
+
})
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
getCsrfToken() {
|
|
279
|
+
const meta = document.querySelector('meta[name="csrf-token"]')
|
|
280
|
+
return meta ? meta.getAttribute("content") : null
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
triggerInput(event) {
|
|
288
|
+
if (event) event.preventDefault()
|
|
289
|
+
if (this.disabledValue) return
|
|
290
|
+
if (this.hasInputTarget) this.inputTarget.click()
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
handleInput(event) {
|
|
294
|
+
if (this.disabledValue) return
|
|
295
|
+
const files = Array.from(event.target.files || [])
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
if (this.listTypeValue === "avatar" && files.length > 0) {
|
|
299
|
+
this.handleAvatarUpload(files[0])
|
|
300
|
+
} else {
|
|
301
|
+
this.addFiles(files)
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
event.target.value = ""
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
dragOver(event) {
|
|
308
|
+
if (this.disabledValue) return
|
|
309
|
+
event.preventDefault()
|
|
310
|
+
if (this.hasDropzoneTarget) this.dropzoneTarget.classList.add("hakumi-upload-drag-hover")
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
dragLeave(event) {
|
|
314
|
+
if (this.disabledValue) return
|
|
315
|
+
event.preventDefault()
|
|
316
|
+
if (this.hasDropzoneTarget) this.dropzoneTarget.classList.remove("hakumi-upload-drag-hover")
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
drop(event) {
|
|
320
|
+
if (this.disabledValue) return
|
|
321
|
+
event.preventDefault()
|
|
322
|
+
if (this.hasDropzoneTarget) this.dropzoneTarget.classList.remove("hakumi-upload-drag-hover")
|
|
323
|
+
|
|
324
|
+
const files = Array.from(event.dataTransfer?.files || [])
|
|
325
|
+
this.addFiles(files)
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
addFiles(files) {
|
|
329
|
+
if (!files.length) return
|
|
330
|
+
|
|
331
|
+
const maxCount = this.hasMaxCountValue ? this.maxCountValue : null
|
|
332
|
+
const remaining = maxCount ? Math.max(maxCount - this.fileList.length, 0) : files.length
|
|
333
|
+
const acceptedFiles = files.slice(0, remaining)
|
|
334
|
+
const filesToUpload = []
|
|
335
|
+
|
|
336
|
+
acceptedFiles.forEach((file) => {
|
|
337
|
+
const record = this.buildFileRecord(file)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
if (!this.validateFileType(file)) {
|
|
341
|
+
record.status = "error"
|
|
342
|
+
record.error = "File type not accepted"
|
|
343
|
+
this.fileList.push(record)
|
|
344
|
+
this.dispatchError(record)
|
|
345
|
+
return
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
if (this.hasMaxSizeValue && file.size > this.maxSizeValue) {
|
|
350
|
+
record.status = "error"
|
|
351
|
+
record.error = "File exceeds max size"
|
|
352
|
+
this.fileList.push(record)
|
|
353
|
+
this.dispatchError(record)
|
|
354
|
+
} else {
|
|
355
|
+
this.fileList.push(record)
|
|
356
|
+
this.dispatchChange(record)
|
|
357
|
+
filesToUpload.push(record)
|
|
358
|
+
}
|
|
359
|
+
})
|
|
360
|
+
|
|
361
|
+
this.renderFileList()
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
const isDemoMode = !this.actionValue || this.actionValue === "#"
|
|
365
|
+
if (this.autoUploadValue && !isDemoMode && filesToUpload.length > 0) {
|
|
366
|
+
filesToUpload.forEach((record) => this.performUpload(record))
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
upload(file) {
|
|
371
|
+
if (this.disabledValue) return
|
|
372
|
+
const record = this.resolveRecord(file)
|
|
373
|
+
if (!record || record.status === "uploading") return
|
|
374
|
+
this.performUpload(record)
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
uploadAll() {
|
|
378
|
+
if (this.disabledValue) return
|
|
379
|
+
this.fileList.forEach((record) => {
|
|
380
|
+
if (["ready", "error"].includes(record.status)) {
|
|
381
|
+
this.performUpload(record)
|
|
382
|
+
}
|
|
383
|
+
})
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
remove(file) {
|
|
387
|
+
const record = this.resolveRecord(file)
|
|
388
|
+
if (!record) return
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
if (record.xhr) {
|
|
392
|
+
record.xhr.abort()
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
if (record.blobUrl && record.url) {
|
|
397
|
+
URL.revokeObjectURL(record.url)
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
this.fileList = this.fileList.filter((item) => item.uid !== record.uid)
|
|
401
|
+
this.renderFileList()
|
|
402
|
+
this.dispatchChange(record)
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
removeFromEvent(event) {
|
|
406
|
+
const uid = event.currentTarget?.dataset?.uid
|
|
407
|
+
this.remove(uid)
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
previewFromEvent(event) {
|
|
411
|
+
const uid = event.currentTarget?.dataset?.uid
|
|
412
|
+
if (uid) this.openPreview(uid)
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
removeAll() {
|
|
416
|
+
|
|
417
|
+
this.fileList.forEach((record) => {
|
|
418
|
+
if (record.xhr) record.xhr.abort()
|
|
419
|
+
if (record.blobUrl && record.url) URL.revokeObjectURL(record.url)
|
|
420
|
+
})
|
|
421
|
+
|
|
422
|
+
this.fileList = []
|
|
423
|
+
this.renderFileList()
|
|
424
|
+
this.dispatchChange(null)
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
getFileList() {
|
|
428
|
+
|
|
429
|
+
return this.fileList.map((record) => ({ ...record }))
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
setFileList(list) {
|
|
433
|
+
|
|
434
|
+
this.fileList.forEach((record) => {
|
|
435
|
+
if (record.xhr) record.xhr.abort()
|
|
436
|
+
if (record.blobUrl && record.url) URL.revokeObjectURL(record.url)
|
|
437
|
+
})
|
|
438
|
+
|
|
439
|
+
this.fileList = this.normalizeFileList(list || [])
|
|
440
|
+
this.renderFileList()
|
|
441
|
+
this.dispatchChange(null)
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
abort(file) {
|
|
445
|
+
const record = this.resolveRecord(file)
|
|
446
|
+
if (!record || !record.xhr) return
|
|
447
|
+
record.xhr.abort()
|
|
448
|
+
record.status = "aborted"
|
|
449
|
+
this.renderFileList()
|
|
450
|
+
this.dispatchError(record, "aborted")
|
|
451
|
+
this.dispatchChange(record)
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
abortAll() {
|
|
455
|
+
this.fileList.forEach((record) => {
|
|
456
|
+
if (record.xhr) record.xhr.abort()
|
|
457
|
+
if (record.status === "uploading") record.status = "aborted"
|
|
458
|
+
})
|
|
459
|
+
this.renderFileList()
|
|
460
|
+
this.dispatchError(null, "aborted")
|
|
461
|
+
this.dispatchChange(null)
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
performUpload(record) {
|
|
465
|
+
if (!this.actionValue) return
|
|
466
|
+
if (!record.raw) return
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
if (this.actionValue === "#") {
|
|
470
|
+
this.simulateUpload(record.uid, { duration: 1500, success: true })
|
|
471
|
+
return
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
record.status = "uploading"
|
|
475
|
+
record.percent = 0
|
|
476
|
+
this.renderFileList()
|
|
477
|
+
this.dispatchChange(record)
|
|
478
|
+
|
|
479
|
+
const xhr = new XMLHttpRequest()
|
|
480
|
+
record.xhr = xhr
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
if (this.withCredentialsValue) {
|
|
484
|
+
xhr.withCredentials = true
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
xhr.upload.addEventListener("progress", (event) => {
|
|
488
|
+
if (!event.lengthComputable) return
|
|
489
|
+
record.percent = Math.round((event.loaded / event.total) * 100)
|
|
490
|
+
this.renderFileList()
|
|
491
|
+
this.dispatchProgress(record, event)
|
|
492
|
+
})
|
|
493
|
+
|
|
494
|
+
xhr.addEventListener("load", () => {
|
|
495
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
496
|
+
record.status = "done"
|
|
497
|
+
record.percent = 100
|
|
498
|
+
try {
|
|
499
|
+
record.response = JSON.parse(xhr.response)
|
|
500
|
+
} catch {
|
|
501
|
+
record.response = xhr.response
|
|
502
|
+
}
|
|
503
|
+
this.renderFileList()
|
|
504
|
+
this.dispatchSuccess(record)
|
|
505
|
+
this.dispatchChange(record)
|
|
506
|
+
} else {
|
|
507
|
+
record.status = "error"
|
|
508
|
+
record.error = xhr.statusText || "Upload failed"
|
|
509
|
+
this.renderFileList()
|
|
510
|
+
this.dispatchError(record)
|
|
511
|
+
this.dispatchChange(record)
|
|
512
|
+
}
|
|
513
|
+
})
|
|
514
|
+
|
|
515
|
+
xhr.addEventListener("error", () => {
|
|
516
|
+
record.status = "error"
|
|
517
|
+
record.error = "Network error"
|
|
518
|
+
this.renderFileList()
|
|
519
|
+
this.dispatchError(record)
|
|
520
|
+
this.dispatchChange(record)
|
|
521
|
+
})
|
|
522
|
+
|
|
523
|
+
xhr.addEventListener("abort", () => {
|
|
524
|
+
record.status = "aborted"
|
|
525
|
+
this.renderFileList()
|
|
526
|
+
this.dispatchError(record, "aborted")
|
|
527
|
+
this.dispatchChange(record)
|
|
528
|
+
})
|
|
529
|
+
|
|
530
|
+
xhr.open("POST", this.actionValue)
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
const csrfToken = this.getCsrfToken()
|
|
534
|
+
if (csrfToken) {
|
|
535
|
+
xhr.setRequestHeader("X-CSRF-Token", csrfToken)
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
const headers = this.ensureObject(this.headersValue)
|
|
540
|
+
if (headers) {
|
|
541
|
+
Object.entries(headers).forEach(([key, value]) => {
|
|
542
|
+
|
|
543
|
+
const lowerKey = key.toLowerCase()
|
|
544
|
+
if (!["cookie", "host", "origin", "referer"].includes(lowerKey)) {
|
|
545
|
+
xhr.setRequestHeader(key, value)
|
|
546
|
+
}
|
|
547
|
+
})
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
const formData = new FormData()
|
|
551
|
+
const extraData = this.ensureObject(this.dataValue)
|
|
552
|
+
if (extraData) {
|
|
553
|
+
Object.entries(extraData).forEach(([key, value]) => {
|
|
554
|
+
formData.append(key, value)
|
|
555
|
+
})
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
formData.append(this.nameValue || "file", record.raw)
|
|
559
|
+
xhr.send(formData)
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
normalizeFileList(list) {
|
|
563
|
+
return (list || []).map((item, index) => {
|
|
564
|
+
if (item instanceof File) return this.buildFileRecord(item)
|
|
565
|
+
|
|
566
|
+
const record = {
|
|
567
|
+
uid: item.uid || `upload_${Date.now()}_${index}`,
|
|
568
|
+
name: this.sanitizeFileName(item.name || item.filename || "file"),
|
|
569
|
+
status: this.validateStatus(item.status) || "ready",
|
|
570
|
+
url: this.sanitizeUrl(item.url),
|
|
571
|
+
percent: this.clampPercent(item.percent || 0),
|
|
572
|
+
size: item.size,
|
|
573
|
+
response: item.response,
|
|
574
|
+
error: typeof item.error === "string" ? item.error : null,
|
|
575
|
+
raw: item.raw || item.file
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
return record
|
|
579
|
+
})
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
buildFileRecord(file) {
|
|
583
|
+
const record = {
|
|
584
|
+
uid: `upload_${Date.now()}_${Math.random().toString(16).slice(2)}`,
|
|
585
|
+
name: this.sanitizeFileName(file.name),
|
|
586
|
+
status: "ready",
|
|
587
|
+
percent: 0,
|
|
588
|
+
size: file.size,
|
|
589
|
+
raw: file
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
if (this.shouldGeneratePreview(file)) {
|
|
594
|
+
record.url = URL.createObjectURL(file)
|
|
595
|
+
record.blobUrl = true
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
return record
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
shouldGeneratePreview(file) {
|
|
604
|
+
if (!["picture", "picture-card"].includes(this.listTypeValue)) return false
|
|
605
|
+
if (!file.type.startsWith("image/")) return false
|
|
606
|
+
|
|
607
|
+
if (file.size > 10 * 1024 * 1024) return false
|
|
608
|
+
return true
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
resolveRecord(fileOrUid) {
|
|
612
|
+
if (!fileOrUid) return null
|
|
613
|
+
|
|
614
|
+
if (fileOrUid instanceof File) {
|
|
615
|
+
const record = this.buildFileRecord(fileOrUid)
|
|
616
|
+
this.fileList.push(record)
|
|
617
|
+
this.renderFileList()
|
|
618
|
+
return record
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
if (typeof fileOrUid === "string") {
|
|
622
|
+
return this.fileList.find((record) => record.uid === fileOrUid)
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
if (fileOrUid.uid) {
|
|
626
|
+
return this.fileList.find((record) => record.uid === fileOrUid.uid) || fileOrUid
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
return null
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
renderFileList() {
|
|
633
|
+
if (!this.hasListTarget) return
|
|
634
|
+
|
|
635
|
+
this.listTarget.classList.toggle("hakumi-upload-list-empty", this.fileList.length === 0)
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
const existingItems = this.listTarget.querySelectorAll(".hakumi-upload-list-item:not(.hakumi-upload-list-item-trigger)")
|
|
639
|
+
existingItems.forEach((item) => item.remove())
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
const inlineTrigger = this.listTarget.querySelector(".hakumi-upload-list-item-trigger")
|
|
643
|
+
|
|
644
|
+
this.fileList.forEach((record) => {
|
|
645
|
+
const item = document.createElement("li")
|
|
646
|
+
item.className = `hakumi-upload-list-item hakumi-upload-list-item-${record.status || "done"}`
|
|
647
|
+
item.dataset.uid = record.uid
|
|
648
|
+
|
|
649
|
+
const info = document.createElement("div")
|
|
650
|
+
info.className = "hakumi-upload-list-item-info"
|
|
651
|
+
|
|
652
|
+
if (["picture", "picture-card"].includes(this.listTypeValue) && record.url) {
|
|
653
|
+
const thumb = document.createElement("span")
|
|
654
|
+
thumb.className = "hakumi-upload-list-item-thumbnail"
|
|
655
|
+
const img = document.createElement("img")
|
|
656
|
+
img.src = record.url
|
|
657
|
+
img.alt = record.name
|
|
658
|
+
thumb.appendChild(img)
|
|
659
|
+
info.appendChild(thumb)
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
const name = document.createElement("span")
|
|
663
|
+
name.className = "hakumi-upload-list-item-name"
|
|
664
|
+
name.textContent = record.name
|
|
665
|
+
info.appendChild(name)
|
|
666
|
+
|
|
667
|
+
const actions = document.createElement("div")
|
|
668
|
+
actions.className = "hakumi-upload-list-item-actions"
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
if (this.listTypeValue === "picture-card") {
|
|
672
|
+
|
|
673
|
+
if (record.url && record.status === "done") {
|
|
674
|
+
const viewButton = document.createElement("button")
|
|
675
|
+
viewButton.type = "button"
|
|
676
|
+
viewButton.className = "hakumi-upload-list-item-action hakumi-upload-list-item-view"
|
|
677
|
+
viewButton.innerHTML = `<svg viewBox="64 64 896 896" width="1em" height="1em" fill="currentColor"><path d="M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"/></svg>`
|
|
678
|
+
viewButton.title = "Preview"
|
|
679
|
+
viewButton.addEventListener("click", (e) => {
|
|
680
|
+
e.stopPropagation()
|
|
681
|
+
this.openPreview(record)
|
|
682
|
+
})
|
|
683
|
+
actions.appendChild(viewButton)
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
const removeButton = document.createElement("button")
|
|
687
|
+
removeButton.type = "button"
|
|
688
|
+
removeButton.className = "hakumi-upload-list-item-action hakumi-upload-list-item-remove"
|
|
689
|
+
removeButton.innerHTML = `<svg viewBox="64 64 896 896" width="1em" height="1em" fill="currentColor"><path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"/></svg>`
|
|
690
|
+
removeButton.title = "Remove"
|
|
691
|
+
removeButton.addEventListener("click", (e) => {
|
|
692
|
+
e.stopPropagation()
|
|
693
|
+
this.remove(record.uid)
|
|
694
|
+
})
|
|
695
|
+
actions.appendChild(removeButton)
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
info.appendChild(actions)
|
|
699
|
+
} else {
|
|
700
|
+
|
|
701
|
+
const removeButton = document.createElement("button")
|
|
702
|
+
removeButton.type = "button"
|
|
703
|
+
removeButton.className = "hakumi-upload-list-item-action hakumi-upload-list-item-remove"
|
|
704
|
+
removeButton.textContent = "×"
|
|
705
|
+
removeButton.title = "Remove"
|
|
706
|
+
removeButton.addEventListener("click", (e) => {
|
|
707
|
+
e.stopPropagation()
|
|
708
|
+
this.remove(record.uid)
|
|
709
|
+
})
|
|
710
|
+
actions.appendChild(removeButton)
|
|
711
|
+
item.appendChild(actions)
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
const progress = document.createElement("div")
|
|
715
|
+
progress.className = "hakumi-upload-list-item-progress"
|
|
716
|
+
progress.style.setProperty("--hakumi-upload-progress", `${record.percent || 0}%`)
|
|
717
|
+
|
|
718
|
+
const progressBar = document.createElement("div")
|
|
719
|
+
progressBar.className = "hakumi-upload-list-item-progress-bar"
|
|
720
|
+
progress.appendChild(progressBar)
|
|
721
|
+
|
|
722
|
+
item.appendChild(info)
|
|
723
|
+
item.appendChild(progress)
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
if (inlineTrigger) {
|
|
727
|
+
this.listTarget.insertBefore(item, inlineTrigger)
|
|
728
|
+
} else {
|
|
729
|
+
this.listTarget.appendChild(item)
|
|
730
|
+
}
|
|
731
|
+
})
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
this.updateInlineTriggerVisibility()
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
updateInlineTriggerVisibility() {
|
|
738
|
+
if (!this.hasInlineTriggerTarget) return
|
|
739
|
+
|
|
740
|
+
const isAtMax = this.hasMaxCountValue && this.fileList.length >= this.maxCountValue
|
|
741
|
+
this.inlineTriggerTarget.classList.toggle("hakumi-upload-list-item-trigger-hidden", isAtMax)
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
dispatchChange(file) {
|
|
745
|
+
this.element.dispatchEvent(
|
|
746
|
+
new CustomEvent("hakumi:upload:change", {
|
|
747
|
+
bubbles: true,
|
|
748
|
+
detail: { file, fileList: this.getFileList() }
|
|
749
|
+
})
|
|
750
|
+
)
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
dispatchProgress(file, event) {
|
|
754
|
+
this.element.dispatchEvent(
|
|
755
|
+
new CustomEvent("hakumi:upload:progress", {
|
|
756
|
+
bubbles: true,
|
|
757
|
+
detail: { file: file ? { ...file } : null, fileList: this.getFileList(), event }
|
|
758
|
+
})
|
|
759
|
+
)
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
dispatchSuccess(file) {
|
|
763
|
+
this.element.dispatchEvent(
|
|
764
|
+
new CustomEvent("hakumi:upload:success", {
|
|
765
|
+
bubbles: true,
|
|
766
|
+
detail: { file: file ? { ...file } : null, fileList: this.getFileList() }
|
|
767
|
+
})
|
|
768
|
+
)
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
if (window.HakumiComponents?.renderComponent && file?.name) {
|
|
772
|
+
window.HakumiComponents.renderComponent("message", {
|
|
773
|
+
params: {
|
|
774
|
+
id: "hakumi-upload-message",
|
|
775
|
+
type: "success",
|
|
776
|
+
message: `${file.name} uploaded successfully`,
|
|
777
|
+
duration: 3
|
|
778
|
+
}
|
|
779
|
+
})
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
dispatchError(file, error) {
|
|
784
|
+
this.element.dispatchEvent(
|
|
785
|
+
new CustomEvent("hakumi:upload:error", {
|
|
786
|
+
bubbles: true,
|
|
787
|
+
detail: { file: file ? { ...file } : null, fileList: this.getFileList(), error }
|
|
788
|
+
})
|
|
789
|
+
)
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
if (window.HakumiComponents?.renderComponent) {
|
|
793
|
+
const errorMsg = error || file?.error || "Upload failed"
|
|
794
|
+
window.HakumiComponents.renderComponent("message", {
|
|
795
|
+
params: {
|
|
796
|
+
id: "hakumi-upload-message",
|
|
797
|
+
type: "error",
|
|
798
|
+
message: file?.name ? `${file.name}: ${errorMsg}` : errorMsg,
|
|
799
|
+
duration: 3
|
|
800
|
+
}
|
|
801
|
+
})
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
ensureObject(value) {
|
|
806
|
+
if (!value) return null
|
|
807
|
+
if (typeof value === "object") return value
|
|
808
|
+
|
|
809
|
+
try {
|
|
810
|
+
return JSON.parse(value)
|
|
811
|
+
} catch {
|
|
812
|
+
return null
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
handleAvatarUpload(file) {
|
|
823
|
+
if (!this.hasAvatarTarget || !this.hasAvatarWrapperTarget) return
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
if (!this.validateFileType(file)) {
|
|
827
|
+
if (window.HakumiComponents?.renderComponent) {
|
|
828
|
+
window.HakumiComponents.renderComponent("message", {
|
|
829
|
+
params: {
|
|
830
|
+
id: "hakumi-upload-avatar-message",
|
|
831
|
+
type: "error",
|
|
832
|
+
message: "Please upload an image file",
|
|
833
|
+
duration: 3
|
|
834
|
+
}
|
|
835
|
+
})
|
|
836
|
+
}
|
|
837
|
+
return
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
if (this.hasMaxSizeValue && file.size > this.maxSizeValue) {
|
|
842
|
+
if (window.HakumiComponents?.renderComponent) {
|
|
843
|
+
window.HakumiComponents.renderComponent("message", {
|
|
844
|
+
params: {
|
|
845
|
+
id: "hakumi-upload-avatar-message",
|
|
846
|
+
type: "error",
|
|
847
|
+
message: "File exceeds max size",
|
|
848
|
+
duration: 3
|
|
849
|
+
}
|
|
850
|
+
})
|
|
851
|
+
}
|
|
852
|
+
return
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
this.avatarWrapperTarget.classList.add("hakumi-upload-avatar-wrapper-loading")
|
|
857
|
+
|
|
858
|
+
|
|
859
|
+
const loadingIcon = `<span class="anticon anticon-loading" style="animation: spin 1s linear infinite;"><svg viewBox="0 0 1024 1024" width="1em" height="1em" fill="currentColor"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span>`
|
|
860
|
+
this.avatarTarget.innerHTML = loadingIcon
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
const previewUrl = URL.createObjectURL(file)
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
const record = this.buildFileRecord(file)
|
|
867
|
+
record.url = previewUrl
|
|
868
|
+
record.blobUrl = true
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
const isDemoMode = !this.actionValue || this.actionValue === "#"
|
|
872
|
+
|
|
873
|
+
const updateAvatar = () => {
|
|
874
|
+
this.avatarWrapperTarget.classList.remove("hakumi-upload-avatar-wrapper-loading")
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
const img = document.createElement("img")
|
|
878
|
+
img.src = previewUrl
|
|
879
|
+
img.alt = file.name
|
|
880
|
+
img.style.cssText = "width: 100%; height: 100%; object-fit: cover;"
|
|
881
|
+
this.avatarTarget.innerHTML = ""
|
|
882
|
+
this.avatarTarget.appendChild(img)
|
|
883
|
+
this.avatarTarget.classList.add("hakumi-avatar-image")
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
this.dispatchSuccess({ ...record, status: "done" })
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
if (isDemoMode) {
|
|
890
|
+
|
|
891
|
+
setTimeout(updateAvatar, 1500)
|
|
892
|
+
} else {
|
|
893
|
+
|
|
894
|
+
this.performAvatarUpload(record, updateAvatar)
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
performAvatarUpload(record, onSuccess) {
|
|
901
|
+
const xhr = new XMLHttpRequest()
|
|
902
|
+
|
|
903
|
+
if (this.withCredentialsValue) {
|
|
904
|
+
xhr.withCredentials = true
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
xhr.addEventListener("load", () => {
|
|
908
|
+
if (xhr.status >= 200 && xhr.status < 300) {
|
|
909
|
+
try {
|
|
910
|
+
record.response = JSON.parse(xhr.response)
|
|
911
|
+
} catch {
|
|
912
|
+
record.response = xhr.response
|
|
913
|
+
}
|
|
914
|
+
onSuccess()
|
|
915
|
+
} else {
|
|
916
|
+
this.avatarWrapperTarget?.classList.remove("hakumi-upload-avatar-wrapper-loading")
|
|
917
|
+
this.dispatchError(record, xhr.statusText || "Upload failed")
|
|
918
|
+
}
|
|
919
|
+
})
|
|
920
|
+
|
|
921
|
+
xhr.addEventListener("error", () => {
|
|
922
|
+
this.avatarWrapperTarget?.classList.remove("hakumi-upload-avatar-wrapper-loading")
|
|
923
|
+
this.dispatchError(record, "Network error")
|
|
924
|
+
})
|
|
925
|
+
|
|
926
|
+
xhr.open("POST", this.actionValue)
|
|
927
|
+
|
|
928
|
+
const csrfToken = this.getCsrfToken()
|
|
929
|
+
if (csrfToken) {
|
|
930
|
+
xhr.setRequestHeader("X-CSRF-Token", csrfToken)
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
const headers = this.ensureObject(this.headersValue)
|
|
934
|
+
if (headers) {
|
|
935
|
+
Object.entries(headers).forEach(([key, value]) => {
|
|
936
|
+
const lowerKey = key.toLowerCase()
|
|
937
|
+
if (!["cookie", "host", "origin", "referer"].includes(lowerKey)) {
|
|
938
|
+
xhr.setRequestHeader(key, value)
|
|
939
|
+
}
|
|
940
|
+
})
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
const formData = new FormData()
|
|
944
|
+
const extraData = this.ensureObject(this.dataValue)
|
|
945
|
+
if (extraData) {
|
|
946
|
+
Object.entries(extraData).forEach(([key, value]) => {
|
|
947
|
+
formData.append(key, value)
|
|
948
|
+
})
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
formData.append(this.nameValue || "file", record.raw)
|
|
952
|
+
xhr.send(formData)
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
getPreviewItems() {
|
|
962
|
+
return this.fileList
|
|
963
|
+
.filter((record) => record.status === "done" && record.url)
|
|
964
|
+
.map((record) => ({
|
|
965
|
+
src: record.url,
|
|
966
|
+
alt: record.name,
|
|
967
|
+
uid: record.uid
|
|
968
|
+
}))
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
openPreview(fileOrUid) {
|
|
974
|
+
const record = this.resolveRecord(fileOrUid)
|
|
975
|
+
if (!record || !record.url) return
|
|
976
|
+
|
|
977
|
+
const items = this.getPreviewItems()
|
|
978
|
+
const currentIndex = items.findIndex((item) => item.uid === record.uid)
|
|
979
|
+
|
|
980
|
+
if (currentIndex === -1) return
|
|
981
|
+
|
|
982
|
+
this.#createPreviewModal(items, currentIndex)
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
#previewState = {
|
|
986
|
+
modal: null,
|
|
987
|
+
items: [],
|
|
988
|
+
currentIndex: 0
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
#createPreviewModal(items, startIndex) {
|
|
992
|
+
|
|
993
|
+
this.#closePreviewModal()
|
|
994
|
+
|
|
995
|
+
this.#previewState.items = items
|
|
996
|
+
this.#previewState.currentIndex = startIndex
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
const modal = document.createElement("div")
|
|
1000
|
+
modal.className = "hakumi-upload-preview-root"
|
|
1001
|
+
modal.innerHTML = `
|
|
1002
|
+
<div class="hakumi-upload-preview-mask"></div>
|
|
1003
|
+
<div class="hakumi-upload-preview-wrap">
|
|
1004
|
+
<div class="hakumi-upload-preview-body">
|
|
1005
|
+
<img class="hakumi-upload-preview-img" src="" alt="" />
|
|
1006
|
+
</div>
|
|
1007
|
+
<div class="hakumi-upload-preview-operations">
|
|
1008
|
+
<button type="button" class="hakumi-upload-preview-close" title="Close">
|
|
1009
|
+
<svg viewBox="64 64 896 896" width="1em" height="1em" fill="currentColor"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"/></svg>
|
|
1010
|
+
</button>
|
|
1011
|
+
</div>
|
|
1012
|
+
${items.length > 1 ? `
|
|
1013
|
+
<button type="button" class="hakumi-upload-preview-switch hakumi-upload-preview-switch-left" title="Previous">
|
|
1014
|
+
<svg viewBox="64 64 896 896" width="1em" height="1em" fill="currentColor"><path d="M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"/></svg>
|
|
1015
|
+
</button>
|
|
1016
|
+
<button type="button" class="hakumi-upload-preview-switch hakumi-upload-preview-switch-right" title="Next">
|
|
1017
|
+
<svg viewBox="64 64 896 896" width="1em" height="1em" fill="currentColor"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V183c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"/></svg>
|
|
1018
|
+
</button>
|
|
1019
|
+
<div class="hakumi-upload-preview-counter">
|
|
1020
|
+
<span class="hakumi-upload-preview-counter-current">${startIndex + 1}</span>
|
|
1021
|
+
<span>/</span>
|
|
1022
|
+
<span class="hakumi-upload-preview-counter-total">${items.length}</span>
|
|
1023
|
+
</div>
|
|
1024
|
+
` : ""}
|
|
1025
|
+
</div>
|
|
1026
|
+
`
|
|
1027
|
+
|
|
1028
|
+
this.#previewState.modal = modal
|
|
1029
|
+
document.body.appendChild(modal)
|
|
1030
|
+
document.body.style.overflow = "hidden"
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
this.#updatePreviewImage()
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
modal.querySelector(".hakumi-upload-preview-mask").addEventListener("click", () => this.#closePreviewModal())
|
|
1037
|
+
modal.querySelector(".hakumi-upload-preview-close").addEventListener("click", () => this.#closePreviewModal())
|
|
1038
|
+
modal.querySelector(".hakumi-upload-preview-switch-left")?.addEventListener("click", () => this.#prevPreviewImage())
|
|
1039
|
+
modal.querySelector(".hakumi-upload-preview-switch-right")?.addEventListener("click", () => this.#nextPreviewImage())
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
this._previewKeyHandler = (e) => {
|
|
1043
|
+
if (e.key === "Escape") this.#closePreviewModal()
|
|
1044
|
+
else if (e.key === "ArrowLeft") this.#prevPreviewImage()
|
|
1045
|
+
else if (e.key === "ArrowRight") this.#nextPreviewImage()
|
|
1046
|
+
}
|
|
1047
|
+
document.addEventListener("keydown", this._previewKeyHandler)
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
requestAnimationFrame(() => {
|
|
1051
|
+
modal.classList.add("hakumi-upload-preview-active")
|
|
1052
|
+
})
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
#updatePreviewImage() {
|
|
1056
|
+
const { modal, items, currentIndex } = this.#previewState
|
|
1057
|
+
if (!modal) return
|
|
1058
|
+
|
|
1059
|
+
const item = items[currentIndex]
|
|
1060
|
+
const img = modal.querySelector(".hakumi-upload-preview-img")
|
|
1061
|
+
img.src = item.src
|
|
1062
|
+
img.alt = item.alt || ""
|
|
1063
|
+
|
|
1064
|
+
const counterCurrent = modal.querySelector(".hakumi-upload-preview-counter-current")
|
|
1065
|
+
if (counterCurrent) {
|
|
1066
|
+
counterCurrent.textContent = currentIndex + 1
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
#prevPreviewImage() {
|
|
1071
|
+
const { items, currentIndex } = this.#previewState
|
|
1072
|
+
if (items.length <= 1) return
|
|
1073
|
+
this.#previewState.currentIndex = (currentIndex - 1 + items.length) % items.length
|
|
1074
|
+
this.#updatePreviewImage()
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
#nextPreviewImage() {
|
|
1078
|
+
const { items, currentIndex } = this.#previewState
|
|
1079
|
+
if (items.length <= 1) return
|
|
1080
|
+
this.#previewState.currentIndex = (currentIndex + 1) % items.length
|
|
1081
|
+
this.#updatePreviewImage()
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
#closePreviewModal() {
|
|
1085
|
+
const { modal } = this.#previewState
|
|
1086
|
+
if (!modal) return
|
|
1087
|
+
|
|
1088
|
+
modal.classList.remove("hakumi-upload-preview-active")
|
|
1089
|
+
|
|
1090
|
+
if (this._previewKeyHandler) {
|
|
1091
|
+
document.removeEventListener("keydown", this._previewKeyHandler)
|
|
1092
|
+
this._previewKeyHandler = null
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
setTimeout(() => {
|
|
1096
|
+
modal.remove()
|
|
1097
|
+
this.#previewState.modal = null
|
|
1098
|
+
document.body.style.overflow = ""
|
|
1099
|
+
}, 300)
|
|
1100
|
+
}
|
|
1101
|
+
}
|