plutonium 0.6.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.node-version +1 -0
- data/README copy.md +1 -2
- data/README.md +19 -5
- data/app/assets/css/plutonium.css +3 -0
- data/app/assets/icons/flags/ghana.svg +49 -0
- data/app/assets/icons/outline/address-book.svg +3 -0
- data/app/assets/icons/outline/adjustments-horizontal.svg +3 -0
- data/app/assets/icons/outline/adjustments-vertical.svg +3 -0
- data/app/assets/icons/outline/align-center.svg +3 -0
- data/app/assets/icons/outline/angle-down.svg +3 -0
- data/app/assets/icons/outline/angle-left.svg +3 -0
- data/app/assets/icons/outline/angle-right.svg +3 -0
- data/app/assets/icons/outline/angle-up.svg +3 -0
- data/app/assets/icons/outline/annotation.svg +3 -0
- data/app/assets/icons/outline/archive-arrow-down.svg +3 -0
- data/app/assets/icons/outline/archive.svg +3 -0
- data/app/assets/icons/outline/arrow-down-to-bracket.svg +3 -0
- data/app/assets/icons/outline/arrow-down.svg +3 -0
- data/app/assets/icons/outline/arrow-left-to-bracket.svg +3 -0
- data/app/assets/icons/outline/arrow-left.svg +3 -0
- data/app/assets/icons/outline/arrow-right-alt.svg +3 -0
- data/app/assets/icons/outline/arrow-right-to-bracket.svg +3 -0
- data/app/assets/icons/outline/arrow-right.svg +3 -0
- data/app/assets/icons/outline/arrow-sort-letters.svg +3 -0
- data/app/assets/icons/outline/arrow-up-down.svg +3 -0
- data/app/assets/icons/outline/arrow-up-from-bracket.svg +3 -0
- data/app/assets/icons/outline/arrow-up-right-down-left.svg +3 -0
- data/app/assets/icons/outline/arrow-up-right-from-square.svg +3 -0
- data/app/assets/icons/outline/arrow-up.svg +3 -0
- data/app/assets/icons/outline/arrows-repeat-count.svg +3 -0
- data/app/assets/icons/outline/arrows-repeat.svg +3 -0
- data/app/assets/icons/outline/atom.svg +3 -0
- data/app/assets/icons/outline/backward-step.svg +3 -0
- data/app/assets/icons/outline/badge-check.svg +3 -0
- data/app/assets/icons/outline/bars-from-left.svg +3 -0
- data/app/assets/icons/outline/bars.svg +3 -0
- data/app/assets/icons/outline/bell-active-alt.svg +3 -0
- data/app/assets/icons/outline/bell-active.svg +3 -0
- data/app/assets/icons/outline/bell-ring.svg +3 -0
- data/app/assets/icons/outline/bell.svg +3 -0
- data/app/assets/icons/outline/blender-phone.svg +3 -0
- data/app/assets/icons/outline/book-open.svg +3 -0
- data/app/assets/icons/outline/book.svg +3 -0
- data/app/assets/icons/outline/bookmark.svg +3 -0
- data/app/assets/icons/outline/brain.svg +3 -0
- data/app/assets/icons/outline/briefcase.svg +3 -0
- data/app/assets/icons/outline/bug.svg +3 -0
- data/app/assets/icons/outline/building.svg +3 -0
- data/app/assets/icons/outline/bullhorn.svg +3 -0
- data/app/assets/icons/outline/calendar-edit.svg +3 -0
- data/app/assets/icons/outline/calendar-month.svg +3 -0
- data/app/assets/icons/outline/calendar-plus.svg +3 -0
- data/app/assets/icons/outline/calendar-week.svg +3 -0
- data/app/assets/icons/outline/camera-photo.svg +4 -0
- data/app/assets/icons/outline/caption.svg +3 -0
- data/app/assets/icons/outline/caret-down.svg +3 -0
- data/app/assets/icons/outline/caret-left.svg +3 -0
- data/app/assets/icons/outline/caret-right.svg +3 -0
- data/app/assets/icons/outline/caret-sort.svg +3 -0
- data/app/assets/icons/outline/caret-up.svg +3 -0
- data/app/assets/icons/outline/cart-plus-alt.svg +3 -0
- data/app/assets/icons/outline/cart-plus.svg +3 -0
- data/app/assets/icons/outline/cart.svg +3 -0
- data/app/assets/icons/outline/cash.svg +3 -0
- data/app/assets/icons/outline/chart-line-down.svg +3 -0
- data/app/assets/icons/outline/chart-line-up.svg +3 -0
- data/app/assets/icons/outline/chart-mixed-dollar.svg +3 -0
- data/app/assets/icons/outline/chart-mixed.svg +3 -0
- data/app/assets/icons/outline/chart-pie.svg +4 -0
- data/app/assets/icons/outline/chart.svg +3 -0
- data/app/assets/icons/outline/check-circle.svg +3 -0
- data/app/assets/icons/outline/check-plus-circle.svg +3 -0
- data/app/assets/icons/outline/check.svg +3 -0
- data/app/assets/icons/outline/chevron-double-down.svg +3 -0
- data/app/assets/icons/outline/chevron-double-left.svg +3 -0
- data/app/assets/icons/outline/chevron-double-right.svg +3 -0
- data/app/assets/icons/outline/chevron-double-up.svg +3 -0
- data/app/assets/icons/outline/chevron-down.svg +3 -0
- data/app/assets/icons/outline/chevron-left.svg +3 -0
- data/app/assets/icons/outline/chevron-right.svg +3 -0
- data/app/assets/icons/outline/chevron-sort.svg +3 -0
- data/app/assets/icons/outline/chevron-up.svg +3 -0
- data/app/assets/icons/outline/circle-pause.svg +3 -0
- data/app/assets/icons/outline/circle-plus.svg +3 -0
- data/app/assets/icons/outline/clapperboard-play.svg +3 -0
- data/app/assets/icons/outline/clipboard-check.svg +3 -0
- data/app/assets/icons/outline/clipboard-list.svg +3 -0
- data/app/assets/icons/outline/clipboard.svg +3 -0
- data/app/assets/icons/outline/clock.svg +3 -0
- data/app/assets/icons/outline/close-circle.svg +3 -0
- data/app/assets/icons/outline/close.svg +3 -0
- data/app/assets/icons/outline/cloud-arrow-up.svg +3 -0
- data/app/assets/icons/outline/code-branch.svg +3 -0
- data/app/assets/icons/outline/code-fork.svg +3 -0
- data/app/assets/icons/outline/code-merge.svg +3 -0
- data/app/assets/icons/outline/code-pull-request.svg +3 -0
- data/app/assets/icons/outline/code.svg +3 -0
- data/app/assets/icons/outline/cog.svg +4 -0
- data/app/assets/icons/outline/column.svg +3 -0
- data/app/assets/icons/outline/command.svg +3 -0
- data/app/assets/icons/outline/compress.svg +3 -0
- data/app/assets/icons/outline/computer-speaker.svg +3 -0
- data/app/assets/icons/outline/credit-card.svg +3 -0
- data/app/assets/icons/outline/database.svg +3 -0
- data/app/assets/icons/outline/desktop-pc.svg +3 -0
- data/app/assets/icons/outline/dna.svg +3 -0
- data/app/assets/icons/outline/dollar.svg +3 -0
- data/app/assets/icons/outline/dots-horizontal.svg +3 -0
- data/app/assets/icons/outline/dots-vertical.svg +3 -0
- data/app/assets/icons/outline/download.svg +3 -0
- data/app/assets/icons/outline/draw-square.svg +3 -0
- data/app/assets/icons/outline/edit.svg +3 -0
- data/app/assets/icons/outline/envelope-open.svg +3 -0
- data/app/assets/icons/outline/envelope.svg +3 -0
- data/app/assets/icons/outline/euro.svg +3 -0
- data/app/assets/icons/outline/exclamation-circle.svg +3 -0
- data/app/assets/icons/outline/expand.svg +3 -0
- data/app/assets/icons/outline/eye-slash.svg +3 -0
- data/app/assets/icons/outline/eye.svg +4 -0
- data/app/assets/icons/outline/face-explode.svg +4 -0
- data/app/assets/icons/outline/face-grin-stars.svg +6 -0
- data/app/assets/icons/outline/face-grin.svg +3 -0
- data/app/assets/icons/outline/face-laugh.svg +3 -0
- data/app/assets/icons/outline/file-chart-bar.svg +3 -0
- data/app/assets/icons/outline/file-check.svg +3 -0
- data/app/assets/icons/outline/file-circle-plus.svg +3 -0
- data/app/assets/icons/outline/file-clone.svg +3 -0
- data/app/assets/icons/outline/file-code.svg +3 -0
- data/app/assets/icons/outline/file-copy-alt.svg +3 -0
- data/app/assets/icons/outline/file-copy.svg +3 -0
- data/app/assets/icons/outline/file-csv.svg +3 -0
- data/app/assets/icons/outline/file-export.svg +3 -0
- data/app/assets/icons/outline/file-image.svg +4 -0
- data/app/assets/icons/outline/file-import.svg +3 -0
- data/app/assets/icons/outline/file-invoice.svg +3 -0
- data/app/assets/icons/outline/file-lines.svg +3 -0
- data/app/assets/icons/outline/file-music.svg +3 -0
- data/app/assets/icons/outline/file-paste.svg +3 -0
- data/app/assets/icons/outline/file-pdf.svg +3 -0
- data/app/assets/icons/outline/file-pen.svg +3 -0
- data/app/assets/icons/outline/file-ppt.svg +3 -0
- data/app/assets/icons/outline/file-search.svg +3 -0
- data/app/assets/icons/outline/file-shield.svg +3 -0
- data/app/assets/icons/outline/file-video.svg +3 -0
- data/app/assets/icons/outline/file-word.svg +3 -0
- data/app/assets/icons/outline/file-zip.svg +3 -0
- data/app/assets/icons/outline/file.svg +3 -0
- data/app/assets/icons/outline/filter.svg +3 -0
- data/app/assets/icons/outline/fingerprint.svg +3 -0
- data/app/assets/icons/outline/fire.svg +3 -0
- data/app/assets/icons/outline/flag.svg +3 -0
- data/app/assets/icons/outline/folder-arrow-right.svg +3 -0
- data/app/assets/icons/outline/folder-duplicate.svg +3 -0
- data/app/assets/icons/outline/folder-open.svg +3 -0
- data/app/assets/icons/outline/folder-plus.svg +3 -0
- data/app/assets/icons/outline/folder.svg +3 -0
- data/app/assets/icons/outline/forward-step.svg +3 -0
- data/app/assets/icons/outline/forward.svg +3 -0
- data/app/assets/icons/outline/gift-box.svg +3 -0
- data/app/assets/icons/outline/globe.svg +3 -0
- data/app/assets/icons/outline/grid-plus.svg +3 -0
- data/app/assets/icons/outline/grid.svg +3 -0
- data/app/assets/icons/outline/headphones.svg +3 -0
- data/app/assets/icons/outline/heart.svg +3 -0
- data/app/assets/icons/outline/home.svg +3 -0
- data/app/assets/icons/outline/hourglass.svg +3 -0
- data/app/assets/icons/outline/image.svg +3 -0
- data/app/assets/icons/outline/inbox-full.svg +3 -0
- data/app/assets/icons/outline/inbox.svg +3 -0
- data/app/assets/icons/outline/indent.svg +3 -0
- data/app/assets/icons/outline/info-circle.svg +3 -0
- data/app/assets/icons/outline/keyboard.svg +5 -0
- data/app/assets/icons/outline/label.svg +3 -0
- data/app/assets/icons/outline/landmark.svg +3 -0
- data/app/assets/icons/outline/layers.svg +3 -0
- data/app/assets/icons/outline/letter-bold.svg +3 -0
- data/app/assets/icons/outline/letter-italic.svg +3 -0
- data/app/assets/icons/outline/letter-underline.svg +3 -0
- data/app/assets/icons/outline/life-saver.svg +3 -0
- data/app/assets/icons/outline/lightbulb.svg +3 -0
- data/app/assets/icons/outline/link.svg +3 -0
- data/app/assets/icons/outline/list-music.svg +3 -0
- data/app/assets/icons/outline/list.svg +3 -0
- data/app/assets/icons/outline/lock-open.svg +3 -0
- data/app/assets/icons/outline/lock-time.svg +3 -0
- data/app/assets/icons/outline/lock.svg +3 -0
- data/app/assets/icons/outline/mail-box.svg +3 -0
- data/app/assets/icons/outline/map-pin-alt.svg +4 -0
- data/app/assets/icons/outline/map-pin.svg +3 -0
- data/app/assets/icons/outline/message-caption.svg +3 -0
- data/app/assets/icons/outline/message-dots.svg +3 -0
- data/app/assets/icons/outline/messages.svg +3 -0
- data/app/assets/icons/outline/microphone.svg +3 -0
- data/app/assets/icons/outline/minimize.svg +3 -0
- data/app/assets/icons/outline/minus.svg +3 -0
- data/app/assets/icons/outline/mobile-phone.svg +3 -0
- data/app/assets/icons/outline/moon.svg +3 -0
- data/app/assets/icons/outline/newspaper.svg +3 -0
- data/app/assets/icons/outline/ordered-list.svg +3 -0
- data/app/assets/icons/outline/outdent.svg +3 -0
- data/app/assets/icons/outline/palette.svg +3 -0
- data/app/assets/icons/outline/paper-clip.svg +3 -0
- data/app/assets/icons/outline/paper-plane.svg +3 -0
- data/app/assets/icons/outline/paragraph.svg +3 -0
- data/app/assets/icons/outline/pause.svg +3 -0
- data/app/assets/icons/outline/pen-nib.svg +3 -0
- data/app/assets/icons/outline/pen.svg +3 -0
- data/app/assets/icons/outline/phone.svg +3 -0
- data/app/assets/icons/outline/play.svg +3 -0
- data/app/assets/icons/outline/plus.svg +3 -0
- data/app/assets/icons/outline/printer.svg +3 -0
- data/app/assets/icons/outline/profile-card.svg +3 -0
- data/app/assets/icons/outline/question-circle.svg +3 -0
- data/app/assets/icons/outline/quote.svg +3 -0
- data/app/assets/icons/outline/receipt.svg +3 -0
- data/app/assets/icons/outline/rectangle-list.svg +3 -0
- data/app/assets/icons/outline/redo.svg +3 -0
- data/app/assets/icons/outline/refresh.svg +3 -0
- data/app/assets/icons/outline/reply-all.svg +3 -0
- data/app/assets/icons/outline/reply.svg +3 -0
- data/app/assets/icons/outline/restore-window.svg +3 -0
- data/app/assets/icons/outline/rocket.svg +3 -0
- data/app/assets/icons/outline/ruler-combined.svg +3 -0
- data/app/assets/icons/outline/sale-percent.svg +3 -0
- data/app/assets/icons/outline/scale-balanced.svg +3 -0
- data/app/assets/icons/outline/search.svg +3 -0
- data/app/assets/icons/outline/share-all.svg +3 -0
- data/app/assets/icons/outline/share-nodes.svg +3 -0
- data/app/assets/icons/outline/shield-check.svg +3 -0
- data/app/assets/icons/outline/shield.svg +3 -0
- data/app/assets/icons/outline/shopping-bag.svg +3 -0
- data/app/assets/icons/outline/shuffle.svg +3 -0
- data/app/assets/icons/outline/sort-horizontal.svg +3 -0
- data/app/assets/icons/outline/sort.svg +3 -0
- data/app/assets/icons/outline/star-half-stroke.svg +3 -0
- data/app/assets/icons/outline/star-half.svg +3 -0
- data/app/assets/icons/outline/star.svg +3 -0
- data/app/assets/icons/outline/store.svg +3 -0
- data/app/assets/icons/outline/sun.svg +3 -0
- data/app/assets/icons/outline/swatchbook.svg +3 -0
- data/app/assets/icons/outline/table-column.svg +3 -0
- data/app/assets/icons/outline/table-row.svg +3 -0
- data/app/assets/icons/outline/tablet.svg +3 -0
- data/app/assets/icons/outline/tag.svg +3 -0
- data/app/assets/icons/outline/terminal.svg +3 -0
- data/app/assets/icons/outline/text-size.svg +3 -0
- data/app/assets/icons/outline/text-slash.svg +3 -0
- data/app/assets/icons/outline/thumbs-down.svg +3 -0
- data/app/assets/icons/outline/thumbs-up.svg +3 -0
- data/app/assets/icons/outline/ticket.svg +3 -0
- data/app/assets/icons/outline/trash-bin.svg +3 -0
- data/app/assets/icons/outline/truck.svg +3 -0
- data/app/assets/icons/outline/undo.svg +3 -0
- data/app/assets/icons/outline/upload.svg +3 -0
- data/app/assets/icons/outline/user-add.svg +3 -0
- data/app/assets/icons/outline/user-circle.svg +3 -0
- data/app/assets/icons/outline/user-edit.svg +3 -0
- data/app/assets/icons/outline/user-headset.svg +3 -0
- data/app/assets/icons/outline/user-remove.svg +3 -0
- data/app/assets/icons/outline/user-settings.svg +3 -0
- data/app/assets/icons/outline/user.svg +3 -0
- data/app/assets/icons/outline/users-group.svg +3 -0
- data/app/assets/icons/outline/users.svg +3 -0
- data/app/assets/icons/outline/video-camera.svg +3 -0
- data/app/assets/icons/outline/volume-down.svg +3 -0
- data/app/assets/icons/outline/volume-up.svg +3 -0
- data/app/assets/icons/outline/wallet.svg +3 -0
- data/app/assets/icons/outline/wand-magic-sparkles.svg +3 -0
- data/app/assets/icons/outline/window.svg +3 -0
- data/app/assets/icons/outline/zoom-in.svg +3 -0
- data/app/assets/icons/outline/zoom-out.svg +3 -0
- data/app/assets/icons/solid/X.svg +3 -0
- data/app/assets/icons/solid/address-book.svg +3 -0
- data/app/assets/icons/solid/adjustments-horizontal.svg +3 -0
- data/app/assets/icons/solid/adjustments-vertical.svg +3 -0
- data/app/assets/icons/solid/annotation.svg +3 -0
- data/app/assets/icons/solid/apple.svg +3 -0
- data/app/assets/icons/solid/archive-arrow-down.svg +3 -0
- data/app/assets/icons/solid/archive.svg +4 -0
- data/app/assets/icons/solid/arrow-right-alt.svg +3 -0
- data/app/assets/icons/solid/arrow-up-right-from-square.svg +4 -0
- data/app/assets/icons/solid/backward-step.svg +3 -0
- data/app/assets/icons/solid/badge-check.svg +3 -0
- data/app/assets/icons/solid/bell-active-alt.svg +3 -0
- data/app/assets/icons/solid/bell-active.svg +5 -0
- data/app/assets/icons/solid/bell-ring.svg +3 -0
- data/app/assets/icons/solid/bell.svg +3 -0
- data/app/assets/icons/solid/blender-phone.svg +3 -0
- data/app/assets/icons/solid/book-open.svg +3 -0
- data/app/assets/icons/solid/book.svg +3 -0
- data/app/assets/icons/solid/bookmark.svg +3 -0
- data/app/assets/icons/solid/brain.svg +3 -0
- data/app/assets/icons/solid/briefcase.svg +3 -0
- data/app/assets/icons/solid/bug.svg +3 -0
- data/app/assets/icons/solid/building.svg +3 -0
- data/app/assets/icons/solid/bullhorn.svg +3 -0
- data/app/assets/icons/solid/calendar-edit.svg +4 -0
- data/app/assets/icons/solid/calendar-month.svg +3 -0
- data/app/assets/icons/solid/calendar-plus.svg +3 -0
- data/app/assets/icons/solid/calendar-week.svg +3 -0
- data/app/assets/icons/solid/camera-photo.svg +3 -0
- data/app/assets/icons/solid/caption.svg +3 -0
- data/app/assets/icons/solid/caret-down.svg +3 -0
- data/app/assets/icons/solid/caret-left.svg +3 -0
- data/app/assets/icons/solid/caret-right.svg +3 -0
- data/app/assets/icons/solid/caret-sort.svg +3 -0
- data/app/assets/icons/solid/caret-up.svg +3 -0
- data/app/assets/icons/solid/cart-plus-alt.svg +4 -0
- data/app/assets/icons/solid/cart-plus.svg +4 -0
- data/app/assets/icons/solid/cart.svg +3 -0
- data/app/assets/icons/solid/cash.svg +5 -0
- data/app/assets/icons/solid/chart-mixed-dollar.svg +3 -0
- data/app/assets/icons/solid/chart-pie.svg +4 -0
- data/app/assets/icons/solid/check-circle.svg +3 -0
- data/app/assets/icons/solid/check-plus-circle.svg +4 -0
- data/app/assets/icons/solid/circle-pause.svg +3 -0
- data/app/assets/icons/solid/circle-plus.svg +3 -0
- data/app/assets/icons/solid/clapperboard-play.svg +3 -0
- data/app/assets/icons/solid/clipboard-check.svg +3 -0
- data/app/assets/icons/solid/clipboard-list.svg +3 -0
- data/app/assets/icons/solid/clipboard.svg +3 -0
- data/app/assets/icons/solid/clock.svg +3 -0
- data/app/assets/icons/solid/close-circle.svg +3 -0
- data/app/assets/icons/solid/cloud-arrow-up.svg +4 -0
- data/app/assets/icons/solid/code-branch.svg +3 -0
- data/app/assets/icons/solid/code-fork.svg +3 -0
- data/app/assets/icons/solid/code-merge.svg +3 -0
- data/app/assets/icons/solid/code-pull-request.svg +3 -0
- data/app/assets/icons/solid/cog.svg +3 -0
- data/app/assets/icons/solid/column.svg +3 -0
- data/app/assets/icons/solid/computer-speaker.svg +4 -0
- data/app/assets/icons/solid/credit-card.svg +4 -0
- data/app/assets/icons/solid/css.svg +3 -0
- data/app/assets/icons/solid/database.svg +3 -0
- data/app/assets/icons/solid/desktop-pc.svg +3 -0
- data/app/assets/icons/solid/discord.svg +3 -0
- data/app/assets/icons/solid/download.svg +4 -0
- data/app/assets/icons/solid/draw-square.svg +4 -0
- data/app/assets/icons/solid/dribbble.svg +3 -0
- data/app/assets/icons/solid/dropbox.svg +4 -0
- data/app/assets/icons/solid/edit.svg +4 -0
- data/app/assets/icons/solid/envelope-open.svg +4 -0
- data/app/assets/icons/solid/envelope.svg +4 -0
- data/app/assets/icons/solid/exclamation-circle.svg +3 -0
- data/app/assets/icons/solid/eye-slash.svg +5 -0
- data/app/assets/icons/solid/eye.svg +3 -0
- data/app/assets/icons/solid/face-explode.svg +3 -0
- data/app/assets/icons/solid/face-grin-stars.svg +3 -0
- data/app/assets/icons/solid/face-grin.svg +3 -0
- data/app/assets/icons/solid/face-laugh.svg +3 -0
- data/app/assets/icons/solid/facebook.svg +3 -0
- data/app/assets/icons/solid/file-chart-bar.svg +3 -0
- data/app/assets/icons/solid/file-check.svg +4 -0
- data/app/assets/icons/solid/file-circle-plus.svg +4 -0
- data/app/assets/icons/solid/file-clone.svg +4 -0
- data/app/assets/icons/solid/file-code.svg +3 -0
- data/app/assets/icons/solid/file-copy-alt.svg +4 -0
- data/app/assets/icons/solid/file-copy.svg +4 -0
- data/app/assets/icons/solid/file-csv.svg +3 -0
- data/app/assets/icons/solid/file-export.svg +3 -0
- data/app/assets/icons/solid/file-image.svg +3 -0
- data/app/assets/icons/solid/file-import.svg +3 -0
- data/app/assets/icons/solid/file-invoice.svg +3 -0
- data/app/assets/icons/solid/file-lines.svg +3 -0
- data/app/assets/icons/solid/file-music.svg +3 -0
- data/app/assets/icons/solid/file-paste.svg +4 -0
- data/app/assets/icons/solid/file-pdf.svg +3 -0
- data/app/assets/icons/solid/file-pen.svg +4 -0
- data/app/assets/icons/solid/file-ppt.svg +3 -0
- data/app/assets/icons/solid/file-search.svg +3 -0
- data/app/assets/icons/solid/file-shield.svg +4 -0
- data/app/assets/icons/solid/file-video.svg +3 -0
- data/app/assets/icons/solid/file-word.svg +3 -0
- data/app/assets/icons/solid/file-zip.svg +3 -0
- data/app/assets/icons/solid/file.svg +3 -0
- data/app/assets/icons/solid/filter.svg +3 -0
- data/app/assets/icons/solid/fire.svg +3 -0
- data/app/assets/icons/solid/flag.svg +3 -0
- data/app/assets/icons/solid/flowbite.svg +6 -0
- data/app/assets/icons/solid/folder-arrow-right.svg +3 -0
- data/app/assets/icons/solid/folder-duplicate.svg +4 -0
- data/app/assets/icons/solid/folder-open.svg +3 -0
- data/app/assets/icons/solid/folder-plus.svg +3 -0
- data/app/assets/icons/solid/folder.svg +3 -0
- data/app/assets/icons/solid/forward-step.svg +3 -0
- data/app/assets/icons/solid/forward.svg +3 -0
- data/app/assets/icons/solid/gift-box.svg +3 -0
- data/app/assets/icons/solid/github.svg +3 -0
- data/app/assets/icons/solid/globe.svg +3 -0
- data/app/assets/icons/solid/google.svg +3 -0
- data/app/assets/icons/solid/grid-plus.svg +3 -0
- data/app/assets/icons/solid/grid.svg +3 -0
- data/app/assets/icons/solid/headphones.svg +3 -0
- data/app/assets/icons/solid/heart.svg +3 -0
- data/app/assets/icons/solid/home.svg +3 -0
- data/app/assets/icons/solid/hourglass.svg +3 -0
- data/app/assets/icons/solid/html.svg +3 -0
- data/app/assets/icons/solid/image.svg +4 -0
- data/app/assets/icons/solid/inbox-full.svg +3 -0
- data/app/assets/icons/solid/inbox.svg +3 -0
- data/app/assets/icons/solid/indent.svg +3 -0
- data/app/assets/icons/solid/info-circle.svg +3 -0
- data/app/assets/icons/solid/keyboard.svg +3 -0
- data/app/assets/icons/solid/label.svg +3 -0
- data/app/assets/icons/solid/landmark.svg +4 -0
- data/app/assets/icons/solid/layers.svg +4 -0
- data/app/assets/icons/solid/life-saver.svg +3 -0
- data/app/assets/icons/solid/lightbulb.svg +3 -0
- data/app/assets/icons/solid/linkedin.svg +4 -0
- data/app/assets/icons/solid/list-music.svg +3 -0
- data/app/assets/icons/solid/lock-open.svg +3 -0
- data/app/assets/icons/solid/lock-time.svg +4 -0
- data/app/assets/icons/solid/lock.svg +3 -0
- data/app/assets/icons/solid/mail-box.svg +3 -0
- data/app/assets/icons/solid/map-pin-alt.svg +3 -0
- data/app/assets/icons/solid/map-pin.svg +3 -0
- data/app/assets/icons/solid/message-caption.svg +3 -0
- data/app/assets/icons/solid/message-dots.svg +3 -0
- data/app/assets/icons/solid/messages.svg +4 -0
- data/app/assets/icons/solid/microphone.svg +4 -0
- data/app/assets/icons/solid/mobile-phone.svg +3 -0
- data/app/assets/icons/solid/moon.svg +3 -0
- data/app/assets/icons/solid/newspaper.svg +3 -0
- data/app/assets/icons/solid/npm.svg +3 -0
- data/app/assets/icons/solid/outdent.svg +3 -0
- data/app/assets/icons/solid/palette.svg +3 -0
- data/app/assets/icons/solid/paper-plane.svg +3 -0
- data/app/assets/icons/solid/paragraph.svg +3 -0
- data/app/assets/icons/solid/pause.svg +3 -0
- data/app/assets/icons/solid/pen-nib.svg +3 -0
- data/app/assets/icons/solid/pen.svg +3 -0
- data/app/assets/icons/solid/phone.svg +3 -0
- data/app/assets/icons/solid/play.svg +3 -0
- data/app/assets/icons/solid/printer.svg +3 -0
- data/app/assets/icons/solid/profile-card.svg +3 -0
- data/app/assets/icons/solid/question-circle.svg +3 -0
- data/app/assets/icons/solid/quote.svg +3 -0
- data/app/assets/icons/solid/react.svg +4 -0
- data/app/assets/icons/solid/receipt.svg +3 -0
- data/app/assets/icons/solid/rectangle-list.svg +3 -0
- data/app/assets/icons/solid/reply-all.svg +3 -0
- data/app/assets/icons/solid/reply.svg +3 -0
- data/app/assets/icons/solid/rocket.svg +3 -0
- data/app/assets/icons/solid/sale-percent.svg +3 -0
- data/app/assets/icons/solid/scale-balanced.svg +3 -0
- data/app/assets/icons/solid/search.svg +4 -0
- data/app/assets/icons/solid/share-all.svg +3 -0
- data/app/assets/icons/solid/share-nodes.svg +3 -0
- data/app/assets/icons/solid/shield-check.svg +3 -0
- data/app/assets/icons/solid/shield.svg +3 -0
- data/app/assets/icons/solid/shopping-bag.svg +3 -0
- data/app/assets/icons/solid/stackoverflow.svg +4 -0
- data/app/assets/icons/solid/star-half-stroke.svg +3 -0
- data/app/assets/icons/solid/star-half.svg +3 -0
- data/app/assets/icons/solid/star.svg +3 -0
- data/app/assets/icons/solid/store.svg +3 -0
- data/app/assets/icons/solid/sun.svg +3 -0
- data/app/assets/icons/solid/swatchbook.svg +3 -0
- data/app/assets/icons/solid/table-column.svg +3 -0
- data/app/assets/icons/solid/table-row.svg +3 -0
- data/app/assets/icons/solid/tablet.svg +3 -0
- data/app/assets/icons/solid/tag.svg +3 -0
- data/app/assets/icons/solid/tailwind.svg +3 -0
- data/app/assets/icons/solid/terminal.svg +3 -0
- data/app/assets/icons/solid/thumbs-down.svg +3 -0
- data/app/assets/icons/solid/thumbs-up.svg +3 -0
- data/app/assets/icons/solid/ticket.svg +3 -0
- data/app/assets/icons/solid/trash-bin.svg +3 -0
- data/app/assets/icons/solid/truck.svg +3 -0
- data/app/assets/icons/solid/twitter.svg +3 -0
- data/app/assets/icons/solid/upload.svg +3 -0
- data/app/assets/icons/solid/user-add.svg +3 -0
- data/app/assets/icons/solid/user-circle.svg +3 -0
- data/app/assets/icons/solid/user-edit.svg +3 -0
- data/app/assets/icons/solid/user-headset.svg +3 -0
- data/app/assets/icons/solid/user-remove.svg +3 -0
- data/app/assets/icons/solid/user-settings.svg +3 -0
- data/app/assets/icons/solid/user.svg +3 -0
- data/app/assets/icons/solid/users-group.svg +3 -0
- data/app/assets/icons/solid/users.svg +3 -0
- data/app/assets/icons/solid/video-camera.svg +3 -0
- data/app/assets/icons/solid/volume-down.svg +4 -0
- data/app/assets/icons/solid/volume-up.svg +5 -0
- data/app/assets/icons/solid/vue.svg +3 -0
- data/app/assets/icons/solid/wallet.svg +4 -0
- data/app/assets/icons/solid/wand-magic-sparkles.svg +4 -0
- data/app/assets/icons/solid/window-restore.svg +4 -0
- data/app/assets/icons/solid/window.svg +3 -0
- data/app/assets/icons/solid/youtube.svg +3 -0
- data/app/assets/icons/solid/zoom-in.svg +3 -0
- data/app/assets/icons/solid/zoom-out.svg +3 -0
- data/app/assets/js/controllers/application.js +6 -0
- data/app/assets/js/controllers/dropdown_controller.js +12 -0
- data/app/assets/js/controllers/index.js +21 -0
- data/app/assets/js/plutonium.js +2 -0
- data/app/assets/js/turbo/index.js +5 -0
- data/app/assets/js/turbo/turbo_actions.js +8 -0
- data/app/assets/js/turbo/turbo_debug.js +30 -0
- data/app/assets/js/turbo/turbo_frame_monkey_patch.js +23 -0
- data/app/views/{resource → application}/_color_modes.html.erb +3 -1
- data/app/views/application/_flash.html.erb +1 -0
- data/app/views/application/_resource_header.html.erb +721 -0
- data/app/views/application/_resource_sidebar.html.erb +12 -0
- data/app/views/components/action_button/action_button_component.html.erb +7 -0
- data/app/views/components/action_button/action_button_component.rb +15 -0
- data/app/views/components/base.rb +50 -0
- data/app/views/components/block/block_component.html.erb +3 -0
- data/app/views/components/block/block_component.rb +40 -0
- data/app/views/components/breadcrumbs/breadcrumbs_component.html.erb +96 -0
- data/app/views/components/breadcrumbs/breadcrumbs_component.rb +9 -0
- data/app/views/components/button/button_component.html.erb +11 -0
- data/app/views/components/button/button_component.rb +123 -0
- data/app/views/components/dyna_frame_content/dyna_frame_content_component.html.erb +7 -0
- data/app/views/components/dyna_frame_content/dyna_frame_content_component.rb +6 -0
- data/app/views/components/dyna_frame_host/dyna_frame_host_component.html.erb +4 -0
- data/app/views/components/dyna_frame_host/dyna_frame_host_component.rb +11 -0
- data/app/views/components/empty_card/empty_card_component.html.erb +6 -0
- data/app/views/components/empty_card/empty_card_component.rb +7 -0
- data/app/views/components/form/form_builder.rb +71 -0
- data/app/views/components/form/form_component.html.erb +77 -0
- data/app/views/components/form/form_component.rb +23 -0
- data/app/views/components/form/form_controller.js +13 -0
- data/app/views/components/header/header_component.html.erb +1 -0
- data/app/views/components/header/header_component.rb +7 -0
- data/app/views/components/interactive_action_form/interactive_action_form_component.html.erb +41 -0
- data/app/views/components/interactive_action_form/interactive_action_form_component.rb +8 -0
- data/app/views/components/interactive_action_form/interactive_action_form_controller.js +13 -0
- data/app/views/components/pagination/pagination_component.html.erb +6 -0
- data/app/views/components/pagination/pagination_component.rb +91 -0
- data/app/views/components/panel/panel_component.html.erb +10 -0
- data/app/views/components/panel/panel_component.rb +11 -0
- data/app/views/components/sidebar/sidebar_component.html.erb +154 -0
- data/app/views/components/sidebar/sidebar_component.rb +15 -0
- data/app/views/components/sidebar_menu/sidebar_menu_component.html.erb +3 -0
- data/app/views/components/sidebar_menu/sidebar_menu_component.rb +13 -0
- data/app/views/components/sidebar_menu_item/sidebar_menu_item_component.html.erb +72 -0
- data/app/views/components/sidebar_menu_item/sidebar_menu_item_component.rb +23 -0
- data/app/views/components/skeleton/table/table_component.html.erb +18 -0
- data/app/views/components/skeleton/table/table_component.rb +6 -0
- data/app/views/components/tab_bar/tab_bar_component.html.erb +11 -0
- data/app/views/components/tab_bar/tab_bar_component.rb +9 -0
- data/app/views/components/tab_bar/tab_bar_controller.js +8 -0
- data/app/views/components/table/table_component.html.erb +92 -0
- data/app/views/components/table/table_component.rb +63 -0
- data/app/views/components/table/table_controller.js +8 -0
- data/app/views/components/table_search_input/table_search_input_component.html.erb +42 -0
- data/app/views/components/table_search_input/table_search_input_component.rb +10 -0
- data/app/views/components/table_search_input/table_search_input_controller.js +8 -0
- data/app/views/components/table_toolbar/table_toolbar_component.html.erb +7 -0
- data/app/views/components/table_toolbar/table_toolbar_component.rb +9 -0
- data/app/views/components/table_toolbar/table_toolbar_controller.js +8 -0
- data/app/views/components/toolbar/toolbar_component.html.erb +67 -0
- data/app/views/components/toolbar/toolbar_component.rb +18 -0
- data/app/views/components/toolbar/toolbar_controller.js +8 -0
- data/app/views/layouts/resource.html copy.erb +51 -0
- data/app/views/layouts/resource.html.erb +32 -25
- data/app/views/layouts/rodauth.html.erb +32 -0
- data/app/views/resource/_interactive_resource_action_form.html.erb +4 -26
- data/app/views/resource/_resource_details.html.erb +26 -0
- data/app/views/resource/{_resource.rabl → _resource_details.rabl} +1 -1
- data/app/views/resource/_resource_form.html.erb +5 -0
- data/app/views/resource/_resource_table.html.erb +15 -0
- data/app/views/resource/edit.html.erb +4 -9
- data/app/views/resource/index.html.erb +4 -18
- data/app/views/resource/interactive_resource_collection_action.html.erb +3 -10
- data/app/views/resource/interactive_resource_record_action.html.erb +3 -10
- data/app/views/resource/interactive_resource_recordless_action.html.erb +3 -10
- data/app/views/resource/new.html.erb +3 -10
- data/app/views/resource/show.html.erb +4 -13
- data/app/views/resource/show.rabl +1 -1
- data/brakeman.ignore +5 -5
- data/build.js +12 -0
- data/config/initializers/hotwire_turbo_monkey_patches.rb +12 -0
- data/{lib/plutonium → config}/initializers/pagy.rb +0 -1
- data/config/initializers/simple_form.rb +54 -0
- data/lib/active_model/validations/array_validator.rb +1 -1
- data/lib/active_model/validations/attached_validator.rb +1 -1
- data/lib/active_model/validations/url_validator.rb +1 -1
- data/lib/generators/pu/core/install/install_generator.rb +1 -1
- data/lib/generators/pu/core/install/templates/app/controllers/resource_controller.rb.tt +2 -1
- data/lib/generators/pu/core/install/templates/app/interactions/resource_interaction.rb.tt +1 -1
- data/lib/generators/pu/core/install/templates/app/models/resource_record.rb.tt +1 -1
- data/lib/generators/pu/core/install/templates/app/policies/resource_policy.rb.tt +1 -1
- data/lib/generators/pu/core/install/templates/app/presenters/resource_presenter.rb.tt +1 -1
- data/lib/generators/pu/core/install/templates/app/query_objects/resource_query_object.rb.tt +2 -0
- data/lib/generators/pu/core/install/templates/config/packages.rb +1 -3
- data/lib/generators/pu/gem/pagy/pagy_generator.rb +1 -1
- data/lib/generators/pu/gem/rabl/rabl_generator.rb +1 -1
- data/lib/generators/pu/gem/simple_form/simple_form_generator.rb +1 -1
- data/lib/generators/pu/gen/component/component_generator.rb +87 -0
- data/lib/generators/pu/gen/component/templates/component.html.erb.tt +3 -0
- data/lib/generators/pu/gen/component/templates/component.rb.tt +9 -0
- data/lib/generators/pu/gen/component/templates/controller.js.tt +8 -0
- data/lib/generators/pu/lib/plutonium_generators/concerns/actions.rb +353 -0
- data/lib/generators/pu/lib/plutonium_generators/concerns/config.rb +39 -0
- data/lib/generators/pu/lib/plutonium_generators/concerns/logger.rb +36 -0
- data/lib/generators/pu/lib/plutonium_generators/concerns/serializer.rb +39 -0
- data/lib/generators/pu/lib/plutonium_generators/generator.rb +86 -0
- data/lib/generators/pu/lib/plutonium_generators/installer.rb +205 -0
- data/lib/generators/pu/lib/plutonium_generators/model_generator.rb +151 -0
- data/lib/generators/pu/lib/plutonium_generators.rb +7 -0
- data/lib/generators/pu/pkg/app/app_generator.rb +14 -4
- data/lib/generators/pu/pkg/app/templates/app/controllers/app_controller.rb.tt +5 -0
- data/lib/generators/pu/pkg/app/templates/app/controllers/dashboard_controller.rb.tt +6 -0
- data/lib/generators/pu/pkg/app/templates/app/controllers/{resource_controller.rb.tt → package_controller.rb.tt} +3 -3
- data/lib/generators/pu/pkg/app/templates/app/{interactions/resource_interaction.rb.tt → query_objects/resource_query_object.rb.tt} +1 -1
- data/lib/generators/pu/pkg/app/templates/app/views/package/dashboard/index.html.erb +23 -0
- data/lib/generators/pu/pkg/app/templates/config/routes.rb.tt +5 -3
- data/lib/generators/pu/pkg/feature/feature_generator.rb +4 -4
- data/lib/generators/pu/pkg/feature/templates/app/query_objects/resource_query_object.rb.tt +4 -0
- data/lib/generators/pu/{resource → res}/conn/conn_generator.rb +3 -2
- data/lib/generators/pu/res/conn/templates/.keep +0 -0
- data/lib/generators/pu/{resource → res}/conn/templates/app/controllers/resource_controller.rb.tt +1 -1
- data/lib/generators/pu/res/conn/templates/app/query_objects/resource_query_object.rb.tt +3 -0
- data/lib/generators/pu/res/model/model_generator.rb +36 -0
- data/lib/generators/pu/{resource → res}/model/templates/model.rb.tt +1 -1
- data/lib/generators/pu/res/scaffold/scaffold_generator.rb +43 -0
- data/lib/generators/pu/res/scaffold/templates/.keep +0 -0
- data/lib/generators/pu/{resource/model → res/scaffold}/templates/policy.rb.tt +2 -2
- data/lib/generators/pu/{resource/model → res/scaffold}/templates/presenter.rb.tt +0 -5
- data/lib/generators/pu/res/scaffold/templates/query_object.rb.tt +17 -0
- data/lib/generators/pu/rodauth/account_generator.rb +6 -17
- data/lib/generators/pu/rodauth/concerns/account_selector.rb +5 -1
- data/lib/generators/pu/rodauth/migration/active_record/base.erb +0 -4
- data/lib/generators/pu/rodauth/migration_generator.rb +2 -4
- data/lib/generators/pu/rodauth/templates/app/controllers/plugin_controller.rb.tt +11 -1
- data/lib/generators/pu/rodauth/templates/app/controllers/rodauth_controller.rb.tt +2 -1
- data/lib/generators/pu/rodauth/templates/app/mailers/account_mailer.rb.tt +1 -1
- data/lib/generators/pu/rodauth/templates/app/misc/account_rodauth_plugin.rb.tt +26 -11
- data/lib/generators/pu/rodauth/templates/app/misc/rodauth_plugin.rb.tt +1 -1
- data/lib/generators/pu/rodauth/templates/app/models/account.rb.tt +4 -1
- data/lib/generators/pu/rodauth/views_generator.rb +1 -14
- data/lib/plutonium/application/controller.rb +43 -0
- data/lib/plutonium/auth/{public_access.rb → public.rb} +1 -1
- data/lib/plutonium/auth.rb +0 -5
- data/lib/plutonium/builders/menus/sidebar_menu.rb.bk +26 -0
- data/lib/plutonium/builders/menus/sidebar_menu_item.rb.bk +28 -0
- data/lib/plutonium/component_registry.rb +19 -0
- data/lib/plutonium/config.rb +17 -2
- data/lib/plutonium/core/action.rb +9 -6
- data/lib/plutonium/core/actions/collection.rb +4 -0
- data/lib/plutonium/core/actions/destroy_action.rb +5 -3
- data/lib/plutonium/core/actions/edit_action.rb +5 -3
- data/lib/plutonium/core/actions/interactive_action.rb +1 -1
- data/lib/plutonium/core/actions/new_action.rb +5 -3
- data/lib/plutonium/core/actions/show_action.rb +5 -3
- data/lib/plutonium/core/autodiscovery/input_discoverer.rb +0 -2
- data/lib/plutonium/core/autodiscovery/renderer_discoverer.rb +0 -2
- data/lib/plutonium/core/controllers/authorizable.rb +3 -5
- data/lib/plutonium/core/controllers/base.rb +86 -0
- data/lib/plutonium/core/controllers/bootable.rb +5 -24
- data/lib/plutonium/core/controllers/crud_actions.rb +43 -8
- data/lib/plutonium/core/controllers/entity_scoping.rb +16 -5
- data/lib/plutonium/core/controllers/interactive_actions.rb +9 -7
- data/lib/plutonium/core/controllers/presentable.rb +11 -11
- data/lib/plutonium/core/controllers/queryable.rb +26 -0
- data/lib/plutonium/core/definers/input_definer.rb +47 -7
- data/lib/plutonium/core/definers/renderer_definer.rb +5 -3
- data/lib/plutonium/core/fields/inputs/base.rb +3 -3
- data/lib/plutonium/core/fields/inputs/date_time_input.rb +13 -0
- data/lib/plutonium/core/fields/inputs/factory.rb +13 -4
- data/lib/plutonium/core/fields/inputs/noop_input.rb +1 -1
- data/lib/plutonium/core/fields/inputs/phone_input.rb +22 -0
- data/lib/plutonium/core/fields/inputs/polymorphic_belongs_to_association_input.rb +47 -0
- data/lib/plutonium/core/fields/inputs/simple_form_association_input.rb +3 -2
- data/lib/plutonium/core/fields/inputs/simple_form_input.rb +4 -1
- data/lib/plutonium/core/fields/renderers/association_renderer.rb +4 -7
- data/lib/plutonium/core/ui/collection.rb +12 -8
- data/lib/plutonium/core/ui/detail.rb +8 -5
- data/lib/plutonium/core/ui/form.rb +6 -5
- data/lib/plutonium/helpers/action_buttons_helper.rb +23 -23
- data/lib/plutonium/helpers/application_helper.rb +0 -4
- data/lib/plutonium/helpers/attachment_helper.rb +1 -1
- data/lib/plutonium/helpers/component_helper.rb +14 -0
- data/lib/plutonium/helpers/display_helper.rb +6 -6
- data/lib/plutonium/helpers/form_helper.rb +29 -10
- data/lib/plutonium/helpers/table_helper.rb +35 -0
- data/lib/plutonium/helpers/turbo_helper.rb +2 -2
- data/lib/plutonium/helpers.rb +6 -19
- data/lib/plutonium/icons.rb +25 -0
- data/lib/plutonium/lib/after_commit.rb +2 -2
- data/lib/plutonium/{packaging → pkg}/app.rb +8 -6
- data/lib/plutonium/{packaging/package.rb → pkg/base.rb} +6 -2
- data/lib/plutonium/{packaging → pkg}/feature.rb +2 -2
- data/lib/plutonium/preserved__/{field.rb → field.rb.bk} +1 -1
- data/lib/plutonium/preserved__/{input.rb → input.rb.bk} +1 -1
- data/lib/plutonium/railtie.rb +17 -3
- data/lib/plutonium/reactor/core.rb +34 -19
- data/lib/plutonium/refinements/parameter_refinements.rb +2 -0
- data/lib/plutonium/resource/context.rb +5 -0
- data/lib/plutonium/resource/controller.rb +138 -0
- data/lib/plutonium/resource/interaction.rb +8 -0
- data/lib/plutonium/{reactor/resource_policy.rb → resource/policy.rb} +10 -3
- data/lib/plutonium/{reactor → resource}/policy_context.rb +1 -1
- data/lib/plutonium/{reactor/resource_presenter.rb → resource/presenter.rb} +2 -6
- data/lib/plutonium/resource/query_object.rb +219 -0
- data/lib/plutonium/{reactor/resource_record.rb → resource/record.rb} +55 -35
- data/lib/plutonium/rodauth/controller_methods.rb +12 -0
- data/lib/plutonium/{simple_form_components → simple_form}/attachment_component.rb +2 -0
- data/lib/plutonium/{simple_form_components → simple_form}/input_group_component.rb +2 -0
- data/lib/plutonium/version.rb +1 -1
- data/lib/plutonium.rb +33 -16
- data/package-lock.json +2523 -0
- data/package.json +21 -0
- data/postcss.config.js +11 -0
- data/public/plutonium-assets/application.css +1617 -811
- data/public/plutonium-assets/application.js +299 -300
- data/tailwind.config.js +91 -0
- metadata +754 -176
- data/app/views/resource/_details.html.erb +0 -6
- data/app/views/resource/_empty_card.html.erb +0 -12
- data/app/views/resource/_form.html.erb +0 -32
- data/app/views/resource/_header.html.erb +0 -8
- data/app/views/resource/_messages.html.erb +0 -1
- data/app/views/resource/_pagination.html.erb +0 -6
- data/app/views/resource/_pagy_pagination.html.erb +0 -15
- data/app/views/resource/_resource.html.erb +0 -1
- data/app/views/resource/_sidebar.html.erb +0 -11
- data/app/views/resource/_sidebar_menu.html.erb +0 -1
- data/app/views/resource/_table.html.erb +0 -78
- data/app/views/resource/_table_actions.html.erb +0 -15
- data/app/views/resource/_toolbar.html.erb +0 -22
- data/app/views/resource/_toolbar_actions.html.erb +0 -16
- data/app/views/resource/_toolbar_breadcrumbs.html.erb +0 -32
- data/app/views/resource/_toolbar_search_input.erb +0 -27
- data/lib/generators/pu/resource/model/model_generator.rb +0 -163
- data/lib/generators/pu/resource/scaffold/scaffold_generator.rb +0 -219
- data/lib/generators/pu/resource/scaffold/templates/app/controllers/admin_resources/resource_controller.rb.tt +0 -7
- data/lib/generators/pu/resource/scaffold/templates/app/controllers/entity_resources/resource_controller.rb.tt +0 -7
- data/lib/generators/pu/resource/scaffold/templates/app/policies/resources/admin/resource_policy.rb.tt +0 -22
- data/lib/generators/pu/resource/scaffold/templates/app/policies/resources/entity/resource_policy.rb.tt +0 -22
- data/lib/generators/pu/resource/scaffold/templates/app/policies/resources/resource_policy.rb.tt +0 -13
- data/lib/generators/pu/resource/scaffold/templates/app/resources/resource/admin_presenter.rb.tt +0 -7
- data/lib/generators/pu/resource/scaffold/templates/app/resources/resource/entity_presenter.rb.tt +0 -7
- data/lib/generators/pu/resource/scaffold/templates/app/resources/resource/presenter.rb.tt +0 -23
- data/lib/generators/pu/resource/scaffold/templates/app/views/resources/resource/_resource.html.erb.tt +0 -3
- data/lib/generators/pu/resource/scaffold/templates/app/views/resources/resource/_resource.rabl +0 -7
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/_email_auth_request_form.html.erb +0 -7
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/_login_form.html.erb +0 -26
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/_login_form_footer.html.erb +0 -9
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/add_recovery_codes.html.erb +0 -6
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/change_login.html.erb +0 -27
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/change_password.html.erb +0 -27
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/close_account.html.erb +0 -13
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/confirm_password.html.erb +0 -11
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/create_account.html.erb +0 -35
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/email_auth.html.erb +0 -5
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/login.html.erb +0 -4
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/logout.html.erb +0 -14
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/multi_phase_login.html.erb +0 -3
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/otp_auth.html.erb +0 -15
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/otp_disable.html.erb +0 -13
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/otp_setup.html.erb +0 -41
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/recovery_auth.html.erb +0 -11
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/recovery_codes.html.erb +0 -13
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/remember.html.erb +0 -22
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/reset_password.html.erb +0 -19
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/reset_password_request.html.erb +0 -17
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/sms_auth.html.erb +0 -15
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/sms_confirm.html.erb +0 -15
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/sms_disable.html.erb +0 -13
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/sms_request.html.erb +0 -5
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/sms_setup.html.erb +0 -23
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/two_factor_auth.html.erb +0 -5
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/two_factor_disable.html.erb +0 -13
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/two_factor_manage.html.erb +0 -22
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/unlock_account.html.erb +0 -15
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/unlock_account_request.html.erb +0 -9
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/verify_account.html.erb +0 -21
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/verify_account_resend.html.erb +0 -17
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/verify_login_change.html.erb +0 -5
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/webauthn_auth.html.erb +0 -15
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/webauthn_autofill.html.erb +0 -10
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb +0 -23
- data/lib/generators/pu/rodauth/templates/app/views/rodauth/webauthn_setup.html.erb +0 -23
- data/lib/plutonium/core/actions.rb +0 -17
- data/lib/plutonium/core/app_controller.rb +0 -121
- data/lib/plutonium/core/autodiscovery.rb +0 -13
- data/lib/plutonium/core/controllers.rb +0 -16
- data/lib/plutonium/core/definers.rb +0 -14
- data/lib/plutonium/core/fields/inputs.rb +0 -20
- data/lib/plutonium/core/fields/renderers.rb +0 -16
- data/lib/plutonium/core/fields.rb +0 -12
- data/lib/plutonium/core/ui.rb +0 -13
- data/lib/plutonium/core.rb +0 -16
- data/lib/plutonium/helpers/menu_helper.rb +0 -69
- data/lib/plutonium/helpers/pagination_helper.rb +0 -9
- data/lib/plutonium/initializers/TODO +0 -2
- data/lib/plutonium/initializers/patches.rb +0 -2
- data/lib/plutonium/initializers/simple_form.rb +0 -405
- data/lib/plutonium/packaging.rb +0 -9
- data/lib/plutonium/policy.rb +0 -8
- data/lib/plutonium/reactor/resource_context.rb +0 -5
- data/lib/plutonium/reactor/resource_controller.rb +0 -131
- data/lib/plutonium/reactor/resource_interaction.rb +0 -8
- data/lib/plutonium/reactor.rb +0 -14
- /data/app/views/{resource/_flash.html.erb → application/_flash_alerts.html.erb} +0 -0
- /data/app/views/{resource/_toast.html.erb → application/_flash_toasts.html.erb} +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/_email_auth_request_form.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/_login_form.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/_login_form_footer.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/add_recovery_codes.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/change_login.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/change_password.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/close_account.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/confirm_password.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/create_account.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/email_auth.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/login.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/logout.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/multi_phase_login.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/otp_auth.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/otp_disable.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/otp_setup.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/recovery_auth.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/recovery_codes.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/remember.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/reset_password.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/reset_password_request.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/sms_auth.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/sms_confirm.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/sms_disable.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/sms_request.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/sms_setup.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/two_factor_auth.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/two_factor_disable.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/two_factor_manage.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/unlock_account.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/unlock_account_request.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/verify_account.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/verify_account_resend.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/verify_login_change.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/webauthn_auth.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/webauthn_autofill.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/webauthn_remove.html.erb +0 -0
- /data/{lib/generators/pu/rodauth/templates/app/views/rodauth/tailwind → app/views/rodauth}/webauthn_setup.html.erb +0 -0
- /data/{lib/plutonium → config}/initializers/rabl.rb +0 -0
- /data/lib/generators/pu/{resource/conn/templates → pkg/app/templates/app/views/package}/.keep +0 -0
- /data/lib/generators/pu/{resource → res}/conn/templates/app/policies/resource_policy.rb.tt +0 -0
- /data/lib/generators/pu/{resource → res}/conn/templates/app/presenters/resource_presenter.rb.tt +0 -0
- /data/lib/generators/pu/{resource → res}/model/USAGE +0 -0
- /data/lib/generators/pu/{resource → res}/model/templates/create_table_migration.rb.tt +0 -0
- /data/lib/generators/pu/{resource → res}/model/templates/module.rb.tt +0 -0
- /data/lib/generators/pu/{resource/model → res/scaffold}/templates/controller.rb.tt +0 -0
@@ -12,19 +12,17 @@ module Plutonium
|
|
12
12
|
after_action :verify_policy_scoped, except: %i[new create]
|
13
13
|
|
14
14
|
helper_method :permitted_attributes
|
15
|
+
helper_method :current_policy
|
15
16
|
end
|
16
17
|
|
17
18
|
private
|
18
19
|
|
19
20
|
def policy_namespace(scope)
|
20
|
-
|
21
|
+
[current_package.to_s.underscore.to_sym, scope]
|
21
22
|
end
|
22
23
|
|
23
24
|
def policy_context
|
24
|
-
|
25
|
-
user: current_user,
|
26
|
-
resource_context: resource_context
|
27
|
-
)
|
25
|
+
raise NotImplementedError, "policy_context"
|
28
26
|
end
|
29
27
|
|
30
28
|
def pundit_user
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module Plutonium
|
2
|
+
module Core
|
3
|
+
module Controllers
|
4
|
+
module Base
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
include Plutonium::Core::Controllers::Bootable
|
7
|
+
include Plutonium::Core::Controllers::EntityScoping
|
8
|
+
|
9
|
+
included do
|
10
|
+
add_flash_types :success, :warning, :error
|
11
|
+
|
12
|
+
before_action :set_page_title
|
13
|
+
|
14
|
+
before_action do
|
15
|
+
next unless defined?(ActiveStorage)
|
16
|
+
|
17
|
+
ActiveStorage::Current.url_options = {protocol: request.protocol, host: request.host, port: request.port}
|
18
|
+
end
|
19
|
+
|
20
|
+
helper Plutonium::Helpers
|
21
|
+
helper_method :page_title, :resource_url_for, :resource_url_args_for
|
22
|
+
|
23
|
+
append_view_path File.expand_path("app/views", Plutonium.root)
|
24
|
+
layout -> { turbo_frame_request? ? false : "resource" }
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def set_page_title
|
30
|
+
@page_title = "Pluton8"
|
31
|
+
end
|
32
|
+
|
33
|
+
def page_title(title)
|
34
|
+
[title.presence, Rails.application.class.module_parent.name].compact.join(" | ")
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Returns a dynamic list of args to be used with `url_for` which considers the route namespace and nesting.
|
39
|
+
# The current entity and parent record (for nested routes) are inserted appropriately, ensuring that generated urls
|
40
|
+
# obey the current routing.
|
41
|
+
#
|
42
|
+
# e.g. of route helpers that will be invoked given the output of this method
|
43
|
+
#
|
44
|
+
# - when invoked in a root route (/acme/dashboard/users)
|
45
|
+
#
|
46
|
+
# `resource_url_args_for User` => `entity_users_*`
|
47
|
+
# `resource_url_args_for @user` => `entity_user_*`
|
48
|
+
# `resource_url_args_for @user, action: :edit` => `edit_entity_user_*`
|
49
|
+
# `resource_url_args_for @user, Post => `entity_user_posts_*`
|
50
|
+
#
|
51
|
+
# - when invoked in a nested route (/acme/dashboard/users/1/post/1)
|
52
|
+
#
|
53
|
+
# `resource_url_args_for Post` => `entity_user_posts_*`
|
54
|
+
# `resource_url_args_for @post` => `entity_user_post_*`
|
55
|
+
# `resource_url_args_for @post, action: :edit` => `edit_entity_user_post_*`
|
56
|
+
#
|
57
|
+
# @param [Class, ApplicationRecord] *args arguments you would normally pass to `url_for`
|
58
|
+
# @param [Symbol] action optional action to invoke e.g. :new, :edit
|
59
|
+
#
|
60
|
+
# @return [Array[Class, ApplicationRecord, Symbol]] args to pass to `url_for`
|
61
|
+
#
|
62
|
+
def resource_url_args_for(*args, action: nil, parent: nil, **kwargs)
|
63
|
+
# If the last item is a class and the action is :new e.g. `resource_url User, action: :new`,
|
64
|
+
# it must be converted into a symbol to generate the appropriate helper i.e `new_user_*`
|
65
|
+
# to match the url helper generated by `resources :users`
|
66
|
+
resource = args.pop
|
67
|
+
resource = resource.model_name.singular_route_key.to_sym if action == :new && resource.is_a?(Class)
|
68
|
+
args.push resource
|
69
|
+
|
70
|
+
base_args = if scoped_to_entity? && scoped_entity_strategy == :path
|
71
|
+
[action, current_scoped_entity.becomes(scoped_entity_class), parent]
|
72
|
+
else
|
73
|
+
[action, parent]
|
74
|
+
end
|
75
|
+
|
76
|
+
# rails compacts this list. no need to handle nils
|
77
|
+
base_args + args + [**kwargs]
|
78
|
+
end
|
79
|
+
|
80
|
+
def resource_url_for(...)
|
81
|
+
send(current_package.name.underscore.to_sym).url_for(resource_url_args_for(...))
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -5,38 +5,19 @@ module Plutonium
|
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
7
|
included do
|
8
|
-
class_attribute :
|
9
|
-
class_attribute :
|
8
|
+
class_attribute :current_package, instance_writer: false, instance_predicate: false
|
9
|
+
class_attribute :current_engine, instance_writer: false, instance_predicate: false
|
10
10
|
|
11
|
-
helper_method :
|
11
|
+
helper_method :current_engine, :current_package
|
12
12
|
end
|
13
13
|
|
14
14
|
class_methods do
|
15
|
-
def current_engine
|
16
|
-
"#{package}::Engine".constantize
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
15
|
def boot(package)
|
22
|
-
self.
|
16
|
+
self.current_package = package
|
17
|
+
self.current_engine = "#{package}::Engine".constantize
|
23
18
|
|
24
19
|
prepend_view_path current_engine.paths["app/views"].first
|
25
20
|
end
|
26
|
-
|
27
|
-
def controller_for(resource_class)
|
28
|
-
self.resource_class = resource_class
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
|
-
|
34
|
-
def current_engine
|
35
|
-
@current_engine ||= self.class.current_engine
|
36
|
-
end
|
37
|
-
|
38
|
-
def current_package
|
39
|
-
self.class.package
|
40
21
|
end
|
41
22
|
end
|
42
23
|
end
|
@@ -4,12 +4,19 @@ module Plutonium
|
|
4
4
|
module CrudActions
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
|
+
included do
|
8
|
+
helper_method :preferred_action_after_submit
|
9
|
+
end
|
10
|
+
|
7
11
|
# GET /resources(.{format})
|
8
12
|
def index
|
9
13
|
authorize resource_class
|
10
14
|
|
11
|
-
@
|
12
|
-
|
15
|
+
@search_object = current_query_object
|
16
|
+
base_query = policy_scope(resource_class)
|
17
|
+
base_query = @search_object.apply(base_query)
|
18
|
+
base_query = base_query.send(params[:scope].to_sym) if params[:scope].present?
|
19
|
+
@pagy, @resource_records = pagy base_query
|
13
20
|
@collection = build_collection
|
14
21
|
|
15
22
|
render :index
|
@@ -44,10 +51,10 @@ module Plutonium
|
|
44
51
|
respond_to do |format|
|
45
52
|
if resource_record.save
|
46
53
|
format.html do
|
47
|
-
redirect_to
|
54
|
+
redirect_to redirect_url_after_submit,
|
48
55
|
notice: "#{resource_class.model_name.human} was successfully created."
|
49
56
|
end
|
50
|
-
format.any { render :show, status: :created, location:
|
57
|
+
format.any { render :show, status: :created, location: redirect_url_after_submit }
|
51
58
|
else
|
52
59
|
format.html do
|
53
60
|
@form = build_form
|
@@ -78,10 +85,10 @@ module Plutonium
|
|
78
85
|
respond_to do |format|
|
79
86
|
if resource_record.update(resource_params)
|
80
87
|
format.html do
|
81
|
-
redirect_to
|
88
|
+
redirect_to redirect_url_after_submit, notice: "#{resource_class.model_name.human} was successfully updated.",
|
82
89
|
status: :see_other
|
83
90
|
end
|
84
|
-
format.any { render :show, status: :ok, location:
|
91
|
+
format.any { render :show, status: :ok, location: redirect_url_after_submit }
|
85
92
|
else
|
86
93
|
format.html do
|
87
94
|
@form = build_form
|
@@ -103,13 +110,13 @@ module Plutonium
|
|
103
110
|
resource_record.destroy
|
104
111
|
|
105
112
|
format.html do
|
106
|
-
redirect_to
|
113
|
+
redirect_to resource_url_for(resource_class),
|
107
114
|
notice: "#{resource_class.model_name.human} was successfully deleted."
|
108
115
|
end
|
109
116
|
format.json { head :no_content }
|
110
117
|
rescue ActiveRecord::InvalidForeignKey
|
111
118
|
format.html do
|
112
|
-
redirect_to
|
119
|
+
redirect_to resource_url_for(resource_record),
|
113
120
|
alert: "#{resource_class.model_name.human} is referenced by other records."
|
114
121
|
end
|
115
122
|
format.any do
|
@@ -120,6 +127,34 @@ module Plutonium
|
|
120
127
|
end
|
121
128
|
end
|
122
129
|
end
|
130
|
+
|
131
|
+
private
|
132
|
+
|
133
|
+
def redirect_url_after_submit
|
134
|
+
url = case preferred_action_after_submit
|
135
|
+
when "show"
|
136
|
+
resource_url_for(resource_record) if current_policy.show?
|
137
|
+
when "edit"
|
138
|
+
resource_url_for(resource_record, action: :edit) if current_policy.edit?
|
139
|
+
when "new"
|
140
|
+
resource_url_for(resource_class, action: :new) if current_policy.new?
|
141
|
+
when "index"
|
142
|
+
resource_url_for(resource_class) if current_policy.index?
|
143
|
+
else
|
144
|
+
# ensure we have a valid value
|
145
|
+
session[:action_after_submit_preference] = "show"
|
146
|
+
end
|
147
|
+
url || resource_url_for(resource_record)
|
148
|
+
end
|
149
|
+
|
150
|
+
def preferred_action_after_submit
|
151
|
+
@preferred_action_after_submit = begin
|
152
|
+
if %w[new edit show index].include? params[:commit]
|
153
|
+
session[:action_after_submit_preference] = params[:commit]
|
154
|
+
end
|
155
|
+
session[:action_after_submit_preference] || "show"
|
156
|
+
end
|
157
|
+
end
|
123
158
|
end
|
124
159
|
end
|
125
160
|
end
|
@@ -15,6 +15,10 @@ module Plutonium
|
|
15
15
|
current_engine.scoped_to_entity?
|
16
16
|
end
|
17
17
|
|
18
|
+
def scoped_entity_strategy
|
19
|
+
current_engine.scoped_entity_strategy
|
20
|
+
end
|
21
|
+
|
18
22
|
def scoped_entity_class
|
19
23
|
ensure_legal_entity_scoping_method_access! :scoped_entity_class
|
20
24
|
|
@@ -30,7 +34,7 @@ module Plutonium
|
|
30
34
|
def scoped_entity_session_key
|
31
35
|
ensure_legal_entity_scoping_method_access! :scoped_entity_session_key
|
32
36
|
|
33
|
-
:
|
37
|
+
:"#{current_package.name.underscore}__scoped_entity_id"
|
34
38
|
end
|
35
39
|
|
36
40
|
def current_scoped_entity
|
@@ -38,10 +42,17 @@ module Plutonium
|
|
38
42
|
|
39
43
|
return unless current_user.present?
|
40
44
|
|
41
|
-
@current_scoped_entity ||=
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
+
@current_scoped_entity ||= case scoped_entity_strategy
|
46
|
+
when :current_user
|
47
|
+
current_user
|
48
|
+
when :path
|
49
|
+
scoped_entity_class
|
50
|
+
.associated_with(current_user)
|
51
|
+
.from_path_param(request.path_parameters[scoped_entity_param_key])
|
52
|
+
.first! # Raise NotFound if user does not have access to the entity or it does not exist
|
53
|
+
else
|
54
|
+
raise NotImplementedError, "unknown scoped entity strategy: #{scoped_entity_strategy}"
|
55
|
+
end
|
45
56
|
end
|
46
57
|
|
47
58
|
def remember_scoped_entity
|
@@ -5,6 +5,8 @@ module Plutonium
|
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
7
|
included do
|
8
|
+
helper_method :current_interactive_action
|
9
|
+
|
8
10
|
before_action :validate_interactive_resource_action, only: %i[
|
9
11
|
begin_interactive_resource_record_action commit_interactive_resource_record_action
|
10
12
|
begin_interactive_resource_collection_action commit_interactive_resource_collection_action
|
@@ -41,13 +43,13 @@ module Plutonium
|
|
41
43
|
if @interaction.valid?
|
42
44
|
flash[:notice] = "TODO:#{current_interactive_action} was successfully updated."
|
43
45
|
|
44
|
-
format.html { redirect_to
|
45
|
-
format.any { render :show, status: :ok, location:
|
46
|
+
format.html { redirect_to resource_url_for(@interaction.result), status: :see_other }
|
47
|
+
format.any { render :show, status: :ok, location: resource_url_for(@interaction.result) }
|
46
48
|
|
47
49
|
if helpers.current_turbo_frame == "modal"
|
48
50
|
format.turbo_stream do
|
49
51
|
render turbo_stream: [
|
50
|
-
turbo_stream.redirect(
|
52
|
+
turbo_stream.redirect(resource_url_for(@interaction.result))
|
51
53
|
]
|
52
54
|
end
|
53
55
|
end
|
@@ -93,11 +95,11 @@ module Plutonium
|
|
93
95
|
|
94
96
|
flash[:notice] = "TODO:#{current_interactive_action} #{collection_count} #{resource_class.model_name.human.pluralize(collection_count)} successfully updated."
|
95
97
|
|
96
|
-
format.html { redirect_to
|
98
|
+
format.html { redirect_to resource_url_for(resource_class) }
|
97
99
|
if helpers.current_turbo_frame == "modal"
|
98
100
|
format.turbo_stream do
|
99
101
|
render turbo_stream: [
|
100
|
-
turbo_stream.redirect(
|
102
|
+
turbo_stream.redirect(resource_url_for(resource_class))
|
101
103
|
]
|
102
104
|
end
|
103
105
|
end
|
@@ -143,12 +145,12 @@ module Plutonium
|
|
143
145
|
if @interaction.valid?
|
144
146
|
flash[:notice] = "TODO:#{current_interactive_action} was successfully updated."
|
145
147
|
|
146
|
-
format.html { redirect_to
|
148
|
+
format.html { redirect_to resource_url_for(resource_class) }
|
147
149
|
|
148
150
|
if helpers.current_turbo_frame == "modal"
|
149
151
|
format.turbo_stream do
|
150
152
|
render turbo_stream: [
|
151
|
-
turbo_stream.redirect(
|
153
|
+
turbo_stream.redirect(resource_url_for(resource_class))
|
152
154
|
]
|
153
155
|
end
|
154
156
|
end
|
@@ -11,11 +11,12 @@ module Plutonium
|
|
11
11
|
private
|
12
12
|
|
13
13
|
def resource_presenter(resource_class, resource_record)
|
14
|
-
|
14
|
+
presenter_class = "#{resource_class}Presenter".constantize
|
15
|
+
presenter_class.new resource_context, resource_record
|
15
16
|
end
|
16
17
|
|
17
18
|
def current_presenter
|
18
|
-
resource_presenter resource_class, @resource_record
|
19
|
+
@current_presenter ||= resource_presenter resource_class, @resource_record
|
19
20
|
end
|
20
21
|
|
21
22
|
def presentable_attributes
|
@@ -28,30 +29,29 @@ module Plutonium
|
|
28
29
|
end
|
29
30
|
|
30
31
|
def build_collection
|
31
|
-
Plutonium::Core::
|
32
|
+
Plutonium::Core::Ui::Collection.new(
|
32
33
|
resource_class:,
|
33
34
|
records: @resource_records,
|
34
|
-
fields: current_presenter.defined_renderers_for(presentable_attributes),
|
35
|
+
fields: current_presenter.defined_renderers_for(*presentable_attributes),
|
35
36
|
actions: current_presenter.actions,
|
36
|
-
|
37
|
-
search_object: @
|
38
|
-
search_field: current_presenter.search_field
|
37
|
+
pager: @pagy,
|
38
|
+
search_object: @search_object
|
39
39
|
)
|
40
40
|
end
|
41
41
|
|
42
42
|
def build_detail
|
43
|
-
Plutonium::Core::
|
43
|
+
Plutonium::Core::Ui::Detail.new(
|
44
44
|
resource_class:,
|
45
45
|
record: resource_record,
|
46
|
-
fields: current_presenter.defined_renderers_for(presentable_attributes),
|
46
|
+
fields: current_presenter.defined_renderers_for(*presentable_attributes),
|
47
47
|
actions: current_presenter.actions
|
48
48
|
)
|
49
49
|
end
|
50
50
|
|
51
51
|
def build_form
|
52
|
-
Plutonium::Core::
|
52
|
+
Plutonium::Core::Ui::Form.new(
|
53
53
|
record: resource_record,
|
54
|
-
inputs: current_presenter.defined_inputs_for(presentable_attributes)
|
54
|
+
inputs: current_presenter.defined_inputs_for(*presentable_attributes)
|
55
55
|
)
|
56
56
|
end
|
57
57
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Plutonium
|
2
|
+
module Core
|
3
|
+
module Controllers
|
4
|
+
module Queryable
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
helper_method :resource_query_params
|
9
|
+
end
|
10
|
+
|
11
|
+
def resource_query_object(resource_class, params)
|
12
|
+
query_object_class = "#{resource_class}QueryObject".constantize
|
13
|
+
query_object_class.new resource_context, params
|
14
|
+
end
|
15
|
+
|
16
|
+
def current_query_object
|
17
|
+
@current_query_object ||= resource_query_object resource_class, resource_query_params
|
18
|
+
end
|
19
|
+
|
20
|
+
def resource_query_params
|
21
|
+
(params[:q]&.to_unsafe_h || {}).with_indifferent_access
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -5,24 +5,62 @@ module Plutonium
|
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
include Plutonium::Core::Autodiscovery::InputDiscoverer
|
7
7
|
|
8
|
-
|
8
|
+
class InputDefinitions
|
9
|
+
def initialize(hash)
|
10
|
+
@hash = hash
|
11
|
+
end
|
12
|
+
|
13
|
+
def []=(key, value)
|
14
|
+
hash[key] = value
|
15
|
+
end
|
16
|
+
|
17
|
+
def [](key)
|
18
|
+
hash[key]
|
19
|
+
end
|
20
|
+
|
21
|
+
def slice(*)
|
22
|
+
self.class.new(hash.slice(*))
|
23
|
+
end
|
24
|
+
|
25
|
+
def collect_all(params)
|
26
|
+
hash.values.map { |input| input.collect params }.reduce(:merge) || {}
|
27
|
+
end
|
28
|
+
|
29
|
+
def size
|
30
|
+
hash.size
|
31
|
+
end
|
32
|
+
|
33
|
+
def keys
|
34
|
+
hash.keys
|
35
|
+
end
|
36
|
+
|
37
|
+
def values
|
38
|
+
hash.values
|
39
|
+
end
|
40
|
+
|
41
|
+
def blank?
|
42
|
+
hash.blank?
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
attr_reader :hash
|
48
|
+
end
|
49
|
+
|
50
|
+
def defined_inputs_for(*names)
|
9
51
|
(names - input_definitions.keys).each do |name|
|
10
52
|
define_input(name, input: autodiscover_input(name))
|
11
53
|
end
|
12
54
|
input_definitions.slice(*names)
|
13
55
|
end
|
14
56
|
|
15
|
-
private
|
16
|
-
|
17
|
-
def input_definitions = @input_definitions ||= {}
|
18
|
-
|
19
57
|
def define_input(name, input: nil, type: nil, **options)
|
20
58
|
input_definitions[name] = if input.present?
|
21
59
|
input
|
22
60
|
elsif type.present?
|
23
|
-
Plutonium::Core::Fields::Inputs.build(name, type:, **options)
|
61
|
+
Plutonium::Core::Fields::Inputs::Factory.build(name, type:, **options)
|
24
62
|
elsif options.present?
|
25
|
-
Plutonium::Core::Fields::Inputs::Factory.for_resource_attribute(
|
63
|
+
Plutonium::Core::Fields::Inputs::Factory.for_resource_attribute(resource_class, name, **options)
|
26
64
|
else
|
27
65
|
autodiscover_input(name)
|
28
66
|
end
|
@@ -31,6 +69,8 @@ module Plutonium
|
|
31
69
|
def input_defined?(name)
|
32
70
|
input_definitions.key? name
|
33
71
|
end
|
72
|
+
|
73
|
+
def input_definitions = @input_definitions ||= InputDefinitions.new({})
|
34
74
|
end
|
35
75
|
end
|
36
76
|
end
|
@@ -5,7 +5,7 @@ module Plutonium
|
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
include Plutonium::Core::Autodiscovery::RendererDiscoverer
|
7
7
|
|
8
|
-
def defined_renderers_for(names)
|
8
|
+
def defined_renderers_for(*names)
|
9
9
|
(names - renderer_definitions.keys).each do |name|
|
10
10
|
define_renderer(name, renderer: autodiscover_renderer(name))
|
11
11
|
end
|
@@ -19,8 +19,10 @@ module Plutonium
|
|
19
19
|
def define_renderer(name, renderer: nil, type: nil, **options)
|
20
20
|
renderer_definitions[name] = if renderer.present?
|
21
21
|
renderer
|
22
|
-
elsif type.present?
|
23
|
-
Plutonium::Core::Fields::Renderers::Factory.
|
22
|
+
elsif type.present?
|
23
|
+
Plutonium::Core::Fields::Renderers::Factory.build(name, type:, **options)
|
24
|
+
elsif options.present?
|
25
|
+
Plutonium::Core::Fields::Renderers::Factory.for_resource_attribute(resource_class, name, **options)
|
24
26
|
else
|
25
27
|
autodiscover_renderer(name)
|
26
28
|
end
|
@@ -10,7 +10,7 @@ module Plutonium
|
|
10
10
|
@user_options = user_options
|
11
11
|
end
|
12
12
|
|
13
|
-
def render(f, record)
|
13
|
+
def render(f, record, **)
|
14
14
|
raise NotImplementedError, "#{self.class}#render"
|
15
15
|
end
|
16
16
|
|
@@ -26,8 +26,8 @@ module Plutonium
|
|
26
26
|
# - parameter(1i)
|
27
27
|
# - parameter(2f)
|
28
28
|
regex = /^#{param}(\(\d+[if]?\))?$/
|
29
|
-
|
30
|
-
params.
|
29
|
+
keys = params.select { |key, value| regex.match?(key) }.keys
|
30
|
+
params.slice(*keys)
|
31
31
|
end
|
32
32
|
|
33
33
|
protected
|
@@ -9,12 +9,17 @@ module Plutonium
|
|
9
9
|
|
10
10
|
map_type :has_one, to: Plutonium::Core::Fields::Inputs::NoopInput
|
11
11
|
map_type :belongs_to, to: Plutonium::Core::Fields::Inputs::BelongsToAssociationInput
|
12
|
+
map_type :polymorphic_belongs_to, to: Plutonium::Core::Fields::Inputs::PolymorphicBelongsToAssociationInput
|
12
13
|
map_type :has_many, to: Plutonium::Core::Fields::Inputs::HasManyAssociationInput
|
13
14
|
map_type :attachment, to: Plutonium::Core::Fields::Inputs::AttachmentInput
|
15
|
+
map_type :datetime, :date, :time, to: Plutonium::Core::Fields::Inputs::DateTimeInput
|
16
|
+
map_type :phone, to: Plutonium::Core::Fields::Inputs::PhoneInput
|
17
|
+
# map_type :text, :string, to: Plutonium::Core::Fields::Inputs::SimpleFormInput
|
14
18
|
|
15
|
-
def self.build(name, type:, **)
|
16
|
-
|
17
|
-
mapping
|
19
|
+
def self.build(name, type:, **options)
|
20
|
+
input_type = options[:as] || type
|
21
|
+
mapping = mappings[input_type] || Plutonium::Core::Fields::Inputs::SimpleFormInput
|
22
|
+
mapping.new(name, **options)
|
18
23
|
end
|
19
24
|
|
20
25
|
def self.for_resource_attribute(resource_class, attr_name, **options)
|
@@ -24,11 +29,15 @@ module Plutonium
|
|
24
29
|
type = :attachment
|
25
30
|
options[:reflection] = attachment
|
26
31
|
elsif (association = resource_class.try(:reflect_on_association, attr_name))
|
27
|
-
type = association.macro
|
32
|
+
type = association.polymorphic? ? :"polymorphic_#{association.macro}" : association.macro
|
28
33
|
options[:reflection] = association
|
29
34
|
elsif (column = resource_class.try(:column_for_attribute, attr_name))
|
30
35
|
type = column.type
|
31
36
|
options[:multiple] = column.try(:array?) if options[:multiple].nil?
|
37
|
+
elsif (filter = resource_class.try(:filters).try(:[], attr_name))
|
38
|
+
# type = filter.database_column_type
|
39
|
+
options[:hint] ||= filter.desc
|
40
|
+
options[:multiple] = column.try(:array?) if options[:multiple].nil?
|
32
41
|
end
|
33
42
|
|
34
43
|
build(attr_name, type:, **options)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Plutonium
|
2
|
+
module Core
|
3
|
+
module Fields
|
4
|
+
module Inputs
|
5
|
+
class PhoneInput < SimpleFormInput
|
6
|
+
# def render(f, record, **opts)
|
7
|
+
# opts = options.deep_merge opts
|
8
|
+
# opts.delete(:as)
|
9
|
+
# f.input name, **opts
|
10
|
+
# end
|
11
|
+
|
12
|
+
# def collect(params)
|
13
|
+
# value = params[param]
|
14
|
+
# country = user_options[:country]
|
15
|
+
# country ||= params[user_options[:country_param].to_sym] if user_options[:country_param].present?
|
16
|
+
# {param => Phonelib.parse(value, country).full_e164}
|
17
|
+
# end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|