@northdata/fomantic-ui 2.9.418 → 2.9.420
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/lib/semantic-ui/dist/components/accordion.css +52 -0
- package/lib/semantic-ui/dist/components/accordion.min.css +1 -1
- package/lib/semantic-ui/dist/components/button.css +322 -7
- package/lib/semantic-ui/dist/components/button.min.css +1 -1
- package/lib/semantic-ui/dist/components/header.css +13 -13
- package/lib/semantic-ui/dist/components/header.min.css +1 -1
- package/lib/semantic-ui/dist/components/icon.css +17 -8
- package/lib/semantic-ui/dist/components/icon.min.css +1 -1
- package/lib/semantic-ui/dist/components/input.css +12 -12
- package/lib/semantic-ui/dist/components/input.min.css +1 -1
- package/lib/semantic-ui/dist/components/label.css +36 -36
- package/lib/semantic-ui/dist/components/label.min.css +1 -1
- package/lib/semantic-ui/dist/components/list.css +17 -12
- package/lib/semantic-ui/dist/components/list.min.css +1 -1
- package/lib/semantic-ui/dist/components/message.css +48 -7
- package/lib/semantic-ui/dist/components/message.min.css +1 -1
- package/lib/semantic-ui/dist/components/modal.css +8 -2
- package/lib/semantic-ui/dist/components/modal.min.css +1 -1
- package/lib/semantic-ui/dist/components/table.css +462 -38
- package/lib/semantic-ui/dist/components/table.min.css +1 -1
- package/lib/semantic-ui/dist/components/toast.css +288 -0
- package/lib/semantic-ui/dist/components/toast.js +964 -0
- package/lib/semantic-ui/dist/components/toast.min.css +9 -0
- package/lib/semantic-ui/dist/components/toast.min.js +11 -0
- package/lib/semantic-ui/dist/less/site/site.variables +5 -3
- package/lib/semantic-ui/dist/less/site/variation.variables +14 -14
- package/lib/semantic-ui/dist/semantic-packed.css +1424 -138
- package/lib/semantic-ui/dist/semantic.css +1549 -215
- package/lib/semantic-ui/dist/semantic.full.css +1741 -543
- package/lib/semantic-ui/dist/semantic.full.min.css +1 -1
- package/lib/semantic-ui/dist/semantic.js +965 -0
- package/lib/semantic-ui/dist/semantic.min.css +18 -10
- package/lib/semantic-ui/dist/semantic.min.js +1 -1
- package/package.json +2 -2
|
@@ -16758,6 +16758,971 @@
|
|
|
16758
16758
|
};
|
|
16759
16759
|
})(jQuery, window, document);
|
|
16760
16760
|
|
|
16761
|
+
/*!
|
|
16762
|
+
* # Fomantic-UI 2.9.4 - Toast
|
|
16763
|
+
* https://github.com/fomantic/Fomantic-UI/
|
|
16764
|
+
*
|
|
16765
|
+
*
|
|
16766
|
+
* Released under the MIT license
|
|
16767
|
+
* https://opensource.org/licenses/MIT
|
|
16768
|
+
*
|
|
16769
|
+
*/
|
|
16770
|
+
|
|
16771
|
+
(function ($, window, document) {
|
|
16772
|
+
'use strict';
|
|
16773
|
+
|
|
16774
|
+
function isFunction(obj) {
|
|
16775
|
+
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
|
16776
|
+
}
|
|
16777
|
+
|
|
16778
|
+
window = window !== undefined && window.Math === Math
|
|
16779
|
+
? window
|
|
16780
|
+
: globalThis;
|
|
16781
|
+
|
|
16782
|
+
$.fn.toast = function (parameters) {
|
|
16783
|
+
var
|
|
16784
|
+
$allModules = $(this),
|
|
16785
|
+
$body = $('body'),
|
|
16786
|
+
|
|
16787
|
+
time = Date.now(),
|
|
16788
|
+
performance = [],
|
|
16789
|
+
|
|
16790
|
+
query = arguments[0],
|
|
16791
|
+
methodInvoked = typeof query === 'string',
|
|
16792
|
+
queryArguments = [].slice.call(arguments, 1),
|
|
16793
|
+
contextCheck = function (context, win) {
|
|
16794
|
+
var $context;
|
|
16795
|
+
if ([window, document].indexOf(context) >= 0) {
|
|
16796
|
+
$context = $(context);
|
|
16797
|
+
} else {
|
|
16798
|
+
$context = $(win.document).find(context);
|
|
16799
|
+
if ($context.length === 0) {
|
|
16800
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : $body;
|
|
16801
|
+
}
|
|
16802
|
+
}
|
|
16803
|
+
|
|
16804
|
+
return $context;
|
|
16805
|
+
},
|
|
16806
|
+
returnedValue
|
|
16807
|
+
;
|
|
16808
|
+
$allModules.each(function () {
|
|
16809
|
+
var
|
|
16810
|
+
settings = $.isPlainObject(parameters)
|
|
16811
|
+
? $.extend(true, {}, $.fn.toast.settings, parameters)
|
|
16812
|
+
: $.extend({}, $.fn.toast.settings),
|
|
16813
|
+
|
|
16814
|
+
className = settings.className,
|
|
16815
|
+
selector = settings.selector,
|
|
16816
|
+
error = settings.error,
|
|
16817
|
+
namespace = settings.namespace,
|
|
16818
|
+
fields = settings.fields,
|
|
16819
|
+
|
|
16820
|
+
eventNamespace = '.' + namespace,
|
|
16821
|
+
moduleNamespace = namespace + '-module',
|
|
16822
|
+
|
|
16823
|
+
$module = $(this),
|
|
16824
|
+
$toastBox,
|
|
16825
|
+
$toast,
|
|
16826
|
+
$actions,
|
|
16827
|
+
$progress,
|
|
16828
|
+
$progressBar,
|
|
16829
|
+
$animationObject,
|
|
16830
|
+
$close,
|
|
16831
|
+
$context = settings.context ? contextCheck(settings.context, window) : $body,
|
|
16832
|
+
|
|
16833
|
+
isToastComponent = $module.hasClass('toast') || $module.hasClass('message') || $module.hasClass('card'),
|
|
16834
|
+
|
|
16835
|
+
element = this,
|
|
16836
|
+
instance = isToastComponent ? $module.data(moduleNamespace) : undefined,
|
|
16837
|
+
|
|
16838
|
+
id,
|
|
16839
|
+
module
|
|
16840
|
+
;
|
|
16841
|
+
module = {
|
|
16842
|
+
|
|
16843
|
+
initialize: function () {
|
|
16844
|
+
module.verbose('Initializing element');
|
|
16845
|
+
module.create.id();
|
|
16846
|
+
if (!module.has.container()) {
|
|
16847
|
+
module.create.container();
|
|
16848
|
+
}
|
|
16849
|
+
if (isToastComponent || settings.message !== '' || settings.title !== '' || module.get.iconClass() !== '' || settings.showImage || module.has.configActions()) {
|
|
16850
|
+
if (typeof settings.showProgress !== 'string' || [className.top, className.bottom].indexOf(settings.showProgress) === -1) {
|
|
16851
|
+
settings.showProgress = false;
|
|
16852
|
+
}
|
|
16853
|
+
module.create.toast();
|
|
16854
|
+
if (settings.closeOnClick && (settings.closeIcon || $($toast).find(selector.input).length > 0 || module.has.configActions())) {
|
|
16855
|
+
settings.closeOnClick = false;
|
|
16856
|
+
}
|
|
16857
|
+
if (!settings.closeOnClick) {
|
|
16858
|
+
$toastBox.addClass(className.unclickable);
|
|
16859
|
+
}
|
|
16860
|
+
module.bind.events();
|
|
16861
|
+
}
|
|
16862
|
+
module.instantiate();
|
|
16863
|
+
if ($toastBox) {
|
|
16864
|
+
module.show();
|
|
16865
|
+
}
|
|
16866
|
+
},
|
|
16867
|
+
|
|
16868
|
+
instantiate: function () {
|
|
16869
|
+
module.verbose('Storing instance of toast');
|
|
16870
|
+
instance = module;
|
|
16871
|
+
$module
|
|
16872
|
+
.data(moduleNamespace, instance)
|
|
16873
|
+
;
|
|
16874
|
+
},
|
|
16875
|
+
|
|
16876
|
+
destroy: function () {
|
|
16877
|
+
if ($toastBox) {
|
|
16878
|
+
module.debug('Removing toast', $toastBox);
|
|
16879
|
+
module.unbind.events();
|
|
16880
|
+
settings.onRemove.call($toastBox, element);
|
|
16881
|
+
$toastBox.remove();
|
|
16882
|
+
$toastBox = undefined;
|
|
16883
|
+
$toast = undefined;
|
|
16884
|
+
$animationObject = undefined;
|
|
16885
|
+
$progress = undefined;
|
|
16886
|
+
$progressBar = undefined;
|
|
16887
|
+
$close = undefined;
|
|
16888
|
+
}
|
|
16889
|
+
$module
|
|
16890
|
+
.removeData(moduleNamespace)
|
|
16891
|
+
;
|
|
16892
|
+
},
|
|
16893
|
+
|
|
16894
|
+
show: function (callback) {
|
|
16895
|
+
if (settings.onShow.call($toastBox, element) === false) {
|
|
16896
|
+
module.debug('onShow callback returned false, cancelling toast animation');
|
|
16897
|
+
|
|
16898
|
+
return;
|
|
16899
|
+
}
|
|
16900
|
+
callback = callback || function () {};
|
|
16901
|
+
module.debug('Showing toast');
|
|
16902
|
+
module.animate.show(callback);
|
|
16903
|
+
},
|
|
16904
|
+
|
|
16905
|
+
close: function (callback) {
|
|
16906
|
+
if (settings.onHide.call($toastBox, element) === false) {
|
|
16907
|
+
module.debug('onHide callback returned false, cancelling toast animation');
|
|
16908
|
+
|
|
16909
|
+
return;
|
|
16910
|
+
}
|
|
16911
|
+
callback = callback || function () {};
|
|
16912
|
+
module.debug('Closing toast');
|
|
16913
|
+
module.remove.visible();
|
|
16914
|
+
module.unbind.events();
|
|
16915
|
+
module.animate.close(callback);
|
|
16916
|
+
},
|
|
16917
|
+
|
|
16918
|
+
create: {
|
|
16919
|
+
container: function () {
|
|
16920
|
+
module.verbose('Creating container');
|
|
16921
|
+
$context.append($('<div/>', {
|
|
16922
|
+
class: settings.position + ' ' + className.container + ' '
|
|
16923
|
+
+ (settings.horizontal ? className.horizontal : '') + ' '
|
|
16924
|
+
+ (settings.context && settings.context !== 'body' ? className.absolute : ''),
|
|
16925
|
+
}));
|
|
16926
|
+
},
|
|
16927
|
+
id: function () {
|
|
16928
|
+
id = (Math.random().toString(16) + '000000000').slice(2, 10);
|
|
16929
|
+
module.verbose('Creating unique id for element', id);
|
|
16930
|
+
},
|
|
16931
|
+
toast: function () {
|
|
16932
|
+
$toastBox = $('<div/>', { class: className.box });
|
|
16933
|
+
var iconClass = module.get.iconClass();
|
|
16934
|
+
if (!isToastComponent) {
|
|
16935
|
+
module.verbose('Creating toast');
|
|
16936
|
+
$toast = $('<div/>', { role: 'alert' });
|
|
16937
|
+
var $content = $('<div/>', { class: className.content });
|
|
16938
|
+
if (iconClass !== '') {
|
|
16939
|
+
$toast.append($('<i/>', { class: iconClass + ' ' + className.icon }));
|
|
16940
|
+
}
|
|
16941
|
+
|
|
16942
|
+
if (settings.showImage) {
|
|
16943
|
+
$toast.append($('<img>', {
|
|
16944
|
+
class: className.image + ' ' + settings.classImage,
|
|
16945
|
+
src: settings.showImage,
|
|
16946
|
+
alt: settings.alt || '',
|
|
16947
|
+
}));
|
|
16948
|
+
}
|
|
16949
|
+
if (settings.title !== '') {
|
|
16950
|
+
var titleId = '_' + module.get.id() + 'title';
|
|
16951
|
+
$toast.attr('aria-labelledby', titleId);
|
|
16952
|
+
$content.append($('<div/>', {
|
|
16953
|
+
class: className.title,
|
|
16954
|
+
id: titleId,
|
|
16955
|
+
html: module.helpers.escape(settings.title, settings.preserveHTML),
|
|
16956
|
+
}));
|
|
16957
|
+
}
|
|
16958
|
+
var descId = '_' + module.get.id() + 'desc';
|
|
16959
|
+
$toast.attr('aria-describedby', descId);
|
|
16960
|
+
$content.append($('<div/>', {
|
|
16961
|
+
class: className.message,
|
|
16962
|
+
id: descId,
|
|
16963
|
+
html: module.helpers.escape(settings.message, settings.preserveHTML),
|
|
16964
|
+
}));
|
|
16965
|
+
|
|
16966
|
+
$toast
|
|
16967
|
+
.addClass(settings.class + ' ' + className.toast)
|
|
16968
|
+
.append($content)
|
|
16969
|
+
;
|
|
16970
|
+
$toast.css('opacity', String(settings.opacity));
|
|
16971
|
+
if (settings.closeIcon) {
|
|
16972
|
+
$close = $('<i/>', {
|
|
16973
|
+
class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : ''),
|
|
16974
|
+
role: 'button',
|
|
16975
|
+
tabindex: 0,
|
|
16976
|
+
'aria-label': settings.text.close,
|
|
16977
|
+
});
|
|
16978
|
+
if ($close.hasClass(className.left)) {
|
|
16979
|
+
$toast.prepend($close);
|
|
16980
|
+
} else {
|
|
16981
|
+
$toast.append($close);
|
|
16982
|
+
}
|
|
16983
|
+
}
|
|
16984
|
+
} else {
|
|
16985
|
+
$toast = settings.cloneModule ? $module.clone().removeAttr('id') : $module;
|
|
16986
|
+
$close = $toast.find('> i' + module.helpers.toClass(className.close));
|
|
16987
|
+
settings.closeIcon = $close.length > 0;
|
|
16988
|
+
if (iconClass !== '') {
|
|
16989
|
+
$toast.find(selector.icon).attr('class', iconClass + ' ' + className.icon);
|
|
16990
|
+
}
|
|
16991
|
+
if (settings.showImage) {
|
|
16992
|
+
$toast.find(selector.image).attr('src', settings.showImage).attr('alt', settings.alt || '');
|
|
16993
|
+
}
|
|
16994
|
+
if (settings.title !== '') {
|
|
16995
|
+
$toast.find(selector.title).html(module.helpers.escape(settings.title, settings.preserveHTML));
|
|
16996
|
+
}
|
|
16997
|
+
if (settings.message !== '') {
|
|
16998
|
+
$toast.find(selector.message).html(module.helpers.escape(settings.message, settings.preserveHTML));
|
|
16999
|
+
}
|
|
17000
|
+
}
|
|
17001
|
+
if ($toast.hasClass(className.compact)) {
|
|
17002
|
+
settings.compact = true;
|
|
17003
|
+
}
|
|
17004
|
+
if ($toast.hasClass('card')) {
|
|
17005
|
+
settings.compact = false;
|
|
17006
|
+
}
|
|
17007
|
+
$actions = $toast.find('.actions');
|
|
17008
|
+
if (module.has.configActions()) {
|
|
17009
|
+
if ($actions.length === 0) {
|
|
17010
|
+
$actions = $('<div/>', { class: className.actions + ' ' + (settings.classActions || '') }).appendTo($toast);
|
|
17011
|
+
}
|
|
17012
|
+
if ($toast.hasClass('card') && !$actions.hasClass(className.attached)) {
|
|
17013
|
+
$actions.addClass(className.extraContent);
|
|
17014
|
+
if ($actions.hasClass(className.vertical)) {
|
|
17015
|
+
$actions.removeClass(className.vertical);
|
|
17016
|
+
module.error(error.verticalCard);
|
|
17017
|
+
}
|
|
17018
|
+
}
|
|
17019
|
+
settings.actions.forEach(function (el) {
|
|
17020
|
+
var
|
|
17021
|
+
icon = el[fields.icon]
|
|
17022
|
+
? '<i ' + (el[fields.text] ? 'aria-hidden="true"' : '')
|
|
17023
|
+
+ ' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>'
|
|
17024
|
+
: '',
|
|
17025
|
+
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
|
17026
|
+
cls = module.helpers.deQuote(el[fields.class] || ''),
|
|
17027
|
+
click = el[fields.click] && isFunction(el[fields.click])
|
|
17028
|
+
? el[fields.click]
|
|
17029
|
+
: function () {}
|
|
17030
|
+
;
|
|
17031
|
+
$actions.append($('<button/>', {
|
|
17032
|
+
html: icon + text,
|
|
17033
|
+
'aria-label': (el[fields.text] || el[fields.icon] || '').replace(/<[^>]+(>|$)/g, ''),
|
|
17034
|
+
class: className.button + ' ' + cls,
|
|
17035
|
+
on: {
|
|
17036
|
+
click: function () {
|
|
17037
|
+
var $button = $(this);
|
|
17038
|
+
if ($button.is(selector.approve) || $button.is(selector.deny) || click.call(element, $module) === false) {
|
|
17039
|
+
return;
|
|
17040
|
+
}
|
|
17041
|
+
module.close();
|
|
17042
|
+
},
|
|
17043
|
+
},
|
|
17044
|
+
}));
|
|
17045
|
+
});
|
|
17046
|
+
}
|
|
17047
|
+
if ($actions && $actions.hasClass(className.vertical)) {
|
|
17048
|
+
$toast.addClass(className.vertical);
|
|
17049
|
+
}
|
|
17050
|
+
if ($actions.length > 0 && !$actions.hasClass(className.attached)) {
|
|
17051
|
+
if ($actions && (!$actions.hasClass(className.basic) || $actions.hasClass(className.left))) {
|
|
17052
|
+
$toast.addClass(className.actions);
|
|
17053
|
+
}
|
|
17054
|
+
}
|
|
17055
|
+
if (settings.displayTime === 'auto') {
|
|
17056
|
+
settings.displayTime = Math.max(settings.minDisplayTime, ($toast.text().split(' ').length / settings.wordsPerMinute) * 60000);
|
|
17057
|
+
}
|
|
17058
|
+
$toastBox.append($toast);
|
|
17059
|
+
|
|
17060
|
+
if ($actions.length > 0 && $actions.hasClass(className.attached)) {
|
|
17061
|
+
$actions.addClass(className.buttons);
|
|
17062
|
+
$actions.detach();
|
|
17063
|
+
$toast.addClass(className.attached);
|
|
17064
|
+
if (!$actions.hasClass(className.vertical)) {
|
|
17065
|
+
if ($actions.hasClass(className.top)) {
|
|
17066
|
+
$toastBox.prepend($actions);
|
|
17067
|
+
$toast.addClass(className.bottom);
|
|
17068
|
+
} else {
|
|
17069
|
+
$toastBox.append($actions);
|
|
17070
|
+
$toast.addClass(className.top);
|
|
17071
|
+
}
|
|
17072
|
+
} else {
|
|
17073
|
+
$toast.wrap(
|
|
17074
|
+
$('<div/>', {
|
|
17075
|
+
class: className.vertical + ' '
|
|
17076
|
+
+ className.attached + ' '
|
|
17077
|
+
+ (settings.compact ? className.compact : ''),
|
|
17078
|
+
})
|
|
17079
|
+
);
|
|
17080
|
+
if ($actions.hasClass(className.left)) {
|
|
17081
|
+
$toast.addClass(className.left).parent().addClass(className.left).prepend($actions);
|
|
17082
|
+
} else {
|
|
17083
|
+
$toast.parent().append($actions);
|
|
17084
|
+
}
|
|
17085
|
+
}
|
|
17086
|
+
}
|
|
17087
|
+
if ($module !== $toast) {
|
|
17088
|
+
$module = $toast;
|
|
17089
|
+
element = $toast[0];
|
|
17090
|
+
}
|
|
17091
|
+
if (settings.displayTime > 0) {
|
|
17092
|
+
var progressingClass = className.progressing + ' ' + (settings.pauseOnHover ? className.pausable : '');
|
|
17093
|
+
if (settings.showProgress) {
|
|
17094
|
+
$progress = $('<div/>', {
|
|
17095
|
+
class: className.progress + ' ' + (settings.classProgress || settings.class),
|
|
17096
|
+
'data-percent': '',
|
|
17097
|
+
});
|
|
17098
|
+
if (!settings.classProgress) {
|
|
17099
|
+
if ($toast.hasClass('toast') && !$toast.hasClass(className.inverted)) {
|
|
17100
|
+
$progress.addClass(className.inverted);
|
|
17101
|
+
} else {
|
|
17102
|
+
$progress.removeClass(className.inverted);
|
|
17103
|
+
}
|
|
17104
|
+
}
|
|
17105
|
+
$progressBar = $('<div/>', { class: 'bar ' + (settings.progressUp ? 'up ' : 'down ') + progressingClass });
|
|
17106
|
+
$progress
|
|
17107
|
+
.addClass(settings.showProgress)
|
|
17108
|
+
.append($progressBar)
|
|
17109
|
+
;
|
|
17110
|
+
if ($progress.hasClass(className.top)) {
|
|
17111
|
+
$toastBox.prepend($progress);
|
|
17112
|
+
} else {
|
|
17113
|
+
$toastBox.append($progress);
|
|
17114
|
+
}
|
|
17115
|
+
$progressBar.css('animation-duration', settings.displayTime / 1000 + 's');
|
|
17116
|
+
}
|
|
17117
|
+
$animationObject = $('<span/>', { class: 'wait ' + progressingClass });
|
|
17118
|
+
$animationObject.css('animation-duration', settings.displayTime / 1000 + 's');
|
|
17119
|
+
$animationObject.appendTo($toast);
|
|
17120
|
+
}
|
|
17121
|
+
if (settings.compact) {
|
|
17122
|
+
$toastBox.addClass(className.compact);
|
|
17123
|
+
$toast.addClass(className.compact);
|
|
17124
|
+
if ($progress) {
|
|
17125
|
+
$progress.addClass(className.compact);
|
|
17126
|
+
}
|
|
17127
|
+
}
|
|
17128
|
+
if (settings.newestOnTop) {
|
|
17129
|
+
$toastBox.prependTo(module.get.container());
|
|
17130
|
+
} else {
|
|
17131
|
+
$toastBox.appendTo(module.get.container());
|
|
17132
|
+
}
|
|
17133
|
+
},
|
|
17134
|
+
},
|
|
17135
|
+
|
|
17136
|
+
bind: {
|
|
17137
|
+
events: function () {
|
|
17138
|
+
module.debug('Binding events to toast');
|
|
17139
|
+
if (settings.closeIcon) {
|
|
17140
|
+
$close.on('click' + eventNamespace, module.event.close);
|
|
17141
|
+
}
|
|
17142
|
+
$toast.on('click' + eventNamespace, module.event.click);
|
|
17143
|
+
if ($animationObject) {
|
|
17144
|
+
$animationObject.on('animationend' + eventNamespace, module.event.close);
|
|
17145
|
+
}
|
|
17146
|
+
$toastBox
|
|
17147
|
+
.on('click' + eventNamespace, selector.approve, module.event.approve)
|
|
17148
|
+
.on('click' + eventNamespace, selector.deny, module.event.deny)
|
|
17149
|
+
;
|
|
17150
|
+
},
|
|
17151
|
+
},
|
|
17152
|
+
|
|
17153
|
+
unbind: {
|
|
17154
|
+
events: function () {
|
|
17155
|
+
module.debug('Unbinding events to toast');
|
|
17156
|
+
if (settings.closeIcon) {
|
|
17157
|
+
$close.off('click' + eventNamespace);
|
|
17158
|
+
}
|
|
17159
|
+
$toast.off('click' + eventNamespace);
|
|
17160
|
+
if ($animationObject) {
|
|
17161
|
+
$animationObject.off('animationend' + eventNamespace);
|
|
17162
|
+
}
|
|
17163
|
+
$toastBox
|
|
17164
|
+
.off('click' + eventNamespace)
|
|
17165
|
+
;
|
|
17166
|
+
},
|
|
17167
|
+
},
|
|
17168
|
+
|
|
17169
|
+
animate: {
|
|
17170
|
+
show: function (callback) {
|
|
17171
|
+
callback = isFunction(callback) ? callback : function () {};
|
|
17172
|
+
if (settings.transition && module.can.useElement('transition')) {
|
|
17173
|
+
module.set.visible();
|
|
17174
|
+
$toastBox
|
|
17175
|
+
.transition({
|
|
17176
|
+
animation: settings.transition.showMethod + ' in',
|
|
17177
|
+
queue: false,
|
|
17178
|
+
debug: settings.debug,
|
|
17179
|
+
verbose: settings.verbose,
|
|
17180
|
+
silent: settings.silent,
|
|
17181
|
+
duration: settings.transition.showDuration,
|
|
17182
|
+
onComplete: function () {
|
|
17183
|
+
callback.call($toastBox, element);
|
|
17184
|
+
settings.onVisible.call($toastBox, element);
|
|
17185
|
+
},
|
|
17186
|
+
})
|
|
17187
|
+
;
|
|
17188
|
+
}
|
|
17189
|
+
},
|
|
17190
|
+
close: function (callback) {
|
|
17191
|
+
callback = isFunction(callback) ? callback : function () {};
|
|
17192
|
+
if (settings.transition && $.fn.transition !== undefined) {
|
|
17193
|
+
$toastBox
|
|
17194
|
+
.transition({
|
|
17195
|
+
animation: settings.transition.hideMethod + ' out',
|
|
17196
|
+
queue: false,
|
|
17197
|
+
duration: settings.transition.hideDuration,
|
|
17198
|
+
debug: settings.debug,
|
|
17199
|
+
verbose: settings.verbose,
|
|
17200
|
+
silent: settings.silent,
|
|
17201
|
+
interval: 50,
|
|
17202
|
+
|
|
17203
|
+
onBeforeHide: function (callback) {
|
|
17204
|
+
callback = isFunction(callback) ? callback : function () {};
|
|
17205
|
+
if (settings.transition.closeEasing !== '') {
|
|
17206
|
+
if ($toastBox) {
|
|
17207
|
+
$toastBox.css('opacity', '0');
|
|
17208
|
+
$toastBox.wrap('<div/>').parent().hide(settings.transition.closeDuration, settings.transition.closeEasing, function () {
|
|
17209
|
+
if ($toastBox) {
|
|
17210
|
+
$toastBox.parent().remove();
|
|
17211
|
+
callback.call($toastBox);
|
|
17212
|
+
}
|
|
17213
|
+
});
|
|
17214
|
+
}
|
|
17215
|
+
} else {
|
|
17216
|
+
callback.call($toastBox);
|
|
17217
|
+
}
|
|
17218
|
+
},
|
|
17219
|
+
onComplete: function () {
|
|
17220
|
+
callback.call($toastBox, element);
|
|
17221
|
+
settings.onHidden.call($toastBox, element);
|
|
17222
|
+
module.destroy();
|
|
17223
|
+
},
|
|
17224
|
+
})
|
|
17225
|
+
;
|
|
17226
|
+
} else {
|
|
17227
|
+
module.error(error.noTransition);
|
|
17228
|
+
}
|
|
17229
|
+
},
|
|
17230
|
+
pause: function () {
|
|
17231
|
+
$animationObject.css('animationPlayState', 'paused');
|
|
17232
|
+
if ($progressBar) {
|
|
17233
|
+
$progressBar.css('animationPlayState', 'paused');
|
|
17234
|
+
}
|
|
17235
|
+
},
|
|
17236
|
+
continue: function () {
|
|
17237
|
+
$animationObject.css('animationPlayState', 'running');
|
|
17238
|
+
if ($progressBar) {
|
|
17239
|
+
$progressBar.css('animationPlayState', 'running');
|
|
17240
|
+
}
|
|
17241
|
+
},
|
|
17242
|
+
},
|
|
17243
|
+
|
|
17244
|
+
has: {
|
|
17245
|
+
container: function () {
|
|
17246
|
+
module.verbose('Determining if there is already a container');
|
|
17247
|
+
|
|
17248
|
+
return module.get.containers().length > 0;
|
|
17249
|
+
},
|
|
17250
|
+
toast: function () {
|
|
17251
|
+
return !!module.get.toast();
|
|
17252
|
+
},
|
|
17253
|
+
toasts: function () {
|
|
17254
|
+
return module.get.toasts().length > 0;
|
|
17255
|
+
},
|
|
17256
|
+
configActions: function () {
|
|
17257
|
+
return Array.isArray(settings.actions) && settings.actions.length > 0;
|
|
17258
|
+
},
|
|
17259
|
+
},
|
|
17260
|
+
|
|
17261
|
+
get: {
|
|
17262
|
+
id: function () {
|
|
17263
|
+
return id;
|
|
17264
|
+
},
|
|
17265
|
+
containers: function () {
|
|
17266
|
+
return $context.children(module.helpers.toClass(settings.position) + selector.container
|
|
17267
|
+
+ (settings.horizontal
|
|
17268
|
+
? module.helpers.toClass(className.horizontal)
|
|
17269
|
+
: ':not(' + module.helpers.toClass(className.horizontal) + ')')
|
|
17270
|
+
+ (settings.context && settings.context !== 'body'
|
|
17271
|
+
? module.helpers.toClass(className.absolute)
|
|
17272
|
+
: ':not(' + module.helpers.toClass(className.absolute) + ')'));
|
|
17273
|
+
},
|
|
17274
|
+
container: function () {
|
|
17275
|
+
return module.get.containers()[0];
|
|
17276
|
+
},
|
|
17277
|
+
toastBox: function () {
|
|
17278
|
+
return $toastBox || null;
|
|
17279
|
+
},
|
|
17280
|
+
toast: function () {
|
|
17281
|
+
return $toast || null;
|
|
17282
|
+
},
|
|
17283
|
+
toasts: function () {
|
|
17284
|
+
return $(module.get.container()).find(selector.box);
|
|
17285
|
+
},
|
|
17286
|
+
iconClass: function () {
|
|
17287
|
+
return typeof settings.showIcon === 'string'
|
|
17288
|
+
? settings.showIcon
|
|
17289
|
+
: (settings.showIcon && settings.icons[settings.class]
|
|
17290
|
+
? settings.icons[settings.class]
|
|
17291
|
+
: '');
|
|
17292
|
+
},
|
|
17293
|
+
remainingTime: function () {
|
|
17294
|
+
return $animationObject ? $animationObject.css('opacity') * settings.displayTime : 0;
|
|
17295
|
+
},
|
|
17296
|
+
},
|
|
17297
|
+
|
|
17298
|
+
set: {
|
|
17299
|
+
visible: function () {
|
|
17300
|
+
$toast.addClass(className.visible);
|
|
17301
|
+
},
|
|
17302
|
+
},
|
|
17303
|
+
|
|
17304
|
+
remove: {
|
|
17305
|
+
visible: function () {
|
|
17306
|
+
$toast.removeClass(className.visible);
|
|
17307
|
+
},
|
|
17308
|
+
},
|
|
17309
|
+
|
|
17310
|
+
event: {
|
|
17311
|
+
close: function () {
|
|
17312
|
+
module.close();
|
|
17313
|
+
},
|
|
17314
|
+
click: function (event) {
|
|
17315
|
+
if ($(event.target).closest(selector.clickable).length === 0) {
|
|
17316
|
+
if (settings.onClick.call($toastBox, element) === false || !settings.closeOnClick) {
|
|
17317
|
+
module.verbose('Click callback returned false or close denied by setting cancelling close');
|
|
17318
|
+
|
|
17319
|
+
return;
|
|
17320
|
+
}
|
|
17321
|
+
module.close();
|
|
17322
|
+
}
|
|
17323
|
+
},
|
|
17324
|
+
approve: function () {
|
|
17325
|
+
if (settings.onApprove.call(element, $module) === false) {
|
|
17326
|
+
module.verbose('Approve callback returned false cancelling close');
|
|
17327
|
+
|
|
17328
|
+
return;
|
|
17329
|
+
}
|
|
17330
|
+
module.close();
|
|
17331
|
+
},
|
|
17332
|
+
deny: function () {
|
|
17333
|
+
if (settings.onDeny.call(element, $module) === false) {
|
|
17334
|
+
module.verbose('Deny callback returned false cancelling close');
|
|
17335
|
+
|
|
17336
|
+
return;
|
|
17337
|
+
}
|
|
17338
|
+
module.close();
|
|
17339
|
+
},
|
|
17340
|
+
},
|
|
17341
|
+
|
|
17342
|
+
helpers: {
|
|
17343
|
+
toClass: function (selector) {
|
|
17344
|
+
var
|
|
17345
|
+
classes = selector.trim().split(/\s+/),
|
|
17346
|
+
result = ''
|
|
17347
|
+
;
|
|
17348
|
+
|
|
17349
|
+
classes.forEach(function (element) {
|
|
17350
|
+
result += '.' + element;
|
|
17351
|
+
});
|
|
17352
|
+
|
|
17353
|
+
return result;
|
|
17354
|
+
},
|
|
17355
|
+
deQuote: function (string) {
|
|
17356
|
+
return String(string).replace(/"/g, '');
|
|
17357
|
+
},
|
|
17358
|
+
escape: function (string, preserveHTML) {
|
|
17359
|
+
if (preserveHTML) {
|
|
17360
|
+
return string;
|
|
17361
|
+
}
|
|
17362
|
+
var
|
|
17363
|
+
badChars = /["'<>`]/g,
|
|
17364
|
+
shouldEscape = /["&'<>`]/,
|
|
17365
|
+
escape = {
|
|
17366
|
+
'<': '<',
|
|
17367
|
+
'>': '>',
|
|
17368
|
+
'"': '"',
|
|
17369
|
+
"'": ''',
|
|
17370
|
+
'`': '`',
|
|
17371
|
+
},
|
|
17372
|
+
escapedChar = function (chr) {
|
|
17373
|
+
return escape[chr];
|
|
17374
|
+
}
|
|
17375
|
+
;
|
|
17376
|
+
if (shouldEscape.test(string)) {
|
|
17377
|
+
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
|
17378
|
+
|
|
17379
|
+
return string.replace(badChars, escapedChar);
|
|
17380
|
+
}
|
|
17381
|
+
|
|
17382
|
+
return string;
|
|
17383
|
+
},
|
|
17384
|
+
},
|
|
17385
|
+
|
|
17386
|
+
can: {
|
|
17387
|
+
useElement: function (element) {
|
|
17388
|
+
if ($.fn[element] !== undefined) {
|
|
17389
|
+
return true;
|
|
17390
|
+
}
|
|
17391
|
+
module.error(error.noElement.replace('{element}', element));
|
|
17392
|
+
|
|
17393
|
+
return false;
|
|
17394
|
+
},
|
|
17395
|
+
},
|
|
17396
|
+
|
|
17397
|
+
setting: function (name, value) {
|
|
17398
|
+
module.debug('Changing setting', name, value);
|
|
17399
|
+
if ($.isPlainObject(name)) {
|
|
17400
|
+
$.extend(true, settings, name);
|
|
17401
|
+
} else if (value !== undefined) {
|
|
17402
|
+
if ($.isPlainObject(settings[name])) {
|
|
17403
|
+
$.extend(true, settings[name], value);
|
|
17404
|
+
} else {
|
|
17405
|
+
settings[name] = value;
|
|
17406
|
+
}
|
|
17407
|
+
} else {
|
|
17408
|
+
return settings[name];
|
|
17409
|
+
}
|
|
17410
|
+
},
|
|
17411
|
+
internal: function (name, value) {
|
|
17412
|
+
if ($.isPlainObject(name)) {
|
|
17413
|
+
$.extend(true, module, name);
|
|
17414
|
+
} else if (value !== undefined) {
|
|
17415
|
+
module[name] = value;
|
|
17416
|
+
} else {
|
|
17417
|
+
return module[name];
|
|
17418
|
+
}
|
|
17419
|
+
},
|
|
17420
|
+
debug: function () {
|
|
17421
|
+
if (!settings.silent && settings.debug) {
|
|
17422
|
+
if (settings.performance) {
|
|
17423
|
+
module.performance.log(arguments);
|
|
17424
|
+
} else {
|
|
17425
|
+
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
|
17426
|
+
module.debug.apply(console, arguments);
|
|
17427
|
+
}
|
|
17428
|
+
}
|
|
17429
|
+
},
|
|
17430
|
+
verbose: function () {
|
|
17431
|
+
if (!settings.silent && settings.verbose && settings.debug) {
|
|
17432
|
+
if (settings.performance) {
|
|
17433
|
+
module.performance.log(arguments);
|
|
17434
|
+
} else {
|
|
17435
|
+
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
|
17436
|
+
module.verbose.apply(console, arguments);
|
|
17437
|
+
}
|
|
17438
|
+
}
|
|
17439
|
+
},
|
|
17440
|
+
error: function () {
|
|
17441
|
+
if (!settings.silent) {
|
|
17442
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
|
17443
|
+
module.error.apply(console, arguments);
|
|
17444
|
+
}
|
|
17445
|
+
},
|
|
17446
|
+
performance: {
|
|
17447
|
+
log: function (message) {
|
|
17448
|
+
var
|
|
17449
|
+
currentTime,
|
|
17450
|
+
executionTime,
|
|
17451
|
+
previousTime
|
|
17452
|
+
;
|
|
17453
|
+
if (settings.performance) {
|
|
17454
|
+
currentTime = Date.now();
|
|
17455
|
+
previousTime = time || currentTime;
|
|
17456
|
+
executionTime = currentTime - previousTime;
|
|
17457
|
+
time = currentTime;
|
|
17458
|
+
performance.push({
|
|
17459
|
+
Name: message[0],
|
|
17460
|
+
Arguments: [].slice.call(message, 1) || '',
|
|
17461
|
+
Element: element,
|
|
17462
|
+
'Execution Time': executionTime,
|
|
17463
|
+
});
|
|
17464
|
+
}
|
|
17465
|
+
clearTimeout(module.performance.timer);
|
|
17466
|
+
module.performance.timer = setTimeout(function () {
|
|
17467
|
+
module.performance.display();
|
|
17468
|
+
}, 500);
|
|
17469
|
+
},
|
|
17470
|
+
display: function () {
|
|
17471
|
+
var
|
|
17472
|
+
title = settings.name + ':',
|
|
17473
|
+
totalTime = 0
|
|
17474
|
+
;
|
|
17475
|
+
time = false;
|
|
17476
|
+
clearTimeout(module.performance.timer);
|
|
17477
|
+
$.each(performance, function (index, data) {
|
|
17478
|
+
totalTime += data['Execution Time'];
|
|
17479
|
+
});
|
|
17480
|
+
title += ' ' + totalTime + 'ms';
|
|
17481
|
+
if (performance.length > 0) {
|
|
17482
|
+
console.groupCollapsed(title);
|
|
17483
|
+
if (console.table) {
|
|
17484
|
+
console.table(performance);
|
|
17485
|
+
} else {
|
|
17486
|
+
$.each(performance, function (index, data) {
|
|
17487
|
+
console.log(data.Name + ': ' + data['Execution Time'] + 'ms');
|
|
17488
|
+
});
|
|
17489
|
+
}
|
|
17490
|
+
console.groupEnd();
|
|
17491
|
+
}
|
|
17492
|
+
performance = [];
|
|
17493
|
+
},
|
|
17494
|
+
},
|
|
17495
|
+
invoke: function (query, passedArguments, context) {
|
|
17496
|
+
var
|
|
17497
|
+
object = instance,
|
|
17498
|
+
maxDepth,
|
|
17499
|
+
found,
|
|
17500
|
+
response
|
|
17501
|
+
;
|
|
17502
|
+
passedArguments = passedArguments || queryArguments;
|
|
17503
|
+
context = context || element;
|
|
17504
|
+
if (typeof query === 'string' && object !== undefined) {
|
|
17505
|
+
query = query.split(/[ .]/);
|
|
17506
|
+
maxDepth = query.length - 1;
|
|
17507
|
+
$.each(query, function (depth, value) {
|
|
17508
|
+
var camelCaseValue = depth !== maxDepth
|
|
17509
|
+
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
|
17510
|
+
: query
|
|
17511
|
+
;
|
|
17512
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
|
17513
|
+
object = object[camelCaseValue];
|
|
17514
|
+
} else if (object[camelCaseValue] !== undefined) {
|
|
17515
|
+
found = object[camelCaseValue];
|
|
17516
|
+
|
|
17517
|
+
return false;
|
|
17518
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
|
17519
|
+
object = object[value];
|
|
17520
|
+
} else if (object[value] !== undefined) {
|
|
17521
|
+
found = object[value];
|
|
17522
|
+
|
|
17523
|
+
return false;
|
|
17524
|
+
} else {
|
|
17525
|
+
module.error(error.method, query);
|
|
17526
|
+
|
|
17527
|
+
return false;
|
|
17528
|
+
}
|
|
17529
|
+
});
|
|
17530
|
+
}
|
|
17531
|
+
if (isFunction(found)) {
|
|
17532
|
+
response = found.apply(context, passedArguments);
|
|
17533
|
+
} else if (found !== undefined) {
|
|
17534
|
+
response = found;
|
|
17535
|
+
}
|
|
17536
|
+
if (Array.isArray(returnedValue)) {
|
|
17537
|
+
returnedValue.push(response);
|
|
17538
|
+
} else if (returnedValue !== undefined) {
|
|
17539
|
+
returnedValue = [returnedValue, response];
|
|
17540
|
+
} else if (response !== undefined) {
|
|
17541
|
+
returnedValue = response;
|
|
17542
|
+
}
|
|
17543
|
+
|
|
17544
|
+
return found;
|
|
17545
|
+
},
|
|
17546
|
+
};
|
|
17547
|
+
|
|
17548
|
+
if (methodInvoked) {
|
|
17549
|
+
if (instance === undefined) {
|
|
17550
|
+
module.initialize();
|
|
17551
|
+
}
|
|
17552
|
+
module.invoke(query);
|
|
17553
|
+
} else {
|
|
17554
|
+
if (instance !== undefined) {
|
|
17555
|
+
instance.invoke('destroy');
|
|
17556
|
+
}
|
|
17557
|
+
module.initialize();
|
|
17558
|
+
returnedValue = $module;
|
|
17559
|
+
}
|
|
17560
|
+
});
|
|
17561
|
+
|
|
17562
|
+
return returnedValue !== undefined
|
|
17563
|
+
? returnedValue
|
|
17564
|
+
: this;
|
|
17565
|
+
};
|
|
17566
|
+
$.toast = $.fn.toast;
|
|
17567
|
+
|
|
17568
|
+
$.fn.toast.settings = {
|
|
17569
|
+
|
|
17570
|
+
name: 'Toast',
|
|
17571
|
+
namespace: 'toast',
|
|
17572
|
+
|
|
17573
|
+
silent: false,
|
|
17574
|
+
debug: false,
|
|
17575
|
+
verbose: false,
|
|
17576
|
+
performance: true,
|
|
17577
|
+
|
|
17578
|
+
context: 'body',
|
|
17579
|
+
|
|
17580
|
+
position: 'top right',
|
|
17581
|
+
horizontal: false,
|
|
17582
|
+
class: 'neutral',
|
|
17583
|
+
classProgress: false,
|
|
17584
|
+
classActions: false,
|
|
17585
|
+
classImage: 'mini',
|
|
17586
|
+
|
|
17587
|
+
title: '',
|
|
17588
|
+
message: '',
|
|
17589
|
+
displayTime: 3000, // set to zero to require manually dismissal, otherwise hides on its own
|
|
17590
|
+
minDisplayTime: 1000, // minimum displaytime in case displayTime is set to 'auto'
|
|
17591
|
+
wordsPerMinute: 120,
|
|
17592
|
+
showIcon: false,
|
|
17593
|
+
newestOnTop: false,
|
|
17594
|
+
showProgress: false,
|
|
17595
|
+
pauseOnHover: true,
|
|
17596
|
+
progressUp: false, // if true, the bar will start at 0% and increase to 100%
|
|
17597
|
+
opacity: 1,
|
|
17598
|
+
compact: true,
|
|
17599
|
+
closeIcon: false,
|
|
17600
|
+
closeOnClick: true,
|
|
17601
|
+
cloneModule: true,
|
|
17602
|
+
actions: false,
|
|
17603
|
+
preserveHTML: true,
|
|
17604
|
+
showImage: false,
|
|
17605
|
+
alt: false,
|
|
17606
|
+
|
|
17607
|
+
// transition settings
|
|
17608
|
+
transition: {
|
|
17609
|
+
showMethod: 'scale',
|
|
17610
|
+
showDuration: 500,
|
|
17611
|
+
hideMethod: 'scale',
|
|
17612
|
+
hideDuration: 500,
|
|
17613
|
+
closeEasing: 'easeOutCubic', // Set to empty string to stack the closed toast area immediately (old behaviour)
|
|
17614
|
+
closeDuration: 500,
|
|
17615
|
+
},
|
|
17616
|
+
|
|
17617
|
+
error: {
|
|
17618
|
+
method: 'The method you called is not defined.',
|
|
17619
|
+
noElement: 'This module requires ui {element}',
|
|
17620
|
+
verticalCard: 'Vertical but not attached actions are not supported for card layout',
|
|
17621
|
+
},
|
|
17622
|
+
|
|
17623
|
+
className: {
|
|
17624
|
+
container: 'ui toast-container',
|
|
17625
|
+
absolute: 'absolute',
|
|
17626
|
+
box: 'floating toast-box',
|
|
17627
|
+
progress: 'ui attached active progress',
|
|
17628
|
+
toast: 'ui toast',
|
|
17629
|
+
icon: 'centered icon',
|
|
17630
|
+
visible: 'visible',
|
|
17631
|
+
content: 'content',
|
|
17632
|
+
title: 'ui header',
|
|
17633
|
+
message: 'message',
|
|
17634
|
+
actions: 'actions',
|
|
17635
|
+
extraContent: 'extra content',
|
|
17636
|
+
button: 'ui button',
|
|
17637
|
+
buttons: 'ui buttons',
|
|
17638
|
+
close: 'close icon',
|
|
17639
|
+
image: 'ui image',
|
|
17640
|
+
vertical: 'vertical',
|
|
17641
|
+
horizontal: 'horizontal',
|
|
17642
|
+
attached: 'attached',
|
|
17643
|
+
inverted: 'inverted',
|
|
17644
|
+
compact: 'compact',
|
|
17645
|
+
pausable: 'pausable',
|
|
17646
|
+
progressing: 'progressing',
|
|
17647
|
+
top: 'top',
|
|
17648
|
+
bottom: 'bottom',
|
|
17649
|
+
left: 'left',
|
|
17650
|
+
basic: 'basic',
|
|
17651
|
+
unclickable: 'unclickable',
|
|
17652
|
+
},
|
|
17653
|
+
|
|
17654
|
+
text: {
|
|
17655
|
+
close: 'Close',
|
|
17656
|
+
},
|
|
17657
|
+
|
|
17658
|
+
icons: {
|
|
17659
|
+
info: 'info',
|
|
17660
|
+
success: 'checkmark',
|
|
17661
|
+
warning: 'warning',
|
|
17662
|
+
error: 'times',
|
|
17663
|
+
},
|
|
17664
|
+
|
|
17665
|
+
selector: {
|
|
17666
|
+
container: '.ui.toast-container',
|
|
17667
|
+
box: '.toast-box',
|
|
17668
|
+
toast: '.ui.toast',
|
|
17669
|
+
title: '.header',
|
|
17670
|
+
message: '.message:not(.ui)',
|
|
17671
|
+
image: '> img.image, > .image > img',
|
|
17672
|
+
icon: '> i.icon',
|
|
17673
|
+
input: 'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',
|
|
17674
|
+
clickable: 'a, details, .ui.accordion',
|
|
17675
|
+
approve: '.actions .positive, .actions .approve, .actions .ok',
|
|
17676
|
+
deny: '.actions .negative, .actions .deny, .actions .cancel',
|
|
17677
|
+
},
|
|
17678
|
+
|
|
17679
|
+
fields: {
|
|
17680
|
+
class: 'class',
|
|
17681
|
+
text: 'text',
|
|
17682
|
+
icon: 'icon',
|
|
17683
|
+
click: 'click',
|
|
17684
|
+
},
|
|
17685
|
+
|
|
17686
|
+
// callbacks
|
|
17687
|
+
onShow: function () {},
|
|
17688
|
+
onVisible: function () {},
|
|
17689
|
+
onClick: function () {},
|
|
17690
|
+
onHide: function () {},
|
|
17691
|
+
onHidden: function () {},
|
|
17692
|
+
onRemove: function () {},
|
|
17693
|
+
onApprove: function () {},
|
|
17694
|
+
onDeny: function () {},
|
|
17695
|
+
};
|
|
17696
|
+
|
|
17697
|
+
$.extend($.easing, {
|
|
17698
|
+
easeOutBounce: function (x) {
|
|
17699
|
+
var
|
|
17700
|
+
n1 = 7.5625,
|
|
17701
|
+
d1 = 2.75
|
|
17702
|
+
;
|
|
17703
|
+
if (x < 1 / d1) {
|
|
17704
|
+
return n1 * x * x;
|
|
17705
|
+
}
|
|
17706
|
+
if (x < 2 / d1) {
|
|
17707
|
+
x -= 1.5 / d1;
|
|
17708
|
+
|
|
17709
|
+
return n1 * x * x + 0.75;
|
|
17710
|
+
}
|
|
17711
|
+
if (x < 2.5 / d1) {
|
|
17712
|
+
x -= 2.25 / d1;
|
|
17713
|
+
|
|
17714
|
+
return n1 * x * x + 0.9375;
|
|
17715
|
+
}
|
|
17716
|
+
x -= 2.625 / d1;
|
|
17717
|
+
|
|
17718
|
+
return n1 * x * x + 0.984375;
|
|
17719
|
+
},
|
|
17720
|
+
easeOutCubic: function (t) {
|
|
17721
|
+
return --t * t * t + 1;
|
|
17722
|
+
},
|
|
17723
|
+
});
|
|
17724
|
+
})(jQuery, window, document);
|
|
17725
|
+
|
|
16761
17726
|
/*!
|
|
16762
17727
|
* # Fomantic-UI 2.9.4 - Transition
|
|
16763
17728
|
* https://github.com/fomantic/Fomantic-UI/
|