ezfw-core 1.0.11 → 1.0.13

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.
@@ -132,11 +132,16 @@ export class EzDialog extends EzBaseComponent {
132
132
  dialog.appendChild(body);
133
133
 
134
134
  // Footer with buttons
135
- if (buttons && buttons.length > 0) {
135
+ let buttonList = buttons;
136
+ if (typeof buttons === 'function') {
137
+ buttonList = buttons(_dialogInstance);
138
+ }
139
+
140
+ if (Array.isArray(buttonList) && buttonList.length > 0) {
136
141
  const footer = document.createElement('div');
137
142
  footer.className = css('footer');
138
143
 
139
- for (const btn of buttons) {
144
+ for (const btn of buttonList) {
140
145
  const buttonConfig = {
141
146
  eztype: 'EzButton',
142
147
  text: btn.text,
package/core/services.ts CHANGED
@@ -74,15 +74,16 @@ export class EzServices {
74
74
  try {
75
75
  const env = (import.meta as unknown as { env: Record<string, string> }).env || {};
76
76
  if (!env.VITE_CRYPTO_SECRET) {
77
+ console.debug('[ez] CryptoService skipped - VITE_CRYPTO_SECRET not set');
77
78
  return;
78
79
  }
79
80
 
80
81
  const { CryptoService } = await import(/* @vite-ignore */ '../services/crypto.js');
81
82
  await CryptoService.init(env.VITE_CRYPTO_SECRET);
82
83
  this._crypto = CryptoService;
84
+ console.log('[ez] CryptoService initialized');
83
85
  } catch (e) {
84
- // Crypto service not available - skip silently
85
- console.debug('[ez] CryptoService not initialized - libsodium-wrappers not installed');
86
+ console.warn('[ez] CryptoService not initialized:', e);
86
87
  }
87
88
  }
88
89
 
@@ -94,6 +95,7 @@ export class EzServices {
94
95
  try {
95
96
  const env = (import.meta as unknown as { env: Record<string, string> }).env || {};
96
97
  if (env.VITE_USE_FIREBASE !== 'true') {
98
+ console.debug('[ez] FirebaseService skipped - VITE_USE_FIREBASE not true');
97
99
  return;
98
100
  }
99
101
 
@@ -106,9 +108,9 @@ export class EzServices {
106
108
  const { FirebaseService } = await import(/* @vite-ignore */ '../services/firebase.js');
107
109
  this._firebase = new FirebaseService(firebaseConfig) as unknown as FirebaseService;
108
110
  await this._firebase!.init();
111
+ console.log('[ez] FirebaseService initialized');
109
112
  } catch (e) {
110
- // Firebase not available - skip silently
111
- console.debug('[ez] FirebaseService not initialized - firebase not installed');
113
+ console.warn('[ez] FirebaseService not initialized:', e);
112
114
  }
113
115
  }
114
116
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezfw-core",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Ez Framework - A declarative component framework for building modern web applications",
5
5
  "type": "module",
6
6
  "main": "./core/ez.ts",
@@ -33,6 +33,9 @@ export class EzDialogService {
33
33
 
34
34
  setTimeout(() => {
35
35
  dialogInstance._el?.remove();
36
+ if (config.onDestroy) {
37
+ config.onDestroy();
38
+ }
36
39
  }, 200);
37
40
  }
38
41