@pisell/materials 1.0.402 → 1.0.404

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.
Files changed (139) hide show
  1. package/build/lowcode/assets-daily.json +13 -13
  2. package/build/lowcode/assets-dev.json +4 -4
  3. package/build/lowcode/assets-prod.json +13 -13
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +16 -59
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +19 -62
  11. package/dist/umd/materials.min.css +1 -0
  12. package/dist/umd/materials.min.js +1 -0
  13. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  14. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  15. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  16. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  17. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  18. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  19. package/es/components/date-picker/index.js +2 -2
  20. package/es/components/drag-sort-tree/index.d.ts +1 -0
  21. package/es/components/drag-sort-tree/index.js +1 -2
  22. package/es/components/pisell-config-provider/index.js +0 -2
  23. package/es/components/pisellModal/components/functions/index.d.ts +5 -23
  24. package/es/components/pisellModal/components/functions/index.js +2 -7
  25. package/es/components/pisellModal/index.d.ts +5 -20
  26. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +3 -3
  27. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +26 -30
  28. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +1 -3
  29. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
  30. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +21 -25
  31. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
  32. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +31 -34
  33. package/es/components/table/Actions/component/ExportImport/index.d.ts +3 -3
  34. package/es/components/table/Actions/component/ExportImport/index.js +25 -32
  35. package/es/components/table/BasicTable/index.js +2 -1
  36. package/es/components/table/Gallery/index.js +1 -2
  37. package/es/components/table/Table/fields/rangePicker/Edit/index.js +11 -13
  38. package/es/components/table/Table/index.d.ts +2 -2
  39. package/es/components/table/Table/index.js +42 -68
  40. package/es/components/table/Table/index.less +0 -3
  41. package/es/components/table/Table/utils.d.ts +3 -15
  42. package/es/components/table/Table/utils.js +2 -6
  43. package/es/components/table/View/index.d.ts +2 -2
  44. package/es/components/table/View/index.js +16 -20
  45. package/es/components/table/hooks/useTableSetting.js +7 -29
  46. package/es/components/table/hooks/useTransDataSource.d.ts +0 -1
  47. package/es/components/table/hooks/useTransDataSource.js +4 -6
  48. package/es/components/table/index.js +5 -8
  49. package/es/components/table/index.less +0 -4
  50. package/es/components/table/serve.d.ts +0 -1
  51. package/es/components/table/serve.js +7 -38
  52. package/es/components/table/types.d.ts +0 -2
  53. package/es/index.d.ts +1 -3
  54. package/es/index.js +1 -3
  55. package/es/locales/en-US.d.ts +0 -12
  56. package/es/locales/en-US.js +0 -13
  57. package/es/locales/zh-CN.d.ts +0 -12
  58. package/es/locales/zh-CN.js +0 -13
  59. package/es/locales/zh-TW.d.ts +0 -12
  60. package/es/locales/zh-TW.js +0 -13
  61. package/lib/components/date-picker/index.js +2 -2
  62. package/lib/components/drag-sort-tree/index.d.ts +1 -0
  63. package/lib/components/drag-sort-tree/index.js +1 -0
  64. package/lib/components/pisell-config-provider/index.js +0 -2
  65. package/lib/components/pisellModal/components/functions/index.d.ts +5 -23
  66. package/lib/components/pisellModal/components/functions/index.js +7 -13
  67. package/lib/components/pisellModal/index.d.ts +5 -20
  68. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +3 -3
  69. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.js +2 -6
  70. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +1 -2
  71. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
  72. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.js +2 -6
  73. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
  74. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.js +2 -4
  75. package/lib/components/table/Actions/component/ExportImport/index.d.ts +3 -3
  76. package/lib/components/table/Actions/component/ExportImport/index.js +8 -13
  77. package/lib/components/table/BasicTable/index.js +2 -1
  78. package/lib/components/table/Gallery/index.js +1 -2
  79. package/lib/components/table/Table/fields/rangePicker/Edit/index.js +9 -1
  80. package/lib/components/table/Table/index.d.ts +2 -2
  81. package/lib/components/table/Table/index.js +34 -61
  82. package/lib/components/table/Table/index.less +0 -3
  83. package/lib/components/table/Table/utils.d.ts +3 -15
  84. package/lib/components/table/Table/utils.js +1 -7
  85. package/lib/components/table/View/index.d.ts +2 -2
  86. package/lib/components/table/View/index.js +19 -23
  87. package/lib/components/table/hooks/useTableSetting.js +11 -26
  88. package/lib/components/table/hooks/useTransDataSource.d.ts +0 -1
  89. package/lib/components/table/hooks/useTransDataSource.js +4 -5
  90. package/lib/components/table/index.js +4 -5
  91. package/lib/components/table/index.less +0 -4
  92. package/lib/components/table/serve.d.ts +0 -1
  93. package/lib/components/table/serve.js +4 -24
  94. package/lib/components/table/types.d.ts +0 -2
  95. package/lib/index.d.ts +1 -3
  96. package/lib/index.js +0 -6
  97. package/lib/locales/en-US.d.ts +0 -12
  98. package/lib/locales/en-US.js +0 -13
  99. package/lib/locales/zh-CN.d.ts +0 -12
  100. package/lib/locales/zh-CN.js +0 -13
  101. package/lib/locales/zh-TW.d.ts +0 -12
  102. package/lib/locales/zh-TW.js +0 -13
  103. package/package.json +3 -3
  104. package/es/components/browserSelect/chevron-down.png +0 -0
  105. package/es/components/browserSelect/index.d.ts +0 -15
  106. package/es/components/browserSelect/index.js +0 -36
  107. package/es/components/browserSelect/index.less +0 -18
  108. package/es/components/date-picker/constants.d.ts +0 -39
  109. package/es/components/date-picker/constants.js +0 -76
  110. package/es/components/date-picker/datePickerCpt.d.ts +0 -8
  111. package/es/components/date-picker/datePickerCpt.js +0 -370
  112. package/es/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
  113. package/es/components/date-picker/hooks/useMediaQuery.js +0 -28
  114. package/es/components/date-picker/index.less +0 -1880
  115. package/es/components/picker-view/index.d.ts +0 -2
  116. package/es/components/picker-view/index.js +0 -2
  117. package/es/components/pisellTags/index.d.ts +0 -13
  118. package/es/components/pisellTags/index.js +0 -83
  119. package/es/components/pisellTags/index.less +0 -17
  120. package/es/components/pisellTags/utils.d.ts +0 -1
  121. package/es/components/pisellTags/utils.js +0 -89
  122. package/lib/components/browserSelect/chevron-down.png +0 -0
  123. package/lib/components/browserSelect/index.d.ts +0 -15
  124. package/lib/components/browserSelect/index.js +0 -59
  125. package/lib/components/browserSelect/index.less +0 -18
  126. package/lib/components/date-picker/constants.d.ts +0 -39
  127. package/lib/components/date-picker/constants.js +0 -78
  128. package/lib/components/date-picker/datePickerCpt.d.ts +0 -8
  129. package/lib/components/date-picker/datePickerCpt.js +0 -403
  130. package/lib/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
  131. package/lib/components/date-picker/hooks/useMediaQuery.js +0 -43
  132. package/lib/components/date-picker/index.less +0 -1880
  133. package/lib/components/picker-view/index.d.ts +0 -2
  134. package/lib/components/picker-view/index.js +0 -36
  135. package/lib/components/pisellTags/index.d.ts +0 -13
  136. package/lib/components/pisellTags/index.js +0 -113
  137. package/lib/components/pisellTags/index.less +0 -17
  138. package/lib/components/pisellTags/utils.d.ts +0 -1
  139. package/lib/components/pisellTags/utils.js +0 -86
@@ -1,2 +0,0 @@
1
- import PickerView from 'antd-mobile/es/components/picker-view';
2
- export default PickerView;
@@ -1,2 +0,0 @@
1
- import PickerView from 'antd-mobile/es/components/picker-view';
2
- export default PickerView;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export declare type PisellTagsType = 'pill_color' | 'pill_outline';
4
- export declare type PisellTagsColor = 'success' | 'warning' | 'error' | 'gray' | string;
5
- export interface PisellTagsProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> {
6
- children?: React.ReactNode;
7
- others?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
8
- type: PisellTagsType;
9
- icon?: React.ReactNode;
10
- color?: PisellTagsColor;
11
- }
12
- declare const PisellTags: (props: PisellTagsProps) => React.JSX.Element;
13
- export default PisellTags;
@@ -1,83 +0,0 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["children", "type", "icon", "color", "style", "others"];
3
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
9
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import React, { useMemo } from 'react';
12
- import classNames from 'classnames';
13
- import { generateColorShades } from "./utils";
14
- import "./index.less";
15
-
16
- // Pisell Tags 样式类型
17
-
18
- // 预设颜色枚举
19
- var pisellTagsColors = {
20
- success: '#067647',
21
- warning: '#B54708',
22
- error: '#B42318',
23
- gray: '#344054'
24
- };
25
-
26
- /**
27
- * @title: 获取颜色
28
- * @description:
29
- * @param {PisellTagsColor} _color
30
- * @return {*}
31
- * @Author: zhiwei.Wang
32
- * @Date: 2024-08-23 16:07
33
- */
34
- var getColor = function getColor(_color) {
35
- if (_color) {
36
- return pisellTagsColors[_color] || _color;
37
- }
38
- return '#344054';
39
- };
40
- var getPillColorStyles = function getPillColorStyles(_color) {
41
- var colorShades = generateColorShades(_color);
42
- return {
43
- '--pisell-tags-bg-color': colorShades['color_50'],
44
- '--pisell-tags-font-color': colorShades['color_700'],
45
- '--pisell-tags-border-color': colorShades['color_200']
46
- };
47
- };
48
- var getPillOutlineStyles = function getPillOutlineStyles(_color) {
49
- var colorShades = generateColorShades(_color);
50
- return {
51
- '--pisell-tags-bg-color': 'transparent',
52
- '--pisell-tags-font-color': colorShades['color_700'],
53
- '--pisell-tags-border-color': colorShades['color_600']
54
- };
55
- };
56
- var PisellTags = function PisellTags(props) {
57
- var children = props.children,
58
- type = props.type,
59
- icon = props.icon,
60
- color = props.color,
61
- _props$style = props.style,
62
- style = _props$style === void 0 ? {} : _props$style,
63
- _props$others = props.others,
64
- others = _props$others === void 0 ? {} : _props$others,
65
- otherProps = _objectWithoutProperties(props, _excluded);
66
- var styles = useMemo(function () {
67
- var obj = _objectSpread(_objectSpread({}, style), others.style);
68
- var _color = getColor(props.color);
69
- if (type === 'pill_color') {
70
- obj = _objectSpread(_objectSpread({}, obj), getPillColorStyles(_color));
71
- }
72
- if (type === 'pill_outline') {
73
- obj = _objectSpread(_objectSpread({}, obj), getPillOutlineStyles(_color));
74
- }
75
- return obj;
76
- }, [color, style, others.style, type]);
77
- return /*#__PURE__*/React.createElement("span", _extends({
78
- style: _objectSpread(_objectSpread({}, styles), style)
79
- }, others, otherProps, {
80
- className: classNames('pisell-tags', others.className, otherProps.className)
81
- }), icon ? icon : null, children);
82
- };
83
- export default PisellTags;
@@ -1,17 +0,0 @@
1
- .pisell-tags {
2
- --pisell-tags-bg-color: #F9FAFB;
3
- --pisell-tags-font-color: #344054;
4
- --pisell-tags-border-color: #EAECF0;
5
- border-radius: 16px;
6
- border: 1px solid var(--pisell-tags-border-color);
7
- background: var(--pisell-tags-bg-color);
8
- display: inline-flex;
9
- padding: 4px 12px;
10
- align-items: center;
11
- gap: 6px;
12
-
13
- color: var(--pisell-tags-font-color);
14
- font-size: 14px;
15
- font-style: normal;
16
- font-weight: 500;
17
- }
@@ -1 +0,0 @@
1
- export declare const generateColorShades: (color: string) => Record<string, string>;
@@ -1,89 +0,0 @@
1
- // 定义 RGB 类型,包括 r, g, b 和可选的 a(透明度)分量
2
-
3
- // 辅助函数:将 16 进制颜色转换为 RGB
4
- var hexToRgb = function hexToRgb(hex) {
5
- hex = hex.replace(/^#/, ''); // 去掉开头的 #
6
- if (hex.length === 3) {
7
- // 处理三位颜色码,扩展为六位颜色码
8
- hex = hex.split('').map(function (h) {
9
- return h + h;
10
- }).join('');
11
- }
12
- var intVal = parseInt(hex, 16); // 将 16 进制转换为整数
13
- return {
14
- r: intVal >> 16 & 255,
15
- // 提取红色分量
16
- g: intVal >> 8 & 255,
17
- // 提取绿色分量
18
- b: intVal & 255 // 提取蓝色分量
19
- };
20
- };
21
-
22
- // 辅助函数:将 RGB 转换为 16 进制颜色
23
- var rgbToHex = function rgbToHex(r, g, b) {
24
- return '#' + [r, g, b].map(function (x) {
25
- var hex = x.toString(16); // 将数值转换为 16 进制字符串
26
- return hex.length === 1 ? '0' + hex : hex; // 确保每个分量都是两位
27
- }).join(''); // 将 RGB 分量组合为 16 进制颜色码
28
- };
29
-
30
- // 辅助函数:解析输入的颜色字符串,并返回 RGB 或 RGBA 对象
31
- var parseColor = function parseColor(color) {
32
- if (color.startsWith('#')) {
33
- return hexToRgb(color); // 处理 16 进制颜色
34
- } else if (color.startsWith('rgb')) {
35
- // 处理 RGB 或 RGBA 颜色
36
- var rgba = color.replace(/rgba?\(|\s+|\)/g, '').split(',').map(Number);
37
- return {
38
- r: rgba[0],
39
- g: rgba[1],
40
- b: rgba[2],
41
- a: rgba[3] !== undefined ? rgba[3] : 1
42
- };
43
- } else {
44
- throw new Error('无效的颜色格式');
45
- }
46
- };
47
-
48
- // 生成颜色阶梯的函数
49
- export var generateColorShades = function generateColorShades(color) {
50
- var _parseColor = parseColor(color),
51
- r = _parseColor.r,
52
- g = _parseColor.g,
53
- b = _parseColor.b,
54
- a = _parseColor.a;
55
- var max = 700;
56
- var gap = 1 / max;
57
-
58
- // 定义相对于 700 阶梯的 50, 200, 500 阶梯的比例
59
- var ratios = {
60
- 50: gap * 50,
61
- 200: gap * 200,
62
- 500: gap * 500,
63
- 600: gap * 600,
64
- 700: gap * 700
65
- };
66
-
67
- // 调整颜色分量的函数,基于比例计算新的分量值
68
- var adjustColorComponent = function adjustColorComponent(component, ratio) {
69
- return Math.round(component * ratio + 255 * (1 - ratio));
70
- };
71
-
72
- // 生成不同阶梯的颜色
73
- var shades = {
74
- 'color_50': rgbToHex(adjustColorComponent(r, ratios[50]), adjustColorComponent(g, ratios[50]), adjustColorComponent(b, ratios[50])),
75
- 'color_200': rgbToHex(adjustColorComponent(r, ratios[200]), adjustColorComponent(g, ratios[200]), adjustColorComponent(b, ratios[200])),
76
- 'color_500': rgbToHex(adjustColorComponent(r, ratios[500]), adjustColorComponent(g, ratios[500]), adjustColorComponent(b, ratios[500])),
77
- 'color_600': rgbToHex(adjustColorComponent(r, ratios[600]), adjustColorComponent(g, ratios[600]), adjustColorComponent(b, ratios[600])),
78
- 'color_700': color
79
- };
80
-
81
- // 如果原始颜色带有透明度 (RGBA),在返回结果中包含透明度信息
82
- if (a !== undefined) {
83
- shades['color_50'] = "rgba(".concat(adjustColorComponent(r, ratios[50]), ", ").concat(adjustColorComponent(g, ratios[50]), ", ").concat(adjustColorComponent(b, ratios[50]), ", ").concat(a, ")");
84
- shades['color_200'] = "rgba(".concat(adjustColorComponent(r, ratios[200]), ", ").concat(adjustColorComponent(g, ratios[200]), ", ").concat(adjustColorComponent(b, ratios[200]), ", ").concat(a, ")");
85
- shades['color_500'] = "rgba(".concat(adjustColorComponent(r, ratios[500]), ", ").concat(adjustColorComponent(g, ratios[500]), ", ").concat(adjustColorComponent(b, ratios[500]), ", ").concat(a, ")");
86
- shades['color_600'] = "rgba(".concat(adjustColorComponent(r, ratios[600]), ", ").concat(adjustColorComponent(g, ratios[600]), ", ").concat(adjustColorComponent(b, ratios[600]), ", ").concat(a, ")");
87
- }
88
- return shades;
89
- };
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- import "./index.less";
3
- interface BrowserSelectProps extends React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> {
4
- options: any[];
5
- }
6
- /**
7
- * @title: 系统级别的下拉框
8
- * @description:
9
- * @param {BrowserSelectProps} props
10
- * @return {*}
11
- * @Author: zhiwei.Wang
12
- * @Date: 2024-01-30 16:43
13
- */
14
- declare const BrowserSelect: (props: BrowserSelectProps) => React.JSX.Element;
15
- export default BrowserSelect;
@@ -1,59 +0,0 @@
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/browserSelect/index.tsx
30
- var browserSelect_exports = {};
31
- __export(browserSelect_exports, {
32
- default: () => browserSelect_default
33
- });
34
- module.exports = __toCommonJS(browserSelect_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_classnames = __toESM(require("classnames"));
37
- var import_index = require("./index.less");
38
- var BrowserSelect = (props) => {
39
- const { options, ...resetProps } = props;
40
- const _options = (0, import_react.useMemo)(() => {
41
- return (props.options || []).map((d) => {
42
- return /* @__PURE__ */ import_react.default.createElement("option", { value: d.value, key: d.value }, d.label);
43
- });
44
- }, [props.options]);
45
- return /* @__PURE__ */ import_react.default.createElement(
46
- "select",
47
- {
48
- ...resetProps,
49
- className: (0, import_classnames.default)("date-picker-pisell-browser-select", resetProps.className),
50
- onChange: (e) => {
51
- var _a;
52
- e.persist();
53
- (_a = resetProps.onChange) == null ? void 0 : _a.call(resetProps, e);
54
- }
55
- },
56
- _options
57
- );
58
- };
59
- var browserSelect_default = BrowserSelect;
@@ -1,18 +0,0 @@
1
- .date-picker-pisell-browser-select {
2
- padding: 9px 16px;
3
- border-radius: 8px;
4
- background-color: #fff;
5
- background-image: url('./chevron-down.png');
6
- color: var(--Gray-true-900, #141414);
7
- font-size: 16px;
8
- font-style: normal;
9
- font-weight: 600;
10
- border: 1px solid var(--Gray-300, #D0D5DD);
11
- cursor: pointer;
12
- appearance: none;
13
- -webkit-appearance: none;
14
- -moz-appearance: none;
15
- background-position: right 10px center;
16
- background-size: 12px;
17
- background-repeat: no-repeat;
18
- }
@@ -1,39 +0,0 @@
1
- import dayjs from 'dayjs';
2
- export declare const presetDetailMap: {
3
- today: {
4
- getValue: () => dayjs.Dayjs;
5
- label: () => any;
6
- };
7
- yesterday: {
8
- getValue: () => dayjs.Dayjs;
9
- label: () => any;
10
- };
11
- tomorrow: {
12
- getValue: () => dayjs.Dayjs;
13
- label: () => any;
14
- };
15
- next_monday: {
16
- getValue: () => dayjs.Dayjs;
17
- label: () => any;
18
- };
19
- last_friday: {
20
- getValue: () => dayjs.Dayjs;
21
- label: () => any;
22
- };
23
- first_day_of_this_month: {
24
- getValue: () => dayjs.Dayjs;
25
- label: () => any;
26
- };
27
- last_day_of_this_month: {
28
- getValue: () => dayjs.Dayjs;
29
- label: () => any;
30
- };
31
- first_day_of_next_month: {
32
- getValue: () => dayjs.Dayjs;
33
- label: () => any;
34
- };
35
- last_day_of_last_month: {
36
- getValue: () => dayjs.Dayjs;
37
- label: () => any;
38
- };
39
- };
@@ -1,78 +0,0 @@
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/date-picker/constants.ts
30
- var constants_exports = {};
31
- __export(constants_exports, {
32
- presetDetailMap: () => presetDetailMap
33
- });
34
- module.exports = __toCommonJS(constants_exports);
35
- var import_dayjs = __toESM(require("dayjs"));
36
- var import_locales = require("../../locales");
37
- var presetDetailMap = {
38
- today: {
39
- getValue: () => (0, import_dayjs.default)().startOf("day"),
40
- label: () => (0, import_locales.getText)("date-picker-today")
41
- },
42
- yesterday: {
43
- getValue: () => (0, import_dayjs.default)().add(-1, "d").startOf("day"),
44
- label: () => (0, import_locales.getText)("date-picker-yesterday")
45
- },
46
- tomorrow: {
47
- getValue: () => (0, import_dayjs.default)().add(1, "d").startOf("day"),
48
- label: () => (0, import_locales.getText)("date-picker-tomorrow")
49
- },
50
- next_monday: {
51
- getValue: () => (0, import_dayjs.default)().startOf("week").add(8, "day").startOf("day"),
52
- label: () => (0, import_locales.getText)("date-picker-next_monday")
53
- },
54
- last_friday: {
55
- getValue: () => (0, import_dayjs.default)().subtract(1, "week").startOf("week").add(5, "day").startOf("day"),
56
- label: () => (0, import_locales.getText)("date-picker-last_friday")
57
- },
58
- first_day_of_this_month: {
59
- getValue: () => (0, import_dayjs.default)().startOf("month").startOf("day"),
60
- label: () => (0, import_locales.getText)("date-picker-first_day_of_this_month")
61
- },
62
- last_day_of_this_month: {
63
- getValue: () => (0, import_dayjs.default)().endOf("month").startOf("day"),
64
- label: () => (0, import_locales.getText)("date-picker-last_day_of_this_month")
65
- },
66
- first_day_of_next_month: {
67
- getValue: () => (0, import_dayjs.default)().endOf("month").add(1, "day").startOf("day"),
68
- label: () => (0, import_locales.getText)("date-picker-first_day_of_next_month")
69
- },
70
- last_day_of_last_month: {
71
- getValue: () => (0, import_dayjs.default)().startOf("month").subtract(1, "day").startOf("day"),
72
- label: () => (0, import_locales.getText)("date-picker-last_day_of_last_month")
73
- }
74
- };
75
- // Annotate the CommonJS export names for ESM import in node:
76
- 0 && (module.exports = {
77
- presetDetailMap
78
- });
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { PickerDateProps } from 'antd/es/date-picker/generatePicker';
3
- import { Dayjs } from 'dayjs';
4
- import './index.less';
5
- interface DatePickerCptProps extends PickerDateProps<Dayjs> {
6
- }
7
- declare const DatePickerCpt: (props: DatePickerCptProps) => React.JSX.Element;
8
- export default DatePickerCpt;