@ishibashi0112/spreadsheet-grid-core 0.63.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/controllers/editController.cjs +1 -1
  2. package/dist/controllers/editController.d.ts +2 -0
  3. package/dist/controllers/editController.js +2 -2
  4. package/dist/controllers/saveStatusController.cjs +1 -1
  5. package/dist/controllers/saveStatusController.d.ts +1 -1
  6. package/dist/controllers/saveStatusController.js +23 -22
  7. package/dist/engine/createGridEngine.cjs +3 -1
  8. package/dist/engine/createGridEngine.js +9 -1
  9. package/dist/engine/exportCommands.cjs +2 -1
  10. package/dist/engine/exportCommands.js +3 -2
  11. package/dist/engine/gridApi.cjs +6 -1
  12. package/dist/engine/gridApi.d.ts +2 -0
  13. package/dist/engine/gridApi.js +38 -35
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.d.ts +6 -0
  16. package/dist/index.js +13 -7
  17. package/dist/locales/en.cjs +1 -0
  18. package/dist/locales/en.d.ts +10 -0
  19. package/dist/locales/en.js +380 -0
  20. package/dist/logic/dateFilterCondition.cjs +1 -1
  21. package/dist/logic/dateFilterCondition.d.ts +5 -4
  22. package/dist/logic/dateFilterCondition.js +34 -30
  23. package/dist/logic/dateFilterPresets.cjs +1 -1
  24. package/dist/logic/dateFilterPresets.d.ts +5 -3
  25. package/dist/logic/dateFilterPresets.js +16 -12
  26. package/dist/logic/dateFilterTree.cjs +1 -1
  27. package/dist/logic/dateFilterTree.d.ts +2 -1
  28. package/dist/logic/dateFilterTree.js +38 -37
  29. package/dist/logic/datePickerCalendar.cjs +1 -1
  30. package/dist/logic/datePickerCalendar.d.ts +0 -3
  31. package/dist/logic/datePickerCalendar.js +4 -25
  32. package/dist/logic/featureWarnings.cjs +1 -1
  33. package/dist/logic/featureWarnings.d.ts +1 -1
  34. package/dist/logic/featureWarnings.js +8 -8
  35. package/dist/logic/filterSummary.cjs +1 -1
  36. package/dist/logic/filterSummary.d.ts +3 -1
  37. package/dist/logic/filterSummary.js +30 -25
  38. package/dist/logic/gridAsk.cjs +3 -3
  39. package/dist/logic/gridAsk.d.ts +3 -1
  40. package/dist/logic/gridAsk.js +301 -300
  41. package/dist/logic/gridAskLocaleText.cjs +1 -0
  42. package/dist/logic/gridAskLocaleText.d.ts +206 -0
  43. package/dist/logic/gridAskLocaleText.js +102 -0
  44. package/dist/logic/groupExport.cjs +1 -1
  45. package/dist/logic/groupExport.d.ts +4 -2
  46. package/dist/logic/groupExport.js +29 -27
  47. package/dist/logic/localeText.cjs +1 -1
  48. package/dist/logic/localeText.d.ts +91 -3
  49. package/dist/logic/localeText.js +59 -21
  50. package/dist/logic/localeTextFeatures.cjs +1 -0
  51. package/dist/logic/localeTextFeatures.d.ts +82 -0
  52. package/dist/logic/localeTextFeatures.js +77 -0
  53. package/dist/logic/localeTextFilters.cjs +1 -0
  54. package/dist/logic/localeTextFilters.d.ts +31 -0
  55. package/dist/logic/localeTextFilters.js +32 -0
  56. package/dist/logic/localeTextPopups.cjs +1 -0
  57. package/dist/logic/localeTextPopups.d.ts +106 -0
  58. package/dist/logic/localeTextPopups.js +130 -0
  59. package/dist/logic/numberFilterCondition.cjs +1 -1
  60. package/dist/logic/numberFilterCondition.d.ts +3 -2
  61. package/dist/logic/numberFilterCondition.js +44 -40
  62. package/dist/logic/rowReorder.cjs +1 -1
  63. package/dist/logic/rowReorder.d.ts +0 -2
  64. package/dist/logic/rowReorder.js +2 -2
  65. package/dist/logic/scrollHint.cjs +1 -1
  66. package/dist/logic/scrollHint.d.ts +10 -3
  67. package/dist/logic/scrollHint.js +16 -11
  68. package/dist/logic/selectionAggregates.cjs +1 -1
  69. package/dist/logic/selectionAggregates.js +2 -2
  70. package/dist/logic/textFilterCondition.cjs +1 -1
  71. package/dist/logic/textFilterCondition.d.ts +3 -2
  72. package/dist/logic/textFilterCondition.js +22 -21
  73. package/dist/logic/totalRow.cjs +1 -1
  74. package/dist/logic/totalRow.d.ts +3 -2
  75. package/dist/logic/totalRow.js +33 -30
  76. package/dist/logic/validation.cjs +1 -1
  77. package/dist/logic/validation.d.ts +7 -5
  78. package/dist/logic/validation.js +33 -28
  79. package/dist/model/gridTypes.core.d.ts +643 -43
  80. package/dist/utils/clipboard.cjs +2 -1
  81. package/dist/utils/clipboard.js +1 -1
  82. package/dist/utils/permissions.cjs +2 -1
  83. package/dist/utils/permissions.js +2 -1
  84. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./model/gridActions.cjs"),t=require("./logic/gridState.cjs"),n=require("./model/gridStore.cjs"),r=require("./engine/createGridEngine.cjs"),i=require("./engine/fullFeatures.cjs"),a=require("./logic/valueFormatters.cjs"),o=require("./logic/gridAsk.cjs");exports.createGridAskRequest=o.createGridAskRequest,exports.createGridEngine=r.createGridEngine,exports.createGridStore=n.createGridStore,exports.describeGridAskView=o.describeGridAskView,exports.fullCoreFeatures=i.fullCoreFeatures,exports.gridActions=e.gridActions,exports.gridAskSystemPrompt=o.gridAskSystemPrompt,exports.isGridAskColumnsChanged=o.isGridAskColumnsChanged,exports.isSameGridAskView=o.isSameGridAskView,exports.numberFormatter=a.numberFormatter,exports.readGridAskAnswer=o.readGridAskAnswer,exports.removeGridAskItem=o.removeGridAskItem,exports.restoreColumnsFromState=t.restoreColumnsFromState;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./model/gridActions.cjs"),t=require("./logic/localeTextFilters.cjs"),n=require("./logic/localeText.cjs"),r=require("./logic/gridState.cjs"),i=require("./model/gridStore.cjs"),a=require("./engine/createGridEngine.cjs"),o=require("./engine/fullFeatures.cjs"),s=require("./logic/valueFormatters.cjs"),c=require("./logic/gridAskLocaleText.cjs"),l=require("./logic/gridAsk.cjs"),u=require("./logic/localeTextFeatures.cjs"),d=require("./logic/localeTextPopups.cjs"),f=require("./locales/en.cjs");exports.DEFAULT_AGGREGATES_LOCALE_TEXT=u.DEFAULT_AGGREGATES_LOCALE_TEXT,exports.DEFAULT_COLUMN_MENU_LOCALE_TEXT=u.DEFAULT_COLUMN_MENU_LOCALE_TEXT,exports.DEFAULT_FILL_HANDLE_LOCALE_TEXT=u.DEFAULT_FILL_HANDLE_LOCALE_TEXT,exports.DEFAULT_FILTERING_LOCALE_TEXT=u.DEFAULT_FILTERING_LOCALE_TEXT,exports.DEFAULT_FIND_LOCALE_TEXT=u.DEFAULT_FIND_LOCALE_TEXT,exports.DEFAULT_GRID_ASK_LOCALE_TEXT=c.DEFAULT_GRID_ASK_LOCALE_TEXT,exports.DEFAULT_GRID_LOCALE_TEXT=n.DEFAULT_GRID_LOCALE_TEXT,exports.DEFAULT_GROUPING_LOCALE_TEXT=u.DEFAULT_GROUPING_LOCALE_TEXT,exports.DEFAULT_POPUP_LOCALE_TEXT=d.DEFAULT_POPUP_LOCALE_TEXT,exports.DEFAULT_ROW_DRAG_LOCALE_TEXT=u.DEFAULT_ROW_DRAG_LOCALE_TEXT,exports.DEFAULT_SCROLL_HINT_LOCALE_TEXT=u.DEFAULT_SCROLL_HINT_LOCALE_TEXT,exports.DEFAULT_SERVER_SIDE_LOCALE_TEXT=u.DEFAULT_SERVER_SIDE_LOCALE_TEXT,exports.createGridAskRequest=l.createGridAskRequest,exports.createGridEngine=a.createGridEngine,exports.createGridStore=i.createGridStore,exports.describeGridAskView=l.describeGridAskView,exports.formatLocaleText=t.formatLocaleText,exports.fullCoreFeatures=o.fullCoreFeatures,exports.gridActions=e.gridActions,exports.gridAskLocaleTextEn=f.gridAskLocaleTextEn,exports.gridAskSystemPrompt=l.gridAskSystemPrompt,exports.isGridAskColumnsChanged=l.isGridAskColumnsChanged,exports.isSameGridAskView=l.isSameGridAskView,exports.localeTextEn=f.localeTextEn,exports.numberFormatter=s.numberFormatter,exports.readGridAskAnswer=l.readGridAskAnswer,exports.removeGridAskItem=l.removeGridAskItem,exports.restoreColumnsFromState=r.restoreColumnsFromState;
package/dist/index.d.ts CHANGED
@@ -11,3 +11,9 @@ export { numberFormatter } from './logic/valueFormatters.js';
11
11
  export { restoreColumnsFromState } from './logic/gridState.js';
12
12
  export { createGridAskRequest, describeGridAskView, gridAskSystemPrompt, isGridAskColumnsChanged, isSameGridAskView, readGridAskAnswer, removeGridAskItem, } from './logic/gridAsk.js';
13
13
  export type { GridAskAnswer, GridAskFilter, GridAskItem, GridAskOp, GridAskOptions, GridAskRequest, GridAskResult, GridAskSort, } from './logic/gridAsk.js';
14
+ export { DEFAULT_GRID_LOCALE_TEXT, formatLocaleText } from './logic/localeText.js';
15
+ export { DEFAULT_POPUP_LOCALE_TEXT } from './logic/localeTextPopups.js';
16
+ export { DEFAULT_AGGREGATES_LOCALE_TEXT, DEFAULT_COLUMN_MENU_LOCALE_TEXT, DEFAULT_FILL_HANDLE_LOCALE_TEXT, DEFAULT_FILTERING_LOCALE_TEXT, DEFAULT_FIND_LOCALE_TEXT, DEFAULT_GROUPING_LOCALE_TEXT, DEFAULT_ROW_DRAG_LOCALE_TEXT, DEFAULT_SCROLL_HINT_LOCALE_TEXT, DEFAULT_SERVER_SIDE_LOCALE_TEXT, } from './logic/localeTextFeatures.js';
17
+ export { DEFAULT_GRID_ASK_LOCALE_TEXT } from './logic/gridAskLocaleText.js';
18
+ export type { GridAskLocaleText } from './logic/gridAskLocaleText.js';
19
+ export { gridAskLocaleTextEn, localeTextEn } from './locales/en.js';
package/dist/index.js CHANGED
@@ -1,8 +1,14 @@
1
1
  import { gridActions as e } from "./model/gridActions.js";
2
- import { restoreColumnsFromState as t } from "./logic/gridState.js";
3
- import { createGridStore as n } from "./model/gridStore.js";
4
- import { createGridEngine as r } from "./engine/createGridEngine.js";
5
- import { fullCoreFeatures as i } from "./engine/fullFeatures.js";
6
- import { numberFormatter as a } from "./logic/valueFormatters.js";
7
- import { createGridAskRequest as o, describeGridAskView as s, gridAskSystemPrompt as c, isGridAskColumnsChanged as l, isSameGridAskView as u, readGridAskAnswer as d, removeGridAskItem as f } from "./logic/gridAsk.js";
8
- export { o as createGridAskRequest, r as createGridEngine, n as createGridStore, s as describeGridAskView, i as fullCoreFeatures, e as gridActions, c as gridAskSystemPrompt, l as isGridAskColumnsChanged, u as isSameGridAskView, a as numberFormatter, d as readGridAskAnswer, f as removeGridAskItem, t as restoreColumnsFromState };
2
+ import { formatLocaleText as t } from "./logic/localeTextFilters.js";
3
+ import { DEFAULT_GRID_LOCALE_TEXT as n } from "./logic/localeText.js";
4
+ import { restoreColumnsFromState as r } from "./logic/gridState.js";
5
+ import { createGridStore as i } from "./model/gridStore.js";
6
+ import { createGridEngine as a } from "./engine/createGridEngine.js";
7
+ import { fullCoreFeatures as o } from "./engine/fullFeatures.js";
8
+ import { numberFormatter as s } from "./logic/valueFormatters.js";
9
+ import { DEFAULT_GRID_ASK_LOCALE_TEXT as c } from "./logic/gridAskLocaleText.js";
10
+ import { createGridAskRequest as l, describeGridAskView as u, gridAskSystemPrompt as d, isGridAskColumnsChanged as f, isSameGridAskView as p, readGridAskAnswer as m, removeGridAskItem as h } from "./logic/gridAsk.js";
11
+ import { DEFAULT_AGGREGATES_LOCALE_TEXT as g, DEFAULT_COLUMN_MENU_LOCALE_TEXT as _, DEFAULT_FILL_HANDLE_LOCALE_TEXT as v, DEFAULT_FILTERING_LOCALE_TEXT as y, DEFAULT_FIND_LOCALE_TEXT as b, DEFAULT_GROUPING_LOCALE_TEXT as x, DEFAULT_ROW_DRAG_LOCALE_TEXT as S, DEFAULT_SCROLL_HINT_LOCALE_TEXT as C, DEFAULT_SERVER_SIDE_LOCALE_TEXT as w } from "./logic/localeTextFeatures.js";
12
+ import { DEFAULT_POPUP_LOCALE_TEXT as T } from "./logic/localeTextPopups.js";
13
+ import { gridAskLocaleTextEn as E, localeTextEn as D } from "./locales/en.js";
14
+ export { g as DEFAULT_AGGREGATES_LOCALE_TEXT, _ as DEFAULT_COLUMN_MENU_LOCALE_TEXT, v as DEFAULT_FILL_HANDLE_LOCALE_TEXT, y as DEFAULT_FILTERING_LOCALE_TEXT, b as DEFAULT_FIND_LOCALE_TEXT, c as DEFAULT_GRID_ASK_LOCALE_TEXT, n as DEFAULT_GRID_LOCALE_TEXT, x as DEFAULT_GROUPING_LOCALE_TEXT, T as DEFAULT_POPUP_LOCALE_TEXT, S as DEFAULT_ROW_DRAG_LOCALE_TEXT, C as DEFAULT_SCROLL_HINT_LOCALE_TEXT, w as DEFAULT_SERVER_SIDE_LOCALE_TEXT, l as createGridAskRequest, a as createGridEngine, i as createGridStore, u as describeGridAskView, t as formatLocaleText, o as fullCoreFeatures, e as gridActions, E as gridAskLocaleTextEn, d as gridAskSystemPrompt, f as isGridAskColumnsChanged, p as isSameGridAskView, D as localeTextEn, s as numberFormatter, m as readGridAskAnswer, h as removeGridAskItem, r as restoreColumnsFromState };
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],t={blank:`(Blank)`,filterNone:`No filter`,filterCustom:`Custom filter`,filterExcluded:({count:e})=>e===1?`Excluding 1 value`:`Excluding ${e} values`,filterSelected:`{count} selected`,filterMatches:`Is "{value}"`,filterBoth:`{condition} and {set}`,conditionGreaterThanOrEqual:`≥ {value}`,conditionGreaterThan:`> {value}`,conditionLessThanOrEqual:`≤ {value}`,conditionLessThan:`< {value}`,conditionEquals:`= {value}`,conditionNotEquals:`≠ {value}`,conditionRange:`{min} – {max}`,conditionOnOrAfter:`On or after {value}`,conditionOnOrBefore:`On or before {value}`,conditionContains:`Contains "{value}"`,conditionStartsWith:`Starts with "{value}"`,conditionEndsWith:`Ends with "{value}"`,conditionBlank:`(Blank)`,conditionNotBlank:`(Not blank)`,datePresetToday:`Today`,datePresetThisMonth:`This month`,datePresetLast30Days:`Last 30 days`},n={rowCount:`Rows {shown} of {total}`,columnCount:`Columns {shown} of {total}`,filterSummary:`Filter: {value}`,filterGlobal:`"{text}"`,filterColumns:({count:e})=>e===1?`1 column`:`${e} columns`,sortSummary:`Sort: {value}`,sortEntry:`{column} ({direction})`,sortAscending:`ascending`,sortDescending:`descending`,activeCell:`Cell {cell}`,selection:`Range {range}`,selectionSize:({cells:e,rows:t})=>`${e} ${e===1?`cell`:`cells`} / ${t} ${t===1?`row`:`rows`}`,selectedColumns:({count:e})=>e===1?`1 column`:`${e} columns`,detailColumnName:`Details`,rowDragColumnName:`Move`,aggregateAverage:`Average`,aggregateCount:`Count`,aggregateSum:`Sum`,aggregateComputing:`Calculating… {percent}%`,aggregatePartial:`Loaded rows only`,none:`—`,listSeparator:`, `,globalFilterPlaceholder:`Filter all columns`,globalFilterLabel:`Search the whole table`,clearGlobalFilter:`Clear filter`,toggleFilterPanel:`Show or hide the filter panel`,clear:`Clear`,clearAll:`Clear all`,close:`Close`,apply:`Apply`,retry:`Retry`,noOptions:`No options`,noRows:`No rows to show`,noMatchingRows:`No matching rows`,selectAllRows:`Select all rows`,selectRow:`Select row {row}`,sortedAscending:`Sorted ascending`,sortedDescending:`Sorted descending`,sortPriority:` (priority {priority})`,columnFiltered:`Filtered`,dragColumn:`Drag to move the column`,columnMenu:`Column menu`,columnMenuFor:`Column menu for {column}`,showDetails:`Show details`,hideDetails:`Hide details`,expandGroup:`Expand {group}`,collapseGroup:`Collapse {group}`,groupRowCount:({count:e})=>e===`1`?`(1 row)`:`(${e} rows)`,editCell:`Edit {column}`,cellInput:`Cell input`,sizingColumns:`Sizing columns…`,applyingFilter:`Filtering {percent}%`,dragRow:`Drag to move the row`,dragRowDisabled:`Rows can't be moved while the table is sorted or filtered`,dragRowLabel:`Row {row}`,scrollHintRow:`Row {row}`,scrollHintJump:`Go to row {row}`,scrollHintJumpSeparator:`·`,scrollHintTenThousands:`{full}`,menuFilter:`Filter…`,menuSortAscending:`Sort ascending`,menuSortDescending:`Sort descending`,menuManageSort:`Manage sorting…`,menuManageFilters:`Manage filters…`,menuGroupBy:`Group by this column`,menuUngroup:`Ungroup`,menuPin:`Pin column`,menuPinNone:`No pin`,menuPinLeft:`Pin left`,menuPinRight:`Pin right`,menuPinUnavailable:`Pinning needs onColumnsChange.`,menuAutosize:`Autosize this column`,menuAutosizeAll:`Autosize all columns`,menuColumns:`Choose columns`,menuResetColumns:`Reset columns`,resetColumnsHint:`Restores the width, pinning, visibility and order of all columns.`,menuResetUnavailable:`Resetting columns needs onColumnsChange.`,toolPanelFilters:`Filters`,toolPanelSort:`Sort`,toolPanelColumns:`Columns`,columnsPinnedLeft:`Pinned left`,columnsUnpinned:`Not pinned`,columnsPinnedRight:`Pinned right`,columnsHideAll:`Hide all columns (the first one stays)`,columnsShowAll:`Show all columns`,columnsDragToReorder:`Drag to reorder`,columnsDragWithinSection:`Drag to reorder (within the same section)`,columnsReorderUnavailable:`Reordering needs onColumnsChange.`,columnsReorderWhileSearching:`Columns can't be reordered while searching.`,columnsGroupedHint:`This column is grouped. Its values appear in the group column.`,groupedColumnTitle:`{column} (grouped)`,columnsSearchPlaceholder:`Search…`,columnsNoMatches:`No matching columns`,columnsReset:`Reset all columns`,columnsUnavailable:`Showing, hiding and resetting columns needs onColumnsChange.`,globalFilterTitle:`Global filter`,globalFilterRows:`Rows containing "{text}"`,clearGlobalFilterTitle:`Clear the global filter`,noColumnFilters:`No column filters`,addFilterLabel:`Choose a column to filter`,addFilter:`+ Add filter…`,addFilterNone:`+ No columns to add`,sortPanelEmpty:`No sorting`,sortPanelDrag:`Drag to change the priority`,sortPanelDisabled:`Sorting is turned off`,sortPanelNeedsTwo:`Add a second level to reorder`,sortPanelAscending:`Ascending`,sortPanelAscendingShort:`Asc`,sortPanelDescending:`Descending`,sortPanelDescendingShort:`Desc`,sortPanelRemove:`Remove this level`,sortPanelAllUsed:`All columns are already used`,sortPanelAddHint:`Add a sort level`,sortPanelAdd:`+ Add level`,sortPanelClearHint:`Remove all sorting`,sortPanelReadOnly:`Sorting is turned off, so it can't be changed`,filterHiddenColumn:` (hidden)`,filterGroupedColumn:` (grouped)`,filterJumpUnavailable:`This column is hidden, so its filter can't be opened here. You can still clear it with ×.`,filterEditUnderGroup:`Opens under the group column header`,filterJump:`Go to this column to edit`,filterEditFor:`Edit the filter on {column}`,filterClear:`Clear this column's filter`,filterClearFor:`Clear the filter on {column}`,filterCurrentNone:`(none)`,filterCurrentExcluded:({count:e})=>e===1?`Excluding 1 value`:`Excluding ${e} values`,filterCurrentSelected:`{count} selected`,operatorEquals:`Equals`,operatorNotEquals:`Does not equal`,operatorGreaterThanOrEqual:`Greater than or equal to`,operatorGreaterThan:`Greater than`,operatorLessThanOrEqual:`Less than or equal to`,operatorLessThan:`Less than`,operatorBetween:`Between`,operatorContains:`Contains`,operatorStartsWith:`Starts with`,operatorEndsWith:`Ends with`,operatorOnOrAfter:`On or after`,operatorOnOrBefore:`On or before`,operatorBlank:`Blank`,operatorNotBlank:`Not blank`,filterTitle:`Filter: {column}`,filterCollecting:`Collecting values… {percent}%`,filterOptionsLoading:`Loading values…`,filterOptionsLoadingShort:`Loading…`,filterOptionsFailed:`Couldn't load the values`,filterOptionsFailedShort:`Failed`,filterOptionsTruncated:`(first values only)`,filterSearchPlaceholder:`Search (Enter to apply)`,filterSelectAll:`(Select all)`,filterSelectAllResults:`(Select all results)`,filterNoOptionsSource:`No values. With serverSide, give the column filterOptions or another source of values.`,filterNoMatches:`No matching values`,filterSelectedCount:`Selected {selected} of {total}`,filterShownCount:` ({count} shown)`,filterMatchCount:({count:e})=>e===1?`1 match`:`${e} matches`,filterTotalCount:`{count} total`,filterOptionCount:`Values: {count}`,filterAll:`(All)`,filterConditionSection:`Condition`,filterValuesSection:`Values`,filterOperator:`Operator`,filterValue:`Value`,filterValuePlaceholder:`Value`,filterMin:`Min`,filterMax:`Max`,filterRangeSeparator:`–`,filterNoValue:`This operator doesn't take a value`,filterDate:`Date`,filterStartDate:`Start date`,filterEndDate:`End date`,filterTextPlaceholder:`Contains…`,filterTextHint:`Matches text anywhere in the value`,filterCurrentValue:`Current: {value}`,treeExpand:`Expand`,treeCollapse:`Collapse`,dateTreeYear:`{year}`,dateTreeMonth:({month:t})=>e[t-1]??String(t),dateTreeDay:`{day}`,calendarWeekdays:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],calendarMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],calendarTitle:({year:t,month:n})=>`${e[n-1]??n} ${t}`,calendarYear:`{year}`,calendarOpen:`Open calendar`,calendarClose:`Close calendar`,calendarPrevious:`Previous`,calendarNext:`Next`,calendarChangeView:`Change view`,calendarBack:`← Back`,calendarToday:`Today`,findLabel:`Find in cells`,findPlaceholder:`Find`,findInput:`Search text`,findSearching:`Searching…`,findNoResults:`No results`,findPrevious:`Previous match`,findPreviousHint:`Previous (Shift+Enter)`,findNext:`Next match`,findNextHint:`Next (Enter)`,findClose:`Close find`,findCloseHint:`Close (Esc)`,fillOptions:`Auto Fill Options`,fillOptionsCurrent:`Auto Fill Options ({kind})`,fillSeries:`Fill Series`,fillCopy:`Copy Cells`,invalidValue:`Invalid value`,enterNumber:`Enter a number`,enterInteger:`Enter a whole number`,enterMin:`Enter {min} or more`,enterMax:`Enter {max} or less`,enterRange:`Enter a number from {min} to {max}`,saveFailedCell:`Couldn't save. The value was restored.`,loadFailed:({count:e})=>`Couldn't load rows (${e} ${e===1?`block`:`blocks`})`,dismissLoadError:`Dismiss the error`,saveFailed:({count:e})=>`Couldn't save changes (${e} ${e===1?`row`:`rows`}). The values were restored.`,dismissSaveError:`Dismiss the save error`,totalRowLabel:`Total`,totalAverage:`Avg`,totalMin:`Min`,totalMax:`Max`,totalCount:`Count`,exportSubtotal:`{label} subtotal`},r={placeholder:`Filter or sort in plain words (e.g. this month, largest amount first)`,label:`Filter in plain words`,submit:`Ask`,stop:`Stop`,examples:`Try:`,thinking:`Thinking…`,escHint:`Press Esc to stop`,retry:`Try again`,appliedTitle:`Applied`,undo:`Undo`,close:`Close`,removeItem:`Remove {label} {text}`,allRemoved:`All conditions have been removed.`,unchanged:`Nothing to change.`,undone:`Undone.`,droppedTitle:`Couldn't use`,fromAi:`From the AI: {text}`,askFailed:`Couldn't reach the AI. Try again.`,noGrid:`The grid wasn't found. Try again once it's on the page.`,changedNotice:`The grid's conditions have changed, so they can't be changed from here. Use the grid's filters and sorting.`,itemSort:`Sort`,itemSortEntry:`{column} {direction}`,ascending:`ascending`,descending:`descending`,itemSearch:`Search`,itemHidden:`Hidden`,quote:`"{text}"`,quoteSeparator:`, `,emptyText:`(empty)`,unnamed:`(no name)`,andMore:`{items} and {count} more`,moreReasons:`{count} more`,columnReason:`{column}: {reason}`,readError:`Couldn't read the AI's answer. Try wording it differently.`,shapeError:`The AI's answer wasn't an instruction for the grid. Try wording it differently.`,filtersLocked:`Column filters are locked`,noSuchColumn:`There is no column {column}`,notFilterable:`This column can't be filtered`,noOperator:`The condition has no type`,operatorUnavailable:`{operator} can't be used on this column`,oneCondition:`Only one condition per column`,oneSelection:`Only one value choice per column`,unreadableFilters:`Unreadable conditions ({count}) can't be used`,noNumberRange:`The range needs two numbers`,notNumber:`{value} is not a number`,noText:`No text to look for`,textTooLong:`Text to look for can be up to {limit} characters`,unknownPeriod:`{value} is not an available period`,noDateRange:`The range needs two dates`,notDate:`{value} is not a date`,noValues:`No values to choose`,noSelectableValues:`None of the values can be chosen`,tooManyValues:`Up to {limit} values can be chosen ({count} not used)`,notInOptions:`Not in the list: {values}`,notAnOption:`{value} is not in the list`,cannotFilterBy:`Can't filter by {value}`,valueTooLong:`Values over {limit} characters can't be used`,valuesTooLong:`Values over {limit} characters ({count}) can't be used`,unreadableValues:`Unreadable values ({count}) can't be used`,sortLocked:`Sorting is locked`,sortNoSuchColumn:`Sort: there is no column {column}`,sortBadDirection:`Sort: {direction} can't be used for {column}`,searchUnreadable:`Couldn't read the search text`,searchLocked:`The search text is locked`,searchTooLong:`The search text can be up to {limit} characters`,columnsLocked:`Column visibility is locked`,unreadableColumns:`Unreadable column changes ({count}) can't be used`,cannotHideAll:`All columns can't be hidden`,operatorLabels:{"=":`equals`,"!=":`does not equal`,">":`greater than`,">=":`at least`,"<":`less than`,"<=":`at most`,between:`between`,contains:`contains`,equals:`equals`,startsWith:`starts with`,endsWith:`ends with`,onOrAfter:`on or after`,onOrBefore:`on or before`,notEquals:`does not equal`,preset:`today, this month, …`,blank:`blank`,notBlank:`not blank`,in:`one of`,notIn:`none of`,clear:`clear`}},i=e=>({...t,...e}),a=i(n),o=i(r);exports.gridAskLocaleTextEn=o,exports.localeTextEn=a;
@@ -0,0 +1,10 @@
1
+ import type { GridLocaleText } from '../model/gridTypes.core.js';
2
+ import type { GridAskLocaleText } from '../logic/gridAskLocaleText.js';
3
+ /**
4
+ * グリッドの英語の文言です。`localeText={localeTextEn}` で渡します。
5
+ */
6
+ export declare const localeTextEn: GridLocaleText;
7
+ /**
8
+ * AI バー(`GridAskBar` / `useGridAsk`)の英語の文言です。`localeText={gridAskLocaleTextEn}` で渡します。
9
+ */
10
+ export declare const gridAskLocaleTextEn: GridAskLocaleText;
@@ -0,0 +1,380 @@
1
+ //#region src/locales/en.ts
2
+ var e = [
3
+ "January",
4
+ "February",
5
+ "March",
6
+ "April",
7
+ "May",
8
+ "June",
9
+ "July",
10
+ "August",
11
+ "September",
12
+ "October",
13
+ "November",
14
+ "December"
15
+ ], t = {
16
+ blank: "(Blank)",
17
+ filterNone: "No filter",
18
+ filterCustom: "Custom filter",
19
+ filterExcluded: ({ count: e }) => e === 1 ? "Excluding 1 value" : `Excluding ${e} values`,
20
+ filterSelected: "{count} selected",
21
+ filterMatches: "Is \"{value}\"",
22
+ filterBoth: "{condition} and {set}",
23
+ conditionGreaterThanOrEqual: "≥ {value}",
24
+ conditionGreaterThan: "> {value}",
25
+ conditionLessThanOrEqual: "≤ {value}",
26
+ conditionLessThan: "< {value}",
27
+ conditionEquals: "= {value}",
28
+ conditionNotEquals: "≠ {value}",
29
+ conditionRange: "{min} – {max}",
30
+ conditionOnOrAfter: "On or after {value}",
31
+ conditionOnOrBefore: "On or before {value}",
32
+ conditionContains: "Contains \"{value}\"",
33
+ conditionStartsWith: "Starts with \"{value}\"",
34
+ conditionEndsWith: "Ends with \"{value}\"",
35
+ conditionBlank: "(Blank)",
36
+ conditionNotBlank: "(Not blank)",
37
+ datePresetToday: "Today",
38
+ datePresetThisMonth: "This month",
39
+ datePresetLast30Days: "Last 30 days"
40
+ }, n = {
41
+ rowCount: "Rows {shown} of {total}",
42
+ columnCount: "Columns {shown} of {total}",
43
+ filterSummary: "Filter: {value}",
44
+ filterGlobal: "\"{text}\"",
45
+ filterColumns: ({ count: e }) => e === 1 ? "1 column" : `${e} columns`,
46
+ sortSummary: "Sort: {value}",
47
+ sortEntry: "{column} ({direction})",
48
+ sortAscending: "ascending",
49
+ sortDescending: "descending",
50
+ activeCell: "Cell {cell}",
51
+ selection: "Range {range}",
52
+ selectionSize: ({ cells: e, rows: t }) => `${e} ${e === 1 ? "cell" : "cells"} / ${t} ${t === 1 ? "row" : "rows"}`,
53
+ selectedColumns: ({ count: e }) => e === 1 ? "1 column" : `${e} columns`,
54
+ detailColumnName: "Details",
55
+ rowDragColumnName: "Move",
56
+ aggregateAverage: "Average",
57
+ aggregateCount: "Count",
58
+ aggregateSum: "Sum",
59
+ aggregateComputing: "Calculating… {percent}%",
60
+ aggregatePartial: "Loaded rows only",
61
+ none: "—",
62
+ listSeparator: ", ",
63
+ globalFilterPlaceholder: "Filter all columns",
64
+ globalFilterLabel: "Search the whole table",
65
+ clearGlobalFilter: "Clear filter",
66
+ toggleFilterPanel: "Show or hide the filter panel",
67
+ clear: "Clear",
68
+ clearAll: "Clear all",
69
+ close: "Close",
70
+ apply: "Apply",
71
+ retry: "Retry",
72
+ noOptions: "No options",
73
+ noRows: "No rows to show",
74
+ noMatchingRows: "No matching rows",
75
+ selectAllRows: "Select all rows",
76
+ selectRow: "Select row {row}",
77
+ sortedAscending: "Sorted ascending",
78
+ sortedDescending: "Sorted descending",
79
+ sortPriority: " (priority {priority})",
80
+ columnFiltered: "Filtered",
81
+ dragColumn: "Drag to move the column",
82
+ columnMenu: "Column menu",
83
+ columnMenuFor: "Column menu for {column}",
84
+ showDetails: "Show details",
85
+ hideDetails: "Hide details",
86
+ expandGroup: "Expand {group}",
87
+ collapseGroup: "Collapse {group}",
88
+ groupRowCount: ({ count: e }) => e === "1" ? "(1 row)" : `(${e} rows)`,
89
+ editCell: "Edit {column}",
90
+ cellInput: "Cell input",
91
+ sizingColumns: "Sizing columns…",
92
+ applyingFilter: "Filtering {percent}%",
93
+ dragRow: "Drag to move the row",
94
+ dragRowDisabled: "Rows can't be moved while the table is sorted or filtered",
95
+ dragRowLabel: "Row {row}",
96
+ scrollHintRow: "Row {row}",
97
+ scrollHintJump: "Go to row {row}",
98
+ scrollHintJumpSeparator: "·",
99
+ scrollHintTenThousands: "{full}",
100
+ menuFilter: "Filter…",
101
+ menuSortAscending: "Sort ascending",
102
+ menuSortDescending: "Sort descending",
103
+ menuManageSort: "Manage sorting…",
104
+ menuManageFilters: "Manage filters…",
105
+ menuGroupBy: "Group by this column",
106
+ menuUngroup: "Ungroup",
107
+ menuPin: "Pin column",
108
+ menuPinNone: "No pin",
109
+ menuPinLeft: "Pin left",
110
+ menuPinRight: "Pin right",
111
+ menuPinUnavailable: "Pinning needs onColumnsChange.",
112
+ menuAutosize: "Autosize this column",
113
+ menuAutosizeAll: "Autosize all columns",
114
+ menuColumns: "Choose columns",
115
+ menuResetColumns: "Reset columns",
116
+ resetColumnsHint: "Restores the width, pinning, visibility and order of all columns.",
117
+ menuResetUnavailable: "Resetting columns needs onColumnsChange.",
118
+ toolPanelFilters: "Filters",
119
+ toolPanelSort: "Sort",
120
+ toolPanelColumns: "Columns",
121
+ columnsPinnedLeft: "Pinned left",
122
+ columnsUnpinned: "Not pinned",
123
+ columnsPinnedRight: "Pinned right",
124
+ columnsHideAll: "Hide all columns (the first one stays)",
125
+ columnsShowAll: "Show all columns",
126
+ columnsDragToReorder: "Drag to reorder",
127
+ columnsDragWithinSection: "Drag to reorder (within the same section)",
128
+ columnsReorderUnavailable: "Reordering needs onColumnsChange.",
129
+ columnsReorderWhileSearching: "Columns can't be reordered while searching.",
130
+ columnsGroupedHint: "This column is grouped. Its values appear in the group column.",
131
+ groupedColumnTitle: "{column} (grouped)",
132
+ columnsSearchPlaceholder: "Search…",
133
+ columnsNoMatches: "No matching columns",
134
+ columnsReset: "Reset all columns",
135
+ columnsUnavailable: "Showing, hiding and resetting columns needs onColumnsChange.",
136
+ globalFilterTitle: "Global filter",
137
+ globalFilterRows: "Rows containing \"{text}\"",
138
+ clearGlobalFilterTitle: "Clear the global filter",
139
+ noColumnFilters: "No column filters",
140
+ addFilterLabel: "Choose a column to filter",
141
+ addFilter: "+ Add filter…",
142
+ addFilterNone: "+ No columns to add",
143
+ sortPanelEmpty: "No sorting",
144
+ sortPanelDrag: "Drag to change the priority",
145
+ sortPanelDisabled: "Sorting is turned off",
146
+ sortPanelNeedsTwo: "Add a second level to reorder",
147
+ sortPanelAscending: "Ascending",
148
+ sortPanelAscendingShort: "Asc",
149
+ sortPanelDescending: "Descending",
150
+ sortPanelDescendingShort: "Desc",
151
+ sortPanelRemove: "Remove this level",
152
+ sortPanelAllUsed: "All columns are already used",
153
+ sortPanelAddHint: "Add a sort level",
154
+ sortPanelAdd: "+ Add level",
155
+ sortPanelClearHint: "Remove all sorting",
156
+ sortPanelReadOnly: "Sorting is turned off, so it can't be changed",
157
+ filterHiddenColumn: " (hidden)",
158
+ filterGroupedColumn: " (grouped)",
159
+ filterJumpUnavailable: "This column is hidden, so its filter can't be opened here. You can still clear it with ×.",
160
+ filterEditUnderGroup: "Opens under the group column header",
161
+ filterJump: "Go to this column to edit",
162
+ filterEditFor: "Edit the filter on {column}",
163
+ filterClear: "Clear this column's filter",
164
+ filterClearFor: "Clear the filter on {column}",
165
+ filterCurrentNone: "(none)",
166
+ filterCurrentExcluded: ({ count: e }) => e === 1 ? "Excluding 1 value" : `Excluding ${e} values`,
167
+ filterCurrentSelected: "{count} selected",
168
+ operatorEquals: "Equals",
169
+ operatorNotEquals: "Does not equal",
170
+ operatorGreaterThanOrEqual: "Greater than or equal to",
171
+ operatorGreaterThan: "Greater than",
172
+ operatorLessThanOrEqual: "Less than or equal to",
173
+ operatorLessThan: "Less than",
174
+ operatorBetween: "Between",
175
+ operatorContains: "Contains",
176
+ operatorStartsWith: "Starts with",
177
+ operatorEndsWith: "Ends with",
178
+ operatorOnOrAfter: "On or after",
179
+ operatorOnOrBefore: "On or before",
180
+ operatorBlank: "Blank",
181
+ operatorNotBlank: "Not blank",
182
+ filterTitle: "Filter: {column}",
183
+ filterCollecting: "Collecting values… {percent}%",
184
+ filterOptionsLoading: "Loading values…",
185
+ filterOptionsLoadingShort: "Loading…",
186
+ filterOptionsFailed: "Couldn't load the values",
187
+ filterOptionsFailedShort: "Failed",
188
+ filterOptionsTruncated: "(first values only)",
189
+ filterSearchPlaceholder: "Search (Enter to apply)",
190
+ filterSelectAll: "(Select all)",
191
+ filterSelectAllResults: "(Select all results)",
192
+ filterNoOptionsSource: "No values. With serverSide, give the column filterOptions or another source of values.",
193
+ filterNoMatches: "No matching values",
194
+ filterSelectedCount: "Selected {selected} of {total}",
195
+ filterShownCount: " ({count} shown)",
196
+ filterMatchCount: ({ count: e }) => e === 1 ? "1 match" : `${e} matches`,
197
+ filterTotalCount: "{count} total",
198
+ filterOptionCount: "Values: {count}",
199
+ filterAll: "(All)",
200
+ filterConditionSection: "Condition",
201
+ filterValuesSection: "Values",
202
+ filterOperator: "Operator",
203
+ filterValue: "Value",
204
+ filterValuePlaceholder: "Value",
205
+ filterMin: "Min",
206
+ filterMax: "Max",
207
+ filterRangeSeparator: "–",
208
+ filterNoValue: "This operator doesn't take a value",
209
+ filterDate: "Date",
210
+ filterStartDate: "Start date",
211
+ filterEndDate: "End date",
212
+ filterTextPlaceholder: "Contains…",
213
+ filterTextHint: "Matches text anywhere in the value",
214
+ filterCurrentValue: "Current: {value}",
215
+ treeExpand: "Expand",
216
+ treeCollapse: "Collapse",
217
+ dateTreeYear: "{year}",
218
+ dateTreeMonth: ({ month: t }) => e[t - 1] ?? String(t),
219
+ dateTreeDay: "{day}",
220
+ calendarWeekdays: [
221
+ "Su",
222
+ "Mo",
223
+ "Tu",
224
+ "We",
225
+ "Th",
226
+ "Fr",
227
+ "Sa"
228
+ ],
229
+ calendarMonths: [
230
+ "Jan",
231
+ "Feb",
232
+ "Mar",
233
+ "Apr",
234
+ "May",
235
+ "Jun",
236
+ "Jul",
237
+ "Aug",
238
+ "Sep",
239
+ "Oct",
240
+ "Nov",
241
+ "Dec"
242
+ ],
243
+ calendarTitle: ({ year: t, month: n }) => `${e[n - 1] ?? n} ${t}`,
244
+ calendarYear: "{year}",
245
+ calendarOpen: "Open calendar",
246
+ calendarClose: "Close calendar",
247
+ calendarPrevious: "Previous",
248
+ calendarNext: "Next",
249
+ calendarChangeView: "Change view",
250
+ calendarBack: "← Back",
251
+ calendarToday: "Today",
252
+ findLabel: "Find in cells",
253
+ findPlaceholder: "Find",
254
+ findInput: "Search text",
255
+ findSearching: "Searching…",
256
+ findNoResults: "No results",
257
+ findPrevious: "Previous match",
258
+ findPreviousHint: "Previous (Shift+Enter)",
259
+ findNext: "Next match",
260
+ findNextHint: "Next (Enter)",
261
+ findClose: "Close find",
262
+ findCloseHint: "Close (Esc)",
263
+ fillOptions: "Auto Fill Options",
264
+ fillOptionsCurrent: "Auto Fill Options ({kind})",
265
+ fillSeries: "Fill Series",
266
+ fillCopy: "Copy Cells",
267
+ invalidValue: "Invalid value",
268
+ enterNumber: "Enter a number",
269
+ enterInteger: "Enter a whole number",
270
+ enterMin: "Enter {min} or more",
271
+ enterMax: "Enter {max} or less",
272
+ enterRange: "Enter a number from {min} to {max}",
273
+ saveFailedCell: "Couldn't save. The value was restored.",
274
+ loadFailed: ({ count: e }) => `Couldn't load rows (${e} ${e === 1 ? "block" : "blocks"})`,
275
+ dismissLoadError: "Dismiss the error",
276
+ saveFailed: ({ count: e }) => `Couldn't save changes (${e} ${e === 1 ? "row" : "rows"}). The values were restored.`,
277
+ dismissSaveError: "Dismiss the save error",
278
+ totalRowLabel: "Total",
279
+ totalAverage: "Avg",
280
+ totalMin: "Min",
281
+ totalMax: "Max",
282
+ totalCount: "Count",
283
+ exportSubtotal: "{label} subtotal"
284
+ }, r = {
285
+ placeholder: "Filter or sort in plain words (e.g. this month, largest amount first)",
286
+ label: "Filter in plain words",
287
+ submit: "Ask",
288
+ stop: "Stop",
289
+ examples: "Try:",
290
+ thinking: "Thinking…",
291
+ escHint: "Press Esc to stop",
292
+ retry: "Try again",
293
+ appliedTitle: "Applied",
294
+ undo: "Undo",
295
+ close: "Close",
296
+ removeItem: "Remove {label} {text}",
297
+ allRemoved: "All conditions have been removed.",
298
+ unchanged: "Nothing to change.",
299
+ undone: "Undone.",
300
+ droppedTitle: "Couldn't use",
301
+ fromAi: "From the AI: {text}",
302
+ askFailed: "Couldn't reach the AI. Try again.",
303
+ noGrid: "The grid wasn't found. Try again once it's on the page.",
304
+ changedNotice: "The grid's conditions have changed, so they can't be changed from here. Use the grid's filters and sorting.",
305
+ itemSort: "Sort",
306
+ itemSortEntry: "{column} {direction}",
307
+ ascending: "ascending",
308
+ descending: "descending",
309
+ itemSearch: "Search",
310
+ itemHidden: "Hidden",
311
+ quote: "\"{text}\"",
312
+ quoteSeparator: ", ",
313
+ emptyText: "(empty)",
314
+ unnamed: "(no name)",
315
+ andMore: "{items} and {count} more",
316
+ moreReasons: "{count} more",
317
+ columnReason: "{column}: {reason}",
318
+ readError: "Couldn't read the AI's answer. Try wording it differently.",
319
+ shapeError: "The AI's answer wasn't an instruction for the grid. Try wording it differently.",
320
+ filtersLocked: "Column filters are locked",
321
+ noSuchColumn: "There is no column {column}",
322
+ notFilterable: "This column can't be filtered",
323
+ noOperator: "The condition has no type",
324
+ operatorUnavailable: "{operator} can't be used on this column",
325
+ oneCondition: "Only one condition per column",
326
+ oneSelection: "Only one value choice per column",
327
+ unreadableFilters: "Unreadable conditions ({count}) can't be used",
328
+ noNumberRange: "The range needs two numbers",
329
+ notNumber: "{value} is not a number",
330
+ noText: "No text to look for",
331
+ textTooLong: "Text to look for can be up to {limit} characters",
332
+ unknownPeriod: "{value} is not an available period",
333
+ noDateRange: "The range needs two dates",
334
+ notDate: "{value} is not a date",
335
+ noValues: "No values to choose",
336
+ noSelectableValues: "None of the values can be chosen",
337
+ tooManyValues: "Up to {limit} values can be chosen ({count} not used)",
338
+ notInOptions: "Not in the list: {values}",
339
+ notAnOption: "{value} is not in the list",
340
+ cannotFilterBy: "Can't filter by {value}",
341
+ valueTooLong: "Values over {limit} characters can't be used",
342
+ valuesTooLong: "Values over {limit} characters ({count}) can't be used",
343
+ unreadableValues: "Unreadable values ({count}) can't be used",
344
+ sortLocked: "Sorting is locked",
345
+ sortNoSuchColumn: "Sort: there is no column {column}",
346
+ sortBadDirection: "Sort: {direction} can't be used for {column}",
347
+ searchUnreadable: "Couldn't read the search text",
348
+ searchLocked: "The search text is locked",
349
+ searchTooLong: "The search text can be up to {limit} characters",
350
+ columnsLocked: "Column visibility is locked",
351
+ unreadableColumns: "Unreadable column changes ({count}) can't be used",
352
+ cannotHideAll: "All columns can't be hidden",
353
+ operatorLabels: {
354
+ "=": "equals",
355
+ "!=": "does not equal",
356
+ ">": "greater than",
357
+ ">=": "at least",
358
+ "<": "less than",
359
+ "<=": "at most",
360
+ between: "between",
361
+ contains: "contains",
362
+ equals: "equals",
363
+ startsWith: "starts with",
364
+ endsWith: "ends with",
365
+ onOrAfter: "on or after",
366
+ onOrBefore: "on or before",
367
+ notEquals: "does not equal",
368
+ preset: "today, this month, …",
369
+ blank: "blank",
370
+ notBlank: "not blank",
371
+ in: "one of",
372
+ notIn: "none of",
373
+ clear: "clear"
374
+ }
375
+ }, i = (e) => ({
376
+ ...t,
377
+ ...e
378
+ }), a = /* @__PURE__ */ i(n), o = /* @__PURE__ */ i(r);
379
+ //#endregion
380
+ export { o as gridAskLocaleTextEn, a as localeTextEn };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./dateFilterPresets.cjs"),t=require("./filtering.cjs");var n={operator:`range`,value1:``,value2:``,preset:null},r=[{value:`range`,label:`範囲`},{value:`onOrAfter`,label:`以降`},{value:`onOrBefore`,label:`以前`},{value:`equals`,label:`に等しい`},{value:`notEquals`,label:`に等しくない`},{value:`blank`,label:`空白`},{value:`notBlank`,label:`空白でない`}],i=e.BUILTIN_DATE_FILTER_PRESET_OPTIONS,a=e=>e===`blank`||e===`notBlank`?0:e===`range`?2:1,o=e=>{let t=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(t)?t:null},s=e=>e===null||e instanceof Date?e===null?``:t.toDateKey(e)??``:e.trim()===``?``:t.toDateKey(e)??``,c=e=>{if(e.preset!==null)return{mode:`preset`,preset:e.preset};if(e.operator===`blank`||e.operator===`notBlank`)return{mode:e.operator};if(e.operator===`range`){let t=o(e.value1),n=o(e.value2);return t!==null&&n!==null?t<=n?{mode:`range`,from:t,to:n}:{mode:`range`,from:n,to:t}:t===null?n===null?null:{mode:`onOrBefore`,value:n}:{mode:`onOrAfter`,value:t}}let t=o(e.value1);return t===null?null:{mode:e.operator,value:t}},l=(t,n)=>{switch(t.mode){case`range`:return`${t.from} 〜 ${t.to}`;case`onOrAfter`:return`${t.value} 以降`;case`onOrBefore`:return`${t.value} 以前`;case`equals`:return`${t.value} に等しい`;case`notEquals`:return`${t.value} に等しくない`;case`blank`:return`(空白)`;case`notBlank`:return`(空白でない)`;case`preset`:return e.dateFilterPresetLabel(t.preset,n)}},u=e=>{if(!e)return n;switch(e.mode){case`preset`:return{...n,preset:e.preset};case`range`:return{operator:`range`,value1:e.from,value2:e.to,preset:null};case`blank`:case`notBlank`:return{operator:e.mode,value1:``,value2:``,preset:null};default:return{operator:e.mode,value1:e.value,value2:``,preset:null}}},d=(e,n,r,i)=>n?e.filter(e=>t.matchesParsedDateFilter(n,e.value,r,i)):e;exports.DATE_FILTER_OPERATOR_OPTIONS=r,exports.DATE_FILTER_PRESET_OPTIONS=i,exports.DEFAULT_DATE_FILTER_DRAFT=n,exports.buildParsedDateFilterFromDraft=c,exports.dateFilterOperandCount=a,exports.filterOptionsByDateCondition=d,exports.formatParsedDateFilter=l,exports.normalizeFilterDateInputValue=s,exports.parsedDateFilterToConditionDraft=u;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./localeTextFilters.cjs"),t=require("./dateFilterPresets.cjs"),n=require("./filtering.cjs");var r={operator:`range`,value1:``,value2:``,preset:null},i=[{value:`range`,labelKey:`operatorBetween`},{value:`onOrAfter`,labelKey:`operatorOnOrAfter`},{value:`onOrBefore`,labelKey:`operatorOnOrBefore`},{value:`equals`,labelKey:`operatorEquals`},{value:`notEquals`,labelKey:`operatorNotEquals`},{value:`blank`,labelKey:`operatorBlank`},{value:`notBlank`,labelKey:`operatorNotBlank`}],a=t.BUILTIN_DATE_FILTER_PRESET_OPTIONS,o=e=>e===`blank`||e===`notBlank`?0:e===`range`?2:1,s=e=>{let t=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(t)?t:null},c=e=>e===null||e instanceof Date?e===null?``:n.toDateKey(e)??``:e.trim()===``?``:n.toDateKey(e)??``,l=e=>{if(e.preset!==null)return{mode:`preset`,preset:e.preset};if(e.operator===`blank`||e.operator===`notBlank`)return{mode:e.operator};if(e.operator===`range`){let t=s(e.value1),n=s(e.value2);return t!==null&&n!==null?t<=n?{mode:`range`,from:t,to:n}:{mode:`range`,from:n,to:t}:t===null?n===null?null:{mode:`onOrBefore`,value:n}:{mode:`onOrAfter`,value:t}}let t=s(e.value1);return t===null?null:{mode:e.operator,value:t}},u=(n,r,i=e.DEFAULT_FILTER_LOCALE_TEXT)=>{switch(n.mode){case`range`:return e.formatLocaleText(i.conditionRange,{min:n.from,max:n.to});case`onOrAfter`:return e.formatLocaleText(i.conditionOnOrAfter,{value:n.value});case`onOrBefore`:return e.formatLocaleText(i.conditionOnOrBefore,{value:n.value});case`equals`:return e.formatLocaleText(i.conditionEquals,{value:n.value});case`notEquals`:return e.formatLocaleText(i.conditionNotEquals,{value:n.value});case`blank`:return i.conditionBlank;case`notBlank`:return i.conditionNotBlank;case`preset`:return t.dateFilterPresetLabel(n.preset,r,i)}},d=e=>{if(!e)return r;switch(e.mode){case`preset`:return{...r,preset:e.preset};case`range`:return{operator:`range`,value1:e.from,value2:e.to,preset:null};case`blank`:case`notBlank`:return{operator:e.mode,value1:``,value2:``,preset:null};default:return{operator:e.mode,value1:e.value,value2:``,preset:null}}},f=(e,t,r,i)=>t?e.filter(e=>n.matchesParsedDateFilter(t,e.value,r,i)):e;exports.DATE_FILTER_OPERATOR_OPTIONS=i,exports.DATE_FILTER_PRESET_OPTIONS=a,exports.DEFAULT_DATE_FILTER_DRAFT=r,exports.buildParsedDateFilterFromDraft=l,exports.dateFilterOperandCount=o,exports.filterOptionsByDateCondition=f,exports.formatParsedDateFilter=u,exports.normalizeFilterDateInputValue=c,exports.parsedDateFilterToConditionDraft=d;
@@ -1,5 +1,6 @@
1
1
  import type { DateFilterPreset, ParsedDateFilter } from '../model/gridTypes.unbound.js';
2
- import { type NormalizedDateFilterPreset } from './dateFilterPresets.js';
2
+ import { type FilterLocaleTextKeyOfPreset, type NormalizedDateFilterPreset } from './dateFilterPresets.js';
3
+ import { type FilterLocaleText, type FilterOperatorLocaleTextKey } from './localeTextFilters.js';
3
4
  export type DateFilterOperator = 'range' | 'onOrAfter' | 'onOrBefore' | 'equals' | 'notEquals' | 'blank' | 'notBlank';
4
5
  export type DateFilterConditionDraft = {
5
6
  operator: DateFilterOperator;
@@ -10,16 +11,16 @@ export type DateFilterConditionDraft = {
10
11
  export declare const DEFAULT_DATE_FILTER_DRAFT: DateFilterConditionDraft;
11
12
  export declare const DATE_FILTER_OPERATOR_OPTIONS: ReadonlyArray<{
12
13
  value: DateFilterOperator;
13
- label: string;
14
+ labelKey: FilterOperatorLocaleTextKey;
14
15
  }>;
15
16
  export declare const DATE_FILTER_PRESET_OPTIONS: ReadonlyArray<{
16
17
  value: DateFilterPreset;
17
- label: string;
18
+ labelKey: FilterLocaleTextKeyOfPreset;
18
19
  }>;
19
20
  export declare const dateFilterOperandCount: (operator: DateFilterOperator) => 0 | 1 | 2;
20
21
  export declare const normalizeFilterDateInputValue: (value: string | Date | null) => string;
21
22
  export declare const buildParsedDateFilterFromDraft: (draft: DateFilterConditionDraft) => ParsedDateFilter | null;
22
- export declare const formatParsedDateFilter: (parsed: ParsedDateFilter, presets?: readonly NormalizedDateFilterPreset[]) => string;
23
+ export declare const formatParsedDateFilter: (parsed: ParsedDateFilter, presets?: readonly NormalizedDateFilterPreset[], texts?: FilterLocaleText) => string;
23
24
  export declare const parsedDateFilterToConditionDraft: (parsed: ParsedDateFilter | null | undefined) => DateFilterConditionDraft;
24
25
  export declare const filterOptionsByDateCondition: <O extends {
25
26
  value: string;
@@ -1,51 +1,52 @@
1
- import { BUILTIN_DATE_FILTER_PRESET_OPTIONS as e, dateFilterPresetLabel as t } from "./dateFilterPresets.js";
2
- import { matchesParsedDateFilter as n, toDateKey as r } from "./filtering.js";
1
+ import { DEFAULT_FILTER_LOCALE_TEXT as e, formatLocaleText as t } from "./localeTextFilters.js";
2
+ import { BUILTIN_DATE_FILTER_PRESET_OPTIONS as n, dateFilterPresetLabel as r } from "./dateFilterPresets.js";
3
+ import { matchesParsedDateFilter as i, toDateKey as a } from "./filtering.js";
3
4
  //#region src/logic/dateFilterCondition.ts
4
- var i = {
5
+ var o = {
5
6
  operator: "range",
6
7
  value1: "",
7
8
  value2: "",
8
9
  preset: null
9
- }, a = [
10
+ }, s = [
10
11
  {
11
12
  value: "range",
12
- label: "範囲"
13
+ labelKey: "operatorBetween"
13
14
  },
14
15
  {
15
16
  value: "onOrAfter",
16
- label: "以降"
17
+ labelKey: "operatorOnOrAfter"
17
18
  },
18
19
  {
19
20
  value: "onOrBefore",
20
- label: "以前"
21
+ labelKey: "operatorOnOrBefore"
21
22
  },
22
23
  {
23
24
  value: "equals",
24
- label: "に等しい"
25
+ labelKey: "operatorEquals"
25
26
  },
26
27
  {
27
28
  value: "notEquals",
28
- label: "に等しくない"
29
+ labelKey: "operatorNotEquals"
29
30
  },
30
31
  {
31
32
  value: "blank",
32
- label: "空白"
33
+ labelKey: "operatorBlank"
33
34
  },
34
35
  {
35
36
  value: "notBlank",
36
- label: "空白でない"
37
+ labelKey: "operatorNotBlank"
37
38
  }
38
- ], o = e, s = (e) => e === "blank" || e === "notBlank" ? 0 : e === "range" ? 2 : 1, c = (e) => {
39
+ ], c = n, l = (e) => e === "blank" || e === "notBlank" ? 0 : e === "range" ? 2 : 1, u = (e) => {
39
40
  let t = e.trim();
40
41
  return /^\d{4}-\d{2}-\d{2}$/.test(t) ? t : null;
41
- }, l = (e) => e === null || e instanceof Date ? e === null ? "" : r(e) ?? "" : e.trim() === "" ? "" : r(e) ?? "", u = (e) => {
42
+ }, d = (e) => e === null || e instanceof Date ? e === null ? "" : a(e) ?? "" : e.trim() === "" ? "" : a(e) ?? "", f = (e) => {
42
43
  if (e.preset !== null) return {
43
44
  mode: "preset",
44
45
  preset: e.preset
45
46
  };
46
47
  if (e.operator === "blank" || e.operator === "notBlank") return { mode: e.operator };
47
48
  if (e.operator === "range") {
48
- let t = c(e.value1), n = c(e.value2);
49
+ let t = u(e.value1), n = u(e.value2);
49
50
  return t !== null && n !== null ? t <= n ? {
50
51
  mode: "range",
51
52
  from: t,
@@ -62,27 +63,30 @@ var i = {
62
63
  value: t
63
64
  };
64
65
  }
65
- let t = c(e.value1);
66
+ let t = u(e.value1);
66
67
  return t === null ? null : {
67
68
  mode: e.operator,
68
69
  value: t
69
70
  };
70
- }, d = (e, n) => {
71
- switch (e.mode) {
72
- case "range": return `${e.from} 〜 ${e.to}`;
73
- case "onOrAfter": return `${e.value} 以降`;
74
- case "onOrBefore": return `${e.value} 以前`;
75
- case "equals": return `${e.value} に等しい`;
76
- case "notEquals": return `${e.value} に等しくない`;
77
- case "blank": return "(空白)";
78
- case "notBlank": return "(空白でない)";
79
- case "preset": return t(e.preset, n);
71
+ }, p = (n, i, a = e) => {
72
+ switch (n.mode) {
73
+ case "range": return t(a.conditionRange, {
74
+ min: n.from,
75
+ max: n.to
76
+ });
77
+ case "onOrAfter": return t(a.conditionOnOrAfter, { value: n.value });
78
+ case "onOrBefore": return t(a.conditionOnOrBefore, { value: n.value });
79
+ case "equals": return t(a.conditionEquals, { value: n.value });
80
+ case "notEquals": return t(a.conditionNotEquals, { value: n.value });
81
+ case "blank": return a.conditionBlank;
82
+ case "notBlank": return a.conditionNotBlank;
83
+ case "preset": return r(n.preset, i, a);
80
84
  }
81
- }, f = (e) => {
82
- if (!e) return i;
85
+ }, m = (e) => {
86
+ if (!e) return o;
83
87
  switch (e.mode) {
84
88
  case "preset": return {
85
- ...i,
89
+ ...o,
86
90
  preset: e.preset
87
91
  };
88
92
  case "range": return {
@@ -105,6 +109,6 @@ var i = {
105
109
  preset: null
106
110
  };
107
111
  }
108
- }, p = (e, t, r, i) => t ? e.filter((e) => n(t, e.value, r, i)) : e;
112
+ }, h = (e, t, n, r) => t ? e.filter((e) => i(t, e.value, n, r)) : e;
109
113
  //#endregion
110
- export { a as DATE_FILTER_OPERATOR_OPTIONS, o as DATE_FILTER_PRESET_OPTIONS, i as DEFAULT_DATE_FILTER_DRAFT, u as buildParsedDateFilterFromDraft, s as dateFilterOperandCount, p as filterOptionsByDateCondition, d as formatParsedDateFilter, l as normalizeFilterDateInputValue, f as parsedDateFilterToConditionDraft };
114
+ export { s as DATE_FILTER_OPERATOR_OPTIONS, c as DATE_FILTER_PRESET_OPTIONS, o as DEFAULT_DATE_FILTER_DRAFT, f as buildParsedDateFilterFromDraft, l as dateFilterOperandCount, h as filterOptionsByDateCondition, p as formatParsedDateFilter, d as normalizeFilterDateInputValue, m as parsedDateFilterToConditionDraft };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=[{value:`today`,label:`今日`},{value:`thisMonth`,label:`今月`},{value:`last30days`,label:`過去 30 日`}],t=t=>e.some(e=>e.value===t),n=t=>e.find(e=>e.value===t)?.label??t,r=t=>t===!1?[]:t===void 0?e.map(({value:e,label:t})=>({id:e,label:t})):t.map(e=>typeof e==`string`?{id:e,label:n(e)}:{id:e.id,label:e.label,resolve:e.resolve}),i=(e,r)=>{let i=r?.find(t=>t.id===e)?.label;return i===void 0?t(e)?n(e):e:i};exports.BUILTIN_DATE_FILTER_PRESET_OPTIONS=e,exports.dateFilterPresetLabel=i,exports.isBuiltinDateFilterPreset=t,exports.normalizeDateFilterPresets=r;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./localeTextFilters.cjs");var t=[{value:`today`,labelKey:`datePresetToday`},{value:`thisMonth`,labelKey:`datePresetThisMonth`},{value:`last30days`,labelKey:`datePresetLast30Days`}],n=e=>t.some(t=>t.value===e),r=(e,n)=>{let r=t.find(t=>t.value===e)?.labelKey;return r?n[r]:e},i=(n,i=e.DEFAULT_FILTER_LOCALE_TEXT)=>n===!1?[]:n===void 0?t.map(({value:e,labelKey:t})=>({id:e,label:i[t]})):n.map(e=>typeof e==`string`?{id:e,label:r(e,i)}:{id:e.id,label:e.label,resolve:e.resolve}),a=(t,i,a=e.DEFAULT_FILTER_LOCALE_TEXT)=>{let o=i?.find(e=>e.id===t)?.label;return o===void 0?n(t)?r(t,a):t:o};exports.BUILTIN_DATE_FILTER_PRESET_OPTIONS=t,exports.dateFilterPresetLabel=a,exports.isBuiltinDateFilterPreset=n,exports.normalizeDateFilterPresets=i;