@nanahoshi/mona-ui 0.24.6 → 0.24.8

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 (78) hide show
  1. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1 -1
  2. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +14 -4
  3. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1 -1
  4. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1 -1
  5. package/fesm2022/nanahoshi-mona-ui-filter.mjs +233 -231
  6. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-CD_ODHpU.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-DdyHnUIr.mjs} +24 -12
  7. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-B6gq7Hu3.mjs +208 -0
  8. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DdUY3I7P.mjs +1100 -0
  9. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-Sa1aAtJ-.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-DG8Bu4Dy.mjs} +34 -21
  10. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BvUM9nPt.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CVqpbMcb.mjs} +2565 -928
  11. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  12. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +79 -11
  13. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +20 -4
  14. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +335 -45
  15. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +565 -197
  16. package/fesm2022/nanahoshi-mona-ui-internal.mjs +28 -2
  17. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +598 -208
  18. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +193 -74
  19. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +58 -11
  20. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +62 -11
  21. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +62 -11
  22. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +69 -11
  23. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +58 -11
  24. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +62 -11
  25. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +58 -11
  26. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +58 -11
  27. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +62 -11
  28. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +78 -11
  29. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +58 -11
  30. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +58 -11
  31. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +58 -11
  32. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1 -1
  33. package/fesm2022/nanahoshi-mona-ui-pager.mjs +367 -463
  34. package/fesm2022/nanahoshi-mona-ui-query.mjs +317 -122
  35. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +205 -140
  36. package/i18n/catalogs/en-US.messages.json +64 -17
  37. package/locales/ar-sa/ar-sa.messages.json +58 -11
  38. package/locales/de-de/de-de.messages.json +58 -11
  39. package/locales/es-es/es-es.messages.json +58 -11
  40. package/locales/fr-fr/fr-fr.messages.json +58 -11
  41. package/locales/id-id/id-id.messages.json +58 -11
  42. package/locales/it-it/it-it.messages.json +58 -11
  43. package/locales/ja-jp/ja-jp.messages.json +58 -11
  44. package/locales/ko-kr/ko-kr.messages.json +58 -11
  45. package/locales/pt-br/pt-br.messages.json +58 -11
  46. package/locales/ru-ru/ru-ru.messages.json +58 -11
  47. package/locales/tr-tr/tr-tr.messages.json +58 -11
  48. package/locales/zh-cn/zh-cn.messages.json +58 -11
  49. package/locales/zh-tw/zh-tw.messages.json +58 -11
  50. package/package.json +1 -1
  51. package/types/nanahoshi-mona-ui-check-box.d.ts +11 -1
  52. package/types/nanahoshi-mona-ui-filter.d.ts +54 -32
  53. package/types/nanahoshi-mona-ui-grid.d.ts +359 -110
  54. package/types/nanahoshi-mona-ui-i18n.d.ts +97 -6
  55. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +14 -2
  56. package/types/nanahoshi-mona-ui-internal-list.d.ts +89 -10
  57. package/types/nanahoshi-mona-ui-internal-tree.d.ts +155 -40
  58. package/types/nanahoshi-mona-ui-internal.d.ts +10 -2
  59. package/types/nanahoshi-mona-ui-list-box.d.ts +148 -47
  60. package/types/nanahoshi-mona-ui-list-view.d.ts +111 -21
  61. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +53 -6
  62. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +53 -6
  63. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +53 -6
  64. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +53 -6
  65. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +53 -6
  66. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +53 -6
  67. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +53 -6
  68. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +53 -6
  69. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +53 -6
  70. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +53 -6
  71. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +53 -6
  72. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +53 -6
  73. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +53 -6
  74. package/types/nanahoshi-mona-ui-pager.d.ts +159 -76
  75. package/types/nanahoshi-mona-ui-query.d.ts +45 -14
  76. package/types/nanahoshi-mona-ui-tree-view.d.ts +84 -40
  77. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-0jN7I1jo.mjs +0 -176
  78. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BI_iE7pl.mjs +0 -946
@@ -189,34 +189,51 @@
189
189
  "isNull": "为 Null",
190
190
  "isNullOrEmpty": "为 Null 或为空",
191
191
  "isTrue": "为真",
192
+ "logic": "组合条件",
193
+ "operator": "运算符",
192
194
  "or": "或",
193
- "startsWith": "开头为"
195
+ "secondOperator": "第二个运算符",
196
+ "secondValue": "第二个值",
197
+ "startsWith": "开头为",
198
+ "value": "值"
194
199
  },
195
200
  "grid": {
196
201
  "all": "(全部)",
197
202
  "apply": "应用",
198
203
  "cancel": "取消",
199
- "cancelRowEdit": "取消编辑行",
204
+ "cancelNewRow": "取消新行",
205
+ "cancelRowEdit": "取消编辑第 {rowNumber} 行",
206
+ "clearFilter": "清除 {column} 的筛选",
207
+ "collapseDetail": "收起第 {rowNumber} 行的详细信息",
208
+ "columnGrouped": "已按 {column} 分组",
209
+ "columnMoved": "{column} 已移至第 {position} 位",
200
210
  "columns": "列",
201
211
  "columnsSelected": "已选择 {count} 列",
212
+ "commandColumnTitle": "命令",
202
213
  "delete": "删除",
203
- "deleteRowConfirmation": "确定要删除此项吗?",
214
+ "deleteRowConfirmation": "确定要删除第 {rowNumber} 行吗?",
204
215
  "deleteRowTitle": "删除行?",
216
+ "details": "详细信息",
205
217
  "dragColumnHeaderToGroup": "拖动列标题到此处进行分组",
206
218
  "edit": "编辑",
207
- "editRow": "编辑行",
219
+ "editRow": "编辑第 {rowNumber} 行",
220
+ "expandDetail": "展开第 {rowNumber} 行的详细信息",
208
221
  "fieldValidationError": "无效值。",
209
222
  "filterByColumn": "按 {column} 筛选",
223
+ "filterByColumnFiltered": "按 {column} 筛选(已筛选)",
224
+ "filterOperator": "{column} 的筛选运算符:{operator}",
210
225
  "filterPlaceholder": "筛选…",
226
+ "group": "分组",
227
+ "loading": "正在加载",
211
228
  "modified": "已修改",
212
229
  "moveAsNext": "移至下一项",
213
230
  "moveAsPrevious": "移至上一项",
214
231
  "moveRow": "移动行",
215
232
  "noData": "没有数据",
216
233
  "remove": "移除",
217
- "removeRow": "移除行",
234
+ "removeRow": "移除第 {rowNumber} 行",
218
235
  "reorderRow": "重新排列第 {rowNumber} 行",
219
- "resizeColumn": "调整列宽",
236
+ "resizeColumn": "调整 {column} 列宽",
220
237
  "rowReorder": "行重新排序",
221
238
  "rowReorderDisabled": "行重新排序已禁用。",
222
239
  "rowReorderDisabledEditing": "请完成编辑后再重新排列行。",
@@ -231,23 +248,38 @@
231
248
  "rowReorderMoved": "已将第 {fromRowNumber} 行移动到位置 {toPosition}。",
232
249
  "rowValidationError": "此行存在验证错误。",
233
250
  "save": "保存",
234
- "saveRow": "保存行",
251
+ "saveNewRow": "保存新行",
252
+ "saveRow": "保存第 {rowNumber} 行",
235
253
  "selectAllRows": "选择所有行",
236
- "selectRow": "选择第 {rowNumber} 行"
254
+ "selectRow": "选择第 {rowNumber} 行",
255
+ "sortOrder": "排序顺序 {position}",
256
+ "toolbar": "表格工具栏"
237
257
  },
238
258
  "list": {
239
259
  "filterList": "筛选列表",
240
- "noData": "没有数据"
260
+ "loading": "正在加载",
261
+ "noData": "没有数据",
262
+ "pagerLabel": "{list}分页"
241
263
  },
242
264
  "listBox": {
243
265
  "clearSelection": "清除选择",
266
+ "itemsMoved": "已移至第 {position} 位,共 {total} 位",
267
+ "itemsRemoved": "已移除 {count} 项",
268
+ "itemsTransferred": "已将 {count} 项移至{list}",
269
+ "itemsTransferredToOtherList": "已将 {count} 项移至另一列表",
244
270
  "moveDown": "向下移动",
245
271
  "moveUp": "向上移动",
246
272
  "remove": "移除",
273
+ "selectionCleared": "已清除选择",
274
+ "toolbarLabel": "{list}操作",
247
275
  "transferAllFrom": "从另一列表全部移入",
276
+ "transferAllFromList": "从{list}全部移入",
248
277
  "transferAllTo": "全部移至另一列表",
278
+ "transferAllToList": "全部移至{list}",
249
279
  "transferFrom": "从另一列表移入",
250
- "transferTo": "移至另一列表"
280
+ "transferFromList": "从{list}移入",
281
+ "transferTo": "移至另一列表",
282
+ "transferToList": "移至{list}"
251
283
  },
252
284
  "multiSelect": {
253
285
  "clear": "清除",
@@ -270,15 +302,20 @@
270
302
  },
271
303
  "pager": {
272
304
  "firstPageLabel": "第一页",
305
+ "itemsPerPageLabel": "每页条数",
273
306
  "jumpBackwardLabel": "后退 {pages} 页",
274
307
  "jumpForwardLabel": "前进 {pages} 页",
275
308
  "lastPageLabel": "最后一页",
276
309
  "nextPageLabel": "下一页",
277
310
  "ofText": "/",
311
+ "pageInputPrefix": "第",
312
+ "pageInputSuffix": "页,共 {totalPages} 页",
278
313
  "pageLabel": "第 {page} 页",
314
+ "pageSelectLabel": "页",
279
315
  "pageSizeLabel": "每页 {pageSize} 条",
280
316
  "pageStatus": "第 {page} 页,共 {totalPages} 页",
281
317
  "pageText": "页",
318
+ "pagerLabel": "分页",
282
319
  "previousPageLabel": "上一页",
283
320
  "rangeStatus": "第 {start} - {end} 项,共 {total} 项"
284
321
  },
@@ -353,7 +390,17 @@
353
390
  "collapse": "折叠",
354
391
  "expand": "展开",
355
392
  "filter": "筛选",
356
- "filterTree": "筛选树"
393
+ "filterLabel": "筛选{tree}",
394
+ "filterTree": "筛选树",
395
+ "loadError": "无法加载{node}中的项目",
396
+ "loadingNode": "正在加载{node}",
397
+ "movedAfter": "已将 {node} 移到 {target} 之后",
398
+ "movedBefore": "已将 {node} 移到 {target} 之前",
399
+ "movedInto": "已将 {node} 移入 {target}",
400
+ "noData": "没有数据",
401
+ "noMatches": "没有匹配的项目",
402
+ "results": "{count} 个结果",
403
+ "retryLoading": "重试加载{node}"
357
404
  },
358
405
  "window": {
359
406
  "close": "关闭",
@@ -189,34 +189,51 @@
189
189
  "isNull": "為 Null",
190
190
  "isNullOrEmpty": "為 Null 或為空",
191
191
  "isTrue": "為真",
192
+ "logic": "組合條件",
193
+ "operator": "運算子",
192
194
  "or": "或",
193
- "startsWith": "開頭為"
195
+ "secondOperator": "第二個運算子",
196
+ "secondValue": "第二個值",
197
+ "startsWith": "開頭為",
198
+ "value": "值"
194
199
  },
195
200
  "grid": {
196
201
  "all": "(全部)",
197
202
  "apply": "套用",
198
203
  "cancel": "取消",
199
- "cancelRowEdit": "取消編輯資料列",
204
+ "cancelNewRow": "取消新資料列",
205
+ "cancelRowEdit": "取消編輯第 {rowNumber} 個資料列",
206
+ "clearFilter": "清除 {column} 的篩選",
207
+ "collapseDetail": "收合第 {rowNumber} 列的詳細資料",
208
+ "columnGrouped": "已依 {column} 分組",
209
+ "columnMoved": "{column} 已移至第 {position} 位",
200
210
  "columns": "欄",
201
211
  "columnsSelected": "已選取 {count} 欄",
212
+ "commandColumnTitle": "命令",
202
213
  "delete": "刪除",
203
- "deleteRowConfirmation": "確定要刪除此項目嗎?",
214
+ "deleteRowConfirmation": "確定要刪除第 {rowNumber} 個資料列嗎?",
204
215
  "deleteRowTitle": "刪除資料列?",
216
+ "details": "詳細資料",
205
217
  "dragColumnHeaderToGroup": "拖曳欄位標題至此進行群組",
206
218
  "edit": "編輯",
207
- "editRow": "編輯資料列",
219
+ "editRow": "編輯第 {rowNumber} 個資料列",
220
+ "expandDetail": "展開第 {rowNumber} 列的詳細資料",
208
221
  "fieldValidationError": "無效值。",
209
222
  "filterByColumn": "依 {column} 篩選",
223
+ "filterByColumnFiltered": "依 {column} 篩選(已篩選)",
224
+ "filterOperator": "{column} 的篩選運算子:{operator}",
210
225
  "filterPlaceholder": "篩選…",
226
+ "group": "群組",
227
+ "loading": "載入中",
211
228
  "modified": "已修改",
212
229
  "moveAsNext": "移至下一項",
213
230
  "moveAsPrevious": "移至上一項",
214
231
  "moveRow": "移動資料列",
215
232
  "noData": "沒有資料",
216
233
  "remove": "移除",
217
- "removeRow": "移除資料列",
234
+ "removeRow": "移除第 {rowNumber} 個資料列",
218
235
  "reorderRow": "重新排列第 {rowNumber} 個資料列",
219
- "resizeColumn": "調整欄寬",
236
+ "resizeColumn": "調整 {column} 欄寬",
220
237
  "rowReorder": "資料列重新排序",
221
238
  "rowReorderDisabled": "資料列重新排序已停用。",
222
239
  "rowReorderDisabledEditing": "請完成編輯後再重新排列資料列。",
@@ -231,23 +248,38 @@
231
248
  "rowReorderMoved": "已將第 {fromRowNumber} 個資料列移至位置 {toPosition}。",
232
249
  "rowValidationError": "此資料列存在驗證錯誤。",
233
250
  "save": "儲存",
234
- "saveRow": "儲存資料列",
251
+ "saveNewRow": "儲存新資料列",
252
+ "saveRow": "儲存第 {rowNumber} 個資料列",
235
253
  "selectAllRows": "選取所有資料列",
236
- "selectRow": "選取第 {rowNumber} 個資料列"
254
+ "selectRow": "選取第 {rowNumber} 個資料列",
255
+ "sortOrder": "排序順序 {position}",
256
+ "toolbar": "表格工具列"
237
257
  },
238
258
  "list": {
239
259
  "filterList": "篩選清單",
240
- "noData": "沒有資料"
260
+ "loading": "載入中",
261
+ "noData": "沒有資料",
262
+ "pagerLabel": "{list}分頁"
241
263
  },
242
264
  "listBox": {
243
265
  "clearSelection": "清除選取",
266
+ "itemsMoved": "已移至第 {position} 位,共 {total} 位",
267
+ "itemsRemoved": "已移除 {count} 項",
268
+ "itemsTransferred": "已將 {count} 項移至{list}",
269
+ "itemsTransferredToOtherList": "已將 {count} 項移至另一清單",
244
270
  "moveDown": "向下移動",
245
271
  "moveUp": "向上移動",
246
272
  "remove": "移除",
273
+ "selectionCleared": "已清除選取",
274
+ "toolbarLabel": "{list}操作",
247
275
  "transferAllFrom": "從另一清單全部移入",
276
+ "transferAllFromList": "從{list}全部移入",
248
277
  "transferAllTo": "全部移至另一清單",
278
+ "transferAllToList": "全部移至{list}",
249
279
  "transferFrom": "從另一清單移入",
250
- "transferTo": "移至另一清單"
280
+ "transferFromList": "從{list}移入",
281
+ "transferTo": "移至另一清單",
282
+ "transferToList": "移至{list}"
251
283
  },
252
284
  "multiSelect": {
253
285
  "clear": "清除",
@@ -270,15 +302,20 @@
270
302
  },
271
303
  "pager": {
272
304
  "firstPageLabel": "第一頁",
305
+ "itemsPerPageLabel": "每頁筆數",
273
306
  "jumpBackwardLabel": "後退 {pages} 頁",
274
307
  "jumpForwardLabel": "前進 {pages} 頁",
275
308
  "lastPageLabel": "最後一頁",
276
309
  "nextPageLabel": "下一頁",
277
310
  "ofText": "/",
311
+ "pageInputPrefix": "第",
312
+ "pageInputSuffix": "頁,共 {totalPages} 頁",
278
313
  "pageLabel": "第 {page} 頁",
314
+ "pageSelectLabel": "頁",
279
315
  "pageSizeLabel": "每頁 {pageSize} 筆",
280
316
  "pageStatus": "第 {page} 頁,共 {totalPages} 頁",
281
317
  "pageText": "頁",
318
+ "pagerLabel": "分頁",
282
319
  "previousPageLabel": "上一頁",
283
320
  "rangeStatus": "第 {start} - {end} 項,共 {total} 項"
284
321
  },
@@ -353,7 +390,17 @@
353
390
  "collapse": "摺疊",
354
391
  "expand": "展開",
355
392
  "filter": "篩選",
356
- "filterTree": "篩選樹狀檢視"
393
+ "filterLabel": "篩選{tree}",
394
+ "filterTree": "篩選樹狀檢視",
395
+ "loadError": "無法載入{node}中的項目",
396
+ "loadingNode": "正在載入{node}",
397
+ "movedAfter": "已將 {node} 移到 {target} 之後",
398
+ "movedBefore": "已將 {node} 移到 {target} 之前",
399
+ "movedInto": "已將 {node} 移入 {target}",
400
+ "noData": "沒有資料",
401
+ "noMatches": "沒有符合的項目",
402
+ "results": "{count} 個結果",
403
+ "retryLoading": "重試載入{node}"
357
404
  },
358
405
  "window": {
359
406
  "close": "關閉",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanahoshi/mona-ui",
3
- "version": "0.24.6",
3
+ "version": "0.24.8",
4
4
  "description": "A very light Angular UI framework",
5
5
  "author": "Nanahoshi",
6
6
  "repository": {
@@ -25,6 +25,16 @@ declare class CheckBoxComponent implements CheckboxVariantInput, CheckmarkVarian
25
25
  protected readonly checkMarkClasses: _angular_core.Signal<string>;
26
26
  protected readonly containerLabelClasses: _angular_core.Signal<string>;
27
27
  protected readonly invalidState: _angular_core.Signal<boolean>;
28
+ /**
29
+ * @description Id of an element that describes the check box, such as an error message.
30
+ * @default ""
31
+ */
32
+ readonly ariaDescribedBy: _angular_core.InputSignal<string>;
33
+ /**
34
+ * @description Accessible name of the check box when it has no visible label.
35
+ * @default ""
36
+ */
37
+ readonly ariaLabel: _angular_core.InputSignal<string>;
28
38
  /**
29
39
  * @description Whether the control is checked.
30
40
  * @default false
@@ -106,7 +116,7 @@ declare class CheckBoxComponent implements CheckboxVariantInput, CheckmarkVarian
106
116
  protected onInputBlur(event: FocusEvent): void;
107
117
  protected onInputChange(event: Event): void;
108
118
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckBoxComponent, never>;
109
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckBoxComponent, "mona-check-box", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "labelSize": { "alias": "labelSize"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "inputBlur": "inputBlur"; "inputChange": "inputChange"; "inputFocus": "inputFocus"; "touch": "touch"; }, never, ["*"], true, never>;
119
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckBoxComponent, "mona-check-box", never, { "ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "labelSize": { "alias": "labelSize"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "inputBlur": "inputBlur"; "inputChange": "inputChange"; "inputFocus": "inputFocus"; "touch": "touch"; }, never, ["*"], true, never>;
110
120
  }
111
121
 
112
122
  declare class CheckboxDirective implements CheckboxDirectiveVariantInput {
@@ -1,12 +1,24 @@
1
1
  import { FilterOperators, FilterLogic, CompositeFilterDescriptor, BooleanFilterOperators, DateFilterOperators, NumericFilterOperators, StringFilterOperators, BooleanFilterDescriptor, DateFilterDescriptor, NumericFilterDescriptor, StringFilterDescriptor } from '@nanahoshi/mona-ui/query';
2
- import * as _angular_core from '@angular/core';
3
2
  import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
4
3
  import { MonaFilterMessages } from '@nanahoshi/mona-ui/i18n';
4
+ import * as _angular_core from '@angular/core';
5
5
  import { DataType } from '@nanahoshi/mona-ui/common';
6
6
  import * as class_variance_authority_types from 'class-variance-authority/types';
7
7
  import { VariantInputs } from '@nanahoshi/mona-ui/internal';
8
8
  import { VariantProps } from 'class-variance-authority';
9
9
 
10
+ type FilterDescriptorBuildArgs<TValue, TOperator extends FilterOperators> = {
11
+ field: string;
12
+ operator1: TOperator;
13
+ value1: TValue;
14
+ } & ({
15
+ logic: null;
16
+ } | {
17
+ logic: FilterLogic;
18
+ operator2: TOperator;
19
+ value2: TValue;
20
+ });
21
+
10
22
  interface FilterMenuDataItem {
11
23
  text: string;
12
24
  value: FilterOperators;
@@ -16,15 +28,16 @@ interface FilterMenuValue {
16
28
  logic?: "and" | "or";
17
29
  operator1?: FilterOperators;
18
30
  operator2?: FilterOperators;
19
- value1?: any;
20
- value2?: any;
31
+ /** The first condition's value; `null` when its operator takes none. */
32
+ value1?: unknown;
33
+ /** The second condition's value; `null` when its operator takes none. */
34
+ value2?: unknown;
21
35
  }
22
36
 
23
37
  interface FilterMenuDateOptions {
24
- format: string;
25
- type: FilterMenuDateType;
38
+ /** The date input format. Without it, the date picker uses the locale's date format. */
39
+ readonly format?: string;
26
40
  }
27
- type FilterMenuDateType = "date" | "datetime" | "time";
28
41
 
29
42
  interface FilterMenuConnectorItem {
30
43
  text: string;
@@ -39,65 +52,74 @@ type FilterMenuBaseVariantProps = VariantProps<typeof filterMenuBaseThemeVariant
39
52
  type FilterMenuBaseVariantInput = VariantInputs<FilterMenuBaseVariantProps>;
40
53
  type FilterMenuVariantInput = FilterMenuBaseVariantInput;
41
54
 
55
+ /**
56
+ * Builds a filter for one field from up to two conditions joined by AND or OR. The first condition starts at the
57
+ * first allowed operator; Enter in a value applies, as does the Apply button.
58
+ */
42
59
  declare class FilterMenuComponent implements FilterMenuVariantInput {
43
60
  #private;
44
- protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaFilterMessages>;
45
61
  protected readonly applyDisabled: _angular_core.Signal<boolean>;
46
62
  protected readonly baseClass: _angular_core.Signal<string>;
47
- protected readonly booleanFilterMenuDataItems: _angular_core.Signal<FilterMenuDataItem[]>;
48
63
  protected readonly connectorDataItems: _angular_core.Signal<FilterMenuConnectorItem[]>;
49
- protected readonly dateFilterMenuDataItems: _angular_core.Signal<FilterMenuDataItem[]>;
50
64
  protected readonly dateFilterValues: _angular_core.WritableSignal<[Date | null, Date | null]>;
51
- protected readonly effectiveDateOptions: _angular_core.Signal<FilterMenuDateOptions>;
52
65
  protected readonly filterMenuActionsClass: _angular_core.Signal<string>;
53
66
  protected readonly filterMenuItemClass: _angular_core.Signal<string>;
54
67
  protected readonly firstFilterValid: _angular_core.Signal<boolean>;
68
+ protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaFilterMessages>;
55
69
  protected readonly numberFilterValues: _angular_core.WritableSignal<[number | null, number | null]>;
56
- protected readonly numericFilterMenuDataItems: _angular_core.Signal<FilterMenuDataItem[]>;
70
+ /** The operators of the menu's type that `operators` allows, in its order; labels follow the locale. */
71
+ protected readonly operatorItems: _angular_core.Signal<FilterMenuDataItem[]>;
57
72
  protected readonly secondFilterValid: _angular_core.Signal<boolean>;
58
73
  protected readonly selectedConnectorItem: _angular_core.WritableSignal<FilterMenuConnectorItem | null>;
59
74
  protected readonly selectedFilterMenuDataItemList: _angular_core.WritableSignal<(FilterMenuDataItem | undefined)[]>;
60
- protected readonly stringFilterMenuDataItems: _angular_core.Signal<FilterMenuDataItem[]>;
61
75
  protected readonly stringFilterValues: _angular_core.WritableSignal<[string, string]>;
62
76
  readonly apply: _angular_core.OutputEmitterRef<CompositeFilterDescriptor>;
77
+ /**
78
+ * @description Options of the date input. Without a `format`, the date picker uses the locale's date format.
79
+ * @default {}
80
+ */
63
81
  readonly dateOptions: _angular_core.InputSignal<FilterMenuDateOptions>;
64
- readonly field: _angular_core.ModelSignal<string>;
65
- readonly operators: _angular_core.ModelSignal<Iterable<FilterOperators>>;
82
+ /**
83
+ * @description The field the filter applies to.
84
+ * @default ""
85
+ */
86
+ readonly field: _angular_core.InputSignal<string>;
87
+ /**
88
+ * @description The operators offered, in this order; all of the type's operators when empty.
89
+ * @default []
90
+ */
91
+ readonly operators: _angular_core.InputSignal<Iterable<FilterOperators>>;
66
92
  readonly rounded: _angular_core.InputSignal<"none" | "small" | "medium" | "large" | null | undefined>;
67
93
  readonly size: _angular_core.InputSignal<"small" | "medium" | "large" | null | undefined>;
68
- readonly type: _angular_core.ModelSignal<DataType>;
94
+ /**
95
+ * @description The data type of the field, which picks the operators and the value input.
96
+ * @default "string"
97
+ */
98
+ readonly type: _angular_core.InputSignal<DataType>;
99
+ /**
100
+ * @description The conditions shown in the menu. Setting it to `undefined` clears the menu.
101
+ */
69
102
  readonly value: _angular_core.ModelSignal<FilterMenuValue | undefined>;
70
103
  constructor();
104
+ getFilterValues(): FilterMenuValue;
71
105
  protected onConnectorChange(item: FilterMenuConnectorItem, selected: boolean): void;
72
106
  protected onFilterApply(): void;
73
107
  protected onFilterClear(): void;
74
- protected onFilterOperatorChange(index: number, item: FilterMenuDataItem): void;
75
- getFilterValues(): FilterMenuValue;
108
+ protected onFilterOperatorChange(index: 0 | 1, item: FilterMenuDataItem): void;
109
+ /** Enter in a value applies the filter, unless an IME is composing text. */
110
+ protected onValueKeydown(event: KeyboardEvent): void;
76
111
  private applyBooleanFilters;
77
112
  private applyDateFilters;
78
113
  private applyNumberFilters;
79
114
  private applyStringFilters;
80
115
  private clearSecondFilterValues;
81
116
  private setFilterValues;
82
- private getDefaultDateFormat;
83
117
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FilterMenuComponent, never>;
84
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterMenuComponent, "mona-filter-menu", never, { "dateOptions": { "alias": "dateOptions"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "apply": "apply"; "field": "fieldChange"; "operators": "operatorsChange"; "type": "typeChange"; "value": "valueChange"; }, never, never, true, never>;
118
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FilterMenuComponent, "mona-filter-menu", never, { "dateOptions": { "alias": "dateOptions"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "apply": "apply"; "value": "valueChange"; }, never, never, true, never>;
85
119
  }
86
120
 
87
121
  declare const FILTER_DEFAULT_MESSAGES: MonaFilterMessages;
88
122
 
89
- type FilterDescriptorBuildArgs<TValue, TOperator extends FilterOperators> = {
90
- field: string;
91
- operator1: TOperator;
92
- value1: TValue;
93
- } & ({
94
- logic: null;
95
- } | {
96
- logic: FilterLogic;
97
- operator2: TOperator;
98
- value2: TValue;
99
- });
100
-
101
123
  declare class FilterService {
102
124
  #private;
103
125
  get booleanFilterMenuItems(): FilterMenuDataItem[];
@@ -117,4 +139,4 @@ declare class FilterService {
117
139
  }
118
140
 
119
141
  export { FILTER_DEFAULT_MESSAGES, FilterMenuComponent, FilterService };
120
- export type { FilterMenuDataItem, FilterMenuDateOptions, FilterMenuDateType, FilterMenuValue };
142
+ export type { FilterDescriptorBuildArgs, FilterMenuDataItem, FilterMenuDateOptions, FilterMenuValue };