@atlassian/aui 9.11.4 → 9.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/aui/aui-css-deprecations.js +1 -1
  2. package/dist/aui/aui-css-deprecations.js.map +1 -1
  3. package/dist/aui/aui-prototyping-browserfocus.css +2 -651
  4. package/dist/aui/aui-prototyping-browserfocus.css.map +1 -0
  5. package/dist/aui/aui-prototyping-darkmode.css +2 -285
  6. package/dist/aui/aui-prototyping-darkmode.css.map +1 -0
  7. package/dist/aui/aui-prototyping-design-tokens-api-full.js +2 -2
  8. package/dist/aui/aui-prototyping-design-tokens-api-full.js.map +1 -1
  9. package/dist/aui/aui-prototyping-design-tokens-api.js +2 -2
  10. package/dist/aui/aui-prototyping-design-tokens-api.js.map +1 -1
  11. package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css +2 -2
  12. package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css.map +1 -1
  13. package/dist/aui/aui-prototyping-design-tokens-base-themes-css.js +1 -1
  14. package/dist/aui/aui-prototyping-design-tokens-base-themes.js +2 -2
  15. package/dist/aui/aui-prototyping-design-tokens-base-themes.js.map +1 -1
  16. package/dist/aui/aui-prototyping-design-tokens-compatibility.css +2 -115
  17. package/dist/aui/aui-prototyping-design-tokens-compatibility.css.map +1 -0
  18. package/dist/aui/aui-prototyping.css +11 -11
  19. package/dist/aui/aui-prototyping.css.map +1 -1
  20. package/dist/aui/aui-prototyping.js +47 -47
  21. package/dist/aui/aui-prototyping.js.map +1 -1
  22. package/dist/aui/aui-prototyping.nodeps.css +11 -11
  23. package/dist/aui/aui-prototyping.nodeps.css.map +1 -1
  24. package/dist/aui/aui-prototyping.nodeps.js +47 -47
  25. package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
  26. package/dist/aui/themes/dark-future.js +1 -1
  27. package/dist/aui/themes/dark-future.js.map +1 -1
  28. package/dist/aui/themes/dark.js +1 -1
  29. package/dist/aui/themes/dark.js.map +1 -1
  30. package/dist/aui/themes/legacy-dark.js +1 -1
  31. package/dist/aui/themes/legacy-dark.js.map +1 -1
  32. package/dist/aui/themes/legacy-light.js +1 -1
  33. package/dist/aui/themes/legacy-light.js.map +1 -1
  34. package/dist/aui/themes/light-future.js +1 -1
  35. package/dist/aui/themes/light-future.js.map +1 -1
  36. package/dist/aui/themes/light.js +1 -1
  37. package/dist/aui/themes/light.js.map +1 -1
  38. package/dist/aui/themes/shape.js +1 -1
  39. package/dist/aui/themes/shape.js.map +1 -1
  40. package/dist/aui/themes/spacing.js +1 -1
  41. package/dist/aui/themes/spacing.js.map +1 -1
  42. package/dist/aui/themes/typography-adg3.js +1 -1
  43. package/dist/aui/themes/typography-adg3.js.map +1 -1
  44. package/dist/aui/themes/typography-modernized.js +2 -0
  45. package/dist/aui/themes/typography-modernized.js.map +1 -0
  46. package/entry/token-themes-generated/npm/aui-prototyping-design-tokens-base-themes.css +2 -2
  47. package/entry/token-themes-generated/npm/aui-prototyping-design-tokens-theme-import-map.js +3 -11
  48. package/entry/token-themes-generated/npm/themes/dark.js +1 -1
  49. package/entry/token-themes-generated/npm/themes/light.js +1 -1
  50. package/entry/token-themes-generated/npm/themes/typography-adg3.js +11 -13
  51. package/entry/token-themes-generated/npm/themes/{typography-minor3.js → typography-modernized.js} +13 -21
  52. package/entry/token-themes-generated/p2/aui-prototyping-design-tokens-theme-import-map.js +3 -11
  53. package/entry/token-themes-generated/p2/aui-prototyping-design-tokens-theme.css +2 -2
  54. package/entry/token-themes-generated/p2/themes/dark.js +1 -1
  55. package/entry/token-themes-generated/p2/themes/light.js +1 -1
  56. package/entry/token-themes-generated/p2/themes/typography-adg3.js +11 -13
  57. package/entry/token-themes-generated/p2/themes/{typography-minor3.js → typography-modernized.js} +13 -21
  58. package/package.json +78 -79
  59. package/src/js/aui/avatar-group.js +4 -4
  60. package/src/js/aui/banner.js +2 -2
  61. package/src/js/aui/date-picker.js +10 -8
  62. package/src/js/aui/design-tokens/design-tokens-init.js +2 -2
  63. package/src/js/aui/design-tokens/design-tokens-testing-theme.js +6 -6
  64. package/src/js/aui/dialog2.js +3 -0
  65. package/src/js/aui/focus-manager.js +51 -1
  66. package/src/js/aui/form-notification.js +1 -0
  67. package/src/js/aui/internal/browser.js +1 -0
  68. package/src/js/aui/internal/deprecation.js +1 -0
  69. package/src/js/aui/polyfills/custom-event.js +2 -0
  70. package/src/js/aui/sidebar.js +1 -0
  71. package/src/js/aui/trigger.js +1 -0
  72. package/src/js/aui/when-i-type.js +1 -0
  73. package/src/less/aui-page-typography.less +7 -0
  74. package/src/less/imports/aui-theme/components/form-notification.less +1 -1
  75. package/src/less/imports/aui-theme/core/spaces.less +16 -14
  76. package/dist/aui/themes/dark-new-input-border.js +0 -2
  77. package/dist/aui/themes/dark-new-input-border.js.map +0 -1
  78. package/dist/aui/themes/light-new-input-border.js +0 -2
  79. package/dist/aui/themes/light-new-input-border.js.map +0 -1
  80. package/dist/aui/themes/typography-minor3.js +0 -2
  81. package/dist/aui/themes/typography-minor3.js.map +0 -1
  82. package/entry/token-themes-generated/npm/themes/dark-new-input-border.js +0 -7
  83. package/entry/token-themes-generated/npm/themes/light-new-input-border.js +0 -7
  84. package/entry/token-themes-generated/p2/themes/dark-new-input-border.js +0 -7
  85. package/entry/token-themes-generated/p2/themes/light-new-input-border.js +0 -7
  86. package/src/.eslintrc +0 -17
  87. package/src/js/aui/internal/i18n/.eslintrc +0 -6
  88. package/src/js-vendor/jquery-aop/LICENSE +0 -21
  89. package/src/js-vendor/jquery-aop/README.md +0 -54
  90. package/src/js-vendor/jquery-aop/aop.js +0 -404
  91. package/src/js-vendor/jquery-aop/jquery-aop.txt +0 -5
  92. package/src/js-vendor/jquery-aop/package.json +0 -16
  93. package/src/js-vendor/jquery-form/jquery.form.js +0 -813
  94. package/src/js-vendor/jquery-form/package.json +0 -15
  95. package/src/js-vendor/jquery.hotkeys/jquery.hotkeys.js +0 -99
  96. package/src/js-vendor/jquery.hotkeys/package.json +0 -14
  97. package/src/js-vendor/select2/CONTRIBUTING.md +0 -107
  98. package/src/js-vendor/select2/LICENSE +0 -18
  99. package/src/js-vendor/select2/README.md +0 -115
  100. package/src/js-vendor/select2/bower.json +0 -8
  101. package/src/js-vendor/select2/component.json +0 -66
  102. package/src/js-vendor/select2/composer.json +0 -29
  103. package/src/js-vendor/select2/package.json +0 -20
  104. package/src/js-vendor/select2/release.sh +0 -79
  105. package/src/js-vendor/select2/select2-bootstrap.css +0 -87
  106. package/src/js-vendor/select2/select2-spinner.gif +0 -0
  107. package/src/js-vendor/select2/select2.css +0 -692
  108. package/src/js-vendor/select2/select2.jquery.json +0 -36
  109. package/src/js-vendor/select2/select2.js +0 -3729
  110. package/src/js-vendor/select2/select2.min.js +0 -23
  111. package/src/js-vendor/select2/select2.png +0 -0
  112. package/src/js-vendor/select2/select2_locale_ar.js +0 -19
  113. package/src/js-vendor/select2/select2_locale_az.js +0 -20
  114. package/src/js-vendor/select2/select2_locale_bg.js +0 -20
  115. package/src/js-vendor/select2/select2_locale_ca.js +0 -19
  116. package/src/js-vendor/select2/select2_locale_cs.js +0 -51
  117. package/src/js-vendor/select2/select2_locale_da.js +0 -19
  118. package/src/js-vendor/select2/select2_locale_de.js +0 -18
  119. package/src/js-vendor/select2/select2_locale_el.js +0 -19
  120. package/src/js-vendor/select2/select2_locale_en.js.template +0 -20
  121. package/src/js-vendor/select2/select2_locale_es.js +0 -19
  122. package/src/js-vendor/select2/select2_locale_et.js +0 -19
  123. package/src/js-vendor/select2/select2_locale_eu.js +0 -45
  124. package/src/js-vendor/select2/select2_locale_fa.js +0 -21
  125. package/src/js-vendor/select2/select2_locale_fi.js +0 -30
  126. package/src/js-vendor/select2/select2_locale_fr.js +0 -18
  127. package/src/js-vendor/select2/select2_locale_gl.js +0 -45
  128. package/src/js-vendor/select2/select2_locale_he.js +0 -19
  129. package/src/js-vendor/select2/select2_locale_hr.js +0 -24
  130. package/src/js-vendor/select2/select2_locale_hu.js +0 -17
  131. package/src/js-vendor/select2/select2_locale_id.js +0 -21
  132. package/src/js-vendor/select2/select2_locale_is.js +0 -17
  133. package/src/js-vendor/select2/select2_locale_it.js +0 -17
  134. package/src/js-vendor/select2/select2_locale_ja.js +0 -17
  135. package/src/js-vendor/select2/select2_locale_ka.js +0 -19
  136. package/src/js-vendor/select2/select2_locale_ko.js +0 -19
  137. package/src/js-vendor/select2/select2_locale_lt.js +0 -26
  138. package/src/js-vendor/select2/select2_locale_lv.js +0 -19
  139. package/src/js-vendor/select2/select2_locale_mk.js +0 -19
  140. package/src/js-vendor/select2/select2_locale_ms.js +0 -21
  141. package/src/js-vendor/select2/select2_locale_nb.js +0 -22
  142. package/src/js-vendor/select2/select2_locale_nl.js +0 -17
  143. package/src/js-vendor/select2/select2_locale_pl.js +0 -54
  144. package/src/js-vendor/select2/select2_locale_pt-BR.js +0 -18
  145. package/src/js-vendor/select2/select2_locale_pt-PT.js +0 -17
  146. package/src/js-vendor/select2/select2_locale_ro.js +0 -17
  147. package/src/js-vendor/select2/select2_locale_rs.js +0 -19
  148. package/src/js-vendor/select2/select2_locale_ru.js +0 -23
  149. package/src/js-vendor/select2/select2_locale_sk.js +0 -50
  150. package/src/js-vendor/select2/select2_locale_sv.js +0 -19
  151. package/src/js-vendor/select2/select2_locale_th.js +0 -19
  152. package/src/js-vendor/select2/select2_locale_tr.js +0 -20
  153. package/src/js-vendor/select2/select2_locale_ug-CN.js +0 -16
  154. package/src/js-vendor/select2/select2_locale_uk.js +0 -25
  155. package/src/js-vendor/select2/select2_locale_vi.js +0 -20
  156. package/src/js-vendor/select2/select2_locale_zh-CN.js +0 -16
  157. package/src/js-vendor/select2/select2_locale_zh-TW.js +0 -16
  158. package/src/js-vendor/select2/select2x2.png +0 -0
  159. package/src/js-vendor/tablesorter/README.md +0 -158
  160. package/src/js-vendor/tablesorter/jquery.tablesorter.js +0 -1901
  161. package/src/js-vendor/tablesorter/package.json +0 -43
@@ -1,7 +0,0 @@
1
- export default `
2
- html[data-color-mode="light"][data-theme~="light:dark"],
3
- html[data-color-mode="dark"][data-theme~="dark:dark"] {
4
- color-scheme: dark;
5
- --ds-border-input: #738496;
6
- }
7
- `
@@ -1,7 +0,0 @@
1
- export default `
2
- html[data-color-mode="light"][data-theme~="light:light"],
3
- html[data-color-mode="dark"][data-theme~="dark:light"] {
4
- color-scheme: light;
5
- --ds-border-input: #8590A2;
6
- }
7
- `
package/src/.eslintrc DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "env": {
3
- "amd": true,
4
- "browser": true,
5
- "jquery": true,
6
- "node": false
7
- },
8
- "rules": {
9
- "strict": [0, "global"]
10
- },
11
- "globals": {
12
- "AJS": false,
13
- "Modernizr": false,
14
- "skate": false,
15
- "aui": false
16
- }
17
- }
@@ -1,6 +0,0 @@
1
- {
2
- "rules": {
3
- // Whatever makes it easier to translate a string should be done in here.
4
- "quotes": "off"
5
- }
6
- }
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2014 Gonzalo Casas
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,54 +0,0 @@
1
- # jquery-aop
2
-
3
- Add features of aspect-oriented programming (AOP) to jQuery.
4
-
5
- ## Introduction
6
-
7
- jQuery AOP is a very small plugin that adds [AOP](http://en.wikipedia.org/wiki/Aspect-oriented_programming) features to javascript. It allows to add [advices](http://en.wikipedia.org/wiki/Advice_in_aspect-oriented_programming) (_Before_, _After_, _After Throw_, _After Finally_, _Around_ and _Introduction_) to any global or instance object.
8
-
9
- ## Features
10
-
11
- * Allows to add _Before_, _After_, _After Throw_, _After Finally_, _Around_ and _Introduction_ advices.
12
- * Allows to define point-cuts using regex to match multiple methods.
13
- * Works with global function and object methods.
14
- * Advices can be removed after being applied.
15
- * **Just 1091 bytes!** (Packed and Gzipped)
16
- * Integrated into jQuery.
17
-
18
- ## Quick Start
19
-
20
- Starting with jQuery AOP is really easy!
21
-
22
- ```
23
-
24
- jQuery.aop.before( {target: String, method: 'replace'},
25
- function(regex, newString) {
26
- alert("About to replace string '" + this + "' with '" + newString + "' using regEx '" + regex + "'");
27
- }
28
- );
29
-
30
- ```
31
-
32
- More samples on [Reference](Reference.md)...
33
-
34
- ### What is new on 1.3?
35
-
36
- The latest release of jQuery AOP includes:
37
- * Support **after throw** and **after finally** advices
38
- * some bug fixes
39
-
40
- No breaking changes from 1.2.
41
-
42
- ### What is new on 1.2?
43
-
44
- This is a bug fix release, solving some minor issues reported. No breaking changes from 1.1.
45
-
46
- ### What is new on 1.1?
47
-
48
- The latest release of jQuery AOP includes two new features:
49
- * Support for **introductions**
50
- * and support for **regex matching** of method names!
51
-
52
- The new regex matching support breaks compatibility with the previous version because now the weaving methods return an array of functions instead of just one function.
53
-
54
- But don't worry! You can revert to the old behavior if you need to: more details on [BackwardsCompatibility](BackwardsCompatibility.md)!
@@ -1,404 +0,0 @@
1
- /**
2
- * jQuery AOP - jQuery plugin to add features of aspect-oriented programming (AOP) to jQuery.
3
- * https://github.com/gonzalocasas/jquery-aop
4
- *
5
- * Licensed under the MIT license:
6
- * http://www.opensource.org/licenses/mit-license.php
7
- *
8
- * Version: 1.3
9
- *
10
- * Cross-frame type detection based on Daniel Steigerwald's code (http://daniel.steigerwald.cz)
11
- * http://gist.github.com/204554
12
- *
13
- */
14
-
15
- (function() {
16
-
17
- var _after = 1;
18
- var _afterThrow = 2;
19
- var _afterFinally = 3;
20
- var _before = 4;
21
- var _around = 5;
22
- var _intro = 6;
23
- var _regexEnabled = true;
24
- var _arguments = 'arguments';
25
- var _undef = 'undefined';
26
-
27
- var getType = (function() {
28
-
29
- var toString = Object.prototype.toString,
30
- toStrings = {},
31
- nodeTypes = { 1: 'element', 3: 'textnode', 9: 'document', 11: 'fragment' },
32
- types = 'Arguments Array Boolean Date Document Element Error Fragment Function NodeList Null Number Object RegExp String TextNode Undefined Window'.split(' ');
33
-
34
- for (var i = types.length; i--; ) {
35
- var type = types[i], constructor = window[type];
36
- if (constructor) {
37
- try { toStrings[toString.call(new constructor)] = type.toLowerCase(); }
38
- catch (e) { }
39
- }
40
- }
41
-
42
- return function(item) {
43
- return item == null && (item === undefined ? _undef : 'null') ||
44
- item.nodeType && nodeTypes[item.nodeType] ||
45
- typeof item.length == 'number' && (
46
- item.callee && _arguments ||
47
- item.alert && 'window' ||
48
- item.item && 'nodelist') ||
49
- toStrings[toString.call(item)];
50
- };
51
-
52
- })();
53
-
54
- var isFunc = function(obj) { return getType(obj) == 'function'; };
55
-
56
- /**
57
- * Private weaving function.
58
- */
59
- var weaveOne = function(source, method, advice) {
60
-
61
- var old = source[method];
62
-
63
- // Work-around IE6/7 behavior on some native method that return object instances
64
- if (advice.type != _intro && !isFunc(old)) {
65
- var oldObject = old;
66
- old = function() {
67
- var code = arguments.length > 0 ? _arguments + '[0]' : '';
68
-
69
- for (var i=1;i<arguments.length;i++) {
70
- code += ',' + _arguments + '[' + i + ']';
71
- }
72
-
73
- return eval('oldObject(' + code + ');');
74
- };
75
- }
76
-
77
- var aspect;
78
- if (advice.type == _after || advice.type == _afterThrow || advice.type == _afterFinally)
79
- aspect = function() {
80
- var returnValue, exceptionThrown = null;
81
-
82
- try {
83
- returnValue = old.apply(this, arguments);
84
- } catch (e) {
85
- exceptionThrown = e;
86
- }
87
-
88
- if (advice.type == _after)
89
- if (exceptionThrown == null)
90
- returnValue = advice.value.apply(this, [returnValue, method]);
91
- else
92
- throw exceptionThrown;
93
- else if (advice.type == _afterThrow && exceptionThrown != null)
94
- returnValue = advice.value.apply(this, [exceptionThrown, method]);
95
- else if (advice.type == _afterFinally)
96
- returnValue = advice.value.apply(this, [returnValue, exceptionThrown, method]);
97
-
98
- return returnValue;
99
- };
100
- else if (advice.type == _before)
101
- aspect = function() {
102
- advice.value.apply(this, [arguments, method]);
103
- return old.apply(this, arguments);
104
- };
105
- else if (advice.type == _intro)
106
- aspect = function() {
107
- return advice.value.apply(this, arguments);
108
- };
109
- else if (advice.type == _around) {
110
- aspect = function() {
111
- var invocation = { object: this, args: Array.prototype.slice.call(arguments) };
112
- return advice.value.apply(invocation.object, [{ arguments: invocation.args, method: method, proceed :
113
- function() {
114
- return old.apply(invocation.object, invocation.args);
115
- }
116
- }] );
117
- };
118
- }
119
-
120
- aspect.unweave = function() {
121
- source[method] = old;
122
- pointcut = source = aspect = old = null;
123
- };
124
-
125
- source[method] = aspect;
126
-
127
- return aspect;
128
-
129
- };
130
-
131
- /**
132
- * Private method search
133
- */
134
- var search = function(source, pointcut, advice) {
135
-
136
- var methods = [];
137
-
138
- for (var method in source) {
139
-
140
- var item = null;
141
-
142
- // Ignore exceptions during method retrival
143
- try {
144
- item = source[method];
145
- }
146
- catch (e) { }
147
-
148
- if (item != null && method.match(pointcut.method) && isFunc(item))
149
- methods[methods.length] = { source: source, method: method, advice: advice };
150
-
151
- }
152
-
153
- return methods;
154
- };
155
-
156
- /**
157
- * Private weaver and pointcut parser.
158
- */
159
- var weave = function(pointcut, advice) {
160
-
161
- var source = typeof(pointcut.target.prototype) != _undef ? pointcut.target.prototype : pointcut.target;
162
- var advices = [];
163
-
164
- // If it's not an introduction and no method was found, try with regex...
165
- if (advice.type != _intro && typeof(source[pointcut.method]) == _undef) {
166
-
167
- // First try directly on target
168
- var methods = search(pointcut.target, pointcut, advice);
169
-
170
- // No method found, re-try directly on prototype
171
- if (methods.length == 0)
172
- methods = search(source, pointcut, advice);
173
-
174
- for (var i in methods)
175
- advices[advices.length] = weaveOne(methods[i].source, methods[i].method, methods[i].advice);
176
-
177
- }
178
- else
179
- {
180
- // Return as an array of one element
181
- advices[0] = weaveOne(source, pointcut.method, advice);
182
- }
183
-
184
- return _regexEnabled ? advices : advices[0];
185
-
186
- };
187
-
188
- jQuery.aop =
189
- {
190
- /**
191
- * Creates an advice after the defined point-cut. The advice will be executed after the point-cut method
192
- * has completed execution successfully, and will receive one parameter with the result of the execution.
193
- * This function returns an array of weaved aspects (Function).
194
- *
195
- * @example jQuery.aop.after( {target: window, method: 'MyGlobalMethod'}, function(result) {
196
- * alert('Returned: ' + result);
197
- * return result;
198
- * } );
199
- * @result Array<Function>
200
- *
201
- * @example jQuery.aop.after( {target: String, method: 'indexOf'}, function(index) {
202
- * alert('Result found at: ' + index + ' on:' + this);
203
- * return index;
204
- * } );
205
- * @result Array<Function>
206
- *
207
- * @name after
208
- * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
209
- * @option Object target Target object to be weaved.
210
- * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
211
- * @param Function advice Function containing the code that will get called after the execution of the point-cut. It receives one parameter
212
- * with the result of the point-cut's execution. The function can choose to return this same value or a different one.
213
- *
214
- * @type Array<Function>
215
- * @cat Plugins/General
216
- */
217
- after : function(pointcut, advice)
218
- {
219
- return weave( pointcut, { type: _after, value: advice } );
220
- },
221
-
222
- /**
223
- * Creates an advice after the defined point-cut only for unhandled exceptions. The advice will be executed
224
- * after the point-cut method only if the execution failed and an exception has been thrown. It will receive one
225
- * parameter with the exception thrown by the point-cut method.
226
- * This function returns an array of weaved aspects (Function).
227
- *
228
- * @example jQuery.aop.afterThrow( {target: String, method: 'indexOf'}, function(exception) {
229
- * alert('Unhandled exception: ' + exception);
230
- * return -1;
231
- * } );
232
- * @result Array<Function>
233
- *
234
- * @example jQuery.aop.afterThrow( {target: calculator, method: 'Calculate'}, function(exception) {
235
- * console.log('Unhandled exception: ' + exception);
236
- * throw exception;
237
- * } );
238
- * @result Array<Function>
239
- *
240
- * @name afterThrow
241
- * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
242
- * @option Object target Target object to be weaved.
243
- * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
244
- * @param Function advice Function containing the code that will get called after the execution of the point-cut. It receives one parameter
245
- * with the exception thrown by the point-cut method.
246
- *
247
- * @type Array<Function>
248
- * @cat Plugins/General
249
- */
250
- afterThrow : function(pointcut, advice)
251
- {
252
- return weave( pointcut, { type: _afterThrow, value: advice } );
253
- },
254
-
255
- /**
256
- * Creates an advice after the defined point-cut. The advice will be executed after the point-cut method
257
- * regardless of its success or failure, and it will receive two parameters: one with the
258
- * result of a successful execution or null, and another one with the exception thrown or null.
259
- * This function returns an array of weaved aspects (Function).
260
- *
261
- * @example jQuery.aop.afterFinally( {target: window, method: 'MyGlobalMethod'}, function(result, exception) {
262
- * if (exception == null)
263
- * return 'Returned: ' + result;
264
- * else
265
- * return 'Unhandled exception: ' + exception;
266
- * } );
267
- * @result Array<Function>
268
- *
269
- * @name afterFinally
270
- * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
271
- * @option Object target Target object to be weaved.
272
- * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
273
- * @param Function advice Function containing the code that will get called after the execution of the point-cut regardless of its success or failure.
274
- * It receives two parameters, the first one with the result of a successful execution or null, and the second one with the
275
- * exception or null.
276
- *
277
- * @type Array<Function>
278
- * @cat Plugins/General
279
- */
280
- afterFinally : function(pointcut, advice)
281
- {
282
- return weave( pointcut, { type: _afterFinally, value: advice } );
283
- },
284
-
285
-
286
- /**
287
- * Creates an advice before the defined point-cut. The advice will be executed before the point-cut method
288
- * but cannot modify the behavior of the method, or prevent its execution.
289
- * This function returns an array of weaved aspects (Function).
290
- *
291
- * @example jQuery.aop.before( {target: window, method: 'MyGlobalMethod'}, function() {
292
- * alert('About to execute MyGlobalMethod');
293
- * } );
294
- * @result Array<Function>
295
- *
296
- * @example jQuery.aop.before( {target: String, method: 'indexOf'}, function(index) {
297
- * alert('About to execute String.indexOf on: ' + this);
298
- * } );
299
- * @result Array<Function>
300
- *
301
- * @name before
302
- * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
303
- * @option Object target Target object to be weaved.
304
- * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
305
- * @param Function advice Function containing the code that will get called before the execution of the point-cut.
306
- *
307
- * @type Array<Function>
308
- * @cat Plugins/General
309
- */
310
- before : function(pointcut, advice)
311
- {
312
- return weave( pointcut, { type: _before, value: advice } );
313
- },
314
-
315
-
316
- /**
317
- * Creates an advice 'around' the defined point-cut. This type of advice can control the point-cut method execution by calling
318
- * the functions '.proceed()' on the 'invocation' object, and also, can modify the arguments collection before sending them to the function call.
319
- * This function returns an array of weaved aspects (Function).
320
- *
321
- * @example jQuery.aop.around( {target: window, method: 'MyGlobalMethod'}, function(invocation) {
322
- * alert('# of Arguments: ' + invocation.arguments.length);
323
- * return invocation.proceed();
324
- * } );
325
- * @result Array<Function>
326
- *
327
- * @example jQuery.aop.around( {target: String, method: 'indexOf'}, function(invocation) {
328
- * alert('Searching: ' + invocation.arguments[0] + ' on: ' + this);
329
- * return invocation.proceed();
330
- * } );
331
- * @result Array<Function>
332
- *
333
- * @example jQuery.aop.around( {target: window, method: /Get(\d+)/}, function(invocation) {
334
- * alert('Executing ' + invocation.method);
335
- * return invocation.proceed();
336
- * } );
337
- * @desc Matches all global methods starting with 'Get' and followed by a number.
338
- * @result Array<Function>
339
- *
340
- *
341
- * @name around
342
- * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
343
- * @option Object target Target object to be weaved.
344
- * @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
345
- * @param Function advice Function containing the code that will get called around the execution of the point-cut. This advice will be called with one
346
- * argument containing one function '.proceed()', the collection of arguments '.arguments', and the matched method name '.method'.
347
- *
348
- * @type Array<Function>
349
- * @cat Plugins/General
350
- */
351
- around : function(pointcut, advice)
352
- {
353
- return weave( pointcut, { type: _around, value: advice } );
354
- },
355
-
356
- /**
357
- * Creates an introduction on the defined point-cut. This type of advice replaces any existing methods with the same
358
- * name. To restore them, just unweave it.
359
- * This function returns an array with only one weaved aspect (Function).
360
- *
361
- * @example jQuery.aop.introduction( {target: window, method: 'MyGlobalMethod'}, function(result) {
362
- * alert('Returned: ' + result);
363
- * } );
364
- * @result Array<Function>
365
- *
366
- * @example jQuery.aop.introduction( {target: String, method: 'log'}, function() {
367
- * alert('Console: ' + this);
368
- * } );
369
- * @result Array<Function>
370
- *
371
- * @name introduction
372
- * @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
373
- * @option Object target Target object to be weaved.
374
- * @option String method Name of the function to be weaved.
375
- * @param Function advice Function containing the code that will be executed on the point-cut.
376
- *
377
- * @type Array<Function>
378
- * @cat Plugins/General
379
- */
380
- introduction : function(pointcut, advice)
381
- {
382
- return weave( pointcut, { type: _intro, value: advice } );
383
- },
384
-
385
- /**
386
- * Configures global options.
387
- *
388
- * @name setup
389
- * @param Map settings Configuration options.
390
- * @option Boolean regexMatch Enables/disables regex matching of method names.
391
- *
392
- * @example jQuery.aop.setup( { regexMatch: false } );
393
- * @desc Disable regex matching.
394
- *
395
- * @type Void
396
- * @cat Plugins/General
397
- */
398
- setup: function(settings)
399
- {
400
- _regexEnabled = settings.regexMatch;
401
- }
402
- };
403
-
404
- })();
@@ -1,5 +0,0 @@
1
- jQuery AOP plugin v1.3
2
- https://github.com/gonzalocasas/jquery-aop
3
-
4
- Licensed under the MIT license:
5
- http://www.opensource.org/licenses/mit-license.php
@@ -1,16 +0,0 @@
1
- {
2
- "name": "jquery-aop",
3
- "version": "1.3.0",
4
- "description": "Add features of aspect-oriented programming (AOP) to jQuery.",
5
- "main": "aop.js",
6
- "repository": {
7
- "type": "git",
8
- "url": "https://github.com/gonzalocasas/jquery-aop.git"
9
- },
10
- "author": "Gonzalo Casas <gonzalocasas@gmail.com>",
11
- "license": "MIT",
12
- "bugs": {
13
- "url": "https://github.com/gonzalocasas/jquery-aop/issues"
14
- },
15
- "homepage": "https://github.com/gonzalocasas/jquery-aop"
16
- }