@operato/data-grist 10.29.73 → 10.29.76

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 (165) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/src/data-card/record-card.js +1 -1
  3. package/dist/src/data-card/record-card.js.map +1 -1
  4. package/dist/src/data-grid/data-grid-field.js +18 -0
  5. package/dist/src/data-grid/data-grid-field.js.map +1 -1
  6. package/dist/src/data-list/data-list-field.js +4 -1
  7. package/dist/src/data-list/data-list-field.js.map +1 -1
  8. package/dist/src/data-list/record-partial.js +15 -1
  9. package/dist/src/data-list/record-partial.js.map +1 -1
  10. package/dist/src/filters/filter-checkbox.js +1 -1
  11. package/dist/src/filters/filter-checkbox.js.map +1 -1
  12. package/dist/src/filters/filter-input-barcode.js +1 -1
  13. package/dist/src/filters/filter-input-barcode.js.map +1 -1
  14. package/dist/src/filters/filter-input.js +1 -1
  15. package/dist/src/filters/filter-input.js.map +1 -1
  16. package/dist/src/filters/filter-range-date.js +1 -1
  17. package/dist/src/filters/filter-range-date.js.map +1 -1
  18. package/dist/src/filters/filter-range-number.js +1 -1
  19. package/dist/src/filters/filter-range-number.js.map +1 -1
  20. package/dist/src/filters/filter-select-buttons.js +1 -1
  21. package/dist/src/filters/filter-select-buttons.js.map +1 -1
  22. package/dist/src/gutters/gutter-button.js +6 -1
  23. package/dist/src/gutters/gutter-button.js.map +1 -1
  24. package/dist/src/types.d.ts +1 -1
  25. package/dist/src/types.js.map +1 -1
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +9 -9
  28. package/test/cell-button-row-height.test.ts +63 -0
  29. package/test/group-heading.test.ts +23 -0
  30. package/test/office-density.test.ts +57 -0
  31. package/dist/test/accessible-name.test.d.ts +0 -2
  32. package/dist/test/accessible-name.test.js +0 -324
  33. package/dist/test/accessible-name.test.js.map +0 -1
  34. package/dist/test/accumulator-labels.test.d.ts +0 -1
  35. package/dist/test/accumulator-labels.test.js +0 -32
  36. package/dist/test/accumulator-labels.test.js.map +0 -1
  37. package/dist/test/address-intents.test.d.ts +0 -1
  38. package/dist/test/address-intents.test.js +0 -201
  39. package/dist/test/address-intents.test.js.map +0 -1
  40. package/dist/test/card-selector.test.d.ts +0 -1
  41. package/dist/test/card-selector.test.js +0 -58
  42. package/dist/test/card-selector.test.js.map +0 -1
  43. package/dist/test/card-thumb.test.d.ts +0 -1
  44. package/dist/test/card-thumb.test.js +0 -44
  45. package/dist/test/card-thumb.test.js.map +0 -1
  46. package/dist/test/card-totals-narrow.test.d.ts +0 -1
  47. package/dist/test/card-totals-narrow.test.js +0 -103
  48. package/dist/test/card-totals-narrow.test.js.map +0 -1
  49. package/dist/test/column-resize.test.d.ts +0 -1
  50. package/dist/test/column-resize.test.js +0 -153
  51. package/dist/test/column-resize.test.js.map +0 -1
  52. package/dist/test/control-heights.test.d.ts +0 -1
  53. package/dist/test/control-heights.test.js +0 -25
  54. package/dist/test/control-heights.test.js.map +0 -1
  55. package/dist/test/count-handler.test.d.ts +0 -1
  56. package/dist/test/count-handler.test.js +0 -56
  57. package/dist/test/count-handler.test.js.map +0 -1
  58. package/dist/test/create-paste-policy.test.d.ts +0 -1
  59. package/dist/test/create-paste-policy.test.js +0 -159
  60. package/dist/test/create-paste-policy.test.js.map +0 -1
  61. package/dist/test/data-integrity.test.d.ts +0 -1
  62. package/dist/test/data-integrity.test.js +0 -145
  63. package/dist/test/data-integrity.test.js.map +0 -1
  64. package/dist/test/destructive-actions.test.d.ts +0 -11
  65. package/dist/test/destructive-actions.test.js +0 -147
  66. package/dist/test/destructive-actions.test.js.map +0 -1
  67. package/dist/test/edit-lifecycle.test.d.ts +0 -2
  68. package/dist/test/edit-lifecycle.test.js +0 -270
  69. package/dist/test/edit-lifecycle.test.js.map +0 -1
  70. package/dist/test/edit-rebase.test.d.ts +0 -1
  71. package/dist/test/edit-rebase.test.js +0 -185
  72. package/dist/test/edit-rebase.test.js.map +0 -1
  73. package/dist/test/editor-commit.test.d.ts +0 -2
  74. package/dist/test/editor-commit.test.js +0 -68
  75. package/dist/test/editor-commit.test.js.map +0 -1
  76. package/dist/test/fetch-failure-state.test.d.ts +0 -1
  77. package/dist/test/fetch-failure-state.test.js +0 -129
  78. package/dist/test/fetch-failure-state.test.js.map +0 -1
  79. package/dist/test/field-contains-content.test.d.ts +0 -1
  80. package/dist/test/field-contains-content.test.js +0 -101
  81. package/dist/test/field-contains-content.test.js.map +0 -1
  82. package/dist/test/field-hint.test.d.ts +0 -2
  83. package/dist/test/field-hint.test.js +0 -54
  84. package/dist/test/field-hint.test.js.map +0 -1
  85. package/dist/test/filter-labels.test.d.ts +0 -2
  86. package/dist/test/filter-labels.test.js +0 -140
  87. package/dist/test/filter-labels.test.js.map +0 -1
  88. package/dist/test/filter-ownership.test.d.ts +0 -1
  89. package/dist/test/filter-ownership.test.js +0 -83
  90. package/dist/test/filter-ownership.test.js.map +0 -1
  91. package/dist/test/filter-select-buttons-count.test.d.ts +0 -1
  92. package/dist/test/filter-select-buttons-count.test.js +0 -35
  93. package/dist/test/filter-select-buttons-count.test.js.map +0 -1
  94. package/dist/test/filter-typing.test.d.ts +0 -2
  95. package/dist/test/filter-typing.test.js +0 -66
  96. package/dist/test/filter-typing.test.js.map +0 -1
  97. package/dist/test/filters-phone-wrap.test.d.ts +0 -1
  98. package/dist/test/filters-phone-wrap.test.js +0 -17
  99. package/dist/test/filters-phone-wrap.test.js.map +0 -1
  100. package/dist/test/first-click-stays.test.d.ts +0 -1
  101. package/dist/test/first-click-stays.test.js +0 -77
  102. package/dist/test/first-click-stays.test.js.map +0 -1
  103. package/dist/test/fixed-column-opaque.test.d.ts +0 -1
  104. package/dist/test/fixed-column-opaque.test.js +0 -134
  105. package/dist/test/fixed-column-opaque.test.js.map +0 -1
  106. package/dist/test/flexible-columns.test.d.ts +0 -1
  107. package/dist/test/flexible-columns.test.js +0 -134
  108. package/dist/test/flexible-columns.test.js.map +0 -1
  109. package/dist/test/grid-single-scroller.test.d.ts +0 -1
  110. package/dist/test/grid-single-scroller.test.js +0 -107
  111. package/dist/test/grid-single-scroller.test.js.map +0 -1
  112. package/dist/test/group-heading.test.d.ts +0 -1
  113. package/dist/test/group-heading.test.js +0 -187
  114. package/dist/test/group-heading.test.js.map +0 -1
  115. package/dist/test/latest-fetch-wins.test.d.ts +0 -1
  116. package/dist/test/latest-fetch-wins.test.js +0 -91
  117. package/dist/test/latest-fetch-wins.test.js.map +0 -1
  118. package/dist/test/list-defaults.test.d.ts +0 -2
  119. package/dist/test/list-defaults.test.js +0 -145
  120. package/dist/test/list-defaults.test.js.map +0 -1
  121. package/dist/test/list-records.test.d.ts +0 -1
  122. package/dist/test/list-records.test.js +0 -46
  123. package/dist/test/list-records.test.js.map +0 -1
  124. package/dist/test/page-errors.d.ts +0 -1
  125. package/dist/test/page-errors.js +0 -44
  126. package/dist/test/page-errors.js.map +0 -1
  127. package/dist/test/paste-integrity.test.d.ts +0 -1
  128. package/dist/test/paste-integrity.test.js +0 -163
  129. package/dist/test/paste-integrity.test.js.map +0 -1
  130. package/dist/test/record-card-height.test.d.ts +0 -1
  131. package/dist/test/record-card-height.test.js +0 -15
  132. package/dist/test/record-card-height.test.js.map +0 -1
  133. package/dist/test/record-view-popup-editor.test.d.ts +0 -1
  134. package/dist/test/record-view-popup-editor.test.js +0 -71
  135. package/dist/test/record-view-popup-editor.test.js.map +0 -1
  136. package/dist/test/renderer-date-calendar-day.test.d.ts +0 -1
  137. package/dist/test/renderer-date-calendar-day.test.js +0 -48
  138. package/dist/test/renderer-date-calendar-day.test.js.map +0 -1
  139. package/dist/test/request-generation.test.d.ts +0 -1
  140. package/dist/test/request-generation.test.js +0 -153
  141. package/dist/test/request-generation.test.js.map +0 -1
  142. package/dist/test/resubmit.test.d.ts +0 -1
  143. package/dist/test/resubmit.test.js +0 -83
  144. package/dist/test/resubmit.test.js.map +0 -1
  145. package/dist/test/row-hover-visible.test.d.ts +0 -1
  146. package/dist/test/row-hover-visible.test.js +0 -139
  147. package/dist/test/row-hover-visible.test.js.map +0 -1
  148. package/dist/test/search-term.test.d.ts +0 -1
  149. package/dist/test/search-term.test.js +0 -108
  150. package/dist/test/search-term.test.js.map +0 -1
  151. package/dist/test/searchable-select.test.d.ts +0 -1
  152. package/dist/test/searchable-select.test.js +0 -65
  153. package/dist/test/searchable-select.test.js.map +0 -1
  154. package/dist/test/select-empty-value.test.d.ts +0 -1
  155. package/dist/test/select-empty-value.test.js +0 -61
  156. package/dist/test/select-empty-value.test.js.map +0 -1
  157. package/dist/test/shift-range-select.test.d.ts +0 -1
  158. package/dist/test/shift-range-select.test.js +0 -100
  159. package/dist/test/shift-range-select.test.js.map +0 -1
  160. package/dist/test/sparkline-renderer.test.d.ts +0 -1
  161. package/dist/test/sparkline-renderer.test.js +0 -36
  162. package/dist/test/sparkline-renderer.test.js.map +0 -1
  163. package/dist/test/wheel-one-scroller.test.d.ts +0 -2
  164. package/dist/test/wheel-one-scroller.test.js +0 -275
  165. package/dist/test/wheel-one-scroller.test.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import '@operato/input/ox-checkbox.js';
2
- import { html } from 'lit-html';
2
+ import { html } from 'lit';
3
3
  export const FilterCheckbox = (column, value, owner) => {
4
4
  const { name, header, label, filter } = column;
5
5
  const { label: filterLabel, operator } = filter;
@@ -1 +1 @@
1
- {"version":3,"file":"filter-checkbox.js","sourceRoot":"","sources":["../../../src/filters/filter-checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,cAAc,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAC3E,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAE9C,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,MAA6B,CAAA;IAEtE,MAAM,SAAS,GACb,WAAW,KAAK,SAAS;QACvB,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ;YAC3C,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;YACxB,CAAC,CAAE,MAA4B,CAAC,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;IAE7E,6CAA6C;IAC7C,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACtB,KAAK,GAAG,KAAK,CAAA;IACf,CAAC;SAAM,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QAC5B,KAAK,GAAG,IAAI,CAAA;IACd,CAAC;IAED,OAAO,IAAI,CAAA;;aAEA,MAAM,CAAC,IAAI;iBACP,KAAK;;uBAEC,KAAK,KAAK,SAAS;;gBAE1B,CAAC,CAAc,EAAE,EAAE;QAC3B,CAAC;QAAC,CAAC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI;gBACJ,QAAQ;gBACR,KAAK,EAAG,CAAC,CAAC,MAAqD,CAAC,OAAO;aACxE;SACF,CAAC,CACH,CAAA;IACH,CAAC;mCAC4B,SAAS;;GAEzC,CAAA;AACH,CAAC,CAAA","sourcesContent":["import '@operato/input/ox-checkbox.js'\n\nimport { html } from 'lit-html'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\n\nexport const FilterCheckbox: FilterSelectRenderer = (column, value, owner) => {\n const { name, header, label, filter } = column\n\n const { label: filterLabel, operator } = filter! as FilterConfigObject\n\n const labelText =\n filterLabel !== undefined\n ? filterLabel\n : typeof label === 'object' && label.renderer\n ? label.renderer(column)\n : (header as { text?: string }).text || header.renderer(column) || name\n\n // 텍스트 형태로 받았을시 의도가 boolean이면 boolean 타입으로 변환\n if (value === 'false') {\n value = false\n } else if (value === 'true') {\n value = true\n }\n\n return html`\n <ox-checkbox\n name=${column.name}\n .checked=${value}\n indeterminatable\n .indeterminate=${value === undefined}\n left-label\n @change=${(e: CustomEvent) => {\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name,\n operator,\n value: (e.target as Element & { checked: boolean | undefined }).checked\n }\n })\n )\n }}\n ><label filter-title><span>${labelText}</span></label></ox-checkbox\n >\n `\n}\n"]}
1
+ {"version":3,"file":"filter-checkbox.js","sourceRoot":"","sources":["../../../src/filters/filter-checkbox.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAI1B,MAAM,CAAC,MAAM,cAAc,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAC3E,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IAE9C,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,GAAG,MAA6B,CAAA;IAEtE,MAAM,SAAS,GACb,WAAW,KAAK,SAAS;QACvB,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ;YAC3C,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;YACxB,CAAC,CAAE,MAA4B,CAAC,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;IAE7E,6CAA6C;IAC7C,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACtB,KAAK,GAAG,KAAK,CAAA;IACf,CAAC;SAAM,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QAC5B,KAAK,GAAG,IAAI,CAAA;IACd,CAAC;IAED,OAAO,IAAI,CAAA;;aAEA,MAAM,CAAC,IAAI;iBACP,KAAK;;uBAEC,KAAK,KAAK,SAAS;;gBAE1B,CAAC,CAAc,EAAE,EAAE;QAC3B,CAAC;QAAC,CAAC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI;gBACJ,QAAQ;gBACR,KAAK,EAAG,CAAC,CAAC,MAAqD,CAAC,OAAO;aACxE;SACF,CAAC,CACH,CAAA;IACH,CAAC;mCAC4B,SAAS;;GAEzC,CAAA;AACH,CAAC,CAAA","sourcesContent":["import '@operato/input/ox-checkbox.js'\n\nimport { html } from 'lit'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\n\nexport const FilterCheckbox: FilterSelectRenderer = (column, value, owner) => {\n const { name, header, label, filter } = column\n\n const { label: filterLabel, operator } = filter! as FilterConfigObject\n\n const labelText =\n filterLabel !== undefined\n ? filterLabel\n : typeof label === 'object' && label.renderer\n ? label.renderer(column)\n : (header as { text?: string }).text || header.renderer(column) || name\n\n // 텍스트 형태로 받았을시 의도가 boolean이면 boolean 타입으로 변환\n if (value === 'false') {\n value = false\n } else if (value === 'true') {\n value = true\n }\n\n return html`\n <ox-checkbox\n name=${column.name}\n .checked=${value}\n indeterminatable\n .indeterminate=${value === undefined}\n left-label\n @change=${(e: CustomEvent) => {\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name,\n operator,\n value: (e.target as Element & { checked: boolean | undefined }).checked\n }\n })\n )\n }}\n ><label filter-title><span>${labelText}</span></label></ox-checkbox\n >\n `\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import '@operato/input/ox-input-barcode.js';
2
- import { html } from 'lit-html';
2
+ import { html } from 'lit';
3
3
  export const FilterInputBarcode = (column, value, owner) => {
4
4
  const filter = column.filter;
5
5
  const { englishOnly, selectAfterChange } = filter.options || {};
@@ -1 +1 @@
1
- {"version":3,"file":"filter-input-barcode.js","sourceRoot":"","sources":["../../../src/filters/filter-input-barcode.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,kBAAkB,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAC/E,MAAM,MAAM,GAAG,MAAM,CAAC,MAA4B,CAAA;IAClD,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;IAE/D,OAAO,IAAI,CAAA;;aAEA,MAAM,CAAC,IAAI;sBACF,WAAW;6BACJ,iBAAiB;eAC/B,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK;gBACzB,CAAC,CAAc,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC1C,KAAK,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB;SACF,CAAC,CACH,CAAA;IACH,CAAC;;;GAGJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import '@operato/input/ox-input-barcode.js'\n\nimport { html } from 'lit-html'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\n\nexport const FilterInputBarcode: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n const { englishOnly, selectAfterChange } = filter.options || {}\n\n return html`\n <ox-input-barcode\n name=${column.name}\n ?english-only=${englishOnly}\n ?select-after-change=${selectAfterChange}\n .value=${value == null ? '' : value}\n @change=${(e: CustomEvent) => {\n const input = e.target as HTMLInputElement\n input.dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: input.value\n }\n })\n )\n }}\n filter-input\n ></ox-input-barcode>\n `\n}\n"]}
1
+ {"version":3,"file":"filter-input-barcode.js","sourceRoot":"","sources":["../../../src/filters/filter-input-barcode.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAI1B,MAAM,CAAC,MAAM,kBAAkB,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAC/E,MAAM,MAAM,GAAG,MAAM,CAAC,MAA4B,CAAA;IAClD,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;IAE/D,OAAO,IAAI,CAAA;;aAEA,MAAM,CAAC,IAAI;sBACF,WAAW;6BACJ,iBAAiB;eAC/B,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK;gBACzB,CAAC,CAAc,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC1C,KAAK,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB;SACF,CAAC,CACH,CAAA;IACH,CAAC;;;GAGJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import '@operato/input/ox-input-barcode.js'\n\nimport { html } from 'lit'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\n\nexport const FilterInputBarcode: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n const { englishOnly, selectAfterChange } = filter.options || {}\n\n return html`\n <ox-input-barcode\n name=${column.name}\n ?english-only=${englishOnly}\n ?select-after-change=${selectAfterChange}\n .value=${value == null ? '' : value}\n @change=${(e: CustomEvent) => {\n const input = e.target as HTMLInputElement\n input.dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: input.value\n }\n })\n )\n }}\n filter-input\n ></ox-input-barcode>\n `\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { html } from 'lit-html';
1
+ import { html } from 'lit';
2
2
  import { i18next } from '@operato/i18n';
3
3
  import { columnText } from '../utils/column-text.js';
4
4
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"filter-input.js","sourceRoot":"","sources":["../../../src/filters/filter-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IACxE,MAAM,MAAM,GAAG,MAAM,CAAC,MAA4B,CAAA;IAClD,MAAM,IAAI,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,KAAI,MAAM,CAAC,IAAI,CAAA;IAExC,OAAO,IAAI,CAAA;;aAEA,IAAW;aACX,MAAM,CAAC,IAAI;mBACL,OAAO,CAAC,CAAC,CAAC,qBAAqB,EAAE;QAC5C,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;QACxB,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC;KACjC,CAAC;eACO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK;gBACzB,CAAC,CAAc,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC1C,KAAK,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { html } from 'lit-html'\n\nimport { i18next } from '@operato/i18n'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\nimport { columnText } from '../utils/column-text.js'\n\n/*\n * Name the filter inputs in the header row.\n *\n * These boxes sit directly under the column name, so which column they narrow is obvious from\n * position alone — to a sighted reader. That relationship is a picture and reaches no one else: a\n * screen reader finds as many unnamed inputs as there are columns.\n *\n * The name comes from columnText(). Spelling it out here instead would leave the old name behind\n * whenever `header` changes.\n */\n\nexport const FilterInput: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n const type = filter?.type || column.type\n\n return html`\n <input\n type=${type as any}\n name=${column.name}\n aria-label=${i18next.t('text.grid-filter-of', {\n name: columnText(column),\n defaultValue: columnText(column)\n })}\n .value=${value == null ? '' : value}\n @change=${(e: CustomEvent) => {\n const input = e.target as HTMLInputElement\n input.dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: input.value\n }\n })\n )\n }}\n />\n `\n}\n"]}
1
+ {"version":3,"file":"filter-input.js","sourceRoot":"","sources":["../../../src/filters/filter-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IACxE,MAAM,MAAM,GAAG,MAAM,CAAC,MAA4B,CAAA;IAClD,MAAM,IAAI,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,KAAI,MAAM,CAAC,IAAI,CAAA;IAExC,OAAO,IAAI,CAAA;;aAEA,IAAW;aACX,MAAM,CAAC,IAAI;mBACL,OAAO,CAAC,CAAC,CAAC,qBAAqB,EAAE;QAC5C,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;QACxB,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC;KACjC,CAAC;eACO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK;gBACzB,CAAC,CAAc,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC1C,KAAK,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { html } from 'lit'\n\nimport { i18next } from '@operato/i18n'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\nimport { columnText } from '../utils/column-text.js'\n\n/*\n * Name the filter inputs in the header row.\n *\n * These boxes sit directly under the column name, so which column they narrow is obvious from\n * position alone — to a sighted reader. That relationship is a picture and reaches no one else: a\n * screen reader finds as many unnamed inputs as there are columns.\n *\n * The name comes from columnText(). Spelling it out here instead would leave the old name behind\n * whenever `header` changes.\n */\n\nexport const FilterInput: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n const type = filter?.type || column.type\n\n return html`\n <input\n type=${type as any}\n name=${column.name}\n aria-label=${i18next.t('text.grid-filter-of', {\n name: columnText(column),\n defaultValue: columnText(column)\n })}\n .value=${value == null ? '' : value}\n @change=${(e: CustomEvent) => {\n const input = e.target as HTMLInputElement\n input.dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: input.value\n }\n })\n )\n }}\n />\n `\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { html } from 'lit-html';
1
+ import { html } from 'lit';
2
2
  import { i18next } from '@operato/i18n';
3
3
  import { columnText } from '../utils/column-text.js';
4
4
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"filter-range-date.js","sourceRoot":"","sources":["../../../src/filters/filter-range-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD;;;;GAIG;AAEH,SAAS,UAAU,CAAC,IAAY,EAAE,IAAU;IAC1C,IAAI,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IAC7B,IAAI,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IACnD,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1C,IAAI,KAAK,GAAG,CAAC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CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAE,KAA0B,CAAC,KAAK,CAAC;aAClD;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { html } from 'lit-html'\n\nimport { i18next } from '@operato/i18n'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\nimport { columnText } from '../utils/column-text.js'\n\n/*\n * Two inputs bounding a range: from and to. Without names a screen reader cannot tell them apart —\n * two identical boxes in the same place read as \"edit, edit\". The ~ between them says which is\n * which to the eye, but that is a drawn character, not a relationship.\n */\n\nfunction formatDate(type: string, date: Date) {\n var year = date.getFullYear()\n var month = ('0' + (date.getMonth() + 1)).slice(-2)\n var day = ('0' + date.getDate()).slice(-2)\n var hours = ('0' + date.getHours()).slice(-2)\n var minutes = ('0' + date.getMinutes()).slice(-2)\n\n var formatDate = year + '-' + month + '-' + day\n\n return type == 'date' ? formatDate : formatDate + 'T' + hours + ':' + minutes\n}\n\nexport const FilterRangeDate: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n\n var [from, to] = value instanceof Array ? value : []\n\n var type: any = filter?.type || column.type\n if (type === 'datetime') {\n type = 'datetime-local'\n }\n\n from = formatDate(type, new Date(from))\n to = formatDate(type, new Date(to))\n\n return html`\n <input\n name=${column.name}\n type=${type}\n .value=${from}\n from\n aria-label=${i18next.t('text.grid-filter-from', { name: columnText(column), defaultValue: columnText(column) })}\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n ~\n <input\n name=${column.name}\n type=${type}\n .value=${to}\n to\n aria-label=${i18next.t('text.grid-filter-to', { name: columnText(column), defaultValue: columnText(column) })}\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n `\n}\n"]}
1
+ {"version":3,"file":"filter-range-date.js","sourceRoot":"","sources":["../../../src/filters/filter-range-date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD;;;;GAIG;AAEH,SAAS,UAAU,CAAC,IAAY,EAAE,IAAU;IAC1C,IAAI,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IAC7B,IAAI,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IACnD,IAAI,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1C,IAAI,KAAK,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7C,IAAI,OAAO,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;IAEjD,IAAI,UAAU,GAAG,IAAI,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,CAAA;IAE/C,OAAO,IAAI,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AAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,IAAI,CACd,CAAC,CAAC,MAAsB,CAAC,aAAc,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CACpF,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAE,KAA0B,CAAC,KAAK,CAAC;aAClD;SACF,CAAC,CACH,CAAA;IACH,CAAC;;;;aAIM,MAAM,CAAC,IAAI;aACX,IAAI;eACF,EAAE;;mBAEE,OAAO,CAAC,CAAC,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;eACpG,CAAC,CAAgB,EAAE,EAAE;QAC5B,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;YACtB,OAAM;QACR,CAAC;QACD,CAAC;QAAC,CAAC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,IAAI,CACd,CAAC,CAAC,MAAsB,CAAC,aAAc,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CACpF,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAE,KAA0B,CAAC,KAAK,CAAC;aAClD;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { html } from 'lit'\n\nimport { i18next } from '@operato/i18n'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\nimport { columnText } from '../utils/column-text.js'\n\n/*\n * Two inputs bounding a range: from and to. Without names a screen reader cannot tell them apart —\n * two identical boxes in the same place read as \"edit, edit\". The ~ between them says which is\n * which to the eye, but that is a drawn character, not a relationship.\n */\n\nfunction formatDate(type: string, date: Date) {\n var year = date.getFullYear()\n var month = ('0' + (date.getMonth() + 1)).slice(-2)\n var day = ('0' + date.getDate()).slice(-2)\n var hours = ('0' + date.getHours()).slice(-2)\n var minutes = ('0' + date.getMinutes()).slice(-2)\n\n var formatDate = year + '-' + month + '-' + day\n\n return type == 'date' ? formatDate : formatDate + 'T' + hours + ':' + minutes\n}\n\nexport const FilterRangeDate: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n\n var [from, to] = value instanceof Array ? value : []\n\n var type: any = filter?.type || column.type\n if (type === 'datetime') {\n type = 'datetime-local'\n }\n\n from = formatDate(type, new Date(from))\n to = formatDate(type, new Date(to))\n\n return html`\n <input\n name=${column.name}\n type=${type}\n .value=${from}\n from\n aria-label=${i18next.t('text.grid-filter-from', { name: columnText(column), defaultValue: columnText(column) })}\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n ~\n <input\n name=${column.name}\n type=${type}\n .value=${to}\n to\n aria-label=${i18next.t('text.grid-filter-to', { name: columnText(column), defaultValue: columnText(column) })}\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n `\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { html } from 'lit-html';
1
+ import { html } from 'lit';
2
2
  import { i18next } from '@operato/i18n';
3
3
  import { columnText } from '../utils/column-text.js';
4
4
  /*
@@ -1 +1 @@
1
- {"version":3,"file":"filter-range-number.js","sourceRoot":"","sources":["../../../src/filters/filter-range-number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD;;;;GAIG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,MAA4B,CAAA;IAClD,MAAM,IAAI,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,KAAI,MAAM,CAAC,IAAI,CAAA;IAExC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAEtD,OAAO,IAAI,CAAA;;aAEA,MAAM,CAAC,IAAI;;;eAGT,IAAI;;mBAEA,OAAO,CAAC,CAAC,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;eACtG,CAAC,CAAgB,EAAE,EAAE;QAC5B,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;YACtB,OAAM;QACR,CAAC;QACD,CAAC;QAAC,CAAC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,IAAI,CACd,CAAC,CAAC,MAAsB,CAAC,aAAc,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CACpF,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAE,KAA0B,CAAC,KAAK,CAAC;aAClD;SACF,CAAC,CACH,CAAA;IACH,CAAC;;;;aAIM,MAAM,CAAC,IAAI;;;eAGT,EAAE;;mBAEE,OAAO,CAAC,CAAC,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;eACpG,CAAC,CAAgB,EAAE,EAAE;QAC5B,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;YACtB,OAAM;QACR,CAAC;QACD,CAAC;QAAC,CAAC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,IAAI,CACd,CAAC,CAAC,MAAsB,CAAC,aAAc,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CACpF,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAE,KAA0B,CAAC,KAAK,CAAC;aAClD;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { html } from 'lit-html'\n\nimport { i18next } from '@operato/i18n'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\nimport { columnText } from '../utils/column-text.js'\n\n/*\n * Two inputs bounding a range: from and to. Without names a screen reader cannot tell them apart —\n * two identical boxes in the same place read as \"edit, edit\". The ~ between them says which is\n * which to the eye, but that is a drawn character, not a relationship.\n */\n\nexport const FilterRangeNumber: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n const type = filter?.type || column.type\n\n const [from, to] = value instanceof Array ? value : []\n\n return html`\n <input\n name=${column.name}\n type=\"number\"\n placeholder=\"minimum\"\n .value=${from}\n from\n aria-label=${i18next.t('text.grid-filter-from', { name: columnText(column), defaultValue: columnText(column) })}\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n ~\n <input\n name=${column.name}\n type=\"number\"\n placeholder=\"maximum\"\n .value=${to}\n to\n aria-label=${i18next.t('text.grid-filter-to', { name: columnText(column), defaultValue: columnText(column) })}\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n `\n}\n"]}
1
+ {"version":3,"file":"filter-range-number.js","sourceRoot":"","sources":["../../../src/filters/filter-range-number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpD;;;;GAIG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,E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C;eACpG,CAAC,CAAgB,EAAE,EAAE;QAC5B,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;YACtB,OAAM;QACR,CAAC;QACD,CAAC;QAAC,CAAC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAE,KAAK,CAAC,IAAI,CACd,CAAC,CAAC,MAAsB,CAAC,aAAc,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CACpF,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAE,KAA0B,CAAC,KAAK,CAAC;aAClD;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import { html } from 'lit'\n\nimport { i18next } from '@operato/i18n'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\nimport { columnText } from '../utils/column-text.js'\n\n/*\n * Two inputs bounding a range: from and to. Without names a screen reader cannot tell them apart —\n * two identical boxes in the same place read as \"edit, edit\". The ~ between them says which is\n * which to the eye, but that is a drawn character, not a relationship.\n */\n\nexport const FilterRangeNumber: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n const type = filter?.type || column.type\n\n const [from, to] = value instanceof Array ? value : []\n\n return html`\n <input\n name=${column.name}\n type=\"number\"\n placeholder=\"minimum\"\n .value=${from}\n from\n aria-label=${i18next.t('text.grid-filter-from', { name: columnText(column), defaultValue: columnText(column) })}\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n ~\n <input\n name=${column.name}\n type=\"number\"\n placeholder=\"maximum\"\n .value=${to}\n to\n aria-label=${i18next.t('text.grid-filter-to', { name: columnText(column), defaultValue: columnText(column) })}\n @keyup=${(e: KeyboardEvent) => {\n if (e.key !== 'Enter') {\n return\n }\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: Array.from(\n (e.target as HTMLElement).parentElement!.querySelectorAll('input[from], input[to]')\n ).map(input => (input as HTMLInputElement).value)\n }\n })\n )\n }}\n />\n `\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import '@operato/input/ox-input-select-buttons.js';
2
- import { html } from 'lit-html';
2
+ import { html } from 'lit';
3
3
  export const FilterSelectButtons = (column, value, owner) => {
4
4
  const filter = column.filter;
5
5
  const operator = filter === null || filter === void 0 ? void 0 : filter.operator;
@@ -1 +1 @@
1
- {"version":3,"file":"filter-select-buttons.js","sourceRoot":"","sources":["../../../src/filters/filter-select-buttons.ts"],"names":[],"mappings":"AAAA,OAAO,2CAA2C,CAAA;AAElD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAI/B,MAAM,CAAC,MAAM,mBAAmB,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAChF,MAAM,MAAM,GAAG,MAAM,CAAC,MAA4B,CAAA;IAClD,MAAM,QAAQ,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAA;IAEjC,IAAI,OAAO,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,KAAI,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;IAE5D,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CAAC;QAClC,IAAI,CAAC,CAAA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C5C;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import '@operato/input/ox-input-select-buttons.js'\n\nimport { html } from 'lit-html'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\n\nexport const FilterSelectButtons: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n const operator = filter?.operator\n\n var options = filter?.options || column.record.options || []\n\n if (typeof options === 'function') {\n if (!filter?.options) {\n console.warn(\n 'ox-grist의 column.filter 속성에서는 column.record.options의 함수형 options을 사용할 수 없으므로, filter 속성에서 재지정해야한다.'\n )\n }\n options = options.call(column, owner)\n }\n\n options = options.map((option: any) => {\n switch (typeof option) {\n case 'string':\n return {\n display: option,\n value: option\n }\n case 'object':\n /* The meaning on hover and the count after the name pass through to the chip as given. */\n return {\n display: option.display,\n value: option.value,\n hint: option.hint,\n /* The option's own count, else what the grid's countHandler read for this column and value. */\n count: option.count ?? (owner as any)?.counts?.[column.name]?.[option.value]\n }\n default:\n return option\n }\n })\n\n return html`\n <ox-input-select-buttons\n name=${column.name}\n .value=${value}\n .options=${options}\n ?multiple=${operator === 'in'}\n @change=${(e: CustomEvent) => {\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: (e.target as HTMLInputElement).value\n }\n })\n )\n }}\n ></ox-input-select-buttons>\n `\n}\n"]}
1
+ {"version":3,"file":"filter-select-buttons.js","sourceRoot":"","sources":["../../../src/filters/filter-select-buttons.ts"],"names":[],"mappings":"AAAA,OAAO,2CAA2C,CAAA;AAElD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAI1B,MAAM,CAAC,MAAM,mBAAmB,GAAyB,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAChF,MAAM,MAAM,GAAG,MAAM,CAAC,MAA4B,CAAA;IAClD,MAAM,QAAQ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AC,CAAC,MAAsB,CAAC,aAAa,CACtC,IAAI,WAAW,CAAC,eAAe,EAAE;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,KAAK,EAAG,CAAC,CAAC,MAA2B,CAAC,KAAK;aAC5C;SACF,CAAC,CACH,CAAA;IACH,CAAC;;GAEJ,CAAA;AACH,CAAC,CAAA","sourcesContent":["import '@operato/input/ox-input-select-buttons.js'\n\nimport { html } from 'lit'\n\nimport { FilterConfigObject, FilterSelectRenderer } from '../types.js'\n\nexport const FilterSelectButtons: FilterSelectRenderer = (column, value, owner) => {\n const filter = column.filter as FilterConfigObject\n const operator = filter?.operator\n\n var options = filter?.options || column.record.options || []\n\n if (typeof options === 'function') {\n if (!filter?.options) {\n console.warn(\n 'ox-grist의 column.filter 속성에서는 column.record.options의 함수형 options을 사용할 수 없으므로, filter 속성에서 재지정해야한다.'\n )\n }\n options = options.call(column, owner)\n }\n\n options = options.map((option: any) => {\n switch (typeof option) {\n case 'string':\n return {\n display: option,\n value: option\n }\n case 'object':\n /* The meaning on hover and the count after the name pass through to the chip as given. */\n return {\n display: option.display,\n value: option.value,\n hint: option.hint,\n /* The option's own count, else what the grid's countHandler read for this column and value. */\n count: option.count ?? (owner as any)?.counts?.[column.name]?.[option.value]\n }\n default:\n return option\n }\n })\n\n return html`\n <ox-input-select-buttons\n name=${column.name}\n .value=${value}\n .options=${options}\n ?multiple=${operator === 'in'}\n @change=${(e: CustomEvent) => {\n ;(e.target as HTMLElement).dispatchEvent(\n new CustomEvent('filter-change', {\n bubbles: true,\n composed: true,\n detail: {\n name: column.name,\n operator: filter.operator,\n value: (e.target as HTMLInputElement).value\n }\n })\n )\n }}\n ></ox-input-select-buttons>\n `\n}\n"]}
@@ -27,7 +27,12 @@ export class GutterButton {
27
27
  return iconOnly
28
28
  ? html ` <md-icon title=${ifDefined(title && titleFn(record))}>${iconFn(record)}</md-icon> `
29
29
  : title || icon
30
- ? html `<button><md-icon>${iconFn(record)}</md-icon><span>${titleFn(record)}</span></button>`
30
+ ? /*
31
+ * unstyled: the gutter's own small filled button (data-grid-field `:host > button`). Without it the
32
+ * page button look the fields take for a renderer's button (ButtonStyles, 2026-11-06) gave it the
33
+ * page's action height and weight - 「▷ 시작」 · 「≡ 상세」 came up large on every grid (2026-11-09).
34
+ */
35
+ html `<button unstyled><md-icon>${iconFn(record)}</md-icon><span>${titleFn(record)}</span></button>`
31
36
  : nothing;
32
37
  }
33
38
  },
@@ -1 +1 @@
1
- {"version":3,"file":"gutter-button.js","sourceRoot":"","sources":["../../../src/gutters/gutter-button.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAIxD,MAAM,OAAO,YAAY;IACvB,MAAM,CAAC,QAAQ,CAAC,SAAgC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE;QACtF,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;QAEtD,IAAI,MAAM,GAAG,OAAO,IAAI,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAoB,EAAE,EAAE,CAAC,IAAI,CAAA;QAC9E,IAAI,OAAO,GAAG,OAAO,KAAK,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAoB,EAAE,EAAE,CAAC,KAAK,CAAA;QAElF,OAAO,MAAM,CAAC,MAAM,CAClB,EAAE,EACF;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAU,MAAM;oBACxB,MAAM,KAAK,GAAG,OAAO,EAAE,CAAA;oBACvB,MAAM,IAAI,GAAG,MAAM,EAAE,CAAA;oBAErB,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA,mBAAmB,SAAS,CAAC,KAAK,CAAC,IAAI,IAAI,aAAa,CAAC,CAAC,CAAC,KAAK,CAAA;gBACxF,CAAmB;aACpB;YACD,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,QAAQ,EAAE,UAAU,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK;oBACxD,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;oBAC7B,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;oBAE3B,OAAO,QAAQ;wBACb,CAAC,CAAC,IAAI,CAAA,mBAAmB,SAAS,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa;wBAC3F,CAAC,CAAC,KAAK,IAAI,IAAI;4BACb,CAAC,CAAC,IAAI,CAAA,oBAAoB,MAAM,CAAC,MAAM,CAAC,mBAAmB,OAAO,CAAC,MAAM,CAAC,kBAAkB;4BAC5F,CAAC,CAAC,OAAO,CAAA;gBACf,CAAkB;aACnB;YACD,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;SACd,EACD,MAAM,CACP,CAAA;IACH,CAAC;CACF","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { html, nothing } from 'lit'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { ColumnConfig, FieldRenderer, GristRecord, HeaderRenderer } from '../types.js'\n\nexport class GutterButton {\n static instance(config: Partial<ColumnConfig> = { type: 'gutter', gutterName: 'button' }) {\n var { icon = 'edit', title, iconOnly = true } = config\n\n var iconFn = typeof icon == 'function' ? icon : (record?: GristRecord) => icon\n var titleFn = typeof title == 'function' ? title : (record?: GristRecord) => title\n\n return Object.assign(\n {},\n {\n type: 'gutter',\n gutterName: 'button',\n width: 26,\n resizable: false,\n sortable: false,\n header: {\n renderer: function (column) {\n const title = titleFn()\n const icon = iconFn()\n\n return iconOnly ? html` <md-icon title=${ifDefined(title)}>${icon}</md-icon> ` : title\n } as HeaderRenderer\n },\n record: {\n align: 'center',\n renderer: function (value, column, record, rowIndex, field) {\n const title = titleFn(record)\n const icon = iconFn(record)\n\n return iconOnly\n ? html` <md-icon title=${ifDefined(title && titleFn(record))}>${iconFn(record)}</md-icon> `\n : title || icon\n ? html`<button><md-icon>${iconFn(record)}</md-icon><span>${titleFn(record)}</span></button>`\n : nothing\n } as FieldRenderer\n },\n forGrid: true,\n forList: true,\n forCard: true\n },\n config\n )\n }\n}\n"]}
1
+ {"version":3,"file":"gutter-button.js","sourceRoot":"","sources":["../../../src/gutters/gutter-button.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAIxD,MAAM,OAAO,YAAY;IACvB,MAAM,CAAC,QAAQ,CAAC,SAAgC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE;QACtF,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG,MAAM,CAAA;QAEtD,IAAI,MAAM,GAAG,OAAO,IAAI,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAoB,EAAE,EAAE,CAAC,IAAI,CAAA;QAC9E,IAAI,OAAO,GAAG,OAAO,KAAK,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,C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js'\n\nimport { html, nothing } from 'lit'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { ColumnConfig, FieldRenderer, GristRecord, HeaderRenderer } from '../types.js'\n\nexport class GutterButton {\n static instance(config: Partial<ColumnConfig> = { type: 'gutter', gutterName: 'button' }) {\n var { icon = 'edit', title, iconOnly = true } = config\n\n var iconFn = typeof icon == 'function' ? icon : (record?: GristRecord) => icon\n var titleFn = typeof title == 'function' ? title : (record?: GristRecord) => title\n\n return Object.assign(\n {},\n {\n type: 'gutter',\n gutterName: 'button',\n width: 26,\n resizable: false,\n sortable: false,\n header: {\n renderer: function (column) {\n const title = titleFn()\n const icon = iconFn()\n\n return iconOnly ? html` <md-icon title=${ifDefined(title)}>${icon}</md-icon> ` : title\n } as HeaderRenderer\n },\n record: {\n align: 'center',\n renderer: function (value, column, record, rowIndex, field) {\n const title = titleFn(record)\n const icon = iconFn(record)\n\n return iconOnly\n ? html` <md-icon title=${ifDefined(title && titleFn(record))}>${iconFn(record)}</md-icon> `\n : title || icon\n ? /*\n * unstyled: the gutter's own small filled button (data-grid-field `:host > button`). Without it the\n * page button look the fields take for a renderer's button (ButtonStyles, 2026-11-06) gave it the\n * page's action height and weight - 「▷ 시작」 · 「≡ 상세」 came up large on every grid (2026-11-09).\n */\n html`<button unstyled><md-icon>${iconFn(record)}</md-icon><span>${titleFn(record)}</span></button>`\n : nothing\n } as FieldRenderer\n },\n forGrid: true,\n forList: true,\n forCard: true\n },\n config\n )\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { TemplateResult } from 'lit-html';
1
+ import { TemplateResult } from 'lit';
2
2
  import { DataCardField } from './data-card/data-card-field.js';
3
3
  import { DataCardGutter } from './data-card/data-card-gutter.js';
4
4
  import { RecordCard } from './data-card/record-card.js';
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AA6LA;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,yCAAmB,CAAA;IACnB,mCAAa,CAAA;AACf,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AA6qBD,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,qCAAiB,CAAA;AACnB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B","sourcesContent":["import { TemplateResult } from 'lit-html'\n\nimport { DataCardField } from './data-card/data-card-field.js'\nimport { DataCardGutter } from './data-card/data-card-gutter.js'\nimport { RecordCard } from './data-card/record-card.js'\nimport { DataGridField } from './data-grid/data-grid-field.js'\nimport { DataListField } from './data-list/data-list-field.js'\nimport { DataListGutter } from './data-list/data-list-gutter.js'\nimport { RecordPartial } from './data-list/record-partial.js'\nimport { DataReportField } from './data-report/data-report-field.js'\nimport { OxGristEditor } from './editors/index.js'\nimport { QueryFilter, OxFiltersForm } from './filters/index.js'\nimport { OxGristRenderer } from './renderers/ox-grist-renderer.js'\n\n/**\n * Configuration object for defining the structure and behavior of a Grist table.\n *\n * @typedef {Object} GristConfig\n * @property {ColumnConfig[]} columns - An array of column configurations.\n * @property {RowsConfig} rows - Configuration for rows and their behavior.\n * @property {ListConfig} list - Configuration for the list view.\n * @property {TreeConfig} tree - Configuration for tree-related settings.\n * @property {PaginationConfig} [pagination] - Configuration for pagination settings (optional).\n * @property {SortersConfig} [sorters] - Configuration for sorting settings (optional).\n * @property {FiltersConfig} [filters] - Configuration for filtering settings (optional).\n */\nexport type GristConfig = {\n columns: ColumnConfig[]\n rows: RowsConfig\n list: ListConfig\n tree: TreeConfig\n pagination?: PaginationConfig\n sorters?: SortersConfig\n filters?: FiltersConfig\n /**\n * 아직 아무것도 없을 때 화면이 하는 말.\n *\n * 전에는 「NO RECORDS」가 컴포넌트에 박혀 있었다. 그 문장은 다음에 무엇을 할지 알려 주지 않는다 —\n * **비어 있는 화면이야말로** 「여기서 무엇을 만들 수 있고 그것이 무엇에 쓰이나」를 말해야 하는 자리이고,\n * 처음 오는 사람이 가장 먼저 보는 화면이기도 하다.\n *\n * 정하지 않으면 예전 문장이 그대로 나온다.\n */\n emptyNote?: { title?: string; description?: string; icon?: string }\n}\n\n/**\n * Configuration object for specifying sorting options.\n *\n * @typedef {Object} SorterConfig\n * @property {string} name - The name of the sorting option.\n * @property {boolean} [desc] - Optional. Indicates whether the sorting is in descending order (optional).\n */\nexport type SorterConfig = { name: string; desc?: boolean }\n\n/**\n * Configuration array for specifying multiple sorting options.\n *\n * @typedef {SorterConfig[]} SortersConfig\n */\nexport type SortersConfig = SorterConfig[]\n\n/**\n * Enumeration of filter operators used to define filter conditions.\n *\n * @typedef {'search' | 'eq' | 'between' | 'gte' | 'lte' | 'is_not_true' | 'in' | 'like' | 'i_like' | 'noteq' |\n * 'is_empty_num_id' | 'is_blank' | 'is_present' | 'is_not_false' | 'is_true' | 'is_false' | 'is_not_null' |\n * 'is_null' | 'notin_with_null' | 'notin' | 'gt' | 'lt' | 'i_nlike' | 'nlike'} FilterOperator\n */\nexport type FilterOperator =\n | 'search'\n | 'eq'\n | 'between'\n | 'gte'\n | 'lte'\n | 'is_not_true'\n | 'in'\n | 'like'\n | 'i_like'\n | 'noteq'\n | 'is_empty_num_id'\n | 'is_blank'\n | 'is_present'\n | 'is_not_false'\n | 'is_true'\n | 'is_false'\n | 'is_not_null'\n | 'is_null'\n | 'notin_with_null'\n | 'notin'\n | 'gt'\n | 'lt'\n | 'i_nlike'\n | 'nlike'\n\nexport type SelectOptionObject =\n | {\n name: string\n display?: never\n value: string\n }\n | {\n display: string\n name?: never\n value: string\n }\n\nexport type SelectOption = SelectOptionObject | string\n\nexport type FilterChangedCallback = (value: any, form: OxFiltersForm) => boolean\n\n/**\n * Configuration object for specifying filter conditions.\n *\n * @typedef {Object} FilterConfigObject\n * @property {string} type - The type of the filter condition.\n * @property {FilterOperator} [operator] - The filter operator used to compare values (optional).\n * @property {Object} [options] - Additional options or parameters for the filter condition (optional).\n * @property {boolean|undefined} [hidden] - The hidden flag for the filter condition (optional).\n * @property {string|number|boolean|string[]|number[]|undefined} [value] - The value to compare with in the filter condition (optional).\n * @property {string} [label] - The label to display for the filter condition (optional).\n */\nexport type FilterConfigObject = {\n type: string\n operator?: FilterOperator\n options?: { [key: string]: any }\n value?: string | number | boolean | string[] | number[] | undefined\n label?: string\n boundTo?: string[]\n hidden?: boolean\n onchange?: FilterChangedCallback\n}\n\n/**\n * Configuration option for specifying filter conditions.\n *\n * The `FilterConfig` type can take one of the following forms:\n * - A `FilterConfigObject` representing a specific filter condition.\n * - A `FilterOperator` representing a predefined filter operator.\n * - A boolean value to enable or disable filtering for a specific column.\n *\n * @typedef {Object|FilterOperator|boolean} FilterConfig\n */\nexport type FilterConfig = FilterConfigObject | FilterOperator | boolean\n\n/**\n * Represents a filter condition with the following properties:\n *\n * - `name`: The name of the column or field being filtered.\n * - `operator`: The filter operator used for comparison.\n * - `value`: The value or values to compare against.\n *\n * @typedef {Object} FilterValue\n * @property {string} name - The name of the column or field.\n * @property {FilterOperator} operator - The filter operator.\n * @property {string|number|boolean|string[]|number[]|undefined} value - The value(s) to compare.\n */\nexport type FilterValue = {\n name: string\n operator: FilterOperator\n value: string | number | boolean | string[] | number[] | undefined\n}\n\n/**\n * Configuration options for filters.\n *\n * @typedef {Object} FiltersConfig\n * @property {boolean} [header] - Specifies whether to provide filtering functionality in the header.\n */\nexport type FiltersConfig = {\n header?: boolean\n}\n\n/**\n * Configuration options for pagination.\n *\n * @typedef {Object} PaginationConfig\n * @property {number} [page] - The current page number.\n * @property {number} [limit] - The maximum number of records to display per page.\n * @property {number[]} [pages] - An array of available page numbers.\n * @property {boolean} [infinite] - Specifies whether to use infinite scrolling for pagination.\n */\nexport type PaginationConfig = {\n page?: number\n limit?: number\n pages?: number[]\n infinite?: boolean\n}\n\n/**\n * Option to specify the inheritance behavior for including data from parent domains.\n *\n * - 'None': Do not include data from the parent domain.\n * - 'Include': Include data from the parent domain along with current domain data.\n * - 'Only': Include data only from the parent domain, excluding current domain data.\n *\n * @enum {string}\n */\nexport enum InheritedValueType {\n None = 'None',\n Include = 'Include',\n Only = 'Only'\n}\n\n/**\n * Configuration options for fetching data from a data source.\n *\n * @typedef {Object} FetchOption\n * @property {number} [page] - The page number to retrieve.\n * @property {number} [limit] - The maximum number of records to retrieve per page.\n * @property {SortersConfig} [sorters] - An array of sorting configurations for data. Only one of these options needs to be set.\n * @property {SortersConfig} [sortings] - An array of sorting configurations for data. Only one of these options needs to be set.\n * @property {QueryFilter[]} [filters] - An array of filtering criteria.\n * @property {string} [search] - A single free-text term, carried as given. The resolver matches it across the fields it declares as searchable, so the screen does not carry a copy of that list.\n * @property {InheritedValueType} [inherited] - Specifies the inheritance behavior for including data from parent domains.\n * @property {object} [options] - Additional options for customizing data fetching behavior.\n */\nexport type FetchOption = {\n page?: number\n limit?: number\n sorters?: SortersConfig\n sortings?: SortersConfig\n filters?: QueryFilter[]\n search?: string\n inherited?: InheritedValueType\n options?: object\n /** Aborted once a later read replaces this one or the grid is invalidated: pass it to the request. */\n signal?: AbortSignal\n}\n\n/**\n * Represents the result of a data fetching operation.\n *\n * @typedef {Object} FetchResult\n * @property {number} [page] - The page number of the fetched data.\n * @property {number} [limit] - The maximum number of records per page.\n * @property {number} total - The total number of records in the data source.\n * @property {GristRecord[]} records - An array of fetched data records.\n */\nexport type FetchResult = {\n page?: number\n limit?: number\n total: number\n records: GristRecord[]\n} | void\n\n/**\n * A function that handles data fetching operations.\n *\n * @param param - The fetch options specifying how data should be retrieved.\n * @returns A promise that resolves to a `FetchResult`.\n */\nexport type FetchHandler = (param: FetchOption) => Promise<FetchResult>\n\n/**\n * The counts a list shows beside its filter choices (a chip's number), read with the same conditions as the rows:\n * `{ [column name]: { [option value]: count } }`. Run beside each fetch that replaces the rows, under its signal.\n */\nexport type CountHandler = (param: FetchOption) => Promise<Record<string, Record<string, number>>>\n\n/**\n * Represents a Grist event handler function.\n *\n * @typedef {Function} GristEventHandler\n * @param {ColumnConfig[]} columns - An array of column configurations.\n * @param {GristData} [data] - The Grist data associated with the event.\n * @param {ColumnConfig} [column] - The column configuration related to the event (if applicable).\n * @param {GristRecord} [record] - The Grist record related to the event (if applicable).\n * @param {number} [rowIndex] - The index of the row related to the event (if applicable).\n * @param {any} [target] - The target element or object related to the event (if applicable).\n * @param {Event} [e] - The event object (if applicable).\n * @returns {void}\n */\nexport type GristEventHandler = (\n columns: ColumnConfig[],\n data?: GristData,\n column?: ColumnConfig,\n record?: GristRecord,\n rowIndex?: number,\n target?: any,\n e?: Event\n) => void\n\n/**\n * Represents an accumulator function for data aggregation and accumulation.\n *\n * @typedef {string|'sum'|'avg'|'count'|'min'|'max'|Function} AccumulatorFunc\n * @param {GristData} data - The Grist data for aggregation.\n * @param {ColumnConfig} column - The column configuration for aggregation.\n * @returns {string|number} - The aggregated result.\n */\nexport type AccumulatorFunc =\n | 'sum'\n | 'avg'\n | 'count'\n | 'min'\n | 'max'\n | ((data: GristData, column: ColumnConfig) => string | number)\n\n/**\n * Type representing an accumulator function or configuration object.\n *\n * An accumulator is used for data aggregation and accumulation purposes. It can be either\n * a predefined accumulator function (e.g., 'sum', 'avg', 'count', etc.) or a configuration\n * object specifying the type of accumulator and labeling options.\n *\n * @typedef {AccumulatorFunc|{type: AccumulatorFunc, tag?: boolean}} AccumulatorObject\n * @property {AccumulatorFunc} [type] - The type of accumulator function or predefined function name.\n * @property {boolean} [tag] - An option for adding a label to represent the result of an aggregation function. This label is added in front of the aggregated value.\n *\n * @example\n * // Using a predefined accumulator function:\n * const accumulator: AccumulatorObject = 'sum'; // Represents a 'sum' accumulator.\n *\n * // Using an accumulator configuration object:\n * const accumulatorConfig: AccumulatorObject = {\n * type: 'avg', // Specifies the type of accumulator ('avg' for average).\n * tag: true, // Option for adding a label to represent the result of an aggregation function. This label is added in front of the aggregated value.\n * };\n */\nexport type AccumulatorObject =\n | AccumulatorFunc\n | {\n type: AccumulatorFunc\n tag?: boolean\n }\n\n/**\n * Type representing column configuration information.\n *\n * @typedef {object} ColumnConfig\n * @property {string} type - Represents the data type of the column (e.g., 'text', 'number', 'date', 'gutter', etc.).\n * @property {string} name - Represents the name of the column.\n * @property {('button'|'sequence'|'row-selector'|'dirty')} [gutterName] - If the column type is 'gutter', specifies the name of one of the registered gutters (only set when the type is 'gutter').\n * @property {boolean} [fixed] - In case of a grid type column, specifies whether the column's position should be fixed and unaffected by horizontal scrolling (optional).\n * @property {HeaderConfig} header - Object representing the header configuration of the column.\n * @property {RecordConfig} record - Object representing the record configuration of the column.\n * @property {GristEventHandlerSet} handlers - Object representing the Grist event handler settings.\n * @property {LabelConfig} label - Object representing the label configuration of the column. This property is used to represent the label of the column's information in list mode, card mode, and when displaying the column in a filter form (ox-filters-form).\n * @property {boolean} [hidden] - Indicates whether the column is hidden or not (optional).\n * @property {boolean} [sortable] - Indicates whether the column is sortable or not (optional). If this setting is true, the header provides the ability to toggle the sorting direction.\n * @property {boolean} [resizable] - Indicates whether the column is resizable or not (optional). This setting determines whether the column's width can be adjusted.\n * @property {(number|string|ColumnWidthCallback)} [width] - Represents the width of the column (e.g., 100, '50%', or a callback function to calculate width).\n * @property {boolean} [forList] - Indicates whether the column is intended for display in list mode (optional, applicable only to gutter type columns).\n * @property {boolean} [forCard] - Indicates whether the column is intended for display in card mode (optional, applicable only to gutter type columns).\n * @property {ValidationCallback} [validation] - Callback function for column validation (optional). This function validates whether the value of the column is valid when edited.\n * @property {AccumulatorObject} [accumulator] - Object used for accumulating values of the column (optional, applicable only in grid mode). It specifies a function to automatically aggregate the values of the column for all records. The aggregated result is displayed in a row below the last record (accumulation record).\n * @property {FilterConfig} [filter] - Object representing the filter configuration of the column.\n * @property {(ImexConfig|boolean)} [imex] - Object or boolean value representing the configuration for importing and exporting column data.\n * @property {boolean} [multiple] - Indicates whether the column allows multiple selections or not (optional).\n * @property {boolean} [rowCount] - Indicates whether the column shows the row count or not (optional).\n */\nexport type ColumnConfig = {\n type: string\n name: string\n /**\n * \"gutter\" 타입의 컬럼인 경우, 등록된 gutter들 중의 하나의 이름을 명시합니다(type이 gutter인 경우에만 설정합니다).\n * (e.g., 'button', 'sequence', 'row-selector', 'dirty', etc)\n *\n * \"Gutter\" 는 테이블에서 각 행의 왼쪽이나 오른쪽에 놓이는 추가 열(column)을 뜻합니다.\n * 이 열은 주로 각 행(row)을 식별하거나 특정 작업을 수행하기 위한 버튼 또는 링크와 같은 요소를 표시하는 데 사용됩니다.\n * Gutter 열은 주로 데이터 행에 대한 조작 또는 행의 상태를 나타내는 데 사용됩니다.\n * 예를 들어, 테이블에서 각 행이 특정 작업을 수행하는 버튼을 포함할 때, 이러한 버튼이 Gutter 열에 배치될 수 있습니다.\n * 또한 Gutter 열은 행을 선택하거나 행의 상태를 나타내는 체크박스를 포함할 수도 있습니다.\n */\n gutterName?: 'button' | 'sequence' | 'row-selector' | 'dirty'\n title?: string\n fixed?: boolean\n /** [begin] only for button gutter column */\n icon?: string\n iconOnly?: boolean\n danger?: boolean\n /**\n * CARD mode, gutter columns: draw this button only while the card is hovered (or focused). A\n * function decides per record - e.g. a favorite star that is quiet until set, then stays. On a\n * device with no hover (touch) quiet gutters are always drawn, so nothing becomes unreachable.\n */\n quiet?: boolean | ((record: GristRecord) => boolean)\n /** [end] only for button gutter column */\n header: HeaderConfig\n record: RecordConfig\n handlers: GristEventHandlerSet\n label: LabelConfig\n hidden?: boolean\n sortable?: boolean\n resizable?: boolean\n width?: number | string | ColumnWidthCallback\n forList?: boolean\n forCard?: boolean\n validation?: ValidationCallback\n accumulator?: AccumulatorObject\n filter?: FilterConfig\n imex?: ImexConfig | boolean\n multiple?: boolean\n rowCount?: boolean\n /** 특정 도구에 의해서 사용되는 옵션으로, 일반적인 용도로 사용되지 않음을 표현할 수 있다. */\n unusable?: boolean\n multiline?: boolean // 멀티라인 여부\n}\n\n/**\n * Callback function type for column validation.\n *\n * This function is used to validate whether the value of a column is valid when edited.\n *\n * @callback ValidationCallback\n * @param {any} after - The new value of the column after editing.\n * @param {any} before - The previous value of the column before editing.\n * @param {GristRecord} record - The record being edited.\n * @param {ColumnConfig} column - The configuration of the column being edited.\n * @returns {boolean} - Returns `true` if the value is valid, `false` otherwise.\n */\nexport type ValidationCallback = (\n after: any,\n before: any,\n record: GristRecord,\n column: ColumnConfig\n) => boolean | Promise<boolean>\n\n/**\n * Configuration options for column labels.\n *\n * The label for a column can be customized using various options.\n *\n * @typedef {string|boolean|Object} LabelConfig\n * @property {LabelRenderer} [renderer] - A custom renderer function for the column label.\n *\n * @example\n * // Using a string as a label:\n * const label: LabelConfig = \"Column Label\"; // Sets the label as \"Column Label\".\n *\n * // Using a boolean to determine label visibility:\n * const label: LabelConfig = true; // Shows the default label based on the header configuration.\n *\n * // Using a custom renderer function for the label:\n * const label: LabelConfig = {\n * renderer: customLabelRenderer, // Specifies a custom renderer function.\n * };\n */\nexport type LabelConfig =\n | string\n | boolean\n | {\n renderer: LabelRenderer\n /** Same as HeaderConfig.text — the name itself, not what was drawn from it. */\n text?: string\n }\n\n/**\n * Custom label renderer function for generating column labels.\n *\n * @callback LabelRenderer\n * @param {ColumnConfig} column - The column configuration object for which the label is being generated.\n * @returns {void}\n */\nexport type LabelRenderer = (column: ColumnConfig) => void\n\n/**\n * Custom callback function for calculating column width.\n *\n * @callback ColumnWidthCallback\n * @param {ColumnConfig} column - The column configuration object for which the width is being calculated.\n * @returns {string} - The calculated width as a string (e.g., '100', '50%').\n */\nexport type ColumnWidthCallback = (column: ColumnConfig) => string\n\n/**\n * Configuration for defining the header of a column.\n *\n * @typedef {Object} HeaderConfig\n * @property {HeaderRenderer} renderer - The function used to render the column header.\n * @property {string} [style] - Optional CSS style for the column header.\n * @property {string} [group] - Optional group identifier for the column header.\n * @property {string} [groupStyle] - Optional CSS style for the header group.\n */\nexport type HeaderConfig = {\n renderer: HeaderRenderer\n /**\n * The column's name as plain text.\n *\n * `renderer` returns whatever gets drawn — a lit template, an icon — and the name cannot be read\n * back out of that. So a name given as a string in the config is kept here, for the places that\n * need it outside of rendering: the accessible name of a cell, and header filter inputs.\n */\n text?: string\n style?: string\n group?: string\n groupStyle?: string\n}\n\n/**\n * Function type for rendering column headers.\n *\n * @callback HeaderRenderer\n * @param {ColumnConfig} column - The column configuration object.\n * @returns {*} - The rendered header content.\n */\nexport type HeaderRenderer = (column: ColumnConfig) => any\n\n/**\n * Configuration for specifying default values for fields in a record.\n * Default values can be set using predefined value generator functions or custom user-defined functions.\n * This configuration allows you to define the default value generation method and any additional parameters.\n *\n * @typedef {Object|Function} DefaultValueFnConfig\n * @property {string} [name] - The name of the default value function to be used for the column.\n * @property {any[]} [params] - The parameters to be passed to the default value function.\n * @property {Function} [Function] - A custom user-defined function for generating default values.\n */\nexport type DefaultValueFnConfig =\n | {\n /**\n * The name of the default value function to be used for the column.\n */\n name: string\n\n /**\n * The parameters to be passed to the default value function.\n */\n params?: any[]\n }\n | Function\n\n/**\n * Configuration for defining fields within a record.\n * Each field can have various settings such as rendering, editing, alignment, etc.\n * The 'defaultValue' property is used to specify the default value generation method and parameters.\n *\n * @typedef {Object} RecordConfig\n * @property {FieldRenderer} renderer - The rendering function for the field.\n * @property {FieldEditor|undefined} [editor] - The editing function for the field (optional).\n * @property {boolean|Function} [editable] - Specifies if the field is editable. It can be a boolean or a function (optional).\n * @property {boolean} [mandatory] - Specifies if the field is mandatory (optional).\n * @property {GristClassifier} classifier - A classifier function for the field.\n * @property {'left'|'right'|'center'} [align] - The alignment of the field's content (optional).\n * @property {*} options - Additional options for the field.\n * @property {string|undefined} [rowOptionField] - The name of a field for row-level options associated with this field (optional).\n * @property {DefaultValueFnConfig|undefined} [defaultValue] - Configuration for specifying the default value for the field.\n * It can be a predefined value generator function or a custom user-defined function (optional).\n * @property {Object.<string, *>|undefined} [extended] - Additional extended properties that can be added as needed for specific field configurations (optional).\n * @property {boolean} [wide] - Specifies if the field should occupy a larger width within the viewer or editor.\n * When set to `true`, the field will attempt to span across multiple columns or occupy more space horizontally.\n */\nexport type RecordConfig = {\n renderer: FieldRenderer\n editor?: FieldEditor\n editable?: boolean | Function\n mandatory?: boolean\n disabled?: boolean | Function\n classifier: GristClassifier\n align?: 'left' | 'right' | 'center'\n options: any\n rowOptionField?: string\n defaultValue?: DefaultValueFnConfig\n wide?: boolean\n /**\n * Draw the field even when the record has no value for it (card mode's thumbnail).\n *\n * A thumbnail with no value is normally not drawn at all, so a list of records without images\n * does not show a column of broken-image marks. A renderer that draws the empty case itself —\n * and anything it overlays on the picture — needs the element regardless, and only the renderer\n * knows that. Off by default.\n */\n renderEmpty?: boolean\n /**\n * A select column edits through a list with a search box on top, as select2 does, instead of the browser's own\n * `<select>`. For long option lists - contracts, people. Off by default, so grids that do not ask keep the native one.\n */\n searchable?: boolean\n /**\n * What the column takes and the limit the server checks, in one short sentence - shown under the focused cell while it\n * can be edited (as a spreadsheet's input message) and on the column header when the pointer rests there. A form shows\n * the same sentence under its field (`.hint`, @operato/styles FormFieldStyles).\n */\n hint?: string\n [extended: string]: any\n}\n\n/**\n * A function type used for rendering the content of a field in various components.\n *\n * @callback FieldRenderer\n * @param {*} value - The value of the field to be rendered.\n * @param {ColumnConfig} column - The configuration of the column to which the field belongs.\n * @param {GristRecord} record - The record object containing the field's data.\n * @param {number} rowIndex - The index of the row to which the field belongs.\n * @param {DataGridField|RecordCard|DataCardGutter|DataCardField|DataListGutter|DataListField|RecordPartial|DataReportField|Element} owner - The component or element that owns the field.\n * @returns {OxGristRenderer|TemplateResult|string|void} - The rendered content, which can be of different types depending on the implementation.\n */\nexport type FieldRenderer = (\n value: any,\n column: ColumnConfig,\n record: GristRecord,\n rowIndex: number,\n owner:\n | DataGridField\n | RecordCard\n | DataCardGutter\n | DataCardField\n | DataListGutter\n | DataListField\n | RecordPartial\n | DataReportField\n | Element\n) => OxGristRenderer | TemplateResult | string | void\n\n/**\n * A function type used for defining a custom editor for a field in a data grid.\n *\n * @callback FieldEditor\n * @param {*} value - The current value of the field.\n * @param {ColumnConfig} column - The configuration of the column to which the field belongs.\n * @param {GristRecord} record - The record object containing the field's data.\n * @param {number} rowIndex - The index of the row to which the field belongs.\n * @param {DataGridField} field - The data grid field that owns the editor.\n * @returns {OxGristEditor} - The custom editor component.\n */\nexport type FieldEditor = (\n value: any,\n column: ColumnConfig,\n record: GristRecord,\n rowIndex: number,\n field: DataGridField\n) => OxGristEditor\n\n/**\n * A function type used for rendering the filter select options in a filter form.\n *\n * @callback FilterSelectRenderer\n * @param {ColumnConfig} column - The configuration of the column for which the filter is being rendered.\n * @param {(string|number|boolean|string[]|number[]|any|undefined)} value - The current value of the filter.\n * @param {Element} owner - The DOM element that owns the filter select renderer.\n * @returns {(TemplateResult|string|void)} - The rendered filter select options as a Lit HTML template result, a string, or nothing.\n */\nexport type FilterSelectRenderer = (\n column: ColumnConfig,\n value: string | number | boolean | string[] | number[] | any | undefined,\n owner: Element\n) => TemplateResult | string | void\n\n/**\n * An object representing a set of event handler functions for various events in Grist.\n *\n * @typedef {Object} GristEventHandlerSet\n * @property {GristEventHandler} [click] - The click event handler function.\n * @property {GristEventHandler} [dblclick] - The double-click event handler function.\n * @property {GristEventHandler} [focus] - The focus event handler function.\n * @property {GristEventHandler} [contextmenu] - The context menu event handler function.\n */\nexport type GristEventHandlerSet = {\n click?: GristEventHandler\n dblclick?: GristEventHandler\n focus?: GristEventHandler\n contextmenu?: GristEventHandler\n}\n\n/**\n * Configuration options for defining how records are displayed in list mode in a Grist.\n *\n * @typedef {Object} ListConfig\n * @property {string} [thumbnail] - The name of the field to use as a thumbnail image for records in list mode.\n * @property {object} [emptyThumbnail] - What to draw where a record has no thumbnail. The slot keeps its\n * place either way so cards stay the same height; this says what it should say. Without it the slot is\n * drawn empty.\n * @property {string[]} fields - An array of field names to display in the list mode.\n * @property {string[]} details - An array of field names to display as additional details in the list mode.\n */\nexport type ListConfig = {\n thumbnail?: string\n emptyThumbnail?: {\n /** Material symbol name. */\n icon?: string\n /** One short line — already translated by the caller. */\n label?: string\n }\n fields: string[]\n details: string[]\n}\n\n/**\n * Configuration options for managing tree-like structures in a Grist table.\n *\n * @typedef {Object} TreeConfig\n * @property {string} [childrenProperty] - The property name that specifies the children of a record.\n * @property {boolean | Function} [expanded] - Specifies whether tree nodes are initially expanded or a function to determine the initial expansion state for a given record.\n */\nexport type TreeConfig = {\n childrenProperty?: string\n expanded?: boolean | ((x: GristRecord) => boolean)\n}\n\n/**\n * Configuration options for importing and exporting column data.\n *\n * @typedef {Object} ImexConfig\n * @property {string} header - The header text for the column in import/export settings.\n * @property {string} key - The key or identifier for the column in import/export settings.\n * @property {number} width - The width of the column in import/export settings.\n * @property {string} type - The data type of the column in import/export settings.\n */\nexport type ImexConfig = {\n header: string\n key: string\n width: number\n type: string\n}\n\n/**\n * Configuration options for defining rows within a Grist table or view.\n *\n * @typedef {Object} RowsConfig\n * @property {boolean} [accumulator] - Specifies whether an accumulator row should be displayed.\n * @property {boolean} appendable - Shows the empty row after the records for the next entry. Unless `pasteAppendable` says\n * otherwise, it also lets a paste past the last row add rows.\n * @property {boolean} [pasteAppendable] - Whether a paste past the last row adds rows - apart from showing the empty row.\n * Defaults to `appendable`. A paste that cannot add the rows it carries dispatches `paste-rows-dropped`.\n * @property {() => Record<string, any>} [newRecord] - The values a row added by the grid starts with (the empty row or a\n * paste), the same draft a screen's own 「행 추가」 starts with. Fields the entry gives win.\n * @property {boolean} insertable - Indicates whether new rows can be inserted into the table.\n * @property {RowSelectableConfig} [selectable] - Configuration for row selection options.\n * @property {boolean} [reorderable] - CARD mode only: lets a viewer drag cards to reorder them.\n * Dispatches a bubbling `reorder` CustomEvent on `ox-grist` (`detail: { ids: string[], movedId: string }`,\n * the full record order after the move) instead of persisting anything itself - the consumer holds\n * the actual ordering field and mutation, which differ per domain (an adjacency scheme, a stored\n * array, ...). Off by default; a list still sorted server-side by some other field should leave this\n * unset rather than let a drag silently not stick past the next fetch.\n * @property {GroupConfig[]} groups - An array of group configuration options.\n * @property {string[]} totals - An array of field names for which totals should be calculated and displayed.\n * @property {GristClassifier} classifier - A function that classifies rows based on their attributes.\n * @property {GristEventHandlerSet} handlers - An object containing event handler functions for various row-level events.\n */\nexport type RowsConfig = {\n accumulator?: boolean\n appendable: boolean\n pasteAppendable: boolean\n newRecord?: () => Record<string, any>\n editable: boolean\n insertable: boolean\n selectable?: RowSelectableConfig\n reorderable?: boolean\n groups: GroupConfig[]\n totals: string[]\n classifier: GristClassifier\n handlers: GristEventHandlerSet\n}\n\n/**\n * A function used to classify and style individual records in a Grist table.\n *\n * @typedef {Function} GristClassifier\n *\n * @param {GristRecord} record - The record to be classified.\n * @param {number} rowIndex - The index of the row in the table.\n *\n * @returns {Object|void} An object containing classification properties or `void`.\n * - `emphasized` (optional): A boolean, string, or array of strings indicating the emphasis style.\n * - Additional properties can be added as needed for custom styling.\n */\nexport type GristClassifier = (\n record: GristRecord,\n rowIndex: number\n) => { emphasized?: boolean | string | string[]; [key: string]: any } | void\n\n/**\n * Configuration options for defining group headers in a Grist table.\n *\n * @typedef {Object} GroupConfig\n *\n * @property {string} align - The alignment of the group header ('left', 'center', or 'right').\n * @property {ColumnConfig} [titleColumn] - The column configuration used as the title of the group (optional).\n * @property {string} title - The title of the group.\n * @property {string} [value] - A value associated with the group (optional).\n * @property {string} [groupName] - The name of the group (optional).\n * @property {number} [row] - The row index where the group header should appear (optional).\n * @property {string|number} column - The column name or index where the group header should appear.\n * @property {number} rowspan - The number of rows the group header should span.\n * @property {number} [colspan] - The number of columns the group header should span (optional).\n */\nexport type GroupConfig = {\n align: string\n titleColumn?: ColumnConfig\n title: string\n value?: string\n groupName?: string\n row?: number\n column: string | number\n rowspan: number\n colspan?: number\n}\n\n/**\n * Configuration options for specifying row selectability in a Grist table.\n *\n * @typedef {Object} RowSelectableConfig\n *\n * @property {boolean} [multiple] - Indicates whether multiple rows can be selected (optional).\n */\nexport type RowSelectableConfig = {\n multiple?: boolean\n}\n\n/**\n * Represents a data record in Grist.\n *\n * @typedef {Object} GristRecord\n * @property {string} [id] - The unique identifier for the record.\n * @property {string} [name] - The name or label associated with the record.\n * @property {GristRecord[]} [children] - An array of child records, if applicable.\n * @property {number} [__seq__] - A numeric sequence identifier for the record.\n * @property {string} [__dirty__] - Indicates if the record is dirty (changed).\n * @property {boolean} [__selected__] - Indicates if the record is selected.\n * @property {object[]} [__changes__] - An array of changes made to the record.\n * @property {object} [__dirtyfields__] - An object representing dirty (changed) fields in the record.\n * @property {any} [__origin__] - The original data or source of the record.\n * @property {boolean} [__collapsed__] - Indicates if the record is collapsed (e.g., in a tree view).\n * @property {number} [__depth__] - The depth or level of the record in a hierarchical structure.\n * @property {'checked' | 'half-checked' | 'unchecked'} [__check_in_tree__] - Indicates the check state of the record in a tree view.\n * @property {GristRecord[]} [__children__] - An array of child records in a tree view.\n * @property {any} [key] - Additional custom properties specific to the record.\n */\nexport type GristRecord = {\n id?: string\n name?: string\n children?: GristRecord[]\n __seq__?: number\n __dirty__?: string\n __selected__?: boolean\n __changes__?: object[]\n __dirtyfields__?: { [key: string]: any }\n __origin__?: any\n __collapsed__?: boolean\n __depth__?: number\n __check_in_tree__?: 'checked' | 'half-checked' | 'unchecked'\n __children__?: GristRecord[]\n [key: string]: any\n}\n\n/**\n * Represents a set of data retrieved from a Grist table.\n *\n * @typedef {Object} GristData\n *\n * @property {number} [page] - The page number of the retrieved data (optional).\n * @property {number} [total] - The total number of records in the data source (optional).\n * @property {number} [limit] - The maximum number of records per page (optional).\n * @property {GristRecord[]} records - An array of fetched data records.\n */\nexport type GristData = {\n page?: number\n total?: number\n limit?: number\n records: GristRecord[]\n}\n\n/**\n * A function that determines whether a Grist record should be selected or not.\n *\n * @callback GristSelectFunction\n * @param {GristRecord} record - The Grist record to evaluate.\n * @returns {boolean} - `true` if the record should be selected, `false` otherwise.\n */\nexport type GristSelectFunction = (record: GristRecord) => boolean\n\n/**\n * Defines a type for personalized grid settings. It includes individual column settings and additional configurations specific to a user's grid view.\n *\n * @typedef {Object} PersonalGristPreference\n * @property {Partial<ColumnConfig>[]} [columns] - Partially defines the configuration for each column in the grid.\n * Each element can include only some properties of the `ColumnConfig`, used for optionally overriding column settings.\n * @property {any} [key] - Allows for storing additional user-defined properties with dynamic keys.\n * This property can include various custom settings beyond the grid configuration, and the keys can be freely defined.\n */\nexport type PersonalGristPreference = {\n columns?: Partial<ColumnConfig>[]\n filters?: FilterPreference[]\n pagination?: PaginationConfig\n sorters?: SortersConfig\n mode?: 'GRID' | 'LIST' | 'CARD'\n [key: string]: any\n}\n\nexport type FilterPreference = {\n name: string\n hidden?: boolean\n value?: any\n}\n\nexport enum ValidationReason {\n MANDATORY = 'MANDATORY',\n FORMAT = 'FORMAT',\n RANGE = 'RANGE',\n UNIQUE = 'UNIQUE'\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AA6LA;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,yCAAmB,CAAA;IACnB,mCAAa,CAAA;AACf,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AA6qBD,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,qCAAiB,CAAA;AACnB,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B","sourcesContent":["import { TemplateResult } from 'lit'\n\nimport { DataCardField } from './data-card/data-card-field.js'\nimport { DataCardGutter } from './data-card/data-card-gutter.js'\nimport { RecordCard } from './data-card/record-card.js'\nimport { DataGridField } from './data-grid/data-grid-field.js'\nimport { DataListField } from './data-list/data-list-field.js'\nimport { DataListGutter } from './data-list/data-list-gutter.js'\nimport { RecordPartial } from './data-list/record-partial.js'\nimport { DataReportField } from './data-report/data-report-field.js'\nimport { OxGristEditor } from './editors/index.js'\nimport { QueryFilter, OxFiltersForm } from './filters/index.js'\nimport { OxGristRenderer } from './renderers/ox-grist-renderer.js'\n\n/**\n * Configuration object for defining the structure and behavior of a Grist table.\n *\n * @typedef {Object} GristConfig\n * @property {ColumnConfig[]} columns - An array of column configurations.\n * @property {RowsConfig} rows - Configuration for rows and their behavior.\n * @property {ListConfig} list - Configuration for the list view.\n * @property {TreeConfig} tree - Configuration for tree-related settings.\n * @property {PaginationConfig} [pagination] - Configuration for pagination settings (optional).\n * @property {SortersConfig} [sorters] - Configuration for sorting settings (optional).\n * @property {FiltersConfig} [filters] - Configuration for filtering settings (optional).\n */\nexport type GristConfig = {\n columns: ColumnConfig[]\n rows: RowsConfig\n list: ListConfig\n tree: TreeConfig\n pagination?: PaginationConfig\n sorters?: SortersConfig\n filters?: FiltersConfig\n /**\n * 아직 아무것도 없을 때 화면이 하는 말.\n *\n * 전에는 「NO RECORDS」가 컴포넌트에 박혀 있었다. 그 문장은 다음에 무엇을 할지 알려 주지 않는다 —\n * **비어 있는 화면이야말로** 「여기서 무엇을 만들 수 있고 그것이 무엇에 쓰이나」를 말해야 하는 자리이고,\n * 처음 오는 사람이 가장 먼저 보는 화면이기도 하다.\n *\n * 정하지 않으면 예전 문장이 그대로 나온다.\n */\n emptyNote?: { title?: string; description?: string; icon?: string }\n}\n\n/**\n * Configuration object for specifying sorting options.\n *\n * @typedef {Object} SorterConfig\n * @property {string} name - The name of the sorting option.\n * @property {boolean} [desc] - Optional. Indicates whether the sorting is in descending order (optional).\n */\nexport type SorterConfig = { name: string; desc?: boolean }\n\n/**\n * Configuration array for specifying multiple sorting options.\n *\n * @typedef {SorterConfig[]} SortersConfig\n */\nexport type SortersConfig = SorterConfig[]\n\n/**\n * Enumeration of filter operators used to define filter conditions.\n *\n * @typedef {'search' | 'eq' | 'between' | 'gte' | 'lte' | 'is_not_true' | 'in' | 'like' | 'i_like' | 'noteq' |\n * 'is_empty_num_id' | 'is_blank' | 'is_present' | 'is_not_false' | 'is_true' | 'is_false' | 'is_not_null' |\n * 'is_null' | 'notin_with_null' | 'notin' | 'gt' | 'lt' | 'i_nlike' | 'nlike'} FilterOperator\n */\nexport type FilterOperator =\n | 'search'\n | 'eq'\n | 'between'\n | 'gte'\n | 'lte'\n | 'is_not_true'\n | 'in'\n | 'like'\n | 'i_like'\n | 'noteq'\n | 'is_empty_num_id'\n | 'is_blank'\n | 'is_present'\n | 'is_not_false'\n | 'is_true'\n | 'is_false'\n | 'is_not_null'\n | 'is_null'\n | 'notin_with_null'\n | 'notin'\n | 'gt'\n | 'lt'\n | 'i_nlike'\n | 'nlike'\n\nexport type SelectOptionObject =\n | {\n name: string\n display?: never\n value: string\n }\n | {\n display: string\n name?: never\n value: string\n }\n\nexport type SelectOption = SelectOptionObject | string\n\nexport type FilterChangedCallback = (value: any, form: OxFiltersForm) => boolean\n\n/**\n * Configuration object for specifying filter conditions.\n *\n * @typedef {Object} FilterConfigObject\n * @property {string} type - The type of the filter condition.\n * @property {FilterOperator} [operator] - The filter operator used to compare values (optional).\n * @property {Object} [options] - Additional options or parameters for the filter condition (optional).\n * @property {boolean|undefined} [hidden] - The hidden flag for the filter condition (optional).\n * @property {string|number|boolean|string[]|number[]|undefined} [value] - The value to compare with in the filter condition (optional).\n * @property {string} [label] - The label to display for the filter condition (optional).\n */\nexport type FilterConfigObject = {\n type: string\n operator?: FilterOperator\n options?: { [key: string]: any }\n value?: string | number | boolean | string[] | number[] | undefined\n label?: string\n boundTo?: string[]\n hidden?: boolean\n onchange?: FilterChangedCallback\n}\n\n/**\n * Configuration option for specifying filter conditions.\n *\n * The `FilterConfig` type can take one of the following forms:\n * - A `FilterConfigObject` representing a specific filter condition.\n * - A `FilterOperator` representing a predefined filter operator.\n * - A boolean value to enable or disable filtering for a specific column.\n *\n * @typedef {Object|FilterOperator|boolean} FilterConfig\n */\nexport type FilterConfig = FilterConfigObject | FilterOperator | boolean\n\n/**\n * Represents a filter condition with the following properties:\n *\n * - `name`: The name of the column or field being filtered.\n * - `operator`: The filter operator used for comparison.\n * - `value`: The value or values to compare against.\n *\n * @typedef {Object} FilterValue\n * @property {string} name - The name of the column or field.\n * @property {FilterOperator} operator - The filter operator.\n * @property {string|number|boolean|string[]|number[]|undefined} value - The value(s) to compare.\n */\nexport type FilterValue = {\n name: string\n operator: FilterOperator\n value: string | number | boolean | string[] | number[] | undefined\n}\n\n/**\n * Configuration options for filters.\n *\n * @typedef {Object} FiltersConfig\n * @property {boolean} [header] - Specifies whether to provide filtering functionality in the header.\n */\nexport type FiltersConfig = {\n header?: boolean\n}\n\n/**\n * Configuration options for pagination.\n *\n * @typedef {Object} PaginationConfig\n * @property {number} [page] - The current page number.\n * @property {number} [limit] - The maximum number of records to display per page.\n * @property {number[]} [pages] - An array of available page numbers.\n * @property {boolean} [infinite] - Specifies whether to use infinite scrolling for pagination.\n */\nexport type PaginationConfig = {\n page?: number\n limit?: number\n pages?: number[]\n infinite?: boolean\n}\n\n/**\n * Option to specify the inheritance behavior for including data from parent domains.\n *\n * - 'None': Do not include data from the parent domain.\n * - 'Include': Include data from the parent domain along with current domain data.\n * - 'Only': Include data only from the parent domain, excluding current domain data.\n *\n * @enum {string}\n */\nexport enum InheritedValueType {\n None = 'None',\n Include = 'Include',\n Only = 'Only'\n}\n\n/**\n * Configuration options for fetching data from a data source.\n *\n * @typedef {Object} FetchOption\n * @property {number} [page] - The page number to retrieve.\n * @property {number} [limit] - The maximum number of records to retrieve per page.\n * @property {SortersConfig} [sorters] - An array of sorting configurations for data. Only one of these options needs to be set.\n * @property {SortersConfig} [sortings] - An array of sorting configurations for data. Only one of these options needs to be set.\n * @property {QueryFilter[]} [filters] - An array of filtering criteria.\n * @property {string} [search] - A single free-text term, carried as given. The resolver matches it across the fields it declares as searchable, so the screen does not carry a copy of that list.\n * @property {InheritedValueType} [inherited] - Specifies the inheritance behavior for including data from parent domains.\n * @property {object} [options] - Additional options for customizing data fetching behavior.\n */\nexport type FetchOption = {\n page?: number\n limit?: number\n sorters?: SortersConfig\n sortings?: SortersConfig\n filters?: QueryFilter[]\n search?: string\n inherited?: InheritedValueType\n options?: object\n /** Aborted once a later read replaces this one or the grid is invalidated: pass it to the request. */\n signal?: AbortSignal\n}\n\n/**\n * Represents the result of a data fetching operation.\n *\n * @typedef {Object} FetchResult\n * @property {number} [page] - The page number of the fetched data.\n * @property {number} [limit] - The maximum number of records per page.\n * @property {number} total - The total number of records in the data source.\n * @property {GristRecord[]} records - An array of fetched data records.\n */\nexport type FetchResult = {\n page?: number\n limit?: number\n total: number\n records: GristRecord[]\n} | void\n\n/**\n * A function that handles data fetching operations.\n *\n * @param param - The fetch options specifying how data should be retrieved.\n * @returns A promise that resolves to a `FetchResult`.\n */\nexport type FetchHandler = (param: FetchOption) => Promise<FetchResult>\n\n/**\n * The counts a list shows beside its filter choices (a chip's number), read with the same conditions as the rows:\n * `{ [column name]: { [option value]: count } }`. Run beside each fetch that replaces the rows, under its signal.\n */\nexport type CountHandler = (param: FetchOption) => Promise<Record<string, Record<string, number>>>\n\n/**\n * Represents a Grist event handler function.\n *\n * @typedef {Function} GristEventHandler\n * @param {ColumnConfig[]} columns - An array of column configurations.\n * @param {GristData} [data] - The Grist data associated with the event.\n * @param {ColumnConfig} [column] - The column configuration related to the event (if applicable).\n * @param {GristRecord} [record] - The Grist record related to the event (if applicable).\n * @param {number} [rowIndex] - The index of the row related to the event (if applicable).\n * @param {any} [target] - The target element or object related to the event (if applicable).\n * @param {Event} [e] - The event object (if applicable).\n * @returns {void}\n */\nexport type GristEventHandler = (\n columns: ColumnConfig[],\n data?: GristData,\n column?: ColumnConfig,\n record?: GristRecord,\n rowIndex?: number,\n target?: any,\n e?: Event\n) => void\n\n/**\n * Represents an accumulator function for data aggregation and accumulation.\n *\n * @typedef {string|'sum'|'avg'|'count'|'min'|'max'|Function} AccumulatorFunc\n * @param {GristData} data - The Grist data for aggregation.\n * @param {ColumnConfig} column - The column configuration for aggregation.\n * @returns {string|number} - The aggregated result.\n */\nexport type AccumulatorFunc =\n | 'sum'\n | 'avg'\n | 'count'\n | 'min'\n | 'max'\n | ((data: GristData, column: ColumnConfig) => string | number)\n\n/**\n * Type representing an accumulator function or configuration object.\n *\n * An accumulator is used for data aggregation and accumulation purposes. It can be either\n * a predefined accumulator function (e.g., 'sum', 'avg', 'count', etc.) or a configuration\n * object specifying the type of accumulator and labeling options.\n *\n * @typedef {AccumulatorFunc|{type: AccumulatorFunc, tag?: boolean}} AccumulatorObject\n * @property {AccumulatorFunc} [type] - The type of accumulator function or predefined function name.\n * @property {boolean} [tag] - An option for adding a label to represent the result of an aggregation function. This label is added in front of the aggregated value.\n *\n * @example\n * // Using a predefined accumulator function:\n * const accumulator: AccumulatorObject = 'sum'; // Represents a 'sum' accumulator.\n *\n * // Using an accumulator configuration object:\n * const accumulatorConfig: AccumulatorObject = {\n * type: 'avg', // Specifies the type of accumulator ('avg' for average).\n * tag: true, // Option for adding a label to represent the result of an aggregation function. This label is added in front of the aggregated value.\n * };\n */\nexport type AccumulatorObject =\n | AccumulatorFunc\n | {\n type: AccumulatorFunc\n tag?: boolean\n }\n\n/**\n * Type representing column configuration information.\n *\n * @typedef {object} ColumnConfig\n * @property {string} type - Represents the data type of the column (e.g., 'text', 'number', 'date', 'gutter', etc.).\n * @property {string} name - Represents the name of the column.\n * @property {('button'|'sequence'|'row-selector'|'dirty')} [gutterName] - If the column type is 'gutter', specifies the name of one of the registered gutters (only set when the type is 'gutter').\n * @property {boolean} [fixed] - In case of a grid type column, specifies whether the column's position should be fixed and unaffected by horizontal scrolling (optional).\n * @property {HeaderConfig} header - Object representing the header configuration of the column.\n * @property {RecordConfig} record - Object representing the record configuration of the column.\n * @property {GristEventHandlerSet} handlers - Object representing the Grist event handler settings.\n * @property {LabelConfig} label - Object representing the label configuration of the column. This property is used to represent the label of the column's information in list mode, card mode, and when displaying the column in a filter form (ox-filters-form).\n * @property {boolean} [hidden] - Indicates whether the column is hidden or not (optional).\n * @property {boolean} [sortable] - Indicates whether the column is sortable or not (optional). If this setting is true, the header provides the ability to toggle the sorting direction.\n * @property {boolean} [resizable] - Indicates whether the column is resizable or not (optional). This setting determines whether the column's width can be adjusted.\n * @property {(number|string|ColumnWidthCallback)} [width] - Represents the width of the column (e.g., 100, '50%', or a callback function to calculate width).\n * @property {boolean} [forList] - Indicates whether the column is intended for display in list mode (optional, applicable only to gutter type columns).\n * @property {boolean} [forCard] - Indicates whether the column is intended for display in card mode (optional, applicable only to gutter type columns).\n * @property {ValidationCallback} [validation] - Callback function for column validation (optional). This function validates whether the value of the column is valid when edited.\n * @property {AccumulatorObject} [accumulator] - Object used for accumulating values of the column (optional, applicable only in grid mode). It specifies a function to automatically aggregate the values of the column for all records. The aggregated result is displayed in a row below the last record (accumulation record).\n * @property {FilterConfig} [filter] - Object representing the filter configuration of the column.\n * @property {(ImexConfig|boolean)} [imex] - Object or boolean value representing the configuration for importing and exporting column data.\n * @property {boolean} [multiple] - Indicates whether the column allows multiple selections or not (optional).\n * @property {boolean} [rowCount] - Indicates whether the column shows the row count or not (optional).\n */\nexport type ColumnConfig = {\n type: string\n name: string\n /**\n * \"gutter\" 타입의 컬럼인 경우, 등록된 gutter들 중의 하나의 이름을 명시합니다(type이 gutter인 경우에만 설정합니다).\n * (e.g., 'button', 'sequence', 'row-selector', 'dirty', etc)\n *\n * \"Gutter\" 는 테이블에서 각 행의 왼쪽이나 오른쪽에 놓이는 추가 열(column)을 뜻합니다.\n * 이 열은 주로 각 행(row)을 식별하거나 특정 작업을 수행하기 위한 버튼 또는 링크와 같은 요소를 표시하는 데 사용됩니다.\n * Gutter 열은 주로 데이터 행에 대한 조작 또는 행의 상태를 나타내는 데 사용됩니다.\n * 예를 들어, 테이블에서 각 행이 특정 작업을 수행하는 버튼을 포함할 때, 이러한 버튼이 Gutter 열에 배치될 수 있습니다.\n * 또한 Gutter 열은 행을 선택하거나 행의 상태를 나타내는 체크박스를 포함할 수도 있습니다.\n */\n gutterName?: 'button' | 'sequence' | 'row-selector' | 'dirty'\n title?: string\n fixed?: boolean\n /** [begin] only for button gutter column */\n icon?: string\n iconOnly?: boolean\n danger?: boolean\n /**\n * CARD mode, gutter columns: draw this button only while the card is hovered (or focused). A\n * function decides per record - e.g. a favorite star that is quiet until set, then stays. On a\n * device with no hover (touch) quiet gutters are always drawn, so nothing becomes unreachable.\n */\n quiet?: boolean | ((record: GristRecord) => boolean)\n /** [end] only for button gutter column */\n header: HeaderConfig\n record: RecordConfig\n handlers: GristEventHandlerSet\n label: LabelConfig\n hidden?: boolean\n sortable?: boolean\n resizable?: boolean\n width?: number | string | ColumnWidthCallback\n forList?: boolean\n forCard?: boolean\n validation?: ValidationCallback\n accumulator?: AccumulatorObject\n filter?: FilterConfig\n imex?: ImexConfig | boolean\n multiple?: boolean\n rowCount?: boolean\n /** 특정 도구에 의해서 사용되는 옵션으로, 일반적인 용도로 사용되지 않음을 표현할 수 있다. */\n unusable?: boolean\n multiline?: boolean // 멀티라인 여부\n}\n\n/**\n * Callback function type for column validation.\n *\n * This function is used to validate whether the value of a column is valid when edited.\n *\n * @callback ValidationCallback\n * @param {any} after - The new value of the column after editing.\n * @param {any} before - The previous value of the column before editing.\n * @param {GristRecord} record - The record being edited.\n * @param {ColumnConfig} column - The configuration of the column being edited.\n * @returns {boolean} - Returns `true` if the value is valid, `false` otherwise.\n */\nexport type ValidationCallback = (\n after: any,\n before: any,\n record: GristRecord,\n column: ColumnConfig\n) => boolean | Promise<boolean>\n\n/**\n * Configuration options for column labels.\n *\n * The label for a column can be customized using various options.\n *\n * @typedef {string|boolean|Object} LabelConfig\n * @property {LabelRenderer} [renderer] - A custom renderer function for the column label.\n *\n * @example\n * // Using a string as a label:\n * const label: LabelConfig = \"Column Label\"; // Sets the label as \"Column Label\".\n *\n * // Using a boolean to determine label visibility:\n * const label: LabelConfig = true; // Shows the default label based on the header configuration.\n *\n * // Using a custom renderer function for the label:\n * const label: LabelConfig = {\n * renderer: customLabelRenderer, // Specifies a custom renderer function.\n * };\n */\nexport type LabelConfig =\n | string\n | boolean\n | {\n renderer: LabelRenderer\n /** Same as HeaderConfig.text — the name itself, not what was drawn from it. */\n text?: string\n }\n\n/**\n * Custom label renderer function for generating column labels.\n *\n * @callback LabelRenderer\n * @param {ColumnConfig} column - The column configuration object for which the label is being generated.\n * @returns {void}\n */\nexport type LabelRenderer = (column: ColumnConfig) => void\n\n/**\n * Custom callback function for calculating column width.\n *\n * @callback ColumnWidthCallback\n * @param {ColumnConfig} column - The column configuration object for which the width is being calculated.\n * @returns {string} - The calculated width as a string (e.g., '100', '50%').\n */\nexport type ColumnWidthCallback = (column: ColumnConfig) => string\n\n/**\n * Configuration for defining the header of a column.\n *\n * @typedef {Object} HeaderConfig\n * @property {HeaderRenderer} renderer - The function used to render the column header.\n * @property {string} [style] - Optional CSS style for the column header.\n * @property {string} [group] - Optional group identifier for the column header.\n * @property {string} [groupStyle] - Optional CSS style for the header group.\n */\nexport type HeaderConfig = {\n renderer: HeaderRenderer\n /**\n * The column's name as plain text.\n *\n * `renderer` returns whatever gets drawn — a lit template, an icon — and the name cannot be read\n * back out of that. So a name given as a string in the config is kept here, for the places that\n * need it outside of rendering: the accessible name of a cell, and header filter inputs.\n */\n text?: string\n style?: string\n group?: string\n groupStyle?: string\n}\n\n/**\n * Function type for rendering column headers.\n *\n * @callback HeaderRenderer\n * @param {ColumnConfig} column - The column configuration object.\n * @returns {*} - The rendered header content.\n */\nexport type HeaderRenderer = (column: ColumnConfig) => any\n\n/**\n * Configuration for specifying default values for fields in a record.\n * Default values can be set using predefined value generator functions or custom user-defined functions.\n * This configuration allows you to define the default value generation method and any additional parameters.\n *\n * @typedef {Object|Function} DefaultValueFnConfig\n * @property {string} [name] - The name of the default value function to be used for the column.\n * @property {any[]} [params] - The parameters to be passed to the default value function.\n * @property {Function} [Function] - A custom user-defined function for generating default values.\n */\nexport type DefaultValueFnConfig =\n | {\n /**\n * The name of the default value function to be used for the column.\n */\n name: string\n\n /**\n * The parameters to be passed to the default value function.\n */\n params?: any[]\n }\n | Function\n\n/**\n * Configuration for defining fields within a record.\n * Each field can have various settings such as rendering, editing, alignment, etc.\n * The 'defaultValue' property is used to specify the default value generation method and parameters.\n *\n * @typedef {Object} RecordConfig\n * @property {FieldRenderer} renderer - The rendering function for the field.\n * @property {FieldEditor|undefined} [editor] - The editing function for the field (optional).\n * @property {boolean|Function} [editable] - Specifies if the field is editable. It can be a boolean or a function (optional).\n * @property {boolean} [mandatory] - Specifies if the field is mandatory (optional).\n * @property {GristClassifier} classifier - A classifier function for the field.\n * @property {'left'|'right'|'center'} [align] - The alignment of the field's content (optional).\n * @property {*} options - Additional options for the field.\n * @property {string|undefined} [rowOptionField] - The name of a field for row-level options associated with this field (optional).\n * @property {DefaultValueFnConfig|undefined} [defaultValue] - Configuration for specifying the default value for the field.\n * It can be a predefined value generator function or a custom user-defined function (optional).\n * @property {Object.<string, *>|undefined} [extended] - Additional extended properties that can be added as needed for specific field configurations (optional).\n * @property {boolean} [wide] - Specifies if the field should occupy a larger width within the viewer or editor.\n * When set to `true`, the field will attempt to span across multiple columns or occupy more space horizontally.\n */\nexport type RecordConfig = {\n renderer: FieldRenderer\n editor?: FieldEditor\n editable?: boolean | Function\n mandatory?: boolean\n disabled?: boolean | Function\n classifier: GristClassifier\n align?: 'left' | 'right' | 'center'\n options: any\n rowOptionField?: string\n defaultValue?: DefaultValueFnConfig\n wide?: boolean\n /**\n * Draw the field even when the record has no value for it (card mode's thumbnail).\n *\n * A thumbnail with no value is normally not drawn at all, so a list of records without images\n * does not show a column of broken-image marks. A renderer that draws the empty case itself —\n * and anything it overlays on the picture — needs the element regardless, and only the renderer\n * knows that. Off by default.\n */\n renderEmpty?: boolean\n /**\n * A select column edits through a list with a search box on top, as select2 does, instead of the browser's own\n * `<select>`. For long option lists - contracts, people. Off by default, so grids that do not ask keep the native one.\n */\n searchable?: boolean\n /**\n * What the column takes and the limit the server checks, in one short sentence - shown under the focused cell while it\n * can be edited (as a spreadsheet's input message) and on the column header when the pointer rests there. A form shows\n * the same sentence under its field (`.hint`, @operato/styles FormFieldStyles).\n */\n hint?: string\n [extended: string]: any\n}\n\n/**\n * A function type used for rendering the content of a field in various components.\n *\n * @callback FieldRenderer\n * @param {*} value - The value of the field to be rendered.\n * @param {ColumnConfig} column - The configuration of the column to which the field belongs.\n * @param {GristRecord} record - The record object containing the field's data.\n * @param {number} rowIndex - The index of the row to which the field belongs.\n * @param {DataGridField|RecordCard|DataCardGutter|DataCardField|DataListGutter|DataListField|RecordPartial|DataReportField|Element} owner - The component or element that owns the field.\n * @returns {OxGristRenderer|TemplateResult|string|void} - The rendered content, which can be of different types depending on the implementation.\n */\nexport type FieldRenderer = (\n value: any,\n column: ColumnConfig,\n record: GristRecord,\n rowIndex: number,\n owner:\n | DataGridField\n | RecordCard\n | DataCardGutter\n | DataCardField\n | DataListGutter\n | DataListField\n | RecordPartial\n | DataReportField\n | Element\n) => OxGristRenderer | TemplateResult | string | void\n\n/**\n * A function type used for defining a custom editor for a field in a data grid.\n *\n * @callback FieldEditor\n * @param {*} value - The current value of the field.\n * @param {ColumnConfig} column - The configuration of the column to which the field belongs.\n * @param {GristRecord} record - The record object containing the field's data.\n * @param {number} rowIndex - The index of the row to which the field belongs.\n * @param {DataGridField} field - The data grid field that owns the editor.\n * @returns {OxGristEditor} - The custom editor component.\n */\nexport type FieldEditor = (\n value: any,\n column: ColumnConfig,\n record: GristRecord,\n rowIndex: number,\n field: DataGridField\n) => OxGristEditor\n\n/**\n * A function type used for rendering the filter select options in a filter form.\n *\n * @callback FilterSelectRenderer\n * @param {ColumnConfig} column - The configuration of the column for which the filter is being rendered.\n * @param {(string|number|boolean|string[]|number[]|any|undefined)} value - The current value of the filter.\n * @param {Element} owner - The DOM element that owns the filter select renderer.\n * @returns {(TemplateResult|string|void)} - The rendered filter select options as a Lit HTML template result, a string, or nothing.\n */\nexport type FilterSelectRenderer = (\n column: ColumnConfig,\n value: string | number | boolean | string[] | number[] | any | undefined,\n owner: Element\n) => TemplateResult | string | void\n\n/**\n * An object representing a set of event handler functions for various events in Grist.\n *\n * @typedef {Object} GristEventHandlerSet\n * @property {GristEventHandler} [click] - The click event handler function.\n * @property {GristEventHandler} [dblclick] - The double-click event handler function.\n * @property {GristEventHandler} [focus] - The focus event handler function.\n * @property {GristEventHandler} [contextmenu] - The context menu event handler function.\n */\nexport type GristEventHandlerSet = {\n click?: GristEventHandler\n dblclick?: GristEventHandler\n focus?: GristEventHandler\n contextmenu?: GristEventHandler\n}\n\n/**\n * Configuration options for defining how records are displayed in list mode in a Grist.\n *\n * @typedef {Object} ListConfig\n * @property {string} [thumbnail] - The name of the field to use as a thumbnail image for records in list mode.\n * @property {object} [emptyThumbnail] - What to draw where a record has no thumbnail. The slot keeps its\n * place either way so cards stay the same height; this says what it should say. Without it the slot is\n * drawn empty.\n * @property {string[]} fields - An array of field names to display in the list mode.\n * @property {string[]} details - An array of field names to display as additional details in the list mode.\n */\nexport type ListConfig = {\n thumbnail?: string\n emptyThumbnail?: {\n /** Material symbol name. */\n icon?: string\n /** One short line — already translated by the caller. */\n label?: string\n }\n fields: string[]\n details: string[]\n}\n\n/**\n * Configuration options for managing tree-like structures in a Grist table.\n *\n * @typedef {Object} TreeConfig\n * @property {string} [childrenProperty] - The property name that specifies the children of a record.\n * @property {boolean | Function} [expanded] - Specifies whether tree nodes are initially expanded or a function to determine the initial expansion state for a given record.\n */\nexport type TreeConfig = {\n childrenProperty?: string\n expanded?: boolean | ((x: GristRecord) => boolean)\n}\n\n/**\n * Configuration options for importing and exporting column data.\n *\n * @typedef {Object} ImexConfig\n * @property {string} header - The header text for the column in import/export settings.\n * @property {string} key - The key or identifier for the column in import/export settings.\n * @property {number} width - The width of the column in import/export settings.\n * @property {string} type - The data type of the column in import/export settings.\n */\nexport type ImexConfig = {\n header: string\n key: string\n width: number\n type: string\n}\n\n/**\n * Configuration options for defining rows within a Grist table or view.\n *\n * @typedef {Object} RowsConfig\n * @property {boolean} [accumulator] - Specifies whether an accumulator row should be displayed.\n * @property {boolean} appendable - Shows the empty row after the records for the next entry. Unless `pasteAppendable` says\n * otherwise, it also lets a paste past the last row add rows.\n * @property {boolean} [pasteAppendable] - Whether a paste past the last row adds rows - apart from showing the empty row.\n * Defaults to `appendable`. A paste that cannot add the rows it carries dispatches `paste-rows-dropped`.\n * @property {() => Record<string, any>} [newRecord] - The values a row added by the grid starts with (the empty row or a\n * paste), the same draft a screen's own 「행 추가」 starts with. Fields the entry gives win.\n * @property {boolean} insertable - Indicates whether new rows can be inserted into the table.\n * @property {RowSelectableConfig} [selectable] - Configuration for row selection options.\n * @property {boolean} [reorderable] - CARD mode only: lets a viewer drag cards to reorder them.\n * Dispatches a bubbling `reorder` CustomEvent on `ox-grist` (`detail: { ids: string[], movedId: string }`,\n * the full record order after the move) instead of persisting anything itself - the consumer holds\n * the actual ordering field and mutation, which differ per domain (an adjacency scheme, a stored\n * array, ...). Off by default; a list still sorted server-side by some other field should leave this\n * unset rather than let a drag silently not stick past the next fetch.\n * @property {GroupConfig[]} groups - An array of group configuration options.\n * @property {string[]} totals - An array of field names for which totals should be calculated and displayed.\n * @property {GristClassifier} classifier - A function that classifies rows based on their attributes.\n * @property {GristEventHandlerSet} handlers - An object containing event handler functions for various row-level events.\n */\nexport type RowsConfig = {\n accumulator?: boolean\n appendable: boolean\n pasteAppendable: boolean\n newRecord?: () => Record<string, any>\n editable: boolean\n insertable: boolean\n selectable?: RowSelectableConfig\n reorderable?: boolean\n groups: GroupConfig[]\n totals: string[]\n classifier: GristClassifier\n handlers: GristEventHandlerSet\n}\n\n/**\n * A function used to classify and style individual records in a Grist table.\n *\n * @typedef {Function} GristClassifier\n *\n * @param {GristRecord} record - The record to be classified.\n * @param {number} rowIndex - The index of the row in the table.\n *\n * @returns {Object|void} An object containing classification properties or `void`.\n * - `emphasized` (optional): A boolean, string, or array of strings indicating the emphasis style.\n * - Additional properties can be added as needed for custom styling.\n */\nexport type GristClassifier = (\n record: GristRecord,\n rowIndex: number\n) => { emphasized?: boolean | string | string[]; [key: string]: any } | void\n\n/**\n * Configuration options for defining group headers in a Grist table.\n *\n * @typedef {Object} GroupConfig\n *\n * @property {string} align - The alignment of the group header ('left', 'center', or 'right').\n * @property {ColumnConfig} [titleColumn] - The column configuration used as the title of the group (optional).\n * @property {string} title - The title of the group.\n * @property {string} [value] - A value associated with the group (optional).\n * @property {string} [groupName] - The name of the group (optional).\n * @property {number} [row] - The row index where the group header should appear (optional).\n * @property {string|number} column - The column name or index where the group header should appear.\n * @property {number} rowspan - The number of rows the group header should span.\n * @property {number} [colspan] - The number of columns the group header should span (optional).\n */\nexport type GroupConfig = {\n align: string\n titleColumn?: ColumnConfig\n title: string\n value?: string\n groupName?: string\n row?: number\n column: string | number\n rowspan: number\n colspan?: number\n}\n\n/**\n * Configuration options for specifying row selectability in a Grist table.\n *\n * @typedef {Object} RowSelectableConfig\n *\n * @property {boolean} [multiple] - Indicates whether multiple rows can be selected (optional).\n */\nexport type RowSelectableConfig = {\n multiple?: boolean\n}\n\n/**\n * Represents a data record in Grist.\n *\n * @typedef {Object} GristRecord\n * @property {string} [id] - The unique identifier for the record.\n * @property {string} [name] - The name or label associated with the record.\n * @property {GristRecord[]} [children] - An array of child records, if applicable.\n * @property {number} [__seq__] - A numeric sequence identifier for the record.\n * @property {string} [__dirty__] - Indicates if the record is dirty (changed).\n * @property {boolean} [__selected__] - Indicates if the record is selected.\n * @property {object[]} [__changes__] - An array of changes made to the record.\n * @property {object} [__dirtyfields__] - An object representing dirty (changed) fields in the record.\n * @property {any} [__origin__] - The original data or source of the record.\n * @property {boolean} [__collapsed__] - Indicates if the record is collapsed (e.g., in a tree view).\n * @property {number} [__depth__] - The depth or level of the record in a hierarchical structure.\n * @property {'checked' | 'half-checked' | 'unchecked'} [__check_in_tree__] - Indicates the check state of the record in a tree view.\n * @property {GristRecord[]} [__children__] - An array of child records in a tree view.\n * @property {any} [key] - Additional custom properties specific to the record.\n */\nexport type GristRecord = {\n id?: string\n name?: string\n children?: GristRecord[]\n __seq__?: number\n __dirty__?: string\n __selected__?: boolean\n __changes__?: object[]\n __dirtyfields__?: { [key: string]: any }\n __origin__?: any\n __collapsed__?: boolean\n __depth__?: number\n __check_in_tree__?: 'checked' | 'half-checked' | 'unchecked'\n __children__?: GristRecord[]\n [key: string]: any\n}\n\n/**\n * Represents a set of data retrieved from a Grist table.\n *\n * @typedef {Object} GristData\n *\n * @property {number} [page] - The page number of the retrieved data (optional).\n * @property {number} [total] - The total number of records in the data source (optional).\n * @property {number} [limit] - The maximum number of records per page (optional).\n * @property {GristRecord[]} records - An array of fetched data records.\n */\nexport type GristData = {\n page?: number\n total?: number\n limit?: number\n records: GristRecord[]\n}\n\n/**\n * A function that determines whether a Grist record should be selected or not.\n *\n * @callback GristSelectFunction\n * @param {GristRecord} record - The Grist record to evaluate.\n * @returns {boolean} - `true` if the record should be selected, `false` otherwise.\n */\nexport type GristSelectFunction = (record: GristRecord) => boolean\n\n/**\n * Defines a type for personalized grid settings. It includes individual column settings and additional configurations specific to a user's grid view.\n *\n * @typedef {Object} PersonalGristPreference\n * @property {Partial<ColumnConfig>[]} [columns] - Partially defines the configuration for each column in the grid.\n * Each element can include only some properties of the `ColumnConfig`, used for optionally overriding column settings.\n * @property {any} [key] - Allows for storing additional user-defined properties with dynamic keys.\n * This property can include various custom settings beyond the grid configuration, and the keys can be freely defined.\n */\nexport type PersonalGristPreference = {\n columns?: Partial<ColumnConfig>[]\n filters?: FilterPreference[]\n pagination?: PaginationConfig\n sorters?: SortersConfig\n mode?: 'GRID' | 'LIST' | 'CARD'\n [key: string]: any\n}\n\nexport type FilterPreference = {\n name: string\n hidden?: boolean\n value?: any\n}\n\nexport enum ValidationReason {\n MANDATORY = 'MANDATORY',\n FORMAT = 'FORMAT',\n RANGE = 'RANGE',\n UNIQUE = 'UNIQUE'\n}\n"]}