@kontur.candy/generator 4.266.0-szvm-import.0 → 4.266.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 +9 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -143785,6 +143785,8 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
143785
143785
|
}
|
|
143786
143786
|
|
|
143787
143787
|
doConvert(context) {
|
|
143788
|
+
var _node$optional;
|
|
143789
|
+
|
|
143788
143790
|
const node = this.getCurrentNodeAs(_CrossfitTableNode__WEBPACK_IMPORTED_MODULE_14__.CrossfitTableNode); // Chrome size != 100% bag
|
|
143789
143791
|
|
|
143790
143792
|
const columnWidths = (0,_TableCommons_ColumnWidthGuessing_GetColumnWidths__WEBPACK_IMPORTED_MODULE_5__.getColumnWidths)(node.sourceXmlNode, (0,_TableCommons_ColumnWidthGuessing_TypeBasedGuessContentWidth__WEBPACK_IMPORTED_MODULE_8__.typeBasedGuessContentWidth)(context)).map(w => w + 1);
|
|
@@ -143843,7 +143845,7 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
143843
143845
|
tableBuilder.appendChild(loader);
|
|
143844
143846
|
}
|
|
143845
143847
|
|
|
143846
|
-
const sidebarBuilder = this.buildSidebar(context, node, sidebarColumns);
|
|
143848
|
+
const sidebarBuilder = this.buildSidebar(context, node, sidebarColumns, (_node$optional = node.optional) !== null && _node$optional !== void 0 ? _node$optional : false);
|
|
143847
143849
|
|
|
143848
143850
|
if (sidebarBuilder != undefined) {
|
|
143849
143851
|
tableBuilder.appendChild(sidebarBuilder);
|
|
@@ -143962,7 +143964,7 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
143962
143964
|
return `<CrossfitTable.Loader>${(0,_Serializer_SugarSerializer__WEBPACK_IMPORTED_MODULE_3__.localizedStringToJsx)(loaderText)}</CrossfitTable.Loader>`;
|
|
143963
143965
|
}
|
|
143964
143966
|
|
|
143965
|
-
buildSidebar(context, node, sidebarColumns) {
|
|
143967
|
+
buildSidebar(context, node, sidebarColumns, optional) {
|
|
143966
143968
|
if (sidebarColumns === 0) {
|
|
143967
143969
|
return undefined;
|
|
143968
143970
|
}
|
|
@@ -143983,7 +143985,7 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
143983
143985
|
|
|
143984
143986
|
for (const child of bodyRows) {
|
|
143985
143987
|
if (child instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_14__.MultilineNode) {
|
|
143986
|
-
sidebarBuilder.appendChild(this.buildSidebarMultiline(context, (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_1__.getNewBindingPathExpression)(child), child, node.doNotCopyPaths || [], node.hasRemovebutton(), Boolean(node.rowmenu)));
|
|
143988
|
+
sidebarBuilder.appendChild(this.buildSidebarMultiline(context, (0,_getBindingPath__WEBPACK_IMPORTED_MODULE_1__.getNewBindingPathExpression)(child), child, node.doNotCopyPaths || [], node.hasRemovebutton(), Boolean(node.rowmenu), optional));
|
|
143987
143989
|
} else if (child instanceof _CrossfitTableNode__WEBPACK_IMPORTED_MODULE_14__.CrossfitTableRowNode) {
|
|
143988
143990
|
const rowBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_2__.componentMarkupBuilder)("CrossfitTableSidebarRow");
|
|
143989
143991
|
rowBuilder.appendChildren(this.buildBodyColumns(context, node, child.columns, 0, sidebarColumns, true));
|
|
@@ -143996,7 +143998,7 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
143996
143998
|
return sidebarBuilder;
|
|
143997
143999
|
}
|
|
143998
144000
|
|
|
143999
|
-
buildSidebarMultiline(context, multilinePath, multilineNode, doNotCopyPaths, removeButton, rowMenu) {
|
|
144001
|
+
buildSidebarMultiline(context, multilinePath, multilineNode, doNotCopyPaths, removeButton, rowMenu, optional) {
|
|
144000
144002
|
if (removeButton && rowMenu) {
|
|
144001
144003
|
throw new Error(`Выберите или rowMenu или removeButton для таблицы ${multilinePath.toString()}`);
|
|
144002
144004
|
}
|
|
@@ -144023,6 +144025,7 @@ class CrossfitTableConverter extends _SugarNodeConverter__WEBPACK_IMPORTED_MODUL
|
|
|
144023
144025
|
} else if (removeButton) {
|
|
144024
144026
|
const removeButtonBuilder = (0,_ComponentMarkupBuilder_ComponentMarkupBuilder__WEBPACK_IMPORTED_MODULE_2__.componentMarkupBuilder)("RemoveRowButton");
|
|
144025
144027
|
multilineSidebarRow.prop(x => x.addTopMargin).set(true);
|
|
144028
|
+
removeButtonBuilder.prop(x => x.optional).set(optional);
|
|
144026
144029
|
sideControlsBuilder.appendChild(removeButtonBuilder);
|
|
144027
144030
|
}
|
|
144028
144031
|
|
|
@@ -147505,7 +147508,7 @@ BindingPath: ${errorPath}`));
|
|
|
147505
147508
|
}
|
|
147506
147509
|
|
|
147507
147510
|
buildSidebarMultilineProps(context, tableNode, multiline, mb) {
|
|
147508
|
-
var _multiline$addbutton, _multiline$doNotCopyP, _multiline$focusByHot, _multiline$usepager;
|
|
147511
|
+
var _multiline$addbutton, _multiline$doNotCopyP, _multiline$focusByHot, _multiline$usepager, _multiline$optional;
|
|
147509
147512
|
|
|
147510
147513
|
this.checkRemoveButtonAndRowMenuInvariant(multiline);
|
|
147511
147514
|
|
|
@@ -147534,6 +147537,7 @@ BindingPath: ${errorPath}`));
|
|
|
147534
147537
|
mb.prop(x => x.focusByHotkey).set((_multiline$focusByHot = multiline.focusByHotkey) !== null && _multiline$focusByHot !== void 0 ? _multiline$focusByHot : false);
|
|
147535
147538
|
mb.prop(x => x.isPager).set((_multiline$usepager = multiline.usepager) !== null && _multiline$usepager !== void 0 ? _multiline$usepager : true);
|
|
147536
147539
|
mb.prop(x => x.isAddButton).set(multiline.addbutton !== "false");
|
|
147540
|
+
mb.prop(x => x.optional).set((_multiline$optional = multiline.optional) !== null && _multiline$optional !== void 0 ? _multiline$optional : false);
|
|
147537
147541
|
}
|
|
147538
147542
|
|
|
147539
147543
|
getMultiline(context, node, multiline, start, end = Infinity) {
|