trusty-cms 4.3.3 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/Gemfile.lock +87 -77
  4. data/app/assets/javascripts/ckeditor/config.js +2 -2
  5. data/app/assets/stylesheets/admin/partials/_content.scss +1 -0
  6. data/app/controllers/admin/assets_controller.rb +5 -1
  7. data/app/models/asset.rb +39 -48
  8. data/app/models/asset_type.rb +6 -2
  9. data/app/views/admin/assets/edit.html.haml +5 -3
  10. data/config/database.yml +2 -2
  11. data/config/locales/en.yml +1 -0
  12. data/coverage/index.html +1 -1
  13. data/lib/trusty_cms/deprecation.rb +13 -0
  14. data/lib/trusty_cms.rb +1 -1
  15. data/node_modules/path-parse/index.js +17 -35
  16. data/node_modules/path-parse/package.json +1 -1
  17. data/node_modules/postcss/CHANGELOG.md +27 -0
  18. data/node_modules/postcss/README.md +21 -0
  19. data/node_modules/postcss/lib/at-rule.js +2 -4
  20. data/node_modules/postcss/lib/comment.js +2 -4
  21. data/node_modules/postcss/lib/container.js +27 -122
  22. data/node_modules/postcss/lib/css-syntax-error.js +5 -7
  23. data/node_modules/postcss/lib/declaration.js +2 -4
  24. data/node_modules/postcss/lib/input.js +3 -5
  25. data/node_modules/postcss/lib/lazy-result.js +10 -17
  26. data/node_modules/postcss/lib/map-generator.js +10 -17
  27. data/node_modules/postcss/lib/node.js +2 -4
  28. data/node_modules/postcss/lib/parser.js +2 -4
  29. data/node_modules/postcss/lib/postcss.d.ts +25 -19
  30. data/node_modules/postcss/lib/previous-map.js +17 -6
  31. data/node_modules/postcss/lib/processor.js +16 -15
  32. data/node_modules/postcss/lib/result.js +2 -4
  33. data/node_modules/postcss/lib/root.js +10 -17
  34. data/node_modules/postcss/lib/rule.js +2 -4
  35. data/node_modules/postcss/lib/stringifier.js +2 -4
  36. data/node_modules/postcss/lib/warning.js +2 -4
  37. data/node_modules/postcss/package.json +16 -12
  38. data/spec/dummy/log/test.log +542 -443
  39. data/spec/dummy/tmp/cache/747/A70/TrustyCms%3A%3AConfig +0 -0
  40. data/spec/dummy/tmp/cache/85C/FA0/TrustyCms.cache_mtime +1 -1
  41. data/trusty_cms.gemspec +2 -1
  42. data/vendor/extensions/clipped-extension/lib/clipped/engine.rb +1 -1
  43. data/yarn.lock +3 -3
  44. metadata +31 -307
  45. data/config/initializers/interpolation.rb +0 -6
  46. data/node_modules/path-parse/test.js +0 -77
  47. data/node_modules/postcss/docs/api/assets/scripts.min.js +0 -8
  48. data/node_modules/postcss/docs/api/assets/styles.min.css +0 -1
  49. data/node_modules/postcss/docs/api/index.html +0 -22716
  50. data/spec/dummy/log/development.log +0 -158
  51. data/spec/dummy/node_modules/jquery/AUTHORS.txt +0 -327
  52. data/spec/dummy/node_modules/jquery/LICENSE.txt +0 -20
  53. data/spec/dummy/node_modules/jquery/README.md +0 -62
  54. data/spec/dummy/node_modules/jquery/bower.json +0 -14
  55. data/spec/dummy/node_modules/jquery/dist/jquery.js +0 -10872
  56. data/spec/dummy/node_modules/jquery/dist/jquery.min.js +0 -2
  57. data/spec/dummy/node_modules/jquery/dist/jquery.min.map +0 -1
  58. data/spec/dummy/node_modules/jquery/dist/jquery.slim.js +0 -8777
  59. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.js +0 -2
  60. data/spec/dummy/node_modules/jquery/dist/jquery.slim.min.map +0 -1
  61. data/spec/dummy/node_modules/jquery/external/sizzle/LICENSE.txt +0 -36
  62. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.js +0 -2478
  63. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.js +0 -3
  64. data/spec/dummy/node_modules/jquery/external/sizzle/dist/sizzle.min.map +0 -1
  65. data/spec/dummy/node_modules/jquery/package.json +0 -117
  66. data/spec/dummy/node_modules/jquery/src/ajax/jsonp.js +0 -103
  67. data/spec/dummy/node_modules/jquery/src/ajax/load.js +0 -77
  68. data/spec/dummy/node_modules/jquery/src/ajax/script.js +0 -74
  69. data/spec/dummy/node_modules/jquery/src/ajax/var/location.js +0 -5
  70. data/spec/dummy/node_modules/jquery/src/ajax/var/nonce.js +0 -5
  71. data/spec/dummy/node_modules/jquery/src/ajax/var/rquery.js +0 -5
  72. data/spec/dummy/node_modules/jquery/src/ajax/xhr.js +0 -170
  73. data/spec/dummy/node_modules/jquery/src/ajax.js +0 -873
  74. data/spec/dummy/node_modules/jquery/src/attributes/attr.js +0 -141
  75. data/spec/dummy/node_modules/jquery/src/attributes/classes.js +0 -186
  76. data/spec/dummy/node_modules/jquery/src/attributes/prop.js +0 -143
  77. data/spec/dummy/node_modules/jquery/src/attributes/support.js +0 -33
  78. data/spec/dummy/node_modules/jquery/src/attributes/val.js +0 -191
  79. data/spec/dummy/node_modules/jquery/src/attributes.js +0 -13
  80. data/spec/dummy/node_modules/jquery/src/callbacks.js +0 -236
  81. data/spec/dummy/node_modules/jquery/src/core/DOMEval.js +0 -43
  82. data/spec/dummy/node_modules/jquery/src/core/access.js +0 -72
  83. data/spec/dummy/node_modules/jquery/src/core/camelCase.js +0 -23
  84. data/spec/dummy/node_modules/jquery/src/core/init.js +0 -129
  85. data/spec/dummy/node_modules/jquery/src/core/isAttached.js +0 -26
  86. data/spec/dummy/node_modules/jquery/src/core/nodeName.js +0 -13
  87. data/spec/dummy/node_modules/jquery/src/core/parseHTML.js +0 -65
  88. data/spec/dummy/node_modules/jquery/src/core/parseXML.js +0 -30
  89. data/spec/dummy/node_modules/jquery/src/core/ready-no-deferred.js +0 -97
  90. data/spec/dummy/node_modules/jquery/src/core/ready.js +0 -86
  91. data/spec/dummy/node_modules/jquery/src/core/readyException.js +0 -13
  92. data/spec/dummy/node_modules/jquery/src/core/stripAndCollapse.js +0 -14
  93. data/spec/dummy/node_modules/jquery/src/core/support.js +0 -20
  94. data/spec/dummy/node_modules/jquery/src/core/toType.js +0 -20
  95. data/spec/dummy/node_modules/jquery/src/core/var/rsingleTag.js +0 -7
  96. data/spec/dummy/node_modules/jquery/src/core.js +0 -400
  97. data/spec/dummy/node_modules/jquery/src/css/addGetHookIf.js +0 -26
  98. data/spec/dummy/node_modules/jquery/src/css/adjustCSS.js +0 -74
  99. data/spec/dummy/node_modules/jquery/src/css/curCSS.js +0 -65
  100. data/spec/dummy/node_modules/jquery/src/css/finalPropName.js +0 -42
  101. data/spec/dummy/node_modules/jquery/src/css/hiddenVisibleSelectors.js +0 -15
  102. data/spec/dummy/node_modules/jquery/src/css/showHide.js +0 -105
  103. data/spec/dummy/node_modules/jquery/src/css/support.js +0 -133
  104. data/spec/dummy/node_modules/jquery/src/css/var/cssExpand.js +0 -5
  105. data/spec/dummy/node_modules/jquery/src/css/var/getStyles.js +0 -17
  106. data/spec/dummy/node_modules/jquery/src/css/var/isHiddenWithinTree.js +0 -34
  107. data/spec/dummy/node_modules/jquery/src/css/var/rboxStyle.js +0 -7
  108. data/spec/dummy/node_modules/jquery/src/css/var/rnumnonpx.js +0 -7
  109. data/spec/dummy/node_modules/jquery/src/css/var/swap.js +0 -26
  110. data/spec/dummy/node_modules/jquery/src/css.js +0 -494
  111. data/spec/dummy/node_modules/jquery/src/data/Data.js +0 -162
  112. data/spec/dummy/node_modules/jquery/src/data/var/acceptData.js +0 -19
  113. data/spec/dummy/node_modules/jquery/src/data/var/dataPriv.js +0 -7
  114. data/spec/dummy/node_modules/jquery/src/data/var/dataUser.js +0 -7
  115. data/spec/dummy/node_modules/jquery/src/data.js +0 -180
  116. data/spec/dummy/node_modules/jquery/src/deferred/exceptionHook.js +0 -21
  117. data/spec/dummy/node_modules/jquery/src/deferred.js +0 -399
  118. data/spec/dummy/node_modules/jquery/src/deprecated/ajax-event-alias.js +0 -22
  119. data/spec/dummy/node_modules/jquery/src/deprecated/event.js +0 -48
  120. data/spec/dummy/node_modules/jquery/src/deprecated.js +0 -87
  121. data/spec/dummy/node_modules/jquery/src/dimensions.js +0 -57
  122. data/spec/dummy/node_modules/jquery/src/effects/Tween.js +0 -125
  123. data/spec/dummy/node_modules/jquery/src/effects/animatedSelector.js +0 -15
  124. data/spec/dummy/node_modules/jquery/src/effects.js +0 -701
  125. data/spec/dummy/node_modules/jquery/src/event/focusin.js +0 -58
  126. data/spec/dummy/node_modules/jquery/src/event/support.js +0 -11
  127. data/spec/dummy/node_modules/jquery/src/event/trigger.js +0 -201
  128. data/spec/dummy/node_modules/jquery/src/event.js +0 -892
  129. data/spec/dummy/node_modules/jquery/src/exports/amd.js +0 -26
  130. data/spec/dummy/node_modules/jquery/src/exports/global.js +0 -34
  131. data/spec/dummy/node_modules/jquery/src/jquery.js +0 -41
  132. data/spec/dummy/node_modules/jquery/src/manipulation/_evalUrl.js +0 -32
  133. data/spec/dummy/node_modules/jquery/src/manipulation/buildFragment.js +0 -106
  134. data/spec/dummy/node_modules/jquery/src/manipulation/getAll.js +0 -32
  135. data/spec/dummy/node_modules/jquery/src/manipulation/setGlobalEval.js +0 -22
  136. data/spec/dummy/node_modules/jquery/src/manipulation/support.js +0 -41
  137. data/spec/dummy/node_modules/jquery/src/manipulation/var/rscriptType.js +0 -5
  138. data/spec/dummy/node_modules/jquery/src/manipulation/var/rtagName.js +0 -8
  139. data/spec/dummy/node_modules/jquery/src/manipulation/wrapMap.js +0 -30
  140. data/spec/dummy/node_modules/jquery/src/manipulation.js +0 -480
  141. data/spec/dummy/node_modules/jquery/src/offset.js +0 -238
  142. data/spec/dummy/node_modules/jquery/src/queue/delay.js +0 -24
  143. data/spec/dummy/node_modules/jquery/src/queue.js +0 -145
  144. data/spec/dummy/node_modules/jquery/src/selector-native.js +0 -241
  145. data/spec/dummy/node_modules/jquery/src/selector-sizzle.js +0 -19
  146. data/spec/dummy/node_modules/jquery/src/selector.js +0 -3
  147. data/spec/dummy/node_modules/jquery/src/serialize.js +0 -136
  148. data/spec/dummy/node_modules/jquery/src/traversing/findFilter.js +0 -97
  149. data/spec/dummy/node_modules/jquery/src/traversing/var/dir.js +0 -22
  150. data/spec/dummy/node_modules/jquery/src/traversing/var/rneedsContext.js +0 -8
  151. data/spec/dummy/node_modules/jquery/src/traversing/var/siblings.js +0 -17
  152. data/spec/dummy/node_modules/jquery/src/traversing.js +0 -198
  153. data/spec/dummy/node_modules/jquery/src/var/ObjectFunctionString.js +0 -7
  154. data/spec/dummy/node_modules/jquery/src/var/arr.js +0 -5
  155. data/spec/dummy/node_modules/jquery/src/var/class2type.js +0 -6
  156. data/spec/dummy/node_modules/jquery/src/var/document.js +0 -5
  157. data/spec/dummy/node_modules/jquery/src/var/documentElement.js +0 -7
  158. data/spec/dummy/node_modules/jquery/src/var/flat.js +0 -16
  159. data/spec/dummy/node_modules/jquery/src/var/fnToString.js +0 -7
  160. data/spec/dummy/node_modules/jquery/src/var/getProto.js +0 -5
  161. data/spec/dummy/node_modules/jquery/src/var/hasOwn.js +0 -7
  162. data/spec/dummy/node_modules/jquery/src/var/indexOf.js +0 -7
  163. data/spec/dummy/node_modules/jquery/src/var/isFunction.js +0 -13
  164. data/spec/dummy/node_modules/jquery/src/var/isWindow.js +0 -8
  165. data/spec/dummy/node_modules/jquery/src/var/pnum.js +0 -5
  166. data/spec/dummy/node_modules/jquery/src/var/push.js +0 -7
  167. data/spec/dummy/node_modules/jquery/src/var/rcheckableType.js +0 -5
  168. data/spec/dummy/node_modules/jquery/src/var/rcssNum.js +0 -9
  169. data/spec/dummy/node_modules/jquery/src/var/rnothtmlwhite.js +0 -8
  170. data/spec/dummy/node_modules/jquery/src/var/slice.js +0 -7
  171. data/spec/dummy/node_modules/jquery/src/var/support.js +0 -6
  172. data/spec/dummy/node_modules/jquery/src/var/toString.js +0 -7
  173. data/spec/dummy/node_modules/jquery/src/wrap.js +0 -78
  174. data/spec/dummy/node_modules/jquery-ui-bundle/AUTHORS.txt +0 -333
  175. data/spec/dummy/node_modules/jquery-ui-bundle/LICENSE.txt +0 -43
  176. data/spec/dummy/node_modules/jquery-ui-bundle/external/jquery/jquery.js +0 -11008
  177. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_444444_256x240.png +0 -0
  178. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_555555_256x240.png +0 -0
  179. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777620_256x240.png +0 -0
  180. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_777777_256x240.png +0 -0
  181. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_cc0000_256x240.png +0 -0
  182. data/spec/dummy/node_modules/jquery-ui-bundle/images/ui-icons_ffffff_256x240.png +0 -0
  183. data/spec/dummy/node_modules/jquery-ui-bundle/index.html +0 -559
  184. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.css +0 -1312
  185. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.js +0 -18706
  186. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.css +0 -7
  187. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.min.js +0 -13
  188. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.css +0 -886
  189. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.structure.min.css +0 -5
  190. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.css +0 -443
  191. data/spec/dummy/node_modules/jquery-ui-bundle/jquery-ui.theme.min.css +0 -5
  192. data/spec/dummy/node_modules/jquery-ui-bundle/package.json +0 -33
  193. data/spec/dummy/node_modules/jquery-ujs/CONTRIBUTING.md +0 -109
  194. data/spec/dummy/node_modules/jquery-ujs/MIT-LICENSE +0 -20
  195. data/spec/dummy/node_modules/jquery-ujs/README.md +0 -86
  196. data/spec/dummy/node_modules/jquery-ujs/RELEASE.md +0 -23
  197. data/spec/dummy/node_modules/jquery-ujs/bower.json +0 -19
  198. data/spec/dummy/node_modules/jquery-ujs/package.json +0 -26
  199. data/spec/dummy/node_modules/jquery-ujs/src/rails.js +0 -555
@@ -1,494 +0,0 @@
1
- define( [
2
- "./core",
3
- "./core/access",
4
- "./core/camelCase",
5
- "./core/nodeName",
6
- "./var/rcssNum",
7
- "./css/var/rnumnonpx",
8
- "./css/var/cssExpand",
9
- "./css/var/getStyles",
10
- "./css/var/swap",
11
- "./css/curCSS",
12
- "./css/adjustCSS",
13
- "./css/addGetHookIf",
14
- "./css/support",
15
- "./css/finalPropName",
16
-
17
- "./core/init",
18
- "./core/ready",
19
- "./selector" // contains
20
- ], function( jQuery, access, camelCase, nodeName, rcssNum, rnumnonpx, cssExpand,
21
- getStyles, swap, curCSS, adjustCSS, addGetHookIf, support, finalPropName ) {
22
-
23
- "use strict";
24
-
25
- var
26
-
27
- // Swappable if display is none or starts with table
28
- // except "table", "table-cell", or "table-caption"
29
- // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
30
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
31
- rcustomProp = /^--/,
32
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
33
- cssNormalTransform = {
34
- letterSpacing: "0",
35
- fontWeight: "400"
36
- };
37
-
38
- function setPositiveNumber( _elem, value, subtract ) {
39
-
40
- // Any relative (+/-) values have already been
41
- // normalized at this point
42
- var matches = rcssNum.exec( value );
43
- return matches ?
44
-
45
- // Guard against undefined "subtract", e.g., when used as in cssHooks
46
- Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
47
- value;
48
- }
49
-
50
- function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
51
- var i = dimension === "width" ? 1 : 0,
52
- extra = 0,
53
- delta = 0;
54
-
55
- // Adjustment may not be necessary
56
- if ( box === ( isBorderBox ? "border" : "content" ) ) {
57
- return 0;
58
- }
59
-
60
- for ( ; i < 4; i += 2 ) {
61
-
62
- // Both box models exclude margin
63
- if ( box === "margin" ) {
64
- delta += jQuery.css( elem, box + cssExpand[ i ], true, styles );
65
- }
66
-
67
- // If we get here with a content-box, we're seeking "padding" or "border" or "margin"
68
- if ( !isBorderBox ) {
69
-
70
- // Add padding
71
- delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
72
-
73
- // For "border" or "margin", add border
74
- if ( box !== "padding" ) {
75
- delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
76
-
77
- // But still keep track of it otherwise
78
- } else {
79
- extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
80
- }
81
-
82
- // If we get here with a border-box (content + padding + border), we're seeking "content" or
83
- // "padding" or "margin"
84
- } else {
85
-
86
- // For "content", subtract padding
87
- if ( box === "content" ) {
88
- delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
89
- }
90
-
91
- // For "content" or "padding", subtract border
92
- if ( box !== "margin" ) {
93
- delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
94
- }
95
- }
96
- }
97
-
98
- // Account for positive content-box scroll gutter when requested by providing computedVal
99
- if ( !isBorderBox && computedVal >= 0 ) {
100
-
101
- // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
102
- // Assuming integer scroll gutter, subtract the rest and round down
103
- delta += Math.max( 0, Math.ceil(
104
- elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
105
- computedVal -
106
- delta -
107
- extra -
108
- 0.5
109
-
110
- // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
111
- // Use an explicit zero to avoid NaN (gh-3964)
112
- ) ) || 0;
113
- }
114
-
115
- return delta;
116
- }
117
-
118
- function getWidthOrHeight( elem, dimension, extra ) {
119
-
120
- // Start with computed style
121
- var styles = getStyles( elem ),
122
-
123
- // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
124
- // Fake content-box until we know it's needed to know the true value.
125
- boxSizingNeeded = !support.boxSizingReliable() || extra,
126
- isBorderBox = boxSizingNeeded &&
127
- jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
128
- valueIsBorderBox = isBorderBox,
129
-
130
- val = curCSS( elem, dimension, styles ),
131
- offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );
132
-
133
- // Support: Firefox <=54
134
- // Return a confounding non-pixel value or feign ignorance, as appropriate.
135
- if ( rnumnonpx.test( val ) ) {
136
- if ( !extra ) {
137
- return val;
138
- }
139
- val = "auto";
140
- }
141
-
142
-
143
- // Support: IE 9 - 11 only
144
- // Use offsetWidth/offsetHeight for when box sizing is unreliable.
145
- // In those cases, the computed value can be trusted to be border-box.
146
- if ( ( !support.boxSizingReliable() && isBorderBox ||
147
-
148
- // Support: IE 10 - 11+, Edge 15 - 18+
149
- // IE/Edge misreport `getComputedStyle` of table rows with width/height
150
- // set in CSS while `offset*` properties report correct values.
151
- // Interestingly, in some cases IE 9 doesn't suffer from this issue.
152
- !support.reliableTrDimensions() && nodeName( elem, "tr" ) ||
153
-
154
- // Fall back to offsetWidth/offsetHeight when value is "auto"
155
- // This happens for inline elements with no explicit setting (gh-3571)
156
- val === "auto" ||
157
-
158
- // Support: Android <=4.1 - 4.3 only
159
- // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
160
- !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) &&
161
-
162
- // Make sure the element is visible & connected
163
- elem.getClientRects().length ) {
164
-
165
- isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
166
-
167
- // Where available, offsetWidth/offsetHeight approximate border box dimensions.
168
- // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
169
- // retrieved value as a content box dimension.
170
- valueIsBorderBox = offsetProp in elem;
171
- if ( valueIsBorderBox ) {
172
- val = elem[ offsetProp ];
173
- }
174
- }
175
-
176
- // Normalize "" and auto
177
- val = parseFloat( val ) || 0;
178
-
179
- // Adjust for the element's box model
180
- return ( val +
181
- boxModelAdjustment(
182
- elem,
183
- dimension,
184
- extra || ( isBorderBox ? "border" : "content" ),
185
- valueIsBorderBox,
186
- styles,
187
-
188
- // Provide the current computed size to request scroll gutter calculation (gh-3589)
189
- val
190
- )
191
- ) + "px";
192
- }
193
-
194
- jQuery.extend( {
195
-
196
- // Add in style property hooks for overriding the default
197
- // behavior of getting and setting a style property
198
- cssHooks: {
199
- opacity: {
200
- get: function( elem, computed ) {
201
- if ( computed ) {
202
-
203
- // We should always get a number back from opacity
204
- var ret = curCSS( elem, "opacity" );
205
- return ret === "" ? "1" : ret;
206
- }
207
- }
208
- }
209
- },
210
-
211
- // Don't automatically add "px" to these possibly-unitless properties
212
- cssNumber: {
213
- "animationIterationCount": true,
214
- "columnCount": true,
215
- "fillOpacity": true,
216
- "flexGrow": true,
217
- "flexShrink": true,
218
- "fontWeight": true,
219
- "gridArea": true,
220
- "gridColumn": true,
221
- "gridColumnEnd": true,
222
- "gridColumnStart": true,
223
- "gridRow": true,
224
- "gridRowEnd": true,
225
- "gridRowStart": true,
226
- "lineHeight": true,
227
- "opacity": true,
228
- "order": true,
229
- "orphans": true,
230
- "widows": true,
231
- "zIndex": true,
232
- "zoom": true
233
- },
234
-
235
- // Add in properties whose names you wish to fix before
236
- // setting or getting the value
237
- cssProps: {},
238
-
239
- // Get and set the style property on a DOM Node
240
- style: function( elem, name, value, extra ) {
241
-
242
- // Don't set styles on text and comment nodes
243
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
244
- return;
245
- }
246
-
247
- // Make sure that we're working with the right name
248
- var ret, type, hooks,
249
- origName = camelCase( name ),
250
- isCustomProp = rcustomProp.test( name ),
251
- style = elem.style;
252
-
253
- // Make sure that we're working with the right name. We don't
254
- // want to query the value if it is a CSS custom property
255
- // since they are user-defined.
256
- if ( !isCustomProp ) {
257
- name = finalPropName( origName );
258
- }
259
-
260
- // Gets hook for the prefixed version, then unprefixed version
261
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
262
-
263
- // Check if we're setting a value
264
- if ( value !== undefined ) {
265
- type = typeof value;
266
-
267
- // Convert "+=" or "-=" to relative numbers (#7345)
268
- if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
269
- value = adjustCSS( elem, name, ret );
270
-
271
- // Fixes bug #9237
272
- type = "number";
273
- }
274
-
275
- // Make sure that null and NaN values aren't set (#7116)
276
- if ( value == null || value !== value ) {
277
- return;
278
- }
279
-
280
- // If a number was passed in, add the unit (except for certain CSS properties)
281
- // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
282
- // "px" to a few hardcoded values.
283
- if ( type === "number" && !isCustomProp ) {
284
- value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
285
- }
286
-
287
- // background-* props affect original clone's values
288
- if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
289
- style[ name ] = "inherit";
290
- }
291
-
292
- // If a hook was provided, use that value, otherwise just set the specified value
293
- if ( !hooks || !( "set" in hooks ) ||
294
- ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
295
-
296
- if ( isCustomProp ) {
297
- style.setProperty( name, value );
298
- } else {
299
- style[ name ] = value;
300
- }
301
- }
302
-
303
- } else {
304
-
305
- // If a hook was provided get the non-computed value from there
306
- if ( hooks && "get" in hooks &&
307
- ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
308
-
309
- return ret;
310
- }
311
-
312
- // Otherwise just get the value from the style object
313
- return style[ name ];
314
- }
315
- },
316
-
317
- css: function( elem, name, extra, styles ) {
318
- var val, num, hooks,
319
- origName = camelCase( name ),
320
- isCustomProp = rcustomProp.test( name );
321
-
322
- // Make sure that we're working with the right name. We don't
323
- // want to modify the value if it is a CSS custom property
324
- // since they are user-defined.
325
- if ( !isCustomProp ) {
326
- name = finalPropName( origName );
327
- }
328
-
329
- // Try prefixed name followed by the unprefixed name
330
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
331
-
332
- // If a hook was provided get the computed value from there
333
- if ( hooks && "get" in hooks ) {
334
- val = hooks.get( elem, true, extra );
335
- }
336
-
337
- // Otherwise, if a way to get the computed value exists, use that
338
- if ( val === undefined ) {
339
- val = curCSS( elem, name, styles );
340
- }
341
-
342
- // Convert "normal" to computed value
343
- if ( val === "normal" && name in cssNormalTransform ) {
344
- val = cssNormalTransform[ name ];
345
- }
346
-
347
- // Make numeric if forced or a qualifier was provided and val looks numeric
348
- if ( extra === "" || extra ) {
349
- num = parseFloat( val );
350
- return extra === true || isFinite( num ) ? num || 0 : val;
351
- }
352
-
353
- return val;
354
- }
355
- } );
356
-
357
- jQuery.each( [ "height", "width" ], function( _i, dimension ) {
358
- jQuery.cssHooks[ dimension ] = {
359
- get: function( elem, computed, extra ) {
360
- if ( computed ) {
361
-
362
- // Certain elements can have dimension info if we invisibly show them
363
- // but it must have a current display style that would benefit
364
- return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
365
-
366
- // Support: Safari 8+
367
- // Table columns in Safari have non-zero offsetWidth & zero
368
- // getBoundingClientRect().width unless display is changed.
369
- // Support: IE <=11 only
370
- // Running getBoundingClientRect on a disconnected node
371
- // in IE throws an error.
372
- ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
373
- swap( elem, cssShow, function() {
374
- return getWidthOrHeight( elem, dimension, extra );
375
- } ) :
376
- getWidthOrHeight( elem, dimension, extra );
377
- }
378
- },
379
-
380
- set: function( elem, value, extra ) {
381
- var matches,
382
- styles = getStyles( elem ),
383
-
384
- // Only read styles.position if the test has a chance to fail
385
- // to avoid forcing a reflow.
386
- scrollboxSizeBuggy = !support.scrollboxSize() &&
387
- styles.position === "absolute",
388
-
389
- // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
390
- boxSizingNeeded = scrollboxSizeBuggy || extra,
391
- isBorderBox = boxSizingNeeded &&
392
- jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
393
- subtract = extra ?
394
- boxModelAdjustment(
395
- elem,
396
- dimension,
397
- extra,
398
- isBorderBox,
399
- styles
400
- ) :
401
- 0;
402
-
403
- // Account for unreliable border-box dimensions by comparing offset* to computed and
404
- // faking a content-box to get border and padding (gh-3699)
405
- if ( isBorderBox && scrollboxSizeBuggy ) {
406
- subtract -= Math.ceil(
407
- elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
408
- parseFloat( styles[ dimension ] ) -
409
- boxModelAdjustment( elem, dimension, "border", false, styles ) -
410
- 0.5
411
- );
412
- }
413
-
414
- // Convert to pixels if value adjustment is needed
415
- if ( subtract && ( matches = rcssNum.exec( value ) ) &&
416
- ( matches[ 3 ] || "px" ) !== "px" ) {
417
-
418
- elem.style[ dimension ] = value;
419
- value = jQuery.css( elem, dimension );
420
- }
421
-
422
- return setPositiveNumber( elem, value, subtract );
423
- }
424
- };
425
- } );
426
-
427
- jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
428
- function( elem, computed ) {
429
- if ( computed ) {
430
- return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
431
- elem.getBoundingClientRect().left -
432
- swap( elem, { marginLeft: 0 }, function() {
433
- return elem.getBoundingClientRect().left;
434
- } )
435
- ) + "px";
436
- }
437
- }
438
- );
439
-
440
- // These hooks are used by animate to expand properties
441
- jQuery.each( {
442
- margin: "",
443
- padding: "",
444
- border: "Width"
445
- }, function( prefix, suffix ) {
446
- jQuery.cssHooks[ prefix + suffix ] = {
447
- expand: function( value ) {
448
- var i = 0,
449
- expanded = {},
450
-
451
- // Assumes a single number if not a string
452
- parts = typeof value === "string" ? value.split( " " ) : [ value ];
453
-
454
- for ( ; i < 4; i++ ) {
455
- expanded[ prefix + cssExpand[ i ] + suffix ] =
456
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
457
- }
458
-
459
- return expanded;
460
- }
461
- };
462
-
463
- if ( prefix !== "margin" ) {
464
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
465
- }
466
- } );
467
-
468
- jQuery.fn.extend( {
469
- css: function( name, value ) {
470
- return access( this, function( elem, name, value ) {
471
- var styles, len,
472
- map = {},
473
- i = 0;
474
-
475
- if ( Array.isArray( name ) ) {
476
- styles = getStyles( elem );
477
- len = name.length;
478
-
479
- for ( ; i < len; i++ ) {
480
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
481
- }
482
-
483
- return map;
484
- }
485
-
486
- return value !== undefined ?
487
- jQuery.style( elem, name, value ) :
488
- jQuery.css( elem, name );
489
- }, name, value, arguments.length > 1 );
490
- }
491
- } );
492
-
493
- return jQuery;
494
- } );
@@ -1,162 +0,0 @@
1
- define( [
2
- "../core",
3
- "../core/camelCase",
4
- "../var/rnothtmlwhite",
5
- "./var/acceptData"
6
- ], function( jQuery, camelCase, rnothtmlwhite, acceptData ) {
7
-
8
- "use strict";
9
-
10
- function Data() {
11
- this.expando = jQuery.expando + Data.uid++;
12
- }
13
-
14
- Data.uid = 1;
15
-
16
- Data.prototype = {
17
-
18
- cache: function( owner ) {
19
-
20
- // Check if the owner object already has a cache
21
- var value = owner[ this.expando ];
22
-
23
- // If not, create one
24
- if ( !value ) {
25
- value = Object.create( null );
26
-
27
- // We can accept data for non-element nodes in modern browsers,
28
- // but we should not, see #8335.
29
- // Always return an empty object.
30
- if ( acceptData( owner ) ) {
31
-
32
- // If it is a node unlikely to be stringify-ed or looped over
33
- // use plain assignment
34
- if ( owner.nodeType ) {
35
- owner[ this.expando ] = value;
36
-
37
- // Otherwise secure it in a non-enumerable property
38
- // configurable must be true to allow the property to be
39
- // deleted when data is removed
40
- } else {
41
- Object.defineProperty( owner, this.expando, {
42
- value: value,
43
- configurable: true
44
- } );
45
- }
46
- }
47
- }
48
-
49
- return value;
50
- },
51
- set: function( owner, data, value ) {
52
- var prop,
53
- cache = this.cache( owner );
54
-
55
- // Handle: [ owner, key, value ] args
56
- // Always use camelCase key (gh-2257)
57
- if ( typeof data === "string" ) {
58
- cache[ camelCase( data ) ] = value;
59
-
60
- // Handle: [ owner, { properties } ] args
61
- } else {
62
-
63
- // Copy the properties one-by-one to the cache object
64
- for ( prop in data ) {
65
- cache[ camelCase( prop ) ] = data[ prop ];
66
- }
67
- }
68
- return cache;
69
- },
70
- get: function( owner, key ) {
71
- return key === undefined ?
72
- this.cache( owner ) :
73
-
74
- // Always use camelCase key (gh-2257)
75
- owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];
76
- },
77
- access: function( owner, key, value ) {
78
-
79
- // In cases where either:
80
- //
81
- // 1. No key was specified
82
- // 2. A string key was specified, but no value provided
83
- //
84
- // Take the "read" path and allow the get method to determine
85
- // which value to return, respectively either:
86
- //
87
- // 1. The entire cache object
88
- // 2. The data stored at the key
89
- //
90
- if ( key === undefined ||
91
- ( ( key && typeof key === "string" ) && value === undefined ) ) {
92
-
93
- return this.get( owner, key );
94
- }
95
-
96
- // When the key is not a string, or both a key and value
97
- // are specified, set or extend (existing objects) with either:
98
- //
99
- // 1. An object of properties
100
- // 2. A key and value
101
- //
102
- this.set( owner, key, value );
103
-
104
- // Since the "set" path can have two possible entry points
105
- // return the expected data based on which path was taken[*]
106
- return value !== undefined ? value : key;
107
- },
108
- remove: function( owner, key ) {
109
- var i,
110
- cache = owner[ this.expando ];
111
-
112
- if ( cache === undefined ) {
113
- return;
114
- }
115
-
116
- if ( key !== undefined ) {
117
-
118
- // Support array or space separated string of keys
119
- if ( Array.isArray( key ) ) {
120
-
121
- // If key is an array of keys...
122
- // We always set camelCase keys, so remove that.
123
- key = key.map( camelCase );
124
- } else {
125
- key = camelCase( key );
126
-
127
- // If a key with the spaces exists, use it.
128
- // Otherwise, create an array by matching non-whitespace
129
- key = key in cache ?
130
- [ key ] :
131
- ( key.match( rnothtmlwhite ) || [] );
132
- }
133
-
134
- i = key.length;
135
-
136
- while ( i-- ) {
137
- delete cache[ key[ i ] ];
138
- }
139
- }
140
-
141
- // Remove the expando if there's no more data
142
- if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
143
-
144
- // Support: Chrome <=35 - 45
145
- // Webkit & Blink performance suffers when deleting properties
146
- // from DOM nodes, so set to undefined instead
147
- // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
148
- if ( owner.nodeType ) {
149
- owner[ this.expando ] = undefined;
150
- } else {
151
- delete owner[ this.expando ];
152
- }
153
- }
154
- },
155
- hasData: function( owner ) {
156
- var cache = owner[ this.expando ];
157
- return cache !== undefined && !jQuery.isEmptyObject( cache );
158
- }
159
- };
160
-
161
- return Data;
162
- } );
@@ -1,19 +0,0 @@
1
- define( function() {
2
-
3
- "use strict";
4
-
5
- /**
6
- * Determines whether an object can have data
7
- */
8
- return function( owner ) {
9
-
10
- // Accepts only:
11
- // - Node
12
- // - Node.ELEMENT_NODE
13
- // - Node.DOCUMENT_NODE
14
- // - Object
15
- // - Any
16
- return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
17
- };
18
-
19
- } );
@@ -1,7 +0,0 @@
1
- define( [
2
- "../Data"
3
- ], function( Data ) {
4
- "use strict";
5
-
6
- return new Data();
7
- } );
@@ -1,7 +0,0 @@
1
- define( [
2
- "../Data"
3
- ], function( Data ) {
4
- "use strict";
5
-
6
- return new Data();
7
- } );