@qwickapps/react-framework 1.5.11 → 1.5.13
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/README.md +23 -0
- package/dist/components/blocks/ImageGallery.d.ts +30 -0
- package/dist/components/blocks/ImageGallery.d.ts.map +1 -0
- package/dist/components/blocks/OptionSelector.d.ts +45 -0
- package/dist/components/blocks/OptionSelector.d.ts.map +1 -0
- package/dist/components/blocks/index.d.ts +4 -0
- package/dist/components/blocks/index.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +1192 -265
- package/dist/index.js +1194 -263
- package/dist/palettes/manifest.json +19 -19
- package/dist/schemas/ImageGallerySchema.d.ts +27 -0
- package/dist/schemas/ImageGallerySchema.d.ts.map +1 -0
- package/dist/schemas/OptionSelectorSchema.d.ts +34 -0
- package/dist/schemas/OptionSelectorSchema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/QwickApp.css +8 -0
- package/src/components/blocks/Article.tsx +1 -1
- package/src/components/blocks/ImageGallery.tsx +464 -0
- package/src/components/blocks/OptionSelector.tsx +459 -0
- package/src/components/blocks/index.ts +4 -0
- package/src/schemas/ImageGallerySchema.ts +148 -0
- package/src/schemas/OptionSelectorSchema.ts +216 -0
- package/src/schemas/index.ts +2 -0
- package/src/stories/ImageGallery.stories.tsx +497 -0
- package/src/stories/OptionSelector.stories.tsx +506 -0
- /package/dist/palettes/{palette-autumn.1.5.11.css → palette-autumn.1.5.13.css} +0 -0
- /package/dist/palettes/{palette-autumn.1.5.11.min.css → palette-autumn.1.5.13.min.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.5.11.css → palette-cosmic.1.5.13.css} +0 -0
- /package/dist/palettes/{palette-cosmic.1.5.11.min.css → palette-cosmic.1.5.13.min.css} +0 -0
- /package/dist/palettes/{palette-default.1.5.11.css → palette-default.1.5.13.css} +0 -0
- /package/dist/palettes/{palette-default.1.5.11.min.css → palette-default.1.5.13.min.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.5.11.css → palette-ocean.1.5.13.css} +0 -0
- /package/dist/palettes/{palette-ocean.1.5.11.min.css → palette-ocean.1.5.13.min.css} +0 -0
- /package/dist/palettes/{palette-spring.1.5.11.css → palette-spring.1.5.13.css} +0 -0
- /package/dist/palettes/{palette-spring.1.5.11.min.css → palette-spring.1.5.13.min.css} +0 -0
- /package/dist/palettes/{palette-winter.1.5.11.css → palette-winter.1.5.13.css} +0 -0
- /package/dist/palettes/{palette-winter.1.5.11.min.css → palette-winter.1.5.13.min.css} +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { useMediaQuery, Box, useTheme as useTheme$1, Paper, Typography, Tooltip, IconButton, Snackbar, Alert, CircularProgress, Button as Button$1, Container as Container$9, Stack, Skeleton, Avatar, Chip, Menu as Menu$1, MenuItem, Card, CardContent, ButtonGroup, Collapse, TextField as TextField$1, FormControl, InputLabel, Select, FormHelperText, FormControlLabel, Switch, Grid, Divider, Link, ListItemIcon, ListItemText, Dialog as Dialog$1, DialogTitle as DialogTitle$1, DialogContent as DialogContent$1, DialogActions as DialogActions$1, DialogContentText as DialogContentText$1, Input as Input$5, InputAdornment, Checkbox } from '@mui/material';
|
|
3
|
+
import { useMediaQuery, Box, useTheme as useTheme$1, Paper, Typography, Tooltip, IconButton, Snackbar, Alert, CircularProgress, Button as Button$1, Container as Container$9, Stack, Skeleton, Avatar, Chip, Menu as Menu$1, MenuItem, Card, CardContent, ButtonGroup, Collapse, TextField as TextField$1, FormControl, InputLabel, Select, FormHelperText, FormControlLabel, Switch, Grid, Divider, Link, Modal, ListItemIcon, ListItemText, Dialog as Dialog$1, DialogTitle as DialogTitle$1, DialogContent as DialogContent$1, DialogActions as DialogActions$1, DialogContentText as DialogContentText$1, Input as Input$5, InputAdornment, Checkbox } from '@mui/material';
|
|
4
4
|
import React, { useMemo, useContext, useState, useCallback, useEffect, createContext, useReducer, useRef, isValidElement, createElement, useId, useLayoutEffect, Component, cloneElement } from 'react';
|
|
5
5
|
import { MustacheTemplateProvider, MemoryCacheProvider, CachedDataProvider, Field, Editor, FieldType, Schema, Model, DataType } from '@qwickapps/schema';
|
|
6
6
|
import { createTheme, ThemeProvider as ThemeProvider$1 } from '@mui/material/styles';
|
|
@@ -106,6 +106,9 @@ import Warning$3 from '@mui/icons-material/Warning';
|
|
|
106
106
|
import { IsOptional, ValidateIf, IsIn, IsInt, Min, IsString, IsBoolean, IsArray, ValidateNested, IsUrl, IsNumber, IsObject, IsNotEmpty, Max } from 'class-validator';
|
|
107
107
|
import { Type } from 'class-transformer';
|
|
108
108
|
import 'reflect-metadata';
|
|
109
|
+
import ZoomInIcon from '@mui/icons-material/ZoomIn';
|
|
110
|
+
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
111
|
+
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
109
112
|
import { useInRouterContext, useNavigate, useLocation } from 'react-router-dom';
|
|
110
113
|
|
|
111
114
|
/**
|
|
@@ -18947,281 +18950,283 @@ function ArticleView({
|
|
|
18947
18950
|
...htmlProps,
|
|
18948
18951
|
...otherProps,
|
|
18949
18952
|
...styleProps,
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
|
|
18957
|
-
|
|
18958
|
-
py: {
|
|
18959
|
-
xs: 3,
|
|
18960
|
-
md: 5
|
|
18961
|
-
},
|
|
18962
|
-
// Typography - Modern, readable hierarchy
|
|
18963
|
-
'& h1, & h2, & h3, & h4, & h5, & h6': {
|
|
18964
|
-
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
18965
|
-
fontWeight: 700,
|
|
18966
|
-
letterSpacing: '-0.02em',
|
|
18967
|
-
color: 'var(--theme-text)',
|
|
18968
|
-
scrollMarginTop: '100px',
|
|
18969
|
-
// For anchor links
|
|
18970
|
-
'&:first-of-type': {
|
|
18971
|
-
mt: 0
|
|
18972
|
-
}
|
|
18973
|
-
},
|
|
18974
|
-
'& h1': {
|
|
18975
|
-
fontSize: {
|
|
18976
|
-
xs: '2rem',
|
|
18977
|
-
md: '2.75rem'
|
|
18953
|
+
sx: {
|
|
18954
|
+
// Modern article layout
|
|
18955
|
+
maxWidth: '900px',
|
|
18956
|
+
mx: 'auto',
|
|
18957
|
+
px: {
|
|
18958
|
+
xs: 2,
|
|
18959
|
+
sm: 3,
|
|
18960
|
+
md: 4
|
|
18978
18961
|
},
|
|
18979
|
-
|
|
18980
|
-
|
|
18981
|
-
|
|
18982
|
-
},
|
|
18983
|
-
'& h2': {
|
|
18984
|
-
fontSize: {
|
|
18985
|
-
xs: '1.5rem',
|
|
18986
|
-
md: '2rem'
|
|
18962
|
+
py: {
|
|
18963
|
+
xs: 3,
|
|
18964
|
+
md: 5
|
|
18987
18965
|
},
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
18992
|
-
|
|
18993
|
-
|
|
18994
|
-
|
|
18995
|
-
|
|
18996
|
-
|
|
18997
|
-
|
|
18966
|
+
// Typography - Modern, readable hierarchy
|
|
18967
|
+
'& h1, & h2, & h3, & h4, & h5, & h6': {
|
|
18968
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
18969
|
+
fontWeight: 700,
|
|
18970
|
+
letterSpacing: '-0.02em',
|
|
18971
|
+
color: 'var(--theme-text)',
|
|
18972
|
+
scrollMarginTop: '100px',
|
|
18973
|
+
// For anchor links
|
|
18974
|
+
'&:first-of-type': {
|
|
18975
|
+
mt: 0
|
|
18976
|
+
}
|
|
18998
18977
|
},
|
|
18999
|
-
|
|
19000
|
-
|
|
19001
|
-
|
|
19002
|
-
|
|
19003
|
-
|
|
19004
|
-
|
|
19005
|
-
|
|
19006
|
-
|
|
18978
|
+
'& h1': {
|
|
18979
|
+
fontSize: {
|
|
18980
|
+
xs: '2rem',
|
|
18981
|
+
md: '2.75rem'
|
|
18982
|
+
},
|
|
18983
|
+
lineHeight: 1.15,
|
|
18984
|
+
mb: 3,
|
|
18985
|
+
mt: 5
|
|
19007
18986
|
},
|
|
19008
|
-
|
|
19009
|
-
|
|
19010
|
-
|
|
19011
|
-
|
|
19012
|
-
|
|
19013
|
-
|
|
19014
|
-
|
|
19015
|
-
|
|
19016
|
-
|
|
19017
|
-
|
|
19018
|
-
md: '1.0625rem'
|
|
18987
|
+
'& h2': {
|
|
18988
|
+
fontSize: {
|
|
18989
|
+
xs: '1.5rem',
|
|
18990
|
+
md: '2rem'
|
|
18991
|
+
},
|
|
18992
|
+
lineHeight: 1.25,
|
|
18993
|
+
mb: 2.5,
|
|
18994
|
+
mt: 5,
|
|
18995
|
+
pb: 1.5,
|
|
18996
|
+
borderBottom: '1px solid var(--theme-border-lighter)'
|
|
19019
18997
|
},
|
|
19020
|
-
|
|
19021
|
-
|
|
19022
|
-
|
|
19023
|
-
|
|
19024
|
-
|
|
19025
|
-
|
|
19026
|
-
|
|
19027
|
-
|
|
19028
|
-
// Lists - Better visual hierarchy
|
|
19029
|
-
'& ul, & ol': {
|
|
19030
|
-
mb: 3,
|
|
19031
|
-
pl: {
|
|
19032
|
-
xs: 3,
|
|
19033
|
-
md: 4
|
|
18998
|
+
'& h3': {
|
|
18999
|
+
fontSize: {
|
|
19000
|
+
xs: '1.25rem',
|
|
19001
|
+
md: '1.5rem'
|
|
19002
|
+
},
|
|
19003
|
+
lineHeight: 1.3,
|
|
19004
|
+
mb: 2,
|
|
19005
|
+
mt: 4
|
|
19034
19006
|
},
|
|
19035
|
-
'&
|
|
19036
|
-
|
|
19037
|
-
|
|
19007
|
+
'& h4': {
|
|
19008
|
+
fontSize: {
|
|
19009
|
+
xs: '1.1rem',
|
|
19010
|
+
md: '1.25rem'
|
|
19011
|
+
},
|
|
19012
|
+
lineHeight: 1.4,
|
|
19013
|
+
mb: 1.5,
|
|
19014
|
+
mt: 3,
|
|
19015
|
+
color: 'var(--theme-text)',
|
|
19016
|
+
fontWeight: 600
|
|
19017
|
+
},
|
|
19018
|
+
// Body text - Optimized for reading
|
|
19019
|
+
'& p': {
|
|
19038
19020
|
fontSize: {
|
|
19039
19021
|
xs: '1rem',
|
|
19040
19022
|
md: '1.0625rem'
|
|
19041
19023
|
},
|
|
19024
|
+
lineHeight: 1.75,
|
|
19025
|
+
mb: 2,
|
|
19042
19026
|
color: 'var(--theme-text)',
|
|
19043
19027
|
fontFamily: 'Georgia, "Times New Roman", serif',
|
|
19044
|
-
'
|
|
19045
|
-
|
|
19046
|
-
fontWeight: 600
|
|
19047
|
-
},
|
|
19048
|
-
'& p': {
|
|
19049
|
-
mb: 0.5
|
|
19028
|
+
'&:last-child': {
|
|
19029
|
+
mb: 0
|
|
19050
19030
|
}
|
|
19051
19031
|
},
|
|
19032
|
+
// Lists - Better visual hierarchy
|
|
19052
19033
|
'& ul, & ol': {
|
|
19053
|
-
|
|
19054
|
-
|
|
19055
|
-
|
|
19056
|
-
|
|
19057
|
-
// Code blocks - Modern syntax highlighting style
|
|
19058
|
-
'& pre': {
|
|
19059
|
-
backgroundColor: 'var(--theme-surface-elevated)',
|
|
19060
|
-
color: 'var(--theme-text)',
|
|
19061
|
-
borderRadius: 'var(--theme-border-radius)',
|
|
19062
|
-
p: {
|
|
19063
|
-
xs: 2,
|
|
19064
|
-
md: 3
|
|
19065
|
-
},
|
|
19066
|
-
mb: 3,
|
|
19067
|
-
overflow: 'auto',
|
|
19068
|
-
fontSize: '0.9rem',
|
|
19069
|
-
lineHeight: 1.6,
|
|
19070
|
-
fontFamily: '"Fira Code", "Cascadia Code", "SF Mono", Monaco, Consolas, monospace',
|
|
19071
|
-
border: '1px solid var(--theme-border-light)',
|
|
19072
|
-
boxShadow: 'var(--theme-elevation-2)',
|
|
19073
|
-
'& code': {
|
|
19074
|
-
backgroundColor: 'transparent',
|
|
19075
|
-
color: 'inherit',
|
|
19076
|
-
padding: 0,
|
|
19077
|
-
fontSize: 'inherit',
|
|
19078
|
-
fontFamily: 'inherit'
|
|
19079
|
-
}
|
|
19080
|
-
},
|
|
19081
|
-
// Inline code - Subtle highlight
|
|
19082
|
-
'& code': {
|
|
19083
|
-
backgroundColor: 'var(--theme-code-bg)',
|
|
19084
|
-
color: 'var(--theme-error)',
|
|
19085
|
-
padding: '0.2em 0.4em',
|
|
19086
|
-
borderRadius: 'var(--theme-border-radius-small)',
|
|
19087
|
-
fontSize: '0.9em',
|
|
19088
|
-
fontFamily: '"Fira Code", "Cascadia Code", "SF Mono", Monaco, Consolas, monospace',
|
|
19089
|
-
fontWeight: 500
|
|
19090
|
-
},
|
|
19091
|
-
// Blockquotes - Elegant callouts
|
|
19092
|
-
'& blockquote': {
|
|
19093
|
-
borderLeft: '4px solid var(--theme-primary)',
|
|
19094
|
-
backgroundColor: 'var(--theme-surface-variant)',
|
|
19095
|
-
borderRadius: `0 var(--theme-border-radius-small) var(--theme-border-radius-small) 0`,
|
|
19096
|
-
pl: 3,
|
|
19097
|
-
pr: 3,
|
|
19098
|
-
py: 2.5,
|
|
19099
|
-
my: 4,
|
|
19100
|
-
ml: 0,
|
|
19101
|
-
mr: 0,
|
|
19102
|
-
'& p': {
|
|
19103
|
-
fontSize: {
|
|
19104
|
-
xs: '1.05rem',
|
|
19105
|
-
md: '1.125rem'
|
|
19034
|
+
mb: 3,
|
|
19035
|
+
pl: {
|
|
19036
|
+
xs: 3,
|
|
19037
|
+
md: 4
|
|
19106
19038
|
},
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
|
|
19039
|
+
'& li': {
|
|
19040
|
+
mb: 1.25,
|
|
19041
|
+
lineHeight: 1.7,
|
|
19042
|
+
fontSize: {
|
|
19043
|
+
xs: '1rem',
|
|
19044
|
+
md: '1.0625rem'
|
|
19045
|
+
},
|
|
19046
|
+
color: 'var(--theme-text)',
|
|
19047
|
+
fontFamily: 'Georgia, "Times New Roman", serif',
|
|
19048
|
+
'&::marker': {
|
|
19049
|
+
color: 'var(--theme-primary)',
|
|
19050
|
+
fontWeight: 600
|
|
19051
|
+
},
|
|
19052
|
+
'& p': {
|
|
19053
|
+
mb: 0.5
|
|
19054
|
+
}
|
|
19055
|
+
},
|
|
19056
|
+
'& ul, & ol': {
|
|
19057
|
+
mt: 1,
|
|
19112
19058
|
mb: 0
|
|
19113
19059
|
}
|
|
19114
19060
|
},
|
|
19115
|
-
|
|
19116
|
-
|
|
19117
|
-
|
|
19118
|
-
fontStyle: 'normal',
|
|
19119
|
-
fontWeight: 500,
|
|
19061
|
+
// Code blocks - Modern syntax highlighting style
|
|
19062
|
+
'& pre': {
|
|
19063
|
+
backgroundColor: 'var(--theme-surface-elevated)',
|
|
19120
19064
|
color: 'var(--theme-text)',
|
|
19121
|
-
|
|
19122
|
-
|
|
19123
|
-
|
|
19124
|
-
|
|
19065
|
+
borderRadius: 'var(--theme-border-radius)',
|
|
19066
|
+
p: {
|
|
19067
|
+
xs: 2,
|
|
19068
|
+
md: 3
|
|
19069
|
+
},
|
|
19070
|
+
mb: 3,
|
|
19071
|
+
overflow: 'auto',
|
|
19072
|
+
fontSize: '0.9rem',
|
|
19073
|
+
lineHeight: 1.6,
|
|
19074
|
+
fontFamily: '"Fira Code", "Cascadia Code", "SF Mono", Monaco, Consolas, monospace',
|
|
19075
|
+
border: '1px solid var(--theme-border-light)',
|
|
19076
|
+
boxShadow: 'var(--theme-elevation-2)',
|
|
19077
|
+
'& code': {
|
|
19078
|
+
backgroundColor: 'transparent',
|
|
19079
|
+
color: 'inherit',
|
|
19080
|
+
padding: 0,
|
|
19081
|
+
fontSize: 'inherit',
|
|
19082
|
+
fontFamily: 'inherit'
|
|
19125
19083
|
}
|
|
19126
|
-
}
|
|
19127
|
-
|
|
19128
|
-
|
|
19129
|
-
|
|
19130
|
-
|
|
19131
|
-
|
|
19132
|
-
|
|
19133
|
-
|
|
19134
|
-
|
|
19135
|
-
|
|
19136
|
-
|
|
19137
|
-
|
|
19138
|
-
'&
|
|
19084
|
+
},
|
|
19085
|
+
// Inline code - Subtle highlight
|
|
19086
|
+
'& code': {
|
|
19087
|
+
backgroundColor: 'var(--theme-code-bg)',
|
|
19088
|
+
color: 'var(--theme-error)',
|
|
19089
|
+
padding: '0.2em 0.4em',
|
|
19090
|
+
borderRadius: 'var(--theme-border-radius-small)',
|
|
19091
|
+
fontSize: '0.9em',
|
|
19092
|
+
fontFamily: '"Fira Code", "Cascadia Code", "SF Mono", Monaco, Consolas, monospace',
|
|
19093
|
+
fontWeight: 500
|
|
19094
|
+
},
|
|
19095
|
+
// Blockquotes - Elegant callouts
|
|
19096
|
+
'& blockquote': {
|
|
19097
|
+
borderLeft: '4px solid var(--theme-primary)',
|
|
19139
19098
|
backgroundColor: 'var(--theme-surface-variant)',
|
|
19140
|
-
|
|
19141
|
-
|
|
19142
|
-
|
|
19143
|
-
|
|
19099
|
+
borderRadius: `0 var(--theme-border-radius-small) var(--theme-border-radius-small) 0`,
|
|
19100
|
+
pl: 3,
|
|
19101
|
+
pr: 3,
|
|
19102
|
+
py: 2.5,
|
|
19103
|
+
my: 4,
|
|
19104
|
+
ml: 0,
|
|
19105
|
+
mr: 0,
|
|
19106
|
+
'& p': {
|
|
19107
|
+
fontSize: {
|
|
19108
|
+
xs: '1.05rem',
|
|
19109
|
+
md: '1.125rem'
|
|
19110
|
+
},
|
|
19111
|
+
fontStyle: 'italic',
|
|
19112
|
+
lineHeight: 1.6,
|
|
19113
|
+
mb: 1.5,
|
|
19144
19114
|
color: 'var(--theme-text)',
|
|
19145
|
-
|
|
19146
|
-
|
|
19147
|
-
|
|
19148
|
-
|
|
19115
|
+
'&:last-child': {
|
|
19116
|
+
mb: 0
|
|
19117
|
+
}
|
|
19118
|
+
},
|
|
19119
|
+
'& cite': {
|
|
19120
|
+
display: 'block',
|
|
19121
|
+
fontSize: '0.9rem',
|
|
19122
|
+
fontStyle: 'normal',
|
|
19123
|
+
fontWeight: 500,
|
|
19124
|
+
color: 'var(--theme-text)',
|
|
19125
|
+
mt: 1,
|
|
19126
|
+
'&::before': {
|
|
19127
|
+
content: '"— "',
|
|
19128
|
+
color: 'var(--theme-primary)'
|
|
19129
|
+
}
|
|
19149
19130
|
}
|
|
19150
19131
|
},
|
|
19151
|
-
|
|
19152
|
-
|
|
19153
|
-
|
|
19154
|
-
|
|
19155
|
-
|
|
19156
|
-
|
|
19132
|
+
// Tables - Clean, modern design
|
|
19133
|
+
'& table': {
|
|
19134
|
+
width: '100%',
|
|
19135
|
+
borderCollapse: 'separate',
|
|
19136
|
+
borderSpacing: 0,
|
|
19137
|
+
mb: 3,
|
|
19138
|
+
fontSize: '0.95rem',
|
|
19139
|
+
overflow: 'hidden',
|
|
19140
|
+
borderRadius: 'var(--theme-border-radius-small)',
|
|
19141
|
+
border: '1px solid var(--theme-border-light)',
|
|
19142
|
+
'& thead': {
|
|
19143
|
+
backgroundColor: 'var(--theme-surface-variant)',
|
|
19144
|
+
'& th': {
|
|
19145
|
+
padding: '12px 16px',
|
|
19146
|
+
textAlign: 'left',
|
|
19147
|
+
fontWeight: 600,
|
|
19148
|
+
color: 'var(--theme-text)',
|
|
19149
|
+
borderBottom: '2px solid var(--theme-border-main)',
|
|
19150
|
+
fontSize: '0.875rem',
|
|
19151
|
+
textTransform: 'uppercase',
|
|
19152
|
+
letterSpacing: '0.05em'
|
|
19153
|
+
}
|
|
19154
|
+
},
|
|
19155
|
+
'& tbody': {
|
|
19156
|
+
'& tr': {
|
|
19157
|
+
borderBottom: '1px solid var(--theme-border-lighter)',
|
|
19158
|
+
transition: 'background-color 0.2s ease',
|
|
19159
|
+
'&:hover': {
|
|
19160
|
+
backgroundColor: 'var(--theme-surface-variant)'
|
|
19161
|
+
},
|
|
19162
|
+
'&:last-child': {
|
|
19163
|
+
borderBottom: 'none'
|
|
19164
|
+
}
|
|
19157
19165
|
},
|
|
19158
|
-
'
|
|
19159
|
-
|
|
19166
|
+
'& td': {
|
|
19167
|
+
padding: '12px 16px',
|
|
19168
|
+
color: 'var(--theme-text)',
|
|
19169
|
+
lineHeight: 1.6
|
|
19160
19170
|
}
|
|
19171
|
+
}
|
|
19172
|
+
},
|
|
19173
|
+
// Text emphasis
|
|
19174
|
+
'& strong': {
|
|
19175
|
+
fontWeight: 700,
|
|
19176
|
+
color: 'var(--theme-text)'
|
|
19177
|
+
},
|
|
19178
|
+
'& em': {
|
|
19179
|
+
fontStyle: 'italic',
|
|
19180
|
+
color: 'var(--theme-text)'
|
|
19181
|
+
},
|
|
19182
|
+
// Links - Modern, accessible
|
|
19183
|
+
'& a': {
|
|
19184
|
+
color: 'var(--theme-primary)',
|
|
19185
|
+
textDecoration: 'none',
|
|
19186
|
+
fontWeight: 500,
|
|
19187
|
+
borderBottom: '1px solid transparent',
|
|
19188
|
+
transition: 'border-color 0.2s ease',
|
|
19189
|
+
'&:hover': {
|
|
19190
|
+
borderBottomColor: 'var(--theme-primary)'
|
|
19161
19191
|
},
|
|
19162
|
-
'
|
|
19163
|
-
|
|
19164
|
-
|
|
19165
|
-
|
|
19192
|
+
'&:focus-visible': {
|
|
19193
|
+
outline: '2px solid var(--theme-primary)',
|
|
19194
|
+
outlineOffset: '2px',
|
|
19195
|
+
borderRadius: '2px'
|
|
19166
19196
|
}
|
|
19167
|
-
}
|
|
19168
|
-
},
|
|
19169
|
-
// Text emphasis
|
|
19170
|
-
'& strong': {
|
|
19171
|
-
fontWeight: 700,
|
|
19172
|
-
color: 'var(--theme-text)'
|
|
19173
|
-
},
|
|
19174
|
-
'& em': {
|
|
19175
|
-
fontStyle: 'italic',
|
|
19176
|
-
color: 'var(--theme-text)'
|
|
19177
|
-
},
|
|
19178
|
-
// Links - Modern, accessible
|
|
19179
|
-
'& a': {
|
|
19180
|
-
color: 'var(--theme-primary)',
|
|
19181
|
-
textDecoration: 'none',
|
|
19182
|
-
fontWeight: 500,
|
|
19183
|
-
borderBottom: '1px solid transparent',
|
|
19184
|
-
transition: 'border-color 0.2s ease',
|
|
19185
|
-
'&:hover': {
|
|
19186
|
-
borderBottomColor: 'var(--theme-primary)'
|
|
19187
19197
|
},
|
|
19188
|
-
|
|
19189
|
-
outline: '2px solid var(--theme-primary)',
|
|
19190
|
-
outlineOffset: '2px',
|
|
19191
|
-
borderRadius: '2px'
|
|
19192
|
-
}
|
|
19193
|
-
},
|
|
19194
|
-
// Images and figures
|
|
19195
|
-
'& img': {
|
|
19196
|
-
maxWidth: '100%',
|
|
19197
|
-
height: 'auto',
|
|
19198
|
-
borderRadius: 'var(--theme-border-radius-small)',
|
|
19199
|
-
display: 'block',
|
|
19200
|
-
my: 3
|
|
19201
|
-
},
|
|
19202
|
-
'& figure': {
|
|
19203
|
-
margin: '3rem 0',
|
|
19198
|
+
// Images and figures
|
|
19204
19199
|
'& img': {
|
|
19205
19200
|
maxWidth: '100%',
|
|
19206
19201
|
height: 'auto',
|
|
19207
19202
|
borderRadius: 'var(--theme-border-radius-small)',
|
|
19208
|
-
|
|
19203
|
+
display: 'block',
|
|
19204
|
+
my: 3
|
|
19209
19205
|
},
|
|
19210
|
-
'&
|
|
19211
|
-
|
|
19212
|
-
|
|
19213
|
-
|
|
19214
|
-
|
|
19215
|
-
|
|
19216
|
-
|
|
19217
|
-
|
|
19218
|
-
|
|
19219
|
-
|
|
19220
|
-
|
|
19221
|
-
|
|
19222
|
-
|
|
19206
|
+
'& figure': {
|
|
19207
|
+
margin: '3rem 0',
|
|
19208
|
+
'& img': {
|
|
19209
|
+
maxWidth: '100%',
|
|
19210
|
+
height: 'auto',
|
|
19211
|
+
borderRadius: 'var(--theme-border-radius-small)',
|
|
19212
|
+
boxShadow: 'var(--theme-elevation-2)'
|
|
19213
|
+
},
|
|
19214
|
+
'& figcaption': {
|
|
19215
|
+
textAlign: 'center',
|
|
19216
|
+
fontSize: '0.875rem',
|
|
19217
|
+
color: 'var(--theme-text)',
|
|
19218
|
+
mt: 1.5,
|
|
19219
|
+
fontStyle: 'italic'
|
|
19220
|
+
}
|
|
19221
|
+
},
|
|
19222
|
+
// Horizontal rules
|
|
19223
|
+
'& hr': {
|
|
19224
|
+
border: 'none',
|
|
19225
|
+
borderTop: '1px solid var(--theme-border-light)',
|
|
19226
|
+
my: 5
|
|
19227
|
+
},
|
|
19228
|
+
...styleProps.sx
|
|
19223
19229
|
},
|
|
19224
|
-
...styleProps.sx,
|
|
19225
19230
|
children: html
|
|
19226
19231
|
});
|
|
19227
19232
|
}
|
|
@@ -21385,35 +21390,664 @@ function ProductCard(props) {
|
|
|
21385
21390
|
technologies: ['Loading'],
|
|
21386
21391
|
status: 'coming-soon'
|
|
21387
21392
|
},
|
|
21388
|
-
variant: restProps.variant || 'compact',
|
|
21389
|
-
showImage: false
|
|
21393
|
+
variant: restProps.variant || 'compact',
|
|
21394
|
+
showImage: false
|
|
21395
|
+
});
|
|
21396
|
+
}
|
|
21397
|
+
if (error) {
|
|
21398
|
+
console.error('Error loading product card:', error);
|
|
21399
|
+
{
|
|
21400
|
+
return jsx(ProductCardView, {
|
|
21401
|
+
...restProps,
|
|
21402
|
+
product: {
|
|
21403
|
+
id: 'error-product',
|
|
21404
|
+
name: 'Product Loading Error',
|
|
21405
|
+
category: 'Error',
|
|
21406
|
+
description: error.message,
|
|
21407
|
+
features: ['Unable to load product features'],
|
|
21408
|
+
technologies: ['N/A'],
|
|
21409
|
+
status: 'coming-soon'
|
|
21410
|
+
},
|
|
21411
|
+
variant: restProps.variant || 'compact',
|
|
21412
|
+
showImage: false
|
|
21413
|
+
});
|
|
21414
|
+
}
|
|
21415
|
+
}
|
|
21416
|
+
// Pass through data directly - let component handle missing properties
|
|
21417
|
+
const transformedProps = productProps;
|
|
21418
|
+
return jsx(ProductCardView, {
|
|
21419
|
+
...transformedProps
|
|
21420
|
+
});
|
|
21421
|
+
}
|
|
21422
|
+
|
|
21423
|
+
// View component - handles the actual rendering
|
|
21424
|
+
function ImageGalleryView({
|
|
21425
|
+
images = [],
|
|
21426
|
+
productName,
|
|
21427
|
+
variant = 'thumbnails',
|
|
21428
|
+
thumbnailPosition = 'left',
|
|
21429
|
+
aspectRatio = '1',
|
|
21430
|
+
showZoom = true,
|
|
21431
|
+
maxImages,
|
|
21432
|
+
dataSource,
|
|
21433
|
+
bindingOptions,
|
|
21434
|
+
...restProps
|
|
21435
|
+
}) {
|
|
21436
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
21437
|
+
const [zoomOpen, setZoomOpen] = useState(false);
|
|
21438
|
+
// Limit images if maxImages is specified
|
|
21439
|
+
const displayImages = maxImages ? images.slice(0, maxImages) : images;
|
|
21440
|
+
const handlePrevious = useCallback(() => {
|
|
21441
|
+
setSelectedIndex(prev => prev === 0 ? displayImages.length - 1 : prev - 1);
|
|
21442
|
+
}, [displayImages.length]);
|
|
21443
|
+
const handleNext = useCallback(() => {
|
|
21444
|
+
setSelectedIndex(prev => prev === displayImages.length - 1 ? 0 : prev + 1);
|
|
21445
|
+
}, [displayImages.length]);
|
|
21446
|
+
const handleThumbnailClick = useCallback(index => {
|
|
21447
|
+
setSelectedIndex(index);
|
|
21448
|
+
}, []);
|
|
21449
|
+
const handleZoomOpen = useCallback(() => {
|
|
21450
|
+
if (showZoom) {
|
|
21451
|
+
setZoomOpen(true);
|
|
21452
|
+
}
|
|
21453
|
+
}, [showZoom]);
|
|
21454
|
+
const handleZoomClose = useCallback(() => {
|
|
21455
|
+
setZoomOpen(false);
|
|
21456
|
+
}, []);
|
|
21457
|
+
// Handle empty images
|
|
21458
|
+
if (!displayImages || displayImages.length === 0) {
|
|
21459
|
+
return jsx(Box, {
|
|
21460
|
+
...restProps,
|
|
21461
|
+
sx: {
|
|
21462
|
+
backgroundColor: 'var(--theme-surface-variant)',
|
|
21463
|
+
borderRadius: 'var(--theme-border-radius)',
|
|
21464
|
+
display: 'flex',
|
|
21465
|
+
alignItems: 'center',
|
|
21466
|
+
justifyContent: 'center',
|
|
21467
|
+
aspectRatio,
|
|
21468
|
+
minHeight: 400
|
|
21469
|
+
},
|
|
21470
|
+
children: jsx(Skeleton, {
|
|
21471
|
+
variant: "rectangular",
|
|
21472
|
+
width: "100%",
|
|
21473
|
+
height: "100%",
|
|
21474
|
+
sx: {
|
|
21475
|
+
borderRadius: 'var(--theme-border-radius)'
|
|
21476
|
+
}
|
|
21477
|
+
})
|
|
21478
|
+
});
|
|
21479
|
+
}
|
|
21480
|
+
const currentImage = displayImages[selectedIndex];
|
|
21481
|
+
// Render thumbnails
|
|
21482
|
+
const renderThumbnails = () => jsx(Box, {
|
|
21483
|
+
sx: {
|
|
21484
|
+
display: 'flex',
|
|
21485
|
+
flexDirection: thumbnailPosition === 'left' || thumbnailPosition === 'right' ? 'column' : 'row',
|
|
21486
|
+
gap: 1,
|
|
21487
|
+
overflow: 'auto',
|
|
21488
|
+
maxHeight: thumbnailPosition === 'left' || thumbnailPosition === 'right' ? 500 : 'auto',
|
|
21489
|
+
maxWidth: thumbnailPosition === 'bottom' ? '100%' : 'auto'
|
|
21490
|
+
},
|
|
21491
|
+
children: displayImages.map((image, index) => jsx(Box, {
|
|
21492
|
+
onClick: () => handleThumbnailClick(index),
|
|
21493
|
+
sx: {
|
|
21494
|
+
width: 80,
|
|
21495
|
+
height: 80,
|
|
21496
|
+
flexShrink: 0,
|
|
21497
|
+
cursor: 'pointer',
|
|
21498
|
+
border: '2px solid',
|
|
21499
|
+
borderColor: index === selectedIndex ? 'var(--theme-primary)' : 'var(--theme-border-main)',
|
|
21500
|
+
borderRadius: 'var(--theme-border-radius-small)',
|
|
21501
|
+
overflow: 'hidden',
|
|
21502
|
+
transition: 'all 0.2s ease-in-out',
|
|
21503
|
+
'&:hover': {
|
|
21504
|
+
borderColor: 'var(--theme-border-emphasis)'
|
|
21505
|
+
}
|
|
21506
|
+
},
|
|
21507
|
+
children: jsx("img", {
|
|
21508
|
+
src: image.thumbnail || image.url,
|
|
21509
|
+
alt: `${productName} thumbnail ${index + 1}`,
|
|
21510
|
+
style: {
|
|
21511
|
+
width: '100%',
|
|
21512
|
+
height: '100%',
|
|
21513
|
+
objectFit: 'cover'
|
|
21514
|
+
}
|
|
21515
|
+
})
|
|
21516
|
+
}, index))
|
|
21517
|
+
});
|
|
21518
|
+
// Render main image container
|
|
21519
|
+
const renderMainImage = () => jsxs(Box, {
|
|
21520
|
+
sx: {
|
|
21521
|
+
position: 'relative',
|
|
21522
|
+
width: '100%',
|
|
21523
|
+
backgroundColor: 'var(--theme-surface)',
|
|
21524
|
+
borderRadius: 'var(--theme-border-radius)',
|
|
21525
|
+
border: '1px solid var(--theme-border-main)',
|
|
21526
|
+
overflow: 'hidden',
|
|
21527
|
+
aspectRatio
|
|
21528
|
+
},
|
|
21529
|
+
children: [jsx("img", {
|
|
21530
|
+
src: currentImage.url,
|
|
21531
|
+
alt: currentImage.alt || `${productName} - Image ${selectedIndex + 1}`,
|
|
21532
|
+
style: {
|
|
21533
|
+
width: '100%',
|
|
21534
|
+
height: '100%',
|
|
21535
|
+
objectFit: 'contain',
|
|
21536
|
+
display: 'block'
|
|
21537
|
+
}
|
|
21538
|
+
}), showZoom && jsx(IconButton, {
|
|
21539
|
+
onClick: handleZoomOpen,
|
|
21540
|
+
sx: {
|
|
21541
|
+
position: 'absolute',
|
|
21542
|
+
top: 8,
|
|
21543
|
+
right: 8,
|
|
21544
|
+
backgroundColor: 'var(--theme-surface)',
|
|
21545
|
+
color: 'var(--theme-text-primary)',
|
|
21546
|
+
'&:hover': {
|
|
21547
|
+
backgroundColor: 'var(--theme-surface-variant)'
|
|
21548
|
+
}
|
|
21549
|
+
},
|
|
21550
|
+
"aria-label": "Zoom image",
|
|
21551
|
+
children: jsx(ZoomInIcon, {})
|
|
21552
|
+
}), variant === 'carousel' && displayImages.length > 1 && jsxs(Fragment, {
|
|
21553
|
+
children: [jsx(IconButton, {
|
|
21554
|
+
onClick: handlePrevious,
|
|
21555
|
+
sx: {
|
|
21556
|
+
position: 'absolute',
|
|
21557
|
+
left: 8,
|
|
21558
|
+
top: '50%',
|
|
21559
|
+
transform: 'translateY(-50%)',
|
|
21560
|
+
backgroundColor: 'var(--theme-surface)',
|
|
21561
|
+
color: 'var(--theme-text-primary)',
|
|
21562
|
+
'&:hover': {
|
|
21563
|
+
backgroundColor: 'var(--theme-surface-variant)'
|
|
21564
|
+
}
|
|
21565
|
+
},
|
|
21566
|
+
"aria-label": "Previous image",
|
|
21567
|
+
children: jsx(ChevronLeftIcon, {})
|
|
21568
|
+
}), jsx(IconButton, {
|
|
21569
|
+
onClick: handleNext,
|
|
21570
|
+
sx: {
|
|
21571
|
+
position: 'absolute',
|
|
21572
|
+
right: 8,
|
|
21573
|
+
top: '50%',
|
|
21574
|
+
transform: 'translateY(-50%)',
|
|
21575
|
+
backgroundColor: 'var(--theme-surface)',
|
|
21576
|
+
color: 'var(--theme-text-primary)',
|
|
21577
|
+
'&:hover': {
|
|
21578
|
+
backgroundColor: 'var(--theme-surface-variant)'
|
|
21579
|
+
}
|
|
21580
|
+
},
|
|
21581
|
+
"aria-label": "Next image",
|
|
21582
|
+
children: jsx(ChevronRightIcon, {})
|
|
21583
|
+
})]
|
|
21584
|
+
})]
|
|
21585
|
+
});
|
|
21586
|
+
// Render zoom modal
|
|
21587
|
+
const renderZoomModal = () => jsx(Modal, {
|
|
21588
|
+
open: zoomOpen,
|
|
21589
|
+
onClose: handleZoomClose,
|
|
21590
|
+
sx: {
|
|
21591
|
+
display: 'flex',
|
|
21592
|
+
alignItems: 'center',
|
|
21593
|
+
justifyContent: 'center',
|
|
21594
|
+
backgroundColor: 'rgba(0, 0, 0, 0.9)'
|
|
21595
|
+
},
|
|
21596
|
+
children: jsxs(Box, {
|
|
21597
|
+
sx: {
|
|
21598
|
+
position: 'relative',
|
|
21599
|
+
maxWidth: '90vw',
|
|
21600
|
+
maxHeight: '90vh',
|
|
21601
|
+
outline: 'none'
|
|
21602
|
+
},
|
|
21603
|
+
children: [jsx(IconButton, {
|
|
21604
|
+
onClick: handleZoomClose,
|
|
21605
|
+
sx: {
|
|
21606
|
+
position: 'absolute',
|
|
21607
|
+
top: -40,
|
|
21608
|
+
right: 0,
|
|
21609
|
+
color: 'white',
|
|
21610
|
+
'&:hover': {
|
|
21611
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)'
|
|
21612
|
+
}
|
|
21613
|
+
},
|
|
21614
|
+
"aria-label": "Close zoom",
|
|
21615
|
+
children: jsx(Close, {})
|
|
21616
|
+
}), jsx("img", {
|
|
21617
|
+
src: currentImage.url,
|
|
21618
|
+
alt: currentImage.alt || `${productName} - Zoomed view`,
|
|
21619
|
+
style: {
|
|
21620
|
+
maxWidth: '100%',
|
|
21621
|
+
maxHeight: '90vh',
|
|
21622
|
+
objectFit: 'contain'
|
|
21623
|
+
}
|
|
21624
|
+
})]
|
|
21625
|
+
})
|
|
21626
|
+
});
|
|
21627
|
+
// Render thumbnails variant
|
|
21628
|
+
if (variant === 'thumbnails') {
|
|
21629
|
+
return jsxs(Box, {
|
|
21630
|
+
...restProps,
|
|
21631
|
+
children: [jsxs(Box, {
|
|
21632
|
+
sx: {
|
|
21633
|
+
display: 'flex',
|
|
21634
|
+
flexDirection: {
|
|
21635
|
+
xs: 'column',
|
|
21636
|
+
sm: thumbnailPosition === 'bottom' ? 'column' : 'row'
|
|
21637
|
+
},
|
|
21638
|
+
gap: 2
|
|
21639
|
+
},
|
|
21640
|
+
children: [thumbnailPosition === 'left' && jsx(Box, {
|
|
21641
|
+
sx: {
|
|
21642
|
+
order: {
|
|
21643
|
+
xs: 2,
|
|
21644
|
+
sm: 1
|
|
21645
|
+
}
|
|
21646
|
+
},
|
|
21647
|
+
children: renderThumbnails()
|
|
21648
|
+
}), jsx(Box, {
|
|
21649
|
+
sx: {
|
|
21650
|
+
flex: 1,
|
|
21651
|
+
order: {
|
|
21652
|
+
xs: 1,
|
|
21653
|
+
sm: thumbnailPosition === 'left' ? 2 : 1
|
|
21654
|
+
}
|
|
21655
|
+
},
|
|
21656
|
+
children: renderMainImage()
|
|
21657
|
+
}), thumbnailPosition === 'right' && jsx(Box, {
|
|
21658
|
+
sx: {
|
|
21659
|
+
order: {
|
|
21660
|
+
xs: 2,
|
|
21661
|
+
sm: 2
|
|
21662
|
+
}
|
|
21663
|
+
},
|
|
21664
|
+
children: renderThumbnails()
|
|
21665
|
+
}), thumbnailPosition === 'bottom' && jsx(Box, {
|
|
21666
|
+
sx: {
|
|
21667
|
+
order: 2
|
|
21668
|
+
},
|
|
21669
|
+
children: renderThumbnails()
|
|
21670
|
+
})]
|
|
21671
|
+
}), renderZoomModal()]
|
|
21672
|
+
});
|
|
21673
|
+
}
|
|
21674
|
+
// Render carousel variant
|
|
21675
|
+
if (variant === 'carousel') {
|
|
21676
|
+
return jsxs(Box, {
|
|
21677
|
+
...restProps,
|
|
21678
|
+
children: [renderMainImage(), displayImages.length > 1 && jsx(Box, {
|
|
21679
|
+
sx: {
|
|
21680
|
+
display: 'flex',
|
|
21681
|
+
justifyContent: 'center',
|
|
21682
|
+
gap: 1,
|
|
21683
|
+
mt: 2
|
|
21684
|
+
},
|
|
21685
|
+
children: displayImages.map((_, index) => jsx(Box, {
|
|
21686
|
+
onClick: () => handleThumbnailClick(index),
|
|
21687
|
+
sx: {
|
|
21688
|
+
width: 10,
|
|
21689
|
+
height: 10,
|
|
21690
|
+
borderRadius: '50%',
|
|
21691
|
+
backgroundColor: index === selectedIndex ? 'var(--theme-primary)' : 'var(--theme-border-main)',
|
|
21692
|
+
cursor: 'pointer',
|
|
21693
|
+
transition: 'all 0.2s ease-in-out',
|
|
21694
|
+
'&:hover': {
|
|
21695
|
+
backgroundColor: index === selectedIndex ? 'var(--theme-primary)' : 'var(--theme-border-emphasis)'
|
|
21696
|
+
}
|
|
21697
|
+
}
|
|
21698
|
+
}, index))
|
|
21699
|
+
}), renderZoomModal()]
|
|
21700
|
+
});
|
|
21701
|
+
}
|
|
21702
|
+
// Render grid variant
|
|
21703
|
+
if (variant === 'grid') {
|
|
21704
|
+
return jsxs(Box, {
|
|
21705
|
+
...restProps,
|
|
21706
|
+
children: [jsx(Grid, {
|
|
21707
|
+
container: true,
|
|
21708
|
+
spacing: 2,
|
|
21709
|
+
children: displayImages.map((image, index) => jsx(Grid, {
|
|
21710
|
+
item: true,
|
|
21711
|
+
xs: 6,
|
|
21712
|
+
sm: 4,
|
|
21713
|
+
md: 3,
|
|
21714
|
+
children: jsx(Box, {
|
|
21715
|
+
onClick: () => {
|
|
21716
|
+
setSelectedIndex(index);
|
|
21717
|
+
handleZoomOpen();
|
|
21718
|
+
},
|
|
21719
|
+
sx: {
|
|
21720
|
+
width: '100%',
|
|
21721
|
+
aspectRatio: '1',
|
|
21722
|
+
borderRadius: 'var(--theme-border-radius)',
|
|
21723
|
+
border: '1px solid var(--theme-border-main)',
|
|
21724
|
+
overflow: 'hidden',
|
|
21725
|
+
cursor: showZoom ? 'pointer' : 'default',
|
|
21726
|
+
transition: 'all 0.2s ease-in-out',
|
|
21727
|
+
'&:hover': {
|
|
21728
|
+
borderColor: 'var(--theme-border-emphasis)',
|
|
21729
|
+
boxShadow: 'var(--theme-elevation-1)'
|
|
21730
|
+
}
|
|
21731
|
+
},
|
|
21732
|
+
children: jsx("img", {
|
|
21733
|
+
src: image.url,
|
|
21734
|
+
alt: image.alt || `${productName} - Image ${index + 1}`,
|
|
21735
|
+
style: {
|
|
21736
|
+
width: '100%',
|
|
21737
|
+
height: '100%',
|
|
21738
|
+
objectFit: 'cover'
|
|
21739
|
+
}
|
|
21740
|
+
})
|
|
21741
|
+
})
|
|
21742
|
+
}, index))
|
|
21743
|
+
}), renderZoomModal()]
|
|
21744
|
+
});
|
|
21745
|
+
}
|
|
21746
|
+
return null;
|
|
21747
|
+
}
|
|
21748
|
+
// Create the serializable ImageGallery component using the factory
|
|
21749
|
+
const ImageGallery = createSerializableView({
|
|
21750
|
+
tagName: 'ImageGallery',
|
|
21751
|
+
version: '1.0.0',
|
|
21752
|
+
role: 'view',
|
|
21753
|
+
View: ImageGalleryView
|
|
21754
|
+
});
|
|
21755
|
+
|
|
21756
|
+
// View component
|
|
21757
|
+
function OptionSelectorView({
|
|
21758
|
+
options = [],
|
|
21759
|
+
selectedOption,
|
|
21760
|
+
onOptionSelect,
|
|
21761
|
+
displayMode = 'text',
|
|
21762
|
+
variant = 'grid',
|
|
21763
|
+
layout = 'wrap',
|
|
21764
|
+
visualSize = 'medium',
|
|
21765
|
+
showLabel = false,
|
|
21766
|
+
disabled = false,
|
|
21767
|
+
label = 'Select Option',
|
|
21768
|
+
dataSource,
|
|
21769
|
+
bindingOptions,
|
|
21770
|
+
...restProps
|
|
21771
|
+
}) {
|
|
21772
|
+
const handleOptionClick = useCallback((optionId, available) => {
|
|
21773
|
+
if (!disabled && available && onOptionSelect) {
|
|
21774
|
+
onOptionSelect(optionId);
|
|
21775
|
+
}
|
|
21776
|
+
}, [disabled, onOptionSelect]);
|
|
21777
|
+
const handleDropdownChange = useCallback(event => {
|
|
21778
|
+
if (onOptionSelect) {
|
|
21779
|
+
onOptionSelect(event.target.value);
|
|
21780
|
+
}
|
|
21781
|
+
}, [onOptionSelect]);
|
|
21782
|
+
// Get visual size in pixels
|
|
21783
|
+
const getSizePixels = () => {
|
|
21784
|
+
if (displayMode === 'text') return 48;
|
|
21785
|
+
switch (visualSize) {
|
|
21786
|
+
case 'small':
|
|
21787
|
+
return 32;
|
|
21788
|
+
case 'large':
|
|
21789
|
+
return 56;
|
|
21790
|
+
case 'medium':
|
|
21791
|
+
default:
|
|
21792
|
+
return 44;
|
|
21793
|
+
}
|
|
21794
|
+
};
|
|
21795
|
+
const sizeInPx = getSizePixels();
|
|
21796
|
+
// Render nothing if no options
|
|
21797
|
+
if (!options || options.length === 0) {
|
|
21798
|
+
return null;
|
|
21799
|
+
}
|
|
21800
|
+
// Dropdown variant
|
|
21801
|
+
if (variant === 'dropdown') {
|
|
21802
|
+
return jsxs(FormControl, {
|
|
21803
|
+
fullWidth: true,
|
|
21804
|
+
disabled: disabled,
|
|
21805
|
+
...restProps,
|
|
21806
|
+
sx: {
|
|
21807
|
+
'& .MuiOutlinedInput-root': {
|
|
21808
|
+
'& fieldset': {
|
|
21809
|
+
borderColor: 'var(--theme-border-main)'
|
|
21810
|
+
},
|
|
21811
|
+
'&:hover fieldset': {
|
|
21812
|
+
borderColor: 'var(--theme-border-emphasis)'
|
|
21813
|
+
},
|
|
21814
|
+
'&.Mui-focused fieldset': {
|
|
21815
|
+
borderColor: 'var(--theme-primary)'
|
|
21816
|
+
}
|
|
21817
|
+
},
|
|
21818
|
+
'& .MuiInputLabel-root': {
|
|
21819
|
+
color: 'var(--theme-text-secondary)',
|
|
21820
|
+
'&.Mui-focused': {
|
|
21821
|
+
color: 'var(--theme-primary)'
|
|
21822
|
+
}
|
|
21823
|
+
}
|
|
21824
|
+
},
|
|
21825
|
+
children: [jsx(InputLabel, {
|
|
21826
|
+
children: label
|
|
21827
|
+
}), jsx(Select, {
|
|
21828
|
+
value: selectedOption || '',
|
|
21829
|
+
onChange: handleDropdownChange,
|
|
21830
|
+
label: label,
|
|
21831
|
+
sx: {
|
|
21832
|
+
backgroundColor: 'var(--theme-surface)',
|
|
21833
|
+
color: 'var(--theme-text-primary)'
|
|
21834
|
+
},
|
|
21835
|
+
children: options.map(option => jsxs(MenuItem, {
|
|
21836
|
+
value: option.id,
|
|
21837
|
+
disabled: !option.available,
|
|
21838
|
+
sx: {
|
|
21839
|
+
color: option.available ? 'var(--theme-text-primary)' : 'var(--theme-text-disabled)'
|
|
21840
|
+
},
|
|
21841
|
+
children: [displayMode === 'color' && option.hexValue && jsx(Box, {
|
|
21842
|
+
sx: {
|
|
21843
|
+
width: 20,
|
|
21844
|
+
height: 20,
|
|
21845
|
+
mr: 1,
|
|
21846
|
+
borderRadius: '50%',
|
|
21847
|
+
backgroundColor: option.hexValue,
|
|
21848
|
+
border: '1px solid var(--theme-border-main)',
|
|
21849
|
+
backgroundImage: option.imageUrl ? `url(${option.imageUrl})` : undefined,
|
|
21850
|
+
backgroundSize: 'cover'
|
|
21851
|
+
}
|
|
21852
|
+
}), option.label, !option.available && ' (Out of stock)', option.price && option.price !== 0 && ` (+$${(option.price / 100).toFixed(2)})`]
|
|
21853
|
+
}, option.id))
|
|
21854
|
+
})]
|
|
21390
21855
|
});
|
|
21391
21856
|
}
|
|
21392
|
-
|
|
21393
|
-
|
|
21394
|
-
{
|
|
21395
|
-
|
|
21396
|
-
|
|
21397
|
-
|
|
21398
|
-
|
|
21399
|
-
|
|
21400
|
-
|
|
21401
|
-
description: error.message,
|
|
21402
|
-
features: ['Unable to load product features'],
|
|
21403
|
-
technologies: ['N/A'],
|
|
21404
|
-
status: 'coming-soon'
|
|
21405
|
-
},
|
|
21406
|
-
variant: restProps.variant || 'compact',
|
|
21407
|
-
showImage: false
|
|
21408
|
-
});
|
|
21857
|
+
// Buttons/Grid variant with visual modes
|
|
21858
|
+
const getLayoutStyles = () => {
|
|
21859
|
+
if (variant === 'grid') {
|
|
21860
|
+
const minWidth = displayMode === 'text' ? 60 : sizeInPx + 16;
|
|
21861
|
+
return {
|
|
21862
|
+
display: 'grid',
|
|
21863
|
+
gridTemplateColumns: `repeat(auto-fill, minmax(${minWidth}px, 1fr))`,
|
|
21864
|
+
gap: displayMode === 'text' ? 1 : 2
|
|
21865
|
+
};
|
|
21409
21866
|
}
|
|
21410
|
-
|
|
21411
|
-
|
|
21412
|
-
|
|
21413
|
-
|
|
21414
|
-
|
|
21867
|
+
return {
|
|
21868
|
+
display: 'flex',
|
|
21869
|
+
flexDirection: layout === 'vertical' ? 'column' : 'row',
|
|
21870
|
+
flexWrap: layout === 'wrap' ? 'wrap' : 'nowrap',
|
|
21871
|
+
gap: 1
|
|
21872
|
+
};
|
|
21873
|
+
};
|
|
21874
|
+
return jsxs(Box, {
|
|
21875
|
+
...restProps,
|
|
21876
|
+
children: [label && jsx(Box, {
|
|
21877
|
+
component: "label",
|
|
21878
|
+
sx: {
|
|
21879
|
+
display: 'block',
|
|
21880
|
+
mb: 1,
|
|
21881
|
+
fontSize: '0.875rem',
|
|
21882
|
+
fontWeight: 500,
|
|
21883
|
+
color: 'var(--theme-text-primary)'
|
|
21884
|
+
},
|
|
21885
|
+
children: label
|
|
21886
|
+
}), jsx(Box, {
|
|
21887
|
+
sx: getLayoutStyles(),
|
|
21888
|
+
children: options.map(option => {
|
|
21889
|
+
const isSelected = selectedOption === option.id;
|
|
21890
|
+
const isAvailable = option.available;
|
|
21891
|
+
// Text mode - render as buttons
|
|
21892
|
+
if (displayMode === 'text') {
|
|
21893
|
+
const button = jsx(Button$1, {
|
|
21894
|
+
onClick: () => handleOptionClick(option.id, isAvailable),
|
|
21895
|
+
disabled: disabled || !isAvailable,
|
|
21896
|
+
variant: isSelected ? 'contained' : 'outlined',
|
|
21897
|
+
sx: {
|
|
21898
|
+
minWidth: variant === 'grid' ? '60px' : '80px',
|
|
21899
|
+
height: `${sizeInPx}px`,
|
|
21900
|
+
borderRadius: 'var(--theme-border-radius-small)',
|
|
21901
|
+
textTransform: 'uppercase',
|
|
21902
|
+
fontWeight: 600,
|
|
21903
|
+
fontSize: '0.875rem',
|
|
21904
|
+
backgroundColor: isSelected ? 'var(--theme-primary)' : 'var(--theme-surface)',
|
|
21905
|
+
color: isSelected ? 'var(--theme-text-on-primary)' : 'var(--theme-text-primary)',
|
|
21906
|
+
borderColor: isSelected ? 'var(--theme-primary)' : 'var(--theme-border-main)',
|
|
21907
|
+
borderWidth: '2px',
|
|
21908
|
+
borderStyle: 'solid',
|
|
21909
|
+
'&.Mui-disabled': {
|
|
21910
|
+
backgroundColor: 'var(--theme-surface-variant)',
|
|
21911
|
+
color: 'var(--theme-text-disabled)',
|
|
21912
|
+
borderColor: 'var(--theme-border-light)',
|
|
21913
|
+
opacity: 0.5,
|
|
21914
|
+
textDecoration: 'line-through'
|
|
21915
|
+
},
|
|
21916
|
+
'&:hover:not(.Mui-disabled)': {
|
|
21917
|
+
backgroundColor: !isSelected ? 'var(--theme-surface-variant)' : undefined,
|
|
21918
|
+
borderColor: !isSelected ? 'var(--theme-border-emphasis)' : undefined,
|
|
21919
|
+
boxShadow: 'var(--theme-elevation-1)'
|
|
21920
|
+
},
|
|
21921
|
+
transition: 'all 0.2s ease-in-out'
|
|
21922
|
+
},
|
|
21923
|
+
children: option.label
|
|
21924
|
+
}, option.id);
|
|
21925
|
+
return !isAvailable ? jsx(Tooltip, {
|
|
21926
|
+
title: "Not available",
|
|
21927
|
+
arrow: true,
|
|
21928
|
+
sx: {
|
|
21929
|
+
'& .MuiTooltip-tooltip': {
|
|
21930
|
+
backgroundColor: 'var(--theme-surface)',
|
|
21931
|
+
color: 'var(--theme-text-primary)',
|
|
21932
|
+
border: '1px solid var(--theme-border-main)',
|
|
21933
|
+
boxShadow: 'var(--theme-elevation-2)'
|
|
21934
|
+
},
|
|
21935
|
+
'& .MuiTooltip-arrow': {
|
|
21936
|
+
color: 'var(--theme-surface)'
|
|
21937
|
+
}
|
|
21938
|
+
},
|
|
21939
|
+
children: jsx("span", {
|
|
21940
|
+
children: button
|
|
21941
|
+
})
|
|
21942
|
+
}, option.id) : button;
|
|
21943
|
+
}
|
|
21944
|
+
// Color/Image mode - render as visual swatches
|
|
21945
|
+
const swatchContent = jsxs(Box, {
|
|
21946
|
+
onClick: () => handleOptionClick(option.id, isAvailable),
|
|
21947
|
+
sx: {
|
|
21948
|
+
display: 'flex',
|
|
21949
|
+
flexDirection: 'column',
|
|
21950
|
+
alignItems: 'center',
|
|
21951
|
+
gap: 0.5,
|
|
21952
|
+
cursor: disabled || !isAvailable ? 'not-allowed' : 'pointer',
|
|
21953
|
+
opacity: disabled || !isAvailable ? 0.5 : 1
|
|
21954
|
+
},
|
|
21955
|
+
children: [jsx(Box, {
|
|
21956
|
+
sx: {
|
|
21957
|
+
position: 'relative',
|
|
21958
|
+
width: sizeInPx,
|
|
21959
|
+
height: sizeInPx,
|
|
21960
|
+
borderRadius: displayMode === 'color' ? '50%' : 'var(--theme-border-radius-small)',
|
|
21961
|
+
backgroundColor: option.hexValue || 'var(--theme-surface-variant)',
|
|
21962
|
+
backgroundImage: option.imageUrl ? `url(${option.imageUrl})` : undefined,
|
|
21963
|
+
backgroundSize: 'cover',
|
|
21964
|
+
backgroundPosition: 'center',
|
|
21965
|
+
border: '2px solid',
|
|
21966
|
+
borderColor: isSelected ? 'var(--theme-primary)' : 'var(--theme-border-main)',
|
|
21967
|
+
boxShadow: isSelected ? 'var(--theme-elevation-2)' : 'none',
|
|
21968
|
+
transition: 'all 0.2s ease-in-out',
|
|
21969
|
+
...(isAvailable && !disabled && !isSelected && {
|
|
21970
|
+
'&:hover': {
|
|
21971
|
+
borderColor: 'var(--theme-border-emphasis)',
|
|
21972
|
+
boxShadow: 'var(--theme-elevation-1)',
|
|
21973
|
+
transform: 'scale(1.05)'
|
|
21974
|
+
}
|
|
21975
|
+
}),
|
|
21976
|
+
...(!isAvailable && {
|
|
21977
|
+
'&::after': {
|
|
21978
|
+
content: '""',
|
|
21979
|
+
position: 'absolute',
|
|
21980
|
+
top: '50%',
|
|
21981
|
+
left: '10%',
|
|
21982
|
+
right: '10%',
|
|
21983
|
+
height: '2px',
|
|
21984
|
+
backgroundColor: 'var(--theme-border-emphasis)',
|
|
21985
|
+
transform: 'translateY(-50%) rotate(-45deg)'
|
|
21986
|
+
}
|
|
21987
|
+
})
|
|
21988
|
+
},
|
|
21989
|
+
children: isSelected && jsx(Box, {
|
|
21990
|
+
sx: {
|
|
21991
|
+
position: 'absolute',
|
|
21992
|
+
top: '50%',
|
|
21993
|
+
left: '50%',
|
|
21994
|
+
transform: 'translate(-50%, -50%)',
|
|
21995
|
+
display: 'flex',
|
|
21996
|
+
alignItems: 'center',
|
|
21997
|
+
justifyContent: 'center',
|
|
21998
|
+
width: '100%',
|
|
21999
|
+
height: '100%',
|
|
22000
|
+
borderRadius: 'inherit',
|
|
22001
|
+
backgroundColor: 'rgba(0, 0, 0, 0.3)'
|
|
22002
|
+
},
|
|
22003
|
+
children: jsx(Check, {
|
|
22004
|
+
sx: {
|
|
22005
|
+
color: 'white',
|
|
22006
|
+
fontSize: sizeInPx * 0.5,
|
|
22007
|
+
filter: 'drop-shadow(0 1px 2px rgba(0,0,0,0.5))'
|
|
22008
|
+
}
|
|
22009
|
+
})
|
|
22010
|
+
})
|
|
22011
|
+
}), showLabel && jsx(Box, {
|
|
22012
|
+
sx: {
|
|
22013
|
+
fontSize: '0.75rem',
|
|
22014
|
+
color: 'var(--theme-text-secondary)',
|
|
22015
|
+
textAlign: 'center',
|
|
22016
|
+
maxWidth: sizeInPx + 16,
|
|
22017
|
+
overflow: 'hidden',
|
|
22018
|
+
textOverflow: 'ellipsis',
|
|
22019
|
+
whiteSpace: 'nowrap'
|
|
22020
|
+
},
|
|
22021
|
+
children: option.label
|
|
22022
|
+
})]
|
|
22023
|
+
}, option.id);
|
|
22024
|
+
return jsx(Tooltip, {
|
|
22025
|
+
title: !isAvailable ? 'Not available' : option.label,
|
|
22026
|
+
arrow: true,
|
|
22027
|
+
sx: {
|
|
22028
|
+
'& .MuiTooltip-tooltip': {
|
|
22029
|
+
backgroundColor: 'var(--theme-surface)',
|
|
22030
|
+
color: 'var(--theme-text-primary)',
|
|
22031
|
+
border: '1px solid var(--theme-border-main)',
|
|
22032
|
+
boxShadow: 'var(--theme-elevation-2)'
|
|
22033
|
+
},
|
|
22034
|
+
'& .MuiTooltip-arrow': {
|
|
22035
|
+
color: 'var(--theme-surface)'
|
|
22036
|
+
}
|
|
22037
|
+
},
|
|
22038
|
+
children: swatchContent
|
|
22039
|
+
}, option.id);
|
|
22040
|
+
})
|
|
22041
|
+
})]
|
|
21415
22042
|
});
|
|
21416
22043
|
}
|
|
22044
|
+
// Create the serializable component
|
|
22045
|
+
const OptionSelector = createSerializableView({
|
|
22046
|
+
tagName: 'OptionSelector',
|
|
22047
|
+
version: '1.0.0',
|
|
22048
|
+
role: 'view',
|
|
22049
|
+
View: OptionSelectorView
|
|
22050
|
+
});
|
|
21417
22051
|
|
|
21418
22052
|
// Default render function based on component type
|
|
21419
22053
|
const getDefaultRenderItem = (renderComponent = 'ProductCard', itemProps = {}) => {
|
|
@@ -31434,6 +32068,299 @@ __decorate([Field({
|
|
|
31434
32068
|
}), IsOptional(), IsNumber(), Min(1), Max(10), __metadata("design:type", Number)], ProductCardModel.prototype, "maxFeaturesCompact", void 0);
|
|
31435
32069
|
ProductCardModel = __decorate([Schema('ProductCard', '1.0.0')], ProductCardModel);
|
|
31436
32070
|
|
|
32071
|
+
/**
|
|
32072
|
+
* Schema for ImageGallery component - Image gallery with multiple view variants
|
|
32073
|
+
*
|
|
32074
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
32075
|
+
*/
|
|
32076
|
+
// Product image interface
|
|
32077
|
+
class GalleryImageModel {}
|
|
32078
|
+
__decorate([Field({
|
|
32079
|
+
dataType: DataType.STRING
|
|
32080
|
+
}), IsString(), __metadata("design:type", String)], GalleryImageModel.prototype, "url", void 0);
|
|
32081
|
+
__decorate([Field({
|
|
32082
|
+
dataType: DataType.STRING
|
|
32083
|
+
}), IsString(), __metadata("design:type", String)], GalleryImageModel.prototype, "alt", void 0);
|
|
32084
|
+
__decorate([Field({
|
|
32085
|
+
dataType: DataType.STRING
|
|
32086
|
+
}), IsOptional(), IsString(), __metadata("design:type", String)], GalleryImageModel.prototype, "thumbnail", void 0);
|
|
32087
|
+
let ImageGalleryModel = class ImageGalleryModel extends ViewSchema {};
|
|
32088
|
+
__decorate([Field({
|
|
32089
|
+
dataType: DataType.ARRAY
|
|
32090
|
+
}), Editor({
|
|
32091
|
+
field_type: FieldType.ARRAY,
|
|
32092
|
+
label: 'Product Images',
|
|
32093
|
+
description: 'Array of product images to display in the gallery'
|
|
32094
|
+
}), IsArray(), ValidateNested({
|
|
32095
|
+
each: true
|
|
32096
|
+
}), Type(() => GalleryImageModel), __metadata("design:type", Array)], ImageGalleryModel.prototype, "images", void 0);
|
|
32097
|
+
__decorate([Field({
|
|
32098
|
+
dataType: DataType.STRING
|
|
32099
|
+
}), Editor({
|
|
32100
|
+
field_type: FieldType.TEXT,
|
|
32101
|
+
label: 'Product Name',
|
|
32102
|
+
description: 'Product name for accessibility',
|
|
32103
|
+
placeholder: 'Premium Cotton T-Shirt'
|
|
32104
|
+
}), IsString(), __metadata("design:type", String)], ImageGalleryModel.prototype, "productName", void 0);
|
|
32105
|
+
__decorate([Field({
|
|
32106
|
+
defaultValue: 'thumbnails',
|
|
32107
|
+
dataType: DataType.STRING
|
|
32108
|
+
}), Editor({
|
|
32109
|
+
field_type: FieldType.SELECT,
|
|
32110
|
+
label: 'Gallery Variant',
|
|
32111
|
+
description: 'Display variant for the gallery',
|
|
32112
|
+
validation: {
|
|
32113
|
+
options: [{
|
|
32114
|
+
label: 'Thumbnails',
|
|
32115
|
+
value: 'thumbnails'
|
|
32116
|
+
}, {
|
|
32117
|
+
label: 'Carousel',
|
|
32118
|
+
value: 'carousel'
|
|
32119
|
+
}, {
|
|
32120
|
+
label: 'Grid',
|
|
32121
|
+
value: 'grid'
|
|
32122
|
+
}]
|
|
32123
|
+
}
|
|
32124
|
+
}), IsOptional(), IsString(), IsIn(['thumbnails', 'carousel', 'grid']), __metadata("design:type", String)], ImageGalleryModel.prototype, "variant", void 0);
|
|
32125
|
+
__decorate([Field({
|
|
32126
|
+
defaultValue: 'left',
|
|
32127
|
+
dataType: DataType.STRING
|
|
32128
|
+
}), Editor({
|
|
32129
|
+
field_type: FieldType.SELECT,
|
|
32130
|
+
label: 'Thumbnail Position',
|
|
32131
|
+
description: 'Position of thumbnails (only for thumbnails variant)',
|
|
32132
|
+
validation: {
|
|
32133
|
+
options: [{
|
|
32134
|
+
label: 'Left',
|
|
32135
|
+
value: 'left'
|
|
32136
|
+
}, {
|
|
32137
|
+
label: 'Bottom',
|
|
32138
|
+
value: 'bottom'
|
|
32139
|
+
}, {
|
|
32140
|
+
label: 'Right',
|
|
32141
|
+
value: 'right'
|
|
32142
|
+
}]
|
|
32143
|
+
}
|
|
32144
|
+
}), IsOptional(), IsString(), IsIn(['left', 'bottom', 'right']), __metadata("design:type", String)], ImageGalleryModel.prototype, "thumbnailPosition", void 0);
|
|
32145
|
+
__decorate([Field({
|
|
32146
|
+
defaultValue: '1',
|
|
32147
|
+
dataType: DataType.STRING
|
|
32148
|
+
}), Editor({
|
|
32149
|
+
field_type: FieldType.TEXT,
|
|
32150
|
+
label: 'Aspect Ratio',
|
|
32151
|
+
description: 'Aspect ratio for main image (e.g., "1", "4/3", "16/9")',
|
|
32152
|
+
placeholder: '1'
|
|
32153
|
+
}), IsOptional(), IsString(), __metadata("design:type", String)], ImageGalleryModel.prototype, "aspectRatio", void 0);
|
|
32154
|
+
__decorate([Field({
|
|
32155
|
+
defaultValue: true,
|
|
32156
|
+
dataType: DataType.BOOLEAN
|
|
32157
|
+
}), Editor({
|
|
32158
|
+
field_type: FieldType.BOOLEAN,
|
|
32159
|
+
label: 'Show Zoom',
|
|
32160
|
+
description: 'Enable zoom functionality for images'
|
|
32161
|
+
}), IsOptional(), IsBoolean(), __metadata("design:type", Boolean)], ImageGalleryModel.prototype, "showZoom", void 0);
|
|
32162
|
+
__decorate([Field({
|
|
32163
|
+
dataType: DataType.NUMBER
|
|
32164
|
+
}), Editor({
|
|
32165
|
+
field_type: FieldType.NUMBER,
|
|
32166
|
+
label: 'Max Images',
|
|
32167
|
+
description: 'Maximum number of images to display (leave empty for all)',
|
|
32168
|
+
placeholder: '8'
|
|
32169
|
+
}), IsOptional(), IsNumber(), __metadata("design:type", Number)], ImageGalleryModel.prototype, "maxImages", void 0);
|
|
32170
|
+
__decorate([Field({
|
|
32171
|
+
dataType: DataType.STRING
|
|
32172
|
+
}), Editor({
|
|
32173
|
+
field_type: FieldType.TEXT,
|
|
32174
|
+
label: 'Data Source',
|
|
32175
|
+
description: 'Data source for dynamic image loading',
|
|
32176
|
+
placeholder: 'product-images'
|
|
32177
|
+
}), IsOptional(), IsString(), __metadata("design:type", String)], ImageGalleryModel.prototype, "dataSource", void 0);
|
|
32178
|
+
__decorate([Field({
|
|
32179
|
+
dataType: DataType.OBJECT
|
|
32180
|
+
}), Editor({
|
|
32181
|
+
field_type: FieldType.TEXTAREA,
|
|
32182
|
+
label: 'Binding Options',
|
|
32183
|
+
description: 'Data binding configuration (JSON format)',
|
|
32184
|
+
placeholder: '{ "filter": {}, "sort": {} }'
|
|
32185
|
+
}), IsOptional(), __metadata("design:type", Object)], ImageGalleryModel.prototype, "bindingOptions", void 0);
|
|
32186
|
+
ImageGalleryModel = __decorate([Schema('ImageGallery', '1.0.0')], ImageGalleryModel);
|
|
32187
|
+
|
|
32188
|
+
/**
|
|
32189
|
+
* Schema for OptionSelector component - Universal option selection with visual modes
|
|
32190
|
+
*
|
|
32191
|
+
* Copyright (c) 2025 QwickApps.com. All rights reserved.
|
|
32192
|
+
*/
|
|
32193
|
+
// Select option model
|
|
32194
|
+
class SelectOptionModel {}
|
|
32195
|
+
__decorate([Field({
|
|
32196
|
+
dataType: DataType.STRING
|
|
32197
|
+
}), IsString(), __metadata("design:type", String)], SelectOptionModel.prototype, "id", void 0);
|
|
32198
|
+
__decorate([Field({
|
|
32199
|
+
dataType: DataType.STRING
|
|
32200
|
+
}), IsString(), __metadata("design:type", String)], SelectOptionModel.prototype, "label", void 0);
|
|
32201
|
+
__decorate([Field({
|
|
32202
|
+
dataType: DataType.BOOLEAN
|
|
32203
|
+
}), IsBoolean(), __metadata("design:type", Boolean)], SelectOptionModel.prototype, "available", void 0);
|
|
32204
|
+
__decorate([Field({
|
|
32205
|
+
dataType: DataType.NUMBER
|
|
32206
|
+
}), IsOptional(), IsNumber(), __metadata("design:type", Number)], SelectOptionModel.prototype, "price", void 0);
|
|
32207
|
+
__decorate([Field({
|
|
32208
|
+
dataType: DataType.STRING
|
|
32209
|
+
}), Editor({
|
|
32210
|
+
field_type: FieldType.TEXT,
|
|
32211
|
+
label: 'Hex Color Value',
|
|
32212
|
+
description: 'Hex color code for color swatches (e.g., #FF0000)',
|
|
32213
|
+
placeholder: '#FF0000'
|
|
32214
|
+
}), IsOptional(), IsString(), __metadata("design:type", String)], SelectOptionModel.prototype, "hexValue", void 0);
|
|
32215
|
+
__decorate([Field({
|
|
32216
|
+
dataType: DataType.STRING
|
|
32217
|
+
}), Editor({
|
|
32218
|
+
field_type: FieldType.TEXT,
|
|
32219
|
+
label: 'Image URL',
|
|
32220
|
+
description: 'Image URL for image/pattern display mode',
|
|
32221
|
+
placeholder: '/patterns/stripes.jpg'
|
|
32222
|
+
}), IsOptional(), IsString(), __metadata("design:type", String)], SelectOptionModel.prototype, "imageUrl", void 0);
|
|
32223
|
+
let OptionSelectorModel = class OptionSelectorModel extends ViewSchema {};
|
|
32224
|
+
__decorate([Field({
|
|
32225
|
+
dataType: DataType.ARRAY
|
|
32226
|
+
}), Editor({
|
|
32227
|
+
field_type: FieldType.ARRAY,
|
|
32228
|
+
label: 'Available Options',
|
|
32229
|
+
description: 'Array of options to display'
|
|
32230
|
+
}), IsArray(), ValidateNested({
|
|
32231
|
+
each: true
|
|
32232
|
+
}), Type(() => SelectOptionModel), __metadata("design:type", Array)], OptionSelectorModel.prototype, "options", void 0);
|
|
32233
|
+
__decorate([Field({
|
|
32234
|
+
dataType: DataType.STRING
|
|
32235
|
+
}), Editor({
|
|
32236
|
+
field_type: FieldType.TEXT,
|
|
32237
|
+
label: 'Selected Option',
|
|
32238
|
+
description: 'Currently selected option ID',
|
|
32239
|
+
placeholder: 'm'
|
|
32240
|
+
}), IsOptional(), IsString(), __metadata("design:type", String)], OptionSelectorModel.prototype, "selectedOption", void 0);
|
|
32241
|
+
__decorate([Field({
|
|
32242
|
+
defaultValue: 'text',
|
|
32243
|
+
dataType: DataType.STRING
|
|
32244
|
+
}), Editor({
|
|
32245
|
+
field_type: FieldType.SELECT,
|
|
32246
|
+
label: 'Display Mode',
|
|
32247
|
+
description: 'Visual display mode for options',
|
|
32248
|
+
validation: {
|
|
32249
|
+
options: [{
|
|
32250
|
+
label: 'Text (buttons with labels)',
|
|
32251
|
+
value: 'text'
|
|
32252
|
+
}, {
|
|
32253
|
+
label: 'Color (swatches)',
|
|
32254
|
+
value: 'color'
|
|
32255
|
+
}, {
|
|
32256
|
+
label: 'Image (patterns/textures)',
|
|
32257
|
+
value: 'image'
|
|
32258
|
+
}]
|
|
32259
|
+
}
|
|
32260
|
+
}), IsOptional(), IsString(), IsIn(['text', 'color', 'image']), __metadata("design:type", String)], OptionSelectorModel.prototype, "displayMode", void 0);
|
|
32261
|
+
__decorate([Field({
|
|
32262
|
+
defaultValue: 'grid',
|
|
32263
|
+
dataType: DataType.STRING
|
|
32264
|
+
}), Editor({
|
|
32265
|
+
field_type: FieldType.SELECT,
|
|
32266
|
+
label: 'Display Variant',
|
|
32267
|
+
description: 'How to display the selector',
|
|
32268
|
+
validation: {
|
|
32269
|
+
options: [{
|
|
32270
|
+
label: 'Buttons',
|
|
32271
|
+
value: 'buttons'
|
|
32272
|
+
}, {
|
|
32273
|
+
label: 'Dropdown',
|
|
32274
|
+
value: 'dropdown'
|
|
32275
|
+
}, {
|
|
32276
|
+
label: 'Grid',
|
|
32277
|
+
value: 'grid'
|
|
32278
|
+
}]
|
|
32279
|
+
}
|
|
32280
|
+
}), IsOptional(), IsString(), IsIn(['buttons', 'dropdown', 'grid']), __metadata("design:type", String)], OptionSelectorModel.prototype, "variant", void 0);
|
|
32281
|
+
__decorate([Field({
|
|
32282
|
+
defaultValue: 'wrap',
|
|
32283
|
+
dataType: DataType.STRING
|
|
32284
|
+
}), Editor({
|
|
32285
|
+
field_type: FieldType.SELECT,
|
|
32286
|
+
label: 'Layout Direction',
|
|
32287
|
+
description: 'Layout direction for buttons/grid variant',
|
|
32288
|
+
validation: {
|
|
32289
|
+
options: [{
|
|
32290
|
+
label: 'Horizontal',
|
|
32291
|
+
value: 'horizontal'
|
|
32292
|
+
}, {
|
|
32293
|
+
label: 'Vertical',
|
|
32294
|
+
value: 'vertical'
|
|
32295
|
+
}, {
|
|
32296
|
+
label: 'Wrap',
|
|
32297
|
+
value: 'wrap'
|
|
32298
|
+
}]
|
|
32299
|
+
}
|
|
32300
|
+
}), IsOptional(), IsString(), IsIn(['horizontal', 'vertical', 'wrap']), __metadata("design:type", String)], OptionSelectorModel.prototype, "layout", void 0);
|
|
32301
|
+
__decorate([Field({
|
|
32302
|
+
defaultValue: 'medium',
|
|
32303
|
+
dataType: DataType.STRING
|
|
32304
|
+
}), Editor({
|
|
32305
|
+
field_type: FieldType.SELECT,
|
|
32306
|
+
label: 'Visual Size',
|
|
32307
|
+
description: 'Size for color/image display modes',
|
|
32308
|
+
validation: {
|
|
32309
|
+
options: [{
|
|
32310
|
+
label: 'Small (32px)',
|
|
32311
|
+
value: 'small'
|
|
32312
|
+
}, {
|
|
32313
|
+
label: 'Medium (44px)',
|
|
32314
|
+
value: 'medium'
|
|
32315
|
+
}, {
|
|
32316
|
+
label: 'Large (56px)',
|
|
32317
|
+
value: 'large'
|
|
32318
|
+
}]
|
|
32319
|
+
}
|
|
32320
|
+
}), IsOptional(), IsString(), IsIn(['small', 'medium', 'large']), __metadata("design:type", String)], OptionSelectorModel.prototype, "visualSize", void 0);
|
|
32321
|
+
__decorate([Field({
|
|
32322
|
+
defaultValue: false,
|
|
32323
|
+
dataType: DataType.BOOLEAN
|
|
32324
|
+
}), Editor({
|
|
32325
|
+
field_type: FieldType.BOOLEAN,
|
|
32326
|
+
label: 'Show Label',
|
|
32327
|
+
description: 'Show label below visual (for color/image modes)'
|
|
32328
|
+
}), IsOptional(), IsBoolean(), __metadata("design:type", Boolean)], OptionSelectorModel.prototype, "showLabel", void 0);
|
|
32329
|
+
__decorate([Field({
|
|
32330
|
+
defaultValue: false,
|
|
32331
|
+
dataType: DataType.BOOLEAN
|
|
32332
|
+
}), Editor({
|
|
32333
|
+
field_type: FieldType.BOOLEAN,
|
|
32334
|
+
label: 'Disabled',
|
|
32335
|
+
description: 'Disable all option selections'
|
|
32336
|
+
}), IsOptional(), IsBoolean(), __metadata("design:type", Boolean)], OptionSelectorModel.prototype, "disabled", void 0);
|
|
32337
|
+
__decorate([Field({
|
|
32338
|
+
defaultValue: 'Select Option',
|
|
32339
|
+
dataType: DataType.STRING
|
|
32340
|
+
}), Editor({
|
|
32341
|
+
field_type: FieldType.TEXT,
|
|
32342
|
+
label: 'Label',
|
|
32343
|
+
description: 'Label text for the selector',
|
|
32344
|
+
placeholder: 'Select Option'
|
|
32345
|
+
}), IsOptional(), IsString(), __metadata("design:type", String)], OptionSelectorModel.prototype, "label", void 0);
|
|
32346
|
+
__decorate([Field({
|
|
32347
|
+
dataType: DataType.STRING
|
|
32348
|
+
}), Editor({
|
|
32349
|
+
field_type: FieldType.TEXT,
|
|
32350
|
+
label: 'Data Source',
|
|
32351
|
+
description: 'Data source for dynamic option loading',
|
|
32352
|
+
placeholder: 'product-options'
|
|
32353
|
+
}), IsOptional(), IsString(), __metadata("design:type", String)], OptionSelectorModel.prototype, "dataSource", void 0);
|
|
32354
|
+
__decorate([Field({
|
|
32355
|
+
dataType: DataType.OBJECT
|
|
32356
|
+
}), Editor({
|
|
32357
|
+
field_type: FieldType.TEXTAREA,
|
|
32358
|
+
label: 'Binding Options',
|
|
32359
|
+
description: 'Data binding configuration (JSON format)',
|
|
32360
|
+
placeholder: '{ "filter": {}, "sort": {} }'
|
|
32361
|
+
}), IsOptional(), __metadata("design:type", Object)], OptionSelectorModel.prototype, "bindingOptions", void 0);
|
|
32362
|
+
OptionSelectorModel = __decorate([Schema('OptionSelector', '1.0.0')], OptionSelectorModel);
|
|
32363
|
+
|
|
31437
32364
|
/**
|
|
31438
32365
|
* Schema for SafeSpan component - Safely renders HTML content with sanitization
|
|
31439
32366
|
*
|
|
@@ -32312,4 +33239,4 @@ __decorate([Field({
|
|
|
32312
33239
|
}), IsOptional(), __metadata("design:type", Boolean)], PageTemplateSchema.prototype, "indexable", void 0);
|
|
32313
33240
|
PageTemplateSchema = __decorate([Schema('PageTemplate', '1.0.0')], PageTemplateSchema);
|
|
32314
33241
|
|
|
32315
|
-
export { AVAILABLE_PALETTES, AccessibilityProvider, ActionModel, ActionType, AllPalettes, AppConfig, AppConfigBuilder, Article, ArticleModel, Breadcrumbs, Button, Captcha, CardListGrid, CardListGridModel, ChoiceInputField, ChoiceInputFieldModel, Code, CodeModel, CollapsibleLayout, CollapsibleLayoutView, ComponentTransformer$1 as ComponentTransformer, Container$8 as Container, Content, ContentModel, CoverImageHeader, CoverImageHeaderModel, DataProvider, DataProxy, DataTable, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, DimensionsProvider, ErrorBoundary, FeatureCard, FeatureCardActionModel, FeatureCardModel, FeatureGrid, FeatureGridModel, FeatureItemModel, Footer, FooterItemModel, FooterModel, FooterSectionModel, FormBlock, FormBlockModel, FormCheckbox, FormField, FormMethod, FormPage, FormSelect, GridCell, GridCellModel, GridLayout, GridLayoutModel, HeaderActionModel, HeroBlock, HeroBlockModel, Html, HtmlInputField, HtmlModel, Image, ImageModel, Logo, Markdown, MarkdownModel, MetadataItemModel, ModelView, NavigationProvider, Page, PageBannerHeader, PageBannerHeaderModel, PageTemplateSchema, PaletteAutumn, PaletteCosmic, PaletteDefault, PaletteOcean, PaletteProvider, PaletteSpring, PaletteSwitcher, PaletteSwitcherModel, PaletteWinter, PrintConfigSchema, PrintModeProvider, ProductCard, ProductCardActionModel, ProductCardModel, ProductLogo, ProductModel, QWICKAPP_COMPONENT, QwickApp, QwickAppsLogo, QwickIcon, ResponsiveMenu, SafeSpan, SafeSpanModel, Scaffold, SchemaFormRenderer, Section, SectionModel, SelectInputField, StatCard, SwitchInputField, T, Text$1 as Text, TextField, TextInputField, TextInputFieldModel, TextModel, ThemeProvider, ThemeSwitcher, ThemeSwitcherModel, ViewSchema, animationConfigs, applyCustomPalette, clearManifestCache, clearPaletteCache, clearUserPalettePreference, clearUserThemePreference, configurePaletteLoader, createAppConfig, createModelViewClass, createPaletteFromCurrentTheme, createSerializableView, defaultCollapsibleLayoutProps, deleteCustomPalette, exportPalette, extractTextFromReactNode, getAvailablePalettes, getCSSVariable, getComputedTheme, getCurrentPalette, getCurrentTheme, getCustomPalettes, getIconComponent, getIconEmoji, getLogger, getPaletteConfig, getPaletteFromManifest, getPaletteName, getRegisteredIcons, getSystemTheme, getThemePerformanceStats, hasIcon, iconMap, importPalette, initializePalette, initializeTheme, isCollapsibleLayoutProps, isPaletteLoaded, loadPalette, loadPaletteManifest, loadUserPalettePreference, loadUserThemePreference, logThemePerformanceStats, loggers, preloadPalettes, registerCustomPalette, registerIcon, resetThemePerformanceStats, resolveDimension, resolveDimensions, resolveSpacing, resolveSpacingProps, saveCustomPalette, savePalettePreference, saveThemePreference, saveUserPalettePreference, saveUserThemePreference, setCSSVariable, setPalette, setTheme, spacingConfigs, t, toCssLength, useAccessibility, useBaseProps, useBreadcrumbs, useCollapsibleState, useData, useDataBinding, useDataContext, useDataProvider, useDimensions, useNavigation, usePageContext, usePalette, usePrintMode$1 as usePrintMode, usePrintMode as usePrintModeHook, useQwickApp, useResolveTemplate, useTemplate, useTheme, withAccessibility, withErrorBoundary };
|
|
33242
|
+
export { AVAILABLE_PALETTES, AccessibilityProvider, ActionModel, ActionType, AllPalettes, AppConfig, AppConfigBuilder, Article, ArticleModel, Breadcrumbs, Button, Captcha, CardListGrid, CardListGridModel, ChoiceInputField, ChoiceInputFieldModel, Code, CodeModel, CollapsibleLayout, CollapsibleLayoutView, ComponentTransformer$1 as ComponentTransformer, Container$8 as Container, Content, ContentModel, CoverImageHeader, CoverImageHeaderModel, DataProvider, DataProxy, DataTable, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, DimensionsProvider, ErrorBoundary, FeatureCard, FeatureCardActionModel, FeatureCardModel, FeatureGrid, FeatureGridModel, FeatureItemModel, Footer, FooterItemModel, FooterModel, FooterSectionModel, FormBlock, FormBlockModel, FormCheckbox, FormField, FormMethod, FormPage, FormSelect, GalleryImageModel, GridCell, GridCellModel, GridLayout, GridLayoutModel, HeaderActionModel, HeroBlock, HeroBlockModel, Html, HtmlInputField, HtmlModel, Image, ImageGallery, ImageGalleryModel, ImageModel, Logo, Markdown, MarkdownModel, MetadataItemModel, ModelView, NavigationProvider, OptionSelector, OptionSelectorModel, Page, PageBannerHeader, PageBannerHeaderModel, PageTemplateSchema, PaletteAutumn, PaletteCosmic, PaletteDefault, PaletteOcean, PaletteProvider, PaletteSpring, PaletteSwitcher, PaletteSwitcherModel, PaletteWinter, PrintConfigSchema, PrintModeProvider, ProductCard, ProductCardActionModel, ProductCardModel, ProductLogo, ProductModel, QWICKAPP_COMPONENT, QwickApp, QwickAppsLogo, QwickIcon, ResponsiveMenu, SafeSpan, SafeSpanModel, Scaffold, SchemaFormRenderer, Section, SectionModel, SelectInputField, SelectOptionModel, StatCard, SwitchInputField, T, Text$1 as Text, TextField, TextInputField, TextInputFieldModel, TextModel, ThemeProvider, ThemeSwitcher, ThemeSwitcherModel, ViewSchema, animationConfigs, applyCustomPalette, clearManifestCache, clearPaletteCache, clearUserPalettePreference, clearUserThemePreference, configurePaletteLoader, createAppConfig, createModelViewClass, createPaletteFromCurrentTheme, createSerializableView, defaultCollapsibleLayoutProps, deleteCustomPalette, exportPalette, extractTextFromReactNode, getAvailablePalettes, getCSSVariable, getComputedTheme, getCurrentPalette, getCurrentTheme, getCustomPalettes, getIconComponent, getIconEmoji, getLogger, getPaletteConfig, getPaletteFromManifest, getPaletteName, getRegisteredIcons, getSystemTheme, getThemePerformanceStats, hasIcon, iconMap, importPalette, initializePalette, initializeTheme, isCollapsibleLayoutProps, isPaletteLoaded, loadPalette, loadPaletteManifest, loadUserPalettePreference, loadUserThemePreference, logThemePerformanceStats, loggers, preloadPalettes, registerCustomPalette, registerIcon, resetThemePerformanceStats, resolveDimension, resolveDimensions, resolveSpacing, resolveSpacingProps, saveCustomPalette, savePalettePreference, saveThemePreference, saveUserPalettePreference, saveUserThemePreference, setCSSVariable, setPalette, setTheme, spacingConfigs, t, toCssLength, useAccessibility, useBaseProps, useBreadcrumbs, useCollapsibleState, useData, useDataBinding, useDataContext, useDataProvider, useDimensions, useNavigation, usePageContext, usePalette, usePrintMode$1 as usePrintMode, usePrintMode as usePrintModeHook, useQwickApp, useResolveTemplate, useTemplate, useTheme, withAccessibility, withErrorBoundary };
|