qumra-engine 2.0.92 → 2.0.93

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.
@@ -324,14 +324,29 @@ exports.default = new (class SeoExtension {
324
324
 
325
325
  // أزرار التحكم
326
326
  const btnActions = {
327
- 'btn-edit': el => alert(\`تحرير العنصر: \${el.getAttribute('widget-id')}\`),
328
- 'btn-copy': el => alert(\`نسخ العنصر: \${el.getAttribute('widget-id')}\`),
329
- 'btn-settings': el => alert(\`إعدادات العنصر: \${el.getAttribute('widget-id')}\`),
327
+ 'btn-edit': el => {
328
+ window.parent.postMessage(
329
+ { type: "widgetAction", action: "edit", widgetId: el.getAttribute("widget-id") },
330
+ "*"
331
+ );
332
+ },
333
+ 'btn-copy': el => {
334
+ window.parent.postMessage(
335
+ { type: "widgetAction", action: "copy", widgetId: el.getAttribute("widget-id") },
336
+ "*"
337
+ );
338
+ },
339
+ 'btn-settings': el => {
340
+ window.parent.postMessage(
341
+ { type: "widgetAction", action: "settings", widgetId: el.getAttribute("widget-id") },
342
+ "*"
343
+ );
344
+ },
330
345
  'btn-delete': el => {
331
- if (confirm('هل أنت متأكد من حذف هذا العنصر؟')) {
332
- el.remove();
333
- hideSelector();
334
- }
346
+ window.parent.postMessage(
347
+ { type: "widgetAction", action: "delete", widgetId: el.getAttribute("widget-id") },
348
+ "*"
349
+ );
335
350
  }
336
351
  };
337
352
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qumra-engine",
3
- "version": "2.0.92",
3
+ "version": "2.0.93",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {