@gnwebsoft/ui 3.0.1 → 3.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 (66) hide show
  1. package/README.md +688 -0
  2. package/dist/chunk-4H3AFH7A.js +505 -0
  3. package/dist/chunk-DE62KYFK.js +122 -0
  4. package/dist/chunk-DEPJRTVT.js +1 -0
  5. package/dist/chunk-EBRUE2WR.cjs +493 -0
  6. package/dist/chunk-FD57PCAC.cjs +1 -0
  7. package/dist/chunk-H3GQLELL.js +2025 -0
  8. package/dist/chunk-MVPLBJRK.cjs +1 -0
  9. package/dist/chunk-OJF67RNM.js +1 -0
  10. package/dist/chunk-OT7COE7R.cjs +2025 -0
  11. package/dist/chunk-R2YK4LTT.cjs +122 -0
  12. package/dist/chunk-U6SDYCWF.js +493 -0
  13. package/dist/chunk-ZC7FGYL2.cjs +505 -0
  14. package/dist/components/index.cjs +25 -0
  15. package/dist/components/index.d.cts +752 -0
  16. package/dist/components/index.d.ts +664 -15
  17. package/dist/components/index.js +25 -24
  18. package/dist/enhanced-z-I7EHVS.d.cts +134 -0
  19. package/dist/enhanced-z-I7EHVS.d.ts +134 -0
  20. package/dist/hooks/index.cjs +12 -0
  21. package/dist/hooks/index.d.cts +95 -0
  22. package/dist/hooks/index.d.ts +82 -4
  23. package/dist/hooks/index.js +12 -7
  24. package/dist/index.cjs +127 -0
  25. package/dist/index.d.cts +14 -0
  26. package/dist/index.d.ts +4 -6
  27. package/dist/index.js +127 -54
  28. package/dist/types/index.cjs +2 -0
  29. package/dist/types/index.d.cts +241 -0
  30. package/dist/types/index.d.ts +205 -20
  31. package/dist/types/index.js +2 -1
  32. package/dist/utils/index.cjs +45 -0
  33. package/dist/utils/index.d.cts +366 -0
  34. package/dist/utils/index.d.ts +317 -9
  35. package/dist/utils/index.js +45 -22
  36. package/dist/wrappers/index.cjs +54 -0
  37. package/dist/wrappers/index.d.cts +1684 -0
  38. package/dist/wrappers/index.d.ts +1601 -118
  39. package/dist/wrappers/index.js +54 -8
  40. package/package.json +145 -88
  41. package/dist/AsyncSelectPayload-Cz4bgak0.d.mts +0 -10
  42. package/dist/AsyncSelectPayload-Cz4bgak0.d.ts +0 -10
  43. package/dist/chunk-2JFL7TS5.mjs +0 -0
  44. package/dist/chunk-6BGQA4BQ.js +0 -1
  45. package/dist/chunk-6JZ35VQJ.js +0 -19
  46. package/dist/chunk-7M2VOCYN.js +0 -1
  47. package/dist/chunk-BWQUYXUW.mjs +0 -1634
  48. package/dist/chunk-D3J7MWAU.js +0 -1634
  49. package/dist/chunk-EVPUCTZA.mjs +0 -0
  50. package/dist/chunk-FSU3H777.mjs +0 -473
  51. package/dist/chunk-GFSTK7KN.mjs +0 -19
  52. package/dist/chunk-I7EIUZKK.js +0 -332
  53. package/dist/chunk-JKUOV3MN.js +0 -473
  54. package/dist/chunk-RQS44YC7.mjs +0 -332
  55. package/dist/components/index.d.mts +0 -103
  56. package/dist/components/index.mjs +0 -24
  57. package/dist/hooks/index.d.mts +0 -17
  58. package/dist/hooks/index.mjs +0 -7
  59. package/dist/index.d.mts +0 -16
  60. package/dist/index.mjs +0 -54
  61. package/dist/types/index.d.mts +0 -56
  62. package/dist/types/index.mjs +0 -1
  63. package/dist/utils/index.d.mts +0 -58
  64. package/dist/utils/index.mjs +0 -22
  65. package/dist/wrappers/index.d.mts +0 -201
  66. package/dist/wrappers/index.mjs +0 -8
@@ -1,8 +1,54 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkD3J7MWAUjs = require('../chunk-D3J7MWAU.js');
4
- require('../chunk-6JZ35VQJ.js');
5
- require('../chunk-I7EIUZKK.js');
6
-
7
-
8
- exports.Field = _chunkD3J7MWAUjs.Field_default;
1
+ import {
2
+ AsyncMultiSelect2,
3
+ CheckboxElement,
4
+ CheckboxGroup,
5
+ DatePickerElement,
6
+ DatePickerElementCore,
7
+ EnhancedTextFieldElement,
8
+ PasswordElement_default,
9
+ RadioButtonGroup_default,
10
+ SelectCascadeElement_default,
11
+ SelectElement_default,
12
+ SelectMultiElement_default,
13
+ TextFieldElement_default,
14
+ TimePickerElement_default,
15
+ createDateInputTransform,
16
+ createDateOutputTransform,
17
+ createDefaultDatePickerConfig,
18
+ createStableKey,
19
+ extractErrorMessage,
20
+ isParsableDateString,
21
+ isValidDate,
22
+ readDatePickerValueAsDate,
23
+ useDatePickerStyles,
24
+ useDatePickerValidation,
25
+ useDatePickerValue
26
+ } from "../chunk-H3GQLELL.js";
27
+ import "../chunk-DE62KYFK.js";
28
+ export {
29
+ AsyncMultiSelect2,
30
+ CheckboxElement,
31
+ CheckboxGroup,
32
+ DatePickerElement,
33
+ DatePickerElementCore,
34
+ EnhancedTextFieldElement,
35
+ PasswordElement_default as PasswordElement,
36
+ RadioButtonGroup_default as RadioButtonGroup,
37
+ SelectCascadeElement_default as SelectCascadeElement,
38
+ SelectElement_default as SelectElement,
39
+ SelectMultiElement_default as SelectMultiElement,
40
+ TextFieldElement_default as TextFieldElement,
41
+ TimePickerElement_default as TimePickerElement,
42
+ createDateInputTransform,
43
+ createDateOutputTransform,
44
+ createDefaultDatePickerConfig,
45
+ createStableKey,
46
+ extractErrorMessage,
47
+ isParsableDateString,
48
+ isValidDate,
49
+ readDatePickerValueAsDate,
50
+ useDatePickerStyles,
51
+ useDatePickerValidation,
52
+ useDatePickerValue
53
+ };
54
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFtdLAogICJzb3VyY2VzQ29udGVudCI6IFtdLAogICJtYXBwaW5ncyI6ICIiLAogICJuYW1lcyI6IFtdCn0K
package/package.json CHANGED
@@ -1,88 +1,145 @@
1
- {
2
- "name": "@gnwebsoft/ui",
3
- "version": "3.0.1",
4
- "description": "A set of reusable wrappers for MUI v6",
5
- "author": "GNWebsoft Private Limited",
6
- "license": "",
7
- "keywords": [
8
- "MUI"
9
- ],
10
- "publishConfig": {
11
- "registry": "https://registry.npmjs.org/",
12
- "access": "public"
13
- },
14
- "scripts": {
15
- "link:self": "pnpm link --global",
16
- "package": "npm publish --access public --scope=@gnwebsoft",
17
- "types": "tsup src/index.ts --sourcemap inline",
18
- "clean": "rimraf ./dist/* --glob --no-verbose --no-interactive",
19
- "check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm",
20
- "build": "pnpm run clean && tsup"
21
- },
22
- "files": [
23
- "dist"
24
- ],
25
- "packageManager": "pnpm@10.15.0",
26
- "engines": {
27
- "node": ">=22.0.0"
28
- },
29
- "exports": {
30
- ".": {
31
- "import": "./dist/index.mjs",
32
- "require": "./dist/index.js"
33
- },
34
- "./components": {
35
- "import": "./dist/components/index.mjs",
36
- "require": "./dist/components/index.js"
37
- },
38
- "./hooks": {
39
- "import": "./dist/hooks/index.mjs",
40
- "require": "./dist/hooks/index.js"
41
- },
42
- "./types": {
43
- "import": "./dist/types/index.mjs",
44
- "require": "./dist/types/index.js"
45
- },
46
- "./utils": {
47
- "import": "./dist/utils/index.mjs",
48
- "require": "./dist/utils/index.js"
49
- },
50
- "./wrappers": {
51
- "import": "./dist/wrappers/index.mjs",
52
- "require": "./dist/wrappers/index.js"
53
- }
54
- },
55
- "devDependencies": {
56
- "@arethetypeswrong/cli": "^0.17.2",
57
- "@types/autosuggest-highlight": "^3.2.3",
58
- "@types/lodash": "^4.17.13",
59
- "@types/node": "^24.2.0",
60
- "@types/react": "^19.1.9",
61
- "@types/react-dom": "^19.1.7",
62
- "rimraf": "^6.0.1",
63
- "tslib": "^2.8.1",
64
- "tsup": "^8.4.0"
65
- },
66
- "peerDependencies": {
67
- "@emotion/cache": "^11.14.0",
68
- "@emotion/react": "^11.14.0",
69
- "@emotion/styled": "^11.14.0",
70
- "@hookform/resolvers": "^5.2.1",
71
- "@mui/icons-material": "^6.4.11",
72
- "@mui/lab": "^7.0.0-beta.16",
73
- "@mui/material": "^7.3.1",
74
- "@mui/x-data-grid": "^8.9.2",
75
- "@mui/x-date-pickers": "^8.9.2",
76
- "autosuggest-highlight": "^3.3.4",
77
- "axios": "^1.11.0",
78
- "dayjs": "^1.11.13",
79
- "es-toolkit": "^1.39.8",
80
- "lodash": "^4.17.21",
81
- "react": "^19.1.1",
82
- "react-dom": "^19.1.1",
83
- "react-hook-form": "^7.62.0",
84
- "typescript": "^5.9.2",
85
- "zod": "^4.0.15",
86
- "zustand": "^5.0.2"
87
- }
88
- }
1
+ {
2
+ "name": "@gnwebsoft/ui",
3
+ "version": "3.0.4",
4
+ "type": "module",
5
+ "description": "A set of reusable wrappers for MUI v7",
6
+ "author": "GNWebsoft Private Limited",
7
+ "license": "",
8
+ "keywords": [
9
+ "MUI"
10
+ ],
11
+ "publishConfig": {
12
+ "registry": "https://registry.npmjs.org/",
13
+ "access": "public"
14
+ },
15
+ "scripts": {
16
+ "dev": "node scripts/native-watch.js",
17
+ "dev:vite": "vite build --watch --config vite.lib.config.ts",
18
+ "build:vite": "vite build --config vite.lib.config.ts",
19
+ "dev:chokidar": "node scripts/watch.js",
20
+ "dev:native": "node scripts/native-watch.js",
21
+ "dev:nodemon": "nodemon --watch src --ext ts,tsx --exec \"tsup\"",
22
+ "dev:legacy": "tsup --watch --ignore-watch node_modules --ignore-watch dist",
23
+ "build": "pnpm run clean && tsup",
24
+ "build:watch": "tsup --watch",
25
+ "clean": "rimraf ./dist/* --glob --no-verbose --no-interactive",
26
+ "lint": "eslint src --fix",
27
+ "lint:check": "eslint src",
28
+ "lint:ci": "eslint src --format junit --output-file reports/lint-results.xml",
29
+ "type-check": "tsc --noEmit",
30
+ "test": "jest",
31
+ "test:watch": "jest --watch",
32
+ "test:coverage": "jest --coverage",
33
+ "test:ci": "jest --ci --coverage --watchAll=false --reporters=default --reporters=jest-junit",
34
+ "test:a11y": "jest --testNamePattern=\"a11y\"",
35
+ "docs:api": "typedoc",
36
+ "docs:api:md": "typedoc --plugin typedoc-plugin-markdown --out docs/markdown",
37
+ "docs:build": "pnpm run docs:api",
38
+ "docs:build:md": "pnpm run docs:api:md",
39
+ "docs:serve": "pnpm run docs:build && npx http-server docs/api -p 8080 -o",
40
+ "docs:deploy": "pnpm run docs:build && gh-pages -d docs/api",
41
+ "link:self": "pnpm link --global",
42
+ "package": "npm publish --access public --scope=@gnwebsoft",
43
+ "types": "tsup src/index.ts --sourcemap inline",
44
+ "check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm --ignore-rules=no-resolution"
45
+ },
46
+ "files": [
47
+ "dist"
48
+ ],
49
+ "packageManager": "pnpm@10.15.0",
50
+ "engines": {
51
+ "node": ">=22.0.0"
52
+ },
53
+ "exports": {
54
+ ".": {
55
+ "import": "./dist/index.js",
56
+ "require": "./dist/index.cjs",
57
+ "types": "./dist/index.d.ts"
58
+ },
59
+ "./components": {
60
+ "import": "./dist/components/index.js",
61
+ "require": "./dist/components/index.cjs",
62
+ "types": "./dist/components/index.d.ts"
63
+ },
64
+ "./hooks": {
65
+ "import": "./dist/hooks/index.js",
66
+ "require": "./dist/hooks/index.cjs",
67
+ "types": "./dist/hooks/index.d.ts"
68
+ },
69
+ "./types": {
70
+ "import": "./dist/types/index.js",
71
+ "require": "./dist/types/index.cjs",
72
+ "types": "./dist/types/index.d.ts"
73
+ },
74
+ "./utils": {
75
+ "import": "./dist/utils/index.js",
76
+ "require": "./dist/utils/index.cjs",
77
+ "types": "./dist/utils/index.d.ts"
78
+ },
79
+ "./wrappers": {
80
+ "import": "./dist/wrappers/index.js",
81
+ "require": "./dist/wrappers/index.cjs",
82
+ "types": "./dist/wrappers/index.d.ts"
83
+ }
84
+ },
85
+ "devDependencies": {
86
+ "@arethetypeswrong/cli": "^0.17.2",
87
+ "@eslint/js": "^9.33.0",
88
+ "@mui/x-date-pickers": "^8.10.2",
89
+ "@mui/x-date-pickers-pro": "^8.10.2",
90
+ "@testing-library/jest-dom": "^6.8.0",
91
+ "@testing-library/react": "^16.3.0",
92
+ "@testing-library/user-event": "^14.6.1",
93
+ "@types/autosuggest-highlight": "^3.2.3",
94
+ "@types/jest": "^30.0.0",
95
+ "@types/lodash": "^4.17.13",
96
+ "@types/node": "^24.2.0",
97
+ "@types/react": "^19.1.10",
98
+ "@types/react-dom": "^19.1.7",
99
+ "@vitejs/plugin-react": "^5.0.1",
100
+ "chokidar": "^4.0.3",
101
+ "eslint": "^9.33.0",
102
+ "eslint-plugin-import": "^2.32.0",
103
+ "eslint-plugin-react": "^7.37.5",
104
+ "eslint-plugin-react-hooks": "^5.2.0",
105
+ "gh-pages": "^6.3.0",
106
+ "http-server": "^14.1.1",
107
+ "jest": "^30.0.5",
108
+ "jest-axe": "^10.0.0",
109
+ "jest-environment-jsdom": "^30.0.5",
110
+ "jest-junit": "^16.0.0",
111
+ "nodemon": "^3.1.10",
112
+ "prettier": "^3.6.2",
113
+ "rimraf": "^6.0.1",
114
+ "ts-jest": "^29.4.1",
115
+ "tslib": "^2.8.1",
116
+ "tsup": "^8.4.0",
117
+ "typedoc": "^0.28.10",
118
+ "typedoc-plugin-markdown": "^4.8.1",
119
+ "typescript-eslint": "^8.40.0",
120
+ "vite": "^7.1.3",
121
+ "vite-plugin-dts": "^4.5.4"
122
+ },
123
+ "peerDependencies": {
124
+ "@emotion/cache": "^11.14.0",
125
+ "@emotion/react": "^11.14.0",
126
+ "@emotion/styled": "^11.14.0",
127
+ "@hookform/resolvers": "^5.2.1",
128
+ "@mui/icons-material": "^7.3.1",
129
+ "@mui/lab": "^7.0.0-beta.16",
130
+ "@mui/material": "^7.3.1",
131
+ "@mui/x-data-grid": "^8.9.2",
132
+ "@mui/x-date-pickers": "^8.9.2",
133
+ "autosuggest-highlight": "^3.3.4",
134
+ "axios": "^1.11.0",
135
+ "dayjs": "^1.11.13",
136
+ "es-toolkit": "^1.39.8",
137
+ "lodash": "^4.17.21",
138
+ "react": "^19.1.1",
139
+ "react-dom": "^19.1.1",
140
+ "react-hook-form": "^7.62.0",
141
+ "typescript": "^5.9.2",
142
+ "zod": "^4.0.15",
143
+ "zustand": "^5.0.2"
144
+ }
145
+ }
@@ -1,10 +0,0 @@
1
- type AsyncSelectPayload = {
2
- query: string | null;
3
- initialValue?: string | number | null;
4
- };
5
- type AsyncSelectMultiPayload = {
6
- query: string | null;
7
- initialValues?: string[] | number[] | null;
8
- };
9
-
10
- export type { AsyncSelectPayload as A, AsyncSelectMultiPayload as a };
@@ -1,10 +0,0 @@
1
- type AsyncSelectPayload = {
2
- query: string | null;
3
- initialValue?: string | number | null;
4
- };
5
- type AsyncSelectMultiPayload = {
6
- query: string | null;
7
- initialValues?: string[] | number[] | null;
8
- };
9
-
10
- export type { AsyncSelectPayload as A, AsyncSelectMultiPayload as a };
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,19 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/hooks/useTransform/index.ts
2
- function useTransform(options) {
3
- const value = typeof _optionalChain([options, 'access', _ => _.transform, 'optionalAccess', _2 => _2.input]) === "function" ? options.transform.input(options.value) : options.value;
4
- const onChange = (...event) => {
5
- if (typeof _optionalChain([options, 'access', _3 => _3.transform, 'optionalAccess', _4 => _4.output]) === "function") {
6
- options.onChange(options.transform.output(...event));
7
- } else {
8
- options.onChange(...event);
9
- }
10
- };
11
- return {
12
- value,
13
- onChange
14
- };
15
- }
16
-
17
-
18
-
19
- exports.useTransform = useTransform;
@@ -1 +0,0 @@
1
- "use strict";