Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remake

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remake - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

bundle/project-files/assets/js/helpers/event-helpers.js

17

bundle/_remake/client-side/inputjs/choiceAndToggleEventListeners.js
import { $ } from '../queryjs';
import { camelCaseToDash } from '../hummingbird/lib/string';
import { callWatchFunctions } from './syncData';
import { callSaveFunction } from './onSave';

@@ -15,2 +16,6 @@ export default function () {

setValue({elem: event.currentTarget, keyName, attributeValue});
if (event.currentTarget.getAttribute("data-i") === "triggerSaveOnChange") {
callSaveFunction({targetElement: event.currentTarget});
}
});

@@ -26,2 +31,6 @@

setValue({elem: event.currentTarget, keyName, attributeValue: "true", toggleValue: true});
if (event.currentTarget.getAttribute("data-i") === "triggerSaveOnChange") {
callSaveFunction({targetElement: event.currentTarget});
}
})

@@ -37,2 +46,6 @@

setValue({elem: event.currentTarget, keyName, attributeValue});
if (event.currentTarget.getAttribute("data-i") === "triggerSaveOnChange") {
callSaveFunction({targetElement: event.currentTarget});
}
});

@@ -49,2 +62,6 @@

setValue({elem: event.currentTarget, keyName, attributeValue});
if (event.currentTarget.getAttribute("data-i") === "triggerSaveOnChange") {
callSaveFunction({targetElement: event.currentTarget});
}
});

@@ -51,0 +68,0 @@

8

bundle/_remake/client-side/inputjs/inputElementEventListener.js
import { $ } from '../queryjs';
import { camelCaseToDash } from '../hummingbird/lib/string';
import { callWatchFunctions } from "./syncData";
import { callSaveFunction } from './onSave';

@@ -8,3 +9,4 @@ export default function () {

// <input> and <textarea>
$.on("input", "input[data-i], textarea[data-i]", function (event) {
// IMPORTANT: This is ONLY for text inputs, not radio, select, or checkboxes
$.on("input", "input[type='text'][data-i], textarea[data-i]", function (event) {
// 2. get the key name inside the name attribute

@@ -31,4 +33,8 @@ let camelCaseKeyName = event.currentTarget.getAttribute("name");

});
if (event.currentTarget.getAttribute("data-i") === "triggerSaveOnChange") {
callSaveFunction({targetElement: event.currentTarget});
}
});
}

@@ -5,2 +5,4 @@ import { getDataAndDataSourceElemFromNodeAndAncestors, setValueForKeyName } from "../outputjs";

// this is fed a save callback function when inputjs in initialized
let afterSyncCallbacks = [];

@@ -11,2 +13,10 @@ export function afterSync (cb) {

// syncDataBetweenElements
// 1. get the data
// 2. loop through the keys
// 3. sync data from keys into targetElement (looking through ancestors)
// 4. call all watch functions inside where the data was synced into
// 5. syncs data into input elements if they're inside the element that was synced into
// 6. the afterSyncCallbacks are called
// *** THIS INCLUDES A SAVE FUNCTION DEFINED WHEN REMAKE IS INITIALIZED ***
export function syncDataBetweenElements ({sourceElement, targetElement, shouldTriggerSave}) {

@@ -53,3 +63,3 @@

// make sure data sync happens after all date is in place
// make sure data sync happens after all data is in place
// e.g. we might want to have the switch action button also set data

@@ -56,0 +66,0 @@ // (we currently do this with the inline edit revisions submit button)

4

bundle/project-files/_bootstrap-data/partials/todo.json
{
"text": "Hello"
"todo": {
"text": "Hello"
}
}
import Remake from '../../../_remake/client-side';
import './helpers/event-helpers';
import crostini from 'crostini';

@@ -3,0 +4,0 @@

{
"name": "remake",
"version": "1.0.1",
"version": "1.1.0",
"description": "Generate a full-stack Remake web app",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc