@nokecy/qc-ui 0.8.5 → 0.8.7

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 (45) hide show
  1. package/README.md +23 -23
  2. package/dist/cjs/ag-grid-plus/_utils/boolSelect.js +5 -5
  3. package/dist/cjs/ag-grid-plus/ag-grid-theme-builder.css +350 -350
  4. package/dist/cjs/ag-grid-plus/index.less +6 -6
  5. package/dist/cjs/ag-grid-plus/queryForm/index.less +48 -48
  6. package/dist/cjs/ag-grid-plus/toolBar/index.js +4 -4
  7. package/dist/cjs/ag-grid-plus/utils.js +1 -1
  8. package/dist/cjs/dashboard/dashboard/components/toolbar/style/index.less +49 -49
  9. package/dist/cjs/dashboard/dashboard/index.less +173 -173
  10. package/dist/cjs/dashboard/dashboard/utils.js +4 -4
  11. package/dist/cjs/dashboard/utils.js +8 -8
  12. package/dist/cjs/dashboard/widget/index.less +7 -7
  13. package/dist/cjs/dashboard/widget/selector/index.less +172 -172
  14. package/dist/cjs/draggableModal/index.js +4 -4
  15. package/dist/cjs/draggableModal/style.less +16 -16
  16. package/dist/cjs/formDesigner/arrayTable/styles.less +2 -2
  17. package/dist/cjs/formDesigner/index.less +2 -2
  18. package/dist/cjs/index.d.ts +2 -1
  19. package/dist/cjs/index.js +7 -0
  20. package/dist/cjs/queryBuilder/index.d.ts +3 -0
  21. package/dist/cjs/queryBuilder/index.js +62 -0
  22. package/dist/cjs/toolBar/index.less +25 -25
  23. package/dist/esm/ag-grid-plus/_utils/boolSelect.js +5 -5
  24. package/dist/esm/ag-grid-plus/ag-grid-theme-builder.css +350 -350
  25. package/dist/esm/ag-grid-plus/index.less +6 -6
  26. package/dist/esm/ag-grid-plus/queryForm/index.less +48 -48
  27. package/dist/esm/ag-grid-plus/toolBar/index.js +4 -4
  28. package/dist/esm/ag-grid-plus/utils.js +1 -1
  29. package/dist/esm/dashboard/dashboard/components/toolbar/style/index.less +49 -49
  30. package/dist/esm/dashboard/dashboard/index.less +173 -173
  31. package/dist/esm/dashboard/dashboard/utils.js +4 -4
  32. package/dist/esm/dashboard/utils.js +8 -8
  33. package/dist/esm/dashboard/widget/index.less +7 -7
  34. package/dist/esm/dashboard/widget/selector/index.less +172 -172
  35. package/dist/esm/draggableModal/index.js +4 -4
  36. package/dist/esm/draggableModal/style.less +16 -16
  37. package/dist/esm/formDesigner/arrayTable/styles.less +2 -2
  38. package/dist/esm/formDesigner/index.less +2 -2
  39. package/dist/esm/index.d.ts +2 -1
  40. package/dist/esm/index.js +2 -1
  41. package/dist/esm/queryBuilder/index.d.ts +3 -0
  42. package/dist/esm/queryBuilder/index.js +53 -0
  43. package/dist/esm/toolBar/index.less +25 -25
  44. package/dist/umd/qc-ui.min.js +1 -1
  45. package/package.json +70 -65
@@ -1,172 +1,172 @@
1
- .react-dashboard-widget-selector{
2
- position:fixed;
3
- top:50%;
4
- left:50%;
5
- transform:translate(-50%, -50%);
6
- z-index:1006;
7
- width:60%;
8
- height:60%;
9
- max-width:800px;
10
- max-height:600px;
11
- background:var(--component-background);
12
- }
13
-
14
- .react-dashboard-widget-wrap {
15
- display: flex;
16
- height:100%;
17
-
18
- .react-dashboard-widget-leftBar {
19
- padding: 10px;
20
- width: 180px;
21
- border-right: 1px solid rgba(0, 0, 0, 0.1);
22
- background: var(--component-background);
23
- .react-dashboard-widget-searchIcon {
24
- color: var(--text-color);
25
- }
26
-
27
- .react-dashboard-widget-item {
28
- display: flex;
29
- justify-content: space-between;
30
- padding: 10px;
31
-
32
- .react-dashboard-widget-Badge {
33
-
34
- .ant-badge-count {
35
- color: var(--text-color);
36
- background-color: var(--component-background-1) !important;
37
- }
38
-
39
- }
40
-
41
- cursor: pointer;
42
-
43
- &:hover {
44
- background: var(--component-background-3);
45
- font-weight: bold;
46
- }
47
- }
48
-
49
- .react-dashboard-widget-active {
50
- background: rgba(0, 0, 0, 0.03);
51
- font-weight: bold;
52
- }
53
- }
54
-
55
- .react-dashboard-widget-Layer {
56
- flex: 1 1;
57
- overflow-y: auto;
58
- overflow-x: hidden;
59
- padding: 10px;
60
- background: rgba(0, 0, 0, 0.01);
61
- &::-webkit-scrollbar {
62
- width: 1px;
63
- height: 1px;
64
- overflow: auto;
65
- }
66
-
67
- &::-webkit-scrollbar-thumb {
68
- background-color: var(--primary-color);
69
- min-height: 25px;
70
- min-width: 25px;
71
-
72
- &:hover {
73
- background-color: #a8a8a8;
74
- }
75
-
76
- &:active {
77
- background-color: #787878;
78
- }
79
- }
80
-
81
- &::-webkit-scrollbar-track {
82
- background-color: #f7f7f7;
83
- border: 1px solid #efefef;
84
- }
85
-
86
- .react-dashboard-widget-waterfall {
87
- width: 100%;
88
- }
89
-
90
- .ant-popover-inner-content {
91
- background: rgba(0, 0, 0, 0.01);
92
- }
93
-
94
-
95
- .react-dashboard-widget-item {
96
- cursor: pointer;
97
- height: auto;
98
- margin-bottom: 10px;
99
- width: 100%;
100
- height: auto;
101
- border-radius: 5px;
102
- overflow: hidden;
103
- // box-shadow: 0 0 0px rgba(255, 255, 255, 1);
104
- transition: all 0.3s;
105
- border: 1px solid rgba(0, 0, 0, 0.1);
106
- -webkit-column-break-inside: avoid;
107
- position: relative;
108
- background: var(--component-background);
109
- .react-dashboard-widget-shortcut {
110
- width: 100%;
111
- height: auto;
112
- }
113
-
114
- .react-dashboard-widget-mask {
115
- opacity: 0;
116
- position: absolute;
117
- top: 0;
118
- left: 0;
119
- width: 100%;
120
- height: 100%;
121
- background: rgba(0, 0, 0, 0.5);
122
- display: flex;
123
- justify-content: center;
124
- align-items: center;
125
- transition: all 0.3s;
126
- }
127
-
128
- &:hover {
129
- transition: all 0.3s;
130
-
131
- border: 1px solid var(--component-background-3);
132
-
133
- .react-dashboard-widget-mask {
134
- opacity: 1;
135
- transition: all 0.3s;
136
- }
137
- }
138
-
139
- .react-dashboard-widget-bottombar {
140
- border-top: 1px solid rgba(0, 0, 0, 0.1);
141
- width: 100%;
142
-
143
- padding: 5px;
144
-
145
- .react-dashboard-widget-iconWrap {
146
- display: inline-block;
147
- width: 28px;
148
- height: 28px;
149
- line-height: 28px;
150
- text-align: center;
151
- border-radius: 7px;
152
- color: #fff;
153
- margin-right: 5px;
154
- font-size: 16px;
155
- }
156
-
157
- .react-dashboard-widget-name {
158
- font-size: 16px;
159
- flex: 1;
160
- color: var(--text-color);
161
- line-height: 28px;
162
- font-weight: bold;
163
- display: inline;
164
- }
165
-
166
- .react-dashboard-widget-description {
167
- margin-top: 5px;
168
- }
169
- }
170
- }
171
- }
172
- }
1
+ .react-dashboard-widget-selector{
2
+ position:fixed;
3
+ top:50%;
4
+ left:50%;
5
+ transform:translate(-50%, -50%);
6
+ z-index:1006;
7
+ width:60%;
8
+ height:60%;
9
+ max-width:800px;
10
+ max-height:600px;
11
+ background:var(--component-background);
12
+ }
13
+
14
+ .react-dashboard-widget-wrap {
15
+ display: flex;
16
+ height:100%;
17
+
18
+ .react-dashboard-widget-leftBar {
19
+ padding: 10px;
20
+ width: 180px;
21
+ border-right: 1px solid rgba(0, 0, 0, 0.1);
22
+ background: var(--component-background);
23
+ .react-dashboard-widget-searchIcon {
24
+ color: var(--text-color);
25
+ }
26
+
27
+ .react-dashboard-widget-item {
28
+ display: flex;
29
+ justify-content: space-between;
30
+ padding: 10px;
31
+
32
+ .react-dashboard-widget-Badge {
33
+
34
+ .ant-badge-count {
35
+ color: var(--text-color);
36
+ background-color: var(--component-background-1) !important;
37
+ }
38
+
39
+ }
40
+
41
+ cursor: pointer;
42
+
43
+ &:hover {
44
+ background: var(--component-background-3);
45
+ font-weight: bold;
46
+ }
47
+ }
48
+
49
+ .react-dashboard-widget-active {
50
+ background: rgba(0, 0, 0, 0.03);
51
+ font-weight: bold;
52
+ }
53
+ }
54
+
55
+ .react-dashboard-widget-Layer {
56
+ flex: 1 1;
57
+ overflow-y: auto;
58
+ overflow-x: hidden;
59
+ padding: 10px;
60
+ background: rgba(0, 0, 0, 0.01);
61
+ &::-webkit-scrollbar {
62
+ width: 1px;
63
+ height: 1px;
64
+ overflow: auto;
65
+ }
66
+
67
+ &::-webkit-scrollbar-thumb {
68
+ background-color: var(--primary-color);
69
+ min-height: 25px;
70
+ min-width: 25px;
71
+
72
+ &:hover {
73
+ background-color: #a8a8a8;
74
+ }
75
+
76
+ &:active {
77
+ background-color: #787878;
78
+ }
79
+ }
80
+
81
+ &::-webkit-scrollbar-track {
82
+ background-color: #f7f7f7;
83
+ border: 1px solid #efefef;
84
+ }
85
+
86
+ .react-dashboard-widget-waterfall {
87
+ width: 100%;
88
+ }
89
+
90
+ .ant-popover-inner-content {
91
+ background: rgba(0, 0, 0, 0.01);
92
+ }
93
+
94
+
95
+ .react-dashboard-widget-item {
96
+ cursor: pointer;
97
+ height: auto;
98
+ margin-bottom: 10px;
99
+ width: 100%;
100
+ height: auto;
101
+ border-radius: 5px;
102
+ overflow: hidden;
103
+ // box-shadow: 0 0 0px rgba(255, 255, 255, 1);
104
+ transition: all 0.3s;
105
+ border: 1px solid rgba(0, 0, 0, 0.1);
106
+ -webkit-column-break-inside: avoid;
107
+ position: relative;
108
+ background: var(--component-background);
109
+ .react-dashboard-widget-shortcut {
110
+ width: 100%;
111
+ height: auto;
112
+ }
113
+
114
+ .react-dashboard-widget-mask {
115
+ opacity: 0;
116
+ position: absolute;
117
+ top: 0;
118
+ left: 0;
119
+ width: 100%;
120
+ height: 100%;
121
+ background: rgba(0, 0, 0, 0.5);
122
+ display: flex;
123
+ justify-content: center;
124
+ align-items: center;
125
+ transition: all 0.3s;
126
+ }
127
+
128
+ &:hover {
129
+ transition: all 0.3s;
130
+
131
+ border: 1px solid var(--component-background-3);
132
+
133
+ .react-dashboard-widget-mask {
134
+ opacity: 1;
135
+ transition: all 0.3s;
136
+ }
137
+ }
138
+
139
+ .react-dashboard-widget-bottombar {
140
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
141
+ width: 100%;
142
+
143
+ padding: 5px;
144
+
145
+ .react-dashboard-widget-iconWrap {
146
+ display: inline-block;
147
+ width: 28px;
148
+ height: 28px;
149
+ line-height: 28px;
150
+ text-align: center;
151
+ border-radius: 7px;
152
+ color: #fff;
153
+ margin-right: 5px;
154
+ font-size: 16px;
155
+ }
156
+
157
+ .react-dashboard-widget-name {
158
+ font-size: 16px;
159
+ flex: 1;
160
+ color: var(--text-color);
161
+ line-height: 28px;
162
+ font-weight: bold;
163
+ display: inline;
164
+ }
165
+
166
+ .react-dashboard-widget-description {
167
+ margin-top: 5px;
168
+ }
169
+ }
170
+ }
171
+ }
172
+ }
@@ -11,10 +11,10 @@ import React, { useRef, useState } from 'react';
11
11
  import Draggable from 'react-draggable';
12
12
  import "./style.less";
13
13
 
14
- /**
15
- * 可拖拽Modal
16
- * @param props
17
- * @returns
14
+ /**
15
+ * 可拖拽Modal
16
+ * @param props
17
+ * @returns
18
18
  */
19
19
  var DraggableModal = function DraggableModal(props) {
20
20
  var _useState = useState(true),
@@ -1,16 +1,16 @@
1
- .modal-wrap-fullscreen {
2
- top: 0;
3
- margin: 0;
4
- width: 100%;
5
- max-width: 100%;
6
- height: 100vh;
7
- max-height: 100vh;
8
- padding: 0;
9
-
10
- :global {
11
- .acud-modal-content {
12
- height: 100%;
13
- border-radius: 0;
14
- }
15
- }
16
- }
1
+ .modal-wrap-fullscreen {
2
+ top: 0;
3
+ margin: 0;
4
+ width: 100%;
5
+ max-width: 100%;
6
+ height: 100vh;
7
+ max-height: 100vh;
8
+ padding: 0;
9
+
10
+ :global {
11
+ .acud-modal-content {
12
+ height: 100%;
13
+ border-radius: 0;
14
+ }
15
+ }
16
+ }
@@ -1,3 +1,3 @@
1
- .dn-array-table {
2
- background-color: #fff;
1
+ .dn-array-table {
2
+ background-color: #fff;
3
3
  }
@@ -1,3 +1,3 @@
1
- .dn-app {
2
- height: 100%;
1
+ .dn-app {
2
+ height: 100%;
3
3
  }
@@ -10,4 +10,5 @@ import ExtensibleGrid from "./extensible-grid";
10
10
  import { FormDesigner } from "./formDesigner";
11
11
  import { FormProLayout } from "./formPro";
12
12
  import { FormProContext } from "./formPro/context/formProContext";
13
- export { AgGridColumn, AgGridPlus, ArrayTable, ArrayTableIndex, Card, Dashboard, DialogSelect, DraggableModal, Editable, ExtensibleGrid, flattenTreeDeep, FormDesigner, FormProContext, FormProLayout, GridPlusContext, };
13
+ import QueryBuilder from "./queryBuilder";
14
+ export { AgGridColumn, AgGridPlus, ArrayTable, ArrayTableIndex, Card, Dashboard, DialogSelect, DraggableModal, Editable, ExtensibleGrid, flattenTreeDeep, FormDesigner, FormProContext, FormProLayout, GridPlusContext, QueryBuilder, };
package/dist/esm/index.js CHANGED
@@ -10,4 +10,5 @@ import ExtensibleGrid from "./extensible-grid";
10
10
  import { FormDesigner } from "./formDesigner";
11
11
  import { FormProLayout } from "./formPro";
12
12
  import { FormProContext } from "./formPro/context/formProContext";
13
- export { AgGridColumn, AgGridPlus, ArrayTable, ArrayTableIndex, Card, Dashboard, DialogSelect, DraggableModal, Editable, ExtensibleGrid, flattenTreeDeep, FormDesigner, FormProContext, FormProLayout, GridPlusContext };
13
+ import QueryBuilder from "./queryBuilder";
14
+ export { AgGridColumn, AgGridPlus, ArrayTable, ArrayTableIndex, Card, Dashboard, DialogSelect, DraggableModal, Editable, ExtensibleGrid, flattenTreeDeep, FormDesigner, FormProContext, FormProLayout, GridPlusContext, QueryBuilder };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const QueryBuilder: (props: any) => React.JSX.Element;
3
+ export default QueryBuilder;
@@ -0,0 +1,53 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import React from "react";
14
+ import { useControllableValue } from 'ahooks';
15
+ import { QueryBuilderDnD } from '@react-querybuilder/dnd';
16
+ import * as ReactDnD from 'react-dnd';
17
+ import * as ReactDndHtml5Backend from 'react-dnd-html5-backend';
18
+ import { defaultValidator, QueryBuilder as QueryBuilderReact } from 'react-querybuilder';
19
+ import { QueryBuilderAntD } from '@react-querybuilder/antd';
20
+ var QueryBuilder = function QueryBuilder(props) {
21
+ var fields = props.fields;
22
+ var _useControllableValue = useControllableValue(props),
23
+ _useControllableValue2 = _slicedToArray(_useControllableValue, 2),
24
+ state = _useControllableValue2[0],
25
+ setState = _useControllableValue2[1];
26
+ return /*#__PURE__*/React.createElement(QueryBuilderDnD, {
27
+ dnd: _objectSpread(_objectSpread({}, ReactDnD), ReactDndHtml5Backend)
28
+ }, /*#__PURE__*/React.createElement(QueryBuilderAntD, null, /*#__PURE__*/React.createElement(QueryBuilderReact, {
29
+ fields: fields,
30
+ query: state ? JSON.parse(state) : {
31
+ rules: []
32
+ },
33
+ onQueryChange: function onQueryChange(q) {
34
+ if (q.rules.length > 0) {
35
+ setState(JSON.stringify(q));
36
+ }
37
+ },
38
+ addRuleToNewGroups: true,
39
+ debugMode: true,
40
+ independentCombinators: true,
41
+ listsAsArrays: true,
42
+ resetOnOperatorChange: true,
43
+ showCloneButtons: true,
44
+ showCombinatorsBetweenRules: true,
45
+ showLockButtons: true,
46
+ showNotToggle: true,
47
+ validator: defaultValidator,
48
+ controlClassnames: {
49
+ queryBuilder: 'queryBuilder-branches'
50
+ }
51
+ })));
52
+ };
53
+ export default QueryBuilder;
@@ -1,25 +1,25 @@
1
- .antd-tool-bar {
2
- display: flex;
3
- align-items: center;
4
- box-sizing: border-box;
5
- width: 100%;
6
- color: rgba(0, 0, 0, 0.88);
7
- line-height: 40px;
8
- background-color: rgba(255, 255, 255);
9
- -webkit-backdrop-filter: blur(8px);
10
- backdrop-filter: blur(8px);
11
- transition: all 0.2s ease 0s;
12
- inset-inline-end: 0;
13
- padding-inline: 16px;
14
- padding-block: 0;
15
- border-block-start: 1px solid rgba(5, 5, 5, 0.06);
16
- }
17
-
18
- .antd-tool-bar-left {
19
- flex: 1;
20
- color: rgba(0, 0, 0, 0.88);
21
- }
22
-
23
- .antd-tool-bar-right {
24
- color: rgba(0, 0, 0, 0.88);
25
- }
1
+ .antd-tool-bar {
2
+ display: flex;
3
+ align-items: center;
4
+ box-sizing: border-box;
5
+ width: 100%;
6
+ color: rgba(0, 0, 0, 0.88);
7
+ line-height: 40px;
8
+ background-color: rgba(255, 255, 255);
9
+ -webkit-backdrop-filter: blur(8px);
10
+ backdrop-filter: blur(8px);
11
+ transition: all 0.2s ease 0s;
12
+ inset-inline-end: 0;
13
+ padding-inline: 16px;
14
+ padding-block: 0;
15
+ border-block-start: 1px solid rgba(5, 5, 5, 0.06);
16
+ }
17
+
18
+ .antd-tool-bar-left {
19
+ flex: 1;
20
+ color: rgba(0, 0, 0, 0.88);
21
+ }
22
+
23
+ .antd-tool-bar-right {
24
+ color: rgba(0, 0, 0, 0.88);
25
+ }