@pisell/materials 1.0.472 → 1.0.474
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 +7 -7
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -18
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +17 -17
- package/es/components/cardMetricItem/index.less +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/index.less +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +4 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +41 -17
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +4 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +15 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/es/components/dataSourceComponents/dataSourceShow/utils.js +82 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +33 -139
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +162 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.js +135 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +35 -39
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +65 -11
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +105 -6
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +245 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +41 -12
- package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.js +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +23 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
- package/es/components/dataSourceComponents/dataSourceWrapper/index.js +17 -2
- package/es/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +7 -1
- package/es/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
- package/es/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +7 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.js +5 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
- package/es/components/dataSourceComponents/fields/Input/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/WithMode.js +17 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Email/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Email/type.js +1 -0
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Json/WithMode.js +41 -1
- package/es/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +12 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/index.js +4 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/type.js +1 -0
- package/es/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +46 -5
- package/es/components/dataSourceComponents/fields/index.js +7 -2
- package/es/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/es/components/dataSourceComponents/fields/type.js +1 -0
- package/es/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/utils.js +111 -0
- package/es/components/dataSourceComponents/hooks/useActions.js +22 -7
- package/es/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/es/components/dataSourceComponents/hooks/useComponentId.js +9 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +37 -27
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +19 -13
- package/es/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
- package/es/components/dataSourceComponents/provider/variables/utils.js +9 -0
- package/es/components/filter/components/Dropdown/index.d.ts +1 -0
- package/es/components/filter/components/Dropdown/index.js +6 -2
- package/es/components/filter/components/FilterButton/index.js +5 -3
- package/es/components/filter/components/FilterButton/types.d.ts +2 -0
- package/es/components/pisellAnchor/index.less +77 -77
- package/es/components/pisellStatisticList/index.less +1 -1
- package/es/components/pisellWalletPassCard/index.js +3 -1
- package/es/components/pisellWalletPassCard/index.less +23 -9
- package/es/components/table/Actions/index.js +16 -7
- package/es/components/table/Gallery/index.d.ts +3 -3
- package/es/components/table/Gallery/index.js +25 -7
- package/es/components/table/Gallery/index.less +1 -0
- package/es/components/table/Header/index.d.ts +10 -3
- package/es/components/table/Header/index.js +37 -11
- package/es/components/table/Header/index.less +10 -2
- package/es/components/table/Table/utils.js +4 -0
- package/es/components/table/Tabs/index.d.ts +14 -0
- package/es/components/table/Tabs/index.js +37 -0
- package/es/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/es/components/table/index.js +16 -3
- package/es/components/table/types.d.ts +14 -2
- package/es/components/typography/index.d.ts +2 -2
- package/es/components/typography/index.js +4 -3
- package/es/components/walletCard/index.d.ts +6 -4
- package/es/components/walletCard/index.js +34 -15
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/locales/en-US.d.ts +7 -0
- package/es/locales/en-US.js +16 -1
- package/es/locales/zh-CN.d.ts +7 -0
- package/es/locales/zh-CN.js +16 -1
- package/es/locales/zh-TW.d.ts +7 -0
- package/es/locales/zh-TW.js +16 -1
- package/lib/components/cardMetricItem/index.less +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/index.less +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +58 -11
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.js +38 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +10 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +44 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.d.ts +6 -0
- package/lib/components/dataSourceComponents/dataSourceShow/utils.js +95 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +29 -90
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +25 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +176 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.js +176 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +24 -37
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +20 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +53 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +17 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +73 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +77 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +236 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +20 -7
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +38 -11
- package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/index.less +5 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +57 -9
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +51 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +2 -4
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.js +14 -2
- package/lib/components/dataSourceComponents/fields/Checkbox/ReadPretty.js +3 -1
- package/lib/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
- package/lib/components/dataSourceComponents/fields/DatePicker/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.js +41 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/WithMode.js +42 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.js +39 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/index.less +14 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input/index.d.ts +6 -1
- package/lib/components/dataSourceComponents/fields/Input/index.js +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/WithMode.js +57 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.js +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/WithMode.js +30 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/ReadPretty.js +39 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +43 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/index.js +38 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/InputNumber/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +46 -5
- package/lib/components/dataSourceComponents/fields/index.js +6 -1
- package/lib/components/dataSourceComponents/fields/type.d.ts +18 -0
- package/lib/components/dataSourceComponents/fields/type.js +17 -0
- package/lib/components/dataSourceComponents/fields/utils.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/utils.js +134 -0
- package/lib/components/dataSourceComponents/hooks/useActions.js +14 -5
- package/lib/components/dataSourceComponents/hooks/useComponentId.d.ts +2 -0
- package/lib/components/dataSourceComponents/hooks/useComponentId.js +32 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +19 -2
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.d.ts +1 -1
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +29 -16
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +3 -2
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +17 -8
- package/lib/components/dataSourceComponents/provider/variables/utils.d.ts +2 -0
- package/lib/components/dataSourceComponents/provider/variables/utils.js +15 -2
- package/lib/components/filter/components/Dropdown/index.d.ts +1 -0
- package/lib/components/filter/components/Dropdown/index.js +6 -2
- package/lib/components/filter/components/FilterButton/index.js +5 -3
- package/lib/components/filter/components/FilterButton/types.d.ts +2 -0
- package/lib/components/pisellAnchor/index.less +77 -77
- package/lib/components/pisellStatisticList/index.less +1 -1
- package/lib/components/pisellWalletPassCard/index.js +1 -1
- package/lib/components/pisellWalletPassCard/index.less +23 -9
- package/lib/components/table/Actions/index.js +18 -9
- package/lib/components/table/Gallery/index.d.ts +3 -3
- package/lib/components/table/Gallery/index.js +17 -0
- package/lib/components/table/Gallery/index.less +1 -0
- package/lib/components/table/Header/index.d.ts +10 -3
- package/lib/components/table/Header/index.js +29 -4
- package/lib/components/table/Header/index.less +10 -2
- package/lib/components/table/Table/utils.js +4 -0
- package/lib/components/table/Tabs/index.d.ts +14 -0
- package/lib/components/table/Tabs/index.js +70 -0
- package/lib/components/table/hooks/useTriggerValuesChange.js +3 -0
- package/lib/components/table/index.js +17 -2
- package/lib/components/table/types.d.ts +14 -2
- package/lib/components/typography/index.d.ts +2 -2
- package/lib/components/typography/index.js +4 -3
- package/lib/components/walletCard/index.d.ts +6 -4
- package/lib/components/walletCard/index.js +24 -13
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -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/_utils/defaultSchema.ts +452 -83
- package/lowcode/_utils/type.ts +5 -0
- package/lowcode/_utils/utils.ts +1 -0
- package/lowcode/button/meta.ts +1 -2
- package/lowcode/data-source-form/constants.ts +5 -0
- package/lowcode/data-source-form/meta.ts +259 -273
- package/lowcode/data-source-form/snippets.ts +9 -0
- package/lowcode/data-source-form/utils.ts +80 -15
- package/lowcode/data-source-image/meta.ts +74 -0
- package/lowcode/data-source-image/snippets.ts +14 -0
- package/lowcode/data-source-qrcode/meta.ts +158 -0
- package/lowcode/data-source-qrcode/snippets.ts +20 -0
- package/lowcode/data-source-table/meta.ts +4577 -2285
- package/lowcode/data-source-table/snippets.ts +10 -4
- package/lowcode/data-source-table/utils.tsx +254 -0
- package/lowcode/data-source-typography/meta.ts +54 -0
- package/lowcode/data-source-typography.text/meta.ts +212 -0
- package/lowcode/data-source-typography.text/snippets.ts +12 -0
- package/lowcode/data-source-wrapper/meta.ts +243 -0
- package/lowcode/data-source-wrapper/snippets.ts +11 -0
- package/lowcode/data-source-wrapper/utils.ts +45 -0
- package/lowcode/form-item-color-picker/snippets.ts +1 -0
- package/lowcode/form-item-input/meta.ts +2 -1
- package/lowcode/form-item-input/snippets.ts +2 -1
- package/lowcode/form-item-input.email/meta.ts +284 -0
- package/lowcode/form-item-input.email/snippets.ts +35 -0
- package/lowcode/form-item-input.phone/meta.ts +295 -0
- package/lowcode/form-item-input.phone/snippets.ts +16 -0
- package/lowcode/form-item-input.text-area/meta.ts +243 -32
- package/lowcode/form-item-input.text-area/snippets.ts +2 -1
- package/lowcode/form-item-input.url/meta.ts +44 -20
- package/lowcode/form-item-input.url/snippets.ts +5 -5
- package/lowcode/table/snippets.ts +6 -0
- package/lowcode/test/meta.ts +1 -2
- package/package.json +4 -4
|
@@ -0,0 +1,38 @@
|
|
|
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/dataSourceComponents/fields/Input.Email/index.tsx
|
|
30
|
+
var Input_exports = {};
|
|
31
|
+
__export(Input_exports, {
|
|
32
|
+
default: () => Input_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Input_exports);
|
|
35
|
+
var import_utils = require("../../dataSourceForm/utils");
|
|
36
|
+
var import_WithMode = __toESM(require("./WithMode"));
|
|
37
|
+
var Email = (0, import_utils.withFormItem)(import_WithMode.default);
|
|
38
|
+
var Input_default = Email;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/dataSourceComponents/fields/Input.Email/type.ts
|
|
16
|
+
var type_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(type_exports);
|
|
@@ -36,9 +36,9 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_utils = require("@pisell/utils");
|
|
37
37
|
var JsonReadPretty = (props) => {
|
|
38
38
|
if ((0, import_utils.isString)(props.value)) {
|
|
39
|
-
return /* @__PURE__ */ import_react.default.createElement("
|
|
39
|
+
return /* @__PURE__ */ import_react.default.createElement("pre", null, props.value);
|
|
40
40
|
} else if ((0, import_utils.isPlainObject)(props.value)) {
|
|
41
|
-
return /* @__PURE__ */ import_react.default.createElement("
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement("pre", null, JSON.stringify(props.value, null, 2));
|
|
42
42
|
}
|
|
43
43
|
return null;
|
|
44
44
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const JsonWithMode:
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const JsonWithMode: React.FC<any>;
|
|
3
3
|
export default JsonWithMode;
|
|
@@ -26,14 +26,42 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
|
|
29
|
-
// src/components/dataSourceComponents/fields/Input.Json/WithMode.
|
|
29
|
+
// src/components/dataSourceComponents/fields/Input.Json/WithMode.tsx
|
|
30
30
|
var WithMode_exports = {};
|
|
31
31
|
__export(WithMode_exports, {
|
|
32
32
|
default: () => WithMode_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(WithMode_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
35
36
|
var import_antd = require("antd");
|
|
36
37
|
var import_ReadPretty = __toESM(require("./ReadPretty"));
|
|
37
38
|
var import_utils = require("../../dataSourceForm/utils");
|
|
38
|
-
var
|
|
39
|
+
var JsonInput = (props) => {
|
|
40
|
+
const { onChange, onBlur, value, ...restProps } = props;
|
|
41
|
+
const [innerValue, setInnerValue] = (0, import_react.useState)(value);
|
|
42
|
+
(0, import_react.useEffect)(() => {
|
|
43
|
+
setInnerValue(value);
|
|
44
|
+
}, [value]);
|
|
45
|
+
const handleChange = (e) => {
|
|
46
|
+
setInnerValue(e.target.value);
|
|
47
|
+
};
|
|
48
|
+
const handleBlur = (e) => {
|
|
49
|
+
if (onBlur) {
|
|
50
|
+
onBlur(e);
|
|
51
|
+
}
|
|
52
|
+
if (onChange) {
|
|
53
|
+
onChange(e.target.value);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
57
|
+
import_antd.Input.TextArea,
|
|
58
|
+
{
|
|
59
|
+
...restProps,
|
|
60
|
+
value: innerValue,
|
|
61
|
+
onChange: handleChange,
|
|
62
|
+
onBlur: handleBlur
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
var JsonWithMode = (0, import_utils.withMode)(JsonInput, import_ReadPretty.default);
|
|
39
67
|
var WithMode_default = JsonWithMode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const Json: React.FC<
|
|
2
|
+
declare const Json: React.FC<any>;
|
|
3
3
|
export default Json;
|
|
@@ -0,0 +1,39 @@
|
|
|
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/dataSourceComponents/fields/Input.Phone/ReadPretty.tsx
|
|
30
|
+
var ReadPretty_exports = {};
|
|
31
|
+
__export(ReadPretty_exports, {
|
|
32
|
+
default: () => ReadPretty_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ReadPretty_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var InputReadPretty = (props) => {
|
|
37
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, props.value);
|
|
38
|
+
};
|
|
39
|
+
var ReadPretty_default = InputReadPretty;
|
|
@@ -0,0 +1,43 @@
|
|
|
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/dataSourceComponents/fields/Input.Phone/WithMode.tsx
|
|
30
|
+
var WithMode_exports = {};
|
|
31
|
+
__export(WithMode_exports, {
|
|
32
|
+
default: () => WithMode_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(WithMode_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_ReadPretty = __toESM(require("./ReadPretty"));
|
|
38
|
+
var import_utils = require("../../dataSourceForm/utils");
|
|
39
|
+
var Phone = (props) => {
|
|
40
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { ...props, type: "tel" });
|
|
41
|
+
};
|
|
42
|
+
var PhoneWithMode = (0, import_utils.withMode)(Phone, import_ReadPretty.default);
|
|
43
|
+
var WithMode_default = PhoneWithMode;
|
|
@@ -0,0 +1,38 @@
|
|
|
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/dataSourceComponents/fields/Input.Phone/index.tsx
|
|
30
|
+
var Input_exports = {};
|
|
31
|
+
__export(Input_exports, {
|
|
32
|
+
default: () => Input_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Input_exports);
|
|
35
|
+
var import_utils = require("../../dataSourceForm/utils");
|
|
36
|
+
var import_WithMode = __toESM(require("./WithMode"));
|
|
37
|
+
var Phone = (0, import_utils.withFormItem)(import_WithMode.default);
|
|
38
|
+
var Input_default = Phone;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/dataSourceComponents/fields/Input.Phone/type.ts
|
|
16
|
+
var type_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(type_exports);
|
|
@@ -34,5 +34,9 @@ __export(InputNumber_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(InputNumber_exports);
|
|
35
35
|
var import_utils = require("../../dataSourceForm/utils");
|
|
36
36
|
var import_WithMode = __toESM(require("./WithMode"));
|
|
37
|
-
var InputNumber = (0, import_utils.withFormItem)(import_WithMode.default
|
|
37
|
+
var InputNumber = (0, import_utils.withFormItem)(import_WithMode.default, {
|
|
38
|
+
innerStyle: {
|
|
39
|
+
width: "100%"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
38
42
|
var InputNumber_default = InputNumber;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
3
3
|
options?: any;
|
|
4
|
-
optionSourceType?:
|
|
4
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
5
5
|
labelField: string;
|
|
6
6
|
valueField: string;
|
|
7
7
|
} & {
|
|
@@ -1,23 +1,64 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
declare const formFieldMap: {
|
|
3
|
+
Checkbox: import("react").FC<{}> & {
|
|
4
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
5
|
+
} & {
|
|
6
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
7
|
+
};
|
|
8
|
+
ColorPicker: import("react").FC<import("antd").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
9
|
+
DatePicker: import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
10
|
+
Input: import("react").FC<import("./Input/type").InputProps> & {
|
|
11
|
+
JSON: import("react").FC<any>;
|
|
12
|
+
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
13
|
+
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
14
|
+
URL: import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
15
|
+
Email: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
16
|
+
Phone: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
17
|
+
};
|
|
18
|
+
Radio: import("react").FC<{}> & {
|
|
19
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
20
|
+
} & {
|
|
21
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
22
|
+
};
|
|
23
|
+
Select: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
24
|
+
options?: any;
|
|
25
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
26
|
+
labelField: string;
|
|
27
|
+
valueField: string;
|
|
28
|
+
} & {
|
|
29
|
+
dataSource?: any;
|
|
30
|
+
}) => import("react").JSX.Element;
|
|
31
|
+
InputNumber: import("react").FC<any>;
|
|
32
|
+
Percent: import("react").FC<any>;
|
|
33
|
+
TimePicker: import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
34
|
+
'Input.JSON': import("react").FC<any>;
|
|
35
|
+
'Input.URL': import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
36
|
+
'Input.Password': import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
37
|
+
'Radio.Group': import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
38
|
+
'Checkbox.Group': import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
39
|
+
DateRangePicker: import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
40
|
+
};
|
|
2
41
|
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
3
42
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
4
43
|
} & {
|
|
5
44
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
6
|
-
}) | import("react").FC<import("antd").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").
|
|
7
|
-
JSON: import("react").FC<
|
|
45
|
+
}) | import("react").FC<import("antd").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
46
|
+
JSON: import("react").FC<any>;
|
|
8
47
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
9
48
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
10
49
|
URL: import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
50
|
+
Email: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
51
|
+
Phone: import("react").FC<import("antd").InputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
11
52
|
}) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
12
53
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
13
54
|
} & {
|
|
14
55
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
15
56
|
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
16
57
|
options?: any;
|
|
17
|
-
optionSourceType?:
|
|
58
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
18
59
|
labelField: string;
|
|
19
60
|
valueField: string;
|
|
20
61
|
} & {
|
|
21
62
|
dataSource?: any;
|
|
22
|
-
}) => import("react").JSX.Element) | import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
23
|
-
export { getFieldComponent };
|
|
63
|
+
}) => import("react").JSX.Element) | import("react").FC<import("antd").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
64
|
+
export { getFieldComponent, formFieldMap };
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/dataSourceComponents/fields/index.ts
|
|
30
30
|
var fields_exports = {};
|
|
31
31
|
__export(fields_exports, {
|
|
32
|
+
formFieldMap: () => formFieldMap,
|
|
32
33
|
getFieldComponent: () => getFieldComponent
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(fields_exports);
|
|
@@ -40,6 +41,7 @@ var import_Radio = __toESM(require("./Radio"));
|
|
|
40
41
|
var import_Select = __toESM(require("./Select"));
|
|
41
42
|
var import_InputNumber = __toESM(require("./InputNumber"));
|
|
42
43
|
var import_TimePicker = __toESM(require("./TimePicker"));
|
|
44
|
+
var import_DateRangePicker = __toESM(require("./DateRangePicker"));
|
|
43
45
|
var formFieldMap = {
|
|
44
46
|
Checkbox: import_Checkbox.default,
|
|
45
47
|
ColorPicker: import_ColorPicker.default,
|
|
@@ -48,17 +50,20 @@ var formFieldMap = {
|
|
|
48
50
|
Radio: import_Radio.default,
|
|
49
51
|
Select: import_Select.default,
|
|
50
52
|
InputNumber: import_InputNumber.default,
|
|
53
|
+
Percent: import_InputNumber.default,
|
|
51
54
|
TimePicker: import_TimePicker.default,
|
|
52
55
|
"Input.JSON": import_Input.default.JSON,
|
|
53
56
|
"Input.URL": import_Input.default.URL,
|
|
54
57
|
"Input.Password": import_Input.default.Password,
|
|
55
58
|
"Radio.Group": import_Radio.default.Group,
|
|
56
|
-
"Checkbox.Group": import_Checkbox.default.Group
|
|
59
|
+
"Checkbox.Group": import_Checkbox.default.Group,
|
|
60
|
+
DateRangePicker: import_DateRangePicker.default
|
|
57
61
|
};
|
|
58
62
|
var getFieldComponent = (fieldComponent) => {
|
|
59
63
|
return formFieldMap[fieldComponent];
|
|
60
64
|
};
|
|
61
65
|
// Annotate the CommonJS export names for ESM import in node:
|
|
62
66
|
0 && (module.exports = {
|
|
67
|
+
formFieldMap,
|
|
63
68
|
getFieldComponent
|
|
64
69
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Field } from '../provider/dataSource/DataSourceContext';
|
|
2
|
+
import { formFieldMap } from './index';
|
|
3
|
+
export declare type FormFieldComponentType = keyof typeof formFieldMap;
|
|
4
|
+
export declare type FilterFunctionReturnType = {
|
|
5
|
+
$eq?: any;
|
|
6
|
+
$includes?: string;
|
|
7
|
+
$in?: (string | number)[];
|
|
8
|
+
$anyOf?: (string | number)[];
|
|
9
|
+
$isTruly?: boolean;
|
|
10
|
+
$dateAfter?: string;
|
|
11
|
+
$dateBefore?: string;
|
|
12
|
+
$and?: Array<{
|
|
13
|
+
$dateAfter?: string;
|
|
14
|
+
$dateBefore?: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
export declare type FilterFunction = (value: any, field: Field) => FilterFunctionReturnType | null;
|
|
18
|
+
export declare type FormFieldFilterFuncMapType = Record<FormFieldComponentType, FilterFunction>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/components/dataSourceComponents/fields/type.ts
|
|
16
|
+
var type_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(type_exports);
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/dataSourceComponents/fields/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
formFieldFilterFuncMap: () => formFieldFilterFuncMap
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
25
|
+
var import_utils = require("@pisell/utils");
|
|
26
|
+
var formFieldFilterFuncMap = {
|
|
27
|
+
Checkbox: (value) => {
|
|
28
|
+
const key = value ? "$isTruly" : "$isFalsy";
|
|
29
|
+
return {
|
|
30
|
+
[key]: true
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
ColorPicker: (value) => {
|
|
34
|
+
return {
|
|
35
|
+
$eq: value
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
DatePicker: (value) => {
|
|
39
|
+
const [start, end] = value;
|
|
40
|
+
if (!start || !end) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const startDate = (0, import_utils.isString)(start) ? start : start.format("YYYY-MM-DD HH:mm:ss");
|
|
44
|
+
const endDate = (0, import_utils.isString)(end) ? end : end.format("YYYY-MM-DD HH:mm:ss");
|
|
45
|
+
return {
|
|
46
|
+
$and: [
|
|
47
|
+
{
|
|
48
|
+
$dateAfter: startDate
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
$dateBefore: endDate
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
Input: (value) => {
|
|
57
|
+
return {
|
|
58
|
+
$includes: value
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
Radio: (value) => {
|
|
62
|
+
return {
|
|
63
|
+
$eq: value
|
|
64
|
+
};
|
|
65
|
+
},
|
|
66
|
+
Select: (value, field) => {
|
|
67
|
+
const key = field.type === "string" ? "$in" : "$anyOf";
|
|
68
|
+
const formatValue = Array.isArray(value) ? value : [value];
|
|
69
|
+
return {
|
|
70
|
+
[key]: formatValue
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
Percent: (value) => {
|
|
74
|
+
return {
|
|
75
|
+
$eq: value
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
InputNumber: (value) => {
|
|
79
|
+
return {
|
|
80
|
+
$eq: value
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
TimePicker: (value) => {
|
|
84
|
+
return {
|
|
85
|
+
$eq: value
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
"Input.JSON": (value) => {
|
|
89
|
+
return {
|
|
90
|
+
$includes: value
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
"Input.URL": (value) => {
|
|
94
|
+
return {
|
|
95
|
+
$includes: value
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
"Input.Password": (value) => {
|
|
99
|
+
return {
|
|
100
|
+
$includes: value
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
DateRangePicker: (value) => {
|
|
104
|
+
const [start, end] = value;
|
|
105
|
+
const startDate = (0, import_utils.isString)(start) ? start : start.format("YYYY-MM-DD HH:mm:ss");
|
|
106
|
+
const endDate = (0, import_utils.isString)(end) ? end : end.format("YYYY-MM-DD HH:mm:ss");
|
|
107
|
+
return {
|
|
108
|
+
$and: [
|
|
109
|
+
{
|
|
110
|
+
$dateAfter: startDate
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
$dateBefore: endDate
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
"Radio.Group": (value) => {
|
|
119
|
+
const formatValue = Array.isArray(value) ? value : [value];
|
|
120
|
+
return {
|
|
121
|
+
$in: formatValue
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
"Checkbox.Group": (value) => {
|
|
125
|
+
const formatValue = Array.isArray(value) ? value : [value];
|
|
126
|
+
return {
|
|
127
|
+
$anyOf: formatValue
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
132
|
+
0 && (module.exports = {
|
|
133
|
+
formFieldFilterFuncMap
|
|
134
|
+
});
|