@pisell/materials 1.0.253 → 1.0.255
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +20 -29
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -29
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/segmented/index.d.ts +4 -0
- package/es/components/segmented/index.js +6 -0
- package/es/components/table/Table/fields/rangePicker/Edit/index.js +8 -7
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/locales/en-US.d.ts +7 -0
- package/es/locales/en-US.js +8 -1
- package/es/locales/zh-CN.d.ts +7 -0
- package/es/locales/zh-CN.js +8 -1
- package/es/locales/zh-TW.d.ts +7 -0
- package/es/locales/zh-TW.js +8 -1
- package/lib/components/segmented/index.d.ts +4 -0
- package/lib/components/segmented/index.js +40 -0
- package/lib/components/table/Table/fields/rangePicker/Edit/index.js +8 -7
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/locales/en-US.d.ts +7 -0
- package/lib/locales/en-US.js +8 -1
- package/lib/locales/zh-CN.d.ts +7 -0
- package/lib/locales/zh-CN.js +8 -1
- package/lib/locales/zh-TW.d.ts +7 -0
- package/lib/locales/zh-TW.js +8 -1
- package/lowcode/segmented/meta.ts +165 -0
- package/lowcode/segmented/snippets.ts +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
|
|
@@ -12,6 +12,7 @@ import { isArr, isBoolean, isString } from "@pisell/utils";
|
|
|
12
12
|
import dayjs from "dayjs";
|
|
13
13
|
import React, { forwardRef, useMemo } from "react";
|
|
14
14
|
import DatePicker from "../../../../../date-picker";
|
|
15
|
+
import { getText } from "../../../../../../locales";
|
|
15
16
|
var RangePicker = DatePicker.RangePicker;
|
|
16
17
|
var defaultFormat = "YYYY-MM-DD HH:mm:ss";
|
|
17
18
|
var Edit = function Edit(props, ref) {
|
|
@@ -42,25 +43,25 @@ var Edit = function Edit(props, ref) {
|
|
|
42
43
|
return value;
|
|
43
44
|
}, [value]);
|
|
44
45
|
var rangePresets = [{
|
|
45
|
-
label: "
|
|
46
|
+
label: getText("table-action-range-picker-presets-today"),
|
|
46
47
|
value: [dayjs().startOf("day"), dayjs().endOf("day")]
|
|
47
48
|
}, {
|
|
48
|
-
label: "
|
|
49
|
+
label: getText("table-action-range-picker-presets-yesterday"),
|
|
49
50
|
value: [dayjs().add(-1, "d").startOf("day"), dayjs().add(-1, "d").endOf("day")]
|
|
50
51
|
}, {
|
|
51
|
-
label: "
|
|
52
|
+
label: getText("table-action-range-picker-presets-last-3-day"),
|
|
52
53
|
value: [dayjs().add(-3, "d").startOf("day"), dayjs().endOf("day")]
|
|
53
54
|
}, {
|
|
54
|
-
label: "
|
|
55
|
+
label: getText("table-action-range-picker-presets-last-7-day"),
|
|
55
56
|
value: [dayjs().add(-7, "d").startOf("day"), dayjs().endOf("day")]
|
|
56
57
|
}, {
|
|
57
|
-
label: "
|
|
58
|
+
label: getText("table-action-range-picker-presets-last-14-day"),
|
|
58
59
|
value: [dayjs().add(-14, "d").startOf("day"), dayjs().endOf("day")]
|
|
59
60
|
}, {
|
|
60
|
-
label: "
|
|
61
|
+
label: getText("table-action-range-picker-presets-last-30-day"),
|
|
61
62
|
value: [dayjs().add(-30, "d").startOf("day"), dayjs().endOf("day")]
|
|
62
63
|
}, {
|
|
63
|
-
label: "
|
|
64
|
+
label: getText("table-action-range-picker-presets-last-90-day"),
|
|
64
65
|
value: [dayjs().add(-90, "d").startOf("day"), dayjs().endOf("day")]
|
|
65
66
|
}];
|
|
66
67
|
var _showTime = useMemo(function () {
|
|
@@ -146,7 +146,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
146
146
|
sort?: SortType | undefined;
|
|
147
147
|
mode: "" | "localStorage" | "remote";
|
|
148
148
|
currentViewMode: ModeType;
|
|
149
|
-
}) => ("filter_setting" | "
|
|
149
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
150
150
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
151
151
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
152
152
|
export {};
|
package/es/index.d.ts
CHANGED
|
@@ -73,3 +73,4 @@ export { default as Sort } from "./components/sort";
|
|
|
73
73
|
export { default as InputNumberRange } from "./components/input-number-range";
|
|
74
74
|
export { default as LowCodePage } from "./components/lowCodePage";
|
|
75
75
|
export { default as PickerView } from "./components/picker-view";
|
|
76
|
+
export { default as Segmented } from "./components/segmented";
|
package/es/index.js
CHANGED
|
@@ -92,4 +92,5 @@ export { default as List } from "./components/list";
|
|
|
92
92
|
export { default as Sort } from "./components/sort";
|
|
93
93
|
export { default as InputNumberRange } from "./components/input-number-range";
|
|
94
94
|
export { default as LowCodePage } from "./components/lowCodePage";
|
|
95
|
-
export { default as PickerView } from "./components/picker-view";
|
|
95
|
+
export { default as PickerView } from "./components/picker-view";
|
|
96
|
+
export { default as Segmented } from "./components/segmented";
|
package/es/locales/en-US.d.ts
CHANGED
|
@@ -28,5 +28,12 @@ declare const _default: {
|
|
|
28
28
|
"table-column-group-records": string;
|
|
29
29
|
"table-column-drag-sort-disabled-tip": string;
|
|
30
30
|
"table-action-filter-no-filter": string;
|
|
31
|
+
"table-action-range-picker-presets-today": string;
|
|
32
|
+
"table-action-range-picker-presets-yesterday": string;
|
|
33
|
+
"table-action-range-picker-presets-last-3-day": string;
|
|
34
|
+
"table-action-range-picker-presets-last-7-day": string;
|
|
35
|
+
"table-action-range-picker-presets-last-14-day": string;
|
|
36
|
+
"table-action-range-picker-presets-last-30-day": string;
|
|
37
|
+
"table-action-range-picker-presets-last-90-day": string;
|
|
31
38
|
};
|
|
32
39
|
export default _default;
|
package/es/locales/en-US.js
CHANGED
|
@@ -33,5 +33,12 @@ export default {
|
|
|
33
33
|
"table-action-column-title": "Header settings",
|
|
34
34
|
"table-column-group-records": "records",
|
|
35
35
|
"table-column-drag-sort-disabled-tip": "Automatic sorting is enabled, manual dragging is disabled.",
|
|
36
|
-
"table-action-filter-no-filter": "No filter options available."
|
|
36
|
+
"table-action-filter-no-filter": "No filter options available.",
|
|
37
|
+
"table-action-range-picker-presets-today": "Today",
|
|
38
|
+
"table-action-range-picker-presets-yesterday": "Yesterday",
|
|
39
|
+
"table-action-range-picker-presets-last-3-day": "Last 3 Days",
|
|
40
|
+
"table-action-range-picker-presets-last-7-day": "Last 7 Days",
|
|
41
|
+
"table-action-range-picker-presets-last-14-day": "Last 14 Days",
|
|
42
|
+
"table-action-range-picker-presets-last-30-day": "Last 30 Days",
|
|
43
|
+
"table-action-range-picker-presets-last-90-day": "Last 90 Days"
|
|
37
44
|
};
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -28,5 +28,12 @@ declare const _default: {
|
|
|
28
28
|
"table-column-group-records": string;
|
|
29
29
|
"table-column-drag-sort-disabled-tip": string;
|
|
30
30
|
"table-action-filter-no-filter": string;
|
|
31
|
+
"table-action-range-picker-presets-today": string;
|
|
32
|
+
"table-action-range-picker-presets-yesterday": string;
|
|
33
|
+
"table-action-range-picker-presets-last-3-day": string;
|
|
34
|
+
"table-action-range-picker-presets-last-7-day": string;
|
|
35
|
+
"table-action-range-picker-presets-last-14-day": string;
|
|
36
|
+
"table-action-range-picker-presets-last-30-day": string;
|
|
37
|
+
"table-action-range-picker-presets-last-90-day": string;
|
|
31
38
|
};
|
|
32
39
|
export default _default;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -33,5 +33,12 @@ export default {
|
|
|
33
33
|
"table-action-column-title": "表头设置",
|
|
34
34
|
"table-column-group-records": "条记录",
|
|
35
35
|
"table-column-drag-sort-disabled-tip": "已开启自动排序,无法手动拖拽",
|
|
36
|
-
"table-action-filter-no-filter": "没有可用的筛选器。"
|
|
36
|
+
"table-action-filter-no-filter": "没有可用的筛选器。",
|
|
37
|
+
"table-action-range-picker-presets-today": "今天",
|
|
38
|
+
"table-action-range-picker-presets-yesterday": "昨天",
|
|
39
|
+
"table-action-range-picker-presets-last-3-day": "过去3天",
|
|
40
|
+
"table-action-range-picker-presets-last-7-day": "过去7天",
|
|
41
|
+
"table-action-range-picker-presets-last-14-day": "过去14天",
|
|
42
|
+
"table-action-range-picker-presets-last-30-day": "过去30天",
|
|
43
|
+
"table-action-range-picker-presets-last-90-day": "过去90天"
|
|
37
44
|
};
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -28,5 +28,12 @@ declare const _default: {
|
|
|
28
28
|
"table-column-group-records": string;
|
|
29
29
|
"table-column-drag-sort-disabled-tip": string;
|
|
30
30
|
"table-action-filter-no-filter": string;
|
|
31
|
+
"table-action-range-picker-presets-today": string;
|
|
32
|
+
"table-action-range-picker-presets-yesterday": string;
|
|
33
|
+
"table-action-range-picker-presets-last-3-day": string;
|
|
34
|
+
"table-action-range-picker-presets-last-7-day": string;
|
|
35
|
+
"table-action-range-picker-presets-last-14-day": string;
|
|
36
|
+
"table-action-range-picker-presets-last-30-day": string;
|
|
37
|
+
"table-action-range-picker-presets-last-90-day": string;
|
|
31
38
|
};
|
|
32
39
|
export default _default;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -33,5 +33,12 @@ export default {
|
|
|
33
33
|
"table-action-column-title": "表頭設置",
|
|
34
34
|
"table-column-group-records": "條記錄",
|
|
35
35
|
"table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳",
|
|
36
|
-
"table-action-filter-no-filter": "沒有可用的篩選器。"
|
|
36
|
+
"table-action-filter-no-filter": "沒有可用的篩選器。",
|
|
37
|
+
"table-action-range-picker-presets-today": "今天",
|
|
38
|
+
"table-action-range-picker-presets-yesterday": "昨天",
|
|
39
|
+
"table-action-range-picker-presets-last-3-day": "過去3天",
|
|
40
|
+
"table-action-range-picker-presets-last-7-day": "過去7天",
|
|
41
|
+
"table-action-range-picker-presets-last-14-day": "過去14天",
|
|
42
|
+
"table-action-range-picker-presets-last-30-day": "過去30天",
|
|
43
|
+
"table-action-range-picker-presets-last-90-day": "過去90天"
|
|
37
44
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/segmented/index.tsx
|
|
30
|
+
var segmented_exports = {};
|
|
31
|
+
__export(segmented_exports, {
|
|
32
|
+
default: () => segmented_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(segmented_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var Segmented = (props) => {
|
|
38
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Segmented, { ...props });
|
|
39
|
+
};
|
|
40
|
+
var segmented_default = Segmented;
|
|
@@ -36,6 +36,7 @@ var import_utils = require("@pisell/utils");
|
|
|
36
36
|
var import_dayjs = __toESM(require("dayjs"));
|
|
37
37
|
var import_react = __toESM(require("react"));
|
|
38
38
|
var import_date_picker = __toESM(require("../../../../../date-picker"));
|
|
39
|
+
var import_locales = require("../../../../../../locales");
|
|
39
40
|
var { RangePicker } = import_date_picker.default;
|
|
40
41
|
var defaultFormat = "YYYY-MM-DD HH:mm:ss";
|
|
41
42
|
var Edit = (props, ref) => {
|
|
@@ -64,32 +65,32 @@ var Edit = (props, ref) => {
|
|
|
64
65
|
return value;
|
|
65
66
|
}, [value]);
|
|
66
67
|
const rangePresets = [
|
|
67
|
-
{ label: "
|
|
68
|
+
{ label: (0, import_locales.getText)("table-action-range-picker-presets-today"), value: [(0, import_dayjs.default)().startOf("day"), (0, import_dayjs.default)().endOf("day")] },
|
|
68
69
|
{
|
|
69
|
-
label: "
|
|
70
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-yesterday"),
|
|
70
71
|
value: [
|
|
71
72
|
(0, import_dayjs.default)().add(-1, "d").startOf("day"),
|
|
72
73
|
(0, import_dayjs.default)().add(-1, "d").endOf("day")
|
|
73
74
|
]
|
|
74
75
|
},
|
|
75
76
|
{
|
|
76
|
-
label: "
|
|
77
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-3-day"),
|
|
77
78
|
value: [(0, import_dayjs.default)().add(-3, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
78
79
|
},
|
|
79
80
|
{
|
|
80
|
-
label: "
|
|
81
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-7-day"),
|
|
81
82
|
value: [(0, import_dayjs.default)().add(-7, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
82
83
|
},
|
|
83
84
|
{
|
|
84
|
-
label: "
|
|
85
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-14-day"),
|
|
85
86
|
value: [(0, import_dayjs.default)().add(-14, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
|
-
label: "
|
|
89
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-30-day"),
|
|
89
90
|
value: [(0, import_dayjs.default)().add(-30, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
90
91
|
},
|
|
91
92
|
{
|
|
92
|
-
label: "
|
|
93
|
+
label: (0, import_locales.getText)("table-action-range-picker-presets-last-90-day"),
|
|
93
94
|
value: [(0, import_dayjs.default)().add(-90, "d").startOf("day"), (0, import_dayjs.default)().endOf("day")]
|
|
94
95
|
}
|
|
95
96
|
];
|
|
@@ -146,7 +146,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
146
146
|
sort?: SortType | undefined;
|
|
147
147
|
mode: "" | "localStorage" | "remote";
|
|
148
148
|
currentViewMode: ModeType;
|
|
149
|
-
}) => ("filter_setting" | "
|
|
149
|
+
}) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
|
|
150
150
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
151
151
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
152
152
|
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -73,3 +73,4 @@ export { default as Sort } from "./components/sort";
|
|
|
73
73
|
export { default as InputNumberRange } from "./components/input-number-range";
|
|
74
74
|
export { default as LowCodePage } from "./components/lowCodePage";
|
|
75
75
|
export { default as PickerView } from "./components/picker-view";
|
|
76
|
+
export { default as Segmented } from "./components/segmented";
|
package/lib/index.js
CHANGED
|
@@ -79,6 +79,7 @@ __export(src_exports, {
|
|
|
79
79
|
RecordView: () => import_record_view.default,
|
|
80
80
|
Result: () => import_antd27.Result,
|
|
81
81
|
Row: () => import_antd28.Row,
|
|
82
|
+
Segmented: () => import_segmented.default,
|
|
82
83
|
Select: () => import_select.default,
|
|
83
84
|
Skeleton: () => import_skeleton.default,
|
|
84
85
|
Slider: () => import_slider.default,
|
|
@@ -181,6 +182,7 @@ var import_sort = __toESM(require("./components/sort"));
|
|
|
181
182
|
var import_input_number_range = __toESM(require("./components/input-number-range"));
|
|
182
183
|
var import_lowCodePage = __toESM(require("./components/lowCodePage"));
|
|
183
184
|
var import_picker_view = __toESM(require("./components/picker-view"));
|
|
185
|
+
var import_segmented = __toESM(require("./components/segmented"));
|
|
184
186
|
// Annotate the CommonJS export names for ESM import in node:
|
|
185
187
|
0 && (module.exports = {
|
|
186
188
|
Affix,
|
|
@@ -233,6 +235,7 @@ var import_picker_view = __toESM(require("./components/picker-view"));
|
|
|
233
235
|
RecordView,
|
|
234
236
|
Result,
|
|
235
237
|
Row,
|
|
238
|
+
Segmented,
|
|
236
239
|
Select,
|
|
237
240
|
Skeleton,
|
|
238
241
|
Slider,
|
package/lib/locales/en-US.d.ts
CHANGED
|
@@ -28,5 +28,12 @@ declare const _default: {
|
|
|
28
28
|
"table-column-group-records": string;
|
|
29
29
|
"table-column-drag-sort-disabled-tip": string;
|
|
30
30
|
"table-action-filter-no-filter": string;
|
|
31
|
+
"table-action-range-picker-presets-today": string;
|
|
32
|
+
"table-action-range-picker-presets-yesterday": string;
|
|
33
|
+
"table-action-range-picker-presets-last-3-day": string;
|
|
34
|
+
"table-action-range-picker-presets-last-7-day": string;
|
|
35
|
+
"table-action-range-picker-presets-last-14-day": string;
|
|
36
|
+
"table-action-range-picker-presets-last-30-day": string;
|
|
37
|
+
"table-action-range-picker-presets-last-90-day": string;
|
|
31
38
|
};
|
|
32
39
|
export default _default;
|
package/lib/locales/en-US.js
CHANGED
|
@@ -51,5 +51,12 @@ var en_US_default = {
|
|
|
51
51
|
"table-action-column-title": "Header settings",
|
|
52
52
|
"table-column-group-records": "records",
|
|
53
53
|
"table-column-drag-sort-disabled-tip": "Automatic sorting is enabled, manual dragging is disabled.",
|
|
54
|
-
"table-action-filter-no-filter": "No filter options available."
|
|
54
|
+
"table-action-filter-no-filter": "No filter options available.",
|
|
55
|
+
"table-action-range-picker-presets-today": "Today",
|
|
56
|
+
"table-action-range-picker-presets-yesterday": "Yesterday",
|
|
57
|
+
"table-action-range-picker-presets-last-3-day": "Last 3 Days",
|
|
58
|
+
"table-action-range-picker-presets-last-7-day": "Last 7 Days",
|
|
59
|
+
"table-action-range-picker-presets-last-14-day": "Last 14 Days",
|
|
60
|
+
"table-action-range-picker-presets-last-30-day": "Last 30 Days",
|
|
61
|
+
"table-action-range-picker-presets-last-90-day": "Last 90 Days"
|
|
55
62
|
};
|
package/lib/locales/zh-CN.d.ts
CHANGED
|
@@ -28,5 +28,12 @@ declare const _default: {
|
|
|
28
28
|
"table-column-group-records": string;
|
|
29
29
|
"table-column-drag-sort-disabled-tip": string;
|
|
30
30
|
"table-action-filter-no-filter": string;
|
|
31
|
+
"table-action-range-picker-presets-today": string;
|
|
32
|
+
"table-action-range-picker-presets-yesterday": string;
|
|
33
|
+
"table-action-range-picker-presets-last-3-day": string;
|
|
34
|
+
"table-action-range-picker-presets-last-7-day": string;
|
|
35
|
+
"table-action-range-picker-presets-last-14-day": string;
|
|
36
|
+
"table-action-range-picker-presets-last-30-day": string;
|
|
37
|
+
"table-action-range-picker-presets-last-90-day": string;
|
|
31
38
|
};
|
|
32
39
|
export default _default;
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -51,5 +51,12 @@ var zh_CN_default = {
|
|
|
51
51
|
"table-action-column-title": "表头设置",
|
|
52
52
|
"table-column-group-records": "条记录",
|
|
53
53
|
"table-column-drag-sort-disabled-tip": "已开启自动排序,无法手动拖拽",
|
|
54
|
-
"table-action-filter-no-filter": "没有可用的筛选器。"
|
|
54
|
+
"table-action-filter-no-filter": "没有可用的筛选器。",
|
|
55
|
+
"table-action-range-picker-presets-today": "今天",
|
|
56
|
+
"table-action-range-picker-presets-yesterday": "昨天",
|
|
57
|
+
"table-action-range-picker-presets-last-3-day": "过去3天",
|
|
58
|
+
"table-action-range-picker-presets-last-7-day": "过去7天",
|
|
59
|
+
"table-action-range-picker-presets-last-14-day": "过去14天",
|
|
60
|
+
"table-action-range-picker-presets-last-30-day": "过去30天",
|
|
61
|
+
"table-action-range-picker-presets-last-90-day": "过去90天"
|
|
55
62
|
};
|
package/lib/locales/zh-TW.d.ts
CHANGED
|
@@ -28,5 +28,12 @@ declare const _default: {
|
|
|
28
28
|
"table-column-group-records": string;
|
|
29
29
|
"table-column-drag-sort-disabled-tip": string;
|
|
30
30
|
"table-action-filter-no-filter": string;
|
|
31
|
+
"table-action-range-picker-presets-today": string;
|
|
32
|
+
"table-action-range-picker-presets-yesterday": string;
|
|
33
|
+
"table-action-range-picker-presets-last-3-day": string;
|
|
34
|
+
"table-action-range-picker-presets-last-7-day": string;
|
|
35
|
+
"table-action-range-picker-presets-last-14-day": string;
|
|
36
|
+
"table-action-range-picker-presets-last-30-day": string;
|
|
37
|
+
"table-action-range-picker-presets-last-90-day": string;
|
|
31
38
|
};
|
|
32
39
|
export default _default;
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -51,5 +51,12 @@ var zh_TW_default = {
|
|
|
51
51
|
"table-action-column-title": "表頭設置",
|
|
52
52
|
"table-column-group-records": "條記錄",
|
|
53
53
|
"table-column-drag-sort-disabled-tip": "已開啟自動排序,無法手動拖曳",
|
|
54
|
-
"table-action-filter-no-filter": "沒有可用的篩選器。"
|
|
54
|
+
"table-action-filter-no-filter": "沒有可用的篩選器。",
|
|
55
|
+
"table-action-range-picker-presets-today": "今天",
|
|
56
|
+
"table-action-range-picker-presets-yesterday": "昨天",
|
|
57
|
+
"table-action-range-picker-presets-last-3-day": "過去3天",
|
|
58
|
+
"table-action-range-picker-presets-last-7-day": "過去7天",
|
|
59
|
+
"table-action-range-picker-presets-last-14-day": "過去14天",
|
|
60
|
+
"table-action-range-picker-presets-last-30-day": "過去30天",
|
|
61
|
+
"table-action-range-picker-presets-last-90-day": "過去90天"
|
|
55
62
|
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
|
|
2
|
+
import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';
|
|
3
|
+
import { uuid } from '../_utils/utils';
|
|
4
|
+
import snippets from './snippets';
|
|
5
|
+
const SegmentedMeta: ComponentMetadata = {
|
|
6
|
+
"componentName": "Segmented",
|
|
7
|
+
"title": "Segmented",
|
|
8
|
+
"docUrl": "",
|
|
9
|
+
"screenshot": "",
|
|
10
|
+
"devMode": "proCode",
|
|
11
|
+
"npm": {
|
|
12
|
+
"package": "@pisell/materials",
|
|
13
|
+
"version": "3.0.1",
|
|
14
|
+
"exportName": "Segmented",
|
|
15
|
+
"main": "src/index.tsx",
|
|
16
|
+
"destructuring": true,
|
|
17
|
+
"subName": ""
|
|
18
|
+
},
|
|
19
|
+
"configure": {
|
|
20
|
+
"props": [
|
|
21
|
+
{
|
|
22
|
+
name: 'block',
|
|
23
|
+
title: { label: '将宽度调整为父元素宽度的选项' },
|
|
24
|
+
propType: 'bool',
|
|
25
|
+
defaultValue: false,
|
|
26
|
+
setter: 'BoolSetter',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'className',
|
|
30
|
+
title: { label: 'className', tip: 'className' },
|
|
31
|
+
propType: 'string',
|
|
32
|
+
setter: 'StringSetter',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'defaultValue',
|
|
36
|
+
title: { label: '默认值', tip: '默认内容' },
|
|
37
|
+
propType: 'string',
|
|
38
|
+
setter: 'StringSetter',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'value',
|
|
42
|
+
title: { label: '当前值', tip: '当前值' },
|
|
43
|
+
propType: 'string',
|
|
44
|
+
setter: 'StringSetter'
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'disabled',
|
|
48
|
+
title: { label: '是否禁用' },
|
|
49
|
+
propType: 'bool',
|
|
50
|
+
defaultValue: false,
|
|
51
|
+
setter: 'BoolSetter',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'size',
|
|
55
|
+
title: { label: '控件大小', tip: '控件大小' },
|
|
56
|
+
setter: {
|
|
57
|
+
componentName: 'RadioGroupSetter',
|
|
58
|
+
props: {
|
|
59
|
+
options: [
|
|
60
|
+
{
|
|
61
|
+
title: '大',
|
|
62
|
+
value: 'large',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: '中',
|
|
66
|
+
value: 'middle',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: '小',
|
|
70
|
+
value: 'small',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
propType: { type: 'oneOf', value: ['large', 'middle', 'small'] },
|
|
76
|
+
defaultValue: 'middle',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'options',
|
|
80
|
+
title: { label: '可选项', tip: '可选项' },
|
|
81
|
+
propType: {
|
|
82
|
+
type: 'arrayOf',
|
|
83
|
+
value: {
|
|
84
|
+
type: 'shape',
|
|
85
|
+
value: [
|
|
86
|
+
{
|
|
87
|
+
name: 'label',
|
|
88
|
+
propType: 'string',
|
|
89
|
+
description: '选项名',
|
|
90
|
+
defaultValue: '选项名',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'value',
|
|
94
|
+
propType: ['string', 'number'],
|
|
95
|
+
description: '选项值',
|
|
96
|
+
defaultValue: '选项值',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'disabled',
|
|
100
|
+
propType: 'bool',
|
|
101
|
+
description: '是否禁用',
|
|
102
|
+
defaultValue: false,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
setter: {
|
|
108
|
+
componentName: 'ArraySetter',
|
|
109
|
+
props: {
|
|
110
|
+
itemSetter: {
|
|
111
|
+
componentName: 'ObjectSetter',
|
|
112
|
+
props: {
|
|
113
|
+
config: {
|
|
114
|
+
items: [
|
|
115
|
+
{
|
|
116
|
+
name: 'label',
|
|
117
|
+
title: '选项名',
|
|
118
|
+
setter: ['StringSetter', 'PisellI18nSetter', 'VariableSetter'],
|
|
119
|
+
isRequired: true
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: 'value',
|
|
123
|
+
title: '选项值',
|
|
124
|
+
setter: ['StringSetter', 'NumberSetter', 'VariableSetter'],
|
|
125
|
+
isRequired: true
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'disabled',
|
|
129
|
+
title: '是否禁用',
|
|
130
|
+
setter: ['BoolSetter', 'VariableSetter'],
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
initialValue: () => {
|
|
136
|
+
return {
|
|
137
|
+
label: '选项名',
|
|
138
|
+
value: uuid(),
|
|
139
|
+
disabled: false,
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
"supports": {
|
|
148
|
+
style: true,
|
|
149
|
+
events: [
|
|
150
|
+
{
|
|
151
|
+
name: 'onChange',
|
|
152
|
+
template:
|
|
153
|
+
"onChange(event,${extParams}){\n// 选项变化时的回调函数\nconsole.log('onChange',event);}",
|
|
154
|
+
},
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"component": {}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
export default {
|
|
163
|
+
...SegmentedMeta,
|
|
164
|
+
snippets
|
|
165
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '分段器',
|
|
4
|
+
screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/select-1.png',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'Segmented',
|
|
7
|
+
props: {
|
|
8
|
+
options: [
|
|
9
|
+
{
|
|
10
|
+
label: 'A',
|
|
11
|
+
value: 'A',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: 'B',
|
|
15
|
+
value: 'B',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: 'C',
|
|
19
|
+
value: 'C',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
];
|