origam 2.37.5 → 2.37.7
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 +22 -0
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +2 -2
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +2 -2
- package/dist/src/components/Drawer/OrigamDrawer.vue +8 -4
- package/dist/src/components/FileField/OrigamFileField.vue +3 -3
- package/dist/src/components/NumberField/OrigamNumberField.vue +2 -2
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +3 -3
- package/dist/src/components/Select/OrigamSelect.vue +2 -2
- package/dist/src/components/TextField/OrigamTextField.vue +3 -3
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +3 -3
- package/dist/src/composables/Commons/props.composable.cjs +15 -9
- package/dist/src/composables/Commons/props.composable.d.ts +10 -0
- package/dist/src/composables/Commons/props.composable.js +14 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -18,6 +18,28 @@ This project follows [Semantic Versioning](https://semver.org).
|
|
|
18
18
|
|
|
19
19
|
## [Unreleased]
|
|
20
20
|
|
|
21
|
+
## [2.37.7] - 2026-10-21
|
|
22
|
+
|
|
23
|
+
### Fixed — champs de saisie : id et props relayées différents entre le rendu serveur et le client (#1226)
|
|
24
|
+
|
|
25
|
+
`OrigamTextField`, `OrigamSelect`, `OrigamTextareaField`, `OrigamPasswordField` et `OrigamFileField` relayaient leurs props via une ref de template (`childRef.value?.filterProps(…)`). Or cette ref vaut `undefined` au rendu serveur et pendant l'hydratation. L'`id` de l'`<input>`, `aria-describedby`, `density` et `rounded` n'arrivaient donc qu'après le montage, sans avertissement d'hydratation.
|
|
26
|
+
|
|
27
|
+
- Nouveau `filterPropsOf(Component, props, excludes)` (`composables/Commons/props.composable.ts`) : il lit les noms de props dans la définition statique du composant, sans ref.
|
|
28
|
+
- Appliqué aux 5 champs, ainsi qu'à `OrigamColorPickerField`, `OrigamDatePickerField` et `OrigamNumberField`, pour que `rules` et `validationValue` arrivent ensemble au premier rendu.
|
|
29
|
+
- Vérifié : TU `field-ssr-relay.spec.ts` (`renderToString` puis hydratation), 4/4 rouges sur le parent, verts après ; suite TU complète verte (PR #1234).
|
|
30
|
+
- Suivi : une trentaine d'autres composants relaient encore par ref (#1239).
|
|
31
|
+
|
|
32
|
+
## [2.37.6] - 2026-10-21
|
|
33
|
+
|
|
34
|
+
### Fixed — `OrigamDrawer` sans `attach` : contenu absent du rendu serveur et hydratation en erreur (#1223)
|
|
35
|
+
|
|
36
|
+
Sans `attach`, le tiroir téléportait son contenu dès le rendu serveur. Le HTML serveur ne contenait donc pas ce contenu, et l'hydratation tombait en mismatch : erreur 500 sous Nuxt. Un tiroir `permanent` sans `modelValue` était aussi inactif côté serveur et actif côté client, parce que `onBeforeMount` ne tourne pas en SSR.
|
|
37
|
+
|
|
38
|
+
- Le contenu reste rendu en ligne jusqu'à l'hydratation (`useHydration()`, comme `OrigamOverlay`), puis il est téléporté.
|
|
39
|
+
- `onServerPrefetch` initialise l'état actif côté serveur.
|
|
40
|
+
- Vérifié : TU `drawer-ssr-hydration.spec.ts` (`renderToString` puis hydratation), rouge sur le parent, vert après ; TU Drawer 35/35 (PR #1236).
|
|
41
|
+
- Non couvert : la branche avec `attach` explicite (#1238) et un e2e Nuxt réel.
|
|
42
|
+
|
|
21
43
|
## [2.37.5] - 2026-10-21
|
|
22
44
|
|
|
23
45
|
### Fixed — `OrigamTabPanels` ne relaie plus `transition` à `OrigamTabPanel` (#1207)
|
|
@@ -136,7 +136,7 @@ import OrigamSheet from "../Sheet/OrigamSheet.vue";
|
|
|
136
136
|
import OrigamTextField from "../TextField/OrigamTextField.vue";
|
|
137
137
|
import OrigamTranslateScale from "../Transition/OrigamTranslateScale.vue";
|
|
138
138
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
139
|
-
import { useProps } from "../../composables/Commons/props.composable";
|
|
139
|
+
import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
|
|
140
140
|
import { useTeleportTypography } from "../../composables/Commons/teleport-typography.composable";
|
|
141
141
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
142
142
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
@@ -417,7 +417,7 @@ const handleAfterLeave = () => {
|
|
|
417
417
|
}
|
|
418
418
|
};
|
|
419
419
|
const textFieldProps = computed(() => {
|
|
420
|
-
return
|
|
420
|
+
return filterPropsOf(OrigamTextField, props, ["class", "id", "style", "dirty", "modelValue", "placeholder", "validationValue", "focused"]);
|
|
421
421
|
});
|
|
422
422
|
const colorPickerProps = computed(() => {
|
|
423
423
|
return origamColorPickerRef.value?.filterProps(props, [
|
|
@@ -183,7 +183,7 @@ import OrigamTextField from "../TextField/OrigamTextField.vue";
|
|
|
183
183
|
import OrigamTranslateScale from "../Transition/OrigamTranslateScale.vue";
|
|
184
184
|
import { useDate } from "../../composables/Commons/date.composable";
|
|
185
185
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
186
|
-
import { useProps } from "../../composables/Commons/props.composable";
|
|
186
|
+
import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
|
|
187
187
|
import { useTeleportTypography } from "../../composables/Commons/teleport-typography.composable";
|
|
188
188
|
import { useTextColor } from "../../composables/Commons/textColor.composable";
|
|
189
189
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
@@ -517,7 +517,7 @@ const handleChipMousedown = (e) => {
|
|
|
517
517
|
e.stopPropagation();
|
|
518
518
|
};
|
|
519
519
|
const textFieldProps = computed(() => {
|
|
520
|
-
return
|
|
520
|
+
return filterPropsOf(OrigamTextField, props, ["class", "id", "style", "dirty", "modelValue", "placeholder", "validationValue", "focused"]);
|
|
521
521
|
});
|
|
522
522
|
const datePickerProps = computed(() => {
|
|
523
523
|
return origamDatePickerRef.value?.filterProps(
|
|
@@ -61,6 +61,7 @@ import {
|
|
|
61
61
|
isRef,
|
|
62
62
|
nextTick,
|
|
63
63
|
onBeforeMount,
|
|
64
|
+
onServerPrefetch,
|
|
64
65
|
Ref,
|
|
65
66
|
ref,
|
|
66
67
|
shallowRef,
|
|
@@ -84,6 +85,7 @@ import { useStateFlag } from "../../composables/Commons/stateFlag.composable";
|
|
|
84
85
|
import { useSticky } from "../../composables/Commons/sticky.composable";
|
|
85
86
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
86
87
|
import { useTeleport } from "../../composables/Commons/teleport.composable";
|
|
88
|
+
import { useHydration } from "../../composables/Commons/hydration.composable";
|
|
87
89
|
import { useToggleScope } from "../../composables/Commons/toggleScope.composable";
|
|
88
90
|
import { useTouch } from "../../composables/Commons/touch.composable";
|
|
89
91
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
@@ -225,10 +227,12 @@ useToggleScope(() => !props.disableRouteWatcher && !!router, () => {
|
|
|
225
227
|
watch(() => props.permanent, (val) => {
|
|
226
228
|
if (val) isActive.value = true;
|
|
227
229
|
});
|
|
228
|
-
|
|
230
|
+
const initActive = () => {
|
|
229
231
|
if (props.modelValue != null || isTemporary.value) return;
|
|
230
232
|
isActive.value = props.permanent;
|
|
231
|
-
}
|
|
233
|
+
};
|
|
234
|
+
onBeforeMount(initActive);
|
|
235
|
+
onServerPrefetch(initActive);
|
|
232
236
|
const { isDragging, dragProgress, dragStyles } = useTouch({
|
|
233
237
|
isActive,
|
|
234
238
|
isTemporary,
|
|
@@ -275,13 +279,13 @@ const { layoutItemStyles, layoutItemScrimStyles, layoutId } = useLayoutItem({
|
|
|
275
279
|
const resolvedLayoutId = computed(() => isRef(layoutId) ? layoutId.value : layoutId);
|
|
276
280
|
const isLayoutOrphan = computed(() => resolvedLayoutId.value === "origam-layout-orphan");
|
|
277
281
|
const teleportDrawer = computed(() => {
|
|
278
|
-
if (isLayoutOrphan.value) return void 0;
|
|
279
282
|
return `#${resolvedLayoutId.value} .origam-layout__wrapper`;
|
|
280
283
|
});
|
|
281
284
|
const hasExplicitAttach = computed(() => props.attach !== null);
|
|
282
285
|
const { teleportTarget: attachTarget } = useTeleport(computed(() => props.attach || false));
|
|
286
|
+
const isHydrated = useHydration();
|
|
283
287
|
const teleportDisabled = computed(() => {
|
|
284
|
-
return hasExplicitAttach.value ? !attachTarget.value : isLayoutOrphan.value;
|
|
288
|
+
return hasExplicitAttach.value ? !attachTarget.value : isLayoutOrphan.value || !isHydrated.value;
|
|
285
289
|
});
|
|
286
290
|
const teleportTo = computed(() => {
|
|
287
291
|
return hasExplicitAttach.value ? attachTarget.value : teleportDrawer.value;
|
|
@@ -394,7 +394,7 @@ import { useBothColor } from "../../composables/Commons/bothColor.composable";
|
|
|
394
394
|
import { useDensity } from "../../composables/Commons/density.composable";
|
|
395
395
|
import { useFocus } from "../../composables/Commons/focus.composable";
|
|
396
396
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
397
|
-
import { useProps } from "../../composables/Commons/props.composable";
|
|
397
|
+
import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
|
|
398
398
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
399
399
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
400
400
|
import { DENSITY } from "../../enums/Commons/density.enum";
|
|
@@ -765,10 +765,10 @@ const dropzoneSubtitleText = computed(() => {
|
|
|
765
765
|
});
|
|
766
766
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
767
767
|
const inputProps = computed(() => {
|
|
768
|
-
return
|
|
768
|
+
return filterPropsOf(OrigamInput, props, ["modelValue", "class", "style", "focused", ...BORDER_PROP_KEYS]);
|
|
769
769
|
});
|
|
770
770
|
const fieldProps = computed(() => {
|
|
771
|
-
return
|
|
771
|
+
return filterPropsOf(OrigamField, props, ["class", "style", "id", "active", "dirty", "disabled", "focused", "error"]);
|
|
772
772
|
});
|
|
773
773
|
const fileFieldStyles = computed(() => {
|
|
774
774
|
return [
|
|
@@ -292,7 +292,7 @@ import { useAdjacentInner } from "../../composables/Commons/adjacentInner.compos
|
|
|
292
292
|
import { useFocus } from "../../composables/Commons/focus.composable";
|
|
293
293
|
import { useHold } from "../../composables/NumberField/hold.composable";
|
|
294
294
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
295
|
-
import { useProps } from "../../composables/Commons/props.composable";
|
|
295
|
+
import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
|
|
296
296
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
297
297
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
298
298
|
import { UNSEEDED } from "../../consts/Commons/vmodel.const";
|
|
@@ -663,7 +663,7 @@ const handleBlur = () => {
|
|
|
663
663
|
clampModel();
|
|
664
664
|
};
|
|
665
665
|
const textFieldProps = computed(() => {
|
|
666
|
-
return
|
|
666
|
+
return filterPropsOf(OrigamTextField, props, ["modelValue", "class", "style", "validationValue"]);
|
|
667
667
|
});
|
|
668
668
|
const hasAppendInner = computed(() => {
|
|
669
669
|
return slots.appendInner || !props.hideControls;
|
|
@@ -315,7 +315,7 @@ import { useAdjacent } from "../../composables/Commons/adjacent.composable";
|
|
|
315
315
|
import { useAdjacentInner } from "../../composables/Commons/adjacentInner.composable";
|
|
316
316
|
import { useFocus } from "../../composables/Commons/focus.composable";
|
|
317
317
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
318
|
-
import { useProps } from "../../composables/Commons/props.composable";
|
|
318
|
+
import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
|
|
319
319
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
320
320
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
321
321
|
import { BORDER_PROP_KEYS } from "../../consts/Commons/border.const";
|
|
@@ -640,10 +640,10 @@ const enrichedRules = computed(() => {
|
|
|
640
640
|
});
|
|
641
641
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
642
642
|
const inputProps = computed(() => {
|
|
643
|
-
return
|
|
643
|
+
return filterPropsOf(OrigamInput, props, ["modelValue", "class", "style", "focused", ...BORDER_PROP_KEYS]);
|
|
644
644
|
});
|
|
645
645
|
const fieldProps = computed(() => {
|
|
646
|
-
return
|
|
646
|
+
return filterPropsOf(OrigamField, props, ["class", "id", "active", "dirty", "disabled", "focused", "error", "style"]);
|
|
647
647
|
});
|
|
648
648
|
const resolvedMenuProps = computed(() => {
|
|
649
649
|
return {
|
|
@@ -298,7 +298,7 @@ import OrigamVirtualScroll from "../VirtualScroll/OrigamVirtualScroll.vue";
|
|
|
298
298
|
import { useFilter } from "../../composables/Commons/filters.composable";
|
|
299
299
|
import { useItems } from "../../composables/Commons/items.composable";
|
|
300
300
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
301
|
-
import { useProps } from "../../composables/Commons/props.composable";
|
|
301
|
+
import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
|
|
302
302
|
import { useScrolling } from "../../composables/Commons/scrolling.composable";
|
|
303
303
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
304
304
|
import { useTeleportTypography } from "../../composables/Commons/teleport-typography.composable";
|
|
@@ -945,7 +945,7 @@ const hasList = computed(() => {
|
|
|
945
945
|
return !props.hideNoData || displayItems.value.length || slots.prependItem || slots.appendItem || slots.noData;
|
|
946
946
|
});
|
|
947
947
|
const textFieldProps = computed(() => {
|
|
948
|
-
return
|
|
948
|
+
return filterPropsOf(OrigamTextField, props, ["class", "id", "style", "counterValue", "dirty", "modelValue", "placeholder", "validationValue", "focused"]);
|
|
949
949
|
});
|
|
950
950
|
const listSize = computed(() => {
|
|
951
951
|
return props.size ?? SIZES.DEFAULT;
|
|
@@ -195,7 +195,7 @@ import { useAdjacentInner } from "../../composables/Commons/adjacentInner.compos
|
|
|
195
195
|
import { useFocus } from "../../composables/Commons/focus.composable";
|
|
196
196
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
197
197
|
import { useMask } from "../../composables/Commons/mask.composable";
|
|
198
|
-
import { useProps } from "../../composables/Commons/props.composable";
|
|
198
|
+
import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
|
|
199
199
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
200
200
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
201
201
|
import { BORDER_PROP_KEYS } from "../../consts/Commons/border.const";
|
|
@@ -509,10 +509,10 @@ const filteredAttrs = computed(() => filterInputAttrs(attrs));
|
|
|
509
509
|
const rootAttrs = computed(() => filteredAttrs.value[0]);
|
|
510
510
|
const inputAttrs = computed(() => filteredAttrs.value[1]);
|
|
511
511
|
const inputProps = computed(() => {
|
|
512
|
-
return
|
|
512
|
+
return filterPropsOf(OrigamInput, props, ["modelValue", "class", "style", "focused", ...BORDER_PROP_KEYS]);
|
|
513
513
|
});
|
|
514
514
|
const fieldProps = computed(() => {
|
|
515
|
-
return
|
|
515
|
+
return filterPropsOf(OrigamField, props, ["class", "id", "active", "dirty", "disabled", "focused", "error", "style"]);
|
|
516
516
|
});
|
|
517
517
|
const textFieldStyles = computed(() => {
|
|
518
518
|
return [
|
|
@@ -271,7 +271,7 @@ import { useAdjacentInner } from "../../composables/Commons/adjacentInner.compos
|
|
|
271
271
|
import { useDragResizer } from "../../composables/Commons/dragResizer.composable";
|
|
272
272
|
import { useFocus } from "../../composables/Commons/focus.composable";
|
|
273
273
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
274
|
-
import { useProps } from "../../composables/Commons/props.composable";
|
|
274
|
+
import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
|
|
275
275
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
276
276
|
import { useTextareaRich } from "../../composables/TextareaField/textarea-field-rich.composable";
|
|
277
277
|
import { useTheme } from "../../composables/Commons/theme.composable";
|
|
@@ -656,10 +656,10 @@ const enrichedRules = computed(() => {
|
|
|
656
656
|
});
|
|
657
657
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
658
658
|
const inputProps = computed(() => {
|
|
659
|
-
return
|
|
659
|
+
return filterPropsOf(OrigamInput, props, ["modelValue", "class", "style", "focused", "centerAffix", ...BORDER_PROP_KEYS]);
|
|
660
660
|
});
|
|
661
661
|
const fieldProps = computed(() => {
|
|
662
|
-
return
|
|
662
|
+
return filterPropsOf(OrigamField, props, ["class", "id", "style", "active", "dirty", "disabled", "focused", "error", "centerAffix"]);
|
|
663
663
|
});
|
|
664
664
|
const textareaFieldStyles = computed(() => {
|
|
665
665
|
return [
|
|
@@ -3,20 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.filterPropsOf = filterPropsOf;
|
|
6
7
|
exports.useProps = useProps;
|
|
7
8
|
var _commons = require("../../utils/Commons/commons.util.cjs");
|
|
8
9
|
function useProps(props) {
|
|
9
|
-
const
|
|
10
|
-
const filterProps = (properties, excludes = defaultExcludes) => {
|
|
11
|
-
const propKeys = Object.keys(props).filter(key => !excludes.includes(key));
|
|
12
|
-
const picked = (0, _commons.pick)(properties, propKeys);
|
|
13
|
-
for (const key of Object.keys(picked)) {
|
|
14
|
-
if (picked[key] === void 0) delete picked[key];
|
|
15
|
-
}
|
|
16
|
-
return picked;
|
|
17
|
-
};
|
|
10
|
+
const filterProps = (properties, excludes = defaultExcludes) => pickDeclared(properties, Object.keys(props), excludes);
|
|
18
11
|
return {
|
|
19
12
|
filterProps,
|
|
20
13
|
props
|
|
21
14
|
};
|
|
15
|
+
}
|
|
16
|
+
const defaultExcludes = ["class", "style", "id"];
|
|
17
|
+
function pickDeclared(properties, declared, excludes) {
|
|
18
|
+
const propKeys = declared.filter(key => !excludes.includes(key));
|
|
19
|
+
const picked = (0, _commons.pick)(properties, propKeys);
|
|
20
|
+
for (const key of Object.keys(picked)) {
|
|
21
|
+
if (picked[key] === void 0) delete picked[key];
|
|
22
|
+
}
|
|
23
|
+
return picked;
|
|
24
|
+
}
|
|
25
|
+
function filterPropsOf(component, properties, excludes = defaultExcludes) {
|
|
26
|
+
const declared = component.props;
|
|
27
|
+
return pickDeclared(properties, Array.isArray(declared) ? declared : Object.keys(declared ?? {}), excludes);
|
|
22
28
|
}
|
|
@@ -48,3 +48,13 @@ import type { IFilterPropsOptions } from '../../interfaces/Commons/commons.inter
|
|
|
48
48
|
* this one.
|
|
49
49
|
********************************************************/
|
|
50
50
|
export declare function useProps<T extends object>(props: T): IFilterPropsOptions<T>;
|
|
51
|
+
/*********************************************************
|
|
52
|
+
* filterPropsOf — #1226
|
|
53
|
+
*
|
|
54
|
+
* Same output as `childRef.value?.filterProps(props, excludes)`, but the child's
|
|
55
|
+
* declared prop names are read from its STATIC component definition instead of
|
|
56
|
+
* through a template ref. The ref is `undefined` on the server and during
|
|
57
|
+
* hydration, so every relayed prop (`id`, `variant`, `rounded`…) was missing
|
|
58
|
+
* from the SSR HTML and arrived one tick after mount, with no hydration warning.
|
|
59
|
+
********************************************************/
|
|
60
|
+
export declare function filterPropsOf(component: object, properties: object, excludes?: string[]): Record<string, unknown>;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { pick } from "../../utils/Commons/commons.util.js";
|
|
2
2
|
export function useProps(props) {
|
|
3
|
-
const
|
|
4
|
-
const filterProps = (properties, excludes = defaultExcludes) => {
|
|
5
|
-
const propKeys = Object.keys(props).filter((key) => !excludes.includes(key));
|
|
6
|
-
const picked = pick(properties, propKeys);
|
|
7
|
-
for (const key of Object.keys(picked)) {
|
|
8
|
-
if (picked[key] === void 0) delete picked[key];
|
|
9
|
-
}
|
|
10
|
-
return picked;
|
|
11
|
-
};
|
|
3
|
+
const filterProps = (properties, excludes = defaultExcludes) => pickDeclared(properties, Object.keys(props), excludes);
|
|
12
4
|
return { filterProps, props };
|
|
13
5
|
}
|
|
6
|
+
const defaultExcludes = ["class", "style", "id"];
|
|
7
|
+
function pickDeclared(properties, declared, excludes) {
|
|
8
|
+
const propKeys = declared.filter((key) => !excludes.includes(key));
|
|
9
|
+
const picked = pick(properties, propKeys);
|
|
10
|
+
for (const key of Object.keys(picked)) {
|
|
11
|
+
if (picked[key] === void 0) delete picked[key];
|
|
12
|
+
}
|
|
13
|
+
return picked;
|
|
14
|
+
}
|
|
15
|
+
export function filterPropsOf(component, properties, excludes = defaultExcludes) {
|
|
16
|
+
const declared = component.props;
|
|
17
|
+
return pickDeclared(properties, Array.isArray(declared) ? declared : Object.keys(declared ?? {}), excludes);
|
|
18
|
+
}
|