Skip to content

Commit

Permalink
abp npm packages update
Browse files Browse the repository at this point in the history
  • Loading branch information
yekalkan committed Jun 21, 2019
1 parent 4f75482 commit 0cea010
Show file tree
Hide file tree
Showing 76 changed files with 34,252 additions and 1,189 deletions.
8 changes: 4 additions & 4 deletions abp_io/src/Volo.AbpWebSite.Web/package.json
Expand Up @@ -3,8 +3,8 @@
"name": "volo.aspnetzero.support",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^0.6.4",
"@abp/blogging": "^0.4.9",
"@abp/docs": "^0.5.1"
"@abp/aspnetcore.mvc.ui.theme.basic": "^0.6.6",
"@abp/blogging": "^0.6.6",
"@abp/docs": "^0.6.5"
}
}
}
56 changes: 56 additions & 0 deletions abp_io/src/Volo.AbpWebSite.Web/wwwroot/libs/abp/core/abp.css
@@ -0,0 +1,56 @@
@keyframes spin {
0% {
transform: translateZ(0) rotate(0deg);
}

100% {
transform: translateZ(0) rotate(360deg);
}
}

.abp-block-area {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999999;
background-color: #fff;
opacity: .8;
transition: opacity .25s;
}

.abp-block-area.abp-block-area-disappearing {
opacity: 0;
}

.abp-block-area.abp-block-area-busy:after {
content: attr(data-text);
display: block;
max-width: 125px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 20px;
font-family: sans-serif;
color: #343a40;
text-align: center;
text-transform: uppercase;
}

.abp-block-area.abp-block-area-busy:before {
content: "";
display: block;
width: 150px;
height: 150px;
border-radius: 50%;
border-width: 2px;
border-style: solid;
border-color: transparent #228ae6 #228ae6 #228ae6;
position: absolute;
top: calc(50% - 75px);
left: calc(50% - 75px);
will-change: transform;
animation: spin .75s infinite ease-in-out;
}
108 changes: 99 additions & 9 deletions abp_io/src/Volo.AbpWebSite.Web/wwwroot/libs/abp/core/abp.js
Expand Up @@ -161,6 +161,25 @@ var abp = abp || {};
abp.auth.setToken();
}

/* SETTINGS *************************************************/

abp.setting = abp.setting || {};

abp.setting.values = abp.setting.values || {};

abp.setting.get = function (name) {
return abp.setting.values[name];
};

abp.setting.getBoolean = function (name) {
var value = abp.setting.get(name);
return value == 'true' || value == 'True';
};

abp.setting.getInt = function (name) {
return parseInt(abp.setting.values[name]);
};

/* NOTIFICATION *********************************************/
//Defines Notification API, not implements it

Expand Down Expand Up @@ -227,25 +246,96 @@ var abp = abp || {};
abp.ui = abp.ui || {};

/* UI BLOCK */
//Defines UI Block API, not implements it
//Defines UI Block API and implements basically

var $abpBlockArea = document.createElement('div');
$abpBlockArea.classList.add('abp-block-area');

/* opts: { //Can be an object with options or a string for query a selector
* elm: a query selector (optional - default: document.body)
* busy: boolean (optional - default: false)
* promise: A promise with always or finally handler (optional - auto unblocks the ui if provided)
* }
*/
abp.ui.block = function (opts) {
if (!opts) {
opts = {};
} else if (typeof opts == 'string') {
opts = {
elm: opts
};
}

abp.ui.block = function (elm) {
abp.log.warn('abp.ui.block is not implemented!');
var $elm = document.querySelector(opts.elm) || document.body;

if (opts.busy) {
$abpBlockArea.classList.add('abp-block-area-busy');
} else {
$abpBlockArea.classList.remove('abp-block-area-busy');
}

if (document.querySelector(opts.elm)) {
$abpBlockArea.style.position = 'absolute';
} else {
$abpBlockArea.style.position = 'fixed';
}

$elm.appendChild($abpBlockArea);

if (opts.promise) {
if (opts.promise.always) { //jQuery.Deferred style
opts.promise.always(function () {
abp.ui.unblock({
$elm: opts.elm
});
});
} else if (opts.promise['finally']) { //Q style
opts.promise['finally'](function () {
abp.ui.unblock({
$elm: opts.elm
});
});
}
}
};

abp.ui.unblock = function (elm) {
abp.log.warn('abp.ui.unblock is not implemented!');
/* opts: {
*
* }
*/
abp.ui.unblock = function (opts) {
var element = document.querySelector('.abp-block-area');
if (element) {
element.classList.add('abp-block-area-disappearing');
setTimeout(function () {
if (element) {
element.classList.remove('abp-block-area-disappearing');
element.parentElement.removeChild(element);
}
}, 250);
}
};

/* UI BUSY */
//Defines UI Busy API, not implements it

abp.ui.setBusy = function (elm, optionsOrPromise) {
abp.log.warn('abp.ui.setBusy is not implemented!');
abp.ui.setBusy = function (opts) {
if (!opts) {
opts = {
busy: true
};
} else if (typeof opts == 'string') {
opts = {
elm: opts,
busy: true
};
}

abp.ui.block(opts);
};

abp.ui.clearBusy = function (elm) {
abp.log.warn('abp.ui.clearBusy is not implemented!');
abp.ui.clearBusy = function (opts) {
abp.ui.unblock(opts);
};

/* SIMPLE EVENT BUS *****************************************/
Expand Down
@@ -1,6 +1,6 @@
/*!
* tui-editor
* @version 1.2.2
* @version 1.2.6
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com> (https://nhnent.github.io/tui.editor/)
* @license MIT
*/
Expand Down

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

@@ -1,6 +1,6 @@
/*!
* tui-editor
* @version 1.2.2
* @version 1.2.6
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com> (https://nhnent.github.io/tui.editor/)
* @license MIT
*/
Expand Down

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

0 comments on commit 0cea010

Please sign in to comment.