Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Sep 25, 2019
1 parent 5029341 commit d08da0d
Show file tree
Hide file tree
Showing 18 changed files with 3,161 additions and 2,317 deletions.
5,192 changes: 2,944 additions & 2,248 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"cross-env": "^5.2.0",
"fomantic-ui": "^2.7.4",
"jquery": "^3.3.1",
"laravel-mix": "^4.0.14",
"sass": "^1.16.1",
"sass-loader": "7.*",
"cross-env": "^5.2.1",
"fomantic-ui": "^2.7.8",
"jquery": "^3.4.1",
"laravel-mix": "^4.1.4",
"sass": "^1.22.12",
"sass-loader": "^7.3.1",
"simplebar": "3.0.0-beta.0"
}
}
2 changes: 1 addition & 1 deletion public/css/all.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/all.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/css/app.css": "/css/app.css?id=c9f8cd41799b385cd014",
"/js/all.js": "/js/all.js?id=d7dabc08555b58be2125",
"/css/all.css": "/css/all.css?id=414acc0ef56df5f6d37d",
"/css/app.css": "/css/app.css?id=9ccf21a457016100da27",
"/js/all.js": "/js/all.js?id=aa68b184dc5392fbf7e9",
"/css/all.css": "/css/all.css?id=7b2e7f4696f2d3bf19b0",
"/semantic/semantic.min.css": "/semantic/semantic.min.css?id=8326a6c2bdbe93f39c6f"
}
2 changes: 1 addition & 1 deletion semantic.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"permission": false,
"autoInstall": false,
"rtl": false,
"version": "2.7.7"
"version": "2.7.8"
}
38 changes: 27 additions & 11 deletions semantic/src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ $.fn.form = function(parameters) {
$calendar = $field.closest(selector.uiCalendar),
defaultValue = $field.data(metadata.defaultValue) || '',
isCheckbox = $element.is(selector.uiCheckbox),
isDropdown = $element.is(selector.uiDropdown),
isCalendar = ($calendar.length > 0),
isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
isCalendar = ($calendar.length > 0 && module.can.useElement('calendar')),
isErrored = $fieldGroup.hasClass(className.error)
;
if(isErrored) {
Expand Down Expand Up @@ -228,8 +228,8 @@ $.fn.form = function(parameters) {
$prompt = $fieldGroup.find(selector.prompt),
defaultValue = $field.data(metadata.defaultValue),
isCheckbox = $element.is(selector.uiCheckbox),
isDropdown = $element.is(selector.uiDropdown),
isCalendar = ($calendar.length > 0),
isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
isCalendar = ($calendar.length > 0 && module.can.useElement('calendar')),
isErrored = $fieldGroup.hasClass(className.error)
;
if(defaultValue === undefined) {
Expand Down Expand Up @@ -678,7 +678,7 @@ $.fn.form = function(parameters) {
isCheckbox = $field.is(selector.checkbox),
isRadio = $field.is(selector.radio),
isMultiple = (name.indexOf('[]') !== -1),
isCalendar = ($calendar.length > 0),
isCalendar = ($calendar.length > 0 && module.can.useElement('calendar')),
isChecked = (isCheckbox)
? $field.is(':checked')
: false
Expand Down Expand Up @@ -795,6 +795,16 @@ $.fn.form = function(parameters) {

},

can: {
useElement: function(element){
if ($.fn[element] !== undefined) {
return true;
}
module.error(error.noElement.replace('{element}',element));
return false;
}
},

escape: {
string: function(text) {
text = String(text);
Expand Down Expand Up @@ -869,7 +879,7 @@ $.fn.form = function(parameters) {
.html(errors[0])
;
if(!promptExists) {
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
if(settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
module.verbose('Displaying error with css transition', settings.transition);
$prompt.transition(settings.transition + ' in', settings.duration);
}
Expand Down Expand Up @@ -951,7 +961,7 @@ $.fn.form = function(parameters) {
;
if(settings.inline && $prompt.is(':visible')) {
module.verbose('Removing prompt for field', identifier);
if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
if(settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
$prompt.transition(settings.transition + ' out', settings.duration, function() {
$prompt.remove();
});
Expand Down Expand Up @@ -980,7 +990,7 @@ $.fn.form = function(parameters) {
$el = $(el),
$parent = $el.parent(),
isCheckbox = ($el.filter(selector.checkbox).length > 0),
isDropdown = $parent.is(selector.uiDropdown),
isDropdown = $parent.is(selector.uiDropdown) && module.can.useElement('dropdown'),
value = (isCheckbox)
? $el.is(':checked')
: $el.val()
Expand Down Expand Up @@ -1013,10 +1023,12 @@ $.fn.form = function(parameters) {
var
$field = module.get.field(key),
$element = $field.parent(),
$calendar = $field.closest(selector.uiCalendar),
isMultiple = Array.isArray(value),
isCheckbox = $element.is(selector.uiCheckbox),
isDropdown = $element.is(selector.uiDropdown),
isCheckbox = $element.is(selector.uiCheckbox) && module.can.useElement('checkbox'),
isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
isRadio = ($field.is(selector.radio) && isCheckbox),
isCalendar = ($calendar.length > 0 && module.can.useElement('calendar')),
fieldExists = ($field.length > 0),
$multipleField
;
Expand Down Expand Up @@ -1052,6 +1064,9 @@ $.fn.form = function(parameters) {
module.verbose('Setting dropdown value', value, $element);
$element.dropdown('set selected', value);
}
else if (isCalendar) {
$calendar.calendar('set date',value);
}
else {
module.verbose('Setting field value', value, $field);
$field.val(value);
Expand Down Expand Up @@ -1515,7 +1530,8 @@ $.fn.form.settings = {
identifier : 'You must specify a string identifier for each field',
method : 'The method you called is not defined.',
noRule : 'There is no rule matching the one you specified',
oldSyntax : 'Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.'
oldSyntax : 'Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.',
noElement : 'This module requires ui {element}'
},

templates: {
Expand Down
3 changes: 2 additions & 1 deletion semantic/src/definitions/elements/label.less
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ a.ui.label {
}

/* Padding on next content after a label */
.ui.top.attached.label ~ :first-of-type:not(.attached) {
.ui.top.attached.label ~ .ui.bottom.attached.label + :not(.attached),
.ui.top.attached.label + :not(.attached) {
margin-top: @attachedSegmentPadding !important;
}
.ui.bottom.attached.label ~ :last-child:not(.attached) {
Expand Down
67 changes: 47 additions & 20 deletions semantic/src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ $.fn.dropdown = function(parameters) {
.attr('class', $input.attr('class') )
.addClass(className.selection)
.addClass(className.dropdown)
.html( templates.dropdown(selectValues,settings.preserveHTML, settings.className) )
.html( templates.dropdown(selectValues, fields, settings.preserveHTML, settings.className) )
.insertBefore($input)
;
if($input.hasClass(className.multiple) && $input.prop('multiple') === false) {
Expand Down Expand Up @@ -1296,7 +1296,7 @@ $.fn.dropdown = function(parameters) {
isBubbledEvent = ($subMenu.find($target).length > 0)
;
// prevents IE11 bug where menu receives focus even though `tabindex=-1`
if (!module.has.search() || !document.activeElement.isEqualNode($search[0])) {
if (document.activeElement.tagName.toLowerCase() !== 'input') {
$(document.activeElement).blur();
}
if(!isBubbledEvent && (!hasSubMenu || settings.allowCategorySelection)) {
Expand Down Expand Up @@ -1865,7 +1865,7 @@ $.fn.dropdown = function(parameters) {
}
return ( !module.has.selectInput() && module.is.multiple() )
? (typeof value == 'string') // delimited string
? value.split(settings.delimiter)
? module.escape.htmlEntities(value).split(settings.delimiter)
: ''
: value
;
Expand Down Expand Up @@ -1942,7 +1942,8 @@ $.fn.dropdown = function(parameters) {
},
selectValues: function() {
var
select = {}
select = {},
oldGroup = []
;
select.values = [];
$module
Expand All @@ -1954,12 +1955,21 @@ $.fn.dropdown = function(parameters) {
disabled = $option.attr('disabled'),
value = ( $option.attr('value') !== undefined )
? $option.attr('value')
: name
: name,
group = $option.parent('optgroup')
;
if(settings.placeholder === 'auto' && value === '') {
select.placeholder = name;
}
else {
if(group.length !== oldGroup.length || group[0] !== oldGroup[0]) {
select.values.push({
type: 'header',
divider: settings.headerDivider,
name: group.attr('label') || ''
});
oldGroup = group;
}
select.values.push({
name : name,
value : value,
Expand Down Expand Up @@ -2428,6 +2438,9 @@ $.fn.dropdown = function(parameters) {
? forceScroll
: false
;
if(module.get.activeItem().length === 0){
forceScroll = false;
}
if($item && $menu.length > 0 && hasActive) {
itemOffset = $item.position().top;

Expand Down Expand Up @@ -3886,6 +3899,8 @@ $.fn.dropdown.settings = {

glyphWidth : 1.037, // widest glyph width in em (W is 1.037 em) used to calculate multiselect input width

headerDivider : true, // whether option headers should have an additional divider line underneath when converted from <select> <optgroup>

// label settings on multi-select
label: {
transition : 'scale',
Expand Down Expand Up @@ -3934,7 +3949,7 @@ $.fn.dropdown.settings = {
noAPI : 'The API module is required to load resources remotely',
noStorage : 'Saving remote data requires session storage',
noTransition : 'This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>',
noNormalize : '"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/[email protected]/plugin/unorm.min.js> as a polyfill.'
noNormalize : '"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/[email protected]/lib/unorm.min.js> as a polyfill.'
},

regExp : {
Expand All @@ -3961,8 +3976,10 @@ $.fn.dropdown.settings = {
type : 'type', // type of dropdown element
image : 'image', // optional image path
imageClass : 'imageClass', // optional individual class for image
icon : 'icon', // optional icon name
iconClass : 'iconClass' // optional individual class for icon (for example to use flag instead)
icon : 'icon', // optional icon name
iconClass : 'iconClass', // optional individual class for icon (for example to use flag instead)
class : 'class', // optional individual class for item/header
divider : 'divider' // optional divider append for group headers
},

keys : {
Expand Down Expand Up @@ -4027,7 +4044,10 @@ $.fn.dropdown.settings = {
visible : 'visible',
clearable : 'clearable',
noselection : 'noselection',
delete : 'delete'
delete : 'delete',
header : 'header',
divider : 'divider',
groupIcon : ''
}

};
Expand Down Expand Up @@ -4062,13 +4082,11 @@ $.fn.dropdown.settings.templates = {
return string;
},
// generates dropdown from select values
dropdown: function(select, preserveHTML, className) {
dropdown: function(select, fields, preserveHTML, className) {
var
placeholder = select.placeholder || false,
values = select.values || [],
html = '',
escape = $.fn.dropdown.settings.templates.escape,
deQuote = $.fn.dropdown.settings.templates.deQuote
escape = $.fn.dropdown.settings.templates.escape
;
html += '<i class="dropdown icon"></i>';
if(placeholder) {
Expand All @@ -4078,9 +4096,7 @@ $.fn.dropdown.settings.templates = {
html += '<div class="text"></div>';
}
html += '<div class="'+className.menu+'">';
$.each(values, function(index, option) {
html += '<div class="'+(option.disabled ? className.disabled+' ':'')+className.item+'" data-value="' + deQuote(option.value) + '">' + escape(option.name,preserveHTML) + '</div>';
});
html += $.fn.dropdown.settings.templates.menu(select, fields, preserveHTML,className);
html += '</div>';
return html;
},
Expand Down Expand Up @@ -4109,7 +4125,7 @@ $.fn.dropdown.settings.templates = {
? className.disabled+' '
: ''
;
html += '<div class="'+ maybeDisabled + className.item+'" data-value="' + deQuote(option[fields.value]) + '"' + maybeText + '>';
html += '<div class="'+ maybeDisabled + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value]) + '"' + maybeText + '>';
if(option[fields.image]) {
html += '<img class="'+(option[fields.imageClass] ? deQuote(option[fields.imageClass]) : className.image)+'" src="' + deQuote(option[fields.image]) + '">';
}
Expand All @@ -4119,9 +4135,20 @@ $.fn.dropdown.settings.templates = {
html += escape(option[fields.name],preserveHTML);
html += '</div>';
} else if (itemType === 'header') {
html += '<div class="header">';
html += escape(option[fields.name],preserveHTML);
html += '</div>';
var groupName = escape(option[fields.name],preserveHTML),
groupIcon = option[fields.icon] ? deQuote(option[fields.icon]) : className.groupIcon
;
if(groupName !== '' || groupIcon !== '') {
html += '<div class="' + (option[fields.class] ? deQuote(option[fields.class]) : className.header) + '">';
if (groupIcon !== '') {
html += '<i class="' + groupIcon + ' ' + (option[fields.iconClass] ? deQuote(option[fields.iconClass]) : className.icon) + '"></i>';
}
html += groupName;
html += '</div>';
}
if(option[fields.divider]){
html += '<div class="'+className.divider+'"></div>';
}
}
});
return html;
Expand Down
10 changes: 7 additions & 3 deletions semantic/src/definitions/modules/dropdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,21 @@
.ui.dropdown .menu > .header {
margin: @menuHeaderMargin;
padding: @menuHeaderPadding;
color: @menuHeaderColor;
font-size: @menuHeaderFontSize;
font-weight: @menuHeaderFontWeight;
text-transform: @menuHeaderTextTransform;
}

.ui.dropdown .menu > .header:not(.ui) {
color: @menuHeaderColor;
font-size: @menuHeaderFontSize;
}
.ui.dropdown .menu > .divider {
border-top: @menuDividerBorder;
height: 0;
margin: @menuDividerMargin;
}
.ui.dropdown .menu > .horizontal.divider {
border-top: none;
}

.ui.dropdown.dropdown .menu > .input {
width: auto;
Expand Down
8 changes: 4 additions & 4 deletions semantic/src/definitions/modules/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ $.fn.progress = function(parameters) {
width: value + '%'
});
}
return parseInt(value, 10);
return parseFloat(value);
});
values.forEach(function(_, index) {
var $bar = $($bars[index]);
Expand Down Expand Up @@ -523,15 +523,15 @@ $.fn.progress = function(parameters) {
: undefined;

// round display percentage
percents = percents.map(function (percent) {
var roundedPercents = percents.map(function (percent) {
return (autoPrecision > 0)
? Math.round(percent * (10 * autoPrecision)) / (10 * autoPrecision)
: Math.round(percent)
;
});
module.percent = percents;
module.percent = roundedPercents;
if (!hasTotal) {
module.value = percents.map(function (percent) {
module.value = roundedPercents.map(function (percent) {
return (autoPrecision > 0)
? Math.round((percent / 100) * module.total * (10 * autoPrecision)) / (10 * autoPrecision)
: Math.round((percent / 100) * module.total * 10) / 10
Expand Down
2 changes: 1 addition & 1 deletion semantic/src/definitions/modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ $.fn.search.settings = {
serverError : 'There was an issue querying the server.',
maxResults : 'Results must be an array to use maxResults setting',
method : 'The method you called is not defined.',
noNormalize : '"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/[email protected]/plugin/unorm.min.js> as a polyfill.'
noNormalize : '"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/[email protected]/lib/unorm.min.js> as a polyfill.'
},

metadata: {
Expand Down
Loading

0 comments on commit d08da0d

Please sign in to comment.