Skip to content

Commit 1dd1d78

Browse files
sorenoidSoren Rothkaushikrwhud10837eri9000
authored
merge feature branches/forms -> v.next (#360)
* only show date in field when the element's includeTime is false. * feedback and other gradle workarounds * DateTimePicker validation and state update (#78) * hoisted states upto DateTimePickerState and removed visible behavior * added DateTime class * conflict resolution fix * DateTimePicker landscape layout (#83) * consume core * print stack trace when core throws a sigbus * triage core issues * print stack trace when core throws a sigbus * don't change supprting text colors under any circumstances. * run test from json data, not from service data * update to latest core build * FormTextField description focus fix (#87) * add data. avoid expression names * avoid expression names * Form content clipping fix (#89) * added measure and placement constraints for the bottomsheetscaffold * removed transparent top bar :( * remove preview that con no longer be doen without public serialization support. fix some things that broke through merges remove serialization dependency * add some remembers. not sure how to remember a State instance on a state object across pause/resume * add saver for DateTimePickerState * add saver for DateTimePickerState * remove logging * date time fixes wip * date time calcs all working correctly * remove print statements * doc, remove more print statements * better doc * eol at eof * update textfield tests to use core API * remove excess remembrance. refactor a bit for PR feedback. * naming changes * eol at eof * work around lack of recompose of the yearremove input for remembering the date time picker state. add a call to dateTimePickerState.setSelection so that even though the state object is remembered, the selection is re-set on recompose. * remove input for remembering the date time picker state. add a call to dateTimePickerState.setSelection so that even though the state object is remembered, the selection is re-set on recompose. * fix issue with DateTimePicker state saver * address basic issue of enabling the OK button in a way that abides the min and max datetimes * fix min and max comparisons * Update DateTimePicker.kt (#113) * init copy * fixed compilation errors * Featureforms micro-app update to cache portalitems (#107) * Working fetching portals from remote * added icons for portal access type * added room database * working room database for portal cache * moved first fetch into viewmodel * refactored repository-domain structure * updated content visibility once loaded * working update * revert unchanged files * fixed thumbnail loading * added comments * updated fetching portalitems based on their itemid from local cache * added new public webmap and added enabled state to refresh dropdown menu * PR feedback * FeatureformsApp : add thumbnails cache (#110) * added thumbnail caching * updated access info from thumbnails to text * removed itemrepository and moved responsibility into PortalItemRepository * added comments * moved coil dependency to root level * Update PortalItemRepository.kt * added mutex to local cache map * fix return@withContext usage * remove commented out code * pick up latest SDK with mutable elements in the FeatureForm * moved imports * fixed timepicker bugs * added copyright * move TimePickerState into the PickerContent. Remove call to datePicker.setSelection. Remove now and today state object methods. * remove unused code * fix up last commit -- from the wrong source on my machine! * subtract the offset to represent fake picker UTC, don't add it * picker dates is utc plus offset (not minus!). get the date millis after the addition so the timezone doesn't affect the times derived from the millis. * fix now freeze (#123) * remove call to set date picker set selection, no longer needed. * remove double counting * wip with included build * value, editable, and required events working for text fields. * dontuse a coroutine use a LaunchedEffect * respect isRequired in TextFields! * required events support * note * doc * date time expression support * doc * add circular progress indicator * state flow combine * only evaluate expressions based on user edits to text fields, not due to changes from the evaluation of expressions. * text form changes to support use of combine * date time form element input type changes to support use of combine * date time form element input type changes to support use of combine * rollback versioning changes * roll back unrelated code change * remove redundant statefulness * follow up to events API changes * Forms combo box implementation (#127) * init prototype * added bottomsheet for combobox * Update FormTextFieldState.kt * refactored basefieldstate * updated basetextfield * moved combobox to use basetextfield and updated basetextfield * added description * changed combobox bottomsheet to dialog * added clear icon * added no value validation and row * optimized imports * added comments and copyright * Update FormElements.kt * updated basefieldstate to work with expressions * added more comments * combobox expressions update * Update ComboBoxFieldState.kt * fixed text field validation * using codedvalues from api * updated validation for textfield * changed basefieldstate to be a simple class * update string resource * add remembersaveable to comboboxdialog * fix conflict resolution error * numeric text field support. * fix conflict resolution error. * remember to evaluate expressions * Form field states remember saveable (#131) * init refactor * textareainput show done button even if field is empty * introduced classes to wrap common parameters * Update FormElements.kt * working remembersaveable * added remembersaveable outside lazycolumn * added id for formfieldelement * optimized imports * undo changes * optimized more imports * updated field element to not remember datetimefieldstate * updated unique id calc for fieldformelement * mark comboboxfieldstate as stable * add domain, fieldType to BaseFieldProperties. * tests for numeric text box * self review * change identifyLayer to identifyLayers (#137) * move fieldType and domain down to FormTextFieldState. get range from the feature table. * just use number keyboard for integers so negative numbers can be typed by the user. * revert settings.gradle changes * Forms combo box required validation (#134) * added required expression support * added validation on "clear" * hoist up the fieldType so the TextField is just handed a keyboard type. * migrated to use standardbottomsheet instead of a scaffold (#135) * updated sdk build to 4019 (#139) * use numeric keyboard in ComboBoxDialog filter when fieldType is numeric. * filter out layers without forms in results of identify * simplify logic * Forms: DateTimeFieldState refactor (#133) * init refactor * textareainput show done button even if field is empty * introduced classes to wrap common parameters * Update FormElements.kt * working remembersaveable * added remembersaveable outside lazycolumn * added id for formfieldelement * optimized imports * undo changes * optimized more imports * updated field element to not remember datetimefieldstate * migrated DateTimeFieldState to use BaseFieldState * added saver to DateTimeFieldState * update doc * switch input support * address feedback * drop the first isFocused StateFlow emission in the FormTextFieldState init block. * fall back to combo when the initial value doesn't match the on or off coded value. * self review * rewrite validation for FormTextFields * Forms : Refactor `ComboBoxFieldState` into `CodedValueFieldState` (#146) * refactor comboboxfieldstate into codedvaluefieldstate * Update CodedValueFieldState.kt * refactored list of codedvalues to be list of strings * changed comboboxdialog to show codedvalue.name * Forms : Updated `ComboboxField` to display `CodedValue.name` (#148) * updated comboboxfield to display codedvalue.name * optimized imports * SwitchFieldState inherits from CodedValueFieldState * support error validation state in FormTextFieldState.Saver, rememember * clean up, add runtime checks, comments. * further isolate error messaging and validation * updated basetextfield label overflow and added preview (#150) * Forms : introduce `RadioButtonInput` (#149) * init radiobutton field type impl * added no value row handing * added default color support for radio button * refactor comboboxfieldstate into codedvaluefieldstate * Update CodedValueFieldState.kt * refactored list of codedvalues to be list of strings * radiobuttonfieldstate subclasses codedvaluefieldstate * updated merge conflicts * fixed fallback behavior * extracted params from RadioButtonField to support preview * PR feedback * conflict resolution * fix collateral merge build breaker * present the latest emitted value for a text field, regardless of editability. * allow switch to change when text field is tapped. remember if the switch is falling back to a combo. * provide the Switch through the trailingIcon of the OutlinedTextField * remove unnecessary open modifier * add try-catch to featureFormDefinition check (#155) * drop first emitted value from properties.value in favor of the initial value. This preserves edits on config change even if the field is no longer editable. * Forms : Fix orientation changes for Dialogs (#156) * added custom dialog type * updated dialog for ComboBoxField * updated dialog name * added doc * add dialog request callback to switch fallback * Forms: `DateTimeField` changes (#161) * moved to BaseFieldState * added required validation * optimized expr eval ui (#169) * `Forms`: DateTimePicker defaults (#168) * moved to BaseFieldState * added required validation * updated default datetimepicker logic * Update MapScreen.kt (#171) * removed FormElement dependency from FieldElement (#175) * consume update value (#162) * provide a StateFlow for the formattedValue property * update to 4036 SDK * remove release signing logic * Use updateValue to set the attribute value. * Cast the value to the appropriate type before calling updateValue. * fix fallback logic. accept Instant as a supported type for a FieldType of type DateTime. * make the input type of radio a String and base logic around the name of the coded value. * use name instead of code as the value for all elements which use a CodedValueFieldState. * log a warning when applying edits fails * change name of formattedFlow. show a toast when edits cannot be applied --------- Co-authored-by: Soren Roth <sor10874@esri.com> * update to rtc 4043 (#180) Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms`: Group Elements Support (#179) * optimized state creation (#181) * update to build 4046 (#185) * use datetime raw value (#184) * expect a formatted value to be UTC * make BaseFieldState generic * make DateTimeFieldState vary with Instant? make DateTimeField work with Instant, not Long. * only support date time text field value changes that clear the text. * PR review suggestions * fuse usage of formattedValue and value into one type safe generic function --------- Co-authored-by: Soren Roth <sor10874@esri.com> * novaluelabel selection fix (#188) * searchable items map list screen (#189) * make maps searchable by title or item id * hoist search text to the map list view model * filter field consistency between horizontal and vertical layout. rounded corners. --------- Co-authored-by: Soren Roth <sor10874@esri.com> * bump sdk to 4056 (#196) Co-authored-by: Soren Roth <sor10874@esri.com> * Forms: DatePickerDialog scaling (#198) * fix ff tests (#201) * update tests for type safe value flow * remove unnecessary modifier --------- Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms`: Micro-app add enterprise login (#204) * `Forms` : Microapp SideSheet support (#207) * make values focusable (and copyable) when not editable (#200) * make values focusable (and copyable) when isEditable = false. * organize color defaults for BaseTextField --------- Co-authored-by: Soren Roth <sor10874@esri.com> * Forms: Add ComboBox tests (#141) * `Forms` : GroupElements fixes (#210) * `Forms` microapp : Add network credential store (#215) * `Forms`: GroupElement tests (#214) * `forms:` extract commit transaction to microapp (#209) * extract commit support from public toolkit featureform component. * move commitEdits into MapViewModel --------- Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms`: Microapp add login url recent history (#222) * `Forms`: Combo Box Dialog sizing (#225) * `Forms`: Microapp optimizations (#239) * removed refresh action * added parallel item loading * removed redundant code * introduced AsyncImage and removed dependency on coil * updated asyncimage params * removed thumbnail loading from portal item repository and from the database * added comments * removed coroutinescope dependency for portal item repo * added remember for imageloader * Update PortalItemRepository.kt * `Forms`: Common base state (#252) * added FormElementState * updated state reading * updated saver type * refactored and removed feature form state (#250) * validation via the SDK (#267) * expect a formatted value to be UTC * make BaseFieldState generic * make DateTimeFieldState vary with Instant? make DateTimeField work with Instant, not Long. * first pass at consuming core validation errors * factor out Validation States to a common file * remove merge detritus * update SDK. * cleanup * remove unused import. simplify syntax. --------- Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms`: Refactored Dialog Mechanism (#254) * `Forms`: Iterable collection of states (#263) * fix renamed method calls (#271) * fix test compilation errors (#273) Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms`: Refactor Validation (#276) * `Forms`: Fix failing tests (#283) * `Forms:` date time UI tests (#277) * date time picker interrogation * fix test compilation errors * date time tests * comments * remove debugging code --------- Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms`: Refactored state flow based Impl into compose state based (#287) * `Forms` : Added discardEdits API and UI (#295) * `Forms`: Submit Form Validation (#292) * bumping sdk to 4122 (#299) Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms`: Select Feature (#298) * merge v next (#302) * Update dependency versions (#235) * kdoc project to doc the released toolkit components. (#284) * kdoc project to doc the released toolkit components. * add dependencies on the dependencies of the released projects. * Update kdoc/build.gradle.kts Co-authored-by: Erick Lopez Solis <erick_solis@esri.com> --------- Co-authored-by: Soren Roth <sor10874@esri.com> Co-authored-by: Erick Lopez Solis <erick_solis@esri.com> * add back compose navigation and use compose bom in ff app --------- Co-authored-by: hud10837 <hmiears@esri.com> Co-authored-by: Soren Roth <sor10874@esri.com> Co-authored-by: Erick Lopez Solis <erick_solis@esri.com> * fix up versions. * make FormElementState internal (#304) * `Forms`: Update readme (#305) * `Forms` : Update disabled fields style (#308) * incorporate breaking API change GroupElement.formElements -> GroupElement.elements (#311) Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms`: Attachments API (#313) * added mock api * Update AttachmentFormElement.kt * added check for creating bitmaps * updated with latest api design * Update evaluation expression loading animation (#322) * reverted to outlinedtextfield (#323) * `Forms` Fork date picker (#321) * attachment UI functional prototype (#317) * basic attachment element view * AttachmentDetails view * static design complete * use passed in modifier for top level card * ship it * add a choose file button. add cloud icon * add editable state to header * rename file * share interaction source between thumnail and details * remove unused code * set thumbnail image aspect ratio to 1.0f * code review UI changes * minor style sizing * remove hardcoded prototype composable call --------- Co-authored-by: Soren Roth <sor10874@esri.com> * Add version to API ref (#314) (#328) Co-authored-by: Shubham Sharma <shubhamsharma@esri.com> * `Forms` : Consume latest sdk (#324) * feature form recomposition when a new Feature is selected (#326) * support changing selected feature without showin discard edits dialog * add dialog when selecting new Feature. * remove comment * feedback --------- Co-authored-by: Soren Roth <sor10874@esri.com> * remove experimental softwarekeyboardcontroller (#335) * `Forms`: Consume `validationErrors` stateflow (#338) * pick up SDK 4159 (#340) Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms`: Add basic theming support (#339) * updated tests and removed clear icon for combo fields (#342) * make Attachment prototypes internal for release. (#344) Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms` : Read only fields re-design (#346) * `Forms`: bump sdk to 4167 (#347) * `Forms` : Revert map state (#348) * `Forms` api backwards compatibility validation (#345) * add api file and bcv support * ignore ComposableSingleton classes * update api file * add todo --------- Co-authored-by: Soren Roth <sor10874@esri.com> * create an internal subpackage containing all non public packages. (#350) Co-authored-by: Soren Roth <sor10874@esri.com> * replace clear button on required date time fields (#351) * replace clear button from required date time fields with date time picker dialog button * just use the edit calendar icon. --------- Co-authored-by: Soren Roth <sor10874@esri.com> * `Forms` : add radio and switch tests (#352) * added radio and switch tests * added comments * remove old view model test from app project. * update since version of the public FeatureForm composable method. * add copyrights * remove kapt from featureforms app * move ksp plugin to end of list * Create README.md * Add files via upload * Update README.md --------- Co-authored-by: Soren Roth <sor10874@esri.com> Co-authored-by: Kaushik Meesala <kaushik.pulagara@gmail.com> Co-authored-by: Kaushik Meesala <kmeesala@esri.com> Co-authored-by: hud10837 <hmiears@esri.com> Co-authored-by: Erick Lopez Solis <erick_solis@esri.com> Co-authored-by: Puneet Prakash <puneet_prakash@esri.com> Co-authored-by: Shubham Sharma <shubhamsharma@esri.com>
1 parent 1400121 commit 1dd1d78

File tree

126 files changed

+19346
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+19346
-5
lines changed

build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
plugins {
2121
alias(libs.plugins.android.application) apply false
2222
alias(libs.plugins.android.library) apply false
23+
alias(libs.plugins.binary.compatibility.validator) apply false
2324
alias(libs.plugins.kotlin.android) apply false
2425
alias(libs.plugins.gradle.secrets) apply false
26+
alias(libs.plugins.ksp) apply false
27+
alias(libs.plugins.hilt) apply false
2528
alias(libs.plugins.kotlin.serialization) apply false
2629
alias(libs.plugins.dokka) apply false
2730
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# http://www.gradle.org/docs/current/userguide/build_environment.html
2525
# Specifies the JVM arguments used for the daemon process.
2626
# The setting is particularly useful for tweaking memory settings.
27-
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
27+
org.gradle.jvmargs=-Xmx6g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8
2828
# When configured, Gradle will run in incubating parallel mode.
2929
# This option should only be used with decoupled projects. More details, visit
3030
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
@@ -54,4 +54,4 @@ ignoreBuildNumber=false
5454
# these versions define the dependency of the ArcGIS Maps SDK for Kotlin dependency
5555
# and are generally not overridden at the command line unless a special build is requested.
5656
sdkVersionNumber=200.4.0
57-
sdkBuildNumber=4122
57+
sdkBuildNumber=4180

gradle/libs.versions.toml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,83 @@
11
[versions]
22
androidGradlePlugin = "8.2.0"
33
androidXBrowser = "1.7.0"
4+
coilBOM = "2.5.0"
45
composeBOM = "2023.10.01"
56
androidxComposeCompiler = "1.5.6"
67
androidxCore = "1.12.0"
78
androidxEspresso = "3.5.1"
9+
androidxHiltNavigationCompose = "1.0.0"
810
androidxLifecycle = "2.6.2"
11+
androidxMaterialIcons = "1.4.3"
912
androidxTestExt = "1.1.5"
13+
androidxWindow = "1.2.0"
14+
binaryCompatibilityValidator = "0.14.0"
1015
compileSdk = "34"
16+
compose-navigation = "2.7.5"
1117
dokka = "1.9.10"
18+
hilt = "2.48"
19+
hiltExt = "1.0.0"
1220
junit = "4.13.2"
1321
kotlin = "1.9.21"
22+
ksp = "1.9.21-1.0.16"
1423
minSdk = "26"
1524
kotlinxCoroutinesTest = "1.7.3"
1625
kotlinxSerializationJson = "1.5.1"
26+
room = "2.6.0"
1727
truth = "1.1.4"
1828

1929
[libraries]
2030
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose"}
2131
androidx-browser = { group = "androidx.browser", name = "browser", version.ref = "androidXBrowser"}
2232
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" }
2333
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBOM" }
34+
androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation" }
2435
androidx-compose-ui = { group = "androidx.compose.ui", name = "ui"}
2536
androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime"}
2637
androidx-compose-material3 = { module = "androidx.compose.material3:material3"}
38+
androidx-compose-navigation = { group = "androidx.navigation", name = "navigation-compose", version.ref = "compose-navigation" }
2739
androidx-compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics"}
2840
androidx-compose-ui-test = { group = "androidx.compose.ui", name = "ui-test-junit4"}
2941
androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling"}
3042
androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview"}
3143
androidx-compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest"}
44+
androidx-compose-ui-util = { group = "androidx.compose.ui", name = "ui-util"}
45+
androidx-hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" }
3246
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidxLifecycle" }
3347
androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose"}
3448
androidx-lifecycle-runtime-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose"}
49+
androidx-material-icons = { group = "androidx.compose.material", name = "material-icons-extended", version.ref = "androidxMaterialIcons"}
3550
androidx-test-ext = { group = "androidx.test.ext", name = "junit-ktx", version.ref = "androidxTestExt" }
3651
androidx-test-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidxEspresso" }
52+
androidx-window = { group = "androidx.window", name = "window", version.ref = "androidxWindow" }
53+
androidx-window-core = { group = "androidx.window", name = "window-core", version.ref = "androidxWindow" }
54+
coil-bom = { group = "io.coil-kt", name = "coil-bom", version.ref = "coilBOM" }
55+
coil = { group = "io.coil-kt", name = "coil" }
56+
coil-base = { group = "io.coil-kt", name = "coil-base" }
57+
coil-compose = { group = "io.coil-kt", name = "coil-compose" }
58+
hilt-android-core = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
59+
hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" }
60+
hilt-ext-compiler = { group = "androidx.hilt", name = "hilt-compiler", version.ref = "hiltExt" }
61+
hilt-ext-work = { group = "androidx.hilt", name = "hilt-work", version.ref = "hiltExt" }
3762
junit = { group = "junit", name = "junit", version.ref = "junit" }
3863
kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin"}
3964
kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "kotlinxSerializationJson" }
4065
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
4166
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutinesTest" }
67+
room-runtime = { group = "androidx.room", name = "room-runtime", version.ref = "room" }
68+
room-compiler = { group = "androidx.room", name = "room-compiler", version.ref = "room" }
69+
room-ext = { group = "androidx.room", name = "room-ktx", version.ref = "room" }
4270
truth = { group = "com.google.truth", name = "truth", version.ref = "truth" }
4371
dokka-versioning = { group = "org.jetbrains.dokka", name = "versioning-plugin", version.ref = "dokka" }
4472

4573
[plugins]
4674
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
4775
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
76+
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binaryCompatibilityValidator"}
4877
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
78+
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
4979
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
80+
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
5081
gradle-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version = "2.0.1"}
5182
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
5283

@@ -85,5 +116,3 @@ unitTest = [
85116
"kotlinx-coroutines-test",
86117
"truth"
87118
]
88-
89-
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# FeatureForms Micro-app
2+
3+
This micro-app demonstrates the use of the [FeatureForm](../../toolkit/featureforms/README.md) toolkit component which provides a rich, dynamic, and responsive form
4+
for editing Feature attributes.
5+
6+
![Screenshot](screenshot.gif)
7+
8+
## Usage
9+
10+
The application provides a web map gallery and a map viewer which invokes the form when Features are tapped.
11+
Authentication is optional but limited to specific public web maps.
12+
13+
To authenticate ArcGIS Online with username and password, please provide values in `local.properties` as follows
14+
15+
```
16+
webMapUser=XXX
17+
webMapPassword=YYY
18+
```
19+
20+
For more information on the `FeatureForm` component and how it works, see it's [Readme](../../toolkit/featureforms/README.md).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/*
2+
*
3+
* Copyright 2024 Esri
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
plugins {
20+
id("com.android.application")
21+
id("org.jetbrains.kotlin.android")
22+
id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin")
23+
id("com.google.dagger.hilt.android")
24+
id("com.google.devtools.ksp")
25+
}
26+
27+
secrets {
28+
defaultPropertiesFileName = "secrets.defaults.properties"
29+
}
30+
31+
android {
32+
namespace = "com.arcgismaps.toolkit.featureformsapp"
33+
compileSdk = libs.versions.compileSdk.get().toInt()
34+
35+
defaultConfig {
36+
applicationId ="com.arcgismaps.toolkit.featureformsapp"
37+
minSdk = libs.versions.minSdk.get().toInt()
38+
targetSdk = libs.versions.compileSdk.get().toInt()
39+
versionCode = 1
40+
versionName = "1.0"
41+
42+
testInstrumentationRunner ="androidx.test.runner.AndroidJUnitRunner"
43+
vectorDrawables {
44+
useSupportLibrary = true
45+
}
46+
}
47+
buildTypes {
48+
release {
49+
isMinifyEnabled = false
50+
//proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"),("proguard-rules.pro"
51+
}
52+
}
53+
compileOptions {
54+
sourceCompatibility = JavaVersion.VERSION_1_8
55+
targetCompatibility = JavaVersion.VERSION_1_8
56+
}
57+
kotlinOptions {
58+
jvmTarget = "1.8"
59+
}
60+
@Suppress("UnstableApiUsage")
61+
buildFeatures {
62+
compose = true
63+
buildConfig = true
64+
}
65+
66+
composeOptions {
67+
kotlinCompilerExtensionVersion = libs.versions.androidxComposeCompiler.get()
68+
}
69+
packaging {
70+
resources {
71+
excludes += "/META-INF/{AL2.0,LGPL2.1}"
72+
}
73+
}
74+
}
75+
76+
//https://youtrack.jetbrains.com/issue/KTIJ-21063
77+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class).all {
78+
kotlinOptions.freeCompilerArgs += "-Xcontext-receivers"
79+
}
80+
81+
dependencies {
82+
implementation(project(":authentication"))
83+
implementation(project(":featureforms"))
84+
implementation(project(":composable-map"))
85+
// sdk
86+
implementation(arcgis.mapsSdk)
87+
// hilt
88+
implementation(libs.hilt.android.core)
89+
implementation(libs.androidx.hilt.navigation.compose)
90+
ksp(libs.hilt.compiler)
91+
// room
92+
implementation(libs.room.runtime)
93+
annotationProcessor(libs.room.compiler)
94+
implementation(libs.room.ext)
95+
ksp(libs.room.compiler)
96+
// jetpack window manager
97+
implementation(libs.androidx.window)
98+
implementation(libs.androidx.window.core)
99+
// compose
100+
implementation(libs.bundles.composeCore)
101+
implementation(libs.bundles.core)
102+
implementation(libs.androidx.lifecycle.runtime.ktx)
103+
implementation(libs.androidx.activity.compose)
104+
implementation(libs.androidx.compose.navigation)
105+
implementation(libs.androidx.lifecycle.viewmodel.compose)
106+
testImplementation(libs.bundles.unitTest)
107+
androidTestImplementation(libs.bundles.composeTest)
108+
debugImplementation(libs.bundles.debug)
109+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Copyright 2024 Esri
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and
15+
~ limitations under the License.
16+
-->
17+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18+
xmlns:tools="http://schemas.android.com/tools">
19+
20+
<uses-permission android:name="android.permission.INTERNET"/>
21+
22+
<application
23+
android:name=".FeatureFormApplication"
24+
android:allowBackup="false"
25+
android:fullBackupOnly="false"
26+
android:dataExtractionRules="@xml/data_extraction_rules"
27+
android:fullBackupContent="@xml/backup_rules"
28+
android:icon="@mipmap/ic_launcher"
29+
android:label="@string/app_name"
30+
android:roundIcon="@mipmap/ic_launcher_round"
31+
android:supportsRtl="true"
32+
android:theme="@style/Theme.FeatureFormsApp"
33+
tools:targetApi="31">
34+
<activity
35+
android:name=".MainActivity"
36+
android:exported="true"
37+
android:theme="@style/Theme.FeatureFormsApp">
38+
<intent-filter>
39+
<action android:name="android.intent.action.MAIN" />
40+
41+
<category android:name="android.intent.category.LAUNCHER" />
42+
</intent-filter>
43+
</activity>
44+
</application>
45+
46+
</manifest>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
*
3+
* Copyright 2023 Esri
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
*/
18+
19+
package com.arcgismaps.toolkit.featureformsapp
20+
21+
import android.app.Application
22+
import dagger.hilt.android.HiltAndroidApp
23+
24+
@HiltAndroidApp
25+
class FeatureFormApplication : Application()

0 commit comments

Comments
 (0)