@masterteam/components 0.0.170 → 0.0.172

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.
Files changed (36) hide show
  1. package/assets/common.css +1 -1
  2. package/assets/i18n/ar.json +282 -278
  3. package/assets/i18n/en.json +282 -257
  4. package/fesm2022/masterteam-components-dynamic-drawer.mjs +21 -0
  5. package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
  6. package/fesm2022/masterteam-components-entities.mjs +115 -7
  7. package/fesm2022/masterteam-components-entities.mjs.map +1 -1
  8. package/fesm2022/masterteam-components-location-field.mjs +315 -0
  9. package/fesm2022/masterteam-components-location-field.mjs.map +1 -0
  10. package/fesm2022/masterteam-components-multi-select-field.mjs +2 -2
  11. package/fesm2022/masterteam-components-multi-select-field.mjs.map +1 -1
  12. package/fesm2022/masterteam-components-radio-cards-field.mjs +7 -4
  13. package/fesm2022/masterteam-components-radio-cards-field.mjs.map +1 -1
  14. package/fesm2022/masterteam-components-select-field.mjs +2 -2
  15. package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
  16. package/fesm2022/masterteam-components-sidebar.mjs +2 -2
  17. package/fesm2022/masterteam-components-sidebar.mjs.map +1 -1
  18. package/fesm2022/masterteam-components-table.mjs +30 -8
  19. package/fesm2022/masterteam-components-table.mjs.map +1 -1
  20. package/fesm2022/masterteam-components-tabs.mjs +31 -3
  21. package/fesm2022/masterteam-components-tabs.mjs.map +1 -1
  22. package/fesm2022/masterteam-components-tree.mjs +13 -0
  23. package/fesm2022/masterteam-components-tree.mjs.map +1 -1
  24. package/fesm2022/masterteam-components-upload-field.mjs +86 -5
  25. package/fesm2022/masterteam-components-upload-field.mjs.map +1 -1
  26. package/fesm2022/masterteam-components.mjs +12 -1
  27. package/fesm2022/masterteam-components.mjs.map +1 -1
  28. package/package.json +5 -1
  29. package/types/masterteam-components-dynamic-drawer.d.ts +3 -0
  30. package/types/masterteam-components-entities.d.ts +32 -5
  31. package/types/masterteam-components-location-field.d.ts +95 -0
  32. package/types/masterteam-components-radio-cards-field.d.ts +2 -1
  33. package/types/masterteam-components-tabs.d.ts +3 -0
  34. package/types/masterteam-components-tree.d.ts +4 -0
  35. package/types/masterteam-components-upload-field.d.ts +13 -0
  36. package/types/masterteam-components.d.ts +13 -3
@@ -1,257 +1,282 @@
1
- {
2
- "components": {
3
- "table": {
4
- "search": "Search...",
5
- "filter": "Filter",
6
- "filterOptions": "Filter Options",
7
- "select": "Select",
8
- "reset": "Reset",
9
- "apply": "Apply",
10
- "export": "Export to Excel",
11
- "exportExcel": "Export to Excel",
12
- "printPdf": "Print to PDF",
13
- "groupBy": "Group by",
14
- "groupByColumn": "Group by column",
15
- "noGrouping": "No grouping",
16
- "filterByThis": "Click to filter by this value",
17
- "clearFilter": "Click to clear filter",
18
- "from": "From",
19
- "to": "To",
20
- "actions": "Actions",
21
- "no-data-found": "No data found",
22
- "yes": "Yes",
23
- "no": "No"
24
- },
25
- "upload": {
26
- "uploading": "Uploading...",
27
- "upload": "upload",
28
- "clickOrDrop": "Click or drop a file to upload",
29
- "addMore": "Add more files",
30
- "delete": "Delete",
31
- "download": "Download"
32
- },
33
- "paginator": {
34
- "previous": "Previous",
35
- "next": "Next"
36
- },
37
- "confirmation": {
38
- "header": "Confirmation",
39
- "message": "Are You Sure?",
40
- "yes": "Yes",
41
- "cancel": "Cancel",
42
- "delete": "Delete",
43
- "deleteHeader": "Delete Confirmation",
44
- "deleteMessage": "Are you sure you want to delete?"
45
- },
46
- "selectField": {
47
- "select": "Select",
48
- "you": "Me"
49
- },
50
- "selectPlaceholder": "Select...",
51
- "drawer": {
52
- "expandFullWidth": "Expand to full width",
53
- "restoreSize": "Restore size"
54
- },
55
- "tabs": {
56
- "more": "More",
57
- "search": "Search",
58
- "no-results": "No results"
59
- },
60
- "sidebar": {
61
- "logoAlt": "Logo"
62
- },
63
- "topbar": {
64
- "logoAlt": "Logo"
65
- },
66
- "iconField": {
67
- "selectIcon": "Select Icon"
68
- },
69
- "textField": {
70
- "showPassword": "Show password",
71
- "hidePassword": "Hide password"
72
- },
73
- "pickListField": {
74
- "available": "Available",
75
- "selected": "Selected"
76
- },
77
- "uploadField": {
78
- "uploadFile": "Upload File",
79
- "clickOrDrop": "Click or drop a file to upload"
80
- },
81
- "clientPage": {
82
- "expandMenu": "Expand menu",
83
- "collapseMenu": "Collapse menu",
84
- "expandSidebar": "Expand sidebar",
85
- "collapseSidebar": "Collapse sidebar"
86
- },
87
- "moduleSummaryCard": {
88
- "actionLabel": "Action"
89
- },
90
- "entitiesPreview": {
91
- "filterByThis": "Click to filter by this value",
92
- "clearFilter": "Click to clear filter",
93
- "attachment": "Attachment"
94
- },
95
- "comparisonEntities": {
96
- "added": "Added",
97
- "updated": "Updated",
98
- "removed": "Removed"
99
- },
100
- "entityListField": {
101
- "add": "Add",
102
- "edit": "Edit",
103
- "delete": "Delete",
104
- "readingNotAllowed": "Reading is not allowed for this field.",
105
- "saveFormFirst": "Save the form first to manage related items.",
106
- "noRelatedItems": "No related items.",
107
- "loadFailed": "Failed to load related items"
108
- },
109
- "lookupMatrixField": {
110
- "xAxisFallback": "X",
111
- "yAxisFallback": "Y",
112
- "firstValueFallback": "the first value",
113
- "secondValueFallback": "the second value",
114
- "selectAxesFirst": "Select {{xAxisLabel}} and {{yAxisLabel}} first.",
115
- "noMatchingValue": "No matching value for the selected combination."
116
- },
117
- "formulaEditor": {
118
- "removeFunction": "Remove function",
119
- "remove": "Remove"
120
- },
121
- "runtimeAction": {
122
- "missingArgs": "Cannot execute {{action}}. Missing: {{missing}}",
123
- "confirmDefault": "Confirm {{action}} for this item.",
124
- "executeFailed": "Failed to execute {{action}}",
125
- "notAvailable": "Action {{action}} is not available.",
126
- "noUrl": "Action {{action}} has no url.",
127
- "noHttpMethod": "Action {{action}} has no http method."
128
- },
129
- "formulaOperators": {
130
- "add": { "name": "Add", "description": "Addition" },
131
- "subtract": { "name": "Subtract", "description": "Subtraction" },
132
- "multiply": { "name": "Multiply", "description": "Multiplication" },
133
- "divide": { "name": "Divide", "description": "Division" },
134
- "modulo": { "name": "Modulo", "description": "Modulo" },
135
- "equal": { "name": "Equal", "description": "Equal to" },
136
- "notEqual": { "name": "Not Equal", "description": "Not equal to" },
137
- "greater": { "name": "Greater", "description": "Greater than" },
138
- "less": { "name": "Less", "description": "Less than" },
139
- "greaterOrEqual": { "name": "Greater or Equal", "description": "Greater than or equal" },
140
- "lessOrEqual": { "name": "Less or Equal", "description": "Less than or equal" },
141
- "and": { "name": "And", "description": "Logical AND" },
142
- "or": { "name": "Or", "description": "Logical OR" },
143
- "not": { "name": "Not", "description": "Logical NOT" }
144
- },
145
- "tree": {
146
- "no-data-found": "No data found",
147
- "search": "Search",
148
- "check-all": "Check All"
149
- },
150
- "schedulePredecessorField": {
151
- "add": "Add predecessor",
152
- "noAvailable": "No schedule items are available for dependency selection.",
153
- "predecessor": "Predecessor",
154
- "type": "Type",
155
- "lagDays": "Lag Days",
156
- "selectPredecessor": "Select predecessor",
157
- "delete": "Delete",
158
- "empty": "No predecessors selected."
159
- },
160
- "propertyFilterBuilder": {
161
- "filter": "Filter",
162
- "advancedFilters": "Advanced Filters",
163
- "clearAll": "Clear all",
164
- "where": "Where",
165
- "property": "Property",
166
- "condition": "Condition",
167
- "noValueRequired": "No value required",
168
- "from": "From",
169
- "to": "To",
170
- "value": "Value",
171
- "multiValue": "Value (comma separated)",
172
- "addFilter": "Add Filter",
173
- "cancel": "Cancel",
174
- "apply": "Apply"
175
- },
176
- "formula": {
177
- "toolbar": {
178
- "functions": "Functions",
179
- "properties": "Properties",
180
- "operators": "Operators",
181
- "search": "Search...",
182
- "insertLabel": "Insert",
183
- "customValuePlaceholder": "123 or \"text\"",
184
- "noFunctionsFound": "No functions found",
185
- "noPropertiesAvailable": "No properties available",
186
- "noOperatorsFound": "No operators found",
187
- "property": "Property",
188
- "insertType": "Insert {{ type }} (Enter)"
189
- },
190
- "statusBar": {
191
- "valid": "Valid",
192
- "invalid": "Invalid",
193
- "complexity": "Complexity",
194
- "dependencies": "Dependencies"
195
- }
196
- },
197
- "userSearchField": {
198
- "search": "Search..."
199
- },
200
- "colorPickerField": {
201
- "placeholder": "Select Color",
202
- "hint": "Should be a hex color code, e.g. #ff5733 or #f00"
203
- },
204
- "toast": {
205
- "success": "Success",
206
- "warning": "Warning",
207
- "error": "Error",
208
- "info": "Info"
209
- },
210
- "validation": {
211
- "required": "This field is required",
212
- "email": "Please enter a valid email address",
213
- "minLength": "Minimum length is {{requiredLength}} characters",
214
- "maxLength": "Maximum length is {{requiredLength}} characters",
215
- "min": "Minimum value is {{min}}",
216
- "max": "Maximum value is {{max}}",
217
- "pattern": "The format is invalid",
218
- "fileSizeLimited": "File size exceeds the limit",
219
- "invalid": "Invalid field: {{key}}"
220
- },
221
- "clientComponents": {
222
- "instancePreview": {
223
- "noPreviewData": "No preview data is available for this instance.",
224
- "loadFailed": "Failed to load instance preview"
225
- },
226
- "list": {
227
- "informativeDashboard": "Informative Dashboard",
228
- "cards": "Cards",
229
- "table": "Table",
230
- "noCardsFound": "No cards found.",
231
- "noInformativeDashboard": "No informative dashboard found.",
232
- "errors": {
233
- "tableRowsLoadFailed": "Failed to load table rows",
234
- "rowsLoadFailed": "Failed to load rows",
235
- "cardsLoadFailed": "Failed to load cards",
236
- "informativeLoadFailed": "Failed to load informative dashboard",
237
- "missingModuleId": "Missing identifiers: moduleId is required",
238
- "missingContextKey": "Missing identifiers: contextKey is required",
239
- "missingContextAndInstance": "Missing identifiers: contextKey and instanceId are required"
240
- }
241
- },
242
- "escalation": {
243
- "cancel": "Cancel",
244
- "escalationUp": "Escalation Up",
245
- "currentUser": "Current User",
246
- "escalatedBy": "Escalated By",
247
- "startDate": "Start Date",
248
- "reason": "Reason",
249
- "reasonPlaceholder": "Describe the escalation reason",
250
- "attachments": "Attachments",
251
- "uploadHelp": "Upload supporting files",
252
- "reasonRequired": "Reason is required.",
253
- "createFailed": "Failed to create escalation."
254
- }
255
- }
256
- }
257
- }
1
+ {
2
+ "components": {
3
+ "table": {
4
+ "search": "Search...",
5
+ "filter": "Filter",
6
+ "filterOptions": "Filter Options",
7
+ "select": "Select",
8
+ "reset": "Reset",
9
+ "apply": "Apply",
10
+ "export": "Export to Excel",
11
+ "exportExcel": "Export to Excel",
12
+ "printPdf": "Print to PDF",
13
+ "groupBy": "Group by",
14
+ "groupByColumn": "Group by column",
15
+ "noGrouping": "No grouping",
16
+ "filterByThis": "Click to filter by this value",
17
+ "clearFilter": "Click to clear filter",
18
+ "from": "From",
19
+ "to": "To",
20
+ "actions": "Actions",
21
+ "no-data-found": "No data found",
22
+ "yes": "Yes",
23
+ "no": "No"
24
+ },
25
+ "upload": {
26
+ "uploading": "Uploading...",
27
+ "upload": "upload",
28
+ "clickOrDrop": "Click or drop a file to upload",
29
+ "addMore": "Add more files",
30
+ "delete": "Delete",
31
+ "download": "Download",
32
+ "allowedTypes": "Allowed: {{types}}",
33
+ "fileGroups": {
34
+ "image": "Images",
35
+ "video": "Videos",
36
+ "audio": "Audio",
37
+ "text": "Text"
38
+ }
39
+ },
40
+ "paginator": {
41
+ "previous": "Previous",
42
+ "next": "Next"
43
+ },
44
+ "confirmation": {
45
+ "header": "Confirmation",
46
+ "message": "Are You Sure?",
47
+ "yes": "Yes",
48
+ "cancel": "Cancel",
49
+ "delete": "Delete",
50
+ "deleteHeader": "Delete Confirmation",
51
+ "deleteMessage": "Are you sure you want to delete?"
52
+ },
53
+ "selectField": {
54
+ "select": "Select",
55
+ "you": "Me"
56
+ },
57
+ "selectPlaceholder": "Select...",
58
+ "drawer": {
59
+ "expandFullWidth": "Expand to full width",
60
+ "restoreSize": "Restore size"
61
+ },
62
+ "tabs": {
63
+ "more": "More",
64
+ "search": "Search",
65
+ "no-results": "No results"
66
+ },
67
+ "sidebar": {
68
+ "logoAlt": "Logo"
69
+ },
70
+ "topbar": {
71
+ "logoAlt": "Logo"
72
+ },
73
+ "iconField": {
74
+ "selectIcon": "Select Icon"
75
+ },
76
+ "textField": {
77
+ "showPassword": "Show password",
78
+ "hidePassword": "Hide password"
79
+ },
80
+ "pickListField": {
81
+ "available": "Available",
82
+ "selected": "Selected"
83
+ },
84
+ "uploadField": {
85
+ "uploadFile": "Upload File",
86
+ "clickOrDrop": "Click or drop a file to upload"
87
+ },
88
+ "clientPage": {
89
+ "expandMenu": "Expand menu",
90
+ "collapseMenu": "Collapse menu",
91
+ "expandSidebar": "Expand sidebar",
92
+ "collapseSidebar": "Collapse sidebar"
93
+ },
94
+ "moduleSummaryCard": {
95
+ "actionLabel": "Action"
96
+ },
97
+ "entitiesPreview": {
98
+ "filterByThis": "Click to filter by this value",
99
+ "clearFilter": "Click to clear filter",
100
+ "attachment": "Attachment",
101
+ "downloadAttachment": "Download {{name}}"
102
+ },
103
+ "comparisonEntities": {
104
+ "added": "Added",
105
+ "updated": "Updated",
106
+ "removed": "Removed"
107
+ },
108
+ "entityListField": {
109
+ "add": "Add",
110
+ "edit": "Edit",
111
+ "delete": "Delete",
112
+ "readingNotAllowed": "Reading is not allowed for this field.",
113
+ "saveFormFirst": "Save the form first to manage related items.",
114
+ "noRelatedItems": "No related items.",
115
+ "loadFailed": "Failed to load related items"
116
+ },
117
+ "lookupMatrixField": {
118
+ "xAxisFallback": "X",
119
+ "yAxisFallback": "Y",
120
+ "firstValueFallback": "the first value",
121
+ "secondValueFallback": "the second value",
122
+ "selectAxesFirst": "Select {{xAxisLabel}} and {{yAxisLabel}} first.",
123
+ "noMatchingValue": "No matching value for the selected combination."
124
+ },
125
+ "formulaEditor": {
126
+ "removeFunction": "Remove function",
127
+ "remove": "Remove"
128
+ },
129
+ "runtimeAction": {
130
+ "missingArgs": "Cannot execute {{action}}. Missing: {{missing}}",
131
+ "confirmDefault": "Confirm {{action}} for this item.",
132
+ "executeFailed": "Failed to execute {{action}}",
133
+ "notAvailable": "Action {{action}} is not available.",
134
+ "noUrl": "Action {{action}} has no url.",
135
+ "noHttpMethod": "Action {{action}} has no http method."
136
+ },
137
+ "formulaOperators": {
138
+ "add": { "name": "Add", "description": "Addition" },
139
+ "subtract": { "name": "Subtract", "description": "Subtraction" },
140
+ "multiply": { "name": "Multiply", "description": "Multiplication" },
141
+ "divide": { "name": "Divide", "description": "Division" },
142
+ "modulo": { "name": "Modulo", "description": "Modulo" },
143
+ "equal": { "name": "Equal", "description": "Equal to" },
144
+ "notEqual": { "name": "Not Equal", "description": "Not equal to" },
145
+ "greater": { "name": "Greater", "description": "Greater than" },
146
+ "less": { "name": "Less", "description": "Less than" },
147
+ "greaterOrEqual": {
148
+ "name": "Greater or Equal",
149
+ "description": "Greater than or equal"
150
+ },
151
+ "lessOrEqual": {
152
+ "name": "Less or Equal",
153
+ "description": "Less than or equal"
154
+ },
155
+ "and": { "name": "And", "description": "Logical AND" },
156
+ "or": { "name": "Or", "description": "Logical OR" },
157
+ "not": { "name": "Not", "description": "Logical NOT" }
158
+ },
159
+ "tree": {
160
+ "no-data-found": "No data found",
161
+ "search": "Search",
162
+ "check-all": "Check All"
163
+ },
164
+ "schedulePredecessorField": {
165
+ "add": "Add predecessor",
166
+ "noAvailable": "No schedule items are available for dependency selection.",
167
+ "predecessor": "Predecessor",
168
+ "type": "Type",
169
+ "lagDays": "Lag Days",
170
+ "selectPredecessor": "Select predecessor",
171
+ "delete": "Delete",
172
+ "empty": "No predecessors selected."
173
+ },
174
+ "propertyFilterBuilder": {
175
+ "filter": "Filter",
176
+ "advancedFilters": "Advanced Filters",
177
+ "clearAll": "Clear all",
178
+ "where": "Where",
179
+ "property": "Property",
180
+ "condition": "Condition",
181
+ "noValueRequired": "No value required",
182
+ "from": "From",
183
+ "to": "To",
184
+ "value": "Value",
185
+ "multiValue": "Value (comma separated)",
186
+ "addFilter": "Add Filter",
187
+ "cancel": "Cancel",
188
+ "apply": "Apply"
189
+ },
190
+ "formula": {
191
+ "toolbar": {
192
+ "functions": "Functions",
193
+ "properties": "Properties",
194
+ "operators": "Operators",
195
+ "search": "Search...",
196
+ "insertLabel": "Insert",
197
+ "customValuePlaceholder": "123 or \"text\"",
198
+ "noFunctionsFound": "No functions found",
199
+ "noPropertiesAvailable": "No properties available",
200
+ "noOperatorsFound": "No operators found",
201
+ "property": "Property",
202
+ "insertType": "Insert {{ type }} (Enter)"
203
+ },
204
+ "statusBar": {
205
+ "valid": "Valid",
206
+ "invalid": "Invalid",
207
+ "complexity": "Complexity",
208
+ "dependencies": "Dependencies"
209
+ }
210
+ },
211
+ "userSearchField": {
212
+ "search": "Search..."
213
+ },
214
+ "locationField": {
215
+ "search": "Search...",
216
+ "enterManually": "Enter location manually",
217
+ "manualHeader": "Enter Location Manually",
218
+ "displayName": "Display Name",
219
+ "longitude": "Longitude",
220
+ "latitude": "Latitude",
221
+ "cancel": "Cancel",
222
+ "save": "Save"
223
+ },
224
+ "colorPickerField": {
225
+ "placeholder": "Select Color",
226
+ "hint": "Should be a hex color code, e.g. #ff5733 or #f00"
227
+ },
228
+ "toast": {
229
+ "success": "Success",
230
+ "warning": "Warning",
231
+ "error": "Error",
232
+ "info": "Info"
233
+ },
234
+ "validation": {
235
+ "required": "This field is required",
236
+ "email": "Please enter a valid email address",
237
+ "minLength": "Minimum length is {{requiredLength}} characters",
238
+ "maxLength": "Maximum length is {{requiredLength}} characters",
239
+ "min": "Minimum value is {{min}}",
240
+ "max": "Maximum value is {{max}}",
241
+ "pattern": "The format is invalid",
242
+ "fileSizeLimited": "File size exceeds the limit",
243
+ "invalidFileType": "Only the following file types are allowed: {{types}}",
244
+ "invalid": "Invalid field: {{key}}"
245
+ },
246
+ "clientComponents": {
247
+ "instancePreview": {
248
+ "noPreviewData": "No preview data is available for this instance.",
249
+ "loadFailed": "Failed to load instance preview"
250
+ },
251
+ "list": {
252
+ "informativeDashboard": "Informative Dashboard",
253
+ "cards": "Cards",
254
+ "table": "Table",
255
+ "noCardsFound": "No cards found.",
256
+ "noInformativeDashboard": "No informative dashboard found.",
257
+ "errors": {
258
+ "tableRowsLoadFailed": "Failed to load table rows",
259
+ "rowsLoadFailed": "Failed to load rows",
260
+ "cardsLoadFailed": "Failed to load cards",
261
+ "informativeLoadFailed": "Failed to load informative dashboard",
262
+ "missingModuleId": "Missing identifiers: moduleId is required",
263
+ "missingContextKey": "Missing identifiers: contextKey is required",
264
+ "missingContextAndInstance": "Missing identifiers: contextKey and instanceId are required"
265
+ }
266
+ },
267
+ "escalation": {
268
+ "cancel": "Cancel",
269
+ "escalationUp": "Escalation Up",
270
+ "currentUser": "Current User",
271
+ "escalatedBy": "Escalated By",
272
+ "startDate": "Start Date",
273
+ "reason": "Reason",
274
+ "reasonPlaceholder": "Describe the escalation reason",
275
+ "attachments": "Attachments",
276
+ "uploadHelp": "Upload supporting files",
277
+ "reasonRequired": "Reason is required.",
278
+ "createFailed": "Failed to create escalation."
279
+ }
280
+ }
281
+ }
282
+ }
@@ -90,6 +90,12 @@ class DynamicDrawerHost {
90
90
  cmpInputs = signal({}, ...(ngDevMode ? [{ debugName: "cmpInputs" }] : /* istanbul ignore next */ []));
91
91
  childInjector;
92
92
  ref;
93
+ // Guards against emitting onClose twice: the X button closes via
94
+ // handleHide() (programmatic visible=false, no PrimeNG onHide), while a
95
+ // backdrop click / Escape closes via PrimeNG's own close() which DOES emit
96
+ // onHide. Without bridging onHide -> ref.close(), consumers never learn
97
+ // about dismiss-by-outside-click / Escape.
98
+ closed = false;
93
99
  drawerController = new DrawerController();
94
100
  host = inject((ElementRef));
95
101
  renderer = inject(Renderer2);
@@ -186,10 +192,19 @@ class DynamicDrawerHost {
186
192
  });
187
193
  }
188
194
  show() {
195
+ this.closed = false;
189
196
  this.visible.set(true);
190
197
  }
191
198
  handleHide(data = null) {
192
199
  this.visible.set(false);
200
+ this.closeOnce(data);
201
+ }
202
+ /** Close the drawer ref at most once, regardless of the close path. */
203
+ closeOnce(data = null) {
204
+ if (this.closed) {
205
+ return;
206
+ }
207
+ this.closed = true;
193
208
  this.ref?.close(data);
194
209
  }
195
210
  onDrawerShow() {
@@ -201,6 +216,12 @@ class DynamicDrawerHost {
201
216
  // Instant cleanup — close animation already done; we don't want to start
202
217
  // a 650ms width transition mid-hide.
203
218
  this.applyMaximizedInlineStyles(false, false);
219
+ // PrimeNG emits (onHide) when the drawer is dismissed via backdrop click
220
+ // or Escape (its close() -> hide(true)). The X button instead closes
221
+ // programmatically (visible=false -> onAfterLeave -> hide(false)), so it
222
+ // does not reach here. Bridge the dismiss paths to ref.close() so
223
+ // consumers' onClose runs for every close path. closeOnce() de-dupes.
224
+ this.closeOnce();
204
225
  }
205
226
  getDrawerElement() {
206
227
  return this.host.nativeElement.querySelector('.p-drawer');