@modusoperandi/licit 1.5.0 → 1.6.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/EditorCommands.js +2 -0
- package/EditorCommands.js.flow +2 -0
- package/TableDetailsCommand.js +123 -0
- package/TableDetailsCommand.js.flow +125 -0
- package/bom.xml +9509 -8172
- package/package.json +18 -18
- package/ui/EditorToolbarConfig.js +3 -0
- package/ui/EditorToolbarConfig.js.flow +4 -0
- package/ui/TableDetails.js +63 -0
- package/ui/TableDetails.js.flow +68 -0
- package/ui/czi-table.css +56 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modusoperandi/licit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"subversion": "1",
|
|
@@ -51,54 +51,54 @@
|
|
|
51
51
|
"webfontloader": "^1.6.28"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@babel/cli": "^7.28.
|
|
55
|
-
"@babel/core": "^7.28.
|
|
56
|
-
"@babel/eslint-parser": "^7.28.
|
|
54
|
+
"@babel/cli": "^7.28.6",
|
|
55
|
+
"@babel/core": "^7.28.6",
|
|
56
|
+
"@babel/eslint-parser": "^7.28.6",
|
|
57
57
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
58
|
-
"@babel/plugin-proposal-decorators": "^7.28.
|
|
59
|
-
"@babel/plugin-proposal-do-expressions": "^7.28.
|
|
58
|
+
"@babel/plugin-proposal-decorators": "^7.28.6",
|
|
59
|
+
"@babel/plugin-proposal-do-expressions": "^7.28.6",
|
|
60
60
|
"@babel/plugin-proposal-export-default-from": "^7.27.1",
|
|
61
61
|
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
62
62
|
"@babel/plugin-proposal-function-sent": "^7.27.1",
|
|
63
63
|
"@babel/plugin-proposal-logical-assignment-operators": "^7.20.7",
|
|
64
64
|
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
65
|
-
"@babel/plugin-proposal-pipeline-operator": "^7.
|
|
65
|
+
"@babel/plugin-proposal-pipeline-operator": "^7.28.6",
|
|
66
66
|
"@babel/plugin-proposal-throw-expressions": "^7.27.1",
|
|
67
67
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
68
68
|
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
|
69
69
|
"@babel/plugin-transform-flow-strip-types": "^7.27.1",
|
|
70
70
|
"@babel/plugin-transform-parameters": "^7.27.7",
|
|
71
71
|
"@babel/plugin-transform-runtime": "^7.28.5",
|
|
72
|
-
"@babel/preset-env": "^7.28.
|
|
72
|
+
"@babel/preset-env": "^7.28.6",
|
|
73
73
|
"@babel/preset-flow": "^7.27.1",
|
|
74
74
|
"@babel/preset-react": "^7.28.5",
|
|
75
75
|
"babel-jest": "^30.2.0",
|
|
76
76
|
"babel-loader": "^10.0.0",
|
|
77
77
|
"babel-plugin-flow-react-proptypes": "^26.0.0",
|
|
78
78
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
79
|
-
"body-parser": "^2.2.
|
|
79
|
+
"body-parser": "^2.2.2",
|
|
80
80
|
"clean-webpack-plugin": "^4.0.0",
|
|
81
81
|
"copy-webpack-plugin": "^13.0.1",
|
|
82
82
|
"copyfiles": "^2.4.1",
|
|
83
|
-
"cors": "^2.8.
|
|
84
|
-
"css-loader": "^7.1.
|
|
83
|
+
"cors": "^2.8.6",
|
|
84
|
+
"css-loader": "^7.1.3",
|
|
85
85
|
"eslint": "^9.39.2",
|
|
86
86
|
"eslint-config-prettier": "^10.1.8",
|
|
87
|
-
"eslint-plugin-jest": "^29.12.
|
|
88
|
-
"eslint-plugin-prettier": "^5.5.
|
|
87
|
+
"eslint-plugin-jest": "^29.12.1",
|
|
88
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
89
89
|
"eslint-plugin-react": "^7.37.5",
|
|
90
90
|
"exports-loader": "^5.0.0",
|
|
91
91
|
"express": "^5.2.1",
|
|
92
92
|
"file-loader": "^6.2.0",
|
|
93
|
-
"flow-bin": "^0.
|
|
93
|
+
"flow-bin": "^0.298.0",
|
|
94
94
|
"flow-copy-source": "^2.0.9",
|
|
95
95
|
"flow-typed": "^4.1.1",
|
|
96
96
|
"flow-webpack-plugin": "^1.2.0",
|
|
97
97
|
"formidable": "^3.5.4",
|
|
98
|
-
"globals": "^
|
|
98
|
+
"globals": "^17.2.0",
|
|
99
99
|
"html-loader": "^5.1.0",
|
|
100
100
|
"html-webpack-inline-source-plugin": "1.0.0-beta.2",
|
|
101
|
-
"html-webpack-plugin": "^5.6.
|
|
101
|
+
"html-webpack-plugin": "^5.6.6",
|
|
102
102
|
"husky": "^9.1.7",
|
|
103
103
|
"identity-obj-proxy": "^3.0.0",
|
|
104
104
|
"jest": "^29.7.0",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"lint-staged": "^16.2.7",
|
|
110
110
|
"mkdirp": "^3.0.1",
|
|
111
111
|
"mv": "^2.1.1",
|
|
112
|
-
"prettier": "^3.
|
|
112
|
+
"prettier": "^3.8.1",
|
|
113
113
|
"style-loader": "^4.0.0",
|
|
114
114
|
"stylelint": "^16.26.1",
|
|
115
115
|
"stylelint-config-standard": "^39.0.1",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"typescript": "5.9.3",
|
|
122
122
|
"webpack": "^5.104.1",
|
|
123
123
|
"webpack-cli": "^6.0.1",
|
|
124
|
-
"webpack-dev-server": "^5.2.
|
|
124
|
+
"webpack-dev-server": "^5.2.3",
|
|
125
125
|
"write-file-webpack-plugin": "^4.5.1"
|
|
126
126
|
},
|
|
127
127
|
"importSort": {
|
|
@@ -47,6 +47,7 @@ var CLEAR_FORMAT = EditorCommands.CLEAR_FORMAT,
|
|
|
47
47
|
TABLE_ADD_ROW_AFTER = EditorCommands.TABLE_ADD_ROW_AFTER,
|
|
48
48
|
TABLE_ADD_ROW_BEFORE = EditorCommands.TABLE_ADD_ROW_BEFORE,
|
|
49
49
|
TABLE_BORDER_COLOR = EditorCommands.TABLE_BORDER_COLOR,
|
|
50
|
+
TABLE_DETAILS = EditorCommands.TABLE_DETAILS,
|
|
50
51
|
TABLE_BACKGROUND_COLOR = EditorCommands.TABLE_BACKGROUND_COLOR,
|
|
51
52
|
TABLE_DELETE_COLUMN = EditorCommands.TABLE_DELETE_COLUMN,
|
|
52
53
|
TABLE_DELETE_ROW = EditorCommands.TABLE_DELETE_ROW,
|
|
@@ -90,6 +91,8 @@ export var TABLE_COMMANDS_GROUP = [{
|
|
|
90
91
|
'Toggle Header Cells': TABLE_TOGGLE_HEADER_CELL
|
|
91
92
|
}, {
|
|
92
93
|
'Delete Table': TABLE_DELETE_TABLE
|
|
94
|
+
}, {
|
|
95
|
+
'Container Dimensions': TABLE_DETAILS
|
|
93
96
|
}];
|
|
94
97
|
|
|
95
98
|
// [FS] IRAD-1012 2020-07-14
|
|
@@ -51,6 +51,7 @@ const {
|
|
|
51
51
|
TABLE_ADD_ROW_AFTER,
|
|
52
52
|
TABLE_ADD_ROW_BEFORE,
|
|
53
53
|
TABLE_BORDER_COLOR,
|
|
54
|
+
TABLE_DETAILS,
|
|
54
55
|
TABLE_BACKGROUND_COLOR,
|
|
55
56
|
TABLE_DELETE_COLUMN,
|
|
56
57
|
TABLE_DELETE_ROW,
|
|
@@ -103,6 +104,9 @@ export const TABLE_COMMANDS_GROUP = [
|
|
|
103
104
|
{
|
|
104
105
|
'Delete Table': TABLE_DELETE_TABLE,
|
|
105
106
|
},
|
|
107
|
+
{
|
|
108
|
+
'Container Dimensions': TABLE_DETAILS,
|
|
109
|
+
},
|
|
106
110
|
];
|
|
107
111
|
|
|
108
112
|
// [FS] IRAD-1012 2020-07-14
|
|
@@ -0,0 +1,63 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
7
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
8
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
10
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
11
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
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); }
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
var TableDetails = /*#__PURE__*/function (_React$PureComponent) {
|
|
17
|
+
function TableDetails() {
|
|
18
|
+
var _this;
|
|
19
|
+
_classCallCheck(this, TableDetails);
|
|
20
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21
|
+
args[_key] = arguments[_key];
|
|
22
|
+
}
|
|
23
|
+
_this = _callSuper(this, TableDetails, [].concat(args));
|
|
24
|
+
_defineProperty(_this, "props", void 0);
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
_inherits(TableDetails, _React$PureComponent);
|
|
28
|
+
return _createClass(TableDetails, [{
|
|
29
|
+
key: "render",
|
|
30
|
+
value: function render() {
|
|
31
|
+
var _this$props = this.props,
|
|
32
|
+
table = _this$props.table,
|
|
33
|
+
cell = _this$props.cell,
|
|
34
|
+
close = _this$props.close;
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "czi-table-details-popup"
|
|
37
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "czi-table-details-header"
|
|
39
|
+
}, /*#__PURE__*/React.createElement("span", null, "Table Details"), /*#__PURE__*/React.createElement("button", {
|
|
40
|
+
className: "czi-table-details-close",
|
|
41
|
+
onClick: function onClick() {
|
|
42
|
+
return close && close();
|
|
43
|
+
},
|
|
44
|
+
title: "Close"
|
|
45
|
+
}, "\u2715")), /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "czi-table-details-section"
|
|
47
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "czi-row"
|
|
49
|
+
}, /*#__PURE__*/React.createElement("span", null, "Table Width"), /*#__PURE__*/React.createElement("strong", null, table.width, "px")), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: "czi-row"
|
|
51
|
+
}, /*#__PURE__*/React.createElement("span", null, "Table Height"), /*#__PURE__*/React.createElement("strong", null, table.height, "px"))), cell && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: "czi-divider"
|
|
53
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: "czi-table-details-section"
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: "czi-row"
|
|
57
|
+
}, /*#__PURE__*/React.createElement("span", null, "Cell Width"), /*#__PURE__*/React.createElement("strong", null, cell.width, "px")), /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "czi-row"
|
|
59
|
+
}, /*#__PURE__*/React.createElement("span", null, "Cell Height"), /*#__PURE__*/React.createElement("strong", null, cell.height, "px")))));
|
|
60
|
+
}
|
|
61
|
+
}]);
|
|
62
|
+
}(React.PureComponent);
|
|
63
|
+
export default TableDetails;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// @flow
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
class TableDetails extends React.PureComponent<any, any> {
|
|
6
|
+
props: {
|
|
7
|
+
close?: () => void,
|
|
8
|
+
table: {
|
|
9
|
+
width: number,
|
|
10
|
+
height: number,
|
|
11
|
+
},
|
|
12
|
+
cell?: {
|
|
13
|
+
width: number,
|
|
14
|
+
height: number,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
render(): React.Element<any> {
|
|
19
|
+
const { table, cell, close } = this.props;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div className="czi-table-details-popup">
|
|
23
|
+
<div className="czi-table-details-header">
|
|
24
|
+
<span>Table Details</span>
|
|
25
|
+
|
|
26
|
+
<button
|
|
27
|
+
className="czi-table-details-close"
|
|
28
|
+
onClick={() => close && close()}
|
|
29
|
+
title="Close"
|
|
30
|
+
>
|
|
31
|
+
✕
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div className="czi-table-details-section">
|
|
36
|
+
<div className="czi-row">
|
|
37
|
+
<span>Table Width</span>
|
|
38
|
+
<strong>{table.width}px</strong>
|
|
39
|
+
</div>
|
|
40
|
+
<div className="czi-row">
|
|
41
|
+
<span>Table Height</span>
|
|
42
|
+
<strong>{table.height}px</strong>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
{cell && (
|
|
47
|
+
<>
|
|
48
|
+
<div className="czi-divider" />
|
|
49
|
+
|
|
50
|
+
<div className="czi-table-details-section">
|
|
51
|
+
<div className="czi-row">
|
|
52
|
+
<span>Cell Width</span>
|
|
53
|
+
<strong>{cell.width}px</strong>
|
|
54
|
+
</div>
|
|
55
|
+
<div className="czi-row">
|
|
56
|
+
<span>Cell Height</span>
|
|
57
|
+
<strong>{cell.height}px</strong>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</>
|
|
61
|
+
)}
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export default TableDetails;
|
package/ui/czi-table.css
CHANGED
|
@@ -90,6 +90,62 @@ Rezie cursor position issue fixed. */
|
|
|
90
90
|
z-index: 2;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
.czi-table-details-popup {
|
|
94
|
+
min-width: 220px;
|
|
95
|
+
background: #fff;
|
|
96
|
+
border-radius: 6px;
|
|
97
|
+
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
|
|
98
|
+
font-size: 12px;
|
|
99
|
+
color: #1f2937;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.czi-table-details-header {
|
|
103
|
+
display: flex;
|
|
104
|
+
justify-content: space-between;
|
|
105
|
+
align-items: center;
|
|
106
|
+
padding: 8px 12px;
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
background: #f8fafc;
|
|
109
|
+
border-bottom: 1px solid #e5e7eb;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.czi-table-details-close {
|
|
113
|
+
background: none;
|
|
114
|
+
border: none;
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
font-size: 14px;
|
|
117
|
+
line-height: 1;
|
|
118
|
+
color: #555;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.czi-table-details-close:hover {
|
|
122
|
+
color: #000;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.czi-table-details-section {
|
|
126
|
+
padding: 8px 12px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.czi-row {
|
|
130
|
+
display: flex;
|
|
131
|
+
justify-content: space-between;
|
|
132
|
+
margin: 4px 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.czi-row span {
|
|
136
|
+
color: #555;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.czi-row strong {
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.czi-divider {
|
|
144
|
+
height: 1px;
|
|
145
|
+
background: #e5e7eb;
|
|
146
|
+
margin: 4px 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
93
149
|
|
|
94
150
|
@media only print {
|
|
95
151
|
.ProseMirror table {
|