@daoyi/nmtl-ui 2.0.1-beta.90 → 2.0.1-beta.91
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/README.md +45 -45
- package/lib/components/{Autocomplete-24e9686d.js → Autocomplete-887cda6a.js} +16 -7
- package/lib/components/Autocomplete.js +5 -5
- package/lib/components/Avatar.js +1 -1
- package/lib/components/BackTop.js +3 -3
- package/lib/components/BarChart.js +1 -1
- package/lib/components/Breadcrumbs.js +1 -1
- package/lib/components/{Button-430d39e6.js → Button-8742afeb.js} +1 -1
- package/lib/components/Button.js +2 -2
- package/lib/components/Carousel.js +2 -61
- package/lib/components/Checkbox.js +1 -1
- package/lib/components/CollapseContent.js +3 -3
- package/lib/components/{ContactModal-523ae294.js → ContactModal-530d4d80.js} +6 -6
- package/lib/components/ContactModal.js +9 -9
- package/lib/components/{Drawer-ec47e780.js → Drawer-96442344.js} +2 -2
- package/lib/components/Drawer.js +5 -5
- package/lib/components/Dropdown.js +2 -2
- package/lib/components/{Empty-dc5fc2fc.js → Empty-94a8d8ff.js} +1 -1
- package/lib/components/Empty.js +2 -2
- package/lib/components/ExportButton.js +2 -2
- package/lib/components/{ExtraTools-0ffc772b.js → ExtraTools-bfb076ca.js} +5 -66
- package/lib/components/ExtraTools.js +4 -4
- package/lib/components/Filter.js +3 -3
- package/lib/components/Footer.js +9 -9
- package/lib/components/{ForwardLink-15222b22.js → ForwardLink-059be72d.js} +6 -6
- package/lib/components/ForwardLink.js +3 -3
- package/lib/components/Header.js +8 -8
- package/lib/components/Image.js +2 -2
- package/lib/components/Input.js +1 -1
- package/lib/components/InputMethod.js +197 -187
- package/lib/components/{KeywordSearch-91167d24.js → KeywordSearch-c3acab41.js} +3 -3
- package/lib/components/KeywordSearch.js +6 -6
- package/lib/components/KeywordTicker.js +4 -4
- package/lib/components/Keywords.js +6 -6
- package/lib/components/Loading.js +1 -1
- package/lib/components/{Modal-6b8c72d7.js → Modal-fc4320d3.js} +3 -3
- package/lib/components/Modal.js +4 -4
- package/lib/components/{MoreButton-4d5d94da.js → MoreButton-d7c9f3b8.js} +1 -1
- package/lib/components/MoreButton.js +2 -2
- package/lib/components/Pagination.js +3 -3
- package/lib/components/Radio.js +1 -1
- package/lib/components/SNA.js +4 -4
- package/lib/components/{Select-7da870e0.js → Select-fdb4d9b8.js} +3 -3
- package/lib/components/Select.js +4 -4
- package/lib/components/{Spin-9a07b106.js → Spin-fafe3787.js} +1 -1
- package/lib/components/Spin.js +2 -2
- package/lib/components/Table.js +1 -1
- package/lib/components/{Tooltip-6d53cb6e.js → Tooltip-e67a18bc.js} +2 -2
- package/lib/components/Tooltip.js +3 -3
- package/lib/components/{_rollupPluginBabelHelpers-ed61ffc0.js → _rollupPluginBabelHelpers-a52356f6.js} +24 -42
- package/lib/components/globalConfig.js +3 -18
- package/lib/components/{index-f491ebce.js → index-ef96775f.js} +1 -1
- package/lib/utils/{_rollupPluginBabelHelpers-a6e0e6e3.js → _rollupPluginBabelHelpers-8dd26e1a.js} +24 -42
- package/lib/utils/arrayMerge.js +21 -21
- package/lib/utils/exportXlsx.js +1 -1
- package/lib/utils/historyAppendSearch.js +1 -1
- package/lib/utils/snaPreProcess.js +1 -1
- package/package.json +125 -125
- /package/lib/components/{createSvgIcon-ff0e3b99.js → createSvgIcon-0d38de2e.js} +0 -0
- /package/lib/components/{index-a6f22b92.js → index-0be0afec.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { c as _objectWithoutProperties } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useMemo } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { q as queryString } from './index-
|
|
4
|
+
import { q as queryString } from './index-0be0afec.js';
|
|
5
5
|
import { useHistory, Link } from 'react-router-dom';
|
|
6
6
|
import { Tooltip } from '@material-ui/core';
|
|
7
7
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
@@ -25,10 +25,10 @@ var ForwardLink = function ForwardLink(_ref) {
|
|
|
25
25
|
var _useMemo = useMemo(function () {
|
|
26
26
|
var _rest$pathname;
|
|
27
27
|
if (disabled) return {};
|
|
28
|
-
/*
|
|
29
|
-
* 若將 search 寫在 pathname 中,意即 pathname=/asd?zxc=qwe
|
|
30
|
-
* 會導致換頁時 React route dom 無法匹配 => 空白畫面
|
|
31
|
-
* 若真有此情況發生 需把 search 提領出來
|
|
28
|
+
/*
|
|
29
|
+
* 若將 search 寫在 pathname 中,意即 pathname=/asd?zxc=qwe
|
|
30
|
+
* 會導致換頁時 React route dom 無法匹配 => 空白畫面
|
|
31
|
+
* 若真有此情況發生 需把 search 提領出來
|
|
32
32
|
*/
|
|
33
33
|
var foundIndex = (_rest$pathname = rest.pathname) === null || _rest$pathname === void 0 ? void 0 : _rest$pathname.indexOf('?');
|
|
34
34
|
if (foundIndex > -1) return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { F as default } from './ForwardLink-
|
|
2
|
-
import './_rollupPluginBabelHelpers-
|
|
1
|
+
export { F as default } from './ForwardLink-059be72d.js';
|
|
2
|
+
import './_rollupPluginBabelHelpers-a52356f6.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'prop-types';
|
|
5
|
-
import './index-
|
|
5
|
+
import './index-0be0afec.js';
|
|
6
6
|
import 'react-router-dom';
|
|
7
7
|
import '@material-ui/core';
|
|
8
8
|
import './style-inject.es-1f59c1d0.js';
|
package/lib/components/Header.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { c as classNames } from './index-
|
|
4
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
5
5
|
import { d as debounce_1 } from './debounce-127da66c.js';
|
|
6
6
|
import { useHistory, useRouteMatch, NavLink } from 'react-router-dom';
|
|
7
7
|
import { Typography, IconButton } from '@material-ui/core';
|
|
8
8
|
import { SearchOutlined } from '@material-ui/icons';
|
|
9
|
-
import { K as KeywordSearch } from './KeywordSearch-
|
|
10
|
-
import { S as Select } from './Select-
|
|
11
|
-
import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-
|
|
9
|
+
import { K as KeywordSearch } from './KeywordSearch-c3acab41.js';
|
|
10
|
+
import { S as Select } from './Select-fdb4d9b8.js';
|
|
11
|
+
import { c as checkLanguageSupport, D as Drawer, d as defaultSupportLanguage } from './Drawer-96442344.js';
|
|
12
12
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
13
13
|
import './isObjectLike-e111475d.js';
|
|
14
14
|
import './_commonjsHelpers-70de2c37.js';
|
|
15
15
|
import 'axios';
|
|
16
|
-
import './Autocomplete-
|
|
16
|
+
import './Autocomplete-887cda6a.js';
|
|
17
17
|
import '@material-ui/lab';
|
|
18
|
-
import './createSvgIcon-
|
|
18
|
+
import './createSvgIcon-0d38de2e.js';
|
|
19
19
|
import './defaultTheme-ed7746fe.js';
|
|
20
20
|
import 'react-is';
|
|
21
21
|
import '@material-ui/styles';
|
|
22
22
|
import 'react-dom';
|
|
23
23
|
import './toConsumableArray-dbe8af76.js';
|
|
24
|
-
import './Empty-
|
|
24
|
+
import './Empty-94a8d8ff.js';
|
|
25
25
|
|
|
26
26
|
var css_248z = "@charset \"UTF-8\";\n.header {\n display: flex;\n align-items: center;\n background: rgba(255, 255, 255, 0.6);\n background-color: rgba(255, 255, 255, 0.6);\n padding: 12px 36px !important;\n position: fixed;\n top: 0;\n z-index: 10;\n width: 100% !important;\n transition: top 0.3s ease-in-out;\n box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);\n}\n.header__logo {\n display: flex;\n width: -moz-fit-content !important;\n width: fit-content !important;\n margin-right: 30px !important;\n cursor: pointer;\n}\n.header__logo__img {\n display: flex;\n align-items: center;\n}\n.header__logo__title {\n white-space: nowrap;\n margin-left: 1rem !important;\n font-size: 1.5rem !important;\n font-weight: 700 !important;\n font-family: \"Noto Sans TC\" !important;\n}\n.header__links {\n display: flex;\n justify-content: flex-end;\n padding-right: 14px;\n}\n.header__links a {\n text-decoration: none;\n}\n.header__links--full {\n flex: 1;\n}\n.header__links__item {\n color: rgba(0, 0, 0, 0.85);\n font-size: 1.125rem !important;\n font-weight: 500 !important;\n white-space: nowrap;\n padding: 6px 14px;\n font-family: \"Noto Sans TC\" !important;\n}\n.header__links__item--active .header__links__item {\n font-weight: 800 !important;\n background: transparent;\n border-radius: 45px;\n}\n.header__links__item:hover {\n font-weight: 800 !important;\n}\n.header__language {\n min-width: 100px !important;\n}\n.header__searchIcon {\n display: none !important;\n}\n@media screen and (max-width: 768px) {\n .header--smallUseSearchIcon .header__searchIcon {\n display: flex !important;\n margin-right: 10px !important;\n }\n .header--smallUseSearchIcon .keywordSearch {\n visibility: hidden;\n flex: 1;\n width: 0;\n }\n}\n.header--hide {\n top: -100px;\n}\n.header--focus .header__links {\n display: none;\n}\n.header .MuiTypography-root {\n width: 100%;\n display: flex;\n align-items: center;\n}\n.header .autocomplete {\n float: right;\n}\n.header .autocomplete .MuiAutocomplete-inputRoot[class*=MuiOutlinedInput-root] {\n padding: 1px 8px !important;\n}\n.header .keywordSearch {\n margin-right: 8px;\n}\n.header .keywordSearch--focus .autocomplete {\n width: 100% !important;\n}\n.header .keywordSearch--animation .autocomplete {\n width: 240px;\n transition: width 0.3s ease-in-out;\n}\n\n/* 避免寬度460以下炸版 */\n@media screen and (max-width: 460px) {\n .header .keywordSearch--animation .autocomplete {\n width: 100%;\n }\n}\n@media screen and (max-width: 768px) {\n .header {\n padding: 12px 15px !important;\n }\n .header__logo {\n margin-right: 16px !important;\n }\n .header__logo__title {\n display: none !important;\n }\n .header__links {\n display: none;\n }\n .header__links__item {\n font-size: 1rem !important;\n }\n .header__language {\n display: none !important;\n }\n .header--focus .header__logo {\n display: none !important;\n }\n\n .autocomplete__icon {\n display: none !important;\n }\n}";
|
|
27
27
|
styleInject(css_248z);
|
package/lib/components/Image.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState } from 'react';
|
|
3
|
-
import { c as classNames } from './index-
|
|
3
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
6
|
|
package/lib/components/Input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { c as classNames } from './index-
|
|
3
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
4
4
|
import { OutlinedInput } from '@material-ui/core';
|
|
5
5
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { c as classNames } from './index-
|
|
4
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
5
5
|
import { ExpandMore, ExpandLess, Search } from '@material-ui/icons';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
7
|
import { c as commonjsGlobal } from './_commonjsHelpers-70de2c37.js';
|
|
@@ -17867,50 +17867,51 @@ var TouchInputMethod = new function () {
|
|
|
17867
17867
|
};
|
|
17868
17868
|
var classList_supporting = true;
|
|
17869
17869
|
|
|
17870
|
-
/**
|
|
17871
|
-
required id:
|
|
17872
|
-
* keyboard_id: default is 'input_method_keyboard'.
|
|
17873
|
-
* candidate_id: default is 'input_method_candidate'.
|
|
17874
|
-
* show_input_keys_id: default is 'input_method_show_input_keys'.
|
|
17875
|
-
|
|
17876
|
-
|
|
17877
|
-
|
|
17878
|
-
|
|
17879
|
-
|
|
17880
|
-
|
|
17881
|
-
|
|
17882
|
-
|
|
17883
|
-
|
|
17884
|
-
|
|
17885
|
-
|
|
17886
|
-
|
|
17887
|
-
|
|
17888
|
-
|
|
17889
|
-
|
|
17890
|
-
|
|
17891
|
-
|
|
17892
|
-
|
|
17893
|
-
|
|
17894
|
-
|
|
17895
|
-
|
|
17896
|
-
|
|
17897
|
-
|
|
17898
|
-
|
|
17899
|
-
|
|
17900
|
-
|
|
17901
|
-
|
|
17902
|
-
|
|
17903
|
-
|
|
17904
|
-
|
|
17905
|
-
|
|
17906
|
-
|
|
17907
|
-
|
|
17908
|
-
|
|
17909
|
-
|
|
17910
|
-
|
|
17911
|
-
|
|
17912
|
-
|
|
17913
|
-
|
|
17870
|
+
/**
|
|
17871
|
+
required id:
|
|
17872
|
+
* keyboard_id: default is 'input_method_keyboard'.
|
|
17873
|
+
* candidate_id: default is 'input_method_candidate'.
|
|
17874
|
+
* show_input_keys_id: default is 'input_method_show_input_keys'.
|
|
17875
|
+
|
|
17876
|
+
optional classes:
|
|
17877
|
+
* inputkey: input_method_inputkey
|
|
17878
|
+
字根鍵盤外觀。
|
|
17879
|
+
* candidates: input_method_candidates
|
|
17880
|
+
候選字外觀。
|
|
17881
|
+
* back_input_key: input_method_back_input_key
|
|
17882
|
+
指定「退一字根」控制項與外觀。
|
|
17883
|
+
* clear_input_keys: input_method_clear_input_keys
|
|
17884
|
+
指定「清除字根」控制項與外觀。
|
|
17885
|
+
* auto_clear_input_keys_mode: input_method_auto_clear_input_keys_mode
|
|
17886
|
+
指定「自動清除字根」控制項與外觀。
|
|
17887
|
+
* auto_clear_input_keys_on: input_method_auto_clear_input_keys_on
|
|
17888
|
+
自動清除功能鈕啟動時外觀。
|
|
17889
|
+
若為函數而不是 CSS 類別名稱,則回呼之 (函數之 this 為控制項),並傳入 mode 參數
|
|
17890
|
+
表示 auto_clear_input_keys 改變後的狀態(型態為 boolean)。
|
|
17891
|
+
* capital_toggle: input_method_capital_toggle
|
|
17892
|
+
指定「Caps」(大寫鎖定)控制項與外觀。
|
|
17893
|
+
* capital_toggle_on: input_method_capital_toggle_on
|
|
17894
|
+
Caps 啟動時外觀。
|
|
17895
|
+
若為函數而不是 CSS 類別名稱,則回呼之 (函數之 this 為控制項),並傳入 mode 參數
|
|
17896
|
+
表示大寫鎖定器改變後的狀態(型態為 boolean)。
|
|
17897
|
+
* backspace_output_texts: input_method_backspace_output_texts
|
|
17898
|
+
指定「回刪一字」控制項與外觀。
|
|
17899
|
+
* clear_output_texts: input_method_clear_output_texts
|
|
17900
|
+
指定「清除輸入內容」控制項與外觀。
|
|
17901
|
+
* select_output_texts: input_method_select_output_texts
|
|
17902
|
+
指定「選取輸入內容」控制項與外觀。
|
|
17903
|
+
* add_space_output_texts: input_method_add_space_output_texts
|
|
17904
|
+
指定「空白」控制項與外觀。
|
|
17905
|
+
* add_newline_output_texts: input_method_add_newline_output_texts
|
|
17906
|
+
指定「換行」控制項與外觀。
|
|
17907
|
+
* switch_engine: input_method_switch_engine
|
|
17908
|
+
指定「切換輸入法」控制項與外觀。
|
|
17909
|
+
* goto_next: input_method_goto_next
|
|
17910
|
+
指定「移到下一欄位」控制項與外觀。
|
|
17911
|
+
* goto_previous: input_method_goto_previous
|
|
17912
|
+
指定「移到上一欄位」控制項與外觀。
|
|
17913
|
+
* end_composition: input_method_end_composition
|
|
17914
|
+
指定「結束輸入法」控制項與外觀。
|
|
17914
17915
|
*/
|
|
17915
17916
|
this.set_controls = function (custom_keyboard_id, custom_candidate_id, custom_show_input_keys_id, optional_classes) {
|
|
17916
17917
|
if (custom_keyboard_id) keyboard_id = custom_keyboard_id;
|
|
@@ -17921,8 +17922,8 @@ var TouchInputMethod = new function () {
|
|
|
17921
17922
|
}
|
|
17922
17923
|
};
|
|
17923
17924
|
|
|
17924
|
-
/**
|
|
17925
|
-
get css selector (id and class) of controls.
|
|
17925
|
+
/**
|
|
17926
|
+
get css selector (id and class) of controls.
|
|
17926
17927
|
*/
|
|
17927
17928
|
this.get_controls = function () {
|
|
17928
17929
|
return {
|
|
@@ -17933,68 +17934,75 @@ var TouchInputMethod = new function () {
|
|
|
17933
17934
|
};
|
|
17934
17935
|
};
|
|
17935
17936
|
|
|
17936
|
-
/**
|
|
17937
|
-
where to send converted result.
|
|
17938
|
-
target must be a kind of text input control.
|
|
17937
|
+
/**
|
|
17938
|
+
where to send converted result.
|
|
17939
|
+
target must be a kind of text input control.
|
|
17939
17940
|
*/
|
|
17940
17941
|
this.set_target = function (dom) {
|
|
17941
17942
|
output = dom;
|
|
17942
17943
|
};
|
|
17943
17944
|
|
|
17944
|
-
/**
|
|
17945
|
-
which control is the target of touch-ime.
|
|
17946
|
-
Notice: you should not use this method to get focused control.
|
|
17945
|
+
/**
|
|
17946
|
+
which control is the target of touch-ime.
|
|
17947
|
+
Notice: you should not use this method to get focused control.
|
|
17947
17948
|
*/
|
|
17948
17949
|
this.get_target = function () {
|
|
17949
17950
|
return output;
|
|
17950
17951
|
};
|
|
17951
17952
|
|
|
17952
|
-
/**
|
|
17953
|
-
指定資源目錄路徑
|
|
17954
|
-
|
|
17955
|
-
|
|
17956
|
-
|
|
17957
|
-
|
|
17958
|
-
|
|
17959
|
-
|
|
17960
|
-
|
|
17953
|
+
/**
|
|
17954
|
+
指定資源目錄路徑
|
|
17955
|
+
|
|
17956
|
+
預設是從 touch-ime.js 相同目錄下載入字根表等內容。
|
|
17957
|
+
|
|
17958
|
+
請注意瀏覽器的相同來源政策,如果你的字表資源放在不同來源伺服器,那麼你必須按照
|
|
17959
|
+
W3 CORS 的建議,設置跨來源資源分享規則。
|
|
17960
|
+
若未設置 CORS ,那麼你在此只能指定資源目錄的路徑。例如 '/js/touch-ime/' 。
|
|
17961
|
+
|
|
17962
|
+
See:
|
|
17963
|
+
* http://www.w3.org/TR/cors/
|
|
17964
|
+
* http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
|
|
17961
17965
|
*/
|
|
17962
17966
|
this.set_resources_path = function (path) {
|
|
17963
17967
|
resources_path = path;
|
|
17964
17968
|
if (path[path.length - 1] != '/') resources_path += '/';
|
|
17965
17969
|
};
|
|
17966
17970
|
|
|
17967
|
-
/**
|
|
17968
|
-
According the class or type of input control to work with special input engine.
|
|
17969
|
-
If engine is false, remove this rule.
|
|
17970
|
-
|
|
17971
|
-
|
|
17972
|
-
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
|
|
17976
|
-
|
|
17977
|
-
|
|
17978
|
-
|
|
17971
|
+
/**
|
|
17972
|
+
According the class or type of input control to work with special input engine.
|
|
17973
|
+
If engine is false, remove this rule.
|
|
17974
|
+
|
|
17975
|
+
1. If the control's class list contains input_class, touch-ime will auto switch
|
|
17976
|
+
engine to engine_code.
|
|
17977
|
+
2. If the control's type equals to input_class, touch-ime will auto switch engine
|
|
17978
|
+
to engine_code.
|
|
17979
|
+
3. Else touch-ime switch engine to default input method engine.
|
|
17980
|
+
|
|
17981
|
+
有些瀏覽器(特別是在移動設備上的),會針對某些特殊型態的輸入控制項,特化它的UI。
|
|
17982
|
+
例如碰到 datetime 的控制項,那些瀏覽器就會顯示日期挑選的 UI ,而不必使用者輸入文字。
|
|
17983
|
+
碰到這種瀏覽器,touch-ime 就不需要理會那些控制項。
|
|
17984
|
+
但麻煩的是目前還沒有通用方式可判斷瀏覽器有沒有為控制項提供特殊UI。
|
|
17979
17985
|
*/
|
|
17980
17986
|
this.specify_control_with_engine = function (input_class, engine_code) {
|
|
17981
17987
|
// see also: according_input_type_switch_engine().
|
|
17982
17988
|
if (engine_code) special_input_keyboard_map[input_class] = engine_code;else delete special_input_keyboard_map[input_class];
|
|
17983
17989
|
};
|
|
17984
17990
|
|
|
17985
|
-
/**
|
|
17986
|
-
若你增加或刪除輸入法字表,則你必須調用此方法載入你使用的輸入法引擎資訊。
|
|
17987
|
-
如下:
|
|
17988
|
-
var new_engine_info = {
|
|
17989
|
-
"zhuyin": {
|
|
17990
|
-
"name": "注音"
|
|
17991
|
-
},
|
|
17992
|
-
"en": {
|
|
17993
|
-
"name": "英數"
|
|
17994
|
-
}
|
|
17995
|
-
};
|
|
17996
|
-
|
|
17997
|
-
|
|
17991
|
+
/**
|
|
17992
|
+
若你增加或刪除輸入法字表,則你必須調用此方法載入你使用的輸入法引擎資訊。
|
|
17993
|
+
如下:
|
|
17994
|
+
var new_engine_info = {
|
|
17995
|
+
"zhuyin": {
|
|
17996
|
+
"name": "注音"
|
|
17997
|
+
},
|
|
17998
|
+
"en": {
|
|
17999
|
+
"name": "英數"
|
|
18000
|
+
}
|
|
18001
|
+
};
|
|
18002
|
+
|
|
18003
|
+
TouchInputMethod.install_engine_info(new_engine_info);
|
|
18004
|
+
|
|
18005
|
+
*/
|
|
17998
18006
|
this.install_engine_info = function (new_engine_info) {
|
|
17999
18007
|
console.log('install engine info');
|
|
18000
18008
|
engine_info = new_engine_info;
|
|
@@ -18007,17 +18015,17 @@ var TouchInputMethod = new function () {
|
|
|
18007
18015
|
this.enable_engines(code_list);
|
|
18008
18016
|
};
|
|
18009
18017
|
|
|
18010
|
-
/**
|
|
18011
|
-
enable engines. engine_code_list is an array of engine code name.
|
|
18012
|
-
valid code name:
|
|
18013
|
-
* zhuyin 注音
|
|
18014
|
-
* pinyin 拼音
|
|
18015
|
-
* en 英數
|
|
18016
|
-
* enShift 英數
|
|
18017
|
-
* array30 行列30
|
|
18018
|
-
* cangjie3 倉頡第三代
|
|
18019
|
-
* cangjie5 倉頡第五代
|
|
18020
|
-
* quick 倉頡速成
|
|
18018
|
+
/**
|
|
18019
|
+
enable engines. engine_code_list is an array of engine code name.
|
|
18020
|
+
valid code name:
|
|
18021
|
+
* zhuyin 注音
|
|
18022
|
+
* pinyin 拼音
|
|
18023
|
+
* en 英數
|
|
18024
|
+
* enShift 英數
|
|
18025
|
+
* array30 行列30
|
|
18026
|
+
* cangjie3 倉頡第三代
|
|
18027
|
+
* cangjie5 倉頡第五代
|
|
18028
|
+
* quick 倉頡速成
|
|
18021
18029
|
*/
|
|
18022
18030
|
this.enable_engines = function (engine_code_list) {
|
|
18023
18031
|
let next;
|
|
@@ -18033,8 +18041,8 @@ var TouchInputMethod = new function () {
|
|
|
18033
18041
|
this.change_engine(current_input_method_engine_name);
|
|
18034
18042
|
};
|
|
18035
18043
|
|
|
18036
|
-
/**
|
|
18037
|
-
change input engine to engine_code.
|
|
18044
|
+
/**
|
|
18045
|
+
change input engine to engine_code.
|
|
18038
18046
|
*/
|
|
18039
18047
|
this.change_engine = function (engine_code) {
|
|
18040
18048
|
symbol_mode = false;
|
|
@@ -18043,15 +18051,17 @@ var TouchInputMethod = new function () {
|
|
|
18043
18051
|
try_change_engine(engine_code);
|
|
18044
18052
|
};
|
|
18045
18053
|
|
|
18046
|
-
/**
|
|
18047
|
-
清除本地儲存的特殊字表
|
|
18048
|
-
|
|
18049
|
-
|
|
18050
|
-
*
|
|
18051
|
-
*
|
|
18052
|
-
|
|
18053
|
-
|
|
18054
|
-
touch-ime
|
|
18054
|
+
/**
|
|
18055
|
+
清除本地儲存的特殊字表
|
|
18056
|
+
|
|
18057
|
+
自本地儲存區(localStorage)中清除下列特殊字表的內容。
|
|
18058
|
+
* en.tab (localStorage 名稱 input_method_en)
|
|
18059
|
+
* s.tab (localStorage 名稱 input_method_s)
|
|
18060
|
+
* w.tab (localStorage 名稱 input_method_w)
|
|
18061
|
+
|
|
18062
|
+
touch-ime 會讀取特殊字表檔的內容並保存在本地儲存區。
|
|
18063
|
+
如果你修改了特殊字表檔的內容,則你必須調用 clean_local_table() 清除已儲存的內容,
|
|
18064
|
+
touch-ime 才會重新讀取新的特殊字表檔內容(並再次保存於本地儲存區)。
|
|
18055
18065
|
*/
|
|
18056
18066
|
this.clean_local_table = function () {
|
|
18057
18067
|
if (!localStorage) return;
|
|
@@ -18077,18 +18087,18 @@ var TouchInputMethod = new function () {
|
|
|
18077
18087
|
return input_keys;
|
|
18078
18088
|
};
|
|
18079
18089
|
|
|
18080
|
-
/**
|
|
18081
|
-
TouchInputMethod 組字事件。
|
|
18090
|
+
/**
|
|
18091
|
+
TouchInputMethod 組字事件。
|
|
18082
18092
|
*/
|
|
18083
18093
|
this.oncomposition = false;
|
|
18084
18094
|
|
|
18085
|
-
/**
|
|
18086
|
-
TouchInputMethod 結束組字事件。
|
|
18095
|
+
/**
|
|
18096
|
+
TouchInputMethod 結束組字事件。
|
|
18087
18097
|
*/
|
|
18088
18098
|
this.oncompositionend = false;
|
|
18089
18099
|
|
|
18090
|
-
/**
|
|
18091
|
-
TouchInputMethod capital 模式改變事件。
|
|
18100
|
+
/**
|
|
18101
|
+
TouchInputMethod capital 模式改變事件。
|
|
18092
18102
|
*/
|
|
18093
18103
|
this.oncapitalization = false;
|
|
18094
18104
|
this.onsymbolization = false;
|
|
@@ -18114,15 +18124,15 @@ var TouchInputMethod = new function () {
|
|
|
18114
18124
|
|
|
18115
18125
|
// step 2
|
|
18116
18126
|
toggle_auto_clear_input_keys(); // turn on.
|
|
18117
|
-
/*
|
|
18118
|
-
if (auto_clear_input_keys) {
|
|
18119
|
-
elms = document.getElementsByClassName(control_classes['auto_clear_input_keys_mode']);
|
|
18120
|
-
if (elms.length > 0) {
|
|
18121
|
-
for (i = 0; i < elms.length; ++i) {
|
|
18122
|
-
class_list_add(elms[i], control_classes['auto_clear_input_keys_on']);
|
|
18123
|
-
}
|
|
18124
|
-
}
|
|
18125
|
-
}
|
|
18127
|
+
/*
|
|
18128
|
+
if (auto_clear_input_keys) {
|
|
18129
|
+
elms = document.getElementsByClassName(control_classes['auto_clear_input_keys_mode']);
|
|
18130
|
+
if (elms.length > 0) {
|
|
18131
|
+
for (i = 0; i < elms.length; ++i) {
|
|
18132
|
+
class_list_add(elms[i], control_classes['auto_clear_input_keys_on']);
|
|
18133
|
+
}
|
|
18134
|
+
}
|
|
18135
|
+
}
|
|
18126
18136
|
*/
|
|
18127
18137
|
|
|
18128
18138
|
// step 3
|
|
@@ -18155,21 +18165,21 @@ var TouchInputMethod = new function () {
|
|
|
18155
18165
|
load_input_method_engine();
|
|
18156
18166
|
|
|
18157
18167
|
// step 5
|
|
18158
|
-
/*
|
|
18159
|
-
document.onkeypress = function(event) {
|
|
18160
|
-
//console.log("event.charCode: %s", event.charCode);
|
|
18161
|
-
if (event.charCode in code_map) {
|
|
18162
|
-
//console.log("input code: %s", code_map[event.charCode]);
|
|
18163
|
-
input_code(code_map[event.charCode]);
|
|
18164
|
-
}
|
|
18165
|
-
return true;
|
|
18166
|
-
}
|
|
18167
|
-
|
|
18168
|
-
if (event.keyCode == 8) {
|
|
18169
|
-
back_input_key();
|
|
18170
|
-
}
|
|
18171
|
-
return true;
|
|
18172
|
-
}
|
|
18168
|
+
/*
|
|
18169
|
+
document.onkeypress = function(event) {
|
|
18170
|
+
//console.log("event.charCode: %s", event.charCode);
|
|
18171
|
+
if (event.charCode in code_map) {
|
|
18172
|
+
//console.log("input code: %s", code_map[event.charCode]);
|
|
18173
|
+
input_code(code_map[event.charCode]);
|
|
18174
|
+
}
|
|
18175
|
+
return true;
|
|
18176
|
+
}
|
|
18177
|
+
document.onkeyup = function(event) {
|
|
18178
|
+
if (event.keyCode == 8) {
|
|
18179
|
+
back_input_key();
|
|
18180
|
+
}
|
|
18181
|
+
return true;
|
|
18182
|
+
}
|
|
18173
18183
|
*/
|
|
18174
18184
|
// alert('行列30輸入法網頁點取版\nCopyright (c) 2012 遊手好閒的石頭成 (shirock.tw@gmail.com)\nLicensed by GPL.');
|
|
18175
18185
|
};
|
|
@@ -18210,20 +18220,20 @@ var TouchInputMethod = new function () {
|
|
|
18210
18220
|
if (n >= ic.inputs.length) n = 0;
|
|
18211
18221
|
ic.inputs[n].focus();
|
|
18212
18222
|
|
|
18213
|
-
/*
|
|
18214
|
-
var kev = document.createEvent('KeyboardEvent');
|
|
18215
|
-
kev.initKeyEvent('keypress', true, true, window,
|
|
18216
|
-
false, // ctrl
|
|
18217
|
-
false, // alt
|
|
18218
|
-
false, // shift
|
|
18219
|
-
false, // meta
|
|
18220
|
-
0x09, // keyCode
|
|
18221
|
-
0);
|
|
18222
|
-
output.focus();
|
|
18223
|
-
console.log("dispatch event");
|
|
18224
|
-
//output.dispatchEvent(kev);
|
|
18225
|
-
//document.dispatchEvent(kev);
|
|
18226
|
-
// 無效。雖然dom會收到這個按鍵事件,但不會出現跳到下一欄位的效果。
|
|
18223
|
+
/*
|
|
18224
|
+
var kev = document.createEvent('KeyboardEvent');
|
|
18225
|
+
kev.initKeyEvent('keypress', true, true, window,
|
|
18226
|
+
false, // ctrl
|
|
18227
|
+
false, // alt
|
|
18228
|
+
false, // shift
|
|
18229
|
+
false, // meta
|
|
18230
|
+
0x09, // keyCode
|
|
18231
|
+
0);
|
|
18232
|
+
output.focus();
|
|
18233
|
+
console.log("dispatch event");
|
|
18234
|
+
//output.dispatchEvent(kev);
|
|
18235
|
+
//document.dispatchEvent(kev);
|
|
18236
|
+
// 無效。雖然dom會收到這個按鍵事件,但不會出現跳到下一欄位的效果。
|
|
18227
18237
|
*/
|
|
18228
18238
|
// http://maythesource.com/2012/06/26/simulating-keypresses-keystrokes-with-javascript-for-use-with-greesemonkey-etc/
|
|
18229
18239
|
// https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent
|
|
@@ -18460,17 +18470,17 @@ var TouchInputMethod = new function () {
|
|
|
18460
18470
|
if (input_keys.length === 0) {
|
|
18461
18471
|
output.focus(); // 讓使用者注意動作位置
|
|
18462
18472
|
// execCommand('delete') not work with input control. see issue 2.
|
|
18463
|
-
/*
|
|
18464
|
-
// normal input control has contentEditable attrib and value is true.
|
|
18465
|
-
if (document.queryCommandSupported('delete') && output.nodeName.toLowerCase() == 'div' && output.contentEditable) {
|
|
18466
|
-
document.execCommand('delete', false, null);
|
|
18467
|
-
}
|
|
18473
|
+
/*
|
|
18474
|
+
// normal input control has contentEditable attrib and value is true.
|
|
18475
|
+
if (document.queryCommandSupported('delete') && output.nodeName.toLowerCase() == 'div' && output.contentEditable) {
|
|
18476
|
+
document.execCommand('delete', false, null);
|
|
18477
|
+
}
|
|
18468
18478
|
else */
|
|
18469
|
-
/*
|
|
18470
|
-
The selectionEnd attribute must, on getting, return the offset (in logical
|
|
18471
|
-
order) to the character that immediately follows the end of the selection.
|
|
18472
|
-
If there is no selection, then it must return the offset (in logical order)
|
|
18473
|
-
to the character that immediately follows the text entry cursor.
|
|
18479
|
+
/*
|
|
18480
|
+
The selectionEnd attribute must, on getting, return the offset (in logical
|
|
18481
|
+
order) to the character that immediately follows the end of the selection.
|
|
18482
|
+
If there is no selection, then it must return the offset (in logical order)
|
|
18483
|
+
to the character that immediately follows the text entry cursor.
|
|
18474
18484
|
W3 HTML5 - 4.10 Forms. */
|
|
18475
18485
|
if (output.value.length < 1) return false;
|
|
18476
18486
|
let txt = output.value;
|
|
@@ -18488,10 +18498,10 @@ var TouchInputMethod = new function () {
|
|
|
18488
18498
|
function add_char_output_texts(ch) {
|
|
18489
18499
|
output.focus(); // 讓使用者注意出字到什麼地方
|
|
18490
18500
|
// execCommand('delete') not work with input control. see issue 2.
|
|
18491
|
-
/*if (document.queryCommandSupported('insertText') && output.nodeName.toLowerCase() == 'div' && output.contentEditable) {
|
|
18492
|
-
console.log('insertTExt');
|
|
18493
|
-
document.execCommand('insertText', false, ch);
|
|
18494
|
-
}
|
|
18501
|
+
/*if (document.queryCommandSupported('insertText') && output.nodeName.toLowerCase() == 'div' && output.contentEditable) {
|
|
18502
|
+
console.log('insertTExt');
|
|
18503
|
+
document.execCommand('insertText', false, ch);
|
|
18504
|
+
}
|
|
18495
18505
|
else */
|
|
18496
18506
|
let txt = output.value;
|
|
18497
18507
|
let entry_cursor = output.selectionEnd;
|
|
@@ -18572,10 +18582,10 @@ var TouchInputMethod = new function () {
|
|
|
18572
18582
|
for (ikb = 0; ikb < kbs.length; ++ikb) {
|
|
18573
18583
|
kb_text = kbs[ikb].textContent;
|
|
18574
18584
|
if (capital_mode && kb_text >= 'a' && kb_text <= 'z' && kb_text.length === 1) kbs[ikb].textContent = kb_text.toUpperCase();else if (!capital_mode && kb_text >= 'A' && kb_text <= 'Z' && kb_text.length === 1) kbs[ikb].textContent = kb_text.toLowerCase();
|
|
18575
|
-
/* // 減少改寫 DOM 內容的次數
|
|
18576
|
-
kbs[ikb].textContent = (capital_mode ?
|
|
18577
|
-
kbs[ikb].textContent.toUpperCase() :
|
|
18578
|
-
kbs[ikb].textContent.toLowerCase());
|
|
18585
|
+
/* // 減少改寫 DOM 內容的次數
|
|
18586
|
+
kbs[ikb].textContent = (capital_mode ?
|
|
18587
|
+
kbs[ikb].textContent.toUpperCase() :
|
|
18588
|
+
kbs[ikb].textContent.toLowerCase());
|
|
18579
18589
|
*/
|
|
18580
18590
|
}
|
|
18581
18591
|
|
|
@@ -18715,12 +18725,12 @@ var TouchInputMethod = new function () {
|
|
|
18715
18725
|
function bind_all_text_input_focus_handler() {
|
|
18716
18726
|
let inputs = document.querySelectorAll('input, textarea');
|
|
18717
18727
|
for (let i = 0; i < inputs.length; ++i) {
|
|
18718
|
-
/*
|
|
18719
|
-
if (this.type in special_input_keyboard_map &&
|
|
18720
|
-
special_input_keyboard_map[this.type] == 'ignore')
|
|
18721
|
-
{
|
|
18722
|
-
continue;
|
|
18723
|
-
}
|
|
18728
|
+
/*
|
|
18729
|
+
if (this.type in special_input_keyboard_map &&
|
|
18730
|
+
special_input_keyboard_map[this.type] == 'ignore')
|
|
18731
|
+
{
|
|
18732
|
+
continue;
|
|
18733
|
+
}
|
|
18724
18734
|
*/
|
|
18725
18735
|
inputs[i].addEventListener('focus', function () {
|
|
18726
18736
|
if (output != this) {
|
|
@@ -29791,15 +29801,15 @@ var jquery = {exports: {}};
|
|
|
29791
29801
|
var $ = jquery.exports;
|
|
29792
29802
|
|
|
29793
29803
|
/* eslint-disable */
|
|
29794
|
-
/*
|
|
29795
|
-
* rwdImageMaps jQuery plugin v1.6
|
|
29796
|
-
*
|
|
29797
|
-
* Allows image maps to be used in a responsive design by recalculating the area coordinates to match the actual image size on load and window.resize
|
|
29798
|
-
*
|
|
29799
|
-
* Copyright (c) 2016 Matt Stow
|
|
29800
|
-
* https://github.com/stowball/jQuery-rwdImageMaps
|
|
29801
|
-
* http://mattstow.com
|
|
29802
|
-
* Licensed under the MIT license
|
|
29804
|
+
/*
|
|
29805
|
+
* rwdImageMaps jQuery plugin v1.6
|
|
29806
|
+
*
|
|
29807
|
+
* Allows image maps to be used in a responsive design by recalculating the area coordinates to match the actual image size on load and window.resize
|
|
29808
|
+
*
|
|
29809
|
+
* Copyright (c) 2016 Matt Stow
|
|
29810
|
+
* https://github.com/stowball/jQuery-rwdImageMaps
|
|
29811
|
+
* http://mattstow.com
|
|
29812
|
+
* Licensed under the MIT license
|
|
29803
29813
|
*/
|
|
29804
29814
|
|
|
29805
29815
|
function rwdImageMaps ($img) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { a as _slicedToArray } from './_rollupPluginBabelHelpers-a52356f6.js';
|
|
2
2
|
import React__default, { useState, useEffect } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { c as classNames } from './index-
|
|
4
|
+
import { c as classNames } from './index-ef96775f.js';
|
|
5
5
|
import axios from 'axios';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
|
-
import { A as Autocomplete } from './Autocomplete-
|
|
7
|
+
import { A as Autocomplete } from './Autocomplete-887cda6a.js';
|
|
8
8
|
|
|
9
9
|
var css_248z = ".keywordSearch {\n border-radius: 4px;\n width: 100%;\n margin-right: 14px;\n}\n.keywordSearch--animation .autocomplete {\n transition: max-width 0.3s ease-out;\n max-width: 240px;\n}\n.keywordSearch--focus {\n flex: 1;\n}\n.keywordSearch--focus .autocomplete {\n max-width: 100%;\n}\n.keywordSearch .MuiAutocomplete-hasPopupIcon.MuiAutocomplete-hasClearIcon .MuiAutocomplete-inputRoot[class*=MuiOutlinedInput-root] {\n border-radius: 10px;\n background-color: #ffffff66;\n}";
|
|
10
10
|
styleInject(css_248z);
|