@ibiz-template/vue3-components 0.7.27 → 0.7.28-alpha.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.
Files changed (121) hide show
  1. package/dist/{index-0TO7mjm5.js → index-HNRMy1_g.js} +1 -1
  2. package/dist/index-QB7iGpIB.js +4 -0
  3. package/dist/{index-g6o3vQXo.js → index-xa8K5AHD.js} +1 -1
  4. package/dist/index.min.css +1 -1
  5. package/dist/index.system.min.js +1 -1
  6. package/dist/wang-editor-YqnK5uQU.js +1 -0
  7. package/dist/{xlsx-util-qdXxbg2A.js → xlsx-util-nADTbeWP.js} +1 -1
  8. package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +0 -1
  9. package/es/control/dashboard/dashboard-design/dashboard-design.mjs +3 -3
  10. package/es/control/drtab/drtab-control.util.mjs +1 -1
  11. package/es/control/grid/grid/grid-control.util.d.ts +0 -2
  12. package/es/control/grid/grid/grid-control.util.mjs +9 -72
  13. package/es/control/grid/grid/grid.css +1 -1
  14. package/es/control/grid/grid/grid.d.ts +0 -2
  15. package/es/control/grid/grid/grid.mjs +1 -7
  16. package/es/control/grid/grid/index.d.ts +0 -2
  17. package/es/control/report-panel/report-panel.mjs +5 -0
  18. package/es/control/toolbar/toolbar.css +1 -1
  19. package/es/control/toolbar/toolbar.mjs +144 -8
  20. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +1 -1
  21. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.mjs +2 -9
  22. package/es/editor/html/html-editor.controller.d.ts +88 -0
  23. package/es/editor/html/html-editor.controller.mjs +169 -6
  24. package/es/editor/html/wang-editor/component/emoji/emoji.css +1 -0
  25. package/es/editor/html/wang-editor/component/emoji/emoji.d.ts +17 -0
  26. package/es/editor/html/wang-editor/component/emoji/emoji.mjs +42 -0
  27. package/es/editor/html/wang-editor/component/index.d.ts +1 -0
  28. package/es/editor/html/wang-editor/component/index.mjs +3 -0
  29. package/es/editor/html/wang-editor/element/emoji.d.ts +7 -0
  30. package/es/editor/html/wang-editor/element/emoji.mjs +22 -0
  31. package/es/editor/html/wang-editor/element/index.d.ts +1 -0
  32. package/es/editor/html/wang-editor/element/index.mjs +3 -0
  33. package/es/editor/html/wang-editor/index.d.ts +4 -0
  34. package/es/editor/html/wang-editor/index.mjs +11 -0
  35. package/es/editor/html/wang-editor/module/ai-module.d.ts +67 -0
  36. package/es/editor/html/wang-editor/module/ai-module.mjs +76 -0
  37. package/es/editor/html/wang-editor/module/emoji-module.d.ts +7 -0
  38. package/es/editor/html/wang-editor/module/emoji-module.mjs +125 -0
  39. package/es/editor/html/wang-editor/module/index.d.ts +2 -0
  40. package/es/editor/html/wang-editor/module/index.mjs +4 -0
  41. package/es/editor/html/wang-editor/plugin/index.d.ts +1 -0
  42. package/es/editor/html/wang-editor/plugin/index.mjs +3 -0
  43. package/es/editor/html/wang-editor/plugin/plugin.d.ts +7 -0
  44. package/es/editor/html/wang-editor/plugin/plugin.mjs +23 -0
  45. package/es/editor/html/wang-editor/wang-editor.css +1 -1
  46. package/es/editor/html/wang-editor/wang-editor.mjs +7 -7
  47. package/es/editor/span/span/span.mjs +2 -2
  48. package/es/editor/text-box/input/input.mjs +2 -2
  49. package/es/locale/en/index.d.ts +1 -0
  50. package/es/locale/en/index.mjs +2 -1
  51. package/es/locale/zh-CN/index.d.ts +1 -0
  52. package/es/locale/zh-CN/index.mjs +2 -1
  53. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/h.mjs +89 -0
  54. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/helpers/attachto.mjs +47 -0
  55. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/hooks.mjs +1 -0
  56. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/htmldomapi.mjs +115 -0
  57. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/index.mjs +18 -0
  58. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/init.mjs +376 -0
  59. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/is.mjs +9 -0
  60. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/jsx.mjs +64 -0
  61. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/attributes.mjs +59 -0
  62. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/class.mjs +28 -0
  63. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/dataset.mjs +42 -0
  64. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/eventlisteners.mjs +85 -0
  65. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/props.mjs +24 -0
  66. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/style.mjs +115 -0
  67. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/thunk.mjs +52 -0
  68. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/tovnode.mjs +62 -0
  69. package/es/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/vnode.mjs +6 -0
  70. package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +3 -3
  71. package/lib/control/drtab/drtab-control.util.cjs +1 -1
  72. package/lib/control/grid/grid/grid-control.util.cjs +9 -72
  73. package/lib/control/grid/grid/grid.cjs +1 -7
  74. package/lib/control/grid/grid/grid.css +1 -1
  75. package/lib/control/report-panel/report-panel.cjs +5 -0
  76. package/lib/control/toolbar/toolbar.cjs +144 -8
  77. package/lib/control/toolbar/toolbar.css +1 -1
  78. package/lib/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.cjs +1 -8
  79. package/lib/editor/html/html-editor.controller.cjs +169 -6
  80. package/lib/editor/html/wang-editor/component/emoji/emoji.cjs +44 -0
  81. package/lib/editor/html/wang-editor/component/emoji/emoji.css +1 -0
  82. package/lib/editor/html/wang-editor/component/index.cjs +7 -0
  83. package/lib/editor/html/wang-editor/element/emoji.cjs +24 -0
  84. package/lib/editor/html/wang-editor/element/index.cjs +7 -0
  85. package/lib/editor/html/wang-editor/index.cjs +19 -0
  86. package/lib/editor/html/wang-editor/module/ai-module.cjs +78 -0
  87. package/lib/editor/html/wang-editor/module/emoji-module.cjs +127 -0
  88. package/lib/editor/html/wang-editor/module/index.cjs +9 -0
  89. package/lib/editor/html/wang-editor/plugin/index.cjs +7 -0
  90. package/lib/editor/html/wang-editor/plugin/plugin.cjs +25 -0
  91. package/lib/editor/html/wang-editor/wang-editor.cjs +7 -7
  92. package/lib/editor/html/wang-editor/wang-editor.css +1 -1
  93. package/lib/editor/span/span/span.cjs +1 -1
  94. package/lib/editor/text-box/input/input.cjs +1 -1
  95. package/lib/locale/en/index.cjs +2 -1
  96. package/lib/locale/zh-CN/index.cjs +2 -1
  97. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/h.cjs +93 -0
  98. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/helpers/attachto.cjs +49 -0
  99. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/hooks.cjs +2 -0
  100. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/htmldomapi.cjs +117 -0
  101. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/index.cjs +42 -0
  102. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/init.cjs +378 -0
  103. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/is.cjs +12 -0
  104. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/jsx.cjs +67 -0
  105. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/attributes.cjs +61 -0
  106. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/class.cjs +30 -0
  107. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/dataset.cjs +44 -0
  108. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/eventlisteners.cjs +87 -0
  109. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/props.cjs +26 -0
  110. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/modules/style.cjs +117 -0
  111. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/thunk.cjs +54 -0
  112. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/tovnode.cjs +64 -0
  113. package/lib/node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/vnode.cjs +8 -0
  114. package/package.json +6 -5
  115. package/dist/index-Dq21zXhV.js +0 -4
  116. package/dist/wang-editor-XpJH4SXt.js +0 -1
  117. package/es/editor/html/wang-editor/ai/ai-modules.d.ts +0 -10
  118. package/es/editor/html/wang-editor/ai/ai-modules.mjs +0 -32
  119. package/lib/editor/html/wang-editor/ai/ai-modules.cjs +0 -34
  120. /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.27_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.28-alpha.0_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
  121. /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.27_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.28-alpha.0_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
@@ -0,0 +1,127 @@
1
+ 'use strict';
2
+
3
+ require('../../../../node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/index.cjs');
4
+ var core = require('@ibiz-template/core');
5
+ var h = require('../../../../node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/h.cjs');
6
+
7
+ "use strict";
8
+ var __defProp = Object.defineProperty;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __publicField = (obj, key, value) => {
11
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
12
+ return value;
13
+ };
14
+ const renderElemConf = {
15
+ type: "emoji",
16
+ renderElem: (elem) => {
17
+ const { data = {} } = elem;
18
+ const vnode = h.h(
19
+ "emoji-elem",
20
+ {
21
+ dataset: { value: data.emoji ? core.base64ToStr(data.emoji) : "" },
22
+ props: {
23
+ contentEditable: false
24
+ // 不可编辑
25
+ }
26
+ },
27
+ []
28
+ );
29
+ return vnode;
30
+ }
31
+ };
32
+ const elemToHtmlConf = {
33
+ type: "emoji",
34
+ elemToHtml: (elem) => {
35
+ const { data } = elem;
36
+ return '<span data-w-e-type="emoji" class="emoji">'.concat(data.emoji, "</span>");
37
+ }
38
+ };
39
+ const parseHtmlConf = {
40
+ selector: 'span[data-w-e-type="emoji"]',
41
+ parseElemHtml: (elem) => {
42
+ const data = {
43
+ emoji: elem.innerHTML
44
+ };
45
+ return {
46
+ data,
47
+ type: "emoji",
48
+ children: [{ text: "" }]
49
+ };
50
+ }
51
+ };
52
+ class EmojiButtonMenu {
53
+ /**
54
+ * Creates an instance of EmojiButtonMenu.
55
+ * @memberof EmojiButtonMenu
56
+ */
57
+ constructor() {
58
+ /**
59
+ * 标题
60
+ *
61
+ * @memberof EmojiButtonMenu
62
+ */
63
+ __publicField(this, "title", "".concat(ibiz.i18n.t("editor.html.wangEditor.emoji")));
64
+ /**
65
+ * 菜单类型
66
+ *
67
+ * @memberof EmojiButtonMenu
68
+ */
69
+ __publicField(this, "tag", "button");
70
+ /**
71
+ * 菜单图标
72
+ *
73
+ * @memberof EmojiButtonMenu
74
+ */
75
+ __publicField(this, "iconSvg", "<svg viewBox='0 0 1040 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='1490' width='1em' height='1em' stroke='var(--w-e-toolbar-color)' > <path stroke-width='38' d='M512.075261 1024A511.774217 511.774217 0 1 1 730.482434 48.769072a37.630457 37.630457 0 1 1-32.061149 68.035867 436.513303 436.513303 0 1 0 250.468323 395.270322 37.630457 37.630457 0 0 1 75.260914 0 512.526826 512.526826 0 0 1-512.075261 511.924739z' p-id='1491' ></path> <path stroke-width='38' d='M333.857416 344.0929a57.348817 57.348817 0 1 0 57.348817 57.348817 57.499339 57.499339 0 0 0-57.348817-57.348817zM686.53006 344.0929a57.348817 57.348817 0 1 0 57.348817 57.348817 57.348817 57.348817 0 0 0-57.348817-57.348817zM515.236219 783.165074c-162.864619 0-262.359547-141.942084-262.359547-219.159782a30.104366 30.104366 0 0 1 60.208731 0c0 48.618551 76.314567 158.951051 202.150816 158.951051s193.571072-134.114949 193.571072-158.951051a30.104366 30.104366 0 0 1 60.208731 0c0 54.488902-90.012054 219.159782-253.779803 219.159782zM1009.549904 207.720123h-67.132735V139.985301a30.104366 30.104366 0 1 0-60.208732 0v67.734822h-67.734822a30.104366 30.104366 0 0 0-30.104366 30.104366 30.104366 30.104366 0 0 0 30.104366 30.104366h67.734822v67.734823a30.104366 30.104366 0 0 0 60.208732 0v-67.734823h67.734823a30.104366 30.104366 0 0 0 30.104365-30.104366 30.104366 30.104366 0 0 0-30.706453-30.104366z' p-id='1492' ></path> </svg>");
76
+ }
77
+ /**
78
+ * 菜单是否需要激活(如选中加粗文本,“加粗”菜单会激活),用不到则返回 false
79
+ *
80
+ * @return {*} {boolean}
81
+ * @memberof EmojiButtonMenu
82
+ */
83
+ isActive() {
84
+ return false;
85
+ }
86
+ /**
87
+ * 获取菜单执行时的 value ,用不到则返回空 字符串或 false
88
+ *
89
+ * @return {*} {(string | boolean)}
90
+ * @memberof EmojiButtonMenu
91
+ */
92
+ getValue() {
93
+ return false;
94
+ }
95
+ /**
96
+ * 菜单是否需要禁用(如选中 H1 ,“引用”菜单被禁用),用不到则返回 false
97
+ *
98
+ * @return {*} {boolean}
99
+ * @memberof EmojiButtonMenu
100
+ */
101
+ isDisabled() {
102
+ return false;
103
+ }
104
+ /**
105
+ * 点击菜单时触发的函数
106
+ *
107
+ * @param {IDomEditor} editor
108
+ * @memberof EmojiButtonMenu
109
+ */
110
+ exec(editor) {
111
+ editor.emit("openEmojiSelect");
112
+ }
113
+ }
114
+ const EmojiMenu = {
115
+ key: "emoji",
116
+ factory() {
117
+ return new EmojiButtonMenu();
118
+ }
119
+ };
120
+ const EmojiModule = {
121
+ renderElems: [renderElemConf],
122
+ elemsToHtml: [elemToHtmlConf],
123
+ parseElemsHtml: [parseHtmlConf],
124
+ menus: [EmojiMenu]
125
+ };
126
+
127
+ exports.EmojiModule = EmojiModule;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var aiModule = require('./ai-module.cjs');
4
+ var emojiModule = require('./emoji-module.cjs');
5
+
6
+ "use strict";
7
+
8
+ exports.AIMenu = aiModule.AIMenu;
9
+ exports.EmojiModule = emojiModule.EmojiModule;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var plugin = require('./plugin.cjs');
4
+
5
+ "use strict";
6
+
7
+ exports.Plugin = plugin.Plugin;
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ var editor = require('@wangeditor/editor');
4
+
5
+ "use strict";
6
+ const Plugin = (editor$1) => {
7
+ const { isInline, isVoid } = editor$1;
8
+ editor$1.isInline = (elem) => {
9
+ const type = editor.DomEditor.getNodeType(elem);
10
+ if (type === "emoji") {
11
+ return true;
12
+ }
13
+ return isInline(elem);
14
+ };
15
+ editor$1.isVoid = (elem) => {
16
+ const type = editor.DomEditor.getNodeType(elem);
17
+ if (type === "emoji") {
18
+ return true;
19
+ }
20
+ return isVoid(elem);
21
+ };
22
+ return editor$1;
23
+ };
24
+
25
+ exports.Plugin = Plugin;
@@ -73,14 +73,12 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
73
73
  return url;
74
74
  };
75
75
  const toolbarConfig = {
76
- excludeKeys: ["group-video"]
77
- };
78
- if (c.chatCompletion) {
79
- toolbarConfig.insertKeys = {
76
+ excludeKeys: ["group-video", "emotion"],
77
+ insertKeys: {
80
78
  index: 60,
81
- keys: ["|", "aichart"]
82
- };
83
- }
79
+ keys: c.chatCompletion ? ["emoji", "|", "aichart"] : ["emoji"]
80
+ }
81
+ };
84
82
  const editorConfig = {
85
83
  placeholder: c.placeHolder,
86
84
  readOnly: hasEnableEdit.value ? readonlyState.value : props.readonly,
@@ -232,6 +230,7 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
232
230
  };
233
231
  const handleCreated = (editor) => {
234
232
  editorRef.value = editor;
233
+ c.onCreated(editorRef.value);
235
234
  editor.setHtml(valueHtml.value);
236
235
  editor.on("aiClick", () => {
237
236
  onClickAI();
@@ -476,6 +475,7 @@ const IBizHtml = /* @__PURE__ */ vue.defineComponent({
476
475
  calcHtmlStyle();
477
476
  });
478
477
  vue.onUnmounted(() => {
478
+ c.onDestroyed();
479
479
  if (resizeObserver) {
480
480
  resizeObserver.disconnect();
481
481
  }
@@ -1 +1 @@
1
- .ibiz-html{--ibiz-html-height:300px;display:inline-block;width:100%;height:100%;--w-e-textarea-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-color:var(--ibiz-color-text-2);--w-e-textarea-border-color:var(--ibiz-color-border);--w-e-textarea-slight-border-color:var(--ibiz-color-border);--w-e-textarea-slight-color:var(--ibiz-color-text-3);--w-e-textarea-slight-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-selected-border-color:var(--ibiz-color-border);--w-e-textarea-handler-bg-color:var(--ibiz-color-primary);--w-e-toolbar-color:var(--ibiz-color-text-0);--w-e-toolbar-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-active-color:var(--ibiz-color-text-0);--w-e-toolbar-active-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-disabled-color:var(--ibiz-color-disabled-text);--w-e-toolbar-border-color:var(--ibiz-color-border);--w-e-modal-button-bg-color:var(--ibiz-color-bg-1);--w-e-modal-button-border-color:var(--ibiz-color-border)}.ibiz-html .ibiz-html-content{display:flex;flex-direction:column;height:100%;background-color:var(--ibiz-color-bg-0)}.ibiz-html .ibiz-html-editor{height:var(--ibiz-html-height)!important;padding:0;overflow-y:scroll;border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor.is-readonly{height:auto!important}.ibiz-html .ibiz-html-editor table{width:100%!important;border-collapse:collapse}.ibiz-html .ibiz-html-editor table th{height:var(--ibiz-height-control-large);min-height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight);border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor table td{height:var(--ibiz-height-control-large);min-height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight);empty-cells:show;border:1px solid var(--ibiz-color-border)}.ibiz-html .w-e-menu-tooltip-v5::before{color:var(--ibiz-color-text-0);background-color:var(--w-e-toolbar-bg-color)}.ibiz-html .w-e-full-screen-container{z-index:9999}.ibiz-html .w-e-scroll>div{background-color:var(--ibiz-color-bg-1)}.ibiz-html .table-container table{width:100%}.ibiz-html-editor-readonly .ibiz-html-toolbar{display:none}.ibiz-html-editor-readonly .ibiz-html-editor{border:none}.ibiz-html-footer{display:flex;align-items:center;justify-content:end;margin-top:var(--ibiz-spacing-base-tight);margin-right:var(--ibiz-spacing-tight)}.ibiz-html-footer>*+*{margin-left:var(--ibiz-spacing-base)}.ibiz-html-footer__cancel{height:var(--ibiz-height-control-default);line-height:var(--ibiz-height-control-default);color:var(--ibiz-color-text-1);cursor:pointer;opacity:.7}.ibiz-html-footer__cancel:hover{color:var(--ibiz-color-primary);opacity:1}.ibiz-html-footer__save{height:var(--ibiz-height-control-default);padding:0 var(--ibiz-spacing-base);line-height:var(--ibiz-height-control-default);color:var(--ibiz-color-primary-active-text);text-align:center;cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:var(--ibiz-border-radius-small)}.ibiz-html-custom-toolbar{display:flex;align-items:center;justify-content:end;width:100%;height:var(--ibiz-height-control-default);padding-right:var(--ibiz-spacing-base);font-size:var(--ibiz-font-size-header-6)}.ibiz-html-custom-toolbar>*+*{margin-left:var(--ibiz-spacing-base-loose)}.ibiz-html-custom-toolbar i{cursor:pointer}.ibiz-html-custom-toolbar i:hover{color:var(--ibiz-color-primary)}.ibiz-html-message{width:500px;max-width:unset}.ibiz-html-message__message-content--message-tip{color:var(--ibiz-color-text-3)}.ibiz-html-message__message-cancel{color:var(--ibiz-color-text-1);background-color:transparent}.ibiz-html-message__message-cancel:hover{color:var(--ibiz-color-primary);background-color:transparent}.ibiz-html-message__message-comfire{background-color:var(--ibiz-color-danger)!important}.ibiz-html-message__message-comfire:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-danger)}.ibiz-html-dialog-full-screen{height:80%}.ibiz-html-dialog-full-screen .ibiz-html{padding:0 var(--ibiz-spacing-extra-loose);--w-e-toolbar-bg-color:var(--ibiz-color-bg-0)}.ibiz-html-dialog-full-screen .ibiz-html-custom-toolbar{height:56px}.ibiz-html-dialog-full-screen .ibiz-html-content{height:calc(100% - 124px)}.ibiz-html-dialog-full-screen .ibiz-html-content .ibiz-html-editor{height:100%!important}.ibiz-html-footer-dialog{height:68px;margin-top:0}
1
+ .ibiz-html{--ibiz-html-height:300px;display:inline-block;width:100%;height:100%;--w-e-textarea-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-color:var(--ibiz-color-text-2);--w-e-textarea-border-color:var(--ibiz-color-border);--w-e-textarea-slight-border-color:var(--ibiz-color-border);--w-e-textarea-slight-color:var(--ibiz-color-text-3);--w-e-textarea-slight-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-selected-border-color:var(--ibiz-color-border);--w-e-textarea-handler-bg-color:var(--ibiz-color-primary);--w-e-toolbar-color:var(--ibiz-color-text-0);--w-e-toolbar-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-active-color:var(--ibiz-color-text-0);--w-e-toolbar-active-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-disabled-color:var(--ibiz-color-disabled-text);--w-e-toolbar-border-color:var(--ibiz-color-border);--w-e-modal-button-bg-color:var(--ibiz-color-bg-1);--w-e-modal-button-border-color:var(--ibiz-color-border)}.ibiz-html .ibiz-html-content{display:flex;flex-direction:column;height:100%;background-color:var(--ibiz-color-bg-0)}.ibiz-html .ibiz-html-editor{height:var(--ibiz-html-height)!important;padding:0;overflow-y:scroll;border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor.is-readonly{height:auto!important}.ibiz-html .ibiz-html-editor table{width:100%!important;border-collapse:collapse}.ibiz-html .ibiz-html-editor table th{height:var(--ibiz-height-control-large);min-height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight);border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor table td{height:var(--ibiz-height-control-large);min-height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight);empty-cells:show;border:1px solid var(--ibiz-color-border)}.ibiz-html .w-e-menu-tooltip-v5::before{color:var(--ibiz-color-text-0);background-color:var(--w-e-toolbar-bg-color)}.ibiz-html .w-e-full-screen-container{z-index:9999}.ibiz-html .w-e-scroll>div{background-color:var(--ibiz-color-bg-1)}.ibiz-html .table-container table{width:100%}.ibiz-html-editor-readonly .ibiz-html-toolbar{display:none}.ibiz-html-editor-readonly .ibiz-html-editor{border:none}.ibiz-html-footer{display:flex;align-items:center;justify-content:end;margin-top:var(--ibiz-spacing-base-tight);margin-right:var(--ibiz-spacing-tight)}.ibiz-html-footer>*+*{margin-left:var(--ibiz-spacing-base)}.ibiz-html-footer__cancel{height:var(--ibiz-height-control-default);line-height:var(--ibiz-height-control-default);color:var(--ibiz-color-text-1);cursor:pointer;opacity:.7}.ibiz-html-footer__cancel:hover{color:var(--ibiz-color-primary);opacity:1}.ibiz-html-footer__save{height:var(--ibiz-height-control-default);padding:0 var(--ibiz-spacing-base);line-height:var(--ibiz-height-control-default);color:var(--ibiz-color-primary-active-text);text-align:center;cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:var(--ibiz-border-radius-small)}.ibiz-html-custom-toolbar{display:flex;align-items:center;justify-content:end;width:100%;height:var(--ibiz-height-control-default);padding-right:var(--ibiz-spacing-base);font-size:var(--ibiz-font-size-header-6)}.ibiz-html-custom-toolbar>*+*{margin-left:var(--ibiz-spacing-base-loose)}.ibiz-html-custom-toolbar i{cursor:pointer}.ibiz-html-custom-toolbar i:hover{color:var(--ibiz-color-primary)}.ibiz-html-message{width:500px;max-width:unset}.ibiz-html-message__message-content--message-tip{color:var(--ibiz-color-text-3)}.ibiz-html-message__message-cancel{color:var(--ibiz-color-text-1);background-color:transparent}.ibiz-html-message__message-cancel:hover{color:var(--ibiz-color-primary);background-color:transparent}.ibiz-html-message__message-comfire{background-color:var(--ibiz-color-danger)!important}.ibiz-html-message__message-comfire:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-danger)}.ibiz-html-dialog-full-screen{height:80%}.ibiz-html-dialog-full-screen .ibiz-html{padding:0 var(--ibiz-spacing-extra-loose);--w-e-toolbar-bg-color:var(--ibiz-color-bg-0)}.ibiz-html-dialog-full-screen .ibiz-html-custom-toolbar{height:56px}.ibiz-html-dialog-full-screen .ibiz-html-content{height:calc(100% - 124px)}.ibiz-html-dialog-full-screen .ibiz-html-content .ibiz-html-editor{height:100%!important}.ibiz-html-footer-dialog{height:68px;margin-top:0}emoji-elem{margin:0 1px!important}
@@ -76,7 +76,7 @@ const IBizSpan = /* @__PURE__ */ vue.defineComponent({
76
76
  text.value = "".concat(newVal);
77
77
  ibiz.log.error("".concat(newVal, " \u503C\u683C\u5F0F\u5316\u9519\u8BEF"));
78
78
  }
79
- } else if (Number.isNaN(Number(newVal)) && core.isBase64("".concat(newVal))) {
79
+ } else if (core.isEmoji("".concat(newVal))) {
80
80
  text.value = core.base64ToStr("".concat(newVal));
81
81
  } else {
82
82
  text.value = "".concat(newVal);
@@ -60,7 +60,7 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
60
60
  if (newVal !== oldVal) {
61
61
  if (newVal == null) {
62
62
  currentVal.value = "";
63
- } else if (Number.isNaN(Number(newVal)) && core.isBase64("".concat(newVal))) {
63
+ } else if (core.isEmoji("".concat(newVal))) {
64
64
  currentVal.value = core.base64ToStr("".concat(newVal));
65
65
  } else {
66
66
  currentVal.value = newVal.toString();
@@ -506,7 +506,8 @@ var index = {
506
506
  },
507
507
  html: {
508
508
  wangEditor: {
509
- customTips: "Custom tip"
509
+ customTips: "Custom tip",
510
+ emoji: "Emoji"
510
511
  }
511
512
  },
512
513
  markdown: {
@@ -502,7 +502,8 @@ var index = {
502
502
  },
503
503
  html: {
504
504
  wangEditor: {
505
- customTips: "\u81EA\u5B9A\u4E49\u63D0\u793A"
505
+ customTips: "\u81EA\u5B9A\u4E49\u63D0\u793A",
506
+ emoji: "\u8868\u60C5"
506
507
  }
507
508
  },
508
509
  markdown: {
@@ -0,0 +1,93 @@
1
+ 'use strict';
2
+
3
+ var vnode = require('./vnode.cjs');
4
+ var is = require('./is.cjs');
5
+
6
+ function addNS(data, children, sel) {
7
+ data.ns = "http://www.w3.org/2000/svg";
8
+ if (sel !== "foreignObject" && children !== undefined) {
9
+ for (let i = 0; i < children.length; ++i) {
10
+ const child = children[i];
11
+ if (typeof child === "string")
12
+ continue;
13
+ const childData = child.data;
14
+ if (childData !== undefined) {
15
+ addNS(childData, child.children, child.sel);
16
+ }
17
+ }
18
+ }
19
+ }
20
+ function h(sel, b, c) {
21
+ let data = {};
22
+ let children;
23
+ let text;
24
+ let i;
25
+ if (c !== undefined) {
26
+ if (b !== null) {
27
+ data = b;
28
+ }
29
+ if (is.array(c)) {
30
+ children = c;
31
+ }
32
+ else if (is.primitive(c)) {
33
+ text = c.toString();
34
+ }
35
+ else if (c && c.sel) {
36
+ children = [c];
37
+ }
38
+ }
39
+ else if (b !== undefined && b !== null) {
40
+ if (is.array(b)) {
41
+ children = b;
42
+ }
43
+ else if (is.primitive(b)) {
44
+ text = b.toString();
45
+ }
46
+ else if (b && b.sel) {
47
+ children = [b];
48
+ }
49
+ else {
50
+ data = b;
51
+ }
52
+ }
53
+ if (children !== undefined) {
54
+ for (i = 0; i < children.length; ++i) {
55
+ if (is.primitive(children[i]))
56
+ children[i] = vnode.vnode(undefined, undefined, undefined, children[i], undefined);
57
+ }
58
+ }
59
+ if (sel[0] === "s" &&
60
+ sel[1] === "v" &&
61
+ sel[2] === "g" &&
62
+ (sel.length === 3 || sel[3] === "." || sel[3] === "#")) {
63
+ addNS(data, children, sel);
64
+ }
65
+ return vnode.vnode(sel, data, children, text, undefined);
66
+ }
67
+ /**
68
+ * @experimental
69
+ */
70
+ function fragment(children) {
71
+ let c;
72
+ let text;
73
+ if (is.array(children)) {
74
+ c = children;
75
+ }
76
+ else if (is.primitive(c)) {
77
+ text = children;
78
+ }
79
+ else if (c && c.sel) {
80
+ c = [children];
81
+ }
82
+ if (c !== undefined) {
83
+ for (let i = 0; i < c.length; ++i) {
84
+ if (is.primitive(c[i]))
85
+ c[i] = vnode.vnode(undefined, undefined, undefined, c[i], undefined);
86
+ }
87
+ }
88
+ return vnode.vnode(undefined, {}, c, text, undefined);
89
+ }
90
+
91
+ exports.addNS = addNS;
92
+ exports.fragment = fragment;
93
+ exports.h = h;
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ function pre(vnode, newVnode) {
4
+ const attachData = vnode.data.attachData;
5
+ // Copy created placeholder and real element from old vnode
6
+ newVnode.data.attachData.placeholder = attachData.placeholder;
7
+ newVnode.data.attachData.real = attachData.real;
8
+ // Mount real element in vnode so the patch process operates on it
9
+ vnode.elm = vnode.data.attachData.real;
10
+ }
11
+ function post(_, vnode) {
12
+ // Mount dummy placeholder in vnode so potential reorders use it
13
+ vnode.elm = vnode.data.attachData.placeholder;
14
+ }
15
+ function destroy(vnode) {
16
+ // Remove placeholder
17
+ if (vnode.elm !== undefined) {
18
+ vnode.elm.parentNode.removeChild(vnode.elm);
19
+ }
20
+ // Remove real element from where it was inserted
21
+ vnode.elm = vnode.data.attachData.real;
22
+ }
23
+ function create(_, vnode) {
24
+ const real = vnode.elm;
25
+ const attachData = vnode.data.attachData;
26
+ const placeholder = document.createElement("span");
27
+ // Replace actual element with dummy placeholder
28
+ // Snabbdom will then insert placeholder instead
29
+ vnode.elm = placeholder;
30
+ attachData.target.appendChild(real);
31
+ attachData.real = real;
32
+ attachData.placeholder = placeholder;
33
+ }
34
+ function attachTo(target, vnode) {
35
+ if (vnode.data === undefined)
36
+ vnode.data = {};
37
+ if (vnode.data.hook === undefined)
38
+ vnode.data.hook = {};
39
+ const data = vnode.data;
40
+ const hook = vnode.data.hook;
41
+ data.attachData = { target: target, placeholder: undefined, real: undefined };
42
+ hook.create = create;
43
+ hook.prepatch = pre;
44
+ hook.postpatch = post;
45
+ hook.destroy = destroy;
46
+ return vnode;
47
+ }
48
+
49
+ exports.attachTo = attachTo;
@@ -0,0 +1,117 @@
1
+ 'use strict';
2
+
3
+ function createElement(tagName, options) {
4
+ return document.createElement(tagName, options);
5
+ }
6
+ function createElementNS(namespaceURI, qualifiedName, options) {
7
+ return document.createElementNS(namespaceURI, qualifiedName, options);
8
+ }
9
+ function createDocumentFragment() {
10
+ return parseFragment(document.createDocumentFragment());
11
+ }
12
+ function createTextNode(text) {
13
+ return document.createTextNode(text);
14
+ }
15
+ function createComment(text) {
16
+ return document.createComment(text);
17
+ }
18
+ function insertBefore(parentNode, newNode, referenceNode) {
19
+ if (isDocumentFragment(parentNode)) {
20
+ let node = parentNode;
21
+ while (node && isDocumentFragment(node)) {
22
+ const fragment = parseFragment(node);
23
+ node = fragment.parent;
24
+ }
25
+ parentNode = node !== null && node !== void 0 ? node : parentNode;
26
+ }
27
+ if (isDocumentFragment(newNode)) {
28
+ newNode = parseFragment(newNode, parentNode);
29
+ }
30
+ if (referenceNode && isDocumentFragment(referenceNode)) {
31
+ referenceNode = parseFragment(referenceNode).firstChildNode;
32
+ }
33
+ parentNode.insertBefore(newNode, referenceNode);
34
+ }
35
+ function removeChild(node, child) {
36
+ node.removeChild(child);
37
+ }
38
+ function appendChild(node, child) {
39
+ if (isDocumentFragment(child)) {
40
+ child = parseFragment(child, node);
41
+ }
42
+ node.appendChild(child);
43
+ }
44
+ function parentNode(node) {
45
+ if (isDocumentFragment(node)) {
46
+ while (node && isDocumentFragment(node)) {
47
+ const fragment = parseFragment(node);
48
+ node = fragment.parent;
49
+ }
50
+ return node !== null && node !== void 0 ? node : null;
51
+ }
52
+ return node.parentNode;
53
+ }
54
+ function nextSibling(node) {
55
+ var _a;
56
+ if (isDocumentFragment(node)) {
57
+ const fragment = parseFragment(node);
58
+ const parent = parentNode(fragment);
59
+ if (parent && fragment.lastChildNode) {
60
+ const children = Array.from(parent.childNodes);
61
+ const index = children.indexOf(fragment.lastChildNode);
62
+ return (_a = children[index + 1]) !== null && _a !== void 0 ? _a : null;
63
+ }
64
+ return null;
65
+ }
66
+ return node.nextSibling;
67
+ }
68
+ function tagName(elm) {
69
+ return elm.tagName;
70
+ }
71
+ function setTextContent(node, text) {
72
+ node.textContent = text;
73
+ }
74
+ function getTextContent(node) {
75
+ return node.textContent;
76
+ }
77
+ function isElement(node) {
78
+ return node.nodeType === 1;
79
+ }
80
+ function isText(node) {
81
+ return node.nodeType === 3;
82
+ }
83
+ function isComment(node) {
84
+ return node.nodeType === 8;
85
+ }
86
+ function isDocumentFragment(node) {
87
+ return node.nodeType === 11;
88
+ }
89
+ function parseFragment(fragmentNode, parentNode) {
90
+ var _a, _b, _c;
91
+ const fragment = fragmentNode;
92
+ (_a = fragment.parent) !== null && _a !== void 0 ? _a : (fragment.parent = parentNode !== null && parentNode !== void 0 ? parentNode : null);
93
+ (_b = fragment.firstChildNode) !== null && _b !== void 0 ? _b : (fragment.firstChildNode = fragmentNode.firstChild);
94
+ (_c = fragment.lastChildNode) !== null && _c !== void 0 ? _c : (fragment.lastChildNode = fragmentNode.lastChild);
95
+ return fragment;
96
+ }
97
+ const htmlDomApi = {
98
+ createElement,
99
+ createElementNS,
100
+ createTextNode,
101
+ createDocumentFragment,
102
+ createComment,
103
+ insertBefore,
104
+ removeChild,
105
+ appendChild,
106
+ parentNode,
107
+ nextSibling,
108
+ tagName,
109
+ setTextContent,
110
+ getTextContent,
111
+ isElement,
112
+ isText,
113
+ isComment,
114
+ isDocumentFragment,
115
+ };
116
+
117
+ exports.htmlDomApi = htmlDomApi;
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ var htmldomapi = require('./htmldomapi.cjs');
4
+ var init = require('./init.cjs');
5
+ var thunk = require('./thunk.cjs');
6
+ var vnode = require('./vnode.cjs');
7
+ var attachto = require('./helpers/attachto.cjs');
8
+ var is = require('./is.cjs');
9
+ var tovnode = require('./tovnode.cjs');
10
+ var h = require('./h.cjs');
11
+ require('./hooks.cjs');
12
+ var attributes = require('./modules/attributes.cjs');
13
+ var _class = require('./modules/class.cjs');
14
+ var dataset = require('./modules/dataset.cjs');
15
+ var eventlisteners = require('./modules/eventlisteners.cjs');
16
+ var props = require('./modules/props.cjs');
17
+ var style = require('./modules/style.cjs');
18
+ var jsx = require('./jsx.cjs');
19
+
20
+ // core
21
+
22
+ exports.htmlDomApi = htmldomapi.htmlDomApi;
23
+ exports.init = init.init;
24
+ exports.thunk = thunk.thunk;
25
+ exports.vnode = vnode.vnode;
26
+ exports.attachTo = attachto.attachTo;
27
+ exports.array = is.array;
28
+ exports.primitive = is.primitive;
29
+ exports.toVNode = tovnode.toVNode;
30
+ exports.fragment = h.fragment;
31
+ exports.h = h.h;
32
+ exports.attributesModule = attributes.attributesModule;
33
+ exports.classModule = _class.classModule;
34
+ exports.datasetModule = dataset.datasetModule;
35
+ exports.eventListenersModule = eventlisteners.eventListenersModule;
36
+ exports.propsModule = props.propsModule;
37
+ exports.styleModule = style.styleModule;
38
+ exports.Fragment = jsx.Fragment;
39
+ Object.defineProperty(exports, "jsx", {
40
+ enumerable: true,
41
+ get: function () { return jsx.jsx; }
42
+ });