@esri/hub-common 18.6.1 → 18.7.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.
@@ -9,7 +9,7 @@ export const buildUiSchema = async (i18nScope, options, context) => {
9
9
  // the component will use the authenticated user's org
10
10
  // which may not be the same as the site's org
11
11
  const orgUrlKey = options.orgUrlKey;
12
- return {
12
+ const result = {
13
13
  type: "Layout",
14
14
  elements: [
15
15
  {
@@ -40,20 +40,26 @@ export const buildUiSchema = async (i18nScope, options, context) => {
40
40
  },
41
41
  ],
42
42
  },
43
- {
44
- type: "Section",
45
- labelKey: `${i18nScope}.sections.privacy.label`,
46
- elements: [
47
- {
48
- scope: "/properties/telemetry/properties/consentNotice",
49
- type: "Control",
50
- options: {
51
- control: "arcgis-privacy-config",
52
- },
53
- },
54
- ],
55
- },
56
43
  ],
57
44
  };
45
+ // Only Add this is it's not an enterprise environment
46
+ // This is better than using a condition, as that is applied after
47
+ // the UI renders, but and sometimes we get a flash of the privacy section
48
+ if (!context.isPortal) {
49
+ result.elements.push({
50
+ type: "Section",
51
+ labelKey: `${i18nScope}.sections.privacy.label`,
52
+ elements: [
53
+ {
54
+ scope: "/properties/telemetry/properties/consentNotice",
55
+ type: "Control",
56
+ options: {
57
+ control: "arcgis-privacy-config",
58
+ },
59
+ },
60
+ ],
61
+ });
62
+ }
63
+ return result;
58
64
  };
59
65
  //# sourceMappingURL=SiteUiSchemaSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SiteUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaSettings.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAA4B,EAC5B,OAAuB,EACH,EAAE;IACtB,gDAAgD;IAChD,sDAAsD;IACtD,8CAA8C;IAC9C,MAAM,SAAS,GAAI,OAAoB,CAAC,SAAS,CAAC;IAClD,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,yBAAyB;gBAC/C,OAAO,EAAE;oBACP,kBAAkB,EAAE;wBAClB,QAAQ,EAAE,GAAG,SAAS,qCAAqC;qBAC5D;iBACF;gBACD,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,sBAAsB;wBAC7B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE,8BAA8B;4BACvC,SAAS;4BACT,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,gBAAgB;oCACzB,QAAQ,EAAE,GAAG,SAAS,+BAA+B;oCACrD,IAAI,EAAE,IAAI;iCACX;6BACF;yBACF;qBACF;iBACF;aACF;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,yBAAyB;gBAC/C,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,gDAAgD;wBACvD,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,uBAAuB;yBACjC;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"SiteUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaSettings.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAA4B,EAC5B,OAAuB,EACH,EAAE;IACtB,gDAAgD;IAChD,sDAAsD;IACtD,8CAA8C;IAC9C,MAAM,SAAS,GAAI,OAAoB,CAAC,SAAS,CAAC;IAClD,MAAM,MAAM,GAAc;QACxB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,yBAAyB;gBAC/C,OAAO,EAAE;oBACP,kBAAkB,EAAE;wBAClB,QAAQ,EAAE,GAAG,SAAS,qCAAqC;qBAC5D;iBACF;gBACD,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,sBAAsB;wBAC7B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE,8BAA8B;4BACvC,SAAS;4BACT,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,gBAAgB;oCACzB,QAAQ,EAAE,GAAG,SAAS,+BAA+B;oCACrD,IAAI,EAAE,IAAI;iCACX;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;IAEF,sDAAsD;IACtD,kEAAkE;IAClE,0EAA0E;IAC1E,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;QACrB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;YACnB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,GAAG,SAAS,yBAAyB;YAE/C,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,gDAAgD;oBACvD,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,uBAAuB;qBACjC;iBACF;aACF;SACF,CAAC,CAAC;KACJ;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
@@ -12,7 +12,7 @@ exports.buildUiSchema = async (i18nScope, options, context) => {
12
12
  // the component will use the authenticated user's org
13
13
  // which may not be the same as the site's org
14
14
  const orgUrlKey = options.orgUrlKey;
15
- return {
15
+ const result = {
16
16
  type: "Layout",
17
17
  elements: [
18
18
  {
@@ -43,20 +43,26 @@ exports.buildUiSchema = async (i18nScope, options, context) => {
43
43
  },
44
44
  ],
45
45
  },
46
- {
47
- type: "Section",
48
- labelKey: `${i18nScope}.sections.privacy.label`,
49
- elements: [
50
- {
51
- scope: "/properties/telemetry/properties/consentNotice",
52
- type: "Control",
53
- options: {
54
- control: "arcgis-privacy-config",
55
- },
56
- },
57
- ],
58
- },
59
46
  ],
60
47
  };
48
+ // Only Add this is it's not an enterprise environment
49
+ // This is better than using a condition, as that is applied after
50
+ // the UI renders, but and sometimes we get a flash of the privacy section
51
+ if (!context.isPortal) {
52
+ result.elements.push({
53
+ type: "Section",
54
+ labelKey: `${i18nScope}.sections.privacy.label`,
55
+ elements: [
56
+ {
57
+ scope: "/properties/telemetry/properties/consentNotice",
58
+ type: "Control",
59
+ options: {
60
+ control: "arcgis-privacy-config",
61
+ },
62
+ },
63
+ ],
64
+ });
65
+ }
66
+ return result;
61
67
  };
62
68
  //# sourceMappingURL=SiteUiSchemaSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SiteUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaSettings.ts"],"names":[],"mappings":";;;AAKA;;;;;GAKG;AACU,QAAA,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAA4B,EAC5B,OAAuB,EACH,EAAE;IACtB,gDAAgD;IAChD,sDAAsD;IACtD,8CAA8C;IAC9C,MAAM,SAAS,GAAI,OAAoB,CAAC,SAAS,CAAC;IAClD,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,yBAAyB;gBAC/C,OAAO,EAAE;oBACP,kBAAkB,EAAE;wBAClB,QAAQ,EAAE,GAAG,SAAS,qCAAqC;qBAC5D;iBACF;gBACD,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,sBAAsB;wBAC7B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE,8BAA8B;4BACvC,SAAS;4BACT,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,gBAAgB;oCACzB,QAAQ,EAAE,GAAG,SAAS,+BAA+B;oCACrD,IAAI,EAAE,IAAI;iCACX;6BACF;yBACF;qBACF;iBACF;aACF;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,yBAAyB;gBAC/C,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,gDAAgD;wBACvD,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,OAAO,EAAE,uBAAuB;yBACjC;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"SiteUiSchemaSettings.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaSettings.ts"],"names":[],"mappings":";;;AAKA;;;;;GAKG;AACU,QAAA,aAAa,GAAG,KAAK,EAChC,SAAiB,EACjB,OAA4B,EAC5B,OAAuB,EACH,EAAE;IACtB,gDAAgD;IAChD,sDAAsD;IACtD,8CAA8C;IAC9C,MAAM,SAAS,GAAI,OAAoB,CAAC,SAAS,CAAC;IAClD,MAAM,MAAM,GAAc;QACxB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,GAAG,SAAS,yBAAyB;gBAC/C,OAAO,EAAE;oBACP,kBAAkB,EAAE;wBAClB,QAAQ,EAAE,GAAG,SAAS,qCAAqC;qBAC5D;iBACF;gBACD,QAAQ,EAAE;oBACR;wBACE,KAAK,EAAE,sBAAsB;wBAC7B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE;4BACP,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE,8BAA8B;4BACvC,SAAS;4BACT,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,OAAO;oCACb,OAAO,EAAE,gBAAgB;oCACzB,QAAQ,EAAE,GAAG,SAAS,+BAA+B;oCACrD,IAAI,EAAE,IAAI;iCACX;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;IAEF,sDAAsD;IACtD,kEAAkE;IAClE,0EAA0E;IAC1E,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;QACrB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;YACnB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,GAAG,SAAS,yBAAyB;YAE/C,QAAQ,EAAE;gBACR;oBACE,KAAK,EAAE,gDAAgD;oBACvD,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,OAAO,EAAE,uBAAuB;qBACjC;iBACF;aACF;SACF,CAAC,CAAC;KACJ;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "18.6.1",
3
+ "version": "18.7.0",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",