addepar / ember-json-viewer Goto Github PK
View Code? Open in Web Editor NEWAn Ember Addon that adds a json-viewer component for showing collapsible/expandable json.
Home Page: https://addepar.github.io/ember-json-viewer
License: MIT License
An Ember Addon that adds a json-viewer component for showing collapsible/expandable json.
Home Page: https://addepar.github.io/ember-json-viewer
License: MIT License
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch [email protected]
for the project I'm working on.
The issue is that @ or this is not used for named arguments or own properties.
Here is the diff that solved my problem:
diff --git a/node_modules/ember-json-viewer/addon/templates/components/entry-viewer.hbs b/node_modules/ember-json-viewer/addon/templates/components/entry-viewer.hbs
index b799bea..e848d06 100644
--- a/node_modules/ember-json-viewer/addon/templates/components/entry-viewer.hbs
+++ b/node_modules/ember-json-viewer/addon/templates/components/entry-viewer.hbs
@@ -12,7 +12,7 @@
{{! In order for copy/paste to work, the quoted key (e.g. '"foo": ')
must be a single text node
}}
- {{quotedKey}}
+ {{this.quotedKey}}
</span>
</span>
{{else}}
@@ -20,7 +20,7 @@
{{! In order for copy/paste to work, the quoted key (e.g. '"foo": ')
must be a single text node
}}
- {{quotedKey}}
+ {{this.quotedKey}}
</span>
{{/if}}
{{value-viewer
diff --git a/node_modules/ember-json-viewer/addon/templates/components/value-viewer.hbs b/node_modules/ember-json-viewer/addon/templates/components/value-viewer.hbs
index 4ff1666..adefb9d 100644
--- a/node_modules/ember-json-viewer/addon/templates/components/value-viewer.hbs
+++ b/node_modules/ember-json-viewer/addon/templates/components/value-viewer.hbs
@@ -12,20 +12,20 @@
{{this.valueSummary}}
</span>
{{else}}
- <ul class="entries depth-{{depth}}">
+ <ul class="entries depth-{{this.depth}}">
{{#if this.isObj}}
- {{#each-in value as |key innerValue|}}
+ {{#each-in this.value as |key innerValue|}}
{{entry-viewer
key=key
value=innerValue
depth=this.depth
path=(concat this.path "." key)
displayOptions=this.displayOptions
- isLast=(is-last value key)
+ isLast=(is-last this.value key)
}}
{{/each-in}}
{{else}}
- {{#each value as |innerValue index|}}
+ {{#each this.value as |innerValue index|}}
<li class="entry">
{{value-viewer
value=innerValue
@@ -33,7 +33,7 @@
path=(concat this.path "[" index "]")
displayOptions=this.displayOptions
}}
- {{#unless (is-last value index)}}
+ {{#unless (is-last this.value index)}}
{{! In order for copy/paste to work, there cannot be extra whitespace around the delimiter }}
<span class="entry-delimiter" data-path={{concat this.path "[" index "]" "@" ","}}>,</span>
{{/unless}}
This issue body was partially generated by patch-package.
Add docs for the options properties.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.