@qoretechnologies/reqraft 0.1.0 → 0.2.1

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 (88) hide show
  1. package/__tests__/ mock.ts +44 -0
  2. package/__tests__/utils.ts +11 -0
  3. package/dist/components/menu/Menu.d.ts +31 -0
  4. package/dist/components/menu/Menu.d.ts.map +1 -0
  5. package/dist/components/menu/Menu.js +130 -0
  6. package/dist/components/menu/Menu.js.map +1 -0
  7. package/dist/contexts/FetchContext.d.ts +10 -0
  8. package/dist/contexts/FetchContext.d.ts.map +1 -0
  9. package/dist/contexts/FetchContext.js +63 -0
  10. package/dist/contexts/FetchContext.js.map +1 -0
  11. package/dist/contexts/ReqraftContext.d.ts +9 -0
  12. package/dist/contexts/ReqraftContext.d.ts.map +1 -0
  13. package/dist/contexts/ReqraftContext.js +11 -0
  14. package/dist/contexts/ReqraftContext.js.map +1 -0
  15. package/dist/contexts/StorageContext.d.ts +11 -0
  16. package/dist/contexts/StorageContext.d.ts.map +1 -0
  17. package/dist/contexts/StorageContext.js +17 -0
  18. package/dist/contexts/StorageContext.js.map +1 -0
  19. package/dist/hooks/useFetch/useFetch.d.ts +21 -0
  20. package/dist/hooks/useFetch/useFetch.d.ts.map +1 -0
  21. package/dist/hooks/useFetch/useFetch.js +106 -0
  22. package/dist/hooks/useFetch/useFetch.js.map +1 -0
  23. package/dist/hooks/useReqraftProperty.d.ts +3 -0
  24. package/dist/hooks/useReqraftProperty.d.ts.map +1 -0
  25. package/dist/hooks/useReqraftProperty.js +16 -0
  26. package/dist/hooks/useReqraftProperty.js.map +1 -0
  27. package/dist/hooks/useStorage/useStorage.d.ts +8 -0
  28. package/dist/hooks/useStorage/useStorage.d.ts.map +1 -0
  29. package/dist/hooks/useStorage/useStorage.js +22 -0
  30. package/dist/hooks/useStorage/useStorage.js.map +1 -0
  31. package/dist/index.d.ts +4 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +10 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/providers/FetchProvider.d.ts +6 -0
  36. package/dist/providers/FetchProvider.d.ts.map +1 -0
  37. package/dist/providers/FetchProvider.js +112 -0
  38. package/dist/providers/FetchProvider.js.map +1 -0
  39. package/dist/providers/ReqraftProvider.d.ts +10 -0
  40. package/dist/providers/ReqraftProvider.d.ts.map +1 -0
  41. package/dist/providers/ReqraftProvider.js +15 -0
  42. package/dist/providers/ReqraftProvider.js.map +1 -0
  43. package/dist/providers/StorageProvider.d.ts +6 -0
  44. package/dist/providers/StorageProvider.d.ts.map +1 -0
  45. package/dist/providers/StorageProvider.js +55 -0
  46. package/dist/providers/StorageProvider.js.map +1 -0
  47. package/dist/utils/fetch.d.ts +22 -0
  48. package/dist/utils/fetch.d.ts.map +1 -0
  49. package/dist/utils/fetch.js +140 -0
  50. package/dist/utils/fetch.js.map +1 -0
  51. package/package.json +8 -3
  52. package/src/components/menu/Menu.stories.tsx +73 -0
  53. package/src/components/menu/Menu.tsx +244 -0
  54. package/src/contexts/FetchContext.tsx +25 -0
  55. package/src/contexts/ReqraftContext.tsx +16 -0
  56. package/src/contexts/StorageContext.tsx +33 -0
  57. package/src/hooks/useFetch/useFetch.stories.tsx +123 -0
  58. package/src/hooks/useFetch/useFetch.tsx +71 -0
  59. package/src/hooks/useReqraftProperty.ts +16 -0
  60. package/src/hooks/useStorage/useStorage.stories.tsx +84 -0
  61. package/src/hooks/useStorage/useStorage.ts +30 -0
  62. package/src/index.tsx +11 -0
  63. package/src/providers/FetchProvider.tsx +62 -0
  64. package/src/providers/ReqraftProvider.tsx +33 -0
  65. package/src/providers/StorageProvider.tsx +80 -0
  66. package/src/utils/fetch.ts +121 -0
  67. package/.eslintrc.js +0 -40
  68. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
  69. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  70. package/.github/ISSUE_TEMPLATE/new-component.md +0 -20
  71. package/.github/ISSUE_TEMPLATE/visual-bug-report.md +0 -38
  72. package/.github/workflows/beta_release.yml +0 -108
  73. package/.github/workflows/tests.yml +0 -120
  74. package/.prettierrc +0 -7
  75. package/build-storybook.log +0 -28
  76. package/dist/components/form/fields/string/String.stories.d.ts +0 -10
  77. package/dist/components/form/fields/string/String.stories.d.ts.map +0 -1
  78. package/dist/components/form/fields/string/String.stories.js +0 -21
  79. package/dist/components/form/fields/string/String.stories.js.map +0 -1
  80. package/public/logo-dark.png +0 -0
  81. package/public/logo.png +0 -0
  82. package/public/q-symbol-small.png +0 -0
  83. package/public/q-symbol.png +0 -0
  84. package/public/qoreLogo-dark.png +0 -0
  85. package/public/qoreLogo.png +0 -0
  86. package/src/icons.json +0 -2295
  87. package/tests.json +0 -1
  88. package/tsconfig.prod.json +0 -26
@@ -1,120 +0,0 @@
1
- # This is a basic workflow to help you get started with Actions
2
-
3
- name: Pull Request Tests
4
-
5
- # Controls when the action will run. Triggers the workflow on push or pull request
6
- # events but only for the develop branch
7
- on:
8
- pull_request:
9
- branches:
10
- - develop
11
-
12
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
13
- jobs:
14
- PullRequestTests:
15
- # The type of runner that the job will run on
16
- runs-on: ubuntu-latest
17
- env:
18
- QORUS_TOKEN: ${{ secrets.QORUS_TOKEN }}
19
- # Steps represent a sequence of tasks that will be executed as part of the job
20
- steps:
21
- # Get current time for the commit
22
- - name: Get current time
23
- uses: josStorer/get-current-time@v2.0.2
24
- id: current_time
25
- with:
26
- format: YYYYMMDD-HH
27
- utcOffset: '+01:00'
28
-
29
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30
- - name: Get repo
31
- uses: actions/checkout@v3
32
- with:
33
- ref: ${{ github.event.pull_request.head.sha }}
34
- fetch-depth: 0
35
-
36
- - name: Print head git commit message
37
- id: get_head_commit_message
38
- run: echo "::set-output name=HEAD_COMMIT_MESSAGE::$(git show -s --format=%s)"
39
-
40
- - uses: actions/setup-node@v3
41
- with:
42
- node-version: 20.11.0
43
-
44
- # Notify Discord to not restart server
45
- - name: Discord Warning
46
- env:
47
- DISCORD_WEBHOOK: ${{secrets.DISCORD_WEBHOOK_DEV}}
48
- # Mention someone in the embeds
49
- DISCORD_EMBEDS: '[{ "color":16711680, "description": ":exclamation: Tests started, **please do not restart Qorus on Rippy** for the next 30 minutes." }]'
50
- DISCORD_AVATAR: 'https://github.com/qoretechnologies/qorus-vscode/blob/95ad81fa8654fe83bb41f68f4de42ae088298e59/public/q-symbol-small.png?raw=true'
51
- uses: Ilshidur/action-discord@0.3.2
52
- with:
53
- args: '<@820316067921395752>'
54
-
55
- - name: Save release version to outputs
56
- id: save_release_version
57
- run: echo ::set-output name=version::$(node -pe "require('./package.json').version")
58
-
59
- - name: Installing modules
60
- id: install_modules
61
- run: |
62
- yarn install
63
- yarn install-playwright
64
- yarn build-storybook --quiet
65
-
66
- - name: Run build test
67
- run: |
68
- yarn build:test:prod
69
-
70
- - name: Run unit tests
71
- run: |
72
- yarn test:ci
73
-
74
- - name: Serve Storybook and run tests
75
- run: |
76
- npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
77
- "npx http-server storybook-static --port 6008 --silent" \
78
- "npx wait-on tcp:6008 && yarn test-storybook"
79
-
80
- - name: Publish to Chromatic
81
- id: chromatic_publish
82
- uses: chromaui/action@v1
83
- with:
84
- token: ${{ secrets.GITHUB_TOKEN }}
85
- projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
86
- exitZeroOnChanges: true
87
- allowConsoleErrors: true
88
- debug: true
89
-
90
- # Notify Discord if Success
91
- - name: Discord notification success
92
- env:
93
- DISCORD_WEBHOOK: ${{secrets.DISCORD_WEBHOOK}}
94
- DISCORD_EMBEDS: '[{ "author": { "icon_url": "https://avatars.githubusercontent.com/${{ github.actor }}", "name": "${{ github.actor }}", "url": "https://github.com/${{github.actor}}" },"url": "https://github.com/${{github.repository}}/commit/${{github.sha}}","fields": [{ "name": "Commit Message", "value": "${{ steps.get_head_commit_message.outputs.HEAD_COMMIT_MESSAGE }}"},{ "name": "Repository", "value": "[${{github.event.repository.name}}](${{github.event.repository.clone_url}})", "inline": true },{ "name": "Branch", "value": "[${{github.ref_name}}](https://github.com/${{github.repository}}/pull/${{github.ref_name}})", "inline": true },{ "name": "Event", "value": "${{github.event_name}}", "inline": true },{ "name": "Author", "value": "[${{github.actor}}](https://github.com/${{github.actor}})", "inline": true },{ "name": "Job", "value": "${{github.job}}", "inline": true},{ "name": "Version", "value": "v${{ steps.save_release_version.outputs.version }}", "inline": true},{ "name": "", "value": "🤖 [Github Action](https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id}}) 🌐 [View Site]( https://deploy-preview-${{ github.event.pull_request.number}}--magical-starburst-a8bdfc.netlify.app) 📙 [Storybook](${{ steps.chromatic_publish.outputs.storybookUrl }}) 🎨 [Chromatic Tests](${{ steps.chromatic_publish.outputs.buildUrl }})"}],"color":65280,"footer":{"text": "Published at ${{steps.current_time.outputs.readableTime}}"}}]'
95
- DISCORD_AVATAR: 'https://github.com/qoretechnologies/qorus-vscode/blob/95ad81fa8654fe83bb41f68f4de42ae088298e59/public/q-symbol-small.png?raw=true'
96
- uses: Ilshidur/action-discord@0.3.2
97
- with:
98
- args: ':white_check_mark: Tests run #${{ github.run_number }} for [PR](${{ github.event.pull_request.html_url }}) triggered by ${{ github.triggering_actor }} *succeeded*, click GitHub Action link below to get the VSIX artifact.'
99
- if: success()
100
-
101
- # Notify discord if failure
102
- - name: Discord notification failure
103
- env:
104
- DISCORD_WEBHOOK: ${{secrets.DISCORD_WEBHOOK}}
105
- DISCORD_EMBEDS: '[{ "author": { "icon_url": "https://avatars.githubusercontent.com/${{ github.actor }}", "name": "${{ github.actor }}", "url": "https://github.com/${{github.actor}}" },"url": "https://github.com/${{github.repository}}/commit/${{github.sha}}","fields": [{ "name": "Commit Message", "value": "${{ steps.get_head_commit_message.outputs.HEAD_COMMIT_MESSAGE }}"},{ "name": "Repository", "value": "[${{github.event.repository.name}}](${{github.event.repository.clone_url}})", "inline": true },{ "name": "Branch", "value": "[${{github.ref_name}}](https://github.com/${{github.repository}}/pull/${{github.ref_name}})", "inline": true },{ "name": "Event", "value": "${{github.event_name}}", "inline": true },{ "name": "Author", "value": "[${{github.actor}}](https://github.com/${{github.actor}})", "inline": true },{ "name": "Job", "value": "${{github.job}}", "inline": true },{ "name": "Version", "value": "v${{ steps.save_release_version.outputs.version }}", "inline": true},{ "name": "", "value": "🤖 [Github Action](https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id}})"}],"color":16711680,"footer":{"text": "Published at ${{steps.current_time.outputs.readableTime}}"}}]'
106
- DISCORD_AVATAR: 'https://github.com/qoretechnologies/qorus-vscode/blob/95ad81fa8654fe83bb41f68f4de42ae088298e59/public/q-symbol-small.png?raw=true'
107
- uses: Ilshidur/action-discord@0.3.2
108
- with:
109
- args: ':exclamation: Tests run #${{ github.run_number }} for [PR](${{ github.event.pull_request.html_url }}) triggered by ${{ github.triggering_actor }} *failed*!'
110
- if: failure()
111
-
112
- - name: Discord notification safe to restart
113
- env:
114
- DISCORD_WEBHOOK: ${{secrets.DISCORD_WEBHOOK_DEV}}
115
- DISCORD_EMBEDS: '[{ "color":65280, "description": ":white_check_mark: Tests action finished. It is now safe to restart Qorus on Rippy." }]'
116
- DISCORD_AVATAR: 'https://github.com/qoretechnologies/qorus-vscode/blob/95ad81fa8654fe83bb41f68f4de42ae088298e59/public/q-symbol-small.png?raw=true'
117
- uses: Ilshidur/action-discord@0.3.2
118
- with:
119
- args: '<@820316067921395752>'
120
- if: always()
package/.prettierrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "trailingComma": "es5",
3
- "printWidth": 100,
4
- "semi": true,
5
- "singleQuote": true,
6
- "jsxSingleQuote": true
7
- }
@@ -1,28 +0,0 @@
1
- yarn run v1.22.21
2
- $ storybook build --output-dir /var/folders/xj/ffsl9ps93hl3d6bm37h33dkw0000gn/T/chromatic--83502-xKwU3laktthx
3
- @storybook/cli v8.0.9
4
-
5
- info => Cleaning outputDir: ../../../../var/folders/xj/ffsl9ps93hl3d6bm37h33dkw0000gn/T/chromatic--83502-xKwU3laktthx
6
- info => Loading presets
7
- info => Building manager..
8
- info => Manager built (1.84 s)
9
- info => Building preview..
10
- info Addon-docs: using MDX3
11
- info => Using implicit CSS loaders
12
- info => Using default Webpack5 setup
13
- info Using tsconfig paths for react-docgen
14
- WARN asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
15
- WARN This can impact web performance.
16
- WARN Assets:
17
- WARN 407.cab165a6.iframe.bundle.js (4.33 MiB)
18
- WARN 487.5427d68c.iframe.bundle.js (603 KiB)
19
- WARN entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
20
- WARN Entrypoints:
21
- WARN main (4.34 MiB)
22
- WARN runtime~main.a1ebc5b5.iframe.bundle.js
23
- WARN 407.cab165a6.iframe.bundle.js
24
- WARN main.95e9d9d8.iframe.bundle.js
25
- WARN
26
- info => Preview built (10 s)
27
- info => Output directory: /var/folders/xj/ffsl9ps93hl3d6bm37h33dkw0000gn/T/chromatic--83502-xKwU3laktthx
28
- Done in 14.89s.
@@ -1,10 +0,0 @@
1
- import { StoryObj } from '@storybook/react';
2
- declare const meta: import("@storybook/types").ComponentAnnotations<import("@storybook/react").ReactRenderer, import("./String").IStringFormFieldProps & Record<string, any> & {
3
- reqoreOptions: import("@qoretechnologies/reqore/dist/containers/UIProvider").IReqoreOptions;
4
- }>;
5
- export default meta;
6
- type Story = StoryObj<typeof meta>;
7
- export declare const Default: Story;
8
- export declare const Value: Story;
9
- export declare const WithLabel: Story;
10
- //# sourceMappingURL=String.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"String.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/fields/string/String.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAI5C,QAAA,MAAM,IAAI;;EAG4B,CAAC;AAEvC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AACjC,eAAO,MAAM,KAAK,EAAE,KAInB,CAAC;AACF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WithLabel = exports.Value = exports.Default = void 0;
4
- var String_1 = require("./String");
5
- var meta = {
6
- component: String_1.FormStringField,
7
- title: 'Components/Form/String',
8
- };
9
- exports.default = meta;
10
- exports.Default = {};
11
- exports.Value = {
12
- args: {
13
- value: 'Hello, World!',
14
- },
15
- };
16
- exports.WithLabel = {
17
- args: {
18
- label: 'Label',
19
- },
20
- };
21
- //# sourceMappingURL=String.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"String.stories.js","sourceRoot":"","sources":["../../../../../src/components/form/fields/string/String.stories.tsx"],"names":[],"mappings":";;;AAEA,mCAA2C;AAE3C,IAAM,IAAI,GAAG;IACX,SAAS,EAAE,wBAAe;IAC1B,KAAK,EAAE,wBAAwB;CACK,CAAC;AAEvC,kBAAe,IAAI,CAAC;AAGP,QAAA,OAAO,GAAU,EAAE,CAAC;AACpB,QAAA,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,KAAK,EAAE,eAAe;KACvB;CACF,CAAC;AACW,QAAA,SAAS,GAAU;IAC9B,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO;KACf;CACF,CAAC"}
Binary file
package/public/logo.png DELETED
Binary file
Binary file
Binary file
Binary file
Binary file