@arcgis/core-adapter 4.32.0-next.34 → 4.32.0-next.36
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/.turbo/turbo-build.log +7 -7
- package/dist/index.cjs +60 -99
- package/dist/index.d.cts +9 -12
- package/dist/index.d.ts +9 -12
- package/dist/index.js +52 -88
- package/package.json +1 -1
- package/scripts/generator.ts +11 -1
- package/scripts/update-adapter-typings.ts +41 -9
- package/src/index.ts +52 -88
- package/support/api-reference-esm-imports.json +4 -0
- package/support/arcgis.d.ts +697 -289
- package/support/publicModules.ts +25 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import https from "https";
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import https from "node:https";
|
|
3
3
|
import resolvePkg from "resolve-pkg";
|
|
4
4
|
|
|
5
5
|
// Get the @arcgis/core installed version
|
|
@@ -22,39 +22,71 @@ const files = [
|
|
|
22
22
|
source: `https://jsapi.esri.com/typings/api-reference-esm-imports-${coreVersion}.json`,
|
|
23
23
|
destination: `${process.cwd()}/support/api-reference-esm-imports.json`,
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
source: "https://raw.devtopia.esri.com/WebGIS/arcgis-js-api/4master/build/publicModules.mjs",
|
|
27
|
+
destination: `${process.cwd()}/support/publicModules.ts`,
|
|
28
|
+
},
|
|
25
29
|
];
|
|
26
30
|
|
|
27
31
|
const HttpOK = 200;
|
|
28
32
|
|
|
29
33
|
// Download the typings and support files.
|
|
30
34
|
async function downloadSupportFiles(source: string, destination: string): Promise<void> {
|
|
31
|
-
const file = fs.createWriteStream(destination);
|
|
32
|
-
|
|
33
35
|
await new Promise((resolve, reject) => {
|
|
34
|
-
|
|
36
|
+
const isPublicModules = source.includes("publicModules.mjs");
|
|
37
|
+
const options: {
|
|
38
|
+
headers?: {
|
|
39
|
+
Authorization: string;
|
|
40
|
+
};
|
|
41
|
+
} = {};
|
|
42
|
+
if (isPublicModules) {
|
|
43
|
+
options.headers = {
|
|
44
|
+
Authorization: `Token ${process.env.DEVTOPIA_TOKEN}`,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
https.get(source, options, (resp) => {
|
|
48
|
+
const file = resp.statusCode === HttpOK ? fs.createWriteStream(destination) : undefined;
|
|
35
49
|
console.log("Downloaded:", source);
|
|
36
50
|
console.log(`Response type: ${resp.headers["content-type"]}`);
|
|
37
51
|
|
|
38
52
|
if (resp.statusCode !== HttpOK) {
|
|
39
53
|
console.error(`Request failed for ${source}:`, resp.statusMessage);
|
|
40
54
|
console.error(`Skipping: ${destination}`);
|
|
55
|
+
file?.close();
|
|
41
56
|
resolve(undefined);
|
|
42
57
|
}
|
|
43
58
|
|
|
44
|
-
|
|
59
|
+
if (isPublicModules) {
|
|
60
|
+
let body = "";
|
|
61
|
+
resp.on("data", (chunk) => {
|
|
62
|
+
body += chunk;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
resp.on("end", () => {
|
|
66
|
+
const regex = /const\s+publicModules\s*=\s*\[(.*?)\];/su;
|
|
67
|
+
const match = body.match(regex);
|
|
68
|
+
if (match) {
|
|
69
|
+
const publicModules = match[1];
|
|
70
|
+
body = `export const publicModules = [${publicModules}];`;
|
|
71
|
+
file?.write(body);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
resp.pipe(file!);
|
|
76
|
+
}
|
|
45
77
|
|
|
46
78
|
resp.on("error", (err) => {
|
|
47
79
|
console.error(`Request error for ${source}:`, err);
|
|
48
80
|
reject(err);
|
|
49
81
|
});
|
|
50
82
|
|
|
51
|
-
file
|
|
83
|
+
file?.on("error", (err) => {
|
|
52
84
|
console.error(`Writing error for ${destination}:`, err);
|
|
53
85
|
reject(err);
|
|
54
86
|
});
|
|
55
87
|
|
|
56
|
-
file
|
|
57
|
-
file
|
|
88
|
+
file?.on("finish", () => {
|
|
89
|
+
file?.close();
|
|
58
90
|
resolve(undefined);
|
|
59
91
|
});
|
|
60
92
|
});
|
package/src/index.ts
CHANGED
|
@@ -8374,6 +8374,32 @@ export async function newWidgetsFeatureFormRelationshipInput(properties: __esri.
|
|
|
8374
8374
|
return new ModConstructor(properties);
|
|
8375
8375
|
}
|
|
8376
8376
|
|
|
8377
|
+
export async function importWidgetsFeatureFormTextElementInput(): Promise<typeof __esri.TextElementInput> {
|
|
8378
|
+
if (isAMD) {
|
|
8379
|
+
return await window.$arcgis.import("esri/widgets/FeatureForm/TextElementInput");
|
|
8380
|
+
}
|
|
8381
|
+
const module = await import("@arcgis/core/widgets/FeatureForm/TextElementInput.js");
|
|
8382
|
+
return isDefaultModule(module) ? module.default : module;
|
|
8383
|
+
}
|
|
8384
|
+
|
|
8385
|
+
export async function newWidgetsFeatureFormTextElementInput(properties: __esri.TextElementInputProperties): Promise<__esri.TextElementInput> {
|
|
8386
|
+
const ModConstructor = await importWidgetsFeatureFormTextElementInput();
|
|
8387
|
+
return new ModConstructor(properties);
|
|
8388
|
+
}
|
|
8389
|
+
|
|
8390
|
+
export async function importWidgetsFeatureFormUtilityNetworkAssociationInput(): Promise<typeof __esri.UtilityNetworkAssociationInput> {
|
|
8391
|
+
if (isAMD) {
|
|
8392
|
+
return await window.$arcgis.import("esri/widgets/FeatureForm/UtilityNetworkAssociationInput");
|
|
8393
|
+
}
|
|
8394
|
+
const module = await import("@arcgis/core/widgets/FeatureForm/UtilityNetworkAssociationInput.js");
|
|
8395
|
+
return isDefaultModule(module) ? module.default : module;
|
|
8396
|
+
}
|
|
8397
|
+
|
|
8398
|
+
export async function newWidgetsFeatureFormUtilityNetworkAssociationInput(properties: __esri.UtilityNetworkAssociationInputProperties): Promise<__esri.UtilityNetworkAssociationInput> {
|
|
8399
|
+
const ModConstructor = await importWidgetsFeatureFormUtilityNetworkAssociationInput();
|
|
8400
|
+
return new ModConstructor(properties);
|
|
8401
|
+
}
|
|
8402
|
+
|
|
8377
8403
|
export async function importWidgetsFeatures(): Promise<typeof __esri.Features> {
|
|
8378
8404
|
if (isAMD) {
|
|
8379
8405
|
return await window.$arcgis.import("esri/widgets/Features");
|
|
@@ -8582,6 +8608,32 @@ export async function newWidgetsFeatureTableSupportFieldColumnTemplate(propertie
|
|
|
8582
8608
|
return new ModConstructor(properties);
|
|
8583
8609
|
}
|
|
8584
8610
|
|
|
8611
|
+
export async function importWidgetsFeatureTableSupportAttachmentsColumnTemplate(): Promise<typeof __esri.AttachmentsColumnTemplate> {
|
|
8612
|
+
if (isAMD) {
|
|
8613
|
+
return await window.$arcgis.import("esri/widgets/FeatureTable/support/AttachmentsColumnTemplate");
|
|
8614
|
+
}
|
|
8615
|
+
const module = await import("@arcgis/core/widgets/FeatureTable/support/AttachmentsColumnTemplate.js");
|
|
8616
|
+
return isDefaultModule(module) ? module.default : module;
|
|
8617
|
+
}
|
|
8618
|
+
|
|
8619
|
+
export async function newWidgetsFeatureTableSupportAttachmentsColumnTemplate(properties: __esri.AttachmentsColumnTemplateProperties): Promise<__esri.AttachmentsColumnTemplate> {
|
|
8620
|
+
const ModConstructor = await importWidgetsFeatureTableSupportAttachmentsColumnTemplate();
|
|
8621
|
+
return new ModConstructor(properties);
|
|
8622
|
+
}
|
|
8623
|
+
|
|
8624
|
+
export async function importWidgetsFeatureTableSupportRelationshipColumnTemplate(): Promise<typeof __esri.RelationshipColumnTemplate> {
|
|
8625
|
+
if (isAMD) {
|
|
8626
|
+
return await window.$arcgis.import("esri/widgets/FeatureTable/support/RelationshipColumnTemplate");
|
|
8627
|
+
}
|
|
8628
|
+
const module = await import("@arcgis/core/widgets/FeatureTable/support/RelationshipColumnTemplate.js");
|
|
8629
|
+
return isDefaultModule(module) ? module.default : module;
|
|
8630
|
+
}
|
|
8631
|
+
|
|
8632
|
+
export async function newWidgetsFeatureTableSupportRelationshipColumnTemplate(properties: __esri.RelationshipColumnTemplateProperties): Promise<__esri.RelationshipColumnTemplate> {
|
|
8633
|
+
const ModConstructor = await importWidgetsFeatureTableSupportRelationshipColumnTemplate();
|
|
8634
|
+
return new ModConstructor(properties);
|
|
8635
|
+
}
|
|
8636
|
+
|
|
8585
8637
|
export async function importWidgetsFeatureTableSupportGroupColumnTemplate(): Promise<typeof __esri.GroupColumnTemplate> {
|
|
8586
8638
|
if (isAMD) {
|
|
8587
8639
|
return await window.$arcgis.import("esri/widgets/FeatureTable/support/GroupColumnTemplate");
|
|
@@ -11667,14 +11719,6 @@ export async function importApplicationsComponentsWebStyleSymbolUtils(): Promise
|
|
|
11667
11719
|
return isDefaultModule(module) ? module.default : module;
|
|
11668
11720
|
}
|
|
11669
11721
|
|
|
11670
|
-
export async function importApplicationsExcaliburVideoViewUtils(): Promise<typeof __esri.videoViewUtils> {
|
|
11671
|
-
if (isAMD) {
|
|
11672
|
-
return await window.$arcgis.import("esri/applications/Excalibur/videoViewUtils");
|
|
11673
|
-
}
|
|
11674
|
-
const module = await import("@arcgis/core/applications/Excalibur/videoViewUtils.js");
|
|
11675
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11676
|
-
}
|
|
11677
|
-
|
|
11678
11722
|
export async function importApplicationsExperienceBuilderSketchUtils(): Promise<typeof __esri.sketchUtils> {
|
|
11679
11723
|
if (isAMD) {
|
|
11680
11724
|
return await window.$arcgis.import("esri/applications/ExperienceBuilder/sketchUtils");
|
|
@@ -11683,54 +11727,6 @@ export async function importApplicationsExperienceBuilderSketchUtils(): Promise<
|
|
|
11683
11727
|
return isDefaultModule(module) ? module.default : module;
|
|
11684
11728
|
}
|
|
11685
11729
|
|
|
11686
|
-
export async function importApplicationsKnowledgeStudioGeneralSharedKgUtils(): Promise<typeof __esri.generalSharedKgUtils> {
|
|
11687
|
-
if (isAMD) {
|
|
11688
|
-
return await window.$arcgis.import("esri/applications/KnowledgeStudio/generalSharedKgUtils");
|
|
11689
|
-
}
|
|
11690
|
-
const module = await import("@arcgis/core/applications/KnowledgeStudio/generalSharedKgUtils.js");
|
|
11691
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11692
|
-
}
|
|
11693
|
-
|
|
11694
|
-
export async function importApplicationsKnowledgeStudioLayerInternalAccessUtils(): Promise<typeof __esri.layerInternalAccessUtils> {
|
|
11695
|
-
if (isAMD) {
|
|
11696
|
-
return await window.$arcgis.import("esri/applications/KnowledgeStudio/layerInternalAccessUtils");
|
|
11697
|
-
}
|
|
11698
|
-
const module = await import("@arcgis/core/applications/KnowledgeStudio/layerInternalAccessUtils.js");
|
|
11699
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11700
|
-
}
|
|
11701
|
-
|
|
11702
|
-
export async function importApplicationsKnowledgeStudioResourceSerializationUtils(): Promise<typeof __esri.resourceSerializationUtils> {
|
|
11703
|
-
if (isAMD) {
|
|
11704
|
-
return await window.$arcgis.import("esri/applications/KnowledgeStudio/resourceSerializationUtils");
|
|
11705
|
-
}
|
|
11706
|
-
const module = await import("@arcgis/core/applications/KnowledgeStudio/resourceSerializationUtils.js");
|
|
11707
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11708
|
-
}
|
|
11709
|
-
|
|
11710
|
-
export async function importApplicationsMapViewerMediaUtils(): Promise<typeof __esri.mediaUtils> {
|
|
11711
|
-
if (isAMD) {
|
|
11712
|
-
return await window.$arcgis.import("esri/applications/MapViewer/mediaUtils");
|
|
11713
|
-
}
|
|
11714
|
-
const module = await import("@arcgis/core/applications/MapViewer/mediaUtils.js");
|
|
11715
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11716
|
-
}
|
|
11717
|
-
|
|
11718
|
-
export async function importApplicationsMapViewerTemplateUtils(): Promise<typeof __esri.templateUtils> {
|
|
11719
|
-
if (isAMD) {
|
|
11720
|
-
return await window.$arcgis.import("esri/applications/MapViewer/templateUtils");
|
|
11721
|
-
}
|
|
11722
|
-
const module = await import("@arcgis/core/applications/MapViewer/templateUtils.js");
|
|
11723
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11724
|
-
}
|
|
11725
|
-
|
|
11726
|
-
export async function importApplicationsSceneViewerColorUtils(): Promise<typeof __esri.SceneViewerColorUtils> {
|
|
11727
|
-
if (isAMD) {
|
|
11728
|
-
return await window.$arcgis.import("esri/applications/SceneViewer/colorUtils");
|
|
11729
|
-
}
|
|
11730
|
-
const module = await import("@arcgis/core/applications/SceneViewer/colorUtils.js");
|
|
11731
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11732
|
-
}
|
|
11733
|
-
|
|
11734
11730
|
export async function importApplicationsSceneViewerDevEnvironmentUtils(): Promise<typeof __esri.devEnvironmentUtils> {
|
|
11735
11731
|
if (isAMD) {
|
|
11736
11732
|
return await window.$arcgis.import("esri/applications/SceneViewer/devEnvironmentUtils");
|
|
@@ -11739,38 +11735,6 @@ export async function importApplicationsSceneViewerDevEnvironmentUtils(): Promis
|
|
|
11739
11735
|
return isDefaultModule(module) ? module.default : module;
|
|
11740
11736
|
}
|
|
11741
11737
|
|
|
11742
|
-
export async function importApplicationsSceneViewerLayerUtils(): Promise<typeof __esri.layerUtils> {
|
|
11743
|
-
if (isAMD) {
|
|
11744
|
-
return await window.$arcgis.import("esri/applications/SceneViewer/layerUtils");
|
|
11745
|
-
}
|
|
11746
|
-
const module = await import("@arcgis/core/applications/SceneViewer/layerUtils.js");
|
|
11747
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11748
|
-
}
|
|
11749
|
-
|
|
11750
|
-
export async function importApplicationsSceneViewerSceneViewerUtils(): Promise<typeof __esri.sceneViewerUtils> {
|
|
11751
|
-
if (isAMD) {
|
|
11752
|
-
return await window.$arcgis.import("esri/applications/SceneViewer/sceneViewerUtils");
|
|
11753
|
-
}
|
|
11754
|
-
const module = await import("@arcgis/core/applications/SceneViewer/sceneViewerUtils.js");
|
|
11755
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11756
|
-
}
|
|
11757
|
-
|
|
11758
|
-
export async function importApplicationsSceneViewerSymbolUtils(): Promise<typeof __esri.SceneViewerSymbolUtils> {
|
|
11759
|
-
if (isAMD) {
|
|
11760
|
-
return await window.$arcgis.import("esri/applications/SceneViewer/symbolUtils");
|
|
11761
|
-
}
|
|
11762
|
-
const module = await import("@arcgis/core/applications/SceneViewer/symbolUtils.js");
|
|
11763
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11764
|
-
}
|
|
11765
|
-
|
|
11766
|
-
export async function importApplicationsUrbanMeshUtils(): Promise<typeof __esri.UrbanMeshUtils> {
|
|
11767
|
-
if (isAMD) {
|
|
11768
|
-
return await window.$arcgis.import("esri/applications/Urban/meshUtils");
|
|
11769
|
-
}
|
|
11770
|
-
const module = await import("@arcgis/core/applications/Urban/meshUtils.js");
|
|
11771
|
-
return isDefaultModule(module) ? module.default : module;
|
|
11772
|
-
}
|
|
11773
|
-
|
|
11774
11738
|
export async function importApplicationsWebEditorSketchUtils(): Promise<typeof __esri.WebEditorSketchUtils> {
|
|
11775
11739
|
if (isAMD) {
|
|
11776
11740
|
return await window.$arcgis.import("esri/applications/WebEditor/sketchUtils");
|
|
@@ -836,6 +836,8 @@
|
|
|
836
836
|
"esri/widgets/FeatureForm/FieldInput": "import FieldInput from \"@arcgis/core/widgets/FeatureForm/FieldInput.js\";",
|
|
837
837
|
"esri/widgets/FeatureForm/GroupInput": "import GroupInput from \"@arcgis/core/widgets/FeatureForm/GroupInput.js\";",
|
|
838
838
|
"esri/widgets/FeatureForm/RelationshipInput": "import RelationshipInput from \"@arcgis/core/widgets/FeatureForm/RelationshipInput.js\";",
|
|
839
|
+
"esri/widgets/FeatureForm/TextElementInput": "import TextElementInput from \"@arcgis/core/widgets/FeatureForm/TextElementInput.js\";",
|
|
840
|
+
"esri/widgets/FeatureForm/UtilityNetworkAssociationInput": "import UtilityNetworkAssociationInput from \"@arcgis/core/widgets/FeatureForm/UtilityNetworkAssociationInput.js\";",
|
|
839
841
|
"esri/widgets/Features": "import Features from \"@arcgis/core/widgets/Features.js\";",
|
|
840
842
|
"esri/widgets/Features/FeaturesViewModel": "import FeaturesViewModel from \"@arcgis/core/widgets/Features/FeaturesViewModel.js\";",
|
|
841
843
|
"esri/widgets/FeatureTable": "import FeatureTable from \"@arcgis/core/widgets/FeatureTable.js\";",
|
|
@@ -852,6 +854,8 @@
|
|
|
852
854
|
"esri/widgets/FeatureTable/support/ColumnTemplate": "import ColumnTemplate from \"@arcgis/core/widgets/FeatureTable/support/ColumnTemplate.js\";",
|
|
853
855
|
"esri/widgets/FeatureTable/support/ColumnTemplateBase": "import ColumnTemplateBase from \"@arcgis/core/widgets/FeatureTable/support/ColumnTemplateBase.js\";",
|
|
854
856
|
"esri/widgets/FeatureTable/support/FieldColumnTemplate": "import FieldColumnTemplate from \"@arcgis/core/widgets/FeatureTable/support/FieldColumnTemplate.js\";",
|
|
857
|
+
"esri/widgets/FeatureTable/support/AttachmentsColumnTemplate": "import AttachmentsColumnTemplate from \"@arcgis/core/widgets/FeatureTable/support/AttachmentsColumnTemplate.js\";",
|
|
858
|
+
"esri/widgets/FeatureTable/support/RelationshipColumnTemplate": "import RelationshipColumnTemplate from \"@arcgis/core/widgets/FeatureTable/support/RelationshipColumnTemplate.js\";",
|
|
855
859
|
"esri/widgets/FeatureTable/support/GroupColumnTemplate": "import GroupColumnTemplate from \"@arcgis/core/widgets/FeatureTable/support/GroupColumnTemplate.js\";",
|
|
856
860
|
"esri/widgets/FeatureTable/support/TableTemplate": "import TableTemplate from \"@arcgis/core/widgets/FeatureTable/support/TableTemplate.js\";",
|
|
857
861
|
"esri/widgets/FeatureTemplates": "import FeatureTemplates from \"@arcgis/core/widgets/FeatureTemplates.js\";",
|