dep: package update

- decl type 변경 포함
This commit is contained in:
2023-03-20 00:02:04 +09:00
parent 18f7e7b7c1
commit 9e17e58ecb
8 changed files with 94 additions and 98 deletions
+2 -2
View File
@@ -278,7 +278,7 @@ declare const staticValues: {
<script lang="ts" setup>
import addMinutes from "date-fns/esm/addMinutes";
import { isString, range, trim } from "lodash-es";
import { stringifyUrl } from "query-string";
import queryString from "query-string";
import { onMounted, ref, watch } from "vue";
import { formatTime } from "@util/formatTime";
import { joinYearMonth } from "@util/joinYearMonth";
@@ -590,7 +590,7 @@ async function reserveCommand() {
const commandName = selectedCommand.value.value;
if (listReqArgCommand.has(commandName)) {
document.location.href = stringifyUrl({
document.location.href = queryString.stringifyUrl({
url: "v_processing.php",
query: {
command: commandName,
+2 -2
View File
@@ -257,7 +257,7 @@
<script lang="ts" setup>
import addMinutes from "date-fns/esm/addMinutes";
import { stringifyUrl } from "query-string";
import queryString from "query-string";
import { onMounted, ref, watch, type PropType, inject, type Ref } from "vue";
import { formatTime } from "@util/formatTime";
import { joinYearMonth } from "@util/joinYearMonth";
@@ -553,7 +553,7 @@ async function reserveCommand() {
const commandName = selectedCommand.value.value;
if (listReqArgCommand.has(commandName)) {
document.location.href = stringifyUrl({
document.location.href = queryString.stringifyUrl({
url: "v_processing.php",
query: {
command: commandName,
+24 -19
View File
@@ -90,8 +90,8 @@ import type {
GetRowIdParams,
GridApi,
GridReadyEvent,
RowNode,
CellClickedEvent,
IRowNode,
} from "ag-grid-community";
import { ProvidedColumnGroup } from "ag-grid-community";
import { getNPCColor } from "@/utilGame";
@@ -359,7 +359,7 @@ type headerType =
type GenValueParams<T = unknown> = ValueFormatterParams<GeneralListItem, T>;
type GenValueGetterParams = ValueGetterParams<GeneralListItem>;
type GenRowNode = RowNode<GeneralListItem>;
type GenRowNode = IRowNode<GeneralListItem>;
interface GenColDef extends ColDef<GeneralListItem> {
colId: headerType;
@@ -481,7 +481,7 @@ const centerCellClass = [...defaultCellClass, "cell-center"];
const rightAlignClass = [...defaultCellClass, "cell-right"];
const sortableNumber: Omit<GenColDef, "colId" | "headerName"> = {
sortable: true,
comparator: (a, b) => a - b,
comparator: (a, b, _a, _b, _desc) => a - b,
sortingOrder: ["desc", "asc", null],
filter: "number",
cellClass: rightAlignClass,
@@ -527,7 +527,7 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
};
return style as CellStyle;
},
comparator: (_lhs, _rhs, { data: lhs }: GenRowNode, { data: rhs }: GenRowNode) => {
comparator: (_lhs, _rhs, { data: lhs }: GenRowNode, { data: rhs }: GenRowNode, _desc) => {
if (lhs === undefined) {
return 1;
}
@@ -541,7 +541,7 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
return lhs.name.localeCompare(rhs.name);
},
filterValueGetter: (data: GenValueGetterParams) => convertSearch초성(unwrap(data.data).name).join(''),
filterValueGetter: (data: GenValueGetterParams) => convertSearch초성(unwrap(data.data).name).join(""),
cellClass: [props.availableGeneralClick ? "clickable-cell" : "", ...defaultCellClass],
filter: true,
hide: false,
@@ -596,7 +596,7 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
colId: "officerLevel",
field: "officerLevelText",
sortable: true,
comparator: (a, b, c, d) => unwrap(c.data).officerLevel - unwrap(d.data).officerLevel,
comparator: (a, b, c, d, _desc) => unwrap(c.data).officerLevel - unwrap(d.data).officerLevel,
cellRenderer: ({ data }: GenValueParams) => {
if (data === undefined) {
return "";
@@ -664,7 +664,12 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
}
return `${data.dedLevelText}<br>(${data.bill.toLocaleString()})`;
},
...sortableNumber,
sortable: true,
comparator: (a, b, _a, _b, _desc) => {
return (_a.data?.dedlevel??0) - (_b.data?.dedlevel??0);
},
sortingOrder: ["desc", "asc", null],
filter: "text",
cellClass: centerCellClass,
columnGroupShow: "open",
},
@@ -688,7 +693,7 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
columnGroupShow: "closed",
sortable: true,
sortingOrder: ["desc", "asc", null],
comparator(_a, _b, { data: lhs }: GenRowNode, { data: rhs }: GenRowNode) {
comparator(_a, _b, { data: lhs }: GenRowNode, { data: rhs }: GenRowNode, _desc) {
if (lhs === undefined) {
return -1;
}
@@ -765,7 +770,7 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
},
width: 90,
sortable: true,
comparator: (valX, valB, { data: lhs }: GenRowNode, { data: rhs }: GenRowNode) => {
comparator: (valX, valB, { data: lhs }: GenRowNode, { data: rhs }: GenRowNode, _desc) => {
const troopInfoLhs = extractTroopInfo(lhs);
const troopInfoRhs = extractTroopInfo(rhs);
console.log(troopInfoLhs, troopInfoRhs);
@@ -968,7 +973,7 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
headerName: "단축",
width: 70,
cellRenderer: ({ data }: GenValueParams) => {
if(data === undefined){
if (data === undefined) {
return "?";
}
if (data.npc >= 2) {
@@ -1008,7 +1013,7 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
headerName: "전체",
width: 120,
cellRenderer: ({ data }: GenValueParams) => {
if(data === undefined){
if (data === undefined) {
return "?";
}
if (data.npc >= 2) {
@@ -1081,8 +1086,8 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
headerName: "요약",
width: 60,
cellRenderer: ({ data }: GenValueParams) => {
if(data === undefined){
return '?';
if (data === undefined) {
return "?";
}
return `${data.age}세<br>${data.belong}`;
},
@@ -1119,8 +1124,8 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
colId: "killturnAndConnect",
headerName: "삭/벌",
cellRenderer: ({ data }: GenValueParams) => {
if(data === undefined){
return '?';
if (data === undefined) {
return "?";
}
return `${data.killturn.toLocaleString()}턴<br>${data.connect.toLocaleString()}`;
},
@@ -1133,8 +1138,8 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
headerName: "삭턴",
field: "killturn",
cellRenderer: ({ data }: GenValueParams) => {
if(data === undefined){
return '?';
if (data === undefined) {
return "?";
}
return `${data.killturn.toLocaleString()}`;
},
@@ -1147,8 +1152,8 @@ const columnRawDefs = ref<Partial<Record<headerType, GenColDef | GenColGroupDef>
headerName: "벌점",
field: "connect",
cellRenderer: ({ data }: GenValueParams) => {
if(data === undefined){
return '?';
if (data === undefined) {
return "?";
}
return `${data.connect.toLocaleString()}점<br>(${formatConnectScore(data.connect)})`;
},
+2 -2
View File
@@ -1,7 +1,7 @@
import "@scss/hallOfFame.scss";
import $ from 'jquery';
import { stringifyUrl } from 'query-string';
import queryString from 'query-string';
import { initTooltip } from "@/legacy/initTooltip";
import { auto500px } from './util/auto500px';
import { htmlReady } from './util/htmlReady';
@@ -17,7 +17,7 @@ htmlReady(() => {
const scenarioIdx = $this.val();
const seasonIdx = $(this).find('option:selected').data('season');
document.location.href = stringifyUrl({
document.location.href = queryString.stringifyUrl({
url: 'a_hallOfFame.php',
query: {
scenarioIdx: scenarioIdx, seasonIdx: seasonIdx
+2 -2
View File
@@ -1,6 +1,6 @@
import "@scss/nationGeneral.scss";
import "ag-grid-community/dist/styles/ag-grid.css";
import "ag-grid-community/dist/styles/ag-theme-balham-dark.css";
import "ag-grid-community/styles/ag-grid.css";
import "ag-grid-community/styles/ag-theme-balham.css";
import "@scss/battleLog.scss";
import { createApp } from 'vue'
import PageBattleCenter from '@/PageBattleCenter.vue';
+2 -2
View File
@@ -1,6 +1,6 @@
import "@scss/nationGeneral.scss";
import "ag-grid-community/dist/styles/ag-grid.css";
import "ag-grid-community/dist/styles/ag-theme-balham-dark.css";
import "ag-grid-community/styles/ag-grid.css";
import "ag-grid-community/styles/ag-theme-balham.css";
import { createApp } from 'vue'
import PageNationGeneral from '@/PageNationGeneral.vue';