fomantic-ui 2.9.3-beta.8 → 2.9.3
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/.all-contributorsrc +2 -2
- package/.github/FUNDING.yml +1 -1
- package/.github/auto_assign.yml +1 -1
- package/.github/workflows/ci.yml +5 -5
- package/.github/workflows/nightly.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/CHANGELOG.md +131 -0
- package/CONTRIBUTORS.md +1 -1
- package/README.md +5 -2
- package/SECURITY.md +2 -1
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +2 -2
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +10 -9
- 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 +2 -2
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +140 -3
- package/dist/components/calendar.js +2 -2
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +50 -6
- package/dist/components/checkbox.js +5 -3
- package/dist/components/checkbox.min.css +2 -2
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +6 -1
- package/dist/components/comment.min.css +2 -2
- package/dist/components/container.css +62 -1
- package/dist/components/container.min.css +2 -2
- package/dist/components/dimmer.css +3 -3
- package/dist/components/dimmer.js +2 -2
- package/dist/components/dimmer.min.css +2 -2
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +101 -25
- package/dist/components/dropdown.js +29 -21
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +2 -2
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +697 -249
- package/dist/components/emoji.min.css +2 -2
- package/dist/components/feed.css +486 -5
- package/dist/components/feed.min.css +2 -2
- package/dist/components/flag.css +3 -2
- package/dist/components/flag.min.css +2 -2
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +2 -33
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +34 -32
- package/dist/components/form.js +72 -31
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +107 -107
- package/dist/components/grid.min.css +2 -2
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +62 -62
- package/dist/components/icon.min.css +2 -2
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +3 -27
- package/dist/components/input.min.css +2 -2
- package/dist/components/item.css +6 -1
- package/dist/components/item.min.css +2 -2
- package/dist/components/label.css +21 -2
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +13 -13
- package/dist/components/list.min.css +2 -2
- package/dist/components/loader.css +282 -282
- package/dist/components/loader.min.css +2 -2
- package/dist/components/menu.css +13 -7
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +5 -1
- package/dist/components/modal.js +3 -3
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +3 -3
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +3 -3
- package/dist/components/popup.js +11 -9
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +2 -2
- package/dist/components/progress.min.css +1 -1
- 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 +1 -1
- package/dist/components/rating.js +2 -2
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +26 -1
- package/dist/components/search.js +5 -4
- package/dist/components/search.min.css +2 -2
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +159 -33
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +2 -2
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +2 -32
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +2 -2
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +126 -26
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +2 -2
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +2 -2
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +6 -4
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +65 -1
- 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 +6 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toast.min.css +2 -2
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +3 -3
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +2 -2
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +2822 -954
- package/dist/semantic.js +302 -206
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +5 -4
- package/scripts/nightly-version.js +2 -2
- package/src/definitions/behaviors/api.js +9 -8
- package/src/definitions/behaviors/form.js +71 -30
- package/src/definitions/behaviors/state.js +1 -1
- package/src/definitions/behaviors/visibility.js +1 -1
- package/src/definitions/collections/form.less +9 -14
- package/src/definitions/collections/grid.less +106 -106
- package/src/definitions/collections/menu.less +29 -22
- package/src/definitions/collections/table.less +66 -0
- package/src/definitions/elements/button.less +1 -1
- package/src/definitions/elements/container.less +63 -0
- package/src/definitions/elements/icon.less +5 -5
- package/src/definitions/elements/input.less +2 -2
- package/src/definitions/elements/label.less +21 -1
- package/src/definitions/elements/list.less +13 -13
- package/src/definitions/elements/loader.less +71 -71
- package/src/definitions/elements/segment.less +110 -13
- package/src/definitions/globals/site.js +1 -1
- package/src/definitions/modules/accordion.js +1 -1
- package/src/definitions/modules/calendar.js +1 -1
- package/src/definitions/modules/calendar.less +40 -11
- package/src/definitions/modules/checkbox.js +4 -2
- package/src/definitions/modules/checkbox.less +61 -5
- package/src/definitions/modules/dimmer.js +1 -1
- package/src/definitions/modules/dimmer.less +2 -2
- package/src/definitions/modules/dropdown.js +28 -20
- package/src/definitions/modules/dropdown.less +124 -21
- package/src/definitions/modules/embed.js +1 -1
- package/src/definitions/modules/flyout.js +1 -32
- package/src/definitions/modules/modal.js +2 -2
- package/src/definitions/modules/modal.less +6 -0
- package/src/definitions/modules/nag.js +2 -2
- package/src/definitions/modules/popup.js +10 -8
- package/src/definitions/modules/popup.less +4 -4
- package/src/definitions/modules/progress.js +1 -1
- package/src/definitions/modules/rating.js +1 -1
- package/src/definitions/modules/search.js +4 -3
- package/src/definitions/modules/search.less +31 -0
- package/src/definitions/modules/shape.js +1 -1
- package/src/definitions/modules/sidebar.js +1 -31
- package/src/definitions/modules/slider.js +125 -25
- package/src/definitions/modules/sticky.js +1 -1
- package/src/definitions/modules/tab.js +5 -3
- package/src/definitions/modules/toast.js +1 -1
- package/src/definitions/modules/toast.less +7 -0
- package/src/definitions/modules/transition.js +2 -2
- package/src/definitions/views/comment.less +7 -0
- package/src/definitions/views/feed.less +238 -32
- package/src/definitions/views/item.less +7 -0
- package/src/theme.less +1 -1
- package/src/themes/amazon/elements/button.variables +5 -1
- package/src/themes/bootstrap3/elements/button.variables +5 -1
- package/src/themes/chubby/elements/header.variables +6 -1
- package/src/themes/default/collections/message.variables +3 -9
- package/src/themes/default/collections/table.variables +11 -8
- package/src/themes/default/elements/button.variables +8 -10
- package/src/themes/default/elements/container.variables +3 -0
- package/src/themes/default/elements/emoji.variables +179 -67
- package/src/themes/default/elements/flag.variables +1 -1
- package/src/themes/default/elements/label.variables +6 -1
- package/src/themes/default/elements/segment.variables +8 -0
- package/src/themes/default/globals/site.variables +362 -341
- package/src/themes/default/globals/variation.variables +24 -1
- package/src/themes/default/modules/calendar.variables +11 -0
- package/src/themes/default/modules/checkbox.variables +12 -0
- package/src/themes/default/modules/dropdown.variables +10 -4
- package/src/themes/default/modules/modal.variables +3 -0
- package/src/themes/default/modules/popup.variables +1 -1
- package/src/themes/default/modules/search.variables +3 -0
- package/src/themes/default/modules/toast.variables +6 -5
- package/src/themes/default/views/card.variables +4 -12
- package/src/themes/default/views/feed.variables +55 -1
- package/src/themes/default/views/item.variables +5 -5
- package/src/themes/flat/collections/form.variables +4 -4
- package/src/themes/flat/globals/site.variables +1 -1
- package/src/themes/github/elements/button.variables +5 -1
- package/src/themes/joypixels/elements/emoji.variables +182 -70
- package/src/themes/material/globals/site.variables +1 -1
- package/src/themes/twitter/elements/button.variables +5 -1
- package/src/themes/twitter/elements/emoji.variables +178 -66
- package/tasks/admin/components/create.js +1 -2
- package/tasks/admin/components/init.js +3 -4
- package/tasks/admin/components/update.js +2 -3
- package/tasks/admin/distributions/create.js +9 -5
- package/tasks/admin/distributions/init.js +3 -4
- package/tasks/admin/distributions/update.js +2 -3
- package/tasks/config/project/install.js +3 -0
- package/tasks/config/tasks.js +1 -8
- package/tasks/config/user.js +1 -1
- package/tasks/docs/build.js +2 -2
- package/tasks/docs/metadata.js +1 -1
- package/tasks/docs/serve.js +1 -1
- package/tasks/install.js +19 -10
- package/tasks/watch.js +1 -2
- package/types/fomantic-ui-accordion.d.ts +244 -0
- package/types/fomantic-ui-api.d.ts +555 -0
- package/types/fomantic-ui-calendar.d.ts +766 -0
- package/types/fomantic-ui-checkbox.d.ts +332 -0
- package/types/fomantic-ui-dimmer.d.ts +408 -0
- package/types/fomantic-ui-dropdown.d.ts +1183 -0
- package/types/fomantic-ui-embed.d.ts +326 -0
- package/types/fomantic-ui-flyout.d.ts +525 -0
- package/types/fomantic-ui-form.d.ts +651 -0
- package/types/fomantic-ui-modal.d.ts +471 -0
- package/types/fomantic-ui-nag.d.ts +270 -0
- package/types/fomantic-ui-popup.d.ts +523 -0
- package/types/fomantic-ui-progress.d.ts +459 -0
- package/types/fomantic-ui-rating.d.ts +187 -0
- package/types/fomantic-ui-search.d.ts +496 -0
- package/types/fomantic-ui-shape.d.ts +274 -0
- package/types/fomantic-ui-sidebar.d.ts +402 -0
- package/types/fomantic-ui-slider.d.ts +316 -0
- package/types/fomantic-ui-sticky.d.ts +215 -0
- package/types/fomantic-ui-tab.d.ts +361 -0
- package/types/fomantic-ui-tests.ts +25 -0
- package/types/fomantic-ui-toast.d.ts +514 -0
- package/types/fomantic-ui-transition.d.ts +355 -0
- package/types/fomantic-ui-visibility.d.ts +355 -0
- package/types/index.d.ts +63 -0
- package/types/tsconfig.json +23 -0
- package/types/tslint.json +1 -0
package/.all-contributorsrc
CHANGED
@@ -10,10 +10,10 @@
|
|
10
10
|
"commitConvention": "angular",
|
11
11
|
"contributors": [
|
12
12
|
{
|
13
|
-
"login": "
|
13
|
+
"login": "y0hami",
|
14
14
|
"name": "Sean",
|
15
15
|
"avatar_url": "https://avatars2.githubusercontent.com/u/11588822?v=4",
|
16
|
-
"profile": "https://github.com/
|
16
|
+
"profile": "https://github.com/y0hami",
|
17
17
|
"contributions": [
|
18
18
|
"question",
|
19
19
|
"bug",
|
package/.github/FUNDING.yml
CHANGED
package/.github/auto_assign.yml
CHANGED
package/.github/workflows/ci.yml
CHANGED
@@ -8,15 +8,15 @@ jobs:
|
|
8
8
|
name: Lint
|
9
9
|
runs-on: ubuntu-latest
|
10
10
|
steps:
|
11
|
-
- uses: actions/checkout@
|
11
|
+
- uses: actions/checkout@v4
|
12
12
|
- uses: actions/setup-node@v3
|
13
13
|
- name: Install dependencies
|
14
|
-
run: yarn && yarn add -D eslint-config-airbnb-base@^15 eslint-plugin-unicorn@^
|
14
|
+
run: yarn && yarn add -D eslint-config-airbnb-base@^15 eslint-plugin-unicorn@^46 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
17
|
- name: Assert LESS files formatting using Prettier
|
18
18
|
run: >
|
19
|
-
yarn add -D github:
|
19
|
+
yarn add -D github:prettier/prettier#c6e026ea28
|
20
20
|
&& npx prettier --loglevel warn '!dist' '!test/coverage' '!src/semantic.less' '**/*.{css,less,overrides,variables}' --write
|
21
21
|
&& git restore package.json yarn.lock
|
22
22
|
&& git add . -N && git diff --color --exit-code
|
@@ -28,7 +28,7 @@ jobs:
|
|
28
28
|
matrix:
|
29
29
|
node-version: [12, 14, 16, 18, latest]
|
30
30
|
steps:
|
31
|
-
- uses: actions/checkout@
|
31
|
+
- uses: actions/checkout@v4
|
32
32
|
- name: Setup Node.js ${{ matrix.node-version }}
|
33
33
|
uses: actions/setup-node@v3
|
34
34
|
with:
|
@@ -47,7 +47,7 @@ jobs:
|
|
47
47
|
contents: read
|
48
48
|
security-events: write
|
49
49
|
steps:
|
50
|
-
- uses: actions/checkout@
|
50
|
+
- uses: actions/checkout@v4
|
51
51
|
- uses: github/codeql-action/init@v2
|
52
52
|
with:
|
53
53
|
languages: 'javascript'
|
package/CHANGELOG.md
CHANGED
@@ -4,6 +4,136 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
4
4
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
6
6
|
|
7
|
+
#### [2.9.3](https://github.com/fomantic/Fomantic-UI/compare/2.9.2...2.9.3)
|
8
|
+
|
9
|
+
> 7 September 2023
|
10
|
+
|
11
|
+
- build(deps-dev): bump postcss from 8.4.25 to 8.4.26 [`#2849`](https://github.com/fomantic/Fomantic-UI/pull/2849)
|
12
|
+
- docs: add brian-codes as a contributor for security [`#2706`](https://github.com/fomantic/Fomantic-UI/pull/2706)
|
13
|
+
- feat(ci): format LESS files using official prettier [`#2611`](https://github.com/fomantic/Fomantic-UI/issues/2611)
|
14
|
+
- feat(types): better readability, intellisense improvements, small fixes [`40a7aee`](https://github.com/fomantic/Fomantic-UI/commit/40a7aee3db1b3ef3404295afb34722b363fd5ba9)
|
15
|
+
- feat(chore): added types definitions [`eabc58e`](https://github.com/fomantic/Fomantic-UI/commit/eabc58e7d3526c2073c60054cd6d05546e9c4200)
|
16
|
+
- chore(release): update dist files [`2d8ec57`](https://github.com/fomantic/Fomantic-UI/commit/2d8ec574ac1388f46dfa3444ed5ea220e3191829)
|
17
|
+
- fix(theme): check real colors to support css variables [`4f21527`](https://github.com/fomantic/Fomantic-UI/commit/4f21527c9d194457e3f2a8887d587994518dfd8b)
|
18
|
+
- feat(emoji): tweemoji v14 and joypixels v7 update [`db3ee2f`](https://github.com/fomantic/Fomantic-UI/commit/db3ee2fbaa72bd65afddf1403fe57c673f181f06)
|
19
|
+
- feat(chore): shorten specificity names [`3deb795`](https://github.com/fomantic/Fomantic-UI/commit/3deb795288e8985c4a38da3ae48ae44cdaea14ff)
|
20
|
+
- feat(feed): connected, ordered, disabled, divided variant + inverted fix [`41577bc`](https://github.com/fomantic/Fomantic-UI/commit/41577bcbfff653772c8a9bacdefc800aaf9d785a)
|
21
|
+
- build(deps-dev): bump eslint-plugin-import from 2.27.5 to 2.28.0 [`3d59558`](https://github.com/fomantic/Fomantic-UI/commit/3d5955859531c2ff834396f79bbe93fc89a44070)
|
22
|
+
- feat(table,segment,container,dropdown,search): resizable scrolling [`1e3f606`](https://github.com/fomantic/Fomantic-UI/commit/1e3f606258431651b774cc982cf1ab694872a8ae)
|
23
|
+
- feat(deps): octokit v18 upgrade [`f52d42b`](https://github.com/fomantic/Fomantic-UI/commit/f52d42bdff73509c77876f8d2194f4e6a2b84489)
|
24
|
+
- fix(chore): check if context exists in parent windows [`2321380`](https://github.com/fomantic/Fomantic-UI/commit/232138045e87b20cf915f9b233b67605a3ffeb8b)
|
25
|
+
- fix(theme): variable inheritance without default imported twice [`41cbbfd`](https://github.com/fomantic/Fomantic-UI/commit/41cbbfdd05d6672b9a9804d5a935dbb7a7f3957e)
|
26
|
+
- feat(slider): restrictedLabels, min/maxRange, always ticks, tooltip [`28fb68c`](https://github.com/fomantic/Fomantic-UI/commit/28fb68ccb3d7de6d66ed2cad62aec9feff6c2737)
|
27
|
+
- fix(dropdown): support selection floating or pointing [`a8dd05e`](https://github.com/fomantic/Fomantic-UI/commit/a8dd05ea61a8d970107742102c6a34ab6b004558)
|
28
|
+
- fix(chore): removed selector api as removed in jquery 3 [`dc85362`](https://github.com/fomantic/Fomantic-UI/commit/dc8536229b8a78227a459fd2d78470c258243427)
|
29
|
+
- build(deps): bump gulp-json-editor from 2.5.6 to 2.5.7 [`6f874c4`](https://github.com/fomantic/Fomantic-UI/commit/6f874c4023621b5d6c285e3e4aec412559ab7a49)
|
30
|
+
- fix(modal,flyout): autofocus fix for input and non focusable elements [`9f9137a`](https://github.com/fomantic/Fomantic-UI/commit/9f9137ad15d63c1235fe89e81472dacfc8424a02)
|
31
|
+
- fix(formvalidation): support native validation, after submit only [`5e5da5d`](https://github.com/fomantic/Fomantic-UI/commit/5e5da5da032212ab718ce32bff72de69b64d6dec)
|
32
|
+
- feat(checkbox): invisible variant for text only [`9cfbc56`](https://github.com/fomantic/Fomantic-UI/commit/9cfbc56c0a202a6cbc9ec5f92aa6ef6e8244ee57)
|
33
|
+
- feat(tooltip): match tooltip appearance to default popups [`5da44d8`](https://github.com/fomantic/Fomantic-UI/commit/5da44d8025e56f705ba9dae27e21b0ecd516e683)
|
34
|
+
- build(deps-dev): bump eslint from 8.35.0 to 8.36.0 [`e2d4cc1`](https://github.com/fomantic/Fomantic-UI/commit/e2d4cc14ea43e7f5444acb0d51ff28ea6dbec15a)
|
35
|
+
- fix(segment): piled segments under parent background, inverted variants [`980ea5e`](https://github.com/fomantic/Fomantic-UI/commit/980ea5e4f4c63a5d549f175f9974420bc4e07bb7)
|
36
|
+
- build(deps-dev): bump eslint from 8.45.0 to 8.46.0 [`0c3158d`](https://github.com/fomantic/Fomantic-UI/commit/0c3158da48b025adfc3f5424373d3254af014b1e)
|
37
|
+
- build(deps-dev): bump eslint from 8.43.0 to 8.44.0 [`d1f0dad`](https://github.com/fomantic/Fomantic-UI/commit/d1f0dad59fa3cbdcba8d9b904b6a339a6cbd4fc5)
|
38
|
+
- fix(chore): encapsulate settimeout [`afea456`](https://github.com/fomantic/Fomantic-UI/commit/afea456335687b89d6d802897fd3bd39be815ba6)
|
39
|
+
- fix(sidebar,flyout): remove unused ios checks [`c6956f2`](https://github.com/fomantic/Fomantic-UI/commit/c6956f2ac1a98dd4fc510c614de726609bc0c9eb)
|
40
|
+
- build(deps-dev): bump eslint from 8.39.0 to 8.40.0 [`ae3850a`](https://github.com/fomantic/Fomantic-UI/commit/ae3850ab7acc6d7359c1663032fc89e85022a3c3)
|
41
|
+
- build(deps-dev): bump eslint from 8.36.0 to 8.37.0 [`88ae1e1`](https://github.com/fomantic/Fomantic-UI/commit/88ae1e1b6b18c282c061f329a59c8a25d984191c)
|
42
|
+
- feat(menu): simpler equal width [`edf4286`](https://github.com/fomantic/Fomantic-UI/commit/edf4286b3e3c1f08005d2bf16b57719e5c338bc3)
|
43
|
+
- build(deps): bump browserslist from 4.21.5 to 4.21.7 [`ab9c052`](https://github.com/fomantic/Fomantic-UI/commit/ab9c0524bbda6e9fd2d524e9a2d73b2847781603)
|
44
|
+
- fix(formvalidation): support file inputs for validation [`880333c`](https://github.com/fomantic/Fomantic-UI/commit/880333c34845c544e7115bf0ce8779c8aceb9c35)
|
45
|
+
- feat(calendar): move hardcoded values to less variables [`9025236`](https://github.com/fomantic/Fomantic-UI/commit/9025236e98db6e21cb49ac2e495b7d64fdcad791)
|
46
|
+
- build(deps-dev): bump eslint from 8.46.0 to 8.47.0 [`afdd4d6`](https://github.com/fomantic/Fomantic-UI/commit/afdd4d6caa96320a4801965a7b23dda598d819b4)
|
47
|
+
- build(deps): bump browserslist from 4.21.9 to 4.21.10 [`29cb9be`](https://github.com/fomantic/Fomantic-UI/commit/29cb9be56744458a19dfe83b49b967d698311e61)
|
48
|
+
- fix(install): copy overrides.less file on install/update [`edee12d`](https://github.com/fomantic/Fomantic-UI/commit/edee12dbdbe36ac5f694d45f08333f975093ce09)
|
49
|
+
- build(deps-dev): bump eslint from 8.40.0 to 8.41.0 [`da0c44e`](https://github.com/fomantic/Fomantic-UI/commit/da0c44e6f247466c670ff862202dcd83f41cbf4c)
|
50
|
+
- build(deps-dev): bump eslint from 8.34.0 to 8.35.0 [`bda537d`](https://github.com/fomantic/Fomantic-UI/commit/bda537dbc18ffd0b879d637fc04f7867d9543642)
|
51
|
+
- fix(lint): satisfy linting for import order [`2eabebd`](https://github.com/fomantic/Fomantic-UI/commit/2eabebdf30e7c14c0604f850bcbd2b4646559324)
|
52
|
+
- feat(calendar): add size variations [`1afaf65`](https://github.com/fomantic/Fomantic-UI/commit/1afaf65c866e3b0ac3631ab04251cc4863facd90)
|
53
|
+
- fix(form): support inline fields group label for required attribute [`e275dcb`](https://github.com/fomantic/Fomantic-UI/commit/e275dcb35733ce8e067aad424c27ecc9e87a4e73)
|
54
|
+
- feat(label): center and bottom ribbon [`3a3d6aa`](https://github.com/fomantic/Fomantic-UI/commit/3a3d6aa494151f270883e667348887199071b334)
|
55
|
+
- build(deps): bump browserslist from 4.21.8 to 4.21.9 [`e928031`](https://github.com/fomantic/Fomantic-UI/commit/e92803107ae170c972610cd594b9e62e37d4105f)
|
56
|
+
- build(deps): bump browserslist from 4.21.7 to 4.21.8 [`0540e9c`](https://github.com/fomantic/Fomantic-UI/commit/0540e9c291440d92e79465b0c29bd79be58d1c37)
|
57
|
+
- build(deps-dev): bump eslint from 8.41.0 to 8.42.0 [`20625bd`](https://github.com/fomantic/Fomantic-UI/commit/20625bd6f9710b97bf19d437d30a0d9e0c32fda4)
|
58
|
+
- build(deps-dev): bump eslint from 8.38.0 to 8.39.0 [`908a0a5`](https://github.com/fomantic/Fomantic-UI/commit/908a0a5d0f4ae80b0e3182f9fe1aeef3cf7af023)
|
59
|
+
- fix(dropdown): adjust icon on multiple non selection non search [`b6b51ca`](https://github.com/fomantic/Fomantic-UI/commit/b6b51ca587041f112581c69c9aa42d0664b74bb9)
|
60
|
+
- fix(form): add prompt while still animating [`7e5e3ff`](https://github.com/fomantic/Fomantic-UI/commit/7e5e3ff2f9135278c41508a4cf415d8f5ef075b5)
|
61
|
+
- build(deps-dev): bump eslint-plugin-import from 2.28.0 to 2.28.1 [`939b102`](https://github.com/fomantic/Fomantic-UI/commit/939b102ab22811d765987cbd7ef5549edd9c2914)
|
62
|
+
- build(deps): bump inquirer from 8.2.5 to 8.2.6 [`de758dc`](https://github.com/fomantic/Fomantic-UI/commit/de758dcb3b4b51657623d43893bc5351aadaf942)
|
63
|
+
- feat(dropdown): optional keeping the searchterm [`7986b3f`](https://github.com/fomantic/Fomantic-UI/commit/7986b3f80df8fb52bd797431e4280991fa3cdfb1)
|
64
|
+
- build(deps-dev): bump eslint from 8.47.0 to 8.48.0 [`ad261fe`](https://github.com/fomantic/Fomantic-UI/commit/ad261fe5381ae5c4f21f44da2ca38be5fc2a6119)
|
65
|
+
- build(deps-dev): bump eslint from 8.42.0 to 8.43.0 [`e36a7ef`](https://github.com/fomantic/Fomantic-UI/commit/e36a7efa60dbdd4bb106f618feb2aec4d2e92ee1)
|
66
|
+
- feat(item,comment): disabled variants [`d5f0e18`](https://github.com/fomantic/Fomantic-UI/commit/d5f0e180171edfc4ca6dfcd634e77026c1e5021f)
|
67
|
+
- build(deps-dev): bump postcss from 8.4.21 to 8.4.22 [`3222bcd`](https://github.com/fomantic/Fomantic-UI/commit/3222bcdf3e2a4e71960f474660647144190f4432)
|
68
|
+
- build(deps-dev): bump eslint from 8.37.0 to 8.38.0 [`588f1ab`](https://github.com/fomantic/Fomantic-UI/commit/588f1ab7ec3db559709dc5f030175d3837211fae)
|
69
|
+
- fix(lint): satisfy linting for import order [`15f3b46`](https://github.com/fomantic/Fomantic-UI/commit/15f3b461f30b73c74d3e3d4e0a59ba290a5ae493)
|
70
|
+
- fix(types): allow JQueryAjaxSettings objects for modules using apiSettings [`5aee397`](https://github.com/fomantic/Fomantic-UI/commit/5aee3977e3eab2fdc62ea2195e54c48649f5e549)
|
71
|
+
- feat(search): horizontal category variant [`446d89e`](https://github.com/fomantic/Fomantic-UI/commit/446d89e330edeabb81c36028a9dbc722cf4b0488)
|
72
|
+
- fix(api): create regexp alias to fix snyk redos false positive [`bc1849c`](https://github.com/fomantic/Fomantic-UI/commit/bc1849cc215bdb646398a19efa3105924aa8bd3c)
|
73
|
+
- build(deps-dev): bump all-contributors-cli from 6.25.1 to 6.26.0 [`f6ebe09`](https://github.com/fomantic/Fomantic-UI/commit/f6ebe09b7d28f6dec864354bd5d21afd5ae8392b)
|
74
|
+
- feat(dropdown): simple temporary cache clear [`e19bdc5`](https://github.com/fomantic/Fomantic-UI/commit/e19bdc5a7ff4e132cf7d67598b4847a3ee65ee78)
|
75
|
+
- build(deps-dev): bump eslint from 8.44.0 to 8.45.0 [`0d210e6`](https://github.com/fomantic/Fomantic-UI/commit/0d210e6b6dde79dbb3691d82517f69c4891f36b1)
|
76
|
+
- feat(popup): use title attribute as very last option only [`11b4099`](https://github.com/fomantic/Fomantic-UI/commit/11b409973c82256dc5ce0acc168895576ccd10d5)
|
77
|
+
- fix(slider): max value had js floating point issues [`4ae1b43`](https://github.com/fomantic/Fomantic-UI/commit/4ae1b43d4a8329d5ef7c6900596e6adcc626b9d4)
|
78
|
+
- build(deps): bump actions/checkout from 3 to 4 [`9dc98bd`](https://github.com/fomantic/Fomantic-UI/commit/9dc98bd87ea54808e437fd110b0dfa4f895a1768)
|
79
|
+
- fix(dropdown): remove clearable icon on disabeled or readonly [`09d0671`](https://github.com/fomantic/Fomantic-UI/commit/09d0671c23fa2710652efaaf0f716aaae85bf42f)
|
80
|
+
- fix(lint): satisfy linting for import order [`a90ff86`](https://github.com/fomantic/Fomantic-UI/commit/a90ff8695065435ab3e68d0ba08f688f6b7e94a3)
|
81
|
+
- fix(chore): adjust new username for core maintainer y0hami [`1c42354`](https://github.com/fomantic/Fomantic-UI/commit/1c423540e867ab7b579d705e0609a707c456a3b6)
|
82
|
+
- fix(dropdown): encoded select values, multiple maxselections [`34abb0e`](https://github.com/fomantic/Fomantic-UI/commit/34abb0e422b74446172387c45246c6fddaa3442f)
|
83
|
+
- feat(segment): colored inverted attached segment should not have a black border [`58863c1`](https://github.com/fomantic/Fomantic-UI/commit/58863c18a3cb322fbcd11603d7b25f84e15763df)
|
84
|
+
- fix(modal): fade inner dimmer [`4006122`](https://github.com/fomantic/Fomantic-UI/commit/40061220f76e4087b03e9207a49b5c94fd1ca1a9)
|
85
|
+
- fix(build): removed never reached error handling [`344657e`](https://github.com/fomantic/Fomantic-UI/commit/344657ebcb270d12f443dc0c8debb9c00356632e)
|
86
|
+
- fix(slider): also bind events on disabled variant [`cb680cb`](https://github.com/fomantic/Fomantic-UI/commit/cb680cba14c4251b9ad7c7fa92b5d97b46b80779)
|
87
|
+
- fix(modal, flyout): ignore observed non inputs for autofocus [`1d7449f`](https://github.com/fomantic/Fomantic-UI/commit/1d7449f672cb508b65ece681d52d58d1935eaf5b)
|
88
|
+
- fix(modal): scrolling multple modals positioning [`81f7c2c`](https://github.com/fomantic/Fomantic-UI/commit/81f7c2cc5b37ff18926b3f5b30de328698127428)
|
89
|
+
- fix(dropdown): possible XSS through select option text [`be4492b`](https://github.com/fomantic/Fomantic-UI/commit/be4492b7b6acb853ae2d795a2add89d1b1102f66)
|
90
|
+
- feat(form): optional limit the displayed error messages per field [`491b07a`](https://github.com/fomantic/Fomantic-UI/commit/491b07ab0c2b9097a27a32cf646698b2432e665d)
|
91
|
+
- build(deps): bump less from 4.1.3 to 4.2.0 [`86a6537`](https://github.com/fomantic/Fomantic-UI/commit/86a6537cec66874effb6e376cf5819b06c997a28)
|
92
|
+
- feat(site): separate variable for whole google Font url [`c9f9dea`](https://github.com/fomantic/Fomantic-UI/commit/c9f9dea7d5817a726a4376ec8b7728b5a1644a9f)
|
93
|
+
- build(deps-dev): bump postcss from 8.4.28 to 8.4.29 [`f2aad7e`](https://github.com/fomantic/Fomantic-UI/commit/f2aad7e1c47a1e288359e448459c9155e53f2d9d)
|
94
|
+
- build(deps): bump jquery from 3.7.0 to 3.7.1 [`75021b9`](https://github.com/fomantic/Fomantic-UI/commit/75021b9d73aa5eeba0be5268e7bfa4857df657b2)
|
95
|
+
- build(deps-dev): bump node-fetch from 2.6.13 to 2.7.0 [`a41a0dc`](https://github.com/fomantic/Fomantic-UI/commit/a41a0dc23cf6c1e20f081a7cd5cf0e60cb0bd798)
|
96
|
+
- build(deps-dev): bump node-fetch from 2.6.12 to 2.6.13 [`26b15d2`](https://github.com/fomantic/Fomantic-UI/commit/26b15d21fcb5ef0bcc0adaf9b35b7eadd344758f)
|
97
|
+
- build(deps-dev): bump postcss from 8.4.27 to 8.4.28 [`871052f`](https://github.com/fomantic/Fomantic-UI/commit/871052f6ae11c8fc117846e98f129d275e7792e1)
|
98
|
+
- build(deps-dev): bump postcss from 8.4.26 to 8.4.27 [`7d7989c`](https://github.com/fomantic/Fomantic-UI/commit/7d7989cf06b7c6a56c0dde24fd4f82964ecea93f)
|
99
|
+
- build(deps-dev): bump semver from 7.5.3 to 7.5.4 [`8d163fa`](https://github.com/fomantic/Fomantic-UI/commit/8d163faa72ca9709d38ded50fde59b3a572d122a)
|
100
|
+
- build(deps-dev): bump all-contributors-cli from 6.26.0 to 6.26.1 [`26c6796`](https://github.com/fomantic/Fomantic-UI/commit/26c679698a0d98019c7eec15105a0deff26a721b)
|
101
|
+
- build(deps-dev): bump postcss from 8.4.24 to 8.4.25 [`7371284`](https://github.com/fomantic/Fomantic-UI/commit/73712844308e58219bb01882691d62b0c475986c)
|
102
|
+
- build(deps-dev): bump node-fetch from 2.6.11 to 2.6.12 [`f7800b5`](https://github.com/fomantic/Fomantic-UI/commit/f7800b56e434290946833c51c109bde63a848ac1)
|
103
|
+
- build(deps-dev): bump semver from 7.5.2 to 7.5.3 [`bca7d0e`](https://github.com/fomantic/Fomantic-UI/commit/bca7d0e1db8b43b38df1e8a6a773b6ee2aa0cd4d)
|
104
|
+
- feat(readme): added ci+ossf badges [`0c92754`](https://github.com/fomantic/Fomantic-UI/commit/0c9275461ef28a3016320df56f288743c4787177)
|
105
|
+
- build(deps-dev): bump semver from 7.5.1 to 7.5.2 [`ffdc371`](https://github.com/fomantic/Fomantic-UI/commit/ffdc3714999f6055ce2a3dfef357adaac50dfc42)
|
106
|
+
- build(deps-dev): bump postcss from 8.4.23 to 8.4.24 [`131c491`](https://github.com/fomantic/Fomantic-UI/commit/131c491f62b8c0dfba8ffb9eb489d04ac1f88665)
|
107
|
+
- build(deps-dev): bump all-contributors-cli from 6.25.0 to 6.25.1 [`bc3a70f`](https://github.com/fomantic/Fomantic-UI/commit/bc3a70f542a88fc785f84e54ae5b3c9c69794cbd)
|
108
|
+
- build(deps-dev): bump semver from 7.5.0 to 7.5.1 [`15b7eb5`](https://github.com/fomantic/Fomantic-UI/commit/15b7eb51be610e517e2daa1d72292e87c6b0766f)
|
109
|
+
- build(deps): bump jquery from 3.6.4 to 3.7.0 [`93c84e7`](https://github.com/fomantic/Fomantic-UI/commit/93c84e764bf522154eae802ebfc0268fd1eecb79)
|
110
|
+
- fix(tab): hash historytype did not work anymore [`8c329ba`](https://github.com/fomantic/Fomantic-UI/commit/8c329bab785d3d59dc2f884e99ef3d36c5abe125)
|
111
|
+
- build(deps-dev): bump node-fetch from 2.6.10 to 2.6.11 [`0357b6d`](https://github.com/fomantic/Fomantic-UI/commit/0357b6d9ae8023bb21e467339e61bcb1946b3a40)
|
112
|
+
- build(deps-dev): bump node-fetch from 2.6.9 to 2.6.10 [`139eccc`](https://github.com/fomantic/Fomantic-UI/commit/139eccca46c3230028c476e64aaf838dc137074f)
|
113
|
+
- build(deps-dev): bump all-contributors-cli from 6.24.0 to 6.25.0 [`aadb1e8`](https://github.com/fomantic/Fomantic-UI/commit/aadb1e872b2bda69f33f2c815a053f9f5390f638)
|
114
|
+
- build(deps-dev): bump postcss from 8.4.22 to 8.4.23 [`420ab44`](https://github.com/fomantic/Fomantic-UI/commit/420ab44e430f398303fec6ee3e48e9f093041b7b)
|
115
|
+
- build(deps-dev): bump semver from 7.4.0 to 7.5.0 [`0f4a48b`](https://github.com/fomantic/Fomantic-UI/commit/0f4a48b8c714fc6bb1e195b835765f6db8f78743)
|
116
|
+
- build(deps-dev): bump semver from 7.3.8 to 7.4.0 [`9f8725b`](https://github.com/fomantic/Fomantic-UI/commit/9f8725ba446274578acaddf260fe1d19d6dd32de)
|
117
|
+
- build(deps): bump jquery from 3.6.3 to 3.6.4 [`e35f5d7`](https://github.com/fomantic/Fomantic-UI/commit/e35f5d7060135ef18586ce4e4f657f83b186e603)
|
118
|
+
- fix(form): use namespace to be able to destroy events [`72d102a`](https://github.com/fomantic/Fomantic-UI/commit/72d102a7628ac7f8ef86341420113a539c57da66)
|
119
|
+
- build(deps-dev): bump eslint from 8.33.0 to 8.34.0 [`d8dd970`](https://github.com/fomantic/Fomantic-UI/commit/d8dd970ebca8eb310bd4df9faa6e41f1e6184b3d)
|
120
|
+
- fix(dropdown): double hide transition breaks upward out [`cd6c308`](https://github.com/fomantic/Fomantic-UI/commit/cd6c30873c581b83b57681cac7c38564dd1fd75e)
|
121
|
+
- fix(checkbox): prevent readonly toggle via space [`c3eb045`](https://github.com/fomantic/Fomantic-UI/commit/c3eb045af344d472d8609aeff10c168289fda201)
|
122
|
+
- fix(menu): dont show right wrapping border on secondary [`f840753`](https://github.com/fomantic/Fomantic-UI/commit/f84075310cb6115a13590477b24b8b36dbbd491f)
|
123
|
+
- fix(dropdpown): trigger onchange for paste values [`17ae2a9`](https://github.com/fomantic/Fomantic-UI/commit/17ae2a92a587dd1f5e69ec05f823cffc3c51e22b)
|
124
|
+
- chore(docs): added v2.9.x to security support [`a685a8c`](https://github.com/fomantic/Fomantic-UI/commit/a685a8c274f25e03813ca269e8c30ae41c60663d)
|
125
|
+
- feat(search): onresults callback fromcache [`ef4ce34`](https://github.com/fomantic/Fomantic-UI/commit/ef4ce34634832a67e80135de78bff87b7782dc82)
|
126
|
+
- feat(segment): wrapping in addition to stackable [`17aa72d`](https://github.com/fomantic/Fomantic-UI/commit/17aa72d3a37a373c311296d09506f8e9ea427eec)
|
127
|
+
- chore(release): update version [`f2b19b9`](https://github.com/fomantic/Fomantic-UI/commit/f2b19b95816c22928e8347a402007389599b9de3)
|
128
|
+
- fix(dropdown): insert clearable at correct dom position [`f574a6b`](https://github.com/fomantic/Fomantic-UI/commit/f574a6bcff47fb623c92cdab1778e7cdc2f95d96)
|
129
|
+
- fix(ci): upgrade unicorn to 46 to fix eslint 8.40 [`eb16c99`](https://github.com/fomantic/Fomantic-UI/commit/eb16c9958d11fc62fe358e972d8d9cd7e3bc28ec)
|
130
|
+
- fix(flag): czech_republic alias [`c7d794b`](https://github.com/fomantic/Fomantic-UI/commit/c7d794b9072115464422e9ba81c5fc734d2bbbe5)
|
131
|
+
- feat(flags): add alias for czech [`d9a9b44`](https://github.com/fomantic/Fomantic-UI/commit/d9a9b44f401e10e82f4c382b4dfd3d6fd20c6fc3)
|
132
|
+
- feat(segment): loading segment should cover loading spinner [`b952467`](https://github.com/fomantic/Fomantic-UI/commit/b95246742556c66151b59b3fb9b6bcebfe5500ad)
|
133
|
+
- fix(toast): destroy toast after onremove callback [`2806406`](https://github.com/fomantic/Fomantic-UI/commit/280640609a60f06da0d64925653856ef75296155)
|
134
|
+
- fix(calendar): multimonth had margin [`85bc292`](https://github.com/fomantic/Fomantic-UI/commit/85bc292346a6b0dc644db49180a8ed49931780ee)
|
135
|
+
- chore(docs): remove openbase badge [`569cce1`](https://github.com/fomantic/Fomantic-UI/commit/569cce1891a4750f8616e08ee4b4c3562a87661e)
|
136
|
+
|
7
137
|
#### [2.9.2](https://github.com/fomantic/Fomantic-UI/compare/2.9.1...2.9.2)
|
8
138
|
|
9
139
|
> 3 February 2023
|
@@ -17,6 +147,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
17
147
|
- feat(chore): remove unneeded vendor prefixes [`8415a7a`](https://github.com/fomantic/Fomantic-UI/commit/8415a7a660cec01a35fb65536256792f16372af3)
|
18
148
|
- build(deps): bump browserslist from 4.21.4 to 4.21.5 [`52801a7`](https://github.com/fomantic/Fomantic-UI/commit/52801a7e47ac865e48c82f1a9df2a4a747829413)
|
19
149
|
- feat(menu): wrapping variant [`cf51e1c`](https://github.com/fomantic/Fomantic-UI/commit/cf51e1ca633a5618c6dc13b2315ab0d2f876ad89)
|
150
|
+
- chore(release): update changelog [`cdae7ad`](https://github.com/fomantic/Fomantic-UI/commit/cdae7ad4fe2bcc3a43e5e7c1e991751204024bfa)
|
20
151
|
- feat(segment): seamless variant [`79582b2`](https://github.com/fomantic/Fomantic-UI/commit/79582b243684f469d0e6d6ab24b117c70178025c)
|
21
152
|
- feat(formvalidation): size rule to test string length range [`247703a`](https://github.com/fomantic/Fomantic-UI/commit/247703af614b84ff9bf7cb74e36022332964bb23)
|
22
153
|
- fix(modal,flyout): avoid multiple autofocus on show animation [`5b497e3`](https://github.com/fomantic/Fomantic-UI/commit/5b497e3bad91c5ea5ce437df6f1194ce3ce2dc99)
|
package/CONTRIBUTORS.md
CHANGED
@@ -8,7 +8,7 @@ This is a list of all project contributors powered by [All Contributors](https:/
|
|
8
8
|
<table>
|
9
9
|
<tbody>
|
10
10
|
<tr>
|
11
|
-
<td align="center" valign="top" width="25%"><a href="https://github.com/
|
11
|
+
<td align="center" valign="top" width="25%"><a href="https://github.com/y0hami"><img src="https://avatars2.githubusercontent.com/u/11588822?v=4?s=60" width="60px;" alt="Sean"/><br /><sub><b>Sean</b></sub></a><br /><a href="#question-y0hami" title="Answering Questions">💬</a> <a href="https://github.com/fomantic/Fomantic-UI/issues?q=author%3Ay0hami" title="Bug reports">🐛</a> <a href="#blog-y0hami" title="Blogposts">📝</a> <a href="#business-y0hami" title="Business development">💼</a> <a href="https://github.com/fomantic/Fomantic-UI/commits?author=y0hami" title="Code">💻</a> <a href="https://github.com/fomantic/Fomantic-UI/commits?author=y0hami" title="Documentation">📖</a> <a href="#design-y0hami" title="Design">🎨</a> <a href="#example-y0hami" title="Examples">💡</a> <a href="#ideas-y0hami" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-y0hami" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-y0hami" title="Maintenance">🚧</a> <a href="#platform-y0hami" title="Packaging/porting to new platform">📦</a> <a href="#projectManagement-y0hami" title="Project Management">📆</a> <a href="https://github.com/fomantic/Fomantic-UI/pulls?q=is%3Apr+reviewed-by%3Ay0hami" title="Reviewed Pull Requests">👀</a> <a href="#security-y0hami" title="Security">🛡️</a> <a href="#tool-y0hami" title="Tools">🔧</a> <a href="#tutorial-y0hami" title="Tutorials">✅</a> <a href="#talk-y0hami" title="Talks">📢</a></td>
|
12
12
|
<td align="center" valign="top" width="25%"><a href="https://github.com/prudho"><img src="https://avatars0.githubusercontent.com/u/7557689?v=4?s=60" width="60px;" alt="prudho"/><br /><sub><b>prudho</b></sub></a><br /><a href="#question-prudho" title="Answering Questions">💬</a> <a href="https://github.com/fomantic/Fomantic-UI/issues?q=author%3Aprudho" title="Bug reports">🐛</a> <a href="https://github.com/fomantic/Fomantic-UI/commits?author=prudho" title="Code">💻</a> <a href="https://github.com/fomantic/Fomantic-UI/commits?author=prudho" title="Documentation">📖</a> <a href="#example-prudho" title="Examples">💡</a> <a href="#ideas-prudho" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-prudho" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/fomantic/Fomantic-UI/pulls?q=is%3Apr+reviewed-by%3Aprudho" title="Reviewed Pull Requests">👀</a></td>
|
13
13
|
<td align="center" valign="top" width="25%"><a href="https://github.com/ColinFrick"><img src="https://avatars1.githubusercontent.com/u/5517677?v=4?s=60" width="60px;" alt="Colin Frick"/><br /><sub><b>Colin Frick</b></sub></a><br /><a href="#question-ColinFrick" title="Answering Questions">💬</a> <a href="https://github.com/fomantic/Fomantic-UI/issues?q=author%3AColinFrick" title="Bug reports">🐛</a> <a href="https://github.com/fomantic/Fomantic-UI/commits?author=ColinFrick" title="Code">💻</a> <a href="https://github.com/fomantic/Fomantic-UI/commits?author=ColinFrick" title="Documentation">📖</a> <a href="#example-ColinFrick" title="Examples">💡</a> <a href="#ideas-ColinFrick" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-ColinFrick" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/fomantic/Fomantic-UI/pulls?q=is%3Apr+reviewed-by%3AColinFrick" title="Reviewed Pull Requests">👀</a></td>
|
14
14
|
<td align="center" valign="top" width="25%"><a href="https://rasterbuster.lubber.de"><img src="https://avatars1.githubusercontent.com/u/18379884?v=4?s=60" width="60px;" alt="Marco 'Lubber' Wienkoop"/><br /><sub><b>Marco 'Lubber' Wienkoop</b></sub></a><br /><a href="#question-lubber-de" title="Answering Questions">💬</a> <a href="https://github.com/fomantic/Fomantic-UI/issues?q=author%3Alubber-de" title="Bug reports">🐛</a> <a href="https://github.com/fomantic/Fomantic-UI/commits?author=lubber-de" title="Code">💻</a> <a href="https://github.com/fomantic/Fomantic-UI/commits?author=lubber-de" title="Documentation">📖</a> <a href="#example-lubber-de" title="Examples">💡</a> <a href="#ideas-lubber-de" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-lubber-de" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/fomantic/Fomantic-UI/pulls?q=is%3Apr+reviewed-by%3Alubber-de" title="Reviewed Pull Requests">👀</a> <a href="#a11y-lubber-de" title="Accessibility">️️️️♿️</a> <a href="#security-lubber-de" title="Security">🛡️</a> <a href="#maintenance-lubber-de" title="Maintenance">🚧</a></td>
|
package/README.md
CHANGED
@@ -6,7 +6,6 @@ The official community fork of the popular Semantic-UI framework.
|
|
6
6
|
[](https://github.com/fomantic/Fomantic-UI/actions)
|
7
7
|
[](https://github.com/fomantic/Fomantic-UI/commits/develop)
|
8
8
|
[](https://github.com/fomantic/Fomantic-UI/blob/1fd94d2479f297c906bed557f0567d1d3f0a4d2c/LICENSE.md)
|
9
|
-
[](https://openbase.io/js/fomantic-ui?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge)
|
10
9
|
|
11
10
|
[](https://discord.gg/YChxjJ3)
|
12
11
|
[](https://twitter.com/fomanticui)
|
@@ -17,10 +16,14 @@ The official community fork of the popular Semantic-UI framework.
|
|
17
16
|
[](https://www.jsdelivr.com/package/npm/fomantic-ui)
|
18
17
|
[](https://cdnjs.com/libraries/fomantic-ui)
|
19
18
|
|
19
|
+
[](https://github.com/fomantic/Fomantic-UI/actions/workflows/ci.yml)
|
20
|
+
[](https://github.com/fomantic/Fomantic-UI/actions/workflows/nightly.yml)
|
21
|
+
|
20
22
|
[](https://packagequality.com/#?package=fomantic-ui)
|
21
23
|
[](https://github.com/fomantic/Fomantic-UI/graphs/contributors)
|
22
24
|
[](https://github.com/features/security)
|
23
|
-
[](https://snyk.io/test/github/fomantic/Fomantic-UI?targetFile=package.json)
|
25
|
+
[](https://snyk.io/test/github/fomantic/Fomantic-UI?targetFile=package.json)
|
26
|
+
[](https://bestpractices.coreinfrastructure.org/projects/7496)
|
24
27
|
|
25
28
|
---
|
26
29
|
|
package/SECURITY.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3
|
2
|
+
* # Fomantic-UI 2.9.3 - Accordion
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -438,7 +438,7 @@
|
|
438
438
|
});
|
439
439
|
}
|
440
440
|
clearTimeout(module.performance.timer);
|
441
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
441
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
442
442
|
},
|
443
443
|
display: function () {
|
444
444
|
var
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.3
|
2
|
+
* # Fomantic UI - 2.9.3
|
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,x){"use strict";x=void 0!==x&&x.Math===Math?x:globalThis,O.fn.accordion=function(v){var p,e=O(this),m=Date.now(),h=[],b=v,y="string"==typeof b,C=[].slice.call(arguments,1);return e.each(function(){var e,a=O.isPlainObject(v)?O.extend(!0,{},O.fn.accordion.settings,v):O.extend({},O.fn.accordion.settings),s=a.className,n=a.namespace,l=a.selector,
|
11
|
+
!function(O,x){"use strict";x=void 0!==x&&x.Math===Math?x:globalThis,O.fn.accordion=function(v){var p,e=O(this),m=Date.now(),h=[],b=v,y="string"==typeof b,C=[].slice.call(arguments,1);return e.each(function(){var e,a=O.isPlainObject(v)?O.extend(!0,{},O.fn.accordion.settings,v):O.extend({},O.fn.accordion.settings),s=a.className,n=a.namespace,l=a.selector,c=a.error,i="."+n,t="module-"+n,o=O(this),r=o.find(l.title),d=o.find(l.content),u=this,g=o.data(t),f={initialize:function(){f.debug("Initializing",o),f.bind.events(),a.observeChanges&&f.observeChanges(),f.instantiate()},instantiate:function(){g=f,o.data(t,f)},destroy:function(){f.debug("Destroying previous instance",o),o.off(i).removeData(t)},refresh:function(){r=o.find(l.title),d=o.find(l.content)},observeChanges:function(){"MutationObserver"in x&&((e=new MutationObserver(function(e){f.debug("DOM tree modified, updating selector cache"),f.refresh()})).observe(u,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",e))},bind:{events:function(){f.debug("Binding delegated events"),o.on(a.on+i,l.trigger,f.event.click)}},event:{click:function(e){0===O(e.target).closest(l.ignore).length&&f.toggle.call(this)}},toggle:function(e){var e=void 0!==e?"number"==typeof e?r.eq(e):O(e).closest(l.title):O(this).closest(l.title),n=e.next(d),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?r.eq(e):O(e).closest(l.title):O(this).closest(l.title),n=e.next(d),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!==O.fn.transition?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?r.eq(e):O(e).closest(l.title):O(this).closest(l.title),n=e.next(d),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!==O.fn.transition?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?r.eq(e):O(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(d):(n=e.find(t).not(i),e=e.find(o).find(t).not(i),(n=n.not(e)).next(d));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!==O.fn.transition?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(){O(this).removeClass(s.active),f.reset.display.call(this)}))},reset:{display:function(){f.verbose("Removing inline display from element",this);var e=O(this);e.css("display",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")},opacity:function(){f.verbose("Removing inline opacity from element",this);var e=O(this);e.css("opacity",""),""===e.attr("style")&&e.attr("style","").removeAttr("style")}},setting:function(e,n){if(f.debug("Changing setting",e,n),O.isPlainObject(e))O.extend(!0,a,e);else{if(void 0===n)return a[e];O.isPlainObject(a[e])?O.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];O.isPlainObject(e)?O.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())-(m||n),m=n,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":i})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(function(){f.performance.display()},500)},display:function(){var e=a.name+":",i=0;m=!1,clearTimeout(f.performance.timer),O.each(h,function(e,n){i+=n["Execution Time"]}),e+=" "+i+"ms",0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):O.each(h,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(t,e,n){var o,a,i,s,l=g;return e=e||C,n=n||u,"string"==typeof t&&void 0!==l&&(t=t.split(/[ .]/),o=t.length-1,O.each(t,function(e,n){var i=e!==o?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(O.isPlainObject(l[i])&&e!==o)l=l[i];else{if(void 0!==l[i])return a=l[i],!1;{if(!O.isPlainObject(l[n])||e===o)return void 0!==l[n]?a=l[n]:f.error(c.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(p)?p.push(i):void 0!==p?p=[p,i]:void 0!==i&&(p=i),a}};y?(void 0===g&&f.initialize(),f.invoke(b)):(void 0!==g&&g.invoke("destroy"),f.initialize())}),void 0!==p?p:this},O.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"}},O.extend(O.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document);
|
package/dist/components/ad.css
CHANGED
package/dist/components/api.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3
|
2
|
+
* # Fomantic-UI 2.9.3 - API
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -58,6 +58,7 @@
|
|
58
58
|
: $.extend({}, $.fn.api.settings),
|
59
59
|
|
60
60
|
// internal aliases
|
61
|
+
regExp = settings.regExp,
|
61
62
|
namespace = settings.namespace,
|
62
63
|
metadata = settings.metadata,
|
63
64
|
selector = settings.selector,
|
@@ -360,8 +361,8 @@
|
|
360
361
|
optionalVariables
|
361
362
|
;
|
362
363
|
if (url) {
|
363
|
-
requiredVariables = url.match(
|
364
|
-
optionalVariables = url.match(
|
364
|
+
requiredVariables = url.match(regExp.required);
|
365
|
+
optionalVariables = url.match(regExp.optional);
|
365
366
|
urlData = urlData || settings.urlData;
|
366
367
|
if (requiredVariables) {
|
367
368
|
module.debug('Looking for required URL variables', requiredVariables);
|
@@ -458,7 +459,7 @@
|
|
458
459
|
});
|
459
460
|
});
|
460
461
|
$.each(formArray, function (i, el) {
|
461
|
-
if (!
|
462
|
+
if (!regExp.validate.test(el.name)) {
|
462
463
|
return;
|
463
464
|
}
|
464
465
|
var
|
@@ -469,7 +470,7 @@
|
|
469
470
|
|| (String(floatValue) === el.value
|
470
471
|
? floatValue
|
471
472
|
: (el.value === 'false' ? false : el.value)),
|
472
|
-
nameKeys = el.name.match(
|
473
|
+
nameKeys = el.name.match(regExp.key) || [],
|
473
474
|
pushKey = el.name.replace(/\[]$/, '')
|
474
475
|
;
|
475
476
|
if (!(pushKey in pushes)) {
|
@@ -489,9 +490,9 @@
|
|
489
490
|
|
490
491
|
if (k === '' && !Array.isArray(value)) { // foo[]
|
491
492
|
value = build([], pushes[pushKey]++, value);
|
492
|
-
} else if (
|
493
|
+
} else if (regExp.fixed.test(k)) { // foo[n]
|
493
494
|
value = build([], k, value);
|
494
|
-
} else if (
|
495
|
+
} else if (regExp.named.test(k)) { // foo; foo[bar]
|
495
496
|
value = build({}, k, value);
|
496
497
|
}
|
497
498
|
}
|
@@ -646,7 +647,7 @@
|
|
646
647
|
module.debug('Adding error state');
|
647
648
|
module.set.error();
|
648
649
|
if (module.should.removeError()) {
|
649
|
-
setTimeout(module.remove.error, settings.errorDuration);
|
650
|
+
setTimeout(function () { module.remove.error(); }, settings.errorDuration);
|
650
651
|
}
|
651
652
|
}
|
652
653
|
module.debug('API Request failed', errorMessage, xhr);
|
@@ -970,7 +971,7 @@
|
|
970
971
|
});
|
971
972
|
}
|
972
973
|
clearTimeout(module.performance.timer);
|
973
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
974
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
974
975
|
},
|
975
976
|
display: function () {
|
976
977
|
var
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.3
|
2
|
+
* # Fomantic UI - 2.9.3
|
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,n){"use strict";function j(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=Date.now(),k=[],S=q,T="string"==typeof S,w=[].slice.call(arguments,1),D=function(e,t){var r;return 0<=[P,n].indexOf(e)?r=O(e):0===(r=O(t.document).find(e)).length&&(r=t.frameElement?D(e,t.parent):P),r};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?D(f.stateContext,P):g,b=this,h=v[0],y=g.data(p),R={initialize:function(){T||(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 j(b)||(R.is.input()?e.value=g.val():R.is.form()||(e.text=g.text())),e},event:function(){return j(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())-(A||t),A=t,k.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;A=!1,clearTimeout(R.performance.timer),O.each(k,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",0<k.length&&(console.groupCollapsed(e),console.table?console.table(k):O.each(k,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),k=[]}},invoke:function(n,e,t){var o,a,r,s=y;return e=e||w,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}};T?(void 0===y&&R.initialize(),R.invoke(S)):(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);
|
11
|
+
!function(P,j,n){"use strict";function C(e){return null!==e&&e===e.window}function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}j=void 0!==j&&j.Math===Math?j:globalThis,P.fn.api=function(x){var A,e=E(this)?P(j):P(this),k=Date.now(),S=[],T=x,w="string"==typeof T,D=[].slice.call(arguments,1),O=function(e,t){var r;return 0<=[j,n].indexOf(e)?r=P(e):0===(r=P(t.document).find(e)).length&&(r=t.frameElement?O(e,t.parent):j),r};return e.each(function(){var a,n,r,e,i,o,s=P.isPlainObject(x)?P.extend(!0,{},P.fn.api.settings,x):P.extend({},P.fn.api.settings),f=s.regExp,t=s.namespace,u=s.metadata,c=s.selector,d=s.error,l=s.className,p="."+t,g="module-"+t,m=P(this),v=m.closest(c.form),b=s.stateContext?O(s.stateContext,j):m,h=this,y=b[0],R=m.data(g),q={initialize:function(){w||(o=s.data,q.bind.events()),q.instantiate()},instantiate:function(){q.verbose("Storing instance of module",q),R=q,m.data(g,R)},destroy:function(){q.verbose("Destroying previous module for",h),m.removeData(g).off(p)},bind:{events:function(){var e=q.get.event();e?(q.verbose("Attaching API events to element",e),m.on(e+p,q.event.trigger)):"now"===s.on&&(q.debug("Querying API endpoint immediately"),q.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!==j.Storage)return t=sessionStorage.getItem(e+q.get.normalizedData()),q.debug("Using cached response",e,s.data,t),q.decode.json(t);q.error(d.noStorage)}},write:{cachedResponse:function(e,t){void 0===j.Storage?q.error(d.noStorage):(P.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+q.get.normalizedData(),t),q.verbose("Storing cached response for url",e,s.data,t))}},query:function(){if(q.is.disabled())q.debug("Element is disabled API request aborted");else{if(q.is.loading()){if(!s.interruptRequests)return void q.debug("Cancelling request, previous request is still pending");q.debug("Interrupting previous request"),q.abort()}if(s.defaultData&&P.extend(!0,s.urlData,q.get.defaultData()),s.serializeForm&&(s.data=q.add.formData(o||s.data)),!1===(n=q.get.settings()))return q.cancelled=!0,void q.error(d.beforeSend);if(q.cancelled=!1,(r=q.get.templatedURL())||q.is.mocked()){if((r=q.add.urlData(r))||q.is.mocked()){if(n.url=s.base+r,a=P.extend(!0,{},s,{type:s.method||s.type,data:e,url:s.base+r,beforeSend:s.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),q.debug("Querying URL",a.url),q.verbose("Using AJAX settings",a),"local"===s.cache&&q.read.cachedResponse(r))return q.debug("Response returned from local cache"),q.request=q.create.request(),void q.request.resolveWith(y,[q.read.cachedResponse(r)]);s.throttle?s.throttleFirstRequest||q.timer?(q.debug("Throttling request",s.throttle),clearTimeout(q.timer),q.timer=setTimeout(function(){q.timer&&delete q.timer,q.debug("Sending throttled request",e,a.method),q.send.request()},s.throttle)):(q.debug("Sending request",e,a.method),q.send.request(),q.timer=setTimeout(function(){},s.throttle)):(q.debug("Sending request",e,a.method),q.send.request())}}else q.error(d.missingURL)}},should:{removeError:function(){return!0===s.hideError||"auto"===s.hideError&&!q.is.form()}},is:{disabled:function(){return 0<m.filter(c.disabled).length},expectingJSON:function(){return"json"===s.dataType||"jsonp"===s.dataType},form:function(){return m.is("form")||b.is("form")},mocked:function(){return s.mockResponse||s.mockResponseAsync||s.response||s.responseAsync},input:function(){return m.is("input")},loading:function(){return!!q.request&&"pending"===q.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(q.verbose("XHR request determined to be aborted"),!0):(q.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return q.is.expectingJSON()&&E(s.successTest)?(q.debug("Checking JSON returned success",s.successTest,e),s.successTest(e)?(q.debug("Response passed success test",e),!0):(q.debug("Response failed success test",e),!1)):(q.verbose("Response is not JSON, skipping validation",s.successTest,e),!0)}},was:{cancelled:function(){return q.cancelled||!1},successful:function(){return q.request&&"resolved"===q.request.state()},failure:function(){return q.request&&"rejected"===q.request.state()},complete:function(){return q.request&&("resolved"===q.request.state()||"rejected"===q.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.required),t=o.match(f.optional),a=a||s.urlData,e&&(q.debug("Looking for required URL variables",e),P.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=P.isPlainObject(a)&&void 0!==a[r]?a[r]:void 0!==m.data(r)?m.data(r):void 0!==b.data(r)?b.data(r):a[r];if(void 0===n)return q.error(d.requiredParameter,r,o),o=!1;q.verbose("Found required variable",r,n),n=s.encodeParameters?q.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(q.debug("Looking for optional URL variables",e),P.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=P.isPlainObject(a)&&void 0!==a[r]?a[r]:void 0!==m.data(r)?m.data(r):void 0!==b.data(r)?b.data(r):a[r];o=void 0!==n?(q.verbose("Optional variable Found",r,n),o.replace(t,n)):(q.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"===s.serializeForm;return r=r||o||s.data,e=P.isPlainObject(r),t?(l=new FormData(v[0]),s.processData=void 0!==s.processData&&s.processData,s.contentType=void 0!==s.contentType&&s.contentType):(n=v.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},P.each(P('input[type="file"]',v),function(e,r){P.each(P(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),P.each(n,function(e,t){if(f.validate.test(t.name)){var r="checkbox"===P('[name="'+t.name+'"]',v).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.key)||[],i=t.name.replace(/\[]$/,"");i in u?Array.isArray(c[i])?c[i].push(o):c[i]=[c[i],o]:(u[i]=0,c[i]=o),-1===i.indexOf("[]")&&(o=c[i]);for(;0<a.length;){var s=a.pop();""!==s||Array.isArray(o)?f.fixed.test(s)?o=d([],s,o):f.named.test(s)&&(o=d({},s,o)):o=d([],u[i]++,o)}l=P.extend(!0,l,o)}})),r=e?(q.debug("Extending existing data with form data",r,l),t?(P.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):P.extend(!0,{},r,l)):(q.debug("Adding form data",l),l)}},send:{request:function(){q.set.loading(),q.request=q.create.request(),q.is.mocked()?q.mockedXHR=q.create.mockedXHR():q.xhr=q.create.xhr(),s.onRequest.call(y,q.request,q.xhr)}},event:{trigger:function(e){q.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=Date.now()-i,o=s.loadingDuration-o,a=!!E(s.onResponse)&&(q.is.expectingJSON()&&!s.rawResponse?s.onResponse.call(n,P.extend(!0,{},e)):s.onResponse.call(n,e)),o=0<o?o:0;a&&(q.debug("Modified API response in onResponse callback",s.onResponse,a,e),e=a),0<o&&q.debug("Response completed early delaying state change by",o),setTimeout(function(){q.is.validResponse(e)?q.request.resolveWith(n,[e,r]):q.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=Date.now()-i,o=s.loadingDuration-o;0<(o=0<o?o:0)&&q.debug("Response completed early delaying state change by",o),setTimeout(function(){q.is.abortedRequest(e)?q.request.rejectWith(n,[e,"aborted",r]):q.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){q.debug("Successful API Response",e),"local"===s.cache&&r&&(q.write.cachedResponse(r,e),q.debug("Saving server response locally",q.cache)),s.onSuccess.call(y,e,m,t)},complete:function(e,t){var r,n;q.was.successful()?(n=e,r=t):n=q.get.responseFromXHR(r=e),q.remove.loading(),s.onComplete.call(y,n,m,r)},fail:function(e,t,r){var n=q.get.responseFromXHR(e),o=q.get.errorFromRequest(n,t,r);if("aborted"===t)return q.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),s.onAbort.call(y,t,m,e),!0;"invalid"===t?q.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"===t&&void 0!==e&&(q.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&void 0!==r&&""!==r&&q.error(d.statusMessage+r,a.url),s.onError.call(y,o,m,e)),s.errorDuration&&"aborted"!==t&&(q.debug("Adding error state"),q.set.error(),q.should.removeError()&&setTimeout(function(){q.remove.error()},s.errorDuration)),q.debug("API Request failed",o,e),s.onFailure.call(y,n,m,e)}}},create:{request:function(){return P.Deferred().always(q.event.request.complete).done(q.event.request.done).fail(q.event.request.fail)},mockedXHR:function(){var e=s.mockResponse||s.response,t=s.mockResponseAsync||s.responseAsync,r=P.Deferred().always(q.event.xhr.complete).done(q.event.xhr.done).fail(q.event.xhr.fail);return e?(e=E(e)?(q.debug("Using specified synchronous callback",e),e.call(y,n)):(q.debug("Using settings specified response",e),e),r.resolveWith(y,[e,!1,{responseText:e}])):E(t)&&(e=function(e){q.debug("Async callback returned response",e),e?r.resolveWith(y,[e,!1,{responseText:e}]):r.rejectWith(y,[{responseText:e},!1,!1])},q.debug("Using specified async response callback",t),t.call(y,n,e)),r},xhr:function(){var e=P.ajax(a).always(q.event.xhr.always).done(q.event.xhr.done).fail(q.event.xhr.fail);return q.verbose("Created server request",e,a),e}},set:{error:function(){q.verbose("Adding error state to element",b),b.addClass(l.error)},loading:function(){q.verbose("Adding loading state to element",b),b.addClass(l.loading),i=Date.now()}},remove:{error:function(){q.verbose("Removing error state from element",b),b.removeClass(l.error)},loading:function(){q.verbose("Removing loading state from element",b),b.removeClass(l.loading)}},get:{normalizedData:function(){return"string"==typeof s.data?s.data:JSON.stringify(s.data,Object.keys(s.data).sort())},responseFromXHR:function(e){return!!P.isPlainObject(e)&&(q.is.expectingJSON()?q.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return P.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==s.error[t]?s.error[t]:r},request:function(){return q.request||!1},xhr:function(){return q.xhr||!1},settings:function(){var e=s.beforeSend.call(m,s);return e&&(void 0!==e.success&&(q.debug("Legacy success callback detected",e),q.error(d.legacyParameters,e.success),e.onSuccess=e.success),void 0!==e.failure&&(q.debug("Legacy failure callback detected",e),q.error(d.legacyParameters,e.failure),e.onFailure=e.failure),void 0!==e.complete&&(q.debug("Legacy complete callback detected",e),q.error(d.legacyParameters,e.complete),e.onComplete=e.complete)),void 0===e&&q.error(d.noReturnedValue),!1===e?e:void 0!==e?P.extend(!0,{},e):P.extend(!0,{},s)},urlEncodedValue:function(e){var t=j.decodeURIComponent(e),r=j.encodeURIComponent(e);return t!==e?(q.debug("URL value is already encoded, avoiding double encoding",e),e):(q.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return C(h)||(q.is.input()?e.value=m.val():q.is.form()||(e.text=m.text())),e},event:function(){return C(h)||"now"===s.on?(q.debug("API called without element, no events attached"),!1):"auto"===s.on?m.is("input")?void 0!==h.oninput?"input":void 0!==h.onpropertychange?"propertychange":"keyup":m.is("form")?"submit":"click":s.on},templatedURL:function(e){if(e=e||s.action||m.data(u.action)||!1,r=s.url||m.data(u.url)||!1)return q.debug("Using specified url",r),r;if(e){if(q.debug("Looking up url for action",e,s.api),void 0===s.api[e]&&!q.is.mocked())return void q.error(d.missingAction,s.action,s.api);r=s.api[e]}else q.is.form()&&(r=m.attr("action")||b.attr("action")||!1,q.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=q.get.xhr();e&&"resolved"!==e.state()&&(q.debug("Cancelling API request"),e.abort())},reset:function(){q.remove.error(),q.remove.loading()},setting:function(e,t){if(q.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,s,e);else{if(void 0===t)return s[e];P.isPlainObject(s[e])?P.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,q,e);else{if(void 0===t)return q[e];q[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?q.performance.log(arguments):(q.debug=Function.prototype.bind.call(console.info,console,s.name+":"),q.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?q.performance.log(arguments):(q.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),q.verbose.apply(console,arguments)))},error:function(){s.silent||(q.error=Function.prototype.bind.call(console.error,console,s.name+":"),q.error.apply(console,arguments))},performance:{log:function(e){var t,r;s.performance&&(r=(t=Date.now())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(q.performance.timer),q.performance.timer=setTimeout(function(){q.performance.display()},500)},display:function(){var e=s.name+":",r=0;k=!1,clearTimeout(q.performance.timer),P.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):P.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,i=R;return e=e||D,t=t||h,"string"==typeof n&&void 0!==i&&(n=n.split(/[ .]/),o=n.length-1,P.each(n,function(e,t){var r=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(P.isPlainObject(i[r])&&e!==o)i=i[r];else{if(void 0!==i[r])return a=i[r],!1;{if(!P.isPlainObject(i[t])||e===o)return void 0!==i[t]?a=i[t]:q.error(d.method,n),!1;i=i[t]}}})),E(a)?r=a.apply(t,e):void 0!==a&&(r=a),Array.isArray(A)?A.push(r):void 0!==A?A=[A,r]:void 0!==r&&(A=r),a}};w?(void 0===R&&q.initialize(),q.invoke(T)):(void 0!==R&&R.invoke("destroy"),q.initialize())}),void 0!==A?A:this},P.api=P.fn.api,P.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);
|