@gct-paas/word 0.1.26 → 0.1.28
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 +440 -361
- 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 +22 -22
- 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";
|
|
@@ -33066,7 +33143,7 @@ class SetAlign extends CommandBase {
|
|
|
33066
33143
|
handleSelection() {
|
|
33067
33144
|
const cursor = this.doc.cursorManager;
|
|
33068
33145
|
const { mode, models } = CommandBase.getSelectionResult(this.doc, cursor.getSelection());
|
|
33069
|
-
if (mode !== SelectionMode.PP && mode !== SelectionMode.PTr && mode !== SelectionMode.TrP && mode !== SelectionMode.TrTr) {
|
|
33146
|
+
if (mode !== SelectionMode.PP && mode !== SelectionMode.PTr && mode !== SelectionMode.TrP && mode !== SelectionMode.TrTr && mode !== SelectionMode.Tds) {
|
|
33070
33147
|
return null;
|
|
33071
33148
|
}
|
|
33072
33149
|
const paragraphs = [];
|
|
@@ -33074,6 +33151,13 @@ class SetAlign extends CommandBase {
|
|
|
33074
33151
|
if (model.name === "w:p") {
|
|
33075
33152
|
paragraphs.push(model);
|
|
33076
33153
|
}
|
|
33154
|
+
if (mode === SelectionMode.Tds) {
|
|
33155
|
+
model.children.forEach((childModel) => {
|
|
33156
|
+
if (childModel.name === "w:p") {
|
|
33157
|
+
paragraphs.push(childModel);
|
|
33158
|
+
}
|
|
33159
|
+
});
|
|
33160
|
+
}
|
|
33077
33161
|
}
|
|
33078
33162
|
for (const paragraph of paragraphs) {
|
|
33079
33163
|
paragraph.setAlignment(this.payload.align);
|
|
@@ -42396,7 +42480,8 @@ class TableExpander {
|
|
|
42396
42480
|
initializeBoundedItemDataIndex() {
|
|
42397
42481
|
this.table.bounded.forEach((region) => {
|
|
42398
42482
|
if (region.itemRegion) {
|
|
42399
|
-
const
|
|
42483
|
+
const fillDirection = region.widgetMeta?.props?.fillDirection ?? "x";
|
|
42484
|
+
const map2 = this.computeDataIndexMap(region, region.itemRegion, fillDirection);
|
|
42400
42485
|
map2.forEach((obj, key) => {
|
|
42401
42486
|
this.boundedCellDataIndexMap.set(key, {
|
|
42402
42487
|
dataIndex: obj.dataIndex,
|
|
@@ -42406,10 +42491,22 @@ class TableExpander {
|
|
|
42406
42491
|
}
|
|
42407
42492
|
});
|
|
42408
42493
|
}
|
|
42494
|
+
// [数据关联]上、下超出子表范围的部分需要撑开
|
|
42495
|
+
getDataGroup2DItemRange(range3, itemRange) {
|
|
42496
|
+
const {
|
|
42497
|
+
start: { row: startRow },
|
|
42498
|
+
end: { row: endRow }
|
|
42499
|
+
} = itemRange;
|
|
42500
|
+
const expandedRange = cloneDeep(pick(range3, "start", "end"));
|
|
42501
|
+
expandedRange.start.row = startRow;
|
|
42502
|
+
expandedRange.end.row = endRow;
|
|
42503
|
+
return expandedRange;
|
|
42504
|
+
}
|
|
42409
42505
|
initializeDataGroup2DDataIndex() {
|
|
42410
42506
|
this.table.checkTable.forEach((region) => {
|
|
42411
42507
|
if (region.itemRegion) {
|
|
42412
|
-
const
|
|
42508
|
+
const expandedRange = this.getDataGroup2DItemRange(region, region.itemRegion);
|
|
42509
|
+
const map2 = this.computeDataIndexMap(expandedRange, region.itemRegion);
|
|
42413
42510
|
map2.forEach((obj, key) => {
|
|
42414
42511
|
this.checkTableCellDataIndexMap.set(key, {
|
|
42415
42512
|
dataIndex: obj.dataIndex,
|
|
@@ -42420,7 +42517,8 @@ class TableExpander {
|
|
|
42420
42517
|
});
|
|
42421
42518
|
this.table._2DTable.forEach((region) => {
|
|
42422
42519
|
if (region.itemRegion) {
|
|
42423
|
-
const
|
|
42520
|
+
const expandedRange = this.getDataGroup2DItemRange(region, region.itemRegion);
|
|
42521
|
+
const map2 = this.computeDataIndexMap(expandedRange, region.itemRegion);
|
|
42424
42522
|
map2.forEach((obj, key) => {
|
|
42425
42523
|
this._2DTableCellDataIndexMap.set(key, {
|
|
42426
42524
|
dataIndex: obj.dataIndex,
|
|
@@ -42667,16 +42765,18 @@ class TableExpander {
|
|
|
42667
42765
|
*
|
|
42668
42766
|
* @param range - 整体范围 {start:{row,col} end:{row,col}},表示需要分配数据项的总区域
|
|
42669
42767
|
* @param itemRange - 局部范围 {start:{row,col} end:{row,col}},表示一个数据项的模板大小
|
|
42768
|
+
* @param fillDirection - `x`:先横向扩展再换行;`y`:先纵向扩展再换列(与 `x` 的行列外层循环互为镜像)
|
|
42670
42769
|
* @returns Map,key 为字符串 "row,col",值为对应的数据索引
|
|
42671
42770
|
*
|
|
42672
|
-
*
|
|
42771
|
+
* 横向(x)算法:
|
|
42673
42772
|
* 1. 局部范围内的单元格数据索引为 0
|
|
42674
42773
|
* 2. 从局部范围右侧开始,按 itemWidth 宽度逐个扩展数据项
|
|
42675
|
-
* 3.
|
|
42676
|
-
* 4.
|
|
42677
|
-
*
|
|
42774
|
+
* 3. 当同一行带内无法再放置更多数据项时,换到下一个 itemHeight 行带
|
|
42775
|
+
* 4. 换行后从整体范围的最左侧列开始继续扩展
|
|
42776
|
+
*
|
|
42777
|
+
* 纵向(y)算法:与 x 对称——先在模板列宽内从模板下方按 itemHeight 向下铺,再换到下一组列(列宽对齐 itemWidth),新一组列从整体范围最顶行重新起铺。
|
|
42678
42778
|
*/
|
|
42679
|
-
computeDataIndexMap(range3, itemRange) {
|
|
42779
|
+
computeDataIndexMap(range3, itemRange, fillDirection = "x") {
|
|
42680
42780
|
const indexMap = /* @__PURE__ */ new Map();
|
|
42681
42781
|
const itemWidth = itemRange.end.col - itemRange.start.col + 1;
|
|
42682
42782
|
const itemHeight = itemRange.end.row - itemRange.start.row + 1;
|
|
@@ -42689,28 +42789,43 @@ class TableExpander {
|
|
|
42689
42789
|
}
|
|
42690
42790
|
const tlr = itemRange.start.row;
|
|
42691
42791
|
const tlc = itemRange.start.col;
|
|
42792
|
+
const stampBlock = (blockTopRow, blockLeftCol, di) => {
|
|
42793
|
+
for (let r = blockTopRow; r < blockTopRow + itemHeight; r++) {
|
|
42794
|
+
for (let c2 = blockLeftCol; c2 < blockLeftCol + itemWidth; c2++) {
|
|
42795
|
+
const refR = tlr + r - blockTopRow;
|
|
42796
|
+
const refC = tlc + c2 - blockLeftCol;
|
|
42797
|
+
const refCell = this.table.getChildAt(refR).getChildAt(refC);
|
|
42798
|
+
indexMap.set(`${r},${c2}`, {
|
|
42799
|
+
dataIndex: di,
|
|
42800
|
+
refPos: `${refR},${refC}`,
|
|
42801
|
+
refCellId: refCell.id
|
|
42802
|
+
});
|
|
42803
|
+
}
|
|
42804
|
+
}
|
|
42805
|
+
};
|
|
42692
42806
|
let dataIndex = 1;
|
|
42693
|
-
|
|
42694
|
-
|
|
42695
|
-
|
|
42807
|
+
if (fillDirection === "x") {
|
|
42808
|
+
let currentRow = itemRange.start.row;
|
|
42809
|
+
let currentCol = itemRange.end.col + 1;
|
|
42810
|
+
while (currentRow + itemHeight - 1 <= range3.end.row) {
|
|
42811
|
+
while (currentCol + itemWidth - 1 <= range3.end.col) {
|
|
42812
|
+
stampBlock(currentRow, currentCol, dataIndex++);
|
|
42813
|
+
currentCol += itemWidth;
|
|
42814
|
+
}
|
|
42815
|
+
currentRow += itemHeight;
|
|
42816
|
+
currentCol = range3.start.col;
|
|
42817
|
+
}
|
|
42818
|
+
} else {
|
|
42819
|
+
let currentCol = itemRange.start.col;
|
|
42820
|
+
let currentRow = itemRange.end.row + 1;
|
|
42696
42821
|
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
|
-
}
|
|
42822
|
+
while (currentRow + itemHeight - 1 <= range3.end.row) {
|
|
42823
|
+
stampBlock(currentRow, currentCol, dataIndex++);
|
|
42824
|
+
currentRow += itemHeight;
|
|
42708
42825
|
}
|
|
42709
42826
|
currentCol += itemWidth;
|
|
42710
|
-
|
|
42827
|
+
currentRow = range3.start.row;
|
|
42711
42828
|
}
|
|
42712
|
-
currentRow += itemHeight;
|
|
42713
|
-
currentCol = range3.start.col;
|
|
42714
42829
|
}
|
|
42715
42830
|
return indexMap;
|
|
42716
42831
|
}
|
|
@@ -42760,7 +42875,9 @@ class TableInfoProvider {
|
|
|
42760
42875
|
xDataIndex: cell.xDataIndex,
|
|
42761
42876
|
yDataIndex: cell.yDataIndex,
|
|
42762
42877
|
valuePath: region?.valuePath,
|
|
42763
|
-
widgetMeta: region?.widgetMeta
|
|
42878
|
+
widgetMeta: region?.widgetMeta,
|
|
42879
|
+
// 数据关联
|
|
42880
|
+
dataGroup2DRange: pick(region?.itemRegion, "start", "end")
|
|
42764
42881
|
};
|
|
42765
42882
|
} else if (cell.boundedId) {
|
|
42766
42883
|
const region = this.wtbl.getBoundedById(cell.boundedId);
|
|
@@ -42778,7 +42895,9 @@ class TableInfoProvider {
|
|
|
42778
42895
|
type: "check-table",
|
|
42779
42896
|
dataIndex: cell.dataIndex,
|
|
42780
42897
|
valuePath: region?.valuePath,
|
|
42781
|
-
widgetMeta: region?.widgetMeta
|
|
42898
|
+
widgetMeta: region?.widgetMeta,
|
|
42899
|
+
// 数据关联
|
|
42900
|
+
dataGroup2DRange: pick(region?.itemRegion, "start", "end")
|
|
42782
42901
|
};
|
|
42783
42902
|
} else if (cell.headerId) {
|
|
42784
42903
|
return {
|
|
@@ -44477,6 +44596,18 @@ class InteractionController {
|
|
|
44477
44596
|
clearActiveTableId() {
|
|
44478
44597
|
this.doc.interactionManager.clear("activeTableId");
|
|
44479
44598
|
}
|
|
44599
|
+
/** 填报模式下点击只读/禁用组件:与点空白一致,收起字段焦点并回到纸张 */
|
|
44600
|
+
settleFillModeNonInteractiveField(secRefId) {
|
|
44601
|
+
this.onActivePanelData({
|
|
44602
|
+
type: this.doc.interactionManager.get("isHeaderFooterEdit") ? "panel:paper-header-footer" : "panel:paper",
|
|
44603
|
+
extra: { secRefId }
|
|
44604
|
+
});
|
|
44605
|
+
this.onFocusWidget({ modelId: "", focusTick: 0 });
|
|
44606
|
+
this.doc.eventManager.cursorController.applyCursorPhase({
|
|
44607
|
+
phase: "preview",
|
|
44608
|
+
syncCaret: true
|
|
44609
|
+
});
|
|
44610
|
+
}
|
|
44480
44611
|
syncActiveTableByMeta(meta) {
|
|
44481
44612
|
if (!meta?.line || meta.line.lineType !== "tablerow" || isClickPaperWidgetAllNode(meta)) {
|
|
44482
44613
|
this.clearActiveTableId();
|
|
@@ -44498,7 +44629,13 @@ class InteractionController {
|
|
|
44498
44629
|
}
|
|
44499
44630
|
if (meta) {
|
|
44500
44631
|
if (isClickSelectAllNode(meta)) {
|
|
44501
|
-
const
|
|
44632
|
+
const raw = meta.raw;
|
|
44633
|
+
const blockedInFill = isFillMode && isWidgetMetaInteractionBlockedInFillMode(this.doc, raw.widgetMeta);
|
|
44634
|
+
if (blockedInFill) {
|
|
44635
|
+
this.settleFillModeNonInteractiveField(meta.secRefId);
|
|
44636
|
+
return;
|
|
44637
|
+
}
|
|
44638
|
+
const widgetMeta = raw.widgetMeta;
|
|
44502
44639
|
this.onActivePanelData({
|
|
44503
44640
|
type: "panel:widget",
|
|
44504
44641
|
modelId: meta.raw?.modelRef?.id,
|
|
@@ -44522,6 +44659,11 @@ class InteractionController {
|
|
|
44522
44659
|
);
|
|
44523
44660
|
if (tableMeta && cellMeta && cellMeta.isSubRenderer) {
|
|
44524
44661
|
if (isClickPaperWidgetAllNode(meta)) {
|
|
44662
|
+
const raw = meta.raw;
|
|
44663
|
+
if (isFillMode && isWidgetMetaInteractionBlockedInFillMode(this.doc, raw.widgetMeta)) {
|
|
44664
|
+
this.settleFillModeNonInteractiveField(meta.secRefId);
|
|
44665
|
+
return;
|
|
44666
|
+
}
|
|
44525
44667
|
this.onActivePanelData({
|
|
44526
44668
|
type: "panel:widget",
|
|
44527
44669
|
modelId: meta.raw?.modelRef?.id,
|
|
@@ -44552,6 +44694,12 @@ class InteractionController {
|
|
|
44552
44694
|
}
|
|
44553
44695
|
}
|
|
44554
44696
|
if (isClickPaperWidgetAllNode(meta)) {
|
|
44697
|
+
const raw = meta.raw;
|
|
44698
|
+
const wm = raw.pageWidgetMeta ?? raw.widgetMeta;
|
|
44699
|
+
if (isFillMode && isWidgetMetaInteractionBlockedInFillMode(this.doc, wm)) {
|
|
44700
|
+
this.settleFillModeNonInteractiveField(meta.secRefId);
|
|
44701
|
+
return;
|
|
44702
|
+
}
|
|
44555
44703
|
this.onActivePanelData({
|
|
44556
44704
|
type: "panel:widget",
|
|
44557
44705
|
modelId: meta.raw?.modelRef?.id,
|
|
@@ -44638,61 +44786,6 @@ class InteractionController {
|
|
|
44638
44786
|
destroy() {
|
|
44639
44787
|
}
|
|
44640
44788
|
}
|
|
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
44789
|
class InteractionPolicy {
|
|
44697
44790
|
doc;
|
|
44698
44791
|
constructor(doc) {
|
|
@@ -51230,7 +51323,10 @@ async function fetchRenderData(payload) {
|
|
|
51230
51323
|
function snapshotDocInfo(docInst) {
|
|
51231
51324
|
return {
|
|
51232
51325
|
pages: docInst?.pages ?? [],
|
|
51233
|
-
updateTick: docInst?.updateTick ?? 0
|
|
51326
|
+
updateTick: docInst?.updateTick ?? 0,
|
|
51327
|
+
mode: docInst?.mode ?? null,
|
|
51328
|
+
modeLabel: docInst?.modeLabel ?? "",
|
|
51329
|
+
btnRenderModeType: docInst?.btnRenderModeType ?? null
|
|
51234
51330
|
};
|
|
51235
51331
|
}
|
|
51236
51332
|
async function initializeDocumentEngine(props, payload, result) {
|
|
@@ -54794,6 +54890,7 @@ const builtinComponents = {
|
|
|
54794
54890
|
[BuiltinComponentTypeConst.InlineImage]: _sfc_main$2K,
|
|
54795
54891
|
[BuiltinComponentTypeConst.Text]: _sfc_main$2J
|
|
54796
54892
|
};
|
|
54893
|
+
const OUTLINE_BORDER_INSET = 1;
|
|
54797
54894
|
const borderConfig = {
|
|
54798
54895
|
outer: {
|
|
54799
54896
|
color: "rgb(128, 128, 128)",
|
|
@@ -54901,7 +54998,6 @@ function createTableOutlineLayer(options) {
|
|
|
54901
54998
|
const minY = Math.min(...cells.map((c2) => c2.y));
|
|
54902
54999
|
const maxX = Math.max(...cells.map((c2) => c2.x + c2.width));
|
|
54903
55000
|
const maxY = Math.max(...cells.map((c2) => c2.y + c2.height));
|
|
54904
|
-
Math.min(...cells.map((c2) => c2.layoutX));
|
|
54905
55001
|
const minLY = Math.min(...cells.map((c2) => c2.layoutY));
|
|
54906
55002
|
const maxLX = Math.max(...cells.map((c2) => c2.layoutX + c2.width));
|
|
54907
55003
|
const maxLY = Math.max(...cells.map((c2) => c2.layoutY + c2.height));
|
|
@@ -54963,43 +55059,47 @@ function buildPosMap(layers, getRect, toDom) {
|
|
|
54963
55059
|
}
|
|
54964
55060
|
return res;
|
|
54965
55061
|
}
|
|
54966
|
-
function
|
|
54967
|
-
|
|
54968
|
-
|
|
55062
|
+
function getDataIndexLayersMap({
|
|
55063
|
+
type: type4,
|
|
55064
|
+
cells,
|
|
55065
|
+
isEdit,
|
|
55066
|
+
convertExtraProps
|
|
55067
|
+
}) {
|
|
55068
|
+
const getDataIndex = (cell) => {
|
|
55069
|
+
return type4 === "2d-table" && isEdit ? cell.subRenderer?.xDataIndex : cell.subRenderer?.dataIndex;
|
|
54969
55070
|
};
|
|
54970
|
-
const
|
|
54971
|
-
(cell) =>
|
|
55071
|
+
const _cells = cells.filter(
|
|
55072
|
+
(cell) => getDataIndex(cell) != null && cell?.subRenderer?.type === type4
|
|
54972
55073
|
);
|
|
54973
|
-
if (!
|
|
55074
|
+
if (!_cells.length) return {};
|
|
54974
55075
|
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
|
-
})
|
|
55076
|
+
_cells,
|
|
55077
|
+
(cell) => `${cell.subRenderer.id}_dataIndex${getDataIndex(cell)}`
|
|
55002
55078
|
);
|
|
55079
|
+
const layersMapEntries = Object.entries(grouped).map(([id, __cells]) => {
|
|
55080
|
+
const firstCell = __cells[0];
|
|
55081
|
+
const lastCell = __cells[__cells.length - 1];
|
|
55082
|
+
const isFirstDataGroup = getDataIndex(firstCell) === 0;
|
|
55083
|
+
const bgLayer = createTableOutlineLayer({
|
|
55084
|
+
cells: mapCellsToOutlineCells(__cells),
|
|
55085
|
+
inset: 4
|
|
55086
|
+
});
|
|
55087
|
+
const borderLayer = isFirstDataGroup ? createTableOutlineLayer({
|
|
55088
|
+
cells: mapCellsToOutlineCells(__cells),
|
|
55089
|
+
inset: OUTLINE_BORDER_INSET
|
|
55090
|
+
}) : { hLines: [], vLines: [], backgroundRect: null, labelPos: void 0 };
|
|
55091
|
+
return [
|
|
55092
|
+
id,
|
|
55093
|
+
{
|
|
55094
|
+
...borderLayer,
|
|
55095
|
+
...convertExtraProps(firstCell),
|
|
55096
|
+
showBorder: isFirstDataGroup,
|
|
55097
|
+
placeholderBjRect: bgLayer.backgroundRect,
|
|
55098
|
+
lastCell
|
|
55099
|
+
}
|
|
55100
|
+
];
|
|
55101
|
+
});
|
|
55102
|
+
return Object.fromEntries(layersMapEntries);
|
|
55003
55103
|
}
|
|
55004
55104
|
const baseCanvasAttrs = {
|
|
55005
55105
|
/** 不参与事件命中检测 */
|
|
@@ -55270,8 +55370,6 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
|
|
|
55270
55370
|
}
|
|
55271
55371
|
});
|
|
55272
55372
|
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
55373
|
const TAG_WIDTH = 56;
|
|
55276
55374
|
const TAG_HEIGHT = 22;
|
|
55277
55375
|
const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
@@ -55304,7 +55402,7 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55304
55402
|
});
|
|
55305
55403
|
const isActive = (id) => interCtx.panelData?.context.regionId === id;
|
|
55306
55404
|
const isHovered = (id, type4) => hoverTarget.value === type4 && targetId.value === id;
|
|
55307
|
-
const
|
|
55405
|
+
const subTableCells = computed(
|
|
55308
55406
|
() => props.rows.flatMap(
|
|
55309
55407
|
(row) => row.cells.filter((cell) => cell?.subRenderer?.id).map((cell) => ({
|
|
55310
55408
|
...cell,
|
|
@@ -55324,12 +55422,12 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55324
55422
|
};
|
|
55325
55423
|
});
|
|
55326
55424
|
const outlineLayers = computed(() => {
|
|
55327
|
-
const grouped = groupBy(
|
|
55425
|
+
const grouped = groupBy(subTableCells.value, (cell) => cell.subRenderer.id);
|
|
55328
55426
|
return Object.fromEntries(
|
|
55329
55427
|
Object.entries(grouped).map(([id, cells]) => {
|
|
55330
55428
|
const outline = createTableOutlineLayer({
|
|
55331
55429
|
cells: mapCellsToOutlineCells(cells),
|
|
55332
|
-
inset:
|
|
55430
|
+
inset: OUTLINE_BORDER_INSET
|
|
55333
55431
|
});
|
|
55334
55432
|
return [
|
|
55335
55433
|
id,
|
|
@@ -55342,89 +55440,77 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55342
55440
|
})
|
|
55343
55441
|
);
|
|
55344
55442
|
});
|
|
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) => ({
|
|
55443
|
+
const fixedTableDataGroupLayersMap = computed(
|
|
55444
|
+
() => getDataIndexLayersMap({
|
|
55445
|
+
type: "fixed-table",
|
|
55446
|
+
cells: subTableCells.value,
|
|
55447
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
55448
|
+
convertExtraProps: (cell) => ({
|
|
55355
55449
|
type: "data-group",
|
|
55356
55450
|
valuePath: cell.subRenderer.valuePath,
|
|
55357
55451
|
placeholder: `${cell.subRenderer.dataIndex}`
|
|
55358
55452
|
})
|
|
55359
|
-
)
|
|
55453
|
+
})
|
|
55360
55454
|
);
|
|
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) => ({
|
|
55455
|
+
const checkTableDataGroup2DLayersMap = computed(
|
|
55456
|
+
() => getDataIndexLayersMap({
|
|
55457
|
+
type: "check-table",
|
|
55458
|
+
cells: subTableCells.value,
|
|
55459
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
55460
|
+
convertExtraProps: (cell) => ({
|
|
55371
55461
|
type: "data-group-2d",
|
|
55372
55462
|
valuePath: cell.subRenderer.valuePath,
|
|
55373
55463
|
placeholder: `${cell.subRenderer.dataIndex}`
|
|
55374
55464
|
})
|
|
55375
|
-
)
|
|
55465
|
+
})
|
|
55376
55466
|
);
|
|
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) => ({
|
|
55467
|
+
const _2DTableDataGroup2DLayersMap = computed(
|
|
55468
|
+
() => getDataIndexLayersMap({
|
|
55469
|
+
type: "2d-table",
|
|
55470
|
+
cells: subTableCells.value,
|
|
55471
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
55472
|
+
convertExtraProps: (cell) => ({
|
|
55387
55473
|
type: "data-group-2d",
|
|
55388
55474
|
valuePath: cell.subRenderer.valuePath,
|
|
55389
55475
|
placeholder: `${cell.subRenderer.xDataIndex}`
|
|
55390
55476
|
})
|
|
55391
|
-
)
|
|
55477
|
+
})
|
|
55392
55478
|
);
|
|
55393
55479
|
const tableTypePos = computed(
|
|
55394
55480
|
() => buildPosMap(
|
|
55395
55481
|
outlineLayers.value,
|
|
55396
55482
|
(l2) => l2.labelPos,
|
|
55397
|
-
(p) => labelPosToDom(p
|
|
55483
|
+
(p) => labelPosToDom(p)
|
|
55398
55484
|
)
|
|
55399
55485
|
);
|
|
55400
55486
|
const dataGroupTypePos = computed(
|
|
55401
55487
|
() => buildPosMap(
|
|
55402
55488
|
{
|
|
55403
|
-
...
|
|
55404
|
-
...
|
|
55405
|
-
...
|
|
55489
|
+
...fixedTableDataGroupLayersMap.value,
|
|
55490
|
+
...checkTableDataGroup2DLayersMap.value,
|
|
55491
|
+
..._2DTableDataGroup2DLayersMap.value
|
|
55406
55492
|
},
|
|
55407
55493
|
(l2) => l2.labelPos,
|
|
55408
|
-
(p) => labelPosToDom(p
|
|
55494
|
+
(p) => labelPosToDom(p)
|
|
55409
55495
|
)
|
|
55410
55496
|
);
|
|
55411
55497
|
const dataGroupPlaceholderPos = computed(
|
|
55412
55498
|
() => buildPosMap(
|
|
55413
55499
|
{
|
|
55414
|
-
...
|
|
55415
|
-
...
|
|
55416
|
-
...
|
|
55500
|
+
...fixedTableDataGroupLayersMap.value,
|
|
55501
|
+
...checkTableDataGroup2DLayersMap.value,
|
|
55502
|
+
..._2DTableDataGroup2DLayersMap.value
|
|
55417
55503
|
},
|
|
55418
55504
|
(l2) => l2.lastCell,
|
|
55419
55505
|
(p) => centerRectToDom(p)
|
|
55420
55506
|
)
|
|
55421
55507
|
);
|
|
55422
|
-
function labelPosToDom(labelPos
|
|
55508
|
+
function labelPosToDom(labelPos) {
|
|
55423
55509
|
const base = pageBaseOffset.value;
|
|
55424
55510
|
if (!base) return null;
|
|
55425
55511
|
return {
|
|
55426
55512
|
left: `${labelPos.x + base.leftBase - TAG_WIDTH}px`,
|
|
55427
|
-
top: `${labelPos.y1 + base.topBase +
|
|
55513
|
+
top: `${labelPos.y1 + base.topBase + OUTLINE_BORDER_INSET}px`,
|
|
55428
55514
|
width: `${TAG_WIDTH}px`,
|
|
55429
55515
|
height: `${TAG_HEIGHT}px`
|
|
55430
55516
|
};
|
|
@@ -55519,9 +55605,9 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55519
55605
|
}, 1024);
|
|
55520
55606
|
}), 128)),
|
|
55521
55607
|
(openBlock(true), createElementBlock(Fragment, null, renderList([
|
|
55522
|
-
|
|
55523
|
-
|
|
55524
|
-
|
|
55608
|
+
fixedTableDataGroupLayersMap.value,
|
|
55609
|
+
checkTableDataGroup2DLayersMap.value,
|
|
55610
|
+
_2DTableDataGroup2DLayersMap.value
|
|
55525
55611
|
], (layers, layersIndex) => {
|
|
55526
55612
|
return openBlock(), createElementBlock(Fragment, { key: layersIndex }, [
|
|
55527
55613
|
(openBlock(true), createElementBlock(Fragment, null, renderList(layers, (layer, id) => {
|
|
@@ -56380,8 +56466,6 @@ const _sfc_main$2x = /* @__PURE__ */ defineComponent({
|
|
|
56380
56466
|
}
|
|
56381
56467
|
});
|
|
56382
56468
|
const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$2x, [["__scopeId", "data-v-adc8fb9a"]]);
|
|
56383
|
-
const BORDER_INSET = 1;
|
|
56384
|
-
const GROUP_BG_INSET = 4;
|
|
56385
56469
|
const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
56386
56470
|
__name: "index",
|
|
56387
56471
|
props: {
|
|
@@ -56422,22 +56506,18 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
|
56422
56506
|
};
|
|
56423
56507
|
});
|
|
56424
56508
|
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
|
-
() => ({
|
|
56509
|
+
return getDataIndexLayersMap({
|
|
56510
|
+
type: type4,
|
|
56511
|
+
cells: cellsWithId.value,
|
|
56512
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
56513
|
+
convertExtraProps: () => ({
|
|
56434
56514
|
type: type4,
|
|
56435
56515
|
placeholder: "",
|
|
56436
56516
|
valuePath: ""
|
|
56437
56517
|
})
|
|
56438
|
-
);
|
|
56518
|
+
});
|
|
56439
56519
|
};
|
|
56440
|
-
const
|
|
56520
|
+
const subTableOutlineLayersMap = computed(() => {
|
|
56441
56521
|
return {
|
|
56442
56522
|
...buildDataIndexLayersWith("dynamic-table"),
|
|
56443
56523
|
...buildDataIndexLayersWith("2d-table")
|
|
@@ -56446,13 +56526,13 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
|
56446
56526
|
const subTableActionPos = computed(() => {
|
|
56447
56527
|
const res = {};
|
|
56448
56528
|
const ACTION_WIDTH = 24;
|
|
56449
|
-
for (const [id, layer] of Object.entries(
|
|
56529
|
+
for (const [id, layer] of Object.entries(subTableOutlineLayersMap.value)) {
|
|
56450
56530
|
const lastCell = layer.lastCell;
|
|
56451
56531
|
if (!lastCell) continue;
|
|
56452
56532
|
const base = pageBaseOffset.value;
|
|
56453
56533
|
if (base) {
|
|
56454
56534
|
res[id] = {
|
|
56455
|
-
left: `${lastCell.layoutX + base.leftBase + lastCell.width +
|
|
56535
|
+
left: `${lastCell.layoutX + base.leftBase + lastCell.width + OUTLINE_BORDER_INSET}px`,
|
|
56456
56536
|
top: `${lastCell.layoutY + base.topBase + lastCell.height - ACTION_WIDTH}px`
|
|
56457
56537
|
};
|
|
56458
56538
|
}
|
|
@@ -56461,7 +56541,7 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
|
56461
56541
|
});
|
|
56462
56542
|
return (_ctx, _cache) => {
|
|
56463
56543
|
const _component_v_group = resolveComponent("v-group");
|
|
56464
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
56544
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(subTableOutlineLayersMap.value, (subLayer, subId) => {
|
|
56465
56545
|
return openBlock(), createBlock(_component_v_group, {
|
|
56466
56546
|
key: subId,
|
|
56467
56547
|
config: baseLayerProps
|
|
@@ -57022,13 +57102,12 @@ function useDocController(factory2, ops) {
|
|
|
57022
57102
|
return doc.pages.find((p) => p.section.refId === id) ?? null;
|
|
57023
57103
|
}
|
|
57024
57104
|
},
|
|
57025
|
-
// 响应式状态
|
|
57026
57105
|
docRuntimeMeta: doc.docRuntimeMeta,
|
|
57027
|
-
mode: computed(() =>
|
|
57028
|
-
modeLabel: computed(() =>
|
|
57029
|
-
btnRenderModeType: computed(() =>
|
|
57030
|
-
updateTick: computed(() =>
|
|
57031
|
-
pages: computed(() =>
|
|
57106
|
+
mode: computed(() => factory2.docInfo.value.mode),
|
|
57107
|
+
modeLabel: computed(() => factory2.docInfo.value.modeLabel),
|
|
57108
|
+
btnRenderModeType: computed(() => factory2.docInfo.value.btnRenderModeType),
|
|
57109
|
+
updateTick: computed(() => factory2.docInfo.value.updateTick),
|
|
57110
|
+
pages: computed(() => factory2.docInfo.value.pages),
|
|
57032
57111
|
// Doc 内置命令系统
|
|
57033
57112
|
execute(command, payload) {
|
|
57034
57113
|
doc.execute(command, payload);
|
|
@@ -58609,7 +58688,7 @@ const _sfc_main$2l = /* @__PURE__ */ defineComponent({
|
|
|
58609
58688
|
};
|
|
58610
58689
|
}
|
|
58611
58690
|
});
|
|
58612
|
-
const SetTableHeaderFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2l, [["__scopeId", "data-v-
|
|
58691
|
+
const SetTableHeaderFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2l, [["__scopeId", "data-v-d5785019"]]);
|
|
58613
58692
|
const _hoisted_1$1F = { class: "items-container" };
|
|
58614
58693
|
const _hoisted_2$14 = { class: "ribbon-tab-item" };
|
|
58615
58694
|
const _hoisted_3$P = { class: "ribbon-tab-item" };
|
|
@@ -59022,7 +59101,7 @@ const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
|
59022
59101
|
};
|
|
59023
59102
|
}
|
|
59024
59103
|
});
|
|
59025
|
-
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-
|
|
59104
|
+
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-880a7ed3"]]);
|
|
59026
59105
|
const _hoisted_1$1E = { class: "ribbon" };
|
|
59027
59106
|
const _hoisted_2$13 = { class: "ribbon-content-wrapper" };
|
|
59028
59107
|
const _sfc_main$2j = /* @__PURE__ */ defineComponent({
|
|
@@ -60417,7 +60496,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
60417
60496
|
};
|
|
60418
60497
|
}
|
|
60419
60498
|
});
|
|
60420
|
-
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-
|
|
60499
|
+
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-8bfe3f32"]]);
|
|
60421
60500
|
const OFFSET = 4;
|
|
60422
60501
|
const _sfc_main$27 = /* @__PURE__ */ defineComponent({
|
|
60423
60502
|
__name: "index",
|
|
@@ -66795,7 +66874,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
66795
66874
|
return (_ctx, _cache) => {
|
|
66796
66875
|
return openBlock(), createElementBlock("div", _hoisted_1$1h, [
|
|
66797
66876
|
createVNode(unref(GctCollapse), {
|
|
66798
|
-
title: "
|
|
66877
|
+
title: "数据分组配置",
|
|
66799
66878
|
class: "panel-collapse is-first"
|
|
66800
66879
|
}, {
|
|
66801
66880
|
default: withCtx(() => [
|
|
@@ -66852,7 +66931,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
66852
66931
|
};
|
|
66853
66932
|
}
|
|
66854
66933
|
});
|
|
66855
|
-
const DataGroupPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["__scopeId", "data-v-
|
|
66934
|
+
const DataGroupPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["__scopeId", "data-v-4572267c"]]);
|
|
66856
66935
|
const schema$7 = {
|
|
66857
66936
|
key: "data-group.basic",
|
|
66858
66937
|
title: [
|
|
@@ -69552,10 +69631,10 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
69552
69631
|
})) : createCommentVNode("", true)
|
|
69553
69632
|
]),
|
|
69554
69633
|
createVNode(unref(GctInput), {
|
|
69555
|
-
|
|
69556
|
-
"onUpdate:
|
|
69634
|
+
modelValue: formState.value.prompt,
|
|
69635
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formState.value.prompt = $event),
|
|
69557
69636
|
placeholder: "请输入"
|
|
69558
|
-
}, null, 8, ["
|
|
69637
|
+
}, null, 8, ["modelValue"]),
|
|
69559
69638
|
createVNode(unref(GctDivider), { style: { "padding": "4px 0 4px 0" } }, {
|
|
69560
69639
|
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
69561
69640
|
createElementVNode("i", {
|
|
@@ -69584,7 +69663,7 @@ const _sfc_main$17 = /* @__PURE__ */ defineComponent({
|
|
|
69584
69663
|
};
|
|
69585
69664
|
}
|
|
69586
69665
|
});
|
|
69587
|
-
const IdentifyParamCard = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-
|
|
69666
|
+
const IdentifyParamCard = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["__scopeId", "data-v-d0486796"]]);
|
|
69588
69667
|
const _sfc_main$16 = /* @__PURE__ */ defineComponent({
|
|
69589
69668
|
__name: "decimal-slider",
|
|
69590
69669
|
props: {
|