@genexus/genexus-ide-ui 2.0.0 → 2.1.1
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/{common-9020d675.js → common-82ec668f.js} +1 -26
- package/dist/cjs/common-82ec668f.js.map +1 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-comments-viewer.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-manage-module-references.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-splash.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-start-page.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-bring-changes.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-team-dev-history.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update-partial-selection.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +2 -2
- package/dist/cjs/gx-ide-ww-files.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +604 -283
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js.map +1 -1
- package/dist/cjs/{helpers-b1b58657.js → helpers-bb6622f5.js} +1 -7
- package/dist/cjs/helpers-bb6622f5.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tabular-grid-render-80aa5fd2.js → tabular-grid-render-96542933.js} +2 -2
- package/dist/cjs/{tabular-grid-render-80aa5fd2.js.map → tabular-grid-render-96542933.js.map} +1 -1
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.en.json +11 -4
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.ja.json +11 -4
- package/dist/collection/components/ww-images/gx-ide-assets/ww-images/langs/ww-images.lang.zh.json +45 -38
- package/dist/collection/components/ww-images/helpers.js +14 -0
- package/dist/collection/components/ww-images/helpers.js.map +1 -0
- package/dist/collection/components/ww-images/ww-images.css +134 -247
- package/dist/collection/components/ww-images/ww-images.js +682 -490
- package/dist/collection/components/ww-images/ww-images.js.map +1 -1
- package/dist/components/common.js +1 -25
- package/dist/components/common.js.map +1 -1
- package/dist/components/gx-ide-ww-images.js +650 -303
- package/dist/components/gx-ide-ww-images.js.map +1 -1
- package/dist/components/helpers.js +1 -6
- package/dist/components/helpers.js.map +1 -1
- package/dist/esm/{common-074a209e.js → common-ceaf354a.js} +2 -26
- package/dist/esm/common-ceaf354a.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-comments-viewer.entry.js +1 -1
- package/dist/esm/gx-ide-manage-module-references.entry.js +1 -1
- package/dist/esm/gx-ide-new-environment.entry.js +2 -2
- package/dist/esm/gx-ide-new-kb.entry.js +2 -2
- package/dist/esm/gx-ide-object-selector.entry.js +1 -1
- package/dist/esm/gx-ide-splash.entry.js +1 -1
- package/dist/esm/gx-ide-start-page.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-bring-changes.entry.js +2 -2
- package/dist/esm/gx-ide-team-dev-commit.entry.js +2 -2
- package/dist/esm/gx-ide-team-dev-history.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update-partial-selection.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update.entry.js +2 -2
- package/dist/esm/gx-ide-ww-files.entry.js +1 -1
- package/dist/esm/gx-ide-ww-images.entry.js +605 -284
- package/dist/esm/gx-ide-ww-images.entry.js.map +1 -1
- package/dist/esm/{helpers-7800bea2.js → helpers-b443f9e9.js} +2 -7
- package/dist/esm/helpers-b443f9e9.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{tabular-grid-render-12c1cc4b.js → tabular-grid-render-adb3f7e5.js} +2 -2
- package/dist/esm/{tabular-grid-render-12c1cc4b.js.map → tabular-grid-render-adb3f7e5.js.map} +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.en.json +11 -4
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.ja.json +11 -4
- package/dist/genexus-ide-ui/gx-ide-assets/ww-images/langs/ww-images.lang.zh.json +45 -38
- package/dist/genexus-ide-ui/{p-dc399624.entry.js → p-1356ec09.entry.js} +3 -3
- package/dist/genexus-ide-ui/{p-c51f87fb.entry.js → p-18c3c961.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-c583252c.entry.js → p-1d3da80d.entry.js} +3 -3
- package/dist/genexus-ide-ui/{p-57c550b7.entry.js → p-21775439.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-d08fc16d.entry.js → p-27786355.entry.js} +6 -6
- package/dist/genexus-ide-ui/{p-c1f4458c.entry.js → p-2a59b523.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-5bab65ea.js → p-4d330836.js} +13 -19
- package/dist/genexus-ide-ui/p-4d330836.js.map +1 -0
- package/dist/genexus-ide-ui/p-520c3763.entry.js +936 -0
- package/dist/genexus-ide-ui/p-520c3763.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-e5e38589.entry.js → p-5929f575.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-e8cd797d.entry.js → p-6b430ac1.entry.js} +3 -3
- package/dist/genexus-ide-ui/{p-70707166.entry.js → p-70cd77bc.entry.js} +3 -3
- package/dist/genexus-ide-ui/{p-401989bf.entry.js → p-750eb88a.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-ddfba1c8.entry.js → p-885e5d1c.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-91e2ebb0.js +86 -0
- package/dist/genexus-ide-ui/p-91e2ebb0.js.map +1 -0
- package/dist/genexus-ide-ui/{p-2eec8e65.entry.js → p-b44a875d.entry.js} +3 -3
- package/dist/genexus-ide-ui/{p-532c2e0f.entry.js → p-ca47bb29.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-528ba8bb.js → p-e2b6d62b.js} +2 -2
- package/dist/types/components/ww-images/helpers.d.ts +3 -0
- package/dist/types/components/ww-images/ww-images.d.ts +116 -134
- package/dist/types/components.d.ts +31 -107
- package/package.json +1 -1
- package/dist/cjs/common-9020d675.js.map +0 -1
- package/dist/cjs/helpers-b1b58657.js.map +0 -1
- package/dist/esm/common-074a209e.js.map +0 -1
- package/dist/esm/helpers-7800bea2.js.map +0 -1
- package/dist/genexus-ide-ui/p-3f89ddf4.js +0 -133
- package/dist/genexus-ide-ui/p-3f89ddf4.js.map +0 -1
- package/dist/genexus-ide-ui/p-5bab65ea.js.map +0 -1
- package/dist/genexus-ide-ui/p-80c25124.entry.js +0 -610
- package/dist/genexus-ide-ui/p-80c25124.entry.js.map +0 -1
- /package/dist/genexus-ide-ui/{p-dc399624.entry.js.map → p-1356ec09.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-c51f87fb.entry.js.map → p-18c3c961.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-c583252c.entry.js.map → p-1d3da80d.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-57c550b7.entry.js.map → p-21775439.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-d08fc16d.entry.js.map → p-27786355.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-c1f4458c.entry.js.map → p-2a59b523.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-e5e38589.entry.js.map → p-5929f575.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-e8cd797d.entry.js.map → p-6b430ac1.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-70707166.entry.js.map → p-70cd77bc.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-401989bf.entry.js.map → p-750eb88a.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-ddfba1c8.entry.js.map → p-885e5d1c.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-2eec8e65.entry.js.map → p-b44a875d.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-532c2e0f.entry.js.map → p-ca47bb29.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-528ba8bb.js.map → p-e2b6d62b.js.map} +0 -0
|
@@ -1,194 +1,181 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GxOption } from "../../common/types";
|
|
3
|
-
import { EntityData, ContextMenuInfo } from "../../common/types";
|
|
1
|
+
import { ComboBoxModel } from "@genexus/chameleon-controls-library";
|
|
2
|
+
import { ContextMenuInfo, EntityData, GxOption } from "../../common/types";
|
|
4
3
|
export declare class GxIdeWWImages {
|
|
4
|
+
#private;
|
|
5
|
+
el: HTMLGxIdeWwImagesElement;
|
|
6
|
+
categoriesComboBoxModel: ComboBoxModel;
|
|
7
|
+
densitiesComboBoxModel: ComboBoxModel;
|
|
8
|
+
languagesComboBoxModel: ComboBoxModel;
|
|
9
|
+
layersComboBoxModel: ComboBoxModel;
|
|
10
|
+
stylesComboBoxModel: ComboBoxModel;
|
|
5
11
|
/**
|
|
6
|
-
* The
|
|
12
|
+
* The current value of the "After" combo box options.
|
|
7
13
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
el: HTMLGxIdeWwImagesElement;
|
|
12
|
-
private filterEl;
|
|
13
|
-
private filterNameEl;
|
|
14
|
-
private filterSearchContentsEl;
|
|
15
|
-
private filterCategoryEl;
|
|
16
|
-
private filterModuleEl;
|
|
17
|
-
private filterModifiedEl;
|
|
18
|
-
private filterAllDescendantsEl;
|
|
19
|
-
private filterAfterTypeEl;
|
|
20
|
-
private filterUserEl;
|
|
21
|
-
private filterModifiedDateEl;
|
|
22
|
-
private filterStyleEl;
|
|
23
|
-
private filterLanguageEl;
|
|
24
|
-
private filterDensityEl;
|
|
25
|
-
private filterLayerEl;
|
|
26
|
-
private chGridEl;
|
|
27
|
-
filtersHidden: boolean;
|
|
28
|
-
filtersHiddenHandler(hidden: boolean): void;
|
|
29
|
-
/**
|
|
30
|
-
* The after types render in the after selector
|
|
31
|
-
*/
|
|
32
|
-
filterAfterType: string;
|
|
33
|
-
/**
|
|
34
|
-
* For show or hide the filters relative to modifiers
|
|
35
|
-
*/
|
|
36
|
-
filterModified: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* The images rendered in the table
|
|
14
|
+
afterCurrentValue: string;
|
|
15
|
+
/**
|
|
16
|
+
* The options for the "After" combo-box
|
|
39
17
|
*/
|
|
40
|
-
|
|
18
|
+
filterAfterOptions: ComboBoxModel;
|
|
41
19
|
/**
|
|
42
|
-
*
|
|
20
|
+
* Image data to be displayed in the tabular grid (filtered from server and sorted)
|
|
43
21
|
*/
|
|
44
|
-
|
|
22
|
+
tabularGridData: ImageData[];
|
|
45
23
|
/**
|
|
46
|
-
*
|
|
24
|
+
* Images rendered in the table
|
|
25
|
+
*/
|
|
26
|
+
images: ImageData[];
|
|
27
|
+
/**
|
|
28
|
+
* Items of the selected image
|
|
47
29
|
*/
|
|
48
30
|
imagesSelectedItems: ImageItemData[];
|
|
49
31
|
/**
|
|
50
|
-
*
|
|
32
|
+
* Selected images in the images table
|
|
51
33
|
*/
|
|
52
34
|
selectedObjectsIds: string[];
|
|
53
35
|
/**
|
|
54
|
-
*
|
|
36
|
+
* When true, modified controls will be enabled, otherwise disabled.
|
|
55
37
|
*/
|
|
56
|
-
|
|
38
|
+
enabledModifiedControls: boolean;
|
|
57
39
|
/**
|
|
58
|
-
*
|
|
40
|
+
* Sorting order for images table
|
|
59
41
|
*/
|
|
60
|
-
|
|
42
|
+
order: {
|
|
43
|
+
orderCriteria: string | null;
|
|
44
|
+
ascending: boolean | null;
|
|
45
|
+
};
|
|
61
46
|
/**
|
|
62
|
-
*
|
|
47
|
+
* Filter state variables
|
|
63
48
|
*/
|
|
64
|
-
|
|
49
|
+
filterNameValue: string;
|
|
50
|
+
filterSearchContentsValue: string;
|
|
51
|
+
filterCategoryValue: string;
|
|
52
|
+
filterAllDescendantsValue: boolean;
|
|
53
|
+
filterAfterTypeValue: string;
|
|
54
|
+
filterUserValue: string;
|
|
55
|
+
filterModifiedDateValue: string;
|
|
56
|
+
filterStyleValue: string;
|
|
57
|
+
filterLanguageValue: string;
|
|
58
|
+
filterDensityValue: string;
|
|
59
|
+
filterLayerValue: string;
|
|
60
|
+
filterModuleValue: EntityData;
|
|
65
61
|
/**
|
|
66
|
-
*
|
|
62
|
+
* Categories rendered in the filter selector
|
|
67
63
|
*/
|
|
68
64
|
readonly categories: GxOption[];
|
|
65
|
+
categoriesChanged(newCategories: GxOption[]): void;
|
|
69
66
|
/**
|
|
70
|
-
*
|
|
67
|
+
* Function to expand data when right-click
|
|
71
68
|
*/
|
|
72
|
-
readonly
|
|
69
|
+
readonly contextMenuCallback: ContextMenuCallback;
|
|
73
70
|
/**
|
|
74
|
-
*
|
|
71
|
+
* Default value for the 'categories' filter
|
|
75
72
|
*/
|
|
76
73
|
readonly defaultCategory: string;
|
|
74
|
+
defaultCategoryChanged(): void;
|
|
77
75
|
/**
|
|
78
|
-
*
|
|
76
|
+
* Default value for the module/folder filter
|
|
79
77
|
*/
|
|
80
78
|
readonly defaultModule: EntityData;
|
|
81
79
|
/**
|
|
82
|
-
*
|
|
80
|
+
* Function to delete the selected images.
|
|
83
81
|
*/
|
|
84
|
-
readonly
|
|
82
|
+
readonly deleteSelectionCallback: DeleteSelectionCallback;
|
|
85
83
|
/**
|
|
86
|
-
*
|
|
84
|
+
* Densities rendered in the filter selector
|
|
87
85
|
*/
|
|
88
|
-
readonly
|
|
86
|
+
readonly densities: GxOption[];
|
|
87
|
+
densitiesChanged(newDensities: GxOption[]): void;
|
|
89
88
|
/**
|
|
90
|
-
*
|
|
89
|
+
* Languages rendered in the filter selector
|
|
91
90
|
*/
|
|
92
91
|
readonly languages: GxOption[];
|
|
92
|
+
languagesChanged(newLanguages: GxOption[]): void;
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* Layers rendered in the filter selector
|
|
95
95
|
*/
|
|
96
96
|
readonly layers: GxOption[];
|
|
97
|
+
layersChanged(newLayers: GxOption[]): void;
|
|
97
98
|
/**
|
|
98
|
-
*
|
|
99
|
-
*/
|
|
100
|
-
readonly contextMenuCallback: ContextMenuCallback;
|
|
101
|
-
/**
|
|
102
|
-
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
103
|
-
*/
|
|
104
|
-
readonly deleteSelectionCallback: DeleteSelectionCallback;
|
|
105
|
-
/**
|
|
106
|
-
* This is a function provided by the developer that return a list of images to populate the table of images.
|
|
99
|
+
* Function that returns a list of images for the table
|
|
107
100
|
*/
|
|
108
101
|
readonly loadCallback: LoadCallback;
|
|
109
102
|
/**
|
|
110
|
-
*
|
|
103
|
+
* Function that returns a list of items for the selected image
|
|
111
104
|
*/
|
|
112
105
|
readonly loadImageItemsCallback: LoadImageItemsCallback;
|
|
113
106
|
/**
|
|
114
|
-
*
|
|
107
|
+
* Callback invoked when user press New button.
|
|
115
108
|
*/
|
|
116
109
|
readonly newObjectCallback: NewObjectCallback;
|
|
117
110
|
/**
|
|
118
|
-
*
|
|
111
|
+
* Function to expand data for double-clicked or entered images
|
|
119
112
|
*/
|
|
120
113
|
readonly openSelectionCallback: OpenSelectionCallback;
|
|
121
114
|
/**
|
|
122
|
-
* Callback invoked when
|
|
115
|
+
* Callback invoked when an action is executed on the Module/Folder filter.
|
|
123
116
|
*/
|
|
124
117
|
readonly selectModuleCallback: SelectModuleCallback;
|
|
125
118
|
/**
|
|
126
|
-
*
|
|
119
|
+
* Callback invoked when an item is selected
|
|
127
120
|
*/
|
|
128
121
|
readonly selectionObjectChangedCallback: SelectionObjectCallback;
|
|
129
122
|
/**
|
|
130
|
-
*
|
|
131
|
-
*/
|
|
132
|
-
readonly shadow = false;
|
|
133
|
-
/**
|
|
134
|
-
* The styles render in the filter style selector
|
|
123
|
+
* Styles rendered in the filter style selector
|
|
135
124
|
*/
|
|
136
125
|
readonly styles: GxOption[];
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
*/
|
|
140
|
-
readonly types: GxOption[];
|
|
141
|
-
/**
|
|
142
|
-
* This event is emitted once just after the component is fully loaded and the first render() occurs.
|
|
143
|
-
*/
|
|
144
|
-
componentDidLoadEvent: EventEmitter<boolean>;
|
|
145
|
-
/**
|
|
146
|
-
* @description Gets fired when the component has rendered for the first time.
|
|
147
|
-
*/
|
|
148
|
-
componentDidRenderFirstTime: EventEmitter<string>;
|
|
149
|
-
componentWillLoad(): Promise<void>;
|
|
126
|
+
stylesChanged(newStyles: GxOption[]): void;
|
|
127
|
+
connectedCallback(): Promise<void>;
|
|
150
128
|
componentDidLoad(): void;
|
|
151
|
-
|
|
129
|
+
componentWillLoad(): Promise<void>;
|
|
152
130
|
keyDownHandler(eventInfo: KeyboardEvent): void;
|
|
153
131
|
/**
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
validate(): Promise<boolean>;
|
|
157
|
-
/**
|
|
158
|
-
* This method reload the view, refreshing the filters and the table of images.
|
|
132
|
+
* Reloads the view, refreshing the filters and the images table.
|
|
159
133
|
*/
|
|
160
134
|
reload(): Promise<void>;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
private toggleFiltersHandler;
|
|
177
|
-
private selectAll;
|
|
178
|
-
private deselectAll;
|
|
179
|
-
private listenChanges;
|
|
180
|
-
private filterInputHandler;
|
|
181
|
-
private filterImagesInformationHandler;
|
|
135
|
+
/**
|
|
136
|
+
* Watch filter state variables and trigger #getImages when they change
|
|
137
|
+
*/
|
|
138
|
+
filterNameValueChanged(): void;
|
|
139
|
+
filterSearchContentsValueChanged(): void;
|
|
140
|
+
filterCategoryValueChanged(): void;
|
|
141
|
+
filterAllDescendantsValueChanged(): void;
|
|
142
|
+
filterAfterTypeValueChanged(): void;
|
|
143
|
+
filterUserValueChanged(): void;
|
|
144
|
+
filterModifiedDateValueChanged(): void;
|
|
145
|
+
filterStyleValueChanged(): void;
|
|
146
|
+
filterLanguageValueChanged(): void;
|
|
147
|
+
filterDensityValueChanged(): void;
|
|
148
|
+
filterLayerValueChanged(): void;
|
|
149
|
+
filterModuleValueChanged(): void;
|
|
182
150
|
render(): void;
|
|
183
151
|
}
|
|
184
|
-
export type SelectionObjectCallback = (ids: string[]) => Promise<void>;
|
|
185
|
-
export type OpenSelectionCallback = (ids: string[]) => Promise<void>;
|
|
186
|
-
export type DeleteSelectionCallback = (ids: string[]) => Promise<void>;
|
|
187
|
-
export type SelectModuleCallback = () => Promise<EntityData | undefined>;
|
|
188
152
|
export type ContextMenuCallback = (contextMenuInfo: ContextMenuInfo) => Promise<void>;
|
|
189
|
-
export type
|
|
190
|
-
export type
|
|
191
|
-
|
|
153
|
+
export type DeleteSelectionCallback = (ids: string[]) => Promise<void>;
|
|
154
|
+
export type FilerInitialData = {
|
|
155
|
+
name: string;
|
|
156
|
+
module: EntityData;
|
|
157
|
+
searchContents: string;
|
|
158
|
+
category: string;
|
|
159
|
+
allDescendants: string;
|
|
160
|
+
modifiedAfter: string;
|
|
161
|
+
modifiedDateTime: string;
|
|
162
|
+
modifiedUser: string;
|
|
163
|
+
style: string;
|
|
164
|
+
language: string;
|
|
165
|
+
density: string;
|
|
166
|
+
layer: string;
|
|
167
|
+
};
|
|
168
|
+
export type ImageData = {
|
|
169
|
+
id: string;
|
|
170
|
+
icon: string;
|
|
171
|
+
name: string;
|
|
172
|
+
description: string;
|
|
173
|
+
parent: string;
|
|
174
|
+
module: string;
|
|
175
|
+
modifiedDate?: Date;
|
|
176
|
+
lastUser?: string;
|
|
177
|
+
importDate?: Date;
|
|
178
|
+
};
|
|
192
179
|
export type ImageFiltersData = {
|
|
193
180
|
name?: string;
|
|
194
181
|
searchContents?: string;
|
|
@@ -203,19 +190,14 @@ export type ImageFiltersData = {
|
|
|
203
190
|
density?: string;
|
|
204
191
|
layer?: string;
|
|
205
192
|
};
|
|
206
|
-
export type ImageData = {
|
|
207
|
-
id: string;
|
|
208
|
-
icon: string;
|
|
209
|
-
name: string;
|
|
210
|
-
description: string;
|
|
211
|
-
parent: string;
|
|
212
|
-
module: string;
|
|
213
|
-
modifiedDate?: Date;
|
|
214
|
-
lastUser?: string;
|
|
215
|
-
importDate?: Date;
|
|
216
|
-
};
|
|
217
193
|
export type ImageItemData = {
|
|
218
194
|
id: string;
|
|
219
195
|
name: string;
|
|
220
196
|
url: string;
|
|
221
197
|
};
|
|
198
|
+
export type LoadCallback = (filters: ImageFiltersData) => Promise<ImageData[]>;
|
|
199
|
+
export type LoadImageItemsCallback = (id: string) => Promise<ImageItemData[]>;
|
|
200
|
+
export type NewObjectCallback = () => Promise<void>;
|
|
201
|
+
export type OpenSelectionCallback = (ids: string[]) => Promise<void>;
|
|
202
|
+
export type SelectModuleCallback = () => Promise<EntityData | undefined>;
|
|
203
|
+
export type SelectionObjectCallback = (ids: string[]) => Promise<void>;
|
|
@@ -2685,97 +2685,69 @@ export namespace Components {
|
|
|
2685
2685
|
}
|
|
2686
2686
|
interface GxIdeWwImages {
|
|
2687
2687
|
/**
|
|
2688
|
-
*
|
|
2688
|
+
* Categories rendered in the filter selector
|
|
2689
2689
|
*/
|
|
2690
2690
|
"categories": GxOption[];
|
|
2691
2691
|
/**
|
|
2692
|
-
*
|
|
2692
|
+
* Function to expand data when right-click
|
|
2693
2693
|
*/
|
|
2694
2694
|
"contextMenuCallback": ContextMenuCallback5;
|
|
2695
2695
|
/**
|
|
2696
|
-
*
|
|
2696
|
+
* Default value for the 'categories' filter
|
|
2697
2697
|
*/
|
|
2698
2698
|
"defaultCategory": string;
|
|
2699
2699
|
/**
|
|
2700
|
-
*
|
|
2700
|
+
* Default value for the module/folder filter
|
|
2701
2701
|
*/
|
|
2702
2702
|
"defaultModule": EntityData1;
|
|
2703
2703
|
/**
|
|
2704
|
-
*
|
|
2705
|
-
*/
|
|
2706
|
-
"defaultType": string;
|
|
2707
|
-
/**
|
|
2708
|
-
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
2704
|
+
* Function to delete the selected images.
|
|
2709
2705
|
*/
|
|
2710
2706
|
"deleteSelectionCallback": DeleteSelectionCallback2;
|
|
2711
2707
|
/**
|
|
2712
|
-
*
|
|
2708
|
+
* Densities rendered in the filter selector
|
|
2713
2709
|
*/
|
|
2714
2710
|
"densities": GxOption[];
|
|
2715
2711
|
/**
|
|
2716
|
-
*
|
|
2717
|
-
*/
|
|
2718
|
-
"displayTitle": false;
|
|
2719
|
-
/**
|
|
2720
|
-
* The modules/folders render in the module/folder selector
|
|
2721
|
-
*/
|
|
2722
|
-
"filterModules": GxOption[];
|
|
2723
|
-
/**
|
|
2724
|
-
* The languages render in the filter language selector
|
|
2712
|
+
* Languages rendered in the filter selector
|
|
2725
2713
|
*/
|
|
2726
2714
|
"languages": GxOption[];
|
|
2727
2715
|
/**
|
|
2728
|
-
*
|
|
2716
|
+
* Layers rendered in the filter selector
|
|
2729
2717
|
*/
|
|
2730
2718
|
"layers": GxOption[];
|
|
2731
2719
|
/**
|
|
2732
|
-
*
|
|
2720
|
+
* Function that returns a list of images for the table
|
|
2733
2721
|
*/
|
|
2734
2722
|
"loadCallback": LoadCallback7;
|
|
2735
2723
|
/**
|
|
2736
|
-
*
|
|
2724
|
+
* Function that returns a list of items for the selected image
|
|
2737
2725
|
*/
|
|
2738
2726
|
"loadImageItemsCallback": LoadImageItemsCallback;
|
|
2739
2727
|
/**
|
|
2740
|
-
*
|
|
2728
|
+
* Callback invoked when user press New button.
|
|
2741
2729
|
*/
|
|
2742
2730
|
"newObjectCallback": NewObjectCallback1;
|
|
2743
2731
|
/**
|
|
2744
|
-
*
|
|
2732
|
+
* Function to expand data for double-clicked or entered images
|
|
2745
2733
|
*/
|
|
2746
2734
|
"openSelectionCallback": OpenSelectionCallback3;
|
|
2747
2735
|
/**
|
|
2748
|
-
*
|
|
2736
|
+
* Reloads the view, refreshing the filters and the images table.
|
|
2749
2737
|
*/
|
|
2750
2738
|
"reload": () => Promise<void>;
|
|
2751
2739
|
/**
|
|
2752
|
-
*
|
|
2753
|
-
*/
|
|
2754
|
-
"secondaryFilter": false;
|
|
2755
|
-
/**
|
|
2756
|
-
* Callback invoked when the action is executed on the Module/Folder filter (button '...'). It returns the information of the selected object (id and name) or 'undefined' if it was canceled.
|
|
2740
|
+
* Callback invoked when an action is executed on the Module/Folder filter.
|
|
2757
2741
|
*/
|
|
2758
2742
|
"selectModuleCallback": SelectModuleCallback6;
|
|
2759
2743
|
/**
|
|
2760
|
-
*
|
|
2744
|
+
* Callback invoked when an item is selected
|
|
2761
2745
|
*/
|
|
2762
2746
|
"selectionObjectChangedCallback": SelectionObjectCallback;
|
|
2763
2747
|
/**
|
|
2764
|
-
*
|
|
2765
|
-
*/
|
|
2766
|
-
"shadow": false;
|
|
2767
|
-
/**
|
|
2768
|
-
* The styles render in the filter style selector
|
|
2748
|
+
* Styles rendered in the filter style selector
|
|
2769
2749
|
*/
|
|
2770
2750
|
"styles": GxOption[];
|
|
2771
|
-
/**
|
|
2772
|
-
* The types render in the filter type selector
|
|
2773
|
-
*/
|
|
2774
|
-
"types": GxOption[];
|
|
2775
|
-
/**
|
|
2776
|
-
* Validate necessary data input
|
|
2777
|
-
*/
|
|
2778
|
-
"validate": () => Promise<boolean>;
|
|
2779
2751
|
}
|
|
2780
2752
|
}
|
|
2781
2753
|
export interface GxIdeBpmAppDeclarationCustomEvent<T> extends CustomEvent<T> {
|
|
@@ -2902,10 +2874,6 @@ export interface GxIdeWfSettingsCustomEvent<T> extends CustomEvent<T> {
|
|
|
2902
2874
|
detail: T;
|
|
2903
2875
|
target: HTMLGxIdeWfSettingsElement;
|
|
2904
2876
|
}
|
|
2905
|
-
export interface GxIdeWwImagesCustomEvent<T> extends CustomEvent<T> {
|
|
2906
|
-
detail: T;
|
|
2907
|
-
target: HTMLGxIdeWwImagesElement;
|
|
2908
|
-
}
|
|
2909
2877
|
declare global {
|
|
2910
2878
|
interface HTMLGxIdeAboutElement extends Components.GxIdeAbout, HTMLStencilElement {
|
|
2911
2879
|
}
|
|
@@ -3743,19 +3711,7 @@ declare global {
|
|
|
3743
3711
|
prototype: HTMLGxIdeWwFilesElement;
|
|
3744
3712
|
new (): HTMLGxIdeWwFilesElement;
|
|
3745
3713
|
};
|
|
3746
|
-
interface HTMLGxIdeWwImagesElementEventMap {
|
|
3747
|
-
"componentDidLoadEvent": boolean;
|
|
3748
|
-
"componentDidRenderFirstTime": string;
|
|
3749
|
-
}
|
|
3750
3714
|
interface HTMLGxIdeWwImagesElement extends Components.GxIdeWwImages, HTMLStencilElement {
|
|
3751
|
-
addEventListener<K extends keyof HTMLGxIdeWwImagesElementEventMap>(type: K, listener: (this: HTMLGxIdeWwImagesElement, ev: GxIdeWwImagesCustomEvent<HTMLGxIdeWwImagesElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3752
|
-
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3753
|
-
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
3754
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
3755
|
-
removeEventListener<K extends keyof HTMLGxIdeWwImagesElementEventMap>(type: K, listener: (this: HTMLGxIdeWwImagesElement, ev: GxIdeWwImagesCustomEvent<HTMLGxIdeWwImagesElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
3756
|
-
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3757
|
-
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
3758
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
3759
3715
|
}
|
|
3760
3716
|
var HTMLGxIdeWwImagesElement: {
|
|
3761
3717
|
prototype: HTMLGxIdeWwImagesElement;
|
|
@@ -6383,97 +6339,65 @@ declare namespace LocalJSX {
|
|
|
6383
6339
|
}
|
|
6384
6340
|
interface GxIdeWwImages {
|
|
6385
6341
|
/**
|
|
6386
|
-
*
|
|
6342
|
+
* Categories rendered in the filter selector
|
|
6387
6343
|
*/
|
|
6388
6344
|
"categories": GxOption[];
|
|
6389
6345
|
/**
|
|
6390
|
-
*
|
|
6346
|
+
* Function to expand data when right-click
|
|
6391
6347
|
*/
|
|
6392
6348
|
"contextMenuCallback": ContextMenuCallback5;
|
|
6393
6349
|
/**
|
|
6394
|
-
*
|
|
6350
|
+
* Default value for the 'categories' filter
|
|
6395
6351
|
*/
|
|
6396
6352
|
"defaultCategory"?: string;
|
|
6397
6353
|
/**
|
|
6398
|
-
*
|
|
6354
|
+
* Default value for the module/folder filter
|
|
6399
6355
|
*/
|
|
6400
6356
|
"defaultModule"?: EntityData1;
|
|
6401
6357
|
/**
|
|
6402
|
-
*
|
|
6403
|
-
*/
|
|
6404
|
-
"defaultType"?: string;
|
|
6405
|
-
/**
|
|
6406
|
-
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
6358
|
+
* Function to delete the selected images.
|
|
6407
6359
|
*/
|
|
6408
6360
|
"deleteSelectionCallback": DeleteSelectionCallback2;
|
|
6409
6361
|
/**
|
|
6410
|
-
*
|
|
6362
|
+
* Densities rendered in the filter selector
|
|
6411
6363
|
*/
|
|
6412
6364
|
"densities": GxOption[];
|
|
6413
6365
|
/**
|
|
6414
|
-
*
|
|
6415
|
-
*/
|
|
6416
|
-
"displayTitle"?: false;
|
|
6417
|
-
/**
|
|
6418
|
-
* The modules/folders render in the module/folder selector
|
|
6419
|
-
*/
|
|
6420
|
-
"filterModules": GxOption[];
|
|
6421
|
-
/**
|
|
6422
|
-
* The languages render in the filter language selector
|
|
6366
|
+
* Languages rendered in the filter selector
|
|
6423
6367
|
*/
|
|
6424
6368
|
"languages": GxOption[];
|
|
6425
6369
|
/**
|
|
6426
|
-
*
|
|
6370
|
+
* Layers rendered in the filter selector
|
|
6427
6371
|
*/
|
|
6428
6372
|
"layers": GxOption[];
|
|
6429
6373
|
/**
|
|
6430
|
-
*
|
|
6374
|
+
* Function that returns a list of images for the table
|
|
6431
6375
|
*/
|
|
6432
6376
|
"loadCallback": LoadCallback7;
|
|
6433
6377
|
/**
|
|
6434
|
-
*
|
|
6378
|
+
* Function that returns a list of items for the selected image
|
|
6435
6379
|
*/
|
|
6436
6380
|
"loadImageItemsCallback": LoadImageItemsCallback;
|
|
6437
6381
|
/**
|
|
6438
|
-
*
|
|
6382
|
+
* Callback invoked when user press New button.
|
|
6439
6383
|
*/
|
|
6440
6384
|
"newObjectCallback": NewObjectCallback1;
|
|
6441
6385
|
/**
|
|
6442
|
-
*
|
|
6443
|
-
*/
|
|
6444
|
-
"onComponentDidLoadEvent"?: (event: GxIdeWwImagesCustomEvent<boolean>) => void;
|
|
6445
|
-
/**
|
|
6446
|
-
* @description Gets fired when the component has rendered for the first time.
|
|
6447
|
-
*/
|
|
6448
|
-
"onComponentDidRenderFirstTime"?: (event: GxIdeWwImagesCustomEvent<string>) => void;
|
|
6449
|
-
/**
|
|
6450
|
-
* This is a function provided by the developer for expanded the data of images that is double-clicked or entered.
|
|
6386
|
+
* Function to expand data for double-clicked or entered images
|
|
6451
6387
|
*/
|
|
6452
6388
|
"openSelectionCallback": OpenSelectionCallback3;
|
|
6453
6389
|
/**
|
|
6454
|
-
*
|
|
6455
|
-
*/
|
|
6456
|
-
"secondaryFilter"?: false;
|
|
6457
|
-
/**
|
|
6458
|
-
* Callback invoked when the action is executed on the Module/Folder filter (button '...'). It returns the information of the selected object (id and name) or 'undefined' if it was canceled.
|
|
6390
|
+
* Callback invoked when an action is executed on the Module/Folder filter.
|
|
6459
6391
|
*/
|
|
6460
6392
|
"selectModuleCallback": SelectModuleCallback6;
|
|
6461
6393
|
/**
|
|
6462
|
-
*
|
|
6394
|
+
* Callback invoked when an item is selected
|
|
6463
6395
|
*/
|
|
6464
6396
|
"selectionObjectChangedCallback": SelectionObjectCallback;
|
|
6465
6397
|
/**
|
|
6466
|
-
*
|
|
6467
|
-
*/
|
|
6468
|
-
"shadow"?: false;
|
|
6469
|
-
/**
|
|
6470
|
-
* The styles render in the filter style selector
|
|
6398
|
+
* Styles rendered in the filter style selector
|
|
6471
6399
|
*/
|
|
6472
6400
|
"styles": GxOption[];
|
|
6473
|
-
/**
|
|
6474
|
-
* The types render in the filter type selector
|
|
6475
|
-
*/
|
|
6476
|
-
"types": GxOption[];
|
|
6477
6401
|
}
|
|
6478
6402
|
interface IntrinsicElements {
|
|
6479
6403
|
"gx-ide-about": GxIdeAbout;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"common-9020d675.js","mappings":"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","names":["h"],"sources":["src/common/common.tsx"],"sourcesContent":["/* STENCIL IMPORTS */\nimport { h } from \"@stencil/core\";\n/* OTHER LIBRARIES IMPORTS */\n/* CUSTOM IMPORTS */\nimport { GxgFormItemsArray, GxOption } from \"./types\";\n\nexport const renderFormItems = (\n componentType:\n | \"gxg-combo-box-item\"\n | \"gxg-form-checkbox\"\n | \"gxg-form-radio\" = \"gxg-combo-box-item\",\n options: Array<GxOption>,\n group = \"undefined-group\",\n callback?: any\n): GxgFormItemsArray => {\n if (options.length) {\n const items: GxgFormItemsArray = [];\n options.forEach(option => {\n let item;\n switch (componentType) {\n case \"gxg-form-checkbox\":\n item = (\n <gxg-form-checkbox\n checkboxId={option.id}\n checked={option.checked}\n disabled={option.disabled}\n label={option.label}\n value={option.value}\n onChange={callback ? callback : null}\n iconName={option.iconName}\n part={`${group}-${option.id}`}\n ></gxg-form-checkbox>\n );\n items.push(item);\n break;\n case \"gxg-combo-box-item\":\n item = (\n <gxg-combo-box-item\n value={option.id}\n icon={option.iconName}\n part={`${group}-${option.id}`}\n >\n {option.label}\n </gxg-combo-box-item>\n );\n items.push(item);\n break;\n case \"gxg-form-radio\":\n item = (\n <gxg-form-radio\n radioId={option.id}\n checked={option.checked}\n disabled={option.disabled}\n label={option.label}\n value={option.value}\n name={group}\n part={`${group}-${option.id}`}\n ></gxg-form-radio>\n );\n items.push(item);\n break;\n default:\n break;\n }\n });\n return items;\n }\n return null;\n};\n\n/**\n * @param gxOptions An array of GxOptions's\n * @returns The first option in the array that is 'selected'. If no one found it returns null.\n */\nexport const getSelectedGxOption = (\n gxOptions: GxOption[],\n onlyId = true\n): GxOption | string | void => {\n if (gxOptions?.length > 0) {\n let found = null;\n for (let i = 0; i < gxOptions.length; i++) {\n if (gxOptions[i].selected) {\n found = gxOptions[i];\n break;\n }\n }\n if (found && onlyId) {\n return found.id;\n } else if (!found && onlyId) {\n return gxOptions[0].id;\n }\n return found;\n }\n};\n\n/**\n * @param gxOptions An array of GxOptions's\n * @returns The value of the selected item, or the first item, if no one is selected.\n */\nexport const getSelectedItem = (gxOptions: GxOption[]): string => {\n const found = gxOptions.find(item => item.selected);\n if (found) {\n return found.id;\n } else {\n return gxOptions[0].id;\n }\n};\n\nexport const setSelectedItem = (\n gxOptions: GxOption[],\n selectedItemId: string\n): GxOption[] =>\n gxOptions.map(item => ({\n ...item,\n selected: item.id === selectedItemId\n }));\n\nexport const getSelectedItem2 = (\n gxOptions: GxOption[] | undefined\n): string | undefined =>\n gxOptions\n ? (gxOptions.find(item => item.selected) ?? gxOptions[0]).id\n : undefined;\n\n// Dots animation used in ch-chat code-render (or other components)\nexport const ANIMATION_DOTS = (\n size: \"regular\" | \"tiny\" = \"regular\",\n color: \"primary\" | \"on-surface\" | \"nexa\" = \"primary\",\n sizeType: \"static\" | \"dynamic\" = \"dynamic\",\n duration: string = \"1s\"\n): SVGElement => {\n const n = size === \"regular\" ? 1.5 : 4;\n let colorDot1, colorDot2, colorDot3;\n if (color === \"nexa\") {\n colorDot1 = \"#5ba7ff\";\n colorDot2 = \"#00CCFF\";\n colorDot3 = \"#CF7AFF\";\n } else if (color === \"on-surface\") {\n colorDot1 = colorDot2 = colorDot3 = \"var(--color-text-neutral-strawberry)\";\n } else {\n // primary\n colorDot1 = colorDot2 = colorDot3 = \"var(--color-primary-600)\"; // mer token\n }\n\n const animateRadiusSize = (begin: string = \"0\") => {\n return (\n <animate\n attributeName=\"r\"\n values={`${2 / n};${4 / n};${2 / n}`}\n dur={duration}\n begin={begin}\n repeatCount=\"indefinite\"\n />\n );\n };\n\n return (\n <svg width={36 / n} height={8 / n} fill=\"transparent\">\n <circle cx={4 / n} cy={4 / n} r={4 / n} opacity=\"0\" fill={colorDot1}>\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur={duration}\n repeatCount=\"indefinite\"\n />\n {sizeType === \"dynamic\" ? animateRadiusSize(\"0\") : null}\n </circle>\n <circle cx={18 / n} cy={4 / n} r={4 / n} opacity=\"0\" fill={colorDot2}>\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur={duration}\n begin=\"0.15s\"\n repeatCount=\"indefinite\"\n />\n {sizeType === \"dynamic\" ? animateRadiusSize(\"0.33s\") : null}\n </circle>\n <circle cx={32 / n} cy={4 / n} r={4 / n} opacity=\"0\" fill={colorDot3}>\n <animate\n attributeName=\"opacity\"\n values=\"0;1;0\"\n dur={duration}\n begin=\"0.30s\"\n repeatCount=\"indefinite\"\n />\n {sizeType === \"dynamic\" ? animateRadiusSize(\"0.66s\") : null}\n </circle>\n </svg>\n );\n};\n"],"version":3}
|