Compare commits

...

1 Commits

Author SHA1 Message Date
Uku Taht 014c391e19 WIP 3 years ago

@ -2,11 +2,18 @@ import "../css/app.css"
import "flatpickr/dist/flatpickr.min.css" import "flatpickr/dist/flatpickr.min.css"
import "./polyfills/closest" import "./polyfills/closest"
import 'abortcontroller-polyfill/dist/polyfill-patch-fetch' import 'abortcontroller-polyfill/dist/polyfill-patch-fetch'
import 'alpinejs' import Alpine from 'alpinejs'
import "./liveview/live_socket" import liveSocket from "./liveview/live_socket"
import "./liveview/suggestions_dropdown" import "./liveview/suggestions_dropdown"
import "./liveview/phx_events" import "./liveview/phx_events"
Alpine.start()
window.addEventListener("phx:close-modal", (e) => {
const el = document.getElementById(e.detail.id)
liveSocket.execJS(el, el.getAttribute("data-onclose"))
})
const triggers = document.querySelectorAll('[data-dropdown-trigger]') const triggers = document.querySelectorAll('[data-dropdown-trigger]')
for (const trigger of triggers) { for (const trigger of triggers) {

@ -1,9 +1,11 @@
import "phoenix_html" import "phoenix_html"
import Alpine from 'alpinejs'
import { Socket } from "phoenix" import { Socket } from "phoenix"
import { LiveSocket } from "phoenix_live_view" import { LiveSocket } from "phoenix_live_view"
let csrfToken = document.querySelector("meta[name='csrf-token']") let csrfToken = document.querySelector("meta[name='csrf-token']")
let websocketUrl = document.querySelector("meta[name='websocket-url']") let websocketUrl = document.querySelector("meta[name='websocket-url']")
let liveSocket = null
if (csrfToken && websocketUrl) { if (csrfToken && websocketUrl) {
let Hooks = {} let Hooks = {}
Hooks.Metrics = { Hooks.Metrics = {
@ -21,13 +23,13 @@ if (csrfToken && websocketUrl) {
let token = csrfToken.getAttribute("content") let token = csrfToken.getAttribute("content")
let url = websocketUrl.getAttribute("content") let url = websocketUrl.getAttribute("content")
let liveUrl = (url === "") ? "/live" : new URL("/live", url).href; let liveUrl = (url === "") ? "/live" : new URL("/live", url).href;
let liveSocket = new LiveSocket(liveUrl, Socket, { liveSocket = new LiveSocket(liveUrl, Socket, {
heartbeatIntervalMs: 10000, heartbeatIntervalMs: 10000,
params: { _csrf_token: token }, hooks: Hooks, dom: { params: { _csrf_token: token }, hooks: Hooks, dom: {
// for alpinejs integration // for alpinejs integration
onBeforeElUpdated(from, to) { onBeforeElUpdated(from, to) {
if (from.__x) { if (from._x_dataStack) {
window.Alpine.clone(from.__x, to); Alpine.clone(from, to);
} }
}, },
} }
@ -36,3 +38,5 @@ if (csrfToken && websocketUrl) {
liveSocket.connect() liveSocket.connect()
window.liveSocket = liveSocket window.liveSocket = liveSocket
} }
export default liveSocket

@ -21,7 +21,7 @@
"@tailwindcss/forms": "^0.5.6", "@tailwindcss/forms": "^0.5.6",
"@tailwindcss/typography": "^0.4.1", "@tailwindcss/typography": "^0.4.1",
"abortcontroller-polyfill": "^1.7.3", "abortcontroller-polyfill": "^1.7.3",
"alpinejs": "^2.8.2", "alpinejs": "^3.13.1",
"autoprefixer": "^10.4.15", "autoprefixer": "^10.4.15",
"babel-loader": "^8.2.2", "babel-loader": "^8.2.2",
"chart.js": "^3.3.2", "chart.js": "^3.3.2",
@ -2025,6 +2025,19 @@
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="
}, },
"node_modules/@vue/reactivity": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz",
"integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==",
"dependencies": {
"@vue/shared": "3.1.5"
}
},
"node_modules/@vue/shared": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz",
"integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA=="
},
"node_modules/@webassemblyjs/ast": { "node_modules/@webassemblyjs/ast": {
"version": "1.11.6", "version": "1.11.6",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
@ -2289,9 +2302,12 @@
"integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= sha512-0FcBfdcmaumGPQ0qPn7Q5qTgz/ooXgIyp1rf8ik5bGX8mpE2YHjC0P/eyQvxu1GURYQgq9ozf2mteQ5ZD9YiyQ==" "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= sha512-0FcBfdcmaumGPQ0qPn7Q5qTgz/ooXgIyp1rf8ik5bGX8mpE2YHjC0P/eyQvxu1GURYQgq9ozf2mteQ5ZD9YiyQ=="
}, },
"node_modules/alpinejs": { "node_modules/alpinejs": {
"version": "2.8.2", "version": "3.13.1",
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-2.8.2.tgz", "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.1.tgz",
"integrity": "sha512-5yOUtckn4CBp0qsHpo2qgjZyZit84uXvHbB7NJ27sn4FA6UlFl2i9PGUAdTXkcbFvvxDJBM+zpOD8RuNYFvQAw==" "integrity": "sha512-/LZ7mumW02V7AV5xTTftJFHS0I3KOXLl7tHm4xpxXAV+HJ/zjTT0n8MU7RZ6UoGPhmO/i+KEhQojaH/0RsH5tg==",
"dependencies": {
"@vue/reactivity": "~3.1.1"
}
}, },
"node_modules/ansi-colors": { "node_modules/ansi-colors": {
"version": "4.1.3", "version": "4.1.3",
@ -11101,6 +11117,19 @@
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="
}, },
"@vue/reactivity": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.5.tgz",
"integrity": "sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==",
"requires": {
"@vue/shared": "3.1.5"
}
},
"@vue/shared": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.1.5.tgz",
"integrity": "sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA=="
},
"@webassemblyjs/ast": { "@webassemblyjs/ast": {
"version": "1.11.6", "version": "1.11.6",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
@ -11328,9 +11357,12 @@
"integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= sha512-0FcBfdcmaumGPQ0qPn7Q5qTgz/ooXgIyp1rf8ik5bGX8mpE2YHjC0P/eyQvxu1GURYQgq9ozf2mteQ5ZD9YiyQ==" "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= sha512-0FcBfdcmaumGPQ0qPn7Q5qTgz/ooXgIyp1rf8ik5bGX8mpE2YHjC0P/eyQvxu1GURYQgq9ozf2mteQ5ZD9YiyQ=="
}, },
"alpinejs": { "alpinejs": {
"version": "2.8.2", "version": "3.13.1",
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-2.8.2.tgz", "resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.1.tgz",
"integrity": "sha512-5yOUtckn4CBp0qsHpo2qgjZyZit84uXvHbB7NJ27sn4FA6UlFl2i9PGUAdTXkcbFvvxDJBM+zpOD8RuNYFvQAw==" "integrity": "sha512-/LZ7mumW02V7AV5xTTftJFHS0I3KOXLl7tHm4xpxXAV+HJ/zjTT0n8MU7RZ6UoGPhmO/i+KEhQojaH/0RsH5tg==",
"requires": {
"@vue/reactivity": "~3.1.1"
}
}, },
"ansi-colors": { "ansi-colors": {
"version": "4.1.3", "version": "4.1.3",

@ -23,7 +23,7 @@
"@tailwindcss/forms": "^0.5.6", "@tailwindcss/forms": "^0.5.6",
"@tailwindcss/typography": "^0.4.1", "@tailwindcss/typography": "^0.4.1",
"abortcontroller-polyfill": "^1.7.3", "abortcontroller-polyfill": "^1.7.3",
"alpinejs": "^2.8.2", "alpinejs": "^3.13.1",
"autoprefixer": "^10.4.15", "autoprefixer": "^10.4.15",
"babel-loader": "^8.2.2", "babel-loader": "^8.2.2",
"chart.js": "^3.3.2", "chart.js": "^3.3.2",

@ -29,6 +29,22 @@ defmodule PlausibleWeb do
end end
end end
def live_view do
quote do
use Phoenix.LiveView
unquote(html_helpers())
end
end
def live_component do
quote do
use Phoenix.LiveComponent
unquote(html_helpers())
end
end
def router do def router do
quote do quote do
use Phoenix.Router use Phoenix.Router
@ -80,6 +96,15 @@ defmodule PlausibleWeb do
end end
end end
defp html_helpers do
quote do
import Phoenix.HTML
import PlausibleWeb.Components.Generic
alias PlausibleWeb.Router.Helpers, as: Routes
end
end
@doc """ @doc """
When used, dispatch to the appropriate controller/view/etc. When used, dispatch to the appropriate controller/view/etc.
""" """

@ -2,7 +2,7 @@ defmodule PlausibleWeb.Components.Generic do
@moduledoc """ @moduledoc """
Generic reusable components Generic reusable components
""" """
use Phoenix.Component use Phoenix.Component, global_prefixes: ~w(phx-)
attr :title, :string, default: "Notice" attr :title, :string, default: "Notice"
attr :class, :string, default: "" attr :class, :string, default: ""
@ -87,4 +87,125 @@ defmodule PlausibleWeb.Components.Generic do
["w-4 h-4"] ["w-4 h-4"]
end end
end end
alias Phoenix.LiveView.JS
attr :id, :string, required: true
slot :trigger
slot :title
slot :panel
def modal(assigns) do
~H"""
<div phx-click={show_modal(@id)}>
<%= render_slot(@trigger) %>
</div>
<div id={@id} class="relative z-10 hidden" data-onclose={hide_modal(@id)}>
<div id={"#{@id}-bg"} class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
<div class="fixed inset-0 z-10 w-screen overflow-y-auto">
<div class="flex min-h-full items-end justify-center p-4 sm:items-center sm:p-0">
<div
id={"#{@id}-container"}
phx-window-keydown={hide_modal(@id)}
phx-key="escape"
phx-click-away={hide_modal(@id)}
class="relative transform overflow-hidden rounded-lg bg-white p-4 shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-md sm:p-6"
>
<div>
<div class="hidden sm:flex justify-between">
<h3 class="text-lg font-semibold leading-6 text-gray-900">
<%= render_slot(@title) %>
</h3>
<button
phx-click={hide_modal(@id)}
type="button"
class="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
>
<Heroicons.x_mark class="h-6 w-6" />
</button>
</div>
<div class="mt-3 sm:mt-5">
<%= render_slot(@panel) %>
</div>
</div>
</div>
</div>
</div>
</div>
"""
end
def show(js \\ %JS{}, selector) do
JS.show(js,
to: selector,
transition:
{"transition-all transform ease-out duration-300",
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
"opacity-100 translate-y-0 sm:scale-100"}
)
end
def hide(js \\ %JS{}, selector) do
JS.hide(js,
to: selector,
time: 200,
transition:
{"transition-all transform ease-in duration-200",
"opacity-100 translate-y-0 sm:scale-100",
"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}
)
end
def show_modal(js \\ %JS{}, id) when is_binary(id) do
js
|> JS.show(to: "##{id}")
|> JS.show(
to: "##{id}-bg",
transition: {"transition-all transform ease-out duration-300", "opacity-0", "opacity-100"}
)
|> show("##{id}-container")
|> JS.add_class("overflow-hidden", to: "body")
|> JS.focus_first(to: "##{id}-content")
end
def hide_modal(js \\ %JS{}, id) do
js
|> JS.hide(
to: "##{id}-bg",
transition: {"transition-all transform ease-in duration-200", "opacity-100", "opacity-0"}
)
|> hide("##{id}-container")
|> JS.hide(to: "##{id}", transition: {"block", "block", "hidden"})
|> JS.remove_class("overflow-hidden", to: "body")
|> JS.pop_focus()
|> JS.push("modal-closed")
end
attr :class, :string, default: ""
attr :type, :string, default: "button"
attr :rest, :global
slot :inner_block
def button(assigns) do
~H"""
<button
type={@type}
class={[
"rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",
@class
]}
{@rest}
>
<%= render_slot(@inner_block) %>
</button>
"""
end
def modal_fade_out_duration() do
200
end
end end

@ -41,6 +41,20 @@ defmodule PlausibleWeb.Live.Components.ComboBox do
@default_suggestions_limit 15 @default_suggestions_limit 15
def reset(id) do
send_update(__MODULE__, id: id, reset: true)
end
def update(%{reset: true}, socket) do
socket =
%{socket | assigns: Map.delete(socket.assigns, :options)}
|> assign(display_value: "", submit_value: "")
|> assign_options()
|> assign_suggestions()
{:ok, socket}
end
def update(assigns, socket) do def update(assigns, socket) do
socket = assign(socket, assigns) socket = assign(socket, assigns)
@ -306,14 +320,18 @@ defmodule PlausibleWeb.Live.Components.ComboBox do
|> assign(:display_value, display_value) |> assign(:display_value, display_value)
|> assign(:submit_value, submit_value) |> assign(:submit_value, submit_value)
send( if socket.assigns[:on_select] do
self(), socket.assigns[:on_select].(submit_value)
{:selection_made, else
%{ send(
by: id, self(),
submit_value: submit_value {:selection_made,
}} %{
) by: id,
submit_value: submit_value
}}
)
end
socket socket
end end

@ -222,7 +222,7 @@ defmodule PlausibleWeb.Live.Components.Form do
def label(assigns) do def label(assigns) do
~H""" ~H"""
<label for={@for} class="block font-medium dark:text-gray-100"> <label for={@for} class="block text-sm font-medium dark:text-gray-100">
<%= render_slot(@inner_block) %> <%= render_slot(@inner_block) %>
</label> </label>
""" """

@ -3,9 +3,9 @@ defmodule PlausibleWeb.Live.PropsSettings do
LiveView allowing listing, allowing and disallowing custom event properties. LiveView allowing listing, allowing and disallowing custom event properties.
""" """
use Phoenix.LiveView use PlausibleWeb, :live_view
use Phoenix.HTML
alias PlausibleWeb.Live.Components.ComboBox alias PlausibleWeb.Live.Components.ComboBox
alias PlausibleWeb.Live.PropsSettings.FormComponent
def mount( def mount(
_params, _params,
@ -29,63 +29,10 @@ defmodule PlausibleWeb.Live.PropsSettings do
site_id: site_id, site_id: site_id,
domain: domain, domain: domain,
current_user_id: user_id, current_user_id: user_id,
add_prop?: false,
filter_text: "" filter_text: ""
)} )}
end end
def render(assigns) do
~H"""
<section id="props-settings-main">
<.live_component id="embedded_liveview_flash" module={PlausibleWeb.Live.Flash} flash={@flash} />
<%= if @add_prop? do %>
<%= live_render(
@socket,
PlausibleWeb.Live.PropsSettings.Form,
id: "props-form",
session: %{
"current_user_id" => @current_user_id,
"domain" => @domain,
"site_id" => @site_id,
"rendered_by" => self()
}
) %>
<% end %>
<.live_component
module={PlausibleWeb.Live.PropsSettings.List}
id="props-list"
props={@displayed_props}
domain={@domain}
filter_text={@filter_text}
/>
</section>
"""
end
def handle_event("allow", %{"prop" => prop}, socket) do
case Plausible.Props.allow(socket.assigns.site, prop) do
{:ok, site} ->
send_update(ComboBox, id: :prop_input, display_value: "", submit_value: "")
{:noreply,
assign(socket,
site: site,
form: new_form(site)
)}
{:error, changeset} ->
{:noreply,
assign(socket,
form: to_form(Map.put(changeset, :action, :validate))
)}
end
end
def handle_event("add-prop", _value, socket) do
{:noreply, assign(socket, add_prop?: true)}
end
def handle_event("filter", %{"filter-text" => filter_text}, socket) do def handle_event("filter", %{"filter-text" => filter_text}, socket) do
new_list = new_list =
ComboBox.StaticSearch.suggest( ComboBox.StaticSearch.suggest(
@ -112,6 +59,8 @@ defmodule PlausibleWeb.Live.PropsSettings do
site: site site: site
) )
ComboBox.reset("prop_input")
Process.send_after(self(), :clear_flash, 5000) Process.send_after(self(), :clear_flash, 5000)
{:noreply, socket} {:noreply, socket}
end end
@ -125,36 +74,24 @@ defmodule PlausibleWeb.Live.PropsSettings do
)} )}
end end
def handle_info(:cancel_add_prop, socket) do def handle_event("modal-closed", _param, socket) do
{:noreply, assign(socket, add_prop?: false)} ComboBox.reset("prop_input")
end
def handle_info({:props_allowed, props}, socket) when is_list(props) do
socket =
socket
|> assign(
add_prop?: false,
filter_text: "",
all_props: props,
displayed_props: props,
site: %{socket.assigns.site | allowed_event_props: props}
)
|> put_flash(:success, "Properties added successfully")
{:noreply, socket} {:noreply, socket}
end end
def handle_info( def handle_info(
{:prop_allowed, prop}, {FormComponent, {:prop_allowed, prop}},
%{assigns: %{site: site}} = socket %{assigns: %{site: site}} = socket
) )
when is_binary(prop) do when is_binary(prop) do
allowed_event_props = [prop | site.allowed_event_props || []] allowed_event_props = [prop | site.allowed_event_props || []]
socket = push_event(socket, "close-modal", %{id: "add-prop"})
socket = socket =
socket socket
|> assign( |> assign(
add_prop?: false,
filter_text: "", filter_text: "",
all_props: allowed_event_props, all_props: allowed_event_props,
displayed_props: allowed_event_props, displayed_props: allowed_event_props,
@ -169,7 +106,13 @@ defmodule PlausibleWeb.Live.PropsSettings do
{:noreply, clear_flash(socket)} {:noreply, clear_flash(socket)}
end end
defp new_form(site) do defp delete_confirmation_text(prop) do
to_form(Plausible.Props.allow_changeset(site, [])) """
Are you sure you want to remove the following property:
#{prop}
This will just affect the UI, all of your analytics data will stay intact.
"""
end end
end end

@ -0,0 +1,83 @@
<.live_component id="embedded_liveview_flash" module={PlausibleWeb.Live.Flash} flash={@flash} />
<section>
<div>
<div class="border-t border-gray-200 pt-4 sm:flex sm:items-center sm:justify-between">
<form id="filter-form" phx-change="filter">
<div class="text-gray-800 text-sm inline-flex items-center">
<div class="relative mt-2 rounded-md shadow-sm flex">
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<Heroicons.magnifying_glass class="feather mr-1 dark:text-gray-300" />
</div>
<input
type="text"
name="filter-text"
id="filter-text"
class="pl-8 shadow-sm dark:bg-gray-900 dark:text-gray-300 focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 dark:border-gray-500 rounded-md dark:bg-gray-800"
placeholder="Search Properties"
value={@filter_text}
/>
</div>
<Heroicons.backspace
:if={String.trim(@filter_text) != ""}
class="feather ml-2 cursor-pointer hover:text-red-500 dark:text-gray-300 dark:hover:text-red-500 mt-2"
phx-click="reset-filter-text"
id="reset-filter"
/>
</div>
</form>
<div class="mt-4 flex sm:ml-4 sm:mt-0">
<.modal id="add-prop">
<:trigger>
<.button>+ Add Property</.button>
</:trigger>
<:title>Add property for <%= @site.domain %></:title>
<:panel>
<.live_component
id={:new}
module={FormComponent}
site={@site}
/>
</:panel>
</.modal>
</div>
</div>
<%= if is_list(@displayed_props) && length(@displayed_props) > 0 do %>
<ul id="allowed-props" class="mt-12 divide-gray-200 divide-y dark:divide-gray-600">
<li :for={{prop, index} <- Enum.with_index(@displayed_props)} id={"prop-#{index}"} class="flex py-4">
<span class="flex-1 truncate font-medium text-sm text-gray-800 dark:text-gray-200">
<%= prop %>
</span>
<button
id={"disallow-prop-#{prop}"}
data-confirm={delete_confirmation_text(prop)}
phx-click="disallow-prop"
phx-value-prop={prop}
class="w-4 h-4 text-red-600 hover:text-red-700"
aria-label={"Remove #{prop} property"}
>
<Heroicons.trash class="feather feather-sm" />
</button>
</li>
</ul>
<% else %>
<p class="text-sm text-gray-800 dark:text-gray-200 mt-12 mb-8 text-center">
<span :if={String.trim(@filter_text) != ""}>
No properties found for this site. Please refine or
<a
class="text-indigo-500 cursor-pointer underline"
phx-click="reset-filter-text"
id="reset-filter-hint"
>
reset your search.
</a>
</span>
<span :if={String.trim(@filter_text) == "" && Enum.empty?(@displayed_props)}>
No properties configured for this site.
</span>
</p>
<% end %>
</div>
</section>

@ -1,159 +0,0 @@
defmodule PlausibleWeb.Live.PropsSettings.Form do
@moduledoc """
Live view for the custom props creation form
"""
use Phoenix.LiveView
import PlausibleWeb.Live.Components.Form
alias PlausibleWeb.Live.Components.ComboBox
def mount(
_params,
%{
"site_id" => _site_id,
"current_user_id" => user_id,
"domain" => domain,
"rendered_by" => pid
},
socket
) do
site = Plausible.Sites.get_for_user!(user_id, domain, [:owner, :admin, :super_admin])
form = new_form(site)
{:ok,
assign(socket,
form: form,
domain: domain,
rendered_by: pid,
prop_key_options_count: 0,
site: site
)}
end
def render(assigns) do
~H"""
<div
class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity z-50"
phx-window-keydown="cancel-allow-prop"
phx-key="Escape"
>
</div>
<div class="fixed inset-0 flex items-center justify-center mt-16 z-50 overflow-y-auto overflow-x-hidden">
<div class="w-1/2 h-full">
<.form
:let={f}
for={@form}
class="max-w-md w-full mx-auto bg-white dark:bg-gray-800 shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-8"
phx-submit="allow-prop"
phx-click-away="cancel-allow-prop"
>
<h2 class="text-xl font-black dark:text-gray-100">Add Property for <%= @domain %></h2>
<div class="py-2">
<.label for="prop_input">
Property
</.label>
<.live_component
id="prop_input"
submit_name="prop"
class={[
"py-2"
]}
module={ComboBox}
suggest_fun={
pid = self()
fn
"", [] ->
options =
@site
|> Plausible.Props.suggest_keys_to_allow()
|> Enum.map(&{&1, &1})
send(pid, {:update_prop_key_options_count, Enum.count(options)})
options
input, options ->
ComboBox.StaticSearch.suggest(input, options)
end
}
creatable
/>
<.error :for={{msg, opts} <- f[:allowed_event_props].errors}>
<%= Enum.reduce(opts, msg, fn {key, value}, acc ->
String.replace(acc, "%{#{key}}", fn _ -> to_string(value) end)
end) %>
</.error>
</div>
<div class="py-4">
<button type="submit" class="button text-base font-bold w-full">
Add Property →
</button>
</div>
<button
:if={@prop_key_options_count > 0}
title="Use this to add any existing properties from your past events into your settings. This allows you to set up properties without having to manually enter each item."
class="mt-2 text-sm hover:underline text-indigo-600 dark:text-indigo-400 text-left"
phx-click="allow-existing-props"
>
Already sending custom properties? Click to add <%= @prop_key_options_count %> existing properties we found.
</button>
</.form>
</div>
</div>
"""
end
def handle_info({:update_prop_key_options_count, count}, socket) do
{:noreply, assign(socket, prop_key_options_count: count)}
end
def handle_info({:selection_made, %{submit_value: _prop}}, socket) do
{:noreply, socket}
end
def handle_event("allow-prop", %{"prop" => prop}, socket) do
case Plausible.Props.allow(socket.assigns.site, prop) do
{:ok, site} ->
send(socket.assigns.rendered_by, {:prop_allowed, prop})
{:noreply,
assign(socket,
site: site,
form: new_form(site)
)}
{:error, changeset} ->
{:noreply,
assign(socket,
form: to_form(Map.put(changeset, :action, :validate))
)}
end
end
def handle_event("allow-existing-props", _params, socket) do
{:ok, site} = Plausible.Props.allow_existing_props(socket.assigns.site)
send(socket.assigns.rendered_by, {:props_allowed, site.allowed_event_props})
{:noreply,
assign(socket,
site: site,
form: new_form(site),
prop_key_options_count: 0
)}
end
def handle_event("cancel-allow-prop", _value, socket) do
send(socket.assigns.rendered_by, :cancel_add_prop)
{:noreply, socket}
end
defp new_form(site) do
to_form(Plausible.Props.allow_changeset(site, []))
end
end

@ -0,0 +1,109 @@
defmodule PlausibleWeb.Live.PropsSettings.FormComponent do
@moduledoc """
Live component for the custom props creation form
"""
use PlausibleWeb, :live_component
import PlausibleWeb.Live.Components.Form
alias PlausibleWeb.Live.Components.ComboBox
@impl true
def render(assigns) do
~H"""
<div>
<.form :let={f} for={@form} phx-target={@myself} phx-submit="allow-prop">
<div class="py-2">
<.label for="prop_input">
Property
</.label>
<.live_component
id="prop_input"
submit_name="prop"
class="mt-2"
module={ComboBox}
on_select={&send_update(@myself, selection: &1)}
suggest_fun={
fn
"", [] ->
options =
@site
|> Plausible.Props.suggest_keys_to_allow()
|> Enum.map(&{&1, &1})
# Use of @myself here required LiveView upgrade https://github.com/phoenixframework/phoenix_live_view/blob/v0.20.1/CHANGELOG.md#enhancements-1
send_update(@myself, prop_key_options_count: Enum.count(options))
options
input, options ->
ComboBox.StaticSearch.suggest(input, options)
end
}
creatable
/>
<.error :for={{msg, opts} <- f[:allowed_event_props].errors}>
<%= Enum.reduce(opts, msg, fn {key, value}, acc ->
String.replace(acc, "%{#{key}}", fn _ -> to_string(value) end)
end) %>
</.error>
</div>
<div class="mt-5 sm:mt-6">
<.button
phx-disable-with="Saving..."
type="submit"
class="group w-full inline-flex justify-center custom-class phx-submit-loading:animate-pulse"
>
<Heroicons.arrow_right_circle class="group-[.custom-class]:animate-spin h-4 w-4" />
Add Property →
</.button>
</div>
<button
:if={@prop_key_options_count > 0}
title="Use this to add any existing properties from your past events into your settings. This allows you to set up properties without having to manually enter each item."
class="mt-2 text-sm hover:underline text-indigo-600 dark:text-indigo-400 text-left"
phx-click="allow-existing-props"
>
Already sending custom properties? Click to add <%= @prop_key_options_count %> existing properties we found.
</button>
</.form>
</div>
"""
end
@impl true
def update(%{site: site}, socket) do
changeset = Plausible.Props.allow_changeset(site, [])
{:ok,
socket
|> assign(site: site, form: to_form(changeset))
|> assign_new(:prop_key_options_count, fn -> 0 end)}
end
def update(%{prop_key_options_count: _count} = assigns, socket) do
{:ok, socket |> assign(assigns)}
end
def update(%{selection: _selection}, socket) do
# noop
{:ok, socket}
end
@impl true
def handle_event("allow-prop", %{"prop" => prop}, socket) do
case Plausible.Props.allow(socket.assigns.site, prop) do
{:ok, _site} ->
send(self(), {__MODULE__, {:prop_allowed, prop}})
{:noreply, socket}
{:error, changeset} ->
{:noreply,
assign(socket,
form: to_form(Map.put(changeset, :action, :validate))
)}
end
end
end

@ -1,100 +0,0 @@
defmodule PlausibleWeb.Live.PropsSettings.List do
@moduledoc """
Phoenix LiveComponent module that renders a list of custom properties
"""
use Phoenix.LiveComponent
use Phoenix.HTML
use Plausible.Funnel
attr(:props, :list, required: true)
attr(:domain, :string, required: true)
attr(:filter_text, :string)
def render(assigns) do
~H"""
<div>
<div class="border-t border-gray-200 pt-4 sm:flex sm:items-center sm:justify-between">
<form id="filter-form" phx-change="filter">
<div class="text-gray-800 text-sm inline-flex items-center">
<div class="relative mt-2 rounded-md shadow-sm flex">
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<Heroicons.magnifying_glass class="feather mr-1 dark:text-gray-300" />
</div>
<input
type="text"
name="filter-text"
id="filter-text"
class="pl-8 shadow-sm dark:bg-gray-900 dark:text-gray-300 focus:ring-indigo-500 focus:border-indigo-500 block w-full sm:text-sm border-gray-300 dark:border-gray-500 rounded-md dark:bg-gray-800"
placeholder="Search Properties"
value={@filter_text}
/>
</div>
<Heroicons.backspace
:if={String.trim(@filter_text) != ""}
class="feather ml-2 cursor-pointer hover:text-red-500 dark:text-gray-300 dark:hover:text-red-500 mt-2"
phx-click="reset-filter-text"
id="reset-filter"
/>
</div>
</form>
<div class="mt-4 flex sm:ml-4 sm:mt-0">
<button
type="button"
phx-click="add-prop"
class="mt-2 block items-center rounded-md bg-indigo-600 p-2 text-sm text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
+ Add Property
</button>
</div>
</div>
<%= if is_list(@props) && length(@props) > 0 do %>
<ul id="allowed-props" class="mt-12 divide-gray-200 divide-y dark:divide-gray-600">
<li :for={{prop, index} <- Enum.with_index(@props)} id={"prop-#{index}"} class="flex py-4">
<span class="flex-1 truncate font-medium text-sm text-gray-800 dark:text-gray-200">
<%= prop %>
</span>
<button
id={"disallow-prop-#{prop}"}
data-confirm={delete_confirmation_text(prop)}
phx-click="disallow-prop"
phx-value-prop={prop}
class="w-4 h-4 text-red-600 hover:text-red-700"
aria-label={"Remove #{prop} property"}
>
<Heroicons.trash class="feather feather-sm" />
</button>
</li>
</ul>
<% else %>
<p class="text-sm text-gray-800 dark:text-gray-200 mt-12 mb-8 text-center">
<span :if={String.trim(@filter_text) != ""}>
No properties found for this site. Please refine or
<a
class="text-indigo-500 cursor-pointer underline"
phx-click="reset-filter-text"
id="reset-filter-hint"
>
reset your search.
</a>
</span>
<span :if={String.trim(@filter_text) == "" && Enum.empty?(@props)}>
No properties configured for this site.
</span>
</p>
<% end %>
</div>
"""
end
defp delete_confirmation_text(prop) do
"""
Are you sure you want to remove the following property:
#{prop}
This will just affect the UI, all of your analytics data will stay intact.
"""
end
end

@ -104,17 +104,17 @@
"paginator": {:git, "https://github.com/duffelhq/paginator.git", "3508d6ad77a95ac1faf15d5fd7f959fab3e17da2", []}, "paginator": {:git, "https://github.com/duffelhq/paginator.git", "3508d6ad77a95ac1faf15d5fd7f959fab3e17da2", []},
"parallel_stream": {:hex, :parallel_stream, "1.1.0", "f52f73eb344bc22de335992377413138405796e0d0ad99d995d9977ac29f1ca9", [:mix], [], "hexpm", "684fd19191aedfaf387bbabbeb8ff3c752f0220c8112eb907d797f4592d6e871"}, "parallel_stream": {:hex, :parallel_stream, "1.1.0", "f52f73eb344bc22de335992377413138405796e0d0ad99d995d9977ac29f1ca9", [:mix], [], "hexpm", "684fd19191aedfaf387bbabbeb8ff3c752f0220c8112eb907d797f4592d6e871"},
"parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"}, "parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"},
"phoenix": {:hex, :phoenix, "1.7.7", "4cc501d4d823015007ba3cdd9c41ecaaf2ffb619d6fb283199fa8ddba89191e0", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "8966e15c395e5e37591b6ed0bd2ae7f48e961f0f60ac4c733f9566b519453085"}, "phoenix": {:hex, :phoenix, "1.7.8", "80cf70507f892843f5b265a89b74327141c71cc0071898fca0d150015d67ffd6", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "7549e3a2f121a232dfbd88ef8dcaeccd671fb09e5fd53ec241a178f248b2c629"},
"phoenix_ecto": {:hex, :phoenix_ecto, "4.4.2", "b21bd01fdeffcfe2fab49e4942aa938b6d3e89e93a480d4aee58085560a0bc0d", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "70242edd4601d50b69273b057ecf7b684644c19ee750989fd555625ae4ce8f5d"}, "phoenix_ecto": {:hex, :phoenix_ecto, "4.4.2", "b21bd01fdeffcfe2fab49e4942aa938b6d3e89e93a480d4aee58085560a0bc0d", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "70242edd4601d50b69273b057ecf7b684644c19ee750989fd555625ae4ce8f5d"},
"phoenix_html": {:hex, :phoenix_html, "3.3.1", "4788757e804a30baac6b3fc9695bf5562465dd3f1da8eb8460ad5b404d9a2178", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "bed1906edd4906a15fd7b412b85b05e521e1f67c9a85418c55999277e553d0d3"}, "phoenix_html": {:hex, :phoenix_html, "3.3.3", "380b8fb45912b5638d2f1d925a3771b4516b9a78587249cabe394e0a5d579dc9", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "923ebe6fec6e2e3b3e569dfbdc6560de932cd54b000ada0208b5f45024bdd76c"},
"phoenix_live_reload": {:hex, :phoenix_live_reload, "1.4.1", "2aff698f5e47369decde4357ba91fc9c37c6487a512b41732818f2204a8ef1d3", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "9bffb834e7ddf08467fe54ae58b5785507aaba6255568ae22b4d46e2bb3615ab"}, "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.4.1", "2aff698f5e47369decde4357ba91fc9c37c6487a512b41732818f2204a8ef1d3", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "9bffb834e7ddf08467fe54ae58b5785507aaba6255568ae22b4d46e2bb3615ab"},
"phoenix_live_view": {:hex, :phoenix_live_view, "0.19.4", "dd9ffe3ca0683bdef4f340bcdd2c35a6ee0d581a2696033fc25f52e742618bdc", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "fd2c666d227476d63af7b8c20e6e61d16f07eb49f924cf4198fca7668156f15b"}, "phoenix_live_view": {:hex, :phoenix_live_view, "0.20.1", "92a37acf07afca67ac98bd326532ba8f44ad7d4bdf3e4361b03f7f02594e5ae9", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "be494fd1215052729298b0e97d5c2ce8e719c00854b82cd8cf15c1cd7fcf6294"},
"phoenix_pagination": {:hex, :phoenix_pagination, "0.7.0", "e8503270da3c41f4ac4fea5ae90503f51287e9cd72b3a6abb0c547fe84d9639b", [:mix], [{:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.12", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.11.1", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "27055338e9824bb302bb0d72e14972a9a2fb916bf435545f04f361671d6d827f"}, "phoenix_pagination": {:hex, :phoenix_pagination, "0.7.0", "e8503270da3c41f4ac4fea5ae90503f51287e9cd72b3a6abb0c547fe84d9639b", [:mix], [{:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.12", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.11.1", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "27055338e9824bb302bb0d72e14972a9a2fb916bf435545f04f361671d6d827f"},
"phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"}, "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"},
"phoenix_template": {:hex, :phoenix_template, "1.0.2", "a3dd349493d7c0b8f58da8175f805963a5b809ffc7d8c1b8dd46ba5b199ef58f", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "ab78ebc964685b9eeba102344049eb32d69e582c497d5a0ae6f25909db00c67b"}, "phoenix_template": {:hex, :phoenix_template, "1.0.3", "32de561eefcefa951aead30a1f94f1b5f0379bc9e340bb5c667f65f1edfa4326", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "16f4b6588a4152f3cc057b9d0c0ba7e82ee23afa65543da535313ad8d25d8e2c"},
"phoenix_view": {:hex, :phoenix_view, "2.0.2", "6bd4d2fd595ef80d33b439ede6a19326b78f0f1d8d62b9a318e3d9c1af351098", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "a929e7230ea5c7ee0e149ffcf44ce7cf7f4b6d2bfe1752dd7c084cdff152d36f"}, "phoenix_view": {:hex, :phoenix_view, "2.0.2", "6bd4d2fd595ef80d33b439ede6a19326b78f0f1d8d62b9a318e3d9c1af351098", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "a929e7230ea5c7ee0e149ffcf44ce7cf7f4b6d2bfe1752dd7c084cdff152d36f"},
"php_serializer": {:hex, :php_serializer, "2.0.0", "b43f31aca22ed7321f32da2b94fe2ddf9b6739a965cb51541969119e572e821d", [:mix], [], "hexpm", "61e402e99d9062c0225a3f4fcf7e43b4cba1b8654944c0e7c139c3ca9de481da"}, "php_serializer": {:hex, :php_serializer, "2.0.0", "b43f31aca22ed7321f32da2b94fe2ddf9b6739a965cb51541969119e572e821d", [:mix], [], "hexpm", "61e402e99d9062c0225a3f4fcf7e43b4cba1b8654944c0e7c139c3ca9de481da"},
"plug": {:hex, :plug, "1.14.2", "cff7d4ec45b4ae176a227acd94a7ab536d9b37b942c8e8fa6dfc0fff98ff4d80", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "842fc50187e13cf4ac3b253d47d9474ed6c296a8732752835ce4a86acdf68d13"}, "plug": {:hex, :plug, "1.15.1", "b7efd81c1a1286f13efb3f769de343236bd8b7d23b4a9f40d3002fc39ad8f74c", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "459497bd94d041d98d948054ec6c0b76feacd28eec38b219ca04c0de13c79d30"},
"plug_cowboy": {:hex, :plug_cowboy, "2.6.1", "9a3bbfceeb65eff5f39dab529e5cd79137ac36e913c02067dba3963a26efe9b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "de36e1a21f451a18b790f37765db198075c25875c64834bcc82d90b309eb6613"}, "plug_cowboy": {:hex, :plug_cowboy, "2.6.1", "9a3bbfceeb65eff5f39dab529e5cd79137ac36e913c02067dba3963a26efe9b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "de36e1a21f451a18b790f37765db198075c25875c64834bcc82d90b309eb6613"},
"plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"}, "plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"},
"poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"}, "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"},
@ -141,8 +141,8 @@
"ua_inspector": {:hex, :ua_inspector, "3.4.0", "9410b51f9aeda5074da3f4f32553f3bc20b6463869a3822db1ee08aa6d0afbb9", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:yamerl, "~> 0.7", [hex: :yamerl, repo: "hexpm", optional: false]}], "hexpm", "4fb3d9283621935a6f5158c12e30ce7ac18e004f6f11e05f5e3ae9ef8beb7022"}, "ua_inspector": {:hex, :ua_inspector, "3.4.0", "9410b51f9aeda5074da3f4f32553f3bc20b6463869a3822db1ee08aa6d0afbb9", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:yamerl, "~> 0.7", [hex: :yamerl, repo: "hexpm", optional: false]}], "hexpm", "4fb3d9283621935a6f5158c12e30ce7ac18e004f6f11e05f5e3ae9ef8beb7022"},
"unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"},
"unsafe": {:hex, :unsafe, "1.0.1", "a27e1874f72ee49312e0a9ec2e0b27924214a05e3ddac90e91727bc76f8613d8", [:mix], [], "hexpm", "6c7729a2d214806450d29766abc2afaa7a2cbecf415be64f36a6691afebb50e5"}, "unsafe": {:hex, :unsafe, "1.0.1", "a27e1874f72ee49312e0a9ec2e0b27924214a05e3ddac90e91727bc76f8613d8", [:mix], [], "hexpm", "6c7729a2d214806450d29766abc2afaa7a2cbecf415be64f36a6691afebb50e5"},
"websock": {:hex, :websock, "0.5.2", "b3c08511d8d79ed2c2f589ff430bd1fe799bb389686dafce86d28801783d8351", [:mix], [], "hexpm", "925f5de22fca6813dfa980fb62fd542ec43a2d1a1f83d2caec907483fe66ff05"}, "websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"},
"websock_adapter": {:hex, :websock_adapter, "0.5.3", "4908718e42e4a548fc20e00e70848620a92f11f7a6add8cf0886c4232267498d", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "cbe5b814c1f86b6ea002b52dd99f345aeecf1a1a6964e209d208fb404d930d3d"}, "websock_adapter": {:hex, :websock_adapter, "0.5.4", "7af8408e7ed9d56578539594d1ee7d8461e2dd5c3f57b0f2a5352d610ddde757", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "d2c238c79c52cbe223fcdae22ca0bb5007a735b9e933870e241fce66afb4f4ab"},
"yamerl": {:hex, :yamerl, "0.10.0", "4ff81fee2f1f6a46f1700c0d880b24d193ddb74bd14ef42cb0bcf46e81ef2f8e", [:rebar3], [], "hexpm", "346adb2963f1051dc837a2364e4acf6eb7d80097c0f53cbdc3046ec8ec4b4e6e"}, "yamerl": {:hex, :yamerl, "0.10.0", "4ff81fee2f1f6a46f1700c0d880b24d193ddb74bd14ef42cb0bcf46e81ef2f8e", [:rebar3], [], "hexpm", "346adb2963f1051dc837a2364e4acf6eb7d80097c0f53cbdc3046ec8ec4b4e6e"},
"zxcvbn": {:git, "https://github.com/techgaun/zxcvbn-elixir.git", "aede1d49d39e89d7b3d1c381de5f04c9907d8171", []}, "zxcvbn": {:git, "https://github.com/techgaun/zxcvbn-elixir.git", "aede1d49d39e89d7b3d1c381de5f04c9907d8171", []},
} }

Loading…
Cancel
Save