@qwickapps/react-framework 1.5.7 → 1.5.9
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/dist/components/AccessibilityChecker.d.ts.map +1 -1
- package/dist/components/Html.d.ts +1 -1
- package/dist/components/Html.d.ts.map +1 -1
- package/dist/components/Logo.d.ts.map +1 -1
- package/dist/components/Markdown.d.ts +2 -2
- package/dist/components/Markdown.d.ts.map +1 -1
- package/dist/components/SafeSpan.d.ts +1 -1
- package/dist/components/SafeSpan.d.ts.map +1 -1
- package/dist/components/base/ModelView.d.ts +1 -1
- package/dist/components/base/ModelView.d.ts.map +1 -1
- package/dist/components/blocks/Article.d.ts +1 -1
- package/dist/components/blocks/Article.d.ts.map +1 -1
- package/dist/components/blocks/CardListGrid.d.ts.map +1 -1
- package/dist/components/blocks/Code.d.ts.map +1 -1
- package/dist/components/blocks/Content.d.ts.map +1 -1
- package/dist/components/blocks/CoverImageHeader.d.ts.map +1 -1
- package/dist/components/blocks/FeatureCard.d.ts.map +1 -1
- package/dist/components/blocks/FeatureGrid.d.ts.map +1 -1
- package/dist/components/blocks/Footer.d.ts.map +1 -1
- package/dist/components/blocks/Image.d.ts.map +1 -1
- package/dist/components/blocks/PageBannerHeader.d.ts.map +1 -1
- package/dist/components/blocks/ProductCard.d.ts.map +1 -1
- package/dist/components/blocks/Section.d.ts.map +1 -1
- package/dist/components/blocks/Text.d.ts +8 -1
- package/dist/components/blocks/Text.d.ts.map +1 -1
- package/dist/components/buttons/Button.d.ts.map +1 -1
- package/dist/components/buttons/PaletteSwitcher.d.ts.map +1 -1
- package/dist/components/buttons/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/forms/FormBlock.d.ts +1 -1
- package/dist/components/forms/FormBlock.d.ts.map +1 -1
- package/dist/components/forms/SchemaFormRenderer.d.ts +28 -0
- package/dist/components/forms/SchemaFormRenderer.d.ts.map +1 -0
- package/dist/components/forms/index.d.ts +2 -0
- package/dist/components/forms/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/input/ChoiceInputField.d.ts.map +1 -1
- package/dist/components/input/HtmlInputField.d.ts.map +1 -1
- package/dist/components/layout/CollapsibleLayout/CollapsibleLayout.d.ts.map +1 -1
- package/dist/components/layout/GridLayout.d.ts +5 -0
- package/dist/components/layout/GridLayout.d.ts.map +1 -1
- package/dist/components/plugins/DataTable.d.ts +57 -0
- package/dist/components/plugins/DataTable.d.ts.map +1 -0
- package/dist/components/plugins/StatCard.d.ts +44 -0
- package/dist/components/plugins/StatCard.d.ts.map +1 -0
- package/dist/components/plugins/index.d.ts +13 -0
- package/dist/components/plugins/index.d.ts.map +1 -0
- package/dist/components/shared/createSerializableView.d.ts.map +1 -1
- package/dist/hooks/useBaseProps.d.ts +1161 -12
- package/dist/hooks/useBaseProps.d.ts.map +1 -1
- package/dist/index.esm.js +5468 -5216
- package/dist/index.js +5572 -5317
- package/dist/palettes/manifest.json +19 -19
- package/dist/schemas/transformers/ReactNodeTransformer.d.ts.map +1 -1
- package/dist/utils/iconMap.d.ts.map +1 -1
- package/package.json +6 -5
- package/src/components/AccessibilityChecker.tsx +10 -7
- package/src/components/ErrorBoundary.tsx +3 -3
- package/src/components/Html.tsx +17 -12
- package/src/components/Logo.tsx +1 -8
- package/src/components/Markdown.tsx +12 -12
- package/src/components/ResponsiveMenu.tsx +1 -1
- package/src/components/SafeSpan.tsx +10 -10
- package/src/components/Scaffold.tsx +4 -4
- package/src/components/base/ModelView.tsx +2 -2
- package/src/components/blocks/Article.tsx +8 -8
- package/src/components/blocks/CardListGrid.tsx +1 -3
- package/src/components/blocks/Code.tsx +10 -8
- package/src/components/blocks/Content.tsx +2 -4
- package/src/components/blocks/CoverImageHeader.tsx +3 -4
- package/src/components/blocks/FeatureCard.tsx +2 -4
- package/src/components/blocks/FeatureGrid.tsx +2 -4
- package/src/components/blocks/Footer.tsx +2 -4
- package/src/components/blocks/Image.tsx +10 -7
- package/src/components/blocks/PageBannerHeader.tsx +3 -4
- package/src/components/blocks/ProductCard.tsx +8 -5
- package/src/components/blocks/Section.tsx +8 -6
- package/src/components/blocks/Text.tsx +22 -14
- package/src/components/buttons/Button.tsx +11 -9
- package/src/components/buttons/PaletteSwitcher.tsx +6 -8
- package/src/components/buttons/ThemeSwitcher.tsx +8 -9
- package/src/components/forms/Captcha.tsx +1 -1
- package/src/components/forms/FormBlock.tsx +3 -5
- package/src/components/forms/FormCheckbox.tsx +1 -1
- package/src/components/forms/FormField.tsx +1 -1
- package/src/components/forms/FormSelect.tsx +1 -1
- package/src/components/forms/SchemaFormRenderer.tsx +268 -0
- package/src/components/forms/__tests__/SchemaFormRenderer.test.tsx +212 -0
- package/src/components/forms/index.ts +3 -0
- package/src/components/index.ts +1 -0
- package/src/components/input/ChoiceInputField.tsx +2 -1
- package/src/components/input/HtmlInputField.tsx +14 -9
- package/src/components/input/TextField.tsx +1 -1
- package/src/components/layout/CollapsibleLayout/CollapsibleLayout.tsx +6 -8
- package/src/components/layout/GridLayout.tsx +4 -0
- package/src/components/plugins/DataTable.tsx +259 -0
- package/src/components/plugins/StatCard.tsx +122 -0
- package/src/components/plugins/__tests__/DataTable.test.tsx +158 -0
- package/src/components/plugins/index.ts +14 -0
- package/src/components/shared/createSerializableView.tsx +8 -6
- package/src/hooks/useBaseProps.ts +1 -1
- package/src/schemas/transformers/ReactNodeTransformer.ts +13 -10
- package/src/utils/iconMap.tsx +143 -83
- package/dist/palettes/palette-autumn.1.4.9.css +0 -172
- package/dist/palettes/palette-autumn.1.4.9.min.css +0 -1
- package/dist/palettes/palette-autumn.1.5.0.css +0 -172
- package/dist/palettes/palette-autumn.1.5.0.min.css +0 -1
- package/dist/palettes/palette-autumn.1.5.1.css +0 -172
- package/dist/palettes/palette-autumn.1.5.1.min.css +0 -1
- package/dist/palettes/palette-autumn.1.5.2.css +0 -172
- package/dist/palettes/palette-autumn.1.5.2.min.css +0 -1
- package/dist/palettes/palette-autumn.1.5.4.css +0 -172
- package/dist/palettes/palette-autumn.1.5.4.min.css +0 -1
- package/dist/palettes/palette-autumn.1.5.5.css +0 -172
- package/dist/palettes/palette-autumn.1.5.5.min.css +0 -1
- package/dist/palettes/palette-autumn.1.5.6.css +0 -172
- package/dist/palettes/palette-autumn.1.5.6.min.css +0 -1
- package/dist/palettes/palette-autumn.1.5.7.css +0 -172
- package/dist/palettes/palette-autumn.1.5.7.min.css +0 -1
- package/dist/palettes/palette-cosmic.1.4.9.css +0 -172
- package/dist/palettes/palette-cosmic.1.4.9.min.css +0 -1
- package/dist/palettes/palette-cosmic.1.5.0.css +0 -172
- package/dist/palettes/palette-cosmic.1.5.0.min.css +0 -1
- package/dist/palettes/palette-cosmic.1.5.1.css +0 -172
- package/dist/palettes/palette-cosmic.1.5.1.min.css +0 -1
- package/dist/palettes/palette-cosmic.1.5.2.css +0 -172
- package/dist/palettes/palette-cosmic.1.5.2.min.css +0 -1
- package/dist/palettes/palette-cosmic.1.5.4.css +0 -172
- package/dist/palettes/palette-cosmic.1.5.4.min.css +0 -1
- package/dist/palettes/palette-cosmic.1.5.5.css +0 -172
- package/dist/palettes/palette-cosmic.1.5.5.min.css +0 -1
- package/dist/palettes/palette-cosmic.1.5.6.css +0 -172
- package/dist/palettes/palette-cosmic.1.5.6.min.css +0 -1
- package/dist/palettes/palette-cosmic.1.5.7.css +0 -172
- package/dist/palettes/palette-cosmic.1.5.7.min.css +0 -1
- package/dist/palettes/palette-default.1.4.9.css +0 -178
- package/dist/palettes/palette-default.1.4.9.min.css +0 -1
- package/dist/palettes/palette-default.1.5.0.css +0 -178
- package/dist/palettes/palette-default.1.5.0.min.css +0 -1
- package/dist/palettes/palette-default.1.5.1.css +0 -178
- package/dist/palettes/palette-default.1.5.1.min.css +0 -1
- package/dist/palettes/palette-default.1.5.2.css +0 -178
- package/dist/palettes/palette-default.1.5.2.min.css +0 -1
- package/dist/palettes/palette-default.1.5.4.css +0 -178
- package/dist/palettes/palette-default.1.5.4.min.css +0 -1
- package/dist/palettes/palette-default.1.5.5.css +0 -178
- package/dist/palettes/palette-default.1.5.5.min.css +0 -1
- package/dist/palettes/palette-default.1.5.6.css +0 -178
- package/dist/palettes/palette-default.1.5.6.min.css +0 -1
- package/dist/palettes/palette-default.1.5.7.css +0 -178
- package/dist/palettes/palette-default.1.5.7.min.css +0 -1
- package/dist/palettes/palette-ocean.1.4.9.css +0 -172
- package/dist/palettes/palette-ocean.1.4.9.min.css +0 -1
- package/dist/palettes/palette-ocean.1.5.0.css +0 -172
- package/dist/palettes/palette-ocean.1.5.0.min.css +0 -1
- package/dist/palettes/palette-ocean.1.5.1.css +0 -172
- package/dist/palettes/palette-ocean.1.5.1.min.css +0 -1
- package/dist/palettes/palette-ocean.1.5.2.css +0 -172
- package/dist/palettes/palette-ocean.1.5.2.min.css +0 -1
- package/dist/palettes/palette-ocean.1.5.4.css +0 -172
- package/dist/palettes/palette-ocean.1.5.4.min.css +0 -1
- package/dist/palettes/palette-ocean.1.5.5.css +0 -172
- package/dist/palettes/palette-ocean.1.5.5.min.css +0 -1
- package/dist/palettes/palette-ocean.1.5.6.css +0 -172
- package/dist/palettes/palette-ocean.1.5.6.min.css +0 -1
- package/dist/palettes/palette-ocean.1.5.7.css +0 -172
- package/dist/palettes/palette-ocean.1.5.7.min.css +0 -1
- package/dist/palettes/palette-spring.1.4.9.css +0 -160
- package/dist/palettes/palette-spring.1.4.9.min.css +0 -1
- package/dist/palettes/palette-spring.1.5.0.css +0 -160
- package/dist/palettes/palette-spring.1.5.0.min.css +0 -1
- package/dist/palettes/palette-spring.1.5.1.css +0 -160
- package/dist/palettes/palette-spring.1.5.1.min.css +0 -1
- package/dist/palettes/palette-spring.1.5.2.css +0 -160
- package/dist/palettes/palette-spring.1.5.2.min.css +0 -1
- package/dist/palettes/palette-spring.1.5.4.css +0 -166
- package/dist/palettes/palette-spring.1.5.4.min.css +0 -1
- package/dist/palettes/palette-spring.1.5.5.css +0 -166
- package/dist/palettes/palette-spring.1.5.5.min.css +0 -1
- package/dist/palettes/palette-spring.1.5.6.css +0 -166
- package/dist/palettes/palette-spring.1.5.6.min.css +0 -1
- package/dist/palettes/palette-spring.1.5.7.css +0 -166
- package/dist/palettes/palette-spring.1.5.7.min.css +0 -1
- package/dist/palettes/palette-winter.1.4.9.css +0 -172
- package/dist/palettes/palette-winter.1.4.9.min.css +0 -1
- package/dist/palettes/palette-winter.1.5.0.css +0 -172
- package/dist/palettes/palette-winter.1.5.0.min.css +0 -1
- package/dist/palettes/palette-winter.1.5.1.css +0 -172
- package/dist/palettes/palette-winter.1.5.1.min.css +0 -1
- package/dist/palettes/palette-winter.1.5.2.css +0 -172
- package/dist/palettes/palette-winter.1.5.2.min.css +0 -1
- package/dist/palettes/palette-winter.1.5.4.css +0 -172
- package/dist/palettes/palette-winter.1.5.4.min.css +0 -1
- package/dist/palettes/palette-winter.1.5.5.css +0 -172
- package/dist/palettes/palette-winter.1.5.5.min.css +0 -1
- package/dist/palettes/palette-winter.1.5.6.css +0 -172
- package/dist/palettes/palette-winter.1.5.6.min.css +0 -1
- package/dist/palettes/palette-winter.1.5.7.css +0 -172
- package/dist/palettes/palette-winter.1.5.7.min.css +0 -1
- /package/dist/palettes/{palette-autumn.1.5.3.css → palette-autumn.1.5.9.css} +0 -0
- /package/dist/palettes/{palette-autumn.1.5.3.min.css → palette-autumn.1.5.9.min.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.5.3.css → palette-cosmic.1.5.9.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.5.3.min.css → palette-cosmic.1.5.9.min.css} +0 -0
- /package/dist/palettes/{palette-default.1.5.3.css → palette-default.1.5.9.css} +0 -0
- /package/dist/palettes/{palette-default.1.5.3.min.css → palette-default.1.5.9.min.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.5.3.css → palette-ocean.1.5.9.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.5.3.min.css → palette-ocean.1.5.9.min.css} +0 -0
- /package/dist/palettes/{palette-spring.1.5.3.css → palette-spring.1.5.9.css} +0 -0
- /package/dist/palettes/{palette-spring.1.5.3.min.css → palette-spring.1.5.9.min.css} +0 -0
- /package/dist/palettes/{palette-winter.1.5.3.css → palette-winter.1.5.9.css} +0 -0
- /package/dist/palettes/{palette-winter.1.5.3.min.css → palette-winter.1.5.9.min.css} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./manifest.schema.json",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.9",
|
|
4
4
|
"palettes": [
|
|
5
5
|
{
|
|
6
6
|
"id": "default",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"description": "Classic blue and neutral color scheme - the original QwickApps palette",
|
|
9
9
|
"author": "QwickApps",
|
|
10
10
|
"license": "PolyForm-Shield-1.0.0",
|
|
11
|
-
"version": "1.5.
|
|
12
|
-
"file": "palette-default.1.5.
|
|
11
|
+
"version": "1.5.9",
|
|
12
|
+
"file": "palette-default.1.5.9.css",
|
|
13
13
|
"primaryColor": "#007bff",
|
|
14
14
|
"inlined": true,
|
|
15
|
-
"fileMinified": "palette-default.1.5.
|
|
15
|
+
"fileMinified": "palette-default.1.5.9.min.css",
|
|
16
16
|
"fileLatest": "palette-default.latest.css",
|
|
17
17
|
"fileLatestMinified": "palette-default.latest.min.css"
|
|
18
18
|
},
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"description": "Warm oranges, golden yellows, and earthy browns - inspired by fall foliage",
|
|
23
23
|
"author": "QwickApps",
|
|
24
24
|
"license": "PolyForm-Shield-1.0.0",
|
|
25
|
-
"version": "1.5.
|
|
26
|
-
"file": "palette-autumn.1.5.
|
|
25
|
+
"version": "1.5.9",
|
|
26
|
+
"file": "palette-autumn.1.5.9.css",
|
|
27
27
|
"primaryColor": "#ea580c",
|
|
28
28
|
"inlined": false,
|
|
29
|
-
"fileMinified": "palette-autumn.1.5.
|
|
29
|
+
"fileMinified": "palette-autumn.1.5.9.min.css",
|
|
30
30
|
"fileLatest": "palette-autumn.latest.css",
|
|
31
31
|
"fileLatestMinified": "palette-autumn.latest.min.css"
|
|
32
32
|
},
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"description": "Modern purple gradient for creative and tech brands - inspired by cosmic nebulae",
|
|
37
37
|
"author": "QwickApps",
|
|
38
38
|
"license": "PolyForm-Shield-1.0.0",
|
|
39
|
-
"version": "1.5.
|
|
40
|
-
"file": "palette-cosmic.1.5.
|
|
39
|
+
"version": "1.5.9",
|
|
40
|
+
"file": "palette-cosmic.1.5.9.css",
|
|
41
41
|
"primaryColor": "#8b5cf6",
|
|
42
42
|
"inlined": false,
|
|
43
|
-
"fileMinified": "palette-cosmic.1.5.
|
|
43
|
+
"fileMinified": "palette-cosmic.1.5.9.min.css",
|
|
44
44
|
"fileLatest": "palette-cosmic.latest.css",
|
|
45
45
|
"fileLatestMinified": "palette-cosmic.latest.min.css"
|
|
46
46
|
},
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"description": "Deep blues, aqua teals, and seafoam greens - inspired by ocean depths",
|
|
51
51
|
"author": "QwickApps",
|
|
52
52
|
"license": "PolyForm-Shield-1.0.0",
|
|
53
|
-
"version": "1.5.
|
|
54
|
-
"file": "palette-ocean.1.5.
|
|
53
|
+
"version": "1.5.9",
|
|
54
|
+
"file": "palette-ocean.1.5.9.css",
|
|
55
55
|
"primaryColor": "#0891b2",
|
|
56
56
|
"inlined": false,
|
|
57
|
-
"fileMinified": "palette-ocean.1.5.
|
|
57
|
+
"fileMinified": "palette-ocean.1.5.9.min.css",
|
|
58
58
|
"fileLatest": "palette-ocean.latest.css",
|
|
59
59
|
"fileLatestMinified": "palette-ocean.latest.min.css"
|
|
60
60
|
},
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"description": "Fresh greens, soft pinks, and bright yellows - inspired by spring blooms",
|
|
65
65
|
"author": "QwickApps",
|
|
66
66
|
"license": "PolyForm-Shield-1.0.0",
|
|
67
|
-
"version": "1.5.
|
|
68
|
-
"file": "palette-spring.1.5.
|
|
67
|
+
"version": "1.5.9",
|
|
68
|
+
"file": "palette-spring.1.5.9.css",
|
|
69
69
|
"primaryColor": "#16a34a",
|
|
70
70
|
"inlined": false,
|
|
71
|
-
"fileMinified": "palette-spring.1.5.
|
|
71
|
+
"fileMinified": "palette-spring.1.5.9.min.css",
|
|
72
72
|
"fileLatest": "palette-spring.latest.css",
|
|
73
73
|
"fileLatestMinified": "palette-spring.latest.min.css"
|
|
74
74
|
},
|
|
@@ -78,11 +78,11 @@
|
|
|
78
78
|
"description": "Cool blues, icy whites, and frosty grays - inspired by winter landscapes",
|
|
79
79
|
"author": "QwickApps",
|
|
80
80
|
"license": "PolyForm-Shield-1.0.0",
|
|
81
|
-
"version": "1.5.
|
|
82
|
-
"file": "palette-winter.1.5.
|
|
81
|
+
"version": "1.5.9",
|
|
82
|
+
"file": "palette-winter.1.5.9.css",
|
|
83
83
|
"primaryColor": "#0077be",
|
|
84
84
|
"inlined": false,
|
|
85
|
-
"fileMinified": "palette-winter.1.5.
|
|
85
|
+
"fileMinified": "palette-winter.1.5.9.min.css",
|
|
86
86
|
"fileLatest": "palette-winter.latest.css",
|
|
87
87
|
"fileLatestMinified": "palette-winter.latest.min.css"
|
|
88
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNodeTransformer.d.ts","sourceRoot":"","sources":["../../../src/schemas/transformers/ReactNodeTransformer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAgB,SAAS,EAAiC,MAAM,OAAO,CAAC;AAG/E;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IAoE1C;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS;IA4C5C;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAqB7B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;
|
|
1
|
+
{"version":3,"file":"ReactNodeTransformer.d.ts","sourceRoot":"","sources":["../../../src/schemas/transformers/ReactNodeTransformer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAgB,SAAS,EAAiC,MAAM,OAAO,CAAC;AAG/E;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IAoE1C;;;;OAIG;IACH,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS;IA4C5C;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAqB7B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAoBtC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAkB/B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAuBlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconMap.d.ts","sourceRoot":"","sources":["../../src/utils/iconMap.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"iconMap.d.ts","sourceRoot":"","sources":["../../src/utils/iconMap.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAyG1B;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC;CAChC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAmK/C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,GAAE,MAAa,GAAG,MAAM,CAK1F;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAiBxF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAErE;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qwickapps/react-framework",
|
|
3
|
-
"version": "1.5.
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "1.5.9",
|
|
5
4
|
"description": "Complete React framework with responsive navigation, flexible layouts, theming system, and reusable components for building modern applications.",
|
|
6
5
|
"main": "dist/index.js",
|
|
7
6
|
"module": "dist/index.esm.js",
|
|
@@ -12,13 +11,15 @@
|
|
|
12
11
|
"exports": {
|
|
13
12
|
".": {
|
|
14
13
|
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.esm.js",
|
|
15
15
|
"require": "./dist/index.js",
|
|
16
|
-
"
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
17
|
},
|
|
18
18
|
"./config": {
|
|
19
19
|
"types": "./dist/config.d.ts",
|
|
20
|
+
"import": "./dist/config.esm.js",
|
|
20
21
|
"require": "./dist/config.js",
|
|
21
|
-
"
|
|
22
|
+
"default": "./dist/config.js"
|
|
22
23
|
},
|
|
23
24
|
"./dist/index.css": "./dist/index.css",
|
|
24
25
|
"./index.css": "./dist/index.css"
|
|
@@ -130,7 +131,7 @@
|
|
|
130
131
|
"ts-jest": "^29.4.1",
|
|
131
132
|
"ts-loader": "^9.5.2",
|
|
132
133
|
"typescript": "^5.9.2",
|
|
133
|
-
"vite": "^
|
|
134
|
+
"vite": "^6.0.0"
|
|
134
135
|
},
|
|
135
136
|
"publishConfig": {
|
|
136
137
|
"access": "public"
|
|
@@ -23,13 +23,16 @@ import {
|
|
|
23
23
|
IconButton,
|
|
24
24
|
Divider,
|
|
25
25
|
} from '@mui/material';
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
import Accessibility from '@mui/icons-material/Accessibility';
|
|
27
|
+
import CheckCircle from '@mui/icons-material/CheckCircle';
|
|
28
|
+
import Warning from '@mui/icons-material/Warning';
|
|
29
|
+
import Error from '@mui/icons-material/Error';
|
|
30
|
+
import Close from '@mui/icons-material/Close';
|
|
31
|
+
const AccessibilityIcon = Accessibility;
|
|
32
|
+
const CheckIcon = CheckCircle;
|
|
33
|
+
const WarningIcon = Warning;
|
|
34
|
+
const ErrorIcon = Error;
|
|
35
|
+
const CloseIcon = Close;
|
|
33
36
|
import { getContrastRatio } from '@mui/material';
|
|
34
37
|
import { getCurrentPalette } from '../utils/paletteUtils';
|
|
35
38
|
import { getCurrentTheme } from '../utils/themeUtils';
|
|
@@ -68,9 +68,9 @@ export class ErrorBoundary extends Component<Props, State> {
|
|
|
68
68
|
|
|
69
69
|
// Send error to logging service if available
|
|
70
70
|
if (typeof window !== 'undefined') {
|
|
71
|
-
|
|
72
|
-
if (
|
|
73
|
-
|
|
71
|
+
const globalWindow = window as unknown as { qwickapps?: { logError?: (error: Error, errorInfo: React.ErrorInfo) => void } };
|
|
72
|
+
if (globalWindow.qwickapps?.logError) {
|
|
73
|
+
globalWindow.qwickapps.logError(error, errorInfo);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
package/src/components/Html.tsx
CHANGED
|
@@ -58,12 +58,15 @@ function HtmlView({
|
|
|
58
58
|
stripHeaders = false,
|
|
59
59
|
placeholder,
|
|
60
60
|
component = 'div',
|
|
61
|
+
transformConfig,
|
|
62
|
+
sanitize,
|
|
63
|
+
sanitizeOptions,
|
|
61
64
|
...restProps
|
|
62
65
|
}: HtmlViewProps) {
|
|
63
66
|
const { styleProps, htmlProps, restProps: otherProps } = useBaseProps(restProps);
|
|
64
67
|
|
|
65
68
|
// Mark as QwickApp component
|
|
66
|
-
(HtmlView
|
|
69
|
+
Object.assign(HtmlView, { [QWICKAPP_COMPONENT]: true });
|
|
67
70
|
|
|
68
71
|
// Return placeholder if no HTML content
|
|
69
72
|
if (!children || !children.trim()) {
|
|
@@ -177,7 +180,7 @@ function HtmlView({
|
|
|
177
180
|
}
|
|
178
181
|
|
|
179
182
|
// Main component with data binding support and serialization capability
|
|
180
|
-
export class Html extends ModelView<HtmlProps
|
|
183
|
+
export class Html extends ModelView<HtmlProps> {
|
|
181
184
|
// Component self-declaration for serialization
|
|
182
185
|
static readonly tagName = 'Html';
|
|
183
186
|
static readonly version = '1.0.0';
|
|
@@ -191,9 +194,11 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
191
194
|
if (version !== Html.version) {
|
|
192
195
|
console.warn(`Version mismatch: Expected ${Html.version} but got ${version}`);
|
|
193
196
|
}
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
+
|
|
198
|
+
const typedData = (data as Record<string, unknown>) || {};
|
|
199
|
+
const { children, ...props } = typedData;
|
|
200
|
+
// Children should be a string (HTML content), not deserialized React nodes
|
|
201
|
+
return <Html {...props}>{children as string}</Html>;
|
|
197
202
|
}
|
|
198
203
|
|
|
199
204
|
// Component-specific serialization properties
|
|
@@ -218,14 +223,16 @@ export class Html extends ModelView<HtmlProps, HtmlModel> {
|
|
|
218
223
|
|
|
219
224
|
// Register HTML patterns that Html component can handle
|
|
220
225
|
static registerPatternHandlers(registry: Record<string, unknown>): void {
|
|
226
|
+
const typedRegistry = registry as { hasPattern?: (pattern: string) => boolean; registerPattern?: (pattern: string, handler: (element: Element) => Record<string, unknown>) => void };
|
|
227
|
+
|
|
221
228
|
// Register div elements with specific classes for Html transformation
|
|
222
|
-
if (!
|
|
223
|
-
|
|
229
|
+
if (typedRegistry.hasPattern && !typedRegistry.hasPattern('div.html-content')) {
|
|
230
|
+
typedRegistry.registerPattern?.('div.html-content', Html.transformHtmlDiv);
|
|
224
231
|
}
|
|
225
232
|
|
|
226
233
|
// Register elements with data-html attribute
|
|
227
|
-
if (!
|
|
228
|
-
|
|
234
|
+
if (typedRegistry.hasPattern && !typedRegistry.hasPattern('[data-html]')) {
|
|
235
|
+
typedRegistry.registerPattern?.('[data-html]', Html.transformDataHtml);
|
|
229
236
|
}
|
|
230
237
|
}
|
|
231
238
|
|
|
@@ -268,9 +275,7 @@ function HtmlWithDataBinding(props: HtmlProps) {
|
|
|
268
275
|
// Use data binding
|
|
269
276
|
const { loading, error, ...htmlProps } = useDataBinding<HtmlModel>(
|
|
270
277
|
dataSource!,
|
|
271
|
-
restProps as Partial<HtmlModel
|
|
272
|
-
HtmlModel.getSchema(),
|
|
273
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
278
|
+
restProps as Partial<HtmlModel>
|
|
274
279
|
);
|
|
275
280
|
|
|
276
281
|
// Show loading state
|
package/src/components/Logo.tsx
CHANGED
|
@@ -430,14 +430,7 @@ function Logo(props: LogoProps) {
|
|
|
430
430
|
// Always call hooks unconditionally
|
|
431
431
|
const bindingResult = useDataBinding<LogoModel>(
|
|
432
432
|
dataSource || '',
|
|
433
|
-
|
|
434
|
-
initialData: restProps,
|
|
435
|
-
schema: LogoModel.getSchema(),
|
|
436
|
-
cache: true,
|
|
437
|
-
cacheTTL: 300000,
|
|
438
|
-
strict: false,
|
|
439
|
-
...bindingOptions
|
|
440
|
-
}
|
|
433
|
+
restProps as Partial<LogoModel>
|
|
441
434
|
);
|
|
442
435
|
|
|
443
436
|
// If no dataSource, use traditional props
|
|
@@ -35,7 +35,7 @@ type MarkdownViewProps = SchemaProps<MarkdownModel> & {
|
|
|
35
35
|
/** Custom transformation configuration for HTML conversion */
|
|
36
36
|
htmlTransformConfig?: TransformConfig;
|
|
37
37
|
/** Custom sanitization options */
|
|
38
|
-
sanitizeOptions?: unknown
|
|
38
|
+
sanitizeOptions?: Record<string, unknown>;
|
|
39
39
|
/** Container element type */
|
|
40
40
|
component?: React.ElementType;
|
|
41
41
|
/** Marked options for Markdown parsing */
|
|
@@ -78,7 +78,7 @@ function MarkdownView({
|
|
|
78
78
|
const { styleProps, htmlProps, restProps: otherProps } = useBaseProps(restProps);
|
|
79
79
|
|
|
80
80
|
// Mark as QwickApp component
|
|
81
|
-
(MarkdownView
|
|
81
|
+
Object.assign(MarkdownView, { [QWICKAPP_COMPONENT]: true });
|
|
82
82
|
|
|
83
83
|
// Return placeholder if no Markdown content
|
|
84
84
|
if (!children || !children.trim()) {
|
|
@@ -186,7 +186,7 @@ function MarkdownView({
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
// Main component with data binding support and serialization capability
|
|
189
|
-
export class Markdown extends ModelView<MarkdownProps
|
|
189
|
+
export class Markdown extends ModelView<MarkdownProps> {
|
|
190
190
|
// Component self-declaration for serialization
|
|
191
191
|
static readonly tagName = 'Markdown';
|
|
192
192
|
static readonly version = '1.0.0';
|
|
@@ -213,19 +213,21 @@ export class Markdown extends ModelView<MarkdownProps, MarkdownModel> {
|
|
|
213
213
|
|
|
214
214
|
// Register HTML patterns that Markdown component can handle
|
|
215
215
|
static registerPatternHandlers(registry: unknown): void {
|
|
216
|
+
const typedRegistry = registry as { hasPattern?: (pattern: string) => boolean; registerPattern?: (pattern: string, handler: (element: Element) => Record<string, unknown>) => void };
|
|
217
|
+
|
|
216
218
|
// Register div elements with specific classes for Markdown transformation
|
|
217
|
-
if (!
|
|
218
|
-
|
|
219
|
+
if (typedRegistry.hasPattern && !typedRegistry.hasPattern('div.markdown-content')) {
|
|
220
|
+
typedRegistry.registerPattern?.('div.markdown-content', Markdown.transformMarkdownDiv);
|
|
219
221
|
}
|
|
220
222
|
|
|
221
223
|
// Register elements with data-markdown attribute
|
|
222
|
-
if (!
|
|
223
|
-
|
|
224
|
+
if (typedRegistry.hasPattern && !typedRegistry.hasPattern('[data-markdown]')) {
|
|
225
|
+
typedRegistry.registerPattern?.('[data-markdown]', Markdown.transformDataMarkdown);
|
|
224
226
|
}
|
|
225
227
|
}
|
|
226
228
|
|
|
227
229
|
// Transform div with markdown-content class to Markdown component
|
|
228
|
-
private static transformMarkdownDiv(element: Element): unknown {
|
|
230
|
+
private static transformMarkdownDiv(element: Element): Record<string, unknown> {
|
|
229
231
|
const sanitize = element.getAttribute('data-sanitize') !== 'false';
|
|
230
232
|
const placeholder = element.getAttribute('data-placeholder');
|
|
231
233
|
|
|
@@ -240,7 +242,7 @@ export class Markdown extends ModelView<MarkdownProps, MarkdownModel> {
|
|
|
240
242
|
}
|
|
241
243
|
|
|
242
244
|
// Transform elements with data-markdown attribute to Markdown component
|
|
243
|
-
private static transformDataMarkdown(element: Element): unknown {
|
|
245
|
+
private static transformDataMarkdown(element: Element): Record<string, unknown> {
|
|
244
246
|
const markdownContent = element.getAttribute('data-markdown') || element.textContent;
|
|
245
247
|
const sanitize = element.getAttribute('data-sanitize') !== 'false';
|
|
246
248
|
const placeholder = element.getAttribute('data-placeholder');
|
|
@@ -263,9 +265,7 @@ function MarkdownWithDataBinding(props: MarkdownProps) {
|
|
|
263
265
|
// Use data binding
|
|
264
266
|
const { loading, error, ...markdownProps } = useDataBinding<MarkdownModel>(
|
|
265
267
|
dataSource!,
|
|
266
|
-
restProps as Partial<MarkdownModel
|
|
267
|
-
MarkdownModel.getSchema(),
|
|
268
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
268
|
+
restProps as Partial<MarkdownModel>
|
|
269
269
|
);
|
|
270
270
|
|
|
271
271
|
// Show loading state
|
|
@@ -57,7 +57,7 @@ const ResponsiveMenu: React.FC<ResponsiveMenuProps> = (props) => {
|
|
|
57
57
|
} = restProps;
|
|
58
58
|
|
|
59
59
|
// Mark as QwickApp component
|
|
60
|
-
(ResponsiveMenu
|
|
60
|
+
Object.assign(ResponsiveMenu, { [QWICKAPP_COMPONENT]: true });
|
|
61
61
|
const [screenSize, setScreenSize] = useState<ScreenSize>('desktop');
|
|
62
62
|
const [isNavRailExpanded, setIsNavRailExpanded] = useState(false);
|
|
63
63
|
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
|
@@ -26,7 +26,7 @@ function SafeSpanView(props: SafeSpanViewProps) {
|
|
|
26
26
|
const { styleProps, htmlProps } = useBaseProps(restProps);
|
|
27
27
|
|
|
28
28
|
// Mark as QwickApp component
|
|
29
|
-
(SafeSpanView
|
|
29
|
+
Object.assign(SafeSpanView, { [QWICKAPP_COMPONENT]: true });
|
|
30
30
|
|
|
31
31
|
// Enhanced HTML sanitization with strict security configuration
|
|
32
32
|
const sanitizeOptions = {
|
|
@@ -95,7 +95,7 @@ function SafeSpanView(props: SafeSpanViewProps) {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// Main component with data binding support and serialization capability
|
|
98
|
-
export class SafeSpan extends ModelView<SafeSpanProps
|
|
98
|
+
export class SafeSpan extends ModelView<SafeSpanProps> {
|
|
99
99
|
// Component self-declaration for serialization
|
|
100
100
|
static readonly tagName = 'SafeSpan';
|
|
101
101
|
static readonly version = '1.0.0';
|
|
@@ -121,19 +121,21 @@ export class SafeSpan extends ModelView<SafeSpanProps, SafeSpanModel> {
|
|
|
121
121
|
|
|
122
122
|
// Register HTML patterns that SafeSpan component can handle
|
|
123
123
|
static registerPatternHandlers(registry: unknown): void {
|
|
124
|
+
const typedRegistry = registry as { hasPattern?: (pattern: string) => boolean; registerPattern?: (pattern: string, handler: (element: Element) => Record<string, unknown>) => void };
|
|
125
|
+
|
|
124
126
|
// Register span elements with specific classes or attributes
|
|
125
|
-
if (!
|
|
126
|
-
|
|
127
|
+
if (typedRegistry.hasPattern && !typedRegistry.hasPattern('span.safe-content')) {
|
|
128
|
+
typedRegistry.registerPattern?.('span.safe-content', SafeSpan.transformSafeSpan);
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
// Register span elements with data-safe attribute
|
|
130
|
-
if (!
|
|
131
|
-
|
|
132
|
+
if (typedRegistry.hasPattern && !typedRegistry.hasPattern('span[data-safe]')) {
|
|
133
|
+
typedRegistry.registerPattern?.('span[data-safe]', SafeSpan.transformSafeSpan);
|
|
132
134
|
}
|
|
133
135
|
}
|
|
134
136
|
|
|
135
137
|
// Transform span elements to SafeSpan component
|
|
136
|
-
private static transformSafeSpan(element: Element): unknown {
|
|
138
|
+
private static transformSafeSpan(element: Element): Record<string, unknown> {
|
|
137
139
|
const placeholder = element.getAttribute('data-placeholder');
|
|
138
140
|
|
|
139
141
|
return {
|
|
@@ -153,9 +155,7 @@ function SafeSpanWithDataBinding(props: SafeSpanProps) {
|
|
|
153
155
|
// Use data binding
|
|
154
156
|
const { loading, error, ...safeSpanProps } = useDataBinding<SafeSpanModel>(
|
|
155
157
|
dataSource!,
|
|
156
|
-
restProps as Partial<SafeSpanModel
|
|
157
|
-
SafeSpanModel.getSchema(),
|
|
158
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
158
|
+
restProps as Partial<SafeSpanModel>
|
|
159
159
|
);
|
|
160
160
|
|
|
161
161
|
// Show loading state
|
|
@@ -21,7 +21,7 @@ import { useQwickApp } from '../contexts/QwickAppContext';
|
|
|
21
21
|
import Logo from './Logo';
|
|
22
22
|
import ThemeSwitcher from './buttons/ThemeSwitcher';
|
|
23
23
|
import PaletteSwitcher from './buttons/PaletteSwitcher';
|
|
24
|
-
|
|
24
|
+
// DefaultIcon removed - using iconMap radio_button_unchecked instead
|
|
25
25
|
import { getIconComponent } from './buttons/Button';
|
|
26
26
|
import './Scaffold.css';
|
|
27
27
|
import { useNavigation } from '../contexts/NavigationContext';
|
|
@@ -260,21 +260,21 @@ const Scaffold: React.FC<ScaffoldProps> = ({
|
|
|
260
260
|
}
|
|
261
261
|
};
|
|
262
262
|
|
|
263
|
-
// Transform icon string to component, or use provided ReactNode, or fallback to
|
|
263
|
+
// Transform icon string to component, or use provided ReactNode, or fallback to radio_button_unchecked
|
|
264
264
|
const needsIcon = variant !== 'drawer';
|
|
265
265
|
let displayIcon: React.ReactNode = null;
|
|
266
266
|
|
|
267
267
|
if (item.icon) {
|
|
268
268
|
// If icon is a string, transform it to component
|
|
269
269
|
if (typeof item.icon === 'string') {
|
|
270
|
-
displayIcon = getIconComponent(item.icon) || (needsIcon ?
|
|
270
|
+
displayIcon = getIconComponent(item.icon) || (needsIcon ? getIconComponent('radio_button_unchecked') : null);
|
|
271
271
|
} else {
|
|
272
272
|
// If icon is already a React component, use it
|
|
273
273
|
displayIcon = item.icon;
|
|
274
274
|
}
|
|
275
275
|
} else if (needsIcon) {
|
|
276
276
|
// No icon provided, use default for primary navigation
|
|
277
|
-
displayIcon =
|
|
277
|
+
displayIcon = getIconComponent('radio_button_unchecked');
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
const content = (
|
|
@@ -295,7 +295,7 @@ export abstract class ModelView<TProps = Record<string, unknown>>
|
|
|
295
295
|
* Helper function for creating ModelView component classes with ViewSchema support
|
|
296
296
|
* Updated to work with the new ViewSchema processing system
|
|
297
297
|
*/
|
|
298
|
-
export function createModelViewClass<TProps
|
|
298
|
+
export function createModelViewClass<TProps>(
|
|
299
299
|
config: {
|
|
300
300
|
tagName: string;
|
|
301
301
|
version: string;
|
|
@@ -306,7 +306,7 @@ export function createModelViewClass<TProps, TModel>(
|
|
|
306
306
|
}
|
|
307
307
|
): unknown {
|
|
308
308
|
|
|
309
|
-
class DynamicModelView extends ModelView<TProps
|
|
309
|
+
class DynamicModelView extends ModelView<TProps> {
|
|
310
310
|
static readonly tagName = config.tagName;
|
|
311
311
|
static readonly version = config.version;
|
|
312
312
|
|
|
@@ -39,7 +39,7 @@ function ArticleView({
|
|
|
39
39
|
const { styleProps, htmlProps, restProps: otherProps } = useBaseProps(restProps);
|
|
40
40
|
|
|
41
41
|
// Mark as QwickApp component
|
|
42
|
-
(ArticleView
|
|
42
|
+
Object.assign(ArticleView, { [QWICKAPP_COMPONENT]: true });
|
|
43
43
|
|
|
44
44
|
// Return empty state if no HTML content
|
|
45
45
|
if (!html.trim()) {
|
|
@@ -336,7 +336,7 @@ function ArticleView({
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
// Main component with data binding support and serialization capability
|
|
339
|
-
export class Article extends ModelView<ArticleProps
|
|
339
|
+
export class Article extends ModelView<ArticleProps> {
|
|
340
340
|
// Component self-declaration for serialization
|
|
341
341
|
static readonly tagName = 'Article';
|
|
342
342
|
static readonly version = '1.0.0';
|
|
@@ -362,14 +362,16 @@ export class Article extends ModelView<ArticleProps, ArticleModel> {
|
|
|
362
362
|
|
|
363
363
|
// Register HTML patterns that Article component can handle
|
|
364
364
|
static registerPatternHandlers(registry: unknown): void {
|
|
365
|
+
const typedRegistry = registry as { hasPattern?: (pattern: string) => boolean; registerPattern?: (pattern: string, handler: (element: Element) => Record<string, unknown>) => void };
|
|
366
|
+
|
|
365
367
|
// Register article elements
|
|
366
|
-
if (!
|
|
367
|
-
|
|
368
|
+
if (typedRegistry.hasPattern && !typedRegistry.hasPattern('article')) {
|
|
369
|
+
typedRegistry.registerPattern?.('article', Article.transformArticle);
|
|
368
370
|
}
|
|
369
371
|
}
|
|
370
372
|
|
|
371
373
|
// Transform article elements to Article component
|
|
372
|
-
private static transformArticle(element: Element): unknown {
|
|
374
|
+
private static transformArticle(element: Element): Record<string, unknown> {
|
|
373
375
|
const skipHeader = element.getAttribute('data-skip-header') === 'true';
|
|
374
376
|
|
|
375
377
|
return {
|
|
@@ -389,9 +391,7 @@ function ArticleWithDataBinding(props: ArticleProps) {
|
|
|
389
391
|
// Use data binding
|
|
390
392
|
const { loading, error, ...articleProps } = useDataBinding<ArticleModel>(
|
|
391
393
|
dataSource!,
|
|
392
|
-
restProps as Partial<ArticleModel
|
|
393
|
-
ArticleModel.getSchema(),
|
|
394
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
394
|
+
restProps as Partial<ArticleModel>
|
|
395
395
|
);
|
|
396
396
|
|
|
397
397
|
// Show loading state
|
|
@@ -87,9 +87,7 @@ function CardListGrid(props: CardListGridProps) {
|
|
|
87
87
|
// Always call hooks unconditionally
|
|
88
88
|
const result = useDataBinding<CardListGridModel>(
|
|
89
89
|
dataSource || '',
|
|
90
|
-
restProps as Partial<CardListGridModel
|
|
91
|
-
CardListGridModel.getSchema(),
|
|
92
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
90
|
+
restProps as Partial<CardListGridModel>
|
|
93
91
|
);
|
|
94
92
|
|
|
95
93
|
// If no dataSource, use traditional props
|
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
|
|
23
23
|
import React, { useState } from 'react';
|
|
24
24
|
import { Box, Typography, Tooltip, IconButton, Snackbar, Alert, useTheme, Paper } from '@mui/material';
|
|
25
|
-
import
|
|
25
|
+
import ContentCopy from '@mui/icons-material/ContentCopy';
|
|
26
|
+
import Check from '@mui/icons-material/Check';
|
|
27
|
+
const CopyIcon = ContentCopy;
|
|
28
|
+
const CheckIcon = Check;
|
|
26
29
|
import CodeSchema from '../../schemas/CodeSchema';
|
|
27
30
|
import type { SchemaProps } from '@qwickapps/schema/src/types/ModelProps';
|
|
28
31
|
import { ViewProps } from '../shared/viewProps';
|
|
@@ -260,17 +263,16 @@ export const Code: SerializableComponent<CodeProps> = createSerializableView<Cod
|
|
|
260
263
|
|
|
261
264
|
// Register HTML patterns that Code component can handle
|
|
262
265
|
(Code as Record<string, unknown>).registerPatternHandlers = (registry: Record<string, (...args: unknown[]) => unknown>): void => {
|
|
266
|
+
const typedRegistry = registry as { hasPattern?: (pattern: string) => boolean; registerPattern?: (pattern: string, handler: (...args: unknown[]) => unknown) => void };
|
|
267
|
+
|
|
263
268
|
// Register pre + code pattern
|
|
264
|
-
if (!
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
if (!registry.hasPattern('pre code')) {
|
|
268
|
-
registry.registerPattern('pre code', (Code as Record<string, unknown>).transformPreCode as (...args: unknown[]) => unknown);
|
|
269
|
+
if (typedRegistry.hasPattern && !typedRegistry.hasPattern('pre code')) {
|
|
270
|
+
typedRegistry.registerPattern?.('pre code', (Code as Record<string, unknown>).transformPreCode as (...args: unknown[]) => unknown);
|
|
269
271
|
}
|
|
270
272
|
|
|
271
273
|
// Register standalone code pattern for complex code blocks
|
|
272
|
-
if (!
|
|
273
|
-
|
|
274
|
+
if (typedRegistry.hasPattern && !typedRegistry.hasPattern('code.highlight')) {
|
|
275
|
+
typedRegistry.registerPattern?.('code.highlight', (Code as Record<string, unknown>).transformCodeHighlight as (...args: unknown[]) => unknown);
|
|
274
276
|
}
|
|
275
277
|
};
|
|
276
278
|
|
|
@@ -45,7 +45,7 @@ function ContentView({
|
|
|
45
45
|
const theme = useTheme();
|
|
46
46
|
|
|
47
47
|
// Mark as QwickApp component
|
|
48
|
-
(ContentView
|
|
48
|
+
Object.assign(ContentView, { [QWICKAPP_COMPONENT]: true });
|
|
49
49
|
|
|
50
50
|
// Map spacing to padding values
|
|
51
51
|
const getPadding = () => {
|
|
@@ -170,9 +170,7 @@ function Content(props: ContentProps) {
|
|
|
170
170
|
// Always call hooks unconditionally
|
|
171
171
|
const bindingResult = useDataBinding<ContentModel>(
|
|
172
172
|
dataSource || '',
|
|
173
|
-
restProps as Partial<ContentModel
|
|
174
|
-
ContentModel.getSchema(),
|
|
175
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
173
|
+
restProps as Partial<ContentModel>
|
|
176
174
|
);
|
|
177
175
|
|
|
178
176
|
// If no dataSource, use traditional props
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import MoreVert from "@mui/icons-material/MoreVert";
|
|
15
|
+
const MoreIcon = MoreVert;
|
|
15
16
|
import {
|
|
16
17
|
Avatar,
|
|
17
18
|
Box,
|
|
@@ -401,9 +402,7 @@ function CoverImageHeader(props: CoverImageHeaderProps) {
|
|
|
401
402
|
// Always call hooks unconditionally
|
|
402
403
|
const bindingResult = useDataBinding<CoverImageHeaderModel>(
|
|
403
404
|
dataSource || '',
|
|
404
|
-
restProps as Partial<CoverImageHeaderModel
|
|
405
|
-
CoverImageHeaderModel.getSchema(),
|
|
406
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
405
|
+
restProps as Partial<CoverImageHeaderModel>
|
|
407
406
|
);
|
|
408
407
|
|
|
409
408
|
// If no dataSource, use traditional props
|
|
@@ -260,14 +260,12 @@ function FeatureCard(props: FeatureCardProps) {
|
|
|
260
260
|
const { dataSource, bindingOptions, ...restProps } = props;
|
|
261
261
|
|
|
262
262
|
// Mark as QwickApp component
|
|
263
|
-
(FeatureCard
|
|
263
|
+
Object.assign(FeatureCard, { [QWICKAPP_COMPONENT]: true });
|
|
264
264
|
|
|
265
265
|
// Always call hooks unconditionally
|
|
266
266
|
const bindingResult = useDataBinding<FeatureCardModel>(
|
|
267
267
|
dataSource || '',
|
|
268
|
-
restProps as Partial<FeatureCardModel
|
|
269
|
-
FeatureCardModel.getSchema(),
|
|
270
|
-
{ cache: true, cacheTTL: 300000, strict: false, ...bindingOptions }
|
|
268
|
+
restProps as Partial<FeatureCardModel>
|
|
271
269
|
);
|
|
272
270
|
|
|
273
271
|
// If no dataSource, use traditional props
|