ecinc-cloud-mappaio 9.6.147 → 9.6.149
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/ecmappaio.common.js +95 -1
- package/lib/ecmappaio.umd.js +95 -1
- package/lib/ecmappaio.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/ecmappaio.common.js
CHANGED
|
@@ -41119,7 +41119,7 @@ service.interceptors.request.use(function (config) {
|
|
|
41119
41119
|
} else if (window.productCode && location.href.indexOf('productCode') === -1) {
|
|
41120
41120
|
config.headers['productCode'] = window.productCode;
|
|
41121
41121
|
}
|
|
41122
|
-
config.headers['ecweb-csrf-token'] = decodeURIComponent(sessionStorage.getItem('ecweb-csrf-token')
|
|
41122
|
+
config.headers['ecweb-csrf-token'] = decodeURIComponent(sessionStorage.getItem('ecweb-csrf-token') || '');
|
|
41123
41123
|
var language = (0,lang/* getLanguage */.Z0)();
|
|
41124
41124
|
if (language === 'en') {
|
|
41125
41125
|
language = 'en-US';
|
|
@@ -41466,6 +41466,8 @@ if (sessionStorage.getItem('productCode')) {
|
|
|
41466
41466
|
productCode = '-' + sessionStorage.getItem('productCode');
|
|
41467
41467
|
} else if (location.href.indexOf('productCode=') !== -1) {
|
|
41468
41468
|
productCode = '-' + location.href.split('productCode=')[1].split('&')[0];
|
|
41469
|
+
} else if (window.productCode) {
|
|
41470
|
+
productCode = '-' + window.productCode;
|
|
41469
41471
|
}
|
|
41470
41472
|
var TokenKey = (window.jwtTokenKey || 'ECWEB-JWTSSO-TOKEN') + (productCode || port);
|
|
41471
41473
|
var RoleKey = 'ECWEB-ROLE-CODE-LIST' + (productCode || port);
|
|
@@ -68959,6 +68961,97 @@ external_commonjs_vue_commonjs2_vue_root_Vue_default().directive('wfidea-lbl', {
|
|
|
68959
68961
|
wfIdeaLblI18nFunc(el, binding, vnode);
|
|
68960
68962
|
}
|
|
68961
68963
|
});
|
|
68964
|
+
;// CONCATENATED MODULE: ./packages/common/directive/escaped-html/index.js
|
|
68965
|
+
|
|
68966
|
+
function escapedHtml(htmlStr) {
|
|
68967
|
+
if (typeof htmlStr !== 'string') {
|
|
68968
|
+
return '';
|
|
68969
|
+
}
|
|
68970
|
+
|
|
68971
|
+
// 1. 基本转义
|
|
68972
|
+
var basic = htmlStr.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g, '/').replace(/`/g, '`');
|
|
68973
|
+
|
|
68974
|
+
// 2. 特殊危险模式处理
|
|
68975
|
+
var patterns = [
|
|
68976
|
+
// 事件处理器
|
|
68977
|
+
{
|
|
68978
|
+
regex: /\bon\w+\s*=\s*["'][^"']*["']/gi,
|
|
68979
|
+
replace: ': '
|
|
68980
|
+
}, {
|
|
68981
|
+
regex: /\bon\w+\s*=\s*[^\s>]+/gi,
|
|
68982
|
+
replace: '='
|
|
68983
|
+
},
|
|
68984
|
+
// JavaScript 协议
|
|
68985
|
+
{
|
|
68986
|
+
regex: /javascript:/gi,
|
|
68987
|
+
escape: ':'
|
|
68988
|
+
}, {
|
|
68989
|
+
regex: /data:/gi,
|
|
68990
|
+
escape: ':'
|
|
68991
|
+
}, {
|
|
68992
|
+
regex: /vbscript:/gi,
|
|
68993
|
+
escape: ':'
|
|
68994
|
+
},
|
|
68995
|
+
// 十六进制/八进制编码
|
|
68996
|
+
{
|
|
68997
|
+
regex: /&#x?[0-9a-f]+;/gi,
|
|
68998
|
+
decode: true
|
|
68999
|
+
},
|
|
69000
|
+
// CSS 危险表达式
|
|
69001
|
+
{
|
|
69002
|
+
regex: /expression\s*\(/gi,
|
|
69003
|
+
escape: '('
|
|
69004
|
+
}, {
|
|
69005
|
+
regex: /url\s*\(\s*["']?javascript:/gi,
|
|
69006
|
+
escape: ':'
|
|
69007
|
+
},
|
|
69008
|
+
// HTML5 新事件
|
|
69009
|
+
{
|
|
69010
|
+
regex: /onpointer\w+/gi,
|
|
69011
|
+
replace: 'on'
|
|
69012
|
+
}, {
|
|
69013
|
+
regex: /ontouch\w+/gi,
|
|
69014
|
+
replace: 'on'
|
|
69015
|
+
},
|
|
69016
|
+
// 内联样式中的 JavaScript
|
|
69017
|
+
{
|
|
69018
|
+
regex: /style\s*=\s*["'][^"']*javascript:[^"']*["']/gi,
|
|
69019
|
+
escape: ':'
|
|
69020
|
+
}];
|
|
69021
|
+
var result = basic;
|
|
69022
|
+
patterns.forEach(function (_ref) {
|
|
69023
|
+
var regex = _ref.regex,
|
|
69024
|
+
replace = _ref.replace,
|
|
69025
|
+
escape = _ref.escape,
|
|
69026
|
+
decode = _ref.decode;
|
|
69027
|
+
result = result.replace(regex, function (match) {
|
|
69028
|
+
if (decode) {
|
|
69029
|
+
// 处理 HTML 实体编码
|
|
69030
|
+
var temp = document.createElement('div');
|
|
69031
|
+
temp.innerHTML = match;
|
|
69032
|
+
return temp.textContent;
|
|
69033
|
+
} else if (replace) {
|
|
69034
|
+
// 替换特定部分
|
|
69035
|
+
return match.replace(new RegExp(replace, 'g'), replace === ':' ? ':' : replace === '=' ? '=' : replace === '(' ? '(' : replace === 'on' ? 'on' : replace);
|
|
69036
|
+
} else if (escape) {
|
|
69037
|
+
// 转义特定字符
|
|
69038
|
+
return match.replace(new RegExp(escape, 'g'), escape === ':' ? ':' : escape === '(' ? '(' : '');
|
|
69039
|
+
}
|
|
69040
|
+
return match;
|
|
69041
|
+
});
|
|
69042
|
+
});
|
|
69043
|
+
return result;
|
|
69044
|
+
}
|
|
69045
|
+
external_commonjs_vue_commonjs2_vue_root_Vue_default().directive('escaped-html', {
|
|
69046
|
+
inserted: function inserted(el, binding, vnode) {
|
|
69047
|
+
el.innerHTML = escapedHtml(binding.value);
|
|
69048
|
+
},
|
|
69049
|
+
componentUpdated: function componentUpdated(el, binding, vnode) {
|
|
69050
|
+
if (binding.value !== binding.oldValue) {
|
|
69051
|
+
el.innerHTML = escapedHtml(binding.value);
|
|
69052
|
+
}
|
|
69053
|
+
}
|
|
69054
|
+
});
|
|
68962
69055
|
;// CONCATENATED MODULE: ./packages/common/directive/index.js
|
|
68963
69056
|
|
|
68964
69057
|
|
|
@@ -68969,6 +69062,7 @@ external_commonjs_vue_commonjs2_vue_root_Vue_default().directive('wfidea-lbl', {
|
|
|
68969
69062
|
|
|
68970
69063
|
|
|
68971
69064
|
|
|
69065
|
+
|
|
68972
69066
|
;// CONCATENATED MODULE: ./packages/ecmapp/Directive/format-value/index.js
|
|
68973
69067
|
function format_value_typeof(o) { "@babel/helpers - typeof"; return format_value_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, format_value_typeof(o); }
|
|
68974
69068
|
|
package/lib/ecmappaio.umd.js
CHANGED
|
@@ -41129,7 +41129,7 @@ service.interceptors.request.use(function (config) {
|
|
|
41129
41129
|
} else if (window.productCode && location.href.indexOf('productCode') === -1) {
|
|
41130
41130
|
config.headers['productCode'] = window.productCode;
|
|
41131
41131
|
}
|
|
41132
|
-
config.headers['ecweb-csrf-token'] = decodeURIComponent(sessionStorage.getItem('ecweb-csrf-token')
|
|
41132
|
+
config.headers['ecweb-csrf-token'] = decodeURIComponent(sessionStorage.getItem('ecweb-csrf-token') || '');
|
|
41133
41133
|
var language = (0,lang/* getLanguage */.Z0)();
|
|
41134
41134
|
if (language === 'en') {
|
|
41135
41135
|
language = 'en-US';
|
|
@@ -41476,6 +41476,8 @@ if (sessionStorage.getItem('productCode')) {
|
|
|
41476
41476
|
productCode = '-' + sessionStorage.getItem('productCode');
|
|
41477
41477
|
} else if (location.href.indexOf('productCode=') !== -1) {
|
|
41478
41478
|
productCode = '-' + location.href.split('productCode=')[1].split('&')[0];
|
|
41479
|
+
} else if (window.productCode) {
|
|
41480
|
+
productCode = '-' + window.productCode;
|
|
41479
41481
|
}
|
|
41480
41482
|
var TokenKey = (window.jwtTokenKey || 'ECWEB-JWTSSO-TOKEN') + (productCode || port);
|
|
41481
41483
|
var RoleKey = 'ECWEB-ROLE-CODE-LIST' + (productCode || port);
|
|
@@ -68969,6 +68971,97 @@ external_commonjs_vue_commonjs2_vue_root_Vue_default().directive('wfidea-lbl', {
|
|
|
68969
68971
|
wfIdeaLblI18nFunc(el, binding, vnode);
|
|
68970
68972
|
}
|
|
68971
68973
|
});
|
|
68974
|
+
;// CONCATENATED MODULE: ./packages/common/directive/escaped-html/index.js
|
|
68975
|
+
|
|
68976
|
+
function escapedHtml(htmlStr) {
|
|
68977
|
+
if (typeof htmlStr !== 'string') {
|
|
68978
|
+
return '';
|
|
68979
|
+
}
|
|
68980
|
+
|
|
68981
|
+
// 1. 基本转义
|
|
68982
|
+
var basic = htmlStr.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g, '/').replace(/`/g, '`');
|
|
68983
|
+
|
|
68984
|
+
// 2. 特殊危险模式处理
|
|
68985
|
+
var patterns = [
|
|
68986
|
+
// 事件处理器
|
|
68987
|
+
{
|
|
68988
|
+
regex: /\bon\w+\s*=\s*["'][^"']*["']/gi,
|
|
68989
|
+
replace: ': '
|
|
68990
|
+
}, {
|
|
68991
|
+
regex: /\bon\w+\s*=\s*[^\s>]+/gi,
|
|
68992
|
+
replace: '='
|
|
68993
|
+
},
|
|
68994
|
+
// JavaScript 协议
|
|
68995
|
+
{
|
|
68996
|
+
regex: /javascript:/gi,
|
|
68997
|
+
escape: ':'
|
|
68998
|
+
}, {
|
|
68999
|
+
regex: /data:/gi,
|
|
69000
|
+
escape: ':'
|
|
69001
|
+
}, {
|
|
69002
|
+
regex: /vbscript:/gi,
|
|
69003
|
+
escape: ':'
|
|
69004
|
+
},
|
|
69005
|
+
// 十六进制/八进制编码
|
|
69006
|
+
{
|
|
69007
|
+
regex: /&#x?[0-9a-f]+;/gi,
|
|
69008
|
+
decode: true
|
|
69009
|
+
},
|
|
69010
|
+
// CSS 危险表达式
|
|
69011
|
+
{
|
|
69012
|
+
regex: /expression\s*\(/gi,
|
|
69013
|
+
escape: '('
|
|
69014
|
+
}, {
|
|
69015
|
+
regex: /url\s*\(\s*["']?javascript:/gi,
|
|
69016
|
+
escape: ':'
|
|
69017
|
+
},
|
|
69018
|
+
// HTML5 新事件
|
|
69019
|
+
{
|
|
69020
|
+
regex: /onpointer\w+/gi,
|
|
69021
|
+
replace: 'on'
|
|
69022
|
+
}, {
|
|
69023
|
+
regex: /ontouch\w+/gi,
|
|
69024
|
+
replace: 'on'
|
|
69025
|
+
},
|
|
69026
|
+
// 内联样式中的 JavaScript
|
|
69027
|
+
{
|
|
69028
|
+
regex: /style\s*=\s*["'][^"']*javascript:[^"']*["']/gi,
|
|
69029
|
+
escape: ':'
|
|
69030
|
+
}];
|
|
69031
|
+
var result = basic;
|
|
69032
|
+
patterns.forEach(function (_ref) {
|
|
69033
|
+
var regex = _ref.regex,
|
|
69034
|
+
replace = _ref.replace,
|
|
69035
|
+
escape = _ref.escape,
|
|
69036
|
+
decode = _ref.decode;
|
|
69037
|
+
result = result.replace(regex, function (match) {
|
|
69038
|
+
if (decode) {
|
|
69039
|
+
// 处理 HTML 实体编码
|
|
69040
|
+
var temp = document.createElement('div');
|
|
69041
|
+
temp.innerHTML = match;
|
|
69042
|
+
return temp.textContent;
|
|
69043
|
+
} else if (replace) {
|
|
69044
|
+
// 替换特定部分
|
|
69045
|
+
return match.replace(new RegExp(replace, 'g'), replace === ':' ? ':' : replace === '=' ? '=' : replace === '(' ? '(' : replace === 'on' ? 'on' : replace);
|
|
69046
|
+
} else if (escape) {
|
|
69047
|
+
// 转义特定字符
|
|
69048
|
+
return match.replace(new RegExp(escape, 'g'), escape === ':' ? ':' : escape === '(' ? '(' : '');
|
|
69049
|
+
}
|
|
69050
|
+
return match;
|
|
69051
|
+
});
|
|
69052
|
+
});
|
|
69053
|
+
return result;
|
|
69054
|
+
}
|
|
69055
|
+
external_commonjs_vue_commonjs2_vue_root_Vue_default().directive('escaped-html', {
|
|
69056
|
+
inserted: function inserted(el, binding, vnode) {
|
|
69057
|
+
el.innerHTML = escapedHtml(binding.value);
|
|
69058
|
+
},
|
|
69059
|
+
componentUpdated: function componentUpdated(el, binding, vnode) {
|
|
69060
|
+
if (binding.value !== binding.oldValue) {
|
|
69061
|
+
el.innerHTML = escapedHtml(binding.value);
|
|
69062
|
+
}
|
|
69063
|
+
}
|
|
69064
|
+
});
|
|
68972
69065
|
;// CONCATENATED MODULE: ./packages/common/directive/index.js
|
|
68973
69066
|
|
|
68974
69067
|
|
|
@@ -68979,6 +69072,7 @@ external_commonjs_vue_commonjs2_vue_root_Vue_default().directive('wfidea-lbl', {
|
|
|
68979
69072
|
|
|
68980
69073
|
|
|
68981
69074
|
|
|
69075
|
+
|
|
68982
69076
|
;// CONCATENATED MODULE: ./packages/ecmapp/Directive/format-value/index.js
|
|
68983
69077
|
function format_value_typeof(o) { "@babel/helpers - typeof"; return format_value_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, format_value_typeof(o); }
|
|
68984
69078
|
|