@kontur.candy/generator 4.286.0-zeroReportingWithOptions.3 → 4.286.0-zeroReportingWithOptions.4
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 +155 -73
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -122236,8 +122236,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
122236
122236
|
/* harmony import */ var _Common_ModelPath_ModelPathBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../Common/ModelPath/ModelPathBuilder */ "./Common/ModelPath/ModelPathBuilder.ts");
|
|
122237
122237
|
/* harmony import */ var _Nodes_SchemaRngRoot__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Nodes/SchemaRngRoot */ "./Generator/src/common/SchemaRng/Nodes/SchemaRngRoot.ts");
|
|
122238
122238
|
/* harmony import */ var _SchemaRngSerializer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SchemaRngSerializer */ "./Generator/src/common/SchemaRng/SchemaRngSerializer.ts");
|
|
122239
|
-
/* harmony import */ var _StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./StringTypeMessageGenerator */ "./Generator/src/common/SchemaRng/StringTypeMessageGenerator.ts");
|
|
122240
|
-
|
|
122241
122239
|
|
|
122242
122240
|
|
|
122243
122241
|
|
|
@@ -122654,8 +122652,6 @@ class FormSchemaRngTypeInfo {
|
|
|
122654
122652
|
}
|
|
122655
122653
|
|
|
122656
122654
|
if (this.patterns != undefined && this.patterns.length !== 0) {
|
|
122657
|
-
var _ref2;
|
|
122658
|
-
|
|
122659
122655
|
const builder = (0,_CodeGeneration_ClassInstanceBuilder__WEBPACK_IMPORTED_MODULE_3__.instanceBuilder)("Validators.MatchOneOfPatternValidator");
|
|
122660
122656
|
const value = this.patterns.map(re => {
|
|
122661
122657
|
if (re[0] !== "^" && re[re.length - 1] !== "$") {
|
|
@@ -122666,7 +122662,7 @@ class FormSchemaRngTypeInfo {
|
|
|
122666
122662
|
});
|
|
122667
122663
|
builder.set(0, value);
|
|
122668
122664
|
builder.set(1, "error");
|
|
122669
|
-
builder.set(2,
|
|
122665
|
+
builder.set(2, description);
|
|
122670
122666
|
yield builder;
|
|
122671
122667
|
}
|
|
122672
122668
|
|
|
@@ -122677,7 +122673,7 @@ class FormSchemaRngTypeInfo {
|
|
|
122677
122673
|
maxInclusive: this.maxInclusive
|
|
122678
122674
|
});
|
|
122679
122675
|
builder.set(1, "error");
|
|
122680
|
-
builder.set(2, description
|
|
122676
|
+
builder.set(2, description);
|
|
122681
122677
|
yield builder;
|
|
122682
122678
|
}
|
|
122683
122679
|
|
|
@@ -122689,7 +122685,7 @@ class FormSchemaRngTypeInfo {
|
|
|
122689
122685
|
fractionDigits: this.fractionDigits
|
|
122690
122686
|
});
|
|
122691
122687
|
result.set(1, "error");
|
|
122692
|
-
result.set(2, description
|
|
122688
|
+
result.set(2, description);
|
|
122693
122689
|
yield result;
|
|
122694
122690
|
}
|
|
122695
122691
|
|
|
@@ -122701,20 +122697,11 @@ class FormSchemaRngTypeInfo {
|
|
|
122701
122697
|
maxLength: this.maxLength
|
|
122702
122698
|
});
|
|
122703
122699
|
builder.set(1, "error");
|
|
122704
|
-
builder.set(2, description
|
|
122700
|
+
builder.set(2, description);
|
|
122705
122701
|
yield builder;
|
|
122706
122702
|
}
|
|
122707
122703
|
}
|
|
122708
122704
|
|
|
122709
|
-
buildDefaultDescription() {
|
|
122710
|
-
return _StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_7__.StringTypeMessageGenerator.generate({
|
|
122711
|
-
length: this.length,
|
|
122712
|
-
patterns: this.patterns,
|
|
122713
|
-
minLength: this.minLength,
|
|
122714
|
-
maxLength: this.maxLength
|
|
122715
|
-
});
|
|
122716
|
-
}
|
|
122717
|
-
|
|
122718
122705
|
}
|
|
122719
122706
|
|
|
122720
122707
|
/***/ }),
|
|
@@ -123170,7 +123157,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
123170
123157
|
|
|
123171
123158
|
|
|
123172
123159
|
class StringTypeMessageGenerator {
|
|
123173
|
-
static generate(constraints) {
|
|
123160
|
+
static generate(constraints, localizer) {
|
|
123161
|
+
const valueMustConsistOf = localizer ? localizer.translate("Значение должно состоять из") : "Значение должно состоять из";
|
|
123162
|
+
const valueMustBe = localizer ? localizer.translate("Значение должно быть") : "Значение должно быть";
|
|
123163
|
+
const inTheInterval = localizer ? localizer.translate("в промежутке") : "в промежутке";
|
|
123164
|
+
const from = localizer ? localizer.translate("от") : "от";
|
|
123165
|
+
const to = localizer ? localizer.translate("до") : "до";
|
|
123166
|
+
const notMore = localizer ? localizer.translate("не больше") : "не больше";
|
|
123167
|
+
const notLess = localizer ? localizer.translate("не меньше") : "не меньше";
|
|
123168
|
+
const numberCant = localizer ? localizer.translate("Число не может") : "Число не может";
|
|
123169
|
+
const containMore = localizer ? localizer.translate("содержать более") : "содержать более";
|
|
123170
|
+
const inIntegerPart = localizer ? localizer.translate("в целой части") : "в целой части";
|
|
123171
|
+
const inFractionalPart = localizer ? localizer.translate("в дробной части") : "в дробной части";
|
|
123172
|
+
const fieldMustContainValue = localizer ? localizer.translate("Поле должно принимать значение") : "Поле должно принимать значение";
|
|
123173
|
+
const fieldMustContainOneOfValues = localizer ? localizer.translate("Поле должно принимать одно из значений") : "Поле должно принимать одно из значений";
|
|
123174
|
+
const or = localizer ? localizer.translate("или") : "или";
|
|
123175
|
+
const inFormat = localizer ? localizer.translate("в формате") : "в формате";
|
|
123176
|
+
|
|
123174
123177
|
if (constraints.length != undefined) {
|
|
123175
123178
|
let isNumbersOnly = false;
|
|
123176
123179
|
|
|
@@ -123182,23 +123185,43 @@ class StringTypeMessageGenerator {
|
|
|
123182
123185
|
});
|
|
123183
123186
|
}
|
|
123184
123187
|
|
|
123185
|
-
return
|
|
123188
|
+
return `${valueMustConsistOf} ${this.pluralize(constraints.length, isNumbersOnly ? this.digitPluralForms : this.symbolPluralForms, localizer)}`;
|
|
123186
123189
|
}
|
|
123187
123190
|
|
|
123188
123191
|
if (constraints.minLength != undefined && constraints.maxLength != undefined) {
|
|
123189
|
-
return
|
|
123192
|
+
return `${valueMustBe} ${inTheInterval} ${from} ${constraints.minLength} ${to} ${this.pluralize(constraints.maxLength, this.symbolPluralForms, localizer)}`;
|
|
123190
123193
|
}
|
|
123191
123194
|
|
|
123192
123195
|
if (constraints.maxLength != undefined) {
|
|
123193
|
-
return
|
|
123196
|
+
return `${valueMustBe} ${notMore} ${this.pluralize(constraints.maxLength, this.symbolPluralForms, localizer)}`;
|
|
123194
123197
|
}
|
|
123195
123198
|
|
|
123196
123199
|
if (constraints.minLength != undefined) {
|
|
123197
|
-
return
|
|
123200
|
+
return `${valueMustBe} ${notLess} ${this.pluralize(constraints.minLength, this.symbolPluralForms, localizer)}`;
|
|
123198
123201
|
}
|
|
123199
123202
|
|
|
123200
|
-
if (constraints.
|
|
123201
|
-
return
|
|
123203
|
+
if (constraints.integerDigitsMaxCount != undefined) {
|
|
123204
|
+
return `${numberCant} ${containMore} ${this.pluralize(constraints.integerDigitsMaxCount, this.digitPluralForms, localizer)} ${inIntegerPart}`;
|
|
123205
|
+
}
|
|
123206
|
+
|
|
123207
|
+
if (constraints.fractionalDigitsMaxCount != undefined) {
|
|
123208
|
+
return `${numberCant} ${containMore} ${this.pluralize(constraints.fractionalDigitsMaxCount, this.digitPluralForms, localizer)} ${inFractionalPart}`;
|
|
123209
|
+
}
|
|
123210
|
+
|
|
123211
|
+
if (constraints.totalDigitsMaxCount != undefined) {
|
|
123212
|
+
return `${numberCant} ${containMore} ${this.pluralize(constraints.totalDigitsMaxCount, this.digitPluralForms, localizer)}`;
|
|
123213
|
+
}
|
|
123214
|
+
|
|
123215
|
+
if (constraints.minInclusive != undefined) {
|
|
123216
|
+
return `${valueMustBe} ${notLess} ${constraints.minInclusive}`;
|
|
123217
|
+
}
|
|
123218
|
+
|
|
123219
|
+
if (constraints.maxInclusive != undefined) {
|
|
123220
|
+
return `${valueMustBe} ${notMore} ${constraints.maxInclusive}`;
|
|
123221
|
+
}
|
|
123222
|
+
|
|
123223
|
+
if (constraints.enumerationAllowedValues != undefined) {
|
|
123224
|
+
return constraints.enumerationAllowedValues.length === 1 ? fieldMustContainValue : `${fieldMustContainOneOfValues}: ${constraints.enumerationAllowedValues.join(", ")}`;
|
|
123202
123225
|
}
|
|
123203
123226
|
|
|
123204
123227
|
if (constraints.patterns != undefined && (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.arrayHasLength)(constraints.patterns, 1)) {
|
|
@@ -123208,31 +123231,49 @@ class StringTypeMessageGenerator {
|
|
|
123208
123231
|
|
|
123209
123232
|
if (uniqValues.length === 1) {
|
|
123210
123233
|
if (isNumbersOnly) {
|
|
123211
|
-
return
|
|
123234
|
+
return `${valueMustConsistOf} ${this.pluralize(uniqValues[0].length, this.digitPluralForms, localizer)}`;
|
|
123212
123235
|
} else {
|
|
123213
|
-
return
|
|
123236
|
+
return `${valueMustBe} ${inFormat}: ${uniqValues[0]}`;
|
|
123214
123237
|
}
|
|
123215
123238
|
} else {
|
|
123216
123239
|
if (isNumbersOnly) {
|
|
123217
123240
|
const uniqueLengths = Iterator.from(unique(uniqValues.map(x => x.length))).toArray();
|
|
123218
123241
|
(0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_2__.ensureArrayIsNotEmpty)(uniqueLengths);
|
|
123219
123242
|
uniqueLengths.sort((x, y) => Math.sign(x - y));
|
|
123220
|
-
return
|
|
123243
|
+
return `${valueMustConsistOf} ${uniqueLengths.slice(0, -1).join(", ")} ${or} ${this.pluralize(_Common_IterableUtils__WEBPACK_IMPORTED_MODULE_1__.IterUtils.last(uniqueLengths), this.digitPluralForms, localizer)}`;
|
|
123221
123244
|
} else {
|
|
123222
123245
|
if (uniqValues.length < 4) {
|
|
123223
|
-
return
|
|
123246
|
+
return `${valueMustBe} ${inFormat}: ${uniqValues.slice(0, -1).join(", ")} ${or} ${uniqValues[uniqValues.length - 1]}`;
|
|
123224
123247
|
}
|
|
123225
123248
|
}
|
|
123226
123249
|
}
|
|
123227
123250
|
}
|
|
123228
123251
|
|
|
123252
|
+
if (constraints.patterns != undefined) {
|
|
123253
|
+
return localizer ? localizer.translate("Значение не соответствует формату") : "Значение не соответствует формату";
|
|
123254
|
+
}
|
|
123255
|
+
|
|
123229
123256
|
return undefined;
|
|
123230
123257
|
}
|
|
123231
123258
|
|
|
123232
|
-
static
|
|
123259
|
+
static getBaseTypeMessage(type, localizer) {
|
|
123260
|
+
const messages = {
|
|
123261
|
+
string: "",
|
|
123262
|
+
pattern: "",
|
|
123263
|
+
boolean: "",
|
|
123264
|
+
integer: "Значение должно быть целым числом",
|
|
123265
|
+
decimal: "Значение должно быть числом",
|
|
123266
|
+
date: "Значение должно быть корректной датой",
|
|
123267
|
+
gYear: "Значение должно быть корректным годом длиной 4 знака",
|
|
123268
|
+
gMonth: "Значение должно быть месяцем в формате --00"
|
|
123269
|
+
};
|
|
123270
|
+
return localizer ? localizer.translate(messages[type]) : messages[type];
|
|
123271
|
+
}
|
|
123272
|
+
|
|
123273
|
+
static pluralize(count, words, localizer) {
|
|
123233
123274
|
const cases = [2, 0, 1, 1, 1, 2];
|
|
123234
123275
|
const x = count % 100 > 4 && count % 100 < 20 ? 2 : cases[(0,_Common_IntRangeUtils__WEBPACK_IMPORTED_MODULE_0__.clampUInt)(count % 10, 0, 5)];
|
|
123235
|
-
return count.toString() + " " + words[x];
|
|
123276
|
+
return count.toString() + " " + (localizer ? localizer.translate(words[x]) : words[x]);
|
|
123236
123277
|
}
|
|
123237
123278
|
|
|
123238
123279
|
static *generateRegexValues(pattern, count) {
|
|
@@ -132162,6 +132203,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
132162
132203
|
|
|
132163
132204
|
|
|
132164
132205
|
|
|
132206
|
+
|
|
132207
|
+
const makeArrayLiteral = text => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(`["${text}"]`);
|
|
132208
|
+
|
|
132209
|
+
const makeMessage = (constraints, sugarTypeDescription, schemaTypeDescription) => {
|
|
132210
|
+
var _ref, _ref2;
|
|
132211
|
+
|
|
132212
|
+
return makeArrayLiteral((_ref = (_ref2 = sugarTypeDescription !== null && sugarTypeDescription !== void 0 ? sugarTypeDescription : schemaTypeDescription) !== null && _ref2 !== void 0 ? _ref2 : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_7__.StringTypeMessageGenerator.generate(constraints !== null && constraints !== void 0 ? constraints : {})) !== null && _ref !== void 0 ? _ref : "Поле должно быть заполнено");
|
|
132213
|
+
};
|
|
132214
|
+
|
|
132165
132215
|
class FLangValidationBuildContext {
|
|
132166
132216
|
constructor(typesRegistry, schemaRng, useSchemaValidations, formulaExprConverter) {
|
|
132167
132217
|
this.typesRegistry = void 0;
|
|
@@ -132189,14 +132239,15 @@ class FLangValidationBuildContext {
|
|
|
132189
132239
|
}
|
|
132190
132240
|
|
|
132191
132241
|
buildBasicValidations(targetPath, typeNode, schemaTypeNode, optional, highOrderDescription) {
|
|
132192
|
-
var _typeNode$base, _typeNode$checkType;
|
|
132242
|
+
var _typeNode$base, _typeNode$description, _typeNode$checkType;
|
|
132193
132243
|
|
|
132194
132244
|
const validations = [];
|
|
132195
132245
|
const valueReference = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.ValueReferenceExpression(targetPath.toCurrentIteration(), "value");
|
|
132196
132246
|
const baseName = (_typeNode$base = typeNode === null || typeNode === void 0 ? void 0 : typeNode.base) !== null && _typeNode$base !== void 0 ? _typeNode$base : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.baseType;
|
|
132247
|
+
const baseDescription = (_typeNode$description = typeNode === null || typeNode === void 0 ? void 0 : typeNode.description) !== null && _typeNode$description !== void 0 ? _typeNode$description : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description;
|
|
132197
132248
|
|
|
132198
132249
|
if (baseName != undefined) {
|
|
132199
|
-
const baseTypeValidation = this.createBaseTypeValidation(valueReference, baseName);
|
|
132250
|
+
const baseTypeValidation = this.createBaseTypeValidation(valueReference, baseName, baseDescription);
|
|
132200
132251
|
|
|
132201
132252
|
if (baseTypeValidation != undefined) {
|
|
132202
132253
|
validations.push(baseTypeValidation);
|
|
@@ -132355,28 +132406,19 @@ class FLangValidationBuildContext {
|
|
|
132355
132406
|
}
|
|
132356
132407
|
|
|
132357
132408
|
*createTypeValidations(valueReference, typeNode, schemaTypeNode) {
|
|
132358
|
-
var _typeNode$children$fi, _typeNode$children, _typeNode$children$fi2, _schemaTypeNode$enume, _typeNode$children2, _typeNodeLength$value, _typeNode$children3, _typeNodeMinLength$va, _typeNode$children4, _typeNodeMaxLength$va, _typeNode$children5, _typeNodeMinInclusive, _typeNode$children6, _typeNodeMaxInclusive, _typeNode$children7, _typeNodeTotalDigits$, _typeNode$children$fi3, _typeNode$children8, _schemaTypeNode$patte, _typeNode$children9, _typeNodeFractional$v;
|
|
132409
|
+
var _typeNode$children$fi, _typeNode$children, _typeNode$children$fi2, _schemaTypeNode$enume, _typeNode$children2, _typeNodeLength$value, _typeNode$children3, _typeNodeMinLength$va, _typeNode$children4, _typeNodeMaxLength$va, _typeNode$children5, _typeNodeMinInclusive, _typeNode$children6, _typeNodeMaxInclusive, _typeNode$children7, _typeNodeTotalDigits$, _typeNode$children$fi3, _typeNode$children8, _schemaTypeNode$patte, _typeNode$children9, _typeNodeInteger$valu, _typeNode$children10, _typeNodeFractional$v;
|
|
132359
132410
|
|
|
132360
132411
|
//const baseCheckType = typeNode?.checkType;
|
|
132361
132412
|
const typeNodeEnumerations = (_typeNode$children$fi = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children = typeNode.children) === null || _typeNode$children === void 0 ? void 0 : (_typeNode$children$fi2 = _typeNode$children.filter(x => x instanceof _validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.EnumerationTypeCheckNode)) === null || _typeNode$children$fi2 === void 0 ? void 0 : _typeNode$children$fi2.map(x => x.value)) !== null && _typeNode$children$fi !== void 0 ? _typeNode$children$fi : [];
|
|
132362
132413
|
const enumerationItems = (0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayIsNotEmpty)(typeNodeEnumerations) ? typeNodeEnumerations : (_schemaTypeNode$enume = schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.enumeration) !== null && _schemaTypeNode$enume !== void 0 ? _schemaTypeNode$enume : [];
|
|
132363
132414
|
|
|
132364
132415
|
if ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayIsNotEmpty)(enumerationItems)) {
|
|
132365
|
-
var _ref, _typeNode$description;
|
|
132366
|
-
|
|
132367
132416
|
const enumerationRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.OneOfExpression(valueReference, enumerationItems.map(item => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(item)));
|
|
132368
|
-
|
|
132369
|
-
|
|
132417
|
+
yield [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(enumerationRuleBody), makeMessage({
|
|
132418
|
+
enumerationAllowedValues: enumerationItems
|
|
132419
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132370
132420
|
}
|
|
132371
132421
|
|
|
132372
|
-
const makeArrayLiteral = text => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(`["${text}"]`);
|
|
132373
|
-
|
|
132374
|
-
const makeMessage = constraints => {
|
|
132375
|
-
var _StringTypeMessageGen;
|
|
132376
|
-
|
|
132377
|
-
return makeArrayLiteral((_StringTypeMessageGen = _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_7__.StringTypeMessageGenerator.generate(constraints !== null && constraints !== void 0 ? constraints : {})) !== null && _StringTypeMessageGen !== void 0 ? _StringTypeMessageGen : "Поле должно быть заполнено");
|
|
132378
|
-
};
|
|
132379
|
-
|
|
132380
132422
|
const typeNodeLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children2 = typeNode.children) === null || _typeNode$children2 === void 0 ? void 0 : _typeNode$children2.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.LengthTypeCheckNode));
|
|
132381
132423
|
const lengthValue = (_typeNodeLength$value = typeNodeLength === null || typeNodeLength === void 0 ? void 0 : typeNodeLength.value) !== null && _typeNodeLength$value !== void 0 ? _typeNodeLength$value : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.length;
|
|
132382
132424
|
|
|
@@ -132384,27 +132426,30 @@ class FLangValidationBuildContext {
|
|
|
132384
132426
|
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.EqExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(lengthValue)));
|
|
132385
132427
|
yield [lengthExprRuleBody, makeMessage({
|
|
132386
132428
|
length: lengthValue
|
|
132387
|
-
})];
|
|
132429
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132388
132430
|
}
|
|
132389
132431
|
|
|
132390
132432
|
const typeNodeMinLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children3 = typeNode.children) === null || _typeNode$children3 === void 0 ? void 0 : _typeNode$children3.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.MinlengthTypeCheckNode));
|
|
132391
132433
|
const minLengthValue = (_typeNodeMinLength$va = typeNodeMinLength === null || typeNodeMinLength === void 0 ? void 0 : typeNodeMinLength.value) !== null && _typeNodeMinLength$va !== void 0 ? _typeNodeMinLength$va : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.minLength;
|
|
132434
|
+
const typeNodeMaxLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children4 = typeNode.children) === null || _typeNode$children4 === void 0 ? void 0 : _typeNode$children4.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.MaxlengthTypeCheckNode));
|
|
132435
|
+
const maxLengthValue = (_typeNodeMaxLength$va = typeNodeMaxLength === null || typeNodeMaxLength === void 0 ? void 0 : typeNodeMaxLength.value) !== null && _typeNodeMaxLength$va !== void 0 ? _typeNodeMaxLength$va : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.maxLength;
|
|
132392
132436
|
|
|
132393
|
-
if (minLengthValue != undefined) {
|
|
132437
|
+
if (minLengthValue != undefined && maxLengthValue != undefined) {
|
|
132438
|
+
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.AndBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.GeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(minLengthValue)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(maxLengthValue))));
|
|
132439
|
+
yield [lengthExprRuleBody, makeMessage({
|
|
132440
|
+
minLength: minLengthValue,
|
|
132441
|
+
maxLength: maxLengthValue
|
|
132442
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132443
|
+
} else if (minLengthValue != undefined) {
|
|
132394
132444
|
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.GeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(minLengthValue)));
|
|
132395
132445
|
yield [lengthExprRuleBody, makeMessage({
|
|
132396
132446
|
minLength: minLengthValue
|
|
132397
|
-
})];
|
|
132398
|
-
}
|
|
132399
|
-
|
|
132400
|
-
const typeNodeMaxLength = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children4 = typeNode.children) === null || _typeNode$children4 === void 0 ? void 0 : _typeNode$children4.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.MaxlengthTypeCheckNode));
|
|
132401
|
-
const maxLengthValue = (_typeNodeMaxLength$va = typeNodeMaxLength === null || typeNodeMaxLength === void 0 ? void 0 : typeNodeMaxLength.value) !== null && _typeNodeMaxLength$va !== void 0 ? _typeNodeMaxLength$va : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.maxLength;
|
|
132402
|
-
|
|
132403
|
-
if (maxLengthValue != undefined) {
|
|
132447
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132448
|
+
} else if (maxLengthValue != undefined) {
|
|
132404
132449
|
const lengthExprRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(maxLengthValue)));
|
|
132405
132450
|
yield [lengthExprRuleBody, makeMessage({
|
|
132406
132451
|
maxLength: maxLengthValue
|
|
132407
|
-
})];
|
|
132452
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132408
132453
|
}
|
|
132409
132454
|
|
|
132410
132455
|
const typeNodeMinInclusive = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children5 = typeNode.children) === null || _typeNode$children5 === void 0 ? void 0 : _typeNode$children5.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.MininclusiveTypeCheckNode));
|
|
@@ -132412,7 +132457,9 @@ class FLangValidationBuildContext {
|
|
|
132412
132457
|
|
|
132413
132458
|
if (minInclusiveValue != undefined) {
|
|
132414
132459
|
const minInclusiveRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.GeExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.castOperandToDecimalIfNeed)(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(minInclusiveValue)));
|
|
132415
|
-
yield [minInclusiveRuleBody,
|
|
132460
|
+
yield [minInclusiveRuleBody, makeMessage({
|
|
132461
|
+
minInclusive: minInclusiveValue
|
|
132462
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132416
132463
|
}
|
|
132417
132464
|
|
|
132418
132465
|
const typeNodeMaxInclusive = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children6 = typeNode.children) === null || _typeNode$children6 === void 0 ? void 0 : _typeNode$children6.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.MaxinclusiveTypeCheckNode));
|
|
@@ -132420,7 +132467,9 @@ class FLangValidationBuildContext {
|
|
|
132420
132467
|
|
|
132421
132468
|
if (maxInclusiveValue != undefined) {
|
|
132422
132469
|
const maxInclusiveRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.castOperandToDecimalIfNeed)(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(maxInclusiveValue)));
|
|
132423
|
-
yield [maxInclusiveRuleBody,
|
|
132470
|
+
yield [maxInclusiveRuleBody, makeMessage({
|
|
132471
|
+
maxInclusive: maxInclusiveValue
|
|
132472
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132424
132473
|
}
|
|
132425
132474
|
|
|
132426
132475
|
const typeNodeTotalDigits = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children7 = typeNode.children) === null || _typeNode$children7 === void 0 ? void 0 : _typeNode$children7.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.TotaldigitsTypeCheckNode));
|
|
@@ -132428,30 +132477,44 @@ class FLangValidationBuildContext {
|
|
|
132428
132477
|
|
|
132429
132478
|
if (totalDigitsValue != undefined) {
|
|
132430
132479
|
const totalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NumLenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(totalDigitsValue)));
|
|
132431
|
-
yield [totalDigitsRuleBody,
|
|
132480
|
+
yield [totalDigitsRuleBody, makeMessage({
|
|
132481
|
+
totalDigitsMaxCount: totalDigitsValue
|
|
132482
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132432
132483
|
}
|
|
132433
132484
|
|
|
132434
132485
|
const typeNodePatterns = (_typeNode$children$fi3 = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children8 = typeNode.children) === null || _typeNode$children8 === void 0 ? void 0 : _typeNode$children8.filter((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.PatternTypeCheckNode)).map(x => x.value).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrUndefined)) !== null && _typeNode$children$fi3 !== void 0 ? _typeNode$children$fi3 : [];
|
|
132435
|
-
const
|
|
132486
|
+
const stringPatterns = ((0,_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.arrayIsNotEmpty)(typeNodePatterns) ? typeNodePatterns : (_schemaTypeNode$patte = schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.patterns) !== null && _schemaTypeNode$patte !== void 0 ? _schemaTypeNode$patte : []).filter(_Common_TypingUtils__WEBPACK_IMPORTED_MODULE_6__.isNotNullOrUndefined);
|
|
132487
|
+
const patterns = stringPatterns.map(pattern => new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression(pattern))).reduce((acc, current) => acc != undefined ? new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.OrBinaryExpression(acc, current) : current, undefined);
|
|
132436
132488
|
|
|
132437
132489
|
if (patterns != undefined) {
|
|
132438
|
-
var _ref2, _typeNode$description2;
|
|
132439
|
-
|
|
132440
132490
|
const totalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(patterns);
|
|
132441
|
-
|
|
132442
|
-
|
|
132491
|
+
yield [totalDigitsRuleBody, makeMessage({
|
|
132492
|
+
patterns: stringPatterns
|
|
132493
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132494
|
+
}
|
|
132495
|
+
|
|
132496
|
+
const typeNodeInteger = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children9 = typeNode.children) === null || _typeNode$children9 === void 0 ? void 0 : _typeNode$children9.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.IntegerdigitsTypeCheckNode));
|
|
132497
|
+
const integerDigits = (_typeNodeInteger$valu = typeNodeInteger === null || typeNodeInteger === void 0 ? void 0 : typeNodeInteger.value) !== null && _typeNodeInteger$valu !== void 0 ? _typeNodeInteger$valu : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.integerDigits;
|
|
132498
|
+
|
|
132499
|
+
if (integerDigits != undefined) {
|
|
132500
|
+
const integerDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.MinusBinaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NumLenExpression(valueReference), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.FractionalLenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.castOperandToDecimalIfNeed)(valueReference))), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(integerDigits)));
|
|
132501
|
+
yield [integerDigitsRuleBody, makeMessage({
|
|
132502
|
+
integerDigitsMaxCount: integerDigits
|
|
132503
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132443
132504
|
}
|
|
132444
132505
|
|
|
132445
|
-
const typeNodeFractional = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$
|
|
132506
|
+
const typeNodeFractional = typeNode === null || typeNode === void 0 ? void 0 : (_typeNode$children10 = typeNode.children) === null || _typeNode$children10 === void 0 ? void 0 : _typeNode$children10.find((0,_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.ofType)(_validationGenerator_Nodes_TypeNode__WEBPACK_IMPORTED_MODULE_2__.FractiondigitsTypeCheckNode));
|
|
132446
132507
|
const fractionalDigits = (_typeNodeFractional$v = typeNodeFractional === null || typeNodeFractional === void 0 ? void 0 : typeNodeFractional.value) !== null && _typeNodeFractional$v !== void 0 ? _typeNodeFractional$v : schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.fractionDigits;
|
|
132447
132508
|
|
|
132448
132509
|
if (fractionalDigits != undefined) {
|
|
132449
132510
|
const fractionalDigitsRuleBody = new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.LeExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.FractionalLenExpression((0,_FLang_FlangUtils__WEBPACK_IMPORTED_MODULE_13__.castOperandToDecimalIfNeed)(valueReference)), new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.DecimalLiteralExpression(fractionalDigits)));
|
|
132450
|
-
yield [fractionalDigitsRuleBody,
|
|
132511
|
+
yield [fractionalDigitsRuleBody, makeMessage({
|
|
132512
|
+
fractionalDigitsMaxCount: fractionalDigits
|
|
132513
|
+
}, typeNode === null || typeNode === void 0 ? void 0 : typeNode.description, schemaTypeNode === null || schemaTypeNode === void 0 ? void 0 : schemaTypeNode.description)];
|
|
132451
132514
|
}
|
|
132452
132515
|
}
|
|
132453
132516
|
|
|
132454
|
-
createBaseTypeValidation(valueReference, baseType) {
|
|
132517
|
+
createBaseTypeValidation(valueReference, baseType, baseDescription) {
|
|
132455
132518
|
switch (baseType) {
|
|
132456
132519
|
case "string":
|
|
132457
132520
|
case "pattern":
|
|
@@ -132460,27 +132523,27 @@ class FLangValidationBuildContext {
|
|
|
132460
132523
|
|
|
132461
132524
|
case "integer":
|
|
132462
132525
|
{
|
|
132463
|
-
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^-?\\d+$"))),
|
|
132526
|
+
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^-?\\d+$"))), makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_7__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))];
|
|
132464
132527
|
}
|
|
132465
132528
|
|
|
132466
132529
|
case "decimal":
|
|
132467
132530
|
{
|
|
132468
|
-
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^-?\\d+(([.]\\d+$)|($))"))),
|
|
132531
|
+
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^-?\\d+(([.]\\d+$)|($))"))), makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_7__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))];
|
|
132469
132532
|
}
|
|
132470
132533
|
|
|
132471
132534
|
case "date":
|
|
132472
132535
|
{
|
|
132473
|
-
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^(0[1-9]|[12][0-9]|3[01])\\.(0[1-9]|1[012])\\.(19|20)[0-9]{2}$"))),
|
|
132536
|
+
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^(0[1-9]|[12][0-9]|3[01])\\.(0[1-9]|1[012])\\.(19|20)[0-9]{2}$"))), makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_7__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))];
|
|
132474
132537
|
}
|
|
132475
132538
|
|
|
132476
132539
|
case "gYear":
|
|
132477
132540
|
{
|
|
132478
|
-
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^\\d{4}$"))),
|
|
132541
|
+
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^\\d{4}$"))), makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_7__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))];
|
|
132479
132542
|
}
|
|
132480
132543
|
|
|
132481
132544
|
case "gMonth":
|
|
132482
132545
|
{
|
|
132483
|
-
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^(--(0[1-9]|1[0-2]))$"))),
|
|
132546
|
+
return [new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.NegateUnaryExpression(new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.RegexMatchExpression(valueReference, new _FLang_FLangCodeDom__WEBPACK_IMPORTED_MODULE_12__.StringLiteralExpression("^(--(0[1-9]|1[0-2]))$"))), makeArrayLiteral(baseDescription !== null && baseDescription !== void 0 ? baseDescription : _common_SchemaRng_StringTypeMessageGenerator__WEBPACK_IMPORTED_MODULE_7__.StringTypeMessageGenerator.getBaseTypeMessage(baseType))];
|
|
132484
132547
|
}
|
|
132485
132548
|
|
|
132486
132549
|
default:
|
|
@@ -132551,6 +132614,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
132551
132614
|
/* harmony export */ "IsEqualsBinaryExpression": () => (/* binding */ IsEqualsBinaryExpression),
|
|
132552
132615
|
/* harmony export */ "SumBinaryExpression": () => (/* binding */ SumBinaryExpression),
|
|
132553
132616
|
/* harmony export */ "ConcatStringsExpression": () => (/* binding */ ConcatStringsExpression),
|
|
132617
|
+
/* harmony export */ "MinusBinaryExpression": () => (/* binding */ MinusBinaryExpression),
|
|
132554
132618
|
/* harmony export */ "MultiplicativeBinaryExpression": () => (/* binding */ MultiplicativeBinaryExpression),
|
|
132555
132619
|
/* harmony export */ "GtExpression": () => (/* binding */ GtExpression),
|
|
132556
132620
|
/* harmony export */ "LtExpression": () => (/* binding */ LtExpression),
|
|
@@ -132812,7 +132876,7 @@ class SumBinaryExpression extends BinaryExpression {
|
|
|
132812
132876
|
}
|
|
132813
132877
|
|
|
132814
132878
|
needAddBraces(child) {
|
|
132815
|
-
return !(child instanceof NegateUnaryExpression || child instanceof ValueReferenceExpression || child instanceof ArgumentReferenceExpression || child instanceof SumBinaryExpression || child instanceof CastExpression || child instanceof ConstExpression);
|
|
132879
|
+
return !(child instanceof NegateUnaryExpression || child instanceof ValueReferenceExpression || child instanceof ArgumentReferenceExpression || child instanceof SumBinaryExpression || child instanceof MinusBinaryExpression || child instanceof CastExpression || child instanceof ConstExpression);
|
|
132816
132880
|
}
|
|
132817
132881
|
|
|
132818
132882
|
operatorToString() {
|
|
@@ -132825,10 +132889,24 @@ class ConcatStringsExpression extends SumBinaryExpression {
|
|
|
132825
132889
|
return BuildInTypeExpression.string;
|
|
132826
132890
|
}
|
|
132827
132891
|
|
|
132892
|
+
}
|
|
132893
|
+
class MinusBinaryExpression extends BinaryExpression {
|
|
132894
|
+
getType() {
|
|
132895
|
+
return BuildInTypeExpression.decimal;
|
|
132896
|
+
}
|
|
132897
|
+
|
|
132898
|
+
needAddBraces(child) {
|
|
132899
|
+
return !(child instanceof NegateUnaryExpression || child instanceof ValueReferenceExpression || child instanceof ArgumentReferenceExpression || child instanceof SumBinaryExpression || child instanceof MinusBinaryExpression || child instanceof CastExpression || child instanceof ConstExpression);
|
|
132900
|
+
}
|
|
132901
|
+
|
|
132902
|
+
operatorToString() {
|
|
132903
|
+
return "-";
|
|
132904
|
+
}
|
|
132905
|
+
|
|
132828
132906
|
}
|
|
132829
132907
|
class MultiplicativeBinaryExpression extends BinaryExpression {
|
|
132830
132908
|
needAddBraces(child) {
|
|
132831
|
-
return !(child instanceof NegateUnaryExpression || child instanceof ValueReferenceExpression || child instanceof ArgumentReferenceExpression || child instanceof SumBinaryExpression || child instanceof CastExpression || child instanceof ConstExpression);
|
|
132909
|
+
return !(child instanceof NegateUnaryExpression || child instanceof ValueReferenceExpression || child instanceof ArgumentReferenceExpression || child instanceof SumBinaryExpression || child instanceof MinusBinaryExpression || child instanceof CastExpression || child instanceof ConstExpression);
|
|
132832
132910
|
}
|
|
132833
132911
|
|
|
132834
132912
|
getType() {
|
|
@@ -132855,6 +132933,10 @@ class GeExpression extends LogicalExpression {
|
|
|
132855
132933
|
|
|
132856
132934
|
}
|
|
132857
132935
|
class LeExpression extends LogicalExpression {
|
|
132936
|
+
needAddBraces(child) {
|
|
132937
|
+
return !(child instanceof SumBinaryExpression || child instanceof MinusBinaryExpression);
|
|
132938
|
+
}
|
|
132939
|
+
|
|
132858
132940
|
operatorToString() {
|
|
132859
132941
|
return "<=";
|
|
132860
132942
|
}
|