phx-react 1.3.1075 → 1.3.1076
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/cjs/components/Func/PHXUrlApply/type.d.ts +1 -1
- package/dist/cjs/components/ReportButton/ReportButton.d.ts +7 -3
- package/dist/cjs/components/ReportButton/ReportButton.js +9 -2
- package/dist/cjs/components/ReportButton/ReportButton.js.map +1 -1
- package/dist/esm/components/Func/PHXUrlApply/type.d.ts +1 -1
- package/dist/esm/components/ReportButton/ReportButton.d.ts +7 -3
- package/dist/esm/components/ReportButton/ReportButton.js +9 -2
- package/dist/esm/components/ReportButton/ReportButton.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReadonlyURLSearchParams } from 'next/navigation';
|
|
2
|
-
export type KeyParams = 'year' | 'semester' | 'month' | 'education_level' | 'grade' | 'classroom' | 'program' | 'tuition_group_type' | 'tuition_service_type' | 'tuition_campaign_type' | 'tuition_project_code' | 'export_import_module' | 'export_import_status' | 'civilized_point_group' | 'civilized_point_content' | 'civilized_point_method' | 'civilized_point_classification' | 'bus_status' | 'bus_route' | 'bus_direction' | 'bus_pickup_type' | 'bus_service_type' | 'district' | 'import_student_identity' | 'store_campaign' | 'store_method' | 'store_category' | 'user_type' | 'department';
|
|
2
|
+
export type KeyParams = 'year' | 'semester' | 'month' | 'education_level' | 'grade' | 'classroom' | 'program' | 'tuition_group_type' | 'tuition_service_type' | 'tuition_campaign_type' | 'tuition_project_code' | 'export_import_module' | 'export_import_status' | 'civilized_point_group' | 'civilized_point_content' | 'civilized_point_method' | 'civilized_point_classification' | 'bus_status' | 'bus_route' | 'bus_direction' | 'bus_pickup_type' | 'bus_service_type' | 'district' | 'import_student_identity' | 'store_campaign' | 'store_method' | 'store_category' | 'user_type' | 'department' | 'tab';
|
|
3
3
|
export type ConfigUrlApply = {
|
|
4
4
|
router: any;
|
|
5
5
|
searchParams: ReadonlyURLSearchParams;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ConfigUrlApply, KeyParams } from '../Func/PHXUrlApply/type';
|
|
2
3
|
export type TabItem = {
|
|
3
|
-
name:
|
|
4
|
+
name: ReactNode;
|
|
4
5
|
count: number;
|
|
5
6
|
value: string;
|
|
7
|
+
key?: KeyParams;
|
|
8
|
+
listKeyReset?: Array<KeyParams>;
|
|
6
9
|
};
|
|
7
10
|
type Props = {
|
|
8
11
|
tabs: Array<TabItem>;
|
|
@@ -10,6 +13,7 @@ type Props = {
|
|
|
10
13
|
loading?: boolean;
|
|
11
14
|
onChange(value: string): void;
|
|
12
15
|
className?: string;
|
|
16
|
+
configUrlApply?: ConfigUrlApply;
|
|
13
17
|
};
|
|
14
|
-
export declare const PHXReportButtonTab: ({ tabs, activeTab, loading, onChange, className }: Props) => React.JSX.Element;
|
|
18
|
+
export declare const PHXReportButtonTab: ({ tabs, activeTab, loading, onChange, className, configUrlApply, }: Props) => React.JSX.Element;
|
|
15
19
|
export {};
|
|
@@ -4,10 +4,17 @@ exports.PHXReportButtonTab = void 0;
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
var Skeleton_1 = require("../Skeleton");
|
|
7
|
+
var PHXUrlApply_1 = tslib_1.__importDefault(require("../Func/PHXUrlApply/PHXUrlApply"));
|
|
7
8
|
var PHXReportButtonTab = function (_a) {
|
|
8
|
-
var tabs = _a.tabs, activeTab = _a.activeTab, _b = _a.loading, loading = _b === void 0 ? false : _b, onChange = _a.onChange, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
9
|
+
var tabs = _a.tabs, activeTab = _a.activeTab, _b = _a.loading, loading = _b === void 0 ? false : _b, onChange = _a.onChange, _c = _a.className, className = _c === void 0 ? '' : _c, configUrlApply = _a.configUrlApply;
|
|
10
|
+
var handleClick = function (item) {
|
|
11
|
+
onChange(item.value);
|
|
12
|
+
if (configUrlApply && item.key) {
|
|
13
|
+
(0, PHXUrlApply_1["default"])(item.key, item.value, item.listKeyReset || [], configUrlApply);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
9
16
|
return (react_1["default"].createElement("div", { className: "w-full overflow-x-auto pb-4 ".concat(className) },
|
|
10
|
-
react_1["default"].createElement("div", { className: 'flex w-full flex-col gap-4 sm:flex-row' }, tabs.map(function (item) { return (react_1["default"].createElement("div", { key: item.value, className: 'sm:w-1/2 w-full min-w-[120px] flex-1' }, loading ? (react_1["default"].createElement(Skeleton_1.PHXSkeleton, { size: 'extra-large', type: 'only-report' })) : (react_1["default"].createElement("div", { role: 'button', onClick: function () { return
|
|
17
|
+
react_1["default"].createElement("div", { className: 'flex w-full flex-col gap-4 sm:flex-row' }, tabs.map(function (item) { return (react_1["default"].createElement("div", { key: item.value, className: 'sm:w-1/2 w-full min-w-[120px] flex-1' }, loading ? (react_1["default"].createElement(Skeleton_1.PHXSkeleton, { size: 'extra-large', type: 'only-report' })) : (react_1["default"].createElement("div", { role: 'button', onClick: function () { return handleClick(item); }, className: "w-full cursor-pointer rounded-xl px-4 py-5 sm:p-6 transition-all \n ".concat(activeTab === item.value ? 'bg-gray-100' : 'bg-white hover:bg-gray-100') },
|
|
11
18
|
react_1["default"].createElement("p", { className: 'text-left text-[13px] text-gray-600' }, item.name),
|
|
12
19
|
react_1["default"].createElement("p", { className: 'text-left text-[24px] font-semibold text-black' }, item.count))))); }))));
|
|
13
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportButton.js","sourceRoot":"","sources":["../../../../src/components/ReportButton/ReportButton.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ReportButton.js","sourceRoot":"","sources":["../../../../src/components/ReportButton/ReportButton.tsx"],"names":[],"mappings":";;;;AAAA,wDAAwC;AACxC,wCAAyC;AAEzC,wFAAyD;AAkBlD,IAAM,kBA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CY,QAAA,kBAAkB,sBAsC9B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReadonlyURLSearchParams } from 'next/navigation';
|
|
2
|
-
export type KeyParams = 'year' | 'semester' | 'month' | 'education_level' | 'grade' | 'classroom' | 'program' | 'tuition_group_type' | 'tuition_service_type' | 'tuition_campaign_type' | 'tuition_project_code' | 'export_import_module' | 'export_import_status' | 'civilized_point_group' | 'civilized_point_content' | 'civilized_point_method' | 'civilized_point_classification' | 'bus_status' | 'bus_route' | 'bus_direction' | 'bus_pickup_type' | 'bus_service_type' | 'district' | 'import_student_identity' | 'store_campaign' | 'store_method' | 'store_category' | 'user_type' | 'department';
|
|
2
|
+
export type KeyParams = 'year' | 'semester' | 'month' | 'education_level' | 'grade' | 'classroom' | 'program' | 'tuition_group_type' | 'tuition_service_type' | 'tuition_campaign_type' | 'tuition_project_code' | 'export_import_module' | 'export_import_status' | 'civilized_point_group' | 'civilized_point_content' | 'civilized_point_method' | 'civilized_point_classification' | 'bus_status' | 'bus_route' | 'bus_direction' | 'bus_pickup_type' | 'bus_service_type' | 'district' | 'import_student_identity' | 'store_campaign' | 'store_method' | 'store_category' | 'user_type' | 'department' | 'tab';
|
|
3
3
|
export type ConfigUrlApply = {
|
|
4
4
|
router: any;
|
|
5
5
|
searchParams: ReadonlyURLSearchParams;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ConfigUrlApply, KeyParams } from '../Func/PHXUrlApply/type';
|
|
2
3
|
export type TabItem = {
|
|
3
|
-
name:
|
|
4
|
+
name: ReactNode;
|
|
4
5
|
count: number;
|
|
5
6
|
value: string;
|
|
7
|
+
key?: KeyParams;
|
|
8
|
+
listKeyReset?: Array<KeyParams>;
|
|
6
9
|
};
|
|
7
10
|
type Props = {
|
|
8
11
|
tabs: Array<TabItem>;
|
|
@@ -10,6 +13,7 @@ type Props = {
|
|
|
10
13
|
loading?: boolean;
|
|
11
14
|
onChange(value: string): void;
|
|
12
15
|
className?: string;
|
|
16
|
+
configUrlApply?: ConfigUrlApply;
|
|
13
17
|
};
|
|
14
|
-
export declare const PHXReportButtonTab: ({ tabs, activeTab, loading, onChange, className }: Props) => React.JSX.Element;
|
|
18
|
+
export declare const PHXReportButtonTab: ({ tabs, activeTab, loading, onChange, className, configUrlApply, }: Props) => React.JSX.Element;
|
|
15
19
|
export {};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PHXSkeleton } from '../Skeleton';
|
|
3
|
+
import PHXUrlApply from '../Func/PHXUrlApply/PHXUrlApply';
|
|
3
4
|
export var PHXReportButtonTab = function (_a) {
|
|
4
|
-
var tabs = _a.tabs, activeTab = _a.activeTab, _b = _a.loading, loading = _b === void 0 ? false : _b, onChange = _a.onChange, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
5
|
+
var tabs = _a.tabs, activeTab = _a.activeTab, _b = _a.loading, loading = _b === void 0 ? false : _b, onChange = _a.onChange, _c = _a.className, className = _c === void 0 ? '' : _c, configUrlApply = _a.configUrlApply;
|
|
6
|
+
var handleClick = function (item) {
|
|
7
|
+
onChange(item.value);
|
|
8
|
+
if (configUrlApply && item.key) {
|
|
9
|
+
PHXUrlApply(item.key, item.value, item.listKeyReset || [], configUrlApply);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
5
12
|
return (React.createElement("div", { className: "w-full overflow-x-auto pb-4 ".concat(className) },
|
|
6
|
-
React.createElement("div", { className: 'flex w-full flex-col gap-4 sm:flex-row' }, tabs.map(function (item) { return (React.createElement("div", { key: item.value, className: 'sm:w-1/2 w-full min-w-[120px] flex-1' }, loading ? (React.createElement(PHXSkeleton, { size: 'extra-large', type: 'only-report' })) : (React.createElement("div", { role: 'button', onClick: function () { return
|
|
13
|
+
React.createElement("div", { className: 'flex w-full flex-col gap-4 sm:flex-row' }, tabs.map(function (item) { return (React.createElement("div", { key: item.value, className: 'sm:w-1/2 w-full min-w-[120px] flex-1' }, loading ? (React.createElement(PHXSkeleton, { size: 'extra-large', type: 'only-report' })) : (React.createElement("div", { role: 'button', onClick: function () { return handleClick(item); }, className: "w-full cursor-pointer rounded-xl px-4 py-5 sm:p-6 transition-all \n ".concat(activeTab === item.value ? 'bg-gray-100' : 'bg-white hover:bg-gray-100') },
|
|
7
14
|
React.createElement("p", { className: 'text-left text-[13px] text-gray-600' }, item.name),
|
|
8
15
|
React.createElement("p", { className: 'text-left text-[24px] font-semibold text-black' }, item.count))))); }))));
|
|
9
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportButton.js","sourceRoot":"","sources":["../../../../src/components/ReportButton/ReportButton.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ReportButton.js","sourceRoot":"","sources":["../../../../src/components/ReportButton/ReportButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,WAAW,MAAM,iCAAiC,CAAA;AAkBzD,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAC,EAO3B;QANN,IAAI,UAAA,EACJ,SAAS,eAAA,EACT,eAAe,EAAf,OAAO,mBAAG,KAAK,KAAA,EACf,QAAQ,cAAA,EACR,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,cAAc,oBAAA;IAEd,IAAM,WAAW,GAAG,UAAC,IAAa;QAChC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEpB,IAAI,cAAc,IAAI,IAAI,CAAC,GAAG,EAAE;YAC9B,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,IAAI,EAAE,EAAE,cAAc,CAAC,CAAA;SAC3E;IACH,CAAC,CAAA;IACD,OAAO,CACL,6BAAK,SAAS,EAAE,sCAA+B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