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.
- package/README.md +50 -5
- package/__mocks__/strapi.js +30 -19
- package/admin/src/components/ConfirmationDialog/index.js +56 -0
- package/admin/src/components/Item/ItemCardBadge/index.js +1 -1
- package/admin/src/components/Item/ItemCardHeader/index.js +6 -12
- package/admin/src/components/Item/index.js +8 -10
- package/admin/src/components/RestartAlert/index.js +8 -0
- package/admin/src/hooks/useAllContentTypes.js +13 -0
- package/admin/src/hooks/useNavigationConfig.js +58 -0
- package/admin/src/index.js +24 -1
- package/admin/src/pages/SettingsPage/index.js +311 -0
- package/admin/src/pages/View/components/NavigationItemForm/index.js +36 -9
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupFooter.js +3 -6
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupHeader.js +2 -4
- package/admin/src/pages/View/components/NavigationItemPopup/index.js +2 -4
- package/admin/src/translations/en.json +48 -8
- package/admin/src/translations/fr.json +4 -4
- package/admin/src/utils/api.js +51 -0
- package/admin/src/utils/index.js +20 -0
- package/package.json +5 -5
- package/server/bootstrap.js +30 -1
- package/server/controllers/navigation.js +30 -5
- package/server/graphql/index.js +3 -4
- package/server/graphql/queries/render-navigation.js +4 -3
- package/server/graphql/types/content-types-name-fields.js +4 -2
- package/server/graphql/types/navigation-related.js +2 -2
- package/server/routes/admin.js +24 -1
- package/server/services/__tests__/functions.test.js +48 -0
- package/server/services/__tests__/navigation.test.js +26 -4
- package/server/services/navigation.js +56 -16
- package/server/services/utils/functions.js +41 -0
- package/strapi-server.js +0 -2
- package/yarn-error.log +5263 -0
- package/.circleci/config.yml +0 -48
- package/.eslintrc +0 -35
- package/.github/pull_request_template.md +0 -13
- package/.github/stale.yml +0 -15
- package/.nvmrc +0 -1
- package/codecov.yml +0 -3
- package/public/assets/logo.png +0 -0
- package/public/assets/preview.png +0 -0
- package/server/register.js +0 -5
package/.circleci/config.yml
DELETED
|
@@ -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
package/public/assets/logo.png
DELETED
|
Binary file
|
|
Binary file
|