@appcorp/app-corp-vista 0.0.74 → 0.0.76
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/molecules/vista-select-v1/vista-select-v1.js +17 -16
- package/organisms/vista-mdx-editor-v1/vista-mdx-editor-v1.d.ts +4 -0
- package/organisms/vista-mdx-editor-v1/vista-mdx-editor-v1.js +48 -0
- package/package.json +2 -2
- package/type/vista-combobox-type.d.ts +1 -1
- package/type/vista-mdx-editor-type.d.ts +5 -0
- package/type/vista-comboboxes-type.d.ts +0 -21
- /package/type/{vista-comboboxes-type.js → vista-mdx-editor-type.js} +0 -0
|
@@ -10,21 +10,22 @@ var react_2 = require("@headlessui/react");
|
|
|
10
10
|
var solid_1 = require("@heroicons/react/20/solid");
|
|
11
11
|
var VistaSelectV1 = function (_a) {
|
|
12
12
|
var handleOnChange = _a.handleOnChange, label = _a.label, listItems = _a.listItems, nodeSelectedKey = _a.nodeSelectedKey, _b = _a.required, required = _b === void 0 ? false : _b, selectKey1 = _a.selectKey1, selectKey2 = _a.selectKey2, selectedItem = _a.selectedItem;
|
|
13
|
-
return (react_1.default.createElement(
|
|
14
|
-
|
|
15
|
-
label,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
react_1.default.createElement(
|
|
20
|
-
react_1.default.createElement(
|
|
21
|
-
|
|
22
|
-
react_1.default.createElement(
|
|
23
|
-
|
|
24
|
-
react_1.default.createElement("
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
return (react_1.default.createElement("div", null,
|
|
14
|
+
react_1.default.createElement(react_2.Listbox, { value: selectedItem, onChange: function (v) { return handleOnChange(nodeSelectedKey, v); } },
|
|
15
|
+
label && (react_1.default.createElement(react_2.Label, { className: "block text-sm/6 font-medium text-gray-900 dark:text-white" },
|
|
16
|
+
label,
|
|
17
|
+
" ",
|
|
18
|
+
required && react_1.default.createElement("sup", { className: "text-red-500" }, "*"))),
|
|
19
|
+
react_1.default.createElement("div", { className: "relative ".concat(label ? 'mt-2' : '') },
|
|
20
|
+
react_1.default.createElement(react_2.ListboxButton, { className: "relative w-full cursor-default rounded-md bg-white/5 dark:bg-white/5 py-1.5 pl-3 pr-10 text-left text-gray-900 dark:text-white shadow-sm ring-1 ring-inset ring-gray-500 focus:ring-2 focus:ring-inset focus:ring-primary sm:text-sm/6" },
|
|
21
|
+
react_1.default.createElement("span", { className: "block truncate" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem[selectKey1]),
|
|
22
|
+
react_1.default.createElement("span", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2" },
|
|
23
|
+
react_1.default.createElement(solid_1.ChevronUpDownIcon, { "aria-hidden": "true", className: "size-5 text-gray-900 dark:text-white" }))),
|
|
24
|
+
react_1.default.createElement(react_2.ListboxOptions, { className: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-gray-200 dark:bg-gray-700 py-1 text-base shadow-lg ring-1 ring-black/5 focus:outline-none data-[closed]:data-[leave]:opacity-0 data-[leave]:transition data-[leave]:duration-100 data-[leave]:ease-in sm:text-sm", transition: true }, listItems.map(function (item) { return (react_1.default.createElement(react_2.ListboxOption, { key: item[selectKey1], className: "group relative cursor-default select-none py-2 pl-3 pr-9 text-gray-900 dark:text-white data-[focus]:bg-primary data-[focus]:text-white", value: item[selectKey1] },
|
|
25
|
+
react_1.default.createElement("span", { className: "block truncate font-normal group-data-[selected]:font-semibold" },
|
|
26
|
+
item[selectKey1],
|
|
27
|
+
" ",
|
|
28
|
+
item[selectKey2]),
|
|
29
|
+
react_1.default.createElement("span", { className: "absolute inset-y-0 right-0 flex items-center pr-4 text-primary group-data-[focus]:text-white" }, (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem[selectKey1]) === item[selectKey1] && react_1.default.createElement(solid_1.CheckIcon, { "aria-hidden": "true", className: "size-5" })))); }))))));
|
|
29
30
|
};
|
|
30
31
|
exports.VistaSelectV1 = VistaSelectV1;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '@mdxeditor/editor/style.css';
|
|
3
|
+
import { VistaMdxEditorV1Props } from '../../type/vista-mdx-editor-type';
|
|
4
|
+
export declare function VistaMdxEditorV1({ editorClassName, markdown, onChangeHandler, }: VistaMdxEditorV1Props): React.JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.VistaMdxEditorV1 = VistaMdxEditorV1;
|
|
8
|
+
var react_1 = __importDefault(require("react"));
|
|
9
|
+
var editor_1 = require("@mdxeditor/editor");
|
|
10
|
+
require("@mdxeditor/editor/style.css");
|
|
11
|
+
function VistaMdxEditorV1(_a) {
|
|
12
|
+
var _b = _a.editorClassName, editorClassName = _b === void 0 ? 'light-theme light-editor' : _b, markdown = _a.markdown, onChangeHandler = _a.onChangeHandler;
|
|
13
|
+
return (react_1.default.createElement(editor_1.MDXEditor, { autoFocus: true, className: "".concat(editorClassName), contentEditableClassName: 'prose', markdown: markdown, onChange: function (v) { return onChangeHandler('content', v); }, plugins: [
|
|
14
|
+
(0, editor_1.listsPlugin)(),
|
|
15
|
+
(0, editor_1.quotePlugin)(),
|
|
16
|
+
(0, editor_1.headingsPlugin)(),
|
|
17
|
+
(0, editor_1.linkPlugin)(),
|
|
18
|
+
(0, editor_1.linkDialogPlugin)(),
|
|
19
|
+
(0, editor_1.imagePlugin)(),
|
|
20
|
+
(0, editor_1.tablePlugin)(),
|
|
21
|
+
(0, editor_1.thematicBreakPlugin)(),
|
|
22
|
+
(0, editor_1.frontmatterPlugin)(),
|
|
23
|
+
(0, editor_1.codeBlockPlugin)({
|
|
24
|
+
defaultCodeBlockLanguage: 'js',
|
|
25
|
+
}),
|
|
26
|
+
// sandpackPlugin(),
|
|
27
|
+
(0, editor_1.codeMirrorPlugin)({
|
|
28
|
+
codeBlockLanguages: {
|
|
29
|
+
js: 'JavaScript',
|
|
30
|
+
css: 'CSS',
|
|
31
|
+
txt: 'text',
|
|
32
|
+
tsx: 'TypeScript',
|
|
33
|
+
}
|
|
34
|
+
}),
|
|
35
|
+
(0, editor_1.diffSourcePlugin)({ diffMarkdown: '', viewMode: 'rich-text' }),
|
|
36
|
+
(0, editor_1.markdownShortcutPlugin)(),
|
|
37
|
+
(0, editor_1.directivesPlugin)({
|
|
38
|
+
directiveDescriptors: [
|
|
39
|
+
editor_1.AdmonitionDirectiveDescriptor,
|
|
40
|
+
],
|
|
41
|
+
}),
|
|
42
|
+
(0, editor_1.toolbarPlugin)({
|
|
43
|
+
toolbarContents: function () { return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
44
|
+
react_1.default.createElement(editor_1.KitchenSinkToolbar, null))); }
|
|
45
|
+
})
|
|
46
|
+
] }));
|
|
47
|
+
}
|
|
48
|
+
;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appcorp/app-corp-vista",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.76",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
|
|
6
6
|
"build:next": "next build",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@heroicons/react": "^2.2.0",
|
|
37
37
|
"@mdx-js/loader": "^3.1.0",
|
|
38
38
|
"@mdx-js/react": "^3.1.0",
|
|
39
|
-
"@mdxeditor/editor": "^3.21.
|
|
39
|
+
"@mdxeditor/editor": "^3.21.4",
|
|
40
40
|
"@next/third-parties": "^15",
|
|
41
41
|
"@react-jvectormap/core": "^1.0.4",
|
|
42
42
|
"@react-jvectormap/world": "^1.1.2",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface VistaComboboxesV1Props {
|
|
2
|
-
handleInputOnChange: (k: string, v: string) => void;
|
|
3
|
-
handleOnBlur: (k: string, v: string) => void;
|
|
4
|
-
handleOnChange: (k: string, v: string) => void;
|
|
5
|
-
label: string;
|
|
6
|
-
listItems: any[];
|
|
7
|
-
nodeQueryKey: string;
|
|
8
|
-
nodeSelectKey: string;
|
|
9
|
-
query: string;
|
|
10
|
-
selectKey1: string;
|
|
11
|
-
selectedItem: any;
|
|
12
|
-
labelClassName?: string;
|
|
13
|
-
comboboxClassName?: string;
|
|
14
|
-
comboboxInputClassName?: string;
|
|
15
|
-
comboboxButtonClassName?: string;
|
|
16
|
-
comboboxOptionsClassName?: string;
|
|
17
|
-
comboboxOptionClassName?: string;
|
|
18
|
-
checkClassName?: string;
|
|
19
|
-
inputIconClassName?: string;
|
|
20
|
-
placeholder: string;
|
|
21
|
-
}
|
|
File without changes
|