@kontur.candy/generator 4.245.0-nightly.733j0 → 4.245.0
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/index.js +38 -67
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -127902,8 +127902,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
127902
127902
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
127903
127903
|
/* harmony import */ var _markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
127904
127904
|
/* harmony import */ var _markupGenerator_ElementProcessors_FormParts_Page_PageNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../markupGenerator/ElementProcessors/FormParts/Page/PageNode */ "./Generator/src/generators/markupGenerator/ElementProcessors/FormParts/Page/PageNode.ts");
|
|
127905
|
-
/* harmony import */ var _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/SchemaRng/FormSchemaRng */ "./Generator/src/common/SchemaRng/FormSchemaRng.ts");
|
|
127906
|
-
|
|
127907
127905
|
|
|
127908
127906
|
|
|
127909
127907
|
|
|
@@ -127923,10 +127921,8 @@ var RequisiteSectionMode;
|
|
|
127923
127921
|
|
|
127924
127922
|
const emptyDataDeclarationCollection = {};
|
|
127925
127923
|
class DataDeclarationGenerationContext {
|
|
127926
|
-
constructor(initSequenceFactory, controlCustomizationContext, typesRegistry
|
|
127924
|
+
constructor(initSequenceFactory, controlCustomizationContext, typesRegistry) {
|
|
127927
127925
|
this.initSequenceFactory = void 0;
|
|
127928
|
-
this.formSchemaRng = void 0;
|
|
127929
|
-
this.schemeValidations = void 0;
|
|
127930
127926
|
this.controlCustomizationContext = void 0;
|
|
127931
127927
|
this.typesRegistry = void 0;
|
|
127932
127928
|
|
|
@@ -127956,29 +127952,11 @@ class DataDeclarationGenerationContext {
|
|
|
127956
127952
|
return undefined;
|
|
127957
127953
|
};
|
|
127958
127954
|
|
|
127959
|
-
this.formSchemaRng = formSchemaRng;
|
|
127960
|
-
this.schemeValidations = schemeValidations;
|
|
127961
127955
|
this.initSequenceFactory = initSequenceFactory;
|
|
127962
127956
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
127963
127957
|
this.typesRegistry = typesRegistry;
|
|
127964
127958
|
}
|
|
127965
127959
|
|
|
127966
|
-
isMultipleNodeOptionalFromScheme(path) {
|
|
127967
|
-
if (!this.schemeValidations) {
|
|
127968
|
-
return undefined;
|
|
127969
|
-
}
|
|
127970
|
-
|
|
127971
|
-
const schemaNode = this.formSchemaRng.getElementByPath(path);
|
|
127972
|
-
|
|
127973
|
-
if (schemaNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__.FormSchemaRngElement) {
|
|
127974
|
-
var _schemaNode$optional;
|
|
127975
|
-
|
|
127976
|
-
return (_schemaNode$optional = schemaNode.optional) !== null && _schemaNode$optional !== void 0 ? _schemaNode$optional : false;
|
|
127977
|
-
}
|
|
127978
|
-
|
|
127979
|
-
return undefined;
|
|
127980
|
-
}
|
|
127981
|
-
|
|
127982
127960
|
getTypeNode(node) {
|
|
127983
127961
|
if (node.anonymousType != undefined) {
|
|
127984
127962
|
return node.anonymousType;
|
|
@@ -128287,15 +128265,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
128287
128265
|
|
|
128288
128266
|
|
|
128289
128267
|
class DataDeclarationGenerator {
|
|
128290
|
-
constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry
|
|
128268
|
+
constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry) {
|
|
128291
128269
|
this.sugarRoot = void 0;
|
|
128292
128270
|
this.initSequenceFactory = void 0;
|
|
128293
|
-
this.formSchemaRng = void 0;
|
|
128294
|
-
this.schemeValidations = void 0;
|
|
128295
128271
|
this.controlCustomizationContext = void 0;
|
|
128296
128272
|
this.typesRegistry = void 0;
|
|
128297
|
-
this.formSchemaRng = formSchemaRng;
|
|
128298
|
-
this.schemeValidations = schemeValidations;
|
|
128299
128273
|
this.sugarRoot = sugarRoot;
|
|
128300
128274
|
this.initSequenceFactory = initSequenceFactory;
|
|
128301
128275
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -128307,7 +128281,7 @@ class DataDeclarationGenerator {
|
|
|
128307
128281
|
|
|
128308
128282
|
const converterClass = (_getConverterByNodeCl = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_4__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.getNodeClass)(this.sugarRoot))) !== null && _getConverterByNodeCl !== void 0 ? _getConverterByNodeCl : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
|
|
128309
128283
|
const converter = new converterClass(this.sugarRoot);
|
|
128310
|
-
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry
|
|
128284
|
+
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
|
|
128311
128285
|
const dataDeclaration = converter.buildDataDeclaration(context);
|
|
128312
128286
|
const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
|
|
128313
128287
|
const result = this.replaceHolder(`
|
|
@@ -128341,7 +128315,7 @@ class DataDeclarationGenerator {
|
|
|
128341
128315
|
|
|
128342
128316
|
const converterClass = (_getConverterByNodeCl2 = (0,_markupGenerator_AllConverters__WEBPACK_IMPORTED_MODULE_4__.getConverterByNodeClass)((0,_markupGenerator_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.getNodeClass)(this.sugarRoot))) !== null && _getConverterByNodeCl2 !== void 0 ? _getConverterByNodeCl2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_5__.reject)();
|
|
128343
128317
|
const converter = new converterClass(this.sugarRoot);
|
|
128344
|
-
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry
|
|
128318
|
+
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
|
|
128345
128319
|
const dataDeclaration = converter.buildDataDeclaration(context);
|
|
128346
128320
|
const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
|
|
128347
128321
|
return `
|
|
@@ -129438,7 +129412,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129438
129412
|
|
|
129439
129413
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
129440
129414
|
try {
|
|
129441
|
-
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2,
|
|
129415
|
+
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$schemaVali3, _additionalContent$fo, _additionalContent$fo2;
|
|
129442
129416
|
|
|
129443
129417
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
129444
129418
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_12__.createDefaultSugarSerializer)();
|
|
@@ -129453,17 +129427,17 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
129453
129427
|
const fetchFunctions = new _common_FetchFunctions__WEBPACK_IMPORTED_MODULE_2__.FetchFunctions(referencedFetchFunctions); // tslint:disable-next-line no-unsafe-any
|
|
129454
129428
|
|
|
129455
129429
|
const additionalSettings = JSON.parse(additionalContent.additionalSettings || "{}");
|
|
129456
|
-
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry
|
|
129430
|
+
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry);
|
|
129457
129431
|
const {
|
|
129458
129432
|
dataDeclarationContent,
|
|
129459
129433
|
dataDeclaration
|
|
129460
129434
|
} = dataDeclarationGenerator.generate();
|
|
129461
129435
|
const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_25__.DataDeclarationGenerationTimeHelper(dataDeclaration);
|
|
129462
|
-
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$
|
|
129463
|
-
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$
|
|
129436
|
+
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : false, additionalContent.validationsContent);
|
|
129437
|
+
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$schemaVali2 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali2 !== void 0 ? _sugarRoot$schemaVali2 : false, controlCustomizationContext);
|
|
129464
129438
|
const resourcesHash = (_generationOptions$re = generationOptions === null || generationOptions === void 0 ? void 0 : generationOptions.resourcesHash) !== null && _generationOptions$re !== void 0 ? _generationOptions$re : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_0__.reject)("Current generator version requires resources hash");
|
|
129465
129439
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_20__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
129466
|
-
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$
|
|
129440
|
+
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false);
|
|
129467
129441
|
markupGenerator.generate(sugarRoot, builder);
|
|
129468
129442
|
builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_8__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings));
|
|
129469
129443
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_23__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
@@ -136535,7 +136509,7 @@ class UserPicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
136535
136509
|
type: "Expression",
|
|
136536
136510
|
expression: validationGenerator.generateValidationsFactory()
|
|
136537
136511
|
});
|
|
136538
|
-
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationGenerator((_findSugarNodeBases$2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$2 !== void 0 ? _findSugarNodeBases$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory(_common_FetchFunctions__WEBPACK_IMPORTED_MODULE_12__.FetchFunctions.empty()), context.controlCustomizationContext, context.typesRegistry
|
|
136512
|
+
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_10__.DataDeclarationGenerator((_findSugarNodeBases$2 = (0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_1__.findSugarNodeBases)(node.editor)[0]) !== null && _findSugarNodeBases$2 !== void 0 ? _findSugarNodeBases$2 : (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_8__.reject)(), new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_11__.DataDeclarationInitSourceSequenceFactory(_common_FetchFunctions__WEBPACK_IMPORTED_MODULE_12__.FetchFunctions.empty()), context.controlCustomizationContext, context.typesRegistry);
|
|
136539
136513
|
userPicklistDeclarationBuilder.prop(x => x.editorDataDeclaration).set({
|
|
136540
136514
|
type: "Expression",
|
|
136541
136515
|
expression: dataDeclarationGenerator.generateDataDeclarationFactory()
|
|
@@ -141363,10 +141337,10 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
141363
141337
|
}
|
|
141364
141338
|
|
|
141365
141339
|
if (rowNode instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.MultilineNode) {
|
|
141366
|
-
var
|
|
141340
|
+
var _rowNode$optional2;
|
|
141367
141341
|
|
|
141368
141342
|
this.ensurePathExists(rowNode, rowNode.dataScope.path);
|
|
141369
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((
|
|
141343
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_rowNode$optional2 = rowNode.optional) !== null && _rowNode$optional2 !== void 0 ? _rowNode$optional2 : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
|
|
141370
141344
|
optional: rowNode.optional
|
|
141371
141345
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => {
|
|
141372
141346
|
if (rowNode2 instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.CrossfitTableRowNode) {
|
|
@@ -143288,10 +143262,10 @@ class MultilineFieldConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
143288
143262
|
}
|
|
143289
143263
|
|
|
143290
143264
|
doBuildDataDeclaration(context) {
|
|
143291
|
-
var
|
|
143265
|
+
var _node$optional;
|
|
143292
143266
|
|
|
143293
143267
|
const node = this.getCurrentNodeAs(_MultilineFieldNode__WEBPACK_IMPORTED_MODULE_3__.MultilineFieldNode);
|
|
143294
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
143268
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addSpecialFieldsEntry(node, {
|
|
143295
143269
|
optional: node.optional
|
|
143296
143270
|
}), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
|
|
143297
143271
|
}
|
|
@@ -143457,10 +143431,10 @@ class MultipleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__
|
|
|
143457
143431
|
}
|
|
143458
143432
|
|
|
143459
143433
|
doBuildDataDeclaration(context) {
|
|
143460
|
-
var
|
|
143434
|
+
var _node$optional;
|
|
143461
143435
|
|
|
143462
143436
|
const node = this.getCurrentNodeAs(_MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode);
|
|
143463
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
143437
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addSpecialFieldsEntry(node, {
|
|
143464
143438
|
optional: node.optional
|
|
143465
143439
|
}), context.addPathSectionDeclarationEntry(node));
|
|
143466
143440
|
}
|
|
@@ -144640,9 +144614,9 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
144640
144614
|
|
|
144641
144615
|
processMultilineNode(context, rowNode) {
|
|
144642
144616
|
if (rowNode instanceof _StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.StickyTableMultilineNode) {
|
|
144643
|
-
var
|
|
144617
|
+
var _rowNode$optional;
|
|
144644
144618
|
|
|
144645
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((
|
|
144619
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_rowNode$optional = rowNode.optional) !== null && _rowNode$optional !== void 0 ? _rowNode$optional : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
|
|
144646
144620
|
optional: rowNode.optional
|
|
144647
144621
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => this.processMultilineRowNode(context, rowNode2)));
|
|
144648
144622
|
}
|
|
@@ -144715,11 +144689,11 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
144715
144689
|
const sideSize = (_node$side2 = node.side) !== null && _node$side2 !== void 0 ? _node$side2 : 0;
|
|
144716
144690
|
|
|
144717
144691
|
if (this.isSimpleForm()) {
|
|
144718
|
-
var
|
|
144692
|
+
var _ref, _node$deprecatedDiado;
|
|
144719
144693
|
|
|
144720
144694
|
mb.prop(x => x.maxWidth).set(orientation === "landscape" ? maxWidth : undefined);
|
|
144721
144695
|
mb.prop(x => x.sideSize).set(this.hasActionButton(node) && sideSize !== 0 ? sideSize + 1 : sideSize);
|
|
144722
|
-
const width = (
|
|
144696
|
+
const width = (_ref = (_node$deprecatedDiado = node.deprecatedDiadocWidth) !== null && _node$deprecatedDiado !== void 0 ? _node$deprecatedDiado : node.width) !== null && _ref !== void 0 ? _ref : maxWidthSimpleForm;
|
|
144723
144697
|
mb.prop(x => x.width).set(width);
|
|
144724
144698
|
mb.prop(x => x.footerHeight).set(160);
|
|
144725
144699
|
} else {
|
|
@@ -145002,10 +144976,10 @@ BindingPath: ${errorPath}`));
|
|
|
145002
144976
|
if (this.isSimpleForm()) {
|
|
145003
144977
|
mb.prop(x => x.buttonType).set(undefined);
|
|
145004
144978
|
} else {
|
|
145005
|
-
var _multiline$rowmenu,
|
|
144979
|
+
var _multiline$rowmenu, _ref2, _tableNode$removeButt;
|
|
145006
144980
|
|
|
145007
144981
|
const rowMenu = (_multiline$rowmenu = multiline.rowmenu) !== null && _multiline$rowmenu !== void 0 ? _multiline$rowmenu : false;
|
|
145008
|
-
const removebutton = (
|
|
144982
|
+
const removebutton = (_ref2 = (_tableNode$removeButt = tableNode.removeButton) !== null && _tableNode$removeButt !== void 0 ? _tableNode$removeButt : multiline.removebutton) !== null && _ref2 !== void 0 ? _ref2 : true;
|
|
145009
144983
|
mb.prop(x => x.buttonType).set(rowMenu ? "RowMenu" : removebutton ? "RemoveRowButton" : undefined);
|
|
145010
144984
|
}
|
|
145011
144985
|
|
|
@@ -145018,7 +144992,7 @@ BindingPath: ${errorPath}`));
|
|
|
145018
144992
|
}
|
|
145019
144993
|
|
|
145020
144994
|
getMultiline(context, node, multiline, start, end = Infinity) {
|
|
145021
|
-
var
|
|
144995
|
+
var _ref3, _node$removeButton, _multiline$rowmenu2, _ref4, _node$removeButton2, _context$popPathsCont2;
|
|
145022
144996
|
|
|
145023
144997
|
const overrideInfo = multiline.override ? context.controlCustomizationContext.getControlCustomizationInfo("multiline", multiline.override) : undefined;
|
|
145024
144998
|
const mb = overrideInfo == undefined ? (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)("MultiLine") : (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_5__.componentMarkupBuilder)(overrideInfo.dependencies, overrideInfo.controlName);
|
|
@@ -145031,7 +145005,7 @@ BindingPath: ${errorPath}`));
|
|
|
145031
145005
|
mb.prop(x => x.isList).set(multiline.usepager === false ? true : undefined);
|
|
145032
145006
|
mb.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_13__.getNewBindingPathExpression)(multiline));
|
|
145033
145007
|
mb.prop(x => x.showRowBorder).set(multiline.showRowBorder);
|
|
145034
|
-
const hasRemoveButton = ((
|
|
145008
|
+
const hasRemoveButton = ((_ref3 = (_node$removeButton = node.removeButton) !== null && _node$removeButton !== void 0 ? _node$removeButton : multiline.removebutton) !== null && _ref3 !== void 0 ? _ref3 : true) || ((_multiline$rowmenu2 = multiline.rowmenu) !== null && _multiline$rowmenu2 !== void 0 ? _multiline$rowmenu2 : false);
|
|
145035
145009
|
const needAddButton = multiline.addbutton !== "false";
|
|
145036
145010
|
|
|
145037
145011
|
if (this.isSimpleForm()) {
|
|
@@ -145044,7 +145018,7 @@ BindingPath: ${errorPath}`));
|
|
|
145044
145018
|
mb.prop(x => x.removeButtonPosition).set(undefined);
|
|
145045
145019
|
}
|
|
145046
145020
|
|
|
145047
|
-
mb.prop(x => x.disableScroll).set(needAddButton || ((
|
|
145021
|
+
mb.prop(x => x.disableScroll).set(needAddButton || ((_ref4 = (_node$removeButton2 = node.removeButton) !== null && _node$removeButton2 !== void 0 ? _node$removeButton2 : multiline.removebutton) !== null && _ref4 !== void 0 ? _ref4 : true) ? undefined : true);
|
|
145048
145022
|
context.pushPathsContext();
|
|
145049
145023
|
|
|
145050
145024
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.arrayHasLength)(multiline.rows, 1)) {
|
|
@@ -145070,9 +145044,9 @@ BindingPath: ${errorPath}`));
|
|
|
145070
145044
|
hasActionButton(node) {
|
|
145071
145045
|
const multilines = node.rows.map(child => (0,_StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.isMultilineNode)(child) ? child : child.columns.find(_StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.isMultilineNode)).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.isNotNullOrUndefined);
|
|
145072
145046
|
return multilines.some(multiline => {
|
|
145073
|
-
var
|
|
145047
|
+
var _ref5, _node$removeButton3;
|
|
145074
145048
|
|
|
145075
|
-
return ((
|
|
145049
|
+
return ((_ref5 = (_node$removeButton3 = node.removeButton) !== null && _node$removeButton3 !== void 0 ? _node$removeButton3 : multiline.removebutton) !== null && _ref5 !== void 0 ? _ref5 : true) || multiline.rowmenu;
|
|
145076
145050
|
});
|
|
145077
145051
|
}
|
|
145078
145052
|
|
|
@@ -145298,10 +145272,10 @@ class Table2MultirowConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
145298
145272
|
}
|
|
145299
145273
|
|
|
145300
145274
|
doBuildDataDeclaration(context) {
|
|
145301
|
-
var
|
|
145275
|
+
var _node$optional;
|
|
145302
145276
|
|
|
145303
145277
|
const node = this.getCurrentNodeAs(_Table2Node__WEBPACK_IMPORTED_MODULE_3__.Table2MultirowNode);
|
|
145304
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
145278
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addPathSectionDeclarationEntry(node));
|
|
145305
145279
|
}
|
|
145306
145280
|
|
|
145307
145281
|
buildChildrenDataDeclaration(context) {
|
|
@@ -146120,10 +146094,10 @@ class TabsConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
|
|
|
146120
146094
|
}
|
|
146121
146095
|
|
|
146122
146096
|
doBuildDataDeclaration(context) {
|
|
146123
|
-
var
|
|
146097
|
+
var _node$optional;
|
|
146124
146098
|
|
|
146125
146099
|
const node = this.getCurrentNodeAs(_TabsNode__WEBPACK_IMPORTED_MODULE_4__.TabsNode);
|
|
146126
|
-
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((
|
|
146100
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false)]]), context.addPathSectionDeclarationEntry(node));
|
|
146127
146101
|
}
|
|
146128
146102
|
|
|
146129
146103
|
buildChildrenDataDeclaration(context) {
|
|
@@ -150558,15 +150532,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
150558
150532
|
|
|
150559
150533
|
|
|
150560
150534
|
function setCurrencyProps(markupBuilder, context, node) {
|
|
150561
|
-
var _typeNode$base, _node$currency;
|
|
150562
|
-
|
|
150563
150535
|
const typeNode = context.getTypeNode(node.validationInfo);
|
|
150564
150536
|
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
150565
|
-
|
|
150566
|
-
|
|
150567
|
-
|
|
150537
|
+
markupBuilder.prop(x => x.currency).set(node.currency);
|
|
150538
|
+
|
|
150539
|
+
if (node.currency) {
|
|
150540
|
+
var _typeNode$base;
|
|
150541
|
+
|
|
150542
|
+
const baseTypeName = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : schemaTypeInfo === null || schemaTypeInfo === void 0 ? void 0 : schemaTypeInfo.baseType;
|
|
150568
150543
|
|
|
150569
|
-
if (currency) {
|
|
150570
150544
|
if (baseTypeName === "decimal") {
|
|
150571
150545
|
var _typeNode$flattenType, _typeNode$flattenType2, _ref, _ref2, _ref3, _ref4, _typeNode$flattenType3, _typeNode$flattenType4, _typeNode$flattenType5, _typeNode$flattenType6, _typeNode$flattenType7, _typeNode$flattenType8, _typeNode$flattenType9, _typeNode$flattenType10;
|
|
150572
150546
|
|
|
@@ -150592,14 +150566,11 @@ function setCurrencyProps(markupBuilder, context, node) {
|
|
|
150592
150566
|
} else if (maxLength == undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
150593
150567
|
markupBuilder.prop(x => x.currencyIntegerDigits).set(undefined);
|
|
150594
150568
|
markupBuilder.prop(x => x.currencyFractionDigits).set(2);
|
|
150595
|
-
} else if (maxLength != undefined && fractionDigits != undefined && integerDigits != undefined) {
|
|
150596
|
-
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
150597
|
-
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
150598
150569
|
} else if (totalDigits != undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
150599
150570
|
markupBuilder.prop(x => x.currencyIntegerDigits).set(totalDigits);
|
|
150600
150571
|
markupBuilder.prop(x => x.currencyFractionDigits).set(0);
|
|
150601
150572
|
} else {
|
|
150602
|
-
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError(
|
|
150573
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError("Unable to use currency editor with decimal type with length, maxLength or totaldigits constraints", node, "currency");
|
|
150603
150574
|
}
|
|
150604
150575
|
} else if (baseTypeName === "integer") {
|
|
150605
150576
|
var _ref5, _typeNode$flattenType11, _typeNode$flattenType12, _ref6, _typeNode$flattenType13, _typeNode$flattenType14, _ref7, _typeNode$flattenType15, _typeNode$flattenType16;
|