@solidpepper/solidpepper-service 1.0.9 → 1.1.1

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.
@@ -296,6 +296,42 @@ class RightsService {
296
296
  getRights() {
297
297
  return this.rightsAccessModule.asObservable();
298
298
  }
299
+ hasAccess(rightsObj, module, subModule, func) {
300
+ if (!rightsObj?.['rights']) {
301
+ return false;
302
+ }
303
+ const targetModule = rightsObj['rights']?.[module];
304
+ if (!targetModule) {
305
+ console.error(`[RightsService] Module "${module}" does not exist in rights object. Available modules:`);
306
+ return false;
307
+ }
308
+ if (!subModule) {
309
+ return targetModule['moduleIsActive'] === true;
310
+ }
311
+ const targetSubModule = targetModule[subModule];
312
+ if (!targetSubModule) {
313
+ console.error(`[RightsService] Submodule "${subModule}" does not exist under module "${module}". Available submodules:`);
314
+ return false;
315
+ }
316
+ if (!func) {
317
+ return targetSubModule['subModuleIsActive'] === true;
318
+ }
319
+ const targetFunc = targetSubModule[func];
320
+ if (!targetFunc) {
321
+ console.error(`[RightsService] Function "${func}" does not exist under submodule "${subModule}" in module "${module}". `);
322
+ return false;
323
+ }
324
+ return targetFunc['functionIsActive'] === true;
325
+ }
326
+ isModuleActive(rightsObj, module) {
327
+ return this.hasAccess(rightsObj, module);
328
+ }
329
+ isSubModuleActive(rightsObj, module, subModule) {
330
+ return this.hasAccess(rightsObj, module, subModule);
331
+ }
332
+ isFunctionActive(rightsObj, module, subModule, func) {
333
+ return this.hasAccess(rightsObj, module, subModule, func);
334
+ }
299
335
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: RightsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
300
336
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: RightsService, providedIn: 'root' }); }
301
337
  }
@@ -1668,6 +1704,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1668
1704
  }]
1669
1705
  }], ctorParameters: () => [{ type: i1.HttpClient }, { type: SettingsService }, { type: AuthService }] });
1670
1706
 
1707
+ var ModuleType;
1708
+ (function (ModuleType) {
1709
+ ModuleType["PRODUCTS"] = "Products";
1710
+ ModuleType["SALES"] = "Sales";
1711
+ ModuleType["SALESPLUS"] = "Salesplus";
1712
+ ModuleType["MEDIA"] = "Media";
1713
+ ModuleType["PUBLICATIONS"] = "Publications";
1714
+ ModuleType["BOMS"] = "Boms";
1715
+ ModuleType["CHANNELS"] = "Channels";
1716
+ ModuleType["SETTINGS"] = "Settings";
1717
+ ModuleType["WORKFLOWS"] = "Workflows";
1718
+ })(ModuleType || (ModuleType = {}));
1719
+
1720
+ var SubModuleType;
1721
+ (function (SubModuleType) {
1722
+ // Publications
1723
+ SubModuleType["PUBLICATIONS"] = "Projects";
1724
+ SubModuleType["PROJECTS"] = "Projects";
1725
+ SubModuleType["CATALOGS"] = "Catalogs";
1726
+ SubModuleType["MODELS"] = "Models";
1727
+ SubModuleType["PUBLICATION_IMPORTS"] = "PublicationImports";
1728
+ SubModuleType["PUBLICATION_EXPORTS"] = "PublicationExports";
1729
+ SubModuleType["PRODUCT_SHEETS"] = "ProductSheets";
1730
+ // Media
1731
+ SubModuleType["MEDIA_DAM_ASSETS"] = "DamAssets";
1732
+ SubModuleType["MEDIA_MISSING"] = "DamAssetsMissing";
1733
+ SubModuleType["MEDIA_ORPHANS"] = "DamAssetsOrhpans";
1734
+ SubModuleType["MEDIA_RECENTLY_DELETED"] = "DamAssetsRecentlyDeleted";
1735
+ SubModuleType["MEDIA_PROFILES"] = "DamAssetsProfiles";
1736
+ SubModuleType["MEDIA_SELECTIONS"] = "DamAssetsSelections";
1737
+ // Products
1738
+ SubModuleType["PRODUCTS_PRODUCTS"] = "Products";
1739
+ SubModuleType["PRODUCTS_CATEGORIES"] = "Categories";
1740
+ SubModuleType["PRODUCTS_SUPPLIERS"] = "Suppliers";
1741
+ SubModuleType["PRODUCTS_VIEWS"] = "Views";
1742
+ // Workflows
1743
+ SubModuleType["WORKFLOWS_WORKFLOWS"] = "Workflows";
1744
+ SubModuleType["WORKFLOWS_STEPS"] = "Steps";
1745
+ SubModuleType["WORKFLOWS_WORKROOMS"] = "Workrooms";
1746
+ SubModuleType["WORKFLOWS_COMPLETENESS_RULES"] = "CompletenessRules";
1747
+ SubModuleType["WORKFLOWS_HISTORY"] = "History";
1748
+ // Sales
1749
+ SubModuleType["SALES_ORDERS"] = "Orders";
1750
+ SubModuleType["SALES_QUOTES"] = "Quotes";
1751
+ SubModuleType["SALES_CUSTOMERS"] = "Customers";
1752
+ SubModuleType["SALES_REQUESTS"] = "Requests";
1753
+ // Boms
1754
+ SubModuleType["BOMS_BOMS"] = "Boms";
1755
+ // Channels
1756
+ SubModuleType["CHANNELS_CHANNELS"] = "Channels";
1757
+ // Settings
1758
+ SubModuleType["SETTINGS_ATTRIBUTES_PRODUCTS"] = "AttributesProducts";
1759
+ SubModuleType["SETTINGS_ATTRIBUTES_CATEGORIES"] = "AttributesCategories";
1760
+ SubModuleType["SETTINGS_ATTRIBUTES_SUPPLIERS"] = "AttributesSuppliers";
1761
+ SubModuleType["SETTINGS_ATTRIBUTES_ASSETS"] = "AttributesAssets";
1762
+ SubModuleType["SETTINGS_ATTRIBUTES_ACCOUNTS_CONTACTS"] = "AttributesAccountsContacts";
1763
+ SubModuleType["SETTINGS_ATTRIBUTES_ACCOUNTS"] = "AttributesAccounts";
1764
+ SubModuleType["SETTINGS_MASKS"] = "Masks";
1765
+ SubModuleType["SETTINGS_MAPPING"] = "Mapping";
1766
+ SubModuleType["SETTINGS_IMPORTS"] = "Imports";
1767
+ SubModuleType["SETTINGS_EXPORTS"] = "Exports";
1768
+ SubModuleType["SETTINGS_TEMPLATES_EXCEL"] = "TemplatesExcel";
1769
+ })(SubModuleType || (SubModuleType = {}));
1770
+
1671
1771
  class ViewsService {
1672
1772
  constructor(http, _settingsService) {
1673
1773
  this.http = http;
@@ -2207,23 +2307,22 @@ class MenuService {
2207
2307
  }
2208
2308
  defineMenuPublications() {
2209
2309
  const Projects = {
2210
- rights: this.rightsAccesModule['rights']['Publications']['Publications']['subModuleIsActive'],
2310
+ rights: this.rights.hasAccess(this.rightsAccesModule, ModuleType.PUBLICATIONS, SubModuleType.PROJECTS),
2211
2311
  text: this.publicationLabel,
2212
2312
  link: '/publications/listing',
2213
2313
  icon: 'fas fa-book-open',
2214
2314
  };
2215
- // this.rightsAccesModule['rights']['Publications']['Documents']['subModuleIsActive']
2216
2315
  const Separation = {
2217
2316
  text: this.separationLabel,
2218
2317
  };
2219
2318
  const Templates = {
2220
- rights: this.rightsAccesModule['rights']['Publications']['PublicationTemplates']['subModuleIsActive'],
2319
+ rights: this.rights.hasAccess(this.rightsAccesModule, ModuleType.PUBLICATIONS, SubModuleType.MODELS),
2221
2320
  text: this.publicationTemplatesLabel,
2222
2321
  link: '/publications/templates',
2223
2322
  icon: 'fas fa-file-pen',
2224
2323
  };
2225
2324
  const ProductSheets = {
2226
- rights: this.rightsAccesModule['rights']['Publications']['ProductSheets']['subModuleIsActive'],
2325
+ rights: this.rights.hasAccess(this.rightsAccesModule, ModuleType.PUBLICATIONS, SubModuleType.PRODUCT_SHEETS),
2227
2326
  text: this.publicationProductSheetsLabel,
2228
2327
  link: '/publications/productSheets',
2229
2328
  icon: 'fas fa-database',
@@ -2769,6 +2868,163 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2769
2868
  type: Injectable
2770
2869
  }], ctorParameters: () => [{ type: i1$1.TranslateService }, { type: i1.HttpClient }, { type: RightsService }, { type: i3.Router }, { type: ViewsService }] });
2771
2870
 
2871
+ var FunctionType;
2872
+ (function (FunctionType) {
2873
+ // =========================================================================
2874
+ // 1. PRODUCTS
2875
+ // =========================================================================
2876
+ // Product Sheets
2877
+ FunctionType["MODIFY"] = "Modify";
2878
+ FunctionType["ADD"] = "Add";
2879
+ FunctionType["DELETE"] = "Delete";
2880
+ FunctionType["DUPLICATE"] = "Duplicate";
2881
+ FunctionType["MASS_UPDATE"] = "MassUpdate";
2882
+ FunctionType["ASSIGN_TO_CHANNEL"] = "AssignToChannel";
2883
+ FunctionType["EXPORT_FILE_WITH_FILTER"] = "ExportFileWithFilter";
2884
+ FunctionType["GENERATE_TECHNICAL_SHEET"] = "GenerateTechnicalSheet";
2885
+ FunctionType["EXPORT_FILE_WITH_TEMPLATE"] = "ExportFileWithTemplate";
2886
+ FunctionType["GENERATE_TECHNICAL_SHEET_BATCH"] = "GenerateTechnicalSheetBatch";
2887
+ // Versions
2888
+ FunctionType["UPDATE"] = "Update";
2889
+ FunctionType["PUBLISH"] = "Publish";
2890
+ // Categories
2891
+ FunctionType["RE_ORDER"] = "ReOrder";
2892
+ // =========================================================================
2893
+ // 2. SALES
2894
+ // =========================================================================
2895
+ // Orders
2896
+ FunctionType["CHANGE_STATE"] = "ChangeState";
2897
+ FunctionType["REGENERATE_PDF"] = "RegeneratePDF";
2898
+ FunctionType["DOWNLOAD_PDF"] = "DownloadPDF";
2899
+ FunctionType["SEND"] = "Send";
2900
+ // Customers
2901
+ FunctionType["GEOLOCATE"] = "Geolocate";
2902
+ // Requests
2903
+ FunctionType["CONVERT"] = "Convert";
2904
+ FunctionType["READ"] = "Read";
2905
+ FunctionType["REPLY"] = "Reply";
2906
+ // =========================================================================
2907
+ // 3. MEDIA
2908
+ // =========================================================================
2909
+ // Library (DamAssets)
2910
+ FunctionType["ADD_FOLDER"] = "AddFolder";
2911
+ FunctionType["DELETE_FOLDER"] = "DeleteFolder";
2912
+ FunctionType["MOVE_FOLDER"] = "MoveFolder";
2913
+ FunctionType["DOWNLOAD_FOLDER"] = "DownloadFolder";
2914
+ FunctionType["RENAME_FOLDER"] = "RenameFolder";
2915
+ FunctionType["ASSIGN_TEAM"] = "AssignTeam";
2916
+ FunctionType["COPY_FOLDER_GUID"] = "CopyFolderGuid";
2917
+ FunctionType["UPLOAD"] = "Upload";
2918
+ FunctionType["MOVE"] = "Move";
2919
+ FunctionType["RENAME"] = "Rename";
2920
+ FunctionType["COPY_URL"] = "CopyURL";
2921
+ FunctionType["SHARE_PHOTO"] = "SharePhoto";
2922
+ FunctionType["OPEN_IN_NEW_TAB"] = "OpenInNewTab";
2923
+ FunctionType["CHANGE_STATUS"] = "ChangeStatus";
2924
+ FunctionType["AUTO_TAG"] = "AutoTag";
2925
+ FunctionType["REMOVE_BACKGROUND"] = "RemoveBackground";
2926
+ FunctionType["DOWNLOAD"] = "Download";
2927
+ FunctionType["MEDIA_TREATMENT"] = "MediaTreatment";
2928
+ // Recently Deleted Assets
2929
+ FunctionType["RESTORE"] = "Restore";
2930
+ FunctionType["SHOW_ALL"] = "ShowAll";
2931
+ // Media Selections
2932
+ FunctionType["REGENERATE"] = "Regenerate";
2933
+ // =========================================================================
2934
+ // 4. PUBLICATIONS
2935
+ // =========================================================================
2936
+ // Models (Templates)
2937
+ FunctionType["ADD_CALLOUT"] = "AddCallout";
2938
+ // Documents
2939
+ FunctionType["REVIEW"] = "Review";
2940
+ // Publications Projects
2941
+ FunctionType["ADD_YOUBOOKY"] = "AddYouBooky";
2942
+ FunctionType["ADD_DOCUMENT"] = "AddDocument";
2943
+ FunctionType["ADD_TECHNICAL_SHEETS"] = "AddTechnicalSheets";
2944
+ FunctionType["ADD_CATALOG"] = "AddCatalog";
2945
+ FunctionType["CONFIGURE_PROJECT"] = "ConfigureProject";
2946
+ FunctionType["GENERATE_CATALOG"] = "GenerateCatalog";
2947
+ FunctionType["GENERATE_DATA_SHEET"] = "GenerateDataSheet";
2948
+ FunctionType["GENERATE_HD"] = "GenerateHD";
2949
+ FunctionType["GENERATE_CMYK"] = "GenerateCMYK";
2950
+ FunctionType["FLIPBOOK"] = "Flipbook";
2951
+ FunctionType["REVIEWER"] = "Reviewer";
2952
+ FunctionType["MANAGE_FONTS"] = "ManageFonts";
2953
+ FunctionType["YOU_BOOKY"] = "YouBooky";
2954
+ // Publications Catalogs
2955
+ FunctionType["AUTO_GENERATION"] = "AutoGeneration";
2956
+ FunctionType["PREVIEW_AUTO_GENERATION"] = "PreviewAutoGeneration";
2957
+ FunctionType["CREATE_VERSION"] = "CreateVersion";
2958
+ FunctionType["GENERATE_XML"] = "GenerateXML";
2959
+ FunctionType["EXPORT_EXCEL_DATA"] = "ExportExcelData";
2960
+ FunctionType["ADD_SECTION"] = "AddSection";
2961
+ FunctionType["DUPLICATE_SECTION"] = "DuplicateSection";
2962
+ FunctionType["CONFIGURE_SECTION"] = "ConfigureSection";
2963
+ FunctionType["DELETE_SECTION"] = "DeleteSection";
2964
+ FunctionType["ADD_PRODUCT"] = "AddProduct";
2965
+ FunctionType["ADD_PRODUCTS"] = "AddProduct";
2966
+ FunctionType["CONFIGURE_PRODUCT"] = "ConfigureProduct";
2967
+ FunctionType["REMOVE_PRODUCT"] = "RemoveProduct";
2968
+ FunctionType["REMOVE_PRODUCTS"] = "RemoveProduct";
2969
+ FunctionType["MOVE_PRODUCTS"] = "MoveProducts";
2970
+ FunctionType["REORDER_PRODUCTS"] = "ReorderProducts";
2971
+ FunctionType["MASS_ADD_PRODUCTS"] = "MassAddProducts";
2972
+ FunctionType["MASS_EXCLUDE_PRODUCTS"] = "MassExcludeProducts";
2973
+ FunctionType["MASS_EDIT_PRICES"] = "MassEditPrices";
2974
+ FunctionType["ADD_LINE_BREAK"] = "AddLineBreak";
2975
+ FunctionType["ADD_PAGE_BREAK"] = "AddPageBreak";
2976
+ FunctionType["ADD_CALLOUT_ELEMENT"] = "AddCalloutElement";
2977
+ // Product Sheets (Publication Submodule)
2978
+ FunctionType["ADD_PRODUCT_SHEET"] = "AddProductSheet";
2979
+ FunctionType["EDIT_PRODUCT_SHEET"] = "EditProductSheet";
2980
+ FunctionType["REMOVE_PRODUCT_SHEET"] = "RemoveProductSheet";
2981
+ FunctionType["ADD_PRODUCT_SHEET_COLUMN"] = "AddProductSheetColumn";
2982
+ FunctionType["EDIT_PRODUCT_SHEET_COLUMN"] = "EditProductSheetColumn";
2983
+ FunctionType["REMOVE_PRODUCT_SHEET_COLUMN"] = "RemoveProductSheetColumn";
2984
+ FunctionType["ADD_PRODUCT_SHEET_LINE"] = "AddProductSheetLine";
2985
+ FunctionType["EDIT_PRODUCT_SHEET_LINE"] = "EditProductSheetLine";
2986
+ FunctionType["REMOVE_PRODUCT_SHEET_LINE"] = "RemoveProductSheetLine";
2987
+ FunctionType["IMPORT_PRODUCT_SHEET_PASTE"] = "ImportProductSheetPaste";
2988
+ FunctionType["IMPORT_PRODUCT_SHEET_FILE"] = "ImportProductSheetFile";
2989
+ // =========================================================================
2990
+ // 5. BOMS
2991
+ // =========================================================================
2992
+ FunctionType["ADD_COMPONENT"] = "AddComponent";
2993
+ FunctionType["DELETE_COMPONENT"] = "DeleteComponent";
2994
+ // =========================================================================
2995
+ // 6. CHANNELS
2996
+ // =========================================================================
2997
+ FunctionType["ADD_B2B"] = "AddB2B";
2998
+ FunctionType["ADD_PRESTASHOP"] = "AddPrestashop";
2999
+ FunctionType["ADD_STORYBLOK"] = "AddStoryblok";
3000
+ // =========================================================================
3001
+ // 7. SETTINGS
3002
+ // =========================================================================
3003
+ // Attributes
3004
+ FunctionType["ADD_GROUP"] = "AddGroup";
3005
+ FunctionType["DELETE_GROUP"] = "DeleteGroup";
3006
+ FunctionType["ADD_ATTRIBUTE"] = "AddAttribute";
3007
+ FunctionType["DELETE_ATTRIBUTE"] = "DeleteAttribute";
3008
+ FunctionType["RESTORE_ATTRIBUTE"] = "RestoreAttribute";
3009
+ // Scheduled Tasks (Batch)
3010
+ FunctionType["EXECUTE"] = "Execute";
3011
+ // Imports / Exports
3012
+ FunctionType["IMPORT_PRODUCTS"] = "ImportProducts";
3013
+ FunctionType["IMPORT_SALES"] = "ImportSales";
3014
+ FunctionType["IMPORT_ATTRIBUTES"] = "ImportAttributes";
3015
+ FunctionType["IMPORT_ASSETS"] = "ImportAssets";
3016
+ FunctionType["EXPORT_PRODUCTS"] = "ExportProducts";
3017
+ FunctionType["EXPORT_SALES"] = "ExportSales";
3018
+ FunctionType["EXPORT_ASSETS"] = "ExportAssets";
3019
+ // Completeness Rules
3020
+ FunctionType["ADD_STANDARD"] = "AddStandard";
3021
+ FunctionType["DELETE_STANDARD"] = "DeleteStandard";
3022
+ FunctionType["UPDATE_STANDARD"] = "UpdateStandard";
3023
+ FunctionType["ADD_CONDITION"] = "AddCondition";
3024
+ FunctionType["DELETE_CONDITION"] = "DeleteCondition";
3025
+ FunctionType["UPDATE_CONDITION"] = "UpdateCondition";
3026
+ })(FunctionType || (FunctionType = {}));
3027
+
2772
3028
  class RoleService {
2773
3029
  constructor(authorizationDataService) {
2774
3030
  this.authorizationDataService = authorizationDataService;
@@ -12847,13 +13103,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
12847
13103
  var ProjectType;
12848
13104
  (function (ProjectType) {
12849
13105
  // DEPRECATED
12850
- ProjectType["STATIC"] = "static";
12851
- ProjectType["DYNAMIC"] = "dynamic";
13106
+ ProjectType["STATIC"] = "STATIC";
13107
+ ProjectType["DYNAMIC"] = "DYNAMIC";
12852
13108
  // CURRENT
12853
- ProjectType["YOUBOOKY"] = "youbooky";
12854
- ProjectType["DOCUMENT"] = "document";
12855
- ProjectType["CATALOGUE"] = "catalogue";
12856
- ProjectType["TECHNICAL_SHEET"] = "technicalSheet";
13109
+ ProjectType["YOUBOOKY"] = "YOUBOOKY";
13110
+ ProjectType["DOCUMENT"] = "DOCUMENT";
13111
+ ProjectType["CATALOG"] = "CATALOG";
13112
+ ProjectType["TECHNICAL_SHEET"] = "DATASHEET";
12857
13113
  })(ProjectType || (ProjectType = {}));
12858
13114
 
12859
13115
  class PublicationPage {
@@ -12863,6 +13119,7 @@ class PublicationPage {
12863
13119
  this._name = '';
12864
13120
  this._status = 0; // PageStatus enum: Draft = 0, Waiting = 1, Ready = 2, InProcess = 3
12865
13121
  this._background = '';
13122
+ this._gabarit = '';
12866
13123
  this._order = 0;
12867
13124
  this._modifiedAt = null;
12868
13125
  this._type = 'SKUS';
@@ -12873,6 +13130,7 @@ class PublicationPage {
12873
13130
  this.name = data.name ?? '';
12874
13131
  this.status = data.status ?? 0;
12875
13132
  this.background = data.background ?? '';
13133
+ this.gabarit = data.gabarit ?? '';
12876
13134
  this.order = data.order ?? 0;
12877
13135
  this.modifiedAt = data.modifiedAt ?? null;
12878
13136
  this.type = data.type ?? 'SKUS';
@@ -12909,6 +13167,12 @@ class PublicationPage {
12909
13167
  set background(value) {
12910
13168
  this._background = value || '';
12911
13169
  }
13170
+ get gabarit() {
13171
+ return this._gabarit;
13172
+ }
13173
+ set gabarit(value) {
13174
+ this._gabarit = value || '';
13175
+ }
12912
13176
  get order() {
12913
13177
  return this._order;
12914
13178
  }
@@ -12946,6 +13210,7 @@ class PublicationPage {
12946
13210
  name: this.name,
12947
13211
  status: this.status,
12948
13212
  background: this.background,
13213
+ gabarit: this.gabarit,
12949
13214
  order: this.order,
12950
13215
  modifiedAt: this.modifiedAt,
12951
13216
  type: this.type,
@@ -13029,7 +13294,8 @@ class Publication {
13029
13294
  this.publicationContents = data.publicationContents ?? '';
13030
13295
  this.publicationMasterSpreads = data.publicationMasterSpreads ?? '';
13031
13296
  this.publicationFormat = data.publicationFormat ?? '';
13032
- this.publicationOrientationPortrait = data.publicationOrientationPortrait ?? false;
13297
+ this.publicationOrientationPortrait =
13298
+ data.publicationOrientationPortrait ?? false;
13033
13299
  this.publicationPreview = data.publicationPreview ?? '';
13034
13300
  this.publicationDraft = data.publicationDraft ?? '';
13035
13301
  this.publicationBeta = data.publicationBeta ?? '';
@@ -13041,31 +13307,39 @@ class Publication {
13041
13307
  this.publicationPageStart = data.publicationPageStart ?? 1;
13042
13308
  this.publicationPageStartLeft = data.publicationPageStartLeft ?? false;
13043
13309
  this.selectionCode = data.selectionCode ?? data.SelectionCode ?? '';
13044
- this.publicationTemplateGuid = data.publicationTemplateGuid ?? DEFAULT_PUBLICATION_STR;
13310
+ this.publicationTemplateGuid =
13311
+ data.publicationTemplateGuid ?? DEFAULT_PUBLICATION_STR;
13045
13312
  this.publicationCoverpage = data.publicationCoverpage ?? '';
13046
13313
  this.publicationDealGuid = data.publicationDealGuid ?? '';
13047
13314
  this.publicationRatebase = data.publicationRatebase ?? 0;
13048
- this.publicationPriceListGuid = data.publicationPriceListGuid ?? DEFAULT_PUBLICATION_STR;
13315
+ this.publicationPriceListGuid =
13316
+ data.publicationPriceListGuid ?? DEFAULT_PUBLICATION_STR;
13049
13317
  this.publicationAccountGuid = data.publicationAccountGuid ?? '';
13050
13318
  this.publicationAttributes = data.publicationAttributes ?? [];
13051
13319
  this.publicationLanguage = data.publicationLanguage ?? '';
13052
13320
  this.publicationAutoGeneration = data.publicationAutoGeneration ?? true;
13053
13321
  this.publicationYouBooky = data.publicationYouBooky ?? false;
13054
13322
  this.publicationProductSheetGuid = data.publicationProductSheetGuid ?? null;
13055
- this.publicationProductSheetAssetGuid = data.publicationProductSheetAssetGuid ?? null;
13323
+ this.publicationProductSheetAssetGuid =
13324
+ data.publicationProductSheetAssetGuid ?? null;
13056
13325
  this.publicationRelecturePDFs = data.publicationRelecturePDFs ?? [];
13057
- this.publicationTemplateDefaultBackgroundGuid = data.publicationTemplateDefaultBackgroundGuid ?? '';
13326
+ this.publicationTemplateDefaultBackgroundGuid =
13327
+ data.publicationTemplateDefaultBackgroundGuid ?? '';
13058
13328
  this.publicationPageIdFirst = data.publicationPageIdFirst ?? '';
13059
- this.publicationTemplateBackgroundName = data.publicationTemplateBackgroundName ?? '';
13329
+ this.publicationTemplateBackgroundName =
13330
+ data.publicationTemplateBackgroundName ?? '';
13060
13331
  this.publicationPreviewUrl = data.publicationPreviewUrl ?? '';
13061
13332
  this.publicationTemplateName = data.publicationTemplateName ?? '';
13062
13333
  this.publicationCoverpageUrl = data.publicationCoverpageUrl ?? '';
13063
13334
  this.publicationNbPages = data.publicationNbPages ?? 0;
13064
13335
  this.publicationNbSkus = data.publicationNbSkus ?? 0;
13065
- this._publicationFolderGuid = data.publicationFolderGuid ?? data.PublicationFolderGuid ?? '';
13336
+ this._publicationFolderGuid =
13337
+ data.publicationFolderGuid ?? data.PublicationFolderGuid ?? '';
13066
13338
  if (data.publicationPages) {
13067
13339
  const pages = data.publicationPages;
13068
- this._publicationPages = Array.isArray(pages) ? pages.map((p) => new PublicationPage(p)) : [];
13340
+ this._publicationPages = Array.isArray(pages)
13341
+ ? pages.map((p) => new PublicationPage(p))
13342
+ : [];
13069
13343
  }
13070
13344
  else {
13071
13345
  this._publicationPages = [];
@@ -14245,7 +14519,10 @@ class PublicationsService {
14245
14519
  publicationPriceListGuid: publication.publicationPriceListGuid,
14246
14520
  publicationAccountGuid: publication.publicationAccountGuid,
14247
14521
  publicationLanguage: publication.publicationLanguage,
14522
+ publicationType: publication.publicationType,
14248
14523
  publicationProductSheetGuid: publication.publicationProductSheetGuid,
14524
+ publicationProductSheetAssetGuid: publication.publicationProductSheetAssetGuid,
14525
+ publicationPages: publication.publicationPages?.map((p) => typeof p.toJSON === 'function' ? p.toJSON() : p) || [],
14249
14526
  }, options)
14250
14527
  .pipe(finalize(() => {
14251
14528
  if (this._webSocket.connection?.state === HubConnectionState.Connected) {
@@ -14839,6 +15116,31 @@ class PublicationsService {
14839
15116
  this._webSocket.connection.invoke('refresh', 'dashboardRefresh');
14840
15117
  }));
14841
15118
  }
15119
+ // ***********************************************************************************
15120
+ // * DATASHEET / TECHNICAL SHEET
15121
+ // ***********************************************************************************
15122
+ getPublicationDatasheetStatus(publicationGuid, options) {
15123
+ const headers = this._settingsService.getHeaders();
15124
+ const queryParams = [];
15125
+ if (options?.page)
15126
+ queryParams.push(`page=${options.page}`);
15127
+ if (options?.pageSize)
15128
+ queryParams.push(`pageSize=${options.pageSize}`);
15129
+ if (options?.search)
15130
+ queryParams.push(`search=${encodeURIComponent(options.search)}`);
15131
+ if (options?.filterStatus)
15132
+ queryParams.push(`filterStatus=${options.filterStatus}`);
15133
+ if (options?.level)
15134
+ queryParams.push(`level=${options.level}`);
15135
+ const queryString = queryParams.length > 0 ? `?${queryParams.join('&')}` : '';
15136
+ const url = `${this._settingsService.getSettings('apiUrl')}Publications/${publicationGuid}/datasheet-status${queryString}`;
15137
+ return this.http.get(url, { headers });
15138
+ }
15139
+ checkDatasheetSkuDocumentExists(publicationGuid, sku) {
15140
+ const headers = this._settingsService.getHeaders();
15141
+ const url = `${this._settingsService.getSettings('apiUrl')}Publications/${publicationGuid}/datasheet-sku-exists?sku=${encodeURIComponent(sku)}`;
15142
+ return this.http.get(url, { headers });
15143
+ }
14842
15144
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PublicationsService, deps: [{ token: SettingsService }, { token: i1.HttpClient }, { token: websocketService }], target: i0.ɵɵFactoryTarget.Injectable }); }
14843
15145
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PublicationsService, providedIn: 'root' }); }
14844
15146
  }
@@ -15952,6 +16254,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
15952
16254
  }]
15953
16255
  }], ctorParameters: () => [{ type: SettingsService }, { type: i1.HttpClient }, { type: websocketService }] });
15954
16256
 
16257
+ var AssetType;
16258
+ (function (AssetType) {
16259
+ AssetType["IMAGE"] = "image";
16260
+ AssetType["IMAGE_MULTILANG"] = "imagemultilang";
16261
+ AssetType["AUDIO"] = "audio";
16262
+ AssetType["VIDEO"] = "video";
16263
+ AssetType["FILE"] = "file";
16264
+ AssetType["PRODUCTSHEET"] = "productSheet";
16265
+ AssetType["DATASHEETFILE"] = "datasheetfile";
16266
+ AssetType["DOCUMENT"] = "document";
16267
+ AssetType["PUBLICATION"] = "publication";
16268
+ AssetType["TEMPLATE"] = "template";
16269
+ AssetType["CALLOUT"] = "callout";
16270
+ AssetType["PROJECT"] = "project";
16271
+ AssetType["FILE_MULTILANG"] = "filemultilang";
16272
+ AssetType["FILE_TRAD"] = "filetrad";
16273
+ AssetType["FILES"] = "files";
16274
+ AssetType["FILES_TRAD"] = "filestrad";
16275
+ })(AssetType || (AssetType = {}));
16276
+
15955
16277
  class DashboardService {
15956
16278
  constructor(_settings, http) {
15957
16279
  this._settings = _settings;
@@ -16116,5 +16438,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
16116
16438
  * Generated bundle index. Do not edit.
16117
16439
  */
16118
16440
 
16119
- export { AccountsService, AllLanguagesService, AttributesService, AuthService, AuthTwoFactorService, BatchService, BomService, BomsitemsService, CataloguesService, CategoriesService, ChannelsService, CmsService, ColorsService, CompaniesService, CompanyService, CompletenessService, DEFAULT_PUBLICATION_STR, DEFAULT_TEMPLATEGUID, DamAssetsProfilesService, DamAssetsSelectionsService, DamAssetsService, DashboardService, Document, DocumentCommentService, DocumentsService, EasypiechartDirective, EcoTaxService, ExchangesConfigurationsService, ExportsService, FrameworkagreementsService, GenerationService, ImportsService, InformationsService, LocaleNumberPipe, LoginService, MappingsService, MasksService, MediaSelectionDeclinaisonService, MediaSelectionService, MenuService, NotificationServiceService, OpenAiService, OrdersService, OrganizationsService, PresetsService, PricesTaxService, ProductSheetsService, ProfilesService, ProjectType, PromotionsService, PromptsService, Publication, PublicationBreak, PublicationData, PublicationDataType, PublicationPage, PublicationTemplate, PublicationsService, PublicationsTemplatesService, QuotesService, ReportsService, RequestsService, RightsService, RoleService, RouterExtServiceService, RulesCompletenessService, SOLIDPEPPER_API_URL, SOLIDPEPPER_TOKEN_GETTER, SalersService, SearchDamAssetsService, SearchService, SearchsService, SettingsService, SidebarRightService, SkusDeclinaisonsService, SkusPricesService, SkusService, SkusSuppliersService, SkusTrackingService, StatusService, StocksService, StripeService, SuppliersService, TeamsService, Template, TemplatesService, ThumbnailService, TimeElapsedPipe, TranslateService, TranslatorService, UsersService, UtilsService, ViewsService, WorkflowsDesksService, WorkflowsGlobalStepsService, WorkflowsHistoricalService, WorkflowsRulesService, websocketService };
16441
+ export { AccountsService, AllLanguagesService, AssetType, AttributesService, AuthService, AuthTwoFactorService, BatchService, BomService, BomsitemsService, CataloguesService, CategoriesService, ChannelsService, CmsService, ColorsService, CompaniesService, CompanyService, CompletenessService, DEFAULT_PUBLICATION_STR, DEFAULT_TEMPLATEGUID, DamAssetsProfilesService, DamAssetsSelectionsService, DamAssetsService, DashboardService, Document, DocumentCommentService, DocumentsService, EasypiechartDirective, EcoTaxService, ExchangesConfigurationsService, ExportsService, FrameworkagreementsService, FunctionType, GenerationService, ImportsService, InformationsService, LocaleNumberPipe, LoginService, MappingsService, MasksService, MediaSelectionDeclinaisonService, MediaSelectionService, MenuService, ModuleType, NotificationServiceService, OpenAiService, OrdersService, OrganizationsService, PresetsService, PricesTaxService, ProductSheetsService, ProfilesService, ProjectType, PromotionsService, PromptsService, Publication, PublicationBreak, PublicationData, PublicationDataType, PublicationPage, PublicationTemplate, PublicationsService, PublicationsTemplatesService, QuotesService, ReportsService, RequestsService, RightsService, RoleService, RouterExtServiceService, RulesCompletenessService, SOLIDPEPPER_API_URL, SOLIDPEPPER_TOKEN_GETTER, SalersService, SearchDamAssetsService, SearchService, SearchsService, SettingsService, SidebarRightService, SkusDeclinaisonsService, SkusPricesService, SkusService, SkusSuppliersService, SkusTrackingService, StatusService, StocksService, StripeService, SubModuleType, SuppliersService, TeamsService, Template, TemplatesService, ThumbnailService, TimeElapsedPipe, TranslateService, TranslatorService, UsersService, UtilsService, ViewsService, WorkflowsDesksService, WorkflowsGlobalStepsService, WorkflowsHistoricalService, WorkflowsRulesService, websocketService };
16120
16442
  //# sourceMappingURL=solidpepper-solidpepper-service.mjs.map