@elliemae/ds-app-picker 3.70.0-next.61 → 3.70.0-next.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/config/useAppPicker.js +2 -2
- package/dist/cjs/config/useAppPicker.js.map +2 -2
- package/dist/cjs/config/useFocusTracker.js +7 -7
- package/dist/cjs/config/useFocusTracker.js.map +2 -2
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/parts/AppPanel.js +5 -14
- package/dist/cjs/parts/AppPanel.js.map +2 -2
- package/dist/cjs/parts/AppPickerFloatingContext/AppPickerContent.js +12 -3
- package/dist/cjs/parts/AppPickerFloatingContext/AppPickerContent.js.map +2 -2
- package/dist/cjs/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js +46 -22
- package/dist/cjs/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js.map +2 -2
- package/dist/cjs/parts/Trigger.js +3 -1
- package/dist/cjs/parts/Trigger.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +5 -1
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/typescript-app-picker-valid.js +2 -1
- package/dist/cjs/typescript-testing/typescript-app-picker-valid.js.map +2 -2
- package/dist/cjs/util/getDSAppPickerContractProps.js +38 -0
- package/dist/cjs/util/getDSAppPickerContractProps.js.map +7 -0
- package/dist/esm/config/useAppPicker.js +2 -2
- package/dist/esm/config/useAppPicker.js.map +2 -2
- package/dist/esm/config/useFocusTracker.js +7 -7
- package/dist/esm/config/useFocusTracker.js.map +2 -2
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/parts/AppPanel.js +5 -14
- package/dist/esm/parts/AppPanel.js.map +2 -2
- package/dist/esm/parts/AppPickerFloatingContext/AppPickerContent.js +12 -3
- package/dist/esm/parts/AppPickerFloatingContext/AppPickerContent.js.map +2 -2
- package/dist/esm/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js +46 -22
- package/dist/esm/parts/AppPickerFloatingContext/useAppPickerFloatingContext.js.map +2 -2
- package/dist/esm/parts/Trigger.js +3 -1
- package/dist/esm/parts/Trigger.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +5 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-app-picker-valid.js +2 -1
- package/dist/esm/typescript-testing/typescript-app-picker-valid.js.map +2 -2
- package/dist/esm/util/getDSAppPickerContractProps.js +8 -0
- package/dist/esm/util/getDSAppPickerContractProps.js.map +7 -0
- package/dist/types/config/useAppPicker.d.ts +2 -2
- package/dist/types/config/useFocusTracker.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/parts/AppPickerFloatingContext/useAppPickerFloatingContext.d.ts +3 -2
- package/dist/types/parts/Trigger.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +32 -0
- package/dist/types/util/getDSAppPickerContractProps.d.ts +37 -0
- package/package.json +16 -15
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type DSAppPickerT } from '../react-desc-prop-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Filters an arbitrary object down to the props DSAppPicker actually accepts.
|
|
4
|
+
*
|
|
5
|
+
* **Who this is for.** Components that wrap DSAppPicker and receive its props indirectly — as a
|
|
6
|
+
* configuration object from their own consumer rather than as JSX props.
|
|
7
|
+
*
|
|
8
|
+
* The canonical case is `ds-global-header`, whose `toolbar` config carries a `componentProps` object for
|
|
9
|
+
* the `ds-app-picker` item type. Such a wrapper cannot spread that object blindly: its config type is
|
|
10
|
+
* DSAppPicker's props *plus* the wrapper's own — `triggerOnClick` there — and those must not leak into
|
|
11
|
+
* DSAppPicker.
|
|
12
|
+
*
|
|
13
|
+
* Do not swap this for a hand-listed set of forwardable keys. A hand-list has no way to fail when the
|
|
14
|
+
* contract grows: the new prop type-checks at the call site, is dropped silently at runtime, and nothing
|
|
15
|
+
* reports it. Deriving the set from the contract is what makes that class of bug impossible.
|
|
16
|
+
*
|
|
17
|
+
* **Why a utility instead of exporting the schema.** `DSAppPickerPropTypes` is internal. It exists to
|
|
18
|
+
* drive prop validation and the Storybook props table; that it also happens to describe the exact set
|
|
19
|
+
* of forwardable props is a convenience today, not a promise. Exposing the schema would weld those
|
|
20
|
+
* concerns together and make every future change to it a public API change. Exposing this utility
|
|
21
|
+
* instead means the public commitment is only "you get the props DSAppPicker accepts" — if the two
|
|
22
|
+
* ever need to diverge, only this function changes.
|
|
23
|
+
*
|
|
24
|
+
* Anything the contract does not declare is discarded. Arbitrary `data-*` attributes are kept (a
|
|
25
|
+
* supported consumer surface no schema can enumerate).
|
|
26
|
+
*
|
|
27
|
+
* `undefined` vs `null` — see `getContractProps` for the implemented rule and the React precedent it
|
|
28
|
+
* follows. In short: `undefined` is dropped ("I am not defining this, you decide" — the wrapper's
|
|
29
|
+
* default stands), `null` is forwarded ("I am explicitly asking for nothing") and is then judged by
|
|
30
|
+
* DSAppPicker's own strictly-typed contract, which rejects it for props whose declared type does not
|
|
31
|
+
* admit null. To disable a handler, pass an explicit no-op (`() => {}`) — it honours the type and
|
|
32
|
+
* states the intent unambiguously.
|
|
33
|
+
*
|
|
34
|
+
* @param props - the object to filter, typically a wrapper's `componentProps` configuration
|
|
35
|
+
* @returns a new object containing only props DSAppPicker declares
|
|
36
|
+
*/
|
|
37
|
+
export declare const getDSAppPickerContractProps: (props: object) => Partial<DSAppPickerT.Props>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-app-picker",
|
|
3
|
-
"version": "3.70.0-next.
|
|
3
|
+
"version": "3.70.0-next.63",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - App Picker",
|
|
6
6
|
"files": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
],
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "https://
|
|
25
|
+
"url": "https://github.com/intcx/PLATFORM-UI.dimsum.git"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
28
|
"pnpm": ">=9",
|
|
@@ -37,23 +37,24 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"uid": "^2.0.2",
|
|
40
|
-
"@elliemae/ds-
|
|
41
|
-
"@elliemae/ds-floating-context": "3.70.0-next.
|
|
42
|
-
"@elliemae/ds-
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-
|
|
45
|
-
"@elliemae/ds-
|
|
46
|
-
"@elliemae/ds-typography": "3.70.0-next.
|
|
47
|
-
"@elliemae/ds-
|
|
48
|
-
"@elliemae/ds-
|
|
40
|
+
"@elliemae/ds-grid": "3.70.0-next.63",
|
|
41
|
+
"@elliemae/ds-floating-context": "3.70.0-next.63",
|
|
42
|
+
"@elliemae/ds-hooks-focus-trap": "3.70.0-next.63",
|
|
43
|
+
"@elliemae/ds-button-v2": "3.70.0-next.63",
|
|
44
|
+
"@elliemae/ds-icons": "3.70.0-next.63",
|
|
45
|
+
"@elliemae/ds-chip": "3.70.0-next.63",
|
|
46
|
+
"@elliemae/ds-typography": "3.70.0-next.63",
|
|
47
|
+
"@elliemae/ds-props-helpers": "3.70.0-next.63",
|
|
48
|
+
"@elliemae/ds-system": "3.70.0-next.63"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@playwright/experimental-ct-react": "1.61.1",
|
|
52
52
|
"jest": "^30.0.0",
|
|
53
|
+
"jest-axe": "^11.0.0",
|
|
53
54
|
"styled-components": "~5.3.11",
|
|
54
|
-
"@elliemae/ds-
|
|
55
|
-
"@elliemae/ds-
|
|
56
|
-
"@elliemae/ds-typescript-helpers": "3.70.0-next.
|
|
55
|
+
"@elliemae/ds-test-utils": "3.70.0-next.63",
|
|
56
|
+
"@elliemae/ds-monorepo-devops": "3.70.0-next.63",
|
|
57
|
+
"@elliemae/ds-typescript-helpers": "3.70.0-next.63"
|
|
57
58
|
},
|
|
58
59
|
"peerDependencies": {
|
|
59
60
|
"react": "^18.3.1",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
},
|
|
67
68
|
"scripts": {
|
|
68
69
|
"dev": "cross-env NODE_ENV=development node ../../../scripts/build/build.mjs --watch",
|
|
69
|
-
"test": "ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
|
|
70
|
+
"test": "playwright test -c ./playwright.config.mjs && ds-monorepo-devops test --passWithNoTests --coverage=\"false\"",
|
|
70
71
|
"lint": "node ../../../scripts/lint.mjs --fix",
|
|
71
72
|
"lint:strict": "node ../../../scripts/lint-strict.mjs",
|
|
72
73
|
"dts": "node ../../../scripts/dts.mjs",
|