@pareto-engineering/design-system 4.0.0-alpha.69 → 4.0.0-alpha.72
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/.storybook/preview.js +29 -12
- package/dist/cjs/a/AnimatedGradient/AnimatedGradient.js +0 -1
- package/dist/cjs/a/AnimatedGradient/webGIRenderer.js +0 -1
- package/dist/cjs/a/AppContext/ContextProvider.js +2 -0
- package/dist/cjs/{c/ContentSlides/common/Slide/Slide.js → a/LexicalPreview/LexicalPreview.js} +43 -28
- package/dist/cjs/{c/ContentSlides/common/HorizontalMenu → a/LexicalPreview}/index.js +3 -3
- package/dist/cjs/a/LexicalPreview/styles.scss +46 -0
- package/dist/cjs/a/People/common/Person/Person.js +7 -2
- package/dist/cjs/a/ProgressBar/ProgressBar.js +3 -3
- package/dist/cjs/a/ProgressBar/styles.scss +11 -1
- package/dist/cjs/a/XMLEditor/XMLEditor.js +123 -0
- package/dist/cjs/{c/ContentSlides/common/Slide → a/XMLEditor/common}/index.js +3 -3
- package/dist/cjs/a/XMLEditor/common/theme.js +186 -0
- package/dist/cjs/{c/ContentSlides/common/Navigator → a/XMLEditor}/index.js +3 -3
- package/dist/cjs/a/XMLEditor/styles.scss +17 -0
- package/dist/cjs/a/index.js +15 -1
- package/dist/cjs/b/ExpandableLexicalPreview/ExpandableLexicalPreview.js +125 -0
- package/dist/cjs/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +112 -0
- package/dist/cjs/{c/ContentSlides/common/Sidebar → b/ExpandableLexicalPreview/common/ExpandButton}/index.js +3 -3
- package/dist/cjs/b/ExpandableLexicalPreview/common/index.js +12 -0
- package/dist/cjs/b/ExpandableLexicalPreview/index.js +13 -0
- package/dist/cjs/b/ExpandableLexicalPreview/styles.scss +84 -0
- package/dist/cjs/b/Logo/Logo.js +0 -1
- package/dist/cjs/b/Title/Title.js +0 -1
- package/dist/cjs/b/index.js +8 -1
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +0 -2
- package/dist/cjs/c/index.js +0 -13
- package/dist/cjs/f/FormInput/FormInput.js +2 -0
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +14 -3
- package/dist/cjs/f/fields/EditorInput/common/StopPropagationPlugin.js +30 -0
- package/dist/cjs/f/fields/EditorInput/common/index.js +7 -0
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +11 -1
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +32 -3
- package/dist/cjs/index.js +0 -11
- package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +0 -1
- package/dist/es/a/AnimatedGradient/AnimatedGradient.js +0 -1
- package/dist/es/a/AnimatedGradient/webGIRenderer.js +0 -1
- package/dist/es/a/BlurOverlay/BlurOverlay.js +0 -1
- package/dist/es/a/DotInfo/DotInfo.js +0 -1
- package/dist/es/a/LexicalPreview/LexicalPreview.js +80 -0
- package/dist/es/a/LexicalPreview/index.js +2 -0
- package/dist/es/a/LexicalPreview/styles.scss +46 -0
- package/dist/es/a/People/common/Person/Person.js +22 -15
- package/dist/es/a/ProgressBar/ProgressBar.js +3 -3
- package/dist/es/a/ProgressBar/styles.scss +11 -1
- package/dist/es/a/XMLEditor/XMLEditor.js +112 -0
- package/dist/es/a/XMLEditor/common/index.js +1 -0
- package/dist/es/a/XMLEditor/common/theme.js +180 -0
- package/dist/es/a/XMLEditor/index.js +1 -0
- package/dist/es/a/XMLEditor/styles.scss +17 -0
- package/dist/es/a/index.js +3 -1
- package/dist/es/b/ExpandableLexicalPreview/ExpandableLexicalPreview.js +115 -0
- package/dist/es/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.js +102 -0
- package/dist/es/b/ExpandableLexicalPreview/common/ExpandButton/index.js +1 -0
- package/dist/es/b/ExpandableLexicalPreview/common/index.js +1 -0
- package/dist/es/b/ExpandableLexicalPreview/index.js +2 -0
- package/dist/es/b/ExpandableLexicalPreview/styles.scss +84 -0
- package/dist/es/b/Logo/Logo.js +0 -1
- package/dist/es/b/Title/Title.js +0 -1
- package/dist/es/b/index.js +2 -1
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +0 -2
- package/dist/es/c/index.js +0 -1
- package/dist/es/f/fields/EditorInput/EditorInput.js +15 -4
- package/dist/es/f/fields/EditorInput/common/StopPropagationPlugin.js +23 -0
- package/dist/es/f/fields/EditorInput/common/index.js +2 -1
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +11 -1
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +32 -3
- package/dist/es/index.js +0 -1
- package/dist/es/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +0 -1
- package/package.json +7 -5
- package/src/stories/StyleGuide/ai-icons.stories.mdx +27 -0
- package/src/stories/StyleGuide/icons.stories.mdx +22 -22
- package/src/stories/a/LexicalPreview.stories.jsx +28 -0
- package/src/stories/a/ProgressBar.stories.jsx +1 -1
- package/src/stories/a/XMLEditor.stories.jsx +21 -0
- package/src/stories/b/ExpandableLexicalPreview.stories.jsx +29 -0
- package/src/stories/colors.js +4 -0
- package/src/stories/f/QueryCombobox.stories.jsx +22 -0
- package/src/ui/a/LexicalPreview/LexicalPreview.jsx +109 -0
- package/src/ui/a/LexicalPreview/index.js +2 -0
- package/src/ui/a/LexicalPreview/styles.scss +46 -0
- package/src/ui/a/People/common/Person/Person.jsx +31 -19
- package/src/ui/a/ProgressBar/ProgressBar.jsx +2 -0
- package/src/ui/a/ProgressBar/styles.scss +11 -1
- package/src/ui/a/XMLEditor/XMLEditor.jsx +182 -0
- package/src/ui/a/XMLEditor/common/index.js +1 -0
- package/src/ui/a/XMLEditor/common/theme.jsx +184 -0
- package/src/ui/a/XMLEditor/index.js +1 -0
- package/src/ui/a/XMLEditor/styles.scss +17 -0
- package/src/ui/a/index.js +2 -0
- package/src/ui/b/ExpandableLexicalPreview/ExpandableLexicalPreview.jsx +157 -0
- package/src/ui/b/ExpandableLexicalPreview/common/ExpandButton/ExpandButton.jsx +123 -0
- package/src/ui/b/ExpandableLexicalPreview/common/ExpandButton/index.js +1 -0
- package/src/ui/b/ExpandableLexicalPreview/common/index.js +1 -0
- package/src/ui/b/ExpandableLexicalPreview/index.js +2 -0
- package/src/ui/b/ExpandableLexicalPreview/styles.scss +84 -0
- package/src/ui/b/index.js +1 -0
- package/src/ui/c/index.js +0 -1
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +16 -2
- package/src/ui/f/fields/EditorInput/common/StopPropagationPlugin.jsx +29 -0
- package/src/ui/f/fields/EditorInput/common/index.jsx +1 -0
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +12 -0
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +38 -1
- package/src/ui/index.js +0 -1
- package/tests/__snapshots__/Storyshots.test.js.snap +1531 -782
- package/dist/cjs/c/ContentSlides/ContentSlides.js +0 -172
- package/dist/cjs/c/ContentSlides/Context.js +0 -10
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +0 -124
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +0 -128
- package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +0 -92
- package/dist/cjs/c/ContentSlides/common/index.js +0 -33
- package/dist/cjs/c/ContentSlides/index.js +0 -27
- package/dist/cjs/c/ContentSlides/styles.scss +0 -312
- package/dist/cjs/c/ContentSlides/useContentSlides.js +0 -11
- package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +0 -58
- package/dist/cjs/r/SwitchRouteMap/index.js +0 -13
- package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +0 -75
- package/dist/cjs/r/common/PrivateRoute/index.js +0 -13
- package/dist/cjs/r/common/index.js +0 -12
- package/dist/cjs/r/index.js +0 -27
- package/dist/es/c/ContentSlides/ContentSlides.js +0 -160
- package/dist/es/c/ContentSlides/Context.js +0 -2
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +0 -116
- package/dist/es/c/ContentSlides/common/HorizontalMenu/index.js +0 -2
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +0 -118
- package/dist/es/c/ContentSlides/common/Navigator/index.js +0 -2
- package/dist/es/c/ContentSlides/common/Sidebar/Sidebar.js +0 -84
- package/dist/es/c/ContentSlides/common/Sidebar/index.js +0 -2
- package/dist/es/c/ContentSlides/common/Slide/Slide.js +0 -65
- package/dist/es/c/ContentSlides/common/Slide/index.js +0 -2
- package/dist/es/c/ContentSlides/common/index.js +0 -4
- package/dist/es/c/ContentSlides/index.js +0 -4
- package/dist/es/c/ContentSlides/styles.scss +0 -312
- package/dist/es/c/ContentSlides/useContentSlides.js +0 -3
- package/dist/es/r/SwitchRouteMap/SwitchRouteMap.js +0 -45
- package/dist/es/r/SwitchRouteMap/index.js +0 -2
- package/dist/es/r/common/PrivateRoute/PrivateRoute.js +0 -67
- package/dist/es/r/common/PrivateRoute/index.js +0 -2
- package/dist/es/r/common/index.js +0 -1
- package/dist/es/r/index.js +0 -2
- package/src/stories/c/ContentSlides.stories.jsx +0 -214
- package/src/ui/c/ContentSlides/ContentSlides.jsx +0 -214
- package/src/ui/c/ContentSlides/Context.js +0 -3
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +0 -145
- package/src/ui/c/ContentSlides/common/HorizontalMenu/index.js +0 -2
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +0 -150
- package/src/ui/c/ContentSlides/common/Navigator/index.js +0 -2
- package/src/ui/c/ContentSlides/common/Sidebar/Sidebar.jsx +0 -135
- package/src/ui/c/ContentSlides/common/Sidebar/index.js +0 -2
- package/src/ui/c/ContentSlides/common/Slide/Slide.jsx +0 -87
- package/src/ui/c/ContentSlides/common/Slide/index.js +0 -2
- package/src/ui/c/ContentSlides/common/index.js +0 -4
- package/src/ui/c/ContentSlides/index.js +0 -4
- package/src/ui/c/ContentSlides/styles.scss +0 -312
- package/src/ui/c/ContentSlides/useContentSlides.js +0 -4
- package/src/ui/r/SwitchRouteMap/SwitchRouteMap.jsx +0 -64
- package/src/ui/r/SwitchRouteMap/index.js +0 -2
- package/src/ui/r/common/PrivateRoute/PrivateRoute.jsx +0 -73
- package/src/ui/r/common/PrivateRoute/index.js +0 -2
- package/src/ui/r/common/index.js +0 -1
- package/src/ui/r/index.js +0 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@use "@pareto-engineering/bem";
|
|
2
|
+
|
|
3
|
+
.#{bem.$base}.code-editor {
|
|
4
|
+
border-radius: 1em;
|
|
5
|
+
height: var(--height);
|
|
6
|
+
overflow: auto;
|
|
7
|
+
|
|
8
|
+
> .cm-editor {
|
|
9
|
+
height: 100%;
|
|
10
|
+
|
|
11
|
+
.cm-gutters {
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: flex-end;
|
|
14
|
+
width: var(--gutter-width);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/cjs/a/index.js
CHANGED
|
@@ -75,6 +75,12 @@ Object.defineProperty(exports, "Label", {
|
|
|
75
75
|
return _Label.Label;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "LexicalPreview", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _LexicalPreview.LexicalPreview;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
78
84
|
Object.defineProperty(exports, "LoadingCircle", {
|
|
79
85
|
enumerable: true,
|
|
80
86
|
get: function () {
|
|
@@ -159,6 +165,12 @@ Object.defineProperty(exports, "ToggleSwitch", {
|
|
|
159
165
|
return _ToggleSwitch.ToggleSwitch;
|
|
160
166
|
}
|
|
161
167
|
});
|
|
168
|
+
Object.defineProperty(exports, "XMLEditor", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () {
|
|
171
|
+
return _XMLEditor.XMLEditor;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
162
174
|
Object.defineProperty(exports, "useApp", {
|
|
163
175
|
enumerable: true,
|
|
164
176
|
get: function () {
|
|
@@ -195,4 +207,6 @@ var _Tip = require("./Tip");
|
|
|
195
207
|
var _AnimatedGradient = require("./AnimatedGradient");
|
|
196
208
|
var _TextSteps = require("./TextSteps");
|
|
197
209
|
var _Removable = require("./Removable");
|
|
198
|
-
var _ToggleSwitch = require("./ToggleSwitch");
|
|
210
|
+
var _ToggleSwitch = require("./ToggleSwitch");
|
|
211
|
+
var _XMLEditor = require("./XMLEditor");
|
|
212
|
+
var _LexicalPreview = require("./LexicalPreview");
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var React = _react;
|
|
9
|
+
var _LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
10
|
+
var _LexicalRichTextPlugin = require("@lexical/react/LexicalRichTextPlugin");
|
|
11
|
+
var _LexicalContentEditable = require("@lexical/react/LexicalContentEditable");
|
|
12
|
+
var _link = require("@lexical/link");
|
|
13
|
+
var _list = require("@lexical/list");
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
16
|
+
var _designSystem = require("@pareto-engineering/design-system");
|
|
17
|
+
require("./styles.scss");
|
|
18
|
+
var _common = require("./common");
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
23
|
+
/* eslint-disable import/no-extraneous-dependencies -- required here */
|
|
24
|
+
|
|
25
|
+
// Local Definitions
|
|
26
|
+
|
|
27
|
+
const baseClassName = _exports.default.base;
|
|
28
|
+
const componentClassName = 'expandable-lexical-preview';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This is the component description.
|
|
32
|
+
*/
|
|
33
|
+
const ExpandableLexicalPreview = _ref => {
|
|
34
|
+
let {
|
|
35
|
+
id,
|
|
36
|
+
className: userClassName,
|
|
37
|
+
style,
|
|
38
|
+
nodes,
|
|
39
|
+
color,
|
|
40
|
+
resize,
|
|
41
|
+
title
|
|
42
|
+
// ...otherProps
|
|
43
|
+
} = _ref;
|
|
44
|
+
const initialConfig = {
|
|
45
|
+
nameSpace: id,
|
|
46
|
+
editable: false,
|
|
47
|
+
editorState: nodes,
|
|
48
|
+
theme: {
|
|
49
|
+
text: {
|
|
50
|
+
italic: 'italic',
|
|
51
|
+
strikethrough: 'strikethrough',
|
|
52
|
+
underline: 'underlined'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
nodes: [_link.AutoLinkNode, _link.LinkNode, _list.ListNode, _list.ListItemNode]
|
|
56
|
+
};
|
|
57
|
+
const [isExpanded, setIsExpanded] = (0, _react.useState)(false);
|
|
58
|
+
const handleButtonClick = () => {
|
|
59
|
+
setIsExpanded(!isExpanded);
|
|
60
|
+
};
|
|
61
|
+
const Content = (0, _react.useMemo)(() => /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: "lexical-content"
|
|
63
|
+
}, /*#__PURE__*/React.createElement(_LexicalRichTextPlugin.RichTextPlugin, {
|
|
64
|
+
contentEditable: /*#__PURE__*/React.createElement(_LexicalContentEditable.ContentEditable, {
|
|
65
|
+
id: id,
|
|
66
|
+
className: "content-editable"
|
|
67
|
+
})
|
|
68
|
+
}), /*#__PURE__*/React.createElement(_common.ExpandButton, {
|
|
69
|
+
title: title,
|
|
70
|
+
onResolve: handleButtonClick
|
|
71
|
+
})), [id]);
|
|
72
|
+
return /*#__PURE__*/React.createElement(_LexicalComposer.LexicalComposer, {
|
|
73
|
+
initialConfig: initialConfig
|
|
74
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
75
|
+
id: id,
|
|
76
|
+
className: [baseClassName, componentClassName, userClassName, `y-${color}`, isExpanded && 'collapsed'].filter(e => e).join(' '),
|
|
77
|
+
style: {
|
|
78
|
+
'--resize': resize,
|
|
79
|
+
...style
|
|
80
|
+
}
|
|
81
|
+
}, typeof title === 'string' ? /*#__PURE__*/React.createElement("p", {
|
|
82
|
+
className: "title h2"
|
|
83
|
+
}, title) : title, isExpanded && /*#__PURE__*/React.createElement(_designSystem.Button, {
|
|
84
|
+
onClick: handleButtonClick,
|
|
85
|
+
color: "background-far",
|
|
86
|
+
isCompact: true
|
|
87
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
88
|
+
className: "ai-icon c-x x-paragraph"
|
|
89
|
+
}, "C")), !isExpanded && Content));
|
|
90
|
+
};
|
|
91
|
+
ExpandableLexicalPreview.propTypes = {
|
|
92
|
+
/**
|
|
93
|
+
* The HTML id for this element
|
|
94
|
+
*/
|
|
95
|
+
id: _propTypes.default.string,
|
|
96
|
+
/**
|
|
97
|
+
* The HTML class names for this element
|
|
98
|
+
*/
|
|
99
|
+
className: _propTypes.default.string,
|
|
100
|
+
/**
|
|
101
|
+
* The React-written, css properties for this element.
|
|
102
|
+
*/
|
|
103
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
104
|
+
/**
|
|
105
|
+
* Color of the text
|
|
106
|
+
*/
|
|
107
|
+
color: _propTypes.default.string,
|
|
108
|
+
/**
|
|
109
|
+
* The nodes to render in the form of a json string
|
|
110
|
+
*/
|
|
111
|
+
nodes: _propTypes.default.string,
|
|
112
|
+
/**
|
|
113
|
+
* The resize property of the textarea
|
|
114
|
+
*/
|
|
115
|
+
resize: _propTypes.default.string,
|
|
116
|
+
/**
|
|
117
|
+
* The title for the preview.
|
|
118
|
+
*/
|
|
119
|
+
title: _propTypes.default.string
|
|
120
|
+
};
|
|
121
|
+
ExpandableLexicalPreview.defaultProps = {
|
|
122
|
+
color: 'paragraph',
|
|
123
|
+
resize: 'vertical'
|
|
124
|
+
};
|
|
125
|
+
var _default = exports.default = ExpandableLexicalPreview;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _html = require("@lexical/html");
|
|
9
|
+
var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
12
|
+
var _designSystem = require("@pareto-engineering/design-system");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
17
|
+
/* eslint-disable import/no-extraneous-dependencies -- required here */
|
|
18
|
+
|
|
19
|
+
// Local Definitions
|
|
20
|
+
|
|
21
|
+
const baseClassName = _exports.default.base;
|
|
22
|
+
const componentClassName = 'expand-button';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* This is the component description.
|
|
26
|
+
*/
|
|
27
|
+
const ExpandButton = _ref => {
|
|
28
|
+
let {
|
|
29
|
+
id,
|
|
30
|
+
className: userClassName,
|
|
31
|
+
style,
|
|
32
|
+
onResolve,
|
|
33
|
+
title
|
|
34
|
+
// ...otherProps
|
|
35
|
+
} = _ref;
|
|
36
|
+
const [editor] = (0, _LexicalComposerContext.useLexicalComposerContext)();
|
|
37
|
+
return /*#__PURE__*/React.createElement(_designSystem.Button, {
|
|
38
|
+
id: id,
|
|
39
|
+
className: [baseClassName, componentClassName, userClassName, 'ai-icon'].filter(e => e).join(' '),
|
|
40
|
+
style: style,
|
|
41
|
+
color: "background-far",
|
|
42
|
+
isCompact: true,
|
|
43
|
+
onClick: () => {
|
|
44
|
+
editor.getEditorState().read(() => {
|
|
45
|
+
const rawHtml = (0, _html.$generateHtmlFromNodes)(editor);
|
|
46
|
+
const preview = window.open('', '_blank', 'width=600,height=600');
|
|
47
|
+
preview.document.write(`<html>
|
|
48
|
+
<title>${title || 'Preview'}</title>
|
|
49
|
+
<style>
|
|
50
|
+
li:has(ol, ul) {
|
|
51
|
+
list-style-type: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
p,
|
|
55
|
+
span,
|
|
56
|
+
strong,
|
|
57
|
+
em,
|
|
58
|
+
li {
|
|
59
|
+
&.underlined {
|
|
60
|
+
text-decoration: underline;
|
|
61
|
+
|
|
62
|
+
&.strikethrough {
|
|
63
|
+
text-decoration: underline line-through;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.strikethrough {
|
|
68
|
+
text-decoration: line-through;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.italic {
|
|
72
|
+
font-style: italic;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:first-child {
|
|
77
|
+
margin-top: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&::placeholder {
|
|
81
|
+
color: #abadb3;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
84
|
+
<body>
|
|
85
|
+
<style></style>
|
|
86
|
+
${rawHtml}
|
|
87
|
+
<button onclick="window.close()">Close Preview</button>
|
|
88
|
+
</body></html>`);
|
|
89
|
+
});
|
|
90
|
+
onResolve();
|
|
91
|
+
}
|
|
92
|
+
}, "D");
|
|
93
|
+
};
|
|
94
|
+
ExpandButton.propTypes = {
|
|
95
|
+
/**
|
|
96
|
+
* The HTML id for this element
|
|
97
|
+
*/
|
|
98
|
+
id: _propTypes.default.string,
|
|
99
|
+
/**
|
|
100
|
+
* The HTML class names for this element
|
|
101
|
+
*/
|
|
102
|
+
className: _propTypes.default.string,
|
|
103
|
+
/**
|
|
104
|
+
* The React-written, css properties for this element.
|
|
105
|
+
*/
|
|
106
|
+
style: _propTypes.default.objectOf(_propTypes.default.string)
|
|
107
|
+
};
|
|
108
|
+
ExpandButton.defaultProps = {
|
|
109
|
+
// color: 'paragraph',
|
|
110
|
+
// resize: 'vertical',
|
|
111
|
+
};
|
|
112
|
+
var _default = exports.default = ExpandButton;
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "ExpandButton", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _ExpandButton.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
var
|
|
12
|
+
var _ExpandButton = _interopRequireDefault(require("./ExpandButton"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ExpandButton", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _ExpandButton.ExpandButton;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _ExpandButton = require("./ExpandButton");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ExpandableLexicalPreview", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _ExpandableLexicalPreview.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _ExpandableLexicalPreview = _interopRequireDefault(require("./ExpandableLexicalPreview"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
/* stylelint-disable max-nesting-depth -- required */
|
|
3
|
+
|
|
4
|
+
@use "@pareto-engineering/bem";
|
|
5
|
+
@use "@pareto-engineering/styles/src/mixins";
|
|
6
|
+
@use "@pareto-engineering/styles/src/globals" as *;
|
|
7
|
+
|
|
8
|
+
.#{bem.$base}.expandable-lexical-preview {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
flex-wrap: wrap;
|
|
12
|
+
gap: var(--gap);
|
|
13
|
+
width: 100%;
|
|
14
|
+
|
|
15
|
+
&.collapsed {
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
> .title {
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
> .#{bem.$base}.button {
|
|
25
|
+
align-items: center;
|
|
26
|
+
border: 1px solid var(--outline-inputs);
|
|
27
|
+
display: flex;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
> .lexical-content {
|
|
31
|
+
position: relative;
|
|
32
|
+
|
|
33
|
+
> .content-editable {
|
|
34
|
+
background: var(--background-inputs);
|
|
35
|
+
border: 1px solid var(--outline-inputs);
|
|
36
|
+
border-radius: var(--theme-default-border-radius);
|
|
37
|
+
color: var(--y);
|
|
38
|
+
overflow: auto;
|
|
39
|
+
padding: var(--gap);
|
|
40
|
+
resize: var(--resize);
|
|
41
|
+
|
|
42
|
+
li:has(ol, ul) {
|
|
43
|
+
list-style-type: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
p,
|
|
47
|
+
span,
|
|
48
|
+
strong,
|
|
49
|
+
em,
|
|
50
|
+
li {
|
|
51
|
+
&.underlined {
|
|
52
|
+
text-decoration: underline;
|
|
53
|
+
|
|
54
|
+
&.strikethrough {
|
|
55
|
+
text-decoration: underline line-through;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.strikethrough {
|
|
60
|
+
text-decoration: line-through;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.italic {
|
|
64
|
+
font-style: italic;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:first-child {
|
|
69
|
+
margin-top: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&::placeholder {
|
|
73
|
+
color: var(--metadata);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
> .#{bem.$base}.expand-button {
|
|
78
|
+
border: 1px solid var(--outline-inputs);
|
|
79
|
+
position: absolute;
|
|
80
|
+
right: 1em;
|
|
81
|
+
top: 1em;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
package/dist/cjs/b/Logo/Logo.js
CHANGED
package/dist/cjs/b/index.js
CHANGED
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "Card", {
|
|
|
15
15
|
return _Card.Card;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "ExpandableLexicalPreview", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _ExpandableLexicalPreview.ExpandableLexicalPreview;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "Logo", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function () {
|
|
@@ -51,4 +57,5 @@ var _Page = require("./Page");
|
|
|
51
57
|
var _SocialMediaButton = require("./SocialMediaButton");
|
|
52
58
|
var _ThemeSelector = require("./ThemeSelector");
|
|
53
59
|
var _Title = require("./Title");
|
|
54
|
-
var _Card = require("./Card");
|
|
60
|
+
var _Card = require("./Card");
|
|
61
|
+
var _ExpandableLexicalPreview = require("./ExpandableLexicalPreview");
|
|
@@ -47,14 +47,12 @@ const SocialMediaShareButton = _ref => {
|
|
|
47
47
|
link: `https://www.facebook.com/sharer/sharer.php?u=${link}`
|
|
48
48
|
// link: `https://www.facebook.com/sharer/sharer.php?u=${link}"e=${title}`,
|
|
49
49
|
},
|
|
50
|
-
|
|
51
50
|
twitter: {
|
|
52
51
|
icon: 't',
|
|
53
52
|
link: `https://twitter.com/intent/tweet?url=${link}`
|
|
54
53
|
// link: `https://twitter.com/intent/tweet?text=${title}&url=${link}`,
|
|
55
54
|
}
|
|
56
55
|
};
|
|
57
|
-
|
|
58
56
|
return /*#__PURE__*/React.createElement("a", {
|
|
59
57
|
href: defaultsMap[type].link,
|
|
60
58
|
target: "_blank",
|
package/dist/cjs/c/index.js
CHANGED
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "ContentSlides", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _ContentSlides.ContentSlides;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
Object.defineProperty(exports, "Modal", {
|
|
13
7
|
enumerable: true,
|
|
14
8
|
get: function () {
|
|
@@ -27,13 +21,6 @@ Object.defineProperty(exports, "SocialMediaShareButton", {
|
|
|
27
21
|
return _SocialMediaShareButton.SocialMediaShareButton;
|
|
28
22
|
}
|
|
29
23
|
});
|
|
30
|
-
Object.defineProperty(exports, "useContentSlides", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _ContentSlides.useContentSlides;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
var _ContentSlides = require("./ContentSlides");
|
|
37
24
|
var _Shortener = require("./Shortener");
|
|
38
25
|
var _SocialMediaShareButton = require("./SocialMediaShareButton");
|
|
39
26
|
var _Modal = require("./Modal");
|
|
@@ -14,7 +14,9 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
15
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /* @pareto-engineering/generator-front 1.0.12 */
|
|
16
16
|
// Local Definitions
|
|
17
|
+
|
|
17
18
|
// const baseClassName = styleNames.base
|
|
19
|
+
|
|
18
20
|
const componentClassName = 'form-input';
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -51,7 +51,8 @@ const EditorInput = _ref => {
|
|
|
51
51
|
labelColor,
|
|
52
52
|
description,
|
|
53
53
|
disabled,
|
|
54
|
-
showDebugger
|
|
54
|
+
showDebugger,
|
|
55
|
+
stopPropagationKeys
|
|
55
56
|
// ...otherProps
|
|
56
57
|
} = _ref;
|
|
57
58
|
const formik = (0, _formik.useFormikContext)();
|
|
@@ -130,7 +131,9 @@ const EditorInput = _ref => {
|
|
|
130
131
|
})
|
|
131
132
|
}), /*#__PURE__*/React.createElement(_LexicalOnChangePlugin.OnChangePlugin, {
|
|
132
133
|
onChange: onChange
|
|
133
|
-
}), /*#__PURE__*/React.createElement(_LexicalLinkPlugin.LinkPlugin, null), /*#__PURE__*/React.createElement(_LexicalListPlugin.ListPlugin, null), /*#__PURE__*/React.createElement(_LexicalTabIndentationPlugin.TabIndentationPlugin, null), /*#__PURE__*/React.createElement(_LexicalHistoryPlugin.HistoryPlugin, null), /*#__PURE__*/React.createElement(
|
|
134
|
+
}), /*#__PURE__*/React.createElement(_LexicalLinkPlugin.LinkPlugin, null), /*#__PURE__*/React.createElement(_LexicalListPlugin.ListPlugin, null), /*#__PURE__*/React.createElement(_LexicalTabIndentationPlugin.TabIndentationPlugin, null), /*#__PURE__*/React.createElement(_LexicalHistoryPlugin.HistoryPlugin, null), stopPropagationKeys && /*#__PURE__*/React.createElement(_common2.StopPropagationPlugin, {
|
|
135
|
+
stopPropagationKeys: stopPropagationKeys
|
|
136
|
+
}), /*#__PURE__*/React.createElement(_common.FormDescription, {
|
|
134
137
|
className: "s-1",
|
|
135
138
|
description: description,
|
|
136
139
|
name: name
|
|
@@ -189,7 +192,15 @@ EditorInput.propTypes = {
|
|
|
189
192
|
/**
|
|
190
193
|
* The resize property of the text area
|
|
191
194
|
*/
|
|
192
|
-
resize: _propTypes.default.oneOf(['none', 'both', 'horizontal', 'vertical'])
|
|
195
|
+
resize: _propTypes.default.oneOf(['none', 'both', 'horizontal', 'vertical']),
|
|
196
|
+
/**
|
|
197
|
+
* Whether to show the debugger or not
|
|
198
|
+
*/
|
|
199
|
+
showDebugger: _propTypes.default.bool,
|
|
200
|
+
/**
|
|
201
|
+
* Map to stop propagation of the given keys
|
|
202
|
+
*/
|
|
203
|
+
stopPropagationKeys: _propTypes.default.arrayOf(_propTypes.default.string)
|
|
193
204
|
};
|
|
194
205
|
EditorInput.defaultProps = {
|
|
195
206
|
rows: 10,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
9
|
+
const StopPropagationPlugin = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
stopPropagationKeys
|
|
12
|
+
} = _ref;
|
|
13
|
+
const [editor] = (0, _LexicalComposerContext.useLexicalComposerContext)();
|
|
14
|
+
(0, _react.useInsertionEffect)(() => {
|
|
15
|
+
const onKeyDown = e => {
|
|
16
|
+
if (stopPropagationKeys?.includes(e.key)) {
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
return editor.registerRootListener((rootElement, prevRootElement) => {
|
|
21
|
+
if (prevRootElement !== null) {
|
|
22
|
+
prevRootElement.removeEventListener('keydown', onKeyDown);
|
|
23
|
+
}
|
|
24
|
+
if (rootElement !== null) {
|
|
25
|
+
rootElement.addEventListener('keydown', onKeyDown);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}, [editor]);
|
|
29
|
+
};
|
|
30
|
+
var _default = exports.default = StopPropagationPlugin;
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "StopPropagationPlugin", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _StopPropagationPlugin.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "Toolbar", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
@@ -17,4 +23,5 @@ Object.defineProperty(exports, "TreeViewPlugin", {
|
|
|
17
23
|
});
|
|
18
24
|
var _Toolbar = _interopRequireDefault(require("./Toolbar"));
|
|
19
25
|
var _TreeViewPlugin = _interopRequireDefault(require("./TreeViewPlugin"));
|
|
26
|
+
var _StopPropagationPlugin = _interopRequireDefault(require("./StopPropagationPlugin"));
|
|
20
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -31,6 +31,7 @@ const QueryCombobox = _ref => {
|
|
|
31
31
|
name,
|
|
32
32
|
label,
|
|
33
33
|
labelColor,
|
|
34
|
+
getTagColor,
|
|
34
35
|
color,
|
|
35
36
|
optional,
|
|
36
37
|
description,
|
|
@@ -110,6 +111,7 @@ const QueryCombobox = _ref => {
|
|
|
110
111
|
name,
|
|
111
112
|
label,
|
|
112
113
|
labelColor,
|
|
114
|
+
getTagColor,
|
|
113
115
|
optional,
|
|
114
116
|
description,
|
|
115
117
|
setValue,
|
|
@@ -213,7 +215,15 @@ QueryCombobox.propTypes = {
|
|
|
213
215
|
* Whether to prompt the user to create a new option if the search input
|
|
214
216
|
* does not match any of the options
|
|
215
217
|
*/
|
|
216
|
-
promptCreateNewOption: _propTypes.default.bool
|
|
218
|
+
promptCreateNewOption: _propTypes.default.bool,
|
|
219
|
+
/**
|
|
220
|
+
* The placeholder text for the input
|
|
221
|
+
* */
|
|
222
|
+
placeholder: _propTypes.default.string,
|
|
223
|
+
/**
|
|
224
|
+
* The function to get the color of the tag
|
|
225
|
+
* */
|
|
226
|
+
getTagColor: _propTypes.default.func
|
|
217
227
|
};
|
|
218
228
|
QueryCombobox.defaultProps = {
|
|
219
229
|
optionsKeyMap: {
|