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

symfony-collection-js

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

symfony-collection-js - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1-js-only

example/triply_nested_collection_example_without_jquery_AMD_requiresJS/index.html

3

karma_nojquery.conf.js

@@ -44,2 +44,3 @@ // Karma configuration

coverageReporter: {
type : 'html',
dir : 'coverage/without_jquery/',

@@ -102,2 +103,2 @@ reporters: [

})
}
}
{
"name": "symfony-collection-js",
"version": "4.2.0",
"version": "4.2.1-js-only",
"description": "A plugin working with and without jquery to dynamically create elements of a symfony form collection.",

@@ -12,3 +12,3 @@ "main": "symfonyCollectionJs.js",

"devDependencies": {
"karma": "^6.3.4",
"karma": "^6.3.5",
"karma-chrome-launcher": "^3.1.0",

@@ -18,3 +18,3 @@ "karma-coverage": "^2.0.3",

"karma-qunit": "^4.1.2",
"qunit": "^2.16.0"
"qunit": "^2.17.2"
},

@@ -21,0 +21,0 @@ "scripts": {

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

# symfonyCollectionJs ![GitHub](https://img.shields.io/github/license/ruano-a/symfonyCollectionJs) ![Maintenance](https://img.shields.io/maintenance/yes/2021) ![GitHub last commit](https://img.shields.io/github/last-commit/ruano-a/symfonyCollectionJs) ![npm](https://img.shields.io/npm/dm/symfony-collection-js?label=npm%20downloads) [![](https://data.jsdelivr.com/v1/package/npm/symfony-collection-js/badge)](https://www.jsdelivr.com/package/npm/symfony-collection-js) [![codecov](https://codecov.io/gh/ruano-a/symfonyCollectionJs/branch/master/graph/badge.svg?token=Z93Y3NTP1Q)](https://codecov.io/gh/ruano-a/symfonyCollectionJs) ![npm bundle size](https://img.shields.io/bundlephobia/min/symfony-collection-js) ![Dependencies](https://badgen.net/bundlephobia/dependency-count/symfony-collection-js) ![Badge count](https://img.shields.io/badge/badge%20count-enough%20%3C3-blue)
# symfonyCollectionJs ![GitHub](https://img.shields.io/github/license/ruano-a/symfonyCollectionJs) ![Maintenance](https://img.shields.io/maintenance/yes/2021) ![GitHub last commit](https://img.shields.io/github/last-commit/ruano-a/symfonyCollectionJs) ![npm](https://img.shields.io/npm/dm/symfony-collection-js?label=npm%20downloads) [![](https://data.jsdelivr.com/v1/package/npm/symfony-collection-js/badge)](https://www.jsdelivr.com/package/npm/symfony-collection-js) [![codecov](https://codecov.io/gh/ruano-a/symfonyCollectionJs/branch/master-js-only/graph/badge.svg?token=Z93Y3NTP1Q)](https://codecov.io/gh/ruano-a/symfonyCollectionJs) ![npm bundle size](https://img.shields.io/bundlephobia/min/symfony-collection-js) ![Dependencies](https://badgen.net/bundlephobia/dependency-count/symfony-collection-js) ![Badge count](https://img.shields.io/badge/badge%20count-enough%20%3C3-blue)
A plugin working with and without jquery to dynamically create elements of a symfony form collection.

@@ -18,3 +18,3 @@

```html
<script src="https://cdn.jsdelivr.net/gh/ruano-a/symfonyCollectionJs@4.1.0/symfonyCollectionJs.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/ruano-a/symfonyCollectionJs@4.2.1-js-only/symfonyCollectionJs.min.js"></script>
```

@@ -116,8 +116,7 @@

Yes ! in the example folder, with and without jQuery, with and without loader.
Yes! in the example folder, with and without jQuery, with and without loader.
# Can I use this package without symfony ?
# Is there a Symfony UX integration?
Absolutely, you only need to have the data-prototype attribute properly set.
We provide you with [this example](./example/simple_collection_example_without_symfony.php) in php, but you can do this in every language, and most likely with most frameworks.
Yes! Just there : [UX Collection JS](https://github.com/tienvx/ux-collection-js)

@@ -128,2 +127,7 @@ # Requirement

# Can I use this package without symfony ?
Absolutely, you only need to have the data-prototype attribute properly set.
We provide you with [this example](./example/simple_collection_example_without_symfony.php) in php, but you can do this in every language, and most likely with most frameworks.
# Notes

@@ -130,0 +134,0 @@ If you're using this without jQuery, but with a loader (AMD, CommonJS, or anything), you MUST use a version on a branch / tag with "js-only" in the name! Otherwise it WILL NOT BUILD! (I didn't want to make several versions but tests ended showing that it was the best choice... Unless you have a better idea?)

@@ -397,33 +397,16 @@ // Polyfill from https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent

};
formCollection.jQuery = null;
// UMD : Uses CommonJS, AMD or browser globals to create a jQuery plugin (if jQuery is there)
// UMD : Uses CommonJS, AMD or browser globals
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
define([], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = factory(require('jquery'));
module.exports = factory();
} else {
// Browser globals
if (typeof jQuery !== 'undefined')
root.returnExports = factory(jQuery);
else
root.returnExports = factory();
root.returnExports = factory();
}
}(this, function($) {
if (typeof jQuery !== 'undefined' && jQuery) {
formCollection.jQuery = $; // jQuery is not necessarily global so it's better to know easily if it's available
$.fn.formCollection = function (options, param) {
var nodeArray = [];
for (var i = 0; i < this.length; i++) {
nodeArray.push(this[i]);
}
var ret = formCollection(nodeArray, options, param);
if (!Array.isArray(ret))
return ret;
return $(this);
};
}
}(this, function() {
return formCollection;
}));

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 too big to display

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