fomantic-ui 2.9.1-beta.28 → 2.9.1-beta.29
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.
- package/.eslintrc.js +0 -1
- package/.github/workflows/ci.yml +6 -0
- package/.prettierrc.js +12 -0
- package/.stylelintrc.js +13 -7
- package/README.md +1 -1
- package/dist/components/accordion.css +9 -21
- package/dist/components/accordion.js +3 -3
- package/dist/components/accordion.min.css +2 -2
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +2 -3
- package/dist/components/ad.min.css +2 -2
- package/dist/components/api.js +3 -3
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +336 -713
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +5 -10
- package/dist/components/calendar.js +3 -3
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +88 -201
- package/dist/components/card.min.css +2 -2
- package/dist/components/checkbox.css +35 -86
- package/dist/components/checkbox.js +3 -3
- package/dist/components/checkbox.min.css +2 -2
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +4 -8
- package/dist/components/comment.min.css +2 -2
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +20 -129
- package/dist/components/dimmer.js +3 -3
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +3 -6
- package/dist/components/divider.min.css +2 -2
- package/dist/components/dropdown.css +51 -149
- package/dist/components/dropdown.js +13 -7
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +2 -7
- package/dist/components/embed.js +3 -3
- package/dist/components/embed.min.css +2 -2
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +1 -2
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +7 -21
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +30 -71
- package/dist/components/flyout.js +3 -16
- package/dist/components/flyout.min.css +2 -2
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +32 -101
- package/dist/components/form.js +3 -3
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +72 -182
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +5 -11
- package/dist/components/header.min.css +2 -2
- package/dist/components/icon.css +37 -74
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +8 -21
- package/dist/components/image.min.css +2 -2
- package/dist/components/input.css +15 -50
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +13 -38
- package/dist/components/item.min.css +2 -2
- package/dist/components/label.css +18 -45
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +1 -7
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +21 -103
- package/dist/components/loader.min.css +2 -2
- package/dist/components/menu.css +49 -145
- package/dist/components/menu.min.css +1 -1
- package/dist/components/message.css +50 -114
- package/dist/components/message.min.css +2 -2
- package/dist/components/modal.css +20 -54
- package/dist/components/modal.js +3 -11
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +2 -5
- package/dist/components/nag.js +3 -3
- package/dist/components/nag.min.css +2 -2
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +7 -25
- package/dist/components/placeholder.min.css +2 -2
- package/dist/components/popup.css +68 -139
- package/dist/components/popup.js +16 -7
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +25 -120
- package/dist/components/progress.js +3 -3
- package/dist/components/progress.min.css +2 -2
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +2 -39
- package/dist/components/rating.js +3 -3
- package/dist/components/rating.min.css +2 -2
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +6 -11
- package/dist/components/reset.min.css +2 -2
- package/dist/components/reveal.css +26 -58
- package/dist/components/reveal.min.css +2 -2
- package/dist/components/search.css +8 -22
- package/dist/components/search.js +3 -3
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +32 -89
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +4 -16
- package/dist/components/shape.js +3 -15
- package/dist/components/shape.min.css +2 -2
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +59 -147
- package/dist/components/sidebar.js +3 -16
- package/dist/components/sidebar.min.css +2 -2
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -14
- package/dist/components/site.js +11 -38
- package/dist/components/site.min.css +2 -2
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +8 -26
- package/dist/components/slider.js +3 -3
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +3 -3
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +11 -43
- package/dist/components/statistic.min.css +2 -2
- package/dist/components/step.css +26 -89
- package/dist/components/step.min.css +2 -2
- package/dist/components/sticky.css +1 -5
- package/dist/components/sticky.js +3 -11
- package/dist/components/sticky.min.css +2 -2
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +3 -5
- package/dist/components/tab.js +3 -3
- package/dist/components/tab.min.css +2 -2
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +202 -409
- package/dist/components/table.min.css +2 -2
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +32 -108
- package/dist/components/toast.js +3 -3
- package/dist/components/toast.min.css +2 -2
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +264 -1312
- package/dist/components/transition.js +3 -3
- package/dist/components/transition.min.css +2 -2
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +3 -11
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +51 -3547
- package/dist/semantic.js +107 -181
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/fixed.html +1 -1
- package/examples/grid.html +1 -1
- package/package.json +2 -2
- package/src/definitions/behaviors/api.js +2 -2
- package/src/definitions/behaviors/form.js +2 -2
- package/src/definitions/behaviors/state.js +2 -2
- package/src/definitions/behaviors/visibility.js +2 -10
- package/src/definitions/collections/table.less +4 -0
- package/src/definitions/elements/button.less +7 -2
- package/src/definitions/elements/icon.less +2 -3
- package/src/definitions/elements/image.less +0 -4
- package/src/definitions/elements/loader.less +2 -0
- package/src/definitions/elements/segment.less +3 -1
- package/src/definitions/globals/site.js +10 -37
- package/src/definitions/modules/accordion.js +2 -2
- package/src/definitions/modules/calendar.js +2 -2
- package/src/definitions/modules/checkbox.js +2 -2
- package/src/definitions/modules/dimmer.js +2 -2
- package/src/definitions/modules/dimmer.less +2 -10
- package/src/definitions/modules/dropdown.js +12 -6
- package/src/definitions/modules/dropdown.less +1 -4
- package/src/definitions/modules/embed.js +2 -2
- package/src/definitions/modules/flyout.js +2 -15
- package/src/definitions/modules/flyout.less +0 -1
- package/src/definitions/modules/modal.js +2 -10
- package/src/definitions/modules/modal.less +0 -2
- package/src/definitions/modules/nag.js +2 -2
- package/src/definitions/modules/popup.js +15 -6
- package/src/definitions/modules/popup.less +2 -0
- package/src/definitions/modules/progress.js +2 -2
- package/src/definitions/modules/rating.js +2 -2
- package/src/definitions/modules/rating.less +2 -4
- package/src/definitions/modules/search.js +2 -2
- package/src/definitions/modules/search.less +0 -1
- package/src/definitions/modules/shape.js +2 -14
- package/src/definitions/modules/sidebar.js +2 -15
- package/src/definitions/modules/sidebar.less +0 -1
- package/src/definitions/modules/slider.js +2 -2
- package/src/definitions/modules/sticky.js +2 -10
- package/src/definitions/modules/sticky.less +0 -7
- package/src/definitions/modules/tab.js +2 -2
- package/src/definitions/modules/toast.js +2 -2
- package/src/definitions/modules/toast.less +3 -1
- package/src/definitions/modules/transition.js +2 -2
- package/src/definitions/views/card.less +4 -15
- package/src/semantic.less +6 -6
- package/src/themes/amazon/elements/button.variables +4 -9
- package/src/themes/bootstrap3/elements/button.variables +3 -7
- package/src/themes/classic/elements/button.variables +6 -12
- package/src/themes/classic/views/card.overrides +2 -4
- package/src/themes/colored/modules/checkbox.variables +1 -3
- package/src/themes/default/collections/form.variables +1 -2
- package/src/themes/default/collections/menu.variables +2 -4
- package/src/themes/default/collections/message.variables +38 -76
- package/src/themes/default/collections/table.variables +2 -4
- package/src/themes/default/elements/button.variables +6 -12
- package/src/themes/default/elements/flag.variables +3 -3
- package/src/themes/default/elements/icon.variables +5 -10
- package/src/themes/default/elements/input.variables +1 -2
- package/src/themes/default/elements/list.variables +3 -7
- package/src/themes/default/elements/placeholder.variables +12 -8
- package/src/themes/default/elements/segment.variables +5 -6
- package/src/themes/default/elements/step.variables +1 -2
- package/src/themes/default/globals/site.variables +41 -83
- package/src/themes/default/modules/accordion.variables +4 -8
- package/src/themes/default/modules/checkbox.variables +4 -8
- package/src/themes/default/modules/dimmer.variables +1 -3
- package/src/themes/default/modules/dropdown.variables +1 -2
- package/src/themes/default/modules/embed.variables +2 -5
- package/src/themes/default/modules/modal.variables +3 -6
- package/src/themes/default/modules/progress.variables +1 -2
- package/src/themes/default/modules/rating.variables +1 -2
- package/src/themes/default/modules/search.variables +3 -6
- package/src/themes/default/modules/shape.variables +1 -2
- package/src/themes/default/modules/slider.variables +3 -1
- package/src/themes/default/views/card.variables +8 -18
- package/src/themes/github/collections/form.variables +1 -2
- package/src/themes/github/collections/menu.variables +1 -2
- package/src/themes/github/collections/message.variables +2 -4
- package/src/themes/github/elements/button.variables +4 -8
- package/src/themes/github/elements/input.variables +1 -2
- package/src/themes/github/modules/dropdown.variables +1 -3
- package/src/themes/material/elements/button.variables +2 -4
- package/src/themes/material/elements/icon.variables +1 -2
- package/src/themes/pulsar/elements/loader.overrides +0 -38
- package/src/themes/raised/elements/button.variables +1 -2
- package/src/themes/round/elements/button.variables +1 -3
- package/src/themes/striped/modules/progress.overrides +11 -11
- package/tasks/README.md +2 -2
- package/tasks/admin/components/create.js +2 -2
- package/tasks/build/assets.js +1 -1
- package/tasks/build/css.js +1 -1
- package/tasks/build/javascript.js +1 -1
- package/tasks/build.js +2 -2
- package/tasks/collections/docs.js +1 -1
- package/tasks/collections/install.js +2 -2
- package/tasks/collections/various.js +1 -1
- package/tasks/config/admin/release.js +5 -5
- package/tasks/config/admin/templates/README.md +8 -8
- package/tasks/config/admin/templates/bower.json +3 -2
- package/tasks/config/admin/templates/component-package.js +3 -3
- package/tasks/config/admin/templates/package.json +5 -5
- package/tasks/config/tasks.js +15 -11
- package/tasks/docs/build.js +2 -2
- package/tasks/install.js +2 -3
- package/tasks/watch.js +1 -1
package/.eslintrc.js
CHANGED
@@ -115,7 +115,6 @@ module.exports = {
|
|
115
115
|
eqeqeq: 'off', // about 20 errors to be fixed manually
|
116
116
|
'global-require': 'off', // about 30 errors to be fixed manually
|
117
117
|
'no-shadow': 'off', // about 220 errors to be fixed manually
|
118
|
-
'no-shadow-restricted-names': 'off', // TODO https://github.com/fomantic/Fomantic-UI/pull/2604
|
119
118
|
'prefer-arrow-callback': 'off', // about 350 errors (all autofixable)
|
120
119
|
},
|
121
120
|
reportUnusedDisableDirectives: true,
|
package/.github/workflows/ci.yml
CHANGED
@@ -14,6 +14,12 @@ jobs:
|
|
14
14
|
run: yarn && yarn add -D eslint-config-airbnb-base eslint-plugin-unicorn eslint-plugin-jest@^26.9.0 @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript
|
15
15
|
- name: Lint JS and LESS files
|
16
16
|
run: npm run lint
|
17
|
+
- name: Assert LESS files formatting using Prettier
|
18
|
+
run: >
|
19
|
+
yarn add -D github:fomantic/prettier#2.8.1-patched
|
20
|
+
&& npx prettier --loglevel warn '!dist' '!test/coverage' '!src/semantic.less' '**/*.{css,less,overrides,variables}' --write
|
21
|
+
&& git restore package.json yarn.lock
|
22
|
+
&& git add . -N && git diff --exit-code
|
17
23
|
test:
|
18
24
|
name: Test build process on node ${{ matrix.node-version }}
|
19
25
|
runs-on: ubuntu-latest
|
package/.prettierrc.js
ADDED
package/.stylelintrc.js
CHANGED
@@ -11,31 +11,37 @@ module.exports = {
|
|
11
11
|
'at-rule-empty-line-before': null,
|
12
12
|
'at-rule-name-case': null,
|
13
13
|
'at-rule-no-unknown': null,
|
14
|
-
'block-closing-brace-newline-before': null, // fix bad formatting with "each()"
|
15
14
|
'color-function-notation': 'legacy',
|
16
15
|
'color-hex-case': 'lower',
|
17
|
-
'declaration-
|
16
|
+
'declaration-colon-newline-after': null, // handled by Prettier
|
18
17
|
'function-no-unknown': null,
|
19
|
-
|
18
|
+
'import-notation': null,
|
19
|
+
indentation: null, // handled by Prettier
|
20
20
|
linebreaks: 'unix',
|
21
21
|
'max-line-length': null,
|
22
22
|
'no-descending-specificity': null,
|
23
|
-
'no-extra-semicolons': null, //
|
23
|
+
'no-extra-semicolons': null, // handled by Prettier
|
24
24
|
'no-duplicate-selectors': null,
|
25
25
|
'number-max-precision': 5,
|
26
26
|
'property-case': null,
|
27
|
+
'property-no-vendor-prefix': [true, {
|
28
|
+
ignoreProperties: [
|
29
|
+
'background-clip', // https://caniuse.com/background-clip-text
|
30
|
+
'appearance', // https://caniuse.com/css-appearance
|
31
|
+
'backdrop-filter', // https://caniuse.com/css-backdrop-filter
|
32
|
+
'text-size-adjust', // https://caniuse.com/text-size-adjust
|
33
|
+
],
|
34
|
+
}],
|
27
35
|
'rule-empty-line-before': null,
|
28
36
|
'string-quotes': 'double',
|
29
37
|
'value-keyword-case': null,
|
30
38
|
|
31
39
|
// TODO rules to be removed/fixed in v2.10.0 as fixes are not compatible with IE11
|
32
40
|
'alpha-value-notation': 'number', // https://caniuse.com/mdn-css_properties_opacity_percentages
|
41
|
+
'selector-not-notation': null, // https://caniuse.com/css-not-sel-list
|
33
42
|
|
34
43
|
// TODO
|
35
|
-
'selector-not-notation': null, // 169 errors
|
36
|
-
'import-notation': null, // 56 errors
|
37
44
|
'keyframes-name-pattern': null, // 50 errors
|
38
|
-
'property-no-vendor-prefix': null, // 49 errors
|
39
45
|
'block-no-empty': null, // 25 errors
|
40
46
|
'selector-no-vendor-prefix': null, // 19 errors
|
41
47
|
'selector-class-pattern': null, // 19 errors
|
package/README.md
CHANGED
@@ -57,7 +57,7 @@ Fomantic includes an interactive installer to help setup your project.
|
|
57
57
|
* IE 11[^2]
|
58
58
|
* Microsoft Edge 12-44[^2]
|
59
59
|
|
60
|
-
[^1]: Fomantic-UI should basically still work in iOS Safari
|
60
|
+
[^1]: Fomantic-UI should basically still work in iOS Safari 9+, Android 6+, but, starting from v2.9.0, we won't support them anymore if anything works different than in recent versions.
|
61
61
|
[^2]: Fomantic-UI should basically still work in IE11 / old Edge, but, starting from v2.9.0, we won't support them anymore in terms of dedicated bugfixes.
|
62
62
|
|
63
63
|
---
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.29+70adac5 - Accordion
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -57,20 +57,15 @@
|
|
57
57
|
margin: 0 0.25rem 0 0;
|
58
58
|
padding: 0;
|
59
59
|
font-size: 1em;
|
60
|
-
-webkit-transition: opacity 0.1s ease, -webkit-transform 0.1s ease;
|
61
|
-
transition: opacity 0.1s ease, -webkit-transform 0.1s ease;
|
62
60
|
transition: transform 0.1s ease, opacity 0.1s ease;
|
63
|
-
transition: transform 0.1s ease, opacity 0.1s ease, -webkit-transform 0.1s ease;
|
64
61
|
vertical-align: baseline;
|
65
|
-
|
66
|
-
transform: none;
|
62
|
+
transform: none;
|
67
63
|
}
|
68
64
|
.ui.accordion .ui.header > .dropdown.icon.right,
|
69
65
|
.ui.accordion .title > .dropdown.icon.right,
|
70
66
|
.ui.accordion .accordion .title > .dropdown.icon.right {
|
71
67
|
float: right;
|
72
|
-
|
73
|
-
transform: rotate(180deg);
|
68
|
+
transform: rotate(180deg);
|
74
69
|
}
|
75
70
|
|
76
71
|
/* --------------
|
@@ -85,8 +80,7 @@
|
|
85
80
|
.ui.accordion.menu .item .title > .dropdown.icon {
|
86
81
|
float: right;
|
87
82
|
margin: 0 0.25rem 0 0;
|
88
|
-
|
89
|
-
transform: rotate(180deg);
|
83
|
+
transform: rotate(180deg);
|
90
84
|
}
|
91
85
|
|
92
86
|
/* Header */
|
@@ -104,12 +98,10 @@
|
|
104
98
|
.ui.accordion .accordion[open] > .title > .dropdown.icon,
|
105
99
|
.ui.accordion .active.title > .dropdown.icon,
|
106
100
|
.ui.accordion .accordion .active.title > .dropdown.icon {
|
107
|
-
|
108
|
-
transform: rotate(90deg);
|
101
|
+
transform: rotate(90deg);
|
109
102
|
}
|
110
103
|
.ui.accordion.menu .item .active.title > .dropdown.icon {
|
111
|
-
|
112
|
-
transform: rotate(90deg);
|
104
|
+
transform: rotate(90deg);
|
113
105
|
}
|
114
106
|
|
115
107
|
|
@@ -128,8 +120,7 @@
|
|
128
120
|
.ui.styled.accordion .accordion {
|
129
121
|
border-radius: 0.28571429rem;
|
130
122
|
background: #fff;
|
131
|
-
|
132
|
-
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15);
|
123
|
+
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(34, 36, 38, 0.15);
|
133
124
|
}
|
134
125
|
.ui.styled.accordion > .title,
|
135
126
|
.ui.styled.accordion .accordion > .title {
|
@@ -138,7 +129,6 @@
|
|
138
129
|
color: rgba(0, 0, 0, 0.4);
|
139
130
|
font-weight: bold;
|
140
131
|
border-top: 1px solid rgba(34, 36, 38, 0.15);
|
141
|
-
-webkit-transition: background 0.1s ease, color 0.1s ease;
|
142
132
|
transition: background 0.1s ease, color 0.1s ease;
|
143
133
|
}
|
144
134
|
.ui.styled.accordion > .title:first-child,
|
@@ -261,8 +251,7 @@
|
|
261
251
|
.ui.inverted.styled.accordion,
|
262
252
|
.ui.inverted.styled.accordion .accordion {
|
263
253
|
background: #1b1c1d;
|
264
|
-
|
265
|
-
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
|
254
|
+
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
|
266
255
|
}
|
267
256
|
.ui.inverted.styled.accordion > .title,
|
268
257
|
.ui.inverted.styled.accordion .accordion > .title {
|
@@ -294,8 +283,7 @@
|
|
294
283
|
.ui.basic.styled.accordion,
|
295
284
|
.ui.basic.styled.accordion .accordion {
|
296
285
|
background: transparent;
|
297
|
-
|
298
|
-
box-shadow: none;
|
286
|
+
box-shadow: none;
|
299
287
|
}
|
300
288
|
.ui.basic.styled.accordion > .title,
|
301
289
|
.ui.basic.styled.accordion .accordion > .title {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.29+70adac5 - Accordion
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -8,7 +8,7 @@
|
|
8
8
|
*
|
9
9
|
*/
|
10
10
|
|
11
|
-
(function ($, window, document
|
11
|
+
(function ($, window, document) {
|
12
12
|
'use strict';
|
13
13
|
|
14
14
|
function isFunction(obj) {
|
@@ -455,7 +455,7 @@
|
|
455
455
|
if (moduleSelector) {
|
456
456
|
title += ' \'' + moduleSelector + '\'';
|
457
457
|
}
|
458
|
-
if (
|
458
|
+
if (performance.length > 0) {
|
459
459
|
console.groupCollapsed(title);
|
460
460
|
if (console.table) {
|
461
461
|
console.table(performance);
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.29+70adac5 - Accordion
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
6
6
|
* Released under the MIT license
|
7
7
|
* https://opensource.org/licenses/MIT
|
8
8
|
*
|
9
|
-
*/.ui.accordion,.ui.accordion .accordion{max-width:100%}.ui.accordion .accordion{margin:1em 0 0;padding:0}.ui.accordion .accordion>.title,.ui.accordion.menu .item>.title,.ui.accordion>.title{cursor:pointer;padding:.5em 0;font-family:Lato,system-ui,-apple-system,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1em;color:rgba(0,0,0,.87);list-style:none;line-height:1}.ui.accordion:not(.styled) .accordion .title~.content,.ui.accordion:not(.styled) .title~.content{margin:"";padding:.5em 0 1em}.ui.accordion:not(.styled) .title~.content:last-child{padding-bottom:0}.ui.accordion .accordion .title>.dropdown.icon,.ui.accordion .title>.dropdown.icon,.ui.accordion .ui.header>.dropdown.icon{display:inline-block;float:none;opacity:1;width:1.25em;height:1em;margin:0 .25rem 0 0;padding:0;font-size:1em
|
9
|
+
*/.ui.accordion,.ui.accordion .accordion{max-width:100%}.ui.accordion .accordion{margin:1em 0 0;padding:0}.ui.accordion .accordion>.title,.ui.accordion.menu .item>.title,.ui.accordion>.title{cursor:pointer;padding:.5em 0;font-family:Lato,system-ui,-apple-system,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1em;color:rgba(0,0,0,.87);list-style:none;line-height:1}.ui.accordion:not(.styled) .accordion .title~.content,.ui.accordion:not(.styled) .title~.content{margin:"";padding:.5em 0 1em}.ui.accordion:not(.styled) .title~.content:last-child{padding-bottom:0}.ui.accordion .accordion .title>.dropdown.icon,.ui.accordion .title>.dropdown.icon,.ui.accordion .ui.header>.dropdown.icon{display:inline-block;float:none;opacity:1;width:1.25em;height:1em;margin:0 .25rem 0 0;padding:0;font-size:1em;transition:transform .1s ease,opacity .1s ease;vertical-align:baseline;transform:none}.ui.accordion .accordion .title>.dropdown.icon.right,.ui.accordion .title>.dropdown.icon.right,.ui.accordion .ui.header>.dropdown.icon.right{float:right;transform:rotate(180deg)}.ui.accordion.menu .item .title{display:block;padding:0}.ui.accordion.menu .item .title>.dropdown.icon{float:right;margin:0 .25rem 0 0;transform:rotate(180deg)}.ui.accordion .ui.header>.dropdown.icon{font-size:1em;margin:0 .25rem 0 0}.ui.accordion .accordion .active.title>.dropdown.icon,.ui.accordion .accordion[open]>.title>.dropdown.icon,.ui.accordion .active.title>.dropdown.icon,.ui.accordion[open]>.title>.dropdown.icon{transform:rotate(90deg)}.ui.accordion.menu .item .active.title>.dropdown.icon{transform:rotate(90deg)}.ui.styled.accordion{width:600px}.ui.styled.accordion,.ui.styled.accordion .accordion{border-radius:.28571429rem;background:#fff;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(34,36,38,.15)}.ui.styled.accordion .accordion>.title,.ui.styled.accordion>.title{margin:0;padding:.75em 1em;color:rgba(0,0,0,.4);font-weight:700;border-top:1px solid rgba(34,36,38,.15);transition:background .1s ease,color .1s ease}.ui.styled.accordion .accordion>.title:first-child,.ui.styled.accordion>.title:first-child{border-top:none}.ui.styled.accordion>.content{margin:0;padding:.5em 1em 1.5em}.ui.styled.accordion .accordion>.content{margin:0;padding:.5em 1em 1.5em}.ui.styled.accordion>.title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.styled.accordion .accordion>.title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.styled.accordion .active.title,.ui.styled.accordion[open]>.title{background:0 0;color:rgba(0,0,0,.95)}.ui.styled.accordion .accordion .active.title,.ui.styled.accordion .accordion[open]>.title{background:0 0;color:rgba(0,0,0,.95)}.ui.compact.accordion:not(.styled) .accordion>.title,.ui.compact.accordion:not(.styled)>.title{padding:.25em 0}.ui.compact.accordion:not(.styled) .accordion .title~.content,.ui.compact.accordion:not(.styled) .title~.content{padding:.25em 0 .5em}.ui.compact.styled.accordion .accordion>.title,.ui.compact.styled.accordion>.title{padding:.375em .5em}.ui.compact.styled.accordion .accordion .title~.content,.ui.compact.styled.accordion .title~.content{padding:.25em .5em .75em}.ui[class*="very compact"].accordion:not(.styled) .accordion>.title,.ui[class*="very compact"].accordion:not(.styled)>.title{padding:.125em 0}.ui[class*="very compact"].accordion:not(.styled) .accordion .title~.content,.ui[class*="very compact"].accordion:not(.styled) .title~.content{padding:.125em 0 .25em}.ui[class*="very compact"].styled.accordion .accordion>.title,.ui[class*="very compact"].styled.accordion>.title{padding:.1875em .25em}.ui[class*="very compact"].styled.accordion .accordion .title~.content,.ui[class*="very compact"].styled.accordion .title~.content{padding:.125em .25em .375em}.ui.accordion .accordion:not(details) .title~.content:not(.active),.ui.accordion:not(details) .title~.content:not(.active){display:none}.ui.fluid.accordion,.ui.fluid.accordion .accordion{width:100%}.ui.inverted.accordion .accordion>.title,.ui.inverted.accordion.menu .item>.title,.ui.inverted.accordion>.title{color:rgba(255,255,255,.9)}.ui.inverted.styled.accordion,.ui.inverted.styled.accordion .accordion{background:#1b1c1d;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(255,255,255,.1)}.ui.inverted.styled.accordion .accordion>.title,.ui.inverted.styled.accordion>.title{color:rgba(255,255,255,.5);border-top:1px solid rgba(255,255,255,.1)}.ui.inverted.styled.accordion>.title:hover{background:0 0;color:rgba(255,255,255,.9)}.ui.inverted.styled.accordion .accordion>.title:hover{background:0 0;color:rgba(255,255,255,.9)}.ui.inverted.styled.accordion .active.title,.ui.inverted.styled.accordion[open]>.title{background:0 0;color:#fff}.ui.inverted.styled.accordion .accordion .active.title,.ui.inverted.styled.accordion .accordion[open]>.title{background:0 0;color:#fff}.ui.basic.styled.accordion,.ui.basic.styled.accordion .accordion{background:0 0;box-shadow:none}.ui.basic.styled.accordion .accordion>.title,.ui.basic.styled.accordion>.title{border:none;color:rgba(0,0,0,.6)}.ui.basic.styled.accordion .accordion>.title:hover,.ui.basic.styled.accordion>.title:hover{background:0 0;color:rgba(0,0,0,.87)}.ui.basic.styled.accordion .accordion .active.title,.ui.basic.styled.accordion .accordion[open]>.title,.ui.basic.styled.accordion .active.title,.ui.basic.styled.accordion[open]>.title{background:0 0;color:rgba(0,0,0,.95)}.ui.inverted.basic.styled.accordion .accordion>.title,.ui.inverted.basic.styled.accordion>.title{background:0 0;color:rgba(255,255,255,.8)}.ui.inverted.basic.styled.accordion .accordion>.title:hover,.ui.inverted.basic.styled.accordion>.title:hover{background:0 0;color:rgba(255,255,255,.9)}.ui.inverted.basic.styled.accordion .accordion .active.title,.ui.inverted.basic.styled.accordion .accordion[open]>.title,.ui.inverted.basic.styled.accordion .active.title,.ui.inverted.basic.styled.accordion[open]>.title{background:0 0;color:#fff}.ui.tree.accordion:not(.styled) .accordion .title~.content,.ui.tree.accordion:not(.styled) .title~.content{padding:0}.ui.tree.accordion .accordion>.content,.ui.tree.accordion>.content{margin-left:1.7em}.ui.tree.accordion .accordion{margin-top:0}@font-face{font-family:Accordion;src:url(data:application/font-woff;base64,d09GRk9UVE8AAAREAAsAAAAABkAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAAC7AAAAQoAAAE/j/fxwUZGVE0AAAQUAAAAHAAAAByNqvxQR0RFRgAAA/gAAAAcAAAAIAAnABhPUy8yAAABYAAAAEIAAABgTadW5mNtYXAAAAKMAAAAUQAAAWAFZuKDaGVhZAAAAQgAAAAyAAAANg8zT8toaGVhAAABPAAAABoAAAAkApkA5mhtdHgAAAQwAAAAEwAAABYBtwASbWF4cAAAAVgAAAAGAAAABgAGUABuYW1lAAABpAAAAOYAAAGq/HAhWXBvc3QAAALgAAAADAAAACAAAwAAeJxjYGRgYADi8KWRsvH8Nl8ZuJkYQOD838XvQPT9hGxNIOXJsJ0xD0hzMIClARzsCcoAAHicY2BkYGB88P8BkGQAg+0wBhywAgBgjgOAAAAAAFAAAAYAAHicY2BmOM84gYGVgYHRhzGNgYHBHUp/ZZBkaGFABYwCSJyANNcUBgcGhg+3GB/8fwCUfMCgAFIDV6AAhIwARVcMJwAAeJx1jrFOwzAURU/SNKgFIVgQ6uSRKWolZjaQOnQBqQNb2lpRpMqW3HTowhew8U9I/BU37WOjtmyfd/3utYEbvsn4G7lxRsmtcc4FD8YD6U/GhfjNeMglybjU/DQeM+FHrqwY2QsnzrgSnTjnmnvjgfSpcSF+Nh5yx7txKf3DeMwjX31soqajJdCoqLs26HzFq9yz1WVS6Zv9tk5nmv8Vl0pI7CRHXThmVPofS592bQxuVk3PGF+Ohk6WRhHhGNO3eTbSVhy0z1mra6HV91YyxdC5xgevFL9xq4Obr+MixlDxC/HTOrsAAHicY2BgYGaAYBkGRgYQiALyGMF8FgY7IM3FwMHABISMDAofbv3/+/8/WJXCh5tgNuP/x2A+RC8bUC0DUB8rWIgNiJkY8AJm/NJDHgAALqoOxgAAAHicY2BmwAsAAH0ABHicPY7BSsNAEIZnkk2zlhg1JKAYxOrJi6RepMdC8SKefAJP4kVBzCtkNw7ZjeK1j9C38Rn6CO5CDrppigwMM8P/f/8gMAaIGL4+vD09PwJ6gLCwp2AnaM88e+7bQ0aRTxE7GcPRffJL9D9EIX2bW+sFOXzu5QD7OSwPcuA5Xiew05N8CIDDLiSQuTqGSVmU0/KqKG+Kxaxv8+llMURvHwBAgRJrfEeCEaLns9HdRxzHP/FqaV4yaptWK25SkwZKu4Va0rUSWjYVVbz7CqmqhZBSiNodqGqk5l2vFqrW1PJ4tWbGqZxVKa31htA6gmN2aTBwBobzuYsU1YYkGheyZVBqLjKKxn8cSmvuAAB4nGNgZGBg4AFiAQYJBiYgzQLEIJoRggEFbQBAAAAAAQAAAADeTO04AAAAAM/9o+4AAAAA32BrKXicY2BAAEYQsZ1BiIEBAAPpAMsA) format("woff");font-weight:400;font-style:normal}.ui.accordion .accordion .title>.dropdown.icon,.ui.accordion .title>.dropdown.icon,.ui.accordion .ui.header>.dropdown.icon{font-family:Accordion;line-height:1;-webkit-backface-visibility:hidden;backface-visibility:hidden;font-weight:400;font-style:normal;text-align:center}.ui.accordion .accordion .title>.dropdown.icon::before,.ui.accordion .title>.dropdown.icon::before,.ui.accordion .ui.header>.dropdown.icon::before{content:"\f0da"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.29+70adac5
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(k,T
|
11
|
+
!function(k,T){"use strict";T=void 0!==T&&T.Math===Math?T:globalThis,k.fn.accordion=function(v){var m,h=k(this),b=Date.now(),y=[],C=v,O="string"==typeof C,x=[].slice.call(arguments,1);return h.each(function(){var e,a=k.isPlainObject(v)?k.extend(!0,{},k.fn.accordion.settings,v):k.extend({},k.fn.accordion.settings),s=a.className,n=a.namespace,l=a.selector,r=a.error,i="."+n,t="module-"+n,o=h.selector||"",c=k(this),d=c.find(l.title),u=c.find(l.content),g=this,p=c.data(t),f={initialize:function(){f.debug("Initializing",c),f.bind.events(),a.observeChanges&&f.observeChanges(),f.instantiate()},instantiate:function(){p=f,c.data(t,f)},destroy:function(){f.debug("Destroying previous instance",c),c.off(i).removeData(t)},refresh:function(){d=c.find(l.title),u=c.find(l.content)},observeChanges:function(){"MutationObserver"in T&&((e=new MutationObserver(function(e){f.debug("DOM tree modified, updating selector cache"),f.refresh()})).observe(g,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",e))},bind:{events:function(){f.debug("Binding delegated events"),c.on(a.on+i,l.trigger,f.event.click)}},event:{click:function(e){0===k(e.target).closest(l.ignore).length&&f.toggle.call(this)}},toggle:function(e){var e=void 0!==e?"number"==typeof e?d.eq(e):k(e).closest(l.title):k(this).closest(l.title),n=e.next(u),i=n.hasClass(s.animating),n=n.hasClass(s.active),t=n&&!i,n=!n&&i;f.debug("Toggling visibility of content",e),t||n?a.collapsible?f.close.call(e):f.debug("Cannot close accordion content collapsing is disabled"):f.open.call(e)},open:function(e){var e=void 0!==e?"number"==typeof e?d.eq(e):k(e).closest(l.title):k(this).closest(l.title),n=e.next(u),i=n.hasClass(s.animating);n.hasClass(s.active)||i?f.debug("Accordion already open, skipping",n):(f.debug("Opening accordion content",e),a.onOpening.call(n),a.onChanging.call(n),a.exclusive&&f.closeOthers.call(e),e.addClass(s.active),n.stop(!0,!0).addClass(s.animating),a.animateChildren&&(void 0!==k.fn.transition&&c.transition("is supported")?n.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0,onComplete:function(){n.children().removeClass(s.transition)}}):n.children().stop(!0,!0).animate({opacity:1},a.duration,f.resetOpacity)),n.slideDown(a.duration,a.easing,function(){n.removeClass(s.animating).addClass(s.active),f.reset.display.call(this),a.onOpen.call(this),a.onChange.call(this)}))},close:function(e){var e=void 0!==e?"number"==typeof e?d.eq(e):k(e).closest(l.title):k(this).closest(l.title),n=e.next(u),i=n.hasClass(s.animating),t=n.hasClass(s.active);!t&&!(!t&&i)||t&&i||(f.debug("Closing accordion content",n),a.onClosing.call(n),a.onChanging.call(n),e.removeClass(s.active),n.stop(!0,!0).addClass(s.animating),a.animateChildren&&(void 0!==k.fn.transition&&c.transition("is supported")?n.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0}):n.children().stop(!0,!0).animate({opacity:0},a.duration,f.resetOpacity)),n.slideUp(a.duration,a.easing,function(){n.removeClass(s.animating).removeClass(s.active),f.reset.display.call(this),a.onClose.call(this),a.onChange.call(this)}))},closeOthers:function(e){var n,e=void 0!==e?d.eq(e):k(this).closest(l.title),i=e.parents(l.content).prev(l.title),e=e.closest(l.accordion),t=l.title+"."+s.active+":visible",o=l.content+"."+s.active+":visible",o=a.closeNested?(n=e.find(t).not(i)).next(u):(n=e.find(t).not(i),e=e.find(o).find(t).not(i),(n=n.not(e)).next(u));0<n.length&&(f.debug("Exclusive enabled, closing other content",n),n.removeClass(s.active),o.removeClass(s.animating).stop(!0,!0),a.animateChildren&&(void 0!==k.fn.transition&&c.transition("is supported")?o.children().transition({animation:"fade out",useFailSafe:!0,debug:a.debug,verbose:a.verbose,silent:a.silent,duration:a.duration,skipInlineHidden:!0}):o.children().stop(!0,!0).animate({opacity:0},a.duration,f.resetOpacity)),o.slideUp(a.duration,a.easing,function(){k(this).removeClass(s.active),f.reset.display.call(this)}))},reset:{display:function(){f.verbose("Removing inline display from element",this);var e=k(this);e.css("display",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")},opacity:function(){f.verbose("Removing inline opacity from element",this);var e=k(this);e.css("opacity",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")}},setting:function(e,n){if(f.debug("Changing setting",e,n),k.isPlainObject(e))k.extend(!0,a,e);else{if(void 0===n)return a[e];k.isPlainObject(a[e])?k.extend(!0,a[e],n):a[e]=n}},internal:function(e,n){if(f.debug("Changing internal",e,n),void 0===n)return f[e];k.isPlainObject(e)?k.extend(!0,f,e):f[e]=n},debug:function(){!a.silent&&a.debug&&(a.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,a.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),f.verbose.apply(console,arguments)))},error:function(){a.silent||(f.error=Function.prototype.bind.call(console.error,console,a.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var n,i;a.performance&&(i=(n=Date.now())-(b||n),b=n,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":i})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=a.name+":",i=0;b=!1,clearTimeout(f.performance.timer),k.each(y,function(e,n){i+=n["Execution Time"]}),e+=" "+i+"ms",o&&(e+=" '"+o+"'"),0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.each(y,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(t,e,n){var o,a,i,s,l=p;return e=e||x,n=n||g,"string"==typeof t&&void 0!==l&&(t=t.split(/[ .]/),o=t.length-1,k.each(t,function(e,n){var i=e!==o?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(k.isPlainObject(l[i])&&e!==o)l=l[i];else{if(void 0!==l[i])return a=l[i],!1;{if(!k.isPlainObject(l[n])||e===o)return void 0!==l[n]?a=l[n]:f.error(r.method,t),!1;l=l[n]}}})),"function"==typeof(s=a)&&"number"!=typeof s.nodeType?i=a.apply(n,e):void 0!==a&&(i=a),Array.isArray(m)?m.push(i):void 0!==m?m=[m,i]:void 0!==i&&(m=i),a}};O?(void 0===p&&f.initialize(),f.invoke(C)):(void 0!==p&&p.invoke("destroy"),f.initialize())}),void 0!==m?m:this},k.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating",transition:"transition"},selector:{accordion:".accordion",title:".title",trigger:".title",ignore:".ui.dropdown",content:".content"}},k.extend(k.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document);
|
package/dist/components/ad.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.29+70adac5 - Ad
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -238,8 +238,7 @@
|
|
238
238
|
left: 50%;
|
239
239
|
width: 100%;
|
240
240
|
text-align: center;
|
241
|
-
|
242
|
-
transform: translateX(-50%) translateY(-50%);
|
241
|
+
transform: translateX(-50%) translateY(-50%);
|
243
242
|
content: "Ad";
|
244
243
|
color: #fff;
|
245
244
|
font-size: 1em;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.29+70adac5 - Ad
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -7,4 +7,4 @@
|
|
7
7
|
* Released under the MIT license
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
|
-
*/.ui.ad{display:block;overflow:hidden;margin:1em 0}.ui.ad:first-child{margin:0}.ui.ad:last-child{margin:0}.ui.ad iframe{margin:0;padding:0;border:none;overflow:hidden}.ui.leaderboard.ad{width:728px;height:90px}.ui[class*="medium rectangle"].ad{width:300px;height:250px}.ui[class*="large rectangle"].ad{width:336px;height:280px}.ui[class*="half page"].ad{width:300px;height:600px}.ui.square.ad{width:250px;height:250px}.ui[class*="small square"].ad{width:200px;height:200px}.ui[class*="small rectangle"].ad{width:180px;height:150px}.ui[class*="vertical rectangle"].ad{width:240px;height:400px}.ui.button.ad{width:120px;height:90px}.ui[class*="square button"].ad{width:125px;height:125px}.ui[class*="small button"].ad{width:120px;height:60px}.ui.skyscraper.ad{width:120px;height:600px}.ui[class*="wide skyscraper"].ad{width:160px}.ui.banner.ad{width:468px;height:60px}.ui[class*="vertical banner"].ad{width:120px;height:240px}.ui[class*="top banner"].ad{width:930px;height:180px}.ui[class*="half banner"].ad{width:234px;height:60px}.ui[class*="large leaderboard"].ad{width:970px;height:90px}.ui.billboard.ad{width:970px;height:250px}.ui.panorama.ad{width:980px;height:120px}.ui.netboard.ad{width:580px;height:400px}.ui[class*="large mobile banner"].ad{width:320px;height:100px}.ui[class*="mobile leaderboard"].ad{width:320px;height:50px}.ui.mobile.ad{display:none}@media only screen and (max-width:767.98px){.ui.mobile.ad{display:block}}.ui.centered.ad{margin-left:auto;margin-right:auto}.ui.test.ad{position:relative;background:#545454}.ui.test.ad::after{position:absolute;top:50%;left:50%;width:100%;text-align:center
|
10
|
+
*/.ui.ad{display:block;overflow:hidden;margin:1em 0}.ui.ad:first-child{margin:0}.ui.ad:last-child{margin:0}.ui.ad iframe{margin:0;padding:0;border:none;overflow:hidden}.ui.leaderboard.ad{width:728px;height:90px}.ui[class*="medium rectangle"].ad{width:300px;height:250px}.ui[class*="large rectangle"].ad{width:336px;height:280px}.ui[class*="half page"].ad{width:300px;height:600px}.ui.square.ad{width:250px;height:250px}.ui[class*="small square"].ad{width:200px;height:200px}.ui[class*="small rectangle"].ad{width:180px;height:150px}.ui[class*="vertical rectangle"].ad{width:240px;height:400px}.ui.button.ad{width:120px;height:90px}.ui[class*="square button"].ad{width:125px;height:125px}.ui[class*="small button"].ad{width:120px;height:60px}.ui.skyscraper.ad{width:120px;height:600px}.ui[class*="wide skyscraper"].ad{width:160px}.ui.banner.ad{width:468px;height:60px}.ui[class*="vertical banner"].ad{width:120px;height:240px}.ui[class*="top banner"].ad{width:930px;height:180px}.ui[class*="half banner"].ad{width:234px;height:60px}.ui[class*="large leaderboard"].ad{width:970px;height:90px}.ui.billboard.ad{width:970px;height:250px}.ui.panorama.ad{width:980px;height:120px}.ui.netboard.ad{width:580px;height:400px}.ui[class*="large mobile banner"].ad{width:320px;height:100px}.ui[class*="mobile leaderboard"].ad{width:320px;height:50px}.ui.mobile.ad{display:none}@media only screen and (max-width:767.98px){.ui.mobile.ad{display:block}}.ui.centered.ad{margin-left:auto;margin-right:auto}.ui.test.ad{position:relative;background:#545454}.ui.test.ad::after{position:absolute;top:50%;left:50%;width:100%;text-align:center;transform:translateX(-50%) translateY(-50%);content:"Ad";color:#fff;font-size:1em;font-weight:700}.ui.mobile.test.ad::after{font-size:.85714286em}.ui.test.ad[data-text]::after{content:attr(data-text)}
|
package/dist/components/api.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.29+70adac5 - API
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -8,7 +8,7 @@
|
|
8
8
|
*
|
9
9
|
*/
|
10
10
|
|
11
|
-
(function ($, window, document
|
11
|
+
(function ($, window, document) {
|
12
12
|
'use strict';
|
13
13
|
|
14
14
|
function isWindow(obj) {
|
@@ -977,7 +977,7 @@
|
|
977
977
|
if (moduleSelector) {
|
978
978
|
title += ' \'' + moduleSelector + '\'';
|
979
979
|
}
|
980
|
-
if (
|
980
|
+
if (performance.length > 0) {
|
981
981
|
console.groupCollapsed(title);
|
982
982
|
if (console.table) {
|
983
983
|
console.table(performance);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.29+70adac5
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(O,P,j,C){"use strict";function E(e){return null!==e&&e===e.window}function F(e){return"function"==typeof e&&"number"!=typeof e.nodeType}P=P!==C&&P.Math===Math?P:globalThis,O.fn.api=function(q){var x,e=F(this)?O(P):O(this),A=e.selector||"",k=Date.now(),S=[],T=q,w="string"==typeof T,D=[].slice.call(arguments,1);return e.each(function(){var a,n,r,e,s,o,f=O.isPlainObject(q)?O.extend(!0,{},O.fn.api.settings,q):O.extend({},O.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,p="module-"+t,g=O(this),m=g.closest(u.form),b=f.stateContext?[P,j].indexOf(f.stateContext)<0?O(j).find(f.stateContext):O(f.stateContext):g,v=this,h=b[0],y=g.data(p),R={initialize:function(){w||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,g.data(p,y)},destroy:function(){R.verbose("Destroying previous module for",v),g.removeData(p).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),g.on(e+l,R.event.trigger)):"now"===f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(e!==C&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(P.Storage!==C)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){P.Storage===C?R.error(c.noStorage):(O.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&O.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,a=O.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",a.url),R.verbose("Using AJAX settings",a),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,a.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<g.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return g.is("form")||b.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return g.is("input")},loading:function(){return!!R.request&&"pending"===R.request.state()},abortedRequest:function(e){return e&&e.readyState!==C&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&F(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"===R.request.state()},failure:function(){return R.request&&"rejected"===R.request.state()},complete:function(){return R.request&&("resolved"===R.request.state()||"rejected"===R.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),a=a||f.urlData,e&&(R.debug("Looking for required URL variables",e),O.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=O.isPlainObject(a)&&a[r]!==C?a[r]:g.data(r)!==C?g.data(r):b.data(r)!==C?b.data(r):a[r];if(n===C)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),O.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=O.isPlainObject(a)&&a[r]!==C?a[r]:g.data(r)!==C?g.data(r):b.data(r)!==C?b.data(r):a[r];o=n!==C?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=O.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=f.processData!==C&&f.processData,f.contentType=f.contentType!==C&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},O.each(O('input[type="file"]',m),function(e,r){O.each(O(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),O.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r="checkbox"===O('[name="'+t.name+'"]',m).attr("type"),n=parseFloat(t.value),o=r&&"on"===t.value||"true"===t.value||(String(n)===t.value?n:"false"!==t.value&&t.value),a=t.name.match(f.regExp.key)||[],s=t.name.replace(/\[]$/,"");s in u?Array.isArray(c[s])?c[s].push(o):c[s]=[c[s],o]:(u[s]=0,c[s]=o),-1===s.indexOf("[]")&&(o=c[s]);for(;0<a.length;){var i=a.pop();""!==i||Array.isArray(o)?f.regExp.fixed.test(i)?o=d([],i,o):f.regExp.named.test(i)&&(o=d({},i,o)):o=d([],u[s]++,o)}l=O.extend(!0,l,o)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(O.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):O.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=Date.now()-s,o=f.loadingDuration-o,a=!!F(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,O.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;a&&(R.debug("Modified API response in onResponse callback",f.onResponse,a,e),e=a),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=Date.now()-s,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,g,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,g,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"===t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,g,e),!0;"invalid"===t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"===t&&e!==C&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&r!==C&&""!==r&&R.error(c.statusMessage+r,a.url),f.onError.call(h,o,g,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,g,e)}}},create:{request:function(){return O.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=O.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=F(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):F(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=O.ajax(a).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,a),e}},set:{error:function(){R.verbose("Adding error state to element",b),b.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",b),b.addClass(d.loading),s=Date.now()}},remove:{error:function(){R.verbose("Removing error state from element",b),b.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",b),b.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!O.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return O.isPlainObject(e)&&e.error!==C?e.error:f.error[t]!==C?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(g,f);return e&&(e.success!==C&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==C&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==C&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===C&&R.error(c.noReturnedValue),!1===e?e:e!==C?O.extend(!0,{},e):O.extend(!0,{},f)},urlEncodedValue:function(e){var t=P.decodeURIComponent(e),r=P.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return E(v)||(R.is.input()?e.value=g.val():R.is.form()||(e.text=g.text())),e},event:function(){return E(v)||"now"===f.on?(R.debug("API called without element, no events attached"),!1):"auto"===f.on?g.is("input")?v.oninput!==C?"input":v.onpropertychange!==C?"propertychange":"keyup":g.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||f.action||g.data(i.action)||!1,r=f.url||g.data(i.url)||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),f.api[e]===C&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=g.attr("action")||b.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),O.isPlainObject(e))O.extend(!0,f,e);else{if(t===C)return f[e];O.isPlainObject(f[e])?O.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,R,e);else{if(t===C)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=Date.now())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;k=!1,clearTimeout(R.performance.timer),O.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",A&&(e+=" '"+A+"'"),(console.group!==C||console.table!==C)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):O.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var o,a,r,s=y;return e=e||D,t=t||v,"string"==typeof n&&s!==C&&(n=n.split(/[ .]/),o=n.length-1,O.each(n,function(e,t){var r=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(O.isPlainObject(s[r])&&e!==o)s=s[r];else{if(s[r]!==C)return a=s[r],!1;{if(!O.isPlainObject(s[t])||e===o)return s[t]!==C?a=s[t]:R.error(c.method,n),!1;s=s[t]}}})),F(a)?r=a.apply(t,e):a!==C&&(r=a),Array.isArray(x)?x.push(r):x!==C?x=[x,r]:r!==C&&(x=r),a}};w?(y===C&&R.initialize(),R.invoke(T)):(y!==C&&y.invoke("destroy"),R.initialize())}),x!==C?x:this},O.api=O.fn.api,O.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/{\$*[\da-z]+}/gi,optional:/{\/\$*[\da-z]+}/gi,validate:/^[_a-z][\w-]*(?:\[[\w-]*])*$/i,key:/[\w-]+|(?=\[])/gi,push:/^$/,fixed:/^\d+$/,named:/^[\w-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document);
|
11
|
+
!function(O,P,j){"use strict";function C(e){return null!==e&&e===e.window}function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}P=void 0!==P&&P.Math===Math?P:globalThis,O.fn.api=function(q){var x,e=E(this)?O(P):O(this),A=e.selector||"",k=Date.now(),S=[],T=q,w="string"==typeof T,D=[].slice.call(arguments,1);return e.each(function(){var a,n,r,e,s,o,f=O.isPlainObject(q)?O.extend(!0,{},O.fn.api.settings,q):O.extend({},O.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,p="module-"+t,g=O(this),m=g.closest(u.form),v=f.stateContext?[P,j].indexOf(f.stateContext)<0?O(j).find(f.stateContext):O(f.stateContext):g,b=this,h=v[0],y=g.data(p),R={initialize:function(){w||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,g.data(p,y)},destroy:function(){R.verbose("Destroying previous module for",b),g.removeData(p).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),g.on(e+l,R.event.trigger)):"now"===f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(void 0!==P.Storage)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){void 0===P.Storage?R.error(c.noStorage):(O.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&O.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,a=O.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",a.url),R.verbose("Using AJAX settings",a),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,a.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<g.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return g.is("form")||v.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return g.is("input")},loading:function(){return!!R.request&&"pending"===R.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&E(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"===R.request.state()},failure:function(){return R.request&&"rejected"===R.request.state()},complete:function(){return R.request&&("resolved"===R.request.state()||"rejected"===R.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),a=a||f.urlData,e&&(R.debug("Looking for required URL variables",e),O.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=O.isPlainObject(a)&&void 0!==a[r]?a[r]:void 0!==g.data(r)?g.data(r):void 0!==v.data(r)?v.data(r):a[r];if(void 0===n)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),O.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=O.isPlainObject(a)&&void 0!==a[r]?a[r]:void 0!==g.data(r)?g.data(r):void 0!==v.data(r)?v.data(r):a[r];o=void 0!==n?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=O.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},O.each(O('input[type="file"]',m),function(e,r){O.each(O(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),O.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r="checkbox"===O('[name="'+t.name+'"]',m).attr("type"),n=parseFloat(t.value),o=r&&"on"===t.value||"true"===t.value||(String(n)===t.value?n:"false"!==t.value&&t.value),a=t.name.match(f.regExp.key)||[],s=t.name.replace(/\[]$/,"");s in u?Array.isArray(c[s])?c[s].push(o):c[s]=[c[s],o]:(u[s]=0,c[s]=o),-1===s.indexOf("[]")&&(o=c[s]);for(;0<a.length;){var i=a.pop();""!==i||Array.isArray(o)?f.regExp.fixed.test(i)?o=d([],i,o):f.regExp.named.test(i)&&(o=d({},i,o)):o=d([],u[s]++,o)}l=O.extend(!0,l,o)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(O.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):O.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=Date.now()-s,o=f.loadingDuration-o,a=!!E(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,O.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;a&&(R.debug("Modified API response in onResponse callback",f.onResponse,a,e),e=a),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=Date.now()-s,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,g,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,g,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"===t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,g,e),!0;"invalid"===t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"===t&&void 0!==e&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&void 0!==r&&""!==r&&R.error(c.statusMessage+r,a.url),f.onError.call(h,o,g,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,g,e)}}},create:{request:function(){return O.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=O.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=E(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):E(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=O.ajax(a).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,a),e}},set:{error:function(){R.verbose("Adding error state to element",v),v.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",v),v.addClass(d.loading),s=Date.now()}},remove:{error:function(){R.verbose("Removing error state from element",v),v.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",v),v.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!O.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return O.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==f.error[t]?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(g,f);return e&&(void 0!==e.success&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),void 0!==e.failure&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),void 0!==e.complete&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),void 0===e&&R.error(c.noReturnedValue),!1===e?e:void 0!==e?O.extend(!0,{},e):O.extend(!0,{},f)},urlEncodedValue:function(e){var t=P.decodeURIComponent(e),r=P.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return C(b)||(R.is.input()?e.value=g.val():R.is.form()||(e.text=g.text())),e},event:function(){return C(b)||"now"===f.on?(R.debug("API called without element, no events attached"),!1):"auto"===f.on?g.is("input")?void 0!==b.oninput?"input":void 0!==b.onpropertychange?"propertychange":"keyup":g.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||f.action||g.data(i.action)||!1,r=f.url||g.data(i.url)||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),void 0===f.api[e]&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=g.attr("action")||v.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),O.isPlainObject(e))O.extend(!0,f,e);else{if(void 0===t)return f[e];O.isPlainObject(f[e])?O.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,R,e);else{if(void 0===t)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=Date.now())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;k=!1,clearTimeout(R.performance.timer),O.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",A&&(e+=" '"+A+"'"),0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):O.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var o,a,r,s=y;return e=e||D,t=t||b,"string"==typeof n&&void 0!==s&&(n=n.split(/[ .]/),o=n.length-1,O.each(n,function(e,t){var r=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(O.isPlainObject(s[r])&&e!==o)s=s[r];else{if(void 0!==s[r])return a=s[r],!1;{if(!O.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:R.error(c.method,n),!1;s=s[t]}}})),E(a)?r=a.apply(t,e):void 0!==a&&(r=a),Array.isArray(x)?x.push(r):void 0!==x?x=[x,r]:void 0!==r&&(x=r),a}};w?(void 0===y&&R.initialize(),R.invoke(T)):(void 0!==y&&y.invoke("destroy"),R.initialize())}),void 0!==x?x:this},O.api=O.fn.api,O.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/{\$*[\da-z]+}/gi,optional:/{\/\$*[\da-z]+}/gi,validate:/^[_a-z][\w-]*(?:\[[\w-]*])*$/i,key:/[\w-]+|(?=\[])/gi,push:/^$/,fixed:/^\d+$/,named:/^[\w-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document);
|