govuk_publishing_components 28.9.2 → 29.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/config/govuk_publishing_components_manifest.js +15 -3
  4. data/app/assets/javascripts/govuk_publishing_components/dependencies.js +2 -5
  5. data/app/assets/javascripts/govuk_publishing_components/modules.js +15 -18
  6. data/app/assets/javascripts/govuk_publishing_components/{rum-loader.js.erb → rum-loader.js} +13 -10
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +1 -0
  8. data/app/views/govuk_publishing_components/components/_contextual_breadcrumbs.html.erb +0 -5
  9. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +7 -1
  10. data/app/views/govuk_publishing_components/components/docs/big_number.yml +3 -3
  11. data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +3 -3
  12. data/app/views/govuk_publishing_components/components/docs/button.yml +2 -2
  13. data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +5 -5
  14. data/app/views/govuk_publishing_components/components/docs/contents_list.yml +1 -1
  15. data/app/views/govuk_publishing_components/components/docs/contextual_breadcrumbs.yml +1 -1
  16. data/app/views/govuk_publishing_components/components/docs/contextual_guidance.yml +1 -1
  17. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -2
  18. data/app/views/govuk_publishing_components/components/docs/date_input.yml +1 -1
  19. data/app/views/govuk_publishing_components/components/docs/details.yml +1 -1
  20. data/app/views/govuk_publishing_components/components/docs/devolved_nations.yml +1 -1
  21. data/app/views/govuk_publishing_components/components/docs/document_list.yml +2 -2
  22. data/app/views/govuk_publishing_components/components/docs/error_alert.yml +1 -1
  23. data/app/views/govuk_publishing_components/components/docs/error_summary.yml +2 -2
  24. data/app/views/govuk_publishing_components/components/docs/feedback.yml +1 -1
  25. data/app/views/govuk_publishing_components/components/docs/fieldset.yml +4 -4
  26. data/app/views/govuk_publishing_components/components/docs/heading.yml +4 -4
  27. data/app/views/govuk_publishing_components/components/docs/hint.yml +1 -1
  28. data/app/views/govuk_publishing_components/components/docs/input.yml +3 -3
  29. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -1
  30. data/app/views/govuk_publishing_components/components/docs/label.yml +1 -1
  31. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +2 -2
  32. data/app/views/govuk_publishing_components/components/docs/lead_paragraph.yml +1 -1
  33. data/app/views/govuk_publishing_components/components/docs/metadata.yml +1 -1
  34. data/app/views/govuk_publishing_components/components/docs/notice.yml +2 -2
  35. data/app/views/govuk_publishing_components/components/docs/print_link.yml +1 -1
  36. data/app/views/govuk_publishing_components/components/docs/search.yml +4 -4
  37. data/app/views/govuk_publishing_components/components/docs/select.yml +5 -5
  38. data/app/views/govuk_publishing_components/components/docs/show_password.yml +3 -3
  39. data/app/views/govuk_publishing_components/components/docs/signup_link.yml +1 -1
  40. data/app/views/govuk_publishing_components/components/docs/single_page_notification_button.yml +2 -2
  41. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav.yml +1 -1
  42. data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_header.yml +3 -3
  43. data/app/views/govuk_publishing_components/components/docs/subscription_links.yml +3 -3
  44. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
  45. data/app/views/govuk_publishing_components/components/docs/table.yml +1 -1
  46. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -1
  47. data/app/views/govuk_publishing_components/components/docs/title.yml +1 -1
  48. data/config/initializers/assets.rb +15 -45
  49. data/lib/govuk_publishing_components/presenters/attachment.rb +3 -2
  50. data/lib/govuk_publishing_components/presenters/breadcrumb_selector.rb +0 -11
  51. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +0 -20
  52. data/lib/govuk_publishing_components/presenters/meta_tags.rb +1 -37
  53. data/lib/govuk_publishing_components/version.rb +1 -1
  54. data/lib/govuk_publishing_components.rb +0 -1
  55. metadata +10 -118
  56. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +0 -118
  57. data/node_modules/jquery/AUTHORS.txt +0 -266
  58. data/node_modules/jquery/LICENSE.txt +0 -36
  59. data/node_modules/jquery/README.md +0 -65
  60. data/node_modules/jquery/bower.json +0 -14
  61. data/node_modules/jquery/dist/jquery.js +0 -11008
  62. data/node_modules/jquery/dist/jquery.min.js +0 -5
  63. data/node_modules/jquery/dist/jquery.min.map +0 -1
  64. data/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  65. data/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2143
  66. data/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  67. data/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  68. data/node_modules/jquery/package.json +0 -85
  69. data/node_modules/jquery/src/ajax/jsonp.js +0 -100
  70. data/node_modules/jquery/src/ajax/load.js +0 -83
  71. data/node_modules/jquery/src/ajax/parseJSON.js +0 -53
  72. data/node_modules/jquery/src/ajax/parseXML.js +0 -31
  73. data/node_modules/jquery/src/ajax/script.js +0 -95
  74. data/node_modules/jquery/src/ajax/var/location.js +0 -3
  75. data/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  76. data/node_modules/jquery/src/ajax/var/rquery.js +0 -3
  77. data/node_modules/jquery/src/ajax/xhr.js +0 -229
  78. data/node_modules/jquery/src/ajax.js +0 -842
  79. data/node_modules/jquery/src/attributes/attr.js +0 -281
  80. data/node_modules/jquery/src/attributes/classes.js +0 -174
  81. data/node_modules/jquery/src/attributes/prop.js +0 -156
  82. data/node_modules/jquery/src/attributes/support.js +0 -70
  83. data/node_modules/jquery/src/attributes/val.js +0 -191
  84. data/node_modules/jquery/src/attributes.js +0 -11
  85. data/node_modules/jquery/src/callbacks.js +0 -232
  86. data/node_modules/jquery/src/core/access.js +0 -65
  87. data/node_modules/jquery/src/core/init.js +0 -140
  88. data/node_modules/jquery/src/core/parseHTML.js +0 -41
  89. data/node_modules/jquery/src/core/ready.js +0 -163
  90. data/node_modules/jquery/src/core/var/rsingleTag.js +0 -5
  91. data/node_modules/jquery/src/core.js +0 -529
  92. data/node_modules/jquery/src/css/addGetHookIf.js +0 -24
  93. data/node_modules/jquery/src/css/adjustCSS.js +0 -65
  94. data/node_modules/jquery/src/css/curCSS.js +0 -137
  95. data/node_modules/jquery/src/css/defaultDisplay.js +0 -72
  96. data/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -42
  97. data/node_modules/jquery/src/css/showHide.js +0 -45
  98. data/node_modules/jquery/src/css/support.js +0 -184
  99. data/node_modules/jquery/src/css/var/cssExpand.js +0 -3
  100. data/node_modules/jquery/src/css/var/isHidden.js +0 -16
  101. data/node_modules/jquery/src/css/var/rmargin.js +0 -3
  102. data/node_modules/jquery/src/css/var/rnumnonpx.js +0 -5
  103. data/node_modules/jquery/src/css/var/swap.js +0 -24
  104. data/node_modules/jquery/src/css.js +0 -563
  105. data/node_modules/jquery/src/data/support.js +0 -23
  106. data/node_modules/jquery/src/data/var/acceptData.js +0 -20
  107. data/node_modules/jquery/src/data.js +0 -342
  108. data/node_modules/jquery/src/deferred.js +0 -159
  109. data/node_modules/jquery/src/deprecated.js +0 -34
  110. data/node_modules/jquery/src/dimensions.js +0 -56
  111. data/node_modules/jquery/src/effects/Tween.js +0 -121
  112. data/node_modules/jquery/src/effects/animatedSelector.js +0 -13
  113. data/node_modules/jquery/src/effects/support.js +0 -58
  114. data/node_modules/jquery/src/effects.js +0 -640
  115. data/node_modules/jquery/src/event/ajax.js +0 -20
  116. data/node_modules/jquery/src/event/alias.js +0 -25
  117. data/node_modules/jquery/src/event/support.js +0 -28
  118. data/node_modules/jquery/src/event.js +0 -1134
  119. data/node_modules/jquery/src/exports/amd.js +0 -24
  120. data/node_modules/jquery/src/exports/global.js +0 -26
  121. data/node_modules/jquery/src/intro.js +0 -44
  122. data/node_modules/jquery/src/jquery.js +0 -37
  123. data/node_modules/jquery/src/manipulation/_evalUrl.js +0 -21
  124. data/node_modules/jquery/src/manipulation/buildFragment.js +0 -157
  125. data/node_modules/jquery/src/manipulation/createSafeFragment.js +0 -20
  126. data/node_modules/jquery/src/manipulation/getAll.js +0 -33
  127. data/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -19
  128. data/node_modules/jquery/src/manipulation/support.js +0 -72
  129. data/node_modules/jquery/src/manipulation/var/nodeNames.js +0 -5
  130. data/node_modules/jquery/src/manipulation/var/rcheckableType.js +0 -3
  131. data/node_modules/jquery/src/manipulation/var/rleadingWhitespace.js +0 -3
  132. data/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -3
  133. data/node_modules/jquery/src/manipulation/var/rtagName.js +0 -3
  134. data/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  135. data/node_modules/jquery/src/manipulation.js +0 -585
  136. data/node_modules/jquery/src/offset.js +0 -219
  137. data/node_modules/jquery/src/outro.js +0 -2
  138. data/node_modules/jquery/src/queue/delay.js +0 -22
  139. data/node_modules/jquery/src/queue.js +0 -144
  140. data/node_modules/jquery/src/selector-sizzle.js +0 -14
  141. data/node_modules/jquery/src/selector.js +0 -1
  142. data/node_modules/jquery/src/serialize.js +0 -125
  143. data/node_modules/jquery/src/support.js +0 -63
  144. data/node_modules/jquery/src/traversing/findFilter.js +0 -100
  145. data/node_modules/jquery/src/traversing/var/dir.js +0 -20
  146. data/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -6
  147. data/node_modules/jquery/src/traversing/var/siblings.js +0 -15
  148. data/node_modules/jquery/src/traversing.js +0 -179
  149. data/node_modules/jquery/src/var/class2type.js +0 -5
  150. data/node_modules/jquery/src/var/concat.js +0 -5
  151. data/node_modules/jquery/src/var/deletedIds.js +0 -3
  152. data/node_modules/jquery/src/var/document.js +0 -3
  153. data/node_modules/jquery/src/var/documentElement.js +0 -5
  154. data/node_modules/jquery/src/var/hasOwn.js +0 -5
  155. data/node_modules/jquery/src/var/indexOf.js +0 -5
  156. data/node_modules/jquery/src/var/pnum.js +0 -3
  157. data/node_modules/jquery/src/var/push.js +0 -5
  158. data/node_modules/jquery/src/var/rcssNum.js +0 -7
  159. data/node_modules/jquery/src/var/rnotwhite.js +0 -3
  160. data/node_modules/jquery/src/var/slice.js +0 -5
  161. data/node_modules/jquery/src/var/support.js +0 -5
  162. data/node_modules/jquery/src/var/toString.js +0 -5
  163. data/node_modules/jquery/src/wrap.js +0 -77
@@ -1,191 +0,0 @@
1
- define( [
2
- "../core",
3
- "./support",
4
- "../core/init"
5
- ], function( jQuery, support ) {
6
-
7
- var rreturn = /\r/g,
8
- rspaces = /[\x20\t\r\n\f]+/g;
9
-
10
- jQuery.fn.extend( {
11
- val: function( value ) {
12
- var hooks, ret, isFunction,
13
- elem = this[ 0 ];
14
-
15
- if ( !arguments.length ) {
16
- if ( elem ) {
17
- hooks = jQuery.valHooks[ elem.type ] ||
18
- jQuery.valHooks[ elem.nodeName.toLowerCase() ];
19
-
20
- if (
21
- hooks &&
22
- "get" in hooks &&
23
- ( ret = hooks.get( elem, "value" ) ) !== undefined
24
- ) {
25
- return ret;
26
- }
27
-
28
- ret = elem.value;
29
-
30
- return typeof ret === "string" ?
31
-
32
- // handle most common string cases
33
- ret.replace( rreturn, "" ) :
34
-
35
- // handle cases where value is null/undef or number
36
- ret == null ? "" : ret;
37
- }
38
-
39
- return;
40
- }
41
-
42
- isFunction = jQuery.isFunction( value );
43
-
44
- return this.each( function( i ) {
45
- var val;
46
-
47
- if ( this.nodeType !== 1 ) {
48
- return;
49
- }
50
-
51
- if ( isFunction ) {
52
- val = value.call( this, i, jQuery( this ).val() );
53
- } else {
54
- val = value;
55
- }
56
-
57
- // Treat null/undefined as ""; convert numbers to string
58
- if ( val == null ) {
59
- val = "";
60
- } else if ( typeof val === "number" ) {
61
- val += "";
62
- } else if ( jQuery.isArray( val ) ) {
63
- val = jQuery.map( val, function( value ) {
64
- return value == null ? "" : value + "";
65
- } );
66
- }
67
-
68
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
69
-
70
- // If set returns undefined, fall back to normal setting
71
- if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
72
- this.value = val;
73
- }
74
- } );
75
- }
76
- } );
77
-
78
- jQuery.extend( {
79
- valHooks: {
80
- option: {
81
- get: function( elem ) {
82
- var val = jQuery.find.attr( elem, "value" );
83
- return val != null ?
84
- val :
85
-
86
- // Support: IE10-11+
87
- // option.text throws exceptions (#14686, #14858)
88
- // Strip and collapse whitespace
89
- // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
90
- jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
91
- }
92
- },
93
- select: {
94
- get: function( elem ) {
95
- var value, option,
96
- options = elem.options,
97
- index = elem.selectedIndex,
98
- one = elem.type === "select-one" || index < 0,
99
- values = one ? null : [],
100
- max = one ? index + 1 : options.length,
101
- i = index < 0 ?
102
- max :
103
- one ? index : 0;
104
-
105
- // Loop through all the selected options
106
- for ( ; i < max; i++ ) {
107
- option = options[ i ];
108
-
109
- // oldIE doesn't update selected after form reset (#2551)
110
- if ( ( option.selected || i === index ) &&
111
-
112
- // Don't return options that are disabled or in a disabled optgroup
113
- ( support.optDisabled ?
114
- !option.disabled :
115
- option.getAttribute( "disabled" ) === null ) &&
116
- ( !option.parentNode.disabled ||
117
- !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
118
-
119
- // Get the specific value for the option
120
- value = jQuery( option ).val();
121
-
122
- // We don't need an array for one selects
123
- if ( one ) {
124
- return value;
125
- }
126
-
127
- // Multi-Selects return an array
128
- values.push( value );
129
- }
130
- }
131
-
132
- return values;
133
- },
134
-
135
- set: function( elem, value ) {
136
- var optionSet, option,
137
- options = elem.options,
138
- values = jQuery.makeArray( value ),
139
- i = options.length;
140
-
141
- while ( i-- ) {
142
- option = options[ i ];
143
-
144
- if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 ) {
145
-
146
- // Support: IE6
147
- // When new option element is added to select box we need to
148
- // force reflow of newly added node in order to workaround delay
149
- // of initialization properties
150
- try {
151
- option.selected = optionSet = true;
152
-
153
- } catch ( _ ) {
154
-
155
- // Will be executed only in IE6
156
- option.scrollHeight;
157
- }
158
-
159
- } else {
160
- option.selected = false;
161
- }
162
- }
163
-
164
- // Force browsers to behave consistently when non-matching value is set
165
- if ( !optionSet ) {
166
- elem.selectedIndex = -1;
167
- }
168
-
169
- return options;
170
- }
171
- }
172
- }
173
- } );
174
-
175
- // Radios and checkboxes getter/setter
176
- jQuery.each( [ "radio", "checkbox" ], function() {
177
- jQuery.valHooks[ this ] = {
178
- set: function( elem, value ) {
179
- if ( jQuery.isArray( value ) ) {
180
- return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
181
- }
182
- }
183
- };
184
- if ( !support.checkOn ) {
185
- jQuery.valHooks[ this ].get = function( elem ) {
186
- return elem.getAttribute( "value" ) === null ? "on" : elem.value;
187
- };
188
- }
189
- } );
190
-
191
- } );
@@ -1,11 +0,0 @@
1
- define( [
2
- "./core",
3
- "./attributes/val",
4
- "./attributes/attr",
5
- "./attributes/prop",
6
- "./attributes/classes"
7
- ], function( jQuery ) {
8
-
9
- // Return jQuery for attributes-only inclusion
10
- return jQuery;
11
- } );
@@ -1,232 +0,0 @@
1
- define( [
2
- "./core",
3
- "./var/rnotwhite"
4
- ], function( jQuery, rnotwhite ) {
5
-
6
- // Convert String-formatted options into Object-formatted ones
7
- function createOptions( options ) {
8
- var object = {};
9
- jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
10
- object[ flag ] = true;
11
- } );
12
- return object;
13
- }
14
-
15
- /*
16
- * Create a callback list using the following parameters:
17
- *
18
- * options: an optional list of space-separated options that will change how
19
- * the callback list behaves or a more traditional option object
20
- *
21
- * By default a callback list will act like an event callback list and can be
22
- * "fired" multiple times.
23
- *
24
- * Possible options:
25
- *
26
- * once: will ensure the callback list can only be fired once (like a Deferred)
27
- *
28
- * memory: will keep track of previous values and will call any callback added
29
- * after the list has been fired right away with the latest "memorized"
30
- * values (like a Deferred)
31
- *
32
- * unique: will ensure a callback can only be added once (no duplicate in the list)
33
- *
34
- * stopOnFalse: interrupt callings when a callback returns false
35
- *
36
- */
37
- jQuery.Callbacks = function( options ) {
38
-
39
- // Convert options from String-formatted to Object-formatted if needed
40
- // (we check in cache first)
41
- options = typeof options === "string" ?
42
- createOptions( options ) :
43
- jQuery.extend( {}, options );
44
-
45
- var // Flag to know if list is currently firing
46
- firing,
47
-
48
- // Last fire value for non-forgettable lists
49
- memory,
50
-
51
- // Flag to know if list was already fired
52
- fired,
53
-
54
- // Flag to prevent firing
55
- locked,
56
-
57
- // Actual callback list
58
- list = [],
59
-
60
- // Queue of execution data for repeatable lists
61
- queue = [],
62
-
63
- // Index of currently firing callback (modified by add/remove as needed)
64
- firingIndex = -1,
65
-
66
- // Fire callbacks
67
- fire = function() {
68
-
69
- // Enforce single-firing
70
- locked = options.once;
71
-
72
- // Execute callbacks for all pending executions,
73
- // respecting firingIndex overrides and runtime changes
74
- fired = firing = true;
75
- for ( ; queue.length; firingIndex = -1 ) {
76
- memory = queue.shift();
77
- while ( ++firingIndex < list.length ) {
78
-
79
- // Run callback and check for early termination
80
- if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
81
- options.stopOnFalse ) {
82
-
83
- // Jump to end and forget the data so .add doesn't re-fire
84
- firingIndex = list.length;
85
- memory = false;
86
- }
87
- }
88
- }
89
-
90
- // Forget the data if we're done with it
91
- if ( !options.memory ) {
92
- memory = false;
93
- }
94
-
95
- firing = false;
96
-
97
- // Clean up if we're done firing for good
98
- if ( locked ) {
99
-
100
- // Keep an empty list if we have data for future add calls
101
- if ( memory ) {
102
- list = [];
103
-
104
- // Otherwise, this object is spent
105
- } else {
106
- list = "";
107
- }
108
- }
109
- },
110
-
111
- // Actual Callbacks object
112
- self = {
113
-
114
- // Add a callback or a collection of callbacks to the list
115
- add: function() {
116
- if ( list ) {
117
-
118
- // If we have memory from a past run, we should fire after adding
119
- if ( memory && !firing ) {
120
- firingIndex = list.length - 1;
121
- queue.push( memory );
122
- }
123
-
124
- ( function add( args ) {
125
- jQuery.each( args, function( _, arg ) {
126
- if ( jQuery.isFunction( arg ) ) {
127
- if ( !options.unique || !self.has( arg ) ) {
128
- list.push( arg );
129
- }
130
- } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
131
-
132
- // Inspect recursively
133
- add( arg );
134
- }
135
- } );
136
- } )( arguments );
137
-
138
- if ( memory && !firing ) {
139
- fire();
140
- }
141
- }
142
- return this;
143
- },
144
-
145
- // Remove a callback from the list
146
- remove: function() {
147
- jQuery.each( arguments, function( _, arg ) {
148
- var index;
149
- while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
150
- list.splice( index, 1 );
151
-
152
- // Handle firing indexes
153
- if ( index <= firingIndex ) {
154
- firingIndex--;
155
- }
156
- }
157
- } );
158
- return this;
159
- },
160
-
161
- // Check if a given callback is in the list.
162
- // If no argument is given, return whether or not list has callbacks attached.
163
- has: function( fn ) {
164
- return fn ?
165
- jQuery.inArray( fn, list ) > -1 :
166
- list.length > 0;
167
- },
168
-
169
- // Remove all callbacks from the list
170
- empty: function() {
171
- if ( list ) {
172
- list = [];
173
- }
174
- return this;
175
- },
176
-
177
- // Disable .fire and .add
178
- // Abort any current/pending executions
179
- // Clear all callbacks and values
180
- disable: function() {
181
- locked = queue = [];
182
- list = memory = "";
183
- return this;
184
- },
185
- disabled: function() {
186
- return !list;
187
- },
188
-
189
- // Disable .fire
190
- // Also disable .add unless we have memory (since it would have no effect)
191
- // Abort any pending executions
192
- lock: function() {
193
- locked = true;
194
- if ( !memory ) {
195
- self.disable();
196
- }
197
- return this;
198
- },
199
- locked: function() {
200
- return !!locked;
201
- },
202
-
203
- // Call all callbacks with the given context and arguments
204
- fireWith: function( context, args ) {
205
- if ( !locked ) {
206
- args = args || [];
207
- args = [ context, args.slice ? args.slice() : args ];
208
- queue.push( args );
209
- if ( !firing ) {
210
- fire();
211
- }
212
- }
213
- return this;
214
- },
215
-
216
- // Call all the callbacks with the given arguments
217
- fire: function() {
218
- self.fireWith( this, arguments );
219
- return this;
220
- },
221
-
222
- // To know if the callbacks have already been called at least once
223
- fired: function() {
224
- return !!fired;
225
- }
226
- };
227
-
228
- return self;
229
- };
230
-
231
- return jQuery;
232
- } );
@@ -1,65 +0,0 @@
1
- define( [
2
- "../core"
3
- ], function( jQuery ) {
4
-
5
- // Multifunctional method to get and set values of a collection
6
- // The value/s can optionally be executed if it's a function
7
- var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
8
- var i = 0,
9
- length = elems.length,
10
- bulk = key == null;
11
-
12
- // Sets many values
13
- if ( jQuery.type( key ) === "object" ) {
14
- chainable = true;
15
- for ( i in key ) {
16
- access( elems, fn, i, key[ i ], true, emptyGet, raw );
17
- }
18
-
19
- // Sets one value
20
- } else if ( value !== undefined ) {
21
- chainable = true;
22
-
23
- if ( !jQuery.isFunction( value ) ) {
24
- raw = true;
25
- }
26
-
27
- if ( bulk ) {
28
-
29
- // Bulk operations run against the entire set
30
- if ( raw ) {
31
- fn.call( elems, value );
32
- fn = null;
33
-
34
- // ...except when executing function values
35
- } else {
36
- bulk = fn;
37
- fn = function( elem, key, value ) {
38
- return bulk.call( jQuery( elem ), value );
39
- };
40
- }
41
- }
42
-
43
- if ( fn ) {
44
- for ( ; i < length; i++ ) {
45
- fn(
46
- elems[ i ],
47
- key,
48
- raw ? value : value.call( elems[ i ], i, fn( elems[ i ], key ) )
49
- );
50
- }
51
- }
52
- }
53
-
54
- return chainable ?
55
- elems :
56
-
57
- // Gets
58
- bulk ?
59
- fn.call( elems ) :
60
- length ? fn( elems[ 0 ], key ) : emptyGet;
61
- };
62
-
63
- return access;
64
-
65
- } );
@@ -1,140 +0,0 @@
1
- // Initialize a jQuery object
2
- define( [
3
- "../core",
4
- "../var/document",
5
- "./var/rsingleTag",
6
- "../traversing/findFilter"
7
- ], function( jQuery, document, rsingleTag ) {
8
-
9
- // A central reference to the root jQuery(document)
10
- var rootjQuery,
11
-
12
- // A simple way to check for HTML strings
13
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
14
- // Strict HTML recognition (#11290: must start with <)
15
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
16
-
17
- init = jQuery.fn.init = function( selector, context, root ) {
18
- var match, elem;
19
-
20
- // HANDLE: $(""), $(null), $(undefined), $(false)
21
- if ( !selector ) {
22
- return this;
23
- }
24
-
25
- // init accepts an alternate rootjQuery
26
- // so migrate can support jQuery.sub (gh-2101)
27
- root = root || rootjQuery;
28
-
29
- // Handle HTML strings
30
- if ( typeof selector === "string" ) {
31
- if ( selector.charAt( 0 ) === "<" &&
32
- selector.charAt( selector.length - 1 ) === ">" &&
33
- selector.length >= 3 ) {
34
-
35
- // Assume that strings that start and end with <> are HTML and skip the regex check
36
- match = [ null, selector, null ];
37
-
38
- } else {
39
- match = rquickExpr.exec( selector );
40
- }
41
-
42
- // Match html or make sure no context is specified for #id
43
- if ( match && ( match[ 1 ] || !context ) ) {
44
-
45
- // HANDLE: $(html) -> $(array)
46
- if ( match[ 1 ] ) {
47
- context = context instanceof jQuery ? context[ 0 ] : context;
48
-
49
- // scripts is true for back-compat
50
- // Intentionally let the error be thrown if parseHTML is not present
51
- jQuery.merge( this, jQuery.parseHTML(
52
- match[ 1 ],
53
- context && context.nodeType ? context.ownerDocument || context : document,
54
- true
55
- ) );
56
-
57
- // HANDLE: $(html, props)
58
- if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
59
- for ( match in context ) {
60
-
61
- // Properties of context are called as methods if possible
62
- if ( jQuery.isFunction( this[ match ] ) ) {
63
- this[ match ]( context[ match ] );
64
-
65
- // ...and otherwise set as attributes
66
- } else {
67
- this.attr( match, context[ match ] );
68
- }
69
- }
70
- }
71
-
72
- return this;
73
-
74
- // HANDLE: $(#id)
75
- } else {
76
- elem = document.getElementById( match[ 2 ] );
77
-
78
- // Check parentNode to catch when Blackberry 4.6 returns
79
- // nodes that are no longer in the document #6963
80
- if ( elem && elem.parentNode ) {
81
-
82
- // Handle the case where IE and Opera return items
83
- // by name instead of ID
84
- if ( elem.id !== match[ 2 ] ) {
85
- return rootjQuery.find( selector );
86
- }
87
-
88
- // Otherwise, we inject the element directly into the jQuery object
89
- this.length = 1;
90
- this[ 0 ] = elem;
91
- }
92
-
93
- this.context = document;
94
- this.selector = selector;
95
- return this;
96
- }
97
-
98
- // HANDLE: $(expr, $(...))
99
- } else if ( !context || context.jquery ) {
100
- return ( context || root ).find( selector );
101
-
102
- // HANDLE: $(expr, context)
103
- // (which is just equivalent to: $(context).find(expr)
104
- } else {
105
- return this.constructor( context ).find( selector );
106
- }
107
-
108
- // HANDLE: $(DOMElement)
109
- } else if ( selector.nodeType ) {
110
- this.context = this[ 0 ] = selector;
111
- this.length = 1;
112
- return this;
113
-
114
- // HANDLE: $(function)
115
- // Shortcut for document ready
116
- } else if ( jQuery.isFunction( selector ) ) {
117
- return typeof root.ready !== "undefined" ?
118
- root.ready( selector ) :
119
-
120
- // Execute immediately if ready is not present
121
- selector( jQuery );
122
- }
123
-
124
- if ( selector.selector !== undefined ) {
125
- this.selector = selector.selector;
126
- this.context = selector.context;
127
- }
128
-
129
- return jQuery.makeArray( selector, this );
130
- };
131
-
132
- // Give the init function the jQuery prototype for later instantiation
133
- init.prototype = jQuery.fn;
134
-
135
- // Initialize central reference
136
- rootjQuery = jQuery( document );
137
-
138
- return init;
139
-
140
- } );
@@ -1,41 +0,0 @@
1
- define( [
2
- "../core",
3
- "../var/document",
4
- "./var/rsingleTag",
5
- "../manipulation/buildFragment"
6
- ], function( jQuery, document, rsingleTag, buildFragment ) {
7
-
8
- // data: string of html
9
- // context (optional): If specified, the fragment will be created in this context,
10
- // defaults to document
11
- // keepScripts (optional): If true, will include scripts passed in the html string
12
- jQuery.parseHTML = function( data, context, keepScripts ) {
13
- if ( !data || typeof data !== "string" ) {
14
- return null;
15
- }
16
- if ( typeof context === "boolean" ) {
17
- keepScripts = context;
18
- context = false;
19
- }
20
- context = context || document;
21
-
22
- var parsed = rsingleTag.exec( data ),
23
- scripts = !keepScripts && [];
24
-
25
- // Single tag
26
- if ( parsed ) {
27
- return [ context.createElement( parsed[ 1 ] ) ];
28
- }
29
-
30
- parsed = buildFragment( [ data ], context, scripts );
31
-
32
- if ( scripts && scripts.length ) {
33
- jQuery( scripts ).remove();
34
- }
35
-
36
- return jQuery.merge( [], parsed.childNodes );
37
- };
38
-
39
- return jQuery.parseHTML;
40
-
41
- } );