@mittwald/flow-react-components 0.2.0-alpha.584 → 0.2.0-alpha.585
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/js/components/src/components/BrowserOnly/BrowserOnly.mjs +0 -1
- package/dist/js/components/src/components/BrowserOnly/BrowserOnly.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs +0 -1
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
- package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs +0 -1
- package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
- package/dist/js/components/src/components/List/components/Header/components/SearchField/SearchField.mjs +0 -1
- package/dist/js/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
- package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs +0 -1
- package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs +0 -1
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs +0 -1
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs.map +1 -1
- package/dist/js/components/src/components/Tooltip/Tooltip.mjs +0 -1
- package/dist/js/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/js/components/src/lib/componentFactory/flowComponent.mjs +1 -6
- package/dist/js/components/src/lib/componentFactory/flowComponent.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/mergePropsContext.mjs +0 -1
- package/dist/js/components/src/lib/propsContext/mergePropsContext.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/nestedPropsContext/lib.mjs +0 -1
- package/dist/js/components/src/lib/propsContext/nestedPropsContext/lib.mjs.map +1 -1
- package/dist/types/lib/componentFactory/flowComponent.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/js/components/src/views/ComponentPropsContextProviderView.mjs +0 -15
- package/dist/js/components/src/views/ComponentPropsContextProviderView.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.2.0-alpha.585](https://github.com/mittwald/flow/compare/0.2.0-alpha.584...0.2.0-alpha.585) (2025-12-05)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **Remote:** fix Action with confirmation can not be confirmed ([#2175](https://github.com/mittwald/flow/issues/2175)) ([a70f0b0](https://github.com/mittwald/flow/commit/a70f0b06022cf445293fc68274149e9befb9cecd))
|
|
11
|
+
|
|
6
12
|
# [0.2.0-alpha.584](https://github.com/mittwald/flow/compare/0.2.0-alpha.583...0.2.0-alpha.584) (2025-12-04)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @mittwald/flow-react-components
|
|
@@ -10,7 +10,6 @@ import 'react/jsx-runtime';
|
|
|
10
10
|
import '@mittwald/react-tunnel';
|
|
11
11
|
import '../../lib/slotContext/SlotContextProvider.mjs';
|
|
12
12
|
import '../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
13
|
-
import '../../views/ComponentPropsContextProviderView.mjs';
|
|
14
13
|
import '../../views/ClearPropsContextView.mjs';
|
|
15
14
|
import '../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
16
15
|
import '../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserOnly.mjs","sources":["../../../../../../src/components/BrowserOnly/BrowserOnly.tsx"],"sourcesContent":["import { useIsMounted } from \"@/lib/hooks\";\nimport type { PropsWithChildren } from \"react\";\n\nexport type BrowserOnlyProps = PropsWithChildren;\n\nexport const BrowserOnly = (props: PropsWithChildren) => {\n if (useIsMounted()) {\n return props.children;\n }\n};\n\nexport default BrowserOnly;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BrowserOnly.mjs","sources":["../../../../../../src/components/BrowserOnly/BrowserOnly.tsx"],"sourcesContent":["import { useIsMounted } from \"@/lib/hooks\";\nimport type { PropsWithChildren } from \"react\";\n\nexport type BrowserOnlyProps = PropsWithChildren;\n\nexport const BrowserOnly = (props: PropsWithChildren) => {\n if (useIsMounted()) {\n return props.children;\n }\n};\n\nexport default BrowserOnly;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKO,MAAM,WAAA,GAAc,CAAC,KAAA,KAA6B;AACvD,EAAA,IAAI,cAAa,EAAG;AAClB,IAAA,OAAO,KAAA,CAAM,QAAA;AAAA,EACf;AACF;;;;"}
|
|
@@ -31,7 +31,6 @@ import '../../lib/controller/overlay/context.mjs';
|
|
|
31
31
|
import 'remeda';
|
|
32
32
|
import '../../lib/slotContext/SlotContextProvider.mjs';
|
|
33
33
|
import '../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
34
|
-
import '../../views/ComponentPropsContextProviderView.mjs';
|
|
35
34
|
import '../../views/ClearPropsContextView.mjs';
|
|
36
35
|
import '../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
37
36
|
import '@react-aria/utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.mjs","sources":["../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import * as Recharts from \"recharts\";\nimport React, {\n Children,\n useEffect,\n useRef,\n useState,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type ReactElement,\n type SVGProps,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport Wrap from \"../Wrap\";\nimport { CartesianGrid } from \"../public\";\n\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof Recharts.ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps\n extends Pick<\n ComponentProps<typeof Recharts.ComposedChart>,\n \"data\" | \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n height?: string;\n /** View that is provided when data is empty/undefined */\n emptyView?: React.ComponentType<CartesianChartEmptyViewProps>;\n /**\n * Allow the height controlling container to set flex-grow: 1. Can only be\n * used in combination with `height`\n */\n flexGrow?: boolean;\n}\n\n/** @flr-generate all */\nexport const CartesianChart: FC<CartesianChartProps> = (props) => {\n const {\n children,\n data,\n className,\n height,\n flexGrow,\n emptyView: EmptyView,\n ...rest\n } = props;\n const rootClassName = clsx(styles.cartesianChart, className);\n\n const otherChildren: ReactElement[] = [];\n const gridChildren: ReactElement[] = [];\n\n Children.forEach(children, (child) => {\n if (!child) return;\n const element = child as ReactElement;\n\n if (element.type === CartesianGrid) {\n gridChildren.push(element);\n } else {\n otherChildren.push(element);\n }\n });\n\n const showEmptyView = (!data || data.length === 0) && EmptyView;\n\n const chartContainerRef = useRef<HTMLDivElement>(null);\n const [viewDimensions, setViewDimensions] = useState<Partial<\n SVGProps<SVGForeignObjectElement>\n > | null>(null);\n\n // resizing the foreignObject for the EmptyView on size changes\n useEffect(() => {\n if (showEmptyView) {\n const updateDimensions = () => {\n const svg = chartContainerRef.current?.querySelector(\n \"svg\",\n ) as SVGSVGElement | null;\n if (!svg) return;\n\n const clip = svg.querySelector(\"clipPath rect\");\n if (clip) {\n const x = parseFloat(clip.getAttribute(\"x\") ?? \"0\");\n const y = parseFloat(clip.getAttribute(\"y\") ?? \"0\");\n const width = parseFloat(clip.getAttribute(\"width\") ?? \"0\");\n const height = parseFloat(clip.getAttribute(\"height\") ?? \"0\");\n setViewDimensions({ x, y, width, height });\n }\n };\n\n updateDimensions();\n\n const container = chartContainerRef.current;\n const observer = new ResizeObserver(updateDimensions);\n if (container) observer.observe(container);\n\n return () => {\n observer.disconnect();\n };\n }\n }, []);\n\n return (\n <Wrap if={height}>\n <div\n style={{ height, flex: flexGrow ? 1 : undefined }}\n ref={chartContainerRef}\n >\n <Recharts.ResponsiveContainer>\n <Recharts.ComposedChart\n data={data}\n className={rootClassName}\n {...rest}\n >\n {!showEmptyView && gridChildren}\n {otherChildren}\n {showEmptyView && viewDimensions && (\n <foreignObject {...viewDimensions}>\n <div className={styles.emptyViewContainer}>\n <EmptyView data={data} />\n </div>\n </foreignObject>\n )}\n </Recharts.ComposedChart>\n </Recharts.ResponsiveContainer>\n </div>\n </Wrap>\n );\n};\n\nexport default CartesianChart;\n"],"names":["height"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartesianChart.mjs","sources":["../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import * as Recharts from \"recharts\";\nimport React, {\n Children,\n useEffect,\n useRef,\n useState,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type ReactElement,\n type SVGProps,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport Wrap from \"../Wrap\";\nimport { CartesianGrid } from \"../public\";\n\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof Recharts.ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps\n extends Pick<\n ComponentProps<typeof Recharts.ComposedChart>,\n \"data\" | \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n height?: string;\n /** View that is provided when data is empty/undefined */\n emptyView?: React.ComponentType<CartesianChartEmptyViewProps>;\n /**\n * Allow the height controlling container to set flex-grow: 1. Can only be\n * used in combination with `height`\n */\n flexGrow?: boolean;\n}\n\n/** @flr-generate all */\nexport const CartesianChart: FC<CartesianChartProps> = (props) => {\n const {\n children,\n data,\n className,\n height,\n flexGrow,\n emptyView: EmptyView,\n ...rest\n } = props;\n const rootClassName = clsx(styles.cartesianChart, className);\n\n const otherChildren: ReactElement[] = [];\n const gridChildren: ReactElement[] = [];\n\n Children.forEach(children, (child) => {\n if (!child) return;\n const element = child as ReactElement;\n\n if (element.type === CartesianGrid) {\n gridChildren.push(element);\n } else {\n otherChildren.push(element);\n }\n });\n\n const showEmptyView = (!data || data.length === 0) && EmptyView;\n\n const chartContainerRef = useRef<HTMLDivElement>(null);\n const [viewDimensions, setViewDimensions] = useState<Partial<\n SVGProps<SVGForeignObjectElement>\n > | null>(null);\n\n // resizing the foreignObject for the EmptyView on size changes\n useEffect(() => {\n if (showEmptyView) {\n const updateDimensions = () => {\n const svg = chartContainerRef.current?.querySelector(\n \"svg\",\n ) as SVGSVGElement | null;\n if (!svg) return;\n\n const clip = svg.querySelector(\"clipPath rect\");\n if (clip) {\n const x = parseFloat(clip.getAttribute(\"x\") ?? \"0\");\n const y = parseFloat(clip.getAttribute(\"y\") ?? \"0\");\n const width = parseFloat(clip.getAttribute(\"width\") ?? \"0\");\n const height = parseFloat(clip.getAttribute(\"height\") ?? \"0\");\n setViewDimensions({ x, y, width, height });\n }\n };\n\n updateDimensions();\n\n const container = chartContainerRef.current;\n const observer = new ResizeObserver(updateDimensions);\n if (container) observer.observe(container);\n\n return () => {\n observer.disconnect();\n };\n }\n }, []);\n\n return (\n <Wrap if={height}>\n <div\n style={{ height, flex: flexGrow ? 1 : undefined }}\n ref={chartContainerRef}\n >\n <Recharts.ResponsiveContainer>\n <Recharts.ComposedChart\n data={data}\n className={rootClassName}\n {...rest}\n >\n {!showEmptyView && gridChildren}\n {otherChildren}\n {showEmptyView && viewDimensions && (\n <foreignObject {...viewDimensions}>\n <div className={styles.emptyViewContainer}>\n <EmptyView data={data} />\n </div>\n </foreignObject>\n )}\n </Recharts.ComposedChart>\n </Recharts.ResponsiveContainer>\n </div>\n </Wrap>\n );\n};\n\nexport default CartesianChart;\n"],"names":["height"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,GAAG,IAAA;AAAA,UAEH,QAAA,EAAA;AAAA,YAAA,CAAC,aAAA,IAAiB,YAAA;AAAA,YAClB,aAAA;AAAA,YACA,aAAA,IAAiB,cAAA,oBAChB,GAAA,CAAC,eAAA,EAAA,EAAe,GAAG,cAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAO,kBAAA,EACrB,QAAA,kBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,IAAA,EAAY,GACzB,CAAA,EACF;AAAA;AAAA;AAAA,OAEJ,EACF;AAAA;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -37,7 +37,6 @@ import '../../../../../../lib/controller/overlay/context.mjs';
|
|
|
37
37
|
import 'remeda';
|
|
38
38
|
import '../../../../../../lib/slotContext/SlotContextProvider.mjs';
|
|
39
39
|
import '../../../../../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
40
|
-
import '../../../../../../views/ComponentPropsContextProviderView.mjs';
|
|
41
40
|
import '../../../../../../views/ClearPropsContextView.mjs';
|
|
42
41
|
import '../../../../../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
43
42
|
import '@react-aria/utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveFilters.mjs","sources":["../../../../../../../../../../src/components/List/components/Header/components/ActiveFilters/ActiveFilters.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport React from \"react\";\nimport { useList } from \"@/components/List/hooks/useList\";\nimport styles from \"./ActiveFilters.module.scss\";\nimport locales from \"../../../../locales/*.locale.json\";\nimport { Translate } from \"@/lib/react/components/Translate\";\nimport { observer } from \"mobx-react-lite\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport { TooltipTrigger } from \"@/components/Tooltip\";\nimport {\n IconClose,\n IconSave,\n IconUndo,\n} from \"@/components/Icon/components/icons\";\nimport ButtonView from \"@/views/ButtonView\";\nimport TooltipView from \"@/views/TooltipView\";\nimport DivView from \"@/views/DivView\";\nimport BadgeView from \"@/views/BadgeView\";\nimport TooltipTriggerView from \"@/views/TooltipTriggerView\";\nimport TextView from \"@/views/TextView\";\n\nexport const ActiveFilters: FC = observer(() => {\n const list = useList();\n const formatter = useLocalizedStringFormatter(locales);\n\n const activeFilterValues = list.filters\n .flatMap((f) => f.values)\n .filter((v) => v.isActive);\n\n const activeFilters = activeFilterValues.map((v) => (\n <BadgeView key={v.id} onClose={() => v.deactivate()}>\n <TextView>{v.render()}</TextView>\n </BadgeView>\n ));\n\n const someFiltersChanged =\n list.filters.filter((f) => f.hasChanged()).length > 0;\n\n const storeFiltersButton = list.supportsSettingsStorage &&\n someFiltersChanged && (\n <TooltipTriggerView>\n <TooltipView>\n <Translate locales={locales}>list.filters.store</Translate>\n </TooltipView>\n <ButtonView\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n onPress={() => list.storeFilterDefaultSettings()}\n aria-label={formatter.format(\"list.filters.store\")}\n >\n <IconSave />\n </ButtonView>\n </TooltipTriggerView>\n );\n\n const resetFiltersButton = someFiltersChanged ? (\n <TooltipTrigger>\n <TooltipView>\n <Translate locales={locales}>list.filters.reset</Translate>\n </TooltipView>\n <ButtonView\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n onPress={() => list.resetFilters()}\n aria-label={formatter.format(\"list.filters.reset\")}\n >\n <IconUndo />\n </ButtonView>\n </TooltipTrigger>\n ) : undefined;\n\n const removeAllFiltersButton =\n activeFilters.length > 0 ? (\n <TooltipTrigger>\n <TooltipView>\n <Translate locales={locales}>list.filters.clear</Translate>\n </TooltipView>\n <ButtonView\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n onPress={() => list.clearFilters()}\n >\n <IconClose />\n </ButtonView>\n </TooltipTrigger>\n ) : undefined;\n\n if (\n activeFilters.length === 0 &&\n !storeFiltersButton &&\n !resetFiltersButton\n ) {\n return null;\n }\n\n return (\n <DivView className={styles.activeFilters}>\n {activeFilters}\n {storeFiltersButton}\n {resetFiltersButton}\n {removeAllFiltersButton}\n </DivView>\n );\n});\n\nexport default ActiveFilters;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActiveFilters.mjs","sources":["../../../../../../../../../../src/components/List/components/Header/components/ActiveFilters/ActiveFilters.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport React from \"react\";\nimport { useList } from \"@/components/List/hooks/useList\";\nimport styles from \"./ActiveFilters.module.scss\";\nimport locales from \"../../../../locales/*.locale.json\";\nimport { Translate } from \"@/lib/react/components/Translate\";\nimport { observer } from \"mobx-react-lite\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport { TooltipTrigger } from \"@/components/Tooltip\";\nimport {\n IconClose,\n IconSave,\n IconUndo,\n} from \"@/components/Icon/components/icons\";\nimport ButtonView from \"@/views/ButtonView\";\nimport TooltipView from \"@/views/TooltipView\";\nimport DivView from \"@/views/DivView\";\nimport BadgeView from \"@/views/BadgeView\";\nimport TooltipTriggerView from \"@/views/TooltipTriggerView\";\nimport TextView from \"@/views/TextView\";\n\nexport const ActiveFilters: FC = observer(() => {\n const list = useList();\n const formatter = useLocalizedStringFormatter(locales);\n\n const activeFilterValues = list.filters\n .flatMap((f) => f.values)\n .filter((v) => v.isActive);\n\n const activeFilters = activeFilterValues.map((v) => (\n <BadgeView key={v.id} onClose={() => v.deactivate()}>\n <TextView>{v.render()}</TextView>\n </BadgeView>\n ));\n\n const someFiltersChanged =\n list.filters.filter((f) => f.hasChanged()).length > 0;\n\n const storeFiltersButton = list.supportsSettingsStorage &&\n someFiltersChanged && (\n <TooltipTriggerView>\n <TooltipView>\n <Translate locales={locales}>list.filters.store</Translate>\n </TooltipView>\n <ButtonView\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n onPress={() => list.storeFilterDefaultSettings()}\n aria-label={formatter.format(\"list.filters.store\")}\n >\n <IconSave />\n </ButtonView>\n </TooltipTriggerView>\n );\n\n const resetFiltersButton = someFiltersChanged ? (\n <TooltipTrigger>\n <TooltipView>\n <Translate locales={locales}>list.filters.reset</Translate>\n </TooltipView>\n <ButtonView\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n onPress={() => list.resetFilters()}\n aria-label={formatter.format(\"list.filters.reset\")}\n >\n <IconUndo />\n </ButtonView>\n </TooltipTrigger>\n ) : undefined;\n\n const removeAllFiltersButton =\n activeFilters.length > 0 ? (\n <TooltipTrigger>\n <TooltipView>\n <Translate locales={locales}>list.filters.clear</Translate>\n </TooltipView>\n <ButtonView\n size=\"s\"\n variant=\"plain\"\n color=\"secondary\"\n onPress={() => list.clearFilters()}\n >\n <IconClose />\n </ButtonView>\n </TooltipTrigger>\n ) : undefined;\n\n if (\n activeFilters.length === 0 &&\n !storeFiltersButton &&\n !resetFiltersButton\n ) {\n return null;\n }\n\n return (\n <DivView className={styles.activeFilters}>\n {activeFilters}\n {storeFiltersButton}\n {resetFiltersButton}\n {removeAllFiltersButton}\n </DivView>\n );\n});\n\nexport default ActiveFilters;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBO,MAAM,aAAA,GAAoB,SAAS,MAAM;AAC9C,EAAA,MAAM,OAAO,OAAA,EAAQ;AACrB,EAAA,MAAM,SAAA,GAAY,4BAA4B,OAAO,CAAA;AAErD,EAAA,MAAM,kBAAA,GAAqB,IAAA,CAAK,OAAA,CAC7B,OAAA,CAAQ,CAAC,CAAA,KAAM,CAAA,CAAE,MAAM,CAAA,CACvB,MAAA,CAAO,CAAC,CAAA,KAAM,EAAE,QAAQ,CAAA;AAE3B,EAAA,MAAM,aAAA,GAAgB,mBAAmB,GAAA,CAAI,CAAC,sBAC5C,GAAA,CAAC,SAAA,EAAA,EAAqB,SAAS,MAAM,CAAA,CAAE,YAAW,EAChD,QAAA,kBAAA,GAAA,CAAC,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AAoB,CAAA;AAAA,QAEjD,8BAAC,QAAA,EAAA,EAAS;AAAA;AAAA;AACZ,GAAA,EACF,CAAA,GACE,MAAA;AAEJ,EAAA,MAAM,sBAAA,GACJ,aAAA,CAAc,MAAA,GAAS,CAAA,wBACpB,cAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,WAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,OAAA,EAAkB,gCAAkB,CAAA,EACjD,CAAA;AAAA,oBACA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,GAAA;AAAA,QACL,OAAA,EAAQ,OAAA;AAAA,QACR,KAAA,EAAM,WAAA;AAAA,QACN,OAAA,EAAS,MAAM,IAAA,CAAK,YAAA,EAAa;AAAA,QAEjC,8BAAC,SAAA,EAAA,EAAU;AAAA;AAAA;AACb,GAAA,EACF,CAAA,GACE,MAAA;AAEN,EAAA,IACE,cAAc,MAAA,KAAW,CAAA,IACzB,CAAC,kBAAA,IACD,CAAC,kBAAA,EACD;AACA,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,uBACE,IAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAW,MAAA,CAAO,aAAA,EACxB,QAAA,EAAA;AAAA,IAAA,aAAA;AAAA,IACA,kBAAA;AAAA,IACA,kBAAA;AAAA,IACA;AAAA,GAAA,EACH,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -10,7 +10,6 @@ import 'remeda';
|
|
|
10
10
|
import '@mittwald/react-tunnel';
|
|
11
11
|
import '../../../../../../lib/slotContext/SlotContextProvider.mjs';
|
|
12
12
|
import '../../../../../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
13
|
-
import '../../../../../../views/ComponentPropsContextProviderView.mjs';
|
|
14
13
|
import '../../../../../../views/ClearPropsContextView.mjs';
|
|
15
14
|
import '../../../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
16
15
|
import '../../../../../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchField.mjs","sources":["../../../../../../../../../../src/components/List/components/Header/components/SearchField/SearchField.tsx"],"sourcesContent":["import type { FC, KeyboardEvent } from \"react\";\nimport { createElement, useEffect, useState } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport type { Search } from \"@/components/List/model/search/Search\";\nimport type { SearchFieldRenderComponent } from \"@/components/List/model/search/types\";\nimport { useOnChange } from \"@/lib/hooks\";\nimport SearchFieldView from \"@/views/SearchFieldView\";\nimport styles from \"./SearchField.module.scss\";\nimport { useAriaAnnounceSearchState } from \"@/components/List/hooks/useAriaAnnounceSearchState\";\n\ninterface Props extends PropsWithClassName {\n search: Search<never>;\n}\n\nconst autoSubmitTimeout = 800;\n\nconst DefaultSearchFieldRender: SearchFieldRenderComponent = (props) => {\n const { onChange, value, autoSubmit = true, ...searchFieldProps } = props;\n\n const [searchString, setSearchString] = useState(value ?? \"\");\n const [previousSearchString, setPreviousSearchString] = useState(\"\");\n\n const submitSearch = () => {\n if (searchString.trim() === \"\") {\n onChange(undefined);\n } else if (previousSearchString !== searchString) {\n setPreviousSearchString(searchString);\n onChange(searchString);\n }\n };\n\n useEffect(() => {\n if (autoSubmit) {\n const timeout = setTimeout(() => submitSearch(), autoSubmitTimeout);\n return () => clearTimeout(timeout);\n }\n }, [searchString, autoSubmit]);\n\n useAriaAnnounceSearchState();\n\n useOnChange(value, () => {\n setSearchString(value ?? \"\");\n }, [searchString]);\n\n const clearSearch = () => {\n onChange(undefined);\n setSearchString(\"\");\n };\n\n const handleKeyPress = (e: KeyboardEvent) => {\n if (e.key === \"Enter\" && !autoSubmit) {\n submitSearch();\n } else if (e.key === \"Escape\") {\n clearSearch();\n }\n };\n\n return (\n <SearchFieldView\n className={styles.searchField}\n value={searchString}\n onKeyUp={handleKeyPress}\n onChange={(value) => setSearchString(value)}\n onClear={clearSearch}\n {...searchFieldProps}\n />\n );\n};\n\nexport const SearchField: FC<Props> = (props) => {\n const { search } = props;\n const render = search.render ?? DefaultSearchFieldRender;\n\n return createElement(render, {\n value: search.value,\n onChange: search.setValue.bind(search),\n ...search.textFieldProps,\n });\n};\n\nexport default SearchField;\n"],"names":["value"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchField.mjs","sources":["../../../../../../../../../../src/components/List/components/Header/components/SearchField/SearchField.tsx"],"sourcesContent":["import type { FC, KeyboardEvent } from \"react\";\nimport { createElement, useEffect, useState } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport type { Search } from \"@/components/List/model/search/Search\";\nimport type { SearchFieldRenderComponent } from \"@/components/List/model/search/types\";\nimport { useOnChange } from \"@/lib/hooks\";\nimport SearchFieldView from \"@/views/SearchFieldView\";\nimport styles from \"./SearchField.module.scss\";\nimport { useAriaAnnounceSearchState } from \"@/components/List/hooks/useAriaAnnounceSearchState\";\n\ninterface Props extends PropsWithClassName {\n search: Search<never>;\n}\n\nconst autoSubmitTimeout = 800;\n\nconst DefaultSearchFieldRender: SearchFieldRenderComponent = (props) => {\n const { onChange, value, autoSubmit = true, ...searchFieldProps } = props;\n\n const [searchString, setSearchString] = useState(value ?? \"\");\n const [previousSearchString, setPreviousSearchString] = useState(\"\");\n\n const submitSearch = () => {\n if (searchString.trim() === \"\") {\n onChange(undefined);\n } else if (previousSearchString !== searchString) {\n setPreviousSearchString(searchString);\n onChange(searchString);\n }\n };\n\n useEffect(() => {\n if (autoSubmit) {\n const timeout = setTimeout(() => submitSearch(), autoSubmitTimeout);\n return () => clearTimeout(timeout);\n }\n }, [searchString, autoSubmit]);\n\n useAriaAnnounceSearchState();\n\n useOnChange(value, () => {\n setSearchString(value ?? \"\");\n }, [searchString]);\n\n const clearSearch = () => {\n onChange(undefined);\n setSearchString(\"\");\n };\n\n const handleKeyPress = (e: KeyboardEvent) => {\n if (e.key === \"Enter\" && !autoSubmit) {\n submitSearch();\n } else if (e.key === \"Escape\") {\n clearSearch();\n }\n };\n\n return (\n <SearchFieldView\n className={styles.searchField}\n value={searchString}\n onKeyUp={handleKeyPress}\n onChange={(value) => setSearchString(value)}\n onClear={clearSearch}\n {...searchFieldProps}\n />\n );\n};\n\nexport const SearchField: FC<Props> = (props) => {\n const { search } = props;\n const render = search.render ?? DefaultSearchFieldRender;\n\n return createElement(render, {\n value: search.value,\n onChange: search.setValue.bind(search),\n ...search.textFieldProps,\n });\n};\n\nexport default SearchField;\n"],"names":["value"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,MAAM,iBAAA,GAAoB,GAAA;AAE1B,MAAM,wBAAA,GAAuD,CAAC,KAAA,KAAU;AACtE,EAAA,MAAM,EAAE,QAAA,EAAU,KAAA,EAAO,aAAa,IAAA,EAAM,GAAG,kBAAiB,GAAI,KAAA;AAEpE,EAAA,MAAM,CAAC,YAAA,EAAc,eAAe,CAAA,GAAI,QAAA,CAAS,SAAS,EAAE,CAAA;AAC5D,EAAA,MAAM,CAAC,oBAAA,EAAsB,uBAAuB,CAAA,GAAI,SAAS,EAAE,CAAA;AAEnE,EAAA,MAAM,eAAe,MAAM;AACzB,IAAA,IAAI,YAAA,CAAa,IAAA,EAAK,KAAM,EAAA,EAAI;AAC9B,MAAA,QAAA,CAAS,MAAS,CAAA;AAAA,IACpB,CAAA,MAAA,IAAW,yBAAyB,YAAA,EAAc;AAChD,MAAA,uBAAA,CAAwB,YAAY,CAAA;AACpC,MAAA,QAAA,CAAS,YAAY,CAAA;AAAA,IACvB;AAAA,EACF,CAAA;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,UAAA,EAAY;AACd,MAAA,MAAM,OAAA,GAAU,UAAA,CAAW,MAAM,YAAA,IAAgB,iBAAiB,CAAA;AAClE,MAAA,OAAO,MAAM,aAAa,OAAO,CAAA;AAAA,IACnC;AAAA,EACF,CAAA,EAAG,CAAC,YAAA,EAAc,UAAU,CAAC,CAAA;AAE7B,EAAA,0BAAA,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
|
import 'remeda';
|
|
30
30
|
import '../../../lib/slotContext/SlotContextProvider.mjs';
|
|
31
31
|
import '../../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
32
|
-
import '../../../views/ComponentPropsContextProviderView.mjs';
|
|
33
32
|
import '../../../views/ClearPropsContextView.mjs';
|
|
34
33
|
import '../../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
35
34
|
import '@react-aria/utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAriaAnnounceSearchState.mjs","sources":["../../../../../../../src/components/List/hooks/useAriaAnnounceSearchState.ts"],"sourcesContent":["import { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"../locales/*.locale.json\";\nimport { announce } from \"@react-aria/live-announcer\";\nimport { useList } from \"@/index/default\";\nimport { useDebounceCallback } from \"usehooks-ts\";\nimport { useEffect } from \"react\";\n\nconst announceDebounceMs = 600;\n\nexport const useAriaAnnounceSearchState = (): void => {\n const formatter = useLocalizedStringFormatter(locales);\n const list = useList();\n const debouncedAnnounce = useDebounceCallback(announce, announceDebounceMs);\n\n const searchTerm = list.search?.value;\n const resultCount = list.batches.getTotalItemsCount();\n const isLoading = list.loader.loaderState.useIsLoading();\n\n useEffect(() => {\n if (isLoading || !searchTerm) {\n debouncedAnnounce.cancel();\n return;\n }\n\n const text = formatter.format(\n resultCount > 0\n ? \"list.search.announce.result\"\n : \"list.search.announce.noResult\",\n {\n resultCount,\n searchTerm,\n },\n );\n\n debouncedAnnounce(text, \"polite\");\n }, [searchTerm, resultCount, isLoading]);\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAriaAnnounceSearchState.mjs","sources":["../../../../../../../src/components/List/hooks/useAriaAnnounceSearchState.ts"],"sourcesContent":["import { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"../locales/*.locale.json\";\nimport { announce } from \"@react-aria/live-announcer\";\nimport { useList } from \"@/index/default\";\nimport { useDebounceCallback } from \"usehooks-ts\";\nimport { useEffect } from \"react\";\n\nconst announceDebounceMs = 600;\n\nexport const useAriaAnnounceSearchState = (): void => {\n const formatter = useLocalizedStringFormatter(locales);\n const list = useList();\n const debouncedAnnounce = useDebounceCallback(announce, announceDebounceMs);\n\n const searchTerm = list.search?.value;\n const resultCount = list.batches.getTotalItemsCount();\n const isLoading = list.loader.loaderState.useIsLoading();\n\n useEffect(() => {\n if (isLoading || !searchTerm) {\n debouncedAnnounce.cancel();\n return;\n }\n\n const text = formatter.format(\n resultCount > 0\n ? \"list.search.announce.result\"\n : \"list.search.announce.noResult\",\n {\n resultCount,\n searchTerm,\n },\n );\n\n debouncedAnnounce(text, \"polite\");\n }, [searchTerm, resultCount, isLoading]);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,kBAAA,GAAqB,GAAA;AAEpB,MAAM,6BAA6B,MAAY;AACpD,EAAA,MAAM,SAAA,GAAY,4BAA4B,OAAO,CAAA;AACrD,EAAA,MAAM,OAAO,OAAA,EAAQ;AACrB,EAAA,MAAM,iBAAA,GAAoB,mBAAA,CAAoB,QAAA,EAAU,kBAAkB,CAAA;AAE1E,EAAA,MAAM,UAAA,GAAa,KAAK,MAAA,EAAQ,KAAA;AAChC,EAAA,MAAM,WAAA,GAAc,IAAA,CAAK,OAAA,CAAQ,kBAAA,EAAmB;AACpD,EAAA,MAAM,SAAA,GAAY,IAAA,CAAK,MAAA,CAAO,WAAA,CAAY,YAAA,EAAa;AAEvD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,SAAA,IAAa,CAAC,UAAA,EAAY;AAC5B,MAAA,iBAAA,CAAkB,MAAA,EAAO;AACzB,MAAA;AAAA,IACF;AAEA,IAAA,MAAM,OAAO,SAAA,CAAU,MAAA;AAAA,MACrB,WAAA,GAAc,IACV,6BAAA,GACA,+BAAA;AAAA,MACJ;AAAA,QACE,WAAA;AAAA,QACA;AAAA;AACF,KACF;AAEA,IAAA,iBAAA,CAAkB,MAAM,QAAQ,CAAA;AAAA,EAClC,CAAA,EAAG,CAAC,UAAA,EAAY,WAAA,EAAa,SAAS,CAAC,CAAA;AACzC;;;;"}
|
|
@@ -28,7 +28,6 @@ import '../../../../lib/controller/overlay/context.mjs';
|
|
|
28
28
|
import 'remeda';
|
|
29
29
|
import '../../../../lib/slotContext/SlotContextProvider.mjs';
|
|
30
30
|
import '../../../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
31
|
-
import '../../../../views/ComponentPropsContextProviderView.mjs';
|
|
32
31
|
import '../../../../views/ClearPropsContextView.mjs';
|
|
33
32
|
import '../../../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
34
33
|
import '@react-aria/utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffCanvasSuspenseFallback.mjs","sources":["../../../../../../../../src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.tsx"],"sourcesContent":["import { useAriaAnnounceSuspense } from \"@/index/default\";\nimport FlexView from \"@/views/FlexView\";\nimport LoadingSpinnerView from \"@/views/LoadingSpinnerView\";\nimport type { FC } from \"react\";\n\nexport const OffCanvasSuspenseFallback: FC = () => {\n useAriaAnnounceSuspense();\n return (\n <FlexView grow align=\"center\" justify=\"center\">\n <LoadingSpinnerView />\n </FlexView>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OffCanvasSuspenseFallback.mjs","sources":["../../../../../../../../src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.tsx"],"sourcesContent":["import { useAriaAnnounceSuspense } from \"@/index/default\";\nimport FlexView from \"@/views/FlexView\";\nimport LoadingSpinnerView from \"@/views/LoadingSpinnerView\";\nimport type { FC } from \"react\";\n\nexport const OffCanvasSuspenseFallback: FC = () => {\n useAriaAnnounceSuspense();\n return (\n <FlexView grow align=\"center\" justify=\"center\">\n <LoadingSpinnerView />\n </FlexView>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,4BAAgC,MAAM;AACjD,EAAA,uBAAA,EAAwB;AACxB,EAAA,uBACE,GAAA,CAAC,QAAA,EAAA,EAAS,IAAA,EAAI,IAAA,EAAC,KAAA,EAAM,UAAS,OAAA,EAAQ,QAAA,EACpC,QAAA,kBAAA,GAAA,CAAC,kBAAA,EAAA,EAAmB,CAAA,EACtB,CAAA;AAEJ;;;;"}
|
|
@@ -29,7 +29,6 @@ import '../../../lib/controller/overlay/context.mjs';
|
|
|
29
29
|
import 'remeda';
|
|
30
30
|
import '../../../lib/slotContext/SlotContextProvider.mjs';
|
|
31
31
|
import '../../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
32
|
-
import '../../../views/ComponentPropsContextProviderView.mjs';
|
|
33
32
|
import '../../../views/ClearPropsContextView.mjs';
|
|
34
33
|
import '../../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
35
34
|
import '@react-aria/utils';
|
package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlaySuspenseFallback.mjs","sources":["../../../../../../../src/components/Overlay/components/OverlaySuspenseFallback.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport LoadingSpinnerView from \"@/views/LoadingSpinnerView\";\nimport { useAriaAnnounceSuspense } from \"@/components/Action/lib/ariaLive\";\nimport { type OverlayContentProps } from \"@/index/default\";\n\nexport const OverlaySuspenseFallback: FC<OverlayContentProps> = () => {\n useAriaAnnounceSuspense();\n return <LoadingSpinnerView color=\"dark\" />;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OverlaySuspenseFallback.mjs","sources":["../../../../../../../src/components/Overlay/components/OverlaySuspenseFallback.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport LoadingSpinnerView from \"@/views/LoadingSpinnerView\";\nimport { useAriaAnnounceSuspense } from \"@/components/Action/lib/ariaLive\";\nimport { type OverlayContentProps } from \"@/index/default\";\n\nexport const OverlaySuspenseFallback: FC<OverlayContentProps> = () => {\n useAriaAnnounceSuspense();\n return <LoadingSpinnerView color=\"dark\" />;\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,0BAAmD,MAAM;AACpE,EAAA,uBAAA,EAAwB;AACxB,EAAA,uBAAO,GAAA,CAAC,kBAAA,EAAA,EAAmB,KAAA,EAAM,MAAA,EAAO,CAAA;AAC1C;;;;"}
|
|
@@ -29,7 +29,6 @@ import '../../lib/controller/overlay/context.mjs';
|
|
|
29
29
|
import 'remeda';
|
|
30
30
|
import '../../lib/slotContext/SlotContextProvider.mjs';
|
|
31
31
|
import '../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
32
|
-
import '../../views/ComponentPropsContextProviderView.mjs';
|
|
33
32
|
import { ClearPropsContext } from '../../lib/propsContext/components/ClearPropsContext.mjs';
|
|
34
33
|
import '../../views/ClearPropsContextView.mjs';
|
|
35
34
|
import '../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.mjs","sources":["../../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./Tooltip.module.scss\";\nimport clsx from \"clsx\";\nimport { ClearPropsContext } from \"@/index/default\";\n\nexport type TooltipProps = PropsWithChildren<\n Omit<Aria.TooltipProps, \"children\">\n>;\n\n/** @flr-generate all */\nexport const Tooltip: FC<TooltipProps> = (props) => {\n const { children, className, ...rest } = props;\n\n const rootClassName = clsx(styles.tooltip, className);\n\n return (\n <ClearPropsContext>\n <Aria.Tooltip {...rest} className={rootClassName}>\n <Aria.OverlayArrow className={styles.tip}>\n <svg viewBox=\"0 0 8 8\">\n <path d=\"M0 0 L4 4 L8 0\" />\n </svg>\n </Aria.OverlayArrow>\n {children}\n </Aria.Tooltip>\n </ClearPropsContext>\n );\n};\n\nexport default Tooltip;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.mjs","sources":["../../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./Tooltip.module.scss\";\nimport clsx from \"clsx\";\nimport { ClearPropsContext } from \"@/index/default\";\n\nexport type TooltipProps = PropsWithChildren<\n Omit<Aria.TooltipProps, \"children\">\n>;\n\n/** @flr-generate all */\nexport const Tooltip: FC<TooltipProps> = (props) => {\n const { children, className, ...rest } = props;\n\n const rootClassName = clsx(styles.tooltip, className);\n\n return (\n <ClearPropsContext>\n <Aria.Tooltip {...rest} className={rootClassName}>\n <Aria.OverlayArrow className={styles.tip}>\n <svg viewBox=\"0 0 8 8\">\n <path d=\"M0 0 L4 4 L8 0\" />\n </svg>\n </Aria.OverlayArrow>\n {children}\n </Aria.Tooltip>\n </ClearPropsContext>\n );\n};\n\nexport default Tooltip;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWO,MAAM,OAAA,GAA4B,CAAC,KAAA,KAAU;AAClD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,GAAG,MAAK,GAAI,KAAA;AAEzC,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,OAAA,EAAS,SAAS,CAAA;AAEpD,EAAA,uBACE,GAAA,CAAC,qBACC,QAAA,kBAAA,IAAA,CAAC,IAAA,CAAK,SAAL,EAAc,GAAG,IAAA,EAAM,SAAA,EAAW,aAAA,EACjC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,IAAA,CAAK,YAAA,EAAL,EAAkB,SAAA,EAAW,OAAO,GAAA,EACnC,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,OAAA,EAAQ,WACX,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAE,gBAAA,EAAiB,GAC3B,CAAA,EACF,CAAA;AAAA,IACC;AAAA,GAAA,EACH,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -7,7 +7,6 @@ import { SlotContextProvider } from '../slotContext/SlotContextProvider.mjs';
|
|
|
7
7
|
import { useProps } from '../hooks/useProps.mjs';
|
|
8
8
|
import { useComponentPropsContext } from '../propsContext/propsContext.mjs';
|
|
9
9
|
import { ComponentPropsContextProvider } from '../propsContext/components/ComponentPropsContextProvider.mjs';
|
|
10
|
-
import ComponentPropsContextProviderView from '../../views/ComponentPropsContextProviderView.mjs';
|
|
11
10
|
import { ClearPropsContext } from '../propsContext/components/ClearPropsContext.mjs';
|
|
12
11
|
import ClearPropsContextView from '../../views/ClearPropsContextView.mjs';
|
|
13
12
|
|
|
@@ -23,11 +22,7 @@ function flowComponent(componentName, ImplementationComponentType, options = {})
|
|
|
23
22
|
const componentProps = useComponentPropsContext(componentName);
|
|
24
23
|
ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;
|
|
25
24
|
let element = /* @__PURE__ */ jsx(MemoizedImplementationComponentType, { ...implementationTypeProps });
|
|
26
|
-
|
|
27
|
-
element = /* @__PURE__ */ jsx(ComponentPropsContextProvider, { componentProps, children: element });
|
|
28
|
-
} else {
|
|
29
|
-
element = /* @__PURE__ */ jsx(ComponentPropsContextProviderView, { componentProps, children: element });
|
|
30
|
-
}
|
|
25
|
+
element = /* @__PURE__ */ jsx(ComponentPropsContextProvider, { componentProps, children: element });
|
|
31
26
|
if (type === "ui") {
|
|
32
27
|
if (isRemoteComponent) {
|
|
33
28
|
element = /* @__PURE__ */ jsx(ClearPropsContext, { children: element });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowComponent.mjs","sources":["../../../../../../src/lib/componentFactory/flowComponent.tsx"],"sourcesContent":["import type {\n FlowComponentName,\n FlowComponentProps as FlowComponentPropsOfName,\n} from \"@/components/propTypes\";\nimport type {\n ComponentProps,\n ComponentType,\n ReactElement,\n ReactNode,\n RefAttributes,\n FunctionComponent,\n} from \"react\";\nimport { cloneElement, memo } from \"react\";\nimport type { PropsWithTunnel } from \"@/lib/types/props\";\nimport { TunnelEntry } from \"@mittwald/react-tunnel\";\nimport SlotContextProvider from \"@/lib/slotContext/SlotContextProvider\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { useComponentPropsContext } from \"@/lib/propsContext/propsContext\";\nimport { ComponentPropsContextProvider } from \"@/components/ComponentPropsContextProvider\";\nimport
|
|
1
|
+
{"version":3,"file":"flowComponent.mjs","sources":["../../../../../../src/lib/componentFactory/flowComponent.tsx"],"sourcesContent":["import type {\n FlowComponentName,\n FlowComponentProps as FlowComponentPropsOfName,\n} from \"@/components/propTypes\";\nimport type {\n ComponentProps,\n ComponentType,\n ReactElement,\n ReactNode,\n RefAttributes,\n FunctionComponent,\n} from \"react\";\nimport { cloneElement, memo } from \"react\";\nimport type { PropsWithTunnel } from \"@/lib/types/props\";\nimport { TunnelEntry } from \"@mittwald/react-tunnel\";\nimport SlotContextProvider from \"@/lib/slotContext/SlotContextProvider\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { useComponentPropsContext } from \"@/lib/propsContext/propsContext\";\nimport { ComponentPropsContextProvider } from \"@/components/ComponentPropsContextProvider\";\nimport { ClearPropsContext } from \"@/components/ClearPropsContext\";\nimport ClearPropsContextView from \"@/views/ClearPropsContextView\";\n\ntype RefType<T> = T extends RefAttributes<infer R> ? R : undefined;\n\nexport interface FlowComponentProps<R = HTMLDivElement>\n extends PropsWithTunnel,\n RefAttributes<R> {\n wrapWith?: ReactElement;\n}\n\ntype FlowComponentImplementationProps<C extends FlowComponentName> = Omit<\n FlowComponentPropsOfName<C>,\n keyof FlowComponentProps\n> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\ntype FlowComponentImplementationType<C extends FlowComponentName> =\n ComponentType<FlowComponentImplementationProps<C>>;\n\ntype FlowComponentType<C extends FlowComponentName> = FunctionComponent<\n FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>\n>;\n\nexport type FlowComponentProvisionType = \"provider\" | \"ui\" | \"layout\";\n\ninterface Options {\n type?: FlowComponentProvisionType;\n isRemoteComponent?: boolean;\n}\n\nexport function flowComponent<C extends FlowComponentName>(\n componentName: C,\n ImplementationComponentType: FlowComponentImplementationType<C>,\n options: Options = {},\n): FlowComponentType<C> {\n type Props = FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\n const { type = \"ui\", isRemoteComponent = false } = options;\n\n const MemoizedImplementationComponentType = memo(ImplementationComponentType);\n\n function Component(props: Props) {\n const { tunnelId, wrapWith, ...propsWithContext } = useProps(\n componentName,\n props as FlowComponentPropsOfName<C>,\n ) as FlowComponentProps<RefType<FlowComponentPropsOfName<C>>>;\n\n const implementationTypeProps = propsWithContext as ComponentProps<\n typeof ImplementationComponentType\n >;\n\n const componentProps = useComponentPropsContext(componentName);\n\n ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;\n\n let element: ReactNode = (\n <MemoizedImplementationComponentType {...implementationTypeProps} />\n );\n\n element = (\n <ComponentPropsContextProvider componentProps={componentProps}>\n {element}\n </ComponentPropsContextProvider>\n );\n\n if (type === \"ui\") {\n /**\n * Protect the inside of UI components for accidental prop changes through\n * the Props Context.\n */\n if (isRemoteComponent) {\n element = <ClearPropsContext>{element}</ClearPropsContext>;\n } else {\n /**\n * In case of a UI component that does not have a remote counterpart\n * (like the Modal component), the <ClearPropsContext> must be\n * additionally applied on the host side by using the\n * <ClearPropsContextView>.\n *\n * This prevents Props Contexts created by parent components on the host\n * side affecting the children of this UI component.\n */\n element = (\n <ClearPropsContext>\n <ClearPropsContextView>{element}</ClearPropsContextView>\n </ClearPropsContext>\n );\n }\n }\n\n if (\"slot\" in props && !!props.slot && typeof props.slot === \"string\") {\n element = (\n <SlotContextProvider slot={props.slot} component={componentName}>\n {element}\n </SlotContextProvider>\n );\n }\n\n if (wrapWith) {\n element = cloneElement(wrapWith, undefined, element);\n }\n\n if (tunnelId) {\n element = <TunnelEntry id={tunnelId}>{element}</TunnelEntry>;\n }\n return element;\n }\n\n Component.displayName = `FlowComponent(${componentName})`;\n return memo(Component);\n}\n"],"names":[],"mappings":";;;;;;;;;;AAmDO,SAAS,aAAA,CACd,aAAA,EACA,2BAAA,EACA,OAAA,GAAmB,EAAC,EACE;AAItB,EAAA,MAAM,EAAE,IAAA,GAAO,IAAA,EAAM,iBAAA,GAAoB,OAAM,GAAI,OAAA;AAEnD,EAAA,MAAM,mCAAA,GAAsC,KAAK,2BAA2B,CAAA;AAE5E,EAAA,SAAS,UAAU,KAAA,EAAc;AAC/B,IAAA,MAAM,EAAE,QAAA,EAAU,QAAA,EAAU,GAAG,kBAAiB,GAAI,QAAA;AAAA,MAClD,aAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,MAAM,uBAAA,GAA0B,gBAAA;AAIhC,IAAA,MAAM,cAAA,GAAiB,yBAAyB,aAAa,CAAA;AAE7D,IAAA,2BAAA,CAA4B,WAAA,GAAc,qBAAqB,aAAa,CAAA,CAAA,CAAA;AAE5E,IAAA,IAAI,OAAA,mBACF,GAAA,CAAC,mCAAA,EAAA,EAAqC,GAAG,uBAAA,EAAyB,CAAA;AAGpE,IAAA,OAAA,mBACE,GAAA,CAAC,6BAAA,EAAA,EAA8B,cAAA,EAC5B,QAAA,EAAA,OAAA,EACH,CAAA;AAGF,IAAA,IAAI,SAAS,IAAA,EAAM;AAKjB,MAAA,IAAI,iBAAA,EAAmB;AACrB,QAAA,OAAA,mBAAU,GAAA,CAAC,qBAAmB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,MACxC,CAAA,MAAO;AAUL,QAAA,OAAA,mBACE,GAAA,CAAC,iBAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,qBAAA,EAAA,EAAuB,mBAAQ,CAAA,EAClC,CAAA;AAAA,MAEJ;AAAA,IACF;AAEA,IAAA,IAAI,MAAA,IAAU,SAAS,CAAC,CAAC,MAAM,IAAA,IAAQ,OAAO,KAAA,CAAM,IAAA,KAAS,QAAA,EAAU;AACrE,MAAA,OAAA,uBACG,mBAAA,EAAA,EAAoB,IAAA,EAAM,MAAM,IAAA,EAAM,SAAA,EAAW,eAC/C,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,IAAI,QAAA,EAAU;AACZ,MAAA,OAAA,GAAU,YAAA,CAAa,QAAA,EAAU,MAAA,EAAW,OAAO,CAAA;AAAA,IACrD;AAEA,IAAA,IAAI,QAAA,EAAU;AACZ,MAAA,OAAA,mBAAU,GAAA,CAAC,WAAA,EAAA,EAAY,EAAA,EAAI,QAAA,EAAW,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,IAChD;AACA,IAAA,OAAO,OAAA;AAAA,EACT;AAEA,EAAA,SAAA,CAAU,WAAA,GAAc,iBAAiB,aAAa,CAAA,CAAA,CAAA;AACtD,EAAA,OAAO,KAAK,SAAS,CAAA;AACvB;;;;"}
|
|
@@ -9,7 +9,6 @@ import './propsContext.mjs';
|
|
|
9
9
|
import 'remeda';
|
|
10
10
|
import { getPropsMerger } from '../react/getPropsMerger.mjs';
|
|
11
11
|
import './components/ComponentPropsContextProvider.mjs';
|
|
12
|
-
import '../../views/ComponentPropsContextProviderView.mjs';
|
|
13
12
|
import '../../views/ClearPropsContextView.mjs';
|
|
14
13
|
import './components/PropsContextProvider.mjs';
|
|
15
14
|
import '../viewComponentContext/viewComponentContext.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergePropsContext.mjs","sources":["../../../../../../src/lib/propsContext/mergePropsContext.ts"],"sourcesContent":["import { isFlowComponentName } from \"@/index/internal\";\nimport type { PropsContext, WorkaroundType } from \"@/lib/propsContext/types\";\nimport { getPropsMerger } from \"@/lib/react/getPropsMerger\";\n\nconst merger = getPropsMerger({\n mergeClassNames: false,\n mergeEventHandler: true,\n});\n\nexport const mergePropsContext = (\n firstContext: PropsContext = {},\n secondContext: PropsContext = {},\n): PropsContext => {\n const mergedComponentNames = Object.keys({\n ...firstContext,\n ...secondContext,\n }).filter(isFlowComponentName);\n\n return Object.fromEntries(\n mergedComponentNames.map((componentName) => [\n componentName,\n merger<WorkaroundType>(\n firstContext[componentName],\n secondContext[componentName],\n ),\n ]),\n );\n};\n\nexport default mergePropsContext;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mergePropsContext.mjs","sources":["../../../../../../src/lib/propsContext/mergePropsContext.ts"],"sourcesContent":["import { isFlowComponentName } from \"@/index/internal\";\nimport type { PropsContext, WorkaroundType } from \"@/lib/propsContext/types\";\nimport { getPropsMerger } from \"@/lib/react/getPropsMerger\";\n\nconst merger = getPropsMerger({\n mergeClassNames: false,\n mergeEventHandler: true,\n});\n\nexport const mergePropsContext = (\n firstContext: PropsContext = {},\n secondContext: PropsContext = {},\n): PropsContext => {\n const mergedComponentNames = Object.keys({\n ...firstContext,\n ...secondContext,\n }).filter(isFlowComponentName);\n\n return Object.fromEntries(\n mergedComponentNames.map((componentName) => [\n componentName,\n merger<WorkaroundType>(\n firstContext[componentName],\n secondContext[componentName],\n ),\n ]),\n );\n};\n\nexport default mergePropsContext;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA,MAAM,SAAS,cAAA,CAAe;AAAA,EAC5B,eAAA,EAAiB,KAAA;AAAA,EACjB,iBAAA,EAAmB;AACrB,CAAC,CAAA;AAEM,MAAM,oBAAoB,CAC/B,YAAA,GAA6B,EAAC,EAC9B,aAAA,GAA8B,EAAC,KACd;AACjB,EAAA,MAAM,oBAAA,GAAuB,OAAO,IAAA,CAAK;AAAA,IACvC,GAAG,YAAA;AAAA,IACH,GAAG;AAAA,GACJ,CAAA,CAAE,MAAA,CAAO,mBAAmB,CAAA;AAE7B,EAAA,OAAO,MAAA,CAAO,WAAA;AAAA,IACZ,oBAAA,CAAqB,GAAA,CAAI,CAAC,aAAA,KAAkB;AAAA,MAC1C,aAAA;AAAA,MACA,MAAA;AAAA,QACE,aAAa,aAAa,CAAA;AAAA,QAC1B,cAAc,aAAa;AAAA;AAC7B,KACD;AAAA,GACH;AACF;;;;"}
|
|
@@ -11,7 +11,6 @@ import 'remeda';
|
|
|
11
11
|
import '@react-aria/utils';
|
|
12
12
|
import 'dot-prop';
|
|
13
13
|
import '../components/ComponentPropsContextProvider.mjs';
|
|
14
|
-
import '../../../views/ComponentPropsContextProviderView.mjs';
|
|
15
14
|
import '../../../views/ClearPropsContextView.mjs';
|
|
16
15
|
import '../components/PropsContextProvider.mjs';
|
|
17
16
|
import '../../viewComponentContext/viewComponentContext.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.mjs","sources":["../../../../../../../src/lib/propsContext/nestedPropsContext/lib.ts"],"sourcesContent":["import type { PropsContext } from \"@/lib/propsContext/types\";\nimport {\n nestingLevelKey,\n type NestingLevelProps,\n} from \"@/lib/propsContext/nestedPropsContext/types\";\nimport { isFlowComponentName } from \"@/index/internal\";\n\nexport function isNestingProps(\n propsContext: unknown,\n): propsContext is NestingLevelProps {\n return (\n !!propsContext &&\n typeof propsContext === \"object\" &&\n nestingLevelKey in propsContext &&\n typeof propsContext[nestingLevelKey] === \"number\"\n );\n}\n\nexport function isNestingLevelKey(key: string) {\n return key === nestingLevelKey;\n}\n\nexport const getNestingLevel = (props: unknown) => {\n return isNestingProps(props) ? (props[nestingLevelKey] ?? 0) : 0;\n};\n\nexport const addNestingLevel = (\n propsContext: PropsContext,\n currentLevel = 0,\n) => {\n const withNestingLevel: PropsContext = {\n ...propsContext,\n };\n\n for (const [key, value] of Object.entries(propsContext)) {\n if (isFlowComponentName(key) && !isNestingProps(value)) {\n withNestingLevel[key] = {\n ...addNestingLevel(value, currentLevel + 1),\n [nestingLevelKey]: currentLevel,\n };\n }\n }\n\n return withNestingLevel;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lib.mjs","sources":["../../../../../../../src/lib/propsContext/nestedPropsContext/lib.ts"],"sourcesContent":["import type { PropsContext } from \"@/lib/propsContext/types\";\nimport {\n nestingLevelKey,\n type NestingLevelProps,\n} from \"@/lib/propsContext/nestedPropsContext/types\";\nimport { isFlowComponentName } from \"@/index/internal\";\n\nexport function isNestingProps(\n propsContext: unknown,\n): propsContext is NestingLevelProps {\n return (\n !!propsContext &&\n typeof propsContext === \"object\" &&\n nestingLevelKey in propsContext &&\n typeof propsContext[nestingLevelKey] === \"number\"\n );\n}\n\nexport function isNestingLevelKey(key: string) {\n return key === nestingLevelKey;\n}\n\nexport const getNestingLevel = (props: unknown) => {\n return isNestingProps(props) ? (props[nestingLevelKey] ?? 0) : 0;\n};\n\nexport const addNestingLevel = (\n propsContext: PropsContext,\n currentLevel = 0,\n) => {\n const withNestingLevel: PropsContext = {\n ...propsContext,\n };\n\n for (const [key, value] of Object.entries(propsContext)) {\n if (isFlowComponentName(key) && !isNestingProps(value)) {\n withNestingLevel[key] = {\n ...addNestingLevel(value, currentLevel + 1),\n [nestingLevelKey]: currentLevel,\n };\n }\n }\n\n return withNestingLevel;\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAOO,SAAS,eACd,YAAA,EACmC;AACnC,EAAA,OACE,CAAC,CAAC,YAAA,IACF,OAAO,YAAA,KAAiB,QAAA,IACxB,eAAA,IAAmB,YAAA,IACnB,OAAO,YAAA,CAAa,eAAe,CAAA,KAAM,QAAA;AAE7C;AAEO,SAAS,kBAAkB,GAAA,EAAa;AAC7C,EAAA,OAAO,GAAA,KAAQ,eAAA;AACjB;AAEO,MAAM,eAAA,GAAkB,CAAC,KAAA,KAAmB;AACjD,EAAA,OAAO,eAAe,KAAK,CAAA,GAAK,KAAA,CAAM,eAAe,KAAK,CAAA,GAAK,CAAA;AACjE;AAEO,MAAM,eAAA,GAAkB,CAC7B,YAAA,EACA,YAAA,GAAe,CAAA,KACZ;AACH,EAAA,MAAM,gBAAA,GAAiC;AAAA,IACrC,GAAG;AAAA,GACL;AAEA,EAAA,KAAA,MAAW,CAAC,GAAA,EAAK,KAAK,KAAK,MAAA,CAAO,OAAA,CAAQ,YAAY,CAAA,EAAG;AACvD,IAAA,IAAI,oBAAoB,GAAG,CAAA,IAAK,CAAC,cAAA,CAAe,KAAK,CAAA,EAAG;AACtD,MAAA,gBAAA,CAAiB,GAAG,CAAA,GAAI;AAAA,QACtB,GAAG,eAAA,CAAgB,KAAA,EAAO,YAAA,GAAe,CAAC,CAAA;AAAA,QAC1C,CAAC,eAAe,GAAG;AAAA,OACrB;AAAA,IACF;AAAA,EACF;AAEA,EAAA,OAAO,gBAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowComponent.d.ts","sourceRoot":"","sources":["../../../../src/lib/componentFactory/flowComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,IAAI,wBAAwB,EAC/C,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAEV,aAAa,EACb,YAAY,EAEZ,aAAa,EACb,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"flowComponent.d.ts","sourceRoot":"","sources":["../../../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AAE,CAAC,EAChB,2BAA2B,EAAE,+BAA+B,CAAC,CAAC,CAAC,EAC/D,OAAO,GAAE,OAAY,GACpB,iBAAiB,CAAC,CAAC,CAAC,CA6EtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.585",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@internationalized/string-compiler": "^3.2.6",
|
|
62
62
|
"@mittwald/password-tools-js": "3.0.0-alpha.18",
|
|
63
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
63
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.585",
|
|
64
64
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
65
65
|
"@react-aria/form": "^3.1.2",
|
|
66
66
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@faker-js/faker": "^10.1.0",
|
|
106
106
|
"@internationalized/date": "^3.10.0",
|
|
107
107
|
"@mittwald/flow-core": "",
|
|
108
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
108
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.585",
|
|
109
109
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
110
110
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
111
111
|
"@mittwald/typescript-config": "",
|
|
@@ -174,5 +174,5 @@
|
|
|
174
174
|
"optional": true
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "1a330fa90e1a0e0ff02820051351ad066bb08168"
|
|
178
178
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { memo, useContext } from 'react';
|
|
5
|
-
import { ComponentPropsContextProvider } from '../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
6
|
-
import { viewComponentContext } from '../lib/viewComponentContext/viewComponentContext.mjs';
|
|
7
|
-
|
|
8
|
-
const ComponentPropsContextProviderView = memo((props) => {
|
|
9
|
-
const View = useContext(viewComponentContext)["ComponentPropsContextProvider"] ?? ComponentPropsContextProvider;
|
|
10
|
-
return /* @__PURE__ */ jsx(View, { ...props });
|
|
11
|
-
});
|
|
12
|
-
ComponentPropsContextProviderView.displayName = "ComponentPropsContextProviderView";
|
|
13
|
-
|
|
14
|
-
export { ComponentPropsContextProviderView as default };
|
|
15
|
-
//# sourceMappingURL=ComponentPropsContextProviderView.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentPropsContextProviderView.mjs","sources":["../../../../../src/views/ComponentPropsContextProviderView.tsx"],"sourcesContent":["/* prettier-ignore */\n/* This file is auto-generated with the remote-components-generator */\nimport React, { memo, type FC, useContext } from \"react\";\nimport {\n ComponentPropsContextProvider,\n type ComponentPropsContextProviderProps,\n} from \"@/components/ComponentPropsContextProvider/ComponentPropsContextProvider\";\nimport { viewComponentContext } from \"@/lib/viewComponentContext/viewComponentContext\";\n\nconst ComponentPropsContextProviderView: FC<ComponentPropsContextProviderProps> =\n memo((props) => {\n const View =\n useContext(viewComponentContext)[\"ComponentPropsContextProvider\"] ??\n ComponentPropsContextProvider;\n return <View {...props} />;\n });\nComponentPropsContextProviderView.displayName =\n \"ComponentPropsContextProviderView\";\n\nexport default ComponentPropsContextProviderView;\n"],"names":[],"mappings":";;;;;AASA,MAAM,iCAAA,GACJ,IAAA,CAAK,CAAC,KAAA,KAAU;AACd,EAAA,MAAM,IAAA,GACJ,UAAA,CAAW,oBAAoB,CAAA,CAAE,+BAA+B,CAAA,IAChE,6BAAA;AACF,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAM,GAAG,KAAA,EAAO,CAAA;AAC1B,CAAC;AACH,iCAAA,CAAkC,WAAA,GAChC,mCAAA;;;;"}
|