@cloudbase/weda-ui 0.2.6-alhpa.0 → 0.2.9
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/CHANGELOG.md +240 -0
- package/package.json +5 -5
- package/src/configs/components/container.json +2 -1
- package/src/configs/components/form/input.json +6 -0
- package/src/configs/components/form/richText.json +2 -1
- package/src/configs/components/form/uploader.json +9 -4
- package/src/configs/components/image.json +2 -1
- package/src/configs/components/link.json +2 -1
- package/src/configs/components/richtextview.json +2 -1
- package/src/configs/components/scrollVeiw.json +2 -1
- package/src/configs/components/swiper.json +2 -1
- package/src/configs/components/tabs.json +31 -86
- package/src/configs/components/text.json +2 -1
- package/src/configs/index.js +3 -7
- package/src/index.js +2 -3
- package/src/mp/.gitignore +10 -0
- package/src/mp/components/form/input/index.js +5 -1
- package/src/mp/components/form/input/index.wxml +2 -1
- package/src/mp/components/form/select/index.js +2 -2
- package/src/mp/components/form/textarea/index.wxml +1 -0
- package/src/mp/components/form/uploader/index.js +48 -14
- package/src/mp/components/form/uploader/index.wxml +9 -2
- package/src/mp/components/image/index.js +57 -8
- package/src/mp/components/image/index.json +4 -1
- package/src/mp/components/image/index.wxml +4 -2
- package/src/mp/components/image/index.wxss +14 -0
- package/src/mp/components/richText/index.wxml +3 -1
- package/src/mp/components/tabs/index.js +22 -6
- package/src/mp/utils/deepEqual.js +42 -0
- package/src/web/actions/index.js +2 -4
- package/src/web/components/form/checkbox/index.jsx +8 -10
- package/src/web/components/form/enumSelect/MultipleSelect.jsx +12 -23
- package/src/web/components/form/enumSelect/NormalSelect.jsx +12 -12
- package/src/web/components/form/enumSelect/SelectContainer.jsx +43 -0
- package/src/web/components/form/enumSelect/hooks/index.js +7 -4
- package/src/web/components/form/enumSelect/props/propsTypes.js +7 -0
- package/src/web/components/form/formcell/index.jsx +1 -1
- package/src/web/components/form/input/index.jsx +16 -18
- package/src/web/components/form/radio/index.jsx +7 -7
- package/src/web/components/form/select/h5.jsx +1 -1
- package/src/web/components/form/select/region/{cities.json → cities.js} +2 -2
- package/src/web/components/form/select/region/index.js +3 -3
- package/src/web/components/form/select/region/{provinces.json → provinces.js} +2 -2
- package/src/web/components/form/select/region/{regions.json → regions.js} +2 -2
- package/src/web/components/form/switch/index.jsx +4 -9
- package/src/web/components/form/textarea/index.jsx +4 -12
- package/src/web/components/form/uploader/index.css +15 -0
- package/src/web/components/form/uploader/index.jsx +2 -2
- package/src/web/components/form/uploader/uploader.h5.jsx +237 -0
- package/src/web/components/form/uploader/{uploaderPc.jsx → uploader.pc.jsx} +69 -56
- package/src/web/components/image/image.jsx +79 -5
- package/src/web/components/image/index.css +17 -0
- package/src/web/components/image/index.jsx +1 -0
- package/src/web/components/index.js +27 -62
- package/src/web/components/richTextView/index.css +0 -10
- package/src/web/components/richTextView/index.jsx +1 -12
- package/src/web/components/tabs/{index.js → index.jsx} +3 -3
- package/src/web/components/tabs/{tabsH5.js → tabs.h5.jsx} +9 -47
- package/src/web/components/tabs/{tabsPc.js → tabs.pc.jsx} +13 -47
- package/src/web/components/uploaderView/index.jsx +1 -1
- package/src/web/index.js +2 -3
- package/src/web/utils/isObjectEqual.js +10 -1
- package/src/web/utils/useSyncValue.js +14 -0
- package/src/web/weda-ui.css +8 -0
- package/src/configs/components/form/enumSelect.json +0 -127
- package/src/configs/components/form/mapPosition.json +0 -33
- package/src/configs/components/markdown.json +0 -17
- package/src/mp/components/markdown/index.js +0 -27
- package/src/mp/components/markdown/index.json +0 -6
- package/src/mp/components/markdown/index.wxml +0 -1
- package/src/mp/components/markdown/towxml/audio-player/Audio.js +0 -99
- package/src/mp/components/markdown/towxml/audio-player/audio-player.js +0 -102
- package/src/mp/components/markdown/towxml/audio-player/audio-player.json +0 -5
- package/src/mp/components/markdown/towxml/audio-player/audio-player.wxml +0 -14
- package/src/mp/components/markdown/towxml/audio-player/audio-player.wxss +0 -175
- package/src/mp/components/markdown/towxml/audio-player/loading.svg +0 -1
- package/src/mp/components/markdown/towxml/config.js +0 -285
- package/src/mp/components/markdown/towxml/decode.js +0 -26
- package/src/mp/components/markdown/towxml/decode.json +0 -12
- package/src/mp/components/markdown/towxml/decode.wxml +0 -1
- package/src/mp/components/markdown/towxml/decode.wxss +0 -0
- package/src/mp/components/markdown/towxml/img/img.js +0 -98
- package/src/mp/components/markdown/towxml/img/img.json +0 -3
- package/src/mp/components/markdown/towxml/img/img.wxml +0 -1
- package/src/mp/components/markdown/towxml/img/img.wxss +0 -0
- package/src/mp/components/markdown/towxml/index.js +0 -19
- package/src/mp/components/markdown/towxml/latex/latex.js +0 -53
- package/src/mp/components/markdown/towxml/latex/latex.json +0 -5
- package/src/mp/components/markdown/towxml/latex/latex.wxml +0 -1
- package/src/mp/components/markdown/towxml/latex/latex.wxss +0 -0
- package/src/mp/components/markdown/towxml/parse/highlight/highlight.js +0 -729
- package/src/mp/components/markdown/towxml/parse/highlight/index.js +0 -7
- package/src/mp/components/markdown/towxml/parse/highlight/languages/bash.js +0 -91
- package/src/mp/components/markdown/towxml/parse/highlight/languages/c-like.js +0 -244
- package/src/mp/components/markdown/towxml/parse/highlight/languages/c.js +0 -20
- package/src/mp/components/markdown/towxml/parse/highlight/languages/css.js +0 -138
- package/src/mp/components/markdown/towxml/parse/highlight/languages/dart.js +0 -135
- package/src/mp/components/markdown/towxml/parse/highlight/languages/go.js +0 -57
- package/src/mp/components/markdown/towxml/parse/highlight/languages/htmlbars.js +0 -79
- package/src/mp/components/markdown/towxml/parse/highlight/languages/java.js +0 -126
- package/src/mp/components/markdown/towxml/parse/highlight/languages/javascript.js +0 -263
- package/src/mp/components/markdown/towxml/parse/highlight/languages/json.js +0 -51
- package/src/mp/components/markdown/towxml/parse/highlight/languages/less.js +0 -177
- package/src/mp/components/markdown/towxml/parse/highlight/languages/nginx.js +0 -103
- package/src/mp/components/markdown/towxml/parse/highlight/languages/php.js +0 -152
- package/src/mp/components/markdown/towxml/parse/highlight/languages/python-repl.js +0 -27
- package/src/mp/components/markdown/towxml/parse/highlight/languages/python.js +0 -146
- package/src/mp/components/markdown/towxml/parse/highlight/languages/scss.js +0 -137
- package/src/mp/components/markdown/towxml/parse/highlight/languages/shell.js +0 -23
- package/src/mp/components/markdown/towxml/parse/highlight/languages/typescript.js +0 -198
- package/src/mp/components/markdown/towxml/parse/highlight/languages/xml.js +0 -143
- package/src/mp/components/markdown/towxml/parse/highlight/style/github.wxss +0 -99
- package/src/mp/components/markdown/towxml/parse/highlight/style/monokai.wxss +0 -70
- package/src/mp/components/markdown/towxml/parse/index.js +0 -106
- package/src/mp/components/markdown/towxml/parse/markdown/index.js +0 -53
- package/src/mp/components/markdown/towxml/parse/markdown/markdown.js +0 -5834
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/emoji.js +0 -1773
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/ins.js +0 -120
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/latex.js +0 -193
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/mark.js +0 -120
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/sub.js +0 -95
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/sup.js +0 -95
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/todo.js +0 -220
- package/src/mp/components/markdown/towxml/parse/markdown/plugins/yuml.js +0 -18
- package/src/mp/components/markdown/towxml/parse/parse2/Parser.js +0 -263
- package/src/mp/components/markdown/towxml/parse/parse2/Tokenizer.js +0 -507
- package/src/mp/components/markdown/towxml/parse/parse2/domhandler/index.js +0 -104
- package/src/mp/components/markdown/towxml/parse/parse2/domhandler/node.js +0 -169
- package/src/mp/components/markdown/towxml/parse/parse2/entities/decode.js +0 -54
- package/src/mp/components/markdown/towxml/parse/parse2/entities/decode_codepoint.js +0 -19
- package/src/mp/components/markdown/towxml/parse/parse2/entities/encode.js +0 -54
- package/src/mp/components/markdown/towxml/parse/parse2/entities/index.js +0 -30
- package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/decode.js +0 -31
- package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/entities.js +0 -2128
- package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/legacy.js +0 -109
- package/src/mp/components/markdown/towxml/parse/parse2/entities/maps/xml.js +0 -2
- package/src/mp/components/markdown/towxml/parse/parse2/index.js +0 -8
- package/src/mp/components/markdown/towxml/style/main.wxss +0 -378
- package/src/mp/components/markdown/towxml/style/theme/dark.wxss +0 -73
- package/src/mp/components/markdown/towxml/style/theme/light.wxss +0 -63
- package/src/mp/components/markdown/towxml/table/table.js +0 -11
- package/src/mp/components/markdown/towxml/table/table.json +0 -6
- package/src/mp/components/markdown/towxml/table/table.wxml +0 -24
- package/src/mp/components/markdown/towxml/table/table.wxss +0 -0
- package/src/mp/components/markdown/towxml/todogroup/todogroup.js +0 -19
- package/src/mp/components/markdown/towxml/todogroup/todogroup.json +0 -6
- package/src/mp/components/markdown/towxml/todogroup/todogroup.wxml +0 -13
- package/src/mp/components/markdown/towxml/todogroup/todogroup.wxss +0 -3
- package/src/mp/components/markdown/towxml/towxml.js +0 -17
- package/src/mp/components/markdown/towxml/towxml.json +0 -6
- package/src/mp/components/markdown/towxml/towxml.wxml +0 -5
- package/src/mp/components/markdown/towxml/towxml.wxss +0 -8
- package/src/mp/components/markdown/towxml/yuml/yuml.js +0 -51
- package/src/mp/components/markdown/towxml/yuml/yuml.json +0 -5
- package/src/mp/components/markdown/towxml/yuml/yuml.wxml +0 -5
- package/src/mp/components/markdown/towxml/yuml/yuml.wxss +0 -0
- package/src/web/components/form/enumSelect/FormContainer.jsx +0 -41
- package/src/web/components/form/position/MapView.jsx +0 -124
- package/src/web/components/form/position/SelectModal.css +0 -3
- package/src/web/components/form/position/SelectModal.jsx +0 -112
- package/src/web/components/form/position/constants.js +0 -7
- package/src/web/components/form/position/index.jsx +0 -68
- package/src/web/components/form/uploader/uploaderH5.jsx +0 -196
- package/src/web/components/link/test/__snapshots__/storybook.test.js.snap +0 -754
- package/src/web/components/markdown/index.jsx +0 -40
- package/src/web/wedatheme/.code.yml +0 -16
- package/src/web/wedatheme/.editorconfig +0 -9
- package/src/web/wedatheme/.eslintrc +0 -20
- package/src/web/wedatheme/.orange-ci.yml +0 -55
- package/src/web/wedatheme/.vscode/extensions.json +0 -3
- package/src/web/wedatheme/.vscode/settings.json +0 -11
- package/src/web/wedatheme/README.md +0 -50
- package/src/web/wedatheme/i18n/README.md +0 -4
- package/src/web/wedatheme/i18n/translation/index.js +0 -10
- package/src/web/wedatheme/i18n/translation/zh.js +0 -15
- package/src/web/wedatheme/jsconfig.json +0 -15
- package/src/web/wedatheme/mock/app.js +0 -42
- package/src/web/wedatheme/mock/history-context.js +0 -8
- package/src/web/wedatheme/mock/index.js +0 -3
- package/src/web/wedatheme/mock/layout/AppLayout.jsx +0 -28
- package/src/web/wedatheme/mock/layout/MenuWithRouter.jsx +0 -50
- package/src/web/wedatheme/mock/layout/index.js +0 -1
- package/src/web/wedatheme/package.json +0 -61
- package/src/web/wedatheme/public/index.html +0 -19
- package/src/web/wedatheme/src/app.js +0 -22
- package/src/web/wedatheme/src/components/README.md +0 -4
- package/src/web/wedatheme/src/configs/menu.js +0 -9
- package/src/web/wedatheme/src/routes/wedatheme-index/Component.jsx +0 -402
- package/src/web/wedatheme/src/routes/wedatheme-index/Form.jsx +0 -729
- package/src/web/wedatheme/src/routes/wedatheme-index/FormItem.jsx +0 -18
- package/src/web/wedatheme/src/routes/wedatheme-index/WedathemeIndex.jsx +0 -1276
- package/src/web/wedatheme/src/routes/wedatheme-index/index.js +0 -1
- package/src/web/wedatheme/src/routes/weui2td/WEUI2TD.jsx +0 -3
- package/src/web/wedatheme/src/routes/weui2td/index.js +0 -1
- package/src/web/wedatheme/src/styles/_btn.scss +0 -24
- package/src/web/wedatheme/src/styles/_icon.scss +0 -653
- package/src/web/wedatheme/src/styles/_map.scss +0 -12
- package/src/web/wedatheme/src/styles/_middle.scss +0 -340
- package/src/web/wedatheme/src/styles/_upload.scss +0 -47
- package/src/web/wedatheme/src/styles/assets/alert-close.svg +0 -3
- package/src/web/wedatheme/src/styles/assets/and.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/arrowdown--line.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/arrowdown.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/arrowleft--line.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/arrowleft.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/arrowright--line.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/arrowright-blue--line.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/arrowright.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/arrowup--line.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/arrowup.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/bell-warning.svg +0 -3
- package/src/web/wedatheme/src/styles/assets/btnback.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/calendar.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/chartcolumn-1.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/chartcolumn.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/chartline-1.svg +0 -9
- package/src/web/wedatheme/src/styles/assets/chartline.svg +0 -9
- package/src/web/wedatheme/src/styles/assets/chartpie-1.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/chartpie.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/check-1.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/check-2.svg +0 -1
- package/src/web/wedatheme/src/styles/assets/check.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/close-1.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/close.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/consult.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/convertip--blue.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/convertip.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/copy.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/cur-active.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/cur.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/daily.svg +0 -13
- package/src/web/wedatheme/src/styles/assets/database.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/datasheet.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/delete-white.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/delete.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/detail.svg +0 -13
- package/src/web/wedatheme/src/styles/assets/dismiss.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/download.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/drop.svg +0 -15
- package/src/web/wedatheme/src/styles/assets/email-error.svg +0 -14
- package/src/web/wedatheme/src/styles/assets/email-warning.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/email.svg +0 -14
- package/src/web/wedatheme/src/styles/assets/emailv.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/error-1.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/error-filled.svg +0 -3
- package/src/web/wedatheme/src/styles/assets/error.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/externallink.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/favorable.svg +0 -9
- package/src/web/wedatheme/src/styles/assets/filter.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/firstpage.svg +0 -13
- package/src/web/wedatheme/src/styles/assets/folderclose.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/folderopen.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/fullscreenquit.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/fullsreen.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/globe-gray.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/guide.svg +0 -9
- package/src/web/wedatheme/src/styles/assets/help.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/hide.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/info.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/infoblue-1.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/infoblue-filled.svg +0 -3
- package/src/web/wedatheme/src/styles/assets/infoblue.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/jump-black.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/jump.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/lastpage.svg +0 -13
- package/src/web/wedatheme/src/styles/assets/loading.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/local.svg +0 -10
- package/src/web/wedatheme/src/styles/assets/menu-fold-white.svg +0 -6
- package/src/web/wedatheme/src/styles/assets/menu-fold.svg +0 -6
- package/src/web/wedatheme/src/styles/assets/minus.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/monitor.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/more.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/multi-line.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/news.svg +0 -3
- package/src/web/wedatheme/src/styles/assets/not.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/notice.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/pencil.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/pending-1.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/pending-gray.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/pending.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/percent-blue.svg +0 -16
- package/src/web/wedatheme/src/styles/assets/percent.svg +0 -16
- package/src/web/wedatheme/src/styles/assets/phone-error.svg +0 -11
- package/src/web/wedatheme/src/styles/assets/phone-warning.svg +0 -9
- package/src/web/wedatheme/src/styles/assets/phone.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/phonev.svg +0 -9
- package/src/web/wedatheme/src/styles/assets/plus.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/qq.svg +0 -11
- package/src/web/wedatheme/src/styles/assets/realname.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/realnamev.svg +0 -9
- package/src/web/wedatheme/src/styles/assets/refresh-blue.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/refresh.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/relationship-1.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/relationship.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/remind.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/search.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/setting.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/shopcart.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/show.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/sort.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/sortdown.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/sortup.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/success-1.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/success-filled.svg +0 -3
- package/src/web/wedatheme/src/styles/assets/success.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/table-1.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/table.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/tag.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/time.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/transfer.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/trenddown.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/trendup.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/viewgrid.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/viewlist.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/warning-1.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/warning-filled.svg +0 -3
- package/src/web/wedatheme/src/styles/assets/warning.svg +0 -8
- package/src/web/wedatheme/src/styles/assets/wechat-error.svg +0 -14
- package/src/web/wedatheme/src/styles/assets/wechat-warning.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/wechat.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/wechatv.svg +0 -12
- package/src/web/wedatheme/src/styles/assets/zoom-in-white.svg +0 -4
- package/src/web/wedatheme/src/styles/assets/zoom-in.svg +0 -4
- package/src/web/wedatheme/src/styles/assets/zoom-out-white.svg +0 -4
- package/src/web/wedatheme/src/styles/assets/zoom-out.svg +0 -4
- package/src/web/wedatheme/src/styles/index.scss +0 -18
- package/src/web/wedatheme/src/styles/main.css +0 -166
- package/src/web/wedatheme/src/styles/theme/_alert.scss +0 -73
- package/src/web/wedatheme/src/styles/theme/_badge.scss +0 -38
- package/src/web/wedatheme/src/styles/theme/_blank-page-v2.scss +0 -7
- package/src/web/wedatheme/src/styles/theme/_breadcrumb.scss +0 -8
- package/src/web/wedatheme/src/styles/theme/_bubble.scss +0 -24
- package/src/web/wedatheme/src/styles/theme/_button.scss +0 -212
- package/src/web/wedatheme/src/styles/theme/_card.scss +0 -12
- package/src/web/wedatheme/src/styles/theme/_cascader.scss +0 -43
- package/src/web/wedatheme/src/styles/theme/_checkbox&radio.scss +0 -83
- package/src/web/wedatheme/src/styles/theme/_datepicker.scss +0 -36
- package/src/web/wedatheme/src/styles/theme/_dialog.scss +0 -39
- package/src/web/wedatheme/src/styles/theme/_divider.scss +0 -1
- package/src/web/wedatheme/src/styles/theme/_drawer.scss +0 -15
- package/src/web/wedatheme/src/styles/theme/_dropdown.scss +0 -53
- package/src/web/wedatheme/src/styles/theme/_form.scss +0 -38
- package/src/web/wedatheme/src/styles/theme/_icon.scss +0 -0
- package/src/web/wedatheme/src/styles/theme/_input&textarea&select.scss +0 -85
- package/src/web/wedatheme/src/styles/theme/_inputnumber.scss +0 -16
- package/src/web/wedatheme/src/styles/theme/_link.scss +0 -14
- package/src/web/wedatheme/src/styles/theme/_list.scss +0 -41
- package/src/web/wedatheme/src/styles/theme/_metrics-board.scss +0 -14
- package/src/web/wedatheme/src/styles/theme/_notification.scss +0 -27
- package/src/web/wedatheme/src/styles/theme/_pagination.scss +0 -22
- package/src/web/wedatheme/src/styles/theme/_popconfirm.scss +0 -4
- package/src/web/wedatheme/src/styles/theme/_progress.scss +0 -28
- package/src/web/wedatheme/src/styles/theme/_region-select.scss +0 -17
- package/src/web/wedatheme/src/styles/theme/_search.scss +0 -18
- package/src/web/wedatheme/src/styles/theme/_segment.scss +0 -69
- package/src/web/wedatheme/src/styles/theme/_slider.scss +0 -18
- package/src/web/wedatheme/src/styles/theme/_status.scss +0 -4
- package/src/web/wedatheme/src/styles/theme/_steps.scss +0 -68
- package/src/web/wedatheme/src/styles/theme/_switch.scss +0 -11
- package/src/web/wedatheme/src/styles/theme/_table.scss +0 -44
- package/src/web/wedatheme/src/styles/theme/_tabs.scss +0 -44
- package/src/web/wedatheme/src/styles/theme/_tag-search.scss +0 -9
- package/src/web/wedatheme/src/styles/theme/_tag.scss +0 -48
- package/src/web/wedatheme/src/styles/theme/_timeline.scss +0 -0
- package/src/web/wedatheme/src/styles/theme/_toast.scss +0 -3
- package/src/web/wedatheme/src/styles/theme/_transfer.scss +0 -9
- package/src/web/wedatheme/src/styles/theme/_tree.scss +0 -11
- package/src/web/wedatheme/src/styles/theme/_upload.scss +0 -14
- package/src/web/wedatheme/src/styles/theme/_variables.scss +0 -140
- package/src/web/wedatheme/src/styles/theme/index.scss +0 -91
- package/src/web/wedatheme/style-package/README.md +0 -31
- package/src/web/wedatheme/style-package/ef6fa527e24e354765d806b826b41391.svg +0 -627
- package/src/web/wedatheme/style-package/index.css +0 -3
- package/src/web/wedatheme/style-package/package.json +0 -15
- package/src/web/wedatheme/tea.config.js +0 -66
- package/src/web/wedatheme/webpack/css.config.js +0 -114
- package/src/web/wedatheme/webpack/plugins/css-package-plugin.js +0 -23
- package/src/web/wedatheme/webpack/plugins/inject-assets-plugin.js +0 -32
- package/src/web/wedatheme/webpack/plugins/package-json-plugin.js +0 -66
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
(function (f) {
|
|
2
|
-
if (typeof exports === 'object' && typeof module !== 'undefined') {
|
|
3
|
-
module.exports = f();
|
|
4
|
-
} else if (typeof define === 'function' && define.amd) {
|
|
5
|
-
define([], f);
|
|
6
|
-
} else {
|
|
7
|
-
let g;
|
|
8
|
-
if (typeof window !== 'undefined') {
|
|
9
|
-
g = window;
|
|
10
|
-
} else if (typeof global !== 'undefined') {
|
|
11
|
-
g = global;
|
|
12
|
-
} else if (typeof self !== 'undefined') {
|
|
13
|
-
g = self;
|
|
14
|
-
} else {
|
|
15
|
-
g = this;
|
|
16
|
-
}
|
|
17
|
-
g.markdownitTaskLists = f();
|
|
18
|
-
}
|
|
19
|
-
})(() => {
|
|
20
|
-
let define;
|
|
21
|
-
let module;
|
|
22
|
-
let exports;
|
|
23
|
-
return (function () {
|
|
24
|
-
function e(t, n, r) {
|
|
25
|
-
function s(o, u) {
|
|
26
|
-
if (!n[o]) {
|
|
27
|
-
if (!t[o]) {
|
|
28
|
-
const a = typeof require === 'function' && require;
|
|
29
|
-
if (!u && a) return a(o, !0);
|
|
30
|
-
if (i) return i(o, !0);
|
|
31
|
-
const f = new Error(`Cannot find module '${o}'`);
|
|
32
|
-
throw ((f.code = 'MODULE_NOT_FOUND'), f);
|
|
33
|
-
}
|
|
34
|
-
const l = (n[o] = { exports: {} });
|
|
35
|
-
t[o][0].call(
|
|
36
|
-
l.exports,
|
|
37
|
-
(e) => {
|
|
38
|
-
const n = t[o][1][e];
|
|
39
|
-
return s(n ? n : e);
|
|
40
|
-
},
|
|
41
|
-
l,
|
|
42
|
-
l.exports,
|
|
43
|
-
e,
|
|
44
|
-
t,
|
|
45
|
-
n,
|
|
46
|
-
r,
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
return n[o].exports;
|
|
50
|
-
}
|
|
51
|
-
var i = typeof require === 'function' && require;
|
|
52
|
-
for (let o = 0; o < r.length; o++) s(r[o]);
|
|
53
|
-
return s;
|
|
54
|
-
}
|
|
55
|
-
return e;
|
|
56
|
-
})()(
|
|
57
|
-
{
|
|
58
|
-
1: [
|
|
59
|
-
function (require, module, exports) {
|
|
60
|
-
// Markdown-it plugin to render GitHub-style task lists; see
|
|
61
|
-
//
|
|
62
|
-
// https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments
|
|
63
|
-
// https://github.com/blog/1825-task-lists-in-all-markdown-documents
|
|
64
|
-
|
|
65
|
-
let disableCheckboxes = true;
|
|
66
|
-
let useLabelWrapper = false;
|
|
67
|
-
let useLabelAfter = false;
|
|
68
|
-
|
|
69
|
-
module.exports = function (md, options) {
|
|
70
|
-
if (options) {
|
|
71
|
-
disableCheckboxes = !options.enabled;
|
|
72
|
-
useLabelWrapper = !!options.label;
|
|
73
|
-
useLabelAfter = !!options.labelAfter;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
md.core.ruler.after('inline', 'github-task-lists', (state) => {
|
|
77
|
-
const { tokens } = state;
|
|
78
|
-
|
|
79
|
-
// 用于寻找关闭标签的数组
|
|
80
|
-
const tagPaired = (index) => {
|
|
81
|
-
let targetItem;
|
|
82
|
-
const item = tokens[index];
|
|
83
|
-
const { tag } = item;
|
|
84
|
-
const { level } = item;
|
|
85
|
-
const targetType = item.type === 'list_item_open' ? 'list_item_close' : 'bullet_list_close';
|
|
86
|
-
for (let i = index, len = tokens.length; i < len; i++) {
|
|
87
|
-
const _item = tokens[i];
|
|
88
|
-
|
|
89
|
-
if (_item.tag === tag && level === _item.level && _item.type === targetType) {
|
|
90
|
-
targetItem = _item;
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return targetItem;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
for (let i = 2; i < tokens.length; i++) {
|
|
98
|
-
if (isTodoItem(tokens, i)) {
|
|
99
|
-
todoify(tokens[i], state.Token);
|
|
100
|
-
attrSet(tokens[i - 2], 'class', `task-list-item${!disableCheckboxes ? ' enabled' : ''}`);
|
|
101
|
-
attrSet(tokens[parentToken(tokens, i - 2)], 'class', 'contains-task-list');
|
|
102
|
-
|
|
103
|
-
tagPaired(parentToken(tokens, i - 2)).tag = 'todogroup';
|
|
104
|
-
tokens[parentToken(tokens, i - 2)].tag = 'todogroup';
|
|
105
|
-
|
|
106
|
-
tagPaired(i - 2).tag = 'todolist';
|
|
107
|
-
tokens[i - 2].tag = 'todolist';
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
function attrSet(token, name, value) {
|
|
114
|
-
const index = token.attrIndex(name);
|
|
115
|
-
const attr = [name, value];
|
|
116
|
-
if (index < 0) {
|
|
117
|
-
token.attrPush(attr);
|
|
118
|
-
} else {
|
|
119
|
-
token.attrs[index] = attr;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function parentToken(tokens, index) {
|
|
124
|
-
const targetLevel = tokens[index].level - 1;
|
|
125
|
-
for (let i = index - 1; i >= 0; i--) {
|
|
126
|
-
if (tokens[i].level === targetLevel) {
|
|
127
|
-
return i;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return -1;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function isTodoItem(tokens, index) {
|
|
134
|
-
return (
|
|
135
|
-
isInline(tokens[index]) &&
|
|
136
|
-
isParagraph(tokens[index - 1]) &&
|
|
137
|
-
isListItem(tokens[index - 2]) &&
|
|
138
|
-
startsWithTodoMarkdown(tokens[index])
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function todoify(token, TokenConstructor) {
|
|
143
|
-
token.children.unshift(makeCheckbox(token, TokenConstructor));
|
|
144
|
-
token.children[1].content = token.children[1].content.slice(3);
|
|
145
|
-
token.content = token.content.slice(3);
|
|
146
|
-
|
|
147
|
-
if (useLabelWrapper) {
|
|
148
|
-
if (useLabelAfter) {
|
|
149
|
-
token.children.pop();
|
|
150
|
-
|
|
151
|
-
// Use large random number as id property of the checkbox.
|
|
152
|
-
const id = `task-item-${Math.ceil(Math.random() * (10000 * 1000) - 1000)}`;
|
|
153
|
-
token.children[0].content = `${token.children[0].content.slice(0, -1)} id="${id}">`;
|
|
154
|
-
token.children.push(afterLabel(token.content, id, TokenConstructor));
|
|
155
|
-
} else {
|
|
156
|
-
token.children.unshift(beginLabel(TokenConstructor));
|
|
157
|
-
token.children.push(endLabel(TokenConstructor));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function makeCheckbox(token, TokenConstructor) {
|
|
163
|
-
const checkbox = new TokenConstructor('html_inline', '', 0);
|
|
164
|
-
const disabledAttr = disableCheckboxes ? ' disabled="" ' : '';
|
|
165
|
-
const value = ` value="${token.content}" `;
|
|
166
|
-
if (token.content.indexOf('[ ] ') === 0) {
|
|
167
|
-
checkbox.content = `<checkbox class="h2w__todoCheckbox task-list-item-checkbox"${disabledAttr}${value}/>`;
|
|
168
|
-
} else if (token.content.indexOf('[x] ') === 0 || token.content.indexOf('[X] ') === 0) {
|
|
169
|
-
checkbox.content = `<checkbox class="h2w__todoCheckbox task-list-item-checkbox" checked="true"${disabledAttr}${value}/>`;
|
|
170
|
-
}
|
|
171
|
-
return checkbox;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// these next two functions are kind of hacky; probably should really be a
|
|
175
|
-
// true block-level token with .tag=='label'
|
|
176
|
-
function beginLabel(TokenConstructor) {
|
|
177
|
-
const token = new TokenConstructor('html_inline', '', 0);
|
|
178
|
-
token.content = '<label>';
|
|
179
|
-
return token;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function endLabel(TokenConstructor) {
|
|
183
|
-
const token = new TokenConstructor('html_inline', '', 0);
|
|
184
|
-
token.content = '</label>';
|
|
185
|
-
return token;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
function afterLabel(content, id, TokenConstructor) {
|
|
189
|
-
const token = new TokenConstructor('html_inline', '', 0);
|
|
190
|
-
token.content = `<label class="task-list-item-label" for="${id}">${content}</label>`;
|
|
191
|
-
token.attrs = [{ for: id }];
|
|
192
|
-
return token;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function isInline(token) {
|
|
196
|
-
return token.type === 'inline';
|
|
197
|
-
}
|
|
198
|
-
function isParagraph(token) {
|
|
199
|
-
return token.type === 'paragraph_open';
|
|
200
|
-
}
|
|
201
|
-
function isListItem(token) {
|
|
202
|
-
return token.type === 'list_item_open';
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function startsWithTodoMarkdown(token) {
|
|
206
|
-
// leading whitespace in a list item is already trimmed off by markdown-it
|
|
207
|
-
return (
|
|
208
|
-
token.content.indexOf('[ ] ') === 0 ||
|
|
209
|
-
token.content.indexOf('[x] ') === 0 ||
|
|
210
|
-
token.content.indexOf('[X] ') === 0
|
|
211
|
-
);
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
{},
|
|
215
|
-
],
|
|
216
|
-
},
|
|
217
|
-
{},
|
|
218
|
-
[1],
|
|
219
|
-
)(1);
|
|
220
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const config = require('../../../config');
|
|
2
|
-
const mermaidChart = (code) => `<yuml value="${encodeURIComponent(code)}"></yuml>`;
|
|
3
|
-
|
|
4
|
-
module.exports = (md) => {
|
|
5
|
-
const temp = md.renderer.rules.fence.bind(md.renderer.rules);
|
|
6
|
-
md.renderer.rules.fence = (tokens, idx, options, env, slf) => {
|
|
7
|
-
const token = tokens[idx];
|
|
8
|
-
const code = token.content.trim();
|
|
9
|
-
if (token.info === 'yuml') {
|
|
10
|
-
return mermaidChart(code);
|
|
11
|
-
}
|
|
12
|
-
// const firstLine = code.split(/\n/)[0].trim()
|
|
13
|
-
// if (firstLine === 'gantt' || firstLine === 'sequenceDiagram' || firstLine.match(/^graph (?:TB|BT|RL|LR|TD);?$/)) {
|
|
14
|
-
// return mermaidChart(code)
|
|
15
|
-
// }
|
|
16
|
-
return temp(tokens, idx, options, env, slf);
|
|
17
|
-
};
|
|
18
|
-
};
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
/* ! Project:无, Create:FWS 2020.01.08 21:48, Update:FWS 2020.01.08 21:48 */
|
|
2
|
-
'use strict';
|
|
3
|
-
function Parser(t, e) {
|
|
4
|
-
const s = this;
|
|
5
|
-
return (
|
|
6
|
-
(s._tagname = ''),
|
|
7
|
-
(s._attribname = ''),
|
|
8
|
-
(s._attribvalue = ''),
|
|
9
|
-
(s._attribs = null),
|
|
10
|
-
(s._stack = []),
|
|
11
|
-
(s._foreignContext = []),
|
|
12
|
-
(s.startIndex = 0),
|
|
13
|
-
(s.endIndex = null),
|
|
14
|
-
(s.parseChunk = Parser.prototype.write),
|
|
15
|
-
(s.done = Parser.prototype.end),
|
|
16
|
-
(s._options = e || {}),
|
|
17
|
-
(s._cbs = t || {}),
|
|
18
|
-
(s._tagname = ''),
|
|
19
|
-
(s._attribname = ''),
|
|
20
|
-
(s._attribvalue = ''),
|
|
21
|
-
(s._attribs = null),
|
|
22
|
-
(s._stack = []),
|
|
23
|
-
(s._foreignContext = []),
|
|
24
|
-
(s.startIndex = 0),
|
|
25
|
-
(s.endIndex = null),
|
|
26
|
-
(s._lowerCaseTagNames = 'lowerCaseTags' in s._options ? !!s._options.lowerCaseTags : !s._options.xmlMode),
|
|
27
|
-
(s._lowerCaseAttributeNames =
|
|
28
|
-
'lowerCaseAttributeNames' in s._options ? !!s._options.lowerCaseAttributeNames : !s._options.xmlMode),
|
|
29
|
-
(s._tokenizer = new (s._options.Tokenizer || Tokenizer_1.default)(s._options, s)),
|
|
30
|
-
s._cbs.onparserinit && s._cbs.onparserinit(s),
|
|
31
|
-
s
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
const __importDefault =
|
|
35
|
-
(this && this.__importDefault) ||
|
|
36
|
-
function (t) {
|
|
37
|
-
return t && t.__esModule ? t : { default: t };
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, '__esModule', { value: !0 });
|
|
40
|
-
var Tokenizer_1 = __importDefault(require('./Tokenizer'));
|
|
41
|
-
const formTags = new Set(['input', 'option', 'optgroup', 'select', 'button', 'datalist', 'textarea']);
|
|
42
|
-
const pTag = new Set(['p']);
|
|
43
|
-
const openImpliesClose = {
|
|
44
|
-
tr: new Set(['tr', 'th', 'td']),
|
|
45
|
-
th: new Set(['th']),
|
|
46
|
-
td: new Set(['thead', 'th', 'td']),
|
|
47
|
-
body: new Set(['head', 'link', 'script']),
|
|
48
|
-
li: new Set(['li']),
|
|
49
|
-
p: pTag,
|
|
50
|
-
h1: pTag,
|
|
51
|
-
h2: pTag,
|
|
52
|
-
h3: pTag,
|
|
53
|
-
h4: pTag,
|
|
54
|
-
h5: pTag,
|
|
55
|
-
h6: pTag,
|
|
56
|
-
select: formTags,
|
|
57
|
-
input: formTags,
|
|
58
|
-
output: formTags,
|
|
59
|
-
button: formTags,
|
|
60
|
-
datalist: formTags,
|
|
61
|
-
textarea: formTags,
|
|
62
|
-
option: new Set(['option']),
|
|
63
|
-
optgroup: new Set(['optgroup', 'option']),
|
|
64
|
-
dd: new Set(['dt', 'dd']),
|
|
65
|
-
dt: new Set(['dt', 'dd']),
|
|
66
|
-
address: pTag,
|
|
67
|
-
article: pTag,
|
|
68
|
-
aside: pTag,
|
|
69
|
-
blockquote: pTag,
|
|
70
|
-
details: pTag,
|
|
71
|
-
div: pTag,
|
|
72
|
-
dl: pTag,
|
|
73
|
-
fieldset: pTag,
|
|
74
|
-
figcaption: pTag,
|
|
75
|
-
figure: pTag,
|
|
76
|
-
footer: pTag,
|
|
77
|
-
form: pTag,
|
|
78
|
-
header: pTag,
|
|
79
|
-
hr: pTag,
|
|
80
|
-
main: pTag,
|
|
81
|
-
nav: pTag,
|
|
82
|
-
ol: pTag,
|
|
83
|
-
pre: pTag,
|
|
84
|
-
section: pTag,
|
|
85
|
-
table: pTag,
|
|
86
|
-
ul: pTag,
|
|
87
|
-
rt: new Set(['rt', 'rp']),
|
|
88
|
-
rp: new Set(['rt', 'rp']),
|
|
89
|
-
tbody: new Set(['thead', 'tbody']),
|
|
90
|
-
tfoot: new Set(['thead', 'tbody']),
|
|
91
|
-
};
|
|
92
|
-
const voidElements = new Set([
|
|
93
|
-
'area',
|
|
94
|
-
'base',
|
|
95
|
-
'basefont',
|
|
96
|
-
'br',
|
|
97
|
-
'col',
|
|
98
|
-
'command',
|
|
99
|
-
'embed',
|
|
100
|
-
'frame',
|
|
101
|
-
'hr',
|
|
102
|
-
'img',
|
|
103
|
-
'input',
|
|
104
|
-
'isindex',
|
|
105
|
-
'keygen',
|
|
106
|
-
'link',
|
|
107
|
-
'meta',
|
|
108
|
-
'param',
|
|
109
|
-
'source',
|
|
110
|
-
'track',
|
|
111
|
-
'wbr',
|
|
112
|
-
]);
|
|
113
|
-
const foreignContextElements = new Set(['math', 'svg']);
|
|
114
|
-
const htmlIntegrationElements = new Set([
|
|
115
|
-
'mi',
|
|
116
|
-
'mo',
|
|
117
|
-
'mn',
|
|
118
|
-
'ms',
|
|
119
|
-
'mtext',
|
|
120
|
-
'annotation-xml',
|
|
121
|
-
'foreignObject',
|
|
122
|
-
'desc',
|
|
123
|
-
'title',
|
|
124
|
-
]);
|
|
125
|
-
const reNameEnd = /\s|\//;
|
|
126
|
-
(Parser.prototype._updatePosition = function (t) {
|
|
127
|
-
null === this.endIndex
|
|
128
|
-
? this._tokenizer._sectionStart <= t
|
|
129
|
-
? (this.startIndex = 0)
|
|
130
|
-
: (this.startIndex = this._tokenizer._sectionStart - t)
|
|
131
|
-
: (this.startIndex = this.endIndex + 1),
|
|
132
|
-
(this.endIndex = this._tokenizer.getAbsoluteIndex());
|
|
133
|
-
}),
|
|
134
|
-
(Parser.prototype.ontext = function (t) {
|
|
135
|
-
this._updatePosition(1), this.endIndex--, this._cbs.ontext && this._cbs.ontext(t);
|
|
136
|
-
}),
|
|
137
|
-
(Parser.prototype.onopentagname = function (t) {
|
|
138
|
-
if (
|
|
139
|
-
(this._lowerCaseTagNames && (t = t.toLowerCase()),
|
|
140
|
-
(this._tagname = t),
|
|
141
|
-
!this._options.xmlMode && t in openImpliesClose)
|
|
142
|
-
)
|
|
143
|
-
for (let e = void 0; openImpliesClose[t].has((e = this._stack[this._stack.length - 1])); this.onclosetag(e));
|
|
144
|
-
(!this._options.xmlMode && voidElements.has(t)) ||
|
|
145
|
-
(this._stack.push(t),
|
|
146
|
-
foreignContextElements.has(t)
|
|
147
|
-
? this._foreignContext.push(!0)
|
|
148
|
-
: htmlIntegrationElements.has(t) && this._foreignContext.push(!1)),
|
|
149
|
-
this._cbs.onopentagname && this._cbs.onopentagname(t),
|
|
150
|
-
this._cbs.onopentag && (this._attribs = {});
|
|
151
|
-
}),
|
|
152
|
-
(Parser.prototype.onopentagend = function () {
|
|
153
|
-
this._updatePosition(1),
|
|
154
|
-
this._attribs &&
|
|
155
|
-
(this._cbs.onopentag && this._cbs.onopentag(this._tagname, this._attribs), (this._attribs = null)),
|
|
156
|
-
!this._options.xmlMode &&
|
|
157
|
-
this._cbs.onclosetag &&
|
|
158
|
-
voidElements.has(this._tagname) &&
|
|
159
|
-
this._cbs.onclosetag(this._tagname),
|
|
160
|
-
(this._tagname = '');
|
|
161
|
-
}),
|
|
162
|
-
(Parser.prototype.onclosetag = function (t) {
|
|
163
|
-
if (
|
|
164
|
-
(this._updatePosition(1),
|
|
165
|
-
this._lowerCaseTagNames && (t = t.toLowerCase()),
|
|
166
|
-
(foreignContextElements.has(t) || htmlIntegrationElements.has(t)) && this._foreignContext.pop(),
|
|
167
|
-
!this._stack.length || (!this._options.xmlMode && voidElements.has(t)))
|
|
168
|
-
)
|
|
169
|
-
this._options.xmlMode || ('br' !== t && 'p' !== t) || (this.onopentagname(t), this._closeCurrentTag());
|
|
170
|
-
else {
|
|
171
|
-
let e = this._stack.lastIndexOf(t);
|
|
172
|
-
if (-1 !== e)
|
|
173
|
-
if (this._cbs.onclosetag) for (e = this._stack.length - e; e--; ) this._cbs.onclosetag(this._stack.pop());
|
|
174
|
-
else this._stack.length = e;
|
|
175
|
-
else 'p' !== t || this._options.xmlMode || (this.onopentagname(t), this._closeCurrentTag());
|
|
176
|
-
}
|
|
177
|
-
}),
|
|
178
|
-
(Parser.prototype.onselfclosingtag = function () {
|
|
179
|
-
this._options.xmlMode || this._options.recognizeSelfClosing || this._foreignContext[this._foreignContext.length - 1]
|
|
180
|
-
? this._closeCurrentTag()
|
|
181
|
-
: this.onopentagend();
|
|
182
|
-
}),
|
|
183
|
-
(Parser.prototype._closeCurrentTag = function () {
|
|
184
|
-
const t = this._tagname;
|
|
185
|
-
this.onopentagend(),
|
|
186
|
-
this._stack[this._stack.length - 1] === t && (this._cbs.onclosetag && this._cbs.onclosetag(t), this._stack.pop());
|
|
187
|
-
}),
|
|
188
|
-
(Parser.prototype.onattribname = function (t) {
|
|
189
|
-
this._lowerCaseAttributeNames && (t = t.toLowerCase()), (this._attribname = t);
|
|
190
|
-
}),
|
|
191
|
-
(Parser.prototype.onattribdata = function (t) {
|
|
192
|
-
this._attribvalue += t;
|
|
193
|
-
}),
|
|
194
|
-
(Parser.prototype.onattribend = function () {
|
|
195
|
-
this._cbs.onattribute && this._cbs.onattribute(this._attribname, this._attribvalue),
|
|
196
|
-
this._attribs &&
|
|
197
|
-
!Object.prototype.hasOwnProperty.call(this._attribs, this._attribname) &&
|
|
198
|
-
(this._attribs[this._attribname] = this._attribvalue),
|
|
199
|
-
(this._attribname = ''),
|
|
200
|
-
(this._attribvalue = '');
|
|
201
|
-
}),
|
|
202
|
-
(Parser.prototype._getInstructionName = function (t) {
|
|
203
|
-
const e = t.search(reNameEnd);
|
|
204
|
-
let s = e < 0 ? t : t.substr(0, e);
|
|
205
|
-
return this._lowerCaseTagNames && (s = s.toLowerCase()), s;
|
|
206
|
-
}),
|
|
207
|
-
(Parser.prototype.ondeclaration = function (t) {
|
|
208
|
-
if (this._cbs.onprocessinginstruction) {
|
|
209
|
-
const e = this._getInstructionName(t);
|
|
210
|
-
this._cbs.onprocessinginstruction(`!${e}`, `!${t}`);
|
|
211
|
-
}
|
|
212
|
-
}),
|
|
213
|
-
(Parser.prototype.onprocessinginstruction = function (t) {
|
|
214
|
-
if (this._cbs.onprocessinginstruction) {
|
|
215
|
-
const e = this._getInstructionName(t);
|
|
216
|
-
this._cbs.onprocessinginstruction(`?${e}`, `?${t}`);
|
|
217
|
-
}
|
|
218
|
-
}),
|
|
219
|
-
(Parser.prototype.oncomment = function (t) {
|
|
220
|
-
this._updatePosition(4),
|
|
221
|
-
this._cbs.oncomment && this._cbs.oncomment(t),
|
|
222
|
-
this._cbs.oncommentend && this._cbs.oncommentend();
|
|
223
|
-
}),
|
|
224
|
-
(Parser.prototype.oncdata = function (t) {
|
|
225
|
-
this._updatePosition(1),
|
|
226
|
-
this._options.xmlMode || this._options.recognizeCDATA
|
|
227
|
-
? (this._cbs.oncdatastart && this._cbs.oncdatastart(),
|
|
228
|
-
this._cbs.ontext && this._cbs.ontext(t),
|
|
229
|
-
this._cbs.oncdataend && this._cbs.oncdataend())
|
|
230
|
-
: this.oncomment(`[CDATA[${t}]]`);
|
|
231
|
-
}),
|
|
232
|
-
(Parser.prototype.onerror = function (t) {
|
|
233
|
-
this._cbs.onerror && this._cbs.onerror(t);
|
|
234
|
-
}),
|
|
235
|
-
(Parser.prototype.onend = function () {
|
|
236
|
-
if (this._cbs.onclosetag) for (let t = this._stack.length; t > 0; this._cbs.onclosetag(this._stack[--t]));
|
|
237
|
-
this._cbs.onend && this._cbs.onend();
|
|
238
|
-
}),
|
|
239
|
-
(Parser.prototype.reset = function () {
|
|
240
|
-
this._cbs.onreset && this._cbs.onreset(),
|
|
241
|
-
this._tokenizer.reset(),
|
|
242
|
-
(this._tagname = ''),
|
|
243
|
-
(this._attribname = ''),
|
|
244
|
-
(this._attribs = null),
|
|
245
|
-
(this._stack = []),
|
|
246
|
-
this._cbs.onparserinit && this._cbs.onparserinit(this);
|
|
247
|
-
}),
|
|
248
|
-
(Parser.prototype.parseComplete = function (t) {
|
|
249
|
-
this.reset(), this.end(t);
|
|
250
|
-
}),
|
|
251
|
-
(Parser.prototype.write = function (t) {
|
|
252
|
-
this._tokenizer.write(t);
|
|
253
|
-
}),
|
|
254
|
-
(Parser.prototype.end = function (t) {
|
|
255
|
-
this._tokenizer.end(t);
|
|
256
|
-
}),
|
|
257
|
-
(Parser.prototype.pause = function () {
|
|
258
|
-
this._tokenizer.pause();
|
|
259
|
-
}),
|
|
260
|
-
(Parser.prototype.resume = function () {
|
|
261
|
-
this._tokenizer.resume();
|
|
262
|
-
}),
|
|
263
|
-
(exports.Parser = Parser);
|