@kontur.candy/generator 4.271.0 → 4.272.0-pribyl-copy-application5.3
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 +136 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -129415,7 +129415,8 @@ function isFileExists(directoryPath) {
|
|
|
129415
129415
|
}
|
|
129416
129416
|
function normalizeDocument(documentJson) {
|
|
129417
129417
|
const availableChildren = documentJson.availableChildren != undefined ? documentJson.availableChildren : {
|
|
129418
|
-
|
|
129418
|
+
children: [],
|
|
129419
|
+
singleChild: []
|
|
129419
129420
|
};
|
|
129420
129421
|
const document = { ...documentJson,
|
|
129421
129422
|
availableChildren: availableChildren
|
|
@@ -129665,7 +129666,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129665
129666
|
/* harmony import */ var _markupGenerator_Serializer_Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../markupGenerator/Serializer/Properties/SinglePropertyDeserializer */ "./Generator/src/generators/markupGenerator/Serializer/Properties/SinglePropertyDeserializer.ts");
|
|
129666
129667
|
/* harmony import */ var _markupGenerator_Serializer_Properties_ValuesSources_AttributeValueSource__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../markupGenerator/Serializer/Properties/ValuesSources/AttributeValueSource */ "./Generator/src/generators/markupGenerator/Serializer/Properties/ValuesSources/AttributeValueSource.ts");
|
|
129667
129668
|
/* harmony import */ var _markupGenerator_Serializer_Properties_ValuesSources_SkipAttributeValueSource__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../markupGenerator/Serializer/Properties/ValuesSources/SkipAttributeValueSource */ "./Generator/src/generators/markupGenerator/Serializer/Properties/ValuesSources/SkipAttributeValueSource.ts");
|
|
129668
|
-
/* harmony import */ var
|
|
129669
|
+
/* harmony import */ var _markupGenerator_Serializer_Properties_ValuesSources_MarkupOrAttributeValueSource__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../markupGenerator/Serializer/Properties/ValuesSources/MarkupOrAttributeValueSource */ "./Generator/src/generators/markupGenerator/Serializer/Properties/ValuesSources/MarkupOrAttributeValueSource.ts");
|
|
129670
|
+
/* harmony import */ var _markupGenerator_Serializer_Properties_ValuesSources_ChildrenNodesValueSource__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../markupGenerator/Serializer/Properties/ValuesSources/ChildrenNodesValueSource */ "./Generator/src/generators/markupGenerator/Serializer/Properties/ValuesSources/ChildrenNodesValueSource.ts");
|
|
129671
|
+
/* harmony import */ var _markupGenerator_Serializer_Properties_ValuesSources_SingleChildValueSource__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../markupGenerator/Serializer/Properties/ValuesSources/SingleChildValueSource */ "./Generator/src/generators/markupGenerator/Serializer/Properties/ValuesSources/SingleChildValueSource.ts");
|
|
129672
|
+
/* harmony import */ var _DocumentationTypes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./DocumentationTypes */ "./Generator/src/generators/DocumentationGenerator/DocumentationTypes.ts");
|
|
129673
|
+
|
|
129674
|
+
|
|
129675
|
+
|
|
129669
129676
|
|
|
129670
129677
|
|
|
129671
129678
|
|
|
@@ -129691,21 +129698,135 @@ function buildSugarNodeDocumentation(sugarNodeClass) {
|
|
|
129691
129698
|
const documentationFilesContext = metadata.documentationFilesContext;
|
|
129692
129699
|
const example = (0,_common_RequireContext_LoadDocumentationFileFormContext__WEBPACK_IMPORTED_MODULE_2__.loadDocumentationFileFormContext)(documentationFilesContext, "example.md");
|
|
129693
129700
|
const markdownDescription = getMarkdownDescription(documentationFilesContext, metadata, sugarNodeClass);
|
|
129701
|
+
const {
|
|
129702
|
+
markupAttributes,
|
|
129703
|
+
attributes
|
|
129704
|
+
} = buildMarkupAndAttributesInfo(propertySerializers, documentationFilesContext);
|
|
129705
|
+
const {
|
|
129706
|
+
children,
|
|
129707
|
+
singleChild,
|
|
129708
|
+
availableAnyChildren
|
|
129709
|
+
} = buildAvailableChildrenInfo(propertySerializers, documentationFilesContext);
|
|
129694
129710
|
return {
|
|
129695
129711
|
name: metadata.sugarNodeName.toLowerCase(),
|
|
129696
129712
|
availableChildren: {
|
|
129697
|
-
|
|
129713
|
+
children: children,
|
|
129714
|
+
singleChild: singleChild,
|
|
129715
|
+
availableAnyChildren: availableAnyChildren
|
|
129698
129716
|
},
|
|
129699
129717
|
example: example,
|
|
129700
129718
|
shortMarkdownDescription: metadata.description,
|
|
129701
129719
|
markdownDescription: markdownDescription,
|
|
129702
|
-
attributes:
|
|
129720
|
+
attributes: attributes,
|
|
129721
|
+
markupAttributes: markupAttributes
|
|
129703
129722
|
};
|
|
129704
129723
|
}
|
|
129705
129724
|
|
|
129706
|
-
function
|
|
129707
|
-
|
|
129725
|
+
function buildAvailableChildrenInfo(propertySerializers, documentationFilesContext) {
|
|
129726
|
+
if (propertySerializers.length === 0) {
|
|
129727
|
+
return {
|
|
129728
|
+
children: [],
|
|
129729
|
+
singleChild: []
|
|
129730
|
+
};
|
|
129731
|
+
}
|
|
129732
|
+
|
|
129733
|
+
const children = propertySerializers.map(x => buildAvailableChildrenDocs(x, documentationFilesContext)).flat();
|
|
129734
|
+
const singleChild = propertySerializers.map(x => buildAvailableSingleChildDocs(x, documentationFilesContext)).flat();
|
|
129735
|
+
const availableAnyChildren = propertySerializers.map(x => buildAvailableSugarChildrenDocs(x, documentationFilesContext)).some(x => x === true);
|
|
129736
|
+
return {
|
|
129737
|
+
children: children,
|
|
129738
|
+
singleChild: singleChild,
|
|
129739
|
+
availableAnyChildren: availableAnyChildren
|
|
129740
|
+
};
|
|
129741
|
+
}
|
|
129742
|
+
|
|
129743
|
+
function buildAvailableChildrenDocs(propertyDeserializer, documentationFilesContext) {
|
|
129744
|
+
if (!(propertyDeserializer instanceof _markupGenerator_Serializer_Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_5__.SinglePropertyDeserializer)) {
|
|
129745
|
+
return [];
|
|
129746
|
+
}
|
|
129747
|
+
|
|
129748
|
+
if (propertyDeserializer.propertyName === "children") {
|
|
129749
|
+
return [];
|
|
129750
|
+
}
|
|
129751
|
+
|
|
129752
|
+
if (propertyDeserializer.valueSource instanceof _markupGenerator_Serializer_Properties_ValuesSources_ChildrenNodesValueSource__WEBPACK_IMPORTED_MODULE_9__.ChildrenNodesValueSource) {
|
|
129753
|
+
const childrenNodes = propertyDeserializer.valueSource.nodeClasses.map(buildSugarNodeDocumentation);
|
|
129754
|
+
return childrenNodes;
|
|
129755
|
+
}
|
|
129756
|
+
|
|
129757
|
+
return [];
|
|
129758
|
+
}
|
|
129759
|
+
|
|
129760
|
+
function buildAvailableSugarChildrenDocs(propertyDeserializer, documentationFilesContext) {
|
|
129761
|
+
if (!(propertyDeserializer instanceof _markupGenerator_Serializer_Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_5__.SinglePropertyDeserializer)) {
|
|
129762
|
+
return false;
|
|
129763
|
+
}
|
|
129764
|
+
|
|
129765
|
+
if (propertyDeserializer.propertyName === "children") {
|
|
129766
|
+
return true;
|
|
129767
|
+
}
|
|
129768
|
+
|
|
129769
|
+
return false;
|
|
129770
|
+
}
|
|
129771
|
+
|
|
129772
|
+
function buildAvailableSingleChildDocs(propertyDeserializer, documentationFilesContext) {
|
|
129773
|
+
if (!(propertyDeserializer instanceof _markupGenerator_Serializer_Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_5__.SinglePropertyDeserializer)) {
|
|
129774
|
+
return [];
|
|
129775
|
+
}
|
|
129776
|
+
|
|
129777
|
+
if (propertyDeserializer.valueSource instanceof _markupGenerator_Serializer_Properties_ValuesSources_SingleChildValueSource__WEBPACK_IMPORTED_MODULE_10__.SingleChildValueSource) {
|
|
129778
|
+
const childrenNodes = propertyDeserializer.valueSource.nodeClasses.map(buildSugarNodeDocumentation);
|
|
129779
|
+
return childrenNodes;
|
|
129780
|
+
}
|
|
129781
|
+
|
|
129782
|
+
return [];
|
|
129783
|
+
}
|
|
129708
129784
|
|
|
129785
|
+
function buildMarkupAndAttributesInfo(propertySerializers, documentationFilesContext) {
|
|
129786
|
+
if (propertySerializers.length === 0) {
|
|
129787
|
+
return {
|
|
129788
|
+
attributes: [],
|
|
129789
|
+
markupAttributes: []
|
|
129790
|
+
};
|
|
129791
|
+
}
|
|
129792
|
+
|
|
129793
|
+
const attributes = propertySerializers.map(x => buildAttributeDocs(x, documentationFilesContext)).flat();
|
|
129794
|
+
const markupAttributes = propertySerializers.map(x => buildMarkupAttributeDocs(x, documentationFilesContext)).flat();
|
|
129795
|
+
return {
|
|
129796
|
+
attributes: attributes,
|
|
129797
|
+
markupAttributes: markupAttributes
|
|
129798
|
+
};
|
|
129799
|
+
}
|
|
129800
|
+
|
|
129801
|
+
function buildMarkupAttributeDocs(propertyDeserializer, documentationFilesContext) {
|
|
129802
|
+
if (!(propertyDeserializer instanceof _markupGenerator_Serializer_Properties_SinglePropertyDeserializer__WEBPACK_IMPORTED_MODULE_5__.SinglePropertyDeserializer)) {
|
|
129803
|
+
return [];
|
|
129804
|
+
}
|
|
129805
|
+
|
|
129806
|
+
if (propertyDeserializer.valueSource instanceof _markupGenerator_Serializer_Properties_ValuesSources_MarkupOrAttributeValueSource__WEBPACK_IMPORTED_MODULE_8__.MarkupOrAttributeValueSource) {
|
|
129807
|
+
var _propertyDeserializer;
|
|
129808
|
+
|
|
129809
|
+
let markdownDescription = "";
|
|
129810
|
+
|
|
129811
|
+
if (documentationFilesContext != undefined) {
|
|
129812
|
+
markdownDescription = (0,_common_RequireContext_LoadDocumentationFileFormContext__WEBPACK_IMPORTED_MODULE_2__.loadDocumentationFileFormContext)(documentationFilesContext, `${propertyDeserializer.valueSource.attrName}.attr.md`);
|
|
129813
|
+
}
|
|
129814
|
+
|
|
129815
|
+
return [{
|
|
129816
|
+
name: propertyDeserializer.valueSource.attrName,
|
|
129817
|
+
valueTypes: (0,_DocumentationTypes__WEBPACK_IMPORTED_MODULE_11__.valueParserToAttributeType)(propertyDeserializer.valueSource.valueParser),
|
|
129818
|
+
shortMarkdownDescription: (_propertyDeserializer = propertyDeserializer.propertyDescription) !== null && _propertyDeserializer !== void 0 ? _propertyDeserializer : "--",
|
|
129819
|
+
markdownDescription: markdownDescription,
|
|
129820
|
+
defaultValue: undefined,
|
|
129821
|
+
required: (0,_DocumentationTypes__WEBPACK_IMPORTED_MODULE_11__.isRequiredValueParser)(propertyDeserializer.valueSource.valueParser),
|
|
129822
|
+
deprecated: false
|
|
129823
|
+
}];
|
|
129824
|
+
}
|
|
129825
|
+
|
|
129826
|
+
return [];
|
|
129827
|
+
}
|
|
129828
|
+
|
|
129829
|
+
function buildAttributeDocs(propertyDeserializer, documentationFilesContext) {
|
|
129709
129830
|
if (propertyDeserializer instanceof _markupGenerator_Serializer_Properties_MixinPropertyDeserializer__WEBPACK_IMPORTED_MODULE_4__.MixinPropertyDeserializer) {
|
|
129710
129831
|
return propertyDeserializer.getPropertyDeserializers().map(x => buildAttributeDocs(x, documentationFilesContext)).flat();
|
|
129711
129832
|
}
|
|
@@ -129715,7 +129836,7 @@ function buildAttributeDocs(propertyDeserializer, documentationFilesContext) {
|
|
|
129715
129836
|
}
|
|
129716
129837
|
|
|
129717
129838
|
if (propertyDeserializer.valueSource instanceof _markupGenerator_Serializer_Properties_ValuesSources_AttributeValueSource__WEBPACK_IMPORTED_MODULE_6__.AttributeValueSource) {
|
|
129718
|
-
var
|
|
129839
|
+
var _propertyDeserializer2;
|
|
129719
129840
|
|
|
129720
129841
|
let markdownDescription = "";
|
|
129721
129842
|
|
|
@@ -129725,11 +129846,11 @@ function buildAttributeDocs(propertyDeserializer, documentationFilesContext) {
|
|
|
129725
129846
|
|
|
129726
129847
|
return [{
|
|
129727
129848
|
name: propertyDeserializer.valueSource.attrName,
|
|
129728
|
-
valueTypes: (0,
|
|
129729
|
-
shortMarkdownDescription: (
|
|
129849
|
+
valueTypes: (0,_DocumentationTypes__WEBPACK_IMPORTED_MODULE_11__.valueParserToAttributeType)(propertyDeserializer.valueSource.valueParser),
|
|
129850
|
+
shortMarkdownDescription: (_propertyDeserializer2 = propertyDeserializer.propertyDescription) !== null && _propertyDeserializer2 !== void 0 ? _propertyDeserializer2 : "--",
|
|
129730
129851
|
markdownDescription: markdownDescription,
|
|
129731
129852
|
defaultValue: undefined,
|
|
129732
|
-
required: (0,
|
|
129853
|
+
required: (0,_DocumentationTypes__WEBPACK_IMPORTED_MODULE_11__.isRequiredValueParser)(propertyDeserializer.valueSource.valueParser),
|
|
129733
129854
|
deprecated: false
|
|
129734
129855
|
}];
|
|
129735
129856
|
}
|
|
@@ -129746,15 +129867,7 @@ function buildAttributeDocs(propertyDeserializer, documentationFilesContext) {
|
|
|
129746
129867
|
}];
|
|
129747
129868
|
}
|
|
129748
129869
|
|
|
129749
|
-
return [
|
|
129750
|
-
name: propertyDeserializer.propertyName,
|
|
129751
|
-
valueTypes: [],
|
|
129752
|
-
shortMarkdownDescription: (_propertyDeserializer2 = propertyDeserializer.propertyDescription) !== null && _propertyDeserializer2 !== void 0 ? _propertyDeserializer2 : "--",
|
|
129753
|
-
markdownDescription: "",
|
|
129754
|
-
defaultValue: undefined,
|
|
129755
|
-
required: undefined,
|
|
129756
|
-
deprecated: false
|
|
129757
|
-
}];
|
|
129870
|
+
return [];
|
|
129758
129871
|
}
|
|
129759
129872
|
|
|
129760
129873
|
/***/ }),
|
|
@@ -157443,23 +157556,19 @@ function getPropertyDeserializers(targetClass) {
|
|
|
157443
157556
|
function setPropertyDeserializer( // tslint:disable-next-line:ban-types
|
|
157444
157557
|
nodeClass, propertyKey, prop) {
|
|
157445
157558
|
Reflect.defineMetadata("x:" + propertyKey.toString(), prop, nodeClass, "deserializers");
|
|
157446
|
-
}
|
|
157447
|
-
|
|
157559
|
+
}
|
|
157448
157560
|
function setSugarNodeMetadata(targetClass, metadata) {
|
|
157449
157561
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
157450
157562
|
Reflect.defineMetadata(metadataKey, metadata, targetClass.prototype);
|
|
157451
|
-
}
|
|
157452
|
-
|
|
157563
|
+
}
|
|
157453
157564
|
function getSugarNodeMetadata(targetClass) {
|
|
157454
157565
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-return
|
|
157455
157566
|
return Reflect.getMetadata(metadataKey, targetClass.prototype);
|
|
157456
|
-
}
|
|
157457
|
-
|
|
157567
|
+
}
|
|
157458
157568
|
function setPropertiesContainerMetadata(targetClass, metadata) {
|
|
157459
157569
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
157460
157570
|
Reflect.defineMetadata(metadataKey, metadata, targetClass.prototype);
|
|
157461
|
-
}
|
|
157462
|
-
|
|
157571
|
+
}
|
|
157463
157572
|
function getPropertiesContainerMetadata(targetClass) {
|
|
157464
157573
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-return
|
|
157465
157574
|
return Reflect.getMetadata(metadataKey, targetClass.prototype);
|