This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Signal, signal } from '@angular/core'; | |
import { Event } from '@flowcards/core'; | |
export function getSignal<P, V>(event: Event<P, V>) { | |
const eventSignal = signal<Event<P, V>>(event); | |
event.registerCallback(() => { | |
eventSignal.set(this._internalEvent); | |
}); | |
return eventSignal.asReadonly; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Style Buttons: A Parallel State Demo | |
# 2018 August 06 | |
# By Ryan Lucas (Twitter: @ryanlucas) | |
Font Style Selector& | |
Bold | |
Bold Off | |
bold clicked -> Bold On | |
Bold On | |
bold clicked -> Bold Off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; i used the new-js->clj3 function from Darrick Wiebe | |
;; https://gist.github.com/pangloss/591d77231fda460c2fbe | |
;; i have added a :ns parameter | |
(let [data | |
"[{ \"web-app\": { \"servlet\": [ { \"servlet-name\": \"cofaxCDS\", \"servlet-class\": \"org.cofax.cds.CDSServlet\", \"init-param\": { \"configGlossary:installationAt\": \"Philadelphia, PA\", \"configGlossary:adminEmail\": \"[email protected]\", \"configGlossary:poweredBy\": \"Cofax\", \"configGlossary:poweredByIcon\": \"/images/cofax.gif\", \"configGlossary:staticPath\": \"/content/static\", \"templateProcessorClass\": \"org.cofax.WysiwygTemplate\", \"templateLoaderClass\": \"org.cofax.FilesTemplateLoader\", \"templatePath\": \"templates\" } }, { \"servlet-name\": \"cofaxAdmin\", \"servlet-class\": \"org.cofax.cds.AdminServlet\" }, { \"servlet-name\": \"cofaxTools\", \"servlet-class\": \"org.cofax.cms.CofaxToolsServlet\", \"init-param\": { \"templatePath\": \"toolstemplates/\", \"log\": 1, \"logLocation\": \"/usr/local/tomcat/logs/CofaxTools.log\", \"lo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns scheduler.devcards.omnexttest | |
(:require | |
[devcards.core] | |
[om.next :as om :refer-macros [defui ui]] | |
[om.dom :as dom :include-macros true]) | |
(:require-macros | |
[devcards.core :as dc :refer [defcard defcard-doc defcard-om-next noframe-doc deftest dom-node]])) | |
(defcard-doc | |
"## Navigation with Toggle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmulti read om/dispatch) | |
(defmethod read :input-handler | |
[{:keys [query state]} k {:keys [query]}] | |
(println "read: input-handler") | |
(let [st @state] | |
{:value {:input-handler (clojure.string/join [query "+X"]) }})) | |
(defui SomeInput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns om-tutorial.core | |
(:require | |
[goog.dom :as gdom] | |
[om.next :as om :refer-macros [defui]] | |
[om.dom :as dom])) | |
;; Problem: | |
;; the search input reader (:search/result) will get called 2 times with each query update. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns scheduler.main.core | |
(:require ;; global | |
[goog.dom :as gdom] | |
[om.next :as om :refer-macros [defui]] | |
[datascript.core :as d] | |
;[sablono.core :as html :refer-macros [html]] | |
;; scheduler | |
;[scheduler.devcards.testdata :as testdata] | |
;[scheduler.main.db :refer [conn mutate read]] | |
;[scheduler.main.placement :refer [placement Placement]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns om-tutorial.core | |
(:require | |
[goog.dom :as gdom] | |
[om.next :as om :refer-macros [defui]] | |
[datascript.core :as d] | |
[om.dom :as dom] | |
[cljs.pprint :as pprint])) | |
(enable-console-print!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns om-tutorial.core | |
(:require | |
[goog.dom :as gdom] | |
[om.next :as om :refer-macros [defui]] | |
[datascript.core :as d] | |
[om.dom :as dom])) | |
(enable-console-print!) | |
;; ----------------------------------------------------------------------------- |
NewerOlder