@nocobase/plugin-flow-engine 2.1.0-alpha.17 → 2.1.0-alpha.19
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/externalVersion.js +11 -11
- package/dist/node_modules/ses/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/flow-surfaces/action-scope.js +3 -1
- package/dist/server/flow-surfaces/apply/compiler.js +84 -5
- package/dist/server/flow-surfaces/approval/blueprint-service.d.ts +84 -0
- package/dist/server/flow-surfaces/approval/blueprint-service.js +589 -0
- package/dist/server/flow-surfaces/approval/blueprint.d.ts +21 -0
- package/dist/server/flow-surfaces/approval/blueprint.js +190 -0
- package/dist/server/flow-surfaces/approval/builder.d.ts +225 -0
- package/dist/server/flow-surfaces/approval/builder.js +384 -0
- package/dist/server/flow-surfaces/approval/catalog-specs.d.ts +33 -0
- package/dist/server/flow-surfaces/approval/catalog-specs.js +156 -0
- package/dist/server/flow-surfaces/approval/index.d.ts +14 -0
- package/dist/server/flow-surfaces/approval/index.js +40 -0
- package/dist/server/flow-surfaces/approval/runtime-config.d.ts +44 -0
- package/dist/server/flow-surfaces/approval/runtime-config.js +299 -0
- package/dist/server/flow-surfaces/approval/semantic-use.d.ts +23 -0
- package/dist/server/flow-surfaces/approval/semantic-use.js +155 -0
- package/dist/server/flow-surfaces/blueprint/compile-blocks.js +36 -2
- package/dist/server/flow-surfaces/blueprint/public-types.d.ts +7 -0
- package/dist/server/flow-surfaces/builder.d.ts +2 -0
- package/dist/server/flow-surfaces/builder.js +83 -10
- package/dist/server/flow-surfaces/catalog.d.ts +10 -0
- package/dist/server/flow-surfaces/catalog.js +368 -9
- package/dist/server/flow-surfaces/chart-config.d.ts +1 -1
- package/dist/server/flow-surfaces/compose-compiler.d.ts +1 -0
- package/dist/server/flow-surfaces/compose-compiler.js +2 -1
- package/dist/server/flow-surfaces/configure-options.js +61 -3
- package/dist/server/flow-surfaces/constants.d.ts +342 -5
- package/dist/server/flow-surfaces/constants.js +59 -125
- package/dist/server/flow-surfaces/default-action-popup.d.ts +1 -0
- package/dist/server/flow-surfaces/default-action-popup.js +6 -2
- package/dist/server/flow-surfaces/field-semantics.js +2 -1
- package/dist/server/flow-surfaces/index.js +21 -273
- package/dist/server/flow-surfaces/locator.js +8 -6
- package/dist/server/flow-surfaces/node-use-sets.js +15 -3
- package/dist/server/flow-surfaces/placement.js +11 -7
- package/dist/server/flow-surfaces/planning/action-specs.d.ts +1 -1
- package/dist/server/flow-surfaces/planning/compiler.d.ts +1 -1
- package/dist/server/flow-surfaces/planning/key-kind.js +7 -5
- package/dist/server/flow-surfaces/reaction/registry.d.ts +13 -0
- package/dist/server/flow-surfaces/reaction/registry.js +13 -0
- package/dist/server/flow-surfaces/service-utils.d.ts +10 -14
- package/dist/server/flow-surfaces/service-utils.js +4 -2
- package/dist/server/flow-surfaces/service.d.ts +63 -1
- package/dist/server/flow-surfaces/service.js +1058 -109
- package/dist/server/flow-surfaces/surface-context.d.ts +1 -0
- package/dist/server/flow-surfaces/surface-context.js +99 -19
- package/dist/server/flow-surfaces/types.d.ts +4 -1
- package/dist/swagger/flow-surfaces.d.ts +406 -2
- package/dist/swagger/flow-surfaces.examples.d.ts +164 -0
- package/dist/swagger/flow-surfaces.examples.js +184 -0
- package/dist/swagger/flow-surfaces.js +390 -76
- package/dist/swagger/index.d.ts +406 -2
- package/package.json +2 -2
|
@@ -39,20 +39,24 @@ __export(catalog_exports, {
|
|
|
39
39
|
blockCatalog: () => blockCatalog,
|
|
40
40
|
filterAvailableCatalogItems: () => filterAvailableCatalogItems,
|
|
41
41
|
getAvailableActionCatalogItems: () => getAvailableActionCatalogItems,
|
|
42
|
+
getAvailableBlockCatalogItems: () => getAvailableBlockCatalogItems,
|
|
42
43
|
getEditableDomainsForUse: () => getEditableDomainsForUse,
|
|
43
44
|
getLayoutCapabilitiesForUse: () => getLayoutCapabilitiesForUse,
|
|
44
45
|
getNodeContract: () => getNodeContract,
|
|
45
46
|
getSettingsSchemaForUse: () => getSettingsSchemaForUse,
|
|
47
|
+
getSupportedFieldComponentUseSet: () => getSupportedFieldComponentUseSet,
|
|
46
48
|
isCatalogItemAvailable: () => isCatalogItemAvailable,
|
|
47
49
|
resolveSupportedActionCatalogItem: () => resolveSupportedActionCatalogItem,
|
|
48
50
|
resolveSupportedBlockCatalogItem: () => resolveSupportedBlockCatalogItem,
|
|
49
51
|
resolveSupportedFieldCapability: () => resolveSupportedFieldCapability
|
|
50
52
|
});
|
|
51
53
|
module.exports = __toCommonJS(catalog_exports);
|
|
54
|
+
var import_approval = require("./approval");
|
|
52
55
|
var import_action_scope = require("./action-scope");
|
|
53
56
|
var import_errors = require("./errors");
|
|
54
57
|
var import_field_semantics = require("./field-semantics");
|
|
55
58
|
var import_field_binding_registry = require("./field-binding-registry");
|
|
59
|
+
var import_service_helpers = require("./service-helpers");
|
|
56
60
|
var import_support_matrix = require("./support-matrix");
|
|
57
61
|
const ANY_VALUE_SCHEMA = {};
|
|
58
62
|
const STRING_SCHEMA = { type: "string" };
|
|
@@ -115,7 +119,8 @@ const OPEN_VIEW_ALLOWED_PATHS = [
|
|
|
115
119
|
"openView.navigation",
|
|
116
120
|
"openView.template",
|
|
117
121
|
"openView.template.uid",
|
|
118
|
-
"openView.template.mode"
|
|
122
|
+
"openView.template.mode",
|
|
123
|
+
"openView.tryTemplate"
|
|
119
124
|
];
|
|
120
125
|
const OPEN_VIEW_PATH_SCHEMAS = {
|
|
121
126
|
"openView.mode": OPEN_VIEW_MODE_SCHEMA,
|
|
@@ -136,7 +141,8 @@ const OPEN_VIEW_PATH_SCHEMAS = {
|
|
|
136
141
|
"openView.template.mode": {
|
|
137
142
|
type: "string",
|
|
138
143
|
enum: ["reference", "copy"]
|
|
139
|
-
}
|
|
144
|
+
},
|
|
145
|
+
"openView.tryTemplate": BOOLEAN_SCHEMA
|
|
140
146
|
};
|
|
141
147
|
const CONFIRM_ALLOWED_PATHS = ["confirm.enable", "confirm.title", "confirm.content"];
|
|
142
148
|
const TABLE_COLUMN_ALLOWED_PATHS = ["title.title"];
|
|
@@ -378,6 +384,12 @@ const FILTER_FIELD_USE_SET = /* @__PURE__ */ new Set([
|
|
|
378
384
|
"PercentFieldModel",
|
|
379
385
|
"InputFieldModel"
|
|
380
386
|
]);
|
|
387
|
+
const APPROVAL_DETAILS_FIELD_COMPONENT_WRAPPER_USE_SET = /* @__PURE__ */ new Set([
|
|
388
|
+
"ApprovalDetailsItemModel",
|
|
389
|
+
"ApplyTaskCardDetailsItemModel",
|
|
390
|
+
"ApprovalTaskCardDetailsItemModel"
|
|
391
|
+
]);
|
|
392
|
+
const SINGLE_VALUE_ASSOCIATION_INTERFACES = /* @__PURE__ */ new Set(["m2o", "o2o", "oho", "obo", "updatedBy", "createdBy"]);
|
|
381
393
|
const KNOWN_FIELD_NODE_USES = /* @__PURE__ */ new Set([
|
|
382
394
|
...EDITABLE_FIELD_USE_SET,
|
|
383
395
|
...DISPLAY_FIELD_USE_SET,
|
|
@@ -591,6 +603,81 @@ PAGE_NODE_CONTRACT.domains.stepParams = groupedDomain({
|
|
|
591
603
|
}
|
|
592
604
|
}
|
|
593
605
|
});
|
|
606
|
+
const TRIGGER_CHILD_PAGE_NODE_CONTRACT = createContract({
|
|
607
|
+
editableDomains: ["props", "stepParams", "flowRegistry"],
|
|
608
|
+
props: ["title", "displayTitle", "enableTabs", "icon", "enableHeader"],
|
|
609
|
+
stepParams: ["pageSettings", "TriggerChildPageSettings"],
|
|
610
|
+
flowRegistry: true,
|
|
611
|
+
eventCapabilities: {
|
|
612
|
+
direct: DEFAULT_DIRECT_EVENTS
|
|
613
|
+
},
|
|
614
|
+
eventBindings: {
|
|
615
|
+
pageSettings: {
|
|
616
|
+
stepKeys: ["general"]
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
TRIGGER_CHILD_PAGE_NODE_CONTRACT.domains.stepParams = groupedDomain({
|
|
621
|
+
pageSettings: {
|
|
622
|
+
allowedPaths: [
|
|
623
|
+
"general.title",
|
|
624
|
+
"general.documentTitle",
|
|
625
|
+
"general.displayTitle",
|
|
626
|
+
"general.enableTabs",
|
|
627
|
+
"general.icon",
|
|
628
|
+
"general.enableHeader"
|
|
629
|
+
],
|
|
630
|
+
mergeStrategy: "deep",
|
|
631
|
+
eventBindingSteps: ["general"],
|
|
632
|
+
pathSchemas: {
|
|
633
|
+
"general.title": STRING_SCHEMA,
|
|
634
|
+
"general.documentTitle": STRING_SCHEMA,
|
|
635
|
+
"general.displayTitle": BOOLEAN_SCHEMA,
|
|
636
|
+
"general.enableTabs": BOOLEAN_SCHEMA,
|
|
637
|
+
"general.icon": STRING_SCHEMA,
|
|
638
|
+
"general.enableHeader": BOOLEAN_SCHEMA
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
TriggerChildPageSettings: RESOURCE_SETTINGS_GROUP
|
|
642
|
+
});
|
|
643
|
+
const APPROVAL_CHILD_PAGE_NODE_CONTRACT = createContract({
|
|
644
|
+
editableDomains: ["props", "stepParams", "flowRegistry"],
|
|
645
|
+
props: ["title", "displayTitle", "enableTabs", "icon", "enableHeader"],
|
|
646
|
+
stepParams: ["pageSettings", "ApprovalChildPageSettings", "resourceSettings"],
|
|
647
|
+
flowRegistry: true,
|
|
648
|
+
eventCapabilities: {
|
|
649
|
+
direct: DEFAULT_DIRECT_EVENTS
|
|
650
|
+
},
|
|
651
|
+
eventBindings: {
|
|
652
|
+
pageSettings: {
|
|
653
|
+
stepKeys: ["general"]
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
APPROVAL_CHILD_PAGE_NODE_CONTRACT.domains.stepParams = groupedDomain({
|
|
658
|
+
pageSettings: {
|
|
659
|
+
allowedPaths: [
|
|
660
|
+
"general.title",
|
|
661
|
+
"general.documentTitle",
|
|
662
|
+
"general.displayTitle",
|
|
663
|
+
"general.enableTabs",
|
|
664
|
+
"general.icon",
|
|
665
|
+
"general.enableHeader"
|
|
666
|
+
],
|
|
667
|
+
mergeStrategy: "deep",
|
|
668
|
+
eventBindingSteps: ["general"],
|
|
669
|
+
pathSchemas: {
|
|
670
|
+
"general.title": STRING_SCHEMA,
|
|
671
|
+
"general.documentTitle": STRING_SCHEMA,
|
|
672
|
+
"general.displayTitle": BOOLEAN_SCHEMA,
|
|
673
|
+
"general.enableTabs": BOOLEAN_SCHEMA,
|
|
674
|
+
"general.icon": STRING_SCHEMA,
|
|
675
|
+
"general.enableHeader": BOOLEAN_SCHEMA
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
ApprovalChildPageSettings: RESOURCE_SETTINGS_GROUP,
|
|
679
|
+
resourceSettings: RESOURCE_SETTINGS_GROUP
|
|
680
|
+
});
|
|
594
681
|
const TAB_NODE_CONTRACT = createContract({
|
|
595
682
|
editableDomains: ["props", "stepParams", "flowRegistry"],
|
|
596
683
|
props: ["title", "icon"],
|
|
@@ -1808,6 +1895,129 @@ JS_ACTION_CONTRACT.domains.stepParams = groupedDomain({
|
|
|
1808
1895
|
buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
|
|
1809
1896
|
clickSettings: RUN_JS_SETTINGS_GROUP
|
|
1810
1897
|
});
|
|
1898
|
+
const APPROVAL_FORM_BLOCK_CONTRACT = createContract({
|
|
1899
|
+
editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
|
|
1900
|
+
props: ["title", "displayTitle", "labelWidth", "labelWrap"],
|
|
1901
|
+
decoratorProps: ["labelWidth", "labelWrap"],
|
|
1902
|
+
stepParams: ["resourceSettings", "formModelSettings", "eventSettings", "cardSettings", "patternSettings"],
|
|
1903
|
+
flowRegistry: true,
|
|
1904
|
+
eventCapabilities: {
|
|
1905
|
+
direct: DEFAULT_DIRECT_EVENTS,
|
|
1906
|
+
object: ["submit"]
|
|
1907
|
+
}
|
|
1908
|
+
});
|
|
1909
|
+
APPROVAL_FORM_BLOCK_CONTRACT.domains.stepParams = groupedDomain({
|
|
1910
|
+
resourceSettings: RESOURCE_SETTINGS_GROUP,
|
|
1911
|
+
formModelSettings: FORM_MODEL_SETTINGS_GROUP,
|
|
1912
|
+
eventSettings: EVENT_SETTINGS_GROUP,
|
|
1913
|
+
cardSettings: BLOCK_LINKAGE_CARD_SETTINGS_GROUP,
|
|
1914
|
+
patternSettings: {
|
|
1915
|
+
allowedPaths: ["pattern.pattern"],
|
|
1916
|
+
mergeStrategy: "deep",
|
|
1917
|
+
eventBindingSteps: ["pattern"],
|
|
1918
|
+
pathSchemas: {
|
|
1919
|
+
"pattern.pattern": STRING_SCHEMA
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
});
|
|
1923
|
+
const PATTERN_FORM_FIELD_NODE_CONTRACT = createContract({
|
|
1924
|
+
editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
|
|
1925
|
+
props: [
|
|
1926
|
+
"title",
|
|
1927
|
+
"icon",
|
|
1928
|
+
"titleField",
|
|
1929
|
+
"clickToOpen",
|
|
1930
|
+
"autoSize",
|
|
1931
|
+
"allowMultiple",
|
|
1932
|
+
"multiple",
|
|
1933
|
+
"quickCreate",
|
|
1934
|
+
"allowClear",
|
|
1935
|
+
"displayStyle",
|
|
1936
|
+
"options"
|
|
1937
|
+
],
|
|
1938
|
+
decoratorProps: ["labelWidth", "labelWrap"],
|
|
1939
|
+
stepParams: ["fieldSettings", "fieldBinding", "displayFieldSettings", "popupSettings", "jsSettings"],
|
|
1940
|
+
flowRegistry: true,
|
|
1941
|
+
eventCapabilities: {
|
|
1942
|
+
direct: ACTION_DIRECT_EVENTS,
|
|
1943
|
+
object: ACTION_OBJECT_EVENTS
|
|
1944
|
+
},
|
|
1945
|
+
eventBindings: {
|
|
1946
|
+
displayFieldSettings: {
|
|
1947
|
+
stepKeys: ["displayStyle", "clickToOpen"]
|
|
1948
|
+
},
|
|
1949
|
+
popupSettings: {
|
|
1950
|
+
stepKeys: ["openView"]
|
|
1951
|
+
},
|
|
1952
|
+
jsSettings: {
|
|
1953
|
+
stepKeys: ["runJs"]
|
|
1954
|
+
},
|
|
1955
|
+
fieldBinding: {
|
|
1956
|
+
stepKeys: ["use"]
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
});
|
|
1960
|
+
PATTERN_FORM_FIELD_NODE_CONTRACT.domains.stepParams = groupedDomain({
|
|
1961
|
+
fieldSettings: FIELD_SETTINGS_INIT_GROUP,
|
|
1962
|
+
fieldBinding: {
|
|
1963
|
+
allowedPaths: ["use"],
|
|
1964
|
+
mergeStrategy: "deep",
|
|
1965
|
+
eventBindingSteps: ["use"],
|
|
1966
|
+
pathSchemas: {
|
|
1967
|
+
use: STRING_SCHEMA
|
|
1968
|
+
}
|
|
1969
|
+
},
|
|
1970
|
+
displayFieldSettings: {
|
|
1971
|
+
allowedPaths: ["displayStyle.displayStyle", "clickToOpen.clickToOpen"],
|
|
1972
|
+
clearable: true,
|
|
1973
|
+
mergeStrategy: "deep",
|
|
1974
|
+
eventBindingSteps: ["displayStyle", "clickToOpen"],
|
|
1975
|
+
pathSchemas: {
|
|
1976
|
+
"displayStyle.displayStyle": STRING_SCHEMA,
|
|
1977
|
+
"clickToOpen.clickToOpen": BOOLEAN_SCHEMA
|
|
1978
|
+
}
|
|
1979
|
+
},
|
|
1980
|
+
popupSettings: {
|
|
1981
|
+
allowedPaths: OPEN_VIEW_ALLOWED_PATHS,
|
|
1982
|
+
clearable: true,
|
|
1983
|
+
mergeStrategy: "deep",
|
|
1984
|
+
eventBindingSteps: ["openView"],
|
|
1985
|
+
pathSchemas: OPEN_VIEW_PATH_SCHEMAS
|
|
1986
|
+
},
|
|
1987
|
+
jsSettings: RUN_JS_SETTINGS_GROUP
|
|
1988
|
+
});
|
|
1989
|
+
const APPROVAL_ACTION_CONTRACT = createContract({
|
|
1990
|
+
editableDomains: ["props", "decoratorProps", "stepParams", "flowRegistry"],
|
|
1991
|
+
props: ACTION_PROP_KEYS,
|
|
1992
|
+
decoratorProps: ["labelWidth", "labelWrap"],
|
|
1993
|
+
stepParams: ["buttonSettings", "clickSettings"],
|
|
1994
|
+
flowRegistry: true,
|
|
1995
|
+
eventCapabilities: {
|
|
1996
|
+
direct: ACTION_DIRECT_EVENTS,
|
|
1997
|
+
object: ACTION_OBJECT_EVENTS
|
|
1998
|
+
},
|
|
1999
|
+
eventBindings: {
|
|
2000
|
+
buttonSettings: {
|
|
2001
|
+
stepKeys: ["general", "linkageRules"]
|
|
2002
|
+
},
|
|
2003
|
+
clickSettings: {
|
|
2004
|
+
stepKeys: "*"
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
});
|
|
2008
|
+
APPROVAL_ACTION_CONTRACT.domains.stepParams = groupedDomain({
|
|
2009
|
+
buttonSettings: ACTION_BUTTON_SETTINGS_GROUP,
|
|
2010
|
+
clickSettings: {
|
|
2011
|
+
allowedPaths: ["*"],
|
|
2012
|
+
clearable: true,
|
|
2013
|
+
mergeStrategy: "deep",
|
|
2014
|
+
eventBindingSteps: "*",
|
|
2015
|
+
schema: {
|
|
2016
|
+
type: "object",
|
|
2017
|
+
additionalProperties: true
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
});
|
|
1811
2021
|
const nodeContracts = /* @__PURE__ */ new Map();
|
|
1812
2022
|
function registerNodeContract(use, contract) {
|
|
1813
2023
|
nodeContracts.set(use, contract);
|
|
@@ -1815,13 +2025,20 @@ function registerNodeContract(use, contract) {
|
|
|
1815
2025
|
const NODE_CONTRACT_ENTRIES = [
|
|
1816
2026
|
["RootPageModel", PAGE_NODE_CONTRACT],
|
|
1817
2027
|
["ChildPageModel", PAGE_NODE_CONTRACT],
|
|
2028
|
+
["TriggerChildPageModel", TRIGGER_CHILD_PAGE_NODE_CONTRACT],
|
|
2029
|
+
["ApprovalChildPageModel", APPROVAL_CHILD_PAGE_NODE_CONTRACT],
|
|
1818
2030
|
["RootPageTabModel", TAB_NODE_CONTRACT],
|
|
1819
2031
|
["ChildPageTabModel", TAB_NODE_CONTRACT],
|
|
2032
|
+
...import_approval.APPROVAL_TAB_MODEL_USES.map((use) => [use, TAB_NODE_CONTRACT]),
|
|
1820
2033
|
["BlockGridModel", GRID_NODE_CONTRACT],
|
|
1821
2034
|
["FormGridModel", FORM_GRID_NODE_CONTRACT],
|
|
1822
2035
|
["DetailsGridModel", GRID_NODE_CONTRACT],
|
|
1823
2036
|
["FilterFormGridModel", GRID_NODE_CONTRACT],
|
|
1824
2037
|
["AssignFormGridModel", FORM_GRID_NODE_CONTRACT],
|
|
2038
|
+
...import_approval.APPROVAL_FORM_GRID_USES.map((use) => [use, FORM_GRID_NODE_CONTRACT]),
|
|
2039
|
+
...import_approval.APPROVAL_DETAILS_GRID_USES.map((use) => [use, GRID_NODE_CONTRACT]),
|
|
2040
|
+
["TriggerBlockGridModel", GRID_NODE_CONTRACT],
|
|
2041
|
+
["ApprovalBlockGridModel", GRID_NODE_CONTRACT],
|
|
1825
2042
|
["TableBlockModel", TABLE_BLOCK_CONTRACT],
|
|
1826
2043
|
["CreateFormModel", CREATE_FORM_BLOCK_CONTRACT],
|
|
1827
2044
|
["EditFormModel", EDIT_FORM_BLOCK_CONTRACT],
|
|
@@ -1831,6 +2048,8 @@ const NODE_CONTRACT_ENTRIES = [
|
|
|
1831
2048
|
["FilterFormBlockModel", FILTER_FORM_BLOCK_CONTRACT],
|
|
1832
2049
|
["ListBlockModel", LIST_BLOCK_CONTRACT],
|
|
1833
2050
|
["GridCardBlockModel", GRID_CARD_BLOCK_CONTRACT],
|
|
2051
|
+
...import_approval.APPROVAL_FORM_BLOCK_USES.map((use) => [use, APPROVAL_FORM_BLOCK_CONTRACT]),
|
|
2052
|
+
...import_approval.APPROVAL_DETAILS_BLOCK_USES.map((use) => [use, DETAILS_BLOCK_CONTRACT]),
|
|
1834
2053
|
["JSBlockModel", JS_BLOCK_CONTRACT],
|
|
1835
2054
|
["MarkdownBlockModel", MARKDOWN_BLOCK_CONTRACT],
|
|
1836
2055
|
["IframeBlockModel", IFRAME_BLOCK_CONTRACT],
|
|
@@ -1843,9 +2062,14 @@ const NODE_CONTRACT_ENTRIES = [
|
|
|
1843
2062
|
["FormAssociationItemModel", DETAILS_ITEM_CONTRACT],
|
|
1844
2063
|
["DetailsItemModel", DETAILS_ITEM_CONTRACT],
|
|
1845
2064
|
["FilterFormItemModel", FILTER_FORM_ITEM_CONTRACT],
|
|
2065
|
+
["PatternFormItemModel", FORM_ITEM_CONTRACT],
|
|
2066
|
+
["ApprovalDetailsItemModel", DETAILS_ITEM_CONTRACT],
|
|
2067
|
+
["ApplyTaskCardDetailsItemModel", DETAILS_ITEM_CONTRACT],
|
|
2068
|
+
["ApprovalTaskCardDetailsItemModel", DETAILS_ITEM_CONTRACT],
|
|
1846
2069
|
["SubFormFieldModel", SUB_FORM_FIELD_NODE_CONTRACT],
|
|
1847
2070
|
["SubFormListFieldModel", SUB_FORM_FIELD_NODE_CONTRACT],
|
|
1848
2071
|
["TableColumnModel", TABLE_COLUMN_CONTRACT],
|
|
2072
|
+
["PatternFormFieldModel", PATTERN_FORM_FIELD_NODE_CONTRACT],
|
|
1849
2073
|
["JSColumnModel", JS_COLUMN_CONTRACT],
|
|
1850
2074
|
["JSItemModel", JS_ITEM_CONTRACT],
|
|
1851
2075
|
["FormJSFieldItemModel", JS_ITEM_CONTRACT],
|
|
@@ -1884,7 +2108,15 @@ const NODE_CONTRACT_ENTRIES = [
|
|
|
1884
2108
|
["JSFormActionModel", JS_ACTION_CONTRACT],
|
|
1885
2109
|
["FilterFormJSActionModel", JS_ACTION_CONTRACT],
|
|
1886
2110
|
["JSItemActionModel", JS_ACTION_CONTRACT],
|
|
1887
|
-
["JSActionModel", JS_ACTION_CONTRACT]
|
|
2111
|
+
["JSActionModel", JS_ACTION_CONTRACT],
|
|
2112
|
+
["ApplyFormSubmitModel", APPROVAL_ACTION_CONTRACT],
|
|
2113
|
+
["ApplyFormSaveDraftModel", APPROVAL_ACTION_CONTRACT],
|
|
2114
|
+
["ApplyFormWithdrawModel", APPROVAL_ACTION_CONTRACT],
|
|
2115
|
+
["ProcessFormApproveModel", APPROVAL_ACTION_CONTRACT],
|
|
2116
|
+
["ProcessFormRejectModel", APPROVAL_ACTION_CONTRACT],
|
|
2117
|
+
["ProcessFormReturnModel", APPROVAL_ACTION_CONTRACT],
|
|
2118
|
+
["ProcessFormDelegateModel", APPROVAL_ACTION_CONTRACT],
|
|
2119
|
+
["ProcessFormAddAssigneeModel", APPROVAL_ACTION_CONTRACT]
|
|
1888
2120
|
];
|
|
1889
2121
|
NODE_CONTRACT_ENTRIES.forEach(([use, contract]) => registerNodeContract(use, contract));
|
|
1890
2122
|
KNOWN_FIELD_NODE_USES.forEach(
|
|
@@ -1908,6 +2140,10 @@ function normalizeFieldContainerUse(containerUse) {
|
|
|
1908
2140
|
return (0, import_field_semantics.normalizeFieldContainerKind)(containerUse);
|
|
1909
2141
|
}
|
|
1910
2142
|
function getFieldWrapperUseForContainer(containerUse) {
|
|
2143
|
+
const approvalWrapperUse = (0, import_approval.getApprovalFieldWrapperUse)(containerUse);
|
|
2144
|
+
if (approvalWrapperUse) {
|
|
2145
|
+
return approvalWrapperUse;
|
|
2146
|
+
}
|
|
1911
2147
|
switch (normalizeFieldContainerUse(containerUse)) {
|
|
1912
2148
|
case "form":
|
|
1913
2149
|
return "FormItemModel";
|
|
@@ -2045,6 +2281,64 @@ function getAllowedFieldUseSet(containerUse, enabledPackages) {
|
|
|
2045
2281
|
return null;
|
|
2046
2282
|
}
|
|
2047
2283
|
}
|
|
2284
|
+
function canUseNestedApprovalAssociationFieldComponent(input) {
|
|
2285
|
+
var _a;
|
|
2286
|
+
const getCollection = input.getCollection || (() => null);
|
|
2287
|
+
const targetCollection = (0, import_service_helpers.resolveFieldTargetCollection)(input.field, input.dataSourceKey || "main", getCollection);
|
|
2288
|
+
if (!targetCollection) {
|
|
2289
|
+
return true;
|
|
2290
|
+
}
|
|
2291
|
+
return ((targetCollection == null ? void 0 : targetCollection.template) || ((_a = targetCollection == null ? void 0 : targetCollection.options) == null ? void 0 : _a.template)) !== "file";
|
|
2292
|
+
}
|
|
2293
|
+
function getSupportedFieldComponentUseSet(input) {
|
|
2294
|
+
const baseAllowedFieldUses = getAllowedFieldUseSet(input.containerUse, input.enabledPackages);
|
|
2295
|
+
const fieldInterface = String((0, import_service_helpers.getFieldInterface)(input.field) || "").trim();
|
|
2296
|
+
if (!baseAllowedFieldUses || !fieldInterface) {
|
|
2297
|
+
return baseAllowedFieldUses;
|
|
2298
|
+
}
|
|
2299
|
+
const wrapperUse = (0, import_approval.getApprovalFieldWrapperUse)(input.containerUse) || String(input.containerUse || "").trim();
|
|
2300
|
+
const inferredFieldUse = inferFieldUseByContainer(input.containerUse, input.field, {
|
|
2301
|
+
enabledPackages: input.enabledPackages,
|
|
2302
|
+
dataSourceKey: input.dataSourceKey,
|
|
2303
|
+
getCollection: input.getCollection
|
|
2304
|
+
});
|
|
2305
|
+
if (wrapperUse === "PatternFormItemModel") {
|
|
2306
|
+
if (SINGLE_VALUE_ASSOCIATION_INTERFACES.has(fieldInterface)) {
|
|
2307
|
+
return new Set(
|
|
2308
|
+
[
|
|
2309
|
+
"RecordSelectFieldModel",
|
|
2310
|
+
"RecordPickerFieldModel",
|
|
2311
|
+
canUseNestedApprovalAssociationFieldComponent(input) ? "SubFormFieldModel" : void 0,
|
|
2312
|
+
inferredFieldUse
|
|
2313
|
+
].filter(Boolean)
|
|
2314
|
+
);
|
|
2315
|
+
}
|
|
2316
|
+
if (import_field_semantics.MULTI_VALUE_ASSOCIATION_INTERFACES.has(fieldInterface)) {
|
|
2317
|
+
return new Set(
|
|
2318
|
+
[
|
|
2319
|
+
"RecordSelectFieldModel",
|
|
2320
|
+
"RecordPickerFieldModel",
|
|
2321
|
+
canUseNestedApprovalAssociationFieldComponent(input) ? "SubFormListFieldModel" : void 0,
|
|
2322
|
+
canUseNestedApprovalAssociationFieldComponent(input) ? "PatternSubTableFieldModel" : void 0,
|
|
2323
|
+
inferredFieldUse
|
|
2324
|
+
].filter(Boolean)
|
|
2325
|
+
);
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
if (APPROVAL_DETAILS_FIELD_COMPONENT_WRAPPER_USE_SET.has(wrapperUse)) {
|
|
2329
|
+
if (SINGLE_VALUE_ASSOCIATION_INTERFACES.has(fieldInterface)) {
|
|
2330
|
+
return new Set(["DisplayTextFieldModel", "DisplaySubItemFieldModel", inferredFieldUse].filter(Boolean));
|
|
2331
|
+
}
|
|
2332
|
+
if (import_field_semantics.MULTI_VALUE_ASSOCIATION_INTERFACES.has(fieldInterface)) {
|
|
2333
|
+
return new Set(
|
|
2334
|
+
["DisplayTextFieldModel", "DisplaySubListFieldModel", "DisplaySubTableFieldModel", inferredFieldUse].filter(
|
|
2335
|
+
Boolean
|
|
2336
|
+
)
|
|
2337
|
+
);
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
return baseAllowedFieldUses;
|
|
2341
|
+
}
|
|
2048
2342
|
function inferFieldUseByContainer(containerUse, field, options = {}) {
|
|
2049
2343
|
var _a;
|
|
2050
2344
|
const fieldInterface = (field == null ? void 0 : field.interface) || ((_a = field == null ? void 0 : field.options) == null ? void 0 : _a.interface);
|
|
@@ -2245,10 +2539,12 @@ const COLLECTION_RESOURCE_REQUIRED = /* @__PURE__ */ new Set([
|
|
|
2245
2539
|
"ListBlockModel",
|
|
2246
2540
|
"GridCardBlockModel",
|
|
2247
2541
|
"MapBlockModel",
|
|
2248
|
-
"CommentsBlockModel"
|
|
2542
|
+
"CommentsBlockModel",
|
|
2543
|
+
...import_approval.APPROVAL_FORM_BLOCK_USES,
|
|
2544
|
+
...import_approval.APPROVAL_DETAILS_BLOCK_USES
|
|
2249
2545
|
]);
|
|
2250
2546
|
const PUBLIC_BLOCK_SUPPORT_MATRIX = import_support_matrix.FLOW_SURFACE_BLOCK_SUPPORT_MATRIX.filter((entry) => entry.topLevelAddable);
|
|
2251
|
-
const
|
|
2547
|
+
const baseBlockCatalog = PUBLIC_BLOCK_SUPPORT_MATRIX.map(
|
|
2252
2548
|
(entry) => makeCatalogItem({
|
|
2253
2549
|
key: entry.key,
|
|
2254
2550
|
label: entry.label,
|
|
@@ -2258,6 +2554,52 @@ const blockCatalog = PUBLIC_BLOCK_SUPPORT_MATRIX.map(
|
|
|
2258
2554
|
createSupported: entry.createSupported
|
|
2259
2555
|
})
|
|
2260
2556
|
);
|
|
2557
|
+
const approvalBlockCatalog = import_approval.APPROVAL_BLOCK_CATALOG_SPECS.map(
|
|
2558
|
+
(entry) => makeCatalogItem({
|
|
2559
|
+
key: entry.key,
|
|
2560
|
+
label: entry.label,
|
|
2561
|
+
kind: "block",
|
|
2562
|
+
use: entry.use,
|
|
2563
|
+
requiredInitParams: entry.requiredInitParams,
|
|
2564
|
+
allowedContainerUses: entry.allowedContainerUses,
|
|
2565
|
+
createSupported: entry.createSupported
|
|
2566
|
+
})
|
|
2567
|
+
);
|
|
2568
|
+
const blockCatalog = [...baseBlockCatalog, ...approvalBlockCatalog];
|
|
2569
|
+
const APPROVAL_PAGE_LIKE_BLOCK_CONTAINER_USE_SET = /* @__PURE__ */ new Set([...import_approval.APPROVAL_BLOCK_GRID_USES]);
|
|
2570
|
+
const APPROVAL_PAGE_LIKE_GENERIC_BLOCK_KEY_SET = /* @__PURE__ */ new Set(["markdown", "jsBlock"]);
|
|
2571
|
+
const APPROVAL_EXCLUSIVE_BLOCK_CONTAINER_USE_SET = /* @__PURE__ */ new Set([...import_approval.APPROVAL_TASK_CARD_GRID_USES]);
|
|
2572
|
+
function isApprovalPageLikeBlockContainerUse(containerUse) {
|
|
2573
|
+
return APPROVAL_PAGE_LIKE_BLOCK_CONTAINER_USE_SET.has(String(containerUse || "").trim());
|
|
2574
|
+
}
|
|
2575
|
+
function isApprovalExclusiveBlockContainerUse(containerUse) {
|
|
2576
|
+
return APPROVAL_EXCLUSIVE_BLOCK_CONTAINER_USE_SET.has(String(containerUse || "").trim());
|
|
2577
|
+
}
|
|
2578
|
+
function isBlockAllowedInContainer(item, containerUse) {
|
|
2579
|
+
var _a, _b, _c;
|
|
2580
|
+
const normalizedContainerUse = String(containerUse || "").trim();
|
|
2581
|
+
if (isApprovalExclusiveBlockContainerUse(normalizedContainerUse) && !((_a = item.allowedContainerUses) == null ? void 0 : _a.length)) {
|
|
2582
|
+
return false;
|
|
2583
|
+
}
|
|
2584
|
+
if (isApprovalPageLikeBlockContainerUse(normalizedContainerUse)) {
|
|
2585
|
+
if (!((_b = item.allowedContainerUses) == null ? void 0 : _b.length)) {
|
|
2586
|
+
return APPROVAL_PAGE_LIKE_GENERIC_BLOCK_KEY_SET.has(item.key);
|
|
2587
|
+
}
|
|
2588
|
+
return item.allowedContainerUses.includes(normalizedContainerUse);
|
|
2589
|
+
}
|
|
2590
|
+
if (!((_c = item.allowedContainerUses) == null ? void 0 : _c.length)) {
|
|
2591
|
+
return true;
|
|
2592
|
+
}
|
|
2593
|
+
if (!normalizedContainerUse) {
|
|
2594
|
+
return false;
|
|
2595
|
+
}
|
|
2596
|
+
return item.allowedContainerUses.includes(normalizedContainerUse);
|
|
2597
|
+
}
|
|
2598
|
+
function getAvailableBlockCatalogItems(containerUse, enabledPackages) {
|
|
2599
|
+
return filterAvailableCatalogItems(blockCatalog, enabledPackages).filter(
|
|
2600
|
+
(item) => isBlockAllowedInContainer(item, containerUse)
|
|
2601
|
+
);
|
|
2602
|
+
}
|
|
2261
2603
|
const actionRegistry = [
|
|
2262
2604
|
{
|
|
2263
2605
|
publicKey: "filter",
|
|
@@ -2638,7 +2980,17 @@ const actionRegistry = [
|
|
|
2638
2980
|
ownerPlugin: "@nocobase/plugin-workflow-custom-action-trigger",
|
|
2639
2981
|
allowedContainerUses: import_action_scope.ACTION_PANEL_ACTION_CONTAINER_USES,
|
|
2640
2982
|
createSupported: true
|
|
2641
|
-
}
|
|
2983
|
+
},
|
|
2984
|
+
...import_approval.APPROVAL_ACTION_CATALOG_SPECS.map((item) => ({
|
|
2985
|
+
publicKey: item.publicKey,
|
|
2986
|
+
label: item.label,
|
|
2987
|
+
scope: item.scope,
|
|
2988
|
+
scene: item.scene,
|
|
2989
|
+
use: item.use,
|
|
2990
|
+
ownerPlugin: import_approval.APPROVAL_FLOW_SURFACE_OWNER_PLUGIN,
|
|
2991
|
+
allowedContainerUses: item.allowedContainerUses,
|
|
2992
|
+
createSupported: item.createSupported
|
|
2993
|
+
}))
|
|
2642
2994
|
];
|
|
2643
2995
|
const FLOW_SURFACE_ACTION_OWNER_PLUGIN_BY_USE = actionRegistry.reduce((map, item) => {
|
|
2644
2996
|
if (!map.has(item.use)) {
|
|
@@ -2703,10 +3055,10 @@ const BLOCK_KEY_BY_USE = new Map(import_support_matrix.FLOW_SURFACE_BLOCK_SUPPOR
|
|
|
2703
3055
|
const ACTION_KEY_BY_USE = new Map(actionCatalog.map((item) => [item.use, toPublicActionCatalogItem(item).key]));
|
|
2704
3056
|
function getCatalogItemOwnerPlugin(item) {
|
|
2705
3057
|
if (item.kind === "block") {
|
|
2706
|
-
return FLOW_SURFACE_BLOCK_OWNER_PLUGIN_BY_USE.get(item.use);
|
|
3058
|
+
return import_approval.APPROVAL_BLOCK_OWNER_PLUGIN_BY_USE.get(item.use) || FLOW_SURFACE_BLOCK_OWNER_PLUGIN_BY_USE.get(item.use);
|
|
2707
3059
|
}
|
|
2708
3060
|
if (item.kind === "action") {
|
|
2709
|
-
return FLOW_SURFACE_ACTION_OWNER_PLUGIN_BY_USE.get(item.use);
|
|
3061
|
+
return import_approval.APPROVAL_ACTION_OWNER_PLUGIN_BY_USE.get(item.use) || FLOW_SURFACE_ACTION_OWNER_PLUGIN_BY_USE.get(item.use);
|
|
2710
3062
|
}
|
|
2711
3063
|
return void 0;
|
|
2712
3064
|
}
|
|
@@ -2749,6 +3101,11 @@ function resolveSupportedBlockCatalogItem(input, options = {}) {
|
|
|
2749
3101
|
requestedUse: input.use
|
|
2750
3102
|
});
|
|
2751
3103
|
}
|
|
3104
|
+
if (!options.skipContainerValidation && !isBlockAllowedInContainer(item, input.containerUse)) {
|
|
3105
|
+
throw new import_errors.FlowSurfaceBadRequestError(
|
|
3106
|
+
`flowSurfaces addBlock '${input.type || input.use || item.key}' is not allowed under '${input.containerUse || "unknown"}'`
|
|
3107
|
+
);
|
|
3108
|
+
}
|
|
2752
3109
|
if (options.requireCreateSupported && item.createSupported === false) {
|
|
2753
3110
|
throw new import_errors.FlowSurfaceBadRequestError(`flowSurfaces addBlock does not support creating '${item.key}' yet`);
|
|
2754
3111
|
}
|
|
@@ -2853,7 +3210,7 @@ function resolveSupportedActionCatalogItem(input, options = {}) {
|
|
|
2853
3210
|
}
|
|
2854
3211
|
function getNodeContract(use) {
|
|
2855
3212
|
if (use) {
|
|
2856
|
-
const contract = nodeContracts.get(use);
|
|
3213
|
+
const contract = nodeContracts.get(use) || nodeContracts.get((0, import_approval.normalizeApprovalSemanticUse)(use));
|
|
2857
3214
|
if (contract) {
|
|
2858
3215
|
return contract;
|
|
2859
3216
|
}
|
|
@@ -2884,10 +3241,12 @@ function getLayoutCapabilitiesForUse(use) {
|
|
|
2884
3241
|
blockCatalog,
|
|
2885
3242
|
filterAvailableCatalogItems,
|
|
2886
3243
|
getAvailableActionCatalogItems,
|
|
3244
|
+
getAvailableBlockCatalogItems,
|
|
2887
3245
|
getEditableDomainsForUse,
|
|
2888
3246
|
getLayoutCapabilitiesForUse,
|
|
2889
3247
|
getNodeContract,
|
|
2890
3248
|
getSettingsSchemaForUse,
|
|
3249
|
+
getSupportedFieldComponentUseSet,
|
|
2891
3250
|
isCatalogItemAvailable,
|
|
2892
3251
|
resolveSupportedActionCatalogItem,
|
|
2893
3252
|
resolveSupportedBlockCatalogItem,
|
|
@@ -99,7 +99,7 @@ export declare function getChartBuilderResourceInit(configure: any): {
|
|
|
99
99
|
};
|
|
100
100
|
export declare function getChartBuilderQueryOutputs(configure: any): ChartBuilderQueryOutput[];
|
|
101
101
|
export declare function getChartBuilderQueryAliases(configure: any): string[];
|
|
102
|
-
export declare function getChartSupportedVisualTypes(): ("
|
|
102
|
+
export declare function getChartSupportedVisualTypes(): ("bar" | "line" | "area" | "barHorizontal" | "pie" | "doughnut" | "funnel" | "scatter")[];
|
|
103
103
|
export declare function getChartSupportedMappingsByType(): {
|
|
104
104
|
[k: string]: {
|
|
105
105
|
allowed: string[];
|
|
@@ -25,6 +25,7 @@ export type FlowSurfaceComposeNormalizedFieldSpec = {
|
|
|
25
25
|
target?: string | Record<string, unknown>;
|
|
26
26
|
settings?: FlowSurfaceComposeObject;
|
|
27
27
|
popup?: FlowSurfaceComposeObject;
|
|
28
|
+
__autoPopupForRelationField?: boolean;
|
|
28
29
|
};
|
|
29
30
|
export type FlowSurfaceComposeNormalizedActionSpec = {
|
|
30
31
|
key: string;
|
|
@@ -122,7 +122,8 @@ function buildComposeFieldCreatePayload(fieldSpec) {
|
|
|
122
122
|
...fieldSpec.associationPathName ? { associationPathName: fieldSpec.associationPathName } : {},
|
|
123
123
|
...fieldSpec.renderer ? { renderer: fieldSpec.renderer } : {},
|
|
124
124
|
...fieldSpec.type ? { type: fieldSpec.type } : {},
|
|
125
|
-
...fieldSpec.popup ? { popup: fieldSpec.popup } : {}
|
|
125
|
+
...fieldSpec.popup ? { popup: fieldSpec.popup } : {},
|
|
126
|
+
...fieldSpec.__autoPopupForRelationField ? { __autoPopupForRelationField: true } : {}
|
|
126
127
|
};
|
|
127
128
|
}
|
|
128
129
|
function buildComposeActionCreatePayload(actionSpec) {
|
|
@@ -33,6 +33,7 @@ __export(configure_options_exports, {
|
|
|
33
33
|
getConfigureOptionsForUse: () => getConfigureOptionsForUse
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(configure_options_exports);
|
|
36
|
+
var import_approval = require("./approval");
|
|
36
37
|
const stringOption = (description, extra = {}) => ({
|
|
37
38
|
type: "string",
|
|
38
39
|
...description ? { description } : {},
|
|
@@ -452,6 +453,22 @@ const ACTION_JS_OPTIONS = {
|
|
|
452
453
|
code: JS_CODE,
|
|
453
454
|
version: JS_VERSION
|
|
454
455
|
};
|
|
456
|
+
const APPROVAL_RETURN_ACTION_OPTIONS = {
|
|
457
|
+
approvalReturn: objectOption("Approval return-node settings", {
|
|
458
|
+
example: {
|
|
459
|
+
type: "specific",
|
|
460
|
+
target: "approval-node-key"
|
|
461
|
+
}
|
|
462
|
+
})
|
|
463
|
+
};
|
|
464
|
+
const APPROVAL_REASSIGN_ACTION_OPTIONS = {
|
|
465
|
+
assigneesScope: objectOption("Approval reassignee scope", {
|
|
466
|
+
example: {
|
|
467
|
+
assignees: [1, "{{$context.user.id}}"],
|
|
468
|
+
extraFieldKey: "departmentId"
|
|
469
|
+
}
|
|
470
|
+
})
|
|
471
|
+
};
|
|
455
472
|
const ACTION_EDIT_MODE_OPTIONS = {
|
|
456
473
|
editMode: stringOption("Bulk edit mode", { example: "drawer" })
|
|
457
474
|
};
|
|
@@ -473,11 +490,16 @@ const GLOBAL_FLOW_CONTEXT_OPTION_KEYS = /* @__PURE__ */ new Set([
|
|
|
473
490
|
"defaultValues",
|
|
474
491
|
"initialValue",
|
|
475
492
|
"linkageRules",
|
|
476
|
-
"assignValues"
|
|
493
|
+
"assignValues",
|
|
494
|
+
"assigneesScope"
|
|
477
495
|
]);
|
|
478
496
|
const FLOW_CONTEXT_OPTION_KEYS_BY_USE = {
|
|
479
497
|
RootPageModel: ["documentTitle"],
|
|
480
|
-
RootPageTabModel: ["documentTitle"]
|
|
498
|
+
RootPageTabModel: ["documentTitle"],
|
|
499
|
+
TriggerChildPageModel: ["documentTitle"],
|
|
500
|
+
ApprovalChildPageModel: ["documentTitle"],
|
|
501
|
+
TriggerChildPageTabModel: ["documentTitle"],
|
|
502
|
+
ApprovalChildPageTabModel: ["documentTitle"]
|
|
481
503
|
};
|
|
482
504
|
function cloneOptions(options) {
|
|
483
505
|
return Object.fromEntries(Object.entries(options).map(([key, value]) => [key, { ...value }]));
|
|
@@ -547,6 +569,11 @@ function getActionConfigureOptionsByUse(use) {
|
|
|
547
569
|
case "ExportActionModel":
|
|
548
570
|
case "ExportAttachmentActionModel":
|
|
549
571
|
case "ImportActionModel":
|
|
572
|
+
case "ApplyFormSubmitModel":
|
|
573
|
+
case "ApplyFormSaveDraftModel":
|
|
574
|
+
case "ApplyFormWithdrawModel":
|
|
575
|
+
case "ProcessFormApproveModel":
|
|
576
|
+
case "ProcessFormRejectModel":
|
|
550
577
|
case "TemplatePrintCollectionActionModel":
|
|
551
578
|
case "TemplatePrintRecordActionModel":
|
|
552
579
|
case "CollectionTriggerWorkflowActionModel":
|
|
@@ -559,14 +586,45 @@ function getActionConfigureOptionsByUse(use) {
|
|
|
559
586
|
case "FilterFormSubmitActionModel":
|
|
560
587
|
case "FilterFormResetActionModel":
|
|
561
588
|
return merged(ACTION_LINKAGE_OPTIONS);
|
|
589
|
+
case "ProcessFormReturnModel":
|
|
590
|
+
return merged(ACTION_LINKAGE_OPTIONS, APPROVAL_RETURN_ACTION_OPTIONS);
|
|
591
|
+
case "ProcessFormDelegateModel":
|
|
592
|
+
case "ProcessFormAddAssigneeModel":
|
|
593
|
+
return merged(ACTION_LINKAGE_OPTIONS, APPROVAL_REASSIGN_ACTION_OPTIONS);
|
|
562
594
|
default:
|
|
563
595
|
return {};
|
|
564
596
|
}
|
|
565
597
|
}
|
|
566
598
|
function getConfigureOptionsForUse(use) {
|
|
567
599
|
const normalized = String(use || "").trim();
|
|
600
|
+
const semanticUse = (0, import_approval.normalizeApprovalSemanticUse)(normalized);
|
|
568
601
|
let options;
|
|
569
602
|
switch (normalized) {
|
|
603
|
+
case "TriggerChildPageModel":
|
|
604
|
+
case "ApprovalChildPageModel":
|
|
605
|
+
options = cloneOptions(PAGE_OPTIONS);
|
|
606
|
+
break;
|
|
607
|
+
case "TriggerChildPageTabModel":
|
|
608
|
+
case "ApprovalChildPageTabModel":
|
|
609
|
+
options = cloneOptions(TAB_OPTIONS);
|
|
610
|
+
break;
|
|
611
|
+
case "ApplyFormModel":
|
|
612
|
+
case "ProcessFormModel":
|
|
613
|
+
options = cloneOptions(FORM_COMMON_OPTIONS);
|
|
614
|
+
break;
|
|
615
|
+
case "ApprovalDetailsModel":
|
|
616
|
+
case "ApplyTaskCardDetailsModel":
|
|
617
|
+
case "ApprovalTaskCardDetailsModel":
|
|
618
|
+
options = cloneOptions(DETAILS_OPTIONS);
|
|
619
|
+
break;
|
|
620
|
+
case "PatternFormItemModel":
|
|
621
|
+
options = cloneOptions(FORM_FIELD_WRAPPER_OPTIONS);
|
|
622
|
+
break;
|
|
623
|
+
case "ApprovalDetailsItemModel":
|
|
624
|
+
case "ApplyTaskCardDetailsItemModel":
|
|
625
|
+
case "ApprovalTaskCardDetailsItemModel":
|
|
626
|
+
options = cloneOptions(DETAILS_FIELD_WRAPPER_OPTIONS);
|
|
627
|
+
break;
|
|
570
628
|
case "RootPageModel":
|
|
571
629
|
options = cloneOptions(PAGE_OPTIONS);
|
|
572
630
|
break;
|
|
@@ -640,7 +698,7 @@ function getConfigureOptionsForUse(use) {
|
|
|
640
698
|
options = cloneOptions(JS_ITEM_OPTIONS);
|
|
641
699
|
break;
|
|
642
700
|
default:
|
|
643
|
-
if (isGenericFieldNodeUse(normalized)) {
|
|
701
|
+
if (isGenericFieldNodeUse(normalized) || isGenericFieldNodeUse(semanticUse)) {
|
|
644
702
|
options = cloneOptions(FIELD_NODE_OPTIONS);
|
|
645
703
|
break;
|
|
646
704
|
}
|