Skip to content

Commit

Permalink
Upgrade to ABP 8.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gdlcf88 committed Jul 25, 2024
1 parent 60d01c6 commit 76b363a
Show file tree
Hide file tree
Showing 105 changed files with 2,150 additions and 3,298 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>

<AbpVersion>8.1.0</AbpVersion>
<AbpVersion>8.2.0</AbpVersion>

</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.11.0</Version>
<Version>1.12.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<ProjectReference Include="..\DataDictionary.Sample.EntityFrameworkCore\DataDictionary.Sample.EntityFrameworkCore.csproj" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="3.1.*-*" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="3.2.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.Swashbuckle" Version="$(AbpVersion)" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="$(AbpVersion)" />
Expand Down
2 changes: 1 addition & 1 deletion samples/src/DataDictionary.Sample.Web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"name": "my-app",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~3.1.0"
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~3.2.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*!
* jQuery Validation Plugin v1.17.0
* jQuery Validation Plugin v1.19.5
*
* https://jqueryvalidation.org/
*
* Copyright (c) 2017 Jörn Zaefferer
* Copyright (c) 2022 Jörn Zaefferer
* Released under the MIT license
*/
(function( factory ) {
Expand Down Expand Up @@ -67,6 +67,7 @@ $.extend( $.fn, {
// Prevent form submit to be able to see console output
event.preventDefault();
}

function handle() {
var hidden, result;

Expand All @@ -82,7 +83,7 @@ $.extend( $.fn, {
.appendTo( validator.currentForm );
}

if ( validator.settings.submitHandler ) {
if ( validator.settings.submitHandler && !validator.settings.debug ) {
result = validator.settings.submitHandler.call( validator, validator.currentForm, event );
if ( hidden ) {

Expand Down Expand Up @@ -142,14 +143,15 @@ $.extend( $.fn, {
// https://jqueryvalidation.org/rules/
rules: function( command, argument ) {
var element = this[ 0 ],
isContentEditable = typeof this.attr( "contenteditable" ) !== "undefined" && this.attr( "contenteditable" ) !== "false",
settings, staticRules, existingRules, data, param, filtered;

// If nothing is selected, return empty object; can't chain anyway
if ( element == null ) {
return;
}

if ( !element.form && element.hasAttribute( "contenteditable" ) ) {
if ( !element.form && isContentEditable ) {
element.form = this.closest( "form" )[ 0 ];
element.name = this.attr( "name" );
}
Expand Down Expand Up @@ -214,18 +216,25 @@ $.extend( $.fn, {
}
} );

// JQuery trim is deprecated, provide a trim method based on String.prototype.trim
var trim = function( str ) {

// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#Polyfill
return str.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "" );
};

// Custom selectors
$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support

// https://jqueryvalidation.org/blank-selector/
blank: function( a ) {
return !$.trim( "" + $( a ).val() );
return !trim( "" + $( a ).val() );
},

// https://jqueryvalidation.org/filled-selector/
filled: function( a ) {
var val = $( a ).val();
return val !== null && !!$.trim( "" + val );
return val !== null && !!trim( "" + val );
},

// https://jqueryvalidation.org/unchecked-selector/
Expand Down Expand Up @@ -393,7 +402,8 @@ $.extend( $.validator, {
this.invalid = {};
this.reset();

var groups = ( this.groups = {} ),
var currentForm = this.currentForm,
groups = ( this.groups = {} ),
rules;
$.each( this.settings.groups, function( key, value ) {
if ( typeof value === "string" ) {
Expand All @@ -409,13 +419,20 @@ $.extend( $.validator, {
} );

function delegate( event ) {
var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";

// Set form expando on contenteditable
if ( !this.form && this.hasAttribute( "contenteditable" ) ) {
if ( !this.form && isContentEditable ) {
this.form = $( this ).closest( "form" )[ 0 ];
this.name = $( this ).attr( "name" );
}

// Ignore the element if it belongs to another form. This will happen mainly
// when setting the `form` attribute of an input to the id of another form.
if ( currentForm !== this.form ) {
return;
}

var validator = $.data( this.form, "validator" ),
eventType = "on" + event.type.replace( /^validate/, "" ),
settings = validator.settings;
Expand Down Expand Up @@ -610,7 +627,7 @@ $.extend( $.validator, {
try {
$( this.findLastActive() || this.errorList.length && this.errorList[ 0 ].element || [] )
.filter( ":visible" )
.focus()
.trigger( "focus" )

// Manually trigger focusin event; without it, focusin handler isn't called, findLastActive won't have anything to find
.trigger( "focusin" );
Expand Down Expand Up @@ -639,16 +656,23 @@ $.extend( $.validator, {
.not( this.settings.ignore )
.filter( function() {
var name = this.name || $( this ).attr( "name" ); // For contenteditable
var isContentEditable = typeof $( this ).attr( "contenteditable" ) !== "undefined" && $( this ).attr( "contenteditable" ) !== "false";

if ( !name && validator.settings.debug && window.console ) {
console.error( "%o has no name assigned", this );
}

// Set form expando on contenteditable
if ( this.hasAttribute( "contenteditable" ) ) {
if ( isContentEditable ) {
this.form = $( this ).closest( "form" )[ 0 ];
this.name = name;
}

// Ignore elements that belong to other/nested forms
if ( this.form !== validator.currentForm ) {
return false;
}

// Select only the first element for each name, and only those with rules specified
if ( name in rulesCache || !validator.objectLength( $( this ).rules() ) ) {
return false;
Expand Down Expand Up @@ -694,6 +718,7 @@ $.extend( $.validator, {
elementValue: function( element ) {
var $element = $( element ),
type = element.type,
isContentEditable = typeof $element.attr( "contenteditable" ) !== "undefined" && $element.attr( "contenteditable" ) !== "false",
val, idx;

if ( type === "radio" || type === "checkbox" ) {
Expand All @@ -702,7 +727,7 @@ $.extend( $.validator, {
return element.validity.badInput ? "NaN" : $element.val();
}

if ( element.hasAttribute( "contenteditable" ) ) {
if ( isContentEditable ) {
val = $element.text();
} else {
val = $element.val();
Expand Down Expand Up @@ -763,10 +788,6 @@ $.extend( $.validator, {
if ( normalizer ) {
val = normalizer.call( element, val );

if ( typeof val !== "string" ) {
throw new TypeError( "The normalizer should return a string value." );
}

// Delete the normalizer from rules to avoid treating it as a pre-defined method.
delete rules.normalizer;
}
Expand Down Expand Up @@ -1029,6 +1050,10 @@ $.extend( $.validator, {
// meta-characters that should be escaped in order to be used with JQuery
// as a literal part of a name/id or any selector.
escapeCssMeta: function( string ) {
if ( string === undefined ) {
return "";
}

return string.replace( /([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g, "\\$1" );
},

Expand Down Expand Up @@ -1105,8 +1130,8 @@ $.extend( $.validator, {
}
delete this.pending[ element.name ];
$( element ).removeClass( this.settings.pendingClass );
if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() ) {
$( this.currentForm ).submit();
if ( valid && this.pendingRequest === 0 && this.formSubmitted && this.form() && this.pendingRequest === 0 ) {
$( this.currentForm ).trigger( "submit" );

// Remove the hidden input that was used as a replacement for the
// missing submit button. The hidden input is added by `handle()`
Expand Down Expand Up @@ -1142,7 +1167,19 @@ $.extend( $.validator, {
.removeData( "validator" )
.find( ".validate-equalTo-blur" )
.off( ".validate-equalTo" )
.removeClass( "validate-equalTo-blur" );
.removeClass( "validate-equalTo-blur" )
.find( ".validate-lessThan-blur" )
.off( ".validate-lessThan" )
.removeClass( "validate-lessThan-blur" )
.find( ".validate-lessThanEqual-blur" )
.off( ".validate-lessThanEqual" )
.removeClass( "validate-lessThanEqual-blur" )
.find( ".validate-greaterThanEqual-blur" )
.off( ".validate-greaterThanEqual" )
.removeClass( "validate-greaterThanEqual-blur" )
.find( ".validate-greaterThan-blur" )
.off( ".validate-greaterThan" )
.removeClass( "validate-greaterThan-blur" );
}

},
Expand Down Expand Up @@ -1199,7 +1236,7 @@ $.extend( $.validator, {

// Exception: the jquery validate 'range' method
// does not test for the html5 'range' type
rules[ method ] = true;
rules[ type === "date" ? "dateISO" : method ] = true;
}
},

Expand Down Expand Up @@ -1246,6 +1283,12 @@ $.extend( $.validator, {

for ( method in $.validator.methods ) {
value = $element.data( "rule" + method.charAt( 0 ).toUpperCase() + method.substring( 1 ).toLowerCase() );

// Cast empty attributes like `data-rule-required` to `true`
if ( value === "" ) {
value = true;
}

this.normalizeAttributeRule( rules, type, method, value );
}
return rules;
Expand Down Expand Up @@ -1292,7 +1335,7 @@ $.extend( $.validator, {

// Evaluate parameters
$.each( rules, function( rule, parameter ) {
rules[ rule ] = $.isFunction( parameter ) && rule !== "normalizer" ? parameter( element ) : parameter;
rules[ rule ] = typeof parameter === "function" && rule !== "normalizer" ? parameter( element ) : parameter;
} );

// Clean number parameters
Expand All @@ -1304,7 +1347,7 @@ $.extend( $.validator, {
$.each( [ "rangelength", "range" ], function() {
var parts;
if ( rules[ this ] ) {
if ( $.isArray( rules[ this ] ) ) {
if ( Array.isArray( rules[ this ] ) ) {
rules[ this ] = [ Number( rules[ this ][ 0 ] ), Number( rules[ this ][ 1 ] ) ];
} else if ( typeof rules[ this ] === "string" ) {
parts = rules[ this ].replace( /[\[\]]/g, "" ).split( /[\s,]+/ );
Expand Down Expand Up @@ -1371,7 +1414,7 @@ $.extend( $.validator, {
if ( this.checkable( element ) ) {
return this.getLength( value, element ) > 0;
}
return value.length > 0;
return value !== undefined && value !== null && value.length > 0;
},

// https://jqueryvalidation.org/email-method/
Expand All @@ -1391,13 +1434,30 @@ $.extend( $.validator, {
// https://gist.github.com/dperini/729294
// see also https://mathiasbynens.be/demo/url-regex
// modified to allow protocol-relative URLs
return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
return this.optional( element ) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})+(?::(?:[^\]\[?\/<~#`!@$^&*()+=}|:";',>{ ]|%[0-9A-Fa-f]{2})*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i.test( value );
},

// https://jqueryvalidation.org/date-method/
date: function( value, element ) {
return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
},
date: ( function() {
var called = false;

return function( value, element ) {
if ( !called ) {
called = true;
if ( this.settings.debug && window.console ) {
console.warn(
"The `date` method is deprecated and will be removed in version '2.0.0'.\n" +
"Please don't use it, since it relies on the Date constructor, which\n" +
"behaves very differently across browsers and locales. Use `dateISO`\n" +
"instead or one of the locale specific methods in `localizations/`\n" +
"and `additional-methods.js`."
);
}
}

return this.optional( element ) || !/Invalid|NaN/.test( new Date( value ).toString() );
};
}() ),

// https://jqueryvalidation.org/dateISO-method/
dateISO: function( value, element ) {
Expand All @@ -1416,19 +1476,19 @@ $.extend( $.validator, {

// https://jqueryvalidation.org/minlength-method/
minlength: function( value, element, param ) {
var length = $.isArray( value ) ? value.length : this.getLength( value, element );
var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length >= param;
},

// https://jqueryvalidation.org/maxlength-method/
maxlength: function( value, element, param ) {
var length = $.isArray( value ) ? value.length : this.getLength( value, element );
var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || length <= param;
},

// https://jqueryvalidation.org/rangelength-method/
rangelength: function( value, element, param ) {
var length = $.isArray( value ) ? value.length : this.getLength( value, element );
var length = Array.isArray( value ) ? value.length : this.getLength( value, element );
return this.optional( element ) || ( length >= param[ 0 ] && length <= param[ 1 ] );
},

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $.extend( $.validator.messages, {
rangelength: $.validator.format( "Zəhmət olmasa, {0} - {1} aralığında uzunluğa malik simvol daxil edin." ),
range: $.validator.format( "Zəhmət olmasa, {0} - {1} aralığında rəqəm daxil edin." ),
max: $.validator.format( "Zəhmət olmasa, {0} və ondan kiçik rəqəm daxil edin." ),
min: $.validator.format( "Zəhmət olmasa, {0} və ondan böyük rəqəm daxil edin" )
min: $.validator.format( "Zəhmət olmasa, {0} və ondan böyük rəqəm daxil edin." )
} );
return $;
}));

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $.extend( $.validator.messages, {
creditcard: "Моля, въведете валиден номер на кредитна карта.",
equalTo: "Моля, въведете същата стойност отново.",
extension: "Моля, въведете стойност с валидно разширение.",
maxlength: $.validator.format( "Моля, въведете повече от {0} символа." ),
maxlength: $.validator.format( "Моля, въведете не повече от {0} символа." ),
minlength: $.validator.format( "Моля, въведете поне {0} символа." ),
rangelength: $.validator.format( "Моля, въведете стойност с дължина между {0} и {1} символа." ),
range: $.validator.format( "Моля, въведете стойност между {0} и {1}." ),
Expand Down
Loading

0 comments on commit 76b363a

Please sign in to comment.