fl-web-component 1.3.17 → 1.3.18
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/README.md
CHANGED
|
@@ -22291,7 +22291,7 @@ Factory_1.Factory.addGetterSetter(Node_1.Node, 'blue', 0, Validators_1.RGBCompon
|
|
|
22291
22291
|
/***/ "9224":
|
|
22292
22292
|
/***/ (function(module) {
|
|
22293
22293
|
|
|
22294
|
-
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"1.3.
|
|
22294
|
+
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"1.3.18\",\"scripts\":{\"tip1\":\"仅调试本组件不涉及业务组件,请执行dev\",\"dev\":\"vue-cli-service serve\",\"lint\":\"eslint \\\"{src,packages}/**/*.{vue,js}\\\" --fix\",\"prettier\":\"prettier --write \\\"packages/**/*.{js,css,less,scss,vue,html}\\\"\",\"=\":\"=============================================================\",\"tip2\":\"同时调试本组件与业务组件,请执行watch\",\"watch\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\",\"patches\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"camera-controls\":\"2.9.0\",\"core-js\":\"^3.42.0\",\"dxf-parser\":\"^1.1.2\",\"element-ui\":\"2.15.14\",\"html2canvas\":\"^1.4.1\",\"jspdf\":\"^3.0.1\",\"konva\":\"^9.3.14\",\"lodash\":\"^4.17.21\",\"meshline\":\"^3.3.1\",\"regenerator-runtime\":\"^0.14.1\",\"svg-pan-zoom\":\"^3.6.2\",\"three\":\"^0.176.0\",\"three.path\":\"^1.0.1\",\"vue\":\"^2.6.11\"},\"devDependencies\":{\"@babel/core\":\"^7.12.16\",\"@babel/preset-env\":\"^7.0.0\",\"@babel/runtime-corejs3\":\"^7.27.1\",\"@vue/cli-plugin-babel\":\"~4.4.0\",\"@vue/cli-plugin-eslint\":\"~4.4.0\",\"@vue/cli-service\":\"~4.4.0\",\"babel-eslint\":\"^10.1.0\",\"babel-loader\":\"^8.0.0\",\"copy-webpack-plugin\":\"^4.0.1\",\"eslint\":\"^6.7.2\",\"eslint-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\"},\"eslintConfig\":{\"root\":true,\"env\":{\"node\":true},\"extends\":[\"plugin:vue/essential\",\"eslint:recommended\"],\"parserOptions\":{\"parser\":\"babel-eslint\"},\"rules\":{}},\"browserslist\":[\"> 1%\",\"last 2 versions\",\"not dead\"]}");
|
|
22295
22295
|
|
|
22296
22296
|
/***/ }),
|
|
22297
22297
|
|
|
@@ -29274,7 +29274,7 @@ if (typeof window !== 'undefined') {
|
|
|
29274
29274
|
// Indicate to webpack that this file can be concatenated
|
|
29275
29275
|
/* harmony default export */ var setPublicPath = (null);
|
|
29276
29276
|
|
|
29277
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
29277
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"01ad9958-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/index.vue?vue&type=template&id=c496e868&scoped=true
|
|
29278
29278
|
var com_graphicsvue_type_template_id_c496e868_scoped_true_render = function render() {
|
|
29279
29279
|
var _vm = this,
|
|
29280
29280
|
_c = _vm._self._c;
|
|
@@ -62799,7 +62799,7 @@ var component = normalizeComponent(
|
|
|
62799
62799
|
)
|
|
62800
62800
|
|
|
62801
62801
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
62802
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
62802
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"01ad9958-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-flcanvas/index.vue?vue&type=template&id=3507a900&scoped=true
|
|
62803
62803
|
var com_flcanvasvue_type_template_id_3507a900_scoped_true_render = function render() {
|
|
62804
62804
|
var _vm = this,
|
|
62805
62805
|
_c = _vm._self._c;
|
|
@@ -65119,6 +65119,34 @@ function entityFormatting_unsupportedIterableToArray(r, a) { if (r) { if ("strin
|
|
|
65119
65119
|
function entityFormatting_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
65120
65120
|
|
|
65121
65121
|
|
|
65122
|
+
|
|
65123
|
+
//rgb转换
|
|
65124
|
+
|
|
65125
|
+
function decimalToRGBHex(decimalValue) {
|
|
65126
|
+
// Ensure the input is a valid integer
|
|
65127
|
+
if (!Number.isInteger(decimalValue)) {
|
|
65128
|
+
throw new Error("Input must be an integer.");
|
|
65129
|
+
}
|
|
65130
|
+
|
|
65131
|
+
// Ensure the input is within the valid range for 24-bit colors
|
|
65132
|
+
if (decimalValue < 0 || decimalValue > 0xFFFFFF) {
|
|
65133
|
+
throw new Error("Input must be between 0 and 16777215 (0xFFFFFF).");
|
|
65134
|
+
}
|
|
65135
|
+
|
|
65136
|
+
// Extract the red, green, and blue components
|
|
65137
|
+
var red = decimalValue >> 16 & 0xFF;
|
|
65138
|
+
var green = decimalValue >> 8 & 0xFF;
|
|
65139
|
+
var blue = decimalValue & 0xFF;
|
|
65140
|
+
|
|
65141
|
+
// Convert the RGB components to hexadecimal and format as a string
|
|
65142
|
+
var hex = "#" + red.toString(16).padStart(2, '0') + green.toString(16).padStart(2, '0') + blue.toString(16).padStart(2, '0');
|
|
65143
|
+
return {
|
|
65144
|
+
red: red,
|
|
65145
|
+
green: green,
|
|
65146
|
+
blue: blue,
|
|
65147
|
+
hex: hex.toUpperCase()
|
|
65148
|
+
};
|
|
65149
|
+
}
|
|
65122
65150
|
function handleFn(functionName, recordDxf, entity, group, key, configParams, konvaLayer) {
|
|
65123
65151
|
console.log(functionName);
|
|
65124
65152
|
switch (functionName) {
|
|
@@ -65289,6 +65317,10 @@ function mtextContentAndFormattingToTextAndStyle(textAndControlChars, entity, co
|
|
|
65289
65317
|
};
|
|
65290
65318
|
}
|
|
65291
65319
|
function drawArc(recordDxf, entity, group, key, configParams) {
|
|
65320
|
+
var color = entity.color;
|
|
65321
|
+
var rgb = decimalToRGBHex(color);
|
|
65322
|
+
console.log(rgb);
|
|
65323
|
+
var hex = rgb.hex;
|
|
65292
65324
|
var startAngle, endAngle;
|
|
65293
65325
|
if (entity.type === "CIRCLE") {
|
|
65294
65326
|
startAngle = entity.startAngle || 0;
|
|
@@ -65310,7 +65342,7 @@ function drawArc(recordDxf, entity, group, key, configParams) {
|
|
|
65310
65342
|
points: list,
|
|
65311
65343
|
name: key.replace(/\s*/g, ""),
|
|
65312
65344
|
entityId: key,
|
|
65313
|
-
stroke:
|
|
65345
|
+
stroke: hex,
|
|
65314
65346
|
customColor: configParams ? configParams.color : "",
|
|
65315
65347
|
strokeWidth: width,
|
|
65316
65348
|
visible: configParams ? configParams.visible : true,
|
|
@@ -65379,6 +65411,10 @@ function drawEllpse(recordDxf, entity, group, key, configParams) {
|
|
|
65379
65411
|
// group.add(line);
|
|
65380
65412
|
}
|
|
65381
65413
|
function drawLine(recordDxf, entity, group, key, configParams) {
|
|
65414
|
+
var color = entity.color;
|
|
65415
|
+
var rgb = decimalToRGBHex(color);
|
|
65416
|
+
console.log(rgb);
|
|
65417
|
+
var hex = rgb.hex;
|
|
65382
65418
|
var x1 = entity.vertices[0].x;
|
|
65383
65419
|
var y1 = entity.vertices[0].y;
|
|
65384
65420
|
var x2 = entity.vertices[1].x;
|
|
@@ -65393,7 +65429,7 @@ function drawLine(recordDxf, entity, group, key, configParams) {
|
|
|
65393
65429
|
name: key.replace(/\s*/g, ""),
|
|
65394
65430
|
entityId: key,
|
|
65395
65431
|
isGroup: false,
|
|
65396
|
-
stroke:
|
|
65432
|
+
stroke: hex,
|
|
65397
65433
|
customColor: configParams ? configParams.color : "",
|
|
65398
65434
|
strokeWidth: width,
|
|
65399
65435
|
visible: configParams ? configParams.visible : true,
|
|
@@ -65422,6 +65458,13 @@ function drawLine(recordDxf, entity, group, key, configParams) {
|
|
|
65422
65458
|
// group.add(line);
|
|
65423
65459
|
}
|
|
65424
65460
|
function entityFormatting_drawText(recordDxf, entity, group, key, configParams) {
|
|
65461
|
+
var color = entity.color;
|
|
65462
|
+
var rgb = decimalToRGBHex(color);
|
|
65463
|
+
console.log(rgb);
|
|
65464
|
+
var hex = rgb.hex;
|
|
65465
|
+
if (hex == '#FFFFFF') {
|
|
65466
|
+
hex = '#000';
|
|
65467
|
+
}
|
|
65425
65468
|
var text = entity.text;
|
|
65426
65469
|
var fontSize = 0;
|
|
65427
65470
|
if (key == 0) {
|
|
@@ -65437,13 +65480,13 @@ function entityFormatting_drawText(recordDxf, entity, group, key, configParams)
|
|
|
65437
65480
|
y: -parseFloat(y),
|
|
65438
65481
|
text: text,
|
|
65439
65482
|
fontSize: fontSize,
|
|
65440
|
-
fill:
|
|
65483
|
+
fill: hex,
|
|
65441
65484
|
customColor: configParams ? configParams.color : "",
|
|
65442
65485
|
name: key.replace(/\s*/g, ""),
|
|
65443
65486
|
entityId: key,
|
|
65444
65487
|
fontFamily: "SimSun",
|
|
65445
65488
|
visible: configParams ? configParams.visible : true,
|
|
65446
|
-
stroke:
|
|
65489
|
+
stroke: hex,
|
|
65447
65490
|
strokeWidth: 0.1
|
|
65448
65491
|
});
|
|
65449
65492
|
if (entity.rotation) {
|
|
@@ -65486,6 +65529,13 @@ function drawHatch(recordDxf, entity, group, key, configParams) {
|
|
|
65486
65529
|
console.log("hatch");
|
|
65487
65530
|
}
|
|
65488
65531
|
function drawLwLine(recordDxf, entity, group, key, configParams) {
|
|
65532
|
+
var color = entity.color;
|
|
65533
|
+
var rgb = decimalToRGBHex(color);
|
|
65534
|
+
console.log(rgb);
|
|
65535
|
+
var hex = rgb.hex;
|
|
65536
|
+
if (hex == '#FFFFFF') {
|
|
65537
|
+
hex = '#000';
|
|
65538
|
+
}
|
|
65489
65539
|
var closed = entity.shape;
|
|
65490
65540
|
var list = [];
|
|
65491
65541
|
for (var i = 0; i < entity.vertices.length; i++) {
|
|
@@ -65504,7 +65554,7 @@ function drawLwLine(recordDxf, entity, group, key, configParams) {
|
|
|
65504
65554
|
closed: closed,
|
|
65505
65555
|
name: key.replace(/\s*/g, ""),
|
|
65506
65556
|
entityId: key,
|
|
65507
|
-
stroke:
|
|
65557
|
+
stroke: hex,
|
|
65508
65558
|
customColor: configParams ? configParams.color : "",
|
|
65509
65559
|
strokeWidth: width,
|
|
65510
65560
|
visible: configParams ? configParams.visible : true,
|
|
@@ -66446,7 +66496,7 @@ var com_flcanvas_component = normalizeComponent(
|
|
|
66446
66496
|
)
|
|
66447
66497
|
|
|
66448
66498
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
66449
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
66499
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"01ad9958-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/per-control.vue?vue&type=template&id=f547d5c6&scoped=true
|
|
66450
66500
|
var per_controlvue_type_template_id_f547d5c6_scoped_true_render = function render() {
|
|
66451
66501
|
var _vm = this,
|
|
66452
66502
|
_c = _vm._self._c;
|
|
@@ -66554,7 +66604,7 @@ var per_control_component = normalizeComponent(
|
|
|
66554
66604
|
)
|
|
66555
66605
|
|
|
66556
66606
|
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
66557
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
66607
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"01ad9958-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/pid.vue?vue&type=template&id=0ec35ee4&scoped=true
|
|
66558
66608
|
var pidvue_type_template_id_0ec35ee4_scoped_true_render = function render() {
|
|
66559
66609
|
var _vm = this,
|
|
66560
66610
|
_c = _vm._self._c;
|