mirror of
https://github.com/ash-project/ash_admin.git
synced 2024-09-19 12:53:28 +12:00
WIP
This commit is contained in:
parent
e35824956d
commit
df51832cbc
12 changed files with 1054 additions and 662 deletions
|
@ -5,31 +5,59 @@ import NProgress from "nprogress"
|
|||
import { LiveSocket, Browser } from "phoenix_live_view"
|
||||
import 'alpinejs'
|
||||
|
||||
function cookieValue(name) {
|
||||
if (document.cookie) {
|
||||
let cookie =
|
||||
document.cookie
|
||||
.split('; ')
|
||||
.find(row => row.startsWith(name + '='))
|
||||
if (cookie) {
|
||||
let value = cookie.split('=')[1];
|
||||
|
||||
if (value) {
|
||||
return value.split(';')[0]
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
let socketPath = document.querySelector("html").getAttribute("phx-socket") || "/live"
|
||||
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
|
||||
let Hooks = {}
|
||||
const editors = {};
|
||||
|
||||
Hooks.JsonEditor = {
|
||||
mounted() {
|
||||
const inputId = this.el.getAttribute("data-input-id")
|
||||
const hook = this;
|
||||
this.editor = new JSONEditor(this.el, {
|
||||
onChangeJSON: (json) => {
|
||||
const target = document.getElementById(inputId)
|
||||
|
||||
target.value = JSON.stringify(json)
|
||||
target.dispatchEvent(new Event('change', { 'bubbles': true }))
|
||||
},
|
||||
onModeChange: (newMode) => {
|
||||
hook.mode = newMode;
|
||||
},
|
||||
modes: ['preview', 'tree']
|
||||
}, JSON.parse(document.getElementById(inputId).value));
|
||||
|
||||
editors[this.el.id] = this.editor
|
||||
}
|
||||
}
|
||||
|
||||
Hooks.JsonView = {
|
||||
updated() {
|
||||
const json = JSON.parse(this.el.getAttribute("data-json"));
|
||||
this.editor = new JSONEditor(this.el, {
|
||||
mode: 'preview'
|
||||
}, json)
|
||||
},
|
||||
mounted() {
|
||||
const json = JSON.parse(this.el.getAttribute("data-json"));
|
||||
this.editor = new JSONEditor(this.el, {
|
||||
mode: 'preview'
|
||||
}, json)
|
||||
}
|
||||
}
|
||||
|
||||
Hooks.JsonEditorSource = {
|
||||
updated() {
|
||||
try {
|
||||
editors[this.el.getAttribute("data-editor-id")].update(JSON.parse(response))
|
||||
updateText(this.el.value)
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Hooks.Actor = {
|
||||
mounted() {
|
||||
this.handleEvent("set_actor", (payload) => {
|
||||
|
|
1054
assets/package-lock.json
generated
1054
assets/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -31,6 +31,6 @@
|
|||
"tailwindcss": "^2.0.1",
|
||||
"terser-webpack-plugin": "^2.3.2",
|
||||
"webpack": "4.41.5",
|
||||
"webpack-cli": "^3.3.2"
|
||||
"webpack-cli": "^4.7.2"
|
||||
}
|
||||
}
|
||||
|
|
461
assets/yarn.lock
461
assets/yarn.lock
|
@ -650,6 +650,11 @@
|
|||
"lodash" "^4.17.13"
|
||||
"to-fast-properties" "^2.0.0"
|
||||
|
||||
"@discoveryjs/json-ext@^0.5.0":
|
||||
"integrity" "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g=="
|
||||
"resolved" "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz"
|
||||
"version" "0.5.3"
|
||||
|
||||
"@fullhuman/postcss-purgecss@^3.0.0":
|
||||
"integrity" "sha512-cvuOgMwIVlfgWcUMqg5p33NbGUxLwMrKtDKkm3QRfOo4PRVNR6+y/xd9OyXTVZiB1bIpKNJ0ZObYPWD3DRQDtw=="
|
||||
"resolved" "https://registry.npmjs.org/@fullhuman/postcss-purgecss/-/postcss-purgecss-3.0.0.tgz"
|
||||
|
@ -826,6 +831,23 @@
|
|||
"@webassemblyjs/wast-parser" "1.8.5"
|
||||
"@xtuc/long" "4.2.2"
|
||||
|
||||
"@webpack-cli/configtest@^1.0.4":
|
||||
"integrity" "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ=="
|
||||
"resolved" "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz"
|
||||
"version" "1.0.4"
|
||||
|
||||
"@webpack-cli/info@^1.3.0":
|
||||
"integrity" "sha512-ASiVB3t9LOKHs5DyVUcxpraBXDOKubYu/ihHhU+t1UPpxsivg6Od2E2qU4gJCekfEddzRBzHhzA/Acyw/mlK/w=="
|
||||
"resolved" "https://registry.npmjs.org/@webpack-cli/info/-/info-1.3.0.tgz"
|
||||
"version" "1.3.0"
|
||||
dependencies:
|
||||
"envinfo" "^7.7.3"
|
||||
|
||||
"@webpack-cli/serve@^1.5.1":
|
||||
"integrity" "sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw=="
|
||||
"resolved" "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.1.tgz"
|
||||
"version" "1.5.1"
|
||||
|
||||
"@xtuc/ieee754@^1.2.0":
|
||||
"integrity" "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA=="
|
||||
"resolved" "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz"
|
||||
|
@ -972,6 +994,14 @@
|
|||
dependencies:
|
||||
"color-convert" "^2.0.1"
|
||||
|
||||
"anymatch@^2.0.0":
|
||||
"integrity" "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw=="
|
||||
"resolved" "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
dependencies:
|
||||
"micromatch" "^3.1.4"
|
||||
"normalize-path" "^2.1.1"
|
||||
|
||||
"anymatch@~3.1.1":
|
||||
"integrity" "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg=="
|
||||
"resolved" "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz"
|
||||
|
@ -1071,6 +1101,11 @@
|
|||
"resolved" "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"async-each@^1.0.1":
|
||||
"integrity" "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ=="
|
||||
"resolved" "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz"
|
||||
"version" "1.0.3"
|
||||
|
||||
"async-foreach@^0.1.3":
|
||||
"integrity" "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI="
|
||||
"resolved" "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz"
|
||||
|
@ -1165,11 +1200,23 @@
|
|||
"resolved" "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz"
|
||||
"version" "5.2.2"
|
||||
|
||||
"binary-extensions@^1.0.0":
|
||||
"integrity" "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw=="
|
||||
"resolved" "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz"
|
||||
"version" "1.13.1"
|
||||
|
||||
"binary-extensions@^2.0.0":
|
||||
"integrity" "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ=="
|
||||
"resolved" "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz"
|
||||
"version" "2.1.0"
|
||||
|
||||
"bindings@^1.5.0":
|
||||
"integrity" "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ=="
|
||||
"resolved" "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz"
|
||||
"version" "1.5.0"
|
||||
dependencies:
|
||||
"file-uri-to-path" "1.0.0"
|
||||
|
||||
"block-stream@*":
|
||||
"integrity" "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo="
|
||||
"resolved" "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz"
|
||||
|
@ -1200,7 +1247,7 @@
|
|||
"balanced-match" "^1.0.0"
|
||||
"concat-map" "0.0.1"
|
||||
|
||||
"braces@^2.3.1":
|
||||
"braces@^2.3.1", "braces@^2.3.2":
|
||||
"integrity" "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w=="
|
||||
"resolved" "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz"
|
||||
"version" "2.3.2"
|
||||
|
@ -1517,6 +1564,24 @@
|
|||
"ansi-styles" "^4.1.0"
|
||||
"supports-color" "^7.1.0"
|
||||
|
||||
"chokidar@^2.1.8":
|
||||
"integrity" "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg=="
|
||||
"resolved" "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz"
|
||||
"version" "2.1.8"
|
||||
dependencies:
|
||||
"anymatch" "^2.0.0"
|
||||
"async-each" "^1.0.1"
|
||||
"braces" "^2.3.2"
|
||||
"fsevents" "^1.2.7"
|
||||
"glob-parent" "^3.1.0"
|
||||
"inherits" "^2.0.3"
|
||||
"is-binary-path" "^1.0.0"
|
||||
"is-glob" "^4.0.0"
|
||||
"normalize-path" "^3.0.0"
|
||||
"path-is-absolute" "^1.0.0"
|
||||
"readdirp" "^2.2.1"
|
||||
"upath" "^1.1.1"
|
||||
|
||||
"chokidar@^3.4.1":
|
||||
"integrity" "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A=="
|
||||
"resolved" "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz"
|
||||
|
@ -1684,6 +1749,11 @@
|
|||
"resolved" "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz"
|
||||
"version" "6.2.0"
|
||||
|
||||
"commander@^7.0.0":
|
||||
"integrity" "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw=="
|
||||
"resolved" "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz"
|
||||
"version" "7.2.0"
|
||||
|
||||
"commondir@^1.0.1":
|
||||
"integrity" "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
|
||||
"resolved" "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz"
|
||||
|
@ -1839,16 +1909,14 @@
|
|||
"lru-cache" "^4.0.1"
|
||||
"which" "^1.2.9"
|
||||
|
||||
"cross-spawn@^6.0.5":
|
||||
"integrity" "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ=="
|
||||
"resolved" "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz"
|
||||
"version" "6.0.5"
|
||||
"cross-spawn@^7.0.3":
|
||||
"integrity" "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w=="
|
||||
"resolved" "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz"
|
||||
"version" "7.0.3"
|
||||
dependencies:
|
||||
"nice-try" "^1.0.4"
|
||||
"path-key" "^2.0.1"
|
||||
"semver" "^5.5.0"
|
||||
"shebang-command" "^1.2.0"
|
||||
"which" "^1.2.9"
|
||||
"path-key" "^3.1.0"
|
||||
"shebang-command" "^2.0.0"
|
||||
"which" "^2.0.1"
|
||||
|
||||
"crypto-browserify@^3.11.0":
|
||||
"integrity" "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg=="
|
||||
|
@ -2113,11 +2181,6 @@
|
|||
"inherits" "^2.0.1"
|
||||
"minimalistic-assert" "^1.0.0"
|
||||
|
||||
"detect-file@^1.0.0":
|
||||
"integrity" "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc="
|
||||
"resolved" "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"detect-indent@^5.0.0":
|
||||
"integrity" "sha1-OHHMCmoALow+Wzz38zYmRnXwa50="
|
||||
"resolved" "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz"
|
||||
|
@ -2254,7 +2317,7 @@
|
|||
dependencies:
|
||||
"once" "^1.4.0"
|
||||
|
||||
"enhanced-resolve@^4.1.0", "enhanced-resolve@^4.1.1":
|
||||
"enhanced-resolve@^4.1.0":
|
||||
"integrity" "sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA=="
|
||||
"resolved" "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz"
|
||||
"version" "4.1.1"
|
||||
|
@ -2268,6 +2331,11 @@
|
|||
"resolved" "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
|
||||
"envinfo@^7.7.3":
|
||||
"integrity" "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw=="
|
||||
"resolved" "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz"
|
||||
"version" "7.8.1"
|
||||
|
||||
"errno@^0.1.3", "errno@~0.1.7":
|
||||
"integrity" "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg=="
|
||||
"resolved" "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz"
|
||||
|
@ -2361,6 +2429,21 @@
|
|||
"md5.js" "^1.3.4"
|
||||
"safe-buffer" "^5.1.1"
|
||||
|
||||
"execa@^5.0.0":
|
||||
"integrity" "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="
|
||||
"resolved" "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz"
|
||||
"version" "5.1.1"
|
||||
dependencies:
|
||||
"cross-spawn" "^7.0.3"
|
||||
"get-stream" "^6.0.0"
|
||||
"human-signals" "^2.1.0"
|
||||
"is-stream" "^2.0.0"
|
||||
"merge-stream" "^2.0.0"
|
||||
"npm-run-path" "^4.0.1"
|
||||
"onetime" "^5.1.2"
|
||||
"signal-exit" "^3.0.3"
|
||||
"strip-final-newline" "^2.0.0"
|
||||
|
||||
"expand-brackets@^2.1.4":
|
||||
"integrity" "sha1-t3c14xXOMPa27/D4OwQVGiJEliI="
|
||||
"resolved" "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz"
|
||||
|
@ -2374,13 +2457,6 @@
|
|||
"snapdragon" "^0.8.1"
|
||||
"to-regex" "^3.0.1"
|
||||
|
||||
"expand-tilde@^2.0.0", "expand-tilde@^2.0.2":
|
||||
"integrity" "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI="
|
||||
"resolved" "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz"
|
||||
"version" "2.0.2"
|
||||
dependencies:
|
||||
"homedir-polyfill" "^1.0.1"
|
||||
|
||||
"extend-shallow@^2.0.1":
|
||||
"integrity" "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8="
|
||||
"resolved" "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz"
|
||||
|
@ -2435,11 +2511,21 @@
|
|||
"resolved" "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz"
|
||||
"version" "2.1.0"
|
||||
|
||||
"fastest-levenshtein@^1.0.12":
|
||||
"integrity" "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow=="
|
||||
"resolved" "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz"
|
||||
"version" "1.0.12"
|
||||
|
||||
"figgy-pudding@^3.5.1":
|
||||
"integrity" "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw=="
|
||||
"resolved" "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz"
|
||||
"version" "3.5.2"
|
||||
|
||||
"file-uri-to-path@1.0.0":
|
||||
"integrity" "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
"resolved" "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"fill-range@^4.0.0":
|
||||
"integrity" "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc="
|
||||
"resolved" "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz"
|
||||
|
@ -2498,16 +2584,6 @@
|
|||
"locate-path" "^5.0.0"
|
||||
"path-exists" "^4.0.0"
|
||||
|
||||
"findup-sync@^3.0.0":
|
||||
"integrity" "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg=="
|
||||
"resolved" "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz"
|
||||
"version" "3.0.0"
|
||||
dependencies:
|
||||
"detect-file" "^1.0.0"
|
||||
"is-glob" "^4.0.0"
|
||||
"micromatch" "^3.0.4"
|
||||
"resolve-dir" "^1.0.1"
|
||||
|
||||
"flush-write-stream@^1.0.0":
|
||||
"integrity" "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w=="
|
||||
"resolved" "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz"
|
||||
|
@ -2582,6 +2658,14 @@
|
|||
"resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"fsevents@^1.2.7":
|
||||
"integrity" "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw=="
|
||||
"resolved" "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz"
|
||||
"version" "1.2.13"
|
||||
dependencies:
|
||||
"bindings" "^1.5.0"
|
||||
"nan" "^2.12.1"
|
||||
|
||||
"fsevents@~2.1.2":
|
||||
"integrity" "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ=="
|
||||
"resolved" "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz"
|
||||
|
@ -2633,6 +2717,11 @@
|
|||
"resolved" "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz"
|
||||
"version" "4.0.1"
|
||||
|
||||
"get-stream@^6.0.0":
|
||||
"integrity" "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="
|
||||
"resolved" "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz"
|
||||
"version" "6.0.1"
|
||||
|
||||
"get-value@^2.0.3", "get-value@^2.0.6":
|
||||
"integrity" "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
|
||||
"resolved" "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz"
|
||||
|
@ -2672,42 +2761,6 @@
|
|||
"once" "^1.3.0"
|
||||
"path-is-absolute" "^1.0.0"
|
||||
|
||||
"global-modules@^1.0.0":
|
||||
"integrity" "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg=="
|
||||
"resolved" "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
dependencies:
|
||||
"global-prefix" "^1.0.1"
|
||||
"is-windows" "^1.0.1"
|
||||
"resolve-dir" "^1.0.0"
|
||||
|
||||
"global-modules@^2.0.0":
|
||||
"integrity" "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A=="
|
||||
"resolved" "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
dependencies:
|
||||
"global-prefix" "^3.0.0"
|
||||
|
||||
"global-prefix@^1.0.1":
|
||||
"integrity" "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4="
|
||||
"resolved" "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz"
|
||||
"version" "1.0.2"
|
||||
dependencies:
|
||||
"expand-tilde" "^2.0.2"
|
||||
"homedir-polyfill" "^1.0.1"
|
||||
"ini" "^1.3.4"
|
||||
"is-windows" "^1.0.1"
|
||||
"which" "^1.2.14"
|
||||
|
||||
"global-prefix@^3.0.0":
|
||||
"integrity" "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg=="
|
||||
"resolved" "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz"
|
||||
"version" "3.0.0"
|
||||
dependencies:
|
||||
"ini" "^1.3.5"
|
||||
"kind-of" "^6.0.2"
|
||||
"which" "^1.3.1"
|
||||
|
||||
"globals@^11.1.0":
|
||||
"integrity" "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="
|
||||
"resolved" "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz"
|
||||
|
@ -2866,13 +2919,6 @@
|
|||
"minimalistic-assert" "^1.0.0"
|
||||
"minimalistic-crypto-utils" "^1.0.1"
|
||||
|
||||
"homedir-polyfill@^1.0.1":
|
||||
"integrity" "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA=="
|
||||
"resolved" "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz"
|
||||
"version" "1.0.3"
|
||||
dependencies:
|
||||
"parse-passwd" "^1.0.0"
|
||||
|
||||
"hosted-git-info@^2.1.4":
|
||||
"integrity" "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
|
||||
"resolved" "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz"
|
||||
|
@ -2912,6 +2958,11 @@
|
|||
"resolved" "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"human-signals@^2.1.0":
|
||||
"integrity" "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="
|
||||
"resolved" "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz"
|
||||
"version" "2.1.0"
|
||||
|
||||
"icss-utils@^4.0.0", "icss-utils@^4.1.1":
|
||||
"integrity" "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA=="
|
||||
"resolved" "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz"
|
||||
|
@ -2950,13 +3001,13 @@
|
|||
"parent-module" "^1.0.0"
|
||||
"resolve-from" "^4.0.0"
|
||||
|
||||
"import-local@^2.0.0":
|
||||
"integrity" "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ=="
|
||||
"resolved" "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
"import-local@^3.0.2":
|
||||
"integrity" "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA=="
|
||||
"resolved" "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz"
|
||||
"version" "3.0.2"
|
||||
dependencies:
|
||||
"pkg-dir" "^3.0.0"
|
||||
"resolve-cwd" "^2.0.0"
|
||||
"pkg-dir" "^4.2.0"
|
||||
"resolve-cwd" "^3.0.0"
|
||||
|
||||
"imurmurhash@^0.1.4":
|
||||
"integrity" "sha1-khi5srkoojixPcT7a21XbyMUU+o="
|
||||
|
@ -3013,15 +3064,10 @@
|
|||
"resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz"
|
||||
"version" "2.0.3"
|
||||
|
||||
"ini@^1.3.4", "ini@^1.3.5":
|
||||
"integrity" "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
|
||||
"resolved" "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz"
|
||||
"version" "1.3.5"
|
||||
|
||||
"interpret@^1.4.0":
|
||||
"integrity" "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA=="
|
||||
"resolved" "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz"
|
||||
"version" "1.4.0"
|
||||
"interpret@^2.2.0":
|
||||
"integrity" "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw=="
|
||||
"resolved" "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz"
|
||||
"version" "2.2.0"
|
||||
|
||||
"invariant@^2.2.2":
|
||||
"integrity" "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA=="
|
||||
|
@ -3059,6 +3105,13 @@
|
|||
"resolved" "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz"
|
||||
"version" "0.3.2"
|
||||
|
||||
"is-binary-path@^1.0.0":
|
||||
"integrity" "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg="
|
||||
"resolved" "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz"
|
||||
"version" "1.0.1"
|
||||
dependencies:
|
||||
"binary-extensions" "^1.0.0"
|
||||
|
||||
"is-binary-path@~2.1.0":
|
||||
"integrity" "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw=="
|
||||
"resolved" "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz"
|
||||
|
@ -3235,6 +3288,11 @@
|
|||
"resolved" "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz"
|
||||
"version" "1.1.0"
|
||||
|
||||
"is-stream@^2.0.0":
|
||||
"integrity" "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw=="
|
||||
"resolved" "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
|
||||
"is-svg@^3.0.0":
|
||||
"integrity" "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ=="
|
||||
"resolved" "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz"
|
||||
|
@ -3259,7 +3317,7 @@
|
|||
"resolved" "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz"
|
||||
"version" "0.2.1"
|
||||
|
||||
"is-windows@^1.0.1", "is-windows@^1.0.2":
|
||||
"is-windows@^1.0.2":
|
||||
"integrity" "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
|
||||
"resolved" "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz"
|
||||
"version" "1.0.2"
|
||||
|
@ -3487,15 +3545,6 @@
|
|||
"emojis-list" "^2.0.0"
|
||||
"json5" "^1.0.1"
|
||||
|
||||
"loader-utils@^1.4.0":
|
||||
"integrity" "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA=="
|
||||
"resolved" "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz"
|
||||
"version" "1.4.0"
|
||||
dependencies:
|
||||
"big.js" "^5.2.2"
|
||||
"emojis-list" "^3.0.0"
|
||||
"json5" "^1.0.1"
|
||||
|
||||
"loader-utils@^2.0.0":
|
||||
"integrity" "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ=="
|
||||
"resolved" "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz"
|
||||
|
@ -3677,7 +3726,7 @@
|
|||
"resolved" "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
|
||||
"micromatch@^3.0.4", "micromatch@^3.1.10":
|
||||
"micromatch@^3.1.10", "micromatch@^3.1.4":
|
||||
"integrity" "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg=="
|
||||
"resolved" "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz"
|
||||
"version" "3.1.10"
|
||||
|
@ -3716,6 +3765,11 @@
|
|||
dependencies:
|
||||
"mime-db" "1.43.0"
|
||||
|
||||
"mimic-fn@^2.1.0":
|
||||
"integrity" "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
|
||||
"resolved" "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz"
|
||||
"version" "2.1.0"
|
||||
|
||||
"mini-css-extract-plugin@^0.9.0":
|
||||
"integrity" "sha512-lp3GeY7ygcgAmVIcRPBVhIkf8Us7FZjA+ILpal44qLdSu11wmjKQ3d9k15lfD7pO4esu9eUIAW7qiYIBppv40A=="
|
||||
"resolved" "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz"
|
||||
|
@ -3839,7 +3893,7 @@
|
|||
"resolved" "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
|
||||
"nan@^2.13.2":
|
||||
"nan@^2.12.1", "nan@^2.13.2":
|
||||
"integrity" "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg=="
|
||||
"resolved" "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz"
|
||||
"version" "2.14.0"
|
||||
|
@ -3871,11 +3925,6 @@
|
|||
"resolved" "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz"
|
||||
"version" "2.6.1"
|
||||
|
||||
"nice-try@^1.0.4":
|
||||
"integrity" "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||
"resolved" "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz"
|
||||
"version" "1.0.5"
|
||||
|
||||
"node-emoji@^1.8.1":
|
||||
"integrity" "sha512-Yt3384If5H6BYGVHiHwTL+99OzJKHhgp82S8/dktEK73T26BazdgZ4JZh92xSVtGNJvz9UbXdNAc5hcrXV42vw=="
|
||||
"resolved" "https://registry.npmjs.org/node-emoji/-/node-emoji-1.10.0.tgz"
|
||||
|
@ -3987,6 +4036,13 @@
|
|||
"semver" "2 || 3 || 4 || 5"
|
||||
"validate-npm-package-license" "^3.0.1"
|
||||
|
||||
"normalize-path@^2.1.1":
|
||||
"integrity" "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk="
|
||||
"resolved" "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz"
|
||||
"version" "2.1.1"
|
||||
dependencies:
|
||||
"remove-trailing-separator" "^1.0.1"
|
||||
|
||||
"normalize-path@^3.0.0", "normalize-path@~3.0.0":
|
||||
"integrity" "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
|
||||
"resolved" "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz"
|
||||
|
@ -4012,6 +4068,13 @@
|
|||
"query-string" "^4.1.0"
|
||||
"sort-keys" "^1.0.0"
|
||||
|
||||
"npm-run-path@^4.0.1":
|
||||
"integrity" "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="
|
||||
"resolved" "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz"
|
||||
"version" "4.0.1"
|
||||
dependencies:
|
||||
"path-key" "^3.0.0"
|
||||
|
||||
"npmlog@^4.0.0", "npmlog@0 || 1 || 2 || 3 || 4":
|
||||
"integrity" "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg=="
|
||||
"resolved" "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz"
|
||||
|
@ -4127,6 +4190,13 @@
|
|||
dependencies:
|
||||
"wrappy" "1"
|
||||
|
||||
"onetime@^5.1.2":
|
||||
"integrity" "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="
|
||||
"resolved" "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz"
|
||||
"version" "5.1.2"
|
||||
dependencies:
|
||||
"mimic-fn" "^2.1.0"
|
||||
|
||||
"optimize-css-assets-webpack-plugin@^5.0.1":
|
||||
"integrity" "sha512-q9fbvCRS6EYtUKKSwI87qm2IxlyJK5b4dygW1rKUBT6mMDhdG5e5bZT63v6tnJR9F9FB/H5a0HTmtw+laUBxKA=="
|
||||
"resolved" "https://registry.npmjs.org/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.3.tgz"
|
||||
|
@ -4158,14 +4228,14 @@
|
|||
"os-homedir" "^1.0.0"
|
||||
"os-tmpdir" "^1.0.0"
|
||||
|
||||
"p-limit@^2.0.0", "p-limit@^2.2.1":
|
||||
"p-limit@^2.0.0", "p-limit@^2.2.0", "p-limit@^2.2.1":
|
||||
"integrity" "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ=="
|
||||
"resolved" "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz"
|
||||
"version" "2.2.2"
|
||||
dependencies:
|
||||
"p-try" "^2.0.0"
|
||||
|
||||
"p-limit@^2.2.0", "p-limit@^2.3.0":
|
||||
"p-limit@^2.3.0":
|
||||
"integrity" "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="
|
||||
"resolved" "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz"
|
||||
"version" "2.3.0"
|
||||
|
@ -4256,11 +4326,6 @@
|
|||
"json-parse-even-better-errors" "^2.3.0"
|
||||
"lines-and-columns" "^1.1.6"
|
||||
|
||||
"parse-passwd@^1.0.0":
|
||||
"integrity" "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY="
|
||||
"resolved" "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
|
||||
"pascalcase@^0.1.1":
|
||||
"integrity" "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
|
||||
"resolved" "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz"
|
||||
|
@ -4298,10 +4363,10 @@
|
|||
"resolved" "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz"
|
||||
"version" "1.0.1"
|
||||
|
||||
"path-key@^2.0.1":
|
||||
"integrity" "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
|
||||
"resolved" "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz"
|
||||
"version" "2.0.1"
|
||||
"path-key@^3.0.0", "path-key@^3.1.0":
|
||||
"integrity" "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
|
||||
"resolved" "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz"
|
||||
"version" "3.1.1"
|
||||
|
||||
"path-parse@^1.0.6":
|
||||
"integrity" "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
|
||||
|
@ -4351,11 +4416,11 @@
|
|||
|
||||
"phoenix_live_view@file:../deps/phoenix_live_view":
|
||||
"resolved" "file:../deps/phoenix_live_view"
|
||||
"version" "0.15.4"
|
||||
"version" "0.15.7"
|
||||
|
||||
"phoenix@file:../deps/phoenix":
|
||||
"resolved" "file:../deps/phoenix"
|
||||
"version" "1.5.8"
|
||||
"version" "1.5.9"
|
||||
|
||||
"picomatch@^2.0.4", "picomatch@^2.2.1":
|
||||
"integrity" "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
|
||||
|
@ -4403,6 +4468,13 @@
|
|||
dependencies:
|
||||
"find-up" "^4.0.0"
|
||||
|
||||
"pkg-dir@^4.2.0":
|
||||
"integrity" "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ=="
|
||||
"resolved" "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz"
|
||||
"version" "4.2.0"
|
||||
dependencies:
|
||||
"find-up" "^4.0.0"
|
||||
|
||||
"posix-character-classes@^0.1.0":
|
||||
"integrity" "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
|
||||
"resolved" "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz"
|
||||
|
@ -5051,6 +5123,15 @@
|
|||
"string_decoder" "~1.1.1"
|
||||
"util-deprecate" "~1.0.1"
|
||||
|
||||
"readdirp@^2.2.1":
|
||||
"integrity" "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ=="
|
||||
"resolved" "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz"
|
||||
"version" "2.2.1"
|
||||
dependencies:
|
||||
"graceful-fs" "^4.1.11"
|
||||
"micromatch" "^3.1.10"
|
||||
"readable-stream" "^2.0.2"
|
||||
|
||||
"readdirp@~3.4.0":
|
||||
"integrity" "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ=="
|
||||
"resolved" "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz"
|
||||
|
@ -5058,6 +5139,13 @@
|
|||
dependencies:
|
||||
"picomatch" "^2.2.1"
|
||||
|
||||
"rechoir@^0.7.0":
|
||||
"integrity" "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q=="
|
||||
"resolved" "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz"
|
||||
"version" "0.7.0"
|
||||
dependencies:
|
||||
"resolve" "^1.9.0"
|
||||
|
||||
"redent@^1.0.0":
|
||||
"integrity" "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94="
|
||||
"resolved" "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz"
|
||||
|
@ -5125,6 +5213,11 @@
|
|||
dependencies:
|
||||
"jsesc" "~0.5.0"
|
||||
|
||||
"remove-trailing-separator@^1.0.1":
|
||||
"integrity" "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
|
||||
"resolved" "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz"
|
||||
"version" "1.1.0"
|
||||
|
||||
"repeat-element@^1.1.2":
|
||||
"integrity" "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g=="
|
||||
"resolved" "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz"
|
||||
|
@ -5178,20 +5271,12 @@
|
|||
"resolved" "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
|
||||
"resolve-cwd@^2.0.0":
|
||||
"integrity" "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo="
|
||||
"resolved" "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
"resolve-cwd@^3.0.0":
|
||||
"integrity" "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg=="
|
||||
"resolved" "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz"
|
||||
"version" "3.0.0"
|
||||
dependencies:
|
||||
"resolve-from" "^3.0.0"
|
||||
|
||||
"resolve-dir@^1.0.0", "resolve-dir@^1.0.1":
|
||||
"integrity" "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M="
|
||||
"resolved" "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz"
|
||||
"version" "1.0.1"
|
||||
dependencies:
|
||||
"expand-tilde" "^2.0.0"
|
||||
"global-modules" "^1.0.0"
|
||||
"resolve-from" "^5.0.0"
|
||||
|
||||
"resolve-from@^3.0.0":
|
||||
"integrity" "sha1-six699nWiBvItuZTM17rywoYh0g="
|
||||
|
@ -5203,12 +5288,17 @@
|
|||
"resolved" "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz"
|
||||
"version" "4.0.0"
|
||||
|
||||
"resolve-from@^5.0.0":
|
||||
"integrity" "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw=="
|
||||
"resolved" "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz"
|
||||
"version" "5.0.0"
|
||||
|
||||
"resolve-url@^0.2.1":
|
||||
"integrity" "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
|
||||
"resolved" "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz"
|
||||
"version" "0.2.1"
|
||||
|
||||
"resolve@^1.10.0", "resolve@^1.3.2":
|
||||
"resolve@^1.10.0", "resolve@^1.3.2", "resolve@^1.9.0":
|
||||
"integrity" "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ=="
|
||||
"resolved" "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz"
|
||||
"version" "1.14.2"
|
||||
|
@ -5428,22 +5518,22 @@
|
|||
dependencies:
|
||||
"kind-of" "^6.0.2"
|
||||
|
||||
"shebang-command@^1.2.0":
|
||||
"integrity" "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo="
|
||||
"resolved" "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz"
|
||||
"version" "1.2.0"
|
||||
"shebang-command@^2.0.0":
|
||||
"integrity" "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="
|
||||
"resolved" "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
dependencies:
|
||||
"shebang-regex" "^1.0.0"
|
||||
"shebang-regex" "^3.0.0"
|
||||
|
||||
"shebang-regex@^1.0.0":
|
||||
"integrity" "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
|
||||
"resolved" "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz"
|
||||
"version" "1.0.0"
|
||||
"shebang-regex@^3.0.0":
|
||||
"integrity" "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="
|
||||
"resolved" "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz"
|
||||
"version" "3.0.0"
|
||||
|
||||
"signal-exit@^3.0.0", "signal-exit@^3.0.2":
|
||||
"integrity" "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
||||
"resolved" "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz"
|
||||
"version" "3.0.2"
|
||||
"signal-exit@^3.0.0", "signal-exit@^3.0.2", "signal-exit@^3.0.3":
|
||||
"integrity" "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
|
||||
"resolved" "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz"
|
||||
"version" "3.0.3"
|
||||
|
||||
"simple-swizzle@^0.2.2":
|
||||
"integrity" "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo="
|
||||
|
@ -5754,6 +5844,11 @@
|
|||
dependencies:
|
||||
"is-utf8" "^0.2.0"
|
||||
|
||||
"strip-final-newline@^2.0.0":
|
||||
"integrity" "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="
|
||||
"resolved" "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
|
||||
"strip-indent@^1.0.1":
|
||||
"integrity" "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI="
|
||||
"resolved" "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz"
|
||||
|
@ -6099,6 +6194,11 @@
|
|||
"has-value" "^0.3.1"
|
||||
"isobject" "^3.0.0"
|
||||
|
||||
"upath@^1.1.1":
|
||||
"integrity" "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg=="
|
||||
"resolved" "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz"
|
||||
"version" "1.2.0"
|
||||
|
||||
"uri-js@^4.2.2":
|
||||
"integrity" "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ=="
|
||||
"resolved" "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz"
|
||||
|
@ -6158,7 +6258,7 @@
|
|||
"resolved" "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz"
|
||||
"version" "3.4.0"
|
||||
|
||||
"v8-compile-cache@^2.1.1":
|
||||
"v8-compile-cache@^2.2.0":
|
||||
"integrity" "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q=="
|
||||
"resolved" "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz"
|
||||
"version" "2.2.0"
|
||||
|
@ -6190,6 +6290,13 @@
|
|||
"resolved" "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz"
|
||||
"version" "1.1.2"
|
||||
|
||||
"watchpack-chokidar2@^2.0.0":
|
||||
"integrity" "sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA=="
|
||||
"resolved" "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
dependencies:
|
||||
"chokidar" "^2.1.8"
|
||||
|
||||
"watchpack@^1.6.0":
|
||||
"integrity" "sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg=="
|
||||
"resolved" "https://registry.npmjs.org/watchpack/-/watchpack-1.7.4.tgz"
|
||||
|
@ -6201,22 +6308,24 @@
|
|||
"chokidar" "^3.4.1"
|
||||
"watchpack-chokidar2" "^2.0.0"
|
||||
|
||||
"webpack-cli@^3.3.2":
|
||||
"integrity" "sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag=="
|
||||
"resolved" "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz"
|
||||
"version" "3.3.12"
|
||||
"webpack-cli@^4.7.2", "webpack-cli@4.x.x":
|
||||
"integrity" "sha512-mEoLmnmOIZQNiRl0ebnjzQ74Hk0iKS5SiEEnpq3dRezoyR3yPaeQZCMCe+db4524pj1Pd5ghZXjT41KLzIhSLw=="
|
||||
"resolved" "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.7.2.tgz"
|
||||
"version" "4.7.2"
|
||||
dependencies:
|
||||
"chalk" "^2.4.2"
|
||||
"cross-spawn" "^6.0.5"
|
||||
"enhanced-resolve" "^4.1.1"
|
||||
"findup-sync" "^3.0.0"
|
||||
"global-modules" "^2.0.0"
|
||||
"import-local" "^2.0.0"
|
||||
"interpret" "^1.4.0"
|
||||
"loader-utils" "^1.4.0"
|
||||
"supports-color" "^6.1.0"
|
||||
"v8-compile-cache" "^2.1.1"
|
||||
"yargs" "^13.3.2"
|
||||
"@discoveryjs/json-ext" "^0.5.0"
|
||||
"@webpack-cli/configtest" "^1.0.4"
|
||||
"@webpack-cli/info" "^1.3.0"
|
||||
"@webpack-cli/serve" "^1.5.1"
|
||||
"colorette" "^1.2.1"
|
||||
"commander" "^7.0.0"
|
||||
"execa" "^5.0.0"
|
||||
"fastest-levenshtein" "^1.0.12"
|
||||
"import-local" "^3.0.2"
|
||||
"interpret" "^2.2.0"
|
||||
"rechoir" "^0.7.0"
|
||||
"v8-compile-cache" "^2.2.0"
|
||||
"webpack-merge" "^5.7.3"
|
||||
|
||||
"webpack-log@^2.0.0":
|
||||
"integrity" "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg=="
|
||||
|
@ -6226,6 +6335,14 @@
|
|||
"ansi-colors" "^3.0.0"
|
||||
"uuid" "^3.3.2"
|
||||
|
||||
"webpack-merge@^5.7.3":
|
||||
"integrity" "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q=="
|
||||
"resolved" "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz"
|
||||
"version" "5.8.0"
|
||||
dependencies:
|
||||
"clone-deep" "^4.0.1"
|
||||
"wildcard" "^2.0.0"
|
||||
|
||||
"webpack-sources@^1.0.1", "webpack-sources@^1.1.0", "webpack-sources@^1.4.0", "webpack-sources@^1.4.1", "webpack-sources@^1.4.3":
|
||||
"integrity" "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ=="
|
||||
"resolved" "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz"
|
||||
|
@ -6234,7 +6351,7 @@
|
|||
"source-list-map" "^2.0.0"
|
||||
"source-map" "~0.6.1"
|
||||
|
||||
"webpack@4.41.5":
|
||||
"webpack@4.41.5", "webpack@4.x.x || 5.x.x":
|
||||
"integrity" "sha512-wp0Co4vpyumnp3KlkmpM5LWuzvZYayDwM2n17EHFr4qxBBbRokC7DJawPJC7TfSFZ9HZ6GsdH40EBj4UV0nmpw=="
|
||||
"resolved" "https://registry.npmjs.org/webpack/-/webpack-4.41.5.tgz"
|
||||
"version" "4.41.5"
|
||||
|
@ -6268,13 +6385,20 @@
|
|||
"resolved" "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
|
||||
"which@^1.2.14", "which@^1.2.9", "which@^1.3.1", "which@1":
|
||||
"which@^1.2.9", "which@1":
|
||||
"integrity" "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ=="
|
||||
"resolved" "https://registry.npmjs.org/which/-/which-1.3.1.tgz"
|
||||
"version" "1.3.1"
|
||||
dependencies:
|
||||
"isexe" "^2.0.0"
|
||||
|
||||
"which@^2.0.1":
|
||||
"integrity" "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="
|
||||
"resolved" "https://registry.npmjs.org/which/-/which-2.0.2.tgz"
|
||||
"version" "2.0.2"
|
||||
dependencies:
|
||||
"isexe" "^2.0.0"
|
||||
|
||||
"wide-align@^1.1.0":
|
||||
"integrity" "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA=="
|
||||
"resolved" "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz"
|
||||
|
@ -6282,6 +6406,11 @@
|
|||
dependencies:
|
||||
"string-width" "^1.0.2 || 2"
|
||||
|
||||
"wildcard@^2.0.0":
|
||||
"integrity" "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw=="
|
||||
"resolved" "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz"
|
||||
"version" "2.0.0"
|
||||
|
||||
"worker-farm@^1.7.0":
|
||||
"integrity" "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw=="
|
||||
"resolved" "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz"
|
||||
|
|
|
@ -31,7 +31,7 @@ config :ash_admin, DemoWeb.Endpoint,
|
|||
"node_modules/webpack/bin/webpack.js",
|
||||
"--mode",
|
||||
System.get_env("NODE_ENV") || "production",
|
||||
"--watch-stdin",
|
||||
"--watch-options-stdin",
|
||||
cd: "assets"
|
||||
]
|
||||
],
|
||||
|
|
2
dev.exs
2
dev.exs
|
@ -13,7 +13,7 @@ Application.put_env(:ash_admin, DemoWeb.Endpoint,
|
|||
"node_modules/webpack/bin/webpack.js",
|
||||
"--mode",
|
||||
System.get_env("NODE_ENV") || "production",
|
||||
"--watch-stdin",
|
||||
"--watch-options-stdin",
|
||||
cd: "assets"
|
||||
]
|
||||
],
|
||||
|
|
|
@ -14,5 +14,6 @@ defmodule Demo.Accounts.Profile do
|
|||
attribute :bio, :string, allow_nil?: false
|
||||
attribute :history, :string
|
||||
attribute :tags, {:array, :string}, default: []
|
||||
attribute :metadata, :map
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,6 +12,7 @@ defmodule AshAdmin.Components.Resource.Form do
|
|||
Checkbox,
|
||||
ErrorTag,
|
||||
FieldContext,
|
||||
HiddenInput,
|
||||
Inputs,
|
||||
Label,
|
||||
Select,
|
||||
|
@ -458,10 +459,13 @@ defmodule AshAdmin.Components.Resource.Form do
|
|||
true
|
||||
|
||||
_ ->
|
||||
false
|
||||
unwrap_type(attribute.type) == Ash.Type.Map
|
||||
end
|
||||
end
|
||||
|
||||
defp unwrap_type({:array, type}), do: unwrap_type(type)
|
||||
defp unwrap_type(type), do: type
|
||||
|
||||
def render_attribute_input(assigns, attribute, form, value \\ nil, name \\ nil)
|
||||
|
||||
def render_attribute_input(
|
||||
|
@ -570,6 +574,51 @@ defmodule AshAdmin.Components.Resource.Form do
|
|||
end
|
||||
end
|
||||
|
||||
def render_attribute_input(
|
||||
assigns,
|
||||
%{type: {:array, Ash.Type.Map}} = attribute,
|
||||
form,
|
||||
value,
|
||||
name
|
||||
) do
|
||||
render_attribute_input(assigns, %{attribute | type: Ash.Type.Map}, form, value, name)
|
||||
end
|
||||
|
||||
def render_attribute_input(assigns, %{type: Ash.Type.Map} = attribute, form, value, name) do
|
||||
encoded = Jason.encode!(value(value, form, attribute))
|
||||
|
||||
~H"""
|
||||
<div>
|
||||
<div
|
||||
phx-hook="JsonEditor"
|
||||
phx-update="ignore"
|
||||
data-input-id={{form.id <> "_#{attribute.name}"}}
|
||||
id={{form.id <> "_#{attribute.name}_json"}}
|
||||
/>
|
||||
|
||||
<HiddenInput
|
||||
opts={{phx_hook: "JsonEditorSource", data_editor_id: form.id <> "_#{attribute.name}_json"}}
|
||||
form={{ form }}
|
||||
value={{encoded}}
|
||||
name={{name || form.name <> "[#{attribute.name}]"}}
|
||||
id={{form.id <> "_#{attribute.name}"}}
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
|
||||
/>
|
||||
</div>
|
||||
"""
|
||||
rescue
|
||||
_ ->
|
||||
~H"""
|
||||
<TextInput
|
||||
form={{ form }}
|
||||
opts={{ disabled: true }}
|
||||
value={{"..."}}
|
||||
name={{name || form.name <> "[#{attribute.name}]"}}
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
|
||||
/>
|
||||
"""
|
||||
end
|
||||
|
||||
def render_attribute_input(assigns, attribute, form, value, name) do
|
||||
cond do
|
||||
Ash.Type.embedded_type?(attribute.type) ->
|
||||
|
@ -621,7 +670,7 @@ defmodule AshAdmin.Components.Resource.Form do
|
|||
~H"""
|
||||
<div>
|
||||
<div :for.with_index={{{value, index} <- list_value(value || Phoenix.HTML.FormData.input_value(form.source, form, attribute.name))}}>
|
||||
{{render_attribute_input(assigns, %{attribute | type: type, constraints: attribute.constraints[:items] || []}, form, {:value, value}, name <> "[#{index}]")}}
|
||||
{{render_attribute_input(assigns, %{attribute | type: type, constraints: attribute.constraints[:items] || []}, %{form | params: %{"#{attribute.name}" => form.params["#{attribute.name}"]["#{index}"]}}, {:value, value}, name <> "[#{index}]")}}
|
||||
<button
|
||||
type="button"
|
||||
:on-click="remove_value"
|
||||
|
@ -647,16 +696,42 @@ defmodule AshAdmin.Components.Resource.Form do
|
|||
end
|
||||
|
||||
defp render_fallback_attribute(assigns, form, attribute, value, name) do
|
||||
casted_value = Phoenix.HTML.Safe.to_iodata(value(value, form, attribute))
|
||||
|
||||
~H"""
|
||||
<TextInput
|
||||
form={{ form }}
|
||||
opts={{ type: text_input_type(attribute), placeholder: placeholder(attribute.default) }}
|
||||
value={{value(value, form, attribute)}}
|
||||
value={{casted_value}}
|
||||
name={{name || form.name <> "[#{attribute.name}]"}}
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
|
||||
:props={{props(value, attribute)}}
|
||||
/>
|
||||
"""
|
||||
rescue
|
||||
_ ->
|
||||
case Map.fetch(form.params, to_string(attribute.name)) do
|
||||
{:ok, value} ->
|
||||
~H"""
|
||||
<TextInput
|
||||
form={{ form }}
|
||||
opts={{ type: text_input_type(attribute), placeholder: placeholder(attribute.default) }}
|
||||
value={{value}}
|
||||
name={{name || form.name <> "[#{attribute.name}]"}}
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
|
||||
/>
|
||||
"""
|
||||
|
||||
:error ->
|
||||
~H"""
|
||||
<TextInput
|
||||
form={{ form }}
|
||||
opts={{ disabled: true }}
|
||||
value={{"..."}}
|
||||
name={{name || form.name <> "[#{attribute.name}]"}}
|
||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"
|
||||
/>
|
||||
"""
|
||||
end
|
||||
end
|
||||
|
||||
defp list_value(value) do
|
||||
|
@ -1103,14 +1178,14 @@ defmodule AshAdmin.Components.Resource.Form do
|
|||
defp append_to_map(map, value) do
|
||||
key =
|
||||
map
|
||||
|> Kernel.||(%{})
|
||||
|> Map.keys()
|
||||
|> Enum.map(&String.to_integer/1)
|
||||
|> Enum.max()
|
||||
|> Kernel.||(-1)
|
||||
|> Enum.max(fn -> -1 end)
|
||||
|> Kernel.+(1)
|
||||
|> to_string()
|
||||
|
||||
Map.put(map, key, value)
|
||||
Map.put(map || %{}, key, value)
|
||||
end
|
||||
|
||||
defp take_targets(params, []), do: params
|
||||
|
|
|
@ -282,6 +282,32 @@ defmodule AshAdmin.Components.Resource.Show do
|
|||
end
|
||||
end
|
||||
|
||||
defp render_attribute(assigns, resource, record, %{type: {:array, Ash.Type.Map}} = attribute, nested?) do
|
||||
render_attribute(assigns, resource, record, %{attribute | type: Ash.Type.Map}, nested?) do
|
||||
end
|
||||
|
||||
defp render_attribute(assigns, resource, record, %{type: Ash.Type.Map} = attribute, nested?) do
|
||||
render_attribute(assigns, resource, record, %{attribute | type: Ash.Type.Map}, nested?) do
|
||||
end
|
||||
|
||||
def render_attribute_input(assigns, %{type: Ash.Type.Map} = attribute, form, value, name) do
|
||||
encoded = Jason.encode!(value(value, form, attribute))
|
||||
|
||||
~H"""
|
||||
<div
|
||||
phx-hook="JsonView"
|
||||
phx-update="ignore"
|
||||
data-json={{encoded}}
|
||||
id={{"_#{attribute.name}_json"}}
|
||||
/>
|
||||
"""
|
||||
rescue
|
||||
_ ->
|
||||
~H"""
|
||||
...
|
||||
"""
|
||||
end
|
||||
|
||||
defp render_attribute(assigns, _resource, record, %{name: name, type: Ash.Type.Boolean}, _) do
|
||||
case Map.get(record, name) do
|
||||
true ->
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<%= csrf_meta_tag() %>
|
||||
<title><%= assigns[:page_title] || "Ash Admin" %></title>
|
||||
<style><%= raw(render("app.css")) %></style>
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.5.1/jsoneditor.min.css" rel="stylesheet" type="text/css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsoneditor/9.5.1/jsoneditor.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<%= @inner_content %>
|
||||
|
|
3
mix.exs
3
mix.exs
|
@ -86,7 +86,8 @@ defmodule AshAdmin.MixProject do
|
|||
# Run "mix help deps" to learn about dependencies.
|
||||
defp deps do
|
||||
[
|
||||
{:ash, "~> 1.46 and >= 1.46.9"},
|
||||
# {:ash, "~> 1.46 and >= 1.46.9"},
|
||||
{:ash, path: "../ash", override: true},
|
||||
{:ash_phoenix, "~> 0.5 and >= 0.5.1"},
|
||||
{:surface, "~> 0.4.1"},
|
||||
{:phoenix_live_view, "~> 0.15.4"},
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue