@solidpepper/solidpepper-solidgeneration 0.2.7 → 0.2.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.
@@ -6841,10 +6841,11 @@ class DataSheetSVG {
6841
6841
  getActualBlockHeight(svgContent, initialBlockHeight, blockY = 0) {
6842
6842
  if (!svgContent)
6843
6843
  return { actualHeight: initialBlockHeight, updatedSvg: svgContent };
6844
- const hasDynamicElements = /id=["']tableVariant["']/i.test(svgContent) ||
6844
+ const hasTable = /id=["']tableVariant["']/i.test(svgContent) ||
6845
6845
  /data-info=["']variantTable["']/i.test(svgContent) ||
6846
- /<foreignObject/i.test(svgContent);
6847
- if (!hasDynamicElements) {
6846
+ /data-type=["'](productTable|variantsTable)["']/i.test(svgContent) ||
6847
+ /<table\b/i.test(svgContent);
6848
+ if (!hasTable) {
6848
6849
  return { actualHeight: initialBlockHeight, updatedSvg: svgContent };
6849
6850
  }
6850
6851
  let maxBottom = 0;
@@ -8522,13 +8523,21 @@ class DataSheetController {
8522
8523
  dataSheet.progress = 25;
8523
8524
  let files = [];
8524
8525
  switch (source) {
8525
- case 1: // All SKUS
8526
+ case 1: // All SKUS or Selected SKUS Batch
8526
8527
  //console.log('[PDF] Fetching SKU list for global batch generation...');
8527
8528
  try {
8528
- const res = await this._generationService
8529
- .getSkusDatas(json.language, json.attributeSkuGuid, templateGuid, json.onlyNeedRegeneration)
8530
- .toPromise();
8531
- const skuGuids = res.skuGuids || [];
8529
+ let skuGuids = [];
8530
+ if (Array.isArray(json.sourceGuid) &&
8531
+ json.sourceGuid.length > 0 &&
8532
+ json.sourceGuid[0] !== 'all') {
8533
+ skuGuids = json.sourceGuid;
8534
+ }
8535
+ else {
8536
+ const res = await this._generationService
8537
+ .getSkusDatas(json.language, json.attributeSkuGuid, templateGuid, json.onlyNeedRegeneration)
8538
+ .toPromise();
8539
+ skuGuids = res.skuGuids || [];
8540
+ }
8532
8541
  const concurrencyLimit = 5;
8533
8542
  let currentIndex = 0;
8534
8543
  const executeTask = async () => {