@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"}
|
|
@@ -23,6 +23,12 @@ exports.useActionBarModel = common_1.createModelHook({
|
|
|
23
23
|
*/
|
|
24
24
|
orientation: 'horizontal',
|
|
25
25
|
menuConfig: {},
|
|
26
|
+
/**
|
|
27
|
+
* The maximum number of actions that can be visible.
|
|
28
|
+
* Must be greater than 1 and less than items.length.
|
|
29
|
+
* @default 3
|
|
30
|
+
*/
|
|
31
|
+
maximumVisible: 3,
|
|
26
32
|
},
|
|
27
33
|
requiredConfig: collection_1.useOverflowListModel.requiredConfig,
|
|
28
34
|
})(config => {
|
|
@@ -36,9 +42,16 @@ exports.useActionBarModel = common_1.createModelHook({
|
|
|
36
42
|
let hiddenIds = model.state.hiddenIds;
|
|
37
43
|
let nonInteractiveIds = model.state.nonInteractiveIds;
|
|
38
44
|
const totalSize = model.state.items.length;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
console.log(config.maximumVisible);
|
|
46
|
+
// Only show maximumVisible buttons
|
|
47
|
+
const maximumVisible = !config.maximumVisible || config.maximumVisible < 1
|
|
48
|
+
? 3 // should fallback to default value
|
|
49
|
+
: config.maximumVisible > totalSize
|
|
50
|
+
? totalSize
|
|
51
|
+
: config.maximumVisible;
|
|
52
|
+
console.log('maximumVisible', maximumVisible);
|
|
53
|
+
if (totalSize - hiddenIds.length >= maximumVisible) {
|
|
54
|
+
hiddenIds = items.slice(maximumVisible, totalSize).map(getId);
|
|
42
55
|
}
|
|
43
56
|
// Always show the first button and make sure it is interactive
|
|
44
57
|
if (totalSize - hiddenIds.length === 0) {
|