@next-bricks/presentational 1.9.0 → 1.10.0

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/types.json CHANGED
@@ -1557,6 +1557,171 @@
1557
1557
  "events": [],
1558
1558
  "methods": []
1559
1559
  },
1560
+ "eo-alert": {
1561
+ "properties": [
1562
+ {
1563
+ "name": "type",
1564
+ "annotation": {
1565
+ "type": "reference",
1566
+ "typeName": {
1567
+ "type": "identifier",
1568
+ "name": "AlertType"
1569
+ }
1570
+ }
1571
+ },
1572
+ {
1573
+ "name": "hasTitle",
1574
+ "annotation": {
1575
+ "type": "keyword",
1576
+ "value": "boolean"
1577
+ }
1578
+ },
1579
+ {
1580
+ "name": "showIcon",
1581
+ "annotation": {
1582
+ "type": "keyword",
1583
+ "value": "boolean"
1584
+ }
1585
+ },
1586
+ {
1587
+ "name": "closable",
1588
+ "annotation": {
1589
+ "type": "keyword",
1590
+ "value": "boolean"
1591
+ }
1592
+ },
1593
+ {
1594
+ "name": "localStorageKey",
1595
+ "annotation": {
1596
+ "type": "keyword",
1597
+ "value": "string"
1598
+ }
1599
+ },
1600
+ {
1601
+ "name": "disableUrlNamespace",
1602
+ "annotation": {
1603
+ "type": "keyword",
1604
+ "value": "boolean"
1605
+ }
1606
+ }
1607
+ ],
1608
+ "events": [],
1609
+ "methods": [],
1610
+ "types": [
1611
+ {
1612
+ "type": "enum",
1613
+ "name": "AlertType",
1614
+ "members": [
1615
+ {
1616
+ "type": "enumMember",
1617
+ "id": {
1618
+ "type": "jsLiteral",
1619
+ "value": "SUCCESS"
1620
+ },
1621
+ "initializer": {
1622
+ "type": "jsLiteral",
1623
+ "value": "success"
1624
+ }
1625
+ },
1626
+ {
1627
+ "type": "enumMember",
1628
+ "id": {
1629
+ "type": "jsLiteral",
1630
+ "value": "INFO"
1631
+ },
1632
+ "initializer": {
1633
+ "type": "jsLiteral",
1634
+ "value": "info"
1635
+ }
1636
+ },
1637
+ {
1638
+ "type": "enumMember",
1639
+ "id": {
1640
+ "type": "jsLiteral",
1641
+ "value": "WARNING"
1642
+ },
1643
+ "initializer": {
1644
+ "type": "jsLiteral",
1645
+ "value": "warning"
1646
+ }
1647
+ },
1648
+ {
1649
+ "type": "enumMember",
1650
+ "id": {
1651
+ "type": "jsLiteral",
1652
+ "value": "ERROR"
1653
+ },
1654
+ "initializer": {
1655
+ "type": "jsLiteral",
1656
+ "value": "error"
1657
+ }
1658
+ }
1659
+ ]
1660
+ }
1661
+ ]
1662
+ },
1663
+ "eo-code-display": {
1664
+ "properties": [
1665
+ {
1666
+ "name": "value",
1667
+ "annotation": {
1668
+ "type": "keyword",
1669
+ "value": "string"
1670
+ }
1671
+ },
1672
+ {
1673
+ "name": "language",
1674
+ "annotation": {
1675
+ "type": "keyword",
1676
+ "value": "string"
1677
+ }
1678
+ },
1679
+ {
1680
+ "name": "hideLineNumber",
1681
+ "annotation": {
1682
+ "type": "keyword",
1683
+ "value": "boolean"
1684
+ }
1685
+ },
1686
+ {
1687
+ "name": "maxLines",
1688
+ "annotation": {
1689
+ "type": "keyword",
1690
+ "value": "number"
1691
+ }
1692
+ },
1693
+ {
1694
+ "name": "minLines",
1695
+ "annotation": {
1696
+ "type": "keyword",
1697
+ "value": "number"
1698
+ }
1699
+ },
1700
+ {
1701
+ "name": "showCopyButton",
1702
+ "annotation": {
1703
+ "type": "keyword",
1704
+ "value": "boolean"
1705
+ }
1706
+ },
1707
+ {
1708
+ "name": "showExportButton",
1709
+ "annotation": {
1710
+ "type": "keyword",
1711
+ "value": "boolean"
1712
+ }
1713
+ },
1714
+ {
1715
+ "name": "exportFileName",
1716
+ "annotation": {
1717
+ "type": "keyword",
1718
+ "value": "string"
1719
+ }
1720
+ }
1721
+ ],
1722
+ "events": [],
1723
+ "methods": []
1724
+ },
1560
1725
  "eo-pagination": {
1561
1726
  "properties": [
1562
1727
  {
@@ -1668,6 +1833,22 @@
1668
1833
  "value": "string"
1669
1834
  }
1670
1835
  },
1836
+ {
1837
+ "name": "type",
1838
+ "annotation": {
1839
+ "type": "union",
1840
+ "types": [
1841
+ {
1842
+ "type": "jsLiteral",
1843
+ "value": "datetime"
1844
+ },
1845
+ {
1846
+ "type": "jsLiteral",
1847
+ "value": "date"
1848
+ }
1849
+ ]
1850
+ }
1851
+ },
1671
1852
  {
1672
1853
  "name": "isCostTime",
1673
1854
  "annotation": {
@@ -1741,170 +1922,5 @@
1741
1922
  ]
1742
1923
  }
1743
1924
  ]
1744
- },
1745
- "eo-alert": {
1746
- "properties": [
1747
- {
1748
- "name": "type",
1749
- "annotation": {
1750
- "type": "reference",
1751
- "typeName": {
1752
- "type": "identifier",
1753
- "name": "AlertType"
1754
- }
1755
- }
1756
- },
1757
- {
1758
- "name": "hasTitle",
1759
- "annotation": {
1760
- "type": "keyword",
1761
- "value": "boolean"
1762
- }
1763
- },
1764
- {
1765
- "name": "showIcon",
1766
- "annotation": {
1767
- "type": "keyword",
1768
- "value": "boolean"
1769
- }
1770
- },
1771
- {
1772
- "name": "closable",
1773
- "annotation": {
1774
- "type": "keyword",
1775
- "value": "boolean"
1776
- }
1777
- },
1778
- {
1779
- "name": "localStorageKey",
1780
- "annotation": {
1781
- "type": "keyword",
1782
- "value": "string"
1783
- }
1784
- },
1785
- {
1786
- "name": "disableUrlNamespace",
1787
- "annotation": {
1788
- "type": "keyword",
1789
- "value": "boolean"
1790
- }
1791
- }
1792
- ],
1793
- "events": [],
1794
- "methods": [],
1795
- "types": [
1796
- {
1797
- "type": "enum",
1798
- "name": "AlertType",
1799
- "members": [
1800
- {
1801
- "type": "enumMember",
1802
- "id": {
1803
- "type": "jsLiteral",
1804
- "value": "SUCCESS"
1805
- },
1806
- "initializer": {
1807
- "type": "jsLiteral",
1808
- "value": "success"
1809
- }
1810
- },
1811
- {
1812
- "type": "enumMember",
1813
- "id": {
1814
- "type": "jsLiteral",
1815
- "value": "INFO"
1816
- },
1817
- "initializer": {
1818
- "type": "jsLiteral",
1819
- "value": "info"
1820
- }
1821
- },
1822
- {
1823
- "type": "enumMember",
1824
- "id": {
1825
- "type": "jsLiteral",
1826
- "value": "WARNING"
1827
- },
1828
- "initializer": {
1829
- "type": "jsLiteral",
1830
- "value": "warning"
1831
- }
1832
- },
1833
- {
1834
- "type": "enumMember",
1835
- "id": {
1836
- "type": "jsLiteral",
1837
- "value": "ERROR"
1838
- },
1839
- "initializer": {
1840
- "type": "jsLiteral",
1841
- "value": "error"
1842
- }
1843
- }
1844
- ]
1845
- }
1846
- ]
1847
- },
1848
- "eo-code-display": {
1849
- "properties": [
1850
- {
1851
- "name": "value",
1852
- "annotation": {
1853
- "type": "keyword",
1854
- "value": "string"
1855
- }
1856
- },
1857
- {
1858
- "name": "language",
1859
- "annotation": {
1860
- "type": "keyword",
1861
- "value": "string"
1862
- }
1863
- },
1864
- {
1865
- "name": "hideLineNumber",
1866
- "annotation": {
1867
- "type": "keyword",
1868
- "value": "boolean"
1869
- }
1870
- },
1871
- {
1872
- "name": "maxLines",
1873
- "annotation": {
1874
- "type": "keyword",
1875
- "value": "number"
1876
- }
1877
- },
1878
- {
1879
- "name": "minLines",
1880
- "annotation": {
1881
- "type": "keyword",
1882
- "value": "number"
1883
- }
1884
- },
1885
- {
1886
- "name": "showCopyButton",
1887
- "annotation": {
1888
- "type": "keyword",
1889
- "value": "boolean"
1890
- }
1891
- },
1892
- {
1893
- "name": "showExportButton",
1894
- "annotation": {
1895
- "type": "keyword",
1896
- "value": "boolean"
1897
- }
1898
- },
1899
- {
1900
- "name": "exportFileName",
1901
- "annotation": {
1902
- "type": "keyword",
1903
- "value": "string"
1904
- }
1905
- }
1906
- ],
1907
- "events": [],
1908
- "methods": []
1909
1925
  }
1910
1926
  }
@@ -14,6 +14,7 @@ export interface EoHumanizeTimeProps {
14
14
  isCostTime?: boolean;
15
15
  inputFormat?: string;
16
16
  outputFormat?: string;
17
+ type?: "datetime" | "date";
17
18
  link?: LinkInfo;
18
19
  }
19
20
  /**
@@ -33,6 +34,11 @@ export declare class EoHumanizeTime extends ReactNextElement {
33
34
  * 展示时间格式,如 "YYYY-MM-DD",当设置该属性时,属性 `formatter` 无效 [时间格式参照表](https://day.js.org/docs/en/display/format)
34
35
  */
35
36
  accessor outputFormat: string;
37
+ /**
38
+ * 使用日期+时间格式输出还是仅日期。
39
+ * @default "datetime"
40
+ */
41
+ accessor type: "datetime" | "date";
36
42
  /**
37
43
  * 是否展示为耗费时间,例如:'1 个月 20 天'
38
44
  */
@@ -54,4 +60,4 @@ export declare class EoHumanizeTime extends ReactNextElement {
54
60
  connectedCallback(): void;
55
61
  render(): React.JSX.Element;
56
62
  }
57
- export declare function HumanizeTimeComponent({ value, isMicrosecond, inputFormat, outputFormat, isCostTime, formatter, link, }: EoHumanizeTimeProps): React.JSX.Element;
63
+ export declare function HumanizeTimeComponent({ value, type, isMicrosecond, inputFormat, outputFormat, isCostTime, formatter, link, }: EoHumanizeTimeProps): React.JSX.Element;
@@ -61,3 +61,13 @@
61
61
  outputFormat: LLL
62
62
  value: "2020-02-27 16:36"
63
63
  ```
64
+
65
+ ### 仅日期
66
+
67
+ ```yaml preview
68
+ - brick: eo-humanize-time
69
+ properties:
70
+ formatter: full
71
+ type: date
72
+ value: 1714026348
73
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/presentational",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/presentational",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,5 +44,5 @@
44
44
  "@next-bricks/containers": "*",
45
45
  "@next-bricks/icons": "*"
46
46
  },
47
- "gitHead": "5bb4fcf821765d90a235774e47f7da97236c3f2d"
47
+ "gitHead": "f8c6b791584c4b6dce56093773d36eb607445f04"
48
48
  }