cable_ready
Advanced tools
Comparing version 5.0.0-pre6 to 5.0.0-pre7
@@ -43,3 +43,3 @@ import { xpathToElement, dispatch } from './utils' | ||
console.error( | ||
`CableReady couldn't find the "${name}" operation. Make sure you haven't misspelled the operation name and that you've added all required operations.` | ||
`CableReady couldn't find the "${name}" operation. Make sure you use the camelized form when calling an operation method.` | ||
) | ||
@@ -46,0 +46,0 @@ } |
@@ -56,3 +56,7 @@ import morphdom from 'morphdom' | ||
if (!html.hasOwnProperty(url(blocks[i]))) { | ||
const response = await fetch(url(blocks[i])) | ||
const response = await fetch(url(blocks[i]), { | ||
headers: { | ||
'X-Cable-Ready': 'update' | ||
} | ||
}) | ||
.then(handleErrors) | ||
@@ -76,4 +80,3 @@ .catch(e => console.error(`Could not fetch ${url(blocks[i])}`)) | ||
html: fragments[i], | ||
permanentAttributeName: 'data-ignore-updates', | ||
focusSelector: null | ||
permanentAttributeName: 'data-ignore-updates' | ||
} | ||
@@ -80,0 +83,0 @@ dispatch(blocks[i], 'cable-ready:before-update', operation) |
@@ -33,2 +33,7 @@ import { mutableTags } from './enums' | ||
const verifyNotContentEditable = (detail, fromEl, toEl) => { | ||
if (fromEl === activeElement.element && fromEl.isContentEditable) return false | ||
return true | ||
} | ||
const verifyNotPermanent = (detail, fromEl, toEl) => { | ||
@@ -41,3 +46,3 @@ const { permanentAttributeName } = detail | ||
// only morph attributes on the active non-permanent text input | ||
if (!permanent && isTextInput(fromEl) && fromEl === activeElement.element) { | ||
if (!permanent && fromEl === activeElement.element && isTextInput(fromEl)) { | ||
const ignore = { value: true } | ||
@@ -54,3 +59,7 @@ Array.from(toEl.attributes).forEach(attribute => { | ||
const shouldMorphCallbacks = [verifyNotMutable, verifyNotPermanent] | ||
const shouldMorphCallbacks = [ | ||
verifyNotMutable, | ||
verifyNotPermanent, | ||
verifyNotContentEditable | ||
] | ||
const didMorphCallbacks = [] | ||
@@ -64,3 +73,4 @@ | ||
verifyNotMutable, | ||
verifyNotContentEditable, | ||
verifyNotPermanent | ||
} |
{ | ||
"name": "cable_ready", | ||
"version": "5.0.0-pre6", | ||
"version": "5.0.0-pre7", | ||
"description": "CableReady helps you create great real-time user experiences by making it simple to trigger client-side DOM changes from server-side Ruby.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,6 +5,6 @@ <p align="center"> | ||
<p align="center"> | ||
<a href="https://rubygems.org/gems/cable_ready"> | ||
<a href="https://rubygems.org/gems/cable_ready"> | ||
<img src="https://img.shields.io/gem/v/cable_ready.svg?color=red" /> | ||
</a> | ||
<a href="https://www.npmjs.com/package/cable_ready"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/cable_ready"> | ||
<img src="https://img.shields.io/npm/v/cable_ready.svg?color=blue" /> | ||
@@ -86,7 +86,10 @@ </a> | ||
1. Bump version number at `lib/cable_ready/version.rb` | ||
2. Run `rake build` | ||
3. Run `rake release` | ||
4. Run `yarn publish --no-git-tag-version` | ||
5. Commit and push changes to the `package.json` file | ||
1. Make sure that you run `yarn` and `bundle` to pick up the latest. | ||
1. Bump version number at `lib/cable_ready/version.rb`. Pre-release versions use `.preN` | ||
1. Run `rake build` | ||
1. Commit and push changes to github | ||
1. Run `rake release` | ||
1. Run `yarn publish --no-git-tag-version` | ||
1. Yarn will prompt you for the new version. Pre-release versions use `-preN` | ||
1. Commit and push changes to github | ||
@@ -93,0 +96,0 @@ ## 📝 License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
913
97
242798
52