@salesforcedevs/dx-components 1.3.303 → 1.3.305

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.303",
3
+ "version": "1.3.305",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -46,5 +46,5 @@
46
46
  "volta": {
47
47
  "node": "16.19.1"
48
48
  },
49
- "gitHead": "a7068c7f9841bfa1aa0b3892cace8c1edd6c1fae"
49
+ "gitHead": "6cbcc9f0b5c505d4cb958cfb4038837d94c122c1"
50
50
  }
@@ -8,6 +8,9 @@
8
8
  </label>
9
9
  <div class="form-element_control">
10
10
  <div class="select_container">
11
+ <template if:true={loading}>
12
+ <dx-spinner size="x-small" variant="base"></dx-spinner>
13
+ </template>
11
14
  <select
12
15
  autocomplete={autocomplete}
13
16
  class={selectClass}
@@ -24,6 +27,7 @@
24
27
  <template if:true={placeholder}>
25
28
  <option value="" disabled>{placeholder}</option>
26
29
  </template>
30
+
27
31
  <template for:each={options} for:item="option">
28
32
  <template if:true={option.disabled}>
29
33
  <option
@@ -13,6 +13,7 @@ export default class Select extends LightningElement {
13
13
  @api messageWhenValueMissing: string = DEFAULT_MISSING_MESSAGE;
14
14
  @api placeholder?: string;
15
15
  @api size?: string;
16
+ @api loading = false;
16
17
 
17
18
  @api
18
19
  get disabled() {
@@ -10,16 +10,12 @@ declare module globalThis {
10
10
 
11
11
  export default class TrafficLabeler extends LightningElement {
12
12
  @api internalIps?: string;
13
- @api clearbitPublicKey?: string;
14
13
  @api coveoOrganizationId!: string;
15
14
  @api coveoAnalyticsToken!: string;
16
15
 
17
16
  connectedCallback(): void {
18
17
  if (!globalThis.singletonTrafficLabelerConnected) {
19
18
  globalThis.singletonTrafficLabelerConnected = true;
20
- if (this.clearbitPublicKey) {
21
- this.loadClearBitData();
22
- }
23
19
  if (this.internalIps) {
24
20
  this.evaluateVPNAddress();
25
21
  }
@@ -30,20 +26,6 @@ export default class TrafficLabeler extends LightningElement {
30
26
  logCoveoPageView(this.coveoOrganizationId, this.coveoAnalyticsToken);
31
27
  }
32
28
 
33
- async loadClearBitData() {
34
- try {
35
- const result = await fetch(
36
- `https://reveal.clearbit.com/v1/companies/reveal?authorization=${this.clearbitPublicKey}`
37
- );
38
- const json = await result.json();
39
- if (json?.company?.name?.toLowerCase().includes("salesforce")) {
40
- this.setTrafficType("internal");
41
- }
42
- } catch (error) {
43
- console.error("fetch failed ", error);
44
- }
45
- }
46
-
47
29
  async evaluateVPNAddress() {
48
30
  try {
49
31
  const ipifyResult = await fetch(
@@ -54,10 +36,13 @@ export default class TrafficLabeler extends LightningElement {
54
36
  const internalIps = this.internalIps?.split(",");
55
37
 
56
38
  const isInternal = internalIps?.some((value) => {
39
+ console.log("TESTING:", value);
57
40
  const regex = new RegExp(value);
58
41
  return regex.test(result.ip);
59
42
  });
60
43
 
44
+ console.log("IS INTERNAL?", isInternal);
45
+
61
46
  if (isInternal) {
62
47
  this.setTrafficType("internal");
63
48
  }