@kontur.candy/generator 4.249.0 → 4.250.0-nightly.7ipk1
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 +67 -38
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -127319,6 +127319,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
127319
127319
|
/* harmony import */ var _Common_ModelPath_ModelPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPath */ "./Common/ModelPath/ModelPath.ts");
|
|
127320
127320
|
/* harmony import */ var _markupGenerator_getBindingPath__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/getBindingPath */ "./Generator/src/generators/markupGenerator/getBindingPath.ts");
|
|
127321
127321
|
/* 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");
|
|
127322
|
+
/* harmony import */ var _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../common/SchemaRng/FormSchemaRng */ "./Generator/src/common/SchemaRng/FormSchemaRng.ts");
|
|
127323
|
+
|
|
127322
127324
|
|
|
127323
127325
|
|
|
127324
127326
|
|
|
@@ -127338,8 +127340,10 @@ var RequisiteSectionMode;
|
|
|
127338
127340
|
|
|
127339
127341
|
const emptyDataDeclarationCollection = {};
|
|
127340
127342
|
class DataDeclarationGenerationContext {
|
|
127341
|
-
constructor(initSequenceFactory, controlCustomizationContext, typesRegistry) {
|
|
127343
|
+
constructor(initSequenceFactory, controlCustomizationContext, typesRegistry, formSchemaRng, schemeValidations) {
|
|
127342
127344
|
this.initSequenceFactory = void 0;
|
|
127345
|
+
this.formSchemaRng = void 0;
|
|
127346
|
+
this.schemeValidations = void 0;
|
|
127343
127347
|
this.controlCustomizationContext = void 0;
|
|
127344
127348
|
this.typesRegistry = void 0;
|
|
127345
127349
|
|
|
@@ -127369,11 +127373,29 @@ class DataDeclarationGenerationContext {
|
|
|
127369
127373
|
return undefined;
|
|
127370
127374
|
};
|
|
127371
127375
|
|
|
127376
|
+
this.formSchemaRng = formSchemaRng;
|
|
127377
|
+
this.schemeValidations = schemeValidations;
|
|
127372
127378
|
this.initSequenceFactory = initSequenceFactory;
|
|
127373
127379
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
127374
127380
|
this.typesRegistry = typesRegistry;
|
|
127375
127381
|
}
|
|
127376
127382
|
|
|
127383
|
+
isMultipleNodeOptionalFromScheme(path) {
|
|
127384
|
+
if (!this.schemeValidations) {
|
|
127385
|
+
return undefined;
|
|
127386
|
+
}
|
|
127387
|
+
|
|
127388
|
+
const schemaNode = this.formSchemaRng.getElementByPath(path);
|
|
127389
|
+
|
|
127390
|
+
if (schemaNode instanceof _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_9__.FormSchemaRngElement) {
|
|
127391
|
+
var _schemaNode$optional;
|
|
127392
|
+
|
|
127393
|
+
return (_schemaNode$optional = schemaNode.optional) !== null && _schemaNode$optional !== void 0 ? _schemaNode$optional : false;
|
|
127394
|
+
}
|
|
127395
|
+
|
|
127396
|
+
return undefined;
|
|
127397
|
+
}
|
|
127398
|
+
|
|
127377
127399
|
getTypeNode(node) {
|
|
127378
127400
|
if (node.anonymousType != undefined) {
|
|
127379
127401
|
return node.anonymousType;
|
|
@@ -127682,11 +127704,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
127682
127704
|
|
|
127683
127705
|
|
|
127684
127706
|
class DataDeclarationGenerator {
|
|
127685
|
-
constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry) {
|
|
127707
|
+
constructor(sugarRoot, initSequenceFactory, controlCustomizationContext, typesRegistry, formSchemaRng, schemeValidations) {
|
|
127686
127708
|
this.sugarRoot = void 0;
|
|
127687
127709
|
this.initSequenceFactory = void 0;
|
|
127710
|
+
this.formSchemaRng = void 0;
|
|
127711
|
+
this.schemeValidations = void 0;
|
|
127688
127712
|
this.controlCustomizationContext = void 0;
|
|
127689
127713
|
this.typesRegistry = void 0;
|
|
127714
|
+
this.formSchemaRng = formSchemaRng;
|
|
127715
|
+
this.schemeValidations = schemeValidations;
|
|
127690
127716
|
this.sugarRoot = sugarRoot;
|
|
127691
127717
|
this.initSequenceFactory = initSequenceFactory;
|
|
127692
127718
|
this.controlCustomizationContext = controlCustomizationContext;
|
|
@@ -127698,7 +127724,7 @@ class DataDeclarationGenerator {
|
|
|
127698
127724
|
|
|
127699
127725
|
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)();
|
|
127700
127726
|
const converter = new converterClass(this.sugarRoot);
|
|
127701
|
-
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
|
|
127727
|
+
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry, this.formSchemaRng, this.schemeValidations);
|
|
127702
127728
|
const dataDeclaration = converter.buildDataDeclaration(context);
|
|
127703
127729
|
const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
|
|
127704
127730
|
const result = this.replaceHolder(`
|
|
@@ -127732,7 +127758,7 @@ class DataDeclarationGenerator {
|
|
|
127732
127758
|
|
|
127733
127759
|
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)();
|
|
127734
127760
|
const converter = new converterClass(this.sugarRoot);
|
|
127735
|
-
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry);
|
|
127761
|
+
const context = new _DataDeclarationGenerationContext__WEBPACK_IMPORTED_MODULE_7__.DataDeclarationGenerationContext(this.initSequenceFactory, this.controlCustomizationContext, this.typesRegistry, this.formSchemaRng, this.schemeValidations);
|
|
127736
127762
|
const dataDeclaration = converter.buildDataDeclaration(context);
|
|
127737
127763
|
const orderedDataDeclaration = this.sortDataDeclarationKeys(dataDeclaration);
|
|
127738
127764
|
return `
|
|
@@ -128856,7 +128882,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
128856
128882
|
|
|
128857
128883
|
function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
128858
128884
|
try {
|
|
128859
|
-
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _generationOptions$re, _sugarRoot$
|
|
128885
|
+
var _generationOptions$in, _generationOptions$in2, _sugarRoot$schemaVali, _sugarRoot$schemaVali2, _sugarRoot$schemaVali3, _generationOptions$re, _sugarRoot$schemaVali4, _additionalContent$fo, _additionalContent$fo2;
|
|
128860
128886
|
|
|
128861
128887
|
const sugarAst = (0,_common_SugarXmlParser_SugarParser__WEBPACK_IMPORTED_MODULE_4__.parseSugar)(formSugarContent, additionalContent.preprocessor || {});
|
|
128862
128888
|
const serializer = (0,_markupGenerator_SugarNodes_DefaultSugarSerializer__WEBPACK_IMPORTED_MODULE_12__.createDefaultSugarSerializer)();
|
|
@@ -128871,17 +128897,17 @@ function processSugar(formSugarContent, additionalContent, generationOptions) {
|
|
|
128871
128897
|
const fetchFunctions = new _common_FetchFunctions__WEBPACK_IMPORTED_MODULE_2__.FetchFunctions(referencedFetchFunctions); // tslint:disable-next-line no-unsafe-any
|
|
128872
128898
|
|
|
128873
128899
|
const additionalSettings = typeof additionalContent.additionalSettings === "string" ? JSON.parse(additionalContent.additionalSettings || "{}") : additionalContent.additionalSettings;
|
|
128874
|
-
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry);
|
|
128900
|
+
const dataDeclarationGenerator = new _DataDeclarationGenerator_DataDeclarationGenerator__WEBPACK_IMPORTED_MODULE_18__.DataDeclarationGenerator(sugarRoot, new _DataDeclarationGenerator_DataDeclarationInitSourceSequenceFactory__WEBPACK_IMPORTED_MODULE_19__.DataDeclarationInitSourceSequenceFactory(fetchFunctions), controlCustomizationContext, typeRegistry, formSchemaRng, (_sugarRoot$schemaVali = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali !== void 0 ? _sugarRoot$schemaVali : false);
|
|
128875
128901
|
const {
|
|
128876
128902
|
dataDeclarationContent,
|
|
128877
128903
|
dataDeclaration
|
|
128878
128904
|
} = dataDeclarationGenerator.generate();
|
|
128879
128905
|
const dataDeclarationHelper = new _DataDeclarationGenerator_DataDeclarationGenerationTimeHelper__WEBPACK_IMPORTED_MODULE_25__.DataDeclarationGenerationTimeHelper(dataDeclaration);
|
|
128880
|
-
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$
|
|
128881
|
-
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$
|
|
128906
|
+
const validationGenerator = new _validationGenerator_ValidationGenerator__WEBPACK_IMPORTED_MODULE_15__.ValidationGenerator(sugarRoot, typeRegistry, controlCustomizationContext, formSchemaRng, (_sugarRoot$schemaVali2 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali2 !== void 0 ? _sugarRoot$schemaVali2 : false, additionalContent.validationsContent);
|
|
128907
|
+
const normalizationRulesGenerator = new _ServerSideFLangNormalization_NormalizationRulesGenerator__WEBPACK_IMPORTED_MODULE_24__.NormalizationRulesGenerator(sugarRoot, dataDeclarationHelper, formSchemaRng, formulas, typeRegistry, (_sugarRoot$schemaVali3 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali3 !== void 0 ? _sugarRoot$schemaVali3 : false, controlCustomizationContext);
|
|
128882
128908
|
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");
|
|
128883
128909
|
const builder = new _FormSourcesBuilder_FormSourcesBuilder__WEBPACK_IMPORTED_MODULE_20__.FormSourcesBuilder(additionalContent.formSourcesPath);
|
|
128884
|
-
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$
|
|
128910
|
+
const markupGenerator = new _markupGenerator_MarkupGenerator__WEBPACK_IMPORTED_MODULE_11__.MarkupGenerator(additionalContent.formSourcesPath, additionalContent.helpersContent, additionalContent.tourSteps, controlCustomizationContext, typeRegistry, formSchemaRng, dataDeclarationHelper, (_sugarRoot$schemaVali4 = sugarRoot.schemaValidations) !== null && _sugarRoot$schemaVali4 !== void 0 ? _sugarRoot$schemaVali4 : false);
|
|
128885
128911
|
markupGenerator.generate(sugarRoot, builder);
|
|
128886
128912
|
builder.addResource("settings.js", (0,_markupGenerator_getSettings__WEBPACK_IMPORTED_MODULE_8__.getSettings)(sugarRoot, additionalContent.gfv, additionalSettings));
|
|
128887
128913
|
builder.addResource("requisiteList.js", (0,_RequisiteLIst_requisiteList__WEBPACK_IMPORTED_MODULE_23__.getRequisiteList)(sugarRoot, fetchFunctions));
|
|
@@ -136015,7 +136041,7 @@ class UserPicklistConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE
|
|
|
136015
136041
|
type: "Expression",
|
|
136016
136042
|
expression: validationGenerator.generateValidationsFactory()
|
|
136017
136043
|
});
|
|
136018
|
-
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);
|
|
136044
|
+
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, _common_SchemaRng_FormSchemaRng__WEBPACK_IMPORTED_MODULE_7__.FormSchemaRng.createEmpty(), false);
|
|
136019
136045
|
userPicklistDeclarationBuilder.prop(x => x.editorDataDeclaration).set({
|
|
136020
136046
|
type: "Expression",
|
|
136021
136047
|
expression: dataDeclarationGenerator.generateDataDeclarationFactory()
|
|
@@ -140843,10 +140869,10 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
140843
140869
|
}
|
|
140844
140870
|
|
|
140845
140871
|
if (rowNode instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.MultilineNode) {
|
|
140846
|
-
var _rowNode$optional2;
|
|
140872
|
+
var _ref, _rowNode$optional2;
|
|
140847
140873
|
|
|
140848
140874
|
this.ensurePathExists(rowNode, rowNode.dataScope.path);
|
|
140849
|
-
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, {
|
|
140875
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_ref = (_rowNode$optional2 = rowNode.optional) !== null && _rowNode$optional2 !== void 0 ? _rowNode$optional2 : context.isMultipleNodeOptionalFromScheme(rowNode.getFullPath())) !== null && _ref !== void 0 ? _ref : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
|
|
140850
140876
|
optional: rowNode.optional
|
|
140851
140877
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => {
|
|
140852
140878
|
if (rowNode2 instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_11__.CrossfitTableRowNode) {
|
|
@@ -142768,10 +142794,10 @@ class MultilineFieldConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
142768
142794
|
}
|
|
142769
142795
|
|
|
142770
142796
|
doBuildDataDeclaration(context) {
|
|
142771
|
-
var _node$optional;
|
|
142797
|
+
var _ref, _node$optional;
|
|
142772
142798
|
|
|
142773
142799
|
const node = this.getCurrentNodeAs(_MultilineFieldNode__WEBPACK_IMPORTED_MODULE_3__.MultilineFieldNode);
|
|
142774
|
-
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, {
|
|
142800
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_ref = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())) !== null && _ref !== void 0 ? _ref : false)]]), context.addSpecialFieldsEntry(node, {
|
|
142775
142801
|
optional: node.optional
|
|
142776
142802
|
}), context.addPathSectionDeclarationEntry(node), context.addVisibilityPathDeclEntryNew(node));
|
|
142777
142803
|
}
|
|
@@ -142937,10 +142963,10 @@ class MultipleConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_0__
|
|
|
142937
142963
|
}
|
|
142938
142964
|
|
|
142939
142965
|
doBuildDataDeclaration(context) {
|
|
142940
|
-
var _node$optional;
|
|
142966
|
+
var _ref, _node$optional;
|
|
142941
142967
|
|
|
142942
142968
|
const node = this.getCurrentNodeAs(_MultipleNode__WEBPACK_IMPORTED_MODULE_3__.MultipleNode);
|
|
142943
|
-
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, {
|
|
142969
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_ref = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())) !== null && _ref !== void 0 ? _ref : false)]]), context.addSpecialFieldsEntry(node, {
|
|
142944
142970
|
optional: node.optional
|
|
142945
142971
|
}), context.addPathSectionDeclarationEntry(node));
|
|
142946
142972
|
}
|
|
@@ -144120,9 +144146,9 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
144120
144146
|
|
|
144121
144147
|
processMultilineNode(context, rowNode) {
|
|
144122
144148
|
if (rowNode instanceof _StickyTableNode__WEBPACK_IMPORTED_MODULE_14__.StickyTableMultilineNode) {
|
|
144123
|
-
var _rowNode$optional;
|
|
144149
|
+
var _ref, _rowNode$optional;
|
|
144124
144150
|
|
|
144125
|
-
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, {
|
|
144151
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(rowNode, [["children", context.initSequenceFactory.children((_ref = (_rowNode$optional = rowNode.optional) !== null && _rowNode$optional !== void 0 ? _rowNode$optional : context.isMultipleNodeOptionalFromScheme(rowNode.getFullPath())) !== null && _ref !== void 0 ? _ref : false, rowNode.defaultChildren)]]), context.addSpecialFieldsEntry(rowNode, {
|
|
144126
144152
|
optional: rowNode.optional
|
|
144127
144153
|
}), context.addPathSectionDeclarationEntry(rowNode), context.addVisibilityPathDeclEntryNew(rowNode), context.processChildrenDataDeclaration(rowNode.rows, rowNode2 => this.processMultilineRowNode(context, rowNode2)));
|
|
144128
144154
|
}
|
|
@@ -144195,11 +144221,11 @@ class StickyTableWithMultilineConverter extends _SugarNodeConverter__WEBPACK_IMP
|
|
|
144195
144221
|
const sideSize = (_node$side2 = node.side) !== null && _node$side2 !== void 0 ? _node$side2 : 0;
|
|
144196
144222
|
|
|
144197
144223
|
if (this.isSimpleForm()) {
|
|
144198
|
-
var
|
|
144224
|
+
var _ref2, _node$deprecatedDiado;
|
|
144199
144225
|
|
|
144200
144226
|
mb.prop(x => x.maxWidth).set(orientation === "landscape" ? maxWidth : undefined);
|
|
144201
144227
|
mb.prop(x => x.sideSize).set(this.hasActionButton(node) && sideSize !== 0 ? sideSize + 1 : sideSize);
|
|
144202
|
-
const width = (
|
|
144228
|
+
const width = (_ref2 = (_node$deprecatedDiado = node.deprecatedDiadocWidth) !== null && _node$deprecatedDiado !== void 0 ? _node$deprecatedDiado : node.width) !== null && _ref2 !== void 0 ? _ref2 : maxWidthSimpleForm;
|
|
144203
144229
|
mb.prop(x => x.width).set(width);
|
|
144204
144230
|
mb.prop(x => x.footerHeight).set(160);
|
|
144205
144231
|
} else {
|
|
@@ -144482,10 +144508,10 @@ BindingPath: ${errorPath}`));
|
|
|
144482
144508
|
if (this.isSimpleForm()) {
|
|
144483
144509
|
mb.prop(x => x.buttonType).set(undefined);
|
|
144484
144510
|
} else {
|
|
144485
|
-
var _multiline$rowmenu,
|
|
144511
|
+
var _multiline$rowmenu, _ref3, _tableNode$removeButt;
|
|
144486
144512
|
|
|
144487
144513
|
const rowMenu = (_multiline$rowmenu = multiline.rowmenu) !== null && _multiline$rowmenu !== void 0 ? _multiline$rowmenu : false;
|
|
144488
|
-
const removebutton = (
|
|
144514
|
+
const removebutton = (_ref3 = (_tableNode$removeButt = tableNode.removeButton) !== null && _tableNode$removeButt !== void 0 ? _tableNode$removeButt : multiline.removebutton) !== null && _ref3 !== void 0 ? _ref3 : true;
|
|
144489
144515
|
mb.prop(x => x.buttonType).set(rowMenu ? "RowMenu" : removebutton ? "RemoveRowButton" : undefined);
|
|
144490
144516
|
}
|
|
144491
144517
|
|
|
@@ -144498,7 +144524,7 @@ BindingPath: ${errorPath}`));
|
|
|
144498
144524
|
}
|
|
144499
144525
|
|
|
144500
144526
|
getMultiline(context, node, multiline, start, end = Infinity) {
|
|
144501
|
-
var
|
|
144527
|
+
var _ref4, _node$removeButton, _multiline$rowmenu2, _ref5, _node$removeButton2, _context$popPathsCont2;
|
|
144502
144528
|
|
|
144503
144529
|
const overrideInfo = multiline.override ? context.controlCustomizationContext.getControlCustomizationInfo("multiline", multiline.override) : undefined;
|
|
144504
144530
|
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);
|
|
@@ -144511,7 +144537,7 @@ BindingPath: ${errorPath}`));
|
|
|
144511
144537
|
mb.prop(x => x.isList).set(multiline.usepager === false ? true : undefined);
|
|
144512
144538
|
mb.prop(x => x.bindingPath).set((0,_getBindingPath__WEBPACK_IMPORTED_MODULE_13__.getNewBindingPathExpression)(multiline));
|
|
144513
144539
|
mb.prop(x => x.showRowBorder).set(multiline.showRowBorder);
|
|
144514
|
-
const hasRemoveButton = ((
|
|
144540
|
+
const hasRemoveButton = ((_ref4 = (_node$removeButton = node.removeButton) !== null && _node$removeButton !== void 0 ? _node$removeButton : multiline.removebutton) !== null && _ref4 !== void 0 ? _ref4 : true) || ((_multiline$rowmenu2 = multiline.rowmenu) !== null && _multiline$rowmenu2 !== void 0 ? _multiline$rowmenu2 : false);
|
|
144515
144541
|
const needAddButton = multiline.addbutton !== "false";
|
|
144516
144542
|
|
|
144517
144543
|
if (this.isSimpleForm()) {
|
|
@@ -144524,7 +144550,7 @@ BindingPath: ${errorPath}`));
|
|
|
144524
144550
|
mb.prop(x => x.removeButtonPosition).set(undefined);
|
|
144525
144551
|
}
|
|
144526
144552
|
|
|
144527
|
-
mb.prop(x => x.disableScroll).set(needAddButton || ((
|
|
144553
|
+
mb.prop(x => x.disableScroll).set(needAddButton || ((_ref5 = (_node$removeButton2 = node.removeButton) !== null && _node$removeButton2 !== void 0 ? _node$removeButton2 : multiline.removebutton) !== null && _ref5 !== void 0 ? _ref5 : true) ? undefined : true);
|
|
144528
144554
|
context.pushPathsContext();
|
|
144529
144555
|
|
|
144530
144556
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_3__.arrayHasLength)(multiline.rows, 1)) {
|
|
@@ -144550,9 +144576,9 @@ BindingPath: ${errorPath}`));
|
|
|
144550
144576
|
hasActionButton(node) {
|
|
144551
144577
|
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);
|
|
144552
144578
|
return multilines.some(multiline => {
|
|
144553
|
-
var
|
|
144579
|
+
var _ref6, _node$removeButton3;
|
|
144554
144580
|
|
|
144555
|
-
return ((
|
|
144581
|
+
return ((_ref6 = (_node$removeButton3 = node.removeButton) !== null && _node$removeButton3 !== void 0 ? _node$removeButton3 : multiline.removebutton) !== null && _ref6 !== void 0 ? _ref6 : true) || multiline.rowmenu;
|
|
144556
144582
|
});
|
|
144557
144583
|
}
|
|
144558
144584
|
|
|
@@ -144778,10 +144804,10 @@ class Table2MultirowConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODU
|
|
|
144778
144804
|
}
|
|
144779
144805
|
|
|
144780
144806
|
doBuildDataDeclaration(context) {
|
|
144781
|
-
var _node$optional;
|
|
144807
|
+
var _ref, _node$optional;
|
|
144782
144808
|
|
|
144783
144809
|
const node = this.getCurrentNodeAs(_Table2Node__WEBPACK_IMPORTED_MODULE_3__.Table2MultirowNode);
|
|
144784
|
-
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));
|
|
144810
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_ref = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())) !== null && _ref !== void 0 ? _ref : false)]]), context.addPathSectionDeclarationEntry(node));
|
|
144785
144811
|
}
|
|
144786
144812
|
|
|
144787
144813
|
buildChildrenDataDeclaration(context) {
|
|
@@ -145600,10 +145626,10 @@ class TabsConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODULE_2__.Sug
|
|
|
145600
145626
|
}
|
|
145601
145627
|
|
|
145602
145628
|
doBuildDataDeclaration(context) {
|
|
145603
|
-
var _node$optional;
|
|
145629
|
+
var _ref, _node$optional;
|
|
145604
145630
|
|
|
145605
145631
|
const node = this.getCurrentNodeAs(_TabsNode__WEBPACK_IMPORTED_MODULE_4__.TabsNode);
|
|
145606
|
-
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));
|
|
145632
|
+
return context.mergeDataDeclaration(context.addPathDeclEntry(node, [["children", context.initSequenceFactory.children((_ref = (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : context.isMultipleNodeOptionalFromScheme(node.getFullPath())) !== null && _ref !== void 0 ? _ref : false)]]), context.addPathSectionDeclarationEntry(node));
|
|
145607
145633
|
}
|
|
145608
145634
|
|
|
145609
145635
|
buildChildrenDataDeclaration(context) {
|
|
@@ -150046,15 +150072,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
150046
150072
|
|
|
150047
150073
|
|
|
150048
150074
|
function setCurrencyProps(markupBuilder, context, node) {
|
|
150075
|
+
var _typeNode$base, _node$currency;
|
|
150076
|
+
|
|
150049
150077
|
const typeNode = context.getTypeNode(node.validationInfo);
|
|
150050
150078
|
const schemaTypeInfo = context.getSchemaTypeInfo(node.getFullPath());
|
|
150051
|
-
|
|
150052
|
-
|
|
150053
|
-
|
|
150054
|
-
var _typeNode$base;
|
|
150055
|
-
|
|
150056
|
-
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;
|
|
150079
|
+
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;
|
|
150080
|
+
const currency = (_node$currency = node.currency) !== null && _node$currency !== void 0 ? _node$currency : baseTypeName === "integer" || baseTypeName === "decimal";
|
|
150081
|
+
markupBuilder.prop(x => x.currency).set(currency);
|
|
150057
150082
|
|
|
150083
|
+
if (currency) {
|
|
150058
150084
|
if (baseTypeName === "decimal") {
|
|
150059
150085
|
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;
|
|
150060
150086
|
|
|
@@ -150080,11 +150106,14 @@ function setCurrencyProps(markupBuilder, context, node) {
|
|
|
150080
150106
|
} else if (maxLength == undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
150081
150107
|
markupBuilder.prop(x => x.currencyIntegerDigits).set(undefined);
|
|
150082
150108
|
markupBuilder.prop(x => x.currencyFractionDigits).set(2);
|
|
150109
|
+
} else if (maxLength != undefined && fractionDigits != undefined && integerDigits != undefined) {
|
|
150110
|
+
markupBuilder.prop(x => x.currencyIntegerDigits).set(integerDigits);
|
|
150111
|
+
markupBuilder.prop(x => x.currencyFractionDigits).set(fractionDigits);
|
|
150083
150112
|
} else if (totalDigits != undefined && fractionDigits == undefined && integerDigits == undefined) {
|
|
150084
150113
|
markupBuilder.prop(x => x.currencyIntegerDigits).set(totalDigits);
|
|
150085
150114
|
markupBuilder.prop(x => x.currencyFractionDigits).set(0);
|
|
150086
150115
|
} else {
|
|
150087
|
-
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError(
|
|
150116
|
+
throw new _common_XmlParser_XmlNode__WEBPACK_IMPORTED_MODULE_1__.SugarAttributeReadError(`Unable to use currency editor with decimal type with length, maxLength or totaldigits constraints (path: ${node.getFullPath().toString()})`, node, "currency");
|
|
150088
150117
|
}
|
|
150089
150118
|
} else if (baseTypeName === "integer") {
|
|
150090
150119
|
var _ref5, _typeNode$flattenType11, _typeNode$flattenType12, _ref6, _typeNode$flattenType13, _typeNode$flattenType14, _ref7, _typeNode$flattenType15, _typeNode$flattenType16;
|