@itwin/map-layers 3.5.0-dev.31 → 3.5.0-dev.33

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectMapFormat.js","sourceRoot":"","sources":["../../../../src/ui/widget/SelectMapFormat.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,8BAA8B;AAE9B,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAgB,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAC,uBAAuB,EAAC,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,QAAQ;AACR,wEAAwE;AACxE,4EAA4E;AAC5E,wDAAwD;AACxD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,eAAe;CAC/B,CAAC;AASF,gEAAgE;AAChE,MAAM,UAAU,eAAe,CAAC,KAA2B;;IAEzD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAA,KAAK,CAAC,KAAK,mCAAI,SAAS,CAAC,MAAM,CAAC,CAAC;IAClF,MAAM,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,gDAAgD,CAAC,CAAC,CAAC;IAE3I,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,GAA2B,EAAE;;QAC/D,MAAM,OAAO,GAA2B;YACtC,EAAE,KAAK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MAAM,CAAC,EAAE,0CAAE,QAAQ,CAAC,aAAa,CAAC,EAAC,CAAC;oBACzC,6BAAK,KAAK,EAAE,kBAAkB;wBAC5B,oBAAC,UAAU,IAAC,SAAS,EAAC,sCAAsC,EAAE,IAAI,EAAC,OAAO;4BACxE,oBAAC,uBAAuB,OAAG,CAChB,CACT;oBACN,CAAC,CAAC,SAAS,IACZ,MAAM,CAAC,KAAK,CACJ,CAAC,CAAA;SAAA,GAChB,CACH,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n// cSpell:ignore Modeless WMTS\r\n\r\nimport { IconButton, MenuItem, Select, SelectOption } from \"@itwin/itwinui-react\";\r\nimport * as React from \"react\";\r\nimport { MapTypesOptions } from \"../Interfaces\";\r\nimport \"./MapUrlDialog.scss\";\r\nimport {SvgTechnicalPreviewMini} from \"@itwin/itwinui-icons-color-react\";\r\nimport { MapLayersUI } from \"../../mapLayers\";\r\nimport { IModelApp } from \"@itwin/core-frontend\";\r\n\r\n// TODO:\r\n// Remove this structure and iterate over the registry's active formats.\r\n// Still need a proper way to exclude some format, like we currently do with\r\n// 'TileUrl' without the need to hardcode any format Id.\r\nexport const MAP_TYPES = {\r\n wms: \"WMS\",\r\n arcGis: \"ArcGIS\",\r\n wmts: \"WMTS\",\r\n tileUrl: \"TileURL\",\r\n arcGisFeature: \"ArcGISFeature\",\r\n};\r\n\r\ninterface SelectMapFormatProps {\r\n value?: string;\r\n disabled?: boolean;\r\n mapTypesOptions?: MapTypesOptions;\r\n onChange?: (mapType: string) => void;\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport function SelectMapFormat(props: SelectMapFormatProps) {\r\n\r\n const [mapFormat, setMapFormat] = React.useState(props.value ?? MAP_TYPES.arcGis);\r\n const [techPreviewTooltip] = React.useState(MapLayersUI.localization.getLocalizedString(\"mapLayers:CustomAttach.TechPreviewBadgeTooltip\"));\r\n\r\n const [mapFormats] = React.useState((): SelectOption<string>[] => {\r\n const formats: SelectOption<string>[] = [\r\n { value: MAP_TYPES.arcGis, label: MAP_TYPES.arcGis },\r\n { value: MAP_TYPES.wms, label: MAP_TYPES.wms },\r\n { value: MAP_TYPES.wmts, label: MAP_TYPES.wmts },\r\n ];\r\n if (props.mapTypesOptions?.supportTileUrl)\r\n formats.push({ value: MAP_TYPES.tileUrl, label: MAP_TYPES.tileUrl });\r\n\r\n if (IModelApp.mapLayerFormatRegistry.isRegistered(MAP_TYPES.arcGisFeature))\r\n formats.push( { value: MAP_TYPES.arcGisFeature, label: MAP_TYPES.arcGisFeature, id:\"techPreview\" });\r\n\r\n return formats;\r\n });\r\n\r\n const handleOnChange = React.useCallback((value: string) => {\r\n setMapFormat(value);\r\n if (props.onChange) {\r\n props.onChange(value);\r\n }\r\n }, [props]);\r\n\r\n return (\r\n\r\n <Select\r\n className=\"map-layer-source-select\"\r\n options={mapFormats}\r\n value={mapFormat}\r\n disabled={props.disabled}\r\n onChange={handleOnChange}\r\n size=\"small\"\r\n itemRenderer={\r\n (option) => (\r\n <MenuItem\r\n badge={option.id?.includes(\"techPreview\") ?\r\n <div title={techPreviewTooltip}>\r\n <IconButton className=\"map-layer-source-select-previewBadge\" size=\"small\">\r\n <SvgTechnicalPreviewMini />\r\n </IconButton>\r\n </div>\r\n : undefined}>\r\n {option.label}\r\n </MenuItem>) }\r\n />\r\n );\r\n}\r\n"]}
@@ -46,6 +46,7 @@
46
46
  "SearchPlaceholder": "Search...",
47
47
  "StoreOnModelSettings": "Store on Model Settings",
48
48
  "StoreOnITwinSettings": "Store on iTwin Settings",
49
+ "TechPreviewBadgeTooltip": "Technology preview",
49
50
  "Type": "Type",
50
51
  "URL": "URL",
51
52
  "UrlInputPlaceHolder": "Enter Map Source URL",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/map-layers",
3
- "version": "3.5.0-dev.31",
3
+ "version": "3.5.0-dev.33",
4
4
  "description": "Extension that adds a Map Layers Widget",
5
5
  "main": "lib/cjs/map-layers.js",
6
6
  "module": "lib/esm/map-layers.js",
@@ -21,22 +21,22 @@
21
21
  "url": "http://www.bentley.com"
22
22
  },
23
23
  "devDependencies": {
24
- "@itwin/appui-abstract": "3.5.0-dev.31",
25
- "@itwin/appui-layout-react": "3.5.0-dev.31",
26
- "@itwin/appui-react": "3.5.0-dev.31",
27
- "@itwin/build-tools": "3.5.0-dev.31",
28
- "@itwin/components-react": "3.5.0-dev.31",
29
- "@itwin/core-bentley": "3.5.0-dev.31",
30
- "@itwin/core-common": "3.5.0-dev.31",
31
- "@itwin/core-frontend": "3.5.0-dev.31",
32
- "@itwin/core-geometry": "3.5.0-dev.31",
33
- "@itwin/core-quantity": "3.5.0-dev.31",
34
- "@itwin/core-react": "3.5.0-dev.31",
35
- "@itwin/eslint-plugin": "3.5.0-dev.31",
36
- "@itwin/imodel-components-react": "3.5.0-dev.31",
24
+ "@itwin/appui-abstract": "3.5.0-dev.33",
25
+ "@itwin/appui-layout-react": "3.5.0-dev.33",
26
+ "@itwin/appui-react": "3.5.0-dev.33",
27
+ "@itwin/build-tools": "3.5.0-dev.33",
28
+ "@itwin/components-react": "3.5.0-dev.33",
29
+ "@itwin/core-bentley": "3.5.0-dev.33",
30
+ "@itwin/core-common": "3.5.0-dev.33",
31
+ "@itwin/core-frontend": "3.5.0-dev.33",
32
+ "@itwin/core-geometry": "3.5.0-dev.33",
33
+ "@itwin/core-quantity": "3.5.0-dev.33",
34
+ "@itwin/core-react": "3.5.0-dev.33",
35
+ "@itwin/eslint-plugin": "3.5.0-dev.33",
36
+ "@itwin/imodel-components-react": "3.5.0-dev.33",
37
37
  "@itwin/itwinui-css": "0.x",
38
38
  "@itwin/itwinui-react": "~1.42.0",
39
- "@itwin/presentation-common": "3.5.0-dev.31",
39
+ "@itwin/presentation-common": "3.5.0-dev.33",
40
40
  "@testing-library/react": "^12.0.0",
41
41
  "@testing-library/react-hooks": "^7.0.2",
42
42
  "@types/chai": "4.3.1",
@@ -69,21 +69,22 @@
69
69
  "typescript": "~4.4.0"
70
70
  },
71
71
  "dependencies": {
72
+ "@itwin/itwinui-icons-color-react": "~1.0.3",
72
73
  "classnames": "^2.3.1",
73
74
  "react-beautiful-dnd": "^13.0.0"
74
75
  },
75
76
  "peerDependencies": {
76
- "@itwin/core-bentley": "^3.5.0-dev.31",
77
- "@itwin/core-geometry": "^3.5.0-dev.31",
78
- "@itwin/core-common": "^3.5.0-dev.31",
79
- "@itwin/core-frontend": "^3.5.0-dev.31",
80
- "@itwin/core-quantity": "^3.5.0-dev.31",
81
- "@itwin/appui-abstract": "^3.5.0-dev.31",
82
- "@itwin/components-react": "^3.5.0-dev.31",
83
- "@itwin/core-react": "^3.5.0-dev.31",
84
- "@itwin/appui-react": "^3.5.0-dev.31",
85
- "@itwin/imodel-components-react": "^3.5.0-dev.31",
86
- "@itwin/appui-layout-react": "^3.5.0-dev.31",
77
+ "@itwin/core-bentley": "^3.5.0-dev.33",
78
+ "@itwin/core-geometry": "^3.5.0-dev.33",
79
+ "@itwin/core-common": "^3.5.0-dev.33",
80
+ "@itwin/core-frontend": "^3.5.0-dev.33",
81
+ "@itwin/core-quantity": "^3.5.0-dev.33",
82
+ "@itwin/appui-abstract": "^3.5.0-dev.33",
83
+ "@itwin/components-react": "^3.5.0-dev.33",
84
+ "@itwin/core-react": "^3.5.0-dev.33",
85
+ "@itwin/appui-react": "^3.5.0-dev.33",
86
+ "@itwin/imodel-components-react": "^3.5.0-dev.33",
87
+ "@itwin/appui-layout-react": "^3.5.0-dev.33",
87
88
  "react": "^17.0.0",
88
89
  "react-dom": "^17.0.0"
89
90
  },