This commit is contained in:
root
2025-11-13 19:52:28 +03:00
parent 8aeeb05b7d
commit 807dec3b6c
4646 changed files with 163445 additions and 626017 deletions

View File

@@ -203,7 +203,6 @@ this.BX = this.BX || {};
this.designAllowed = !!landing_env.Env.getInstance().getOptions().design_block_allowed;
this.cardSelectors.push(''); // for without cards elements
this.nodeMap = new WeakMap();
this.metrika = new landing_metrika.Metrika(true);
this.repoManager = new RepoManager({
repository: options.repository,
onElementSelect: this.addElement.bind(this)
@@ -267,9 +266,6 @@ this.BX = this.BX || {};
});
if (elementAdded) {
_this3.refreshManifest();
setTimeout(function () {
_this3.sendLabel('designerBlock', 'onHistoryAddNode');
}, 0);
}
});
top.BX.addCustomEvent('Landing:onHistoryRemoveNode', function (tags) {
@@ -277,9 +273,6 @@ this.BX = this.BX || {};
_this3.removeNode(body.querySelector(tag.elementSelector));
});
_this3.refreshManifest();
setTimeout(function () {
_this3.sendLabel('designerBlock', 'onHistoryRemoveNode');
}, 0);
});
}
}, {
@@ -330,7 +323,6 @@ this.BX = this.BX || {};
_this4.saving = false;
finishCallback();
});
_this4.sendLabel('designerBlock', 'save' + '&designed=' + (_this4.designed ? 'Y' : 'N') + '&code=' + _this4.blockCode);
});
}
}, {
@@ -488,12 +480,6 @@ this.BX = this.BX || {};
value: function isInsideElement(element) {
return element.parentElement.tagName === 'A';
}
}, {
key: "sendLabel",
value: function sendLabel(key, value) {
this.metrika.clearSendedLabel();
this.metrika.sendLabel(null, key, value);
}
}, {
key: "addElement",
value: function addElement(repoElement) {
@@ -511,7 +497,6 @@ this.BX = this.BX || {};
insertAfterSelector: BX.Landing.Utils.getCSSSelector(insertAfter)
});
});
this.sendLabel('designerBlock', 'addElement' + '&code=' + this.blockCode + '&name=' + repoElement.code + '&preset=' + (Object.keys(repoElement.manifest.nodes).length === 1 ? 'N' : 'Y'));
this.changed = true;
this.refreshManifest(repoElement.manifest.nodes);
this.highlight.show(null);
@@ -533,7 +518,6 @@ this.BX = this.BX || {};
this.hideHoverArea();
this.highlight.hide();
setTimeout(function () {
_this11.sendLabel('designerBlock', 'removeElement' + '&tagName=' + _this11.activeNode.getElement().tagName + '&code=' + _this11.blockCode);
babelHelpers.toConsumableArray(document.body.querySelectorAll(_this11.activeNode.getSelector())).map(function (node) {
tags.push({
elementHtml: _this11.clearHtml(node.outerHTML),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -87,7 +87,6 @@ export class DesignerBlock
this.designAllowed = !!Env.getInstance().getOptions().design_block_allowed;
this.cardSelectors.push('');// for without cards elements
this.nodeMap = new WeakMap();
this.metrika = new Metrika(true);
this.repoManager = new RepoManager({
repository: options.repository,
onElementSelect: this.addElement.bind(this)
@@ -173,12 +172,6 @@ export class DesignerBlock
if (elementAdded)
{
this.refreshManifest();
setTimeout(() => {
this.sendLabel(
'designerBlock',
'onHistoryAddNode'
);
}, 0);
}
}
);
@@ -191,12 +184,6 @@ export class DesignerBlock
);
});
this.refreshManifest();
setTimeout(() => {
this.sendLabel(
'designerBlock',
'onHistoryRemoveNode'
);
}, 0);
}
);
}
@@ -257,13 +244,6 @@ export class DesignerBlock
this.saving = false;
finishCallback();
});
this.sendLabel(
'designerBlock',
'save' +
'&designed=' + (this.designed ? 'Y' : 'N') +
'&code=' + this.blockCode
);
});
}
@@ -456,12 +436,6 @@ export class DesignerBlock
return element.parentElement.tagName === 'A';
}
sendLabel(key: string, value: string)
{
this.metrika.clearSendedLabel();
this.metrika.sendLabel(null, key, value);
}
addElement(repoElement: RepoElementType)
{
const activeNode = this.activeNode;
@@ -479,14 +453,6 @@ export class DesignerBlock
});
});
this.sendLabel(
'designerBlock',
'addElement' +
'&code=' + this.blockCode +
'&name=' + repoElement.code +
'&preset=' + (Object.keys(repoElement.manifest.nodes).length === 1 ? 'N' : 'Y')
);
this.changed = true;
this.refreshManifest(repoElement.manifest.nodes);
this.highlight.show(null);
@@ -512,14 +478,6 @@ export class DesignerBlock
this.highlight.hide();
setTimeout(() => {
this.sendLabel(
'designerBlock',
'removeElement' +
'&tagName=' + this.activeNode.getElement().tagName +
'&code=' + this.blockCode
);
[...document.body.querySelectorAll(this.activeNode.getSelector())].map(node => {
tags.push({
elementHtml: this.clearHtml(node.outerHTML),