@mono-lit/helper 0.0.9 → 0.1.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.
Files changed (164) hide show
  1. package/dist/accordion-core-DaNyPWRr.js +277 -0
  2. package/dist/alert-core-DWtHbX_-.js +134 -0
  3. package/dist/breadcrumb-list-core-Dh68T8Cf.js +747 -0
  4. package/dist/{mono-button-CLkHg3WW.js → button-core-DerXg84Q.js} +3 -276
  5. package/dist/button-dropdown-core-DKYEOyjy.js +654 -0
  6. package/dist/button-utils-D5-66M02.js +63 -0
  7. package/dist/card-utils-l80qAmrN.js +312 -0
  8. package/dist/chart-core-DV7hD3ZY.js +801 -0
  9. package/dist/checkbox-utils-DKdrhAzF.js +337 -0
  10. package/dist/chip-utils-DpRrd7Zj.js +403 -0
  11. package/dist/{data-source-controller-C6C4ej_M.js → data-source-controller-DS_JLrmS.js} +1 -1
  12. package/dist/{data-source-options-fxT5QIX4.js → data-source-options-DJUNU26C.js} +6 -6
  13. package/dist/{data-source-read-BL266IW0.js → data-source-read-uKJpRAzx.js} +2 -2
  14. package/dist/date-core-CyuSyvvG.js +734 -0
  15. package/dist/drawer-core-DbFWvNln.js +759 -0
  16. package/dist/dropdown-core-BCH1pK14.js +511 -0
  17. package/dist/dropdown-table-core-SfHUJVFq.js +1342 -0
  18. package/dist/export.js +1 -1
  19. package/dist/{field-path-BabiMrrA.js → field-path-DK2VBWHl.js} +1 -1
  20. package/dist/field-tooltip.css_raw-DVblekCl.js +5 -0
  21. package/dist/{field-validation.css_raw-Cx6SGrfP.js → field-validation.css_raw-BU7C6173.js} +1 -170
  22. package/dist/file-upload-core-Cz_dBQMx.js +624 -0
  23. package/dist/filter-builder-core-DyWjbBP7.js +381 -0
  24. package/dist/{filter-builder-B6Y2mmbM.js → filter-builder-vbqIuPhX.js} +1 -1
  25. package/dist/{filter-eval-ChDSaAUH.js → filter-eval-CqeBnMYh.js} +1 -1
  26. package/dist/{filter-odata-Bi27XUpQ.js → filter-odata-GsczYKNC.js} +1 -1
  27. package/dist/{hydration-flush-BaE9gN3C.js → hydration-flush-Volt9X7Q.js} +2 -1071
  28. package/dist/index.js +11 -11
  29. package/dist/{index.node-DTqDBca7.js → index.node-Csy9zrr1.js} +4 -4
  30. package/dist/index.node.js +11 -11
  31. package/dist/input-utils-BglY-k0H.js +1145 -0
  32. package/dist/menu-core-DkAYuCZ2.js +831 -0
  33. package/dist/modal-core-CSBSPN_m.js +844 -0
  34. package/dist/mono-button-DVvZ03P-.js +280 -0
  35. package/dist/{mono-button.shadow-DqZMpcqY.js → mono-button.shadow-BANxMGln.js} +6 -594
  36. package/dist/{mono-data-chart-NKPdAgVq.js → mono-data-chart-ChF4J9RT.js} +6 -6
  37. package/dist/{mono-data-dropdown-B2iRpJuI.js → mono-data-dropdown-Bgj2PDfm.js} +1 -1
  38. package/dist/{mono-data-grid-llJCX9MC.js → mono-data-grid-DJkp96N-.js} +144 -46
  39. package/dist/{mono-event-BPku9HpS.js → mono-event-CAZf0F_k.js} +14 -9
  40. package/dist/{mono-form-controller-BrA10erm.js → mono-form-controller-DxZLvyg6.js} +2 -1
  41. package/dist/mono-table-checkbox-core-BKOMx8R5.js +5288 -0
  42. package/dist/nav-core-B5qU2dzn.js +225 -0
  43. package/dist/{normalize-error-D93O4q8g.js → normalize-error-BEcd1tmS.js} +2 -2
  44. package/dist/nuxt.js +1 -1
  45. package/dist/otp-core-DXg3vFLh.js +758 -0
  46. package/dist/radio-utils-Dk9Tl1jz.js +319 -0
  47. package/dist/rich-text-editor-core-Ddd_QaLn.js +1280 -0
  48. package/dist/select-utils-BgArYHk8.js +2140 -0
  49. package/dist/sidebar-core-CD6txDo3.js +583 -0
  50. package/dist/slider-core-vcWr321-.js +1014 -0
  51. package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +2 -2
  52. package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +1 -1
  53. package/dist/src/components/dropdown-table/index.d.ts +1 -1
  54. package/dist/src/components/dropdown-table/index.shadow.d.ts +1 -1
  55. package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +1 -1
  56. package/dist/src/components/form/form-types.d.ts +9 -3
  57. package/dist/src/components/input/input-core.d.ts +1 -1
  58. package/dist/src/components/input/input-types.d.ts +1 -1
  59. package/dist/src/components/otp/otp-core.d.ts +1 -1
  60. package/dist/src/components/select/select-core.d.ts +1 -1
  61. package/dist/src/components/select/select-types.d.ts +1 -1
  62. package/dist/src/components/slider/slider-core.d.ts +1 -1
  63. package/dist/src/components/slider/slider-types.d.ts +1 -1
  64. package/dist/src/components/table/filter-suggestion.d.ts +171 -0
  65. package/dist/src/components/table/index.d.ts +5 -4
  66. package/dist/src/components/table/index.shadow.d.ts +5 -4
  67. package/dist/src/components/table/mono-data-grid.d.ts +22 -3
  68. package/dist/src/components/table/mono-table-empty-core.d.ts +37 -0
  69. package/dist/src/components/table/mono-table-search-core.d.ts +22 -3
  70. package/dist/src/components/table/table-types.d.ts +74 -4
  71. package/dist/src/components/tag-input/tag-input-core.d.ts +1 -1
  72. package/dist/src/components/tag-input/tag-input-types.d.ts +1 -1
  73. package/dist/src/components/textarea/textarea-core.d.ts +1 -1
  74. package/dist/src/composables/mono-event.d.ts +7 -1
  75. package/dist/src/entries/index.d.ts +8 -6
  76. package/dist/src/entries/index.node.d.ts +8 -6
  77. package/dist/src/search/index.d.ts +1 -1
  78. package/dist/src/utils/group-count.d.ts +36 -0
  79. package/dist/switch-utils-CTZ4id2V.js +338 -0
  80. package/dist/tabs-core-r5-B8k_N.js +317 -0
  81. package/dist/tag-input-utils-D2JA90DQ.js +3060 -0
  82. package/dist/textarea-utils-VU1KeXm8.js +821 -0
  83. package/dist/ui/accordion.js +2 -274
  84. package/dist/ui/alert.js +2 -131
  85. package/dist/ui/breadcrumb.js +4 -745
  86. package/dist/ui/button-dropdown.js +4 -652
  87. package/dist/ui/button.js +2 -63
  88. package/dist/ui/card.js +2 -310
  89. package/dist/ui/chart.js +4 -800
  90. package/dist/ui/checkbox.js +4 -335
  91. package/dist/ui/chip.js +4 -402
  92. package/dist/ui/date.js +3 -732
  93. package/dist/ui/drawer.js +3 -757
  94. package/dist/ui/dropdown-table.js +5 -1341
  95. package/dist/ui/dropdown.js +4 -509
  96. package/dist/ui/file-upload.js +3 -622
  97. package/dist/ui/filter.js +5 -380
  98. package/dist/ui/form.js +1 -1
  99. package/dist/ui/index.css +118 -1
  100. package/dist/ui/input.js +3 -1141
  101. package/dist/ui/menu.js +4 -828
  102. package/dist/ui/modal.js +4 -843
  103. package/dist/ui/nav.js +4 -223
  104. package/dist/ui/otp.js +4 -756
  105. package/dist/ui/radio.js +4 -317
  106. package/dist/ui/rich-text-editor.js +4 -1278
  107. package/dist/ui/select.js +5 -2138
  108. package/dist/ui/shadow/accordion.js +4 -273
  109. package/dist/ui/shadow/alert.js +4 -130
  110. package/dist/ui/shadow/breadcrumb.js +5 -744
  111. package/dist/ui/shadow/button-dropdown.js +6 -652
  112. package/dist/ui/shadow/button.js +3 -63
  113. package/dist/ui/shadow/card.js +4 -309
  114. package/dist/ui/shadow/chart.js +6 -1576
  115. package/dist/ui/shadow/checkbox.js +4 -334
  116. package/dist/ui/shadow/chip.js +4 -396
  117. package/dist/ui/shadow/date.js +7 -731
  118. package/dist/ui/shadow/drawer.js +4 -756
  119. package/dist/ui/shadow/dropdown-table.js +8 -1762
  120. package/dist/ui/shadow/dropdown.js +4 -508
  121. package/dist/ui/shadow/file-upload.js +4 -620
  122. package/dist/ui/shadow/filter.js +7 -379
  123. package/dist/ui/shadow/input.js +6 -1140
  124. package/dist/ui/shadow/menu.js +5 -828
  125. package/dist/ui/shadow/modal.js +6 -1063
  126. package/dist/ui/shadow/nav.js +5 -223
  127. package/dist/ui/shadow/otp.js +6 -754
  128. package/dist/ui/shadow/radio.js +4 -316
  129. package/dist/ui/shadow/rich-text-editor.js +4 -1276
  130. package/dist/ui/shadow/select.js +6 -2136
  131. package/dist/ui/shadow/sidebar.js +5 -581
  132. package/dist/ui/shadow/slider.js +5 -1010
  133. package/dist/ui/shadow/switch.js +4 -335
  134. package/dist/ui/shadow/table.js +10 -4501
  135. package/dist/ui/shadow/tabs.js +6 -315
  136. package/dist/ui/shadow/tag-input.js +7 -3057
  137. package/dist/ui/shadow/textarea.js +6 -817
  138. package/dist/ui/sidebar.js +3 -581
  139. package/dist/ui/slider.js +4 -1012
  140. package/dist/ui/switch.js +4 -336
  141. package/dist/ui/table.js +9 -4502
  142. package/dist/ui/tabs.js +4 -315
  143. package/dist/ui/tag-input.js +5 -3058
  144. package/dist/ui/textarea.js +4 -819
  145. package/dist/{vite-CivRCJaf.js → vite-CfW7z2wn.js} +21 -14
  146. package/dist/vite.js +1 -1
  147. package/dist/vue.d.ts +3 -2
  148. package/package.json +10 -11
  149. package/dist/chip-strip-bNfLn52Z.js +0 -215
  150. package/dist/data-source-controller-Dx6IQ2CN.js +0 -243
  151. package/dist/data-source-options-BM4r4PRw.js +0 -558
  152. package/dist/data-source-read-HyBCRg1t.js +0 -242
  153. package/dist/excel-BXzr3uI1.js +0 -784
  154. package/dist/export-ixRdCS2y.js +0 -2388
  155. package/dist/field-tooltip-addon-CWCp19mJ.js +0 -702
  156. package/dist/field-tooltip.css_raw-U5UeTa2d.js +0 -269
  157. package/dist/filter-builder-C0T3pMx2.js +0 -208
  158. package/dist/form-control-core-BbiACMtL.js +0 -226
  159. package/dist/icon-ClxnYhBG.js +0 -19
  160. package/dist/import-Dc4eXC02.js +0 -612
  161. package/dist/light-slots-_no0r2Z-.js +0 -246
  162. package/dist/markdown-uGlE_OfJ.js +0 -20191
  163. package/dist/mono-data-grid-e9ZVBlNN.js +0 -4240
  164. package/dist/normalize-error-BmLbgANw.js +0 -1048
@@ -1,10 +1,10 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue } from "../../composables/css-size.js";
3
3
  import { DropdownPlacement } from "../dropdown/dropdown-types.js";
4
+ import { MonoDropdownController } from "./mono-data-dropdown.js";
5
+ import { DropdownPanelOptions, DropdownTableChipProps, DropdownTableColor, DropdownTableCssClass, DropdownTableSize, DropdownTableValidationState, DropdownTableVariant } from "./dropdown-table-types.js";
4
6
  import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
5
7
  import { PopupPortalController } from "../../composables/popup-portal.js";
6
- import { DropdownPanelOptions, DropdownTableChipProps, DropdownTableColor, DropdownTableCssClass, DropdownTableSize, DropdownTableValidationState, DropdownTableVariant } from "./dropdown-table-types.js";
7
- import { MonoDropdownController } from "./mono-data-dropdown.js";
8
8
  import { LitElement, TemplateResult } from "lit";
9
9
  //#region src/components/dropdown-table/dropdown-table-core.d.ts
10
10
  /** Public surface added by the dropdown-table core mixin. */
@@ -1,8 +1,8 @@
1
1
  import { CssSizeValue, PanelSizeProps } from "../../composables/css-size.js";
2
2
  import { DropdownPlacement } from "../dropdown/dropdown-types.js";
3
3
  import { VisibilityProps } from "../../composables/visibility.js";
4
- import { ChipBehaviour, ChipColor, ChipCssClass, ChipRounded, ChipSize, ChipVariant } from "../chip/chip-types.js";
5
4
  import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
5
+ import { ChipBehaviour, ChipColor, ChipCssClass, ChipRounded, ChipSize, ChipVariant } from "../chip/chip-types.js";
6
6
  import { ChipLimitProps } from "../../composables/chip-limits.js";
7
7
  import { MonoDropdownController, MonoDropdownItem } from "./mono-data-dropdown.js";
8
8
  //#region src/components/dropdown-table/dropdown-table-types.d.ts
@@ -1,6 +1,6 @@
1
1
  /// <reference path="../../../vue.d.ts" />
2
2
  import { ChipBehaviour } from "../chip/chip-types.js";
3
- import { DropdownPanelOptions, DropdownTableChangeEvent, DropdownTableChangeEventDetail, DropdownTableChipProps, DropdownTableColor, DropdownTableEvents, DropdownTableProps, DropdownTableSize, DropdownTableValidationState, DropdownTableVariant } from "./dropdown-table-types.js";
4
3
  import { MonoDataDropdownOptions, MonoDropdownController, MonoDropdownItem, controlMonoDataDropdown as monoDataDropdown } from "./mono-data-dropdown.js";
4
+ import { DropdownPanelOptions, DropdownTableChangeEvent, DropdownTableChangeEventDetail, DropdownTableChipProps, DropdownTableColor, DropdownTableEvents, DropdownTableProps, DropdownTableSize, DropdownTableValidationState, DropdownTableVariant } from "./dropdown-table-types.js";
5
5
  import { MonoDropdownTable } from "./mono-dropdown-table.js";
6
6
  export { type ChipBehaviour, type DropdownPanelOptions, type DropdownTableChangeEvent, type DropdownTableChangeEventDetail, type DropdownTableChipProps, type DropdownTableColor, type DropdownTableEvents, type DropdownTableProps, type DropdownTableSize, type DropdownTableValidationState, type DropdownTableVariant, type MonoDataDropdownOptions, type MonoDropdownController, type MonoDropdownItem, MonoDropdownTable, monoDataDropdown as controlMonoDataDropdown, monoDataDropdown };
@@ -1,7 +1,7 @@
1
1
  /// <reference path="../../../vue.d.ts" />
2
2
  import { ChipBehaviour } from "../chip/chip-types.js";
3
- import { DropdownPanelOptions, DropdownTableChangeEvent, DropdownTableChangeEventDetail, DropdownTableChipProps, DropdownTableColor, DropdownTableEvents, DropdownTableProps, DropdownTableSize, DropdownTableValidationState, DropdownTableVariant } from "./dropdown-table-types.js";
4
3
  import { MonoDataDropdownOptions, MonoDropdownController, MonoDropdownItem, controlMonoDataDropdown as monoDataDropdown } from "./mono-data-dropdown.js";
4
+ import { DropdownPanelOptions, DropdownTableChangeEvent, DropdownTableChangeEventDetail, DropdownTableChipProps, DropdownTableColor, DropdownTableEvents, DropdownTableProps, DropdownTableSize, DropdownTableValidationState, DropdownTableVariant } from "./dropdown-table-types.js";
5
5
  import { MonoDropdownTableCore } from "./dropdown-table-core.js";
6
6
  import { MonoDropdownTableShadow } from "./mono-dropdown-table.shadow.js";
7
7
  export { type ChipBehaviour, type DropdownPanelOptions, type DropdownTableChangeEvent, type DropdownTableChangeEventDetail, type DropdownTableChipProps, type DropdownTableColor, type DropdownTableEvents, type DropdownTableProps, type DropdownTableSize, type DropdownTableValidationState, type DropdownTableVariant, type MonoDataDropdownOptions, type MonoDropdownController, type MonoDropdownItem, MonoDropdownTableCore, MonoDropdownTableShadow, monoDataDropdown };
@@ -1,6 +1,6 @@
1
1
  import { MonoEventProps } from "../../composables/element-props.js";
2
- import { MonoCheckLimits, MonoDataGridOptions, MonoGridSource, MonoTableController, MonoTableProps } from "../table/mono-data-grid.js";
3
2
  import { DropdownTableEvents } from "./dropdown-table-types.js";
3
+ import { MonoCheckLimits, MonoDataGridOptions, MonoGridSource, MonoTableController, MonoTableProps } from "../table/mono-data-grid.js";
4
4
  //#region src/components/dropdown-table/mono-data-dropdown.d.ts
5
5
  /** One resolved selection (key + display text + the row it came from). */
6
6
  export interface MonoDropdownItem<T = any> {
@@ -1,13 +1,13 @@
1
1
  import { MonoEventProps } from "../../composables/element-props.js";
2
2
  import { CheckboxEvents, CheckboxProps } from "../checkbox/checkbox-types.js";
3
- import { DateEvents, DateProps } from "../date/date-types.js";
4
- import { DropdownTableEvents, DropdownTableProps } from "../dropdown-table/dropdown-table-types.js";
5
- import { FileUploadEvents, FileUploadProps } from "../file-upload/file-upload-types.js";
6
3
  import { InputEvents, InputProps } from "../input/input-types.js";
7
4
  import { SelectEvents, SelectProps } from "../select/select-types.js";
8
5
  import { TextareaEvents, TextareaProps } from "../textarea/textarea-types.js";
9
6
  import { RichTextEditorEvents, RichTextEditorProps } from "../rich-text-editor/rich-text-editor-types.js";
7
+ import { DateEvents, DateProps } from "../date/date-types.js";
10
8
  import { TagInputEvents, TagInputProps } from "../tag-input/tag-input-types.js";
9
+ import { FileUploadEvents, FileUploadProps } from "../file-upload/file-upload-types.js";
10
+ import { DropdownTableEvents, DropdownTableProps } from "../dropdown-table/dropdown-table-types.js";
11
11
  import { RadioEvents, RadioProps } from "../radio/radio-types.js";
12
12
  import { SwitchEvents, SwitchProps } from "../switch/switch-types.js";
13
13
  import { SliderEvents, SliderProps } from "../slider/slider-types.js";
@@ -320,6 +320,12 @@ export interface MonoFormController {
320
320
  _reportList(key: string, entries: MonoFormListEntry[]): void;
321
321
  /** @internal The props an element should currently apply (`inputs[key].props` wins). */
322
322
  _propsFor(key: string): Record<string, unknown>;
323
+ /**
324
+ * @internal The elements currently registered under `key` — how a table's filter
325
+ * suggestion reads the bound control's option source (`dataSource` / `items` /
326
+ * `keyValue`) and whether it is `readonly` / `disabled`.
327
+ */
328
+ _elements(key: string): unknown[];
323
329
  }
324
330
  //#endregion
325
331
  export {};
@@ -1,8 +1,8 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue, buildSizeStyle } from "../../composables/css-size.js";
3
- import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
4
3
  import { InputFormat, InputFormatOn } from "./input-format.js";
5
4
  import { InputColor, InputCssClass, InputModelValue, InputSize, InputType, InputValidationState, InputVariant } from "./input-types.js";
5
+ import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
6
6
  import { FieldValidationController } from "../../composables/field-validation.js";
7
7
  import { LitElement, TemplateResult, nothing } from "lit";
8
8
  //#region src/components/input/input-core.d.ts
@@ -1,6 +1,6 @@
1
1
  import { VisibilityProps } from "../../composables/visibility.js";
2
- import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
3
2
  import { InputFormat, InputFormatCtx, InputFormatOn } from "./input-format.js";
3
+ import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
4
4
  //#region src/components/input/input-types.d.ts
5
5
  export type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'date' | 'time' | 'month' | 'week' | 'search' | 'file' | 'range';
6
6
  export type InputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
@@ -1,7 +1,7 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue } from "../../composables/css-size.js";
3
- import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
4
3
  import { OtpColor, OtpCssClass, OtpGroups, OtpLabelPosition, OtpSize, OtpType, OtpValidationPosition, OtpValidationState, OtpVariant } from "./otp-types.js";
4
+ import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
5
5
  import { FieldValidationController } from "../../composables/field-validation.js";
6
6
  import { LitElement, TemplateResult, nothing } from "lit";
7
7
  //#region src/components/otp/otp-core.d.ts
@@ -1,8 +1,8 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue } from "../../composables/css-size.js";
3
3
  import { MonoSearchValue } from "../../search/data-search.js";
4
- import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
5
4
  import { SelectColor, SelectCssClass, SelectDataSource, SelectDisplayGroup, SelectDisplayValue, SelectDropdownOptions, SelectItem, SelectLoadMore, SelectSize, SelectValidationState, SelectValue, SelectVariant } from "./select-types.js";
5
+ import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
6
6
  import { LateSlotWatcher } from "../../composables/light-slots.js";
7
7
  import { LitElement, TemplateResult } from "lit";
8
8
  //#region src/components/select/select-core.d.ts
@@ -2,8 +2,8 @@ import { PanelSizeProps } from "../../composables/css-size.js";
2
2
  import { DescribedError } from "../../utils/normalize-error.js";
3
3
  import { LoadMoreMode, MonoDataSource } from "../../composables/data-source-controller.js";
4
4
  import { VisibilityProps } from "../../composables/visibility.js";
5
- import { MonoSearchValue } from "../../search/data-search.js";
6
5
  import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
6
+ import { MonoSearchValue } from "../../search/data-search.js";
7
7
  //#region src/components/select/select-types.d.ts
8
8
  /**
9
9
  * Sizes the popup PANEL only, independent of the field — the same object
@@ -1,8 +1,8 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue } from "../../composables/css-size.js";
3
- import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
4
3
  import { InputFormat } from "../input/input-format.js";
5
4
  import { SliderColor, SliderCssClass, SliderFill, SliderSize, SliderType, SliderValidationState, SliderValue, SliderValueTooltip } from "./slider-types.js";
5
+ import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
6
6
  import { LitElement, TemplateResult, nothing } from "lit";
7
7
  //#region src/components/slider/slider-core.d.ts
8
8
  export type SliderSlotName = 'label' | 'helper';
@@ -1,6 +1,6 @@
1
1
  import { VisibilityProps } from "../../composables/visibility.js";
2
- import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
3
2
  import { InputFormat, InputFormatCtx } from "../input/input-format.js";
3
+ import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
4
4
  //#region src/components/slider/slider-types.d.ts
5
5
  export type SliderSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
6
6
  export type SliderColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'neutral' | 'dark';
@@ -0,0 +1,171 @@
1
+ import { MonoSearchExprEntry } from "../../search/search-expr.js";
2
+ import { MonoSearchValue } from "../../search/data-search.js";
3
+ import { MonoFormController } from "../form/form-types.js";
4
+ import { RowPredicate } from "../../search/filter-eval.js";
5
+ import { ApplyGate } from "../../utils/data-source-apply.js";
6
+ import { MonoTupleCount, MonoValueCount } from "../../utils/group-count.js";
7
+ //#region src/components/table/filter-suggestion.d.ts
8
+ /** Where a field's ALLOWED values come from — a DataSource, a store, an array, or with an explicit key. */
9
+ export type MonoSuggestionValueSource = unknown | {
10
+ source: unknown;
11
+ /** The option row field holding the value (default: the form control's `keyValue`, then the row field). */
12
+ keyValue?: string;
13
+ };
14
+ /** `<mono-table-search :suggestion-filter.prop="…">`. */
15
+ export interface MonoSuggestionFilter {
16
+ /** Row field → form key, e.g. `{ CodeDept: 'Dept' }`. Required. */
17
+ keys: Record<string, string>;
18
+ /**
19
+ * Allowed values per ROW field. Default: the option source of the form control
20
+ * bound under that key (`dataSource`, else `items`).
21
+ */
22
+ sources?: Record<string, MonoSuggestionValueSource>;
23
+ /**
24
+ * Where rows are COUNTED — a DataSource, a store or an array. Default: the
25
+ * grid's bound source. Its own `filter()` is NOT applied (it usually holds the
26
+ * very form clause being relaxed); put a fixed base in {@link filter}.
27
+ */
28
+ source?: unknown;
29
+ /** Search fields on {@link source}. Default: the grid's `searchValue()`. */
30
+ searchValue?: MonoSearchValue;
31
+ /**
32
+ * A fixed base for the probe, ANDed in — a devextreme filter array, or a
33
+ * getter returning one (a function taking NO arguments). For an array source a
34
+ * row predicate `(row) => boolean` works too.
35
+ */
36
+ filter?: unknown;
37
+ /** Search operation (default `contains`). */
38
+ searchOperation?: string;
39
+ /**
40
+ * How the rows are counted on a remote source.
41
+ * - `'apply'` (default): ONE `$apply=groupby((…),aggregate($count as count))` request
42
+ * for every field — every value that has matches comes back with its count. Falls
43
+ * back to a `$select` scan when the server rejects `$apply`.
44
+ * - `'count'`: one `$count` request PER allowed option of each field (`$top=0&$count=true`,
45
+ * a bare number back). For servers without `$apply` and short option lists — no rows
46
+ * are downloaded. Needs an OData store; capped by {@link maxCountRequests}.
47
+ */
48
+ requestType?: 'apply' | 'count';
49
+ /** `requestType: 'count'` only — most `$count` requests per field (default 30). */
50
+ maxCountRequests?: number;
51
+ /**
52
+ * Most offers kept, largest count first (default 10). The first is what
53
+ * `<mono-table-empty>`'s Adjust Filter button applies; all of them are listed in
54
+ * the dropdown beside it.
55
+ */
56
+ maxOffers?: number;
57
+ /**
58
+ * Log every probe step to the console — the search sent, the per-value counts,
59
+ * which candidates the field allows — and the reason when nothing is offered
60
+ * (a readonly field, an empty "all values" field, no candidates, none allowed).
61
+ */
62
+ debug?: boolean;
63
+ }
64
+ /** What a probe found — published on the grid, rendered by `<mono-table-empty>`. */
65
+ export interface MonoFilterSuggestion {
66
+ /** Form key to change (`Dept`). */
67
+ key: string;
68
+ /** Row field it filters (`CodeDept`). */
69
+ field: string;
70
+ /** The suggested value (single), or the values being ADDED (array field). */
71
+ value: unknown;
72
+ /** Display text for {@link value}, from the control's `displayValue` when known. */
73
+ caption: string;
74
+ /**
75
+ * The field's label — `inputs[key].props.label` from `controlMonoForm`, else the
76
+ * bound control's `label`, else the form key. For wording: "… in another {label}".
77
+ */
78
+ label: string;
79
+ /** Rows that would match the search after adjusting. */
80
+ count: number;
81
+ /** The form value right now. */
82
+ current: unknown;
83
+ /** What Adjust writes: `form.setValues(values)`. */
84
+ values: Record<string, unknown>;
85
+ }
86
+ /** The slice of the grid a probe reads — public `MonoTableController` members only. */
87
+ export interface ProbeGrid {
88
+ searchTerms: Array<{
89
+ value: string;
90
+ field?: string;
91
+ }>;
92
+ dataSource: unknown;
93
+ searchValue(): MonoSearchExprEntry[] | undefined;
94
+ }
95
+ export interface ProbeContext {
96
+ grid: ProbeGrid;
97
+ form: MonoFormController;
98
+ /** Remembers a backend that rejected `$apply` (see `createApplyGate`). */
99
+ gate: ApplyGate;
100
+ }
101
+ /** `field = v`, or an OR of them for several values. */
102
+ export declare function equalsAny(field: string, values: readonly unknown[]): unknown;
103
+ /**
104
+ * One case-insensitive search clause for a plain / path field.
105
+ *
106
+ * The probe's filter reaches the server as TEXT — inside an `$apply`, or a `$filter`
107
+ * written into the url — never through devextreme's compiler, so its usual
108
+ * `tolower` (`oDataFilterToLower`) never happens. It is written here instead:
109
+ * `contains(tolower(CompanyName),'shopee')`, as a raw one-element clause.
110
+ * A wildcard path comes back from `toODataClause` as an `any()` lambda that is
111
+ * already lowercased.
112
+ */
113
+ export declare function lowerSearchClause(field: string, op: string, value: string): unknown;
114
+ /** The search as a filter array (remote) — `null` when there is nothing to search. */
115
+ export declare function searchFilterFor(terms: ProbeGrid['searchTerms'], entries: readonly MonoSearchExprEntry[], operation?: string): unknown;
116
+ /** The search as a row predicate (array) — `null` when there is nothing to search. */
117
+ export declare function searchPredicateFor(terms: ProbeGrid['searchTerms'], entries: readonly MonoSearchExprEntry[], operation?: string): RowPredicate | null;
118
+ /**
119
+ * The probe filter for relaxing `field`: every OTHER mapped field pinned to its
120
+ * current form value (an empty value means "all" and pins nothing), ANDed with
121
+ * the search and the fixed base. `field` itself stays free.
122
+ */
123
+ export declare function buildProbeFilter(field: string, keys: Record<string, string>, values: Record<string, unknown>, search: unknown, base: unknown): unknown;
124
+ type ProbeLog = ((step: string, data?: unknown) => void) | undefined;
125
+ /**
126
+ * Per-value counts for relaxing `field` alone: the combos where every OTHER relaxed
127
+ * field still equals its form value, summed by `field`'s value.
128
+ */
129
+ export declare function sliceForField(combos: readonly MonoTupleCount[], field: string, others: ReadonlyArray<{
130
+ field: string;
131
+ current: unknown;
132
+ }>): MonoValueCount[];
133
+ /** The bound form control's surface the probe reads (select / tag-input / dropdown-table). */
134
+ interface FormControlLike {
135
+ readonly?: boolean;
136
+ disabled?: boolean;
137
+ dataSource?: unknown;
138
+ items?: unknown[];
139
+ keyValue?: string;
140
+ displayValue?: string | ((item: any) => string);
141
+ label?: string;
142
+ }
143
+ /**
144
+ * Which `candidates` the field allows, each with its caption. `null` when there is
145
+ * NO source to check against (nothing bound, nothing configured) — the caller
146
+ * then trusts the counts.
147
+ */
148
+ export declare function allowedValues(spec: MonoSuggestionValueSource | undefined, control: FormControlLike | null, field: string, candidates: readonly unknown[], log?: ProbeLog): Promise<Map<string, {
149
+ value: unknown;
150
+ caption: string;
151
+ }> | null>;
152
+ /**
153
+ * EVERY option the field offers (keyed by `String(value)`, with its caption) — the
154
+ * candidate list for `requestType: 'count'`. Same source resolution as
155
+ * {@link allowedValues}; a DataSource is read with its own `filter()`, so the
156
+ * per-user restriction applies. `null` when there is no option source at all.
157
+ */
158
+ export declare function optionValues(spec: MonoSuggestionValueSource | undefined, control: FormControlLike | null, field: string, log?: ProbeLog): Promise<Map<string, {
159
+ value: unknown;
160
+ caption: string;
161
+ }> | null>;
162
+ /**
163
+ * Probe every mapped field and return EVERY single-field adjustment that would bring
164
+ * rows back and that the user may pick — largest count first, so `[0]` is the best.
165
+ * Empty when there is nothing to offer.
166
+ */
167
+ export declare function probeFilterSuggestions(cfg: MonoSuggestionFilter, ctx: ProbeContext): Promise<MonoFilterSuggestion[]>;
168
+ /** The single best offer — {@link probeFilterSuggestions}`[0]`, or `null`. */
169
+ export declare function probeFilterSuggestion(cfg: MonoSuggestionFilter, ctx: ProbeContext): Promise<MonoFilterSuggestion | null>;
170
+ //#endregion
171
+ export {};
@@ -5,10 +5,11 @@ import { MonoExportColumn, MonoExportFormat, MonoExportFormatOptions, MonoExport
5
5
  import { MonoImportAmbiguity, MonoImportChange, MonoImportColumn, MonoImportMatch, MonoImportNumberFormat, MonoImportOptions, MonoImportRejection, MonoImportResult, MonoImportType, MonoImportValueType } from "../../import/types.js";
6
6
  import { TableDetailClickEvent, TableDetailClickEventDetail, TableDetailEvents } from "./mono-table-detail-core.js";
7
7
  import { TableCheckboxChangeEvent, TableCheckboxChangeEventDetail, TableCheckboxEvents, TableCheckboxType } from "./mono-table-checkbox-core.js";
8
- import { TableEmptyEvents, TableEmptyReloadEvent, TableEmptyReloadEventDetail } from "./mono-table-empty-core.js";
8
+ import { MonoSearchCustomCtx, MonoSearchCustomResult, MonoSearchExpr, MonoSearchExprCustom, MonoSearchExprEntry, ResolveSearchOptions, expandWildcard, isWildcardPattern, normalizeSearchExpr, plainSearchColumns, resolveSearchEntries } from "../../search/search-expr.js";
9
+ import { MonoFilterSuggestion, MonoSuggestionFilter, MonoSuggestionValueSource } from "./filter-suggestion.js";
10
+ import { MonoEmptySuggestionOptions, TableEmptyAdjustEvent, TableEmptyAdjustEventDetail, TableEmptyEvents, TableEmptyReloadEvent, TableEmptyReloadEventDetail } from "./mono-table-empty-core.js";
9
11
  import { TableErrorCloseEvent, TableErrorCloseEventDetail, TableErrorEvents, TableErrorReloadEvent, TableErrorReloadEventDetail } from "./mono-table-error-core.js";
10
12
  import { MonoDataSourceOptions, MonoOdataOptions } from "../../utils/data-source-options.js";
11
- import { MonoSearchCustomCtx, MonoSearchCustomResult, MonoSearchExpr, MonoSearchExprCustom, MonoSearchExprEntry, ResolveSearchOptions, expandWildcard, isWildcardPattern, normalizeSearchExpr, plainSearchColumns, resolveSearchEntries } from "../../search/search-expr.js";
12
13
  import { GroupPageInfo, MonoCellChange, MonoCheckConfig, MonoCheckHandle, MonoCheckMode, MonoColumn, MonoColumnDef, MonoColumnHandle, MonoColumnSort, MonoColumnValue, MonoDataGridOptions, MonoDetailEl, MonoDetailHandle, MonoDisplayRow, MonoDistinctValuesContext, MonoEditableTrigger, MonoFormConfig, MonoFormHandle, MonoFormOp, MonoGridSource, MonoGridStore, MonoGroupMeta, MonoSearchTerm, MonoServerGroupCtx, MonoServerGroupSource, MonoSetColumnFilterOptions, MonoSetSortOptions, MonoStagedChange, MonoStorePush, MonoSummaryConfig, MonoSummaryFieldSpec, MonoSummaryHandle, MonoSummaryRecalculate, MonoSummaryResult, MonoSummarySpec, MonoSummaryType, MonoTableController, SortOrder, controlMonoTable as monoDataGrid } from "./mono-data-grid.js";
13
14
  import { MonoArraySourceOptions, monoArraySource } from "./array-source.js";
14
15
  import { FieldSegment, ODataClause, ParsedFieldPath, getFieldValue, isPath, mergePatch, parseFieldPath, setFieldValue, toODataClause, toODataSelector } from "../../search/field-path.js";
@@ -25,5 +26,5 @@ import { MonoTableLoading } from "./mono-table-loading.js";
25
26
  import { MonoTableSummary } from "./mono-table-summary.js";
26
27
  import { MonoTableDetail } from "./mono-table-detail.js";
27
28
  import { MonoTableCheckbox } from "./mono-table-checkbox.js";
28
- import { TableCheckboxProps, TableDetailProps, TableEmptyProps, TableErrorProps, TableInfoProps, TableLoadingProps, TablePageSizeProps, TablePagingProps, TableSearchProps, TableSortProps, TableSummaryProps, TableThProps, TableThSort } from "./table-types.js";
29
- export { DEFAULT_ERROR_MESSAGES, type DescribedError, type FieldSegment, type GroupPageInfo, type MonoArraySourceOptions, type MonoCellChange, type MonoCheckConfig, type MonoCheckHandle, type MonoCheckMode, type MonoColumn, type MonoColumnDef, type MonoColumnHandle, type MonoColumnSort, type MonoColumnValue, type MonoDataGridOptions, type MonoDataSourceOptions, type MonoDetailEl, type MonoDetailHandle, type MonoDisplayRow, type MonoDistinctValuesContext, type MonoEditableTrigger, type MonoErrorMessageKey, type MonoErrorMessages, type MonoExportColumn, type MonoExportFormat, type MonoExportFormatOptions, type MonoExportOptions, type MonoExportResult, type MonoExportStyle, type MonoExportStyles, type MonoFormConfig, type MonoFormHandle, type MonoFormOp, type MonoGridSource, type MonoGridStore, type MonoGroupMeta, type MonoGroupNode, type MonoImportAmbiguity, type MonoImportChange, type MonoImportColumn, type MonoImportMatch, type MonoImportNumberFormat, type MonoImportOptions, type MonoImportRejection, type MonoImportResult, type MonoImportType, type MonoImportValueType, type MonoOdataOptions, type MonoSearchCustomCtx, type MonoSearchCustomResult, type MonoSearchExpr, type MonoSearchExprCustom, type MonoSearchExprEntry, type MonoSearchTerm, type MonoServerGroupCtx, type MonoServerGroupSource, type MonoSetColumnFilterOptions, type MonoSetSortOptions, type MonoStagedChange, type MonoStorePush, type MonoSummaryConfig, type MonoSummaryFieldSpec, type MonoSummaryHandle, type MonoSummaryRecalculate, type MonoSummaryResult, type MonoSummarySpec, type MonoSummaryType, MonoTableCheckbox, type MonoTableController, MonoTableDetail, MonoTableEmpty, MonoTableError, MonoTableInfo, MonoTableLoading, MonoTablePageSize, MonoTablePaging, MonoTablePagingGroup, MonoTableSearch, MonoTableSort, MonoTableSummary, MonoTableTh, type ODataClause, type ParsedFieldPath, type ResolveSearchOptions, type SortOrder, type TableCheckboxChangeEvent, type TableCheckboxChangeEventDetail, type TableCheckboxEvents, type TableCheckboxProps, type TableCheckboxType, type TableDetailClickEvent, type TableDetailClickEventDetail, type TableDetailEvents, type TableDetailProps, type TableEmptyEvents, type TableEmptyProps, type TableEmptyReloadEvent, type TableEmptyReloadEventDetail, type TableErrorCloseEvent, type TableErrorCloseEventDetail, type TableErrorEvents, type TableErrorProps, type TableErrorReloadEvent, type TableErrorReloadEventDetail, type TableInfoProps, type TableLoadingProps, type TablePageSizeProps, type TablePagingProps, type TableSearchProps, type TableSortProps, type TableSummaryProps, type TableThProps, type TableThSort, buildGroups, collectGroupPaths, monoDataGrid as controlMonoTable, describeError, errorStatus, expandWildcard, flattenLeaves, getFieldValue, isGroupNode, isPath, isWildcardPattern, mergePatch, monoArraySource, monoDataGrid, normalizeError, normalizeSearchExpr, parseFieldPath, plainSearchColumns, resolveErrorMessages, resolveSearchEntries, setErrorMessages, setFieldValue, toODataClause, toODataSelector };
29
+ import { TableCheckboxProps, TableDetailProps, TableEmptyProps, TableErrorProps, TableInfoProps, TableLoadingProps, TablePageSizeProps, TablePagingProps, TableSearchEvents, TableSearchProps, TableSortProps, TableSummaryProps, TableThProps, TableThSort } from "./table-types.js";
30
+ export { DEFAULT_ERROR_MESSAGES, type DescribedError, type FieldSegment, type GroupPageInfo, type MonoArraySourceOptions, type MonoCellChange, type MonoCheckConfig, type MonoCheckHandle, type MonoCheckMode, type MonoColumn, type MonoColumnDef, type MonoColumnHandle, type MonoColumnSort, type MonoColumnValue, type MonoDataGridOptions, type MonoDataSourceOptions, type MonoDetailEl, type MonoDetailHandle, type MonoDisplayRow, type MonoDistinctValuesContext, type MonoEditableTrigger, type MonoEmptySuggestionOptions, type MonoErrorMessageKey, type MonoErrorMessages, type MonoExportColumn, type MonoExportFormat, type MonoExportFormatOptions, type MonoExportOptions, type MonoExportResult, type MonoExportStyle, type MonoExportStyles, type MonoFilterSuggestion, type MonoFormConfig, type MonoFormHandle, type MonoFormOp, type MonoGridSource, type MonoGridStore, type MonoGroupMeta, type MonoGroupNode, type MonoImportAmbiguity, type MonoImportChange, type MonoImportColumn, type MonoImportMatch, type MonoImportNumberFormat, type MonoImportOptions, type MonoImportRejection, type MonoImportResult, type MonoImportType, type MonoImportValueType, type MonoOdataOptions, type MonoSearchCustomCtx, type MonoSearchCustomResult, type MonoSearchExpr, type MonoSearchExprCustom, type MonoSearchExprEntry, type MonoSearchTerm, type MonoServerGroupCtx, type MonoServerGroupSource, type MonoSetColumnFilterOptions, type MonoSetSortOptions, type MonoStagedChange, type MonoStorePush, type MonoSuggestionFilter, type MonoSuggestionValueSource, type MonoSummaryConfig, type MonoSummaryFieldSpec, type MonoSummaryHandle, type MonoSummaryRecalculate, type MonoSummaryResult, type MonoSummarySpec, type MonoSummaryType, MonoTableCheckbox, type MonoTableController, MonoTableDetail, MonoTableEmpty, MonoTableError, MonoTableInfo, MonoTableLoading, MonoTablePageSize, MonoTablePaging, MonoTablePagingGroup, MonoTableSearch, MonoTableSort, MonoTableSummary, MonoTableTh, type ODataClause, type ParsedFieldPath, type ResolveSearchOptions, type SortOrder, type TableCheckboxChangeEvent, type TableCheckboxChangeEventDetail, type TableCheckboxEvents, type TableCheckboxProps, type TableCheckboxType, type TableDetailClickEvent, type TableDetailClickEventDetail, type TableDetailEvents, type TableDetailProps, type TableEmptyAdjustEvent, type TableEmptyAdjustEventDetail, type TableEmptyEvents, type TableEmptyProps, type TableEmptyReloadEvent, type TableEmptyReloadEventDetail, type TableErrorCloseEvent, type TableErrorCloseEventDetail, type TableErrorEvents, type TableErrorProps, type TableErrorReloadEvent, type TableErrorReloadEventDetail, type TableInfoProps, type TableLoadingProps, type TablePageSizeProps, type TablePagingProps, type TableSearchEvents, type TableSearchProps, type TableSortProps, type TableSummaryProps, type TableThProps, type TableThSort, buildGroups, collectGroupPaths, monoDataGrid as controlMonoTable, describeError, errorStatus, expandWildcard, flattenLeaves, getFieldValue, isGroupNode, isPath, isWildcardPattern, mergePatch, monoArraySource, monoDataGrid, normalizeError, normalizeSearchExpr, parseFieldPath, plainSearchColumns, resolveErrorMessages, resolveSearchEntries, setErrorMessages, setFieldValue, toODataClause, toODataSelector };
@@ -4,9 +4,10 @@ import { MonoGroupNode, buildGroups, collectGroupPaths, flattenLeaves, isGroupNo
4
4
  import { MonoTableControllerCore } from "./table-controller-core.js";
5
5
  import { MonoTableDetailCore, TableDetailClickEvent, TableDetailClickEventDetail, TableDetailEvents } from "./mono-table-detail-core.js";
6
6
  import { MonoTableCheckboxCore, TableCheckboxChangeEvent, TableCheckboxChangeEventDetail, TableCheckboxEvents, TableCheckboxType } from "./mono-table-checkbox-core.js";
7
- import { MonoTableEmptyCore, TableEmptyEvents, TableEmptyReloadEvent, TableEmptyReloadEventDetail } from "./mono-table-empty-core.js";
8
- import { MonoTableErrorCore, TableErrorCloseEvent, TableErrorCloseEventDetail, TableErrorEvents, TableErrorReloadEvent, TableErrorReloadEventDetail } from "./mono-table-error-core.js";
9
7
  import { MonoSearchCustomCtx, MonoSearchCustomResult, MonoSearchExpr, MonoSearchExprCustom, MonoSearchExprEntry, ResolveSearchOptions, expandWildcard, isWildcardPattern, normalizeSearchExpr, plainSearchColumns, resolveSearchEntries } from "../../search/search-expr.js";
8
+ import { MonoFilterSuggestion, MonoSuggestionFilter, MonoSuggestionValueSource } from "./filter-suggestion.js";
9
+ import { MonoEmptySuggestionOptions, MonoTableEmptyCore, TableEmptyAdjustEvent, TableEmptyAdjustEventDetail, TableEmptyEvents, TableEmptyReloadEvent, TableEmptyReloadEventDetail } from "./mono-table-empty-core.js";
10
+ import { MonoTableErrorCore, TableErrorCloseEvent, TableErrorCloseEventDetail, TableErrorEvents, TableErrorReloadEvent, TableErrorReloadEventDetail } from "./mono-table-error-core.js";
10
11
  import { GroupPageInfo, MonoCellChange, MonoCheckConfig, MonoCheckHandle, MonoCheckMode, MonoColumn, MonoColumnDef, MonoColumnHandle, MonoColumnSort, MonoColumnValue, MonoDataGridOptions, MonoDetailEl, MonoDetailHandle, MonoDisplayRow, MonoEditableTrigger, MonoGridSource, MonoGridStore, MonoGroupMeta, MonoSearchTerm, MonoServerGroupCtx, MonoServerGroupSource, MonoStagedChange, MonoSummaryConfig, MonoSummaryFieldSpec, MonoSummaryHandle, MonoSummaryRecalculate, MonoSummaryResult, MonoSummarySpec, MonoSummaryType, MonoTableController, SortOrder, controlMonoTable as monoDataGrid } from "./mono-data-grid.js";
11
12
  import { MonoArraySourceOptions, monoArraySource } from "./array-source.js";
12
13
  import { MonoTableSearchCore, TableSearchIconName } from "./mono-table-search-core.js";
@@ -18,7 +19,7 @@ import { MonoTableSortCore, TableSortIconName, TableSortSlotName } from "./mono-
18
19
  import { MonoTableThCore, TableThAlign, TableThIconName, TableThSlotName } from "./mono-table-th-core.js";
19
20
  import { MonoTableLoadingCore } from "./mono-table-loading-core.js";
20
21
  import { MonoTableSummaryCore } from "./mono-table-summary-core.js";
21
- import { TableCheckboxProps, TableDetailProps, TableEmptyProps, TableErrorProps, TableInfoProps, TableLoadingProps, TablePageSizeProps, TablePagingProps, TableSearchProps, TableSortProps, TableSummaryProps, TableThProps, TableThSort } from "./table-types.js";
22
+ import { TableCheckboxProps, TableDetailProps, TableEmptyProps, TableErrorProps, TableInfoProps, TableLoadingProps, TablePageSizeProps, TablePagingProps, TableSearchEvents, TableSearchProps, TableSortProps, TableSummaryProps, TableThProps, TableThSort } from "./table-types.js";
22
23
  import { MonoTableSearchShadow } from "./mono-table-search.shadow.js";
23
24
  import { MonoTableSortShadow } from "./mono-table-sort.shadow.js";
24
25
  import { MonoTablePagingShadow } from "./mono-table-paging.shadow.js";
@@ -32,4 +33,4 @@ import { MonoTableLoadingShadow } from "./mono-table-loading.shadow.js";
32
33
  import { MonoTableSummaryShadow } from "./mono-table-summary.shadow.js";
33
34
  import { MonoTableDetailShadow } from "./mono-table-detail.shadow.js";
34
35
  import { MonoTableCheckboxShadow } from "./mono-table-checkbox.shadow.js";
35
- export { DEFAULT_ERROR_MESSAGES, type DescribedError, type GroupPageInfo, type MonoArraySourceOptions, type MonoCellChange, type MonoCheckConfig, type MonoCheckHandle, type MonoCheckMode, type MonoColumn, type MonoColumnDef, type MonoColumnHandle, type MonoColumnSort, type MonoColumnValue, type MonoDataGridOptions, type MonoDetailEl, type MonoDetailHandle, type MonoDisplayRow, type MonoEditableTrigger, type MonoErrorMessageKey, type MonoErrorMessages, type MonoGridSource, type MonoGridStore, type MonoGroupMeta, type MonoGroupNode, type MonoSearchCustomCtx, type MonoSearchCustomResult, type MonoSearchExpr, type MonoSearchExprCustom, type MonoSearchExprEntry, type MonoSearchTerm, type MonoServerGroupCtx, type MonoServerGroupSource, type MonoStagedChange, type MonoSummaryConfig, type MonoSummaryFieldSpec, type MonoSummaryHandle, type MonoSummaryRecalculate, type MonoSummaryResult, type MonoSummarySpec, type MonoSummaryType, MonoTableCheckboxCore, MonoTableCheckboxShadow, type MonoTableController, MonoTableControllerCore, MonoTableDetailCore, MonoTableDetailShadow, MonoTableEmptyCore, MonoTableEmptyShadow, MonoTableErrorCore, MonoTableErrorShadow, MonoTableInfoCore, MonoTableInfoShadow, MonoTableLoadingCore, MonoTableLoadingShadow, MonoTablePageSizeCore, MonoTablePageSizeShadow, MonoTablePagingCore, MonoTablePagingGroupCore, MonoTablePagingGroupShadow, MonoTablePagingShadow, MonoTableSearchCore, MonoTableSearchShadow, MonoTableSortCore, MonoTableSortShadow, MonoTableSummaryCore, MonoTableSummaryShadow, MonoTableThCore, MonoTableThShadow, type ResolveSearchOptions, type SortOrder, type TableCheckboxChangeEvent, type TableCheckboxChangeEventDetail, type TableCheckboxEvents, type TableCheckboxProps, type TableCheckboxType, type TableDetailClickEvent, type TableDetailClickEventDetail, type TableDetailEvents, type TableDetailProps, type TableEmptyEvents, type TableEmptyProps, type TableEmptyReloadEvent, type TableEmptyReloadEventDetail, type TableErrorCloseEvent, type TableErrorCloseEventDetail, type TableErrorEvents, type TableErrorProps, type TableErrorReloadEvent, type TableErrorReloadEventDetail, type TableInfoProps, type TableLoadingProps, type TablePageSizeProps, type TablePagingProps, type TableSearchIconName, type TableSearchProps, type TableSortIconName, type TableSortProps, type TableSortSlotName, type TableSummaryProps, type TableThAlign, type TableThIconName, type TableThProps, type TableThSlotName, type TableThSort, buildGroups, collectGroupPaths, describeError, errorStatus, expandWildcard, flattenLeaves, isGroupNode, isWildcardPattern, monoArraySource, monoDataGrid, normalizeError, normalizeSearchExpr, plainSearchColumns, resolveErrorMessages, resolveSearchEntries, setErrorMessages };
36
+ export { DEFAULT_ERROR_MESSAGES, type DescribedError, type GroupPageInfo, type MonoArraySourceOptions, type MonoCellChange, type MonoCheckConfig, type MonoCheckHandle, type MonoCheckMode, type MonoColumn, type MonoColumnDef, type MonoColumnHandle, type MonoColumnSort, type MonoColumnValue, type MonoDataGridOptions, type MonoDetailEl, type MonoDetailHandle, type MonoDisplayRow, type MonoEditableTrigger, type MonoEmptySuggestionOptions, type MonoErrorMessageKey, type MonoErrorMessages, type MonoFilterSuggestion, type MonoGridSource, type MonoGridStore, type MonoGroupMeta, type MonoGroupNode, type MonoSearchCustomCtx, type MonoSearchCustomResult, type MonoSearchExpr, type MonoSearchExprCustom, type MonoSearchExprEntry, type MonoSearchTerm, type MonoServerGroupCtx, type MonoServerGroupSource, type MonoStagedChange, type MonoSuggestionFilter, type MonoSuggestionValueSource, type MonoSummaryConfig, type MonoSummaryFieldSpec, type MonoSummaryHandle, type MonoSummaryRecalculate, type MonoSummaryResult, type MonoSummarySpec, type MonoSummaryType, MonoTableCheckboxCore, MonoTableCheckboxShadow, type MonoTableController, MonoTableControllerCore, MonoTableDetailCore, MonoTableDetailShadow, MonoTableEmptyCore, MonoTableEmptyShadow, MonoTableErrorCore, MonoTableErrorShadow, MonoTableInfoCore, MonoTableInfoShadow, MonoTableLoadingCore, MonoTableLoadingShadow, MonoTablePageSizeCore, MonoTablePageSizeShadow, MonoTablePagingCore, MonoTablePagingGroupCore, MonoTablePagingGroupShadow, MonoTablePagingShadow, MonoTableSearchCore, MonoTableSearchShadow, MonoTableSortCore, MonoTableSortShadow, MonoTableSummaryCore, MonoTableSummaryShadow, MonoTableThCore, MonoTableThShadow, type ResolveSearchOptions, type SortOrder, type TableCheckboxChangeEvent, type TableCheckboxChangeEventDetail, type TableCheckboxEvents, type TableCheckboxProps, type TableCheckboxType, type TableDetailClickEvent, type TableDetailClickEventDetail, type TableDetailEvents, type TableDetailProps, type TableEmptyAdjustEvent, type TableEmptyAdjustEventDetail, type TableEmptyEvents, type TableEmptyProps, type TableEmptyReloadEvent, type TableEmptyReloadEventDetail, type TableErrorCloseEvent, type TableErrorCloseEventDetail, type TableErrorEvents, type TableErrorProps, type TableErrorReloadEvent, type TableErrorReloadEventDetail, type TableInfoProps, type TableLoadingProps, type TablePageSizeProps, type TablePagingProps, type TableSearchEvents, type TableSearchIconName, type TableSearchProps, type TableSortIconName, type TableSortProps, type TableSortSlotName, type TableSummaryProps, type TableThAlign, type TableThIconName, type TableThProps, type TableThSlotName, type TableThSort, buildGroups, collectGroupPaths, describeError, errorStatus, expandWildcard, flattenLeaves, isGroupNode, isWildcardPattern, monoArraySource, monoDataGrid, normalizeError, normalizeSearchExpr, plainSearchColumns, resolveErrorMessages, resolveSearchEntries, setErrorMessages };
@@ -7,12 +7,13 @@ import { MonoExportOptions, MonoExportResult } from "../../export/types.js";
7
7
  import { MonoImportOptions, MonoImportResult } from "../../import/types.js";
8
8
  import { TableDetailEvents } from "./mono-table-detail-core.js";
9
9
  import { TableCheckboxEvents } from "./mono-table-checkbox-core.js";
10
- import { TableEmptyEvents } from "./mono-table-empty-core.js";
11
- import { TableErrorEvents } from "./mono-table-error-core.js";
12
10
  import { MaybeReactive } from "../../composables/reactive.js";
13
- import { MonoDataSourceOptions, MonoOdataOptions, MonoSourceSortEntry } from "../../utils/data-source-options.js";
14
11
  import { MonoSearchExprEntry } from "../../search/search-expr.js";
15
12
  import { MonoSearchFieldsAliases, MonoSearchValue } from "../../search/data-search.js";
13
+ import { MonoFilterSuggestion } from "./filter-suggestion.js";
14
+ import { TableEmptyEvents } from "./mono-table-empty-core.js";
15
+ import { TableErrorEvents } from "./mono-table-error-core.js";
16
+ import { MonoDataSourceOptions, MonoOdataOptions, MonoSourceSortEntry } from "../../utils/data-source-options.js";
16
17
  import { MonoFilterBuilderOptions, MonoFilterController } from "../filter/filter-types.js";
17
18
  //#region src/components/table/mono-data-grid.d.ts
18
19
  /**
@@ -1423,6 +1424,24 @@ export interface MonoTableController<T = any> {
1423
1424
  searchExpr(): MonoSearchExprEntry[] | undefined;
1424
1425
  /** The live search terms (empty when unsearched). */
1425
1426
  searchTerms: MonoSearchTerm[];
1427
+ /**
1428
+ * "N rows match this search under a different filter value" — published by
1429
+ * `<mono-table-search :suggestion-filter>` after a search came back empty, and
1430
+ * rendered by `<mono-table-empty>` as an **Adjust Filter** offer. `null` when
1431
+ * there is nothing to suggest. Cleared by every new search.
1432
+ */
1433
+ filterSuggestion: MonoFilterSuggestion | null;
1434
+ /**
1435
+ * EVERY offer the probe found, largest count first — `filterSuggestion` is `[0]`.
1436
+ * `<mono-table-empty>` lists them in the dropdown beside Adjust Filter. Empty when
1437
+ * there is nothing to suggest.
1438
+ */
1439
+ filterSuggestions: MonoFilterSuggestion[];
1440
+ /**
1441
+ * Publish the offers (a list, largest first, or a single one) — or clear them with
1442
+ * `null` / `[]`. Notifies on change only.
1443
+ */
1444
+ setFilterSuggestion(next: MonoFilterSuggestion | MonoFilterSuggestion[] | null): void;
1426
1445
  /**
1427
1446
  * An explicit filter of the grid's own — what the slotted filter builder
1428
1447
  * writes. One LAYER of the query, not the whole of it: it is AND-ed with the
@@ -1,5 +1,7 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { MonoTableControllerCoreInterface } from "./table-controller-core.js";
3
+ import { MonoFormController } from "../form/form-types.js";
4
+ import { MonoFilterSuggestion } from "./filter-suggestion.js";
3
5
  import { MonoTableController } from "./mono-data-grid.js";
4
6
  import { LitElement, TemplateResult, nothing } from "lit";
5
7
  //#region src/components/table/mono-table-empty-core.d.ts
@@ -8,11 +10,39 @@ export interface TableEmptyReloadEventDetail {
8
10
  grid: MonoTableController;
9
11
  }
10
12
  export type TableEmptyReloadEvent = CustomEvent<TableEmptyReloadEventDetail>;
13
+ /**
14
+ * `detail` of the `adjust` event — the **Adjust Filter** button was pressed and
15
+ * `values` have ALREADY been written into the form. The event is cancelable:
16
+ * its default action is `grid.refresh()`; call `preventDefault()` to run your own
17
+ * query instead (a page that builds its `$filter` by hand from the form).
18
+ */
19
+ export interface TableEmptyAdjustEventDetail extends MonoFilterSuggestion {
20
+ form: MonoFormController;
21
+ grid: MonoTableController;
22
+ }
23
+ export type TableEmptyAdjustEvent = CustomEvent<TableEmptyAdjustEventDetail>;
11
24
  /** Events emitted by `<mono-table-empty>` (feeds the generated Vue types). */
12
25
  export interface TableEmptyEvents {
13
26
  reload: TableEmptyReloadEvent;
27
+ adjust: TableEmptyAdjustEvent;
14
28
  'mno-reload': TableEmptyReloadEvent;
15
29
  mnoReload: TableEmptyReloadEvent;
30
+ 'mno-adjust': TableEmptyAdjustEvent;
31
+ mnoAdjust: TableEmptyAdjustEvent;
32
+ }
33
+ /** `<mono-table-empty :suggestion-filter.prop="…">` — how a filter suggestion is presented. */
34
+ export interface MonoEmptySuggestionOptions {
35
+ /**
36
+ * The line that REPLACES the subtitle while a suggestion is shown. A function
37
+ * receives the row count and the whole suggestion; a string substitutes
38
+ * `{count}`, `{value}`, `{label}`, `{key}` and `{field}`.
39
+ */
40
+ message?: string | ((count: number, suggestion: MonoFilterSuggestion) => string);
41
+ /**
42
+ * Each row of the dropdown beside Adjust Filter (shown when there is more than one
43
+ * offer). Same forms as {@link message}. Default `'Adjust {label} to "{value}"'`.
44
+ */
45
+ option?: string | ((count: number, suggestion: MonoFilterSuggestion) => string);
16
46
  }
17
47
  /** Public surface added by the empty-state core mixin. */
18
48
  export declare class MonoTableEmptyCoreInterface extends MonoTableControllerCoreInterface {
@@ -21,6 +51,13 @@ export declare class MonoTableEmptyCoreInterface extends MonoTableControllerCore
21
51
  subtitle: string;
22
52
  reload: boolean;
23
53
  reloadLabel: string;
54
+ /** The filter form an **Adjust Filter** writes into. */
55
+ dataForm?: MonoFormController;
56
+ /** Alias of {@link dataForm}. */
57
+ controlForm?: MonoFormController;
58
+ /** Presentation of the filter suggestion — `{ message }`. */
59
+ suggestionFilter?: MonoEmptySuggestionOptions | null;
60
+ adjustLabel: string;
24
61
  height?: string;
25
62
  minHeight?: string;
26
63
  maxHeight?: string;
@@ -1,8 +1,10 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue } from "../../composables/css-size.js";
3
3
  import { MonoTableControllerCoreInterface } from "./table-controller-core.js";
4
- import { MonoSearchValue } from "../../search/data-search.js";
5
4
  import { InputColor, InputCssClass, InputSize, InputValidationState, InputVariant } from "../input/input-types.js";
5
+ import { MonoSearchValue } from "../../search/data-search.js";
6
+ import { MonoFormController } from "../form/form-types.js";
7
+ import { MonoSuggestionFilter } from "./filter-suggestion.js";
6
8
  import { LitElement, TemplateResult } from "lit";
7
9
  //#region src/components/table/mono-table-search-core.d.ts
8
10
  /** Per-build icon hooks the search core delegates to. */
@@ -13,6 +15,14 @@ export declare class MonoTableSearchCoreInterface extends MonoTableControllerCor
13
15
  searchValue: MonoSearchValue;
14
16
  /** Alias of {@link searchValue}, under the grid option's older name. */
15
17
  searchExpr: MonoSearchValue;
18
+ /** Passing it (even `''`) switches the box to MANUAL mode — see the class docs. */
19
+ modelValue?: string | null;
20
+ /** The filter form (`controlMonoForm`) a {@link suggestionFilter} reads and relaxes. */
21
+ dataForm?: MonoFormController;
22
+ /** Alias of {@link dataForm}. */
23
+ controlForm?: MonoFormController;
24
+ /** Map row fields onto form keys to offer "N rows under a different filter". */
25
+ suggestionFilter?: MonoSuggestionFilter | null;
16
26
  placeholder: string;
17
27
  disabled: boolean;
18
28
  debounce: number;
@@ -66,8 +76,17 @@ export declare class MonoTableSearchCoreInterface extends MonoTableControllerCor
66
76
  *
67
77
  * Deliberately NOT taken from `InputProps`: `type` (pinned to `search`),
68
78
  * `required` / `pattern` / `min` / `max` / `step` (form-submit constraints with no
69
- * meaning for a filter), and `value` / `modelValue` — the debounce below plus the
70
- * controller own the search term.
79
+ * meaning for a filter), and `value`.
80
+ *
81
+ * **Two modes, picked by `modelValue`:**
82
+ * - *grid* (no `model-value`) — the debounce below plus the controller own the
83
+ * search term, exactly as before;
84
+ * - *manual* (`model-value` passed, even `''`) — a controlled field: it emits
85
+ * `mono-input`'s `input` / `change` / `clear` (same detail shape) immediately and
86
+ * NEVER touches the grid's search (`search-value`, `suggestion` and
87
+ * `multi-context` go inert). The consumer runs the search itself.
88
+ *
89
+ * `input` / `change` / `clear` fire in grid mode too, so a listener works either way.
71
90
  *
72
91
  * The magnifier and clear glyphs are delegated to `renderIcon()` (light: UnoCSS
73
92
  * `.mono-icon i-mdi-*`; shadow: inline SVG) so the chrome is otherwise identical.