GithubHelp home page GithubHelp logo

addepar / ember-json-viewer Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 5.0 4.76 MB

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

JavaScript 88.05% CSS 2.84% Handlebars 5.98% HTML 3.13%
ember ember-addon

ember-json-viewer's People

Contributors

bantic avatar c69-addepar avatar ember-tomster avatar faf0-addepar avatar jimschofield avatar jonny-hein avatar mixonic avatar navkast avatar svc-security-workflows avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-json-viewer's Issues

Undefined error

Hi,
I recently upgraded ember from 3.x to 4.x and ever since the ember-json-viewer is giving me this error in console.
image

I've tried everything on my side to see if there is something I can do to fix this but nothing's working.

If anyone can help, thanks :)

@ or this is not used for named arguments or own properties

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.