1 | # 2.0.0
|
2 |
|
3 | ## jQuery removed from web component
|
4 |
|
5 | Web component initialize method will not longer get a jQuery Element
|
6 | instead it will get a basic javascript HTMLElement. This allows
|
7 | to use web-js without jQuery and detect which components really need
|
8 | jQuery as there dependency.
|
9 |
|
10 | **Before**
|
11 |
|
12 | ```js
|
13 | initialize($el) {
|
14 |
|
15 | }
|
16 |
|
17 | // or
|
18 |
|
19 | initialize($el, options) {
|
20 |
|
21 | }
|
22 | ```
|
23 |
|
24 | **After**
|
25 |
|
26 | ```js
|
27 | initialize(el) {
|
28 | var $el = el;
|
29 | }
|
30 |
|
31 | // or
|
32 |
|
33 | initialize($el, options) {
|
34 | var $el = el;
|
35 | }
|
36 | ```
|
37 |
|
38 | ## Api service dataType changed
|
39 |
|
40 | The api service will now use json dataType instead of html.
|
41 | So if HTML should be returned, you should use `$.ajax` instead.
|
42 |
|
43 | ## Multiple call service arguments
|
44 |
|
45 | Its now possible to provide multiple arguments to a service call for this
|
46 | exist service calls need to be changed.
|
47 |
|
48 | **Before**
|
49 |
|
50 | ```js
|
51 | web.callServices([{name: 'service', func: 'method', args: 'argument'}])
|
52 | ```
|
53 |
|
54 | or when using web component twig extension:
|
55 |
|
56 | ```twig
|
57 | {{ call_service('service', 'method', 'argument') }}
|
58 | ```
|
59 |
|
60 | **After**
|
61 |
|
62 | ```js
|
63 | web.callServices([{name: 'service', func: 'method', args: ['argument']}])
|
64 | ```
|
65 |
|
66 | or when using twig:
|
67 |
|
68 | ```twig
|
69 | {{ call_service('service', 'method', ['argument']) }}
|
70 | ```
|
71 |
|
72 | ## Folder renamed
|
73 |
|
74 | The `src` folder has been renamed to `js` so you need to ugprade your imports.
|
75 |
|
76 | **Before**
|
77 |
|
78 | ```js
|
79 | var Expand = require('massive-web/src/components/expand');
|
80 | import ContainerLink from 'massive-web/src/components/expand';
|
81 | ```
|
82 |
|
83 | **After**
|
84 |
|
85 | ```js
|
86 | var Expand = require('massive-web/js/components/expand');
|
87 | import ContainerLink from 'massive-web/js/components/expand';
|
88 | ```
|