@ordersune/crm-web-sdk 1.0.8 → 1.0.9

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.
Files changed (2) hide show
  1. package/dist/web-sdk.js +18 -16
  2. package/package.json +1 -1
package/dist/web-sdk.js CHANGED
@@ -569,22 +569,24 @@ class WebSDK {
569
569
  }
570
570
  else {
571
571
  // Single button
572
- const primaryButton = document.createElement('button');
573
- primaryButton.textContent = primaryButtonText;
574
- primaryButton.style.width = '100%';
575
- primaryButton.style.padding = '12px';
576
- primaryButton.style.backgroundColor = this.hexToColor(buttonPropertiesPrimary.backgroundColor);
577
- primaryButton.style.color = this.hexToColor(buttonPropertiesPrimary.textColor);
578
- primaryButton.style.border = `2px solid ${this.hexToColor(buttonPropertiesPrimary.borderColor)}`;
579
- primaryButton.style.borderRadius = '8px';
580
- primaryButton.style.fontSize = '16px';
581
- primaryButton.style.fontWeight = '600';
582
- primaryButton.style.cursor = 'pointer';
583
- primaryButton.onclick = () => {
584
- document.body.removeChild(modalOverlay);
585
- onPrimaryButtonPress();
586
- };
587
- buttonsContainer.appendChild(primaryButton);
572
+ if (primaryButtonText && primaryButtonText.trim() !== '') {
573
+ const primaryButton = document.createElement('button');
574
+ primaryButton.textContent = primaryButtonText;
575
+ primaryButton.style.width = '100%';
576
+ primaryButton.style.padding = '12px';
577
+ primaryButton.style.backgroundColor = this.hexToColor(buttonPropertiesPrimary.backgroundColor);
578
+ primaryButton.style.color = this.hexToColor(buttonPropertiesPrimary.textColor);
579
+ primaryButton.style.border = `2px solid ${this.hexToColor(buttonPropertiesPrimary.borderColor)}`;
580
+ primaryButton.style.borderRadius = '8px';
581
+ primaryButton.style.fontSize = '16px';
582
+ primaryButton.style.fontWeight = '600';
583
+ primaryButton.style.cursor = 'pointer';
584
+ primaryButton.onclick = () => {
585
+ document.body.removeChild(modalOverlay);
586
+ onPrimaryButtonPress();
587
+ };
588
+ buttonsContainer.appendChild(primaryButton);
589
+ }
588
590
  }
589
591
  // Add all elements to the modal
590
592
  modalDialog.appendChild(closeButton);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ordersune/crm-web-sdk",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "publishConfig": {