eztech-core-components 1.0.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/assets/css/index.css +405 -0
- package/ckeditor/CHANGES.md +2339 -0
- package/ckeditor/LICENSE.md +1444 -0
- package/ckeditor/MongolianScript.ttf +0 -0
- package/ckeditor/README.md +39 -0
- package/ckeditor/SECURITY.md +10 -0
- package/ckeditor/adapters/jquery.js +10 -0
- package/ckeditor/bender-runner.config.json +16 -0
- package/ckeditor/build-config.js +193 -0
- package/ckeditor/ckcontent.css +71 -0
- package/ckeditor/ckeditor.js +1446 -0
- package/ckeditor/cmdashitseden.ttf +0 -0
- package/ckeditor/config.js +21 -0
- package/ckeditor/contents.css +220 -0
- package/ckeditor/lang/af.js +5 -0
- package/ckeditor/lang/ar.js +5 -0
- package/ckeditor/lang/az.js +5 -0
- package/ckeditor/lang/bg.js +5 -0
- package/ckeditor/lang/bn.js +5 -0
- package/ckeditor/lang/bs.js +5 -0
- package/ckeditor/lang/ca.js +5 -0
- package/ckeditor/lang/cs.js +5 -0
- package/ckeditor/lang/cy.js +5 -0
- package/ckeditor/lang/da.js +5 -0
- package/ckeditor/lang/de-ch.js +5 -0
- package/ckeditor/lang/de.js +5 -0
- package/ckeditor/lang/el.js +5 -0
- package/ckeditor/lang/en-au.js +5 -0
- package/ckeditor/lang/en-ca.js +5 -0
- package/ckeditor/lang/en-gb.js +5 -0
- package/ckeditor/lang/en.js +5 -0
- package/ckeditor/lang/eo.js +5 -0
- package/ckeditor/lang/es-mx.js +5 -0
- package/ckeditor/lang/es.js +5 -0
- package/ckeditor/lang/et.js +5 -0
- package/ckeditor/lang/eu.js +5 -0
- package/ckeditor/lang/fa.js +5 -0
- package/ckeditor/lang/fi.js +5 -0
- package/ckeditor/lang/fo.js +5 -0
- package/ckeditor/lang/fr-ca.js +5 -0
- package/ckeditor/lang/fr.js +5 -0
- package/ckeditor/lang/gl.js +5 -0
- package/ckeditor/lang/gu.js +5 -0
- package/ckeditor/lang/he.js +5 -0
- package/ckeditor/lang/hi.js +5 -0
- package/ckeditor/lang/hr.js +5 -0
- package/ckeditor/lang/hu.js +5 -0
- package/ckeditor/lang/id.js +5 -0
- package/ckeditor/lang/is.js +5 -0
- package/ckeditor/lang/it.js +5 -0
- package/ckeditor/lang/ja.js +5 -0
- package/ckeditor/lang/ka.js +5 -0
- package/ckeditor/lang/km.js +5 -0
- package/ckeditor/lang/ko.js +5 -0
- package/ckeditor/lang/ku.js +5 -0
- package/ckeditor/lang/lt.js +5 -0
- package/ckeditor/lang/lv.js +5 -0
- package/ckeditor/lang/mk.js +5 -0
- package/ckeditor/lang/mn.js +5 -0
- package/ckeditor/lang/ms.js +5 -0
- package/ckeditor/lang/nb.js +5 -0
- package/ckeditor/lang/nl.js +5 -0
- package/ckeditor/lang/no.js +5 -0
- package/ckeditor/lang/oc.js +5 -0
- package/ckeditor/lang/pl.js +5 -0
- package/ckeditor/lang/pt-br.js +5 -0
- package/ckeditor/lang/pt.js +5 -0
- package/ckeditor/lang/ro.js +5 -0
- package/ckeditor/lang/ru.js +5 -0
- package/ckeditor/lang/si.js +5 -0
- package/ckeditor/lang/sk.js +5 -0
- package/ckeditor/lang/sl.js +5 -0
- package/ckeditor/lang/sq.js +5 -0
- package/ckeditor/lang/sr-latn.js +5 -0
- package/ckeditor/lang/sr.js +5 -0
- package/ckeditor/lang/sv.js +5 -0
- package/ckeditor/lang/th.js +5 -0
- package/ckeditor/lang/tr.js +5 -0
- package/ckeditor/lang/tt.js +5 -0
- package/ckeditor/lang/ug.js +5 -0
- package/ckeditor/lang/uk.js +5 -0
- package/ckeditor/lang/vi.js +5 -0
- package/ckeditor/lang/zh-cn.js +5 -0
- package/ckeditor/lang/zh.js +5 -0
- package/ckeditor/monbaiti.ttf +0 -0
- package/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +13 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
- package/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
- package/ckeditor/plugins/about/dialogs/about.js +8 -0
- package/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
- package/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- package/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
- package/ckeditor/plugins/colordialog/dialogs/colordialog.css +20 -0
- package/ckeditor/plugins/colordialog/dialogs/colordialog.js +14 -0
- package/ckeditor/plugins/copyformatting/cursors/cursor-disabled.svg +25 -0
- package/ckeditor/plugins/copyformatting/cursors/cursor.svg +14 -0
- package/ckeditor/plugins/copyformatting/styles/copyformatting.css +45 -0
- package/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
- package/ckeditor/plugins/dialog/styles/dialog.css +18 -0
- package/ckeditor/plugins/div/dialogs/div.js +10 -0
- package/ckeditor/plugins/find/dialogs/find.js +26 -0
- package/ckeditor/plugins/forms/dialogs/button.js +8 -0
- package/ckeditor/plugins/forms/dialogs/checkbox.js +9 -0
- package/ckeditor/plugins/forms/dialogs/form.js +8 -0
- package/ckeditor/plugins/forms/dialogs/hiddenfield.js +7 -0
- package/ckeditor/plugins/forms/dialogs/radio.js +9 -0
- package/ckeditor/plugins/forms/dialogs/select.js +21 -0
- package/ckeditor/plugins/forms/dialogs/textarea.js +9 -0
- package/ckeditor/plugins/forms/dialogs/textfield.js +11 -0
- package/ckeditor/plugins/forms/images/hiddenfield.gif +0 -0
- package/ckeditor/plugins/icons.png +0 -0
- package/ckeditor/plugins/icons_hidpi.png +0 -0
- package/ckeditor/plugins/iframe/dialogs/iframe.js +11 -0
- package/ckeditor/plugins/iframe/images/placeholder.png +0 -0
- package/ckeditor/plugins/image/dialogs/image.js +44 -0
- package/ckeditor/plugins/image/images/noimage.png +0 -0
- package/ckeditor/plugins/indent/dev/indent.html +285 -0
- package/ckeditor/plugins/indent/icons/hidpi/indent-rtl.png +0 -0
- package/ckeditor/plugins/indent/icons/hidpi/indent.png +0 -0
- package/ckeditor/plugins/indent/icons/hidpi/outdent-rtl.png +0 -0
- package/ckeditor/plugins/indent/icons/hidpi/outdent.png +0 -0
- package/ckeditor/plugins/indent/icons/indent-rtl.png +0 -0
- package/ckeditor/plugins/indent/icons/indent.png +0 -0
- package/ckeditor/plugins/indent/icons/outdent-rtl.png +0 -0
- package/ckeditor/plugins/indent/icons/outdent.png +0 -0
- package/ckeditor/plugins/indent/lang/af.js +8 -0
- package/ckeditor/plugins/indent/lang/ar.js +8 -0
- package/ckeditor/plugins/indent/lang/az.js +8 -0
- package/ckeditor/plugins/indent/lang/bg.js +8 -0
- package/ckeditor/plugins/indent/lang/bn.js +8 -0
- package/ckeditor/plugins/indent/lang/bs.js +8 -0
- package/ckeditor/plugins/indent/lang/ca.js +8 -0
- package/ckeditor/plugins/indent/lang/cs.js +8 -0
- package/ckeditor/plugins/indent/lang/cy.js +8 -0
- package/ckeditor/plugins/indent/lang/da.js +8 -0
- package/ckeditor/plugins/indent/lang/de-ch.js +8 -0
- package/ckeditor/plugins/indent/lang/de.js +8 -0
- package/ckeditor/plugins/indent/lang/el.js +8 -0
- package/ckeditor/plugins/indent/lang/en-au.js +8 -0
- package/ckeditor/plugins/indent/lang/en-ca.js +8 -0
- package/ckeditor/plugins/indent/lang/en-gb.js +8 -0
- package/ckeditor/plugins/indent/lang/en.js +8 -0
- package/ckeditor/plugins/indent/lang/eo.js +8 -0
- package/ckeditor/plugins/indent/lang/es-mx.js +8 -0
- package/ckeditor/plugins/indent/lang/es.js +8 -0
- package/ckeditor/plugins/indent/lang/et.js +8 -0
- package/ckeditor/plugins/indent/lang/eu.js +8 -0
- package/ckeditor/plugins/indent/lang/fa.js +8 -0
- package/ckeditor/plugins/indent/lang/fi.js +8 -0
- package/ckeditor/plugins/indent/lang/fo.js +8 -0
- package/ckeditor/plugins/indent/lang/fr-ca.js +8 -0
- package/ckeditor/plugins/indent/lang/fr.js +8 -0
- package/ckeditor/plugins/indent/lang/gl.js +8 -0
- package/ckeditor/plugins/indent/lang/gu.js +8 -0
- package/ckeditor/plugins/indent/lang/he.js +8 -0
- package/ckeditor/plugins/indent/lang/hi.js +8 -0
- package/ckeditor/plugins/indent/lang/hr.js +8 -0
- package/ckeditor/plugins/indent/lang/hu.js +8 -0
- package/ckeditor/plugins/indent/lang/id.js +8 -0
- package/ckeditor/plugins/indent/lang/is.js +8 -0
- package/ckeditor/plugins/indent/lang/it.js +8 -0
- package/ckeditor/plugins/indent/lang/ja.js +8 -0
- package/ckeditor/plugins/indent/lang/ka.js +8 -0
- package/ckeditor/plugins/indent/lang/km.js +8 -0
- package/ckeditor/plugins/indent/lang/ko.js +8 -0
- package/ckeditor/plugins/indent/lang/ku.js +8 -0
- package/ckeditor/plugins/indent/lang/lt.js +8 -0
- package/ckeditor/plugins/indent/lang/lv.js +8 -0
- package/ckeditor/plugins/indent/lang/mk.js +8 -0
- package/ckeditor/plugins/indent/lang/mn.js +8 -0
- package/ckeditor/plugins/indent/lang/ms.js +8 -0
- package/ckeditor/plugins/indent/lang/nb.js +8 -0
- package/ckeditor/plugins/indent/lang/nl.js +8 -0
- package/ckeditor/plugins/indent/lang/no.js +8 -0
- package/ckeditor/plugins/indent/lang/oc.js +8 -0
- package/ckeditor/plugins/indent/lang/pl.js +8 -0
- package/ckeditor/plugins/indent/lang/pt-br.js +8 -0
- package/ckeditor/plugins/indent/lang/pt.js +8 -0
- package/ckeditor/plugins/indent/lang/ro.js +8 -0
- package/ckeditor/plugins/indent/lang/ru.js +8 -0
- package/ckeditor/plugins/indent/lang/si.js +8 -0
- package/ckeditor/plugins/indent/lang/sk.js +8 -0
- package/ckeditor/plugins/indent/lang/sl.js +8 -0
- package/ckeditor/plugins/indent/lang/sq.js +8 -0
- package/ckeditor/plugins/indent/lang/sr-latn.js +8 -0
- package/ckeditor/plugins/indent/lang/sr.js +8 -0
- package/ckeditor/plugins/indent/lang/sv.js +8 -0
- package/ckeditor/plugins/indent/lang/th.js +8 -0
- package/ckeditor/plugins/indent/lang/tr.js +8 -0
- package/ckeditor/plugins/indent/lang/tt.js +8 -0
- package/ckeditor/plugins/indent/lang/ug.js +8 -0
- package/ckeditor/plugins/indent/lang/uk.js +8 -0
- package/ckeditor/plugins/indent/lang/vi.js +8 -0
- package/ckeditor/plugins/indent/lang/zh-cn.js +8 -0
- package/ckeditor/plugins/indent/lang/zh.js +8 -0
- package/ckeditor/plugins/indent/plugin.js +461 -0
- package/ckeditor/plugins/justify/icons/hidpi/justifyblock.png +0 -0
- package/ckeditor/plugins/justify/icons/hidpi/justifycenter.png +0 -0
- package/ckeditor/plugins/justify/icons/hidpi/justifyleft.png +0 -0
- package/ckeditor/plugins/justify/icons/hidpi/justifyright.png +0 -0
- package/ckeditor/plugins/justify/icons/justifyblock.png +0 -0
- package/ckeditor/plugins/justify/icons/justifycenter.png +0 -0
- package/ckeditor/plugins/justify/icons/justifyleft.png +0 -0
- package/ckeditor/plugins/justify/icons/justifyright.png +0 -0
- package/ckeditor/plugins/justify/plugin.js +269 -0
- package/ckeditor/plugins/lineheight/LICENSE +22 -0
- package/ckeditor/plugins/lineheight/README.md +2 -0
- package/ckeditor/plugins/lineheight/lang/LANG.js +3 -0
- package/ckeditor/plugins/lineheight/lang/ar.js +3 -0
- package/ckeditor/plugins/lineheight/lang/de.js +3 -0
- package/ckeditor/plugins/lineheight/lang/en.js +3 -0
- package/ckeditor/plugins/lineheight/lang/es.js +3 -0
- package/ckeditor/plugins/lineheight/lang/fr.js +3 -0
- package/ckeditor/plugins/lineheight/lang/ko.js +3 -0
- package/ckeditor/plugins/lineheight/lang/pt.js +3 -0
- package/ckeditor/plugins/lineheight/plugin.js +81 -0
- package/ckeditor/plugins/lineheight/readme.txt +30 -0
- package/ckeditor/plugins/link/dialogs/anchor.js +9 -0
- package/ckeditor/plugins/link/dialogs/link.js +30 -0
- package/ckeditor/plugins/link/images/anchor.png +0 -0
- package/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- package/ckeditor/plugins/liststyle/dialogs/liststyle.js +10 -0
- package/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
- package/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
- package/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
- package/ckeditor/plugins/magicline/images/icon.png +0 -0
- package/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- package/ckeditor/plugins/pastefromgdocs/filter/default.js +8 -0
- package/ckeditor/plugins/pastefromlibreoffice/filter/default.js +11 -0
- package/ckeditor/plugins/pastefromword/filter/default.js +43 -0
- package/ckeditor/plugins/pastetools/filter/common.js +24 -0
- package/ckeditor/plugins/pastetools/filter/image.js +12 -0
- package/ckeditor/plugins/preview/images/pagebreak.gif +0 -0
- package/ckeditor/plugins/preview/preview.html +13 -0
- package/ckeditor/plugins/preview/styles/screen.css +10 -0
- package/ckeditor/plugins/scayt/CHANGELOG.md +4 -0
- package/ckeditor/plugins/scayt/LICENSE.md +28 -0
- package/ckeditor/plugins/scayt/README.md +81 -0
- package/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
- package/ckeditor/plugins/scayt/dialogs/options.js +32 -0
- package/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
- package/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
- package/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- package/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- package/ckeditor/plugins/simage/LICENSE +674 -0
- package/ckeditor/plugins/simage/README.md +73 -0
- package/ckeditor/plugins/simage/icons/simage.png +0 -0
- package/ckeditor/plugins/simage/plugin.js +154 -0
- package/ckeditor/plugins/smiley/dialogs/smiley.js +11 -0
- package/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/angel_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/angry_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- package/ckeditor/plugins/smiley/images/broken_heart.png +0 -0
- package/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/confused_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/cry_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/devil_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/embarrassed_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/embarrassed_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- package/ckeditor/plugins/smiley/images/envelope.png +0 -0
- package/ckeditor/plugins/smiley/images/heart.gif +0 -0
- package/ckeditor/plugins/smiley/images/heart.png +0 -0
- package/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- package/ckeditor/plugins/smiley/images/kiss.png +0 -0
- package/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- package/ckeditor/plugins/smiley/images/lightbulb.png +0 -0
- package/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/omg_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/regular_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/sad_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/shades_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/teeth_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- package/ckeditor/plugins/smiley/images/thumbs_down.png +0 -0
- package/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- package/ckeditor/plugins/smiley/images/thumbs_up.png +0 -0
- package/ckeditor/plugins/smiley/images/tongue_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/tongue_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.png +0 -0
- package/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- package/ckeditor/plugins/smiley/images/wink_smile.png +0 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/et.js +11 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/sr-latn.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/sr.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
- package/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
- package/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
- package/ckeditor/plugins/table/dialogs/table.js +22 -0
- package/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
- package/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
- package/ckeditor/plugins/templates/dialogs/templates.css +84 -0
- package/ckeditor/plugins/templates/dialogs/templates.js +11 -0
- package/ckeditor/plugins/templates/templatedefinition.js +4 -0
- package/ckeditor/plugins/templates/templates/default.js +7 -0
- package/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- package/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- package/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- package/ckeditor/plugins/textindent/icons/hidpi/textindent.png +0 -0
- package/ckeditor/plugins/textindent/icons/textindent.png +0 -0
- package/ckeditor/plugins/textindent/lang/en.js +3 -0
- package/ckeditor/plugins/textindent/lang/pt-br.js +3 -0
- package/ckeditor/plugins/textindent/plugin.js +99 -0
- package/ckeditor/plugins/widget/images/handle.png +0 -0
- package/ckeditor/samples/css/samples.css +1637 -0
- package/ckeditor/samples/img/github-top.png +0 -0
- package/ckeditor/samples/img/header-bg.png +0 -0
- package/ckeditor/samples/img/header-separator.png +0 -0
- package/ckeditor/samples/img/logo.png +0 -0
- package/ckeditor/samples/img/logo.svg +13 -0
- package/ckeditor/samples/img/navigation-tip.png +0 -0
- package/ckeditor/samples/index.html +130 -0
- package/ckeditor/samples/js/sample.js +53 -0
- package/ckeditor/samples/js/sf.js +17 -0
- package/ckeditor/samples/old/ajax.html +85 -0
- package/ckeditor/samples/old/api.html +210 -0
- package/ckeditor/samples/old/appendto.html +59 -0
- package/ckeditor/samples/old/assets/inlineall/logo.png +0 -0
- package/ckeditor/samples/old/assets/outputxhtml/outputxhtml.css +204 -0
- package/ckeditor/samples/old/assets/posteddata.php +60 -0
- package/ckeditor/samples/old/assets/sample.jpg +0 -0
- package/ckeditor/samples/old/assets/uilanguages/languages.js +7 -0
- package/ckeditor/samples/old/datafiltering.html +508 -0
- package/ckeditor/samples/old/dialog/assets/my_dialog.js +48 -0
- package/ckeditor/samples/old/dialog/dialog.html +190 -0
- package/ckeditor/samples/old/divreplace.html +144 -0
- package/ckeditor/samples/old/enterkey/enterkey.html +106 -0
- package/ckeditor/samples/old/htmlwriter/outputhtml.html +224 -0
- package/ckeditor/samples/old/index.html +129 -0
- package/ckeditor/samples/old/inlineall.html +314 -0
- package/ckeditor/samples/old/inlinebycode.html +124 -0
- package/ckeditor/samples/old/inlinetextarea.html +113 -0
- package/ckeditor/samples/old/jquery.html +103 -0
- package/ckeditor/samples/old/magicline/magicline.html +209 -0
- package/ckeditor/samples/old/readonly.html +76 -0
- package/ckeditor/samples/old/replacebyclass.html +60 -0
- package/ckeditor/samples/old/replacebycode.html +59 -0
- package/ckeditor/samples/old/sample.css +357 -0
- package/ckeditor/samples/old/sample.js +50 -0
- package/ckeditor/samples/old/sample_posteddata.php +16 -0
- package/ckeditor/samples/old/tabindex.html +78 -0
- package/ckeditor/samples/old/toolbar/toolbar.html +235 -0
- package/ckeditor/samples/old/uicolor.html +72 -0
- package/ckeditor/samples/old/uilanguages.html +122 -0
- package/ckeditor/samples/old/wysiwygarea/fullpage.html +80 -0
- package/ckeditor/samples/old/xhtmlstyle.html +234 -0
- package/ckeditor/samples/toolbarconfigurator/css/fontello.css +55 -0
- package/ckeditor/samples/toolbarconfigurator/font/LICENSE.txt +10 -0
- package/ckeditor/samples/toolbarconfigurator/font/config.json +28 -0
- package/ckeditor/samples/toolbarconfigurator/font/fontello.eot +0 -0
- package/ckeditor/samples/toolbarconfigurator/font/fontello.svg +14 -0
- package/ckeditor/samples/toolbarconfigurator/font/fontello.ttf +0 -0
- package/ckeditor/samples/toolbarconfigurator/font/fontello.woff +0 -0
- package/ckeditor/samples/toolbarconfigurator/index.html +447 -0
- package/ckeditor/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js +13 -0
- package/ckeditor/samples/toolbarconfigurator/js/fulltoolbareditor.js +9 -0
- package/ckeditor/samples/toolbarconfigurator/js/toolbarmodifier.js +33 -0
- package/ckeditor/samples/toolbarconfigurator/js/toolbartextmodifier.js +14 -0
- package/ckeditor/samples/toolbarconfigurator/lib/codemirror/LICENSE +19 -0
- package/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.css +325 -0
- package/ckeditor/samples/toolbarconfigurator/lib/codemirror/codemirror.js +288 -0
- package/ckeditor/samples/toolbarconfigurator/lib/codemirror/javascript.js +25 -0
- package/ckeditor/samples/toolbarconfigurator/lib/codemirror/neo.css +36 -0
- package/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.css +38 -0
- package/ckeditor/samples/toolbarconfigurator/lib/codemirror/show-hint.js +16 -0
- package/ckeditor/skins/moono-lisa/dialog.css +5 -0
- package/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
- package/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
- package/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
- package/ckeditor/skins/moono-lisa/editor.css +5 -0
- package/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
- package/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
- package/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
- package/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
- package/ckeditor/skins/moono-lisa/icons.png +0 -0
- package/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
- package/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
- package/ckeditor/skins/moono-lisa/images/close.png +0 -0
- package/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
- package/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- package/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
- package/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- package/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
- package/ckeditor/skins/moono-lisa/images/lock.png +0 -0
- package/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
- package/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
- package/ckeditor/skins/moono-lisa/readme.md +46 -0
- package/ckeditor/styles.js +137 -0
- package/ckeditor/vendor/promise.js +13 -0
- package/comps/Animation/Checkbox.vue +37 -0
- package/comps/Animation/Radio.vue +30 -0
- package/comps/BooleanLabel.vue +40 -0
- package/comps/CardButton.vue +18 -0
- package/comps/CardImage.vue +40 -0
- package/comps/CardItem.vue +63 -0
- package/comps/CardList.vue +57 -0
- package/comps/CardNumber.vue +27 -0
- package/comps/Config/SelectColumns.vue +137 -0
- package/comps/CoreAgeMonth.vue +44 -0
- package/comps/CoreAppPassword.vue +31 -0
- package/comps/CoreAutocomplete.vue +93 -0
- package/comps/CoreCascader.vue +129 -0
- package/comps/CoreCascaderChildOrg.vue +165 -0
- package/comps/CoreCascaderChildPosition.vue +186 -0
- package/comps/CoreCkeditor.vue +324 -0
- package/comps/CoreColorPicker.vue +35 -0
- package/comps/CoreContextMenu.vue +81 -0
- package/comps/CoreDate.vue +56 -0
- package/comps/CoreDateRange.vue +34 -0
- package/comps/CoreDatetime.vue +34 -0
- package/comps/CoreDeepLink.vue +53 -0
- package/comps/CoreDurationJustified.vue +23 -0
- package/comps/CoreFiles.vue +497 -0
- package/comps/CoreFooter.vue +100 -0
- package/comps/CoreForm.vue +499 -0
- package/comps/CoreFormDialog.vue +140 -0
- package/comps/CoreFormFields.vue +306 -0
- package/comps/CoreFormItem.vue +114 -0
- package/comps/CoreFormItemCopy.vue +155 -0
- package/comps/CoreFormSub.vue +118 -0
- package/comps/CoreFormTable.vue +197 -0
- package/comps/CoreFormTableInline.vue +300 -0
- package/comps/CoreFormTableList.vue +268 -0
- package/comps/CoreIcon.vue +5 -0
- package/comps/CoreImage.vue +37 -0
- package/comps/CoreInlineNumber.vue +54 -0
- package/comps/CoreInputNumber.vue +49 -0
- package/comps/CoreInputSearch.vue +44 -0
- package/comps/CoreJson.vue +10 -0
- package/comps/CoreLoader.vue +153 -0
- package/comps/CoreLocked.vue +151 -0
- package/comps/CoreMergeConfirm.vue +59 -0
- package/comps/CoreMultipleInput.vue +51 -0
- package/comps/CorePanel.vue +33 -0
- package/comps/CorePdfDialog.vue +84 -0
- package/comps/CorePdfView.vue +52 -0
- package/comps/CoreRegexp.vue +41 -0
- package/comps/CoreSelect.vue +249 -0
- package/comps/CoreSelectEnum.vue +103 -0
- package/comps/CoreSelectGroup.vue +237 -0
- package/comps/CoreSelectGroupItem.vue +168 -0
- package/comps/CoreSelectGroupList.vue +386 -0
- package/comps/CoreSelectOrgEmp.vue +319 -0
- package/comps/CoreSelectTable.vue +277 -0
- package/comps/CoreSelectTree.vue +183 -0
- package/comps/CoreSelectTreeItem.vue +129 -0
- package/comps/CoreSelectTreeList.vue +149 -0
- package/comps/CoreSelectYear.vue +42 -0
- package/comps/CoreSignCertificate.vue +129 -0
- package/comps/CoreSpan.vue +31 -0
- package/comps/CoreStatus.vue +29 -0
- package/comps/CoreSwitch.vue +28 -0
- package/comps/CoreTable.vue +852 -0
- package/comps/CoreTableColumn.vue +78 -0
- package/comps/CoreTableColumnHeader.vue +25 -0
- package/comps/CoreTableColumnRow.vue +234 -0
- package/comps/CoreTableConfig.vue +248 -0
- package/comps/CoreTableImage.vue +89 -0
- package/comps/CoreTableSearch.vue +267 -0
- package/comps/CoreTableSearchDetail.vue +89 -0
- package/comps/CoreTableStatus.vue +71 -0
- package/comps/CoreUploadImage.vue +542 -0
- package/comps/CoreVideo.vue +44 -0
- package/comps/CoreVimeo.vue +135 -0
- package/comps/CoreVimeoLabel.vue +32 -0
- package/comps/CoreVueEditor.vue +106 -0
- package/comps/CoreXypService.vue +233 -0
- package/comps/CoreZoomImage.vue +99 -0
- package/comps/Custom/CrimeDescription.vue +195 -0
- package/comps/Custom/CrimeNum.vue +41 -0
- package/comps/Custom/EmployeeSelect.vue +243 -0
- package/comps/Custom/EmployeeText.vue +7 -0
- package/comps/Custom/EmployeeWorkFamilies.vue +36 -0
- package/comps/Custom/NationalLangSkills.vue +137 -0
- package/comps/Custom/TableLogs.vue +86 -0
- package/comps/Custom/UserClotheRow.vue +105 -0
- package/comps/Custom/UserClothes.vue +470 -0
- package/comps/Custom/UserRoles.vue +169 -0
- package/comps/Custom/UserSelect.vue +423 -0
- package/comps/Custom/UserSkills.vue +98 -0
- package/comps/MomentAddCode.vue +91 -0
- package/comps/SclHandbook.vue +135 -0
- package/comps/Sign/Dialog.vue +321 -0
- package/comps/Sign/Info.vue +43 -0
- package/comps/Sign/InfoDialog.vue +78 -0
- package/directives/el-dragDialog/drag.js +34 -0
- package/index.js +7 -0
- package/middleware/auth.js +28 -0
- package/middleware/confirm-leave.js +15 -0
- package/middleware/login.js +6 -0
- package/middleware/router.js +5 -0
- package/package.json +48 -0
- package/plugins/axios.js +51 -0
- package/plugins/chart.js +134 -0
- package/plugins/ckeditor.js +3 -0
- package/plugins/idle-logout.js +33 -0
- package/store/settings.js +236 -0
- package/store/user.js +215 -0
- package/utils/component-helper.js +336 -0
- package/utils/data-helper.js +236 -0
- package/utils/default-nuxt-config.js +116 -0
- package/utils/eslint-rules.js +12 -0
- package/utils/helpers.js +67 -0
- package/utils/message-helper.js +19 -0
- package/utils/number-helper.js +166 -0
- package/utils/number-texts.js +217 -0
- package/utils/regexps.js +86 -0
- package/utils/role-helper.js +52 -0
- package/utils/social-helper.js +58 -0
- package/utils/table-helper.js +1612 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import * as moment from 'moment'
|
|
2
|
+
import { get, has, last } from 'lodash'
|
|
3
|
+
import { regexps } from './regexps'
|
|
4
|
+
export const generateAppPassword = (length = 16) => {
|
|
5
|
+
const charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()'
|
|
6
|
+
const randomValues = new Uint8Array(length)
|
|
7
|
+
crypto.getRandomValues(randomValues)
|
|
8
|
+
let password = ''
|
|
9
|
+
for (let i = 0; i < length; i++) {
|
|
10
|
+
password += charset[randomValues[i] % charset.length]
|
|
11
|
+
}
|
|
12
|
+
return password
|
|
13
|
+
}
|
|
14
|
+
export const getIdcardAddress = (response) => {
|
|
15
|
+
if (!response) {
|
|
16
|
+
return null
|
|
17
|
+
}
|
|
18
|
+
let passport_address = response.passportAddress
|
|
19
|
+
const lastAddress = last(response.listAddress)
|
|
20
|
+
if (lastAddress?.aimagCityName) {
|
|
21
|
+
const vals = [lastAddress.aimagCityName, lastAddress.soumDistrictName, lastAddress.bagKhorooName]
|
|
22
|
+
if (lastAddress.addressStreetName) {
|
|
23
|
+
vals.push(`${lastAddress.addressStreetName} гудамж`)
|
|
24
|
+
}
|
|
25
|
+
if (lastAddress.addressRegionName) {
|
|
26
|
+
vals.push(`${lastAddress.addressRegionName} хороолол`)
|
|
27
|
+
}
|
|
28
|
+
if (lastAddress.addressTownName) {
|
|
29
|
+
vals.push(`${lastAddress.addressTownName} хотхон`)
|
|
30
|
+
}
|
|
31
|
+
if (lastAddress.addressApartmentName) {
|
|
32
|
+
vals.push(`${lastAddress.addressApartmentName} байр`)
|
|
33
|
+
}
|
|
34
|
+
if (lastAddress.addressDoor) {
|
|
35
|
+
vals.push(`${lastAddress.addressDoor} тоот`)
|
|
36
|
+
}
|
|
37
|
+
passport_address = vals.join(', ')
|
|
38
|
+
}
|
|
39
|
+
return passport_address
|
|
40
|
+
}
|
|
41
|
+
export const isWorkDay = (date, holidays) => {
|
|
42
|
+
const days = holidays.map((c) => {
|
|
43
|
+
const reg_date = c.is_repeat ? moment(moment(date).format('YYYY') + moment(c.reg_date).format('-MM-DD')).toDate() : c.reg_date
|
|
44
|
+
const start_date = c.start_date || date
|
|
45
|
+
const end_date = c.end_date || date
|
|
46
|
+
return { ...c, reg_date, start_date, end_date }
|
|
47
|
+
})
|
|
48
|
+
const filterDay = days.find(c => moment(date).isBetween(c.start_date, c.end_date, 'days', '[]') && moment(c.reg_date).isSame(date, 'days'))
|
|
49
|
+
if (filterDay) {
|
|
50
|
+
return !filterDay.is_rest
|
|
51
|
+
} else {
|
|
52
|
+
return moment(date).isoWeekday() <= 5
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
export const getFormBoolean = (val) => {
|
|
56
|
+
return [1, '1', 'true', true, 'True', 'TRUE'].includes(val)
|
|
57
|
+
}
|
|
58
|
+
export const getDateString = (val) => {
|
|
59
|
+
if (!val) {
|
|
60
|
+
return null
|
|
61
|
+
}
|
|
62
|
+
return moment(val).format('YYYY-MM-DD')
|
|
63
|
+
}
|
|
64
|
+
export const getDatetimeString = (val) => {
|
|
65
|
+
if (!val) {
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
return moment(val).format('YYYY-MM-DD HH:mm')
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export const getStringDatetime = (val) => {
|
|
72
|
+
if (!val) {
|
|
73
|
+
return
|
|
74
|
+
}
|
|
75
|
+
return moment(val, 'YYYY-MM-DD HH:mm').toDate()
|
|
76
|
+
}
|
|
77
|
+
export const getStringDate = (val) => {
|
|
78
|
+
if (!val) {
|
|
79
|
+
return null
|
|
80
|
+
}
|
|
81
|
+
return moment(val).toDate()
|
|
82
|
+
}
|
|
83
|
+
export const addBusinessDays = (startDate, days, holidays) => {
|
|
84
|
+
if (!holidays?.length) {
|
|
85
|
+
throw new Error('Required holidays')
|
|
86
|
+
}
|
|
87
|
+
if (!startDate || [null, undefined].includes(days)) {
|
|
88
|
+
return null
|
|
89
|
+
}
|
|
90
|
+
const currentDate = moment(startDate)
|
|
91
|
+
let addedDays = 0
|
|
92
|
+
if (isWorkDay(currentDate.toDate(), holidays)) {
|
|
93
|
+
addedDays++
|
|
94
|
+
}
|
|
95
|
+
while (addedDays < days) {
|
|
96
|
+
currentDate.add(1, 'days')
|
|
97
|
+
if (isWorkDay(currentDate.toDate(), holidays)) {
|
|
98
|
+
addedDays++
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return currentDate.format('YYYY-MM-DD')
|
|
102
|
+
}
|
|
103
|
+
export const diffBusinessDays = (startDate, endDate, holidays) => {
|
|
104
|
+
if (!holidays?.length) {
|
|
105
|
+
throw new Error('Required holidays')
|
|
106
|
+
}
|
|
107
|
+
if (!startDate || !endDate) {
|
|
108
|
+
return null
|
|
109
|
+
}
|
|
110
|
+
const currentDate = moment(startDate)
|
|
111
|
+
const end = moment(endDate)
|
|
112
|
+
let daysBetween = 0
|
|
113
|
+
while (!currentDate.isAfter(end, 'day')) {
|
|
114
|
+
if (isWorkDay(currentDate.toDate(), holidays)) {
|
|
115
|
+
daysBetween++
|
|
116
|
+
}
|
|
117
|
+
currentDate.add(1, 'day')
|
|
118
|
+
}
|
|
119
|
+
return daysBetween
|
|
120
|
+
}
|
|
121
|
+
export const getGenderFromName = (gender, refs) => {
|
|
122
|
+
if (!refs) {
|
|
123
|
+
throw new Error('Required refs.')
|
|
124
|
+
}
|
|
125
|
+
const checkMan = gender?.toLowerCase()?.includes('эр')
|
|
126
|
+
const checkWomen = gender?.toLowerCase()?.includes('эм')
|
|
127
|
+
if (!checkMan && !checkWomen) {
|
|
128
|
+
return null
|
|
129
|
+
}
|
|
130
|
+
const genderCode = checkMan ? '1' : '2'
|
|
131
|
+
const genderId = refs.genders?.find(c => c.code === genderCode)?._id
|
|
132
|
+
return { _id: genderId, name: gender, code: genderCode }
|
|
133
|
+
}
|
|
134
|
+
export const getAgeFromDate = (date) => {
|
|
135
|
+
if (!date) {
|
|
136
|
+
return 0
|
|
137
|
+
}
|
|
138
|
+
const momentDate = moment(date)
|
|
139
|
+
const age1 = moment().diff(momentDate, 'years', false)
|
|
140
|
+
const month1 = Math.round(moment().subtract(age1, 'years').diff(momentDate, 'month', false) * 10) / 10
|
|
141
|
+
return Number(age1 + '.' + String(month1).padStart(2, '0'))
|
|
142
|
+
}
|
|
143
|
+
export const extractRegisterNum = (regnum, refs) => {
|
|
144
|
+
if (!refs) {
|
|
145
|
+
throw new Error('Required refs.')
|
|
146
|
+
}
|
|
147
|
+
let birth_date = null
|
|
148
|
+
let age = 0
|
|
149
|
+
let gender_id = null
|
|
150
|
+
const checkRegNum = regnum?.trim()?.toUpperCase()
|
|
151
|
+
if (typeof checkRegNum === 'string' && checkRegNum?.length === 10 && regexps.oldRegisterNum.pattern.test(checkRegNum)) {
|
|
152
|
+
let birthDate = checkRegNum.slice(2, 8)
|
|
153
|
+
if (['2', '3'].includes(birthDate[2])) {
|
|
154
|
+
birthDate = '20' + birthDate.slice(0, 2) + (Number(birthDate[2]) - 2) + birthDate.slice(3)
|
|
155
|
+
} else {
|
|
156
|
+
birthDate = '19' + birthDate
|
|
157
|
+
}
|
|
158
|
+
const momentDate = moment(birthDate, 'YYYYMMDD')
|
|
159
|
+
if (momentDate.isValid()) {
|
|
160
|
+
age = getAgeFromDate(momentDate.format('YYYY-MM-DD'))
|
|
161
|
+
const gender = String(Number(checkRegNum.slice(8, 9)) % 2 === 0 ? '2' : '1')
|
|
162
|
+
const genderId = refs.genders?.find(c => c.code === gender)?._id
|
|
163
|
+
if (!genderId) {
|
|
164
|
+
throw new Error('Системд ямар нэгэн алдаа гарлаа.')
|
|
165
|
+
}
|
|
166
|
+
gender_id = { _id: genderId, code: gender, name: gender === '1' ? 'Эрэгтэй' : 'Эмэгтэй' }
|
|
167
|
+
birth_date = momentDate.format('YYYY-MM-DD')
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return { birth_date, age, gender_id }
|
|
171
|
+
}
|
|
172
|
+
export const getTriggerFields = (trigger_fields, actionType = 'search') => {
|
|
173
|
+
if (!trigger_fields) {
|
|
174
|
+
return []
|
|
175
|
+
}
|
|
176
|
+
return trigger_fields.split(',').map((c1) => {
|
|
177
|
+
const cc = c1.split(':')
|
|
178
|
+
const localKey = get(cc, '[0]')
|
|
179
|
+
const localVal = get(cc, '[1]')
|
|
180
|
+
const type = get(cc, '[2]')
|
|
181
|
+
const operation = get(cc, '[3]')
|
|
182
|
+
const searchType = get(cc, '[4]') || 'search'
|
|
183
|
+
const label = get(cc, '[5]')
|
|
184
|
+
return { localKey, localVal, type, operation, searchType, label }
|
|
185
|
+
}).filter(c1 => c1.searchType === actionType && c1.operation)
|
|
186
|
+
}
|
|
187
|
+
export const getTriggerEquals = (trigger_field, item, defaultValue) => {
|
|
188
|
+
let isEqual = defaultValue
|
|
189
|
+
const { type, localKey } = trigger_field
|
|
190
|
+
let localVal = trigger_field.localVal
|
|
191
|
+
let operation = trigger_field.operation
|
|
192
|
+
let tempVal = get(item, localKey)
|
|
193
|
+
if (localKey.includes('[].') && !tempVal && operation === 'eq') {
|
|
194
|
+
tempVal = get(item, localKey.split('[].')[0])?.map(c => c[localKey.split('[].')[1]]) || []
|
|
195
|
+
return tempVal.includes(localVal)
|
|
196
|
+
}
|
|
197
|
+
if (tempVal && typeof tempVal === 'object' && has(tempVal, '_id')) {
|
|
198
|
+
tempVal = type === 'number' ? Number(tempVal._id) : tempVal._id
|
|
199
|
+
}
|
|
200
|
+
if (type === 'number' && typeof tempVal === 'string') {
|
|
201
|
+
tempVal = Number(tempVal)
|
|
202
|
+
}
|
|
203
|
+
if (localVal === 'null') {
|
|
204
|
+
operation = 'ne'
|
|
205
|
+
localVal = null
|
|
206
|
+
tempVal = tempVal ? '' : null
|
|
207
|
+
} else if (localVal === 'notnull') {
|
|
208
|
+
operation = 'eq'
|
|
209
|
+
localVal = null
|
|
210
|
+
tempVal = tempVal ? '' : null
|
|
211
|
+
} else if (['in', 'nin'].includes(operation)) {
|
|
212
|
+
localVal = localVal.split(';').map(c => type === 'number' ? Number(c) : c)
|
|
213
|
+
} else if (type === 'number') {
|
|
214
|
+
localVal = Number(localVal)
|
|
215
|
+
} else if (type === 'boolean') {
|
|
216
|
+
localVal = ['true', '1', true, 'True'].includes(localVal)
|
|
217
|
+
}
|
|
218
|
+
if (operation === 'nin') {
|
|
219
|
+
isEqual = !localVal.includes(tempVal)
|
|
220
|
+
} else if (operation === 'in') {
|
|
221
|
+
isEqual = localVal.includes(tempVal)
|
|
222
|
+
} else if (operation === 'ne') {
|
|
223
|
+
isEqual = localVal !== tempVal
|
|
224
|
+
} else if (operation === 'eq') {
|
|
225
|
+
isEqual = localVal === tempVal
|
|
226
|
+
}
|
|
227
|
+
return isEqual
|
|
228
|
+
}
|
|
229
|
+
export function isValidJSON (str) {
|
|
230
|
+
try {
|
|
231
|
+
JSON.parse(str)
|
|
232
|
+
return true
|
|
233
|
+
} catch (error) {
|
|
234
|
+
return false
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// const { URL } = require('url')
|
|
2
|
+
export const getDefaultConfig = (options) => {
|
|
3
|
+
const buildDir = process.env.BUILD_DIR || '.nuxt'
|
|
4
|
+
const routerBase = process.env.ROUTER_BASE || ''
|
|
5
|
+
const proxy = {}
|
|
6
|
+
const render = {
|
|
7
|
+
static: {
|
|
8
|
+
setHeaders (res) {
|
|
9
|
+
res.setHeader('X-XSS-Protection', '1; mode=block')
|
|
10
|
+
res.setHeader('Referrer-Policy', 'no-referrer')
|
|
11
|
+
res.setHeader('X-Frame-Options', 'DENY')
|
|
12
|
+
res.setHeader(
|
|
13
|
+
'Content-Security-Policy',
|
|
14
|
+
"default-src 'self'; frame-ancestors 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self'; connect-src 'self'"
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const axios = {
|
|
20
|
+
baseURL: process.env.BASE_URL_SERVER || process.env.BASE_URL,
|
|
21
|
+
browserBaseURL: '/api',
|
|
22
|
+
credentials: true,
|
|
23
|
+
process: false
|
|
24
|
+
}
|
|
25
|
+
if (process.env.FILE_URL && !process.env.FILE_URL?.startsWith('/api')) {
|
|
26
|
+
axios.proxy = true
|
|
27
|
+
proxy['/api/file/'] = {
|
|
28
|
+
target: process.env.FILE_URL,
|
|
29
|
+
pathRewrite: { '^/api/file/': '' },
|
|
30
|
+
changeOrigin: true
|
|
31
|
+
}
|
|
32
|
+
// if (process.env.TOKEN_NAME) {
|
|
33
|
+
// proxy['/api/file/'].headers = {
|
|
34
|
+
// 'x-pid': process.env.TOKEN_NAME
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
37
|
+
}
|
|
38
|
+
if (!process.env.BASE_URL?.startsWith('/api')) {
|
|
39
|
+
axios.proxy = true
|
|
40
|
+
proxy['/api'] = {
|
|
41
|
+
target: process.env.BASE_URL,
|
|
42
|
+
pathRewrite: { '^/api/': '' },
|
|
43
|
+
changeOrigin: true
|
|
44
|
+
}
|
|
45
|
+
// if (process.env.TOKEN_NAME) {
|
|
46
|
+
// proxy['/api'].headers = {
|
|
47
|
+
// 'x-pid': process.env.TOKEN_NAME
|
|
48
|
+
// }
|
|
49
|
+
// }
|
|
50
|
+
}
|
|
51
|
+
if (process.env.SOCKET_URL) {
|
|
52
|
+
axios.proxy = true
|
|
53
|
+
proxy['/socketio/'] = {
|
|
54
|
+
target: process.env.SOCKET_URL,
|
|
55
|
+
ws: true,
|
|
56
|
+
changeOrigin: true
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const server = {
|
|
60
|
+
host: process.env.HOST || '0.0.0.0',
|
|
61
|
+
port: process.env.PORT || 3000
|
|
62
|
+
}
|
|
63
|
+
const router = {
|
|
64
|
+
base: routerBase || '/',
|
|
65
|
+
middleware: []
|
|
66
|
+
}
|
|
67
|
+
if (!options?.ignoreConfirmLeave) {
|
|
68
|
+
router.middleware.push('confirm-leave')
|
|
69
|
+
}
|
|
70
|
+
const loading = false
|
|
71
|
+
const build = {
|
|
72
|
+
// webpack: {
|
|
73
|
+
// performance: {
|
|
74
|
+
// hints: 'warning',
|
|
75
|
+
// maxAssetSize: 5000000, // Adjust the size limit (in bytes) if necessary
|
|
76
|
+
// maxEntrypointSize: 5000000
|
|
77
|
+
// }
|
|
78
|
+
// },
|
|
79
|
+
// performance: {
|
|
80
|
+
// hints: false
|
|
81
|
+
// },
|
|
82
|
+
extend (config, { isClient }) {
|
|
83
|
+
// config.performance = {
|
|
84
|
+
// hints: 'warning',
|
|
85
|
+
// maxEntrypointSize: 5000000, // 5 MiB
|
|
86
|
+
// maxAssetSize: 5000000, // 5 MiB
|
|
87
|
+
// }
|
|
88
|
+
if (isClient) {
|
|
89
|
+
config.externals = {}
|
|
90
|
+
if (options?.jquery) {
|
|
91
|
+
// config.externals.jquery = 'jQuery'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
babel: {
|
|
96
|
+
plugins: [
|
|
97
|
+
'@babel/plugin-proposal-optional-chaining',
|
|
98
|
+
'@babel/plugin-proposal-nullish-coalescing-operator',
|
|
99
|
+
'@babel/plugin-proposal-object-rest-spread'
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (!options?.ignoreElementUi) {
|
|
104
|
+
build.transpile = [/^element-ui/, '@eztech/core-components']
|
|
105
|
+
}
|
|
106
|
+
// ,
|
|
107
|
+
// vue: {
|
|
108
|
+
// config: {
|
|
109
|
+
// devtools: true
|
|
110
|
+
// }
|
|
111
|
+
// },
|
|
112
|
+
// debug: true
|
|
113
|
+
return {
|
|
114
|
+
proxy, axios, server, buildDir, router, loading, build, routerBase, render
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
camelcase: 'off',
|
|
3
|
+
'vue/no-v-html': 'off',
|
|
4
|
+
'object-property-newline': 'off',
|
|
5
|
+
'vue/prop-name-casing': 'off',
|
|
6
|
+
'vue/multi-word-component-names': 'off',
|
|
7
|
+
'vue/require-prop-types': 'off',
|
|
8
|
+
'promise/param-names': 'off',
|
|
9
|
+
'prefer-regex-literals': 'off',
|
|
10
|
+
'vue/max-attributes-per-line': 'off',
|
|
11
|
+
'no-irregular-whitespace': 'off'
|
|
12
|
+
}
|
package/utils/helpers.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export function openLinkNewTab (link) {
|
|
2
|
+
const a = document.createElement('a')
|
|
3
|
+
a.href = link
|
|
4
|
+
a.target = '_blank'
|
|
5
|
+
a.rel = 'noopener noreferrer'
|
|
6
|
+
document.body.appendChild(a)
|
|
7
|
+
a.click()
|
|
8
|
+
document.body.removeChild(a)
|
|
9
|
+
}
|
|
10
|
+
export const applyDrag = (arr, dragResult) => {
|
|
11
|
+
const { removedIndex, addedIndex, payload } = dragResult
|
|
12
|
+
if (removedIndex === null && addedIndex === null) { return arr }
|
|
13
|
+
|
|
14
|
+
const result = [...arr]
|
|
15
|
+
let itemToAdd = payload
|
|
16
|
+
if (removedIndex !== null) {
|
|
17
|
+
itemToAdd = result.splice(removedIndex, 1)[0]
|
|
18
|
+
}
|
|
19
|
+
if (addedIndex !== null) {
|
|
20
|
+
result.splice(addedIndex, 0, itemToAdd)
|
|
21
|
+
}
|
|
22
|
+
return result
|
|
23
|
+
}
|
|
24
|
+
export const getUnicodeName = (name) => {
|
|
25
|
+
const cyrillic = 'Ү_Ө_А_Б_В_Г_Д_Ђ_Е_Ё_Ж_З_И_Й_Ј_К_Л_Љ_М_Н_Њ_О_П_Р_С_Т_Ћ_У_Ф_Х_Ц_Ч_Џ_Ш_Щ_Ъ_Ы_Ь_Э_Ю_Яx'.split('_')
|
|
26
|
+
const latin = 'U_U_A_B_V_G_D_Đ_E_Ë_J_Z_I_I_J_K_L_Lj_M_N_Nj_O_P_R_S_T_Ć_U_F_H_TS_CH_Dž_SH_Ŝ_ʺ_Ii_ʹ_E_Yu_Ya'.split('_')
|
|
27
|
+
const text = name.split('').map(function (char) {
|
|
28
|
+
const index = cyrillic.indexOf(char)
|
|
29
|
+
if (!~index) {
|
|
30
|
+
const indexLower = cyrillic.indexOf(char.toUpperCase())
|
|
31
|
+
if (!~indexLower) {
|
|
32
|
+
return char
|
|
33
|
+
}
|
|
34
|
+
return latin[indexLower].toLowerCase()
|
|
35
|
+
}
|
|
36
|
+
return latin[index]
|
|
37
|
+
}).join('')
|
|
38
|
+
return text
|
|
39
|
+
}
|
|
40
|
+
export const uuidv4 = () => {
|
|
41
|
+
let d = new Date().getTime()
|
|
42
|
+
let d2 = ((typeof performance !== 'undefined') && performance.now && (performance.now() * 1000)) || 0
|
|
43
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
44
|
+
let r = Math.random() * 16// random number between 0 and 16
|
|
45
|
+
if (d > 0) {
|
|
46
|
+
r = (d + r) % 16 | 0
|
|
47
|
+
d = Math.floor(d / 16)
|
|
48
|
+
} else {
|
|
49
|
+
r = (d2 + r) % 16 | 0
|
|
50
|
+
d2 = Math.floor(d2 / 16)
|
|
51
|
+
}
|
|
52
|
+
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16)
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
export function base64ToBlob (base64, mimeType) {
|
|
56
|
+
const base64Data = base64.split(',')[1] || base64
|
|
57
|
+
const byteCharacters = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0))
|
|
58
|
+
return new Blob([byteCharacters], { type: mimeType })
|
|
59
|
+
}
|
|
60
|
+
export function blobToBase64 (blob) {
|
|
61
|
+
return new Promise((resolve, reject) => {
|
|
62
|
+
const reader = new FileReader()
|
|
63
|
+
reader.readAsDataURL(blob) // Read as Data URL (Base64)
|
|
64
|
+
reader.onloadend = () => resolve(reader.result.split(',')[1]) // Extract Base64 part
|
|
65
|
+
reader.onerror = error => reject(error)
|
|
66
|
+
})
|
|
67
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Message } from 'element-ui'
|
|
2
|
+
import * as _ from 'lodash'
|
|
3
|
+
export const showError = (err) => {
|
|
4
|
+
const message = getResponseMessage(err)
|
|
5
|
+
Message({ message, type: 'warning' })
|
|
6
|
+
}
|
|
7
|
+
export const showSuccess = (message) => {
|
|
8
|
+
Message({ message, type: 'success' })
|
|
9
|
+
}
|
|
10
|
+
export const getResponseMessage = (err) => {
|
|
11
|
+
let message = _.get(err, 'response.data.message')
|
|
12
|
+
if (err.isCustomError) {
|
|
13
|
+
message = err.message
|
|
14
|
+
}
|
|
15
|
+
if (!message) {
|
|
16
|
+
message = err.message
|
|
17
|
+
}
|
|
18
|
+
return message
|
|
19
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import {
|
|
2
|
+
digit,
|
|
3
|
+
digitPrefix,
|
|
4
|
+
oneVariant,
|
|
5
|
+
tents,
|
|
6
|
+
tentPrefix,
|
|
7
|
+
tenPowers,
|
|
8
|
+
tenPowersPrefix,
|
|
9
|
+
suffixIin,
|
|
10
|
+
suffixN,
|
|
11
|
+
suffixDahi,
|
|
12
|
+
suffixDugaar,
|
|
13
|
+
latinText
|
|
14
|
+
} from './number-texts'
|
|
15
|
+
|
|
16
|
+
const hundredsPrefix = (num) => {
|
|
17
|
+
if (num < 10) {
|
|
18
|
+
if (num === 0) {
|
|
19
|
+
return digit[9]
|
|
20
|
+
}
|
|
21
|
+
return digitPrefix[num - 1]
|
|
22
|
+
}
|
|
23
|
+
if (num < 100) {
|
|
24
|
+
if (num % 10 === 0) {
|
|
25
|
+
return tentPrefix[(num / 10) - 1]
|
|
26
|
+
}
|
|
27
|
+
const base = Math.floor(num / 10)
|
|
28
|
+
const remainder = num - base * 10 - 1
|
|
29
|
+
return `${tentPrefix[base - 1]} ${remainder === 0 ? oneVariant : digitPrefix[remainder]}`
|
|
30
|
+
}
|
|
31
|
+
if (num < 1000) {
|
|
32
|
+
const divisor = 100
|
|
33
|
+
const remainder = num % divisor
|
|
34
|
+
const divided = num / divisor
|
|
35
|
+
if (remainder === 0) {
|
|
36
|
+
return `${digitPrefix[divided - 1]} ${tenPowersPrefix[0]}`
|
|
37
|
+
}
|
|
38
|
+
const base = Math.floor(num / divisor)
|
|
39
|
+
if (remainder < 10) {
|
|
40
|
+
return `${digitPrefix[base - 1]} ${tenPowersPrefix[0]} ${remainder === 1 ? oneVariant : digitPrefix[remainder - 1]}`
|
|
41
|
+
}
|
|
42
|
+
return `${digitPrefix[base - 1]} ${tenPowersPrefix[0]} ${hundredsPrefix(remainder)}`
|
|
43
|
+
}
|
|
44
|
+
return ''
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const toText = (num) => {
|
|
48
|
+
if (num < 10) {
|
|
49
|
+
if (num === 0) {
|
|
50
|
+
return digit[9]
|
|
51
|
+
}
|
|
52
|
+
return digit[num - 1]
|
|
53
|
+
}
|
|
54
|
+
if (num < 100) {
|
|
55
|
+
if (num % 10 === 0) {
|
|
56
|
+
return tents[(num / 10) - 1]
|
|
57
|
+
}
|
|
58
|
+
const base = Math.floor(num / 10)
|
|
59
|
+
return `${tentPrefix[base - 1]} ${digit[num - base * 10 - 1]}`
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (num < 1000) {
|
|
63
|
+
const divisor = 100
|
|
64
|
+
const remainder = num % divisor
|
|
65
|
+
const divided = num / divisor
|
|
66
|
+
if (remainder === 0) {
|
|
67
|
+
return `${digitPrefix[divided - 1]} ${tenPowers[0]}`
|
|
68
|
+
}
|
|
69
|
+
const base = Math.floor(num / divisor)
|
|
70
|
+
return `${digitPrefix[base - 1]} ${tenPowersPrefix[0]} ${toText(remainder)}`
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (num < 1000000) {
|
|
74
|
+
const divisor = 1000
|
|
75
|
+
const remainder = num % divisor
|
|
76
|
+
const divided = Math.floor(num / divisor)
|
|
77
|
+
if (remainder === 0) { return `${hundredsPrefix(divided)} ${tenPowers[1]}` }
|
|
78
|
+
return `${hundredsPrefix(divided)} ${tenPowers[1]} ${toText(remainder)}`
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (num < 1000000000) {
|
|
82
|
+
const divisor = 1000000
|
|
83
|
+
const remainder = num % divisor
|
|
84
|
+
const divided = Math.floor(num / divisor)
|
|
85
|
+
if (remainder === 0) { return `${hundredsPrefix(divided)} ${tenPowers[2]}` }
|
|
86
|
+
return `${hundredsPrefix(divided)} ${tenPowers[2]} ${toText(remainder)}`
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (num < 1000000000000) {
|
|
90
|
+
const divisor = 1000000000
|
|
91
|
+
const remainder = num % divisor
|
|
92
|
+
const divided = Math.floor(num / divisor)
|
|
93
|
+
if (remainder === 0) { return `${hundredsPrefix(divided)} ${tenPowers[3]}` }
|
|
94
|
+
return `${hundredsPrefix(divided)} ${tenPowers[3]} ${toText(remainder)}`
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (num < 1000000000000000) {
|
|
98
|
+
const divisor = 1000000000000
|
|
99
|
+
const remainder = num % divisor
|
|
100
|
+
const divided = Math.floor(num / divisor)
|
|
101
|
+
if (remainder === 0) { return `${hundredsPrefix(divided)} ${tenPowers[4]}` }
|
|
102
|
+
return `${hundredsPrefix(divided)} ${tenPowers[4]} ${toText(remainder)}`
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return ''
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const toWords = (num, options) => {
|
|
109
|
+
if (num >= 1000000000000000) {
|
|
110
|
+
console.log('mon_num: The number exceeds the limit of 999999999999999')
|
|
111
|
+
return ''
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
let result = toText(num)
|
|
115
|
+
|
|
116
|
+
if (typeof options !== 'object' || !options) { return result }
|
|
117
|
+
|
|
118
|
+
const separated = result.split(' ')
|
|
119
|
+
if (separated.length > 0 && options.suffix) {
|
|
120
|
+
const lastWord = separated[separated.length - 1]
|
|
121
|
+
let collection = []
|
|
122
|
+
|
|
123
|
+
if (options.suffix === 'iin') {
|
|
124
|
+
collection = suffixIin
|
|
125
|
+
}
|
|
126
|
+
if (options.suffix === 'n') {
|
|
127
|
+
collection = suffixN
|
|
128
|
+
}
|
|
129
|
+
if (options.suffix === 'dugaar') {
|
|
130
|
+
collection = suffixDugaar
|
|
131
|
+
}
|
|
132
|
+
if (options.suffix === 'dahi') {
|
|
133
|
+
collection = suffixDahi
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const transformation = collection.find(suffix => suffix.word === lastWord)
|
|
137
|
+
if (transformation) {
|
|
138
|
+
separated.pop()
|
|
139
|
+
if (options.suffix === 'n' && result === 'нэг') {
|
|
140
|
+
separated.push('нэг')
|
|
141
|
+
} else {
|
|
142
|
+
separated.push(transformation.tf)
|
|
143
|
+
}
|
|
144
|
+
result = separated.join(' ')
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (options.latin === true && separated.length > 0) {
|
|
149
|
+
const separatedNew = result.split(' ')
|
|
150
|
+
const transformedList = separatedNew.map((word) => {
|
|
151
|
+
const found = latinText.find(latin => latin.word === word)
|
|
152
|
+
return found ? found.tf : word
|
|
153
|
+
})
|
|
154
|
+
result = transformedList.join(' ')
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (options.ucFirst === true) {
|
|
158
|
+
result = result.charAt(0).toUpperCase() + result.slice(1)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (options.upperCase === true) {
|
|
162
|
+
result = result.toUpperCase()
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return result
|
|
166
|
+
}
|