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

angular-json-edit

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-json-edit - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

bower.json
{
"name": "angular-json-edit",
"version": "0.2.3",
"version": "0.2.4",
"homepage": "https://github.com/Rleahy22/angularJsonEditor",

@@ -5,0 +5,0 @@ "authors": [

@@ -127,8 +127,2 @@ (function() {

}
scope.$watch('showModal', function(newVal) {
if (newVal === true) {
scope.savedConfig = angular.merge({}, scope.config);
}
});
}

@@ -242,3 +236,3 @@ }

function getInputType() {
if (scope.newProperty.type === 'number') {
if (scope.newProperty && scope.newProperty.type === 'number') {
return 'number';

@@ -245,0 +239,0 @@ } else {

@@ -1,1 +0,1 @@

!function(){"use strict";angular.module("angular-json-edit",[])}(),function(){"use strict";function e(){function e(e){function n(n,t){var o={};o[n]=t,e.collapsed.push(o)}function t(n,t){e.isArray(t)?t.splice(n,1):delete t[n]}function o(n,t){var o={};o[n]=t,e.collapsed.forEach(function(t,r){angular.equals(t[n],o[n])&&e.collapsed.splice(r,1)})}function r(e){return"number"==typeof e?"number":"text"}function a(e){return Array.isArray(e)}function s(n,t){var o={},r=!1;return o[n]=t,e.collapsed.forEach(function(e){angular.equals(e[n],o[n])&&(r=!0)}),r}function i(e){return"object"==typeof e?!0:!1}e.collapse=n,e.collapsed=[],e.deleteProperty=t,e.expand=o,e.getInputType=r,e.isArray=a,e.isCollapsed=s,e.isNested=i,e.nest='<button class="json-delete json-button" ng-click="deleteProperty(key, parent)">&times;</button><div class="label-wrapper" ng-class="{\'padded-row\': !isNested(value)}"><i ng-show="isNested(value) && isCollapsed(key, parent)" class="json-arrow" ng-click="expand(key, parent)">&#8658;</i><i ng-show="isNested(value) && !isCollapsed(key, parent)" class="json-arrow" ng-click="collapse(key, parent)">&#8659;</i><label class="json-form-element"><span class="key-span" ng-hide="isArray(parent)">{{key}}:</span><span ng-show="isNested(value) && isArray(value)"> [</span><span ng-show="isNested(value) && !isArray(value)"> {</span></label><div ng-if="!isNested(value)" class="json-input-div"><input type="{{getInputType(value)}}" name="{{key}}" ng-model="parent[key]" class="json-input" required></div></div><div ng-if="isNested(value)" ng-show="!isCollapsed(key, parent)" class="nested-json"><div ng-repeat="(key, value) in parent[key] track by key" ng-init="parent = child; child = value" class="json-form-row" compile="nest"></div><div json-editor-add-property class="json-new-property padded-row" object="value" newProperty="{}" class="" ng-show="isNested(value)"></div></div><label ng-show="isNested(value)" class="json-form-element padded-row">{{isArray(value) ? \']\' : \'}\'}}</label>',e.$watch("showModal",function(n){n===!0&&(e.savedConfig=angular.merge({},e.config))})}var n='<div class="json-container"><div class="json-form-div"><form name="jsonEditorForm" ng-submit="" role="form"><div ng-repeat="(key, value) in config track by key" ng-init="parent = config; child = value" class="json-form" compile="nest"</div><div json-editor-add-property class="json-new-property" object="config" newProperty="{}"></div></form></div></div>',t={link:e,template:n,restrict:"EA",scope:{config:"=",showModal:"="}};return t}function n(e){return function(n,t,o){n.$watch(function(e){return e.$eval(o.compile)},function(o){t.html(o),e(t.contents())(n)})}}angular.module("angular-json-edit").directive("jsonEditor",e).directive("compile",n),n.$inject=["$compile"]}(),function(){"use strict";function e(){function e(e){function n(){if(e.isParentArray())switch(e.newProperty.type){case"array":e.object.push([]);break;case"object":e.object.push({});break;case"string":e.object.push(e.newProperty.value||"");break;case"number":e.object.push(parseInt(e.newProperty.value)||0);break;case"boolean":e.object.push(Boolean(e.newProperty.value))}else switch(e.newProperty.type){case"array":e.object[e.newProperty.name]=[];break;case"object":e.object[e.newProperty.name]={};break;case"string":e.object[e.newProperty.name]=e.newProperty.value||"";break;case"number":e.object[e.newProperty.name]=parseInt(e.newProperty.value)||0;break;case"boolean":e.object[e.newProperty.name]=Boolean(e.newProperty.value)}e.newProperty={},e.showForm=!1}function t(){return"number"===e.newProperty.type?"number":"text"}function o(){return Array.isArray(e.object)}function r(){return e.newProperty?"string"===e.newProperty.type||"number"===e.newProperty.type||"boolean"===e.newProperty.type:void 0}e.addProperty=n,e.getInputType=t,e.isParentArray=o,e.showValueField=r}var n='<div class="new-property-div padded-row" ng-show="showForm"><input type="text" placeholder="key" name="newPropertyName" ng-model="newProperty.name" ng-show="!isParentArray()"><select name="newPropertyType" ng-model="newProperty.type"><option value="" ng-disabled="true">Type</option><option value="array">Array</option><option value="object">Object</option><option value="string">String</option><option value="number">Number</option><option value="boolean">Boolean</option></select><input type="{{getInputType()}}" class="value-field" placeholder="value" name="newPropertyValue" ng-model="newProperty.value" ng-show="showValueField()"><button class="json-button" ng-click="addProperty()" ng-show="newProperty.type">&#43;</button></div><div class="new-property-button-div" ng-show="!showForm"><button class="json-button padded-row" ng-click="showForm = true">&#43;</button></div>',t={link:e,template:n,restrict:"EA",scope:{object:"=",newProperty:"="}};return t}angular.module("angular-json-edit").directive("jsonEditorAddProperty",e)}();
!function(){"use strict";angular.module("angular-json-edit",[])}(),function(){"use strict";function e(){function e(e){function n(n,t){var r={};r[n]=t,e.collapsed.push(r)}function t(n,t){e.isArray(t)?t.splice(n,1):delete t[n]}function r(n,t){var r={};r[n]=t,e.collapsed.forEach(function(t,o){angular.equals(t[n],r[n])&&e.collapsed.splice(o,1)})}function o(e){return"number"==typeof e?"number":"text"}function a(e){return Array.isArray(e)}function s(n,t){var r={},o=!1;return r[n]=t,e.collapsed.forEach(function(e){angular.equals(e[n],r[n])&&(o=!0)}),o}function i(e){return"object"==typeof e?!0:!1}e.collapse=n,e.collapsed=[],e.deleteProperty=t,e.expand=r,e.getInputType=o,e.isArray=a,e.isCollapsed=s,e.isNested=i,e.nest='<button class="json-delete json-button" ng-click="deleteProperty(key, parent)">&times;</button><div class="label-wrapper" ng-class="{\'padded-row\': !isNested(value)}"><i ng-show="isNested(value) && isCollapsed(key, parent)" class="json-arrow" ng-click="expand(key, parent)">&#8658;</i><i ng-show="isNested(value) && !isCollapsed(key, parent)" class="json-arrow" ng-click="collapse(key, parent)">&#8659;</i><label class="json-form-element"><span class="key-span" ng-hide="isArray(parent)">{{key}}:</span><span ng-show="isNested(value) && isArray(value)"> [</span><span ng-show="isNested(value) && !isArray(value)"> {</span></label><div ng-if="!isNested(value)" class="json-input-div"><input type="{{getInputType(value)}}" name="{{key}}" ng-model="parent[key]" class="json-input" required></div></div><div ng-if="isNested(value)" ng-show="!isCollapsed(key, parent)" class="nested-json"><div ng-repeat="(key, value) in parent[key] track by key" ng-init="parent = child; child = value" class="json-form-row" compile="nest"></div><div json-editor-add-property class="json-new-property padded-row" object="value" newProperty="{}" class="" ng-show="isNested(value)"></div></div><label ng-show="isNested(value)" class="json-form-element padded-row">{{isArray(value) ? \']\' : \'}\'}}</label>'}var n='<div class="json-container"><div class="json-form-div"><form name="jsonEditorForm" ng-submit="" role="form"><div ng-repeat="(key, value) in config track by key" ng-init="parent = config; child = value" class="json-form" compile="nest"</div><div json-editor-add-property class="json-new-property" object="config" newProperty="{}"></div></form></div></div>',t={link:e,template:n,restrict:"EA",scope:{config:"=",showModal:"="}};return t}function n(e){return function(n,t,r){n.$watch(function(e){return e.$eval(r.compile)},function(r){t.html(r),e(t.contents())(n)})}}angular.module("angular-json-edit").directive("jsonEditor",e).directive("compile",n),n.$inject=["$compile"]}(),function(){"use strict";function e(){function e(e){function n(){if(e.isParentArray())switch(e.newProperty.type){case"array":e.object.push([]);break;case"object":e.object.push({});break;case"string":e.object.push(e.newProperty.value||"");break;case"number":e.object.push(parseInt(e.newProperty.value)||0);break;case"boolean":e.object.push(Boolean(e.newProperty.value))}else switch(e.newProperty.type){case"array":e.object[e.newProperty.name]=[];break;case"object":e.object[e.newProperty.name]={};break;case"string":e.object[e.newProperty.name]=e.newProperty.value||"";break;case"number":e.object[e.newProperty.name]=parseInt(e.newProperty.value)||0;break;case"boolean":e.object[e.newProperty.name]=Boolean(e.newProperty.value)}e.newProperty={},e.showForm=!1}function t(){return e.newProperty&&"number"===e.newProperty.type?"number":"text"}function r(){return Array.isArray(e.object)}function o(){return e.newProperty?"string"===e.newProperty.type||"number"===e.newProperty.type||"boolean"===e.newProperty.type:void 0}e.addProperty=n,e.getInputType=t,e.isParentArray=r,e.showValueField=o}var n='<div class="new-property-div padded-row" ng-show="showForm"><input type="text" placeholder="key" name="newPropertyName" ng-model="newProperty.name" ng-show="!isParentArray()"><select name="newPropertyType" ng-model="newProperty.type"><option value="" ng-disabled="true">Type</option><option value="array">Array</option><option value="object">Object</option><option value="string">String</option><option value="number">Number</option><option value="boolean">Boolean</option></select><input type="{{getInputType()}}" class="value-field" placeholder="value" name="newPropertyValue" ng-model="newProperty.value" ng-show="showValueField()"><button class="json-button" ng-click="addProperty()" ng-show="newProperty.type">&#43;</button></div><div class="new-property-button-div" ng-show="!showForm"><button class="json-button padded-row" ng-click="showForm = true">&#43;</button></div>',t={link:e,template:n,restrict:"EA",scope:{object:"=",newProperty:"="}};return t}angular.module("angular-json-edit").directive("jsonEditorAddProperty",e)}();
{
"name": "angular-json-edit",
"version": "0.2.3",
"version": "0.2.4",
"description": "Infinitely nesting JSON editor for Angular with no dependencies",

@@ -5,0 +5,0 @@ "main": "dist/angularJsonEdit.js",

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