Browse Source

Add CreateAsset widget

exp1.15
Anitha_M 3 weeks ago
commit
ced61698eb
  1. 1
      CreateAsset/config.json
  2. 29
      CreateAsset/icon.svg
  3. 24
      CreateAsset/manifest.json
  4. 9
      CreateAsset/src/config.ts
  5. 1229
      CreateAsset/src/runtime/widget.tsx
  6. 39
      CreateAsset/src/setting/setting.tsx

1
CreateAsset/config.json

@ -0,0 +1 @@
{}

29
CreateAsset/icon.svg

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="800px" height="800px" viewBox="0 0 590.336 590.336"
xml:space="preserve">
<g>
<g>
<path d="M173.344,543.443l-96.632-75.35L367.4,95.302l96.631,75.349L173.344,543.443z M97.966,465.465l72.749,56.725
L442.78,173.281l-72.749-56.726L97.966,465.465z"/>
</g>
<g>
<path d="M474.671,157.008l-96.63-75.349l23.081-29.601l96.631,75.349L474.671,157.008z M399.292,79.03l72.749,56.726l4.457-5.718
l-72.747-56.726L399.292,79.03z"/>
</g>
<g>
<path d="M507.796,114.537L411.16,39.185l4.838-6.205C424.985,21.454,441.715,0,460.293,0c5.426,0,10.47,1.788,14.991,5.313
l49.683,38.741c5.021,3.813,8.107,9.139,8.932,15.406c1.634,12.435-5.323,28.419-21.27,48.868L507.796,114.537z M432.464,36.593
l72.593,56.605c13.128-18.232,14.372-27.63,13.828-31.765c-0.303-2.3-1.258-3.945-3.097-5.336l-0.091-0.069l-49.724-38.773
c-1.849-1.441-3.653-2.112-5.681-2.112C451.266,15.143,439.857,27.54,432.464,36.593z"/>
</g>
<g>
<path d="M76.405,590.336c-5.983,0-11.641-2.662-15.521-7.307c-3.817-4.566-5.406-10.555-4.369-16.445l14.687-92.385l98.64,76.914
l-86.11,37.842C81.362,589.873,78.897,590.336,76.405,590.336z M82.128,501.922l-10.695,67.266
c-0.35,1.938,0.389,3.316,1.07,4.131c0.98,1.174,2.439,1.875,3.901,1.875c0.575,0,1.16-0.105,1.738-0.314l62.384-27.42
L82.128,501.922z"/>
</g>
</g>
</svg>

24
CreateAsset/manifest.json

@ -0,0 +1,24 @@
{
"name": "CreateAsset",
"label": "CreateAsset",
"type": "widget",
"version": "1.17.0",
"exbVersion": "1.17.0",
"author": "DIVYA LAWRANCE HMS",
"description": "Form 7 Building Update and Approval Application.",
"copyright": "",
"license": "http://www.apache.org/licenses/LICENSE-2.0",
"dependency": [
"jimu-arcgis"
],
"properties": {
"useMapWidgetIds": []
},
"translatedLocales": [
"en"
],
"defaultSize": {
"width": 400,
"height": 600
}
}

9
CreateAsset/src/config.ts

@ -0,0 +1,9 @@
import { type ImmutableObject } from 'seamless-immutable'
export interface Config {
exampleConfigProperty: string
customizeLayers?: boolean
selectedLayerIds?: string[]
}
export type IMConfig = ImmutableObject<Config>

1229
CreateAsset/src/runtime/widget.tsx
File diff suppressed because it is too large
View File

39
CreateAsset/src/setting/setting.tsx

@ -0,0 +1,39 @@
import { React } from 'jimu-core'
import { type AllWidgetSettingProps } from 'jimu-for-builder'
import { MapWidgetSelector } from 'jimu-ui/advanced/setting-components'
const Setting = (
props: AllWidgetSettingProps<any>
) => {
const onMapWidgetSelected = (
useMapWidgetIds: string[]
) => {
props.onSettingChange({
id: props.id,
useMapWidgetIds
})
}
return (
<div
style={{
padding: '10px'
}}
>
<MapWidgetSelector
useMapWidgetIds={
props.useMapWidgetIds
}
onSelect={
onMapWidgetSelected
}
/>
</div>
)
}
export default Setting
Loading…
Cancel
Save