@arsedizioni/ars-utils 18.2.48 → 18.2.49

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.
@@ -1342,6 +1342,44 @@ const ClipperSources = [
1342
1342
  name: 'Fonti diverse',
1343
1343
  }
1344
1344
  ];
1345
+ class ClipperChannelSettings {
1346
+ constructor() {
1347
+ this.isEnabled = false;
1348
+ this.isActive = false;
1349
+ this.sectors = [];
1350
+ this.regions = [];
1351
+ }
1352
+ /**
1353
+ * Check at least one of sector values is contained in sectors list
1354
+ * @param values : the admitted values
1355
+ * @returns true if at least one value has been found
1356
+ */
1357
+ hasAnyOfSectors(values) {
1358
+ if (this.isEnabled === true && this.isActive === true) {
1359
+ for (let i = 0; i < values.length; i++) {
1360
+ if (this.sectors.filter(n => n.value === values[i])?.length > 0) {
1361
+ return true;
1362
+ }
1363
+ }
1364
+ }
1365
+ return false;
1366
+ }
1367
+ /**
1368
+ * Check at least one of region values is contained in regions list
1369
+ * @param values : the admitted values
1370
+ * @returns true if at least one value has been found
1371
+ */
1372
+ hasAnyOfRegions(values) {
1373
+ if (this.isEnabled === true && this.isActive === true) {
1374
+ for (let i = 0; i < values.length; i++) {
1375
+ if (this.regions.filter(n => n.value === values[i])?.length > 0) {
1376
+ return true;
1377
+ }
1378
+ }
1379
+ }
1380
+ return false;
1381
+ }
1382
+ }
1345
1383
  class ClipperSearchParams {
1346
1384
  constructor() {
1347
1385
  this.version = 6;
@@ -2316,5 +2354,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImpor
2316
2354
  * Generated bundle index. Do not edit.
2317
2355
  */
2318
2356
 
2319
- export { ArsClipperCommonModule, ClipperAuthors, ClipperChannel, ClipperChannels, ClipperDocumentChangeReason, ClipperDocumentContainer, ClipperExportDocumentsFormat, ClipperFacet, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryReferencesMode, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperSort, ClipperSources, ClipperUtils };
2357
+ export { ArsClipperCommonModule, ClipperAuthors, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperDocumentChangeReason, ClipperDocumentContainer, ClipperExportDocumentsFormat, ClipperFacet, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryReferencesMode, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperSort, ClipperSources, ClipperUtils };
2320
2358
  //# sourceMappingURL=arsedizioni-ars-utils-clipper.common.mjs.map