@cieloazul310/jclub-financial-utils 0.0.1-alpha.7 → 0.0.1-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-fields.cjs +2 -2
- package/dist/all-fields.d.cts +1 -1
- package/dist/all-fields.d.mts +1 -1
- package/dist/all-fields.mjs +2 -2
- package/dist/all-fields.mjs.map +1 -1
- package/dist/{club-C65-tOmf.d.mts → club-XBakdLnC.d.mts} +1 -2
- package/dist/club-XBakdLnC.d.mts.map +1 -0
- package/dist/club-dictionary.cjs +1 -2
- package/dist/club-dictionary.d.cts +1 -1
- package/dist/club-dictionary.d.cts.map +1 -1
- package/dist/club-dictionary.d.mts +1 -1
- package/dist/club-dictionary.d.mts.map +1 -1
- package/dist/club-dictionary.mjs +1 -2
- package/dist/club-dictionary.mjs.map +1 -1
- package/dist/{club-DKBTnD_Q.d.cts → club-ezWWFvf8.d.cts} +1 -2
- package/dist/club-ezWWFvf8.d.cts.map +1 -0
- package/dist/{clubs-BMTfABm1.cjs → clubs-BoJOsnoJ.cjs} +77 -127
- package/dist/{clubs-ql57Bx32.mjs → clubs-CWrmJ-o7.mjs} +73 -129
- package/dist/{clubs-ql57Bx32.mjs.map → clubs-CWrmJ-o7.mjs.map} +1 -1
- package/dist/clubs.cjs +2 -1
- package/dist/clubs.d.cts +7 -2
- package/dist/clubs.d.cts.map +1 -1
- package/dist/clubs.d.mts +7 -2
- package/dist/clubs.d.mts.map +1 -1
- package/dist/clubs.mjs +2 -2
- package/dist/{data-B8fHRnNH.d.cts → data-8rg9TyXy.d.mts} +5 -5
- package/dist/{data-B8fHRnNH.d.cts.map → data-8rg9TyXy.d.mts.map} +1 -1
- package/dist/{data-DrLXADPh.cjs → data-BSgR8Eao.cjs} +1 -1
- package/dist/{data-BzqjPiVO.d.mts → data-CknytKa6.d.cts} +5 -5
- package/dist/{data-BzqjPiVO.d.mts.map → data-CknytKa6.d.cts.map} +1 -1
- package/dist/{data-C_cvAEea.mjs → data-DQ33qXdV.mjs} +2 -2
- package/dist/data-DQ33qXdV.mjs.map +1 -0
- package/dist/data.cjs +2 -2
- package/dist/data.d.cts +1 -1
- package/dist/data.d.mts +1 -1
- package/dist/data.mjs +2 -2
- package/dist/data.mjs.map +1 -1
- package/dist/dictionary-CHzb3HU_.mjs.map +1 -1
- package/dist/dictionary.d.cts +2 -2
- package/dist/dictionary.d.mts +2 -2
- package/dist/index.cjs +6 -4
- package/dist/index.d.cts +5 -5
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +4 -4
- package/dist/types/club.d.cts +1 -1
- package/dist/types/club.d.mts +1 -1
- package/dist/types/data.cjs +1 -1
- package/dist/types/data.d.cts +1 -1
- package/dist/types/data.d.mts +1 -1
- package/dist/types/data.mjs +1 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.mjs +1 -1
- package/dist/{years-B5VOLk4F.cjs → years-B04BT1Yh.mjs} +5 -7
- package/dist/years-B04BT1Yh.mjs.map +1 -0
- package/dist/{years-C6sv3Psl.mjs → years-BUUrr09E.cjs} +16 -2
- package/dist/years.cjs +3 -2
- package/dist/years.d.cts +2 -1
- package/dist/years.d.cts.map +1 -1
- package/dist/years.d.mts +2 -1
- package/dist/years.d.mts.map +1 -1
- package/dist/years.mjs +2 -2
- package/package.json +3 -3
- package/dist/club-C65-tOmf.d.mts.map +0 -1
- package/dist/club-DKBTnD_Q.d.cts.map +0 -1
- package/dist/data-C_cvAEea.mjs.map +0 -1
- package/dist/years-C6sv3Psl.mjs.map +0 -1
package/dist/all-fields.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/all-fields.ts
|
|
3
3
|
function getGeneral(datum) {
|
|
4
|
-
const { id,
|
|
4
|
+
const { id, clubId, name, short_name, year, license, category } = datum;
|
|
5
5
|
return {
|
|
6
6
|
id,
|
|
7
|
+
clubId,
|
|
7
8
|
name,
|
|
8
|
-
slug,
|
|
9
9
|
short_name,
|
|
10
10
|
year,
|
|
11
11
|
license,
|
package/dist/all-fields.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as PLFields, D as SeasonResultFields, T as RevenueFields, _ as ExtendedFinancialDatum, f as BSFields, m as ExpenseFields, u as AttdFields, v as FinancialDatum, x as GeneralFields } from "./data-
|
|
1
|
+
import { C as PLFields, D as SeasonResultFields, T as RevenueFields, _ as ExtendedFinancialDatum, f as BSFields, m as ExpenseFields, u as AttdFields, v as FinancialDatum, x as GeneralFields } from "./data-CknytKa6.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/all-fields.d.ts
|
|
4
4
|
declare function getGeneral<T extends FinancialDatum | ExtendedFinancialDatum>(datum: T): { [key in GeneralFields]: T[key] };
|
package/dist/all-fields.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as PLFields, D as SeasonResultFields, T as RevenueFields, _ as ExtendedFinancialDatum, f as BSFields, m as ExpenseFields, u as AttdFields, v as FinancialDatum, x as GeneralFields } from "./data-
|
|
1
|
+
import { C as PLFields, D as SeasonResultFields, T as RevenueFields, _ as ExtendedFinancialDatum, f as BSFields, m as ExpenseFields, u as AttdFields, v as FinancialDatum, x as GeneralFields } from "./data-8rg9TyXy.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/all-fields.d.ts
|
|
4
4
|
declare function getGeneral<T extends FinancialDatum | ExtendedFinancialDatum>(datum: T): { [key in GeneralFields]: T[key] };
|
package/dist/all-fields.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//#region src/all-fields.ts
|
|
2
2
|
function getGeneral(datum) {
|
|
3
|
-
const { id,
|
|
3
|
+
const { id, clubId, name, short_name, year, license, category } = datum;
|
|
4
4
|
return {
|
|
5
5
|
id,
|
|
6
|
+
clubId,
|
|
6
7
|
name,
|
|
7
|
-
slug,
|
|
8
8
|
short_name,
|
|
9
9
|
year,
|
|
10
10
|
license,
|
package/dist/all-fields.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-fields.mjs","names":[],"sources":["../src/all-fields.ts"],"sourcesContent":["import type {\n FinancialDatum,\n ExtendedFinancialDatum,\n GeneralFields,\n SeasonResultFields,\n PLFields,\n BSFields,\n RevenueFields,\n ExpenseFields,\n AttdFields,\n} from \"./types/data\";\n\nexport function getGeneral<T extends FinancialDatum | ExtendedFinancialDatum>(\n datum: T,\n): {\n [key in GeneralFields]: T[key];\n} {\n const { id,
|
|
1
|
+
{"version":3,"file":"all-fields.mjs","names":[],"sources":["../src/all-fields.ts"],"sourcesContent":["import type {\n FinancialDatum,\n ExtendedFinancialDatum,\n GeneralFields,\n SeasonResultFields,\n PLFields,\n BSFields,\n RevenueFields,\n ExpenseFields,\n AttdFields,\n} from \"./types/data\";\n\nexport function getGeneral<T extends FinancialDatum | ExtendedFinancialDatum>(\n datum: T,\n): {\n [key in GeneralFields]: T[key];\n} {\n const { id, clubId, name, short_name, year, license, category } = datum;\n return { id, clubId, name, short_name, year, license, category };\n}\n\nexport function getSeasonResult<\n T extends FinancialDatum | ExtendedFinancialDatum,\n>(\n datum: T,\n): {\n [key in SeasonResultFields]: T[key];\n} {\n const { rank, points, ppg, elevation } = datum;\n return { rank, points, ppg, elevation };\n}\n\nexport function getPL<T extends FinancialDatum | ExtendedFinancialDatum>(\n datum: T,\n): {\n [key in PLFields]: T[key];\n} {\n const {\n revenue,\n expense,\n op_profit,\n no_rev,\n no_exp,\n ordinary_profit,\n sp_rev,\n sp_exp,\n profit_before_tax,\n tax,\n profit,\n related_revenue,\n } = datum;\n return {\n revenue,\n expense,\n op_profit,\n no_rev,\n no_exp,\n ordinary_profit,\n sp_rev,\n sp_exp,\n profit_before_tax,\n tax,\n profit,\n related_revenue,\n };\n}\n\nexport function getBS<T extends FinancialDatum | ExtendedFinancialDatum>(\n datum: T,\n): {\n [key in BSFields]: T[key];\n} {\n const {\n assets,\n curr_assets,\n fixed_assets,\n liabilities,\n curr_liabilities,\n fixed_liabilities,\n net_worth,\n capital_stock,\n capital_surplus,\n retained_earnings,\n profit,\n } = datum;\n return {\n assets,\n curr_assets,\n fixed_assets,\n liabilities,\n curr_liabilities,\n fixed_liabilities,\n net_worth,\n capital_stock,\n capital_surplus,\n retained_earnings,\n profit,\n };\n}\n\nexport function getRevenue<T extends FinancialDatum | ExtendedFinancialDatum>(\n datum: T,\n): {\n [key in RevenueFields]: T[key];\n} {\n const {\n revenue,\n sponsor,\n ticket,\n broadcast,\n academy_rev,\n women_rev,\n goods_rev,\n transfer_rev,\n transfer_int_rev,\n transfer_dom_rev,\n other_revs,\n related_revenue,\n } = datum;\n return {\n revenue,\n sponsor,\n ticket,\n broadcast,\n academy_rev,\n women_rev,\n goods_rev,\n transfer_rev,\n transfer_int_rev,\n transfer_dom_rev,\n other_revs,\n related_revenue,\n };\n}\n\nexport function getExpense<T extends FinancialDatum | ExtendedFinancialDatum>(\n datum: T,\n): {\n [key in ExpenseFields]: T[key];\n} {\n const {\n expense,\n general_exp,\n salary,\n transfer_exp,\n transfer_int_exp,\n transfer_dom_exp,\n game_exp,\n team_exp,\n academy_exp,\n women_exp,\n goods_exp,\n other_cost,\n manage_exp,\n sga,\n } = datum;\n return {\n expense,\n general_exp,\n salary,\n transfer_exp,\n transfer_int_exp,\n transfer_dom_exp,\n game_exp,\n team_exp,\n academy_exp,\n women_exp,\n goods_exp,\n other_cost,\n manage_exp,\n sga,\n };\n}\n\nexport function getAttd<T extends FinancialDatum | ExtendedFinancialDatum>(\n datum: T,\n): {\n [key in AttdFields]: T[key];\n} {\n const {\n all_attd,\n all_games,\n average_attd,\n unit_price,\n league_attd,\n league_games,\n leaguecup_attd,\n leaguecup_games,\n po_attd,\n po_games,\n acl_attd,\n acl_games,\n second_attd,\n second_games,\n ticket,\n } = datum;\n return {\n all_attd,\n all_games,\n average_attd,\n unit_price,\n league_attd,\n league_games,\n leaguecup_attd,\n leaguecup_games,\n po_attd,\n po_games,\n acl_attd,\n acl_games,\n second_attd,\n second_games,\n ticket,\n };\n}\n"],"mappings":";AAYA,SAAgB,WACd,OAGA;CACA,MAAM,EAAE,IAAI,QAAQ,MAAM,YAAY,MAAM,SAAS,aAAa;AAClE,QAAO;EAAE;EAAI;EAAQ;EAAM;EAAY;EAAM;EAAS;EAAU;;AAGlE,SAAgB,gBAGd,OAGA;CACA,MAAM,EAAE,MAAM,QAAQ,KAAK,cAAc;AACzC,QAAO;EAAE;EAAM;EAAQ;EAAK;EAAW;;AAGzC,SAAgB,MACd,OAGA;CACA,MAAM,EACJ,SACA,SACA,WACA,QACA,QACA,iBACA,QACA,QACA,mBACA,KACA,QACA,oBACE;AACJ,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;;AAGH,SAAgB,MACd,OAGA;CACA,MAAM,EACJ,QACA,aACA,cACA,aACA,kBACA,mBACA,WACA,eACA,iBACA,mBACA,WACE;AACJ,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;;AAGH,SAAgB,WACd,OAGA;CACA,MAAM,EACJ,SACA,SACA,QACA,WACA,aACA,WACA,WACA,cACA,kBACA,kBACA,YACA,oBACE;AACJ,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;;AAGH,SAAgB,WACd,OAGA;CACA,MAAM,EACJ,SACA,aACA,QACA,cACA,kBACA,kBACA,UACA,UACA,aACA,WACA,WACA,YACA,YACA,QACE;AACJ,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;;AAGH,SAAgB,QACd,OAGA;CACA,MAAM,EACJ,UACA,WACA,cACA,YACA,aACA,cACA,gBACA,iBACA,SACA,UACA,UACA,WACA,aACA,cACA,WACE;AACJ,QAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
type ClubInfo = {
|
|
3
3
|
id: string;
|
|
4
4
|
code: string;
|
|
5
|
-
slug: string;
|
|
6
5
|
name: string;
|
|
7
6
|
fullname: string;
|
|
8
7
|
short_name: string;
|
|
@@ -18,4 +17,4 @@ type ClubInfo = {
|
|
|
18
17
|
};
|
|
19
18
|
//#endregion
|
|
20
19
|
export { ClubInfo as t };
|
|
21
|
-
//# sourceMappingURL=club-
|
|
20
|
+
//# sourceMappingURL=club-XBakdLnC.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"club-XBakdLnC.d.mts","names":[],"sources":["../src/types/club.ts"],"sourcesContent":[],"mappings":";KAAY,QAAA;EAAA,EAAA,EAAA,MAAA"}
|
package/dist/club-dictionary.cjs
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
const clubInfoDictionary = {
|
|
4
4
|
id: "id",
|
|
5
5
|
code: "code",
|
|
6
|
-
slug: "slug",
|
|
7
6
|
name: "呼称",
|
|
8
7
|
fullname: "正式名称",
|
|
9
8
|
short_name: "略称",
|
|
@@ -15,7 +14,7 @@ const clubInfoDictionary = {
|
|
|
15
14
|
website: "公式サイト",
|
|
16
15
|
settlement: "決算情報",
|
|
17
16
|
relatedCompanies: "関連する法人",
|
|
18
|
-
annotation: "
|
|
17
|
+
annotation: "注記"
|
|
19
18
|
};
|
|
20
19
|
const has = Object.prototype.hasOwnProperty;
|
|
21
20
|
function isDirectoryKey(key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"club-dictionary.d.cts","names":[],"sources":["../src/club-dictionary.ts"],"sourcesContent":[],"mappings":";;;;cAEa,oBAAoB,aAAa;;;AAA9C;
|
|
1
|
+
{"version":3,"file":"club-dictionary.d.cts","names":[],"sources":["../src/club-dictionary.ts"],"sourcesContent":[],"mappings":";;;;cAEa,oBAAoB,aAAa;;;AAA9C;AA4BA;AAWA;iBAXgB,gBAAA;;;;;;;iBAWA,2BAAA,YACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"club-dictionary.d.mts","names":[],"sources":["../src/club-dictionary.ts"],"sourcesContent":[],"mappings":";;;;cAEa,oBAAoB,aAAa;;;AAA9C;
|
|
1
|
+
{"version":3,"file":"club-dictionary.d.mts","names":[],"sources":["../src/club-dictionary.ts"],"sourcesContent":[],"mappings":";;;;cAEa,oBAAoB,aAAa;;;AAA9C;AA4BA;AAWA;iBAXgB,gBAAA;;;;;;;iBAWA,2BAAA,YACH"}
|
package/dist/club-dictionary.mjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
const clubInfoDictionary = {
|
|
3
3
|
id: "id",
|
|
4
4
|
code: "code",
|
|
5
|
-
slug: "slug",
|
|
6
5
|
name: "呼称",
|
|
7
6
|
fullname: "正式名称",
|
|
8
7
|
short_name: "略称",
|
|
@@ -14,7 +13,7 @@ const clubInfoDictionary = {
|
|
|
14
13
|
website: "公式サイト",
|
|
15
14
|
settlement: "決算情報",
|
|
16
15
|
relatedCompanies: "関連する法人",
|
|
17
|
-
annotation: "
|
|
16
|
+
annotation: "注記"
|
|
18
17
|
};
|
|
19
18
|
const has = Object.prototype.hasOwnProperty;
|
|
20
19
|
function isDirectoryKey(key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"club-dictionary.mjs","names":["clubInfoDictionary: Record<keyof ClubInfo, string>"],"sources":["../src/club-dictionary.ts"],"sourcesContent":["import type { ClubInfo } from \"./types\";\n\nexport const clubInfoDictionary: Record<keyof ClubInfo, string> = {\n id: \"id\",\n code: \"code\",\n
|
|
1
|
+
{"version":3,"file":"club-dictionary.mjs","names":["clubInfoDictionary: Record<keyof ClubInfo, string>"],"sources":["../src/club-dictionary.ts"],"sourcesContent":["import type { ClubInfo } from \"./types\";\n\nexport const clubInfoDictionary: Record<keyof ClubInfo, string> = {\n id: \"id\",\n code: \"code\",\n name: \"呼称\",\n fullname: \"正式名称\",\n short_name: \"略称\",\n company: \"法人名\",\n category: \"所属カテゴリ\",\n hometown: \"ホームタウン\",\n area: \"活動エリア\",\n period: \"決算期\",\n website: \"公式サイト\",\n settlement: \"決算情報\",\n relatedCompanies: \"関連する法人\",\n annotation: \"注記\",\n};\n\nconst has = Object.prototype.hasOwnProperty;\n\nfunction isDirectoryKey(key: string): key is keyof ClubInfo {\n return has.call(clubInfoDictionary, key);\n}\n\n/**\n * プロパティ名から日本語ラベルを取得する\n * @param key FinancialDatum のプロパティ名\n * @returns 日本語ラベル。未定義のキーの場合はキー名をそのまま返す\n */\nexport function getClubInfoLabel(key: string): string {\n if (isDirectoryKey(key)) return clubInfoDictionary[key];\n return key;\n}\n\n/**\n * プロパティ名から日本語ラベルを取得する(オプションつき)\n * @param key FinancialDatum のプロパティ名\n * @param options fallback や後処理のオプション\n * @returns 日本語ラベル\n */\nexport function getClubInfoLabelWithOptions(\n key: keyof ClubInfo,\n options?: {\n /** キーが未定義の場合のフォールバック。省略時はキー名を返す */\n fallback?: string;\n /** ラベルに対する後処理 */\n transform?: (label: string) => string;\n },\n): string {\n const label = clubInfoDictionary[key] ?? options?.fallback ?? key;\n return options?.transform ? options.transform(label) : label;\n}\n"],"mappings":";AAEA,MAAaA,qBAAqD;CAChE,IAAI;CACJ,MAAM;CACN,MAAM;CACN,UAAU;CACV,YAAY;CACZ,SAAS;CACT,UAAU;CACV,UAAU;CACV,MAAM;CACN,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,kBAAkB;CAClB,YAAY;CACb;AAED,MAAM,MAAM,OAAO,UAAU;AAE7B,SAAS,eAAe,KAAoC;AAC1D,QAAO,IAAI,KAAK,oBAAoB,IAAI;;;;;;;AAQ1C,SAAgB,iBAAiB,KAAqB;AACpD,KAAI,eAAe,IAAI,CAAE,QAAO,mBAAmB;AACnD,QAAO;;;;;;;;AAST,SAAgB,4BACd,KACA,SAMQ;CACR,MAAM,QAAQ,mBAAmB,QAAQ,SAAS,YAAY;AAC9D,QAAO,SAAS,YAAY,QAAQ,UAAU,MAAM,GAAG"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
type ClubInfo = {
|
|
3
3
|
id: string;
|
|
4
4
|
code: string;
|
|
5
|
-
slug: string;
|
|
6
5
|
name: string;
|
|
7
6
|
fullname: string;
|
|
8
7
|
short_name: string;
|
|
@@ -18,4 +17,4 @@ type ClubInfo = {
|
|
|
18
17
|
};
|
|
19
18
|
//#endregion
|
|
20
19
|
export { ClubInfo as t };
|
|
21
|
-
//# sourceMappingURL=club-
|
|
20
|
+
//# sourceMappingURL=club-ezWWFvf8.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"club-ezWWFvf8.d.cts","names":[],"sources":["../src/types/club.ts"],"sourcesContent":[],"mappings":";KAAY,QAAA;EAAA,EAAA,EAAA,MAAA"}
|