@plasmicpkgs/antd5 0.0.212 → 0.0.214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/antd.esm.js +100 -41
- package/dist/antd.esm.js.map +1 -1
- package/dist/index.js +99 -40
- package/dist/index.js.map +1 -1
- package/dist/registerDatePicker.d.ts +0 -1
- package/package.json +5 -5
- package/skinny/registerDatePicker.cjs.js +64 -24
- package/skinny/registerDatePicker.cjs.js.map +1 -1
- package/skinny/registerDatePicker.d.ts +0 -1
- package/skinny/registerDatePicker.esm.js +65 -25
- package/skinny/registerDatePicker.esm.js.map +1 -1
- package/skinny/registerDateRangePicker.cjs.js +35 -16
- package/skinny/registerDateRangePicker.cjs.js.map +1 -1
- package/skinny/registerDateRangePicker.esm.js +35 -16
- package/skinny/registerDateRangePicker.esm.js.map +1 -1
package/dist/antd.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Result, Form, Checkbox, DatePicker, Radio, Select, Input, InputNumber, Avatar, Button, Collapse, ColorPicker, ConfigProvider, theme, message, notification, Drawer, Menu, Dropdown, Modal, Pagination, Popover, Progress, Rate, Segmented, Slider, Steps, Switch, Table, Tabs, Tooltip, Tree, Upload } from 'antd';
|
|
2
2
|
import equal from 'fast-deep-equal';
|
|
3
|
-
import React, {
|
|
3
|
+
import React, { isValidElement, cloneElement, useMemo, useEffect, useState, useRef } from 'react';
|
|
4
4
|
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
5
5
|
import registerGlobalContext from '@plasmicapp/host/registerGlobalContext';
|
|
6
6
|
import { deriveFieldConfigs, normalizeData, usePlasmicDataOp } from '@plasmicapp/data-sources';
|
|
@@ -658,10 +658,70 @@ var __objRest$m = (source, exclude) => {
|
|
|
658
658
|
return target;
|
|
659
659
|
};
|
|
660
660
|
function AntdDatePicker(props) {
|
|
661
|
-
const nativeInput = React.useRef(null);
|
|
662
|
-
const [open, setOpen] = useState(false);
|
|
663
|
-
const strValue = props.value && typeof props.value === "object" && "toISOString" in props.value ? props.value.toISOString() : props.value === null ? void 0 : props.value;
|
|
664
661
|
const _a = props, { picker, popupScopeClassName } = _a, rest = __objRest$m(_a, ["picker", "popupScopeClassName"]);
|
|
662
|
+
const css = `
|
|
663
|
+
|
|
664
|
+
@media(max-width: 500px) {
|
|
665
|
+
.ant-picker-dropdown {
|
|
666
|
+
top: 20px !important;
|
|
667
|
+
left: 10px !important;
|
|
668
|
+
right: 10px !important;
|
|
669
|
+
max-height: 95vh;
|
|
670
|
+
position: fixed;
|
|
671
|
+
overflow-y: scroll;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.ant-picker-panel-layout {
|
|
675
|
+
flex-direction: column;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.ant-picker-presets {
|
|
679
|
+
min-height: 50px;
|
|
680
|
+
min-width: 100%;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.ant-picker-presets > ul {
|
|
684
|
+
overflow-y: hidden;
|
|
685
|
+
overflow-x: auto;
|
|
686
|
+
display: flex;
|
|
687
|
+
align-items: center;
|
|
688
|
+
justify-content: center;
|
|
689
|
+
flex-wrap: wrap;
|
|
690
|
+
flex-direction: column;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.ant-picker-presets > ul > li {
|
|
694
|
+
margin: 0 !important;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.ant-picker-panel-container {
|
|
698
|
+
width: 300px;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.ant-picker-datetime-panel {
|
|
702
|
+
flex-direction: column;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.ant-picker-header-view {
|
|
706
|
+
line-height: unset !important;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.ant-picker-content {
|
|
710
|
+
height: unset !important;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.ant-picker-time-panel-column {
|
|
714
|
+
height: 100px;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
.ant-picker-time-panel-column::after {
|
|
718
|
+
height: 0px !important;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.ant-picker-time-panel-column::after {
|
|
722
|
+
display: none;
|
|
723
|
+
}
|
|
724
|
+
}`;
|
|
665
725
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
666
726
|
DatePicker,
|
|
667
727
|
__spreadProps$m(__spreadValues$y({}, rest), {
|
|
@@ -672,29 +732,9 @@ function AntdDatePicker(props) {
|
|
|
672
732
|
onChange: (value, _dateString) => {
|
|
673
733
|
var _a2;
|
|
674
734
|
(_a2 = props.onChange) == null ? void 0 : _a2.call(props, value !== null ? value.toISOString() : null);
|
|
675
|
-
},
|
|
676
|
-
open,
|
|
677
|
-
onOpenChange: (_open) => {
|
|
678
|
-
if (_open && window.innerWidth < 500) {
|
|
679
|
-
nativeInput.current.showPicker();
|
|
680
|
-
} else {
|
|
681
|
-
setOpen(_open);
|
|
682
|
-
}
|
|
683
735
|
}
|
|
684
736
|
})
|
|
685
|
-
), /* @__PURE__ */ React.createElement(
|
|
686
|
-
"input",
|
|
687
|
-
{
|
|
688
|
-
hidden: true,
|
|
689
|
-
ref: nativeInput,
|
|
690
|
-
type: props.showTime ? "datetime-local" : "date",
|
|
691
|
-
value: strValue || "",
|
|
692
|
-
onChange: (e) => {
|
|
693
|
-
var _a2;
|
|
694
|
-
(_a2 = props.onChange) == null ? void 0 : _a2.call(props, e.target.value);
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
));
|
|
737
|
+
), /* @__PURE__ */ React.createElement("style", { dangerouslySetInnerHTML: { __html: css } }));
|
|
698
738
|
}
|
|
699
739
|
const datePickerComponentName = "plasmic-antd5-date-picker";
|
|
700
740
|
const datePickerHelpers = {
|
|
@@ -4682,30 +4722,45 @@ function AntdDateRangePicker(props) {
|
|
|
4682
4722
|
"popupScopeClassName",
|
|
4683
4723
|
"className"
|
|
4684
4724
|
]);
|
|
4685
|
-
const popupScopeClassNameSelector = popupScopeClassName ? `.${popupScopeClassName}` : "";
|
|
4686
4725
|
const css = `
|
|
4687
|
-
@media(max-width: 900px) {
|
|
4688
|
-
.ant-picker-panels{
|
|
4689
|
-
flex-direction: column;
|
|
4690
|
-
}
|
|
4691
|
-
}
|
|
4692
|
-
|
|
4693
4726
|
@media(max-width: 500px) {
|
|
4694
|
-
|
|
4727
|
+
.ant-picker-dropdown {
|
|
4695
4728
|
top: 20px !important;
|
|
4696
4729
|
left: 10px !important;
|
|
4697
4730
|
right: 10px !important;
|
|
4698
4731
|
max-height: 95vh;
|
|
4699
4732
|
position: fixed;
|
|
4700
4733
|
overflow-y: scroll;
|
|
4701
|
-
max-width: 100vw;
|
|
4702
4734
|
}
|
|
4703
4735
|
|
|
4704
|
-
|
|
4705
|
-
|
|
4736
|
+
.ant-picker-panel-layout {
|
|
4737
|
+
flex-direction: column;
|
|
4738
|
+
}
|
|
4739
|
+
|
|
4740
|
+
.ant-picker-presets {
|
|
4741
|
+
min-height: 50px;
|
|
4742
|
+
min-width: 100% !important;
|
|
4706
4743
|
}
|
|
4707
4744
|
|
|
4708
|
-
|
|
4745
|
+
.ant-picker-presets > ul {
|
|
4746
|
+
overflow-y: hidden;
|
|
4747
|
+
overflow-x: auto;
|
|
4748
|
+
display: flex;
|
|
4749
|
+
align-items: center;
|
|
4750
|
+
justify-content: center;
|
|
4751
|
+
flex-wrap: wrap;
|
|
4752
|
+
flex-direction: column;
|
|
4753
|
+
}
|
|
4754
|
+
|
|
4755
|
+
.ant-picker-presets > ul > li {
|
|
4756
|
+
margin: 0 !important;
|
|
4757
|
+
}
|
|
4758
|
+
|
|
4759
|
+
.ant-picker-panel-container {
|
|
4760
|
+
width: 300px;
|
|
4761
|
+
}
|
|
4762
|
+
|
|
4763
|
+
.ant-picker-datetime-panel {
|
|
4709
4764
|
flex-direction: column;
|
|
4710
4765
|
}
|
|
4711
4766
|
|
|
@@ -4713,19 +4768,23 @@ function AntdDateRangePicker(props) {
|
|
|
4713
4768
|
font-size: 16px !important;
|
|
4714
4769
|
}
|
|
4715
4770
|
|
|
4716
|
-
|
|
4771
|
+
.ant-picker-header-view {
|
|
4717
4772
|
line-height: unset !important;
|
|
4718
4773
|
}
|
|
4719
4774
|
|
|
4720
|
-
|
|
4775
|
+
.ant-picker-content {
|
|
4721
4776
|
height: unset !important;
|
|
4722
4777
|
}
|
|
4723
4778
|
|
|
4724
|
-
|
|
4779
|
+
.ant-picker-time-panel-column {
|
|
4725
4780
|
height: 100px;
|
|
4726
4781
|
}
|
|
4727
4782
|
|
|
4728
|
-
|
|
4783
|
+
.ant-picker-time-panel-column::after {
|
|
4784
|
+
height: 0px !important;
|
|
4785
|
+
}
|
|
4786
|
+
|
|
4787
|
+
.ant-picker-range-arrow {
|
|
4729
4788
|
display: none;
|
|
4730
4789
|
}
|
|
4731
4790
|
}
|