@daoyi/nmtl-ui 1.1.32 → 1.1.33
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/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/utils/snaDefine.js +1 -0
- package/lib/utils/snaPreProcess.js +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -28,4 +28,5 @@ export { default as Footer } from './components/Footer';
|
|
|
28
28
|
export { default as Keywords } from './components/Keywords';
|
|
29
29
|
export { default as isDevelopMode } from './utils/isDevelopMode';
|
|
30
30
|
export { default as removeDuplicateItem } from './utils/removeDuplicateItem';
|
|
31
|
-
export { default as snaPreProcess } from './utils/snaPreProcess';
|
|
31
|
+
export { default as snaPreProcess } from './utils/snaPreProcess';
|
|
32
|
+
export { default as snaDefine } from './utils/snaDefine';
|
package/lib/index.js
CHANGED
|
@@ -28,4 +28,5 @@ export { default as Footer } from './components/Footer';
|
|
|
28
28
|
export { default as Keywords } from './components/Keywords';
|
|
29
29
|
export { default as isDevelopMode } from './utils/isDevelopMode';
|
|
30
30
|
export { default as removeDuplicateItem } from './utils/removeDuplicateItem';
|
|
31
|
-
export { default as snaPreProcess } from './utils/snaPreProcess';
|
|
31
|
+
export { default as snaPreProcess } from './utils/snaPreProcess';
|
|
32
|
+
export { default as snaDefine } from './utils/snaDefine';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a={mainNode:"mainNode"};export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
import r from"./snaDefine.js";function n(r){return function(r){if(Array.isArray(r))return e(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,n){if(!r)return;if("string"==typeof r)return e(r,n);var t=Object.prototype.toString.call(r).slice(8,-1);"Object"===t&&r.constructor&&(t=r.constructor.name);if("Map"===t||"Set"===t)return Array.from(r);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e(r,n)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(r,n){(null==n||n>r.length)&&(n=r.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=r[e];return t}var t=function(e){var t=e.mainNodes,a=e.snaData;if(!(t&&Array.isArray(t)&&a&&Array.isArray(a)))return console.log("ERROR: wrong input data.",t,a),{nodes:[],links:[]};var o=[];a.forEach((function(n){var e=n.sourceId,a=n.sourceType,i=n.source,u=n.sourceHide,f=n.targetId,c=n.targetType,s=n.target,d=n.targetHide;u&&"1"===u&&console.log(n),o.find((function(r){return r.name===n.source}))||o.push({name:i,id:e,type:-1!==t.indexOf(e)?r.mainNode:a,hasClick:-1===t.indexOf(e),hide:u||"0"}),o.find((function(r){return r.name===n.target}))||o.push({name:s,id:f,type:-1!==t.indexOf(f)?r.mainNode:c,hasClick:-1===t.indexOf(f),hide:d||"0"})}));var i=n(new Set(o.map((function(r){return JSON.stringify(r)})))).map((function(r){return JSON.parse(r)})),u=[];return a.forEach((function(r){var n=r.source,e=r.target;u.push({target:i.findIndex((function(r){return e===r.name})),source:i.findIndex((function(r){return n===r.name}))})})),{nodes:i,links:u}};export{t as default};
|
package/package.json
CHANGED