@ibiz-template/vue3-components 0.7.30 → 0.7.31-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 (122) hide show
  1. package/dist/chart-0UV2FAN6.js +1 -0
  2. package/dist/index-maJGu4b8.js +4 -0
  3. package/dist/index.min.css +1 -1
  4. package/dist/index.system.min.js +1 -1
  5. package/dist/{xlsx-util-sKVlHqdj.js → xlsx-util-OUxT4A8O.js} +1 -1
  6. package/es/common/index.mjs +2 -0
  7. package/es/common/pql-editor/components/index.d.ts +1 -0
  8. package/es/common/pql-editor/components/index.mjs +3 -0
  9. package/es/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.css +1 -0
  10. package/es/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.d.ts +28 -0
  11. package/es/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.mjs +49 -0
  12. package/es/common/pql-editor/pql-editor.css +1 -0
  13. package/es/common/pql-editor/pql-editor.d.ts +68 -0
  14. package/es/common/pql-editor/pql-editor.mjs +606 -0
  15. package/es/common/pql-editor/pql-editor.module.d.ts +47 -0
  16. package/es/common/pql-editor/pql-editor.module.mjs +176 -0
  17. package/es/common/pql-editor/utils/index.d.ts +15 -0
  18. package/es/common/pql-editor/utils/index.mjs +270 -0
  19. package/es/control/chart/chart.mjs +32 -19
  20. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  21. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.d.ts +8 -0
  22. package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +12 -2
  23. package/es/control/dashboard/portlet/report-portlet/index.d.ts +1 -0
  24. package/es/control/dashboard/portlet/report-portlet/report-portlet.d.ts +1 -0
  25. package/es/control/dashboard/portlet/report-portlet/report-portlet.mjs +10 -2
  26. package/es/control/grid/grid/grid.mjs +2 -2
  27. package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +4 -2
  28. package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +32 -2
  29. package/es/control/grid/grid-column/grid-field-column/index.d.ts +4 -0
  30. package/es/control/search-bar/filter-tree/filter-tree.css +1 -1
  31. package/es/control/search-bar/filter-tree/filter-tree.d.ts +30 -3
  32. package/es/control/search-bar/filter-tree/filter-tree.mjs +83 -9
  33. package/es/control/search-bar/search-bar.mjs +10 -1
  34. package/es/editor/array/ibiz-array/ibiz-array.d.ts +1 -1
  35. package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.d.ts +1 -1
  36. package/es/editor/carousel/ibiz-carousel/ibiz-carousel.d.ts +1 -1
  37. package/es/editor/cascader/ibiz-cascader/ibiz-cascader.d.ts +1 -1
  38. package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.d.ts +1 -1
  39. package/es/editor/check-box-list/checkbox-list-editor.controller.d.ts +7 -0
  40. package/es/editor/check-box-list/checkbox-list-editor.controller.mjs +11 -0
  41. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.css +1 -1
  42. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.d.ts +1 -1
  43. package/es/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.mjs +2 -1
  44. package/es/editor/code/monaco-editor/monaco-editor.d.ts +1 -1
  45. package/es/editor/color-picker/ibiz-color-picker/ibiz-color-picker.d.ts +1 -1
  46. package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.d.ts +1 -1
  47. package/es/editor/data-picker/ibiz-picker/ibiz-picker.d.ts +1 -1
  48. package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.d.ts +1 -1
  49. package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.d.ts +1 -1
  50. package/es/editor/data-picker/ibiz-picker-link/ibiz-picker-link.d.ts +1 -1
  51. package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.d.ts +1 -1
  52. package/es/editor/date-picker/ibiz-date-picker/ibiz-date-picker.d.ts +1 -1
  53. package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.d.ts +1 -1
  54. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.d.ts +1 -1
  55. package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +1 -1
  56. package/es/editor/dropdown-list/ibiz-emoji-picker/ibiz-emoji-picker.d.ts +1 -1
  57. package/es/editor/html/wang-editor/wang-editor.d.ts +1 -1
  58. package/es/editor/list-box/ibiz-list-box/ibiz-list-box.d.ts +1 -1
  59. package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.d.ts +1 -1
  60. package/es/editor/preset/preset-rawitem/ibiz-preset-rawitem/ibiz-preset-rawitem.d.ts +1 -1
  61. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
  62. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.d.ts +1 -1
  63. package/es/editor/radio-button-list/ibiz-radio/ibiz-radio.mjs +2 -1
  64. package/es/editor/radio-button-list/radio-button-list.controller.d.ts +8 -0
  65. package/es/editor/radio-button-list/radio-button-list.controller.mjs +23 -0
  66. package/es/editor/rate/ibiz-rate/ibiz-rate.d.ts +1 -1
  67. package/es/editor/raw/ibiz-raw/ibiz-raw.d.ts +1 -1
  68. package/es/editor/slider/ibiz-slider/ibiz-slider.d.ts +1 -1
  69. package/es/editor/span/span/span.css +1 -1
  70. package/es/editor/span/span/span.d.ts +1 -1
  71. package/es/editor/span/span/span.mjs +2 -1
  72. package/es/editor/span/span-link/span-link.d.ts +1 -1
  73. package/es/editor/stepper/ibiz-stepper/ibiz-stepper.d.ts +1 -1
  74. package/es/editor/switch/ibiz-switch/ibiz-switch.d.ts +1 -1
  75. package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.d.ts +1 -1
  76. package/es/editor/text-box/ibiz-input-number/ibiz-input-number.d.ts +1 -1
  77. package/es/editor/text-box/input/input.d.ts +1 -1
  78. package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -1
  79. package/es/editor/upload/ibiz-image-preview/ibiz-image-preview.d.ts +1 -1
  80. package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +1 -1
  81. package/es/editor/user/ibiz-searchcond-edit/ibiz-searchcond-edit.d.ts +1 -1
  82. package/es/interface/i-pql-item.d.ts +52 -0
  83. package/es/interface/i-pql-item.mjs +1 -0
  84. package/es/interface/i-pql-node.d.ts +37 -0
  85. package/es/interface/i-pql-node.mjs +1 -0
  86. package/es/interface/i-schema-field.d.ts +51 -0
  87. package/es/interface/i-schema-field.mjs +1 -0
  88. package/es/interface/index.d.ts +3 -0
  89. package/es/interface/index.mjs +5 -0
  90. package/lib/common/index.cjs +2 -0
  91. package/lib/common/pql-editor/components/index.cjs +7 -0
  92. package/lib/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.cjs +51 -0
  93. package/lib/common/pql-editor/components/pql-editor-suggestion/pql-editor-suggestion.css +1 -0
  94. package/lib/common/pql-editor/pql-editor.cjs +608 -0
  95. package/lib/common/pql-editor/pql-editor.css +1 -0
  96. package/lib/common/pql-editor/pql-editor.module.cjs +182 -0
  97. package/lib/common/pql-editor/utils/index.cjs +280 -0
  98. package/lib/control/chart/chart.cjs +31 -18
  99. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +12 -2
  100. package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
  101. package/lib/control/dashboard/portlet/report-portlet/report-portlet.cjs +9 -1
  102. package/lib/control/grid/grid/grid.cjs +2 -2
  103. package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +32 -2
  104. package/lib/control/search-bar/filter-tree/filter-tree.cjs +82 -8
  105. package/lib/control/search-bar/filter-tree/filter-tree.css +1 -1
  106. package/lib/control/search-bar/search-bar.cjs +10 -1
  107. package/lib/editor/check-box-list/checkbox-list-editor.controller.cjs +11 -0
  108. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.cjs +2 -1
  109. package/lib/editor/check-box-list/ibiz-checkbox-list/ibiz-checkbox-list.css +1 -1
  110. package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +1 -1
  111. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.cjs +2 -1
  112. package/lib/editor/radio-button-list/ibiz-radio/ibiz-radio.css +1 -1
  113. package/lib/editor/radio-button-list/radio-button-list.controller.cjs +23 -0
  114. package/lib/editor/span/span/span.cjs +2 -1
  115. package/lib/editor/span/span/span.css +1 -1
  116. package/lib/interface/i-pql-item.cjs +3 -0
  117. package/lib/interface/i-pql-node.cjs +3 -0
  118. package/lib/interface/i-schema-field.cjs +3 -0
  119. package/lib/interface/index.cjs +7 -0
  120. package/package.json +6 -6
  121. package/dist/chart-J-0VPQfg.js +0 -1
  122. package/dist/index-5Hb8nfPm.js +0 -4
@@ -0,0 +1,182 @@
1
+ 'use strict';
2
+
3
+ var editor = require('@wangeditor/editor');
4
+ require('../../node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/index.cjs');
5
+ var index = require('./utils/index.cjs');
6
+ var h = require('../../node_modules/.pnpm/snabbdom@3.5.1/node_modules/snabbdom/build/h.cjs');
7
+
8
+ "use strict";
9
+ const pqlType = [
10
+ "pql-field",
11
+ "pql-field-value",
12
+ "pql-field-operator",
13
+ "pql-field-connection"
14
+ ];
15
+ function withPqlPlugin(editor$1) {
16
+ var _a;
17
+ const { isVoid, isInline, deleteBackward, deleteFragment, insertText } = editor$1;
18
+ const newEditor = editor$1;
19
+ const config = newEditor.getConfig();
20
+ const pql = (_a = config.EXTEND_CONF) == null ? void 0 : _a.pql;
21
+ let timer;
22
+ const updateCursor = () => {
23
+ var _a2;
24
+ const { selection } = editor$1;
25
+ if (selection && ((_a2 = selection.focus) == null ? void 0 : _a2.offset) === 0) {
26
+ const node = editor.SlateEditor.node(editor$1, selection)[0];
27
+ if (node) {
28
+ const el = editor$1.toDOMNode(node);
29
+ if (index.isMove(el)) {
30
+ editor$1.move(1);
31
+ }
32
+ }
33
+ }
34
+ };
35
+ newEditor.isVoid = (el) => {
36
+ const type = editor.DomEditor.getNodeType(el);
37
+ if (pqlType.includes(type)) {
38
+ return true;
39
+ }
40
+ return isVoid(el);
41
+ };
42
+ newEditor.isInline = (el) => {
43
+ const type = editor.DomEditor.getNodeType(el);
44
+ if (pqlType.includes(type)) {
45
+ return true;
46
+ }
47
+ return isInline(el);
48
+ };
49
+ newEditor.deleteBackward = (unit) => {
50
+ deleteBackward(unit);
51
+ if (pql && pql.showSuggestion) {
52
+ window.clearTimeout(timer);
53
+ timer = window.setTimeout(() => {
54
+ updateCursor();
55
+ pql.showSuggestion();
56
+ }, 10);
57
+ }
58
+ };
59
+ newEditor.deleteFragment = (direction) => {
60
+ deleteFragment(direction);
61
+ if (pql && pql.showSuggestion) {
62
+ window.clearTimeout(timer);
63
+ timer = window.setTimeout(() => {
64
+ updateCursor();
65
+ pql.showSuggestion();
66
+ }, 10);
67
+ }
68
+ };
69
+ newEditor.insertText = (text) => {
70
+ insertText(text);
71
+ if (pql && pql.showSuggestion) {
72
+ window.clearTimeout(timer);
73
+ timer = window.setTimeout(() => {
74
+ pql.showSuggestion();
75
+ }, 10);
76
+ }
77
+ };
78
+ return newEditor;
79
+ }
80
+ function renderPqlElement(el) {
81
+ const { type, label = "" } = el;
82
+ if (type === "pql-field-operator" || type === "pql-field-connection") {
83
+ return h.h(
84
+ "span",
85
+ {
86
+ props: {
87
+ contentEditable: false
88
+ },
89
+ style: {
90
+ display: "inline-block",
91
+ lineHeight: "22px"
92
+ }
93
+ },
94
+ [label]
95
+ );
96
+ }
97
+ if (type === "pql-field-value") {
98
+ return h.h(
99
+ "span",
100
+ {
101
+ props: {
102
+ contentEditable: false
103
+ },
104
+ style: {
105
+ display: "inline-block",
106
+ lineHeight: "22px",
107
+ color: "#5dcfff"
108
+ }
109
+ },
110
+ [label]
111
+ );
112
+ }
113
+ const vNode = h.h(
114
+ "span",
115
+ {
116
+ props: {
117
+ contentEditable: false
118
+ },
119
+ style: {
120
+ color: "#6698ff",
121
+ backgroundColor: "#edf2fd",
122
+ display: "inline-block",
123
+ padding: "0 5px",
124
+ borderRadius: "3px",
125
+ lineHeight: "22px"
126
+ }
127
+ },
128
+ [label]
129
+ );
130
+ return vNode;
131
+ }
132
+ function pqlToHtml(el) {
133
+ const type = el.type || "";
134
+ if (!type) {
135
+ return el.text || "";
136
+ }
137
+ const html = '<span\n data-pql="true"\n data-w-e-type="'.concat(type, '"\n data-w-e-is-void\n data-w-e-is-inline\n data-label="').concat(el.label || "", '"\n data-value="').concat(el.value || "", '"\n ></span>');
138
+ return html;
139
+ }
140
+ function parsePqlHtml(domElem) {
141
+ const type = domElem.getAttribute("data-w-e-type") || "";
142
+ const label = domElem.getAttribute("data-label") || "";
143
+ const value = domElem.getAttribute("data-value") || "";
144
+ if (type) {
145
+ return {
146
+ type,
147
+ label,
148
+ value,
149
+ children: [{ text: "" }]
150
+ };
151
+ }
152
+ return {
153
+ children: [{ text: "" }]
154
+ };
155
+ }
156
+ const PqlModule = {
157
+ editorPlugin: withPqlPlugin,
158
+ renderElems: pqlType.map((type) => {
159
+ return {
160
+ type,
161
+ renderElem: renderPqlElement
162
+ };
163
+ }),
164
+ elemsToHtml: pqlType.map((type) => {
165
+ return {
166
+ type,
167
+ elemToHtml: pqlToHtml
168
+ };
169
+ }),
170
+ parseElemsHtml: [
171
+ {
172
+ selector: 'span[data-pql="true"]',
173
+ parseElemHtml: parsePqlHtml
174
+ }
175
+ ]
176
+ };
177
+
178
+ exports.PqlModule = PqlModule;
179
+ exports.parsePqlHtml = parsePqlHtml;
180
+ exports.pqlToHtml = pqlToHtml;
181
+ exports.renderPqlElement = renderPqlElement;
182
+ exports.withPqlPlugin = withPqlPlugin;
@@ -0,0 +1,280 @@
1
+ 'use strict';
2
+
3
+ var core = require('@ibiz-template/core');
4
+ var runtime = require('@ibiz-template/runtime');
5
+
6
+ "use strict";
7
+ const FilterModes = [
8
+ { valueOP: runtime.ValueOP.EQ, label: "\u7B49\u4E8E", sqlOP: "=" },
9
+ { valueOP: runtime.ValueOP.NOT_EQ, label: "\u4E0D\u7B49\u4E8E", sqlOP: "<>" },
10
+ { valueOP: runtime.ValueOP.GT, label: "\u5927\u4E8E", sqlOP: ">" },
11
+ { valueOP: runtime.ValueOP.GT_AND_EQ, label: "\u5927\u4E8E\u7B49\u4E8E", sqlOP: ">=" },
12
+ { valueOP: runtime.ValueOP.LT, label: "\u5C0F\u4E8E", sqlOP: "<" },
13
+ { valueOP: runtime.ValueOP.LT_AND_EQ, label: "\u5C0F\u4E8E\u7B49\u4E8E", sqlOP: "<=" },
14
+ { valueOP: runtime.ValueOP.IS_NULL, label: "\u4E3A\u7A7A", sqlOP: "Nil" },
15
+ { valueOP: runtime.ValueOP.IS_NOT_NULL, label: "\u975E\u7A7A", sqlOP: "NotNil" },
16
+ { valueOP: runtime.ValueOP.IN, label: "\u5C5E\u4E8E", sqlOP: "In" },
17
+ { valueOP: runtime.ValueOP.NOT_IN, label: "\u4E0D\u5C5E\u4E8E", sqlOP: "NotIn" },
18
+ { valueOP: runtime.ValueOP.LIKE, label: "\u6587\u672C\u5305\u542B", sqlOP: "%" },
19
+ { valueOP: runtime.ValueOP.LIFT_LIKE, label: "\u6587\u672C\u5DE6\u5305\u542B", sqlOP: "%#" },
20
+ { valueOP: runtime.ValueOP.RIGHT_LIKE, label: "\u6587\u672C\u53F3\u5305\u542B", sqlOP: "#%" },
21
+ { valueOP: runtime.ValueOP.EXISTS, label: "\u5B58\u5728", sqlOP: "EXISTS" },
22
+ { valueOP: runtime.ValueOP.NOT_EXISTS, label: "\u4E0D\u5B58\u5728", sqlOP: "NOTEXISTS" }
23
+ ];
24
+ const ExcludeOPs = [
25
+ runtime.ValueOP.IS_NULL,
26
+ runtime.ValueOP.IS_NOT_NULL,
27
+ runtime.ValueOP.EXISTS,
28
+ runtime.ValueOP.NOT_EXISTS
29
+ ];
30
+ const filterModeMap = /* @__PURE__ */ new Map();
31
+ FilterModes.forEach((mode) => {
32
+ filterModeMap.set(mode.valueOP, mode);
33
+ });
34
+ const symbolMap = /* @__PURE__ */ new Map();
35
+ FilterModes.forEach((mode) => {
36
+ symbolMap.set(mode.sqlOP, mode.valueOP);
37
+ });
38
+ const generateItems = (children) => {
39
+ if (!children.length) {
40
+ return [];
41
+ }
42
+ const items = [];
43
+ for (let i = 0; i < children.length; i++) {
44
+ if (i !== 0) {
45
+ const connection = children[i];
46
+ if (connection && connection.type === "pql-field-connection") {
47
+ if (i === children.length - 1) {
48
+ throw new core.RuntimeError("pql\u8282\u70B9\u89E3\u6790\u9519\u8BEF");
49
+ }
50
+ items.push({
51
+ type: "connection",
52
+ value: {
53
+ label: connection.label,
54
+ value: connection.value
55
+ }
56
+ });
57
+ } else {
58
+ throw new core.RuntimeError("pql\u8282\u70B9\u89E3\u6790\u9519\u8BEF");
59
+ }
60
+ }
61
+ const key = children[i !== 0 ? ++i : i];
62
+ const operator = children[++i];
63
+ if (key && operator && key.type === "pql-field" && operator.type === "pql-field-operator") {
64
+ if (operator.value && ExcludeOPs.includes(operator.value)) {
65
+ items.push({
66
+ type: "condition",
67
+ key: {
68
+ label: key.label,
69
+ value: key.value
70
+ },
71
+ operator: {
72
+ label: operator.label,
73
+ value: operator.value
74
+ }
75
+ });
76
+ continue;
77
+ } else {
78
+ const value = children[++i];
79
+ if (value && (value.type === "pql-field-value" || value.text)) {
80
+ items.push({
81
+ type: "condition",
82
+ key: {
83
+ label: key.label,
84
+ value: key.value
85
+ },
86
+ operator: {
87
+ label: operator.label,
88
+ value: operator.value
89
+ },
90
+ value: {
91
+ label: value.type === "pql-field-value" ? value.label : value.text,
92
+ value: value.type === "pql-field-value" ? value.value : value.text
93
+ }
94
+ });
95
+ continue;
96
+ }
97
+ }
98
+ }
99
+ throw new core.RuntimeError("pql\u8282\u70B9\u89E3\u6790\u9519\u8BEF");
100
+ }
101
+ return items;
102
+ };
103
+ const generateCustomCond = (items, fields) => {
104
+ const map = /* @__PURE__ */ new Map();
105
+ fields.forEach((item) => {
106
+ map.set(item.appDEFieldId, item);
107
+ });
108
+ let cond = "";
109
+ items.forEach((item) => {
110
+ var _a, _b, _c;
111
+ if (item.type === "condition") {
112
+ const { key, operator, value } = item;
113
+ const symbol = (_a = filterModeMap.get(operator == null ? void 0 : operator.value)) == null ? void 0 : _a.sqlOP;
114
+ cond += "$".concat(JSON.stringify({
115
+ name: (key == null ? void 0 : key.value) || "",
116
+ caption: (key == null ? void 0 : key.label) || ""
117
+ }), " ").concat(symbol, " $").concat(JSON.stringify({
118
+ value: (value == null ? void 0 : value.value) || "",
119
+ caption: (value == null ? void 0 : value.label) || "",
120
+ field: "".concat(((_b = map.get((key == null ? void 0 : key.value) || "")) == null ? void 0 : _b.appDataEntityFullTag) || "", ".").concat((key == null ? void 0 : key.value) || "")
121
+ }));
122
+ }
123
+ if (item.type === "connection") {
124
+ cond += " ".concat((_c = item.value) == null ? void 0 : _c.value, " ");
125
+ }
126
+ });
127
+ return cond;
128
+ };
129
+ const parseCustomCond = (cond) => {
130
+ var _a;
131
+ try {
132
+ const items = cond.split(" ");
133
+ const pqlItems = [];
134
+ for (let i = 0; i < items.length; i++) {
135
+ if (i !== 0) {
136
+ const connection = items[i];
137
+ if (connection === "and" || connection === "or") {
138
+ if (i === items.length - 1) {
139
+ throw new core.RuntimeError("pql\u81EA\u5B9A\u4E49\u6761\u4EF6\u89E3\u6790\u9519\u8BEF");
140
+ }
141
+ pqlItems.push({
142
+ type: "connection",
143
+ value: {
144
+ label: connection,
145
+ value: connection
146
+ }
147
+ });
148
+ } else {
149
+ throw new core.RuntimeError("pql\u81EA\u5B9A\u4E49\u6761\u4EF6\u89E3\u6790\u9519\u8BEF");
150
+ }
151
+ }
152
+ const key = items[i !== 0 ? ++i : i];
153
+ const operator = items[++i];
154
+ const value = items[++i];
155
+ if (key && /^\$/.test(key) && operator && value && /^\$/.test(value)) {
156
+ const keyObj = JSON.parse(key.slice(1));
157
+ const valueObj = JSON.parse(value.slice(1));
158
+ pqlItems.push({
159
+ type: "condition",
160
+ key: {
161
+ label: keyObj.caption,
162
+ value: keyObj.name
163
+ },
164
+ operator: {
165
+ label: ((_a = filterModeMap.get(symbolMap.get(operator))) == null ? void 0 : _a.label) || "",
166
+ value: symbolMap.get(operator)
167
+ },
168
+ value: {
169
+ label: valueObj.caption,
170
+ value: valueObj.value
171
+ }
172
+ });
173
+ continue;
174
+ }
175
+ throw new core.RuntimeError("pql\u81EA\u5B9A\u4E49\u6761\u4EF6\u89E3\u6790\u9519\u8BEF");
176
+ }
177
+ return pqlItems;
178
+ } catch (err) {
179
+ ibiz.log.error(err == null ? void 0 : err.message);
180
+ }
181
+ };
182
+ const pqlItemsToPqlNodes = async (items, fields, getCodeListItems) => {
183
+ const nodes = [];
184
+ const codeListMap = /* @__PURE__ */ new Map();
185
+ const fieldList = fields.filter(
186
+ (child) => items.some((item) => {
187
+ var _a;
188
+ return ((_a = item.key) == null ? void 0 : _a.value) === child.appDEFieldId;
189
+ })
190
+ );
191
+ await Promise.all(
192
+ fieldList.map(async (item) => {
193
+ if (item.appCodeListId) {
194
+ const codeItems = await getCodeListItems(item.appCodeListId);
195
+ if (codeItems) {
196
+ codeListMap.set(item.appDEFieldId, codeItems);
197
+ }
198
+ }
199
+ })
200
+ );
201
+ items.forEach((item) => {
202
+ var _a, _b;
203
+ if (item.type === "condition") {
204
+ const { key, operator, value } = item;
205
+ nodes.push({
206
+ type: "pql-field",
207
+ label: key == null ? void 0 : key.label,
208
+ value: key == null ? void 0 : key.value
209
+ });
210
+ nodes.push({
211
+ type: "pql-field-operator",
212
+ label: operator == null ? void 0 : operator.label,
213
+ value: operator == null ? void 0 : operator.value
214
+ });
215
+ const field = fields.find((child) => child.appDEFieldId === (key == null ? void 0 : key.value));
216
+ if (field && field.appCodeListId) {
217
+ const codeItems = codeListMap.get(field.appDEFieldId);
218
+ const codeItem = codeItems == null ? void 0 : codeItems.find((child) => child.value === (value == null ? void 0 : value.value));
219
+ if (codeItem) {
220
+ nodes.push({
221
+ type: "pql-field-value",
222
+ label: value == null ? void 0 : value.label,
223
+ value: value == null ? void 0 : value.value
224
+ });
225
+ } else {
226
+ nodes.push({
227
+ text: value == null ? void 0 : value.value
228
+ });
229
+ }
230
+ } else {
231
+ nodes.push({
232
+ text: value == null ? void 0 : value.value
233
+ });
234
+ }
235
+ }
236
+ if (item.type === "connection") {
237
+ nodes.push({
238
+ type: "pql-field-connection",
239
+ label: (_a = item.value) == null ? void 0 : _a.label,
240
+ value: (_b = item.value) == null ? void 0 : _b.value
241
+ });
242
+ }
243
+ });
244
+ return nodes;
245
+ };
246
+ const pqlNodeToHtml = (node) => {
247
+ const type = node.type || "";
248
+ if (!type) {
249
+ return node.text || "";
250
+ }
251
+ const html = '<span\n data-pql="true"\n data-w-e-type="'.concat(type, '"\n data-w-e-is-void\n data-w-e-is-inline\n data-label="').concat(node.label || "", '"\n data-value="').concat(node.value || "", '"\n ></span>');
252
+ return html;
253
+ };
254
+ const pqlNodesToHtml = (nodes) => {
255
+ let html = "<p>";
256
+ nodes.forEach((node) => {
257
+ html += pqlNodeToHtml(node);
258
+ });
259
+ html += "</p>";
260
+ return html;
261
+ };
262
+ function isMove(el) {
263
+ if (!el) {
264
+ return false;
265
+ }
266
+ if (el.getAttribute("data-slate-node") === "element" && el.getAttribute("data-slate-inline") && el.getAttribute("data-slate-void")) {
267
+ return true;
268
+ }
269
+ return isMove(el.parentElement);
270
+ }
271
+
272
+ exports.ExcludeOPs = ExcludeOPs;
273
+ exports.FilterModes = FilterModes;
274
+ exports.generateCustomCond = generateCustomCond;
275
+ exports.generateItems = generateItems;
276
+ exports.isMove = isMove;
277
+ exports.parseCustomCond = parseCustomCond;
278
+ exports.pqlItemsToPqlNodes = pqlItemsToPqlNodes;
279
+ exports.pqlNodeToHtml = pqlNodeToHtml;
280
+ exports.pqlNodesToHtml = pqlNodesToHtml;
@@ -60,7 +60,6 @@ const ChartControl = /* @__PURE__ */ vue.defineComponent({
60
60
  const showCheck = vue.ref(false);
61
61
  const drillDetailPos = vue.ref({});
62
62
  const drillDetailRef = vue.ref();
63
- let func;
64
63
  let tempParams;
65
64
  const initSimpleData = () => {
66
65
  if (!props.data) {
@@ -100,16 +99,32 @@ const ChartControl = /* @__PURE__ */ vue.defineComponent({
100
99
  const computedDrillDetailPos = (params) => {
101
100
  if (params.event) {
102
101
  const event = params.event.event;
103
- event.stopPropagation();
104
- event.preventDefault();
105
102
  const {
106
103
  offsetX,
107
104
  offsetY
108
105
  } = params.event;
109
- drillDetailPos.value = {
110
- top: "".concat(offsetY, "px"),
111
- left: "".concat(offsetX + 16, "px")
112
- };
106
+ const {
107
+ clientWidth
108
+ } = event.target;
109
+ if (offsetX + 160 > clientWidth) {
110
+ drillDetailPos.value = {
111
+ top: "".concat(offsetY - 20, "px"),
112
+ left: "".concat(offsetX - 160, "px")
113
+ };
114
+ } else {
115
+ drillDetailPos.value = {
116
+ top: "".concat(offsetY, "px"),
117
+ left: "".concat(offsetX + 16, "px")
118
+ };
119
+ }
120
+ }
121
+ };
122
+ const setDrillState = () => {
123
+ showCheck.value = false;
124
+ };
125
+ const setTipState = () => {
126
+ if (!showCheck.value) {
127
+ c.changeTooltipState(true);
113
128
  }
114
129
  };
115
130
  let resizeObserver;
@@ -118,6 +133,8 @@ const ChartControl = /* @__PURE__ */ vue.defineComponent({
118
133
  const chart = echarts.init(chartRef.value);
119
134
  c.initChart(chart);
120
135
  window.addEventListener("resize", setHeight);
136
+ window.addEventListener("pointerdown", setDrillState);
137
+ window.addEventListener("click", setTipState);
121
138
  if (chartRef.value && ResizeObserver) {
122
139
  resizeObserver = new ResizeObserver(() => {
123
140
  c.resizeChart();
@@ -139,25 +156,19 @@ const ChartControl = /* @__PURE__ */ vue.defineComponent({
139
156
  return;
140
157
  }
141
158
  tempParams = params;
159
+ computedDrillDetailPos(params);
142
160
  chart.dispatchAction({
143
161
  type: "hideTip"
144
162
  });
145
- showCheck.value = true;
146
163
  c.changeTooltipState(false);
147
- func = vue3Util.useClickOutside(drillDetailRef, () => {
148
- showCheck.value = false;
149
- c.changeTooltipState(true);
150
- func.stop();
151
- });
152
- computedDrillDetailPos(params);
164
+ showCheck.value = true;
153
165
  });
154
166
  }
155
167
  });
156
168
  const openDrillDetail = (_event) => {
169
+ _event.stopPropagation();
170
+ _event.preventDefault();
157
171
  showCheck.value = false;
158
- if (func) {
159
- func.stop();
160
- }
161
172
  c.changeTooltipState(true);
162
173
  const param = c.computedDrillDetailParam(tempParams);
163
174
  emit("drillDetail", param);
@@ -190,6 +201,8 @@ const ChartControl = /* @__PURE__ */ vue.defineComponent({
190
201
  };
191
202
  vue.onBeforeUnmount(() => {
192
203
  window.removeEventListener("resize", setHeight);
204
+ window.removeEventListener("pointerdown", setDrillState);
205
+ window.removeEventListener("click", setTipState);
193
206
  resizeObserver == null ? void 0 : resizeObserver.disconnect();
194
207
  });
195
208
  return {
@@ -227,7 +240,7 @@ const ChartControl = /* @__PURE__ */ vue.defineComponent({
227
240
  "ref": "drillDetailRef",
228
241
  "class": this.ns.e("drill-detail"),
229
242
  "style": this.drillDetailPos,
230
- "onClick": this.openDrillDetail
243
+ "onPointerdown": this.openDrillDetail
231
244
  }, [vue.createVNode("div", {
232
245
  "class": this.ns.em("drill-detail", "item")
233
246
  }, [vue.createVNode("svg", {
@@ -13,6 +13,9 @@ const PortletLayout = /* @__PURE__ */ vue.defineComponent({
13
13
  controller: {
14
14
  type: runtime.PortletPartController,
15
15
  required: true
16
+ },
17
+ linkAction: {
18
+ type: Object
16
19
  }
17
20
  },
18
21
  setup(props) {
@@ -34,13 +37,19 @@ const PortletLayout = /* @__PURE__ */ vue.defineComponent({
34
37
  const onActionClick = async (detail, event) => {
35
38
  await props.controller.onActionClick(detail, event);
36
39
  };
40
+ const openLink = (event) => {
41
+ if (props.linkAction) {
42
+ props.controller.onActionClick(props.linkAction, event);
43
+ }
44
+ };
37
45
  return {
38
46
  c,
39
47
  ns,
40
48
  popperClass,
41
49
  portletType,
42
50
  isShowHeader,
43
- onActionClick
51
+ onActionClick,
52
+ openLink
44
53
  };
45
54
  },
46
55
  render() {
@@ -57,7 +66,8 @@ const PortletLayout = /* @__PURE__ */ vue.defineComponent({
57
66
  }, [vue.createVNode("div", {
58
67
  "class": this.ns.be("header", "left")
59
68
  }, [model.showTitleBar && vue.createVNode("div", {
60
- "class": this.ns.e("caption")
69
+ "class": [this.ns.e("caption"), this.ns.is("link", !!this.linkAction)],
70
+ "onClick": this.openLink
61
71
  }, [vue.createVNode(vue.resolveComponent("iBizIcon"), {
62
72
  "class": this.ns.e("caption-icon"),
63
73
  "icon": model.sysImage
@@ -1 +1 @@
1
- .ibiz-portlet-layout{--ibiz-portlet-layout-bg-color:transparent;--ibiz-portlet-layout-header-height:50px;--ibiz-portlet-layout-header-padding:calc(var(--ibiz-spacing-base-tight) + 2px) var(--ibiz-spacing-base);--ibiz-portlet-layout-header-margin:var(--ibiz-spacing-none);--ibiz-portlet-layout-header-bg-color:var(--ibiz-color-bg-1);--ibiz-portlet-layout-header-border-bottom:var(--ibiz-border);--ibiz-portlet-layout-caption-max-width:300px;--ibiz-portlet-layout-caption-font-weight:var(--ibiz-font-weight-regular);--ibiz-portlet-layout-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-portlet-layout-caption-color:var(--ibiz-text-color-primary);--ibiz-portlet-layout-content-bg-color:var(--ibiz-color-bg-1);--ibiz-portlet-layout-content-padding:var(--ibiz-spacing-none);--ibiz-portlet-layout-content-margin:var(--ibiz-spacing-none);--ibiz-portlet-layout-padding:var(--ibiz-spacing-tight);width:100%;height:100%;padding:var(--ibiz-portlet-layout-padding);background-color:var(--ibiz-portlet-layout-bg-color)}.ibiz-portlet-layout__caption{max-width:var(--ibiz-portlet-layout-caption-max-width);height:100%;padding:var(--ibiz-spacing-none) var(--ibiz-spacing-none) var(--ibiz-spacing-none) var(--ibiz-spacing-base)}.ibiz-portlet-layout__caption-text{font-size:var(--ibiz-portlet-layout-caption-font-size);font-weight:var(--ibiz-portlet-layout-caption-font-weight);line-height:var(--ibiz-portlet-layout-caption-font-size);color:var(--ibiz-portlet-layout-caption-color)}.ibiz-portlet-layout__caption::before{position:absolute;top:50%;left:0;width:4px;height:var(--ibiz-width-icon-large);content:"";background-color:var(--ibiz-color-primary);border-radius:var(--ibiz-border-radius-extra-small);transform:translateY(-50%)}.ibiz-portlet-layout.is-no-header>.ibiz-portlet-layout-content{height:100%}.ibiz-portlet-layout-header{display:flex;justify-content:space-between;height:var(--ibiz-portlet-layout-header-height);padding:var(--ibiz-portlet-layout-header-padding);margin:var(--ibiz-portlet-layout-header-margin);background-color:var(--ibiz-portlet-layout-header-bg-color);border-bottom:var(--ibiz-portlet-layout-header-border-bottom)}.ibiz-portlet-layout-header__left{position:relative}.ibiz-portlet-layout-content{height:calc(100% - var(--ibiz-portlet-layout-header-height));padding:var(--ibiz-portlet-layout-content-padding);margin:var(--ibiz-portlet-layout-content-margin);overflow-y:scroll;background-color:var(--ibiz-portlet-layout-content-bg-color)}
1
+ .ibiz-portlet-layout{--ibiz-portlet-layout-bg-color:transparent;--ibiz-portlet-layout-header-height:50px;--ibiz-portlet-layout-header-padding:calc(var(--ibiz-spacing-base-tight) + 2px) var(--ibiz-spacing-base);--ibiz-portlet-layout-header-margin:var(--ibiz-spacing-none);--ibiz-portlet-layout-header-bg-color:var(--ibiz-color-bg-1);--ibiz-portlet-layout-header-border-bottom:var(--ibiz-border);--ibiz-portlet-layout-caption-max-width:300px;--ibiz-portlet-layout-caption-font-weight:var(--ibiz-font-weight-regular);--ibiz-portlet-layout-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-portlet-layout-caption-color:var(--ibiz-text-color-primary);--ibiz-portlet-layout-content-bg-color:var(--ibiz-color-bg-1);--ibiz-portlet-layout-content-padding:var(--ibiz-spacing-none);--ibiz-portlet-layout-content-margin:var(--ibiz-spacing-none);--ibiz-portlet-layout-padding:var(--ibiz-spacing-tight);width:100%;height:100%;padding:var(--ibiz-portlet-layout-padding);background-color:var(--ibiz-portlet-layout-bg-color)}.ibiz-portlet-layout__caption{max-width:var(--ibiz-portlet-layout-caption-max-width);height:100%;padding:var(--ibiz-spacing-none) var(--ibiz-spacing-none) var(--ibiz-spacing-none) var(--ibiz-spacing-base)}.ibiz-portlet-layout__caption-text{font-size:var(--ibiz-portlet-layout-caption-font-size);font-weight:var(--ibiz-portlet-layout-caption-font-weight);line-height:var(--ibiz-portlet-layout-caption-font-size);color:var(--ibiz-portlet-layout-caption-color)}.ibiz-portlet-layout__caption::before{position:absolute;top:50%;left:0;width:4px;height:var(--ibiz-width-icon-large);content:"";background-color:var(--ibiz-color-primary);border-radius:var(--ibiz-border-radius-extra-small);transform:translateY(-50%)}.ibiz-portlet-layout__caption.is-link{cursor:pointer}.ibiz-portlet-layout__caption.is-link:hover{color:var(--ibiz-color-link)}.ibiz-portlet-layout.is-no-header>.ibiz-portlet-layout-content{height:100%}.ibiz-portlet-layout-header{display:flex;justify-content:space-between;height:var(--ibiz-portlet-layout-header-height);padding:var(--ibiz-portlet-layout-header-padding);margin:var(--ibiz-portlet-layout-header-margin);background-color:var(--ibiz-portlet-layout-header-bg-color);border-bottom:var(--ibiz-portlet-layout-header-border-bottom)}.ibiz-portlet-layout-header__left{position:relative}.ibiz-portlet-layout-content{height:calc(100% - var(--ibiz-portlet-layout-header-height));padding:var(--ibiz-portlet-layout-content-padding);margin:var(--ibiz-portlet-layout-content-margin);overflow-y:scroll;background-color:var(--ibiz-portlet-layout-content-bg-color)}
@@ -26,6 +26,12 @@ const ReportPortlet = /* @__PURE__ */ vue.defineComponent({
26
26
  const report = (_b = props.modelData.controls) == null ? void 0 : _b.find((item) => {
27
27
  return item.controlType === runtime.ControlType.REPORT_PANEL;
28
28
  });
29
+ const linkAction = vue.computed(() => {
30
+ const {
31
+ uiactionGroupDetails = []
32
+ } = props.controller.model.uiactionGroup || {};
33
+ return uiactionGroupDetails.find((x) => x.uiactionId && x.uiactionId.startsWith("bi_report_view"));
34
+ });
29
35
  let timerTag;
30
36
  vue.onMounted(() => {
31
37
  const timer = props.controller.model.timer;
@@ -40,7 +46,8 @@ const ReportPortlet = /* @__PURE__ */ vue.defineComponent({
40
46
  });
41
47
  return {
42
48
  ns,
43
- report
49
+ report,
50
+ linkAction
44
51
  };
45
52
  },
46
53
  render() {
@@ -52,6 +59,7 @@ const ReportPortlet = /* @__PURE__ */ vue.defineComponent({
52
59
  } = this.controller;
53
60
  return vue.createVNode(vue.resolveComponent("iBizPortletLayout"), {
54
61
  "controller": this.controller,
62
+ "linkAction": this.linkAction,
55
63
  "class": classArr
56
64
  }, _isSlot(_slot = vue.h(vue.resolveComponent("IBizControlShell"), {
57
65
  context,
@@ -336,7 +336,7 @@ const GridControl = /* @__PURE__ */ vue.defineComponent({
336
336
  "controller": this.c,
337
337
  "style": this.headerCssVars
338
338
  }, {
339
- default: () => [vue.createVNode(vue.resolveComponent("el-table"), {
339
+ default: () => [vue.createVNode(vue.resolveComponent("el-table"), vue.mergeProps({
340
340
  "ref": "tableRef",
341
341
  "class": this.ns.e("table"),
342
342
  "default-sort": this.defaultSort,
@@ -357,7 +357,7 @@ const GridControl = /* @__PURE__ */ vue.defineComponent({
357
357
  "onHeaderDragend": this.headerDragend,
358
358
  "tooltip-effect": "light",
359
359
  "scrollbar-always-on": true
360
- }, {
360
+ }, this.$attrs), {
361
361
  empty: this.renderNoData,
362
362
  default: () => {
363
363
  return [this.c.enableRowEditOrder && this.renderDragIconColumn(), !state.singleSelect && vue.createVNode(vue.resolveComponent("el-table-column"), {