@modusoperandi/licit 0.13.25 → 0.14.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/.eslintrc.js +1 -1
- package/README.md +1 -0
- package/dist/BlockquoteInsertNewLineCommand.js +3 -23
- package/dist/BlockquoteNodeSpec.js +3 -13
- package/dist/BlockquoteToggleCommand.js +3 -16
- package/dist/BookmarkNodeSpec.js +0 -6
- package/dist/BulletListNodeSpec.js +2 -16
- package/dist/CZIProseMirror.js +3 -27
- package/dist/CodeBlockCommand.js +3 -19
- package/dist/CodeBlockNodeSpec.js +3 -4
- package/dist/CodeMarkSpec.js +0 -4
- package/dist/ContentPlaceholderPlugin.js +6 -58
- package/dist/CursorPlaceholderPlugin.js +2 -32
- package/dist/DocLayoutCommand.js +5 -28
- package/dist/DocNodeSpec.js +0 -9
- package/dist/EMMarkSpec.js +0 -4
- package/dist/EditorCommands.js +5 -33
- package/dist/EditorKeyMap.js +4 -18
- package/dist/EditorMarks.js +2 -26
- package/dist/EditorNodes.js +4 -22
- package/dist/EditorPageLayoutPlugin.js +3 -15
- package/dist/EditorPlugins.js +0 -4
- package/dist/EditorSchema.js +0 -5
- package/dist/EditorState.js +0 -2
- package/dist/FontSizeMarkSpec.js +0 -12
- package/dist/FontTypeMarkSpec.js +15 -19
- package/dist/HTMLMutator.js +5 -24
- package/dist/HardBreakNodeSpec.js +0 -2
- package/dist/HeadingNodeSpec.js +6 -15
- package/dist/HistoryRedoCommand.js +3 -11
- package/dist/HistoryUndoCommand.js +3 -11
- package/dist/HorizontalRuleCommand.js +3 -22
- package/dist/HorizontalRuleNodeSpec.js +0 -10
- package/dist/ImageFromURLCommand.js +0 -9
- package/dist/ImageNodeSpec.js +2 -14
- package/dist/ImageSourceCommand.js +3 -39
- package/dist/ImageUploadCommand.js +3 -21
- package/dist/ImageUploadPlaceholderPlugin.js +10 -48
- package/dist/LinkMarkSpec.js +0 -4
- package/dist/LinkSetURLCommand.js +3 -28
- package/dist/LinkTooltipPlugin.js +6 -52
- package/dist/ListItemInsertNewLineCommand.js +3 -23
- package/dist/ListItemMergeCommand.js +15 -66
- package/dist/ListItemNodeSpec.js +0 -11
- package/dist/ListSplitCommand.js +3 -14
- package/dist/ListToggleCommand.js +5 -26
- package/dist/MarksClearCommand.js +6 -17
- package/dist/MathEditCommand.js +3 -38
- package/dist/MathNodeSpec.js +0 -10
- package/dist/OrderedListNodeSpec.js +0 -24
- package/dist/ParagraphNodeSpec.js +5 -26
- package/dist/ParagraphSpacingCommand.js +3 -32
- package/dist/PrintCommand.js +3 -13
- package/dist/SelectionPlaceholderPlugin.js +2 -31
- package/dist/SpacerMarkSpec.js +2 -6
- package/dist/StrikeMarkSpec.js +0 -4
- package/dist/StrongMarkSpec.js +2 -5
- package/dist/StyleView.js +1 -7
- package/dist/TableBackgroundColorCommand.js +3 -24
- package/dist/TableBorderColorCommand.js +3 -24
- package/dist/TableCellColorCommand.js +3 -23
- package/dist/TableCellMenuPlugin.js +9 -45
- package/dist/TableInsertCommand.js +7 -39
- package/dist/TableMergeCellsCommand.js +5 -30
- package/dist/TableNodesSpecs.js +4 -23
- package/dist/TablePlugins.js +0 -5
- package/dist/TableResizePlugin.js +54 -138
- package/dist/TextColorMarkSpec.js +0 -9
- package/dist/TextHighlightMarkSpec.js +0 -8
- package/dist/TextInsertTabSpaceCommand.js +3 -28
- package/dist/TextNoWrapMarkSpec.js +0 -4
- package/dist/TextSelectionMarkSpec.js +0 -5
- package/dist/TextSubMarkSpec.js +0 -4
- package/dist/TextSuperMarkSpec.js +0 -4
- package/dist/TextUnderlineMarkSpec.js +0 -4
- package/dist/Types.js +0 -6
- package/dist/WebFontLoader.js +3 -8
- package/dist/blockQuoteInputRule.js +0 -13
- package/dist/bom.xml +1492 -1645
- package/dist/buildEditorPlugins.js +5 -27
- package/dist/buildInputRules.js +12 -24
- package/dist/client/CollabConnector.js +6 -30
- package/dist/client/EditorConnection.js +23 -69
- package/dist/client/Licit.js +79 -163
- package/dist/client/Licit.js.flow +16 -2
- package/dist/client/Licit.test.js +6 -13
- package/dist/client/Reporter.js +1 -8
- package/dist/client/SimpleConnector.js +6 -26
- package/dist/client/http.js +8 -15
- package/dist/client/throttle.js +0 -2
- package/dist/convertFromDOMElement.js +2 -10
- package/dist/convertFromHTML.js +0 -5
- package/dist/convertFromJSON.js +3 -13
- package/dist/convertToCSSPTValue.js +0 -6
- package/dist/convertToJSON.js +0 -2
- package/dist/createCommand.js +3 -11
- package/dist/createEditorKeyMap.js +0 -13
- package/dist/createEmptyEditorState.js +0 -7
- package/dist/createTableResizingPlugin.js +5 -16
- package/dist/findActionableCell.js +0 -19
- package/dist/findActiveMark.js +0 -11
- package/dist/hyphenize.js +2 -4
- package/dist/index.js +0 -9
- package/dist/insertTable.js +0 -16
- package/dist/isEditorStateEmpty.js +0 -6
- package/dist/isTableNode.js +0 -3
- package/dist/joinDown.js +0 -7
- package/dist/joinListNode.js +0 -15
- package/dist/joinUp.js +0 -9
- package/dist/keymaps.js +0 -15
- package/dist/lookUpElement.js +0 -3
- package/dist/nodeAt.js +0 -3
- package/dist/normalizeHTML.js +9 -25
- package/dist/patchAnchorElements.js +5 -12
- package/dist/patchBreakElements.js +0 -6
- package/dist/patchElementInlineStyles.js +5 -15
- package/dist/patchListElements.js +20 -54
- package/dist/patchMathElements.js +11 -21
- package/dist/patchParagraphElements.js +0 -5
- package/dist/patchStyleElements.js +12 -41
- package/dist/patchTableElements.js +9 -37
- package/dist/rebaseDocWithSteps.js +0 -6
- package/dist/sanitizeURL.js +0 -3
- package/dist/splitListItem.js +12 -43
- package/dist/toClosestFontPtSize.js +1 -5
- package/dist/toSafeHTMLDocument.js +0 -1
- package/dist/toggleBlockquote.js +2 -19
- package/dist/toggleCodeBlock.js +2 -22
- package/dist/ui/AlertInfo.js +6 -22
- package/dist/ui/BookmarkNodeView.js +7 -28
- package/dist/ui/CommandButton.js +3 -19
- package/dist/ui/CommandMenu.js +3 -25
- package/dist/ui/CommandMenuButton.js +3 -36
- package/dist/ui/CustomEditorView.js +3 -16
- package/dist/ui/CustomMenu.js +0 -8
- package/dist/ui/CustomMenuItem.js +4 -18
- package/dist/ui/CustomNodeView.js +21 -67
- package/dist/ui/CustomRadioButton.js +14 -33
- package/dist/ui/DocLayoutEditor.js +5 -27
- package/dist/ui/Editor.js +18 -79
- package/dist/ui/EditorFrameset.js +3 -18
- package/dist/ui/EditorToolbar.js +10 -46
- package/dist/ui/EditorToolbarConfig.js +10 -20
- package/dist/ui/FontSizeCommandMenuButton.js +5 -19
- package/dist/ui/FontTypeCommandMenuButton.js +5 -22
- package/dist/ui/Frag.js +0 -7
- package/dist/ui/Icon.js +5 -25
- package/dist/ui/ImageAlignEditor.js +3 -16
- package/dist/ui/ImageInlineEditor.js +3 -16
- package/dist/ui/ImageNodeView.js +20 -109
- package/dist/ui/ImageResizeBox.js +3 -53
- package/dist/ui/ImageURLEditor.js +3 -28
- package/dist/ui/ImageUploadEditor.js +3 -35
- package/dist/ui/LinkTooltip.js +5 -25
- package/dist/ui/LinkURLEditor.js +3 -29
- package/dist/ui/ListItemNodeView.js +15 -30
- package/dist/ui/ListTypeButton.js +5 -37
- package/dist/ui/ListTypeCommandButton.js +3 -19
- package/dist/ui/ListTypeMenu.js +4 -25
- package/dist/ui/LoadingIndicator.js +0 -7
- package/dist/ui/MathEditor.js +3 -24
- package/dist/ui/MathInlineEditor.js +3 -26
- package/dist/ui/MathNodeView.js +9 -59
- package/dist/ui/PasteMenu.js +4 -20
- package/dist/ui/ResizeObserver.js +0 -18
- package/dist/ui/RichTextEditor.js +5 -27
- package/dist/ui/SelectionObserver.js +3 -29
- package/dist/ui/TableCellMenu.js +3 -18
- package/dist/ui/TableGridSizeEditor.js +5 -51
- package/dist/ui/TableNodeView.js +0 -11
- package/dist/ui/bindScrollHandler.js +2 -9
- package/dist/ui/canUseCSSFont.js +2 -8
- package/dist/ui/czi-icon.css +4 -4
- package/dist/ui/findActiveFontSize.js +2 -18
- package/dist/ui/findActiveFontType.js +0 -12
- package/dist/ui/handleEditorDrop.js +0 -9
- package/dist/ui/handleEditorKeyDown.js +0 -7
- package/dist/ui/handleEditorPaste.js +0 -9
- package/dist/ui/htmlElementToRect.js +0 -4
- package/dist/ui/injectStyleSheet.js +0 -10
- package/dist/ui/isElementFullyVisible.js +2 -8
- package/dist/ui/isOffline.js +0 -2
- package/dist/ui/isReactClass.js +0 -4
- package/dist/ui/mathquill-editor/MathQuillEditor.js +9 -44
- package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js +1 -3
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +3 -16
- package/dist/ui/mathquill-editor/mathquill-import-kludge.js +5 -7
- package/dist/ui/renderLaTeXAsHTML.js +2 -13
- package/dist/ui/resolveImage.js +7 -32
- package/dist/ui/toCSSColor.js +0 -14
- package/dist/ui/toCSSLineSpacing.js +10 -11
- package/dist/ui/toHexColor.js +0 -8
- package/dist/ui/uuid.js +0 -2
- package/dist/uuid.js +0 -2
- package/package-lock.json.old +32889 -0
- package/package.json +45 -69
- package/src/client/Licit.js +16 -2
- package/src/ui/czi-icon.css +4 -4
- package/utils/build_web_server.js +1 -7
- package/webpack.config.js +3 -3
|
@@ -4,29 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.FONT_PT_SIZES = void 0;
|
|
7
|
-
|
|
8
7
|
var _prosemirrorState = require("prosemirror-state");
|
|
9
|
-
|
|
10
8
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
11
|
-
|
|
12
9
|
var _prosemirrorView = require("prosemirror-view");
|
|
13
|
-
|
|
14
10
|
var React = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
11
|
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
17
|
-
|
|
18
12
|
var _CommandMenuButton = _interopRequireDefault(require("./CommandMenuButton"));
|
|
19
|
-
|
|
20
13
|
var _findActiveFontSize = _interopRequireDefault(require("./findActiveFontSize"));
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
30
20
|
const FONT_PT_SIZES = [8, 9, 10, 11, 12, 14, 18, 24, 30, 36, 48, 60, 72, 90];
|
|
31
21
|
exports.FONT_PT_SIZES = FONT_PT_SIZES;
|
|
32
22
|
const FONT_PT_SIZE_COMMANDS = FONT_PT_SIZES.reduce((memo, size) => {
|
|
@@ -36,14 +26,11 @@ const FONT_PT_SIZE_COMMANDS = FONT_PT_SIZES.reduce((memo, size) => {
|
|
|
36
26
|
const COMMAND_GROUPS = [{
|
|
37
27
|
Default: new _licitUiCommands.FontSizeCommand(0)
|
|
38
28
|
}, FONT_PT_SIZE_COMMANDS];
|
|
39
|
-
|
|
40
29
|
class FontSizeCommandMenuButton extends React.PureComponent {
|
|
41
30
|
constructor() {
|
|
42
31
|
super(...arguments);
|
|
43
|
-
|
|
44
32
|
_defineProperty(this, "props", void 0);
|
|
45
33
|
}
|
|
46
|
-
|
|
47
34
|
render() {
|
|
48
35
|
const {
|
|
49
36
|
dispatch,
|
|
@@ -53,7 +40,8 @@ class FontSizeCommandMenuButton extends React.PureComponent {
|
|
|
53
40
|
const fontSize = (0, _findActiveFontSize.default)(editorState);
|
|
54
41
|
const className = String(fontSize).length <= 2 ? 'width-30' : 'width-60';
|
|
55
42
|
return /*#__PURE__*/React.createElement(_CommandMenuButton.default, {
|
|
56
|
-
className: className
|
|
43
|
+
className: className
|
|
44
|
+
// [FS] IRAD-1008 2020-07-16
|
|
57
45
|
// Disable font size menu on editor disable state
|
|
58
46
|
,
|
|
59
47
|
commandGroups: COMMAND_GROUPS,
|
|
@@ -64,8 +52,6 @@ class FontSizeCommandMenuButton extends React.PureComponent {
|
|
|
64
52
|
label: fontSize
|
|
65
53
|
});
|
|
66
54
|
}
|
|
67
|
-
|
|
68
55
|
}
|
|
69
|
-
|
|
70
56
|
var _default = FontSizeCommandMenuButton;
|
|
71
57
|
exports.default = _default;
|
|
@@ -4,48 +4,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _CommandMenuButton = _interopRequireDefault(require("./CommandMenuButton"));
|
|
9
|
-
|
|
10
8
|
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
11
|
-
|
|
12
9
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _findActiveFontType = _interopRequireWildcard(require("./findActiveFontType"));
|
|
15
|
-
|
|
16
11
|
var _prosemirrorState = require("prosemirror-state");
|
|
17
|
-
|
|
18
12
|
var _prosemirrorView = require("prosemirror-view");
|
|
19
|
-
|
|
20
13
|
var _FontTypeMarkSpec = require("../FontTypeMarkSpec");
|
|
21
|
-
|
|
22
14
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
23
|
-
|
|
24
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
18
|
+
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; }
|
|
19
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
20
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
32
21
|
const FONT_TYPE_COMMANDS = {
|
|
33
22
|
[_findActiveFontType.FONT_TYPE_NAME_DEFAULT]: new _licitUiCommands.FontTypeCommand('')
|
|
34
23
|
};
|
|
35
|
-
|
|
36
24
|
_FontTypeMarkSpec.FONT_TYPE_NAMES.forEach(name => {
|
|
37
25
|
FONT_TYPE_COMMANDS[name] = new _licitUiCommands.FontTypeCommand(name);
|
|
38
26
|
});
|
|
39
|
-
|
|
40
27
|
const COMMAND_GROUPS = [FONT_TYPE_COMMANDS];
|
|
41
|
-
|
|
42
28
|
class FontTypeCommandMenuButton extends React.PureComponent {
|
|
43
29
|
constructor() {
|
|
44
30
|
super(...arguments);
|
|
45
|
-
|
|
46
31
|
_defineProperty(this, "props", void 0);
|
|
47
32
|
}
|
|
48
|
-
|
|
49
33
|
render() {
|
|
50
34
|
const {
|
|
51
35
|
dispatch,
|
|
@@ -54,7 +38,8 @@ class FontTypeCommandMenuButton extends React.PureComponent {
|
|
|
54
38
|
} = this.props;
|
|
55
39
|
const fontType = (0, _findActiveFontType.default)(editorState);
|
|
56
40
|
return /*#__PURE__*/React.createElement(_CommandMenuButton.default, {
|
|
57
|
-
className: "width-100"
|
|
41
|
+
className: "width-100"
|
|
42
|
+
// [FS] IRAD-1008 2020-07-16
|
|
58
43
|
// Disable font type menu on editor disable state
|
|
59
44
|
,
|
|
60
45
|
commandGroups: COMMAND_GROUPS,
|
|
@@ -65,8 +50,6 @@ class FontTypeCommandMenuButton extends React.PureComponent {
|
|
|
65
50
|
label: fontType
|
|
66
51
|
});
|
|
67
52
|
}
|
|
68
|
-
|
|
69
53
|
}
|
|
70
|
-
|
|
71
54
|
var _default = FontTypeCommandMenuButton;
|
|
72
55
|
exports.default = _default;
|
package/dist/ui/Frag.js
CHANGED
|
@@ -4,23 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
8
|
require("./czi-frag.css");
|
|
11
|
-
|
|
12
9
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
|
|
14
10
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
-
|
|
16
11
|
class Frag extends React.PureComponent {
|
|
17
12
|
render() {
|
|
18
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
14
|
className: "czi-frag"
|
|
20
15
|
}, this.props.children);
|
|
21
16
|
}
|
|
22
|
-
|
|
23
17
|
}
|
|
24
|
-
|
|
25
18
|
var _default = Frag;
|
|
26
19
|
exports.default = _default;
|
package/dist/ui/Icon.js
CHANGED
|
@@ -4,36 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
-
|
|
10
8
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _canUseCSSFont = _interopRequireDefault(require("./canUseCSSFont"));
|
|
13
|
-
|
|
14
10
|
require("./czi-icon.css");
|
|
15
|
-
|
|
16
11
|
require("./icon-font.css");
|
|
17
|
-
|
|
18
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
-
|
|
20
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
15
|
+
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; }
|
|
16
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
17
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
26
18
|
const VALID_CHARS = /[a-z_]+/;
|
|
27
19
|
const cached = {};
|
|
28
20
|
const CSS_CDN_URL = '//fonts.googleapis.com/icon?family=Material+Icons';
|
|
29
21
|
const CSS_FONT = 'Material Icons';
|
|
30
|
-
|
|
31
22
|
(async function () {
|
|
32
23
|
// Inject CSS Fonts reuqired for toolbar icons.
|
|
33
24
|
const fontSupported = await (0, _canUseCSSFont.default)(CSS_FONT);
|
|
34
|
-
|
|
35
25
|
if (!fontSupported) {
|
|
36
|
-
console.info('Add CSS from ', CSS_CDN_URL);
|
|
26
|
+
console.info('Add CSS from ', CSS_CDN_URL);
|
|
27
|
+
// [FS] IRAD-1061 2020-09-19
|
|
37
28
|
// Now loaded locally, so that it work in closed network as well.
|
|
38
29
|
//injectStyleSheet(CSS_CDN_URL);
|
|
39
30
|
}
|
|
@@ -49,9 +40,7 @@ class SuperscriptIcon extends React.PureComponent {
|
|
|
49
40
|
className: "superscript-top"
|
|
50
41
|
}, "y"));
|
|
51
42
|
}
|
|
52
|
-
|
|
53
43
|
}
|
|
54
|
-
|
|
55
44
|
class SubscriptIcon extends React.PureComponent {
|
|
56
45
|
render() {
|
|
57
46
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -62,16 +51,12 @@ class SubscriptIcon extends React.PureComponent {
|
|
|
62
51
|
className: "subscript-bottom"
|
|
63
52
|
}, "y"));
|
|
64
53
|
}
|
|
65
|
-
|
|
66
54
|
}
|
|
67
|
-
|
|
68
55
|
class Icon extends React.PureComponent {
|
|
69
56
|
constructor() {
|
|
70
57
|
super(...arguments);
|
|
71
|
-
|
|
72
58
|
_defineProperty(this, "props", void 0);
|
|
73
59
|
}
|
|
74
|
-
|
|
75
60
|
// Get the static Icon.
|
|
76
61
|
static get(type, title) {
|
|
77
62
|
const key = `${type || ''}-${title || ''}`;
|
|
@@ -82,7 +67,6 @@ class Icon extends React.PureComponent {
|
|
|
82
67
|
cached[key] = icon;
|
|
83
68
|
return icon;
|
|
84
69
|
}
|
|
85
|
-
|
|
86
70
|
render() {
|
|
87
71
|
const {
|
|
88
72
|
type,
|
|
@@ -90,7 +74,6 @@ class Icon extends React.PureComponent {
|
|
|
90
74
|
} = this.props;
|
|
91
75
|
let className = '';
|
|
92
76
|
let children = '';
|
|
93
|
-
|
|
94
77
|
if (type == 'superscript') {
|
|
95
78
|
className = (0, _classnames.default)('czi-icon', {
|
|
96
79
|
[type]: true
|
|
@@ -110,13 +93,10 @@ class Icon extends React.PureComponent {
|
|
|
110
93
|
});
|
|
111
94
|
children = type;
|
|
112
95
|
}
|
|
113
|
-
|
|
114
96
|
return /*#__PURE__*/React.createElement("span", {
|
|
115
97
|
className: className
|
|
116
98
|
}, children);
|
|
117
99
|
}
|
|
118
|
-
|
|
119
100
|
}
|
|
120
|
-
|
|
121
101
|
var _default = Icon;
|
|
122
102
|
exports.default = _default;
|
|
@@ -4,23 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.bpfrpt_proptype_ImageInlineEditorValue = void 0;
|
|
7
|
-
|
|
8
7
|
require("./czi-inline-editor.css");
|
|
9
|
-
|
|
10
8
|
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
11
|
-
|
|
12
9
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
-
|
|
20
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
17
|
const ImageAlignValues = {
|
|
25
18
|
NONE: {
|
|
26
19
|
value: null,
|
|
@@ -43,20 +36,16 @@ var bpfrpt_proptype_ImageInlineEditorValue = {
|
|
|
43
36
|
"align": _propTypes.default.string
|
|
44
37
|
};
|
|
45
38
|
exports.bpfrpt_proptype_ImageInlineEditorValue = bpfrpt_proptype_ImageInlineEditorValue;
|
|
46
|
-
|
|
47
39
|
class ImageInlineEditor extends React.PureComponent {
|
|
48
40
|
constructor() {
|
|
49
41
|
super(...arguments);
|
|
50
|
-
|
|
51
42
|
_defineProperty(this, "props", void 0);
|
|
52
|
-
|
|
53
43
|
_defineProperty(this, "_onClick", align => {
|
|
54
44
|
this.props.onSelect({
|
|
55
45
|
align: align
|
|
56
46
|
});
|
|
57
47
|
});
|
|
58
48
|
}
|
|
59
|
-
|
|
60
49
|
render() {
|
|
61
50
|
const align = this.props.value ? this.props.value.align : null;
|
|
62
51
|
const onClick = this._onClick;
|
|
@@ -77,8 +66,6 @@ class ImageInlineEditor extends React.PureComponent {
|
|
|
77
66
|
className: "czi-inline-editor custom-"
|
|
78
67
|
}, buttons);
|
|
79
68
|
}
|
|
80
|
-
|
|
81
69
|
}
|
|
82
|
-
|
|
83
70
|
var _default = ImageInlineEditor;
|
|
84
71
|
exports.default = _default;
|
|
@@ -4,23 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.bpfrpt_proptype_PropValue = exports.bpfrpt_proptype_ImageInlineEditorValue = void 0;
|
|
7
|
-
|
|
8
7
|
require("./czi-inline-editor.css");
|
|
9
|
-
|
|
10
8
|
var _licitUiCommands = require("@modusoperandi/licit-ui-commands");
|
|
11
|
-
|
|
12
9
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
-
|
|
14
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
-
|
|
20
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
17
|
var bpfrpt_proptype_PropValue = {
|
|
25
18
|
"value": _propTypes.default.string,
|
|
26
19
|
"text": _propTypes.default.string
|
|
@@ -48,20 +41,16 @@ var bpfrpt_proptype_ImageInlineEditorValue = {
|
|
|
48
41
|
"align": _propTypes.default.string
|
|
49
42
|
};
|
|
50
43
|
exports.bpfrpt_proptype_ImageInlineEditorValue = bpfrpt_proptype_ImageInlineEditorValue;
|
|
51
|
-
|
|
52
44
|
class ImageInlineEditor extends React.PureComponent {
|
|
53
45
|
constructor() {
|
|
54
46
|
super(...arguments);
|
|
55
|
-
|
|
56
47
|
_defineProperty(this, "props", void 0);
|
|
57
|
-
|
|
58
48
|
_defineProperty(this, "_onClick", align => {
|
|
59
49
|
this.props.onSelect({
|
|
60
50
|
align: align
|
|
61
51
|
});
|
|
62
52
|
});
|
|
63
53
|
}
|
|
64
|
-
|
|
65
54
|
render() {
|
|
66
55
|
const align = this.props.value ? this.props.value.align : null;
|
|
67
56
|
const onClick = this._onClick;
|
|
@@ -82,8 +71,6 @@ class ImageInlineEditor extends React.PureComponent {
|
|
|
82
71
|
className: "czi-inline-editor"
|
|
83
72
|
}, buttons);
|
|
84
73
|
}
|
|
85
|
-
|
|
86
74
|
}
|
|
87
|
-
|
|
88
75
|
var _default = ImageInlineEditor;
|
|
89
76
|
exports.default = _default;
|