@gct-paas/word 0.1.26 → 0.1.27
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/dist/core/interaction/InteractionController.d.ts +2 -0
- package/dist/core/utils/expand.d.ts +18 -23
- package/dist/core/view/TableCell.d.ts +2 -0
- package/dist/core/widget/widget-state.d.ts +5 -0
- package/dist/index.es.js +428 -356
- package/dist/runtime/canvas/table/utils/index.d.ts +6 -17
- package/dist/sdk/doc-runtime/factories/document-initializer.d.ts +1 -1
- package/dist/sdk/types/index.d.ts +6 -0
- package/dist/word.css +17 -17
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -27393,6 +27393,240 @@ function isClickPaperWidgetAllNode(node) {
|
|
|
27393
27393
|
const raw = node.raw;
|
|
27394
27394
|
return raw.isPageWidgetRun;
|
|
27395
27395
|
}
|
|
27396
|
+
const EmptySymbolTypeConst = {
|
|
27397
|
+
"/": "/",
|
|
27398
|
+
"--": "--",
|
|
27399
|
+
"——": "——",
|
|
27400
|
+
NA: "NA",
|
|
27401
|
+
"N/A": "N/A"
|
|
27402
|
+
};
|
|
27403
|
+
const ViewStateTypeConst = {
|
|
27404
|
+
/** 文本显示 */
|
|
27405
|
+
Readonly: "readonly",
|
|
27406
|
+
/** 组件显示-禁用 */
|
|
27407
|
+
Disabled: "disabled",
|
|
27408
|
+
/** 组件显示-跟随设计 */
|
|
27409
|
+
Auto: "auto"
|
|
27410
|
+
};
|
|
27411
|
+
const RenderCompTypeConst = {
|
|
27412
|
+
/** 圆形 */
|
|
27413
|
+
Radio: "radio",
|
|
27414
|
+
/** 方形 */
|
|
27415
|
+
Checkbox: "checkbox",
|
|
27416
|
+
/** 下拉 */
|
|
27417
|
+
Select: "select"
|
|
27418
|
+
};
|
|
27419
|
+
const BooleanShowModeTypeConst = {
|
|
27420
|
+
/** 只显示真 */
|
|
27421
|
+
OnlyTrue: "onlyTrue",
|
|
27422
|
+
/** 只显示真 */
|
|
27423
|
+
OnlyFalse: "onlyFalse",
|
|
27424
|
+
/** 同时显示真和假 */
|
|
27425
|
+
Both: "both"
|
|
27426
|
+
};
|
|
27427
|
+
const LabelPositionTypeConst = {
|
|
27428
|
+
/** 文字在前 */
|
|
27429
|
+
Before: "before",
|
|
27430
|
+
/** 文字在后 */
|
|
27431
|
+
After: "after"
|
|
27432
|
+
};
|
|
27433
|
+
const OrientationTypeConst = {
|
|
27434
|
+
/** 纵 */
|
|
27435
|
+
Portrait: "portrait",
|
|
27436
|
+
/** 横 */
|
|
27437
|
+
Landscape: "landscape"
|
|
27438
|
+
};
|
|
27439
|
+
const DecimalDisplayModeTypeConst = {
|
|
27440
|
+
/** 显示百分比(%) */
|
|
27441
|
+
PERCENT: "percent",
|
|
27442
|
+
/** 显示原始数值 */
|
|
27443
|
+
ORIGIN: "origin"
|
|
27444
|
+
};
|
|
27445
|
+
const RangeValidateModeTypeConst = {
|
|
27446
|
+
/** 不校验 */
|
|
27447
|
+
No_Validate: "NoValidate",
|
|
27448
|
+
/** 固定输入校验 */
|
|
27449
|
+
Fixed_Number: "FixedNumber",
|
|
27450
|
+
/** 变量校验 */
|
|
27451
|
+
Variable_Validate: "VariableValidate"
|
|
27452
|
+
};
|
|
27453
|
+
const FieldSysVarDefaultValueConst = {
|
|
27454
|
+
NULL: "",
|
|
27455
|
+
/** 系统登录用户 */
|
|
27456
|
+
CURRENT_USER: "CURRENT_USER",
|
|
27457
|
+
/** 当前登录用户主部门 */
|
|
27458
|
+
CURRENT_ORG: "CURRENT_ORG"
|
|
27459
|
+
};
|
|
27460
|
+
const SignatureNumberTypeConst = {
|
|
27461
|
+
/** 单人签名 */
|
|
27462
|
+
SIGNATURE_SINGLE: "signature_single",
|
|
27463
|
+
/** 多人签名 */
|
|
27464
|
+
SIGNATURE_MULTIPLE: "signature_multiple"
|
|
27465
|
+
};
|
|
27466
|
+
const SignatureTypeConst = {
|
|
27467
|
+
/** 仅签名 */
|
|
27468
|
+
SIGNATURE_ONLY: "signature_only",
|
|
27469
|
+
/** 签名及日期 */
|
|
27470
|
+
SIGNATURE_DATE: "signature_date",
|
|
27471
|
+
/** 签名及日期时间 */
|
|
27472
|
+
SIGNATURE_DATETIME: "signature_datetime"
|
|
27473
|
+
};
|
|
27474
|
+
const SignatureTimeTypeConst = {
|
|
27475
|
+
/** 跟随签名 */
|
|
27476
|
+
FOLLOW_SIGNATURE: "follow_signature",
|
|
27477
|
+
/** 填充新字段 */
|
|
27478
|
+
POPULATE_FIELD: "populate_field"
|
|
27479
|
+
};
|
|
27480
|
+
const SignDisplayTypeConst = {
|
|
27481
|
+
/** 垂直显示 */
|
|
27482
|
+
VERTICAL: "vertical",
|
|
27483
|
+
/** 水平显示 */
|
|
27484
|
+
HORIZONTAL: "horizontal"
|
|
27485
|
+
};
|
|
27486
|
+
const ImageDisplayModeConst = {
|
|
27487
|
+
/** 自定义 */
|
|
27488
|
+
CUSTOM: "CUSTOM",
|
|
27489
|
+
/** 自适应 */
|
|
27490
|
+
ADAPTIVE: "ADAPTIVE"
|
|
27491
|
+
};
|
|
27492
|
+
const FieldDependencyTypeConst = {
|
|
27493
|
+
/**隐藏 */
|
|
27494
|
+
Hidden: "hidden",
|
|
27495
|
+
/**只读 */
|
|
27496
|
+
Readonly: "readonly",
|
|
27497
|
+
/**禁用 */
|
|
27498
|
+
Disabled: "disabled",
|
|
27499
|
+
/**必填 */
|
|
27500
|
+
Required: "required",
|
|
27501
|
+
/**赋值 */
|
|
27502
|
+
Assignment: "assignment"
|
|
27503
|
+
};
|
|
27504
|
+
const AssignmentStrategyTypeConst = {
|
|
27505
|
+
/**始终覆盖 */
|
|
27506
|
+
AlwaysCover: "alwaysCover",
|
|
27507
|
+
/**不覆盖已修改 */
|
|
27508
|
+
NotCovered: "notCovered"
|
|
27509
|
+
};
|
|
27510
|
+
const FormTypeConst = {
|
|
27511
|
+
/** 基础表单 */
|
|
27512
|
+
BASE: "BASE",
|
|
27513
|
+
/** 流程表单 */
|
|
27514
|
+
PROCESS: "PROCESS",
|
|
27515
|
+
/** 视图表单 */
|
|
27516
|
+
VIEW: "VIEW",
|
|
27517
|
+
/** 文本表单 */
|
|
27518
|
+
TEXT: "TEXT",
|
|
27519
|
+
/** 文件表单 */
|
|
27520
|
+
FILE: "FILE"
|
|
27521
|
+
};
|
|
27522
|
+
const ViewTypeConst = {
|
|
27523
|
+
/** 视图模型(查询视图) */
|
|
27524
|
+
VIEW_MODEL: "VIEW_MODEL",
|
|
27525
|
+
/** SQL数据视图 */
|
|
27526
|
+
VIEW_SQL: "SQL",
|
|
27527
|
+
/** 自定义模型 */
|
|
27528
|
+
VIEW_JS: "JS"
|
|
27529
|
+
};
|
|
27530
|
+
const BwipCodeTypeConst = {
|
|
27531
|
+
Code39: "code39",
|
|
27532
|
+
Code128: "code128",
|
|
27533
|
+
QRCode: "qrcode",
|
|
27534
|
+
GS1DataMatrix: "gs1datamatrix"
|
|
27535
|
+
};
|
|
27536
|
+
const ValueTypeConst = {
|
|
27537
|
+
/** 固定值 */
|
|
27538
|
+
Fixed: "fixed",
|
|
27539
|
+
/** 字段 */
|
|
27540
|
+
Field: "field",
|
|
27541
|
+
/** 公式 */
|
|
27542
|
+
Formula: "formula"
|
|
27543
|
+
};
|
|
27544
|
+
const ImageSizeModeTypeConst = {
|
|
27545
|
+
/** 自适应,响应式的适应外层容器的大小 */
|
|
27546
|
+
RESPONSIVE: "responsive",
|
|
27547
|
+
/** 固定值,高宽设了多少就是多少 */
|
|
27548
|
+
FIXED: "fixed"
|
|
27549
|
+
};
|
|
27550
|
+
const DiagonalDirectionTypeConst = {
|
|
27551
|
+
/** 从左上到右下 */
|
|
27552
|
+
Forward: "forward",
|
|
27553
|
+
/** 从右上到左下 / */
|
|
27554
|
+
Backward: "backward"
|
|
27555
|
+
};
|
|
27556
|
+
function resolveDisplayStatusFromAuth(options) {
|
|
27557
|
+
const { info, readonlyString, editString } = options;
|
|
27558
|
+
if (isEmpty(info)) return null;
|
|
27559
|
+
if (info.edit && !info.readonly) {
|
|
27560
|
+
return editString;
|
|
27561
|
+
}
|
|
27562
|
+
if (info.readonly && !info.edit) {
|
|
27563
|
+
return readonlyString;
|
|
27564
|
+
}
|
|
27565
|
+
return null;
|
|
27566
|
+
}
|
|
27567
|
+
function isWidgetMetaInteractionBlockedInFillMode(doc, widgetMeta) {
|
|
27568
|
+
if (!doc.isInFillMode() || !widgetMeta) return false;
|
|
27569
|
+
const state = resolveWidgetState({
|
|
27570
|
+
doc,
|
|
27571
|
+
viewState: widgetMeta.props.viewState,
|
|
27572
|
+
required: widgetMeta.props.required,
|
|
27573
|
+
newRequired: widgetMeta.props.newSpecificConfig?.newRequired,
|
|
27574
|
+
readonly: widgetMeta.props.readonly,
|
|
27575
|
+
newReadonly: widgetMeta.props.newSpecificConfig?.newReadonly,
|
|
27576
|
+
disabled: widgetMeta.props.disabled,
|
|
27577
|
+
newDisabled: widgetMeta.props.newSpecificConfig?.newDisabled,
|
|
27578
|
+
cannotInput: widgetMeta.props.cannotInput,
|
|
27579
|
+
isLinkedModelField: widgetMeta.field?.isLinkedModelField,
|
|
27580
|
+
fieldLink: widgetMeta.field?.fieldLink || "",
|
|
27581
|
+
modelLink: widgetMeta.field?.modelLink || ""
|
|
27582
|
+
});
|
|
27583
|
+
const isReadonly = state.displayStatus === "readonly-component" || state.displayStatus === "readonly-text";
|
|
27584
|
+
return state.disabled || isReadonly;
|
|
27585
|
+
}
|
|
27586
|
+
function resolveWidgetState(ctx) {
|
|
27587
|
+
const required4 = ctx.doc.isInEditMode() ? !!ctx.required : !!ctx.newRequired;
|
|
27588
|
+
let readonly2 = false;
|
|
27589
|
+
if (ctx.doc.isInEditMode()) {
|
|
27590
|
+
readonly2 = false;
|
|
27591
|
+
} else if (ctx.doc.isInPrintMode()) {
|
|
27592
|
+
readonly2 = true;
|
|
27593
|
+
} else if (ctx.newReadonly !== void 0) {
|
|
27594
|
+
readonly2 = !!ctx.newReadonly;
|
|
27595
|
+
}
|
|
27596
|
+
const disabled = ctx.doc.isInEditMode() ? !!ctx.disabled : !!ctx.newDisabled;
|
|
27597
|
+
const readonlyString = ctx.viewState === ViewStateTypeConst.Disabled || ctx.viewState === ViewStateTypeConst.Auto ? "readonly-component" : "readonly-text";
|
|
27598
|
+
const editString = readonly2 ? "readonly-component" : "edit-component";
|
|
27599
|
+
let displayStatus;
|
|
27600
|
+
const fromAuth = resolveDisplayStatusFromAuth({
|
|
27601
|
+
info: ctx.doc.docRuntimeMeta.handleInfo.bpmnFieldAuthMap?.[`${ctx.modelLink}.${ctx.fieldLink}`],
|
|
27602
|
+
readonlyString,
|
|
27603
|
+
editString
|
|
27604
|
+
});
|
|
27605
|
+
if (ctx.isLinkedModelField || ctx.cannotInput) {
|
|
27606
|
+
displayStatus = readonlyString;
|
|
27607
|
+
} else if (ctx.doc.mode === DocModeTypeConst.Print) {
|
|
27608
|
+
displayStatus = readonlyString;
|
|
27609
|
+
} else if (ctx.doc.mode === DocModeTypeConst.Fill) {
|
|
27610
|
+
if (fromAuth) {
|
|
27611
|
+
displayStatus = fromAuth;
|
|
27612
|
+
} else if (ctx.doc.formType !== FormTypeConst.PROCESS) {
|
|
27613
|
+
displayStatus = editString;
|
|
27614
|
+
} else {
|
|
27615
|
+
const bpmnType = ctx.doc.docRuntimeMeta.handleInfo?.bpmnType;
|
|
27616
|
+
const isReadonlyNode = bpmnType === "bpmnApproval" || bpmnType === "bpmnJudge";
|
|
27617
|
+
displayStatus = isReadonlyNode ? readonlyString : editString;
|
|
27618
|
+
}
|
|
27619
|
+
} else {
|
|
27620
|
+
displayStatus = editString;
|
|
27621
|
+
}
|
|
27622
|
+
const finalDisabled = displayStatus === "edit-component" ? disabled : ctx.viewState === ViewStateTypeConst.Disabled || disabled;
|
|
27623
|
+
return {
|
|
27624
|
+
required: required4,
|
|
27625
|
+
readonly: readonly2,
|
|
27626
|
+
disabled: finalDisabled,
|
|
27627
|
+
displayStatus
|
|
27628
|
+
};
|
|
27629
|
+
}
|
|
27396
27630
|
class TextHitHandler {
|
|
27397
27631
|
handleHitDetection(doc, node, actualX, actualY) {
|
|
27398
27632
|
const base = getBaseMetaInfo(node);
|
|
@@ -27435,6 +27669,9 @@ class TextHitHandler {
|
|
|
27435
27669
|
if (doc.isInFillMode() && !isClickSelectAllNode(node)) {
|
|
27436
27670
|
return null;
|
|
27437
27671
|
}
|
|
27672
|
+
if (doc.isInFillMode() && isClickSelectAllNode(node) && validateTextWidgetMarker(node.raw, true) && isWidgetMetaInteractionBlockedInFillMode(doc, node.raw.widgetMeta)) {
|
|
27673
|
+
return null;
|
|
27674
|
+
}
|
|
27438
27675
|
if (Array.isArray(node.charOffsets) && node.charOffsets.length > 0) {
|
|
27439
27676
|
return resolveCharHit(node, base, actualX);
|
|
27440
27677
|
}
|
|
@@ -30708,166 +30945,6 @@ function toFixedPoint(str, e, z2) {
|
|
|
30708
30945
|
return str;
|
|
30709
30946
|
}
|
|
30710
30947
|
var BigNumber = clone();
|
|
30711
|
-
const EmptySymbolTypeConst = {
|
|
30712
|
-
"/": "/",
|
|
30713
|
-
"--": "--",
|
|
30714
|
-
"——": "——",
|
|
30715
|
-
NA: "NA",
|
|
30716
|
-
"N/A": "N/A"
|
|
30717
|
-
};
|
|
30718
|
-
const ViewStateTypeConst = {
|
|
30719
|
-
/** 文本显示 */
|
|
30720
|
-
Readonly: "readonly",
|
|
30721
|
-
/** 组件显示-禁用 */
|
|
30722
|
-
Disabled: "disabled",
|
|
30723
|
-
/** 组件显示-跟随设计 */
|
|
30724
|
-
Auto: "auto"
|
|
30725
|
-
};
|
|
30726
|
-
const RenderCompTypeConst = {
|
|
30727
|
-
/** 圆形 */
|
|
30728
|
-
Radio: "radio",
|
|
30729
|
-
/** 方形 */
|
|
30730
|
-
Checkbox: "checkbox",
|
|
30731
|
-
/** 下拉 */
|
|
30732
|
-
Select: "select"
|
|
30733
|
-
};
|
|
30734
|
-
const BooleanShowModeTypeConst = {
|
|
30735
|
-
/** 只显示真 */
|
|
30736
|
-
OnlyTrue: "onlyTrue",
|
|
30737
|
-
/** 只显示真 */
|
|
30738
|
-
OnlyFalse: "onlyFalse",
|
|
30739
|
-
/** 同时显示真和假 */
|
|
30740
|
-
Both: "both"
|
|
30741
|
-
};
|
|
30742
|
-
const LabelPositionTypeConst = {
|
|
30743
|
-
/** 文字在前 */
|
|
30744
|
-
Before: "before",
|
|
30745
|
-
/** 文字在后 */
|
|
30746
|
-
After: "after"
|
|
30747
|
-
};
|
|
30748
|
-
const OrientationTypeConst = {
|
|
30749
|
-
/** 纵 */
|
|
30750
|
-
Portrait: "portrait",
|
|
30751
|
-
/** 横 */
|
|
30752
|
-
Landscape: "landscape"
|
|
30753
|
-
};
|
|
30754
|
-
const DecimalDisplayModeTypeConst = {
|
|
30755
|
-
/** 显示百分比(%) */
|
|
30756
|
-
PERCENT: "percent",
|
|
30757
|
-
/** 显示原始数值 */
|
|
30758
|
-
ORIGIN: "origin"
|
|
30759
|
-
};
|
|
30760
|
-
const RangeValidateModeTypeConst = {
|
|
30761
|
-
/** 不校验 */
|
|
30762
|
-
No_Validate: "NoValidate",
|
|
30763
|
-
/** 固定输入校验 */
|
|
30764
|
-
Fixed_Number: "FixedNumber",
|
|
30765
|
-
/** 变量校验 */
|
|
30766
|
-
Variable_Validate: "VariableValidate"
|
|
30767
|
-
};
|
|
30768
|
-
const FieldSysVarDefaultValueConst = {
|
|
30769
|
-
NULL: "",
|
|
30770
|
-
/** 系统登录用户 */
|
|
30771
|
-
CURRENT_USER: "CURRENT_USER",
|
|
30772
|
-
/** 当前登录用户主部门 */
|
|
30773
|
-
CURRENT_ORG: "CURRENT_ORG"
|
|
30774
|
-
};
|
|
30775
|
-
const SignatureNumberTypeConst = {
|
|
30776
|
-
/** 单人签名 */
|
|
30777
|
-
SIGNATURE_SINGLE: "signature_single",
|
|
30778
|
-
/** 多人签名 */
|
|
30779
|
-
SIGNATURE_MULTIPLE: "signature_multiple"
|
|
30780
|
-
};
|
|
30781
|
-
const SignatureTypeConst = {
|
|
30782
|
-
/** 仅签名 */
|
|
30783
|
-
SIGNATURE_ONLY: "signature_only",
|
|
30784
|
-
/** 签名及日期 */
|
|
30785
|
-
SIGNATURE_DATE: "signature_date",
|
|
30786
|
-
/** 签名及日期时间 */
|
|
30787
|
-
SIGNATURE_DATETIME: "signature_datetime"
|
|
30788
|
-
};
|
|
30789
|
-
const SignatureTimeTypeConst = {
|
|
30790
|
-
/** 跟随签名 */
|
|
30791
|
-
FOLLOW_SIGNATURE: "follow_signature",
|
|
30792
|
-
/** 填充新字段 */
|
|
30793
|
-
POPULATE_FIELD: "populate_field"
|
|
30794
|
-
};
|
|
30795
|
-
const SignDisplayTypeConst = {
|
|
30796
|
-
/** 垂直显示 */
|
|
30797
|
-
VERTICAL: "vertical",
|
|
30798
|
-
/** 水平显示 */
|
|
30799
|
-
HORIZONTAL: "horizontal"
|
|
30800
|
-
};
|
|
30801
|
-
const ImageDisplayModeConst = {
|
|
30802
|
-
/** 自定义 */
|
|
30803
|
-
CUSTOM: "CUSTOM",
|
|
30804
|
-
/** 自适应 */
|
|
30805
|
-
ADAPTIVE: "ADAPTIVE"
|
|
30806
|
-
};
|
|
30807
|
-
const FieldDependencyTypeConst = {
|
|
30808
|
-
/**隐藏 */
|
|
30809
|
-
Hidden: "hidden",
|
|
30810
|
-
/**只读 */
|
|
30811
|
-
Readonly: "readonly",
|
|
30812
|
-
/**禁用 */
|
|
30813
|
-
Disabled: "disabled",
|
|
30814
|
-
/**必填 */
|
|
30815
|
-
Required: "required",
|
|
30816
|
-
/**赋值 */
|
|
30817
|
-
Assignment: "assignment"
|
|
30818
|
-
};
|
|
30819
|
-
const AssignmentStrategyTypeConst = {
|
|
30820
|
-
/**始终覆盖 */
|
|
30821
|
-
AlwaysCover: "alwaysCover",
|
|
30822
|
-
/**不覆盖已修改 */
|
|
30823
|
-
NotCovered: "notCovered"
|
|
30824
|
-
};
|
|
30825
|
-
const FormTypeConst = {
|
|
30826
|
-
/** 基础表单 */
|
|
30827
|
-
BASE: "BASE",
|
|
30828
|
-
/** 流程表单 */
|
|
30829
|
-
PROCESS: "PROCESS",
|
|
30830
|
-
/** 视图表单 */
|
|
30831
|
-
VIEW: "VIEW",
|
|
30832
|
-
/** 文本表单 */
|
|
30833
|
-
TEXT: "TEXT",
|
|
30834
|
-
/** 文件表单 */
|
|
30835
|
-
FILE: "FILE"
|
|
30836
|
-
};
|
|
30837
|
-
const ViewTypeConst = {
|
|
30838
|
-
/** 视图模型(查询视图) */
|
|
30839
|
-
VIEW_MODEL: "VIEW_MODEL",
|
|
30840
|
-
/** SQL数据视图 */
|
|
30841
|
-
VIEW_SQL: "SQL",
|
|
30842
|
-
/** 自定义模型 */
|
|
30843
|
-
VIEW_JS: "JS"
|
|
30844
|
-
};
|
|
30845
|
-
const BwipCodeTypeConst = {
|
|
30846
|
-
Code39: "code39",
|
|
30847
|
-
Code128: "code128",
|
|
30848
|
-
QRCode: "qrcode",
|
|
30849
|
-
GS1DataMatrix: "gs1datamatrix"
|
|
30850
|
-
};
|
|
30851
|
-
const ValueTypeConst = {
|
|
30852
|
-
/** 固定值 */
|
|
30853
|
-
Fixed: "fixed",
|
|
30854
|
-
/** 字段 */
|
|
30855
|
-
Field: "field",
|
|
30856
|
-
/** 公式 */
|
|
30857
|
-
Formula: "formula"
|
|
30858
|
-
};
|
|
30859
|
-
const ImageSizeModeTypeConst = {
|
|
30860
|
-
/** 自适应,响应式的适应外层容器的大小 */
|
|
30861
|
-
RESPONSIVE: "responsive",
|
|
30862
|
-
/** 固定值,高宽设了多少就是多少 */
|
|
30863
|
-
FIXED: "fixed"
|
|
30864
|
-
};
|
|
30865
|
-
const DiagonalDirectionTypeConst = {
|
|
30866
|
-
/** 从左上到右下 */
|
|
30867
|
-
Forward: "forward",
|
|
30868
|
-
/** 从右上到左下 / */
|
|
30869
|
-
Backward: "backward"
|
|
30870
|
-
};
|
|
30871
30948
|
var FIELD_TYPE = /* @__PURE__ */ ((FIELD_TYPE2) => {
|
|
30872
30949
|
FIELD_TYPE2["PRIMARY_KEY"] = "primary_key";
|
|
30873
30950
|
FIELD_TYPE2["ASSOCIATED_PRIMARY_KEY"] = "associated_primary_key";
|
|
@@ -42396,7 +42473,8 @@ class TableExpander {
|
|
|
42396
42473
|
initializeBoundedItemDataIndex() {
|
|
42397
42474
|
this.table.bounded.forEach((region) => {
|
|
42398
42475
|
if (region.itemRegion) {
|
|
42399
|
-
const
|
|
42476
|
+
const fillDirection = region.widgetMeta?.props?.fillDirection ?? "x";
|
|
42477
|
+
const map2 = this.computeDataIndexMap(region, region.itemRegion, fillDirection);
|
|
42400
42478
|
map2.forEach((obj, key) => {
|
|
42401
42479
|
this.boundedCellDataIndexMap.set(key, {
|
|
42402
42480
|
dataIndex: obj.dataIndex,
|
|
@@ -42406,10 +42484,22 @@ class TableExpander {
|
|
|
42406
42484
|
}
|
|
42407
42485
|
});
|
|
42408
42486
|
}
|
|
42487
|
+
// [数据关联]上、下超出子表范围的部分需要撑开
|
|
42488
|
+
getDataGroup2DItemRange(range3, itemRange) {
|
|
42489
|
+
const {
|
|
42490
|
+
start: { row: startRow },
|
|
42491
|
+
end: { row: endRow }
|
|
42492
|
+
} = itemRange;
|
|
42493
|
+
const expandedRange = cloneDeep(pick(range3, "start", "end"));
|
|
42494
|
+
expandedRange.start.row = startRow;
|
|
42495
|
+
expandedRange.end.row = endRow;
|
|
42496
|
+
return expandedRange;
|
|
42497
|
+
}
|
|
42409
42498
|
initializeDataGroup2DDataIndex() {
|
|
42410
42499
|
this.table.checkTable.forEach((region) => {
|
|
42411
42500
|
if (region.itemRegion) {
|
|
42412
|
-
const
|
|
42501
|
+
const expandedRange = this.getDataGroup2DItemRange(region, region.itemRegion);
|
|
42502
|
+
const map2 = this.computeDataIndexMap(expandedRange, region.itemRegion);
|
|
42413
42503
|
map2.forEach((obj, key) => {
|
|
42414
42504
|
this.checkTableCellDataIndexMap.set(key, {
|
|
42415
42505
|
dataIndex: obj.dataIndex,
|
|
@@ -42420,7 +42510,8 @@ class TableExpander {
|
|
|
42420
42510
|
});
|
|
42421
42511
|
this.table._2DTable.forEach((region) => {
|
|
42422
42512
|
if (region.itemRegion) {
|
|
42423
|
-
const
|
|
42513
|
+
const expandedRange = this.getDataGroup2DItemRange(region, region.itemRegion);
|
|
42514
|
+
const map2 = this.computeDataIndexMap(expandedRange, region.itemRegion);
|
|
42424
42515
|
map2.forEach((obj, key) => {
|
|
42425
42516
|
this._2DTableCellDataIndexMap.set(key, {
|
|
42426
42517
|
dataIndex: obj.dataIndex,
|
|
@@ -42667,16 +42758,18 @@ class TableExpander {
|
|
|
42667
42758
|
*
|
|
42668
42759
|
* @param range - 整体范围 {start:{row,col} end:{row,col}},表示需要分配数据项的总区域
|
|
42669
42760
|
* @param itemRange - 局部范围 {start:{row,col} end:{row,col}},表示一个数据项的模板大小
|
|
42761
|
+
* @param fillDirection - `x`:先横向扩展再换行;`y`:先纵向扩展再换列(与 `x` 的行列外层循环互为镜像)
|
|
42670
42762
|
* @returns Map,key 为字符串 "row,col",值为对应的数据索引
|
|
42671
42763
|
*
|
|
42672
|
-
*
|
|
42764
|
+
* 横向(x)算法:
|
|
42673
42765
|
* 1. 局部范围内的单元格数据索引为 0
|
|
42674
42766
|
* 2. 从局部范围右侧开始,按 itemWidth 宽度逐个扩展数据项
|
|
42675
|
-
* 3.
|
|
42676
|
-
* 4.
|
|
42677
|
-
*
|
|
42767
|
+
* 3. 当同一行带内无法再放置更多数据项时,换到下一个 itemHeight 行带
|
|
42768
|
+
* 4. 换行后从整体范围的最左侧列开始继续扩展
|
|
42769
|
+
*
|
|
42770
|
+
* 纵向(y)算法:与 x 对称——先在模板列宽内从模板下方按 itemHeight 向下铺,再换到下一组列(列宽对齐 itemWidth),新一组列从整体范围最顶行重新起铺。
|
|
42678
42771
|
*/
|
|
42679
|
-
computeDataIndexMap(range3, itemRange) {
|
|
42772
|
+
computeDataIndexMap(range3, itemRange, fillDirection = "x") {
|
|
42680
42773
|
const indexMap = /* @__PURE__ */ new Map();
|
|
42681
42774
|
const itemWidth = itemRange.end.col - itemRange.start.col + 1;
|
|
42682
42775
|
const itemHeight = itemRange.end.row - itemRange.start.row + 1;
|
|
@@ -42689,28 +42782,43 @@ class TableExpander {
|
|
|
42689
42782
|
}
|
|
42690
42783
|
const tlr = itemRange.start.row;
|
|
42691
42784
|
const tlc = itemRange.start.col;
|
|
42785
|
+
const stampBlock = (blockTopRow, blockLeftCol, di) => {
|
|
42786
|
+
for (let r = blockTopRow; r < blockTopRow + itemHeight; r++) {
|
|
42787
|
+
for (let c2 = blockLeftCol; c2 < blockLeftCol + itemWidth; c2++) {
|
|
42788
|
+
const refR = tlr + r - blockTopRow;
|
|
42789
|
+
const refC = tlc + c2 - blockLeftCol;
|
|
42790
|
+
const refCell = this.table.getChildAt(refR).getChildAt(refC);
|
|
42791
|
+
indexMap.set(`${r},${c2}`, {
|
|
42792
|
+
dataIndex: di,
|
|
42793
|
+
refPos: `${refR},${refC}`,
|
|
42794
|
+
refCellId: refCell.id
|
|
42795
|
+
});
|
|
42796
|
+
}
|
|
42797
|
+
}
|
|
42798
|
+
};
|
|
42692
42799
|
let dataIndex = 1;
|
|
42693
|
-
|
|
42694
|
-
|
|
42695
|
-
|
|
42800
|
+
if (fillDirection === "x") {
|
|
42801
|
+
let currentRow = itemRange.start.row;
|
|
42802
|
+
let currentCol = itemRange.end.col + 1;
|
|
42803
|
+
while (currentRow + itemHeight - 1 <= range3.end.row) {
|
|
42804
|
+
while (currentCol + itemWidth - 1 <= range3.end.col) {
|
|
42805
|
+
stampBlock(currentRow, currentCol, dataIndex++);
|
|
42806
|
+
currentCol += itemWidth;
|
|
42807
|
+
}
|
|
42808
|
+
currentRow += itemHeight;
|
|
42809
|
+
currentCol = range3.start.col;
|
|
42810
|
+
}
|
|
42811
|
+
} else {
|
|
42812
|
+
let currentCol = itemRange.start.col;
|
|
42813
|
+
let currentRow = itemRange.end.row + 1;
|
|
42696
42814
|
while (currentCol + itemWidth - 1 <= range3.end.col) {
|
|
42697
|
-
|
|
42698
|
-
|
|
42699
|
-
|
|
42700
|
-
const refC = tlc + c2 - currentCol;
|
|
42701
|
-
const refCell = this.table.getChildAt(refR).getChildAt(refC);
|
|
42702
|
-
indexMap.set(`${r},${c2}`, {
|
|
42703
|
-
dataIndex,
|
|
42704
|
-
refPos: `${refR},${refC}`,
|
|
42705
|
-
refCellId: refCell.id
|
|
42706
|
-
});
|
|
42707
|
-
}
|
|
42815
|
+
while (currentRow + itemHeight - 1 <= range3.end.row) {
|
|
42816
|
+
stampBlock(currentRow, currentCol, dataIndex++);
|
|
42817
|
+
currentRow += itemHeight;
|
|
42708
42818
|
}
|
|
42709
42819
|
currentCol += itemWidth;
|
|
42710
|
-
|
|
42820
|
+
currentRow = range3.start.row;
|
|
42711
42821
|
}
|
|
42712
|
-
currentRow += itemHeight;
|
|
42713
|
-
currentCol = range3.start.col;
|
|
42714
42822
|
}
|
|
42715
42823
|
return indexMap;
|
|
42716
42824
|
}
|
|
@@ -42760,7 +42868,9 @@ class TableInfoProvider {
|
|
|
42760
42868
|
xDataIndex: cell.xDataIndex,
|
|
42761
42869
|
yDataIndex: cell.yDataIndex,
|
|
42762
42870
|
valuePath: region?.valuePath,
|
|
42763
|
-
widgetMeta: region?.widgetMeta
|
|
42871
|
+
widgetMeta: region?.widgetMeta,
|
|
42872
|
+
// 数据关联
|
|
42873
|
+
dataGroup2DRange: pick(region?.itemRegion, "start", "end")
|
|
42764
42874
|
};
|
|
42765
42875
|
} else if (cell.boundedId) {
|
|
42766
42876
|
const region = this.wtbl.getBoundedById(cell.boundedId);
|
|
@@ -42778,7 +42888,9 @@ class TableInfoProvider {
|
|
|
42778
42888
|
type: "check-table",
|
|
42779
42889
|
dataIndex: cell.dataIndex,
|
|
42780
42890
|
valuePath: region?.valuePath,
|
|
42781
|
-
widgetMeta: region?.widgetMeta
|
|
42891
|
+
widgetMeta: region?.widgetMeta,
|
|
42892
|
+
// 数据关联
|
|
42893
|
+
dataGroup2DRange: pick(region?.itemRegion, "start", "end")
|
|
42782
42894
|
};
|
|
42783
42895
|
} else if (cell.headerId) {
|
|
42784
42896
|
return {
|
|
@@ -44477,6 +44589,18 @@ class InteractionController {
|
|
|
44477
44589
|
clearActiveTableId() {
|
|
44478
44590
|
this.doc.interactionManager.clear("activeTableId");
|
|
44479
44591
|
}
|
|
44592
|
+
/** 填报模式下点击只读/禁用组件:与点空白一致,收起字段焦点并回到纸张 */
|
|
44593
|
+
settleFillModeNonInteractiveField(secRefId) {
|
|
44594
|
+
this.onActivePanelData({
|
|
44595
|
+
type: this.doc.interactionManager.get("isHeaderFooterEdit") ? "panel:paper-header-footer" : "panel:paper",
|
|
44596
|
+
extra: { secRefId }
|
|
44597
|
+
});
|
|
44598
|
+
this.onFocusWidget({ modelId: "", focusTick: 0 });
|
|
44599
|
+
this.doc.eventManager.cursorController.applyCursorPhase({
|
|
44600
|
+
phase: "preview",
|
|
44601
|
+
syncCaret: true
|
|
44602
|
+
});
|
|
44603
|
+
}
|
|
44480
44604
|
syncActiveTableByMeta(meta) {
|
|
44481
44605
|
if (!meta?.line || meta.line.lineType !== "tablerow" || isClickPaperWidgetAllNode(meta)) {
|
|
44482
44606
|
this.clearActiveTableId();
|
|
@@ -44498,7 +44622,13 @@ class InteractionController {
|
|
|
44498
44622
|
}
|
|
44499
44623
|
if (meta) {
|
|
44500
44624
|
if (isClickSelectAllNode(meta)) {
|
|
44501
|
-
const
|
|
44625
|
+
const raw = meta.raw;
|
|
44626
|
+
const blockedInFill = isFillMode && isWidgetMetaInteractionBlockedInFillMode(this.doc, raw.widgetMeta);
|
|
44627
|
+
if (blockedInFill) {
|
|
44628
|
+
this.settleFillModeNonInteractiveField(meta.secRefId);
|
|
44629
|
+
return;
|
|
44630
|
+
}
|
|
44631
|
+
const widgetMeta = raw.widgetMeta;
|
|
44502
44632
|
this.onActivePanelData({
|
|
44503
44633
|
type: "panel:widget",
|
|
44504
44634
|
modelId: meta.raw?.modelRef?.id,
|
|
@@ -44522,6 +44652,11 @@ class InteractionController {
|
|
|
44522
44652
|
);
|
|
44523
44653
|
if (tableMeta && cellMeta && cellMeta.isSubRenderer) {
|
|
44524
44654
|
if (isClickPaperWidgetAllNode(meta)) {
|
|
44655
|
+
const raw = meta.raw;
|
|
44656
|
+
if (isFillMode && isWidgetMetaInteractionBlockedInFillMode(this.doc, raw.widgetMeta)) {
|
|
44657
|
+
this.settleFillModeNonInteractiveField(meta.secRefId);
|
|
44658
|
+
return;
|
|
44659
|
+
}
|
|
44525
44660
|
this.onActivePanelData({
|
|
44526
44661
|
type: "panel:widget",
|
|
44527
44662
|
modelId: meta.raw?.modelRef?.id,
|
|
@@ -44552,6 +44687,12 @@ class InteractionController {
|
|
|
44552
44687
|
}
|
|
44553
44688
|
}
|
|
44554
44689
|
if (isClickPaperWidgetAllNode(meta)) {
|
|
44690
|
+
const raw = meta.raw;
|
|
44691
|
+
const wm = raw.pageWidgetMeta ?? raw.widgetMeta;
|
|
44692
|
+
if (isFillMode && isWidgetMetaInteractionBlockedInFillMode(this.doc, wm)) {
|
|
44693
|
+
this.settleFillModeNonInteractiveField(meta.secRefId);
|
|
44694
|
+
return;
|
|
44695
|
+
}
|
|
44555
44696
|
this.onActivePanelData({
|
|
44556
44697
|
type: "panel:widget",
|
|
44557
44698
|
modelId: meta.raw?.modelRef?.id,
|
|
@@ -44638,61 +44779,6 @@ class InteractionController {
|
|
|
44638
44779
|
destroy() {
|
|
44639
44780
|
}
|
|
44640
44781
|
}
|
|
44641
|
-
function resolveDisplayStatusFromAuth(options) {
|
|
44642
|
-
const { info, readonlyString, editString } = options;
|
|
44643
|
-
if (isEmpty(info)) return null;
|
|
44644
|
-
if (info.edit && !info.readonly) {
|
|
44645
|
-
return editString;
|
|
44646
|
-
}
|
|
44647
|
-
if (info.readonly && !info.edit) {
|
|
44648
|
-
return readonlyString;
|
|
44649
|
-
}
|
|
44650
|
-
return null;
|
|
44651
|
-
}
|
|
44652
|
-
function resolveWidgetState(ctx) {
|
|
44653
|
-
const required4 = ctx.doc.isInEditMode() ? !!ctx.required : !!ctx.newRequired;
|
|
44654
|
-
let readonly2 = false;
|
|
44655
|
-
if (ctx.doc.isInEditMode()) {
|
|
44656
|
-
readonly2 = false;
|
|
44657
|
-
} else if (ctx.doc.isInPrintMode()) {
|
|
44658
|
-
readonly2 = true;
|
|
44659
|
-
} else if (ctx.newReadonly !== void 0) {
|
|
44660
|
-
readonly2 = !!ctx.newReadonly;
|
|
44661
|
-
}
|
|
44662
|
-
const disabled = ctx.doc.isInEditMode() ? !!ctx.disabled : !!ctx.newDisabled;
|
|
44663
|
-
const readonlyString = ctx.viewState === ViewStateTypeConst.Disabled || ctx.viewState === ViewStateTypeConst.Auto ? "readonly-component" : "readonly-text";
|
|
44664
|
-
const editString = readonly2 ? "readonly-component" : "edit-component";
|
|
44665
|
-
let displayStatus;
|
|
44666
|
-
const fromAuth = resolveDisplayStatusFromAuth({
|
|
44667
|
-
info: ctx.doc.docRuntimeMeta.handleInfo.bpmnFieldAuthMap?.[`${ctx.modelLink}.${ctx.fieldLink}`],
|
|
44668
|
-
readonlyString,
|
|
44669
|
-
editString
|
|
44670
|
-
});
|
|
44671
|
-
if (ctx.isLinkedModelField || ctx.cannotInput) {
|
|
44672
|
-
displayStatus = readonlyString;
|
|
44673
|
-
} else if (ctx.doc.mode === DocModeTypeConst.Print) {
|
|
44674
|
-
displayStatus = readonlyString;
|
|
44675
|
-
} else if (ctx.doc.mode === DocModeTypeConst.Fill) {
|
|
44676
|
-
if (fromAuth) {
|
|
44677
|
-
displayStatus = fromAuth;
|
|
44678
|
-
} else if (ctx.doc.formType !== FormTypeConst.PROCESS) {
|
|
44679
|
-
displayStatus = editString;
|
|
44680
|
-
} else {
|
|
44681
|
-
const bpmnType = ctx.doc.docRuntimeMeta.handleInfo?.bpmnType;
|
|
44682
|
-
const isReadonlyNode = bpmnType === "bpmnApproval" || bpmnType === "bpmnJudge";
|
|
44683
|
-
displayStatus = isReadonlyNode ? readonlyString : editString;
|
|
44684
|
-
}
|
|
44685
|
-
} else {
|
|
44686
|
-
displayStatus = editString;
|
|
44687
|
-
}
|
|
44688
|
-
const finalDisabled = displayStatus === "edit-component" ? disabled : ctx.viewState === ViewStateTypeConst.Disabled || disabled;
|
|
44689
|
-
return {
|
|
44690
|
-
required: required4,
|
|
44691
|
-
readonly: readonly2,
|
|
44692
|
-
disabled: finalDisabled,
|
|
44693
|
-
displayStatus
|
|
44694
|
-
};
|
|
44695
|
-
}
|
|
44696
44782
|
class InteractionPolicy {
|
|
44697
44783
|
doc;
|
|
44698
44784
|
constructor(doc) {
|
|
@@ -51230,7 +51316,10 @@ async function fetchRenderData(payload) {
|
|
|
51230
51316
|
function snapshotDocInfo(docInst) {
|
|
51231
51317
|
return {
|
|
51232
51318
|
pages: docInst?.pages ?? [],
|
|
51233
|
-
updateTick: docInst?.updateTick ?? 0
|
|
51319
|
+
updateTick: docInst?.updateTick ?? 0,
|
|
51320
|
+
mode: docInst?.mode ?? null,
|
|
51321
|
+
modeLabel: docInst?.modeLabel ?? "",
|
|
51322
|
+
btnRenderModeType: docInst?.btnRenderModeType ?? null
|
|
51234
51323
|
};
|
|
51235
51324
|
}
|
|
51236
51325
|
async function initializeDocumentEngine(props, payload, result) {
|
|
@@ -54794,6 +54883,7 @@ const builtinComponents = {
|
|
|
54794
54883
|
[BuiltinComponentTypeConst.InlineImage]: _sfc_main$2K,
|
|
54795
54884
|
[BuiltinComponentTypeConst.Text]: _sfc_main$2J
|
|
54796
54885
|
};
|
|
54886
|
+
const OUTLINE_BORDER_INSET = 1;
|
|
54797
54887
|
const borderConfig = {
|
|
54798
54888
|
outer: {
|
|
54799
54889
|
color: "rgb(128, 128, 128)",
|
|
@@ -54901,7 +54991,6 @@ function createTableOutlineLayer(options) {
|
|
|
54901
54991
|
const minY = Math.min(...cells.map((c2) => c2.y));
|
|
54902
54992
|
const maxX = Math.max(...cells.map((c2) => c2.x + c2.width));
|
|
54903
54993
|
const maxY = Math.max(...cells.map((c2) => c2.y + c2.height));
|
|
54904
|
-
Math.min(...cells.map((c2) => c2.layoutX));
|
|
54905
54994
|
const minLY = Math.min(...cells.map((c2) => c2.layoutY));
|
|
54906
54995
|
const maxLX = Math.max(...cells.map((c2) => c2.layoutX + c2.width));
|
|
54907
54996
|
const maxLY = Math.max(...cells.map((c2) => c2.layoutY + c2.height));
|
|
@@ -54963,43 +55052,47 @@ function buildPosMap(layers, getRect, toDom) {
|
|
|
54963
55052
|
}
|
|
54964
55053
|
return res;
|
|
54965
55054
|
}
|
|
54966
|
-
function
|
|
54967
|
-
|
|
54968
|
-
|
|
55055
|
+
function getDataIndexLayersMap({
|
|
55056
|
+
type: type4,
|
|
55057
|
+
cells,
|
|
55058
|
+
isEdit,
|
|
55059
|
+
convertExtraProps
|
|
55060
|
+
}) {
|
|
55061
|
+
const getDataIndex = (cell) => {
|
|
55062
|
+
return type4 === "2d-table" && isEdit ? cell.subRenderer?.xDataIndex : cell.subRenderer?.dataIndex;
|
|
54969
55063
|
};
|
|
54970
|
-
const
|
|
54971
|
-
(cell) =>
|
|
55064
|
+
const _cells = cells.filter(
|
|
55065
|
+
(cell) => getDataIndex(cell) != null && cell?.subRenderer?.type === type4
|
|
54972
55066
|
);
|
|
54973
|
-
if (!
|
|
55067
|
+
if (!_cells.length) return {};
|
|
54974
55068
|
const grouped = groupBy(
|
|
54975
|
-
|
|
54976
|
-
(cell) => `${cell.subRenderer.id}_dataIndex${
|
|
54977
|
-
);
|
|
54978
|
-
return Object.fromEntries(
|
|
54979
|
-
Object.entries(grouped).map(([id, cells2]) => {
|
|
54980
|
-
const firstCell = cells2[0];
|
|
54981
|
-
const lastCell = cells2[cells2.length - 1];
|
|
54982
|
-
const isZeroGroup = getDIVal(firstCell) === 0;
|
|
54983
|
-
const bgLayer = createTableOutlineLayer({
|
|
54984
|
-
cells: mapCellsToOutlineCells(cells2),
|
|
54985
|
-
inset: opts.GROUP_BG_INSET
|
|
54986
|
-
});
|
|
54987
|
-
const borderLayer = isZeroGroup ? createTableOutlineLayer({
|
|
54988
|
-
cells: mapCellsToOutlineCells(cells2),
|
|
54989
|
-
inset: opts.BORDER_INSET
|
|
54990
|
-
}) : { hLines: [], vLines: [], backgroundRect: null, labelPos: void 0 };
|
|
54991
|
-
return [
|
|
54992
|
-
id,
|
|
54993
|
-
{
|
|
54994
|
-
...borderLayer,
|
|
54995
|
-
...extra(firstCell),
|
|
54996
|
-
showBorder: isZeroGroup,
|
|
54997
|
-
placeholderBjRect: bgLayer.backgroundRect,
|
|
54998
|
-
lastCell
|
|
54999
|
-
}
|
|
55000
|
-
];
|
|
55001
|
-
})
|
|
55069
|
+
_cells,
|
|
55070
|
+
(cell) => `${cell.subRenderer.id}_dataIndex${getDataIndex(cell)}`
|
|
55002
55071
|
);
|
|
55072
|
+
const layersMapEntries = Object.entries(grouped).map(([id, __cells]) => {
|
|
55073
|
+
const firstCell = __cells[0];
|
|
55074
|
+
const lastCell = __cells[__cells.length - 1];
|
|
55075
|
+
const isFirstDataGroup = getDataIndex(firstCell) === 0;
|
|
55076
|
+
const bgLayer = createTableOutlineLayer({
|
|
55077
|
+
cells: mapCellsToOutlineCells(__cells),
|
|
55078
|
+
inset: 4
|
|
55079
|
+
});
|
|
55080
|
+
const borderLayer = isFirstDataGroup ? createTableOutlineLayer({
|
|
55081
|
+
cells: mapCellsToOutlineCells(__cells),
|
|
55082
|
+
inset: OUTLINE_BORDER_INSET
|
|
55083
|
+
}) : { hLines: [], vLines: [], backgroundRect: null, labelPos: void 0 };
|
|
55084
|
+
return [
|
|
55085
|
+
id,
|
|
55086
|
+
{
|
|
55087
|
+
...borderLayer,
|
|
55088
|
+
...convertExtraProps(firstCell),
|
|
55089
|
+
showBorder: isFirstDataGroup,
|
|
55090
|
+
placeholderBjRect: bgLayer.backgroundRect,
|
|
55091
|
+
lastCell
|
|
55092
|
+
}
|
|
55093
|
+
];
|
|
55094
|
+
});
|
|
55095
|
+
return Object.fromEntries(layersMapEntries);
|
|
55003
55096
|
}
|
|
55004
55097
|
const baseCanvasAttrs = {
|
|
55005
55098
|
/** 不参与事件命中检测 */
|
|
@@ -55270,8 +55363,6 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
|
|
|
55270
55363
|
}
|
|
55271
55364
|
});
|
|
55272
55365
|
const PlaceholderLabel = /* @__PURE__ */ _export_sfc(_sfc_main$2D, [["__scopeId", "data-v-0efd8725"]]);
|
|
55273
|
-
const BORDER_INSET$1 = 1;
|
|
55274
|
-
const GROUP_BG_INSET$1 = 4;
|
|
55275
55366
|
const TAG_WIDTH = 56;
|
|
55276
55367
|
const TAG_HEIGHT = 22;
|
|
55277
55368
|
const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
@@ -55304,7 +55395,7 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55304
55395
|
});
|
|
55305
55396
|
const isActive = (id) => interCtx.panelData?.context.regionId === id;
|
|
55306
55397
|
const isHovered = (id, type4) => hoverTarget.value === type4 && targetId.value === id;
|
|
55307
|
-
const
|
|
55398
|
+
const subTableCells = computed(
|
|
55308
55399
|
() => props.rows.flatMap(
|
|
55309
55400
|
(row) => row.cells.filter((cell) => cell?.subRenderer?.id).map((cell) => ({
|
|
55310
55401
|
...cell,
|
|
@@ -55324,12 +55415,12 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55324
55415
|
};
|
|
55325
55416
|
});
|
|
55326
55417
|
const outlineLayers = computed(() => {
|
|
55327
|
-
const grouped = groupBy(
|
|
55418
|
+
const grouped = groupBy(subTableCells.value, (cell) => cell.subRenderer.id);
|
|
55328
55419
|
return Object.fromEntries(
|
|
55329
55420
|
Object.entries(grouped).map(([id, cells]) => {
|
|
55330
55421
|
const outline = createTableOutlineLayer({
|
|
55331
55422
|
cells: mapCellsToOutlineCells(cells),
|
|
55332
|
-
inset:
|
|
55423
|
+
inset: OUTLINE_BORDER_INSET
|
|
55333
55424
|
});
|
|
55334
55425
|
return [
|
|
55335
55426
|
id,
|
|
@@ -55342,89 +55433,77 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55342
55433
|
})
|
|
55343
55434
|
);
|
|
55344
55435
|
});
|
|
55345
|
-
const
|
|
55346
|
-
() =>
|
|
55347
|
-
"fixed-table",
|
|
55348
|
-
|
|
55349
|
-
|
|
55350
|
-
|
|
55351
|
-
GROUP_BG_INSET: GROUP_BG_INSET$1,
|
|
55352
|
-
isEdit: props.doc.mode === DocModeTypeConst.Edit
|
|
55353
|
-
},
|
|
55354
|
-
(cell) => ({
|
|
55436
|
+
const fixedTableDataGroupLayersMap = computed(
|
|
55437
|
+
() => getDataIndexLayersMap({
|
|
55438
|
+
type: "fixed-table",
|
|
55439
|
+
cells: subTableCells.value,
|
|
55440
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
55441
|
+
convertExtraProps: (cell) => ({
|
|
55355
55442
|
type: "data-group",
|
|
55356
55443
|
valuePath: cell.subRenderer.valuePath,
|
|
55357
55444
|
placeholder: `${cell.subRenderer.dataIndex}`
|
|
55358
55445
|
})
|
|
55359
|
-
)
|
|
55446
|
+
})
|
|
55360
55447
|
);
|
|
55361
|
-
const
|
|
55362
|
-
() =>
|
|
55363
|
-
"check-table",
|
|
55364
|
-
|
|
55365
|
-
|
|
55366
|
-
|
|
55367
|
-
GROUP_BG_INSET: GROUP_BG_INSET$1,
|
|
55368
|
-
isEdit: props.doc.mode === DocModeTypeConst.Edit
|
|
55369
|
-
},
|
|
55370
|
-
(cell) => ({
|
|
55448
|
+
const checkTableDataGroup2DLayersMap = computed(
|
|
55449
|
+
() => getDataIndexLayersMap({
|
|
55450
|
+
type: "check-table",
|
|
55451
|
+
cells: subTableCells.value,
|
|
55452
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
55453
|
+
convertExtraProps: (cell) => ({
|
|
55371
55454
|
type: "data-group-2d",
|
|
55372
55455
|
valuePath: cell.subRenderer.valuePath,
|
|
55373
55456
|
placeholder: `${cell.subRenderer.dataIndex}`
|
|
55374
55457
|
})
|
|
55375
|
-
)
|
|
55458
|
+
})
|
|
55376
55459
|
);
|
|
55377
|
-
const
|
|
55378
|
-
() =>
|
|
55379
|
-
"2d-table",
|
|
55380
|
-
|
|
55381
|
-
|
|
55382
|
-
|
|
55383
|
-
GROUP_BG_INSET: GROUP_BG_INSET$1,
|
|
55384
|
-
isEdit: props.doc.mode === DocModeTypeConst.Edit
|
|
55385
|
-
},
|
|
55386
|
-
(cell) => ({
|
|
55460
|
+
const _2DTableDataGroup2DLayersMap = computed(
|
|
55461
|
+
() => getDataIndexLayersMap({
|
|
55462
|
+
type: "2d-table",
|
|
55463
|
+
cells: subTableCells.value,
|
|
55464
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
55465
|
+
convertExtraProps: (cell) => ({
|
|
55387
55466
|
type: "data-group-2d",
|
|
55388
55467
|
valuePath: cell.subRenderer.valuePath,
|
|
55389
55468
|
placeholder: `${cell.subRenderer.xDataIndex}`
|
|
55390
55469
|
})
|
|
55391
|
-
)
|
|
55470
|
+
})
|
|
55392
55471
|
);
|
|
55393
55472
|
const tableTypePos = computed(
|
|
55394
55473
|
() => buildPosMap(
|
|
55395
55474
|
outlineLayers.value,
|
|
55396
55475
|
(l2) => l2.labelPos,
|
|
55397
|
-
(p) => labelPosToDom(p
|
|
55476
|
+
(p) => labelPosToDom(p)
|
|
55398
55477
|
)
|
|
55399
55478
|
);
|
|
55400
55479
|
const dataGroupTypePos = computed(
|
|
55401
55480
|
() => buildPosMap(
|
|
55402
55481
|
{
|
|
55403
|
-
...
|
|
55404
|
-
...
|
|
55405
|
-
...
|
|
55482
|
+
...fixedTableDataGroupLayersMap.value,
|
|
55483
|
+
...checkTableDataGroup2DLayersMap.value,
|
|
55484
|
+
..._2DTableDataGroup2DLayersMap.value
|
|
55406
55485
|
},
|
|
55407
55486
|
(l2) => l2.labelPos,
|
|
55408
|
-
(p) => labelPosToDom(p
|
|
55487
|
+
(p) => labelPosToDom(p)
|
|
55409
55488
|
)
|
|
55410
55489
|
);
|
|
55411
55490
|
const dataGroupPlaceholderPos = computed(
|
|
55412
55491
|
() => buildPosMap(
|
|
55413
55492
|
{
|
|
55414
|
-
...
|
|
55415
|
-
...
|
|
55416
|
-
...
|
|
55493
|
+
...fixedTableDataGroupLayersMap.value,
|
|
55494
|
+
...checkTableDataGroup2DLayersMap.value,
|
|
55495
|
+
..._2DTableDataGroup2DLayersMap.value
|
|
55417
55496
|
},
|
|
55418
55497
|
(l2) => l2.lastCell,
|
|
55419
55498
|
(p) => centerRectToDom(p)
|
|
55420
55499
|
)
|
|
55421
55500
|
);
|
|
55422
|
-
function labelPosToDom(labelPos
|
|
55501
|
+
function labelPosToDom(labelPos) {
|
|
55423
55502
|
const base = pageBaseOffset.value;
|
|
55424
55503
|
if (!base) return null;
|
|
55425
55504
|
return {
|
|
55426
55505
|
left: `${labelPos.x + base.leftBase - TAG_WIDTH}px`,
|
|
55427
|
-
top: `${labelPos.y1 + base.topBase +
|
|
55506
|
+
top: `${labelPos.y1 + base.topBase + OUTLINE_BORDER_INSET}px`,
|
|
55428
55507
|
width: `${TAG_WIDTH}px`,
|
|
55429
55508
|
height: `${TAG_HEIGHT}px`
|
|
55430
55509
|
};
|
|
@@ -55519,9 +55598,9 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55519
55598
|
}, 1024);
|
|
55520
55599
|
}), 128)),
|
|
55521
55600
|
(openBlock(true), createElementBlock(Fragment, null, renderList([
|
|
55522
|
-
|
|
55523
|
-
|
|
55524
|
-
|
|
55601
|
+
fixedTableDataGroupLayersMap.value,
|
|
55602
|
+
checkTableDataGroup2DLayersMap.value,
|
|
55603
|
+
_2DTableDataGroup2DLayersMap.value
|
|
55525
55604
|
], (layers, layersIndex) => {
|
|
55526
55605
|
return openBlock(), createElementBlock(Fragment, { key: layersIndex }, [
|
|
55527
55606
|
(openBlock(true), createElementBlock(Fragment, null, renderList(layers, (layer, id) => {
|
|
@@ -56380,8 +56459,6 @@ const _sfc_main$2x = /* @__PURE__ */ defineComponent({
|
|
|
56380
56459
|
}
|
|
56381
56460
|
});
|
|
56382
56461
|
const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$2x, [["__scopeId", "data-v-adc8fb9a"]]);
|
|
56383
|
-
const BORDER_INSET = 1;
|
|
56384
|
-
const GROUP_BG_INSET = 4;
|
|
56385
56462
|
const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
56386
56463
|
__name: "index",
|
|
56387
56464
|
props: {
|
|
@@ -56422,22 +56499,18 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
|
56422
56499
|
};
|
|
56423
56500
|
});
|
|
56424
56501
|
const buildDataIndexLayersWith = (type4) => {
|
|
56425
|
-
return
|
|
56426
|
-
type4,
|
|
56427
|
-
cellsWithId.value,
|
|
56428
|
-
|
|
56429
|
-
|
|
56430
|
-
GROUP_BG_INSET,
|
|
56431
|
-
isEdit: props.doc.mode === DocModeTypeConst.Edit
|
|
56432
|
-
},
|
|
56433
|
-
() => ({
|
|
56502
|
+
return getDataIndexLayersMap({
|
|
56503
|
+
type: type4,
|
|
56504
|
+
cells: cellsWithId.value,
|
|
56505
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
56506
|
+
convertExtraProps: () => ({
|
|
56434
56507
|
type: type4,
|
|
56435
56508
|
placeholder: "",
|
|
56436
56509
|
valuePath: ""
|
|
56437
56510
|
})
|
|
56438
|
-
);
|
|
56511
|
+
});
|
|
56439
56512
|
};
|
|
56440
|
-
const
|
|
56513
|
+
const subTableOutlineLayersMap = computed(() => {
|
|
56441
56514
|
return {
|
|
56442
56515
|
...buildDataIndexLayersWith("dynamic-table"),
|
|
56443
56516
|
...buildDataIndexLayersWith("2d-table")
|
|
@@ -56446,13 +56519,13 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
|
56446
56519
|
const subTableActionPos = computed(() => {
|
|
56447
56520
|
const res = {};
|
|
56448
56521
|
const ACTION_WIDTH = 24;
|
|
56449
|
-
for (const [id, layer] of Object.entries(
|
|
56522
|
+
for (const [id, layer] of Object.entries(subTableOutlineLayersMap.value)) {
|
|
56450
56523
|
const lastCell = layer.lastCell;
|
|
56451
56524
|
if (!lastCell) continue;
|
|
56452
56525
|
const base = pageBaseOffset.value;
|
|
56453
56526
|
if (base) {
|
|
56454
56527
|
res[id] = {
|
|
56455
|
-
left: `${lastCell.layoutX + base.leftBase + lastCell.width +
|
|
56528
|
+
left: `${lastCell.layoutX + base.leftBase + lastCell.width + OUTLINE_BORDER_INSET}px`,
|
|
56456
56529
|
top: `${lastCell.layoutY + base.topBase + lastCell.height - ACTION_WIDTH}px`
|
|
56457
56530
|
};
|
|
56458
56531
|
}
|
|
@@ -56461,7 +56534,7 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
|
56461
56534
|
});
|
|
56462
56535
|
return (_ctx, _cache) => {
|
|
56463
56536
|
const _component_v_group = resolveComponent("v-group");
|
|
56464
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
56537
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(subTableOutlineLayersMap.value, (subLayer, subId) => {
|
|
56465
56538
|
return openBlock(), createBlock(_component_v_group, {
|
|
56466
56539
|
key: subId,
|
|
56467
56540
|
config: baseLayerProps
|
|
@@ -57022,13 +57095,12 @@ function useDocController(factory2, ops) {
|
|
|
57022
57095
|
return doc.pages.find((p) => p.section.refId === id) ?? null;
|
|
57023
57096
|
}
|
|
57024
57097
|
},
|
|
57025
|
-
// 响应式状态
|
|
57026
57098
|
docRuntimeMeta: doc.docRuntimeMeta,
|
|
57027
|
-
mode: computed(() =>
|
|
57028
|
-
modeLabel: computed(() =>
|
|
57029
|
-
btnRenderModeType: computed(() =>
|
|
57030
|
-
updateTick: computed(() =>
|
|
57031
|
-
pages: computed(() =>
|
|
57099
|
+
mode: computed(() => factory2.docInfo.value.mode),
|
|
57100
|
+
modeLabel: computed(() => factory2.docInfo.value.modeLabel),
|
|
57101
|
+
btnRenderModeType: computed(() => factory2.docInfo.value.btnRenderModeType),
|
|
57102
|
+
updateTick: computed(() => factory2.docInfo.value.updateTick),
|
|
57103
|
+
pages: computed(() => factory2.docInfo.value.pages),
|
|
57032
57104
|
// Doc 内置命令系统
|
|
57033
57105
|
execute(command, payload) {
|
|
57034
57106
|
doc.execute(command, payload);
|
|
@@ -58609,7 +58681,7 @@ const _sfc_main$2l = /* @__PURE__ */ defineComponent({
|
|
|
58609
58681
|
};
|
|
58610
58682
|
}
|
|
58611
58683
|
});
|
|
58612
|
-
const SetTableHeaderFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2l, [["__scopeId", "data-v-
|
|
58684
|
+
const SetTableHeaderFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2l, [["__scopeId", "data-v-d5785019"]]);
|
|
58613
58685
|
const _hoisted_1$1F = { class: "items-container" };
|
|
58614
58686
|
const _hoisted_2$14 = { class: "ribbon-tab-item" };
|
|
58615
58687
|
const _hoisted_3$P = { class: "ribbon-tab-item" };
|
|
@@ -59022,7 +59094,7 @@ const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
|
59022
59094
|
};
|
|
59023
59095
|
}
|
|
59024
59096
|
});
|
|
59025
|
-
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-
|
|
59097
|
+
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-880a7ed3"]]);
|
|
59026
59098
|
const _hoisted_1$1E = { class: "ribbon" };
|
|
59027
59099
|
const _hoisted_2$13 = { class: "ribbon-content-wrapper" };
|
|
59028
59100
|
const _sfc_main$2j = /* @__PURE__ */ defineComponent({
|
|
@@ -60417,7 +60489,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
60417
60489
|
};
|
|
60418
60490
|
}
|
|
60419
60491
|
});
|
|
60420
|
-
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-
|
|
60492
|
+
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-8bfe3f32"]]);
|
|
60421
60493
|
const OFFSET = 4;
|
|
60422
60494
|
const _sfc_main$27 = /* @__PURE__ */ defineComponent({
|
|
60423
60495
|
__name: "index",
|
|
@@ -66795,7 +66867,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
66795
66867
|
return (_ctx, _cache) => {
|
|
66796
66868
|
return openBlock(), createElementBlock("div", _hoisted_1$1h, [
|
|
66797
66869
|
createVNode(unref(GctCollapse), {
|
|
66798
|
-
title: "
|
|
66870
|
+
title: "数据分组配置",
|
|
66799
66871
|
class: "panel-collapse is-first"
|
|
66800
66872
|
}, {
|
|
66801
66873
|
default: withCtx(() => [
|
|
@@ -66852,7 +66924,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
66852
66924
|
};
|
|
66853
66925
|
}
|
|
66854
66926
|
});
|
|
66855
|
-
const DataGroupPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["__scopeId", "data-v-
|
|
66927
|
+
const DataGroupPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["__scopeId", "data-v-4572267c"]]);
|
|
66856
66928
|
const schema$7 = {
|
|
66857
66929
|
key: "data-group.basic",
|
|
66858
66930
|
title: [
|