diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..17b664e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +[*.py] +indent_size = 4 + +[*.ps1] +end_of_line = crlf +indent_size = 4 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1d7f12d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,34 @@ +# Normalize line endings. Text files are LF in the repository and checked out native on Windows, +# which is what stops git printing "LF will be replaced by CRLF" on every commit. +* text=auto + +*.ts text eol=lf +*.tsx text eol=lf +*.js text eol=lf +*.jsx text eol=lf +*.json text eol=lf +*.md text eol=lf +*.css text eol=lf +*.html text eol=lf +*.yml text eol=lf +*.yaml text eol=lf +*.py text eol=lf +*.ps1 text eol=crlf + +# Binary, never touched. +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.svg text eol=lf +*.ico binary +*.zip binary +*.pdf binary +*.woff binary +*.woff2 binary +*.ttf binary +*.pagx binary + +# Keep generated files out of diffs and out of the language statistics. +package-lock.json linguist-generated=true -diff +pnpm-lock.yaml linguist-generated=true -diff \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..96185e9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,50 @@ +name: Bug report +description: Something in the widget does not work +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + Questions about ArcGIS itself belong on Esri Community. This form is for the widget. + - type: input + id: widget-version + attributes: + label: Widget version + description: From the widget's manifest.json + placeholder: "1.4.2" + validations: + required: true + - type: input + id: exb-version + attributes: + label: Experience Builder version + description: Developer Edition version, or the build your portal reports + placeholder: "1.21 Developer Edition" + validations: + required: true + - type: input + id: portal + attributes: + label: Portal + description: ArcGIS Enterprise version, or ArcGIS Online + placeholder: "Enterprise 11.3" + validations: + required: true + - type: textarea + id: what-happened + attributes: + label: What happened + description: What you did, what happened, and what you expected instead + validations: + required: true + - type: textarea + id: console + attributes: + label: Browser console output + description: Anything logged when it went wrong. This is usually the fastest way to a fix. + render: text + - type: input + id: browser + attributes: + label: Browser + placeholder: "Chrome 141" \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..dcdd5ce --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: ArcGIS or Experience Builder question + url: https://community.esri.com/t5/arcgis-experience-builder/ct-p/arcgis-experience-builder + about: Questions about ArcGIS Experience Builder itself are better answered on Esri Community. + - name: Security problem + url: https://github.com/brianmcleer/saveInstanceWidget/security/advisories/new + about: Please report vulnerabilities privately instead of opening an issue. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..d0457d0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,22 @@ +name: Feature request +description: Suggest something the widget should do +labels: ["enhancement"] +body: + - type: textarea + id: problem + attributes: + label: What are you trying to do + description: The workflow you are stuck on, not the solution you have in mind + validations: + required: true + - type: textarea + id: idea + attributes: + label: What you would like the widget to do + validations: + required: true + - type: textarea + id: workaround + attributes: + label: How you handle it today + description: Another widget, a script, doing it by hand \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ff6eaa6 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,19 @@ +## What this changes + + + +## Why + + + +## How it was tested + +- [ ] Built with `npm start` in the Experience Builder `client` folder +- [ ] `npx tsc -p .` in the widget folder reports no errors +- [ ] Exercised the widget in the builder and in a published app + +## Checklist + +- [ ] Version bumped in both `manifest.json` and `package.json` +- [ ] `CHANGELOG.md` updated +- [ ] One change per pull request \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f61cbf5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: "/saveInstance" + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + groups: + all-dependencies: + patterns: + - "*" + ignore: + # Experience Builder pins these; upgrading them independently breaks the build. + - dependency-name: "jimu-*" + - dependency-name: "@arcgis/*" + - dependency-name: "react" + - dependency-name: "react-dom" + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly \ No newline at end of file diff --git a/.gitignore b/.gitignore index e43b0f9..056952f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ .DS_Store + +# Community attachment zips built by publish-all.ps1 never get committed +*.zip diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..8ccf39d --- /dev/null +++ b/.npmignore @@ -0,0 +1,7 @@ +node_modules/ +.vs/ +*.user +*.suo +.DS_Store +Thumbs.db +CHANGES.md diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..1490a39 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,73 @@ +# Save Instance 2.0.0: what changed + +Storage is still **local only** (browser `localStorage`). Everything else from the +review was implemented, and the UI was rebuilt against jimu-ui's themed, +accessible components to meet **WCAG 2.1 AA**. + +## Accessibility (WCAG 2.1 AA) +- **Color & contrast**: dropped the hardcoded `blue19` ramp (several values, e.g. + `#007cd3` white text β‰ˆ 3.9:1, failed AA) in favor of EXB theme tokens via CSS + variables (`--sys-color-primary-main` / `--sys-color-primary-text`), which EXB + pairs for AA. Light-mode fallbacks are included, and the widget now adapts to + dark themes. +- **Names for icon controls**: every icon button has a translated `aria-label` + (e.g. *"Load 'Downtown' onto the map"*); the icon itself is `aria-hidden`. No + reliance on `title` alone. +- **Forms**: inputs are associated with real `