@actdim/dynstruct-mui 0.9.2 → 1.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +91 -91
  2. package/dist/Accordion.d.ts +19 -0
  3. package/dist/Accordion.d.ts.map +1 -0
  4. package/dist/Accordion.es.js.map +1 -1
  5. package/dist/Alert.d.ts +18 -0
  6. package/dist/Alert.d.ts.map +1 -0
  7. package/dist/Alert.es.js.map +1 -1
  8. package/dist/Autocomplete.d.ts +26 -0
  9. package/dist/Autocomplete.d.ts.map +1 -0
  10. package/dist/Autocomplete.es.js.map +1 -1
  11. package/dist/Avatar.d.ts +18 -0
  12. package/dist/Avatar.d.ts.map +1 -0
  13. package/dist/Avatar.es.js.map +1 -1
  14. package/dist/Badge.d.ts +21 -0
  15. package/dist/Badge.d.ts.map +1 -0
  16. package/dist/Badge.es.js.map +1 -1
  17. package/dist/Breadcrumbs.d.ts +22 -0
  18. package/dist/Breadcrumbs.d.ts.map +1 -0
  19. package/dist/Breadcrumbs.es.js.map +1 -1
  20. package/dist/Button.d.ts +23 -0
  21. package/dist/Button.d.ts.map +1 -0
  22. package/dist/Button.es.js.map +1 -1
  23. package/dist/Card.d.ts +21 -0
  24. package/dist/Card.d.ts.map +1 -0
  25. package/dist/Card.es.js.map +1 -1
  26. package/dist/Checkbox.d.ts +22 -0
  27. package/dist/Checkbox.d.ts.map +1 -0
  28. package/dist/Checkbox.es.js.map +1 -1
  29. package/dist/Chip.d.ts +21 -0
  30. package/dist/Chip.d.ts.map +1 -0
  31. package/dist/Chip.es.js.map +1 -1
  32. package/dist/CircularProgress.d.ts +19 -0
  33. package/dist/CircularProgress.d.ts.map +1 -0
  34. package/dist/CircularProgress.es.js.map +1 -1
  35. package/dist/Dialog.d.ts +22 -0
  36. package/dist/Dialog.d.ts.map +1 -0
  37. package/dist/Dialog.es.js.map +1 -1
  38. package/dist/Drawer.d.ts +19 -0
  39. package/dist/Drawer.d.ts.map +1 -0
  40. package/dist/Drawer.es.js.map +1 -1
  41. package/dist/Fab.d.ts +21 -0
  42. package/dist/Fab.d.ts.map +1 -0
  43. package/dist/Fab.es.js.map +1 -1
  44. package/dist/IconButton.d.ts +21 -0
  45. package/dist/IconButton.d.ts.map +1 -0
  46. package/dist/IconButton.es.js.map +1 -1
  47. package/dist/LinearProgress.d.ts +18 -0
  48. package/dist/LinearProgress.d.ts.map +1 -0
  49. package/dist/LinearProgress.es.js.map +1 -1
  50. package/dist/List.d.ts +25 -0
  51. package/dist/List.d.ts.map +1 -0
  52. package/dist/List.es.js.map +1 -1
  53. package/dist/Menu.d.ts +24 -0
  54. package/dist/Menu.d.ts.map +1 -0
  55. package/dist/Menu.es.js.map +1 -1
  56. package/dist/Pagination.d.ts +21 -0
  57. package/dist/Pagination.d.ts.map +1 -0
  58. package/dist/Pagination.es.js.map +1 -1
  59. package/dist/RadioGroup.d.ts +27 -0
  60. package/dist/RadioGroup.d.ts.map +1 -0
  61. package/dist/RadioGroup.es.js.map +1 -1
  62. package/dist/Rating.d.ts +20 -0
  63. package/dist/Rating.d.ts.map +1 -0
  64. package/dist/Rating.es.js.map +1 -1
  65. package/dist/Select.d.ts +28 -0
  66. package/dist/Select.d.ts.map +1 -0
  67. package/dist/Select.es.js.map +1 -1
  68. package/dist/Skeleton.d.ts +18 -0
  69. package/dist/Skeleton.d.ts.map +1 -0
  70. package/dist/Skeleton.es.js.map +1 -1
  71. package/dist/Slider.d.ts +24 -0
  72. package/dist/Slider.d.ts.map +1 -0
  73. package/dist/Slider.es.js.map +1 -1
  74. package/dist/Snackbar.d.ts +20 -0
  75. package/dist/Snackbar.d.ts.map +1 -0
  76. package/dist/Snackbar.es.js.map +1 -1
  77. package/dist/SpeedDial.d.ts +24 -0
  78. package/dist/SpeedDial.d.ts.map +1 -0
  79. package/dist/SpeedDial.es.js.map +1 -1
  80. package/dist/Stepper.d.ts +23 -0
  81. package/dist/Stepper.d.ts.map +1 -0
  82. package/dist/Stepper.es.js.map +1 -1
  83. package/dist/Switch.d.ts +21 -0
  84. package/dist/Switch.d.ts.map +1 -0
  85. package/dist/Switch.es.js.map +1 -1
  86. package/dist/Table.d.ts +24 -0
  87. package/dist/Table.d.ts.map +1 -0
  88. package/dist/Table.es.js.map +1 -1
  89. package/dist/Tabs.d.ts +25 -0
  90. package/dist/Tabs.d.ts.map +1 -0
  91. package/dist/Tabs.es.js.map +1 -1
  92. package/dist/TextField.d.ts +27 -0
  93. package/dist/TextField.d.ts.map +1 -0
  94. package/dist/TextField.es.js.map +1 -1
  95. package/dist/Toast.d.ts +36 -0
  96. package/dist/Toast.d.ts.map +1 -0
  97. package/dist/Toast.es.js +135 -0
  98. package/dist/Toast.es.js.map +1 -0
  99. package/dist/ToggleButtonGroup.d.ts +28 -0
  100. package/dist/ToggleButtonGroup.d.ts.map +1 -0
  101. package/dist/ToggleButtonGroup.es.js.map +1 -1
  102. package/dist/Tooltip.d.ts +17 -0
  103. package/dist/Tooltip.d.ts.map +1 -0
  104. package/dist/Tooltip.es.js.map +1 -1
  105. package/dist/index.d.ts +35 -0
  106. package/dist/index.d.ts.map +1 -0
  107. package/dist/index.es.js +3 -0
  108. package/dist/index.es.js.map +1 -1
  109. package/package.json +132 -133
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Checkbox.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Checkbox as MuiCheckbox,\n FormControl,\n FormControlLabel,\n FormHelperText,\n type CheckboxProps as MuiCheckboxProps,\n type FormControlProps as MuiFormControlProps,\n} from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n checked: boolean;\n onChange: (checked: boolean) => void;\n label?: string;\n helperText?: string;\n error?: boolean;\n color?: MuiCheckboxProps['color'];\n size?: MuiCheckboxProps['size'];\n indeterminate?: boolean;\n sx?: MuiFormControlProps['sx'];\n };\n }\n>;\n\nexport const useCheckbox = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Checkbox',\n props: {\n checked: false,\n onChange: () => {},\n label: undefined,\n helperText: undefined,\n error: false,\n color: 'primary',\n size: 'medium',\n indeterminate: false,\n sx: undefined,\n },\n view: () => {\n const checkbox = (\n <MuiCheckbox\n checked={m.checked}\n onChange={(e) => m.onChange(e.target.checked)}\n color={m.color}\n size={m.size}\n indeterminate={m.indeterminate}\n />\n );\n return (\n <FormControl\n error={m.error}\n disabled={m.$.isDisabled}\n sx={m.sx}\n >\n {m.label != null ? (\n <FormControlLabel control={checkbox} label={m.label} />\n ) : (\n checkbox\n )}\n {m.helperText && <FormHelperText>{m.helperText}</FormHelperText>}\n </FormControl>\n );\n },\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type CheckboxStruct = Struct;\n\nexport const Checkbox = toReact(useCheckbox);\nCheckbox.displayName = 'Checkbox';\n"],"names":["MuiCheckbox"],"mappings":";;;;;AAoCO,MAAM,cAAc,wBAAC,WAAuD;AAC/E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,eAAe;AAAA,MACf,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BAAM;AACR,YAAM,WACF,sBAAA;AAAA,QAACA;AAAAA,QAAA;AAAA,UACG,SAAS,EAAE;AAAA,UACX,UAAU,wBAAC,MAAM,EAAE,SAAS,EAAE,OAAO,OAAO,GAAlC;AAAA,UACV,OAAO,EAAE;AAAA,UACT,MAAM,EAAE;AAAA,UACR,eAAe,EAAE;AAAA,QAAA;AAAA,MAAA;AAGzB,aACI,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,OAAO,EAAE;AAAA,UACT,UAAU,EAAE,EAAE;AAAA,UACd,IAAI,EAAE;AAAA,QAAA;AAAA,QAEL,EAAE,SAAS,OACR,sBAAA,cAAC,kBAAA,EAAiB,SAAS,UAAU,OAAO,EAAE,MAAA,CAAO,IAErD;AAAA,QAEH,EAAE,cAAc,sBAAA,cAAC,gBAAA,MAAgB,EAAE,UAAW;AAAA,MAAA;AAAA,IAG3D,GAxBM;AAAA,EAwBN;AAGJ,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA/C2B;AAmDpB,MAAM,WAAW,QAAQ,WAAW;AAC3C,SAAS,cAAc;"}
1
+ {"version":3,"file":"Checkbox.es.js","sources":["../src/Checkbox.tsx"],"sourcesContent":["import React from 'react';\r\nimport {\r\n Checkbox as MuiCheckbox,\r\n FormControl,\r\n FormControlLabel,\r\n FormHelperText,\r\n type CheckboxProps as MuiCheckboxProps,\r\n type FormControlProps as MuiFormControlProps,\r\n} from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n checked: boolean;\r\n onChange: (checked: boolean) => void;\r\n label?: string;\r\n helperText?: string;\r\n error?: boolean;\r\n color?: MuiCheckboxProps['color'];\r\n size?: MuiCheckboxProps['size'];\r\n indeterminate?: boolean;\r\n sx?: MuiFormControlProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useCheckbox = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'Checkbox',\r\n props: {\r\n checked: false,\r\n onChange: () => {},\r\n label: undefined,\r\n helperText: undefined,\r\n error: false,\r\n color: 'primary',\r\n size: 'medium',\r\n indeterminate: false,\r\n sx: undefined,\r\n },\r\n view: () => {\r\n const checkbox = (\r\n <MuiCheckbox\r\n checked={m.checked}\r\n onChange={(e) => m.onChange(e.target.checked)}\r\n color={m.color}\r\n size={m.size}\r\n indeterminate={m.indeterminate}\r\n />\r\n );\r\n return (\r\n <FormControl\r\n error={m.error}\r\n disabled={m.$.isDisabled}\r\n sx={m.sx}\r\n >\r\n {m.label != null ? (\r\n <FormControlLabel control={checkbox} label={m.label} />\r\n ) : (\r\n checkbox\r\n )}\r\n {m.helperText && <FormHelperText>{m.helperText}</FormHelperText>}\r\n </FormControl>\r\n );\r\n },\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type CheckboxStruct = Struct;\r\n\r\nexport const Checkbox = toReact(useCheckbox);\r\nCheckbox.displayName = 'Checkbox';\r\n"],"names":["MuiCheckbox"],"mappings":";;;;;AAoCO,MAAM,cAAc,wBAAC,WAAuD;AAC/E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,eAAe;AAAA,MACf,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BAAM;AACR,YAAM,WACF,sBAAA;AAAA,QAACA;AAAAA,QAAA;AAAA,UACG,SAAS,EAAE;AAAA,UACX,UAAU,wBAAC,MAAM,EAAE,SAAS,EAAE,OAAO,OAAO,GAAlC;AAAA,UACV,OAAO,EAAE;AAAA,UACT,MAAM,EAAE;AAAA,UACR,eAAe,EAAE;AAAA,QAAA;AAAA,MAAA;AAGzB,aACI,sBAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,OAAO,EAAE;AAAA,UACT,UAAU,EAAE,EAAE;AAAA,UACd,IAAI,EAAE;AAAA,QAAA;AAAA,QAEL,EAAE,SAAS,OACR,sBAAA,cAAC,kBAAA,EAAiB,SAAS,UAAU,OAAO,EAAE,MAAA,CAAO,IAErD;AAAA,QAEH,EAAE,cAAc,sBAAA,cAAC,gBAAA,MAAgB,EAAE,UAAW;AAAA,MAAA;AAAA,IAG3D,GAxBM;AAAA,EAwBN;AAGJ,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA/C2B;AAmDpB,MAAM,WAAW,QAAQ,WAAW;AAC3C,SAAS,cAAc;"}
package/dist/Chip.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { ChipProps as MuiChipProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
6
+ props: {
7
+ label: string;
8
+ onClick?: () => void;
9
+ onDelete?: () => void;
10
+ variant?: MuiChipProps['variant'];
11
+ color?: MuiChipProps['color'];
12
+ size?: MuiChipProps['size'];
13
+ icon?: React.ReactNode;
14
+ sx?: MuiChipProps['sx'];
15
+ };
16
+ }>;
17
+ export declare const useChip: (params: ComponentParams<Struct>) => Component<Struct>;
18
+ export type ChipStruct = Struct;
19
+ export declare const Chip: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
20
+ export {};
21
+ //# sourceMappingURL=Chip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../src/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;QACtB,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;QAClC,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;QAC9B,IAAI,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,EAAE,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;KAC3B,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CAkCzE,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,eAAO,MAAM,IAAI,qDAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Chip.tsx"],"sourcesContent":["import React from 'react';\nimport { Chip as MuiChip, type ChipProps as MuiChipProps } from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n label: string;\n onClick?: () => void;\n onDelete?: () => void;\n variant?: MuiChipProps['variant'];\n color?: MuiChipProps['color'];\n size?: MuiChipProps['size'];\n icon?: React.ReactNode;\n sx?: MuiChipProps['sx'];\n };\n }\n>;\n\nexport const useChip = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Chip',\n props: {\n label: '',\n onClick: undefined,\n onDelete: undefined,\n variant: 'filled',\n color: 'default',\n size: 'medium',\n icon: undefined,\n sx: undefined,\n },\n view: () => (\n <MuiChip\n label={m.label}\n onClick={m.onClick}\n onDelete={m.onDelete}\n variant={m.variant}\n color={m.color}\n size={m.size}\n icon={m.icon as React.ReactElement | undefined}\n disabled={m.$.isDisabled}\n sx={m.sx}\n />\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type ChipStruct = Struct;\n\nexport const Chip = toReact(useChip);\nChip.displayName = 'Chip';\n"],"names":["MuiChip"],"mappings":";;;;;AA4BO,MAAM,UAAU,wBAAC,WAAuD;AAC3E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,MACV,SAAS;AAAA,MACT,OAAO;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,SAAS,EAAE;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,MAAM,EAAE;AAAA,QACR,UAAU,EAAE,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GAVR;AAAA,EAWF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAlCuB;AAsChB,MAAM,OAAO,QAAQ,OAAO;AACnC,KAAK,cAAc;"}
1
+ {"version":3,"file":"Chip.es.js","sources":["../src/Chip.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Chip as MuiChip, type ChipProps as MuiChipProps } from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n label: string;\r\n onClick?: () => void;\r\n onDelete?: () => void;\r\n variant?: MuiChipProps['variant'];\r\n color?: MuiChipProps['color'];\r\n size?: MuiChipProps['size'];\r\n icon?: React.ReactNode;\r\n sx?: MuiChipProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useChip = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'Chip',\r\n props: {\r\n label: '',\r\n onClick: undefined,\r\n onDelete: undefined,\r\n variant: 'filled',\r\n color: 'default',\r\n size: 'medium',\r\n icon: undefined,\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiChip\r\n label={m.label}\r\n onClick={m.onClick}\r\n onDelete={m.onDelete}\r\n variant={m.variant}\r\n color={m.color}\r\n size={m.size}\r\n icon={m.icon as React.ReactElement | undefined}\r\n disabled={m.$.isDisabled}\r\n sx={m.sx}\r\n />\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type ChipStruct = Struct;\r\n\r\nexport const Chip = toReact(useChip);\r\nChip.displayName = 'Chip';\r\n"],"names":["MuiChip"],"mappings":";;;;;AA4BO,MAAM,UAAU,wBAAC,WAAuD;AAC3E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,SAAS;AAAA,MACT,UAAU;AAAA,MACV,SAAS;AAAA,MACT,OAAO;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,SAAS,EAAE;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,MAAM,EAAE;AAAA,QACR,UAAU,EAAE,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GAVR;AAAA,EAWF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAlCuB;AAsChB,MAAM,OAAO,QAAQ,OAAO;AACnC,KAAK,cAAc;"}
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { CircularProgressProps as MuiCircularProgressProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
6
+ props: {
7
+ variant?: MuiCircularProgressProps['variant'];
8
+ value?: number;
9
+ color?: MuiCircularProgressProps['color'];
10
+ size?: number | string;
11
+ thickness?: number;
12
+ sx?: MuiCircularProgressProps['sx'];
13
+ };
14
+ }>;
15
+ export declare const useCircularProgress: (params: ComponentParams<Struct>) => Component<Struct>;
16
+ export type CircularProgressStruct = Struct;
17
+ export declare const CircularProgress: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
18
+ export {};
19
+ //# sourceMappingURL=CircularProgress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CircularProgress.d.ts","sourceRoot":"","sources":["../src/CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEH,KAAK,qBAAqB,IAAI,wBAAwB,EACzD,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,OAAO,CAAC,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;QAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,wBAAwB,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,EAAE,CAAC,EAAE,wBAAwB,CAAC,IAAI,CAAC,CAAC;KACvC,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CA6BrF,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C,eAAO,MAAM,gBAAgB,qDAA+B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CircularProgress.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/CircularProgress.tsx"],"sourcesContent":["import React from 'react';\nimport {\n CircularProgress as MuiCircularProgress,\n type CircularProgressProps as MuiCircularProgressProps,\n} from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n variant?: MuiCircularProgressProps['variant'];\n value?: number;\n color?: MuiCircularProgressProps['color'];\n size?: number | string;\n thickness?: number;\n sx?: MuiCircularProgressProps['sx'];\n };\n }\n>;\n\nexport const useCircularProgress = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'CircularProgress',\n props: {\n variant: 'indeterminate',\n value: undefined,\n color: 'primary',\n size: 40,\n thickness: 3.6,\n sx: undefined,\n },\n view: () => (\n <MuiCircularProgress\n variant={m.variant}\n value={m.value}\n color={m.color}\n size={m.size}\n thickness={m.thickness}\n sx={m.sx}\n />\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type CircularProgressStruct = Struct;\n\nexport const CircularProgress = toReact(useCircularProgress);\nCircularProgress.displayName = 'CircularProgress';\n"],"names":["MuiCircularProgress"],"mappings":";;;;;AA6BO,MAAM,sBAAsB,wBAAC,WAAuD;AACvF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,WAAW;AAAA,MACX,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,WAAW,EAAE;AAAA,QACb,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GAPR;AAAA,EAQF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA7BmC;AAiC5B,MAAM,mBAAmB,QAAQ,mBAAmB;AAC3D,iBAAiB,cAAc;"}
1
+ {"version":3,"file":"CircularProgress.es.js","sources":["../src/CircularProgress.tsx"],"sourcesContent":["import React from 'react';\r\nimport {\r\n CircularProgress as MuiCircularProgress,\r\n type CircularProgressProps as MuiCircularProgressProps,\r\n} from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n variant?: MuiCircularProgressProps['variant'];\r\n value?: number;\r\n color?: MuiCircularProgressProps['color'];\r\n size?: number | string;\r\n thickness?: number;\r\n sx?: MuiCircularProgressProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useCircularProgress = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'CircularProgress',\r\n props: {\r\n variant: 'indeterminate',\r\n value: undefined,\r\n color: 'primary',\r\n size: 40,\r\n thickness: 3.6,\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiCircularProgress\r\n variant={m.variant}\r\n value={m.value}\r\n color={m.color}\r\n size={m.size}\r\n thickness={m.thickness}\r\n sx={m.sx}\r\n />\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type CircularProgressStruct = Struct;\r\n\r\nexport const CircularProgress = toReact(useCircularProgress);\r\nCircularProgress.displayName = 'CircularProgress';\r\n"],"names":["MuiCircularProgress"],"mappings":";;;;;AA6BO,MAAM,sBAAsB,wBAAC,WAAuD;AACvF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,MACN,WAAW;AAAA,MACX,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,WAAW,EAAE;AAAA,QACb,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GAPR;AAAA,EAQF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA7BmC;AAiC5B,MAAM,mBAAmB,QAAQ,mBAAmB;AAC3D,iBAAiB,cAAc;"}
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+ import { DialogProps as MuiDialogProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
6
+ props: {
7
+ open: boolean;
8
+ onClose: () => void;
9
+ title?: string;
10
+ content?: React.FC;
11
+ actions?: React.FC;
12
+ maxWidth?: MuiDialogProps['maxWidth'];
13
+ fullWidth?: boolean;
14
+ fullScreen?: boolean;
15
+ sx?: MuiDialogProps['sx'];
16
+ };
17
+ }>;
18
+ export declare const useDialog: (params: ComponentParams<Struct>) => Component<Struct>;
19
+ export type DialogStruct = Struct;
20
+ export declare const Dialog: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
21
+ export {};
22
+ //# sourceMappingURL=Dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../src/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAKH,KAAK,WAAW,IAAI,cAAc,EACrC,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;QACnB,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;QACtC,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,EAAE,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;KAC7B,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CA4C3E,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,eAAO,MAAM,MAAM,qDAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Dialog.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Dialog as MuiDialog,\n DialogTitle,\n DialogContent,\n DialogActions,\n type DialogProps as MuiDialogProps,\n} from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n open: boolean;\n onClose: () => void;\n title?: string;\n content?: React.FC;\n actions?: React.FC;\n maxWidth?: MuiDialogProps['maxWidth'];\n fullWidth?: boolean;\n fullScreen?: boolean;\n sx?: MuiDialogProps['sx'];\n };\n }\n>;\n\nexport const useDialog = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Dialog',\n props: {\n open: false,\n onClose: () => {},\n title: undefined,\n content: undefined,\n actions: undefined,\n maxWidth: 'sm',\n fullWidth: true,\n fullScreen: false,\n sx: undefined,\n },\n view: () => (\n <MuiDialog\n open={m.open}\n onClose={m.onClose}\n maxWidth={m.maxWidth}\n fullWidth={m.fullWidth}\n fullScreen={m.fullScreen}\n sx={m.sx}\n >\n {m.title && <DialogTitle>{m.title}</DialogTitle>}\n {m.content && (\n <DialogContent>\n <m.content />\n </DialogContent>\n )}\n {m.actions && (\n <DialogActions>\n <m.actions />\n </DialogActions>\n )}\n </MuiDialog>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type DialogStruct = Struct;\n\nexport const Dialog = toReact(useDialog);\nDialog.displayName = 'Dialog';\n"],"names":["MuiDialog"],"mappings":";;;;;AAmCO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU;AAAA,MACV,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,YAAY,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE,SAAS,sBAAA,cAAC,aAAA,MAAa,EAAE,KAAM;AAAA,MACjC,EAAE,WACC,sBAAA,cAAC,eAAA,0CACI,EAAE,SAAF,IAAU,CACf;AAAA,MAEH,EAAE,WACC,sBAAA,cAAC,eAAA,0CACI,EAAE,SAAF,IAAU,CACf;AAAA,IAAA,GAlBN;AAAA,EAoBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA5CyB;AAgDlB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
1
+ {"version":3,"file":"Dialog.es.js","sources":["../src/Dialog.tsx"],"sourcesContent":["import React from 'react';\r\nimport {\r\n Dialog as MuiDialog,\r\n DialogTitle,\r\n DialogContent,\r\n DialogActions,\r\n type DialogProps as MuiDialogProps,\r\n} from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n open: boolean;\r\n onClose: () => void;\r\n title?: string;\r\n content?: React.FC;\r\n actions?: React.FC;\r\n maxWidth?: MuiDialogProps['maxWidth'];\r\n fullWidth?: boolean;\r\n fullScreen?: boolean;\r\n sx?: MuiDialogProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useDialog = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'Dialog',\r\n props: {\r\n open: false,\r\n onClose: () => {},\r\n title: undefined,\r\n content: undefined,\r\n actions: undefined,\r\n maxWidth: 'sm',\r\n fullWidth: true,\r\n fullScreen: false,\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiDialog\r\n open={m.open}\r\n onClose={m.onClose}\r\n maxWidth={m.maxWidth}\r\n fullWidth={m.fullWidth}\r\n fullScreen={m.fullScreen}\r\n sx={m.sx}\r\n >\r\n {m.title && <DialogTitle>{m.title}</DialogTitle>}\r\n {m.content && (\r\n <DialogContent>\r\n <m.content />\r\n </DialogContent>\r\n )}\r\n {m.actions && (\r\n <DialogActions>\r\n <m.actions />\r\n </DialogActions>\r\n )}\r\n </MuiDialog>\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type DialogStruct = Struct;\r\n\r\nexport const Dialog = toReact(useDialog);\r\nDialog.displayName = 'Dialog';\r\n"],"names":["MuiDialog"],"mappings":";;;;;AAmCO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU;AAAA,MACV,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,YAAY,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE,SAAS,sBAAA,cAAC,aAAA,MAAa,EAAE,KAAM;AAAA,MACjC,EAAE,WACC,sBAAA,cAAC,eAAA,0CACI,EAAE,SAAF,IAAU,CACf;AAAA,MAEH,EAAE,WACC,sBAAA,cAAC,eAAA,0CACI,EAAE,SAAF,IAAU,CACf;AAAA,IAAA,GAlBN;AAAA,EAoBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA5CyB;AAgDlB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { DrawerProps as MuiDrawerProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
6
+ props: {
7
+ open: boolean;
8
+ onClose: () => void;
9
+ children: React.FC;
10
+ anchor?: MuiDrawerProps['anchor'];
11
+ variant?: MuiDrawerProps['variant'];
12
+ sx?: MuiDrawerProps['sx'];
13
+ };
14
+ }>;
15
+ export declare const useDrawer: (params: ComponentParams<Struct>) => Component<Struct>;
16
+ export type DrawerStruct = Struct;
17
+ export declare const Drawer: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
18
+ export {};
19
+ //# sourceMappingURL=Drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../src/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,KAAK,WAAW,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;QACnB,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;QACpC,EAAE,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;KAC7B,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CA8B3E,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,eAAO,MAAM,MAAM,qDAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Drawer.tsx"],"sourcesContent":["import React from 'react';\nimport { Drawer as MuiDrawer, type DrawerProps as MuiDrawerProps } from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n open: boolean;\n onClose: () => void;\n children: React.FC;\n anchor?: MuiDrawerProps['anchor'];\n variant?: MuiDrawerProps['variant'];\n sx?: MuiDrawerProps['sx'];\n };\n }\n>;\n\nexport const useDrawer = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Drawer',\n props: {\n open: false,\n onClose: () => {},\n children: () => null,\n anchor: 'left',\n variant: 'temporary',\n sx: undefined,\n },\n view: () => (\n <MuiDrawer\n open={m.open}\n onClose={m.onClose}\n anchor={m.anchor}\n variant={m.variant}\n sx={m.sx}\n >\n <m.children />\n </MuiDrawer>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type DrawerStruct = Struct;\n\nexport const Drawer = toReact(useDrawer);\nDrawer.displayName = 'Drawer';\n"],"names":["MuiDrawer"],"mappings":";;;;;AA0BO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,UAAU,6BAAM,MAAN;AAAA,MACV,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,QAAQ,EAAE;AAAA,QACV,SAAS,EAAE;AAAA,QACX,IAAI,EAAE;AAAA,MAAA;AAAA,MAEN,sBAAA,cAAC,EAAE,UAAF,IAAW;AAAA,IAAA,GARd;AAAA,EASF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA9ByB;AAkClB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
1
+ {"version":3,"file":"Drawer.es.js","sources":["../src/Drawer.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Drawer as MuiDrawer, type DrawerProps as MuiDrawerProps } from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n open: boolean;\r\n onClose: () => void;\r\n children: React.FC;\r\n anchor?: MuiDrawerProps['anchor'];\r\n variant?: MuiDrawerProps['variant'];\r\n sx?: MuiDrawerProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useDrawer = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'Drawer',\r\n props: {\r\n open: false,\r\n onClose: () => {},\r\n children: () => null,\r\n anchor: 'left',\r\n variant: 'temporary',\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiDrawer\r\n open={m.open}\r\n onClose={m.onClose}\r\n anchor={m.anchor}\r\n variant={m.variant}\r\n sx={m.sx}\r\n >\r\n <m.children />\r\n </MuiDrawer>\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type DrawerStruct = Struct;\r\n\r\nexport const Drawer = toReact(useDrawer);\r\nDrawer.displayName = 'Drawer';\r\n"],"names":["MuiDrawer"],"mappings":";;;;;AA0BO,MAAM,YAAY,wBAAC,WAAuD;AAC7E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,UAAU,6BAAM,MAAN;AAAA,MACV,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,QAAQ,EAAE;AAAA,QACV,SAAS,EAAE;AAAA,QACX,IAAI,EAAE;AAAA,MAAA;AAAA,MAEN,sBAAA,cAAC,EAAE,UAAF,IAAW;AAAA,IAAA,GARd;AAAA,EASF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA9ByB;AAkClB,MAAM,SAAS,QAAQ,SAAS;AACvC,OAAO,cAAc;"}
package/dist/Fab.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { FabProps as MuiFabProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
6
+ props: {
7
+ icon: React.FC;
8
+ onClick: () => void;
9
+ ariaLabel: string;
10
+ color?: MuiFabProps['color'];
11
+ size?: MuiFabProps['size'];
12
+ variant?: MuiFabProps['variant'];
13
+ label?: string;
14
+ sx?: MuiFabProps['sx'];
15
+ };
16
+ }>;
17
+ export declare const useFab: (params: ComponentParams<Struct>) => Component<Struct>;
18
+ export type FabStruct = Struct;
19
+ export declare const Fab: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
20
+ export {};
21
+ //# sourceMappingURL=Fab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../src/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAiB,KAAK,QAAQ,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;QACf,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;QAC7B,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QAC3B,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;KAC1B,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CAmCxE,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,eAAO,MAAM,GAAG,qDAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Fab.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Fab.tsx"],"sourcesContent":["import React from 'react';\nimport { Fab as MuiFab, type FabProps as MuiFabProps } from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n icon: React.FC;\n onClick: () => void;\n ariaLabel: string;\n color?: MuiFabProps['color'];\n size?: MuiFabProps['size'];\n variant?: MuiFabProps['variant'];\n label?: string;\n sx?: MuiFabProps['sx'];\n };\n }\n>;\n\nexport const useFab = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Fab',\n props: {\n icon: () => null,\n onClick: () => {},\n ariaLabel: '',\n color: 'primary',\n size: 'large',\n variant: 'circular',\n label: undefined,\n sx: undefined,\n },\n view: () => (\n <MuiFab\n color={m.color}\n size={m.size}\n variant={m.variant}\n aria-label={m.ariaLabel}\n disabled={m.$.isDisabled}\n onClick={m.onClick}\n sx={m.sx}\n >\n <m.icon />\n {m.variant === 'extended' && m.label}\n </MuiFab>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type FabStruct = Struct;\n\nexport const Fab = toReact(useFab);\nFab.displayName = 'Fab';\n"],"names":["MuiFab"],"mappings":";;;;;AA4BO,MAAM,SAAS,wBAAC,WAAuD;AAC1E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM,6BAAM,MAAN;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,WAAW;AAAA,MACX,OAAO;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO;AAAA,MACP,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,cAAY,EAAE;AAAA,QACd,UAAU,EAAE,EAAE;AAAA,QACd,SAAS,EAAE;AAAA,QACX,IAAI,EAAE;AAAA,MAAA;AAAA,MAEN,sBAAA,cAAC,EAAE,MAAF,IAAO;AAAA,MACP,EAAE,YAAY,cAAc,EAAE;AAAA,IAAA,GAXjC;AAAA,EAYF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAnCsB;AAuCf,MAAM,MAAM,QAAQ,MAAM;AACjC,IAAI,cAAc;"}
1
+ {"version":3,"file":"Fab.es.js","sources":["../src/Fab.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Fab as MuiFab, type FabProps as MuiFabProps } from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n icon: React.FC;\r\n onClick: () => void;\r\n ariaLabel: string;\r\n color?: MuiFabProps['color'];\r\n size?: MuiFabProps['size'];\r\n variant?: MuiFabProps['variant'];\r\n label?: string;\r\n sx?: MuiFabProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useFab = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'Fab',\r\n props: {\r\n icon: () => null,\r\n onClick: () => {},\r\n ariaLabel: '',\r\n color: 'primary',\r\n size: 'large',\r\n variant: 'circular',\r\n label: undefined,\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiFab\r\n color={m.color}\r\n size={m.size}\r\n variant={m.variant}\r\n aria-label={m.ariaLabel}\r\n disabled={m.$.isDisabled}\r\n onClick={m.onClick}\r\n sx={m.sx}\r\n >\r\n <m.icon />\r\n {m.variant === 'extended' && m.label}\r\n </MuiFab>\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type FabStruct = Struct;\r\n\r\nexport const Fab = toReact(useFab);\r\nFab.displayName = 'Fab';\r\n"],"names":["MuiFab"],"mappings":";;;;;AA4BO,MAAM,SAAS,wBAAC,WAAuD;AAC1E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM,6BAAM,MAAN;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,WAAW;AAAA,MACX,OAAO;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,MACT,OAAO;AAAA,MACP,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,cAAY,EAAE;AAAA,QACd,UAAU,EAAE,EAAE;AAAA,QACd,SAAS,EAAE;AAAA,QACX,IAAI,EAAE;AAAA,MAAA;AAAA,MAEN,sBAAA,cAAC,EAAE,MAAF,IAAO;AAAA,MACP,EAAE,YAAY,cAAc,EAAE;AAAA,IAAA,GAXjC;AAAA,EAYF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAnCsB;AAuCf,MAAM,MAAM,QAAQ,MAAM;AACjC,IAAI,cAAc;"}
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { IconButtonProps as MuiIconButtonProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
6
+ props: {
7
+ onClick: () => void;
8
+ icon: React.ReactNode;
9
+ color?: MuiIconButtonProps['color'];
10
+ size?: MuiIconButtonProps['size'];
11
+ edge?: MuiIconButtonProps['edge'];
12
+ loading?: boolean;
13
+ 'aria-label'?: string;
14
+ sx?: MuiIconButtonProps['sx'];
15
+ };
16
+ }>;
17
+ export declare const useIconButton: (params: ComponentParams<Struct>) => Component<Struct>;
18
+ export type IconButtonStruct = Struct;
19
+ export declare const IconButton: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
20
+ export {};
21
+ //# sourceMappingURL=IconButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../src/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA+B,KAAK,eAAe,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;QACtB,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAClC,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,EAAE,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;KACjC,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CAmC/E,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC,eAAO,MAAM,UAAU,qDAAyB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/IconButton.tsx"],"sourcesContent":["import React from 'react';\nimport { IconButton as MuiIconButton, type IconButtonProps as MuiIconButtonProps } from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n onClick: () => void;\n icon: React.ReactNode;\n color?: MuiIconButtonProps['color'];\n size?: MuiIconButtonProps['size'];\n edge?: MuiIconButtonProps['edge'];\n loading?: boolean;\n 'aria-label'?: string;\n sx?: MuiIconButtonProps['sx'];\n };\n }\n>;\n\nexport const useIconButton = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'IconButton',\n props: {\n onClick: () => {},\n icon: null,\n color: 'default',\n size: 'medium',\n edge: false,\n loading: false,\n 'aria-label': undefined,\n sx: undefined,\n },\n view: () => (\n <MuiIconButton\n onClick={m.onClick}\n color={m.color}\n size={m.size}\n edge={m.edge}\n loading={m.loading}\n disabled={m.$.isDisabled}\n aria-label={m['aria-label']}\n sx={m.sx}\n >\n {m.icon}\n </MuiIconButton>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type IconButtonStruct = Struct;\n\nexport const IconButton = toReact(useIconButton);\nIconButton.displayName = 'IconButton';\n"],"names":["MuiIconButton"],"mappings":";;;;;AA4BO,MAAM,gBAAgB,wBAAC,WAAuD;AACjF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,cAAc;AAAA,MACd,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,UAAU,EAAE,EAAE;AAAA,QACd,cAAY,EAAE,YAAY;AAAA,QAC1B,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE;AAAA,IAAA,GAXL;AAAA,EAYF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAnC6B;AAuCtB,MAAM,aAAa,QAAQ,aAAa;AAC/C,WAAW,cAAc;"}
1
+ {"version":3,"file":"IconButton.es.js","sources":["../src/IconButton.tsx"],"sourcesContent":["import React from 'react';\r\nimport { IconButton as MuiIconButton, type IconButtonProps as MuiIconButtonProps } from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n onClick: () => void;\r\n icon: React.ReactNode;\r\n color?: MuiIconButtonProps['color'];\r\n size?: MuiIconButtonProps['size'];\r\n edge?: MuiIconButtonProps['edge'];\r\n loading?: boolean;\r\n 'aria-label'?: string;\r\n sx?: MuiIconButtonProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useIconButton = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'IconButton',\r\n props: {\r\n onClick: () => {},\r\n icon: null,\r\n color: 'default',\r\n size: 'medium',\r\n edge: false,\r\n loading: false,\r\n 'aria-label': undefined,\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiIconButton\r\n onClick={m.onClick}\r\n color={m.color}\r\n size={m.size}\r\n edge={m.edge}\r\n loading={m.loading}\r\n disabled={m.$.isDisabled}\r\n aria-label={m['aria-label']}\r\n sx={m.sx}\r\n >\r\n {m.icon}\r\n </MuiIconButton>\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type IconButtonStruct = Struct;\r\n\r\nexport const IconButton = toReact(useIconButton);\r\nIconButton.displayName = 'IconButton';\r\n"],"names":["MuiIconButton"],"mappings":";;;;;AA4BO,MAAM,gBAAgB,wBAAC,WAAuD;AACjF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,MACT,cAAc;AAAA,MACd,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,MAAM,EAAE;AAAA,QACR,SAAS,EAAE;AAAA,QACX,UAAU,EAAE,EAAE;AAAA,QACd,cAAY,EAAE,YAAY;AAAA,QAC1B,IAAI,EAAE;AAAA,MAAA;AAAA,MAEL,EAAE;AAAA,IAAA,GAXL;AAAA,EAYF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAnC6B;AAuCtB,MAAM,aAAa,QAAQ,aAAa;AAC/C,WAAW,cAAc;"}
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ import { LinearProgressProps as MuiLinearProgressProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
6
+ props: {
7
+ variant?: MuiLinearProgressProps['variant'];
8
+ value?: number;
9
+ valueBuffer?: number;
10
+ color?: MuiLinearProgressProps['color'];
11
+ sx?: MuiLinearProgressProps['sx'];
12
+ };
13
+ }>;
14
+ export declare const useLinearProgress: (params: ComponentParams<Struct>) => Component<Struct>;
15
+ export type LinearProgressStruct = Struct;
16
+ export declare const LinearProgress: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
17
+ export {};
18
+ //# sourceMappingURL=LinearProgress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinearProgress.d.ts","sourceRoot":"","sources":["../src/LinearProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEH,KAAK,mBAAmB,IAAI,sBAAsB,EACrD,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,OAAO,CAAC,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;QAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACxC,EAAE,CAAC,EAAE,sBAAsB,CAAC,IAAI,CAAC,CAAC;KACrC,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CA2BnF,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,eAAO,MAAM,cAAc,qDAA6B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LinearProgress.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/LinearProgress.tsx"],"sourcesContent":["import React from 'react';\nimport {\n LinearProgress as MuiLinearProgress,\n type LinearProgressProps as MuiLinearProgressProps,\n} from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n variant?: MuiLinearProgressProps['variant'];\n value?: number;\n valueBuffer?: number;\n color?: MuiLinearProgressProps['color'];\n sx?: MuiLinearProgressProps['sx'];\n };\n }\n>;\n\nexport const useLinearProgress = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'LinearProgress',\n props: {\n variant: 'indeterminate',\n value: undefined,\n valueBuffer: undefined,\n color: 'primary',\n sx: undefined,\n },\n view: () => (\n <MuiLinearProgress\n variant={m.variant}\n value={m.value}\n valueBuffer={m.valueBuffer}\n color={m.color}\n sx={m.sx}\n />\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type LinearProgressStruct = Struct;\n\nexport const LinearProgress = toReact(useLinearProgress);\nLinearProgress.displayName = 'LinearProgress';\n"],"names":["MuiLinearProgress"],"mappings":";;;;;AA4BO,MAAM,oBAAoB,wBAAC,WAAuD;AACrF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,OAAO;AAAA,MACP,aAAa;AAAA,MACb,OAAO;AAAA,MACP,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,aAAa,EAAE;AAAA,QACf,OAAO,EAAE;AAAA,QACT,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GANR;AAAA,EAOF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA3BiC;AA+B1B,MAAM,iBAAiB,QAAQ,iBAAiB;AACvD,eAAe,cAAc;"}
1
+ {"version":3,"file":"LinearProgress.es.js","sources":["../src/LinearProgress.tsx"],"sourcesContent":["import React from 'react';\r\nimport {\r\n LinearProgress as MuiLinearProgress,\r\n type LinearProgressProps as MuiLinearProgressProps,\r\n} from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n variant?: MuiLinearProgressProps['variant'];\r\n value?: number;\r\n valueBuffer?: number;\r\n color?: MuiLinearProgressProps['color'];\r\n sx?: MuiLinearProgressProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useLinearProgress = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'LinearProgress',\r\n props: {\r\n variant: 'indeterminate',\r\n value: undefined,\r\n valueBuffer: undefined,\r\n color: 'primary',\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiLinearProgress\r\n variant={m.variant}\r\n value={m.value}\r\n valueBuffer={m.valueBuffer}\r\n color={m.color}\r\n sx={m.sx}\r\n />\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type LinearProgressStruct = Struct;\r\n\r\nexport const LinearProgress = toReact(useLinearProgress);\r\nLinearProgress.displayName = 'LinearProgress';\r\n"],"names":["MuiLinearProgress"],"mappings":";;;;;AA4BO,MAAM,oBAAoB,wBAAC,WAAuD;AACrF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,SAAS;AAAA,MACT,OAAO;AAAA,MACP,aAAa;AAAA,MACb,OAAO;AAAA,MACP,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,SAAS,EAAE;AAAA,QACX,OAAO,EAAE;AAAA,QACT,aAAa,EAAE;AAAA,QACf,OAAO,EAAE;AAAA,QACT,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GANR;AAAA,EAOF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA3BiC;AA+B1B,MAAM,iBAAiB,QAAQ,iBAAiB;AACvD,eAAe,cAAc;"}
package/dist/List.d.ts ADDED
@@ -0,0 +1,25 @@
1
+ import { default as React } from 'react';
2
+ import { ListProps as MuiListProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ export type ListItemDef = {
6
+ primary: React.ReactNode;
7
+ secondary?: React.ReactNode;
8
+ icon?: React.FC;
9
+ onClick?: () => void;
10
+ divider?: boolean;
11
+ disabled?: boolean;
12
+ };
13
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
14
+ props: {
15
+ items: ListItemDef[];
16
+ dense?: boolean;
17
+ disablePadding?: boolean;
18
+ sx?: MuiListProps['sx'];
19
+ };
20
+ }>;
21
+ export declare const useList: (params: ComponentParams<Struct>) => Component<Struct>;
22
+ export type ListStruct = Struct;
23
+ export declare const List: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
24
+ export {};
25
+ //# sourceMappingURL=List.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../src/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAOH,KAAK,SAAS,IAAI,YAAY,EACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,KAAK,EAAE,WAAW,EAAE,CAAC;QACrB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,EAAE,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;KAC3B,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CA8CzE,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,eAAO,MAAM,IAAI,qDAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"List.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/List.tsx"],"sourcesContent":["import React from 'react';\nimport {\n List as MuiList,\n ListItem,\n ListItemButton,\n ListItemIcon,\n ListItemText,\n Divider,\n type ListProps as MuiListProps,\n} from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\nexport type ListItemDef = {\n primary: React.ReactNode;\n secondary?: React.ReactNode;\n icon?: React.FC;\n onClick?: () => void;\n divider?: boolean;\n disabled?: boolean;\n};\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n items: ListItemDef[];\n dense?: boolean;\n disablePadding?: boolean;\n sx?: MuiListProps['sx'];\n };\n }\n>;\n\nexport const useList = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'List',\n props: {\n items: [],\n dense: false,\n disablePadding: false,\n sx: undefined,\n },\n view: () => (\n <MuiList dense={m.dense} disablePadding={m.disablePadding} sx={m.sx}>\n {m.items.map((item, i) =>\n item.divider ? (\n <Divider key={i} component=\"li\" />\n ) : item.onClick ? (\n <ListItem key={i} disablePadding>\n <ListItemButton onClick={item.onClick} disabled={item.disabled}>\n {item.icon && (\n <ListItemIcon>\n <item.icon />\n </ListItemIcon>\n )}\n <ListItemText primary={item.primary} secondary={item.secondary} />\n </ListItemButton>\n </ListItem>\n ) : (\n <ListItem key={i}>\n {item.icon && (\n <ListItemIcon>\n <item.icon />\n </ListItemIcon>\n )}\n <ListItemText primary={item.primary} secondary={item.secondary} />\n </ListItem>\n ),\n )}\n </MuiList>\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type ListStruct = Struct;\n\nexport const List = toReact(useList);\nList.displayName = 'List';\n"],"names":["MuiList"],"mappings":";;;;;AAyCO,MAAM,UAAU,wBAAC,WAAuD;AAC3E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO,CAAA;AAAA,MACP,OAAO;AAAA,MACP,gBAAgB;AAAA,MAChB,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA,cAACA,QAAA,EAAQ,OAAO,EAAE,OAAO,gBAAgB,EAAE,gBAAgB,IAAI,EAAE,MAC5D,EAAE,MAAM;AAAA,MAAI,CAAC,MAAM,MAChB,KAAK,UACD,sBAAA,cAAC,SAAA,EAAQ,KAAK,GAAG,WAAU,KAAA,CAAK,IAChC,KAAK,UACL,sBAAA,cAAC,UAAA,EAAS,KAAK,GAAG,gBAAc,KAAA,GAC5B,sBAAA,cAAC,gBAAA,EAAe,SAAS,KAAK,SAAS,UAAU,KAAK,YACjD,KAAK,QACF,sBAAA,cAAC,cAAA,0CACI,KAAK,MAAL,IAAU,CACf,GAEJ,sBAAA,cAAC,cAAA,EAAa,SAAS,KAAK,SAAS,WAAW,KAAK,UAAA,CAAW,CACpE,CACJ,IAEA,sBAAA,cAAC,UAAA,EAAS,KAAK,EAAA,GACV,KAAK,QACF,sBAAA,cAAC,cAAA,MACG,sBAAA,cAAC,KAAK,MAAL,IAAU,CACf,GAEJ,sBAAA,cAAC,cAAA,EAAa,SAAS,KAAK,SAAS,WAAW,KAAK,WAAW,CACpE;AAAA,IAAA,CAGZ,GA3BE;AAAA,EA2BF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA9CuB;AAkDhB,MAAM,OAAO,QAAQ,OAAO;AACnC,KAAK,cAAc;"}
1
+ {"version":3,"file":"List.es.js","sources":["../src/List.tsx"],"sourcesContent":["import React from 'react';\r\nimport {\r\n List as MuiList,\r\n ListItem,\r\n ListItemButton,\r\n ListItemIcon,\r\n ListItemText,\r\n Divider,\r\n type ListProps as MuiListProps,\r\n} from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\nexport type ListItemDef = {\r\n primary: React.ReactNode;\r\n secondary?: React.ReactNode;\r\n icon?: React.FC;\r\n onClick?: () => void;\r\n divider?: boolean;\r\n disabled?: boolean;\r\n};\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n items: ListItemDef[];\r\n dense?: boolean;\r\n disablePadding?: boolean;\r\n sx?: MuiListProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useList = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'List',\r\n props: {\r\n items: [],\r\n dense: false,\r\n disablePadding: false,\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiList dense={m.dense} disablePadding={m.disablePadding} sx={m.sx}>\r\n {m.items.map((item, i) =>\r\n item.divider ? (\r\n <Divider key={i} component=\"li\" />\r\n ) : item.onClick ? (\r\n <ListItem key={i} disablePadding>\r\n <ListItemButton onClick={item.onClick} disabled={item.disabled}>\r\n {item.icon && (\r\n <ListItemIcon>\r\n <item.icon />\r\n </ListItemIcon>\r\n )}\r\n <ListItemText primary={item.primary} secondary={item.secondary} />\r\n </ListItemButton>\r\n </ListItem>\r\n ) : (\r\n <ListItem key={i}>\r\n {item.icon && (\r\n <ListItemIcon>\r\n <item.icon />\r\n </ListItemIcon>\r\n )}\r\n <ListItemText primary={item.primary} secondary={item.secondary} />\r\n </ListItem>\r\n ),\r\n )}\r\n </MuiList>\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type ListStruct = Struct;\r\n\r\nexport const List = toReact(useList);\r\nList.displayName = 'List';\r\n"],"names":["MuiList"],"mappings":";;;;;AAyCO,MAAM,UAAU,wBAAC,WAAuD;AAC3E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO,CAAA;AAAA,MACP,OAAO;AAAA,MACP,gBAAgB;AAAA,MAChB,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA,cAACA,QAAA,EAAQ,OAAO,EAAE,OAAO,gBAAgB,EAAE,gBAAgB,IAAI,EAAE,MAC5D,EAAE,MAAM;AAAA,MAAI,CAAC,MAAM,MAChB,KAAK,UACD,sBAAA,cAAC,SAAA,EAAQ,KAAK,GAAG,WAAU,KAAA,CAAK,IAChC,KAAK,UACL,sBAAA,cAAC,UAAA,EAAS,KAAK,GAAG,gBAAc,KAAA,GAC5B,sBAAA,cAAC,gBAAA,EAAe,SAAS,KAAK,SAAS,UAAU,KAAK,YACjD,KAAK,QACF,sBAAA,cAAC,cAAA,0CACI,KAAK,MAAL,IAAU,CACf,GAEJ,sBAAA,cAAC,cAAA,EAAa,SAAS,KAAK,SAAS,WAAW,KAAK,UAAA,CAAW,CACpE,CACJ,IAEA,sBAAA,cAAC,UAAA,EAAS,KAAK,EAAA,GACV,KAAK,QACF,sBAAA,cAAC,cAAA,MACG,sBAAA,cAAC,KAAK,MAAL,IAAU,CACf,GAEJ,sBAAA,cAAC,cAAA,EAAa,SAAS,KAAK,SAAS,WAAW,KAAK,WAAW,CACpE;AAAA,IAAA,CAGZ,GA3BE;AAAA,EA2BF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GA9CuB;AAkDhB,MAAM,OAAO,QAAQ,OAAO;AACnC,KAAK,cAAc;"}
package/dist/Menu.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ import { default as React } from 'react';
2
+ import { MenuProps as MuiMenuProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ export type MenuItemDef = {
6
+ label: string;
7
+ onClick?: () => void;
8
+ disabled?: boolean;
9
+ divider?: boolean;
10
+ };
11
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
12
+ props: {
13
+ open: boolean;
14
+ onClose: () => void;
15
+ items: MenuItemDef[];
16
+ anchorEl?: HTMLElement | null;
17
+ sx?: MuiMenuProps['sx'];
18
+ };
19
+ }>;
20
+ export declare const useMenu: (params: ComponentParams<Struct>) => Component<Struct>;
21
+ export type MenuStruct = Struct;
22
+ export declare const Menu: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
23
+ export {};
24
+ //# sourceMappingURL=Menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../src/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAIH,KAAK,SAAS,IAAI,YAAY,EACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,KAAK,EAAE,WAAW,EAAE,CAAC;QACrB,QAAQ,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;QAC9B,EAAE,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;KAC3B,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CAsCzE,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,eAAO,MAAM,IAAI,qDAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Menu.tsx"],"sourcesContent":["import React from 'react';\r\nimport {\r\n Menu as MuiMenu,\r\n MenuItem as MuiMenuItem,\r\n Divider,\r\n type MenuProps as MuiMenuProps,\r\n} from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\nexport type MenuItemDef = {\r\n label: string;\r\n onClick?: () => void;\r\n disabled?: boolean;\r\n divider?: boolean;\r\n};\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n open: boolean;\r\n onClose: () => void;\r\n items: MenuItemDef[];\r\n anchorEl?: HTMLElement | null; // ElementCSSInlineStyle etc to support KeyPath \"anchorEl.*\"\r\n sx?: MuiMenuProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useMenu = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'Menu',\r\n props: {\r\n open: false,\r\n onClose: () => {},\r\n items: [],\r\n anchorEl: null,\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiMenu open={m.open} onClose={m.onClose} anchorEl={m.anchorEl} sx={m.sx}>\r\n {m.items.map((item, i) =>\r\n item.divider ? (\r\n <Divider key={i} />\r\n ) : (\r\n <MuiMenuItem\r\n key={i}\r\n onClick={() => {\r\n item.onClick?.();\r\n m.onClose();\r\n }}\r\n disabled={item.disabled}\r\n >\r\n {item.label}\r\n </MuiMenuItem>\r\n ),\r\n )}\r\n </MuiMenu>\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type MenuStruct = Struct;\r\n\r\nexport const Menu = toReact(useMenu);\r\nMenu.displayName = 'Menu';\r\n"],"names":["MuiMenu","MuiMenuItem"],"mappings":";;;;;AAqCO,MAAM,UAAU,wBAAC,WAAuD;AAC3E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,OAAO,CAAA;AAAA,MACP,UAAU;AAAA,MACV,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA,cAACA,QAAA,EAAQ,MAAM,EAAE,MAAM,SAAS,EAAE,SAAS,UAAU,EAAE,UAAU,IAAI,EAAE,GAAA,GAClE,EAAE,MAAM;AAAA,MAAI,CAAC,MAAM,MAChB,KAAK,UACD,sBAAA,cAAC,SAAA,EAAQ,KAAK,GAAG,IAEjB,sBAAA;AAAA,QAACC;AAAAA,QAAA;AAAA,UACG,KAAK;AAAA,UACL,SAAS,6BAAM;AACX,iBAAK,UAAA;AACL,cAAE,QAAA;AAAA,UACN,GAHS;AAAA,UAIT,UAAU,KAAK;AAAA,QAAA;AAAA,QAEd,KAAK;AAAA,MAAA;AAAA,IACV,CAGZ,GAlBE;AAAA,EAkBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAtCuB;AA0ChB,MAAM,OAAO,QAAQ,OAAO;AACnC,KAAK,cAAc;"}
1
+ {"version":3,"file":"Menu.es.js","sources":["../src/Menu.tsx"],"sourcesContent":["import React from 'react';\r\nimport {\r\n Menu as MuiMenu,\r\n MenuItem as MuiMenuItem,\r\n Divider,\r\n type MenuProps as MuiMenuProps,\r\n} from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\nexport type MenuItemDef = {\r\n label: string;\r\n onClick?: () => void;\r\n disabled?: boolean;\r\n divider?: boolean;\r\n};\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n open: boolean;\r\n onClose: () => void;\r\n items: MenuItemDef[];\r\n anchorEl?: HTMLElement | null; // ElementCSSInlineStyle etc to support KeyPath \"anchorEl.*\"\r\n sx?: MuiMenuProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useMenu = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'Menu',\r\n props: {\r\n open: false,\r\n onClose: () => {},\r\n items: [],\r\n anchorEl: null,\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiMenu open={m.open} onClose={m.onClose} anchorEl={m.anchorEl} sx={m.sx}>\r\n {m.items.map((item, i) =>\r\n item.divider ? (\r\n <Divider key={i} />\r\n ) : (\r\n <MuiMenuItem\r\n key={i}\r\n onClick={() => {\r\n item.onClick?.();\r\n m.onClose();\r\n }}\r\n disabled={item.disabled}\r\n >\r\n {item.label}\r\n </MuiMenuItem>\r\n ),\r\n )}\r\n </MuiMenu>\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type MenuStruct = Struct;\r\n\r\nexport const Menu = toReact(useMenu);\r\nMenu.displayName = 'Menu';\r\n"],"names":["MuiMenu","MuiMenuItem"],"mappings":";;;;;AAqCO,MAAM,UAAU,wBAAC,WAAuD;AAC3E,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS,6BAAM;AAAA,MAAC,GAAP;AAAA,MACT,OAAO,CAAA;AAAA,MACP,UAAU;AAAA,MACV,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA,cAACA,QAAA,EAAQ,MAAM,EAAE,MAAM,SAAS,EAAE,SAAS,UAAU,EAAE,UAAU,IAAI,EAAE,GAAA,GAClE,EAAE,MAAM;AAAA,MAAI,CAAC,MAAM,MAChB,KAAK,UACD,sBAAA,cAAC,SAAA,EAAQ,KAAK,GAAG,IAEjB,sBAAA;AAAA,QAACC;AAAAA,QAAA;AAAA,UACG,KAAK;AAAA,UACL,SAAS,6BAAM;AACX,iBAAK,UAAA;AACL,cAAE,QAAA;AAAA,UACN,GAHS;AAAA,UAIT,UAAU,KAAK;AAAA,QAAA;AAAA,QAEd,KAAK;AAAA,MAAA;AAAA,IACV,CAGZ,GAlBE;AAAA,EAkBF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAtCuB;AA0ChB,MAAM,OAAO,QAAQ,OAAO;AACnC,KAAK,cAAc;"}
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+ import { PaginationProps as MuiPaginationProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
6
+ props: {
7
+ count: number;
8
+ page: number;
9
+ onChange: (page: number) => void;
10
+ size?: MuiPaginationProps['size'];
11
+ color?: MuiPaginationProps['color'];
12
+ shape?: MuiPaginationProps['shape'];
13
+ variant?: MuiPaginationProps['variant'];
14
+ sx?: MuiPaginationProps['sx'];
15
+ };
16
+ }>;
17
+ export declare const usePagination: (params: ComponentParams<Struct>) => Component<Struct>;
18
+ export type PaginationStruct = Struct;
19
+ export declare const Pagination: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
20
+ export {};
21
+ //# sourceMappingURL=Pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../src/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA+B,KAAK,eAAe,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxG,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;QACjC,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAClC,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACpC,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACpC,OAAO,CAAC,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;QACxC,EAAE,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;KACjC,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CAkC/E,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC,eAAO,MAAM,UAAU,qDAAyB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/Pagination.tsx"],"sourcesContent":["import React from 'react';\nimport { Pagination as MuiPagination, type PaginationProps as MuiPaginationProps } from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n count: number;\n page: number;\n onChange: (page: number) => void;\n size?: MuiPaginationProps['size'];\n color?: MuiPaginationProps['color'];\n shape?: MuiPaginationProps['shape'];\n variant?: MuiPaginationProps['variant'];\n sx?: MuiPaginationProps['sx'];\n };\n }\n>;\n\nexport const usePagination = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'Pagination',\n props: {\n count: 1,\n page: 1,\n onChange: () => {},\n size: 'medium',\n color: 'standard',\n shape: 'circular',\n variant: 'text',\n sx: undefined,\n },\n view: () => (\n <MuiPagination\n count={m.count}\n page={m.page}\n onChange={(_, page) => m.onChange(page)}\n size={m.size}\n color={m.color}\n shape={m.shape}\n variant={m.variant}\n disabled={m.$.isDisabled}\n sx={m.sx}\n />\n ),\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type PaginationStruct = Struct;\n\nexport const Pagination = toReact(usePagination);\nPagination.displayName = 'Pagination';\n"],"names":["MuiPagination"],"mappings":";;;;;AA4BO,MAAM,gBAAgB,wBAAC,WAAuD;AACjF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,MAAM;AAAA,MACN,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,MAAM;AAAA,MACN,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS;AAAA,MACT,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,UAAU,wBAAC,GAAG,SAAS,EAAE,SAAS,IAAI,GAA5B;AAAA,QACV,MAAM,EAAE;AAAA,QACR,OAAO,EAAE;AAAA,QACT,OAAO,EAAE;AAAA,QACT,SAAS,EAAE;AAAA,QACX,UAAU,EAAE,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GAVR;AAAA,EAWF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAlC6B;AAsCtB,MAAM,aAAa,QAAQ,aAAa;AAC/C,WAAW,cAAc;"}
1
+ {"version":3,"file":"Pagination.es.js","sources":["../src/Pagination.tsx"],"sourcesContent":["import React from 'react';\r\nimport { Pagination as MuiPagination, type PaginationProps as MuiPaginationProps } from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n count: number;\r\n page: number;\r\n onChange: (page: number) => void;\r\n size?: MuiPaginationProps['size'];\r\n color?: MuiPaginationProps['color'];\r\n shape?: MuiPaginationProps['shape'];\r\n variant?: MuiPaginationProps['variant'];\r\n sx?: MuiPaginationProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const usePagination = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'Pagination',\r\n props: {\r\n count: 1,\r\n page: 1,\r\n onChange: () => {},\r\n size: 'medium',\r\n color: 'standard',\r\n shape: 'circular',\r\n variant: 'text',\r\n sx: undefined,\r\n },\r\n view: () => (\r\n <MuiPagination\r\n count={m.count}\r\n page={m.page}\r\n onChange={(_, page) => m.onChange(page)}\r\n size={m.size}\r\n color={m.color}\r\n shape={m.shape}\r\n variant={m.variant}\r\n disabled={m.$.isDisabled}\r\n sx={m.sx}\r\n />\r\n ),\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type PaginationStruct = Struct;\r\n\r\nexport const Pagination = toReact(usePagination);\r\nPagination.displayName = 'Pagination';\r\n"],"names":["MuiPagination"],"mappings":";;;;;AA4BO,MAAM,gBAAgB,wBAAC,WAAuD;AACjF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,MAAM;AAAA,MACN,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,MAAM;AAAA,MACN,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS;AAAA,MACT,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BACF,sBAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACG,OAAO,EAAE;AAAA,QACT,MAAM,EAAE;AAAA,QACR,UAAU,wBAAC,GAAG,SAAS,EAAE,SAAS,IAAI,GAA5B;AAAA,QACV,MAAM,EAAE;AAAA,QACR,OAAO,EAAE;AAAA,QACT,OAAO,EAAE;AAAA,QACT,SAAS,EAAE;AAAA,QACX,UAAU,EAAE,EAAE;AAAA,QACd,IAAI,EAAE;AAAA,MAAA;AAAA,IAAA,GAVR;AAAA,EAWF;AAIR,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAlC6B;AAsCtB,MAAM,aAAa,QAAQ,aAAa;AAC/C,WAAW,cAAc;"}
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ import { RadioProps as MuiRadioProps, FormControlProps as MuiFormControlProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ export type RadioOption = {
6
+ value: string;
7
+ label: string;
8
+ };
9
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
10
+ props: {
11
+ value: string;
12
+ onChange: (value: string) => void;
13
+ options: RadioOption[];
14
+ label?: string;
15
+ helperText?: string;
16
+ error?: boolean;
17
+ row?: boolean;
18
+ color?: MuiRadioProps['color'];
19
+ size?: MuiRadioProps['size'];
20
+ sx?: MuiFormControlProps['sx'];
21
+ };
22
+ }>;
23
+ export declare const useRadioGroup: (params: ComponentParams<Struct>) => Component<Struct>;
24
+ export type RadioGroupStruct = Struct;
25
+ export declare const RadioGroup: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
26
+ export {};
27
+ //# sourceMappingURL=RadioGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../src/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAOH,KAAK,UAAU,IAAI,aAAa,EAChC,KAAK,gBAAgB,IAAI,mBAAmB,EAC/C,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,MAAM,MAAM,WAAW,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;QAClC,OAAO,EAAE,WAAW,EAAE,CAAC;QACvB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,GAAG,CAAC,EAAE,OAAO,CAAC;QACd,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAC/B,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B,EAAE,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAC;KAClC,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CAgD/E,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC,eAAO,MAAM,UAAU,qDAAyB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.es.js","sources":["D:/Src/my/actdim/public/dynstruct-mui/src/RadioGroup.tsx"],"sourcesContent":["import React from 'react';\nimport {\n FormControl,\n FormControlLabel,\n FormHelperText,\n FormLabel,\n Radio,\n RadioGroup as MuiRadioGroup,\n type RadioProps as MuiRadioProps,\n type FormControlProps as MuiFormControlProps,\n} from '@mui/material';\nimport {\n type ComponentStruct,\n type ComponentDef,\n type ComponentParams,\n type Component,\n type ComponentModel,\n} from '@actdim/dynstruct/componentModel/contracts';\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\n\nexport type RadioOption = {\n value: string;\n label: string;\n};\n\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\n TMsgStruct,\n {\n props: {\n value: string;\n onChange: (value: string) => void;\n options: RadioOption[];\n label?: string;\n helperText?: string;\n error?: boolean;\n row?: boolean;\n color?: MuiRadioProps['color'];\n size?: MuiRadioProps['size'];\n sx?: MuiFormControlProps['sx'];\n };\n }\n>;\n\nexport const useRadioGroup = (params: ComponentParams<Struct>): Component<Struct> => {\n let c: Component<Struct>;\n let m: ComponentModel<Struct>;\n\n const def: ComponentDef<Struct> = {\n regType: 'RadioGroup',\n props: {\n value: '',\n onChange: () => {},\n options: [],\n label: undefined,\n helperText: undefined,\n error: false,\n row: false,\n color: 'primary',\n size: 'medium',\n sx: undefined,\n },\n view: () => {\n const labelId = `${c.id}-label`;\n return (\n <FormControl error={m.error} disabled={m.$.isDisabled} sx={m.sx}>\n {m.label && <FormLabel id={labelId}>{m.label}</FormLabel>}\n <MuiRadioGroup\n aria-labelledby={m.label ? labelId : undefined}\n name={c.id}\n value={m.value}\n onChange={(e) => m.onChange(e.target.value)}\n row={m.row}\n >\n {m.options.map((opt) => (\n <FormControlLabel\n key={opt.value}\n value={opt.value}\n label={opt.label}\n control={<Radio color={m.color} size={m.size} />}\n />\n ))}\n </MuiRadioGroup>\n {m.helperText && <FormHelperText>{m.helperText}</FormHelperText>}\n </FormControl>\n );\n },\n };\n\n c = useComponent(def, params);\n m = c.model;\n return c;\n};\n\nexport type RadioGroupStruct = Struct;\n\nexport const RadioGroup = toReact(useRadioGroup);\nRadioGroup.displayName = 'RadioGroup';\n"],"names":["MuiRadioGroup"],"mappings":";;;;;AA4CO,MAAM,gBAAgB,wBAAC,WAAuD;AACjF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,SAAS,CAAA;AAAA,MACT,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,KAAK;AAAA,MACL,OAAO;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BAAM;AACR,YAAM,UAAU,GAAG,EAAE,EAAE;AACvB,aACI,sBAAA,cAAC,eAAY,OAAO,EAAE,OAAO,UAAU,EAAE,EAAE,YAAY,IAAI,EAAE,GAAA,GACxD,EAAE,SAAS,sBAAA,cAAC,WAAA,EAAU,IAAI,QAAA,GAAU,EAAE,KAAM,GAC7C,sBAAA;AAAA,QAACA;AAAAA,QAAA;AAAA,UACG,mBAAiB,EAAE,QAAQ,UAAU;AAAA,UACrC,MAAM,EAAE;AAAA,UACR,OAAO,EAAE;AAAA,UACT,UAAU,wBAAC,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,GAAhC;AAAA,UACV,KAAK,EAAE;AAAA,QAAA;AAAA,QAEN,EAAE,QAAQ,IAAI,CAAC,QACZ,sBAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,KAAK,IAAI;AAAA,YACT,OAAO,IAAI;AAAA,YACX,OAAO,IAAI;AAAA,YACX,6CAAU,OAAA,EAAM,OAAO,EAAE,OAAO,MAAM,EAAE,KAAA,CAAM;AAAA,UAAA;AAAA,QAAA,CAErD;AAAA,MAAA,GAEJ,EAAE,kDAAe,gBAAA,MAAgB,EAAE,UAAW,CACnD;AAAA,IAER,GAxBM;AAAA,EAwBN;AAGJ,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAhD6B;AAoDtB,MAAM,aAAa,QAAQ,aAAa;AAC/C,WAAW,cAAc;"}
1
+ {"version":3,"file":"RadioGroup.es.js","sources":["../src/RadioGroup.tsx"],"sourcesContent":["import React from 'react';\r\nimport {\r\n FormControl,\r\n FormControlLabel,\r\n FormHelperText,\r\n FormLabel,\r\n Radio,\r\n RadioGroup as MuiRadioGroup,\r\n type RadioProps as MuiRadioProps,\r\n type FormControlProps as MuiFormControlProps,\r\n} from '@mui/material';\r\nimport {\r\n type ComponentStruct,\r\n type ComponentDef,\r\n type ComponentParams,\r\n type Component,\r\n type ComponentModel,\r\n} from '@actdim/dynstruct/componentModel/contracts';\r\nimport { useComponent, toReact } from '@actdim/dynstruct/componentModel/react/hooks';\r\nimport { type BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';\r\n\r\nexport type RadioOption = {\r\n value: string;\r\n label: string;\r\n};\r\n\r\ntype Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<\r\n TMsgStruct,\r\n {\r\n props: {\r\n value: string;\r\n onChange: (value: string) => void;\r\n options: RadioOption[];\r\n label?: string;\r\n helperText?: string;\r\n error?: boolean;\r\n row?: boolean;\r\n color?: MuiRadioProps['color'];\r\n size?: MuiRadioProps['size'];\r\n sx?: MuiFormControlProps['sx'];\r\n };\r\n }\r\n>;\r\n\r\nexport const useRadioGroup = (params: ComponentParams<Struct>): Component<Struct> => {\r\n let c: Component<Struct>;\r\n let m: ComponentModel<Struct>;\r\n\r\n const def: ComponentDef<Struct> = {\r\n regType: 'RadioGroup',\r\n props: {\r\n value: '',\r\n onChange: () => {},\r\n options: [],\r\n label: undefined,\r\n helperText: undefined,\r\n error: false,\r\n row: false,\r\n color: 'primary',\r\n size: 'medium',\r\n sx: undefined,\r\n },\r\n view: () => {\r\n const labelId = `${c.id}-label`;\r\n return (\r\n <FormControl error={m.error} disabled={m.$.isDisabled} sx={m.sx}>\r\n {m.label && <FormLabel id={labelId}>{m.label}</FormLabel>}\r\n <MuiRadioGroup\r\n aria-labelledby={m.label ? labelId : undefined}\r\n name={c.id}\r\n value={m.value}\r\n onChange={(e) => m.onChange(e.target.value)}\r\n row={m.row}\r\n >\r\n {m.options.map((opt) => (\r\n <FormControlLabel\r\n key={opt.value}\r\n value={opt.value}\r\n label={opt.label}\r\n control={<Radio color={m.color} size={m.size} />}\r\n />\r\n ))}\r\n </MuiRadioGroup>\r\n {m.helperText && <FormHelperText>{m.helperText}</FormHelperText>}\r\n </FormControl>\r\n );\r\n },\r\n };\r\n\r\n c = useComponent(def, params);\r\n m = c.model;\r\n return c;\r\n};\r\n\r\nexport type RadioGroupStruct = Struct;\r\n\r\nexport const RadioGroup = toReact(useRadioGroup);\r\nRadioGroup.displayName = 'RadioGroup';\r\n"],"names":["MuiRadioGroup"],"mappings":";;;;;AA4CO,MAAM,gBAAgB,wBAAC,WAAuD;AACjF,MAAI;AACJ,MAAI;AAEJ,QAAM,MAA4B;AAAA,IAC9B,SAAS;AAAA,IACT,OAAO;AAAA,MACH,OAAO;AAAA,MACP,UAAU,6BAAM;AAAA,MAAC,GAAP;AAAA,MACV,SAAS,CAAA;AAAA,MACT,OAAO;AAAA,MACP,YAAY;AAAA,MACZ,OAAO;AAAA,MACP,KAAK;AAAA,MACL,OAAO;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,IAER,MAAM,6BAAM;AACR,YAAM,UAAU,GAAG,EAAE,EAAE;AACvB,aACI,sBAAA,cAAC,eAAY,OAAO,EAAE,OAAO,UAAU,EAAE,EAAE,YAAY,IAAI,EAAE,GAAA,GACxD,EAAE,SAAS,sBAAA,cAAC,WAAA,EAAU,IAAI,QAAA,GAAU,EAAE,KAAM,GAC7C,sBAAA;AAAA,QAACA;AAAAA,QAAA;AAAA,UACG,mBAAiB,EAAE,QAAQ,UAAU;AAAA,UACrC,MAAM,EAAE;AAAA,UACR,OAAO,EAAE;AAAA,UACT,UAAU,wBAAC,MAAM,EAAE,SAAS,EAAE,OAAO,KAAK,GAAhC;AAAA,UACV,KAAK,EAAE;AAAA,QAAA;AAAA,QAEN,EAAE,QAAQ,IAAI,CAAC,QACZ,sBAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,KAAK,IAAI;AAAA,YACT,OAAO,IAAI;AAAA,YACX,OAAO,IAAI;AAAA,YACX,6CAAU,OAAA,EAAM,OAAO,EAAE,OAAO,MAAM,EAAE,KAAA,CAAM;AAAA,UAAA;AAAA,QAAA,CAErD;AAAA,MAAA,GAEJ,EAAE,kDAAe,gBAAA,MAAgB,EAAE,UAAW,CACnD;AAAA,IAER,GAxBM;AAAA,EAwBN;AAGJ,MAAI,aAAa,KAAK,MAAM;AAC5B,MAAI,EAAE;AACN,SAAO;AACX,GAhD6B;AAoDtB,MAAM,aAAa,QAAQ,aAAa;AAC/C,WAAW,cAAc;"}
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ import { RatingProps as MuiRatingProps } from '@mui/material';
3
+ import { ComponentStruct, ComponentParams, Component } from '@actdim/dynstruct/componentModel/contracts';
4
+ import { BaseAppMsgStruct } from '@actdim/dynstruct/appDomain/appContracts';
5
+ type Struct<TMsgStruct extends BaseAppMsgStruct = BaseAppMsgStruct> = ComponentStruct<TMsgStruct, {
6
+ props: {
7
+ value: number | null;
8
+ onChange?: (value: number | null) => void;
9
+ max?: number;
10
+ precision?: number;
11
+ size?: MuiRatingProps['size'];
12
+ readOnly?: boolean;
13
+ sx?: MuiRatingProps['sx'];
14
+ };
15
+ }>;
16
+ export declare const useRating: (params: ComponentParams<Struct>) => Component<Struct>;
17
+ export type RatingStruct = Struct;
18
+ export declare const Rating: React.FC<ComponentParams<Struct<BaseAppMsgStruct>>>;
19
+ export {};
20
+ //# sourceMappingURL=Rating.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rating.d.ts","sourceRoot":"","sources":["../src/Rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAuB,KAAK,WAAW,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AACxF,OAAO,EACH,KAAK,eAAe,EAEpB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEjB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAEjF,KAAK,MAAM,CAAC,UAAU,SAAS,gBAAgB,GAAG,gBAAgB,IAAI,eAAe,CACjF,UAAU,EACV;IACI,KAAK,EAAE;QACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;QAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;QAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,EAAE,CAAC,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;KAC7B,CAAC;CACL,CACJ,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,QAAQ,eAAe,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CAgC3E,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,eAAO,MAAM,MAAM,qDAAqB,CAAC"}