@daoyi/nmtl-ui 2.0.1-beta.14 → 2.0.1-beta.140

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 (112) hide show
  1. package/README.md +45 -45
  2. package/lib/components/Autocomplete-e40d7145.js +494 -0
  3. package/lib/components/Autocomplete.js +20 -1
  4. package/lib/components/Avatar.js +59 -1
  5. package/lib/components/BackTop.js +124 -1
  6. package/lib/components/BarChart.js +764 -1
  7. package/lib/components/Breadcrumbs.js +146 -1
  8. package/lib/components/Button-8cf35bc0.js +114 -0
  9. package/lib/components/Button.js +7 -1
  10. package/lib/components/Carousel.js +4654 -1
  11. package/lib/components/Checkbox.js +37 -1
  12. package/lib/components/CollapseContent.js +235 -1
  13. package/lib/components/ContactModal-af7fa280.js +12295 -0
  14. package/lib/components/ContactModal.js +24 -3
  15. package/lib/components/Drawer-b770014f.js +247 -0
  16. package/lib/components/Drawer.js +18 -1
  17. package/lib/components/Dropdown.js +134 -1
  18. package/lib/components/Empty-48685dd0.js +46 -0
  19. package/lib/components/Empty.js +5 -1
  20. package/lib/components/ExportButton.js +128 -1
  21. package/lib/components/ExtraTools-c46c1965.js +3676 -0
  22. package/lib/components/ExtraTools.js +11 -22
  23. package/lib/components/Filter.js +821 -12
  24. package/lib/components/Footer.js +317 -1
  25. package/lib/components/ForwardLink-2905563c.js +184 -0
  26. package/lib/components/ForwardLink.js +10 -0
  27. package/lib/components/Header.js +267 -1
  28. package/lib/components/Image.js +61 -1
  29. package/lib/components/Input.js +89 -1
  30. package/lib/components/InputMethod.js +33937 -10
  31. package/lib/components/KeywordSearch-4e621ded.js +156 -0
  32. package/lib/components/KeywordSearch.js +22 -1
  33. package/lib/components/KeywordTicker.js +224 -1
  34. package/lib/components/Keywords.js +383 -1
  35. package/lib/components/Loading.js +32 -1
  36. package/lib/components/MUITheme.js +2657 -1
  37. package/lib/components/Modal-aa77d4d8.js +171 -0
  38. package/lib/components/Modal.js +11 -1
  39. package/lib/components/MoreButton-0b5aaef3.js +148 -0
  40. package/lib/components/MoreButton.js +8 -1
  41. package/lib/components/Pagination.js +3702 -0
  42. package/lib/components/Radio.js +83 -1
  43. package/lib/components/SNA.js +1755 -22
  44. package/lib/components/SegmentedControl-804da0a6.js +113 -0
  45. package/lib/components/SegmentedControl.js +11 -0
  46. package/lib/components/Select-979f7e73.js +189 -0
  47. package/lib/components/Select.js +14 -1
  48. package/lib/components/Spin-07679812.js +79 -0
  49. package/lib/components/Spin.js +7 -1
  50. package/lib/components/Table.js +51 -1
  51. package/lib/components/Tooltip-bbbaa9c7.js +70 -0
  52. package/lib/components/Tooltip.js +7 -1
  53. package/lib/components/_commonjsHelpers-70de2c37.js +28 -0
  54. package/lib/components/_rollupPluginBabelHelpers-a52356f6.js +142 -0
  55. package/lib/components/createSvgIcon-370e163a.js +576 -0
  56. package/lib/components/dataExport-a9e3fae1.js +91 -0
  57. package/lib/components/debounce-127da66c.js +355 -0
  58. package/lib/components/defaultTheme-c5dd0f64.js +1661 -0
  59. package/lib/components/globalConfig.js +471 -0
  60. package/lib/components/hoist-non-react-statics.cjs-3f408ad2.js +105 -0
  61. package/lib/components/index-c33afcb5.js +61 -0
  62. package/lib/components/index-ff95f719.js +481 -0
  63. package/lib/components/isObjectLike-e111475d.js +190 -0
  64. package/lib/components/style-inject.es-1f59c1d0.js +28 -1
  65. package/lib/components/toConsumableArray-c268c112.js +19 -0
  66. package/lib/components/transform-849a452c.js +5475 -0
  67. package/lib/components/useTheme-98b6cf17.js +11 -0
  68. package/lib/components/withTheme-3486f38b.js +6 -0
  69. package/lib/configs/config.selector.js +151 -0
  70. package/lib/configs/index.d.ts +1 -0
  71. package/lib/configs/index.js +1 -0
  72. package/lib/index.d.ts +6 -1
  73. package/lib/index.js +6 -1
  74. package/lib/utils/_rollupPluginBabelHelpers-9802e640.js +121 -0
  75. package/lib/utils/arrayMerge.js +4953 -1
  76. package/lib/utils/chunkArray.js +15 -1
  77. package/lib/utils/convert2HtmlEntities.js +57 -1
  78. package/lib/utils/domToImage.js +802 -1
  79. package/lib/utils/downloadGephi.js +106 -1
  80. package/lib/utils/exportXlsx.js +221 -1
  81. package/lib/utils/historyAppendSearch.js +502 -1
  82. package/lib/utils/index.d.ts +2 -0
  83. package/lib/utils/index.js +2 -0
  84. package/lib/utils/isDevelopMode.js +5 -1
  85. package/lib/utils/newWindowHint-72ebfe3b.js +53 -0
  86. package/lib/utils/parseYMD.js +36 -1
  87. package/lib/utils/prepareTimelineData.js +70 -0
  88. package/lib/utils/removeDuplicateItem.js +11 -1
  89. package/lib/utils/sendEmail.js +39 -1
  90. package/lib/utils/snaDefine-6a2bcd94.js +5 -0
  91. package/lib/utils/snaDefine.js +1 -1
  92. package/lib/utils/snaPreProcess.js +84 -1
  93. package/lib/utils/syncTimelineA11y.js +293 -0
  94. package/package.json +141 -128
  95. package/lib/components/Empty-54b79907.js +0 -1
  96. package/lib/components/KeywordSearch-5a393f12.js +0 -1
  97. package/lib/components/Select-f2441b83.js +0 -1
  98. package/lib/components/_rollupPluginBabelHelpers-1b8c042f.js +0 -1
  99. package/lib/components/_rollupPluginBabelHelpers-ec4e2a53.js +0 -1
  100. package/lib/components/createSvgIcon-62b64929.js +0 -1
  101. package/lib/components/createSvgIcon-e24792d4.js +0 -1
  102. package/lib/components/createTheme-7fffa109.js +0 -1
  103. package/lib/components/dataExport-9fccd4f0.js +0 -1
  104. package/lib/components/debounce-c993109b.js +0 -1
  105. package/lib/components/hoist-non-react-statics.cjs-d6a9befd.js +0 -1
  106. package/lib/components/index-11391ca3.js +0 -7
  107. package/lib/components/index-b2745105.js +0 -7
  108. package/lib/components/isObjectLike-2f1983fe.js +0 -1
  109. package/lib/components/style-inject.es-c875d022.js +0 -1
  110. package/lib/components/transform-95ae0119.js +0 -1
  111. package/lib/utils/_commonjsHelpers-e2cda605.js +0 -1
  112. package/lib/utils/_rollupPluginBabelHelpers-928a52ce.js +0 -1
@@ -1 +1,15 @@
1
- var u=function(u,e){return u.reduce((function(u,n,r){return r%e?u[u.length-1].push(n):u.push([n]),u}),[])};export{u as default};
1
+ // Examples
2
+ // chunkArray([1, 2, 3, 4, 5, 6, 7, 8], 3); // [[1, 2, 3], [4, 5, 6], [7, 8]]
3
+ // chunkArray([1, 2, 3, 4, 5, 6, 7, 8], 4); // [[1, 2, 3, 4], [5, 6, 7, 8]]
4
+ var chunkArray = function chunkArray(arr, size) {
5
+ return arr.reduce(function (acc, e, i) {
6
+ if (i % size) {
7
+ acc[acc.length - 1].push(e);
8
+ } else {
9
+ acc.push([e]);
10
+ }
11
+ return acc;
12
+ }, []);
13
+ };
14
+
15
+ export { chunkArray as default };
@@ -1 +1,57 @@
1
- var r=new(0,require("html-to-react").Parser),e=require("markdown-it")({html:!1,xhtmlOut:!0,breaks:!0,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:function(){return""}}),t=function(t){return void 0===t?"":r.parse(e.render(t))};export{t as default};
1
+ import { a as addNewWindowHint } from './newWindowHint-72ebfe3b.js';
2
+ import '../components/globalConfig';
3
+
4
+ var HtmlToReactParser = require('html-to-react').Parser;
5
+ var DOMPurify = require('dompurify');
6
+ var htmlToReactParser = new HtmlToReactParser();
7
+
8
+ /* 後台文稿以 markdown-it(html: true)轉換,原始 HTML 會直接放行;轉成 React 之前必須先消毒,
9
+ 擋掉 <script>、onerror、javascript: 等 XSS 向量(內容雖來自後台,仍做縱深防禦;比照主站 nmtl-web htmlEntities.js)。
10
+ 用獨立實例:@daoyi/timeline 在全域 DOMPurify 掛了 hook,會把所有沒寫 target 的連結強制改成另開新視窗 */
11
+ var purify = DOMPurify(typeof window !== 'undefined' ? window : undefined);
12
+ var sanitize = function sanitize(html) {
13
+ return purify.isSupported ? purify.sanitize(html, {
14
+ ADD_ATTR: ['target']
15
+ }) : html;
16
+ };
17
+
18
+ // full options list (defaults)
19
+ var md = require('markdown-it')({
20
+ html: true,
21
+ // Enable HTML tags in source
22
+ xhtmlOut: true,
23
+ // Use '/' to close single tags (<br />).
24
+ // This is only for full CommonMark compatibility.
25
+ breaks: true,
26
+ // Convert '\n' in paragraphs into <br>
27
+ langPrefix: 'language-',
28
+ // CSS language prefix for fenced blocks. Can be
29
+ // useful for external highlighters.
30
+ linkify: false,
31
+ // Autoconvert URL-like text to links
32
+
33
+ // Enable some language-neutral replacement + quotes beautification
34
+ // For the full list of replacements, see https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.js
35
+ typographer: false,
36
+ // Double + single quotes replacement pairs, when typographer enabled,
37
+ // and smartquotes on. Could be either a String or an Array.
38
+ //
39
+ // For example, you can use '«»„“' for Russian, '„“‚‘' for German,
40
+ // and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
41
+ quotes: '“”‘’',
42
+ // Highlighter function. Should return escaped HTML,
43
+ // or '' if the source string is not changed and should be escaped externally.
44
+ // If result starts with <pre... internal wrapper is skipped.
45
+ highlight: function highlight() {
46
+ return '';
47
+ } /* str, lang */
48
+ });
49
+
50
+ // eslint-disable-next-line import/prefer-default-export
51
+ var convert2HtmlEntities = function convert2HtmlEntities(text) {
52
+ if (text === undefined) return '';
53
+ /* 先消毒,再替 target="_blank" 的連結文字補「(另開新視窗)」(HM1240404E,2026-10-07) */
54
+ return htmlToReactParser.parse(addNewWindowHint(sanitize(md.render(text))));
55
+ };
56
+
57
+ export { convert2HtmlEntities as default };