@pareto-engineering/design-system 4.0.0-alpha.63 → 4.0.0-alpha.64
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/dist/cjs/f/FormInput/FormInput.js +13 -43
- package/dist/cjs/f/common/Description/Description.js +6 -5
- package/dist/cjs/f/common/Label/Label.js +9 -22
- package/dist/cjs/f/common/Label/styles.scss +0 -5
- package/dist/cjs/f/common/index.js +1 -21
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +16 -21
- package/dist/cjs/f/fields/Checkbox/styles.scss +7 -5
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +13 -23
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +44 -41
- package/dist/cjs/f/fields/EditorInput/EditorInput.js +11 -39
- package/dist/cjs/f/fields/EditorInput/styles.scss +92 -90
- package/dist/cjs/f/fields/LinkInput/LinkInput.js +14 -20
- package/dist/cjs/f/fields/LinkInput/styles.scss +52 -51
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +2 -26
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +4 -30
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +7 -16
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +9 -17
- package/dist/cjs/f/fields/QueryCombobox/styles.scss +38 -37
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +2 -10
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +14 -38
- package/dist/cjs/f/fields/RatingsInput/styles.scss +5 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +14 -36
- package/dist/cjs/f/fields/SelectInput/styles.scss +5 -2
- package/dist/cjs/f/fields/TextInput/TextInput.js +19 -37
- package/dist/cjs/f/fields/TextInput/styles.scss +37 -30
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -37
- package/dist/cjs/f/fields/TextareaInput/styles.scss +30 -27
- package/dist/cjs/f/fields/index.js +1 -26
- package/dist/es/f/FormInput/FormInput.js +3 -33
- package/dist/es/f/common/Description/Description.js +4 -1
- package/dist/es/f/common/Label/Label.js +15 -24
- package/dist/es/f/common/Label/styles.scss +0 -5
- package/dist/es/f/common/index.js +1 -3
- package/dist/es/f/fields/Checkbox/Checkbox.js +14 -19
- package/dist/es/f/fields/Checkbox/styles.scss +7 -5
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +31 -39
- package/dist/es/f/fields/ChoicesInput/styles.scss +44 -41
- package/dist/es/f/fields/EditorInput/EditorInput.js +12 -35
- package/dist/es/f/fields/EditorInput/styles.scss +92 -90
- package/dist/es/f/fields/LinkInput/LinkInput.js +14 -20
- package/dist/es/f/fields/LinkInput/styles.scss +52 -51
- package/dist/es/f/fields/QueryChoices/QueryChoices.js +2 -26
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +4 -26
- package/dist/es/f/fields/QueryCombobox/common/Combobox/Combobox.js +8 -17
- package/dist/es/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +10 -18
- package/dist/es/f/fields/QueryCombobox/styles.scss +38 -37
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +2 -10
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +15 -35
- package/dist/es/f/fields/RatingsInput/styles.scss +5 -1
- package/dist/es/f/fields/SelectInput/SelectInput.js +14 -36
- package/dist/es/f/fields/SelectInput/styles.scss +5 -2
- package/dist/es/f/fields/TextInput/TextInput.js +19 -37
- package/dist/es/f/fields/TextInput/styles.scss +37 -30
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -37
- package/dist/es/f/fields/TextareaInput/styles.scss +30 -27
- package/dist/es/f/fields/index.js +1 -2
- package/package.json +2 -2
- package/src/stories/f/Checkbox.stories.jsx +13 -21
- package/src/stories/f/ChoicesInput.stories.jsx +12 -27
- package/src/stories/f/EditorInput.stories.jsx +7 -14
- package/src/stories/f/LinkInput.stories.jsx +15 -22
- package/src/stories/f/QueryChoices.stories.jsx +12 -19
- package/src/stories/f/QueryCombobox.stories.jsx +16 -24
- package/src/stories/f/QuerySelect.stories.jsx +12 -19
- package/src/stories/f/RatingsInput.stories.jsx +7 -14
- package/src/stories/f/SelectInput.stories.jsx +12 -19
- package/src/stories/f/TextInput.stories.jsx +16 -23
- package/src/stories/f/TextareaInput.stories.jsx +7 -14
- package/src/ui/f/FormInput/FormInput.jsx +12 -57
- package/src/ui/f/common/Description/Description.jsx +6 -2
- package/src/ui/f/common/Label/Label.jsx +27 -37
- package/src/ui/f/common/Label/styles.scss +0 -5
- package/src/ui/f/common/index.js +0 -2
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +27 -33
- package/src/ui/f/fields/Checkbox/styles.scss +7 -5
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +29 -38
- package/src/ui/f/fields/ChoicesInput/styles.scss +44 -41
- package/src/ui/f/fields/EditorInput/EditorInput.jsx +16 -41
- package/src/ui/f/fields/EditorInput/styles.scss +92 -90
- package/src/ui/f/fields/LinkInput/LinkInput.jsx +38 -45
- package/src/ui/f/fields/LinkInput/styles.scss +52 -51
- package/src/ui/f/fields/QueryChoices/QueryChoices.jsx +0 -28
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +5 -31
- package/src/ui/f/fields/QueryCombobox/common/Combobox/Combobox.jsx +35 -46
- package/src/ui/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +63 -73
- package/src/ui/f/fields/QueryCombobox/styles.scss +38 -37
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +0 -8
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +20 -47
- package/src/ui/f/fields/RatingsInput/styles.scss +5 -1
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +33 -61
- package/src/ui/f/fields/SelectInput/styles.scss +5 -2
- package/src/ui/f/fields/TextInput/TextInput.jsx +27 -50
- package/src/ui/f/fields/TextInput/styles.scss +37 -30
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +32 -59
- package/src/ui/f/fields/TextareaInput/styles.scss +30 -27
- package/src/ui/f/fields/index.js +0 -1
- package/dist/cjs/f/common/InputWrapper/InputWrapper.js +0 -73
- package/dist/cjs/f/common/InputWrapper/index.js +0 -13
- package/dist/cjs/f/common/InputWrapper/styles.scss +0 -13
- package/dist/cjs/f/common/V2/Description/Description.js +0 -76
- package/dist/cjs/f/common/V2/Description/index.js +0 -13
- package/dist/cjs/f/common/V2/Description/styles.scss +0 -10
- package/dist/cjs/f/common/V2/Label/Label.js +0 -84
- package/dist/cjs/f/common/V2/Label/index.js +0 -13
- package/dist/cjs/f/common/V2/Label/styles.scss +0 -9
- package/dist/cjs/f/common/V2/index.js +0 -19
- package/dist/cjs/f/fields/V2/Checkbox/Checkbox.js +0 -122
- package/dist/cjs/f/fields/V2/Checkbox/index.js +0 -13
- package/dist/cjs/f/fields/V2/Checkbox/styles.scss +0 -16
- package/dist/cjs/f/fields/V2/ChoicesInput/ChoicesInput.js +0 -154
- package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/Choice.js +0 -104
- package/dist/cjs/f/fields/V2/ChoicesInput/common/Choice/index.js +0 -13
- package/dist/cjs/f/fields/V2/ChoicesInput/common/index.js +0 -12
- package/dist/cjs/f/fields/V2/ChoicesInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/ChoicesInput/styles.scss +0 -79
- package/dist/cjs/f/fields/V2/EditorInput/EditorInput.js +0 -197
- package/dist/cjs/f/fields/V2/EditorInput/common/Toolbar.js +0 -257
- package/dist/cjs/f/fields/V2/EditorInput/common/TreeViewPlugin.js +0 -18
- package/dist/cjs/f/fields/V2/EditorInput/common/index.js +0 -20
- package/dist/cjs/f/fields/V2/EditorInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/EditorInput/styles.scss +0 -149
- package/dist/cjs/f/fields/V2/LinkInput/LinkInput.js +0 -156
- package/dist/cjs/f/fields/V2/LinkInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/LinkInput/styles.scss +0 -90
- package/dist/cjs/f/fields/V2/QueryChoices/QueryChoices.js +0 -137
- package/dist/cjs/f/fields/V2/QueryChoices/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/QueryCombobox.js +0 -229
- package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +0 -236
- package/dist/cjs/f/fields/V2/QueryCombobox/common/Combobox/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/Menu.js +0 -83
- package/dist/cjs/f/fields/V2/QueryCombobox/common/Menu/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +0 -300
- package/dist/cjs/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/common/index.js +0 -26
- package/dist/cjs/f/fields/V2/QueryCombobox/index.js +0 -13
- package/dist/cjs/f/fields/V2/QueryCombobox/styles.scss +0 -127
- package/dist/cjs/f/fields/V2/QuerySelect/QuerySelect.js +0 -198
- package/dist/cjs/f/fields/V2/QuerySelect/index.js +0 -13
- package/dist/cjs/f/fields/V2/RatingsInput/RatingsInput.js +0 -130
- package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/Rating.js +0 -117
- package/dist/cjs/f/fields/V2/RatingsInput/common/Rating/index.js +0 -13
- package/dist/cjs/f/fields/V2/RatingsInput/common/index.js +0 -12
- package/dist/cjs/f/fields/V2/RatingsInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/RatingsInput/styles.scss +0 -48
- package/dist/cjs/f/fields/V2/SelectInput/SelectInput.js +0 -154
- package/dist/cjs/f/fields/V2/SelectInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/SelectInput/styles.scss +0 -87
- package/dist/cjs/f/fields/V2/TextInput/TextInput.js +0 -155
- package/dist/cjs/f/fields/V2/TextInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/TextInput/styles.scss +0 -78
- package/dist/cjs/f/fields/V2/TextareaInput/TextareaInput.js +0 -152
- package/dist/cjs/f/fields/V2/TextareaInput/index.js +0 -13
- package/dist/cjs/f/fields/V2/TextareaInput/styles.scss +0 -53
- package/dist/cjs/f/fields/V2/index.js +0 -82
- package/dist/es/f/common/InputWrapper/InputWrapper.js +0 -61
- package/dist/es/f/common/InputWrapper/index.js +0 -2
- package/dist/es/f/common/InputWrapper/styles.scss +0 -13
- package/dist/es/f/common/V2/Description/Description.js +0 -68
- package/dist/es/f/common/V2/Description/index.js +0 -2
- package/dist/es/f/common/V2/Description/styles.scss +0 -10
- package/dist/es/f/common/V2/Label/Label.js +0 -76
- package/dist/es/f/common/V2/Label/index.js +0 -2
- package/dist/es/f/common/V2/Label/styles.scss +0 -9
- package/dist/es/f/common/V2/index.js +0 -2
- package/dist/es/f/fields/V2/Checkbox/Checkbox.js +0 -114
- package/dist/es/f/fields/V2/Checkbox/index.js +0 -2
- package/dist/es/f/fields/V2/Checkbox/styles.scss +0 -16
- package/dist/es/f/fields/V2/ChoicesInput/ChoicesInput.js +0 -148
- package/dist/es/f/fields/V2/ChoicesInput/common/Choice/Choice.js +0 -97
- package/dist/es/f/fields/V2/ChoicesInput/common/Choice/index.js +0 -2
- package/dist/es/f/fields/V2/ChoicesInput/common/index.js +0 -1
- package/dist/es/f/fields/V2/ChoicesInput/index.js +0 -2
- package/dist/es/f/fields/V2/ChoicesInput/styles.scss +0 -79
- package/dist/es/f/fields/V2/EditorInput/EditorInput.js +0 -192
- package/dist/es/f/fields/V2/EditorInput/common/Toolbar.js +0 -246
- package/dist/es/f/fields/V2/EditorInput/common/TreeViewPlugin.js +0 -11
- package/dist/es/f/fields/V2/EditorInput/common/index.js +0 -2
- package/dist/es/f/fields/V2/EditorInput/index.js +0 -2
- package/dist/es/f/fields/V2/EditorInput/styles.scss +0 -149
- package/dist/es/f/fields/V2/LinkInput/LinkInput.js +0 -148
- package/dist/es/f/fields/V2/LinkInput/index.js +0 -2
- package/dist/es/f/fields/V2/LinkInput/styles.scss +0 -90
- package/dist/es/f/fields/V2/QueryChoices/QueryChoices.js +0 -126
- package/dist/es/f/fields/V2/QueryChoices/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/QueryCombobox.js +0 -221
- package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/Combobox.js +0 -229
- package/dist/es/f/fields/V2/QueryCombobox/common/Combobox/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/common/Menu/Menu.js +0 -73
- package/dist/es/f/fields/V2/QueryCombobox/common/Menu/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +0 -293
- package/dist/es/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/common/index.js +0 -3
- package/dist/es/f/fields/V2/QueryCombobox/index.js +0 -2
- package/dist/es/f/fields/V2/QueryCombobox/styles.scss +0 -127
- package/dist/es/f/fields/V2/QuerySelect/QuerySelect.js +0 -186
- package/dist/es/f/fields/V2/QuerySelect/index.js +0 -2
- package/dist/es/f/fields/V2/RatingsInput/RatingsInput.js +0 -124
- package/dist/es/f/fields/V2/RatingsInput/common/Rating/Rating.js +0 -109
- package/dist/es/f/fields/V2/RatingsInput/common/Rating/index.js +0 -2
- package/dist/es/f/fields/V2/RatingsInput/common/index.js +0 -1
- package/dist/es/f/fields/V2/RatingsInput/index.js +0 -2
- package/dist/es/f/fields/V2/RatingsInput/styles.scss +0 -48
- package/dist/es/f/fields/V2/SelectInput/SelectInput.js +0 -146
- package/dist/es/f/fields/V2/SelectInput/index.js +0 -2
- package/dist/es/f/fields/V2/SelectInput/styles.scss +0 -87
- package/dist/es/f/fields/V2/TextInput/TextInput.js +0 -147
- package/dist/es/f/fields/V2/TextInput/index.js +0 -2
- package/dist/es/f/fields/V2/TextInput/styles.scss +0 -78
- package/dist/es/f/fields/V2/TextareaInput/TextareaInput.js +0 -146
- package/dist/es/f/fields/V2/TextareaInput/index.js +0 -2
- package/dist/es/f/fields/V2/TextareaInput/styles.scss +0 -53
- package/dist/es/f/fields/V2/index.js +0 -11
- package/src/stories/f/v2/Checkbox.stories.jsx +0 -102
- package/src/stories/f/v2/ChoicesInput.stories.jsx +0 -139
- package/src/stories/f/v2/EditorInput.stories.jsx +0 -81
- package/src/stories/f/v2/LinkInput.stories.jsx +0 -93
- package/src/stories/f/v2/QueryChoices.stories.jsx +0 -144
- package/src/stories/f/v2/QueryCombobox.stories.jsx +0 -301
- package/src/stories/f/v2/QuerySelect.stories.jsx +0 -150
- package/src/stories/f/v2/RatingsInput.stories.jsx +0 -77
- package/src/stories/f/v2/SelectInput.stories.jsx +0 -95
- package/src/stories/f/v2/TextInput.stories.jsx +0 -120
- package/src/stories/f/v2/TextareaInput.stories.jsx +0 -107
- package/src/stories/f/v2/__generated__/FormInputAllTaskStatusesQuery.graphql.js +0 -122
- package/src/stories/f/v2/__generated__/FormInputAllTeamsQuery.graphql.js +0 -139
- package/src/stories/f/v2/__generated__/QueryChoicesAllTaskStatusesQuery.graphql.js +0 -122
- package/src/stories/f/v2/__generated__/QueryComboboxAllTeamsQuery.graphql.js +0 -139
- package/src/stories/f/v2/__generated__/QuerySelectAllTaskStatusesQuery.graphql.js +0 -122
- package/src/ui/f/common/InputWrapper/InputWrapper.jsx +0 -83
- package/src/ui/f/common/InputWrapper/index.js +0 -2
- package/src/ui/f/common/InputWrapper/styles.scss +0 -13
- package/src/ui/f/common/V2/Description/Description.jsx +0 -94
- package/src/ui/f/common/V2/Description/index.js +0 -2
- package/src/ui/f/common/V2/Description/styles.scss +0 -10
- package/src/ui/f/common/V2/Label/Label.jsx +0 -102
- package/src/ui/f/common/V2/Label/index.js +0 -2
- package/src/ui/f/common/V2/Label/styles.scss +0 -9
- package/src/ui/f/common/V2/index.js +0 -2
- package/src/ui/f/fields/V2/Checkbox/Checkbox.jsx +0 -146
- package/src/ui/f/fields/V2/Checkbox/index.js +0 -2
- package/src/ui/f/fields/V2/Checkbox/styles.scss +0 -16
- package/src/ui/f/fields/V2/ChoicesInput/ChoicesInput.jsx +0 -183
- package/src/ui/f/fields/V2/ChoicesInput/common/Choice/Choice.jsx +0 -125
- package/src/ui/f/fields/V2/ChoicesInput/common/Choice/index.js +0 -2
- package/src/ui/f/fields/V2/ChoicesInput/common/index.js +0 -1
- package/src/ui/f/fields/V2/ChoicesInput/index.js +0 -2
- package/src/ui/f/fields/V2/ChoicesInput/styles.scss +0 -79
- package/src/ui/f/fields/V2/EditorInput/EditorInput.jsx +0 -244
- package/src/ui/f/fields/V2/EditorInput/common/Toolbar.jsx +0 -356
- package/src/ui/f/fields/V2/EditorInput/common/TreeViewPlugin.jsx +0 -16
- package/src/ui/f/fields/V2/EditorInput/common/index.jsx +0 -2
- package/src/ui/f/fields/V2/EditorInput/index.js +0 -2
- package/src/ui/f/fields/V2/EditorInput/styles.scss +0 -149
- package/src/ui/f/fields/V2/LinkInput/LinkInput.jsx +0 -187
- package/src/ui/f/fields/V2/LinkInput/index.js +0 -2
- package/src/ui/f/fields/V2/LinkInput/styles.scss +0 -90
- package/src/ui/f/fields/V2/QueryChoices/QueryChoices.jsx +0 -153
- package/src/ui/f/fields/V2/QueryChoices/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/QueryCombobox.jsx +0 -254
- package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/Combobox.jsx +0 -276
- package/src/ui/f/fields/V2/QueryCombobox/common/Combobox/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/common/Menu/Menu.jsx +0 -103
- package/src/ui/f/fields/V2/QueryCombobox/common/Menu/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/MultipleCombobox.jsx +0 -362
- package/src/ui/f/fields/V2/QueryCombobox/common/MultipleCombobox/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/common/index.js +0 -3
- package/src/ui/f/fields/V2/QueryCombobox/index.js +0 -2
- package/src/ui/f/fields/V2/QueryCombobox/styles.scss +0 -127
- package/src/ui/f/fields/V2/QuerySelect/QuerySelect.jsx +0 -220
- package/src/ui/f/fields/V2/QuerySelect/index.js +0 -2
- package/src/ui/f/fields/V2/RatingsInput/RatingsInput.jsx +0 -152
- package/src/ui/f/fields/V2/RatingsInput/common/Rating/Rating.jsx +0 -142
- package/src/ui/f/fields/V2/RatingsInput/common/Rating/index.js +0 -2
- package/src/ui/f/fields/V2/RatingsInput/common/index.js +0 -1
- package/src/ui/f/fields/V2/RatingsInput/index.js +0 -2
- package/src/ui/f/fields/V2/RatingsInput/styles.scss +0 -48
- package/src/ui/f/fields/V2/SelectInput/SelectInput.jsx +0 -187
- package/src/ui/f/fields/V2/SelectInput/index.js +0 -2
- package/src/ui/f/fields/V2/SelectInput/styles.scss +0 -87
- package/src/ui/f/fields/V2/TextInput/TextInput.jsx +0 -192
- package/src/ui/f/fields/V2/TextInput/index.js +0 -2
- package/src/ui/f/fields/V2/TextInput/styles.scss +0 -78
- package/src/ui/f/fields/V2/TextareaInput/TextareaInput.jsx +0 -180
- package/src/ui/f/fields/V2/TextareaInput/index.js +0 -2
- package/src/ui/f/fields/V2/TextareaInput/styles.scss +0 -53
- package/src/ui/f/fields/V2/index.js +0 -11
|
@@ -1,197 +0,0 @@
|
|
|
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 _formik = require("formik");
|
|
10
|
-
var _LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
11
|
-
var _LexicalRichTextPlugin = require("@lexical/react/LexicalRichTextPlugin");
|
|
12
|
-
var _LexicalContentEditable = require("@lexical/react/LexicalContentEditable");
|
|
13
|
-
var _LexicalOnChangePlugin = require("@lexical/react/LexicalOnChangePlugin");
|
|
14
|
-
var _LexicalHistoryPlugin = require("@lexical/react/LexicalHistoryPlugin");
|
|
15
|
-
var _LexicalLinkPlugin = require("@lexical/react/LexicalLinkPlugin");
|
|
16
|
-
var _LexicalListPlugin = require("@lexical/react/LexicalListPlugin");
|
|
17
|
-
var _LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
18
|
-
var _link = require("@lexical/link");
|
|
19
|
-
var _list = require("@lexical/list");
|
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
22
|
-
var _common = require("../../../common");
|
|
23
|
-
var _common2 = require("./common");
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
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); }
|
|
26
|
-
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; } /* @pareto-engineering/generator-front 1.0.12 */ /* eslint-disable import/no-extraneous-dependencies -- required here */ // Local Definitions
|
|
27
|
-
const baseClassName = _exports.default.base;
|
|
28
|
-
const componentClassName = 'editor-input';
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* This is the component description.
|
|
32
|
-
*/
|
|
33
|
-
const EditorInput = _ref => {
|
|
34
|
-
let {
|
|
35
|
-
id,
|
|
36
|
-
className: userClassName,
|
|
37
|
-
style,
|
|
38
|
-
name,
|
|
39
|
-
label,
|
|
40
|
-
// validate,
|
|
41
|
-
resize,
|
|
42
|
-
color,
|
|
43
|
-
rows,
|
|
44
|
-
optional,
|
|
45
|
-
labelColor,
|
|
46
|
-
description,
|
|
47
|
-
disabled,
|
|
48
|
-
showDebugger
|
|
49
|
-
// ...otherProps
|
|
50
|
-
} = _ref;
|
|
51
|
-
(0, _react.useInsertionEffect)(() => {
|
|
52
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
53
|
-
}, []);
|
|
54
|
-
const formik = (0, _formik.useFormikContext)();
|
|
55
|
-
const setInitialValue = () => {
|
|
56
|
-
const value = formik.values[name];
|
|
57
|
-
try {
|
|
58
|
-
JSON.parse(value);
|
|
59
|
-
return value;
|
|
60
|
-
} catch {
|
|
61
|
-
const defaultValue = {
|
|
62
|
-
root: {
|
|
63
|
-
children: [{
|
|
64
|
-
children: [{
|
|
65
|
-
detail: 0,
|
|
66
|
-
format: 0,
|
|
67
|
-
mode: 'normal',
|
|
68
|
-
style: '',
|
|
69
|
-
text: '',
|
|
70
|
-
type: 'text',
|
|
71
|
-
version: 1
|
|
72
|
-
}],
|
|
73
|
-
direction: 'ltr',
|
|
74
|
-
format: '',
|
|
75
|
-
indent: 0,
|
|
76
|
-
type: 'paragraph',
|
|
77
|
-
version: 1
|
|
78
|
-
}],
|
|
79
|
-
direction: 'ltr',
|
|
80
|
-
format: '',
|
|
81
|
-
indent: 0,
|
|
82
|
-
type: 'root',
|
|
83
|
-
version: 1
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
defaultValue.root.children[0].children[0].text = value;
|
|
87
|
-
return JSON.stringify(defaultValue);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
const onChange = state => {
|
|
91
|
-
formik.setValues({
|
|
92
|
-
...formik.values,
|
|
93
|
-
[name]: JSON.stringify(state)
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
const initialConfig = {
|
|
97
|
-
nameSpace: name,
|
|
98
|
-
editable: !disabled,
|
|
99
|
-
editorState: setInitialValue(),
|
|
100
|
-
theme: {
|
|
101
|
-
text: {
|
|
102
|
-
italic: 'italic',
|
|
103
|
-
strikethrough: 'strikethrough',
|
|
104
|
-
underline: 'underlined'
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
nodes: [_link.AutoLinkNode, _link.LinkNode, _list.ListNode, _list.ListItemNode]
|
|
108
|
-
};
|
|
109
|
-
return /*#__PURE__*/React.createElement(_LexicalComposer.LexicalComposer, {
|
|
110
|
-
initialConfig: initialConfig
|
|
111
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
112
|
-
id: id,
|
|
113
|
-
className: [baseClassName, componentClassName, userClassName, `y-${color}`, disabled && 'disabled'].filter(e => e).join(' '),
|
|
114
|
-
style: {
|
|
115
|
-
...style,
|
|
116
|
-
'--resize': resize,
|
|
117
|
-
'--rows': `${rows}em`
|
|
118
|
-
}
|
|
119
|
-
}, /*#__PURE__*/React.createElement(_common.FormLabelV2, {
|
|
120
|
-
name: name,
|
|
121
|
-
color: labelColor,
|
|
122
|
-
optional: optional
|
|
123
|
-
}, label), !disabled && /*#__PURE__*/React.createElement(_common2.Toolbar, null), /*#__PURE__*/React.createElement(_LexicalRichTextPlugin.RichTextPlugin, {
|
|
124
|
-
contentEditable: /*#__PURE__*/React.createElement(_LexicalContentEditable.ContentEditable, {
|
|
125
|
-
id: name,
|
|
126
|
-
className: "content-editable"
|
|
127
|
-
})
|
|
128
|
-
}), /*#__PURE__*/React.createElement(_LexicalOnChangePlugin.OnChangePlugin, {
|
|
129
|
-
onChange: onChange
|
|
130
|
-
}), /*#__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(_common.FormDescriptionV2, {
|
|
131
|
-
className: "s-1",
|
|
132
|
-
description: description,
|
|
133
|
-
name: name
|
|
134
|
-
}), showDebugger && /*#__PURE__*/React.createElement(_common2.TreeViewPlugin, null)));
|
|
135
|
-
};
|
|
136
|
-
EditorInput.propTypes = {
|
|
137
|
-
/**
|
|
138
|
-
* The HTML id for this element
|
|
139
|
-
*/
|
|
140
|
-
id: _propTypes.default.string,
|
|
141
|
-
/**
|
|
142
|
-
* The HTML class names for this element
|
|
143
|
-
*/
|
|
144
|
-
className: _propTypes.default.string,
|
|
145
|
-
/**
|
|
146
|
-
* The React-written, css properties for this element.
|
|
147
|
-
*/
|
|
148
|
-
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
149
|
-
/**
|
|
150
|
-
* The input name (html - and Formik state)
|
|
151
|
-
*/
|
|
152
|
-
name: _propTypes.default.string.isRequired,
|
|
153
|
-
/**
|
|
154
|
-
* The input label
|
|
155
|
-
*/
|
|
156
|
-
label: _propTypes.default.string.isRequired,
|
|
157
|
-
/**
|
|
158
|
-
* The input value validator function
|
|
159
|
-
*/
|
|
160
|
-
// validate:PropTypes.func,
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* The number of rows int the text area
|
|
164
|
-
*/
|
|
165
|
-
rows: _propTypes.default.number,
|
|
166
|
-
/**
|
|
167
|
-
* Color of the text
|
|
168
|
-
*/
|
|
169
|
-
color: _propTypes.default.string,
|
|
170
|
-
/**
|
|
171
|
-
* Label base color
|
|
172
|
-
*/
|
|
173
|
-
labelColor: _propTypes.default.string,
|
|
174
|
-
/**
|
|
175
|
-
* Text area description
|
|
176
|
-
*/
|
|
177
|
-
description: _propTypes.default.string,
|
|
178
|
-
/**
|
|
179
|
-
* Whether the text area should be disabled
|
|
180
|
-
*/
|
|
181
|
-
disabled: _propTypes.default.bool,
|
|
182
|
-
/**
|
|
183
|
-
* Whether the input is optional or not
|
|
184
|
-
*/
|
|
185
|
-
optional: _propTypes.default.bool,
|
|
186
|
-
/**
|
|
187
|
-
* The resize property of the text area
|
|
188
|
-
*/
|
|
189
|
-
resize: _propTypes.default.oneOf(['none', 'both', 'horizontal', 'vertical'])
|
|
190
|
-
};
|
|
191
|
-
EditorInput.defaultProps = {
|
|
192
|
-
rows: 10,
|
|
193
|
-
disabled: false,
|
|
194
|
-
color: 'paragraph',
|
|
195
|
-
resize: 'vertical'
|
|
196
|
-
};
|
|
197
|
-
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(EditorInput);
|
|
@@ -1,257 +0,0 @@
|
|
|
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 _lexical = require("lexical");
|
|
10
|
-
var _list = require("@lexical/list");
|
|
11
|
-
var _selection = require("@lexical/selection");
|
|
12
|
-
var _link = require("@lexical/link");
|
|
13
|
-
var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
14
|
-
var _utils = require("@lexical/utils");
|
|
15
|
-
var _ = require("../../../../..");
|
|
16
|
-
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
17
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
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); }
|
|
19
|
-
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; }
|
|
20
|
-
/* eslint-disable import/no-extraneous-dependencies -- required here */
|
|
21
|
-
|
|
22
|
-
const baseClassName = _exports.default.base;
|
|
23
|
-
const componentClassName = 'toolbar';
|
|
24
|
-
const getSelectedNode = selection => {
|
|
25
|
-
const {
|
|
26
|
-
anchor,
|
|
27
|
-
focus
|
|
28
|
-
} = selection;
|
|
29
|
-
const anchorNode = selection.anchor.getNode();
|
|
30
|
-
const focusNode = selection.focus.getNode();
|
|
31
|
-
if (anchorNode === focusNode) {
|
|
32
|
-
return anchorNode;
|
|
33
|
-
}
|
|
34
|
-
const isBackward = selection.isBackward();
|
|
35
|
-
if (isBackward) {
|
|
36
|
-
return (0, _selection.$isAtNodeEnd)(focus) ? anchorNode : focusNode;
|
|
37
|
-
}
|
|
38
|
-
return (0, _selection.$isAtNodeEnd)(anchor) ? focusNode : anchorNode;
|
|
39
|
-
};
|
|
40
|
-
const defaultColor = 'var(--paragraph)';
|
|
41
|
-
const colorOptions = ['red', 'blue', 'green', 'yellow', 'orange', 'purple', 'pink', 'brown'];
|
|
42
|
-
const Toolbar = () => {
|
|
43
|
-
const [editor] = (0, _LexicalComposerContext.useLexicalComposerContext)();
|
|
44
|
-
const [isBold, setIsBold] = (0, _react.useState)(false);
|
|
45
|
-
const [isItalic, setIsItalic] = (0, _react.useState)(false);
|
|
46
|
-
const [isStrikethrough, setIsStrikethrough] = (0, _react.useState)(false);
|
|
47
|
-
const [blockType, setBlockType] = (0, _react.useState)('paragraph');
|
|
48
|
-
const [isLink, setIsLink] = (0, _react.useState)(false);
|
|
49
|
-
const [isUnderline, setIsUnderline] = (0, _react.useState)(false);
|
|
50
|
-
const [color, setColor] = (0, _react.useState)(defaultColor);
|
|
51
|
-
const colorMenuRef = (0, _react.useRef)(false);
|
|
52
|
-
const formatBulletList = () => {
|
|
53
|
-
if (blockType !== 'ul') {
|
|
54
|
-
editor.dispatchCommand(_list.INSERT_UNORDERED_LIST_COMMAND);
|
|
55
|
-
} else {
|
|
56
|
-
editor.dispatchCommand(_list.REMOVE_LIST_COMMAND);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const formatNumberedList = () => {
|
|
60
|
-
if (blockType !== 'ol') {
|
|
61
|
-
editor.dispatchCommand(_list.INSERT_ORDERED_LIST_COMMAND);
|
|
62
|
-
} else {
|
|
63
|
-
editor.dispatchCommand(_list.REMOVE_LIST_COMMAND);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
const formatLink = (0, _react.useCallback)(() => {
|
|
67
|
-
if (!isLink) {
|
|
68
|
-
// eslint-disable-next-line no-alert
|
|
69
|
-
const path = prompt('Enter the full URL. Ex: https://www.example.com');
|
|
70
|
-
editor.dispatchCommand(_link.TOGGLE_LINK_COMMAND, path);
|
|
71
|
-
} else {
|
|
72
|
-
editor.dispatchCommand(_link.TOGGLE_LINK_COMMAND, null);
|
|
73
|
-
}
|
|
74
|
-
}, [editor, isLink]);
|
|
75
|
-
const updateToolbar = (0, _react.useCallback)(() => {
|
|
76
|
-
const selection = (0, _lexical.$getSelection)();
|
|
77
|
-
|
|
78
|
-
// Check list selection
|
|
79
|
-
if ((0, _lexical.$isRangeSelection)(selection)) {
|
|
80
|
-
const anchorNode = selection.anchor.getNode();
|
|
81
|
-
const element = anchorNode.getKey() === 'root' ? anchorNode : anchorNode.getTopLevelElementOrThrow();
|
|
82
|
-
if ((0, _list.$isListNode)(element)) {
|
|
83
|
-
const parentList = (0, _utils.$getNearestNodeOfType)(anchorNode, _list.ListNode);
|
|
84
|
-
const type = parentList ? parentList.getTag() : element.getTag();
|
|
85
|
-
setBlockType(type);
|
|
86
|
-
} else {
|
|
87
|
-
setBlockType(element);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Check nodes for color
|
|
91
|
-
const nodes = selection.getNodes().filter(node => node.getType() === 'text');
|
|
92
|
-
nodes.forEach(node => {
|
|
93
|
-
const style = node.getStyle();
|
|
94
|
-
const colorProperty = style.match(/color: ([^;]+)/);
|
|
95
|
-
if (colorProperty) {
|
|
96
|
-
setColor(colorProperty[1]);
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
setColor(false);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
// Check selection text styles
|
|
103
|
-
setIsBold(selection.hasFormat('bold'));
|
|
104
|
-
setIsItalic(selection.hasFormat('italic'));
|
|
105
|
-
setIsStrikethrough(selection.hasFormat('strikethrough'));
|
|
106
|
-
setIsUnderline(selection.hasFormat('underline'));
|
|
107
|
-
setIsLink(selection.hasFormat('link'));
|
|
108
|
-
|
|
109
|
-
// Check links
|
|
110
|
-
const node = getSelectedNode(selection);
|
|
111
|
-
const parent = node.getParent();
|
|
112
|
-
if ((0, _link.$isLinkNode)(parent) || (0, _link.$isLinkNode)(node)) {
|
|
113
|
-
setIsLink(true);
|
|
114
|
-
} else {
|
|
115
|
-
setIsLink(false);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}, [editor]);
|
|
119
|
-
const UPDATE_COLOR_COMMAND = (0, _lexical.createCommand)();
|
|
120
|
-
editor.registerCommand(UPDATE_COLOR_COMMAND, payload => {
|
|
121
|
-
const selection = (0, _lexical.$getSelection)();
|
|
122
|
-
const nodes = selection?.extract().filter(node => node.getType() === 'text');
|
|
123
|
-
nodes?.forEach(node => {
|
|
124
|
-
const style = node.getStyle();
|
|
125
|
-
const colorProperty = style?.match(/color: ([^;]+)/);
|
|
126
|
-
if (colorProperty && color !== payload) {
|
|
127
|
-
node.setStyle(style.replace(colorProperty[0], `color: ${payload}`));
|
|
128
|
-
} else if (colorProperty) {
|
|
129
|
-
node.setStyle(`color: ${defaultColor}`);
|
|
130
|
-
} else {
|
|
131
|
-
node.setStyle(`color: ${payload}`);
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
}, _lexical.COMMAND_PRIORITY_NORMAL);
|
|
135
|
-
(0, _react.useEffect)(() => (0, _utils.mergeRegister)(editor.registerUpdateListener(_ref => {
|
|
136
|
-
let {
|
|
137
|
-
editorState
|
|
138
|
-
} = _ref;
|
|
139
|
-
editorState.read(() => {
|
|
140
|
-
updateToolbar();
|
|
141
|
-
});
|
|
142
|
-
})), [updateToolbar, editor]);
|
|
143
|
-
const dispatchUpdateColor = (0, _react.useCallback)((e, payload) => {
|
|
144
|
-
e.stopPropagation();
|
|
145
|
-
editor.dispatchCommand(UPDATE_COLOR_COMMAND, payload);
|
|
146
|
-
}, [editor]);
|
|
147
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
148
|
-
className: `${baseClassName} ${componentClassName}`
|
|
149
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
150
|
-
className: "group"
|
|
151
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
152
|
-
type: "button",
|
|
153
|
-
className: isBold ? 'active' : undefined,
|
|
154
|
-
onClick: () => editor.dispatchCommand(_lexical.FORMAT_TEXT_COMMAND, 'bold')
|
|
155
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
156
|
-
className: "icon"
|
|
157
|
-
}, "|")), /*#__PURE__*/React.createElement("button", {
|
|
158
|
-
type: "button",
|
|
159
|
-
className: isItalic ? 'active' : undefined,
|
|
160
|
-
onClick: () => editor.dispatchCommand(_lexical.FORMAT_TEXT_COMMAND, 'italic')
|
|
161
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
162
|
-
className: "icon"
|
|
163
|
-
}, "}")), /*#__PURE__*/React.createElement("button", {
|
|
164
|
-
type: "button",
|
|
165
|
-
className: isUnderline ? 'active' : undefined,
|
|
166
|
-
onClick: () => editor.dispatchCommand(_lexical.FORMAT_TEXT_COMMAND, 'underline')
|
|
167
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
168
|
-
className: "icon"
|
|
169
|
-
}, "~")), /*#__PURE__*/React.createElement("button", {
|
|
170
|
-
type: "button",
|
|
171
|
-
className: isStrikethrough ? 'active' : undefined,
|
|
172
|
-
onClick: () => editor.dispatchCommand(_lexical.FORMAT_TEXT_COMMAND, 'strikethrough')
|
|
173
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
174
|
-
className: "icon"
|
|
175
|
-
}, "?")), /*#__PURE__*/React.createElement("button", {
|
|
176
|
-
type: "button",
|
|
177
|
-
className: color && color !== defaultColor ? 'active color-menu-button' : 'color-menu-button',
|
|
178
|
-
onClick: () => editor.dispatchCommand(UPDATE_COLOR_COMMAND, color !== defaultColor ? defaultColor : color),
|
|
179
|
-
ref: colorMenuRef,
|
|
180
|
-
style: {
|
|
181
|
-
position: 'relative'
|
|
182
|
-
}
|
|
183
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
184
|
-
className: "icon",
|
|
185
|
-
style: {
|
|
186
|
-
color
|
|
187
|
-
}
|
|
188
|
-
}, "Q"), /*#__PURE__*/React.createElement(_.Popover, {
|
|
189
|
-
parentRef: colorMenuRef
|
|
190
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
191
|
-
className: "color-menu"
|
|
192
|
-
}, colorOptions.map(option => /*#__PURE__*/React.createElement("span", {
|
|
193
|
-
role: "button",
|
|
194
|
-
className: "icon color-option",
|
|
195
|
-
style: {
|
|
196
|
-
color: option
|
|
197
|
-
},
|
|
198
|
-
onClick: e => dispatchUpdateColor(e, option),
|
|
199
|
-
onKeyDown: e => dispatchUpdateColor(e, option),
|
|
200
|
-
tabIndex: 0,
|
|
201
|
-
key: option
|
|
202
|
-
}, "o"))))), /*#__PURE__*/React.createElement("button", {
|
|
203
|
-
type: "button",
|
|
204
|
-
className: isLink ? 'active' : undefined,
|
|
205
|
-
onClick: () => formatLink()
|
|
206
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
207
|
-
className: "icon"
|
|
208
|
-
}, "]")), /*#__PURE__*/React.createElement("button", {
|
|
209
|
-
type: "button",
|
|
210
|
-
className: blockType === 'ul' ? 'active' : undefined,
|
|
211
|
-
onClick: () => formatBulletList()
|
|
212
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
213
|
-
className: "icon"
|
|
214
|
-
}, ".")), /*#__PURE__*/React.createElement("button", {
|
|
215
|
-
type: "button",
|
|
216
|
-
className: blockType === 'ol' ? 'active' : undefined,
|
|
217
|
-
onClick: () => formatNumberedList()
|
|
218
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
219
|
-
className: "icon"
|
|
220
|
-
}, "-"))), /*#__PURE__*/React.createElement("div", {
|
|
221
|
-
className: "group"
|
|
222
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
223
|
-
type: "button",
|
|
224
|
-
onClick: () => editor.dispatchCommand(_lexical.FORMAT_ELEMENT_COMMAND, 'left')
|
|
225
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
226
|
-
className: "icon"
|
|
227
|
-
}, "^")), /*#__PURE__*/React.createElement("button", {
|
|
228
|
-
type: "button",
|
|
229
|
-
onClick: () => editor.dispatchCommand(_lexical.FORMAT_ELEMENT_COMMAND, 'center')
|
|
230
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
231
|
-
className: "icon"
|
|
232
|
-
}, "_")), /*#__PURE__*/React.createElement("button", {
|
|
233
|
-
type: "button",
|
|
234
|
-
onClick: () => editor.dispatchCommand(_lexical.FORMAT_ELEMENT_COMMAND, 'right')
|
|
235
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
236
|
-
className: "icon"
|
|
237
|
-
}, "`")), /*#__PURE__*/React.createElement("button", {
|
|
238
|
-
type: "button",
|
|
239
|
-
onClick: () => editor.dispatchCommand(_lexical.FORMAT_ELEMENT_COMMAND, 'justify')
|
|
240
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
241
|
-
className: "icon"
|
|
242
|
-
}, "{"))), /*#__PURE__*/React.createElement("div", {
|
|
243
|
-
className: "group"
|
|
244
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
245
|
-
type: "button",
|
|
246
|
-
onClick: () => editor.dispatchCommand(_lexical.UNDO_COMMAND)
|
|
247
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
248
|
-
className: "icon"
|
|
249
|
-
}, "\\")), /*#__PURE__*/React.createElement("button", {
|
|
250
|
-
type: "button",
|
|
251
|
-
className: "flip",
|
|
252
|
-
onClick: () => editor.dispatchCommand(_lexical.REDO_COMMAND)
|
|
253
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
254
|
-
className: "icon"
|
|
255
|
-
}, "\\"))));
|
|
256
|
-
};
|
|
257
|
-
var _default = exports.default = Toolbar;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _LexicalComposerContext = require("@lexical/react/LexicalComposerContext");
|
|
9
|
-
var _LexicalTreeView = require("@lexical/react/LexicalTreeView");
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
const TreeViewPlugin = () => {
|
|
12
|
-
const [editor] = (0, _LexicalComposerContext.useLexicalComposerContext)();
|
|
13
|
-
return /*#__PURE__*/_react.default.createElement(_LexicalTreeView.TreeView, {
|
|
14
|
-
viewClassName: "tree-view-output",
|
|
15
|
-
editor: editor
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
var _default = exports.default = TreeViewPlugin;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Toolbar", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Toolbar.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "TreeViewPlugin", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _TreeViewPlugin.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _Toolbar = _interopRequireDefault(require("./Toolbar"));
|
|
19
|
-
var _TreeViewPlugin = _interopRequireDefault(require("./TreeViewPlugin"));
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "EditorInput", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _EditorInput.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _EditorInput = _interopRequireDefault(require("./EditorInput"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
|
|
3
|
-
@use "@pareto-engineering/bem";
|
|
4
|
-
@use "@pareto-engineering/styles/src/mixins";
|
|
5
|
-
@use "@pareto-engineering/styles/src/globals" as *;
|
|
6
|
-
|
|
7
|
-
$default-gap: calc(var(--gap) / 2);
|
|
8
|
-
$default-padding: .55em .75em;
|
|
9
|
-
$default-border: 1px solid var(--outline-inputs);
|
|
10
|
-
$default-input-border-radius: var(--theme-default-input-border-radius);
|
|
11
|
-
$default-border: var(--theme-default-input-border);
|
|
12
|
-
$focus-border: var(--theme-focus-input-border);
|
|
13
|
-
$active-background: var(--hard-background-inputs);
|
|
14
|
-
$default-background: var(--background-inputs);
|
|
15
|
-
$default-icon-color: var(--on-background-inputs);
|
|
16
|
-
$disabled-background: var(--background-inputs-30);
|
|
17
|
-
$default-color-menu-padding: .5em .25em;
|
|
18
|
-
|
|
19
|
-
.#{bem.$base}.editor-input {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
|
|
23
|
-
> .#{bem.$base}.form-label {
|
|
24
|
-
margin-bottom: var(--gap);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
> .#{bem.$base}.toolbar {
|
|
28
|
-
display: flex;
|
|
29
|
-
gap: $default-gap;
|
|
30
|
-
margin-bottom: .25em;
|
|
31
|
-
|
|
32
|
-
> .group {
|
|
33
|
-
> button {
|
|
34
|
-
background: $default-background;
|
|
35
|
-
border: $default-border;
|
|
36
|
-
color: $default-icon-color;
|
|
37
|
-
padding: $default-padding;
|
|
38
|
-
|
|
39
|
-
&.active {
|
|
40
|
-
background-color: $active-background;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.flip {
|
|
46
|
-
transform: scaleX(-1);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:not(.disabled) {
|
|
51
|
-
&:hover,
|
|
52
|
-
&:focus,
|
|
53
|
-
&:active {
|
|
54
|
-
> .textarea {
|
|
55
|
-
border: $focus-border;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&.disabled {
|
|
61
|
-
> .textarea {
|
|
62
|
-
background: $disabled-background;
|
|
63
|
-
color: var(--metadata);
|
|
64
|
-
cursor: not-allowed;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.color-menu-button {
|
|
69
|
-
&:hover {
|
|
70
|
-
> .#{bem.$base}.popover {
|
|
71
|
-
display: block;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
> .#{bem.$base}.popover {
|
|
76
|
-
padding: $default-color-menu-padding;
|
|
77
|
-
|
|
78
|
-
.color-menu {
|
|
79
|
-
display: flex;
|
|
80
|
-
flex-wrap: wrap;
|
|
81
|
-
gap: calc($default-gap / 2);
|
|
82
|
-
justify-content: center;
|
|
83
|
-
max-width: 10em;
|
|
84
|
-
min-width: 5em;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.color-option:hover {
|
|
88
|
-
opacity: .5;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
> .content-editable {
|
|
94
|
-
background: $default-background;
|
|
95
|
-
border: $default-border;
|
|
96
|
-
border-radius: $default-input-border-radius;
|
|
97
|
-
color: var(--y);
|
|
98
|
-
height: var(--rows);
|
|
99
|
-
outline: none;
|
|
100
|
-
overflow: auto;
|
|
101
|
-
padding: $default-padding;
|
|
102
|
-
resize: var(--resize);
|
|
103
|
-
width: 100%;
|
|
104
|
-
|
|
105
|
-
li:has(ol, ul) {
|
|
106
|
-
list-style-type: none;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
p,
|
|
110
|
-
span,
|
|
111
|
-
strong,
|
|
112
|
-
em,
|
|
113
|
-
li {
|
|
114
|
-
&.underlined {
|
|
115
|
-
text-decoration: underline;
|
|
116
|
-
|
|
117
|
-
&.strikethrough {
|
|
118
|
-
text-decoration: underline line-through;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&.strikethrough {
|
|
123
|
-
text-decoration: line-through;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&.italic {
|
|
127
|
-
font-style: italic;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
:first-child {
|
|
132
|
-
margin-top: 0;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&::placeholder {
|
|
136
|
-
color: var(--metadata);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
> .tree-view-output {
|
|
142
|
-
background: $default-background;
|
|
143
|
-
border: $default-border;
|
|
144
|
-
border-radius: $default-input-border-radius;
|
|
145
|
-
max-height: 20em;
|
|
146
|
-
overflow: auto;
|
|
147
|
-
padding: $default-padding;
|
|
148
|
-
}
|
|
149
|
-
}
|