Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use digitize related hooks from react-util #3507

Closed
wants to merge 35 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
aa8c514
fix: remove the DigitizeButton
dnlkoch Sep 4, 2023
7c5e80d
Merge pull request #3493 from terrestris/remove-digitize-button
dnlkoch Sep 4, 2023
e66738e
refactor: remove deprecated HOC components
annarieger Sep 4, 2023
e8eeaa8
Merge pull request #3496 from terrestris/remove-hocs
annarieger Sep 4, 2023
daa2de6
chore: update several dependencies
dnlkoch Sep 4, 2023
e1ef868
chore: :lipstick:
dnlkoch Sep 4, 2023
75a86da
chore: set updated plugin name
dnlkoch Sep 4, 2023
b9ad1ce
build: update enzyme adapter
dnlkoch Sep 4, 2023
01f9599
build: include TextDecode and TextEncoder
dnlkoch Sep 4, 2023
f65318d
build: wrap several tests in act()
dnlkoch Sep 4, 2023
76d5d02
build: disable assertions, toBeVisible() isn't working for the model …
dnlkoch Sep 4, 2023
301c69d
build: temporarily disable/remove inkmap dependencies
dnlkoch Sep 4, 2023
8cc903e
build: ignore some context typings (should be fixed as well)
dnlkoch Sep 4, 2023
b0f873c
fix: make use of dayjs
dnlkoch Sep 4, 2023
89c8749
build: antd.variable.css doesn’t exist anymore
dnlkoch Sep 4, 2023
e242cf0
fix: don't pass icon prop
dnlkoch Sep 5, 2023
c2723b4
ci: run with node 18
dnlkoch Sep 5, 2023
30524c2
Merge pull request #3499 from terrestris/dependency-updates
dnlkoch Sep 5, 2023
0a602c6
refactor: remove Panel, Window and Titlebar components
annarieger Sep 4, 2023
27caa13
Merge pull request #3497 from terrestris/remove-window
annarieger Sep 5, 2023
7a162a6
refactor: remove toolbar component
annarieger Sep 5, 2023
b6b3a2f
Merge pull request #3503 from terrestris/remove-toolbar
annarieger Sep 5, 2023
632cc92
refactor: remove user chip component
annarieger Sep 6, 2023
11e5ce0
Merge pull request #3504 from terrestris/remove-userchip
annarieger Sep 6, 2023
a264f71
chore: homogenize / sort imports using simple-sort-plugin
ahennr Sep 6, 2023
6aec328
chore: ignore intelliJ specific files
ahennr Sep 6, 2023
dafd330
chore: introduce .npmrc
ahennr Sep 6, 2023
d585255
Merge pull request #3505 from terrestris/homozenize-imports
ahennr Sep 6, 2023
c0066c7
refactor: factor out some code to react-util and use it (#3498)
hwbllmnn Sep 6, 2023
55798b3
feat: refactor code into `useDraw` hook
simonseyock Sep 6, 2023
b0a1aa7
refactor: `CopyButton`, `DeleteButton`, `SelectFeaturesButton` use ho…
simonseyock Sep 6, 2023
f859d73
refactor: modify button uses `useModify` hook
simonseyock Sep 6, 2023
39642b6
fix: omit correct values from `UseModifyProps`
simonseyock Sep 12, 2023
9922e9b
chore: use react-util 3.0.0
simonseyock Sep 19, 2023
2c2e782
fix(DrawButton): remove text feature from layer on cancel
simonseyock Sep 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": [
"@terrestris/eslint-config-typescript",
"plugin:testing-library/react",
"plugin:jest-dom/recommended"
],
"plugins": [
"testing-library",
"jest-dom",
"simple-import-sort"
],
"rules": {
"@typescript-eslint/member-ordering": "off",
"no-underscore-dangle": "off",
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": "warn"
}
}
17 changes: 0 additions & 17 deletions .eslintrc.js

This file was deleted.

10 changes: 7 additions & 3 deletions .eslintrc.styleguide.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ module.exports = {
'markdown'
],
overrides: [{
files: ["**/*.{md,mkdn,mdown,markdown}"],
processor: "markdown/markdown"
files: [
'**/*.{md,mkdn,mdown,markdown}'
],
processor: 'markdown/markdown'
}, {
files: ["**/*.{md,mkdn,mdown,markdown}/*.{js,javascript,jsx,node}"]
files: [
'**/*.{md,mkdn,mdown,markdown}/*.{js,javascript,jsx,node}'
]
}],
env: {
browser: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
persist-credentials: false

- name: Setup Node.js 16 👷🏻
- name: Setup Node.js 18 👷🏻
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18

- name: Cache Node.js modules 💾
uses: actions/cache@v2
Expand All @@ -29,7 +29,7 @@ jobs:
${{ runner.OS }}-

- name: Install dependencies ⏬
run: npm ci
run: npm ci --force

- name: Build styleguide 🏗️
run: npm run build:styleguide
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
- name: Checkout sources 🔰
uses: actions/checkout@v2

- name: Setup Node.js 16
- name: Setup Node.js 18
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18

- name: Cache Node.js modules 💾
uses: actions/cache@v2
Expand All @@ -24,7 +24,7 @@ jobs:
${{ runner.OS }}-

- name: Install dependencies ⏬
run: npm ci
run: npm ci --force

- name: Build artifacts 🏗️
run: npm run build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/on-push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- name: Checkout sources 🔰
uses: actions/checkout@v2

- name: Setup Node.js 16 👷🏻
- name: Setup Node.js 18 👷🏻
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18

- name: Cache Node.js modules 💾
uses: actions/cache@v2
Expand All @@ -27,7 +27,7 @@ jobs:
${{ runner.OS }}-

- name: Install dependencies ⏬
run: npm ci
run: npm ci --force

- name: Generate coverage 🧪
run: npm test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
- name: Checkout sources 🔰
uses: actions/checkout@v2

- name: Setup Node.js 16 👷🏻
- name: Setup Node.js 18 👷🏻
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18

- name: Install dependencies ⏬
run: npm ci
run: npm ci --force

- name: Build artifacts 🏗️
run: npm run build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ node_modules

# ignore IntelliJ iml files
*.iml
.idea
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
},
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties'
'@babel/plugin-transform-class-properties'
]
};
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
'<rootDir>/dist/'
],
transformIgnorePatterns: [
'node_modules/(?!(ol|antd|@camptocamp/inkmap|(rc-[a-z-]*)|@ant-design\/css-animation|(-[a-z]+)*|@babel\/runtime)/)'
'node_modules/(?!(@terrestris/.*|ol|antd|@camptocamp/inkmap|(rc-[a-z-]*)|@ant-design\/css-animation|(-[a-z]+)*|@babel\/runtime)/)'
],
setupFiles: [
'<rootDir>/jest/__mocks__/matchMediaMock.js'
Expand Down
28 changes: 27 additions & 1 deletion jest/setup.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
import Enzyme from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import Adapter from '@cfaester/enzyme-adapter-react-18';
import 'whatwg-fetch';
import 'jest-canvas-mock';
import '@testing-library/jest-dom';
import 'regenerator-runtime/runtime';
import {
TextEncoder,
TextDecoder
} from 'util';

Object.assign(global, {
TextDecoder,
TextEncoder
});

Enzyme.configure({ adapter: new Adapter() });

jest.mock('use-resize-observer', () => ({
__esModule: true,
default: jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
})),
}));

window.ResizeObserver =
window.ResizeObserver ||
jest.fn().mockImplementation(() => ({
disconnect: jest.fn(),
observe: jest.fn(),
unobserve: jest.fn(),
}));
Loading
Loading