@memberjunction/ng-user-view-properties 2.43.0 → 2.44.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/README.md +51 -4
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -25,7 +25,20 @@ This library has the following peer dependencies:
|
|
|
25
25
|
- @memberjunction/core
|
|
26
26
|
- @memberjunction/global
|
|
27
27
|
- @memberjunction/core-entities
|
|
28
|
-
-
|
|
28
|
+
- @memberjunction/ng-base-forms
|
|
29
|
+
- @memberjunction/ng-find-record
|
|
30
|
+
- @memberjunction/ng-resource-permissions
|
|
31
|
+
- @memberjunction/ng-shared
|
|
32
|
+
- @memberjunction/ng-tabstrip
|
|
33
|
+
- Multiple Kendo UI Angular components:
|
|
34
|
+
- @progress/kendo-angular-sortable
|
|
35
|
+
- @progress/kendo-angular-dialog
|
|
36
|
+
- @progress/kendo-angular-layout
|
|
37
|
+
- @progress/kendo-angular-inputs
|
|
38
|
+
- @progress/kendo-angular-buttons
|
|
39
|
+
- @progress/kendo-angular-filter
|
|
40
|
+
- @progress/kendo-angular-dropdowns
|
|
41
|
+
- @progress/kendo-data-query
|
|
29
42
|
|
|
30
43
|
## Usage
|
|
31
44
|
|
|
@@ -72,6 +85,10 @@ createCategorizedView() {
|
|
|
72
85
|
|
|
73
86
|
## API Reference
|
|
74
87
|
|
|
88
|
+
### Component Class: UserViewPropertiesDialogComponent
|
|
89
|
+
|
|
90
|
+
Extends `BaseFormComponent` from @memberjunction/ng-base-forms.
|
|
91
|
+
|
|
75
92
|
### Inputs
|
|
76
93
|
|
|
77
94
|
| Input | Type | Description |
|
|
@@ -95,18 +112,33 @@ createCategorizedView() {
|
|
|
95
112
|
| CreateViewInCategory | entityName: string, viewCategoryID: string | void | Creates a view in a specific category |
|
|
96
113
|
| Open | ViewID?: string | void | Opens the dialog for editing an existing view |
|
|
97
114
|
| saveProperties | - | Promise<void> | Saves the current view properties |
|
|
115
|
+
| closePropertiesDialog | - | void | Closes the dialog and emits dialogClosed event |
|
|
116
|
+
| Load | - | Promise<void> | Loads view data from database or creates new record |
|
|
117
|
+
| toggleColumn | column: any | Promise<void> | Toggles visibility of a column in the view |
|
|
118
|
+
| onDragEnd | e: DragEndEvent | void | Handles field reordering via drag and drop |
|
|
119
|
+
| addSort | - | void | Adds a new sort field to the view |
|
|
120
|
+
| removeSort | item: any | void | Removes a sort field from the view |
|
|
98
121
|
|
|
99
122
|
## Component Structure
|
|
100
123
|
|
|
101
124
|
The dialog consists of six tabbed sections:
|
|
102
125
|
|
|
103
126
|
1. **General**: Basic view properties (name and description)
|
|
104
|
-
2. **Fields**: Configure visible fields and their order
|
|
127
|
+
2. **Fields**: Configure visible fields and their order using drag-and-drop
|
|
105
128
|
3. **Filters**: Set up filtering using either Smart Filters or standard filters
|
|
106
|
-
4. **Sorting**: Define multi-field sorting with direction control
|
|
129
|
+
4. **Sorting**: Define multi-field sorting with direction control (asc/desc)
|
|
107
130
|
5. **Sharing**: Manage view permissions using ResourcePermissions
|
|
108
131
|
6. **Advanced**: Access to SQL WHERE clauses and Smart Filter explanations
|
|
109
132
|
|
|
133
|
+
### Key Features
|
|
134
|
+
|
|
135
|
+
- **Drag-and-Drop Field Ordering**: Uses Kendo SortableComponent for field reordering
|
|
136
|
+
- **Smart Filter Support**: Natural language filtering with view/list references
|
|
137
|
+
- **Permission-Based Editing**: Respects user permissions via UserCanEdit property
|
|
138
|
+
- **Keyboard Support**: Enter key saves changes (except in textareas)
|
|
139
|
+
- **Auto-Navigation**: After creating a new view, automatically navigates to it
|
|
140
|
+
- **Event Broadcasting**: Emits ViewUpdated events through MJGlobal event system
|
|
141
|
+
|
|
110
142
|
## Examples
|
|
111
143
|
|
|
112
144
|
### Complete Integration Example
|
|
@@ -166,4 +198,19 @@ Smart Filters allow users to describe filtering requirements in natural language
|
|
|
166
198
|
- The component integrates with the MemberJunction metadata system for field information
|
|
167
199
|
- Permissions are automatically enforced via the `UserCanEdit` property
|
|
168
200
|
- The dialog automatically adjusts for window resizing
|
|
169
|
-
- Changes are not applied until the user clicks Save
|
|
201
|
+
- Changes are not applied until the user clicks Save
|
|
202
|
+
- The component uses UserViewEntityExtended for enhanced view functionality
|
|
203
|
+
- Grid state and filter state are stored as JSON strings in the database
|
|
204
|
+
- Sort state supports both legacy numeric (1/2) and modern string ('asc'/'desc') formats
|
|
205
|
+
- The dialog is moved to document body for proper z-index stacking
|
|
206
|
+
|
|
207
|
+
## Build Instructions
|
|
208
|
+
|
|
209
|
+
To build this package:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
cd packages/Angular/Explorer/user-view-properties
|
|
213
|
+
npm run build
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
This will compile the TypeScript and generate the distribution files in the `dist` folder.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-user-view-properties",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.44.0",
|
|
4
4
|
"description": "MemberJunction: Angular UI Dialog Component to View/Edit User View Properties",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"@angular/forms": "18.0.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@memberjunction/global": "2.
|
|
28
|
-
"@memberjunction/core": "2.
|
|
29
|
-
"@memberjunction/core-entities": "2.
|
|
30
|
-
"@memberjunction/ng-base-forms": "2.
|
|
31
|
-
"@memberjunction/ng-find-record": "2.
|
|
32
|
-
"@memberjunction/ng-resource-permissions": "2.
|
|
33
|
-
"@memberjunction/ng-shared": "2.
|
|
27
|
+
"@memberjunction/global": "2.44.0",
|
|
28
|
+
"@memberjunction/core": "2.44.0",
|
|
29
|
+
"@memberjunction/core-entities": "2.44.0",
|
|
30
|
+
"@memberjunction/ng-base-forms": "2.44.0",
|
|
31
|
+
"@memberjunction/ng-find-record": "2.44.0",
|
|
32
|
+
"@memberjunction/ng-resource-permissions": "2.44.0",
|
|
33
|
+
"@memberjunction/ng-shared": "2.44.0",
|
|
34
34
|
"@progress/kendo-angular-sortable": "16.2.0",
|
|
35
35
|
"@progress/kendo-angular-dialog": "16.2.0",
|
|
36
36
|
"@progress/kendo-angular-layout": "16.2.0",
|