@startinblox/components-ds4go 3.0.2 → 3.1.0

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 (33) hide show
  1. package/.storybook/preview.ts +1 -0
  2. package/biome.json +1 -1
  3. package/dist/custom-getter-ZPFnoSjt-BCNOlbJZ-B4tuxA42.js +338 -0
  4. package/dist/en-BySYJZMr-CWZl5AwU-CWZl5AwU.js +14 -0
  5. package/dist/fr-BZZDTsmw-CNDWt66j-CNDWt66j.js +14 -0
  6. package/dist/index-BSwVRtNS.js +104980 -0
  7. package/dist/index.js +1 -3032
  8. package/dist/quill.snow-C_A_QkE8-D-uedtvC-D-uedtvC.js +13 -0
  9. package/dist/slimselect-NFLzJMfV-DZ7j6Vsj-DZ7j6Vsj.js +5 -0
  10. package/package.json +9 -8
  11. package/src/components/cards/ds4go-card-catalog.ts +132 -0
  12. package/src/components/catalog/ds4go-catalog-filter-holder.ts +459 -0
  13. package/src/components/catalog/ds4go-customer-holder.ts +162 -0
  14. package/src/components/catalog/ds4go-fact-bundle-holder.ts +7 -7
  15. package/src/components/modal/ds4go-customer-modal.ts +134 -0
  16. package/src/components/modal/ds4go-fact-bundle-modal.ts +2 -2
  17. package/src/components/solid-customer-list.ts +195 -0
  18. package/src/components/solid-dsif-explorer-poc.ts +8 -8
  19. package/src/components/solid-dsp-connector.ts +12 -4
  20. package/src/components/solid-fact-bundle-creation.ts +266 -169
  21. package/src/components/solid-fact-bundle.ts +9 -4
  22. package/src/helpers/components/orbitComponent.ts +12 -13
  23. package/src/helpers/i18n/configureLocalization.ts +12 -5
  24. package/src/helpers/index.ts +0 -2
  25. package/src/styles/cards/ds4go-card-catalog.scss +149 -0
  26. package/src/styles/fact-bundle-creation.scss +6 -2
  27. package/src/styles/modal/ds4go-customer-modal.scss +91 -0
  28. package/src/styles/modal/ds4go-fact-bundle-modal.scss +1 -1
  29. package/vite.config.ts +7 -7
  30. package/src/components/solid-boilerplate.ts +0 -76
  31. package/src/helpers/components/ResourceMapper.ts +0 -469
  32. package/src/helpers/components/orbitDspComponent.ts +0 -250
  33. package/src/helpers/mappings/dsp-mapping-config.ts +0 -545
@@ -17,6 +17,13 @@ import ComponentStyles from "@styles/fact-bundle-creation.scss?inline";
17
17
  import { html, nothing, unsafeCSS } from "lit";
18
18
  import { customElement, property, state } from "lit/decorators.js";
19
19
 
20
+ const formatCase = (str: string) => {
21
+ return str
22
+ .replace(/([A-Z])/g, " $1")
23
+ .replace(/^./, (str) => str.toUpperCase())
24
+ .trim();
25
+ }
26
+
20
27
  @customElement("solid-fact-bundle-creation")
21
28
  export class SolidFactBundle extends OrbitComponent {
22
29
  static styles = [unsafeCSS(ComponentStyles)];
@@ -36,9 +43,15 @@ export class SolidFactBundle extends OrbitComponent {
36
43
  @state()
37
44
  bundleDescription = "";
38
45
 
46
+ @state()
47
+ bundleCategory = "";
48
+
39
49
  @state()
40
50
  bundleLanguage = "en";
41
51
 
52
+ @state()
53
+ step = 0;
54
+
42
55
  policyTemplates: { id: string; name: string; policy: OdrlPolicy }[] = [
43
56
  {
44
57
  id: "policy-open-access",
@@ -73,7 +86,9 @@ export class SolidFactBundle extends OrbitComponent {
73
86
 
74
87
  async _afterAttach() {
75
88
  // use this.dspConnector.instance to reach the connector
76
- this.dspConnector = this.orbit?.components.find((c) => c.type === "dsp-connector");
89
+ this.dspConnector = this.orbit?.components.find(
90
+ (c) => c.type === "dsp-connector",
91
+ );
77
92
 
78
93
  return Promise.resolve();
79
94
  }
@@ -119,17 +134,19 @@ export class SolidFactBundle extends OrbitComponent {
119
134
  this.facts = [];
120
135
  }
121
136
 
137
+ const factsWithoutSelected = this.facts.filter(
138
+ (fact: Resource) => !selectedFacts.includes(fact),
139
+ );
140
+
122
141
  if (filterText) {
123
- return sort(
124
- filterObjectByValue(
125
- this.facts.filter(
126
- (fact: Resource) => !selectedFacts.includes(fact),
127
- ),
128
- filterText,
129
- ),
130
- "name",
131
- "asc",
142
+ const filteredFacts = filterObjectByValue(
143
+ factsWithoutSelected,
144
+ filterText,
132
145
  );
146
+ if (filteredFacts.length > 0) {
147
+ return sort(filteredFacts, "name", "asc");
148
+ }
149
+ return [];
133
150
  }
134
151
 
135
152
  if (selectedFacts.length === 0) {
@@ -138,13 +155,11 @@ export class SolidFactBundle extends OrbitComponent {
138
155
  Math.floor((window.innerHeight - 255) / 500);
139
156
  }
140
157
 
141
- return sort(
142
- this.facts.filter(
143
- (fact: Resource) => !this.selectedFacts.includes(fact),
144
- ),
145
- "name",
146
- "asc",
147
- );
158
+ if (factsWithoutSelected.length > 0) {
159
+ return sort(factsWithoutSelected, "name", "asc");
160
+ }
161
+
162
+ return [];
148
163
  },
149
164
  args: () => [
150
165
  this.factsSrc,
@@ -163,6 +178,12 @@ export class SolidFactBundle extends OrbitComponent {
163
178
  this.spliceLength = this.facts.length;
164
179
  }
165
180
 
181
+ _nextStep() {
182
+ if (this.selectedFacts.length > 0) {
183
+ this.step++;
184
+ }
185
+ }
186
+
166
187
  async _createFactBundle() {
167
188
  if (!this.bundleName || !(this.selectedFacts.length > 0)) {
168
189
  return;
@@ -175,6 +196,7 @@ export class SolidFactBundle extends OrbitComponent {
175
196
  ],
176
197
  "@type": ["ldp:Container", "ds4go:FactBundle"],
177
198
  name: this.bundleName,
199
+ category: this.bundleCategory,
178
200
  description: this.bundleDescription || "",
179
201
  "ldp:contains": this.selectedFacts.map((fact: Resource) => ({
180
202
  "@id": fact["@id"],
@@ -215,7 +237,21 @@ export class SolidFactBundle extends OrbitComponent {
215
237
  name: this.bundleName,
216
238
  description: this.bundleDescription,
217
239
  contenttype: "application/ld+json",
218
- language: this.bundleLanguage,
240
+ "dcterms:language": this.bundleLanguage,
241
+ category: this.bundleCategory,
242
+ bundleSize: this.selectedFacts.length,
243
+ offeredAccess: "40",
244
+ pricingTier: "premium",
245
+ // "dcat:endpointUrl": "https://api.stg.ds4go.startinblox.com/facts/", // ?
246
+ previewLinks: this.selectedFacts.slice(0, 3).join(", "),
247
+ "dsif:pricing": {
248
+ "dsif:costPerAPICall": 0.15,
249
+ "dsif:setupFee": 50,
250
+ "dsif:billingPeriod": "monthly",
251
+ "dsif:currency": "EUR",
252
+ "dsif:description":
253
+ "Premium tier: 40 API calls/month, ideal for media organizations",
254
+ },
219
255
  },
220
256
  dataAddress: {
221
257
  "@type": "DataAddress",
@@ -265,30 +301,34 @@ export class SolidFactBundle extends OrbitComponent {
265
301
  const TemsAssetManagement = document.querySelector(
266
302
  "solid-tems-assets-management",
267
303
  );
268
- if (TemsAssetManagement) {
304
+ if (TemsAssetManagement?.loadAssets) {
269
305
  TemsAssetManagement.loadAssets();
270
306
  }
271
307
 
272
308
  const TemsPoliciesManagement = document.querySelector(
273
309
  "solid-tems-policies-management",
274
310
  );
275
- if (TemsPoliciesManagement) {
311
+ if (TemsPoliciesManagement?.loadPolicies) {
276
312
  TemsPoliciesManagement.loadPolicies();
277
313
  }
278
314
 
279
315
  const TemsContractsManagement = document.querySelector(
280
316
  "solid-tems-contracts-management",
281
317
  );
282
- if (TemsContractsManagement) {
318
+ if (TemsContractsManagement?.loadData) {
283
319
  TemsContractsManagement.loadData();
284
320
  }
285
321
  }
286
322
 
287
323
  this.bundleName = "";
288
324
  this.bundleDescription = "";
325
+ this.bundleDescription = "";
326
+ this.step = 0;
289
327
  this.selectedFacts = [];
290
328
 
291
- const factbundleComponent: any = this.orbit?.components.find((c) => c.type === "fact-bundle");
329
+ const factbundleComponent: any = this.orbit?.components.find(
330
+ (c) => c.type === "fact-bundle",
331
+ );
292
332
 
293
333
  document.dispatchEvent(
294
334
  new CustomEvent("save", {
@@ -323,6 +363,13 @@ export class SolidFactBundle extends OrbitComponent {
323
363
  }
324
364
  }
325
365
 
366
+ _selectBundleCategory(e: Event) {
367
+ e.preventDefault();
368
+ if (e.target) {
369
+ this.bundleCategory = e.target.value;
370
+ }
371
+ }
372
+
326
373
  _selectBundleContractPolicy(e: Event) {
327
374
  e.preventDefault();
328
375
  if (e.target) {
@@ -366,75 +413,26 @@ export class SolidFactBundle extends OrbitComponent {
366
413
  return html`<tems-viewport>
367
414
  <tems-header slot="header" heading=${this.header}>
368
415
  <div slot="cta">
369
- <tems-button
370
- type="primary"
371
- disabled=${!allowCreation || nothing}
372
- label=${msg("Create bundle")}
373
- @click=${this._createFactBundle}
374
- ></tems-button>
416
+ ${this.step === 0
417
+ ? html`<tems-button
418
+ type="primary"
419
+ disabled=${this.selectedFacts.length === 0 || nothing}
420
+ label=${msg("Set bundle informations")}
421
+ @click=${this._nextStep}
422
+ ></tems-button>`
423
+ : html`<tems-button
424
+ type="primary"
425
+ disabled=${!allowCreation || nothing}
426
+ label=${msg("Create bundle")}
427
+ @click=${this._createFactBundle}
428
+ ></tems-button>`}
375
429
  </div>
376
430
  </tems-header>
377
431
  <div slot="content">
378
432
  <section class="flex flex-1">
379
- <div>
380
- <div>
381
- <tems-input
382
- type="text"
383
- label=${msg("Bundle name")}
384
- placeholder=${msg("Bundle name")}
385
- required=""
386
- .value=${this.bundleName}
387
- @change=${this._updateBundleName}
388
- ></tems-input>
389
- </div>
390
- <div>
391
- <tems-textarea
392
- rows="4"
393
- label=${msg("Bundle description")}
394
- placeholder=${msg("Bundle description")}
395
- .value=${this.bundleDescription}
396
- @change=${this._updateBundleDescription}
397
- ></tems-textarea>
398
- </div>
399
- <div>
400
- <tems-input
401
- type="text"
402
- label=${msg("Language")}
403
- placeholder=${msg("Language code (en, de, es, fr...)")}
404
- hint=${msg("Comma-separated, eg.: en,de,es,fr)")}
405
- required=""
406
- .value=${this.bundleLanguage}
407
- @change=${this._updateBundleLanguage}
408
- ></tems-input>
409
- </div>
410
- <div class="select">
411
- <tems-label label=${msg("Access policy")}></tems-label>
412
- <select @change=${this._selectBundleAccessPolicy}>
413
- ${this.policyTemplates.map((policy) => {
414
- return html`<option
415
- value="${policy.id}"
416
- ?selected="${policy.id === this.bundleAccessPolicy}"
417
- >
418
- ${policy.name}
419
- </option>`;
420
- })}
421
- </select>
422
- </div>
423
- <div class="select">
424
- <tems-label label=${msg("Contract policy")}></tems-label>
425
- <select @change=${this._selectBundleContractPolicy}>
426
- ${this.policyTemplates.map((policy) => {
427
- return html`<option
428
- value="${policy.id}"
429
- ?selected="${policy.id === this.bundleContractPolicy}"
430
- >
431
- ${policy.name}
432
- </option>`;
433
- })}
434
- </select>
435
- </div>
436
- ${selectedFactsCount > 0
437
- ? html`<tems-division type="h4">
433
+ ${this.step === 0
434
+ ? html`<div>
435
+ <tems-division type="h4">
438
436
  <div>
439
437
  ${msg(
440
438
  str`${selectedFactsCount} selected fact${selectedFactsCount > 1 ? "s" : ""}`,
@@ -455,7 +453,7 @@ export class SolidFactBundle extends OrbitComponent {
455
453
  type: "information",
456
454
  });
457
455
  }
458
- return html`<tems-card-catalog
456
+ return html`<ds4go-card-catalog
459
457
  .object=${import.meta.env.DEV ? fact : nothing}
460
458
  .header=${fact.name || nothing}
461
459
  date=${fact.updated_at || nothing}
@@ -464,91 +462,190 @@ export class SolidFactBundle extends OrbitComponent {
464
462
  fact,
465
463
  )}
466
464
  selected=${true}
467
- ></tems-card-catalog>`;
465
+ ></ds4go-card-catalog>`;
468
466
  })}
469
- </div>`
470
- : nothing}
471
- </div>
472
- ${splicedDatas.length > 0 || this.filterFactText
473
- ? html`<div>
474
- <div>
475
- <tems-search-bar
476
- .displayFilters=${false}
477
- .displaySavedSearch=${false}
478
- .displayViews=${false}
479
- .dropdownCardElement=${false}
480
- .dropdownListElement=${false}
481
- .dropdownTableElement=${false}
482
- .dropdownMapElement=${false}
483
- .displayActiveTags=${false}
484
- .value=${this.filterFactText}
485
- @search=${this._searchFacts}
486
- ></tems-search-bar>
467
+ </div>
487
468
  </div>
488
- ${splicedDatas.length > 0
489
- ? html` <div class="card-grid card-grid-vertical">
490
- ${splicedDatas.map((fact: Resource) => {
491
- const tags = fact.categories.map(
492
- (c: Resource) => ({
493
- name: c.name,
494
- type: "information",
495
- }),
496
- );
497
- if (tags.length > 3) {
498
- const overflowTags = tags.length - 3;
499
- tags.splice(3, overflowTags);
500
- tags.push({
501
- name: `+${overflowTags} ${msg("more")}`,
502
- type: "information",
503
- });
504
- }
505
-
506
- return html`<tems-card-catalog
507
- .object=${import.meta.env.DEV
508
- ? fact
509
- : nothing}
510
- .tags=${tags}
511
- .header=${fact.name || nothing}
512
- .content=${fact.description || nothing}
513
- date=${fact.updated_at || nothing}
514
- @click=${this._toggleFactSelection.bind(
515
- this,
516
- fact,
517
- )}
518
- ></tems-card-catalog>`;
519
- })}
469
+ ${splicedDatas.length > 0 || this.filterFactText
470
+ ? html`<div>
471
+ <div>
472
+ <tems-search-bar
473
+ .displayFilters=${false}
474
+ .displaySavedSearch=${false}
475
+ .displayViews=${false}
476
+ .dropdownCardElement=${false}
477
+ .dropdownListElement=${false}
478
+ .dropdownTableElement=${false}
479
+ .dropdownMapElement=${false}
480
+ .displayActiveTags=${false}
481
+ .value=${this.filterFactText}
482
+ @search=${this._searchFacts}
483
+ ></tems-search-bar>
520
484
  </div>
521
- ${splicedDatas.length < datas.length
522
- ? html`<div
523
- class="flex flex-row justify-content-space-between align-items-flex-end"
524
- >
525
- <div>
526
- ${msg(
527
- str`Displaying ${splicedDatas.length} of ${datas.length} result${datas.length > 1 ? "s" : ""}`,
528
- )}
529
- </div>
530
- <div class="flex flex-row gap-400">
531
- <tems-button
532
- @click=${this._showMoreResults}
533
- type="primary"
534
- size="sm"
535
- label=${msg("Show more results")}
536
- ></tems-button>
537
- <tems-button
538
- @click=${this._showAllResults}
539
- type="primary"
540
- size="sm"
541
- label=${msg("Show all results")}
542
- ></tems-button>
485
+ ${splicedDatas.length > 0
486
+ ? html` <div class="card-grid card-grid-vertical">
487
+ ${splicedDatas.map((fact: Resource) => {
488
+ const tags = fact.categories.map(
489
+ (c: Resource) => ({
490
+ name: c.name,
491
+ type: "information",
492
+ }),
493
+ );
494
+ if (tags.length > 3) {
495
+ const overflowTags = tags.length - 3;
496
+ tags.splice(3, overflowTags);
497
+ tags.push({
498
+ name: `+${overflowTags} ${msg("more")}`,
499
+ type: "information",
500
+ });
501
+ }
502
+
503
+ return html`<ds4go-card-catalog
504
+ .object=${import.meta.env.DEV
505
+ ? fact
506
+ : nothing}
507
+ .tags=${tags}
508
+ .header=${fact.name || nothing}
509
+ .content=${fact.description || nothing}
510
+ date=${fact.updated_at || nothing}
511
+ @click=${this._toggleFactSelection.bind(
512
+ this,
513
+ fact,
514
+ )}
515
+ ></ds4go-card-catalog>`;
516
+ })}
543
517
  </div>
544
- </div>`
545
- : nothing}`
546
- : html`${msg("No results found")}
547
- ${this.filterFactText
548
- ? `for "${this.filterFactText}".`
549
- : ""}`}
550
- </div>`
551
- : nothing}
518
+ ${splicedDatas.length < datas.length
519
+ ? html`<div
520
+ class="flex flex-row justify-content-space-between align-items-flex-end"
521
+ >
522
+ <div>
523
+ ${msg(
524
+ str`Displaying ${splicedDatas.length} of ${datas.length} result${datas.length > 1 ? "s" : ""}`,
525
+ )}
526
+ </div>
527
+ <div class="flex flex-row gap-400">
528
+ <tems-button
529
+ @click=${this._showMoreResults}
530
+ type="primary"
531
+ size="sm"
532
+ label=${msg("Show more results")}
533
+ ></tems-button>
534
+ <tems-button
535
+ @click=${this._showAllResults}
536
+ type="primary"
537
+ size="sm"
538
+ label=${msg("Show all results")}
539
+ ></tems-button>
540
+ </div>
541
+ </div>`
542
+ : nothing}`
543
+ : html`${msg("No results found")}
544
+ ${this.filterFactText
545
+ ? `for "${this.filterFactText}".`
546
+ : ""}`}
547
+ </div>`
548
+ : nothing}`
549
+ : html`<div>
550
+ <div>
551
+ <tems-input
552
+ type="text"
553
+ label=${msg("Bundle name")}
554
+ placeholder=${msg("Bundle name")}
555
+ required=""
556
+ .value=${this.bundleName}
557
+ @change=${this._updateBundleName}
558
+ ></tems-input>
559
+ </div>
560
+ <div>
561
+ <tems-input
562
+ type="text"
563
+ label=${msg("Language")}
564
+ placeholder=${msg(
565
+ "Language code (en, de, es, fr...)",
566
+ )}
567
+ hint=${msg("Comma-separated, eg.: en,de,es,fr)")}
568
+ required=""
569
+ .value=${this.bundleLanguage}
570
+ @change=${this._updateBundleLanguage}
571
+ ></tems-input>
572
+ </div>
573
+ <div class="select">
574
+ <tems-label label=${msg("Category")}></tems-label>
575
+ <select @change=${this._selectBundleCategory}>
576
+ <option
577
+ value=""
578
+ ?selected="${"" === this.bundleCategory}"
579
+ >
580
+ ${msg("No category")}
581
+ </option>
582
+ ${Array.from(
583
+ new Set(
584
+ this.selectedFacts.flatMap((fact) =>
585
+ fact.categories.map(
586
+ (category: Resource) => formatCase(category.name),
587
+ ),
588
+ ),
589
+ ),
590
+ )
591
+ .filter((i) => i)
592
+ .sort((a, b) => a.localeCompare(b))
593
+ .map(
594
+ (category: string) =>
595
+ html`<option
596
+ value="${category}"
597
+ ?selected="${category ===
598
+ this.bundleCategory}"
599
+ >
600
+ ${category}
601
+ </option>`,
602
+ )}
603
+ </select>
604
+ </div>
605
+ </div>
606
+ <div>
607
+ <div>
608
+ <tems-textarea
609
+ rows="5"
610
+ label=${msg("Bundle description")}
611
+ placeholder=${msg("Bundle description")}
612
+ .value=${this.bundleDescription}
613
+ @change=${this._updateBundleDescription}
614
+ ></tems-textarea>
615
+ </div>
616
+ <div class="select">
617
+ <tems-label
618
+ label=${msg("Access policy")}
619
+ ></tems-label>
620
+ <select @change=${this._selectBundleAccessPolicy}>
621
+ ${this.policyTemplates.map((policy) => {
622
+ return html`<option
623
+ value="${policy.id}"
624
+ ?selected="${policy.id ===
625
+ this.bundleAccessPolicy}"
626
+ >
627
+ ${policy.name}
628
+ </option>`;
629
+ })}
630
+ </select>
631
+ </div>
632
+ <div class="select">
633
+ <tems-label
634
+ label=${msg("Contract policy")}
635
+ ></tems-label>
636
+ <select @change=${this._selectBundleContractPolicy}>
637
+ ${this.policyTemplates.map((policy) => {
638
+ return html`<option
639
+ value="${policy.id}"
640
+ ?selected="${policy.id ===
641
+ this.bundleContractPolicy}"
642
+ >
643
+ ${policy.name}
644
+ </option>`;
645
+ })}
646
+ </select>
647
+ </div>
648
+ </div>`}
552
649
  </section>
553
650
  </div>
554
651
  </tems-viewport>`;
@@ -95,7 +95,9 @@ export class SolidFactBundle extends OrbitComponent {
95
95
  `[uniq="${this.orbit?.getComponent("menu")?.uniq}"]`,
96
96
  );
97
97
 
98
- this.bundleCreationComponent = this.orbit?.components.find((c) => c.type === "fact-bundle-creation");
98
+ this.bundleCreationComponent = this.orbit?.components.find(
99
+ (c) => c.type === "fact-bundle-creation",
100
+ );
99
101
 
100
102
  return Promise.resolve();
101
103
  }
@@ -145,7 +147,10 @@ export class SolidFactBundle extends OrbitComponent {
145
147
  this.dataSrc = dataSrc;
146
148
  }
147
149
 
148
- return sort(this.objects, "name", "asc");
150
+ if (this.objects.length > 0) {
151
+ return sort(this.objects, "name", "asc");
152
+ }
153
+ return [];
149
154
  },
150
155
  args: () => [
151
156
  this.defaultDataSrc,
@@ -225,14 +230,14 @@ export class SolidFactBundle extends OrbitComponent {
225
230
  </div>
226
231
  </tems-header>
227
232
  <div slot="content">
228
- <tems-catalog-filter-holder
233
+ <ds4go-catalog-filter-holder
229
234
  .displayFiltering=${this.displayFiltering}
230
235
  @search=${this._search}
231
236
  .search=${this.search}
232
237
  .objects=${datas}
233
238
  .resultCount=${this.resultCount}
234
239
  .filterCount=${this.filterCount}
235
- ></tems-catalog-filter-holder>
240
+ ></ds4go-catalog-filter-holder>
236
241
  <ds4go-fact-bundle-holder
237
242
  .objects=${datas}
238
243
  .search=${this.search}
@@ -98,20 +98,19 @@ export default class extends ComponentObjectsHandler {
98
98
  }
99
99
  }
100
100
  }
101
-
102
- await this._afterAttach();
103
-
104
- this.ready = true;
105
- this.dispatchEvent(
106
- new CustomEvent("component-ready", {
107
- detail: {
108
- component: this.component,
109
- },
110
- }),
111
- );
112
-
113
- return Promise.resolve(true);
114
101
  }
102
+ await this._afterAttach();
103
+
104
+ this.ready = true;
105
+ this.dispatchEvent(
106
+ new CustomEvent("component-ready", {
107
+ detail: {
108
+ component: this.component,
109
+ },
110
+ }),
111
+ );
112
+
113
+ return Promise.resolve(true);
115
114
  }
116
115
  }
117
116
  return Promise.resolve(false);
@@ -10,8 +10,15 @@ const localizedTemplates: Map<string, any> = new Map(
10
10
  ]),
11
11
  );
12
12
 
13
- export const { getLocale, setLocale } = configureLocalization({
14
- sourceLocale,
15
- targetLocales,
16
- loadLocale: async (locale) => localizedTemplates.get(locale),
17
- });
13
+ export const { getLocale, setLocale } = !import.meta.env.BASE_URL.includes(
14
+ "cypress",
15
+ )
16
+ ? configureLocalization({
17
+ sourceLocale,
18
+ targetLocales,
19
+ loadLocale: async (locale) => localizedTemplates.get(locale),
20
+ })
21
+ : {
22
+ getLocale: () => sourceLocale,
23
+ setLocale: () => {},
24
+ };
@@ -1,7 +1,6 @@
1
1
  import { ComponentObjectHandler } from "@helpers/components/componentObjectHandler";
2
2
  import { ComponentObjectsHandler } from "@helpers/components/componentObjectsHandler";
3
3
  import OrbitComponent from "@helpers/components/orbitComponent";
4
- import dspComponent from "@helpers/components/orbitDspComponent";
5
4
  import setupCacheInvalidation from "@helpers/components/setupCacheInvalidation";
6
5
  import setupCacheOnResourceReady from "@helpers/components/setupCacheOnResourceReady";
7
6
  import setupComponentSubscriptions from "@helpers/components/setupComponentSubscriptions";
@@ -21,7 +20,6 @@ import uniq from "@helpers/utils/uniq";
21
20
  import CLIENT_CONTEXT from "@src/context.json";
22
21
 
23
22
  export {
24
- dspComponent,
25
23
  CLIENT_CONTEXT,
26
24
  filterGenerator,
27
25
  filterObjectByDateAfter,