Skip to content

Commit

Permalink
Update_NPM_Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
voloagent committed Nov 14, 2022
1 parent e9e1c89 commit 75a076c
Show file tree
Hide file tree
Showing 618 changed files with 25,473 additions and 52,595 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "asp.net",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.shared": "^6.0.1",
"@abp/aspnetcore.mvc.ui.theme.shared": "^7.0.0-rc.1",
"highlight.js": "^9.13.1"
},
"devDependencies": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,59 +72,90 @@ var abp = abp || {};
/* LOCALIZATION ***********************************************/

abp.localization = abp.localization || {};

abp.localization.internal = abp.localization.internal || {};
abp.localization.values = abp.localization.values || {};

abp.localization.localize = function (key, sourceName) {
if (sourceName === '_') { //A convention to suppress the localization
return key;
abp.localization.resources = abp.localization.resources || {};

abp.localization.internal.getResource = function (resourceName) {
var resource = abp.localization.resources[resourceName];
if (resource) {
return resource;
}

var legacySource = abp.localization.values[resourceName];
if (legacySource) {
return {
texts: abp.localization.values[resourceName],
baseResources: []
};
}

sourceName = sourceName || abp.localization.defaultResourceName;
if (!sourceName) {
abp.log.warn('Localization source name is not specified and the defaultResourceName was not defined!');
return key;

abp.log.warn('Could not find localization source: ' + resourceName);
return null;
};

abp.localization.internal.localize = function (key, sourceName) {
var resource = abp.localization.internal.getResource(sourceName);
if (!resource){
return {
value: key,
found: false
};
}

var source = abp.localization.values[sourceName];
if (!source) {
abp.log.warn('Could not find localization source: ' + sourceName);
return key;
}
var value = resource.texts[key];
if (value === undefined) {
for (var i = 0; i < resource.baseResources.length; i++){
var basedArguments = Array.prototype.slice.call(arguments, 0);
basedArguments[1] = resource.baseResources[i];

var value = source[key];
if (value == undefined) {
return key;
var result = abp.localization.internal.localize.apply(this, basedArguments);
if (result.found){
return result;
}
}

return {
value: key,
found: false
};
}

var copiedArguments = Array.prototype.slice.call(arguments, 0);
copiedArguments.splice(1, 1);
copiedArguments[0] = value;

return abp.utils.formatString.apply(this, copiedArguments);
return {
value: abp.utils.formatString.apply(this, copiedArguments),
found: true
};
};

abp.localization.isLocalized = function (key, sourceName) {
abp.localization.localize = function (key, sourceName) {
if (sourceName === '_') { //A convention to suppress the localization
return true;
return key;
}

sourceName = sourceName || abp.localization.defaultResourceName;
if (!sourceName) {
return false;
abp.log.warn('Localization source name is not specified and the defaultResourceName was not defined!');
return key;
}

var source = abp.localization.values[sourceName];
if (!source) {
return false;
return abp.localization.internal.localize.apply(this, arguments).value;
};

abp.localization.isLocalized = function (key, sourceName) {
if (sourceName === '_') { //A convention to suppress the localization
return true;
}

var value = source[key];
if (value === undefined) {
sourceName = sourceName || abp.localization.defaultResourceName;
if (!sourceName) {
return false;
}

return true;
return abp.localization.internal.localize(key, sourceName).found;
};

abp.localization.getResource = function (name) {
Expand Down Expand Up @@ -173,12 +204,10 @@ var abp = abp || {};

abp.auth = abp.auth || {};

abp.auth.policies = abp.auth.policies || {};

abp.auth.grantedPolicies = abp.auth.grantedPolicies || {};

abp.auth.isGranted = function (policyName) {
return abp.auth.policies[policyName] != undefined && abp.auth.grantedPolicies[policyName] != undefined;
return abp.auth.grantedPolicies[policyName] != undefined;
};

abp.auth.isAnyGranted = function () {
Expand Down Expand Up @@ -687,7 +716,7 @@ var abp = abp || {};
}

/**
* Escape HTML to help prevent XSS attacks.
* Escape HTML to help prevent XSS attacks.
*/
abp.utils.htmlEscape = function (html) {
return typeof html === 'string' ? html.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;') : html;
Expand Down Expand Up @@ -759,7 +788,7 @@ var abp = abp || {};
return toUtc(date);
}
};

/* FEATURES *************************************************/

abp.features = abp.features || {};
Expand All @@ -774,7 +803,7 @@ var abp = abp || {};
abp.features.get = function (name) {
return abp.features.values[name];
};

/* GLOBAL FEATURES *************************************************/

abp.globalFeatures = abp.globalFeatures || {};
Expand Down
Loading

0 comments on commit 75a076c

Please sign in to comment.