@enigmatry/entry-components 1.2.67 → 1.2.68
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/dialog/README.md +11 -143
- package/package.json +1 -1
package/dialog/README.md
CHANGED
|
@@ -21,29 +21,21 @@ constructor (entryDialogService: EntryDialogService) {
|
|
|
21
21
|
}
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
##
|
|
25
|
-
|
|
26
|
-
### **EntryDialogComponent**
|
|
27
|
-
|
|
28
|
-
Base entry dialog component. Must be extended when building custom dialogs.
|
|
24
|
+
## Configuration
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
`ENTRY_DIALOG_CONFIG`: `InjectionToken<EntryDialogConfig>` - Optional configuration used to override defaults.
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
|:------|:------|:------|
|
|
34
|
-
|`title`|`string`|Dialog header title|
|
|
35
|
-
|`buttonsAlignment`|`EntryDialogButtonsAlignment`|Dialog buttons horizontal alignment|
|
|
36
|
-
|`confirmButtonText`|`string`|Confirm button label|
|
|
37
|
-
|`cancelButtonText`|`string`|Cancel button label|
|
|
38
|
-
|`hideButtons`|`boolean`|Show or hide dialog buttons|
|
|
39
|
-
|`hideCancel`|`boolean`|Show or hide dialog cancel button|
|
|
40
|
-
|`hideClose`|`boolean`|Show or hide dialog close button|
|
|
41
|
-
|`disableConfirm`|`boolean`|Enable or disable dialog confirm button|
|
|
42
|
-
|`buttonsTemplate`|`TemplateRef<any>` \| `null` \| `undefined`|Provide custom buttons template|
|
|
28
|
+
Default values are:
|
|
43
29
|
|
|
44
|
-
|
|
30
|
+
|Name|Type|Default value|Description|
|
|
31
|
+
|:------|:------|:------|:------|
|
|
32
|
+
|`confirmButtonText`|`string`|'Ok'|Confirm button label|
|
|
33
|
+
|`cancelButtonText`|`string`|'Cancel'|Cancel button label|
|
|
34
|
+
|`buttonsAlignment`|`EntryDialogButtonsAlignment`|'align-right'|Dialog buttons horizontal alignment|
|
|
35
|
+
|`hideClose`|`boolean`|true|Determines if close button is visible|
|
|
36
|
+
|`disableClose`|`boolean`|false|Disable closing dialog when pressing escape or clicking on backdrop|
|
|
45
37
|
|
|
46
|
-
|
|
38
|
+
To override with custom defaults use providers on application level:
|
|
47
39
|
|
|
48
40
|
```ts
|
|
49
41
|
@NgModule({
|
|
@@ -66,127 +58,3 @@ Inputs:
|
|
|
66
58
|
})
|
|
67
59
|
export class AppModule { }
|
|
68
60
|
```
|
|
69
|
-
|
|
70
|
-
## Classes
|
|
71
|
-
|
|
72
|
-
### **EntryDialogConfig**
|
|
73
|
-
|
|
74
|
-
Used to provide default configurations on module level.
|
|
75
|
-
|
|
76
|
-
Fields:
|
|
77
|
-
|
|
78
|
-
|Name|Type|Default value|Description|
|
|
79
|
-
|:------|:------|:------|:------|
|
|
80
|
-
|`confirmButtonText`|`string`|'Ok'|Confirm button label|
|
|
81
|
-
|`cancelButtonText`|`string`|'Cancel'|Cancel button label|
|
|
82
|
-
|`buttonsAlignment`|`EntryDialogButtonsAlignment`|'align-right'|Dialog buttons horizontal alignment|
|
|
83
|
-
|`hideClose`|`boolean`|true|Determines if close button is visible|
|
|
84
|
-
|`disableClose`|`boolean`|false|Disable closing dialog when pressing escape or clicking on backdrop|
|
|
85
|
-
|
|
86
|
-
## EntryDialogService Methods
|
|
87
|
-
|
|
88
|
-
▸ **closeAll**(): `void`
|
|
89
|
-
|
|
90
|
-
Closes all opened dialogs.
|
|
91
|
-
|
|
92
|
-
#### Returns
|
|
93
|
-
|
|
94
|
-
`void`
|
|
95
|
-
|
|
96
|
-
___
|
|
97
|
-
|
|
98
|
-
### open
|
|
99
|
-
|
|
100
|
-
▸ **open**(`component`, `data?`, `disableClose?`, `cssClass?`): `Observable`<`any`\>
|
|
101
|
-
|
|
102
|
-
Opens dialog with custom component.
|
|
103
|
-
|
|
104
|
-
#### Parameters
|
|
105
|
-
|
|
106
|
-
| Name | Type | Default value | Description |
|
|
107
|
-
| :------ | :------ | :------ | :------ |
|
|
108
|
-
| `component` | `Type<EntryDialogComponent>` | | Dialog custom component implementation |
|
|
109
|
-
| `data` | `unknown` | `undefined` | Optional parameter used to supply component with input parameters |
|
|
110
|
-
| `disableClose` | `undefined` \| `boolean` | `undefined` | Optional parameter that disable closing dialog when pressing escape or clicking on backdrop |
|
|
111
|
-
| `cssClass` | `string` | `''` | Optional parameter used to set custom class to Material overlay pane |
|
|
112
|
-
|
|
113
|
-
#### Returns
|
|
114
|
-
|
|
115
|
-
`Observable<any>`
|
|
116
|
-
|
|
117
|
-
Any result custom implementation provides
|
|
118
|
-
|
|
119
|
-
___
|
|
120
|
-
|
|
121
|
-
### openAlert
|
|
122
|
-
|
|
123
|
-
▸ **openAlert**(`data`): `Observable`<`undefined` \| ``true``\>
|
|
124
|
-
|
|
125
|
-
Opens alert dialog.
|
|
126
|
-
|
|
127
|
-
#### Parameters
|
|
128
|
-
|
|
129
|
-
| Name | Type | Description |
|
|
130
|
-
| :------ | :------ | :------ |
|
|
131
|
-
| `data` | `Partial<IEntryAlertDialogData>` | Contains title, message and other optional parameters |
|
|
132
|
-
|
|
133
|
-
#### Returns
|
|
134
|
-
|
|
135
|
-
`Observable<undefined | true>`
|
|
136
|
-
|
|
137
|
-
`true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape
|
|
138
|
-
|
|
139
|
-
___
|
|
140
|
-
|
|
141
|
-
### openConfirm
|
|
142
|
-
|
|
143
|
-
▸ **openConfirm**(`data`): `Observable`<`undefined` \| `boolean`\>
|
|
144
|
-
|
|
145
|
-
Opens confirm dialog.
|
|
146
|
-
|
|
147
|
-
#### Parameters
|
|
148
|
-
|
|
149
|
-
| Name | Type | Description |
|
|
150
|
-
| :------ | :------ | :------ |
|
|
151
|
-
| `data` | `Partial<IEntryConfirmDialogData>` | Contains title, message and other optional parameters |
|
|
152
|
-
|
|
153
|
-
#### Returns
|
|
154
|
-
|
|
155
|
-
`Observable<undefined | boolean>`
|
|
156
|
-
|
|
157
|
-
`true` if confirmed, `false` if canceled or closed, `undefined` if closed by clicking on backdrop or pressing escape
|
|
158
|
-
|
|
159
|
-
## Interfaces
|
|
160
|
-
|
|
161
|
-
### **IEntryAlertDialogData**
|
|
162
|
-
|
|
163
|
-
Alert dialog data.
|
|
164
|
-
|
|
165
|
-
Fields:
|
|
166
|
-
|
|
167
|
-
|Name|Type|Description|
|
|
168
|
-
|:------|:------|:------|
|
|
169
|
-
|`title`|`string`|Dialog header title|
|
|
170
|
-
|`message`|`string`|Dialog content message|
|
|
171
|
-
|`buttonsAlignment`|`EntryDialogButtonsAlignment` \| `undefined`|Optional dialog buttons horizontal alignment|
|
|
172
|
-
|`confirmText`|`string` \| `undefined`|Optional dialog confirm text label|
|
|
173
|
-
|`hideClose`|`boolean` \| `undefined`|Optionally show or hide dialog close button|
|
|
174
|
-
|`disableClose`|`boolean` \| `undefined`|Optionally disable closing dialog when pressing escape or clicking on backdrop|
|
|
175
|
-
|
|
176
|
-
___
|
|
177
|
-
|
|
178
|
-
### **IEntryConfirmDialogData**
|
|
179
|
-
|
|
180
|
-
Confirm dialog data. Extends `IEntryAlertDialogData`.
|
|
181
|
-
|
|
182
|
-
Fields:
|
|
183
|
-
|
|
184
|
-
|Name|Type|Description|
|
|
185
|
-
|:------|:------|:------|
|
|
186
|
-
|`title`|`string`|Dialog header title|
|
|
187
|
-
|`message`|`string`|Dialog content message|
|
|
188
|
-
|`buttonsAlignment`|`EntryDialogButtonsAlignment` \| `undefined`|Optional dialog buttons horizontal alignment|
|
|
189
|
-
|`confirmText`|`string` \| `undefined`|Optional dialog confirm text label|
|
|
190
|
-
|`cancelText`|`string` \| `undefined`|Optional dialog cancel text label|
|
|
191
|
-
|`hideClose`|`boolean` \| `undefined`|Optionally show or hide dialog close button|
|
|
192
|
-
|`disableClose`|`boolean` \| `undefined`|Optionally disable closing dialog when pressing escape or clicking on backdrop|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enigmatry/entry-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.68",
|
|
4
4
|
"author": "Enigmatry",
|
|
5
5
|
"description": "Enigmatry entry angular material components",
|
|
6
6
|
"homepage": "https://github.com/enigmatry/entry-angular-building-blocks/tree/master/projects/entry-components#readme",
|