@vaadin/hilla-react-crud 24.6.0 → 24.7.0-alpha3
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/index.js +1 -1
- package/package.json +19 -18
- package/util.js +1 -1
- package/util.js.map +2 -2
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ function __REGISTER__(feature, vaadinObj = window.Vaadin ??= {}) {
|
|
|
2
2
|
vaadinObj.registrations ??= [];
|
|
3
3
|
vaadinObj.registrations.push({
|
|
4
4
|
is: feature ? `${"@vaadin/hilla-react-crud"}/${feature}` : "@vaadin/hilla-react-crud",
|
|
5
|
-
version: "24.
|
|
5
|
+
version: "24.7.0-alpha3"
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
8
|
export * from "./autogrid-feature.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/hilla-react-crud",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.7.0-alpha3",
|
|
4
4
|
"description": "Hilla CRUD utils for React",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -56,33 +56,34 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@vaadin/hilla-frontend": "24.
|
|
60
|
-
"@vaadin/hilla-lit-form": "24.
|
|
61
|
-
"@vaadin/hilla-react-form": "24.
|
|
62
|
-
"@vaadin/react-components": "24.
|
|
59
|
+
"@vaadin/hilla-frontend": "24.7.0-alpha3",
|
|
60
|
+
"@vaadin/hilla-lit-form": "24.7.0-alpha3",
|
|
61
|
+
"@vaadin/hilla-react-form": "24.7.0-alpha3",
|
|
62
|
+
"@vaadin/react-components": "24.7.0-alpha2"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"react": "^18",
|
|
66
66
|
"react-dom": "^18"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@esm-bundle/chai": "^4.3.4-fix.0",
|
|
70
69
|
"@testing-library/dom": "^10.4.0",
|
|
71
70
|
"@testing-library/react": "^16.1.0",
|
|
72
71
|
"@testing-library/user-event": "^14.5.2",
|
|
73
|
-
"@types/chai": "^4.3.
|
|
74
|
-
"@types/chai-as-promised": "^7.1.
|
|
75
|
-
"@types/chai-dom": "^1.11.
|
|
76
|
-
"@types/mocha": "^10.0.
|
|
77
|
-
"@types/react": "^18.
|
|
78
|
-
"@types/
|
|
79
|
-
"@types/sinon
|
|
80
|
-
"@types/
|
|
81
|
-
"
|
|
82
|
-
"chai
|
|
72
|
+
"@types/chai": "^4.3.20",
|
|
73
|
+
"@types/chai-as-promised": "^7.1.8",
|
|
74
|
+
"@types/chai-dom": "^1.11.3",
|
|
75
|
+
"@types/mocha": "^10.0.10",
|
|
76
|
+
"@types/react": "^18.3.17",
|
|
77
|
+
"@types/react-dom": "^18",
|
|
78
|
+
"@types/sinon": "^10.0.20",
|
|
79
|
+
"@types/sinon-chai": "^3.2.12",
|
|
80
|
+
"@types/validator": "^13.12.2",
|
|
81
|
+
"chai": "^5.1.2",
|
|
82
|
+
"chai-as-promised": "^7.1.2",
|
|
83
|
+
"chai-dom": "^1.12.0",
|
|
83
84
|
"karma-viewport": "^1.0.9",
|
|
84
|
-
"sinon": "^16.
|
|
85
|
+
"sinon": "^16.1.3",
|
|
85
86
|
"sinon-chai": "^3.7.0",
|
|
86
|
-
"typescript": "5.
|
|
87
|
+
"typescript": "5.7.2"
|
|
87
88
|
}
|
|
88
89
|
}
|
package/util.js
CHANGED
|
@@ -2,7 +2,7 @@ function __REGISTER__(feature, vaadinObj = window.Vaadin ??= {}) {
|
|
|
2
2
|
vaadinObj.registrations ??= [];
|
|
3
3
|
vaadinObj.registrations.push({
|
|
4
4
|
is: feature ? `${"@vaadin/hilla-react-crud"}/${feature}` : "@vaadin/hilla-react-crud",
|
|
5
|
-
version: "24.
|
|
5
|
+
version: "24.7.0-alpha3"
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
package/util.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../scripts/register.js", "src/util.tsx"],
|
|
4
|
-
"sourcesContent": ["export function __REGISTER__(feature, vaadinObj = (window.Vaadin ??= {})) {\n vaadinObj.registrations ??= [];\n vaadinObj.registrations.push({\n is: feature ? `${__NAME__}/${feature}` : __NAME__,\n version: __VERSION__,\n });\n}\n", "import React, { type CSSProperties, forwardRef } from 'react';\nimport type FilterUnion from './types/com/vaadin/hilla/crud/filter/FilterUnion';\n\nexport type ComponentStyleProps = Readonly<{\n id?: string;\n style?: CSSProperties;\n className?: string;\n}>;\n\nexport function convertToTitleCase(inputString: string): string {\n // Convert underscores to spaces\n const stringWithSpaces = inputString.replace(/_/gu, ' ');\n\n // Convert to title case\n const words = stringWithSpaces.split(' ');\n const titleCaseWords = words.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase());\n\n // Join the title case words with spaces\n return titleCaseWords.join(' ');\n}\n\nexport function registerStylesheet(stylesheet: CSSStyleSheet): void {\n const css = Array.from(stylesheet.cssRules)\n .map((rule) => rule.cssText)\n .join('\\n');\n\n const styleTag = document.createElement('style');\n styleTag.textContent = css;\n document.head.prepend(styleTag);\n}\n\nconst registeredFeatures = new Set<string>();\nfunction useFeatureRegistration(feature: string): void {\n if (registeredFeatures.has(feature)) {\n return;\n }\n\n registeredFeatures.add(feature);\n // @ts-expect-error: esbuild injection\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n __REGISTER__(feature);\n}\n\nexport function featureRegistration<C extends (...args: any[]) => any>(Component: C, feature: string): C {\n return forwardRef<unknown, React.JSX.LibraryManagedAttributes<C, NonNullable<unknown>>>((props, ref) => {\n useFeatureRegistration(feature);\n return <Component {...props} ref={ref} />;\n }) as unknown as C;\n}\n\nexport function isFilterEmpty(filter: FilterUnion): boolean {\n if (filter['@type'] === 'and' || filter['@type'] === 'or') {\n if (filter.children.length === 0) {\n return true;\n }\n return filter.children.every((child) => isFilterEmpty(child as FilterUnion));\n }\n if ('filterValue' in filter) {\n return filter.filterValue === '';\n }\n throw new Error(`Unknown filter type: ${'@type' in filter ? filter['@type'] : JSON.stringify(filter)} `);\n}\n"],
|
|
5
|
-
"mappings": "AAAO,SAAS,aAAa,SAAS,YAAa,OAAO,WAAW,CAAC,GAAI;AACxE,YAAU,kBAAkB,CAAC;AAC7B,YAAU,cAAc,KAAK;AAAA,IAC3B,IAAI,UAAU,GAAG,0BAAQ,IAAI,OAAO,KAAK;AAAA,IACzC,SAAS;AAAA,EACX,CAAC;AACH;ACwCW;AA9CX,OAAO,SAA6B,kBAAkB;AAS/C,SAAS,mBAAmB,aAA6B;AAE9D,QAAM,mBAAmB,YAAY,QAAQ,OAAO,GAAG;AAGvD,QAAM,QAAQ,iBAAiB,MAAM,GAAG;AACxC,QAAM,iBAAiB,MAAM,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,EAAE,YAAY,CAAC;AAGrG,SAAO,eAAe,KAAK,GAAG;AAChC;AAEO,SAAS,mBAAmB,YAAiC;AAClE,QAAM,MAAM,MAAM,KAAK,WAAW,QAAQ,EACvC,IAAI,CAAC,SAAS,KAAK,OAAO,EAC1B,KAAK,IAAI;AAEZ,QAAM,WAAW,SAAS,cAAc,OAAO;AAC/C,WAAS,cAAc;AACvB,WAAS,KAAK,QAAQ,QAAQ;AAChC;AAEA,MAAM,qBAAqB,oBAAI,IAAY;AAC3C,SAAS,uBAAuB,SAAuB;AACrD,MAAI,mBAAmB,IAAI,OAAO,GAAG;AACnC;AAAA,EACF;AAEA,qBAAmB,IAAI,OAAO;AAG9B,eAAa,OAAO;AACtB;AAEO,SAAS,oBAAuD,WAAc,SAAoB;AACvG,SAAO,WAAiF,CAAC,OAAO,QAAQ;AACtG,2BAAuB,OAAO;AAC9B,WAAO,oBAAC,aAAW,
|
|
4
|
+
"sourcesContent": ["export function __REGISTER__(feature, vaadinObj = (window.Vaadin ??= {})) {\n vaadinObj.registrations ??= [];\n vaadinObj.registrations.push({\n is: feature ? `${__NAME__}/${feature}` : __NAME__,\n version: __VERSION__,\n });\n}\n", "import React, { type CSSProperties, forwardRef } from 'react';\nimport type FilterUnion from './types/com/vaadin/hilla/crud/filter/FilterUnion';\n\nexport type ComponentStyleProps = Readonly<{\n id?: string;\n style?: CSSProperties;\n className?: string;\n}>;\n\nexport function convertToTitleCase(inputString: string): string {\n // Convert underscores to spaces\n const stringWithSpaces = inputString.replace(/_/gu, ' ');\n\n // Convert to title case\n const words = stringWithSpaces.split(' ');\n const titleCaseWords = words.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase());\n\n // Join the title case words with spaces\n return titleCaseWords.join(' ');\n}\n\nexport function registerStylesheet(stylesheet: CSSStyleSheet): void {\n const css = Array.from(stylesheet.cssRules)\n .map((rule) => rule.cssText)\n .join('\\n');\n\n const styleTag = document.createElement('style');\n styleTag.textContent = css;\n document.head.prepend(styleTag);\n}\n\nconst registeredFeatures = new Set<string>();\nfunction useFeatureRegistration(feature: string): void {\n if (registeredFeatures.has(feature)) {\n return;\n }\n\n registeredFeatures.add(feature);\n // @ts-expect-error: esbuild injection\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n __REGISTER__(feature);\n}\n\nexport function featureRegistration<C extends (...args: any[]) => any>(Component: C, feature: string): C {\n return forwardRef<unknown, React.JSX.LibraryManagedAttributes<C, NonNullable<unknown>>>((props, ref) => {\n useFeatureRegistration(feature);\n return <Component {...(props as any)} ref={ref} />;\n }) as unknown as C;\n}\n\nexport function isFilterEmpty(filter: FilterUnion): boolean {\n if (filter['@type'] === 'and' || filter['@type'] === 'or') {\n if (filter.children.length === 0) {\n return true;\n }\n return filter.children.every((child) => isFilterEmpty(child as FilterUnion));\n }\n if ('filterValue' in filter) {\n return filter.filterValue === '';\n }\n throw new Error(`Unknown filter type: ${'@type' in filter ? filter['@type'] : JSON.stringify(filter)} `);\n}\n"],
|
|
5
|
+
"mappings": "AAAO,SAAS,aAAa,SAAS,YAAa,OAAO,WAAW,CAAC,GAAI;AACxE,YAAU,kBAAkB,CAAC;AAC7B,YAAU,cAAc,KAAK;AAAA,IAC3B,IAAI,UAAU,GAAG,0BAAQ,IAAI,OAAO,KAAK;AAAA,IACzC,SAAS;AAAA,EACX,CAAC;AACH;ACwCW;AA9CX,OAAO,SAA6B,kBAAkB;AAS/C,SAAS,mBAAmB,aAA6B;AAE9D,QAAM,mBAAmB,YAAY,QAAQ,OAAO,GAAG;AAGvD,QAAM,QAAQ,iBAAiB,MAAM,GAAG;AACxC,QAAM,iBAAiB,MAAM,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,EAAE,YAAY,CAAC;AAGrG,SAAO,eAAe,KAAK,GAAG;AAChC;AAEO,SAAS,mBAAmB,YAAiC;AAClE,QAAM,MAAM,MAAM,KAAK,WAAW,QAAQ,EACvC,IAAI,CAAC,SAAS,KAAK,OAAO,EAC1B,KAAK,IAAI;AAEZ,QAAM,WAAW,SAAS,cAAc,OAAO;AAC/C,WAAS,cAAc;AACvB,WAAS,KAAK,QAAQ,QAAQ;AAChC;AAEA,MAAM,qBAAqB,oBAAI,IAAY;AAC3C,SAAS,uBAAuB,SAAuB;AACrD,MAAI,mBAAmB,IAAI,OAAO,GAAG;AACnC;AAAA,EACF;AAEA,qBAAmB,IAAI,OAAO;AAG9B,eAAa,OAAO;AACtB;AAEO,SAAS,oBAAuD,WAAc,SAAoB;AACvG,SAAO,WAAiF,CAAC,OAAO,QAAQ;AACtG,2BAAuB,OAAO;AAC9B,WAAO,oBAAC,aAAW,GAAI,OAAe,KAAU;AAAA,EAClD,CAAC;AACH;AAEO,SAAS,cAAc,QAA8B;AAC1D,MAAI,OAAO,OAAO,MAAM,SAAS,OAAO,OAAO,MAAM,MAAM;AACzD,QAAI,OAAO,SAAS,WAAW,GAAG;AAChC,aAAO;AAAA,IACT;AACA,WAAO,OAAO,SAAS,MAAM,CAAC,UAAU,cAAc,KAAoB,CAAC;AAAA,EAC7E;AACA,MAAI,iBAAiB,QAAQ;AAC3B,WAAO,OAAO,gBAAgB;AAAA,EAChC;AACA,QAAM,IAAI,MAAM,wBAAwB,WAAW,SAAS,OAAO,OAAO,IAAI,KAAK,UAAU,MAAM,CAAC,GAAG;AACzG;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|