@workday/canvas-kit-react 9.0.2 → 9.1.0-429-next.0
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/action-bar/lib/useActionBarModel.tsx +20 -3
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts +51 -500
- package/dist/commonjs/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts +12 -0
- package/dist/commonjs/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/commonjs/action-bar/lib/useActionBarModel.js +16 -3
- package/dist/es6/action-bar/lib/ActionBar.d.ts +51 -500
- package/dist/es6/action-bar/lib/ActionBar.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts +12 -0
- package/dist/es6/action-bar/lib/useActionBarModel.d.ts.map +1 -1
- package/dist/es6/action-bar/lib/useActionBarModel.js +16 -3
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/ActionBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -32,6 +32,12 @@ export declare const useActionBarModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
32
32
|
defaultItemHeight: number;
|
|
33
33
|
items: any[];
|
|
34
34
|
}>;
|
|
35
|
+
/**
|
|
36
|
+
* The maximum number of actions that can be visible.
|
|
37
|
+
* Must be greater than 1 and less than items.length.
|
|
38
|
+
* @default 3
|
|
39
|
+
*/
|
|
40
|
+
maximumVisible: number;
|
|
35
41
|
initialHiddenIds: string[];
|
|
36
42
|
containerWidth: number;
|
|
37
43
|
shouldCalculateOverflow: boolean;
|
|
@@ -1619,6 +1625,12 @@ export declare const useActionBarModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
1619
1625
|
defaultItemHeight: number;
|
|
1620
1626
|
items: any[];
|
|
1621
1627
|
}>;
|
|
1628
|
+
/**
|
|
1629
|
+
* The maximum number of actions that can be visible.
|
|
1630
|
+
* Must be greater than 1 and less than items.length.
|
|
1631
|
+
* @default 3
|
|
1632
|
+
*/
|
|
1633
|
+
maximumVisible: number;
|
|
1622
1634
|
initialHiddenIds: string[];
|
|
1623
1635
|
containerWidth: number;
|
|
1624
1636
|
shouldCalculateOverflow: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActionBarModel.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/useActionBarModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,iBAAiB;IAG1B;;;OAGG;;IAEH;;;;OAIG
|
|
1
|
+
{"version":3,"file":"useActionBarModel.d.ts","sourceRoot":"","sources":["../../../../action-bar/lib/useActionBarModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,iBAAiB;IAG1B;;;OAGG;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAhBH;;;OAGG;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkFL,CAAC"}
|
|
@@ -17,6 +17,12 @@ export const useActionBarModel = createModelHook({
|
|
|
17
17
|
*/
|
|
18
18
|
orientation: 'horizontal',
|
|
19
19
|
menuConfig: {},
|
|
20
|
+
/**
|
|
21
|
+
* The maximum number of actions that can be visible.
|
|
22
|
+
* Must be greater than 1 and less than items.length.
|
|
23
|
+
* @default 3
|
|
24
|
+
*/
|
|
25
|
+
maximumVisible: 3,
|
|
20
26
|
},
|
|
21
27
|
requiredConfig: useOverflowListModel.requiredConfig,
|
|
22
28
|
})(config => {
|
|
@@ -30,9 +36,16 @@ export const useActionBarModel = createModelHook({
|
|
|
30
36
|
let hiddenIds = model.state.hiddenIds;
|
|
31
37
|
let nonInteractiveIds = model.state.nonInteractiveIds;
|
|
32
38
|
const totalSize = model.state.items.length;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
console.log(config.maximumVisible);
|
|
40
|
+
// Only show maximumVisible buttons
|
|
41
|
+
const maximumVisible = !config.maximumVisible || config.maximumVisible < 1
|
|
42
|
+
? 3 // should fallback to default value
|
|
43
|
+
: config.maximumVisible > totalSize
|
|
44
|
+
? totalSize
|
|
45
|
+
: config.maximumVisible;
|
|
46
|
+
console.log('maximumVisible', maximumVisible);
|
|
47
|
+
if (totalSize - hiddenIds.length >= maximumVisible) {
|
|
48
|
+
hiddenIds = items.slice(maximumVisible, totalSize).map(getId);
|
|
36
49
|
}
|
|
37
50
|
// Always show the first button and make sure it is interactive
|
|
38
51
|
if (totalSize - hiddenIds.length === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.1.0-429-next.0",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@emotion/styled": "^11.6.0",
|
|
50
50
|
"@popperjs/core": "^2.5.4",
|
|
51
51
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
52
|
-
"@workday/canvas-kit-popup-stack": "^9.0.
|
|
52
|
+
"@workday/canvas-kit-popup-stack": "^9.1.0-429-next.0",
|
|
53
53
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
54
54
|
"@workday/design-assets-types": "^0.2.8",
|
|
55
55
|
"chroma-js": "^2.1.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
67
67
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "41766d8358909bff45263f45f7a2ca9481678329"
|
|
70
70
|
}
|