@esri/hub-common 12.40.0 → 12.42.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 (83) hide show
  1. package/dist/esm/ArcGISContext.js +18 -0
  2. package/dist/esm/ArcGISContext.js.map +1 -1
  3. package/dist/esm/core/schemas/getEntityEditorSchemas.js +9 -0
  4. package/dist/esm/core/schemas/getEntityEditorSchemas.js.map +1 -1
  5. package/dist/esm/initiatives/HubInitiatives.js +4 -1
  6. package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
  7. package/dist/esm/initiatives/_internal/InitiativeSchema.js +19 -1
  8. package/dist/esm/initiatives/_internal/InitiativeSchema.js.map +1 -1
  9. package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js +78 -0
  10. package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
  11. package/dist/esm/initiatives/_internal/applyInitiativeMigrations.js +60 -0
  12. package/dist/esm/initiatives/_internal/applyInitiativeMigrations.js.map +1 -0
  13. package/dist/esm/initiatives/_internal/computeProps.js.map +1 -1
  14. package/dist/esm/initiatives/_internal/getPropertyMap.js +4 -0
  15. package/dist/esm/initiatives/_internal/getPropertyMap.js.map +1 -1
  16. package/dist/esm/initiatives/defaults.js +2 -2
  17. package/dist/esm/projects/fetch.js +6 -1
  18. package/dist/esm/projects/fetch.js.map +1 -1
  19. package/dist/esm/search/Catalog.js +46 -2
  20. package/dist/esm/search/Catalog.js.map +1 -1
  21. package/dist/esm/sites/HubSite.js.map +1 -1
  22. package/dist/esm/sites/HubSites.js +30 -18
  23. package/dist/esm/sites/HubSites.js.map +1 -1
  24. package/dist/esm/sites/_internal/SiteSchema.js +31 -0
  25. package/dist/esm/sites/_internal/SiteSchema.js.map +1 -0
  26. package/dist/esm/sites/_internal/SiteUiSchemaCreate.js +125 -0
  27. package/dist/esm/sites/_internal/SiteUiSchemaCreate.js.map +1 -0
  28. package/dist/esm/sites/_internal/SiteUiSchemaEdit.js +100 -0
  29. package/dist/esm/sites/_internal/SiteUiSchemaEdit.js.map +1 -0
  30. package/dist/esm/sites/_internal/catalogMigration.js +50 -0
  31. package/dist/esm/sites/_internal/catalogMigration.js.map +1 -0
  32. package/dist/esm/sites/_internal/computeProps.js +3 -0
  33. package/dist/esm/sites/_internal/computeProps.js.map +1 -1
  34. package/dist/esm/sites/_internal/getPropertyMap.js +11 -2
  35. package/dist/esm/sites/_internal/getPropertyMap.js.map +1 -1
  36. package/dist/node/ArcGISContext.js +18 -0
  37. package/dist/node/ArcGISContext.js.map +1 -1
  38. package/dist/node/core/schemas/getEntityEditorSchemas.js +9 -0
  39. package/dist/node/core/schemas/getEntityEditorSchemas.js.map +1 -1
  40. package/dist/node/initiatives/HubInitiatives.js +4 -1
  41. package/dist/node/initiatives/HubInitiatives.js.map +1 -1
  42. package/dist/node/initiatives/_internal/InitiativeSchema.js +18 -0
  43. package/dist/node/initiatives/_internal/InitiativeSchema.js.map +1 -1
  44. package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js +78 -0
  45. package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
  46. package/dist/node/initiatives/_internal/applyInitiativeMigrations.js +64 -0
  47. package/dist/node/initiatives/_internal/applyInitiativeMigrations.js.map +1 -0
  48. package/dist/node/initiatives/_internal/computeProps.js.map +1 -1
  49. package/dist/node/initiatives/_internal/getPropertyMap.js +4 -0
  50. package/dist/node/initiatives/_internal/getPropertyMap.js.map +1 -1
  51. package/dist/node/initiatives/defaults.js +2 -2
  52. package/dist/node/projects/fetch.js +6 -1
  53. package/dist/node/projects/fetch.js.map +1 -1
  54. package/dist/node/search/Catalog.js +46 -2
  55. package/dist/node/search/Catalog.js.map +1 -1
  56. package/dist/node/sites/HubSite.js.map +1 -1
  57. package/dist/node/sites/HubSites.js +32 -19
  58. package/dist/node/sites/HubSites.js.map +1 -1
  59. package/dist/node/sites/_internal/SiteSchema.js +34 -0
  60. package/dist/node/sites/_internal/SiteSchema.js.map +1 -0
  61. package/dist/node/sites/_internal/SiteUiSchemaCreate.js +128 -0
  62. package/dist/node/sites/_internal/SiteUiSchemaCreate.js.map +1 -0
  63. package/dist/node/sites/_internal/SiteUiSchemaEdit.js +103 -0
  64. package/dist/node/sites/_internal/SiteUiSchemaEdit.js.map +1 -0
  65. package/dist/node/sites/_internal/catalogMigration.js +54 -0
  66. package/dist/node/sites/_internal/catalogMigration.js.map +1 -0
  67. package/dist/node/sites/_internal/computeProps.js +3 -0
  68. package/dist/node/sites/_internal/computeProps.js.map +1 -1
  69. package/dist/node/sites/_internal/getPropertyMap.js +11 -2
  70. package/dist/node/sites/_internal/getPropertyMap.js.map +1 -1
  71. package/dist/types/ArcGISContext.d.ts +11 -0
  72. package/dist/types/core/schemas/getEntityEditorSchemas.d.ts +1 -1
  73. package/dist/types/core/types/HubEntityType.d.ts +1 -1
  74. package/dist/types/core/types/IHubItemEntity.d.ts +3 -0
  75. package/dist/types/core/types/IHubSite.d.ts +3 -2
  76. package/dist/types/initiatives/_internal/applyInitiativeMigrations.d.ts +9 -0
  77. package/dist/types/search/Catalog.d.ts +24 -2
  78. package/dist/types/sites/HubSites.d.ts +9 -0
  79. package/dist/types/sites/_internal/SiteSchema.d.ts +7 -0
  80. package/dist/types/sites/_internal/SiteUiSchemaCreate.d.ts +7 -0
  81. package/dist/types/sites/_internal/SiteUiSchemaEdit.d.ts +7 -0
  82. package/dist/types/sites/_internal/catalogMigration.d.ts +9 -0
  83. package/package.json +1 -1
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SiteSchema = exports.SiteEditorTypes = void 0;
4
+ const shared_1 = require("../../core/schemas/shared");
5
+ exports.SiteEditorTypes = ["hub:site:edit"];
6
+ /**
7
+ * defines the JSON schema for a Hub Site's editable fields
8
+ */
9
+ exports.SiteSchema = {
10
+ required: ["name"],
11
+ type: "object",
12
+ properties: {
13
+ name: shared_1.ENTITY_NAME_SCHEMA,
14
+ summary: {
15
+ type: "string",
16
+ },
17
+ description: {
18
+ type: "string",
19
+ },
20
+ access: shared_1.ENTITY_ACCESS_SCHEMA,
21
+ groups: {
22
+ type: "array",
23
+ items: {
24
+ type: "string",
25
+ },
26
+ },
27
+ location: {
28
+ type: "object",
29
+ },
30
+ tags: shared_1.ENTITY_TAGS_SCHEMA,
31
+ categories: shared_1.ENTITY_CATEGORIES_SCHEMA,
32
+ },
33
+ };
34
+ //# sourceMappingURL=SiteSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteSchema.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteSchema.ts"],"names":[],"mappings":";;;AACA,sDAKmC;AAGtB,QAAA,eAAe,GAAG,CAAC,eAAe,CAAU,CAAC;AAE1D;;GAEG;AACU,QAAA,UAAU,GAAyB;IAC9C,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,IAAI,EAAE,2BAAkB;QACxB,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;SACf;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;SACf;QACD,MAAM,EAAE,6BAAoB;QAC5B,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;aACf;SACF;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;SACf;QACD,IAAI,EAAE,2BAAkB;QACxB,UAAU,EAAE,iCAAwB;KACrC;CACiC,CAAC"}
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uiSchema = void 0;
4
+ const core_1 = require("../../core");
5
+ /**
6
+ * minimal create uiSchema for Hub Projects - this defines
7
+ * how the schema properties should be rendered in the
8
+ * project creation experience
9
+ */
10
+ exports.uiSchema = {
11
+ type: "Layout",
12
+ elements: [
13
+ {
14
+ type: "Section",
15
+ options: { section: "stepper", scale: "l" },
16
+ elements: [
17
+ {
18
+ type: "Step",
19
+ labelKey: "{{i18nScope}}.sections.details.label",
20
+ elements: [
21
+ {
22
+ type: "Section",
23
+ labelKey: "{{i18nScope}}.sections.basicInfo.label",
24
+ elements: [
25
+ {
26
+ labelKey: "{{i18nScope}}.fields.name.label",
27
+ scope: "/properties/name",
28
+ type: "Control",
29
+ options: {
30
+ messages: [
31
+ {
32
+ type: "ERROR",
33
+ keyword: "required",
34
+ icon: true,
35
+ labelKey: "{{i18nScope}}.fields.name.requiredError",
36
+ },
37
+ ],
38
+ },
39
+ },
40
+ {
41
+ labelKey: "{{i18nScope}}.fields.summary.label",
42
+ scope: "/properties/summary",
43
+ type: "Control",
44
+ options: {
45
+ control: "hub-field-input-input",
46
+ type: "textarea",
47
+ helperText: {
48
+ labelKey: "{{i18nScope}}.fields.summary.helperText",
49
+ },
50
+ },
51
+ },
52
+ {
53
+ labelKey: "{{i18nScope}}.fields.status.label",
54
+ scope: "/properties/status",
55
+ type: "Control",
56
+ options: {
57
+ control: "hub-field-input-select",
58
+ enum: {
59
+ i18nScope: "{{i18nScope}}.fields.status.enum",
60
+ },
61
+ },
62
+ },
63
+ ],
64
+ },
65
+ ],
66
+ },
67
+ {
68
+ type: "Step",
69
+ labelKey: "{{i18nScope}}.sections.location.label",
70
+ rule: {
71
+ effect: core_1.UiSchemaRuleEffects.DISABLE,
72
+ condition: {
73
+ scope: "/properties/name",
74
+ schema: { const: "" },
75
+ },
76
+ },
77
+ elements: [
78
+ {
79
+ type: "Section",
80
+ labelKey: "{{i18nScope}}.sections.location.label",
81
+ elements: [
82
+ {
83
+ scope: "/properties/location",
84
+ type: "Control",
85
+ options: {
86
+ control: "hub-field-input-location-picker",
87
+ },
88
+ },
89
+ ],
90
+ },
91
+ ],
92
+ },
93
+ {
94
+ type: "Step",
95
+ labelKey: "{{i18nScope}}.sections.sharing.label",
96
+ rule: {
97
+ effect: core_1.UiSchemaRuleEffects.DISABLE,
98
+ condition: {
99
+ scope: "/properties/name",
100
+ schema: { const: "" },
101
+ },
102
+ },
103
+ elements: [
104
+ {
105
+ scope: "/properties/access",
106
+ type: "Control",
107
+ options: {
108
+ control: "arcgis-hub-access-level-controls",
109
+ itemType: "{{{{i18nScope}}.fields.access.itemType:translate}}",
110
+ },
111
+ },
112
+ {
113
+ labelKey: "{{i18nScope}}.fields.groups.label",
114
+ scope: "/properties/groups",
115
+ type: "Control",
116
+ options: {
117
+ control: "hub-field-input-combobox",
118
+ allowCustomValues: false,
119
+ selectionMode: "multiple",
120
+ },
121
+ },
122
+ ],
123
+ },
124
+ ],
125
+ },
126
+ ],
127
+ };
128
+ //# sourceMappingURL=SiteUiSchemaCreate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteUiSchemaCreate.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaCreate.ts"],"names":[],"mappings":";;;AAAA,qCAA4D;AAE5D;;;;GAIG;AACU,QAAA,QAAQ,GAAc;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;YAC3C,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,sCAAsC;oBAChD,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,SAAS;4BACf,QAAQ,EAAE,wCAAwC;4BAClD,QAAQ,EAAE;gCACR;oCACE,QAAQ,EAAE,iCAAiC;oCAC3C,KAAK,EAAE,kBAAkB;oCACzB,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE;wCACP,QAAQ,EAAE;4CACR;gDACE,IAAI,EAAE,OAAO;gDACb,OAAO,EAAE,UAAU;gDACnB,IAAI,EAAE,IAAI;gDACV,QAAQ,EAAE,yCAAyC;6CACpD;yCACF;qCACF;iCACF;gCACD;oCACE,QAAQ,EAAE,oCAAoC;oCAC9C,KAAK,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EAAE,oDAAoD;6BAC/D;yBACF;wBACD;4BACE,QAAQ,EAAE,mCAAmC;4BAC7C,KAAK,EAAE,oBAAoB;4BAC3B,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE;gCACP,OAAO,EAAE,0BAA0B;gCACnC,iBAAiB,EAAE,KAAK;gCACxB,aAAa,EAAE,UAAU;6BAC1B;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.uiSchema = void 0;
4
+ /**
5
+ * complete edit uiSchema for Hub Projects - this defines
6
+ * how the schema properties should be rendered in the
7
+ * project editing experience
8
+ */
9
+ exports.uiSchema = {
10
+ type: "Layout",
11
+ elements: [
12
+ {
13
+ type: "Section",
14
+ labelKey: "{{i18nScope}}.sections.basicInfo.label",
15
+ elements: [
16
+ {
17
+ labelKey: "{{i18nScope}}.fields.name.label",
18
+ scope: "/properties/name",
19
+ type: "Control",
20
+ options: {
21
+ messages: [
22
+ {
23
+ type: "ERROR",
24
+ keyword: "required",
25
+ icon: true,
26
+ labelKey: "{{i18nScope}}.fields.name.requiredError",
27
+ },
28
+ ],
29
+ },
30
+ },
31
+ {
32
+ labelKey: "{{i18nScope}}.fields.summary.label",
33
+ scope: "/properties/summary",
34
+ type: "Control",
35
+ options: {
36
+ control: "hub-field-input-input",
37
+ type: "textarea",
38
+ helperText: {
39
+ labelKey: "{{i18nScope}}.fields.summary.helperText",
40
+ },
41
+ },
42
+ },
43
+ {
44
+ labelKey: "{{i18nScope}}.fields.description.label",
45
+ scope: "/properties/description",
46
+ type: "Control",
47
+ options: {
48
+ control: "hub-field-input-input",
49
+ type: "textarea",
50
+ helperText: {
51
+ labelKey: "{{i18nScope}}.fields.description.helperText",
52
+ },
53
+ },
54
+ },
55
+ {
56
+ labelKey: "{{i18nScope}}.fields.tags.label",
57
+ scope: "/properties/tags",
58
+ type: "Control",
59
+ options: {
60
+ control: "hub-field-input-combobox",
61
+ allowCustomValues: true,
62
+ selectionMode: "multiple",
63
+ placeholderIcon: "label",
64
+ helperText: { labelKey: "{{i18nScope}}.fields.tags.helperText" },
65
+ },
66
+ },
67
+ {
68
+ labelKey: "{{i18nScope}}.fields.categories.label",
69
+ scope: "/properties/categories",
70
+ type: "Control",
71
+ options: {
72
+ control: "hub-field-input-combobox",
73
+ allowCustomValues: false,
74
+ selectionMode: "multiple",
75
+ placeholderIcon: "select-category",
76
+ helperText: {
77
+ labelKey: "{{i18nScope}}.fields.categories.helperText",
78
+ },
79
+ },
80
+ },
81
+ ],
82
+ },
83
+ {
84
+ type: "Section",
85
+ labelKey: "{{i18nScope}}.sections.location.label",
86
+ options: {
87
+ helperText: {
88
+ labelKey: "{{i18nScope}}.sections.location.helperText",
89
+ },
90
+ },
91
+ elements: [
92
+ {
93
+ scope: "/properties/location",
94
+ type: "Control",
95
+ options: {
96
+ control: "hub-field-input-location-picker",
97
+ },
98
+ },
99
+ ],
100
+ },
101
+ ],
102
+ };
103
+ //# sourceMappingURL=SiteUiSchemaEdit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteUiSchemaEdit.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SiteUiSchemaEdit.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACU,QAAA,QAAQ,GAAc;IACjC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,wCAAwC;YAClD,QAAQ,EAAE;gBACR;oBACE,QAAQ,EAAE,iCAAiC;oBAC3C,KAAK,EAAE,kBAAkB;oBACzB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACP,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,OAAO;gCACb,OAAO,EAAE,UAAU;gCACnB,IAAI,EAAE,IAAI;gCACV,QAAQ,EAAE,yCAAyC;6BACpD;yBACF;qBACF;iBACF;gBACD;oBACE,QAAQ,EAAE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iCAAiC;qBAC3C;iBACF;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.catalogMigration = void 0;
4
+ const get_prop_1 = require("../../objects/get-prop");
5
+ /**
6
+ * Add the default catalog and collections to the Site model
7
+ * Note: This migration is only applies via `fetchSite(..):IHubSite` and not
8
+ * the older `getSiteById(...):IModel`
9
+ * @param model
10
+ * @returns
11
+ */
12
+ function catalogMigration(model) {
13
+ if (get_prop_1.getProp(model, "item.properties.schemaVersion") >= 1.7) {
14
+ return model;
15
+ }
16
+ else {
17
+ let siteCatalog = model.data.catalog || {};
18
+ if (!siteCatalog.hasOwnProperty("schemaVersion")) {
19
+ const groups = siteCatalog.groups || [];
20
+ siteCatalog = {
21
+ schemaVersion: 1,
22
+ title: "Default Site Catalog",
23
+ scopes: {
24
+ item: {
25
+ targetEntity: "item",
26
+ filters: [],
27
+ },
28
+ },
29
+ collections: [],
30
+ };
31
+ // groups are used to set the item scope for the whole catalog
32
+ siteCatalog.scopes.item.filters.push({
33
+ predicates: [
34
+ {
35
+ group: [...groups],
36
+ },
37
+ ],
38
+ });
39
+ // in order to not break existing code, we need store the
40
+ // new catalog on `data.catalogv2` and leave old catalog on `data.catalog`
41
+ // The property mapper will expose this as `catalog` on the IHubSite
42
+ // and re-map it back to `data.catalogv2` when saving
43
+ // This is only done if the data.catalog does not have `schemaVersion`
44
+ // property. At some point we will deprecate the old catalog
45
+ // remove the mappings, and save the catalog directly to `data.catalog`
46
+ model.data.catalogv2 = siteCatalog;
47
+ }
48
+ // set the schema version
49
+ model.item.properties.schemaVersion = 1.7;
50
+ return model;
51
+ }
52
+ }
53
+ exports.catalogMigration = catalogMigration;
54
+ //# sourceMappingURL=catalogMigration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalogMigration.js","sourceRoot":"","sources":["../../../../src/sites/_internal/catalogMigration.ts"],"names":[],"mappings":";;;AAAA,qDAAiD;AAIjD;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,KAAa;IAC5C,IAAI,kBAAO,CAAC,KAAK,EAAE,+BAA+B,CAAC,IAAI,GAAG,EAAE;QAC1D,OAAO,KAAK,CAAC;KACd;SAAM;QACL,IAAI,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;QAC3C,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE;YAChD,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,IAAI,EAAE,CAAC;YACxC,WAAW,GAAG;gBACZ,aAAa,EAAE,CAAC;gBAChB,KAAK,EAAE,sBAAsB;gBAC7B,MAAM,EAAE;oBACN,IAAI,EAAE;wBACJ,YAAY,EAAE,MAAM;wBACpB,OAAO,EAAE,EAAE;qBACZ;iBACF;gBACD,WAAW,EAAE,EAAE;aACD,CAAC;YAEjB,8DAA8D;YAC9D,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;gBACnC,UAAU,EAAE;oBACV;wBACE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC;qBACnB;iBACF;aACF,CAAC,CAAC;YACH,yDAAyD;YACzD,0EAA0E;YAC1E,oEAAoE;YACpE,qDAAqD;YACrD,sEAAsE;YACtE,4DAA4D;YAC5D,uEAAuE;YACvE,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC;SACpC;QACD,yBAAyB;QACzB,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,GAAG,GAAG,CAAC;QAE1C,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAzCD,4CAyCC"}
@@ -4,6 +4,7 @@ exports.computeProps = void 0;
4
4
  const resources_1 = require("../../resources");
5
5
  const SiteBusinessRules_1 = require("./SiteBusinessRules");
6
6
  const capabilities_1 = require("../../capabilities");
7
+ const upgradeCatalogSchema_1 = require("../../search/upgradeCatalogSchema");
7
8
  /**
8
9
  * Given a model and a site, set various computed properties that can't be directly mapped
9
10
  * @private
@@ -29,6 +30,8 @@ function computeProps(model, site, requestOptions) {
29
30
  // Handle capabilities
30
31
  // NOTE: This does not currently contain the older "capabilities" values!
31
32
  site.capabilities = capabilities_1.processEntityCapabilities(((_a = model.data.settings) === null || _a === void 0 ? void 0 : _a.capabilities) || {}, SiteBusinessRules_1.SiteDefaultCapabilities);
33
+ // handle catalog
34
+ site.catalog = upgradeCatalogSchema_1.upgradeCatalogSchema(model.data.catalog || { groups: [] });
32
35
  // cast b/c this takes a partial but returns a full site
33
36
  return site;
34
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"computeProps.js","sourceRoot":"","sources":["../../../../src/sites/_internal/computeProps.ts"],"names":[],"mappings":";;;AAEA,+CAAsD;AAGtD,2DAA8D;AAC9D,qDAA+D;AAE/D;;;;;;;GAOG;AACH,SAAgB,YAAY,CAC1B,KAAa,EACb,IAAuB,EACvB,cAA+B;;IAE/B,IAAI,KAAa,CAAC;IAClB,IAAI,cAAc,CAAC,cAAc,EAAE;QACjC,MAAM,OAAO,GAAgB,cAAc,CAAC,cAA6B,CAAC;QAC1E,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;KACvB;IACD,gBAAgB;IAChB,IAAI,CAAC,YAAY,GAAG,+BAAmB,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;IAE3E,eAAe;IACf,IAAI,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,CAAC,iBAAiB,GAAG,cAAc,CAAC;IACxC,IAAI,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,CAAC,iBAAiB,GAAG,eAAe,CAAC;IAEzC,sBAAsB;IACtB,yEAAyE;IACzE,IAAI,CAAC,YAAY,GAAG,wCAAyB,CAC3C,OAAA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AC;IAE1E,wDAAwD;IACxD,OAAO,IAAgB,CAAC;AAC1B,CAAC;AA/BD,oCA+BC"}
@@ -13,7 +13,6 @@ const getBasePropertyMap_1 = require("../../core/_internal/getBasePropertyMap");
13
13
  function getPropertyMap() {
14
14
  const map = getBasePropertyMap_1.getBasePropertyMap();
15
15
  // Site specific mappings
16
- map.push({ objectKey: "catalog", modelKey: "data.catalog" });
17
16
  map.push({ objectKey: "feeds", modelKey: "data.feeds" });
18
17
  map.push({ objectKey: "permissions", modelKey: "data.permissions" });
19
18
  map.push({
@@ -44,7 +43,7 @@ function getPropertyMap() {
44
43
  modelKey: "item.properties.slug",
45
44
  });
46
45
  map.push({
47
- objectKey: "classicCapabilities",
46
+ objectKey: "legacyCapabilities",
48
47
  modelKey: "data.values.capabilities",
49
48
  });
50
49
  map.push({
@@ -59,6 +58,16 @@ function getPropertyMap() {
59
58
  objectKey: "name",
60
59
  modelKey: "item.title",
61
60
  });
61
+ map.push({
62
+ objectKey: "location",
63
+ modelKey: "item.properties.location",
64
+ });
65
+ // Catalog mappings
66
+ // Since v1.x sites use data.catalog, which is really just `{groiups: []}`
67
+ // we can't overtly migrate data.catalog, but we can map the properties
68
+ // so they don't collide
69
+ map.push({ objectKey: "catalog", modelKey: "data.catalogv2" });
70
+ map.push({ objectKey: "legacyCatalog", modelKey: "data.catalog" });
62
71
  return map;
63
72
  }
64
73
  exports.getPropertyMap = getPropertyMap;
@@ -1 +1 @@
1
- {"version":3,"file":"getPropertyMap.js","sourceRoot":"","sources":["../../../../src/sites/_internal/getPropertyMap.ts"],"names":[],"mappings":";;;AACA,gFAA6E;AAE7E;;;;;;;GAOG;AACH,SAAgB,cAAc;IAC5B,MAAM,GAAG,GAAG,uCAAkB,EAAE,CAAC;IACjC,yBAAyB;IACzB,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7D,GAAG,CAAC,IAAI,CAAC,EAA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ACtC,CAAC,CAAC;IACH,GAAG,CAAC,IAAI,CAAC;QACP,SAAS,EAAE,MAAM;QACjB,QAAQ,EAAE,YAAY;KACvB,CAAC,CAAC;IACH,GAAG,CAAC,IAAI,CAAC;QACP,SAAS,EAAE,UAAU;QACrB,QAAQ,EAAE,0BAA0B;KACrC,CAAC,CAAC;IAEH,mBAAmB;IACnB,0EAA0E;IAC1E,uEAAuE;IACvE,wBAAwB;IACxB,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAC/D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,CAAC;IAEnE,OAAO,GAAG,CAAC;AACb,CAAC;AA7DD,wCA6DC"}
@@ -72,6 +72,11 @@ export interface IArcGISContext {
72
72
  * For ArcGIS Enterprise this will return `undefined`
73
73
  */
74
74
  hubUrl: string;
75
+ /**
76
+ * Returns the current user's hub-home url. If not authenticated,
77
+ * returns the Hub Url. If portal, returns undefined
78
+ */
79
+ hubHomeUrl: string;
75
80
  /**
76
81
  * Returns boolean indicating if the backing system
77
82
  * is ArcGIS Enterprise (formerly ArcGIS Portal) or not
@@ -215,6 +220,7 @@ export declare class ArcGISContext implements IArcGISContext {
215
220
  private _authentication;
216
221
  private _portalUrl;
217
222
  private _hubUrl;
223
+ private _hubHomeUrl;
218
224
  private _portalSelf;
219
225
  private _currentUser;
220
226
  private _properties;
@@ -268,6 +274,11 @@ export declare class ArcGISContext implements IArcGISContext {
268
274
  * https://{portalHostname}/{webadaptor}
269
275
  */
270
276
  get portalUrl(): string;
277
+ /**
278
+ * Returns the current user's hub-home url. If not authenticated,
279
+ * returns the Hub Url. If portal, returns undefined
280
+ */
281
+ get hubHomeUrl(): string;
271
282
  /**
272
283
  * Returns the current user's Hub License
273
284
  */
@@ -5,7 +5,7 @@ import { UiSchemaElementOptions } from "./types";
5
5
  * to the supported/defined uiSchema configurations
6
6
  */
7
7
  export declare type EditorType = (typeof validEditorTypes)[number];
8
- export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:initiative:edit"];
8
+ export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:initiative:edit", "hub:site:edit"];
9
9
  /**
10
10
  * get the editor schema and uiSchema defined for an entity.
11
11
  * The schema and uiSchema that are returned can be used to
@@ -1 +1 @@
1
- export declare type HubEntityType = "site" | "project" | "initiative" | "page" | "discussion" | "content";
1
+ export declare type HubEntityType = "site" | "project" | "initiative" | "page" | "discussion" | "content" | "org";
@@ -84,6 +84,9 @@ export interface IHubItemEntity extends IHubEntityBase, IWithPermissions {
84
84
  * @readonly
85
85
  */
86
86
  canDelete: boolean;
87
+ /**
88
+ * The location of the Entity
89
+ */
87
90
  location?: IHubLocation;
88
91
  /**
89
92
  * The orgId of the Entity, if available
@@ -62,7 +62,8 @@ export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWith
62
62
  */
63
63
  headerSass: string;
64
64
  /**
65
- * Classic capabilities
65
+ * Legacy capabilities
66
+ * @internal
66
67
  */
67
- classicCapabilities: string[];
68
+ legacyCapabilities: string[];
68
69
  }
@@ -0,0 +1,9 @@
1
+ import { IRequestOptions } from "@esri/arcgis-rest-request";
2
+ import { IModel } from "../../types";
3
+ export declare const INITIATIVE_SCHEMA_VERSION = 2;
4
+ /**
5
+ * Apply all Initiative model migrations
6
+ * @param model
7
+ * @returns
8
+ */
9
+ export declare function applyInitiativeMigrations(model: IModel, requestOptions: IRequestOptions): Promise<IModel>;
@@ -1,6 +1,6 @@
1
1
  import { IArcGISContext } from "../ArcGISContext";
2
2
  import { Collection } from "./Collection";
3
- import { EntityType, ISearchResponseHash, IContainsOptions, IContainsResponse, IHubSearchOptions, IHubSearchResponse, IHubSearchResult, ICatalogScope, IHubCatalog, IQuery } from "./types";
3
+ import { EntityType, ISearchResponseHash, IContainsOptions, IContainsResponse, IHubSearchOptions, IHubSearchResponse, IHubSearchResult, ICatalogScope, IHubCatalog, IQuery, IFilter, IHubCollection } from "./types";
4
4
  /**
5
5
  * Catalog Class
6
6
  *
@@ -72,7 +72,7 @@ export declare class Catalog implements IHubCatalog {
72
72
  /**
73
73
  * Get the collections array. Returns simple objects not Collection instances
74
74
  */
75
- get collections(): import("./types").IHubCollection[];
75
+ get collections(): IHubCollection[];
76
76
  /**
77
77
  * Get the names of the collections
78
78
  */
@@ -83,6 +83,28 @@ export declare class Catalog implements IHubCatalog {
83
83
  * @returns
84
84
  */
85
85
  getCollection(name: string): Collection;
86
+ /**
87
+ * Get the Collection json by name
88
+ * @param name
89
+ * @returns
90
+ */
91
+ getCollectionJson(name: string): IHubCollection;
92
+ /**
93
+ * Get a Collection instance, based on a specific entity type and filters
94
+ * This extends from the base scope for the entity type
95
+ * @param type
96
+ * @param filters
97
+ * @returns
98
+ */
99
+ getCustomCollection(type: EntityType, filters: IFilter[]): Collection;
100
+ /**
101
+ * Create a custom collection based on a specific entity type and filters
102
+ * Returned collection extends from the base scope for the entity type
103
+ * @param type
104
+ * @param filters
105
+ * @returns
106
+ */
107
+ getCustomCollectionJson(type: EntityType, filters: IFilter[]): IHubCollection;
86
108
  /**
87
109
  * Search for Items
88
110
  * Will throw if the Catalog does not have a scope defined for items
@@ -54,12 +54,21 @@ export declare function deleteSite(id: string, requestOptions: IHubRequestOption
54
54
  */
55
55
  export declare function fetchSite(identifier: string, requestOptions: IHubRequestOptions): Promise<IHubSite>;
56
56
  /**
57
+ * @internal
57
58
  * Convert an IModel for a Hub Site Item into an IHubSite
58
59
  * @param model
59
60
  * @param requestOptions
60
61
  * @returns
61
62
  */
62
63
  export declare function convertModelToSite(model: IModel, requestOptions: IRequestOptions): IHubSite;
64
+ /**
65
+ * @internal
66
+ * Convert an IHubSite into an IModel
67
+ * @param site
68
+ * @param requestOptions
69
+ * @returns
70
+ */
71
+ export declare function convertSiteToModel(site: IHubSite, requestOptions: IRequestOptions): IModel;
63
72
  /**
64
73
  * Convert a Hub Site Application item into a Hub Site, fetching any
65
74
  * additional information that may be required
@@ -0,0 +1,7 @@
1
+ import { IConfigurationSchema } from "../../core";
2
+ export declare type SiteEditorType = (typeof SiteEditorTypes)[number];
3
+ export declare const SiteEditorTypes: readonly ["hub:site:edit"];
4
+ /**
5
+ * defines the JSON schema for a Hub Site's editable fields
6
+ */
7
+ export declare const SiteSchema: IConfigurationSchema;
@@ -0,0 +1,7 @@
1
+ import { IUiSchema } from "../../core";
2
+ /**
3
+ * minimal create uiSchema for Hub Projects - this defines
4
+ * how the schema properties should be rendered in the
5
+ * project creation experience
6
+ */
7
+ export declare const uiSchema: IUiSchema;
@@ -0,0 +1,7 @@
1
+ import { IUiSchema } from "../../core";
2
+ /**
3
+ * complete edit uiSchema for Hub Projects - this defines
4
+ * how the schema properties should be rendered in the
5
+ * project editing experience
6
+ */
7
+ export declare const uiSchema: IUiSchema;
@@ -0,0 +1,9 @@
1
+ import { IModel } from "../../types";
2
+ /**
3
+ * Add the default catalog and collections to the Site model
4
+ * Note: This migration is only applies via `fetchSite(..):IHubSite` and not
5
+ * the older `getSiteById(...):IModel`
6
+ * @param model
7
+ * @returns
8
+ */
9
+ export declare function catalogMigration(model: IModel): IModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "12.40.0",
3
+ "version": "12.42.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",