@genexus/genexus-ide-ui 0.0.84 → 0.0.86
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/ch-action-group-render.cjs.entry.js +112 -0
- package/dist/cjs/ch-checkbox_3.cjs.entry.js +21 -10
- package/dist/cjs/ch-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/ch-dropdown-render.cjs.entry.js +73 -0
- package/dist/cjs/ch-shortcuts_2.cjs.entry.js +99 -20
- package/dist/cjs/ch-tree-view-render_2.cjs.entry.js +49 -92
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/genexus-implementation-664b13f0.js +76 -0
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +2 -5
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +16 -9
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +14 -3
- package/dist/cjs/gx-ide-new-object.cjs.entry.js +21 -3
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +87 -59
- package/dist/cjs/gx-ide-recent-news.cjs.entry.js +2 -3
- package/dist/cjs/gx-ide-references.cjs.entry.js +2 -7
- package/dist/cjs/gx-ide-start-page.cjs.entry.js +1 -1
- package/dist/cjs/gxg-combo-box_2.cjs.entry.js +1 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/kb-manager-import/kb-manager-import.js +2 -5
- package/dist/collection/components/new-environment/new-environment.js +39 -9
- package/dist/collection/components/new-kb/gx-ide-assets/new-kb/shortcuts.json +1 -4
- package/dist/collection/components/new-kb/new-kb.js +37 -3
- package/dist/collection/components/new-object/gx-ide-assets/new-object/shortcuts.json +1 -4
- package/dist/collection/components/new-object/new-object.js +44 -3
- package/dist/collection/components/object-selector/gx-ide-assets/object-selector/langs/object-selector.lang.en.json +4 -0
- package/dist/collection/components/object-selector/object-selector.css +4 -0
- package/dist/collection/components/object-selector/object-selector.js +123 -58
- package/dist/collection/components/references/references.js +3 -10
- package/dist/collection/components/start-page/recent-news.js +2 -3
- package/dist/collection/components/start-page/start-page.js +1 -1
- package/dist/components/ch-action-group-render.js +175 -0
- package/dist/components/ch-dropdown-item-separator.js +28 -1
- package/dist/components/ch-dropdown-render.js +121 -0
- package/dist/components/ch-shortcuts2.js +97 -19
- package/dist/components/combo-box.js +1 -8
- package/dist/components/dropdown-item.js +1 -1
- package/dist/components/genexus-implementation.js +74 -0
- package/dist/components/gx-ide-kb-manager-import.js +2 -5
- package/dist/components/gx-ide-new-environment.js +18 -10
- package/dist/components/gx-ide-new-kb.js +16 -4
- package/dist/components/gx-ide-new-object.js +24 -5
- package/dist/components/gx-ide-object-selector.js +140 -104
- package/dist/components/gx-ide-references.js +3 -10
- package/dist/components/gx-ide-start-page.js +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/recent-news.js +2 -3
- package/dist/components/shortcuts.js +4 -1
- package/dist/components/tree-view-item.js +21 -10
- package/dist/components/tree-view-render.js +49 -91
- package/dist/esm/ch-action-group-render.entry.js +108 -0
- package/dist/esm/ch-checkbox_3.entry.js +21 -10
- package/dist/esm/ch-dropdown-item.entry.js +1 -1
- package/dist/esm/ch-dropdown-render.entry.js +69 -0
- package/dist/esm/ch-shortcuts_2.entry.js +99 -20
- package/dist/esm/ch-tree-view-render_2.entry.js +48 -91
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/genexus-implementation-3b347d88.js +74 -0
- package/dist/esm/gx-ide-kb-manager-import.entry.js +2 -5
- package/dist/esm/gx-ide-new-environment.entry.js +16 -9
- package/dist/esm/gx-ide-new-kb.entry.js +14 -3
- package/dist/esm/gx-ide-new-object.entry.js +21 -3
- package/dist/esm/gx-ide-object-selector.entry.js +87 -59
- package/dist/esm/gx-ide-recent-news.entry.js +2 -3
- package/dist/esm/gx-ide-references.entry.js +2 -7
- package/dist/esm/gx-ide-start-page.entry.js +1 -1
- package/dist/esm/gxg-combo-box_2.entry.js +1 -7
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/new-kb/shortcuts.json +1 -4
- package/dist/genexus-ide-ui/gx-ide-assets/new-object/shortcuts.json +1 -4
- package/dist/genexus-ide-ui/gx-ide-assets/object-selector/langs/object-selector.lang.en.json +4 -0
- package/dist/genexus-ide-ui/p-021e21a0.entry.js +1 -0
- package/dist/genexus-ide-ui/p-068b6b8d.entry.js +1 -0
- package/dist/genexus-ide-ui/p-06d9d6ff.entry.js +1 -0
- package/dist/genexus-ide-ui/p-356ee19a.js +1 -0
- package/dist/genexus-ide-ui/p-49333316.entry.js +1 -0
- package/dist/genexus-ide-ui/p-4bd7c59a.entry.js +1 -0
- package/dist/genexus-ide-ui/p-54b5628c.entry.js +1 -0
- package/dist/genexus-ide-ui/p-65b5622e.entry.js +1 -0
- package/dist/genexus-ide-ui/p-70b33bae.entry.js +1 -0
- package/dist/genexus-ide-ui/p-8a18798d.entry.js +1 -0
- package/dist/genexus-ide-ui/p-8f022c0e.entry.js +1 -0
- package/dist/genexus-ide-ui/{p-20fab805.entry.js → p-90806539.entry.js} +1 -1
- package/dist/genexus-ide-ui/p-ad5d4f7d.entry.js +1 -0
- package/dist/genexus-ide-ui/p-cadcd655.entry.js +1 -0
- package/dist/genexus-ide-ui/p-cfbd5a0e.entry.js +1 -0
- package/dist/genexus-ide-ui/{p-005970ac.entry.js → p-eaae6676.entry.js} +1 -1
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/renders/action-group/action-group-render.css +3 -0
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/renders/dropdown/dropdown-render.css +3 -0
- package/dist/types/components/new-environment/new-environment.d.ts +5 -1
- package/dist/types/components/new-kb/new-kb.d.ts +5 -0
- package/dist/types/components/new-object/new-object.d.ts +6 -0
- package/dist/types/components/object-selector/object-selector.d.ts +14 -3
- package/dist/types/components/references/references.d.ts +0 -9
- package/dist/types/components/start-page/recent-news.d.ts +1 -1
- package/dist/types/components.d.ts +24 -0
- package/package.json +3 -3
- package/dist/cjs/ch-test-action-group.cjs.entry.js +0 -79
- package/dist/cjs/ch-test-dropdown.cjs.entry.js +0 -54
- package/dist/components/ch-test-action-group.js +0 -137
- package/dist/components/ch-test-dropdown.js +0 -104
- package/dist/components/dropdown-item-separator.js +0 -30
- package/dist/esm/ch-test-action-group.entry.js +0 -75
- package/dist/esm/ch-test-dropdown.entry.js +0 -50
- package/dist/genexus-ide-ui/p-2d77e2a3.entry.js +0 -1
- package/dist/genexus-ide-ui/p-4de6b0f4.entry.js +0 -1
- package/dist/genexus-ide-ui/p-5757e203.entry.js +0 -1
- package/dist/genexus-ide-ui/p-7a03aa05.entry.js +0 -1
- package/dist/genexus-ide-ui/p-7ae11b35.entry.js +0 -1
- package/dist/genexus-ide-ui/p-85b78e25.entry.js +0 -1
- package/dist/genexus-ide-ui/p-9f08b2a4.entry.js +0 -1
- package/dist/genexus-ide-ui/p-a2c7dc8a.entry.js +0 -1
- package/dist/genexus-ide-ui/p-a69aaabc.entry.js +0 -1
- package/dist/genexus-ide-ui/p-c00aa636.entry.js +0 -1
- package/dist/genexus-ide-ui/p-d3428456.entry.js +0 -1
- package/dist/genexus-ide-ui/p-d9910218.entry.js +0 -1
- package/dist/genexus-ide-ui/p-da8ad725.entry.js +0 -1
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/test/test-action-group/test-action-group.css +0 -52
- package/dist/node_modules/@genexus/chameleon-controls-library/dist/collection/components/test/test-dropdown/test-dropdown.css +0 -36
|
@@ -18,6 +18,8 @@ export declare class GxIdeObjectSelector {
|
|
|
18
18
|
private filterUserEl;
|
|
19
19
|
private filterModifiedDateEl;
|
|
20
20
|
private chGridEl;
|
|
21
|
+
private gxgShortcutsEl;
|
|
22
|
+
private loaderEl;
|
|
21
23
|
/**
|
|
22
24
|
* The after types render in the after selector
|
|
23
25
|
*/
|
|
@@ -38,6 +40,10 @@ export declare class GxIdeObjectSelector {
|
|
|
38
40
|
* If true it displays the component title on the header
|
|
39
41
|
*/
|
|
40
42
|
readonly displayTitle = false;
|
|
43
|
+
/**
|
|
44
|
+
* If true, it will display a loader when needed.
|
|
45
|
+
*/
|
|
46
|
+
readonly loader = false;
|
|
41
47
|
/**
|
|
42
48
|
* True' if multiple object selection is allowed. Default is 'True'
|
|
43
49
|
*/
|
|
@@ -97,15 +103,18 @@ export declare class GxIdeObjectSelector {
|
|
|
97
103
|
componentWillLoad(): Promise<void>;
|
|
98
104
|
componentDidLoad(): void;
|
|
99
105
|
componentDidRender(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Suspends or reactivates the shortcuts
|
|
108
|
+
*/
|
|
109
|
+
suspendShortcuts(suspendShortcuts: boolean): Promise<void>;
|
|
100
110
|
/**
|
|
101
111
|
* Validate necessary data input
|
|
102
112
|
*/
|
|
103
113
|
validate(): Promise<boolean>;
|
|
104
|
-
private
|
|
105
|
-
private renderObjects;
|
|
114
|
+
private loaderCancelCallbackHandler;
|
|
106
115
|
private getObjects;
|
|
107
116
|
private openSelectionCallbackHandler;
|
|
108
|
-
private
|
|
117
|
+
private cancelCallbackHandler;
|
|
109
118
|
private selectAll;
|
|
110
119
|
private deselectAll;
|
|
111
120
|
private newObjectCallbackHandler;
|
|
@@ -113,6 +122,8 @@ export declare class GxIdeObjectSelector {
|
|
|
113
122
|
private chGridKeyDownHandler;
|
|
114
123
|
private hostKeyPressHandler;
|
|
115
124
|
private evaluateObjectsCount;
|
|
125
|
+
private renderFilter;
|
|
126
|
+
private renderObjects;
|
|
116
127
|
render(): void;
|
|
117
128
|
}
|
|
118
129
|
export type ObjectType = {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import { GxgTreeItemData } from "@genexus/gemini/dist/types/components/tree-item/gxg-tree-item";
|
|
3
2
|
import { TreeViewItemModel } from "@genexus/chameleon-controls-library/dist/types/components/tree-view/tree-view/types";
|
|
4
3
|
import { SuggestData } from "@genexus/chameleon-controls-library/dist/types/components/suggest/ch-suggest";
|
|
5
4
|
export declare class GxIdeReferences {
|
|
@@ -25,14 +24,6 @@ export declare class GxIdeReferences {
|
|
|
25
24
|
* The objects suggestions that will appear on the suggest
|
|
26
25
|
*/
|
|
27
26
|
objectsSuggestions: SuggestData;
|
|
28
|
-
/**
|
|
29
|
-
* Keeps the objects that are referenced by the current selected object
|
|
30
|
-
*/
|
|
31
|
-
referencedBy: GxgTreeItemData[];
|
|
32
|
-
/**
|
|
33
|
-
* Keeps the objects that have references to the current selected object
|
|
34
|
-
*/
|
|
35
|
-
referencesTo: GxgTreeItemData[];
|
|
36
27
|
/**
|
|
37
28
|
* If true it displays the component title on the header
|
|
38
29
|
*/
|
|
@@ -691,6 +691,10 @@ export namespace Components {
|
|
|
691
691
|
* Belongs to checkbox 'Set as current environment' @default true
|
|
692
692
|
*/
|
|
693
693
|
"setAsTarget"?: boolean;
|
|
694
|
+
/**
|
|
695
|
+
* Suspends or reactivates the shortcuts
|
|
696
|
+
*/
|
|
697
|
+
"suspendShortcuts": (suspendShortcuts: boolean) => Promise<void>;
|
|
694
698
|
}
|
|
695
699
|
interface GxIdeNewKb {
|
|
696
700
|
/**
|
|
@@ -773,6 +777,10 @@ export namespace Components {
|
|
|
773
777
|
* Name of the DB server where we want to persist the information of our KB
|
|
774
778
|
*/
|
|
775
779
|
"serverNames": GxOption[];
|
|
780
|
+
/**
|
|
781
|
+
* Suspends or reactivates the shortcuts
|
|
782
|
+
*/
|
|
783
|
+
"suspendShortcuts": (suspendShortcuts: boolean) => Promise<void>;
|
|
776
784
|
/**
|
|
777
785
|
* Username for the database connection. Visible if the Authentication Type is different from Windows Authentication (first item of the combo)
|
|
778
786
|
*/
|
|
@@ -815,6 +823,10 @@ export namespace Components {
|
|
|
815
823
|
* Applies a shadow all around
|
|
816
824
|
*/
|
|
817
825
|
"shadow": false;
|
|
826
|
+
/**
|
|
827
|
+
* Suspends or reactivates the shortcuts
|
|
828
|
+
*/
|
|
829
|
+
"suspendShortcuts": (suspendShortcuts: boolean) => Promise<void>;
|
|
818
830
|
/**
|
|
819
831
|
* Array containing category list and its corresponding types
|
|
820
832
|
*/
|
|
@@ -853,6 +865,10 @@ export namespace Components {
|
|
|
853
865
|
* Callback invoked when the component needs to reload the list of attributes.
|
|
854
866
|
*/
|
|
855
867
|
"loadCallback": LoadCallback;
|
|
868
|
+
/**
|
|
869
|
+
* If true, it will display a loader when needed.
|
|
870
|
+
*/
|
|
871
|
+
"loader": false;
|
|
856
872
|
/**
|
|
857
873
|
* True' if multiple object selection is allowed. Default is 'True'
|
|
858
874
|
*/
|
|
@@ -873,6 +889,10 @@ export namespace Components {
|
|
|
873
889
|
* Callback invoked when the action is executed in the Module/Folder filter. It returns the information of the selected object (id and name) or 'undefined' if it was canceled.
|
|
874
890
|
*/
|
|
875
891
|
"selectModuleCallback": SelectModuleCallback;
|
|
892
|
+
/**
|
|
893
|
+
* Suspends or reactivates the shortcuts
|
|
894
|
+
*/
|
|
895
|
+
"suspendShortcuts": (suspendShortcuts: boolean) => Promise<void>;
|
|
876
896
|
/**
|
|
877
897
|
* The types render in the filter type selector
|
|
878
898
|
*/
|
|
@@ -2559,6 +2579,10 @@ declare namespace LocalJSX {
|
|
|
2559
2579
|
* Callback invoked when the component needs to reload the list of attributes.
|
|
2560
2580
|
*/
|
|
2561
2581
|
"loadCallback": LoadCallback;
|
|
2582
|
+
/**
|
|
2583
|
+
* If true, it will display a loader when needed.
|
|
2584
|
+
*/
|
|
2585
|
+
"loader"?: false;
|
|
2562
2586
|
/**
|
|
2563
2587
|
* True' if multiple object selection is allowed. Default is 'True'
|
|
2564
2588
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genexus/genexus-ide-ui",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.86",
|
|
5
5
|
"description": "GeneXus IDE UI components",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"@types/react": "^18.2.8"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@genexus/gemini": "*0.2.
|
|
39
|
+
"@genexus/gemini": "*0.2.70"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@genexus/gemini": "*0.2.
|
|
42
|
+
"@genexus/gemini": "*0.2.70",
|
|
43
43
|
"@stencil-community/eslint-plugin": "^0.5.0",
|
|
44
44
|
"@stencil/core": "^2.17.0",
|
|
45
45
|
"@stencil/sass": "^2.0.1",
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-f9bb1815.js');
|
|
6
|
-
|
|
7
|
-
const testActionGroupCss = "ch-test-action-group{display:flex;border:2px dashed #00000080;resize:both;overflow:auto;width:500px}.action-group{padding:20px;margin:20px;background-color:#ffffff;border:1px solid}.action-group::part(actions){gap:12px}.action-group::part(more-actions-button){border-radius:50%;width:fit-content;height:fit-content;color:#313aa1;align-self:center;margin-inline-end:8px}.dropdown-item::part(action){--separation:8px;background-color:#f3d0c3;border-radius:4px;padding-inline:16px;padding-block:8px}.dropdown-item::part(action):focus-within{outline:1px solid}.dropdown-item::part(action):hover{background-color:#d3b1a4}.action-group::part(more-actions-list),.dropdown-item::part(list){row-gap:8px;margin-block:8px}.action-group::part(more-actions-section),.dropdown-item::part(section){background-color:#edeaff;padding:8px;box-shadow:0 4px 8px 1px #22222220}";
|
|
8
|
-
|
|
9
|
-
const ChTestActionGroup = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.displayedItemsCount = -1;
|
|
13
|
-
/**
|
|
14
|
-
* This attribute lets you specify the label for the expandable button.
|
|
15
|
-
* Important for accessibility.
|
|
16
|
-
*/
|
|
17
|
-
this.buttonLabel = "Show options";
|
|
18
|
-
/**
|
|
19
|
-
* Determine which actions on the expandable button display the dropdown
|
|
20
|
-
* section.
|
|
21
|
-
*/
|
|
22
|
-
this.expandBehavior = "ClickOrHover";
|
|
23
|
-
/**
|
|
24
|
-
* This attribute determines how items behave when the content of the ActionGroup overflows horizontal. This property is needed
|
|
25
|
-
* to make the control responsive to changes in the Width of the container of ActionGroup.
|
|
26
|
-
*
|
|
27
|
-
* | Value | Details |
|
|
28
|
-
* | --------------------- | ------------------------------------------------------------------------------------------------ |
|
|
29
|
-
* | `Add Scroll` | The items of the ActionGroup that overflow horizontally are shown by means of a scroll. |
|
|
30
|
-
* | `Multiline` | The ActionGroup items that overflow horizontally are shown in a second line of the control. |
|
|
31
|
-
* | `Responsive Collapse` | The Action Group items, when they start to overflow the control, are placed in the More Actions. |
|
|
32
|
-
*/
|
|
33
|
-
this.itemsOverflowBehavior = "ResponsiveCollapse";
|
|
34
|
-
/**
|
|
35
|
-
* Determine if the dropdown section should be opened when the expandable
|
|
36
|
-
* button of the control is focused.
|
|
37
|
-
*/
|
|
38
|
-
this.openOnFocus = false;
|
|
39
|
-
/**
|
|
40
|
-
* Specifies the position of the dropdown section that is placed relative to
|
|
41
|
-
* the more actions button.
|
|
42
|
-
*/
|
|
43
|
-
this.moreActionsDropdownPosition = "InsideStart_OutsideEnd";
|
|
44
|
-
/**
|
|
45
|
-
* Specifies the separation (in pixels) between the expandable button and the
|
|
46
|
-
* dropdown section of the control.
|
|
47
|
-
*/
|
|
48
|
-
this.separation = 0;
|
|
49
|
-
// /**
|
|
50
|
-
// * Fired when the visibility of the dropdown section is changed
|
|
51
|
-
// */
|
|
52
|
-
// @Event() expandedChange: EventEmitter<boolean>;
|
|
53
|
-
this.renderItem = (item) => (index.h("ch-dropdown-item", { slot: "items", id: item.id, class: item.class, expandBehavior: this.expandBehavior, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: item.position || "OutsideEnd_InsideStart", rightImgSrc: item.rightIcon }, item.title, item.items != null && item.items.map(this.renderItem)));
|
|
54
|
-
this.firstLevelRenderItem = (item, index$1) => (index.h("ch-dropdown-item", { id: item.id, class: item.class, expandBehavior: this.expandBehavior, forceContainingBlock: false, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: item.position || "Center_OutsideEnd", rightImgSrc: item.rightIcon }, item.title, this.itemsOverflowBehavior === "ResponsiveCollapse" &&
|
|
55
|
-
(this.displayedItemsCount === -1 || index$1 < this.displayedItemsCount) &&
|
|
56
|
-
item.items != null &&
|
|
57
|
-
item.items.map(this.renderItem)));
|
|
58
|
-
this.firstLevelRenderCollapsedItem = (item) => (index.h("ch-dropdown-item", { slot: "more-items", id: item.id, class: item.class, expandBehavior: this.expandBehavior, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: item.responsiveCollapsePosition || "OutsideEnd_InsideStart", rightImgSrc: item.rightIcon }, item.title, item.items != null && item.items.map(this.renderItem)));
|
|
59
|
-
this.handleDisplayedItemsCountChange = (event) => {
|
|
60
|
-
this.displayedItemsCount = event.detail;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
render() {
|
|
64
|
-
return (index.h(index.Host, null, index.h("ch-action-group", { buttonLabel: this.buttonLabel, class: "action-group", expandBehavior: this.expandBehavior, itemsOverflowBehavior: this.itemsOverflowBehavior, openOnFocus: this.openOnFocus, moreActionsDropdownPosition: this.moreActionsDropdownPosition,
|
|
65
|
-
// style={{
|
|
66
|
-
// "--separation": `${this.separation}px`
|
|
67
|
-
// }}
|
|
68
|
-
onDisplayedItemsCountChange: this.handleDisplayedItemsCountChange }, this.itemsModel != null &&
|
|
69
|
-
this.itemsModel.map((item, index$1) => (index.h("ch-action-group-item", { slot: "items" }, this.firstLevelRenderItem(item, index$1)))), this.itemsOverflowBehavior === "ResponsiveCollapse" &&
|
|
70
|
-
this.itemsModel != null &&
|
|
71
|
-
this.itemsModel
|
|
72
|
-
.filter((_, index) => this.displayedItemsCount !== -1 &&
|
|
73
|
-
index >= this.displayedItemsCount)
|
|
74
|
-
.map(this.firstLevelRenderCollapsedItem))));
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
ChTestActionGroup.style = testActionGroupCss;
|
|
78
|
-
|
|
79
|
-
exports.ch_test_action_group = ChTestActionGroup;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-f9bb1815.js');
|
|
6
|
-
|
|
7
|
-
const testDropdownCss = ".dropdown::part(expandable-button){background-color:aliceblue;border:1px solid;border-radius:4px;padding-block:4px;padding-inline:16px}.dropdown::part(expandable-button):focus{box-shadow:0 0 0 1px black}.dropdown-item::part(action){--separation:8px;background-color:#f3d0c3;border-radius:4px;padding-inline:16px;padding-block:8px}.dropdown-item::part(action):focus-within{outline:1px solid}.dropdown-item::part(action):hover{background-color:#d3b1a4}.dropdown::part(section),.dropdown-item::part(section){background-color:#edeaff;padding:8px;box-shadow:0 4px 8px 1px #22222220}.dropdown::part(list),.dropdown-item::part(list){row-gap:8px;margin-block:8px}";
|
|
8
|
-
|
|
9
|
-
const ChTestDropdownX = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
/**
|
|
13
|
-
* This attribute lets you specify the label for the expandable button.
|
|
14
|
-
* Important for accessibility.
|
|
15
|
-
*/
|
|
16
|
-
this.buttonLabel = "Show options";
|
|
17
|
-
/**
|
|
18
|
-
* Determine which actions on the expandable button display the dropdown
|
|
19
|
-
* section.
|
|
20
|
-
*/
|
|
21
|
-
this.expandBehavior = "ClickOrHover";
|
|
22
|
-
/**
|
|
23
|
-
* Determine if the dropdown section should be opened when the expandable
|
|
24
|
-
* button of the control is focused.
|
|
25
|
-
*/
|
|
26
|
-
this.openOnFocus = false;
|
|
27
|
-
/**
|
|
28
|
-
* Specifies the position of the dropdown section that is placed relative to
|
|
29
|
-
* the expandable button.
|
|
30
|
-
*/
|
|
31
|
-
this.position = "Center_OutsideEnd";
|
|
32
|
-
/**
|
|
33
|
-
* Specifies the separation (in pixels) between the expandable button and the
|
|
34
|
-
* dropdown section of the control.
|
|
35
|
-
*/
|
|
36
|
-
this.separation = 0;
|
|
37
|
-
// /**
|
|
38
|
-
// * Fired when the visibility of the dropdown section is changed
|
|
39
|
-
// */
|
|
40
|
-
// @Event() expandedChange: EventEmitter<boolean>;
|
|
41
|
-
this.renderItem = (item) => [
|
|
42
|
-
index.h("ch-dropdown-item", { slot: "items", id: item.id, class: item.class, expandBehavior: this.expandBehavior, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: "OutsideEnd_InsideStart", rightImgSrc: item.rightIcon }, item.title, item.items != null && item.items.map(this.renderItem)),
|
|
43
|
-
item.showSeparator && (index.h("ch-dropdown-item-separator", { class: item.separatorClass }))
|
|
44
|
-
];
|
|
45
|
-
}
|
|
46
|
-
render() {
|
|
47
|
-
return (index.h(index.Host, null, index.h("ch-dropdown", { buttonLabel: this.buttonLabel, class: "dropdown", expandBehavior: this.expandBehavior, openOnFocus: this.openOnFocus, position: this.position, style: {
|
|
48
|
-
"--separation": `${this.separation}px`
|
|
49
|
-
} }, index.h("span", { slot: "action" }, "User info"), index.h("div", { slot: "header" }, index.h("h1", null, "John Doe"), index.h("span", null, "johndoe@example.com")), this.itemsModel != null && this.itemsModel.map(this.renderItem), index.h("div", { slot: "footer" }, "Footer"))));
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
ChTestDropdownX.style = testDropdownCss;
|
|
53
|
-
|
|
54
|
-
exports.ch_test_dropdown = ChTestDropdownX;
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$7 } from './action-group.js';
|
|
3
|
-
import { d as defineCustomElement$6 } from './action-group-item.js';
|
|
4
|
-
import { d as defineCustomElement$5 } from './dropdown.js';
|
|
5
|
-
import { d as defineCustomElement$4 } from './dropdown-item.js';
|
|
6
|
-
import { d as defineCustomElement$3 } from './ch-window2.js';
|
|
7
|
-
import { d as defineCustomElement$2 } from './ch-window-close2.js';
|
|
8
|
-
|
|
9
|
-
const testActionGroupCss = "ch-test-action-group{display:flex;border:2px dashed #00000080;resize:both;overflow:auto;width:500px}.action-group{padding:20px;margin:20px;background-color:#ffffff;border:1px solid}.action-group::part(actions){gap:12px}.action-group::part(more-actions-button){border-radius:50%;width:fit-content;height:fit-content;color:#313aa1;align-self:center;margin-inline-end:8px}.dropdown-item::part(action){--separation:8px;background-color:#f3d0c3;border-radius:4px;padding-inline:16px;padding-block:8px}.dropdown-item::part(action):focus-within{outline:1px solid}.dropdown-item::part(action):hover{background-color:#d3b1a4}.action-group::part(more-actions-list),.dropdown-item::part(list){row-gap:8px;margin-block:8px}.action-group::part(more-actions-section),.dropdown-item::part(section){background-color:#edeaff;padding:8px;box-shadow:0 4px 8px 1px #22222220}";
|
|
10
|
-
|
|
11
|
-
const ChTestActionGroup$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this.__registerHost();
|
|
15
|
-
this.displayedItemsCount = -1;
|
|
16
|
-
/**
|
|
17
|
-
* This attribute lets you specify the label for the expandable button.
|
|
18
|
-
* Important for accessibility.
|
|
19
|
-
*/
|
|
20
|
-
this.buttonLabel = "Show options";
|
|
21
|
-
/**
|
|
22
|
-
* Determine which actions on the expandable button display the dropdown
|
|
23
|
-
* section.
|
|
24
|
-
*/
|
|
25
|
-
this.expandBehavior = "ClickOrHover";
|
|
26
|
-
/**
|
|
27
|
-
* This attribute determines how items behave when the content of the ActionGroup overflows horizontal. This property is needed
|
|
28
|
-
* to make the control responsive to changes in the Width of the container of ActionGroup.
|
|
29
|
-
*
|
|
30
|
-
* | Value | Details |
|
|
31
|
-
* | --------------------- | ------------------------------------------------------------------------------------------------ |
|
|
32
|
-
* | `Add Scroll` | The items of the ActionGroup that overflow horizontally are shown by means of a scroll. |
|
|
33
|
-
* | `Multiline` | The ActionGroup items that overflow horizontally are shown in a second line of the control. |
|
|
34
|
-
* | `Responsive Collapse` | The Action Group items, when they start to overflow the control, are placed in the More Actions. |
|
|
35
|
-
*/
|
|
36
|
-
this.itemsOverflowBehavior = "ResponsiveCollapse";
|
|
37
|
-
/**
|
|
38
|
-
* Determine if the dropdown section should be opened when the expandable
|
|
39
|
-
* button of the control is focused.
|
|
40
|
-
*/
|
|
41
|
-
this.openOnFocus = false;
|
|
42
|
-
/**
|
|
43
|
-
* Specifies the position of the dropdown section that is placed relative to
|
|
44
|
-
* the more actions button.
|
|
45
|
-
*/
|
|
46
|
-
this.moreActionsDropdownPosition = "InsideStart_OutsideEnd";
|
|
47
|
-
/**
|
|
48
|
-
* Specifies the separation (in pixels) between the expandable button and the
|
|
49
|
-
* dropdown section of the control.
|
|
50
|
-
*/
|
|
51
|
-
this.separation = 0;
|
|
52
|
-
// /**
|
|
53
|
-
// * Fired when the visibility of the dropdown section is changed
|
|
54
|
-
// */
|
|
55
|
-
// @Event() expandedChange: EventEmitter<boolean>;
|
|
56
|
-
this.renderItem = (item) => (h("ch-dropdown-item", { slot: "items", id: item.id, class: item.class, expandBehavior: this.expandBehavior, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: item.position || "OutsideEnd_InsideStart", rightImgSrc: item.rightIcon }, item.title, item.items != null && item.items.map(this.renderItem)));
|
|
57
|
-
this.firstLevelRenderItem = (item, index) => (h("ch-dropdown-item", { id: item.id, class: item.class, expandBehavior: this.expandBehavior, forceContainingBlock: false, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: item.position || "Center_OutsideEnd", rightImgSrc: item.rightIcon }, item.title, this.itemsOverflowBehavior === "ResponsiveCollapse" &&
|
|
58
|
-
(this.displayedItemsCount === -1 || index < this.displayedItemsCount) &&
|
|
59
|
-
item.items != null &&
|
|
60
|
-
item.items.map(this.renderItem)));
|
|
61
|
-
this.firstLevelRenderCollapsedItem = (item) => (h("ch-dropdown-item", { slot: "more-items", id: item.id, class: item.class, expandBehavior: this.expandBehavior, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: item.responsiveCollapsePosition || "OutsideEnd_InsideStart", rightImgSrc: item.rightIcon }, item.title, item.items != null && item.items.map(this.renderItem)));
|
|
62
|
-
this.handleDisplayedItemsCountChange = (event) => {
|
|
63
|
-
this.displayedItemsCount = event.detail;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
render() {
|
|
67
|
-
return (h(Host, null, h("ch-action-group", { buttonLabel: this.buttonLabel, class: "action-group", expandBehavior: this.expandBehavior, itemsOverflowBehavior: this.itemsOverflowBehavior, openOnFocus: this.openOnFocus, moreActionsDropdownPosition: this.moreActionsDropdownPosition,
|
|
68
|
-
// style={{
|
|
69
|
-
// "--separation": `${this.separation}px`
|
|
70
|
-
// }}
|
|
71
|
-
onDisplayedItemsCountChange: this.handleDisplayedItemsCountChange }, this.itemsModel != null &&
|
|
72
|
-
this.itemsModel.map((item, index) => (h("ch-action-group-item", { slot: "items" }, this.firstLevelRenderItem(item, index)))), this.itemsOverflowBehavior === "ResponsiveCollapse" &&
|
|
73
|
-
this.itemsModel != null &&
|
|
74
|
-
this.itemsModel
|
|
75
|
-
.filter((_, index) => this.displayedItemsCount !== -1 &&
|
|
76
|
-
index >= this.displayedItemsCount)
|
|
77
|
-
.map(this.firstLevelRenderCollapsedItem))));
|
|
78
|
-
}
|
|
79
|
-
static get style() { return testActionGroupCss; }
|
|
80
|
-
}, [0, "ch-test-action-group", {
|
|
81
|
-
"buttonLabel": [1, "button-label"],
|
|
82
|
-
"expandBehavior": [1, "expand-behavior"],
|
|
83
|
-
"itemsModel": [16],
|
|
84
|
-
"itemsOverflowBehavior": [1, "items-overflow-behavior"],
|
|
85
|
-
"openOnFocus": [4, "open-on-focus"],
|
|
86
|
-
"moreActionsDropdownPosition": [1, "more-actions-dropdown-position"],
|
|
87
|
-
"separation": [2],
|
|
88
|
-
"displayedItemsCount": [32]
|
|
89
|
-
}]);
|
|
90
|
-
function defineCustomElement$1() {
|
|
91
|
-
if (typeof customElements === "undefined") {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
const components = ["ch-test-action-group", "ch-action-group", "ch-action-group-item", "ch-dropdown", "ch-dropdown-item", "ch-window", "ch-window-close"];
|
|
95
|
-
components.forEach(tagName => { switch (tagName) {
|
|
96
|
-
case "ch-test-action-group":
|
|
97
|
-
if (!customElements.get(tagName)) {
|
|
98
|
-
customElements.define(tagName, ChTestActionGroup$1);
|
|
99
|
-
}
|
|
100
|
-
break;
|
|
101
|
-
case "ch-action-group":
|
|
102
|
-
if (!customElements.get(tagName)) {
|
|
103
|
-
defineCustomElement$7();
|
|
104
|
-
}
|
|
105
|
-
break;
|
|
106
|
-
case "ch-action-group-item":
|
|
107
|
-
if (!customElements.get(tagName)) {
|
|
108
|
-
defineCustomElement$6();
|
|
109
|
-
}
|
|
110
|
-
break;
|
|
111
|
-
case "ch-dropdown":
|
|
112
|
-
if (!customElements.get(tagName)) {
|
|
113
|
-
defineCustomElement$5();
|
|
114
|
-
}
|
|
115
|
-
break;
|
|
116
|
-
case "ch-dropdown-item":
|
|
117
|
-
if (!customElements.get(tagName)) {
|
|
118
|
-
defineCustomElement$4();
|
|
119
|
-
}
|
|
120
|
-
break;
|
|
121
|
-
case "ch-window":
|
|
122
|
-
if (!customElements.get(tagName)) {
|
|
123
|
-
defineCustomElement$3();
|
|
124
|
-
}
|
|
125
|
-
break;
|
|
126
|
-
case "ch-window-close":
|
|
127
|
-
if (!customElements.get(tagName)) {
|
|
128
|
-
defineCustomElement$2();
|
|
129
|
-
}
|
|
130
|
-
break;
|
|
131
|
-
} });
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
const ChTestActionGroup = ChTestActionGroup$1;
|
|
135
|
-
const defineCustomElement = defineCustomElement$1;
|
|
136
|
-
|
|
137
|
-
export { ChTestActionGroup, defineCustomElement };
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$6 } from './dropdown.js';
|
|
3
|
-
import { d as defineCustomElement$5 } from './dropdown-item.js';
|
|
4
|
-
import { d as defineCustomElement$4 } from './dropdown-item-separator.js';
|
|
5
|
-
import { d as defineCustomElement$3 } from './ch-window2.js';
|
|
6
|
-
import { d as defineCustomElement$2 } from './ch-window-close2.js';
|
|
7
|
-
|
|
8
|
-
const testDropdownCss = ".dropdown::part(expandable-button){background-color:aliceblue;border:1px solid;border-radius:4px;padding-block:4px;padding-inline:16px}.dropdown::part(expandable-button):focus{box-shadow:0 0 0 1px black}.dropdown-item::part(action){--separation:8px;background-color:#f3d0c3;border-radius:4px;padding-inline:16px;padding-block:8px}.dropdown-item::part(action):focus-within{outline:1px solid}.dropdown-item::part(action):hover{background-color:#d3b1a4}.dropdown::part(section),.dropdown-item::part(section){background-color:#edeaff;padding:8px;box-shadow:0 4px 8px 1px #22222220}.dropdown::part(list),.dropdown-item::part(list){row-gap:8px;margin-block:8px}";
|
|
9
|
-
|
|
10
|
-
const ChTestDropdownX = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
this.__registerHost();
|
|
14
|
-
/**
|
|
15
|
-
* This attribute lets you specify the label for the expandable button.
|
|
16
|
-
* Important for accessibility.
|
|
17
|
-
*/
|
|
18
|
-
this.buttonLabel = "Show options";
|
|
19
|
-
/**
|
|
20
|
-
* Determine which actions on the expandable button display the dropdown
|
|
21
|
-
* section.
|
|
22
|
-
*/
|
|
23
|
-
this.expandBehavior = "ClickOrHover";
|
|
24
|
-
/**
|
|
25
|
-
* Determine if the dropdown section should be opened when the expandable
|
|
26
|
-
* button of the control is focused.
|
|
27
|
-
*/
|
|
28
|
-
this.openOnFocus = false;
|
|
29
|
-
/**
|
|
30
|
-
* Specifies the position of the dropdown section that is placed relative to
|
|
31
|
-
* the expandable button.
|
|
32
|
-
*/
|
|
33
|
-
this.position = "Center_OutsideEnd";
|
|
34
|
-
/**
|
|
35
|
-
* Specifies the separation (in pixels) between the expandable button and the
|
|
36
|
-
* dropdown section of the control.
|
|
37
|
-
*/
|
|
38
|
-
this.separation = 0;
|
|
39
|
-
// /**
|
|
40
|
-
// * Fired when the visibility of the dropdown section is changed
|
|
41
|
-
// */
|
|
42
|
-
// @Event() expandedChange: EventEmitter<boolean>;
|
|
43
|
-
this.renderItem = (item) => [
|
|
44
|
-
h("ch-dropdown-item", { slot: "items", id: item.id, class: item.class, expandBehavior: this.expandBehavior, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: "OutsideEnd_InsideStart", rightImgSrc: item.rightIcon }, item.title, item.items != null && item.items.map(this.renderItem)),
|
|
45
|
-
item.showSeparator && (h("ch-dropdown-item-separator", { class: item.separatorClass }))
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
render() {
|
|
49
|
-
return (h(Host, null, h("ch-dropdown", { buttonLabel: this.buttonLabel, class: "dropdown", expandBehavior: this.expandBehavior, openOnFocus: this.openOnFocus, position: this.position, style: {
|
|
50
|
-
"--separation": `${this.separation}px`
|
|
51
|
-
} }, h("span", { slot: "action" }, "User info"), h("div", { slot: "header" }, h("h1", null, "John Doe"), h("span", null, "johndoe@example.com")), this.itemsModel != null && this.itemsModel.map(this.renderItem), h("div", { slot: "footer" }, "Footer"))));
|
|
52
|
-
}
|
|
53
|
-
static get style() { return testDropdownCss; }
|
|
54
|
-
}, [0, "ch-test-dropdown", {
|
|
55
|
-
"buttonLabel": [1, "button-label"],
|
|
56
|
-
"expandBehavior": [1, "expand-behavior"],
|
|
57
|
-
"itemsModel": [16],
|
|
58
|
-
"openOnFocus": [4, "open-on-focus"],
|
|
59
|
-
"position": [1],
|
|
60
|
-
"separation": [2]
|
|
61
|
-
}]);
|
|
62
|
-
function defineCustomElement$1() {
|
|
63
|
-
if (typeof customElements === "undefined") {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const components = ["ch-test-dropdown", "ch-dropdown", "ch-dropdown-item", "ch-dropdown-item-separator", "ch-window", "ch-window-close"];
|
|
67
|
-
components.forEach(tagName => { switch (tagName) {
|
|
68
|
-
case "ch-test-dropdown":
|
|
69
|
-
if (!customElements.get(tagName)) {
|
|
70
|
-
customElements.define(tagName, ChTestDropdownX);
|
|
71
|
-
}
|
|
72
|
-
break;
|
|
73
|
-
case "ch-dropdown":
|
|
74
|
-
if (!customElements.get(tagName)) {
|
|
75
|
-
defineCustomElement$6();
|
|
76
|
-
}
|
|
77
|
-
break;
|
|
78
|
-
case "ch-dropdown-item":
|
|
79
|
-
if (!customElements.get(tagName)) {
|
|
80
|
-
defineCustomElement$5();
|
|
81
|
-
}
|
|
82
|
-
break;
|
|
83
|
-
case "ch-dropdown-item-separator":
|
|
84
|
-
if (!customElements.get(tagName)) {
|
|
85
|
-
defineCustomElement$4();
|
|
86
|
-
}
|
|
87
|
-
break;
|
|
88
|
-
case "ch-window":
|
|
89
|
-
if (!customElements.get(tagName)) {
|
|
90
|
-
defineCustomElement$3();
|
|
91
|
-
}
|
|
92
|
-
break;
|
|
93
|
-
case "ch-window-close":
|
|
94
|
-
if (!customElements.get(tagName)) {
|
|
95
|
-
defineCustomElement$2();
|
|
96
|
-
}
|
|
97
|
-
break;
|
|
98
|
-
} });
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const ChTestDropdown = ChTestDropdownX;
|
|
102
|
-
const defineCustomElement = defineCustomElement$1;
|
|
103
|
-
|
|
104
|
-
export { ChTestDropdown, defineCustomElement };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
|
|
3
|
-
const dropdownItemSeparatorCss = ":host{display:flex;height:1px;background-color:#99999980;margin-block:2px}";
|
|
4
|
-
|
|
5
|
-
const ChDropDownItemSeparator = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.__registerHost();
|
|
9
|
-
this.__attachShadow();
|
|
10
|
-
}
|
|
11
|
-
render() {
|
|
12
|
-
return h(Host, { role: "separator" });
|
|
13
|
-
}
|
|
14
|
-
static get style() { return dropdownItemSeparatorCss; }
|
|
15
|
-
}, [1, "ch-dropdown-item-separator"]);
|
|
16
|
-
function defineCustomElement() {
|
|
17
|
-
if (typeof customElements === "undefined") {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const components = ["ch-dropdown-item-separator"];
|
|
21
|
-
components.forEach(tagName => { switch (tagName) {
|
|
22
|
-
case "ch-dropdown-item-separator":
|
|
23
|
-
if (!customElements.get(tagName)) {
|
|
24
|
-
customElements.define(tagName, ChDropDownItemSeparator);
|
|
25
|
-
}
|
|
26
|
-
break;
|
|
27
|
-
} });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { ChDropDownItemSeparator as C, defineCustomElement as d };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-0aa3977d.js';
|
|
2
|
-
|
|
3
|
-
const testActionGroupCss = "ch-test-action-group{display:flex;border:2px dashed #00000080;resize:both;overflow:auto;width:500px}.action-group{padding:20px;margin:20px;background-color:#ffffff;border:1px solid}.action-group::part(actions){gap:12px}.action-group::part(more-actions-button){border-radius:50%;width:fit-content;height:fit-content;color:#313aa1;align-self:center;margin-inline-end:8px}.dropdown-item::part(action){--separation:8px;background-color:#f3d0c3;border-radius:4px;padding-inline:16px;padding-block:8px}.dropdown-item::part(action):focus-within{outline:1px solid}.dropdown-item::part(action):hover{background-color:#d3b1a4}.action-group::part(more-actions-list),.dropdown-item::part(list){row-gap:8px;margin-block:8px}.action-group::part(more-actions-section),.dropdown-item::part(section){background-color:#edeaff;padding:8px;box-shadow:0 4px 8px 1px #22222220}";
|
|
4
|
-
|
|
5
|
-
const ChTestActionGroup = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.displayedItemsCount = -1;
|
|
9
|
-
/**
|
|
10
|
-
* This attribute lets you specify the label for the expandable button.
|
|
11
|
-
* Important for accessibility.
|
|
12
|
-
*/
|
|
13
|
-
this.buttonLabel = "Show options";
|
|
14
|
-
/**
|
|
15
|
-
* Determine which actions on the expandable button display the dropdown
|
|
16
|
-
* section.
|
|
17
|
-
*/
|
|
18
|
-
this.expandBehavior = "ClickOrHover";
|
|
19
|
-
/**
|
|
20
|
-
* This attribute determines how items behave when the content of the ActionGroup overflows horizontal. This property is needed
|
|
21
|
-
* to make the control responsive to changes in the Width of the container of ActionGroup.
|
|
22
|
-
*
|
|
23
|
-
* | Value | Details |
|
|
24
|
-
* | --------------------- | ------------------------------------------------------------------------------------------------ |
|
|
25
|
-
* | `Add Scroll` | The items of the ActionGroup that overflow horizontally are shown by means of a scroll. |
|
|
26
|
-
* | `Multiline` | The ActionGroup items that overflow horizontally are shown in a second line of the control. |
|
|
27
|
-
* | `Responsive Collapse` | The Action Group items, when they start to overflow the control, are placed in the More Actions. |
|
|
28
|
-
*/
|
|
29
|
-
this.itemsOverflowBehavior = "ResponsiveCollapse";
|
|
30
|
-
/**
|
|
31
|
-
* Determine if the dropdown section should be opened when the expandable
|
|
32
|
-
* button of the control is focused.
|
|
33
|
-
*/
|
|
34
|
-
this.openOnFocus = false;
|
|
35
|
-
/**
|
|
36
|
-
* Specifies the position of the dropdown section that is placed relative to
|
|
37
|
-
* the more actions button.
|
|
38
|
-
*/
|
|
39
|
-
this.moreActionsDropdownPosition = "InsideStart_OutsideEnd";
|
|
40
|
-
/**
|
|
41
|
-
* Specifies the separation (in pixels) between the expandable button and the
|
|
42
|
-
* dropdown section of the control.
|
|
43
|
-
*/
|
|
44
|
-
this.separation = 0;
|
|
45
|
-
// /**
|
|
46
|
-
// * Fired when the visibility of the dropdown section is changed
|
|
47
|
-
// */
|
|
48
|
-
// @Event() expandedChange: EventEmitter<boolean>;
|
|
49
|
-
this.renderItem = (item) => (h("ch-dropdown-item", { slot: "items", id: item.id, class: item.class, expandBehavior: this.expandBehavior, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: item.position || "OutsideEnd_InsideStart", rightImgSrc: item.rightIcon }, item.title, item.items != null && item.items.map(this.renderItem)));
|
|
50
|
-
this.firstLevelRenderItem = (item, index) => (h("ch-dropdown-item", { id: item.id, class: item.class, expandBehavior: this.expandBehavior, forceContainingBlock: false, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: item.position || "Center_OutsideEnd", rightImgSrc: item.rightIcon }, item.title, this.itemsOverflowBehavior === "ResponsiveCollapse" &&
|
|
51
|
-
(this.displayedItemsCount === -1 || index < this.displayedItemsCount) &&
|
|
52
|
-
item.items != null &&
|
|
53
|
-
item.items.map(this.renderItem)));
|
|
54
|
-
this.firstLevelRenderCollapsedItem = (item) => (h("ch-dropdown-item", { slot: "more-items", id: item.id, class: item.class, expandBehavior: this.expandBehavior, href: item.target, leftImgSrc: item.leftIcon, openOnFocus: this.openOnFocus, position: item.responsiveCollapsePosition || "OutsideEnd_InsideStart", rightImgSrc: item.rightIcon }, item.title, item.items != null && item.items.map(this.renderItem)));
|
|
55
|
-
this.handleDisplayedItemsCountChange = (event) => {
|
|
56
|
-
this.displayedItemsCount = event.detail;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
render() {
|
|
60
|
-
return (h(Host, null, h("ch-action-group", { buttonLabel: this.buttonLabel, class: "action-group", expandBehavior: this.expandBehavior, itemsOverflowBehavior: this.itemsOverflowBehavior, openOnFocus: this.openOnFocus, moreActionsDropdownPosition: this.moreActionsDropdownPosition,
|
|
61
|
-
// style={{
|
|
62
|
-
// "--separation": `${this.separation}px`
|
|
63
|
-
// }}
|
|
64
|
-
onDisplayedItemsCountChange: this.handleDisplayedItemsCountChange }, this.itemsModel != null &&
|
|
65
|
-
this.itemsModel.map((item, index) => (h("ch-action-group-item", { slot: "items" }, this.firstLevelRenderItem(item, index)))), this.itemsOverflowBehavior === "ResponsiveCollapse" &&
|
|
66
|
-
this.itemsModel != null &&
|
|
67
|
-
this.itemsModel
|
|
68
|
-
.filter((_, index) => this.displayedItemsCount !== -1 &&
|
|
69
|
-
index >= this.displayedItemsCount)
|
|
70
|
-
.map(this.firstLevelRenderCollapsedItem))));
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
ChTestActionGroup.style = testActionGroupCss;
|
|
74
|
-
|
|
75
|
-
export { ChTestActionGroup as ch_test_action_group };
|