MCPcopy Create free account
hub / github.com/tinyplex/tinybase / widget

Function widget

docs/pseudo.esm.sh/tinybase@9.0.0/ui-solid-dom/index.js:936–1004  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

934 }
935 };
936 const widget = () => getTypeCase(
937 thingType(),
938 (() => {
939 var _el$0 = _tmpl$7();
940 _el$0.addEventListener(
941 "input",
942 (event) => handleThingChange(
943 string(event[CURRENT_TARGET][_VALUE]),
944 setStringThing
945 )
946 );
947 effect(() => _el$0.value = stringThing());
948 return _el$0;
949 })(),
950 (() => {
951 var _el$1 = _tmpl$8();
952 _el$1.addEventListener(
953 "input",
954 (event) => handleThingChange(
955 number(event[CURRENT_TARGET][_VALUE] || 0),
956 setNumberThing
957 )
958 );
959 effect(() => _el$1.value = numberThing());
960 return _el$1;
961 })(),
962 (() => {
963 var _el$10 = _tmpl$9();
964 _el$10.addEventListener(
965 "input",
966 (event) => handleThingChange(
967 boolean(event[CURRENT_TARGET].checked),
968 setBooleanThing
969 )
970 );
971 effect(() => _el$10.checked = booleanThing());
972 return _el$10;
973 })(),
974 (() => {
975 var _el$11 = _tmpl$7();
976 _el$11.addEventListener(
977 "input",
978 (event) => handleJsonThingChange(
979 event[CURRENT_TARGET][_VALUE],
980 setObjectThing,
981 isObject2,
982 setObjectClassName
983 )
984 );
985 effect(() => className(_el$11, objectClassName()));
986 effect(() => _el$11.value = objectThing());
987 return _el$11;
988 })(),
989 (() => {
990 var _el$12 = _tmpl$7();
991 _el$12.addEventListener(
992 "input",
993 (event) => handleJsonThingChange(

Callers 1

contentFunction · 0.70

Calls 7

stringFunction · 0.85
numberFunction · 0.85
addEventListenerMethod · 0.80
getTypeCaseFunction · 0.70
handleThingChangeFunction · 0.70
handleJsonThingChangeFunction · 0.70
classNameFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…