strapi-plugin-navigation 2.0.0 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +50 -5
  2. package/__mocks__/strapi.js +30 -19
  3. package/admin/src/components/ConfirmationDialog/index.js +56 -0
  4. package/admin/src/components/Item/ItemCardBadge/index.js +1 -1
  5. package/admin/src/components/Item/ItemCardHeader/index.js +6 -12
  6. package/admin/src/components/Item/index.js +8 -10
  7. package/admin/src/components/RestartAlert/index.js +8 -0
  8. package/admin/src/hooks/useAllContentTypes.js +13 -0
  9. package/admin/src/hooks/useNavigationConfig.js +58 -0
  10. package/admin/src/index.js +24 -1
  11. package/admin/src/pages/SettingsPage/index.js +311 -0
  12. package/admin/src/pages/View/components/NavigationItemForm/index.js +36 -9
  13. package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupFooter.js +3 -6
  14. package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupHeader.js +2 -4
  15. package/admin/src/pages/View/components/NavigationItemPopup/index.js +2 -4
  16. package/admin/src/translations/en.json +48 -8
  17. package/admin/src/translations/fr.json +4 -4
  18. package/admin/src/utils/api.js +51 -0
  19. package/admin/src/utils/index.js +20 -0
  20. package/package.json +5 -5
  21. package/server/bootstrap.js +30 -1
  22. package/server/controllers/navigation.js +30 -5
  23. package/server/graphql/index.js +3 -4
  24. package/server/graphql/queries/render-navigation.js +4 -3
  25. package/server/graphql/types/content-types-name-fields.js +4 -2
  26. package/server/graphql/types/navigation-related.js +2 -2
  27. package/server/routes/admin.js +24 -1
  28. package/server/services/__tests__/functions.test.js +48 -0
  29. package/server/services/__tests__/navigation.test.js +26 -4
  30. package/server/services/navigation.js +56 -16
  31. package/server/services/utils/functions.js +41 -0
  32. package/strapi-server.js +0 -2
  33. package/yarn-error.log +5263 -0
  34. package/.circleci/config.yml +0 -48
  35. package/.eslintrc +0 -35
  36. package/.github/pull_request_template.md +0 -13
  37. package/.github/stale.yml +0 -15
  38. package/.nvmrc +0 -1
  39. package/codecov.yml +0 -3
  40. package/public/assets/logo.png +0 -0
  41. package/public/assets/preview.png +0 -0
  42. package/server/register.js +0 -5
@@ -1,48 +0,0 @@
1
- version: 2.1
2
- orbs:
3
- codecov: codecov/codecov@1.1.1
4
- jobs:
5
- build-and-test:
6
- environment:
7
- CODECOV_TOKEN: a9097475-0b5b-481f-8733-7b84574d583e
8
- docker:
9
- - image: circleci/node:14.17.2
10
- working_directory: ~/repo
11
- steps:
12
- - checkout
13
- - run:
14
- name: set GIT name and email
15
- command: |
16
- git config --global -l
17
- git config --global user.email "$GIT_COMMITTER_EMAIL"
18
- git config --global user.name "$GIT_COMMITTER_NAME"
19
- git config --global -l
20
- - restore_cache:
21
- keys:
22
- # when lock file changes, use increasingly general patterns to restore cache
23
- - strapi-plugin-navigation-v1-{{ checksum "yarn.lock" }}
24
- - strapi-plugin-navigation-
25
- - run:
26
- name: Echo versions
27
- command: |
28
- node --version
29
- yarn --version
30
- - run:
31
- name: Install
32
- command: |
33
- yarn install
34
- - run:
35
- name: Test
36
- command: |
37
- yarn test:unit
38
- - codecov/upload:
39
- flags: unittest
40
- file:
41
- - save_cache:
42
- paths:
43
- - ./node_modules
44
- key: strapi-plugin-navigation-v1-{{ checksum "yarn.lock" }}
45
- workflows:
46
- build-and-test:
47
- jobs:
48
- - build-and-test
package/.eslintrc DELETED
@@ -1,35 +0,0 @@
1
- {
2
- "parserOptions": {
3
- "jsx": true,
4
- "useJSXTextNode": true,
5
- "sourceType": "module"
6
- },
7
- "plugins": ["react-hooks", "import"],
8
- "rules": {
9
- "no-console": "warn",
10
- "curly": "warn",
11
- "prefer-template": "warn",
12
-
13
- "react-hooks/rules-of-hooks": "error",
14
- "react-hooks/exhaustive-deps": "error",
15
-
16
- "import/no-default-export": "warn",
17
- "import/newline-after-import": "warn",
18
- "import/order": [
19
- "warn",
20
- {
21
- "newlines-between": "always",
22
- "alphabetize": { "order": "asc" },
23
- "pathGroupsExcludedImportTypes": ["builtin"],
24
- "groups": [
25
- "builtin",
26
- "external",
27
- "internal",
28
- "parent",
29
- "sibling",
30
- "index"
31
- ]
32
- }
33
- ]
34
- }
35
- }
@@ -1,13 +0,0 @@
1
- ## Ticket
2
-
3
- https://github.com/VirtusLab/strapi-plugin-navigation/issues/-<your-ticket-#>
4
-
5
- ## Summary
6
-
7
- What does this PR do/solve?
8
-
9
- > PRs should be as small as they need to be, if this section starts becoming a novel you should _seriously_ consider breaking it up into multiple PRs
10
-
11
- ## Test Plan
12
-
13
- How are you testing the work you're submitting?
package/.github/stale.yml DELETED
@@ -1,15 +0,0 @@
1
- daysUntilStale: 30
2
- daysUntilClose: 7
3
- exemptLabels:
4
- - pinned
5
- - security
6
- - backlog
7
- - enhancement
8
- - feature request
9
- staleLabel: wontfix
10
- # Comment to post when marking an issue as stale. Set to `false` to disable
11
- markComment: >
12
- This issue has been automatically marked as stale because it has not had
13
- recent activity. It will be closed if no further activity occurs. Thank you
14
- for your contributions.
15
- closeComment: false
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- v14.17.3
package/codecov.yml DELETED
@@ -1,3 +0,0 @@
1
- comment:
2
- branches:
3
- - master
Binary file
Binary file
@@ -1,5 +0,0 @@
1
- module.exports = ({ strapi }) => {
2
- if (strapi.plugin('graphql')) {
3
- require('./graphql')({ strapi });
4
- }
5
- };