Giter VIP home page Giter VIP logo

esri / application-base-js Goto Github PK

View Code? Open in Web Editor NEW
18.0 17.0 9.0 366 KB

A core class for creating a configurable application using JavaScript/TypeScript

Home Page: https://developers.arcgis.com/javascript/

License: Apache License 2.0

TypeScript 63.52% JavaScript 36.48%
javascript javascript-applications arcgis-js-api arcgis-api boilerplate boilerplate-application boilerplates typescript web-development

application-base-js's People

Contributors

csmith246 avatar dependabot[bot] avatar driskull avatar jgravois avatar kellyhutchins avatar miketschudi avatar rslibed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

application-base-js's Issues

Add support for getting the basemap group

Org users can opt-in to displaying vector basemaps so we should add support to check the self for vector basemap support and if there get the vector basemap group otherwise get the default basemap group.

_getEsriEnviromentPortalUrl always returns at line 495

Testing out the boilerplate on dev and if I set isEsri to true then the code below executes but it looks like there is an issue setting the value of appLocationIndex. I think the conditional true value should be isEsriAppsPath and the conditional false should be isEsriHomePath.

`
.....
const isEsriAppsPath = esriAppsPathIndex !== -1 ? true : false;
const isEsriHomePath = esriHomePathIndex !== -1 ? true : false;
const appLocationIndex = isEsriAppsPath ? esriAppsPathIndex : isEsriHomePath ? esriHomePathIndex : null;

if (!appLocationIndex) {
  return;
}

.....
}`

Or maybe we just need to check for appLocationIndex being -1 before return? Because currently we are checking for ! (some numeric value).

Enhancement to support case-insensitive URL parameters

ApplicationBase.json and the app have case-sensitive URL parameters. We’ve had user problems because people are used to generally ignoring case in the URL, so case-sensitive query parameters get mistyped.

Can we change map[key] in _urlToObject() to map[key.toLowerCase()] and the urlParams list in ApplicationBase.json to all lowercase?

npm @esri/application-base-js 0.0.5 different to master

I started looking at the Esri configurable-app-examples-4x-js and found that the code would not work due to application-base-js syntax issues. The major issue is that the npm 0.0.5 @Esri application-base-js is very different to the code in the Esri git repository for application-base-js. I had to remove the npm package from the example and download the application base js files I needed and store them locally. That code now works. NPM 0.0.5 is not compatible with 4.12

urlUtils and itemUtils: application-level modules?

I wonder if these are really an app-level or an app-base module?

urlUtils seems to be forcing the url/param structure to be a certain pattern and it should be up to the app to decide this. It's also loading libraries that I might not need to load. e.g. camera

https://github.com/Esri/application-base-js/blob/a7a3eecd54389739e8c2af6ed9643913cb12efdb/support/urlUtils.ts

itemUtils beyond this seems app-level too.

https://github.com/Esri/application-base-js/blob/master/support/itemUtils.js#L108

Move to app-template-examples?

@driskull @kellyhutchins

Errors in TypeScript after updating to TS version 2.4

After updating to TS 2.4 transpiling declareDecartor.ts returns the following errors:

error TS2322: Type '(target: Functio
n) => DeclareConstructor' is not assignable to type 'ClassDecorator'.
Type 'DeclareConstructor' is not assignable to type 'void | TFunction'.
Type 'DeclareConstructor' is not assignable to type 'TFunction'.

Seems to be due to the stricter checking for generic functions that happens at 2.4 - see doc here:
https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes

Using tsc --noStrictGenericChecks clears the error and so does using any for example:

return function (target: Function) { return <any>declare(mixins, target.prototype); };

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.