@buerokratt-ria/menu 0.2.3 → 0.2.5

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/.eslintrc.json CHANGED
@@ -1,18 +1,18 @@
1
- {
2
- "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
3
- "ignorePatterns": ["!**/*"],
4
- "overrides": [
5
- {
6
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
- "rules": {}
8
- },
9
- {
10
- "files": ["*.ts", "*.tsx"],
11
- "rules": {}
12
- },
13
- {
14
- "files": ["*.js", "*.jsx"],
15
- "rules": {}
16
- }
17
- ]
18
- }
1
+ {
2
+ "extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
3
+ "ignorePatterns": ["!**/*"],
4
+ "overrides": [
5
+ {
6
+ "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
+ "rules": {}
8
+ },
9
+ {
10
+ "files": ["*.ts", "*.tsx"],
11
+ "rules": {}
12
+ },
13
+ {
14
+ "files": ["*.js", "*.jsx"],
15
+ "rules": {}
16
+ }
17
+ ]
18
+ }
package/CHANGELOG.md CHANGED
@@ -1,81 +1,90 @@
1
- # Changelog
2
-
3
- All changes to this project will be documented in this file.
4
- ## [0.2.3] - 06-12-2024
5
-
6
- - Added Validations
7
-
8
- ## [0.1.17] - 24-10-2024
9
-
10
- - Add /delete to chat
11
-
12
- ## [0.2.2] - 19-11-2024
13
-
14
- - Refactor menu permissions
15
-
16
- ## [0.1.16] - 10-06-2024
17
-
18
- - Improve close menu functionality
19
-
20
- ## [0.1.15] - 10-06-2024
21
-
22
- - Fix a bug
23
-
24
- ## [0.1.14] - 07-06-2024
25
-
26
- - Fix a bug
27
-
28
- ## [0.1.13] - 07-06-2024
29
-
30
- - Fix a bug
31
-
32
- ## [0.1.12] - 07-06-2024
33
-
34
- - Add dynamic hidden menu items
35
- - Refactor code for better readability
36
- - Remove unnecessary component arguments
37
-
38
- ## [0.1.11] - 30-05-2024
39
-
40
- - Hide some Training Module menu items from production
41
-
42
- ## [0.1.10] - 30-05-2024
43
-
44
- - Hide some menu items from production
45
-
46
- ## [0.1.9] - 28-04-2024
47
-
48
- - Merge previous code
49
-
50
- ## [0.1.8] - 28-04-2024
51
-
52
- - Hide some menu items
53
-
54
- ## [0.1.7] - 27-05-2024
55
-
56
- - Fix close menu button
57
-
58
- ## [0.1.6] - 25-04-2024
59
-
60
- - Updated api call addresses
61
-
62
- ## [0.1.5] - 27-02-2024
63
-
64
- - Added path /auto-services menu element to Training module
65
- - Replaced path /followup-training /auto-services menu element to Service module
66
-
67
- ## [0.1.4] - 09-02-2024
68
-
69
- - Removed /buerokratt menu element from Analytics module
70
-
71
- ## [0.1.3] - 06-02-2024
72
-
73
- - Removed /training for /train-new-model menu element
74
-
75
- ## [0.1.2] - 01-02-2024
76
-
77
- - Added new element in menu /pending
78
-
79
- ## [0.1.1] - 28-12-2023
80
-
81
- - Initial package structure for menu for ruuter v2.
1
+ # Changelog
2
+
3
+ All changes to this project will be documented in this file.
4
+
5
+ ## [0.2.5] - 23-12-2024
6
+
7
+ - Updated menu position for model and train model
8
+
9
+ ## [0.2.4] - 13-12-2024
10
+
11
+ - Added Skm configration
12
+
13
+ ## [0.2.3] - 06-12-2024
14
+
15
+ - Added Validations
16
+
17
+ ## [0.1.17] - 24-10-2024
18
+
19
+ - Add /delete to chat
20
+
21
+ ## [0.2.2] - 19-11-2024
22
+
23
+ - Refactor menu permissions
24
+
25
+ ## [0.1.16] - 10-06-2024
26
+
27
+ - Improve close menu functionality
28
+
29
+ ## [0.1.15] - 10-06-2024
30
+
31
+ - Fix a bug
32
+
33
+ ## [0.1.14] - 07-06-2024
34
+
35
+ - Fix a bug
36
+
37
+ ## [0.1.13] - 07-06-2024
38
+
39
+ - Fix a bug
40
+
41
+ ## [0.1.12] - 07-06-2024
42
+
43
+ - Add dynamic hidden menu items
44
+ - Refactor code for better readability
45
+ - Remove unnecessary component arguments
46
+
47
+ ## [0.1.11] - 30-05-2024
48
+
49
+ - Hide some Training Module menu items from production
50
+
51
+ ## [0.1.10] - 30-05-2024
52
+
53
+ - Hide some menu items from production
54
+
55
+ ## [0.1.9] - 28-04-2024
56
+
57
+ - Merge previous code
58
+
59
+ ## [0.1.8] - 28-04-2024
60
+
61
+ - Hide some menu items
62
+
63
+ ## [0.1.7] - 27-05-2024
64
+
65
+ - Fix close menu button
66
+
67
+ ## [0.1.6] - 25-04-2024
68
+
69
+ - Updated api call addresses
70
+
71
+ ## [0.1.5] - 27-02-2024
72
+
73
+ - Added path /auto-services menu element to Training module
74
+ - Replaced path /followup-training /auto-services menu element to Service module
75
+
76
+ ## [0.1.4] - 09-02-2024
77
+
78
+ - Removed /buerokratt menu element from Analytics module
79
+
80
+ ## [0.1.3] - 06-02-2024
81
+
82
+ - Removed /training for /train-new-model menu element
83
+
84
+ ## [0.1.2] - 01-02-2024
85
+
86
+ - Added new element in menu /pending
87
+
88
+ ## [0.1.1] - 28-12-2023
89
+
90
+ - Initial package structure for menu for ruuter v2.
package/MAKING_CHANGES.md CHANGED
@@ -1,8 +1,8 @@
1
- ## Making Changes
2
-
3
- #### If you want to make changes to export menu component:
4
- * Make necessary changes
5
- * Update version in file [package.json](package.json)
6
- * Template: `major v.mid v.minor v`
7
- * Add brief description to [changelog file](CHANGELOG.md)
8
- * Proceed with deploying or testing package locally by information provided by [readme](README.md)
1
+ ## Making Changes
2
+
3
+ #### If you want to make changes to export menu component:
4
+ * Make necessary changes
5
+ * Update version in file [package.json](package.json)
6
+ * Template: `major v.mid v.minor v`
7
+ * Add brief description to [changelog file](CHANGELOG.md)
8
+ * Proceed with deploying or testing package locally by information provided by [readme](README.md)
package/README.md CHANGED
@@ -1,49 +1,49 @@
1
- ## MainNavigation component
2
-
3
- ### General information
4
-
5
- Changelog file could be found here [link](CHANGELOG.md)
6
-
7
- ## Creating package
8
-
9
- To create npm package for future usage:
10
- * Navigate to the root directory of the package.
11
- * Run `npm pack` command, to create package file.
12
- * If you made updates to the package please relate to this [file](MAKING_CHANGES.md) before creating package
13
-
14
- To publish created package:
15
- * Run `npm publish --access public`
16
- * Authorize in npm and package would be published
17
-
18
- ## Adding dependency from remote
19
- - Since this package currently being deployed to @buerokratt-ria account therefore it would need to be related as @buerokratt-ria
20
- - Add to `package.json` @buerokratt-ria/menu: followed by version, list of available version could be found [here](CHANGELOG.md)
21
-
22
- ## Adding dependency as local package
23
- - When you build the package file, put it in `root` directory of the application
24
- - Add to `package.json` @buerokratt-ria/header: file:name-of-the-generated-package
25
- - If having import issues like `NOT FOUND` try adding to `vite.config.ts`
26
- `resolve: {
27
- alias: {
28
- '@buerokratt-ria': `${path.resolve(__dirname, 'node_modules/@buerokratt-ria/menu/src')}`
29
- },
30
- }`
31
-
32
- ## Using package
33
- * Importing component
34
- * `import { MainNavigation } from '@buerokratt-ria/menu/src'` for Header and Menu
35
- * If you want to use local package, put created package to the root of react app and add dependency like "@buerokratt-ria/header": "file:buerokratt-ria-menu-0.0.5.tgz" (use proper version)
36
- ### Using MainNavigation component
37
- * MainNavigation uses four env variable:
38
- * use `REACT_APP_MENU_URL` & `REACT_APP_MENU_PATH` to set the url for json that contains the menu item array
39
- * use `REACT_APP_MENU_JSON` with json string of the menu item array
40
- * `REACT_APP_MENU_JSON` will overrides buth the local file provieded by package and the `REACT_APP_MENU_URL` & `REACT_APP_MENU_PATH`
41
- * If you want to use only local file provided by package then remove `REACT_APP_MENU_JSON`, `REACT_APP_MENU_URL` & `REACT_APP_MENU_PATH` variables
42
- * `REACT_APP_SERVICE_ID` set of values seperated by comma resembling current module, examples of this value could be found in following links
43
-
44
-
45
-
46
- ### Implemented examples:
47
- * https://github.com/buerokratt/Training-Module
48
- * https://github.com/buerokratt/Service-Module
49
- * https://github.com/buerokratt/Analytics-Module
1
+ ## MainNavigation component
2
+
3
+ ### General information
4
+
5
+ Changelog file could be found here [link](CHANGELOG.md)
6
+
7
+ ## Creating package
8
+
9
+ To create npm package for future usage:
10
+ * Navigate to the root directory of the package.
11
+ * Run `npm pack` command, to create package file.
12
+ * If you made updates to the package please relate to this [file](MAKING_CHANGES.md) before creating package
13
+
14
+ To publish created package:
15
+ * Run `npm publish --access public`
16
+ * Authorize in npm and package would be published
17
+
18
+ ## Adding dependency from remote
19
+ - Since this package currently being deployed to @buerokratt-ria account therefore it would need to be related as @buerokratt-ria
20
+ - Add to `package.json` @buerokratt-ria/menu: followed by version, list of available version could be found [here](CHANGELOG.md)
21
+
22
+ ## Adding dependency as local package
23
+ - When you build the package file, put it in `root` directory of the application
24
+ - Add to `package.json` @buerokratt-ria/header: file:name-of-the-generated-package
25
+ - If having import issues like `NOT FOUND` try adding to `vite.config.ts`
26
+ `resolve: {
27
+ alias: {
28
+ '@buerokratt-ria': `${path.resolve(__dirname, 'node_modules/@buerokratt-ria/menu/src')}`
29
+ },
30
+ }`
31
+
32
+ ## Using package
33
+ * Importing component
34
+ * `import { MainNavigation } from '@buerokratt-ria/menu/src'` for Header and Menu
35
+ * If you want to use local package, put created package to the root of react app and add dependency like "@buerokratt-ria/header": "file:buerokratt-ria-menu-0.0.5.tgz" (use proper version)
36
+ ### Using MainNavigation component
37
+ * MainNavigation uses four env variable:
38
+ * use `REACT_APP_MENU_URL` & `REACT_APP_MENU_PATH` to set the url for json that contains the menu item array
39
+ * use `REACT_APP_MENU_JSON` with json string of the menu item array
40
+ * `REACT_APP_MENU_JSON` will overrides buth the local file provieded by package and the `REACT_APP_MENU_URL` & `REACT_APP_MENU_PATH`
41
+ * If you want to use only local file provided by package then remove `REACT_APP_MENU_JSON`, `REACT_APP_MENU_URL` & `REACT_APP_MENU_PATH` variables
42
+ * `REACT_APP_SERVICE_ID` set of values seperated by comma resembling current module, examples of this value could be found in following links
43
+
44
+
45
+
46
+ ### Implemented examples:
47
+ * https://github.com/buerokratt/Training-Module
48
+ * https://github.com/buerokratt/Service-Module
49
+ * https://github.com/buerokratt/Analytics-Module
Binary file
package/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export {
2
- default as MainNavigation
1
+ export {
2
+ default as MainNavigation
3
3
  } from './src/menu';
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "@buerokratt-ria/menu",
3
- "version": "0.2.3",
4
- "description": "Generic MainNavigation component that would be injected as dependency.",
5
- "main": "index.js",
6
- "scripts": {},
7
- "author": "ExiRain",
8
- "license": "ISC",
9
- "peerDependencies": {
10
- "@radix-ui/react-accessible-icon": "^1.0.3",
11
- "@radix-ui/react-dialog": "^1.0.4",
12
- "@radix-ui/react-switch": "^1.0.3",
13
- "@radix-ui/react-toast": "^1.1.4",
14
- "@tanstack/react-query": "^4.32.1",
15
- "clsx": "^1.2.1",
16
- "i18next": "^23.2.3",
17
- "i18next-browser-languagedetector": "^7.1.0",
18
- "path": "^0.12.7",
19
- "react": "^18.2.0",
20
- "react-cookie": "^4.1.1",
21
- "react-dom": "^18.2.0",
22
- "react-hook-form": "^7.45.4",
23
- "react-i18next": "^12.1.1",
24
- "react-icons": "^4.10.1",
25
- "react-idle-timer": "^5.7.2",
26
- "react-router-dom": "^6.14.2",
27
- "rxjs": "^7.8.1",
28
- "tslib": "^2.3.0",
29
- "vite-plugin-dts": "^3.5.2",
30
- "vite-plugin-svgr": "^3.2.0",
31
- "zustand": "^4.4.0"
32
- },
33
- "dependencies": {
34
- "react": "^18.2.0",
35
- "@types/react": "^18.2.21",
36
- "@buerokratt-ria/styles": "^0.0.1"
37
- },
38
- "devDependencies": {
39
- "@types/react": "^18.0.26",
40
- "@types/react-dom": "^18.0.9"
41
- }
42
- }
1
+ {
2
+ "name": "@buerokratt-ria/menu",
3
+ "version": "0.2.5",
4
+ "description": "Generic MainNavigation component that would be injected as dependency.",
5
+ "main": "index.js",
6
+ "scripts": {},
7
+ "author": "ExiRain",
8
+ "license": "ISC",
9
+ "peerDependencies": {
10
+ "@radix-ui/react-accessible-icon": "^1.0.3",
11
+ "@radix-ui/react-dialog": "^1.0.4",
12
+ "@radix-ui/react-switch": "^1.0.3",
13
+ "@radix-ui/react-toast": "^1.1.4",
14
+ "@tanstack/react-query": "^4.32.1",
15
+ "clsx": "^1.2.1",
16
+ "i18next": "^23.2.3",
17
+ "i18next-browser-languagedetector": "^7.1.0",
18
+ "path": "^0.12.7",
19
+ "react": "^18.2.0",
20
+ "react-cookie": "^4.1.1",
21
+ "react-dom": "^18.2.0",
22
+ "react-hook-form": "^7.45.4",
23
+ "react-i18next": "^12.1.1",
24
+ "react-icons": "^4.10.1",
25
+ "react-idle-timer": "^5.7.2",
26
+ "react-router-dom": "^6.14.2",
27
+ "rxjs": "^7.8.1",
28
+ "tslib": "^2.3.0",
29
+ "vite-plugin-dts": "^3.5.2",
30
+ "vite-plugin-svgr": "^3.2.0",
31
+ "zustand": "^4.4.0"
32
+ },
33
+ "dependencies": {
34
+ "react": "^18.2.0",
35
+ "@types/react": "^18.2.21",
36
+ "@buerokratt-ria/styles": "^0.0.1"
37
+ },
38
+ "devDependencies": {
39
+ "@types/react": "^18.0.26",
40
+ "@types/react-dom": "^18.0.9"
41
+ }
42
+ }
package/project.json CHANGED
@@ -1,52 +1,52 @@
1
- {
2
- "name": "header",
3
- "sourceRoot": "header/src",
4
- "projectType": "library",
5
- "tags": ["scope:header"],
6
- "targets": {
7
- "lint": {
8
- "executor": "@nrwl/linter:eslint",
9
- "outputs": ["{options.outputFile}"],
10
- "options": {
11
- "lintFilePatterns": ["header/**/*.{ts,tsx,js,jsx}"]
12
- }
13
- },
14
- "build": {
15
- "executor": "@nrwl/vite:build",
16
- "outputs": ["{options.outputPath}"],
17
- "defaultConfiguration": "production",
18
- "options": {
19
- "project": "./ng-package.json",
20
- "outputPath": "dist/header"
21
- },
22
- "configurations": {
23
- "production": {
24
- "tsConfig": "./tsconfig.lib.prod.json",
25
- "mode": "production"
26
- },
27
- "development": {
28
- "tsConfig": "./tsconfig.lib.json",
29
- "mode": "development"
30
- }
31
- }
32
- },
33
- "test": {
34
- "executor": "@nrwl/vite:test",
35
- "outputs": ["{projectRoot}/coverage"],
36
- "options": {
37
- "passWithNoTests": true
38
- }
39
- },
40
- "version": {
41
- "executor": "@jscutlery/semver:version",
42
- "options": {
43
- "preset": "angular",
44
- "baseBranch": "main",
45
- "push": true,
46
- "noVerify": true,
47
- "commitMessageFormat": "chore(${projectName}): release version ${version} [skip ci]",
48
- "skipCommitTypes": ["chore", "ci", "docs", "style", "test", "format"]
49
- }
50
- }
51
- }
52
- }
1
+ {
2
+ "name": "header",
3
+ "sourceRoot": "header/src",
4
+ "projectType": "library",
5
+ "tags": ["scope:header"],
6
+ "targets": {
7
+ "lint": {
8
+ "executor": "@nrwl/linter:eslint",
9
+ "outputs": ["{options.outputFile}"],
10
+ "options": {
11
+ "lintFilePatterns": ["header/**/*.{ts,tsx,js,jsx}"]
12
+ }
13
+ },
14
+ "build": {
15
+ "executor": "@nrwl/vite:build",
16
+ "outputs": ["{options.outputPath}"],
17
+ "defaultConfiguration": "production",
18
+ "options": {
19
+ "project": "./ng-package.json",
20
+ "outputPath": "dist/header"
21
+ },
22
+ "configurations": {
23
+ "production": {
24
+ "tsConfig": "./tsconfig.lib.prod.json",
25
+ "mode": "production"
26
+ },
27
+ "development": {
28
+ "tsConfig": "./tsconfig.lib.json",
29
+ "mode": "development"
30
+ }
31
+ }
32
+ },
33
+ "test": {
34
+ "executor": "@nrwl/vite:test",
35
+ "outputs": ["{projectRoot}/coverage"],
36
+ "options": {
37
+ "passWithNoTests": true
38
+ }
39
+ },
40
+ "version": {
41
+ "executor": "@jscutlery/semver:version",
42
+ "options": {
43
+ "preset": "angular",
44
+ "baseBranch": "main",
45
+ "push": true,
46
+ "noVerify": true,
47
+ "commitMessageFormat": "chore(${projectName}): release version ${version} [skip ci]",
48
+ "skipCommitTypes": ["chore", "ci", "docs", "style", "test", "format"]
49
+ }
50
+ }
51
+ }
52
+ }
package/src/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export {
2
- default as MainNavigation
1
+ export {
2
+ default as MainNavigation
3
3
  } from './menu';
@@ -1,33 +1,33 @@
1
- import React, {
2
- CSSProperties,
3
- forwardRef,
4
- ReactNode,
5
- StyleHTMLAttributes,
6
- } from 'react';
7
- import * as AccessibleIcon from '@radix-ui/react-accessible-icon';
8
- import clsx from 'clsx';
9
-
10
- import '../icon.scss';
11
-
12
- type IconProps = StyleHTMLAttributes<CSSProperties> & {
13
- label?: string | null;
14
- icon: ReactNode;
15
- size?: 'small' | 'medium' | 'large';
16
- className?: string;
17
- };
18
-
19
- const IconComponent = forwardRef<HTMLSpanElement, IconProps>(
20
- ({ label, icon, className, size = 'small', ...rest }, ref) => {
21
- const iconClasses = clsx('icon', `icon--${size}`, className);
22
-
23
- return (
24
- <AccessibleIcon.Root label={label ?? ''}>
25
- <span ref={ref} className={iconClasses} style={rest.style}>
26
- {icon}
27
- </span>
28
- </AccessibleIcon.Root>
29
- );
30
- }
31
- );
32
-
33
- export default IconComponent;
1
+ import React, {
2
+ CSSProperties,
3
+ forwardRef,
4
+ ReactNode,
5
+ StyleHTMLAttributes,
6
+ } from 'react';
7
+ import * as AccessibleIcon from '@radix-ui/react-accessible-icon';
8
+ import clsx from 'clsx';
9
+
10
+ import '../icon.scss';
11
+
12
+ type IconProps = StyleHTMLAttributes<CSSProperties> & {
13
+ label?: string | null;
14
+ icon: ReactNode;
15
+ size?: 'small' | 'medium' | 'large';
16
+ className?: string;
17
+ };
18
+
19
+ const IconComponent = forwardRef<HTMLSpanElement, IconProps>(
20
+ ({ label, icon, className, size = 'small', ...rest }, ref) => {
21
+ const iconClasses = clsx('icon', `icon--${size}`, className);
22
+
23
+ return (
24
+ <AccessibleIcon.Root label={label ?? ''}>
25
+ <span ref={ref} className={iconClasses} style={rest.style}>
26
+ {icon}
27
+ </span>
28
+ </AccessibleIcon.Root>
29
+ );
30
+ }
31
+ );
32
+
33
+ export default IconComponent;
@@ -1,22 +1,22 @@
1
- @import '@buerokratt-ria/styles/styles/tools/spacing';
2
-
3
- .icon {
4
- display: inline-flex;
5
- align-items: center;
6
- justify-content: center;
7
-
8
- &--small {
9
- width: get-spacing(haapsalu);
10
- height: get-spacing(haapsalu);
11
- }
12
-
13
- &--medium {
14
- width: get-spacing(kuressaare);
15
- height: get-spacing(kuressaare);
16
- }
17
-
18
- &--large {
19
- width: get-spacing(viljandi);
20
- height: get-spacing(viljandi);
21
- }
22
- }
1
+ @import '@buerokratt-ria/styles/styles/tools/spacing';
2
+
3
+ .icon {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+
8
+ &--small {
9
+ width: get-spacing(haapsalu);
10
+ height: get-spacing(haapsalu);
11
+ }
12
+
13
+ &--medium {
14
+ width: get-spacing(kuressaare);
15
+ height: get-spacing(kuressaare);
16
+ }
17
+
18
+ &--large {
19
+ width: get-spacing(viljandi);
20
+ height: get-spacing(viljandi);
21
+ }
22
+ }