dn-react-router-toolkit 0.7.6 → 0.7.8
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/api/create_api_handler.d.mts +5 -5
- package/dist/api/create_api_handler.d.ts +5 -5
- package/dist/api/index.d.mts +7 -0
- package/dist/api/index.d.ts +7 -0
- package/dist/api/index.js +163 -2
- package/dist/api/index.mjs +169 -1
- package/dist/client/env_loader.d.mts +2 -2
- package/dist/client/env_loader.d.ts +2 -2
- package/dist/client/env_loader.js +2 -12
- package/dist/client/env_loader.mjs +2 -2
- package/dist/client/file_input.d.mts +3 -2
- package/dist/client/file_input.d.ts +3 -2
- package/dist/client/file_input.js +30 -37
- package/dist/client/file_input.mjs +33 -28
- package/dist/client/index.d.mts +1 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +38 -44
- package/dist/client/index.mjs +39 -33
- package/dist/client/store_text_editor.d.mts +2 -2
- package/dist/client/store_text_editor.d.ts +2 -2
- package/dist/client/store_text_editor.js +3 -12
- package/dist/client/store_text_editor.mjs +3 -2
- package/dist/crud/crud_form.d.mts +5 -4
- package/dist/crud/crud_form.d.ts +5 -4
- package/dist/crud/crud_form.js +74 -72
- package/dist/crud/crud_form.mjs +79 -62
- package/dist/crud/crud_form_provider.d.mts +9 -7
- package/dist/crud/crud_form_provider.d.ts +9 -7
- package/dist/crud/crud_form_provider.js +2 -12
- package/dist/crud/crud_form_provider.mjs +6 -3
- package/dist/crud/crud_page.d.mts +10 -6
- package/dist/crud/crud_page.d.ts +10 -6
- package/dist/crud/crud_page.js +272 -409
- package/dist/crud/crud_page.mjs +277 -399
- package/dist/crud/generate_pages.d.mts +10 -2
- package/dist/crud/generate_pages.d.ts +10 -2
- package/dist/crud/generate_pages.js +17 -14
- package/dist/crud/generate_pages.mjs +17 -4
- package/dist/crud/index.d.mts +2 -1
- package/dist/crud/index.d.ts +2 -1
- package/dist/crud/index.js +290 -404
- package/dist/crud/index.mjs +295 -404
- package/dist/form/create_form_component.d.mts +3 -2
- package/dist/form/create_form_component.d.ts +3 -2
- package/dist/form/create_form_component.js +3 -12
- package/dist/form/create_form_component.mjs +3 -2
- package/dist/form/form_components.d.mts +5 -4
- package/dist/form/form_components.d.ts +5 -4
- package/dist/form/form_components.js +3 -12
- package/dist/form/form_components.mjs +3 -2
- package/dist/form/index.d.mts +1 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/form/index.js +3 -12
- package/dist/form/index.mjs +3 -2
- package/dist/post/editor_toolbar.d.mts +4 -3
- package/dist/post/editor_toolbar.d.ts +4 -3
- package/dist/post/editor_toolbar.js +116 -273
- package/dist/post/editor_toolbar.mjs +123 -263
- package/dist/post/index.d.mts +1 -0
- package/dist/post/index.d.ts +1 -0
- package/dist/post/index.js +329 -411
- package/dist/post/index.mjs +337 -409
- package/dist/post/post_form_page.d.mts +5 -4
- package/dist/post/post_form_page.d.ts +5 -4
- package/dist/post/post_form_page.js +331 -413
- package/dist/post/post_form_page.mjs +337 -409
- package/dist/post/thumbnail_picker.d.mts +3 -2
- package/dist/post/thumbnail_picker.d.ts +3 -2
- package/dist/post/thumbnail_picker.js +14 -23
- package/dist/post/thumbnail_picker.mjs +14 -13
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.d.ts +1 -1
- package/dist/seo/index.js +2 -2
- package/dist/seo/index.mjs +2 -2
- package/dist/seo/seo.d.mts +2 -2
- package/dist/seo/seo.d.ts +2 -2
- package/dist/seo/seo.js +2 -2
- package/dist/seo/seo.mjs +2 -2
- package/dist/table/buttons.d.mts +2 -2
- package/dist/table/buttons.d.ts +2 -2
- package/dist/table/buttons.js +42 -57
- package/dist/table/buttons.mjs +42 -47
- package/dist/table/index.d.mts +1 -0
- package/dist/table/index.d.ts +1 -0
- package/dist/table/index.js +185 -338
- package/dist/table/index.mjs +185 -328
- package/dist/table/page.d.mts +5 -4
- package/dist/table/page.d.ts +5 -4
- package/dist/table/page.js +185 -338
- package/dist/table/page.mjs +185 -328
- package/dist/table/table.d.mts +5 -4
- package/dist/table/table.d.ts +5 -4
- package/dist/table/table.js +77 -237
- package/dist/table/table.mjs +77 -227
- package/package.json +7 -5
package/dist/post/index.js
CHANGED
|
@@ -7602,7 +7602,8 @@ module.exports = __toCommonJS(post_exports);
|
|
|
7602
7602
|
// src/post/thumbnail_picker.tsx
|
|
7603
7603
|
var import_react_store_input = require("react-store-input");
|
|
7604
7604
|
var import_utils = require("dn-react-toolkit/utils");
|
|
7605
|
-
var import_react =
|
|
7605
|
+
var import_react = require("react");
|
|
7606
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
7606
7607
|
function PostThumbnailPicker({
|
|
7607
7608
|
store,
|
|
7608
7609
|
textEditorRef
|
|
@@ -7640,10 +7641,9 @@ function PostThumbnailPicker({
|
|
|
7640
7641
|
unsubscribe();
|
|
7641
7642
|
};
|
|
7642
7643
|
}, []);
|
|
7643
|
-
return /* @__PURE__ */
|
|
7644
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-6 gap-1", children: thumbnails.map((url, index2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7644
7645
|
"button",
|
|
7645
7646
|
{
|
|
7646
|
-
key: index2,
|
|
7647
7647
|
type: "button",
|
|
7648
7648
|
className: (0, import_utils.cn)(
|
|
7649
7649
|
"border border-neutral-200 rounded-lg overflow-hidden aspect-4/3",
|
|
@@ -7653,184 +7653,31 @@ function PostThumbnailPicker({
|
|
|
7653
7653
|
store.dispatch((state) => {
|
|
7654
7654
|
state.thumbnail = url;
|
|
7655
7655
|
});
|
|
7656
|
-
}
|
|
7656
|
+
},
|
|
7657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
7658
|
+
"img",
|
|
7659
|
+
{
|
|
7660
|
+
src: url,
|
|
7661
|
+
alt: `Thumbnail ${index2 + 1}`,
|
|
7662
|
+
className: "w-full h-full object-cover"
|
|
7663
|
+
}
|
|
7664
|
+
)
|
|
7657
7665
|
},
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
{
|
|
7661
|
-
src: url,
|
|
7662
|
-
alt: `Thumbnail ${index2 + 1}`,
|
|
7663
|
-
className: "w-full h-full object-cover"
|
|
7664
|
-
}
|
|
7665
|
-
)
|
|
7666
|
-
)));
|
|
7666
|
+
index2
|
|
7667
|
+
)) });
|
|
7667
7668
|
}
|
|
7668
7669
|
|
|
7669
7670
|
// src/post/editor_toolbar.tsx
|
|
7670
7671
|
var import_utils2 = require("dn-react-toolkit/utils");
|
|
7671
|
-
|
|
7672
|
-
// node_modules/react-icons/lib/iconBase.mjs
|
|
7673
|
-
var import_react3 = __toESM(require("react"), 1);
|
|
7674
|
-
|
|
7675
|
-
// node_modules/react-icons/lib/iconContext.mjs
|
|
7676
|
-
var import_react2 = __toESM(require("react"), 1);
|
|
7677
|
-
var DefaultContext = {
|
|
7678
|
-
color: void 0,
|
|
7679
|
-
size: void 0,
|
|
7680
|
-
className: void 0,
|
|
7681
|
-
style: void 0,
|
|
7682
|
-
attr: void 0
|
|
7683
|
-
};
|
|
7684
|
-
var IconContext = import_react2.default.createContext && /* @__PURE__ */ import_react2.default.createContext(DefaultContext);
|
|
7685
|
-
|
|
7686
|
-
// node_modules/react-icons/lib/iconBase.mjs
|
|
7687
|
-
var _excluded = ["attr", "size", "title"];
|
|
7688
|
-
function _objectWithoutProperties(source, excluded) {
|
|
7689
|
-
if (source == null) return {};
|
|
7690
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
7691
|
-
var key, i;
|
|
7692
|
-
if (Object.getOwnPropertySymbols) {
|
|
7693
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
7694
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
7695
|
-
key = sourceSymbolKeys[i];
|
|
7696
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
7697
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
7698
|
-
target[key] = source[key];
|
|
7699
|
-
}
|
|
7700
|
-
}
|
|
7701
|
-
return target;
|
|
7702
|
-
}
|
|
7703
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
7704
|
-
if (source == null) return {};
|
|
7705
|
-
var target = {};
|
|
7706
|
-
for (var key in source) {
|
|
7707
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7708
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
7709
|
-
target[key] = source[key];
|
|
7710
|
-
}
|
|
7711
|
-
}
|
|
7712
|
-
return target;
|
|
7713
|
-
}
|
|
7714
|
-
function _extends() {
|
|
7715
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
7716
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
7717
|
-
var source = arguments[i];
|
|
7718
|
-
for (var key in source) {
|
|
7719
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7720
|
-
target[key] = source[key];
|
|
7721
|
-
}
|
|
7722
|
-
}
|
|
7723
|
-
}
|
|
7724
|
-
return target;
|
|
7725
|
-
};
|
|
7726
|
-
return _extends.apply(this, arguments);
|
|
7727
|
-
}
|
|
7728
|
-
function ownKeys(e, r) {
|
|
7729
|
-
var t = Object.keys(e);
|
|
7730
|
-
if (Object.getOwnPropertySymbols) {
|
|
7731
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
7732
|
-
r && (o = o.filter(function(r2) {
|
|
7733
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
7734
|
-
})), t.push.apply(t, o);
|
|
7735
|
-
}
|
|
7736
|
-
return t;
|
|
7737
|
-
}
|
|
7738
|
-
function _objectSpread(e) {
|
|
7739
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
7740
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
7741
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
|
|
7742
|
-
_defineProperty(e, r2, t[r2]);
|
|
7743
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
7744
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
7745
|
-
});
|
|
7746
|
-
}
|
|
7747
|
-
return e;
|
|
7748
|
-
}
|
|
7749
|
-
function _defineProperty(obj, key, value) {
|
|
7750
|
-
key = _toPropertyKey(key);
|
|
7751
|
-
if (key in obj) {
|
|
7752
|
-
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
7753
|
-
} else {
|
|
7754
|
-
obj[key] = value;
|
|
7755
|
-
}
|
|
7756
|
-
return obj;
|
|
7757
|
-
}
|
|
7758
|
-
function _toPropertyKey(t) {
|
|
7759
|
-
var i = _toPrimitive(t, "string");
|
|
7760
|
-
return "symbol" == typeof i ? i : i + "";
|
|
7761
|
-
}
|
|
7762
|
-
function _toPrimitive(t, r) {
|
|
7763
|
-
if ("object" != typeof t || !t) return t;
|
|
7764
|
-
var e = t[Symbol.toPrimitive];
|
|
7765
|
-
if (void 0 !== e) {
|
|
7766
|
-
var i = e.call(t, r || "default");
|
|
7767
|
-
if ("object" != typeof i) return i;
|
|
7768
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
7769
|
-
}
|
|
7770
|
-
return ("string" === r ? String : Number)(t);
|
|
7771
|
-
}
|
|
7772
|
-
function Tree2Element(tree) {
|
|
7773
|
-
return tree && tree.map((node, i) => /* @__PURE__ */ import_react3.default.createElement(node.tag, _objectSpread({
|
|
7774
|
-
key: i
|
|
7775
|
-
}, node.attr), Tree2Element(node.child)));
|
|
7776
|
-
}
|
|
7777
|
-
function GenIcon(data) {
|
|
7778
|
-
return (props) => /* @__PURE__ */ import_react3.default.createElement(IconBase, _extends({
|
|
7779
|
-
attr: _objectSpread({}, data.attr)
|
|
7780
|
-
}, props), Tree2Element(data.child));
|
|
7781
|
-
}
|
|
7782
|
-
function IconBase(props) {
|
|
7783
|
-
var elem = (conf) => {
|
|
7784
|
-
var {
|
|
7785
|
-
attr,
|
|
7786
|
-
size,
|
|
7787
|
-
title
|
|
7788
|
-
} = props, svgProps = _objectWithoutProperties(props, _excluded);
|
|
7789
|
-
var computedSize = size || conf.size || "1em";
|
|
7790
|
-
var className;
|
|
7791
|
-
if (conf.className) className = conf.className;
|
|
7792
|
-
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
7793
|
-
return /* @__PURE__ */ import_react3.default.createElement("svg", _extends({
|
|
7794
|
-
stroke: "currentColor",
|
|
7795
|
-
fill: "currentColor",
|
|
7796
|
-
strokeWidth: "0"
|
|
7797
|
-
}, conf.attr, attr, svgProps, {
|
|
7798
|
-
className,
|
|
7799
|
-
style: _objectSpread(_objectSpread({
|
|
7800
|
-
color: props.color || conf.color
|
|
7801
|
-
}, conf.style), props.style),
|
|
7802
|
-
height: computedSize,
|
|
7803
|
-
width: computedSize,
|
|
7804
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
7805
|
-
}), title && /* @__PURE__ */ import_react3.default.createElement("title", null, title), props.children);
|
|
7806
|
-
};
|
|
7807
|
-
return IconContext !== void 0 ? /* @__PURE__ */ import_react3.default.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
|
7808
|
-
}
|
|
7809
|
-
|
|
7810
|
-
// node_modules/react-icons/go/index.mjs
|
|
7811
|
-
function GoFileMedia(props) {
|
|
7812
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M21.75 21.5H2.25A1.75 1.75 0 0 1 .5 19.75V4.25c0-.966.784-1.75 1.75-1.75h19.5c.966 0 1.75.784 1.75 1.75v15.5a1.75 1.75 0 0 1-1.75 1.75ZM2.25 4a.25.25 0 0 0-.25.25v15.5c0 .138.112.25.25.25h3.178L14 10.977a1.749 1.749 0 0 1 2.506-.032L22 16.44V4.25a.25.25 0 0 0-.25-.25ZM22 19.75v-1.19l-6.555-6.554a.248.248 0 0 0-.18-.073.247.247 0 0 0-.178.077L7.497 20H21.75a.25.25 0 0 0 .25-.25ZM10.5 9.25a3.25 3.25 0 1 1-6.5 0 3.25 3.25 0 0 1 6.5 0Zm-1.5 0a1.75 1.75 0 1 0-3.501.001A1.75 1.75 0 0 0 9 9.25Z" }, "child": [] }] })(props);
|
|
7813
|
-
}
|
|
7814
|
-
function GoLink(props) {
|
|
7815
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M14.78 3.653a3.936 3.936 0 1 1 5.567 5.567l-3.627 3.627a3.936 3.936 0 0 1-5.88-.353.75.75 0 0 0-1.18.928 5.436 5.436 0 0 0 8.12.486l3.628-3.628a5.436 5.436 0 1 0-7.688-7.688l-3 3a.75.75 0 0 0 1.06 1.061l3-3Z" }, "child": [] }, { "tag": "path", "attr": { "d": "M7.28 11.153a3.936 3.936 0 0 1 5.88.353.75.75 0 0 0 1.18-.928 5.436 5.436 0 0 0-8.12-.486L2.592 13.72a5.436 5.436 0 1 0 7.688 7.688l3-3a.75.75 0 1 0-1.06-1.06l-3 3a3.936 3.936 0 0 1-5.567-5.568l3.627-3.627Z" }, "child": [] }] })(props);
|
|
7816
|
-
}
|
|
7817
|
-
function GoListOrdered(props) {
|
|
7818
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M3.604 3.089A.75.75 0 0 1 4 3.75V8.5h.75a.75.75 0 0 1 0 1.5h-3a.75.75 0 1 1 0-1.5h.75V5.151l-.334.223a.75.75 0 0 1-.832-1.248l1.5-1a.75.75 0 0 1 .77-.037ZM8.75 5.5a.75.75 0 0 0 0 1.5h11.5a.75.75 0 0 0 0-1.5H8.75Zm0 6a.75.75 0 0 0 0 1.5h11.5a.75.75 0 0 0 0-1.5H8.75Zm0 6a.75.75 0 0 0 0 1.5h11.5a.75.75 0 0 0 0-1.5H8.75ZM5.5 15.75c0-.704-.271-1.286-.72-1.686a2.302 2.302 0 0 0-1.53-.564c-.535 0-1.094.178-1.53.565-.449.399-.72.982-.72 1.685a.75.75 0 0 0 1.5 0c0-.296.104-.464.217-.564A.805.805 0 0 1 3.25 15c.215 0 .406.072.533.185.113.101.217.268.217.565 0 .332-.069.48-.21.657-.092.113-.216.24-.403.419l-.147.14c-.152.144-.33.313-.52.504l-1.5 1.5a.75.75 0 0 0-.22.53v.25c0 .414.336.75.75.75H5A.75.75 0 0 0 5 19H3.31l.47-.47c.176-.176.333-.324.48-.465l.165-.156a5.98 5.98 0 0 0 .536-.566c.358-.447.539-.925.539-1.593Z" }, "child": [] }] })(props);
|
|
7819
|
-
}
|
|
7820
|
-
function GoListUnordered(props) {
|
|
7821
|
-
return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M8.75 5.5h11.5a.75.75 0 0 1 0 1.5H8.75a.75.75 0 0 1 0-1.5Zm0 6h11.5a.75.75 0 0 1 0 1.5H8.75a.75.75 0 0 1 0-1.5Zm0 6h11.5a.75.75 0 0 1 0 1.5H8.75a.75.75 0 0 1 0-1.5ZM5 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM4 7a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0 12a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z" }, "child": [] }] })(props);
|
|
7822
|
-
}
|
|
7823
|
-
|
|
7824
|
-
// src/post/editor_toolbar.tsx
|
|
7825
|
-
var import_react8 = __toESM(require("react"));
|
|
7672
|
+
var import_go = require("react-icons/go");
|
|
7826
7673
|
|
|
7827
7674
|
// src/client/env_loader.tsx
|
|
7828
|
-
var import_react4 = __toESM(require("react"));
|
|
7829
7675
|
var import_react_router = require("react-router");
|
|
7676
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
7830
7677
|
|
|
7831
7678
|
// src/client/file_input.tsx
|
|
7832
|
-
var
|
|
7833
|
-
var
|
|
7679
|
+
var import_react2 = require("react");
|
|
7680
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
7834
7681
|
function FileInput({
|
|
7835
7682
|
buttonRef,
|
|
7836
7683
|
className,
|
|
@@ -7840,35 +7687,38 @@ function FileInput({
|
|
|
7840
7687
|
onChange,
|
|
7841
7688
|
...props
|
|
7842
7689
|
}) {
|
|
7843
|
-
const inputRef =
|
|
7844
|
-
return /* @__PURE__ */
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7690
|
+
const inputRef = (0, import_react2.useRef)(null);
|
|
7691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
7692
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
7693
|
+
"button",
|
|
7694
|
+
{
|
|
7695
|
+
ref: buttonRef,
|
|
7696
|
+
className,
|
|
7697
|
+
type: "button",
|
|
7698
|
+
onClick: () => {
|
|
7699
|
+
inputRef.current?.click();
|
|
7700
|
+
},
|
|
7701
|
+
children
|
|
7852
7702
|
}
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7703
|
+
),
|
|
7704
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
7705
|
+
"input",
|
|
7706
|
+
{
|
|
7707
|
+
...props,
|
|
7708
|
+
type: "file",
|
|
7709
|
+
ref: inputRef,
|
|
7710
|
+
style: {
|
|
7711
|
+
display: "none"
|
|
7712
|
+
},
|
|
7713
|
+
onChange: async (e) => {
|
|
7714
|
+
await onChange?.(e);
|
|
7715
|
+
if (inputRef.current) {
|
|
7716
|
+
inputRef.current.value = "";
|
|
7717
|
+
}
|
|
7868
7718
|
}
|
|
7869
7719
|
}
|
|
7870
|
-
|
|
7871
|
-
)
|
|
7720
|
+
)
|
|
7721
|
+
] });
|
|
7872
7722
|
}
|
|
7873
7723
|
|
|
7874
7724
|
// src/client/use_user_agent.tsx
|
|
@@ -7877,7 +7727,8 @@ var import_react_router2 = require("react-router");
|
|
|
7877
7727
|
// src/client/store_text_editor.tsx
|
|
7878
7728
|
var import_dn_react_text_editor = require("dn-react-text-editor");
|
|
7879
7729
|
var import_react_store_input2 = require("react-store-input");
|
|
7880
|
-
var
|
|
7730
|
+
var import_react3 = require("react");
|
|
7731
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
7881
7732
|
function StoreTextEditor({
|
|
7882
7733
|
store,
|
|
7883
7734
|
name,
|
|
@@ -7887,8 +7738,8 @@ function StoreTextEditor({
|
|
|
7887
7738
|
ref,
|
|
7888
7739
|
...props
|
|
7889
7740
|
}) {
|
|
7890
|
-
const controllerRef = (0,
|
|
7891
|
-
(0,
|
|
7741
|
+
const controllerRef = (0, import_react3.useRef)(null);
|
|
7742
|
+
(0, import_react3.useImperativeHandle)(
|
|
7892
7743
|
ref,
|
|
7893
7744
|
() => controllerRef.current,
|
|
7894
7745
|
[]
|
|
@@ -7936,7 +7787,7 @@ function StoreTextEditor({
|
|
|
7936
7787
|
}
|
|
7937
7788
|
return void 0;
|
|
7938
7789
|
};
|
|
7939
|
-
return /* @__PURE__ */
|
|
7790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
7940
7791
|
import_dn_react_text_editor.TextEditor,
|
|
7941
7792
|
{
|
|
7942
7793
|
...props,
|
|
@@ -7954,92 +7805,95 @@ function StoreTextEditor({
|
|
|
7954
7805
|
var import_client = require("dn-react-toolkit/file/client");
|
|
7955
7806
|
|
|
7956
7807
|
// src/post/editor_toolbar.tsx
|
|
7808
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
7957
7809
|
function EditorToolbar({
|
|
7958
7810
|
textEditorRef,
|
|
7959
7811
|
className
|
|
7960
7812
|
}) {
|
|
7961
|
-
return /* @__PURE__ */
|
|
7813
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
7962
7814
|
"div",
|
|
7963
7815
|
{
|
|
7964
|
-
className: (0, import_utils2.cn)("w-full h-12 flex items-center gap-0.5 px-1", className)
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7816
|
+
className: (0, import_utils2.cn)("w-full h-12 flex items-center gap-0.5 px-1", className),
|
|
7817
|
+
children: [
|
|
7818
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
7819
|
+
FileInput,
|
|
7820
|
+
{
|
|
7821
|
+
className: "button-icon-base text-[18px]",
|
|
7822
|
+
onChange: async (e) => {
|
|
7823
|
+
const files = e.target.files;
|
|
7824
|
+
if (!files || files.length === 0) {
|
|
7825
|
+
return;
|
|
7826
|
+
}
|
|
7827
|
+
textEditorRef.current?.commands.attachFile(Array.from(files));
|
|
7828
|
+
},
|
|
7829
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_go.GoFileMedia, {})
|
|
7974
7830
|
}
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7831
|
+
),
|
|
7832
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
7833
|
+
"button",
|
|
7834
|
+
{
|
|
7835
|
+
type: "button",
|
|
7836
|
+
onClick: () => {
|
|
7837
|
+
const href = prompt("\uB9C1\uD06C URL\uC744 \uC785\uB825\uD558\uC138\uC694");
|
|
7838
|
+
if (!href) {
|
|
7839
|
+
return;
|
|
7840
|
+
}
|
|
7841
|
+
textEditorRef.current?.commands.toggleMark("link", { href });
|
|
7842
|
+
},
|
|
7843
|
+
className: "button-icon-base text-[20px]",
|
|
7844
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_go.GoLink, {})
|
|
7988
7845
|
}
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
},
|
|
8041
|
-
/* @__PURE__ */ import_react8.default.createElement(GoListUnordered, null)
|
|
8042
|
-
)
|
|
7846
|
+
),
|
|
7847
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
7848
|
+
"button",
|
|
7849
|
+
{
|
|
7850
|
+
type: "button",
|
|
7851
|
+
onClick: () => {
|
|
7852
|
+
textEditorRef.current?.commands.toggleBlockType("heading", {
|
|
7853
|
+
level: 2
|
|
7854
|
+
});
|
|
7855
|
+
},
|
|
7856
|
+
className: "button-icon-base text-[18px]",
|
|
7857
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "H2" })
|
|
7858
|
+
}
|
|
7859
|
+
),
|
|
7860
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
7861
|
+
"button",
|
|
7862
|
+
{
|
|
7863
|
+
type: "button",
|
|
7864
|
+
onClick: () => {
|
|
7865
|
+
textEditorRef.current?.commands.toggleBlockType("heading", {
|
|
7866
|
+
level: 3
|
|
7867
|
+
});
|
|
7868
|
+
},
|
|
7869
|
+
className: "button-icon-base text-[18px]",
|
|
7870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "H3" })
|
|
7871
|
+
}
|
|
7872
|
+
),
|
|
7873
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
7874
|
+
"button",
|
|
7875
|
+
{
|
|
7876
|
+
type: "button",
|
|
7877
|
+
onClick: () => {
|
|
7878
|
+
textEditorRef.current?.commands.wrapInList("ordered_list");
|
|
7879
|
+
},
|
|
7880
|
+
className: "button-icon-base text-[20px]",
|
|
7881
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_go.GoListOrdered, {})
|
|
7882
|
+
}
|
|
7883
|
+
),
|
|
7884
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
7885
|
+
"button",
|
|
7886
|
+
{
|
|
7887
|
+
type: "button",
|
|
7888
|
+
onClick: () => {
|
|
7889
|
+
textEditorRef.current?.commands.wrapInList("bullet_list");
|
|
7890
|
+
},
|
|
7891
|
+
className: "button-icon-base text-[20px]",
|
|
7892
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_go.GoListUnordered, {})
|
|
7893
|
+
}
|
|
7894
|
+
)
|
|
7895
|
+
]
|
|
7896
|
+
}
|
|
8043
7897
|
);
|
|
8044
7898
|
}
|
|
8045
7899
|
|
|
@@ -8047,26 +7901,24 @@ function EditorToolbar({
|
|
|
8047
7901
|
var import_react_router11 = require("react-router");
|
|
8048
7902
|
var import_utils6 = require("dn-react-toolkit/utils");
|
|
8049
7903
|
var import_react_store_input5 = require("react-store-input");
|
|
8050
|
-
var
|
|
7904
|
+
var import_react6 = require("react");
|
|
8051
7905
|
var import_dn_react_text_editor2 = require("dn-react-text-editor");
|
|
8052
7906
|
|
|
8053
7907
|
// src/crud/crud_form_provider.tsx
|
|
8054
7908
|
var import_react_router3 = require("react-router");
|
|
8055
7909
|
var import_react_store_input3 = require("react-store-input");
|
|
8056
|
-
var
|
|
8057
|
-
var
|
|
8058
|
-
var FormContext = (0,
|
|
8059
|
-
|
|
8060
|
-
// src/crud/crud_form.tsx
|
|
8061
|
-
var import_react12 = __toESM(require("react"));
|
|
7910
|
+
var import_react4 = require("react");
|
|
7911
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
7912
|
+
var FormContext = (0, import_react4.createContext)({});
|
|
8062
7913
|
|
|
8063
7914
|
// src/form/create_form_component.tsx
|
|
8064
7915
|
var import_utils3 = require("dn-react-toolkit/utils");
|
|
8065
|
-
var
|
|
7916
|
+
var import_react5 = require("react");
|
|
7917
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
8066
7918
|
function createComponent(tag, options) {
|
|
8067
7919
|
return function FormComponent({ className, ...props }) {
|
|
8068
7920
|
const Tag = tag;
|
|
8069
|
-
return /* @__PURE__ */
|
|
7921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Tag, { ...props, className: (0, import_utils3.cn)(options.className, className) });
|
|
8070
7922
|
};
|
|
8071
7923
|
}
|
|
8072
7924
|
|
|
@@ -8083,6 +7935,7 @@ var FormLabel = createComponent("label", {
|
|
|
8083
7935
|
|
|
8084
7936
|
// src/crud/crud_form.tsx
|
|
8085
7937
|
var import_react_store_input4 = require("react-store-input");
|
|
7938
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
8086
7939
|
|
|
8087
7940
|
// src/table/loader.tsx
|
|
8088
7941
|
var import_drizzle_orm = require("drizzle-orm");
|
|
@@ -8102,31 +7955,34 @@ var import_react_router9 = require("react-router");
|
|
|
8102
7955
|
|
|
8103
7956
|
// src/table/page.tsx
|
|
8104
7957
|
var import_react_router8 = require("react-router");
|
|
7958
|
+
var import_go3 = require("react-icons/go");
|
|
8105
7959
|
|
|
8106
7960
|
// src/table/buttons.tsx
|
|
8107
7961
|
var import_utils4 = require("dn-react-toolkit/utils");
|
|
8108
7962
|
var import_react_router6 = require("react-router");
|
|
8109
|
-
var
|
|
7963
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
8110
7964
|
|
|
8111
7965
|
// src/table/table.tsx
|
|
8112
7966
|
var import_utils5 = require("dn-react-toolkit/utils");
|
|
7967
|
+
var import_go2 = require("react-icons/go");
|
|
8113
7968
|
var import_react_router7 = require("react-router");
|
|
8114
|
-
var
|
|
7969
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
8115
7970
|
|
|
8116
7971
|
// src/table/page.tsx
|
|
8117
|
-
var
|
|
7972
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
8118
7973
|
|
|
8119
7974
|
// src/crud/crud_page.tsx
|
|
8120
|
-
var
|
|
7975
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
8121
7976
|
|
|
8122
7977
|
// src/crud/generate_pages.tsx
|
|
8123
7978
|
var import_react_router10 = require("react-router");
|
|
8124
|
-
var
|
|
7979
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
8125
7980
|
|
|
8126
7981
|
// src/crud/generate_routes.tsx
|
|
8127
7982
|
var Routes = __toESM(require_routes());
|
|
8128
7983
|
|
|
8129
7984
|
// src/post/post_form_page.tsx
|
|
7985
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
8130
7986
|
var createPostFormPage = ({
|
|
8131
7987
|
header: AdminPageHeader,
|
|
8132
7988
|
textEditorClassName,
|
|
@@ -8135,128 +7991,190 @@ var createPostFormPage = ({
|
|
|
8135
7991
|
return function PostFormPage({ form }) {
|
|
8136
7992
|
const { boards } = (0, import_react_router11.useLoaderData)();
|
|
8137
7993
|
const component = (0, import_react_store_input5.useStoreComponent)(form.store);
|
|
8138
|
-
const textEditorRef = (0,
|
|
8139
|
-
return /* @__PURE__ */
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
7994
|
+
const textEditorRef = (0, import_react6.useRef)(null);
|
|
7995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
7996
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
7997
|
+
AdminPageHeader,
|
|
7998
|
+
{
|
|
7999
|
+
title: `${form.name} \uCD94\uAC00`,
|
|
8000
|
+
actions: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
8001
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8002
|
+
"button",
|
|
8003
|
+
{
|
|
8004
|
+
type: "button",
|
|
8005
|
+
className: "button-outline",
|
|
8006
|
+
onClick: () => {
|
|
8007
|
+
form.delete();
|
|
8008
|
+
},
|
|
8009
|
+
children: "\uC0AD\uC81C\uD558\uAE30"
|
|
8010
|
+
}
|
|
8011
|
+
),
|
|
8012
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8013
|
+
"button",
|
|
8014
|
+
{
|
|
8015
|
+
type: "button",
|
|
8016
|
+
className: "button-primary",
|
|
8017
|
+
onClick: () => {
|
|
8018
|
+
form.submit();
|
|
8019
|
+
},
|
|
8020
|
+
children: "\uC800\uC7A5\uD558\uAE30"
|
|
8021
|
+
}
|
|
8022
|
+
)
|
|
8023
|
+
] })
|
|
8024
|
+
}
|
|
8025
|
+
),
|
|
8026
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "max-w-7xl mx-auto w-full", children: [
|
|
8027
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormRow, { children: [
|
|
8028
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8029
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uACF5\uAC1C\uC5EC\uBD80" }),
|
|
8030
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
8031
|
+
component.select,
|
|
8032
|
+
{
|
|
8033
|
+
name: "isPublic",
|
|
8034
|
+
className: "select-form",
|
|
8035
|
+
toInputValue: (value) => value ? "true" : "false",
|
|
8036
|
+
toStateValue: (value) => Boolean(value === "true"),
|
|
8037
|
+
children: [
|
|
8038
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "true", children: "\uACF5\uAC1C" }),
|
|
8039
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "false", children: "\uBE44\uACF5\uAC1C" })
|
|
8040
|
+
]
|
|
8041
|
+
}
|
|
8042
|
+
)
|
|
8043
|
+
] }),
|
|
8044
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8045
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC791\uC131\uC77C\uC2DC" }),
|
|
8046
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8047
|
+
component.input,
|
|
8048
|
+
{
|
|
8049
|
+
name: "createdAt",
|
|
8050
|
+
className: "input-form",
|
|
8051
|
+
type: "datetime-local"
|
|
8052
|
+
}
|
|
8053
|
+
)
|
|
8054
|
+
] })
|
|
8055
|
+
] }),
|
|
8056
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormRow, { children: [
|
|
8057
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8058
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uAC8C\uC2DC\uD310" }),
|
|
8059
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(component.select, { name: "boardId", className: "select-form", children: [
|
|
8060
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: "", children: "\uC120\uD0DD\uD558\uC138\uC694" }),
|
|
8061
|
+
boards.map((board) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: board.id, children: board.title }, board.id))
|
|
8062
|
+
] })
|
|
8063
|
+
] }),
|
|
8064
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8065
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uCE74\uD14C\uACE0\uB9AC" }),
|
|
8066
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8067
|
+
component.input,
|
|
8068
|
+
{
|
|
8069
|
+
name: "category",
|
|
8070
|
+
className: "input-form",
|
|
8071
|
+
placeholder: "\uCE74\uD14C\uACE0\uB9AC"
|
|
8072
|
+
}
|
|
8073
|
+
)
|
|
8074
|
+
] })
|
|
8075
|
+
] }),
|
|
8076
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormRow, { children: [
|
|
8077
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8078
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC81C\uBAA9" }),
|
|
8079
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8080
|
+
component.input,
|
|
8081
|
+
{
|
|
8082
|
+
name: "title",
|
|
8083
|
+
className: "input-form",
|
|
8084
|
+
placeholder: "\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",
|
|
8085
|
+
onChange: (e) => {
|
|
8086
|
+
const title = e.target.value;
|
|
8087
|
+
form.store.dispatch((state) => {
|
|
8088
|
+
state.slug = (0, import_utils6.toSlug)(title);
|
|
8089
|
+
});
|
|
8090
|
+
}
|
|
8091
|
+
}
|
|
8092
|
+
)
|
|
8093
|
+
] }),
|
|
8094
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8095
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uBD80\uC81C\uBAA9" }),
|
|
8096
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8097
|
+
component.input,
|
|
8098
|
+
{
|
|
8099
|
+
name: "subtitle",
|
|
8100
|
+
className: "input-form",
|
|
8101
|
+
placeholder: "\uBD80\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694"
|
|
8102
|
+
}
|
|
8103
|
+
)
|
|
8104
|
+
] })
|
|
8105
|
+
] }),
|
|
8106
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormRow, { children: [
|
|
8107
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8108
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC2AC\uB7EC\uADF8" }),
|
|
8109
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8110
|
+
component.input,
|
|
8111
|
+
{
|
|
8112
|
+
name: "slug",
|
|
8113
|
+
className: "input-form",
|
|
8114
|
+
placeholder: "\uC81C\uBAA9"
|
|
8115
|
+
}
|
|
8116
|
+
)
|
|
8117
|
+
] }),
|
|
8118
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8119
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uD0DC\uADF8" }),
|
|
8120
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8121
|
+
component.input,
|
|
8122
|
+
{
|
|
8123
|
+
name: "tags",
|
|
8124
|
+
className: "input-form",
|
|
8125
|
+
placeholder: "\uD0DC\uADF8 1, \uD0DC\uADF8 2, \uD0DC\uADF8 3"
|
|
8126
|
+
}
|
|
8127
|
+
)
|
|
8128
|
+
] })
|
|
8129
|
+
] }),
|
|
8130
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormRow, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8131
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC124\uBA85" }),
|
|
8132
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8133
|
+
StoreTextEditor,
|
|
8134
|
+
{
|
|
8135
|
+
store: form.store,
|
|
8136
|
+
mode: "text",
|
|
8137
|
+
name: "description",
|
|
8138
|
+
className: "text-editor min-h-[80px]",
|
|
8139
|
+
placeholder: "\uC124\uBA85"
|
|
8150
8140
|
}
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
), /* @__PURE__ */
|
|
8154
|
-
"
|
|
8155
|
-
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8141
|
+
)
|
|
8142
|
+
] }) }),
|
|
8143
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormRow, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(FormEntry, { children: [
|
|
8144
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(FormLabel, { children: "\uC378\uB124\uC77C" }),
|
|
8145
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8146
|
+
PostThumbnailPicker,
|
|
8147
|
+
{
|
|
8148
|
+
store: form.store,
|
|
8149
|
+
textEditorRef
|
|
8150
|
+
}
|
|
8151
|
+
)
|
|
8152
|
+
] }) })
|
|
8153
|
+
] }) }),
|
|
8154
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "sticky top-[160px] z-998 bg-white px-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8155
|
+
EditorToolbar,
|
|
8156
|
+
{
|
|
8157
|
+
textEditorRef,
|
|
8158
|
+
className: "max-w-7xl mx-auto"
|
|
8159
|
+
}
|
|
8160
|
+
) }),
|
|
8161
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "px-4", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
8162
|
+
StoreTextEditor,
|
|
8163
|
+
{
|
|
8164
|
+
ref: textEditorRef,
|
|
8165
|
+
store: form.store,
|
|
8166
|
+
name: "html",
|
|
8167
|
+
placeholder: "\uC5EC\uAE30\uC5D0 \uBCF8\uBB38\uC744 \uC791\uC131\uD558\uC138\uC694...",
|
|
8168
|
+
updateDelay: 500,
|
|
8169
|
+
editor: {
|
|
8170
|
+
attributes: {
|
|
8171
|
+
class: (0, import_utils6.cn)(textEditorClassName, "pb-[50vh]")
|
|
8160
8172
|
}
|
|
8161
8173
|
},
|
|
8162
|
-
|
|
8163
|
-
))
|
|
8164
|
-
}
|
|
8165
|
-
), /* @__PURE__ */ import_react18.default.createElement("div", { className: "px-4" }, /* @__PURE__ */ import_react18.default.createElement("div", { className: "max-w-7xl mx-auto w-full" }, /* @__PURE__ */ import_react18.default.createElement(FormRow, null, /* @__PURE__ */ import_react18.default.createElement(FormEntry, null, /* @__PURE__ */ import_react18.default.createElement(FormLabel, null, "\uACF5\uAC1C\uC5EC\uBD80"), /* @__PURE__ */ import_react18.default.createElement(
|
|
8166
|
-
component.select,
|
|
8167
|
-
{
|
|
8168
|
-
name: "isPublic",
|
|
8169
|
-
className: "select-form",
|
|
8170
|
-
toInputValue: (value) => value ? "true" : "false",
|
|
8171
|
-
toStateValue: (value) => Boolean(value === "true")
|
|
8172
|
-
},
|
|
8173
|
-
/* @__PURE__ */ import_react18.default.createElement("option", { value: "true" }, "\uACF5\uAC1C"),
|
|
8174
|
-
/* @__PURE__ */ import_react18.default.createElement("option", { value: "false" }, "\uBE44\uACF5\uAC1C")
|
|
8175
|
-
)), /* @__PURE__ */ import_react18.default.createElement(FormEntry, null, /* @__PURE__ */ import_react18.default.createElement(FormLabel, null, "\uC791\uC131\uC77C\uC2DC"), /* @__PURE__ */ import_react18.default.createElement(
|
|
8176
|
-
component.input,
|
|
8177
|
-
{
|
|
8178
|
-
name: "createdAt",
|
|
8179
|
-
className: "input-form",
|
|
8180
|
-
type: "datetime-local"
|
|
8181
|
-
}
|
|
8182
|
-
))), /* @__PURE__ */ import_react18.default.createElement(FormRow, null, /* @__PURE__ */ import_react18.default.createElement(FormEntry, null, /* @__PURE__ */ import_react18.default.createElement(FormLabel, null, "\uAC8C\uC2DC\uD310"), /* @__PURE__ */ import_react18.default.createElement(component.select, { name: "boardId", className: "select-form" }, /* @__PURE__ */ import_react18.default.createElement("option", { value: "" }, "\uC120\uD0DD\uD558\uC138\uC694"), boards.map((board) => /* @__PURE__ */ import_react18.default.createElement("option", { key: board.id, value: board.id }, board.title)))), /* @__PURE__ */ import_react18.default.createElement(FormEntry, null, /* @__PURE__ */ import_react18.default.createElement(FormLabel, null, "\uCE74\uD14C\uACE0\uB9AC"), /* @__PURE__ */ import_react18.default.createElement(
|
|
8183
|
-
component.input,
|
|
8184
|
-
{
|
|
8185
|
-
name: "category",
|
|
8186
|
-
className: "input-form",
|
|
8187
|
-
placeholder: "\uCE74\uD14C\uACE0\uB9AC"
|
|
8188
|
-
}
|
|
8189
|
-
))), /* @__PURE__ */ import_react18.default.createElement(FormRow, null, /* @__PURE__ */ import_react18.default.createElement(FormEntry, null, /* @__PURE__ */ import_react18.default.createElement(FormLabel, null, "\uC81C\uBAA9"), /* @__PURE__ */ import_react18.default.createElement(
|
|
8190
|
-
component.input,
|
|
8191
|
-
{
|
|
8192
|
-
name: "title",
|
|
8193
|
-
className: "input-form",
|
|
8194
|
-
placeholder: "\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694",
|
|
8195
|
-
onChange: (e) => {
|
|
8196
|
-
const title = e.target.value;
|
|
8197
|
-
form.store.dispatch((state) => {
|
|
8198
|
-
state.slug = (0, import_utils6.toSlug)(title);
|
|
8199
|
-
});
|
|
8174
|
+
attachFile
|
|
8200
8175
|
}
|
|
8201
|
-
}
|
|
8202
|
-
|
|
8203
|
-
component.input,
|
|
8204
|
-
{
|
|
8205
|
-
name: "subtitle",
|
|
8206
|
-
className: "input-form",
|
|
8207
|
-
placeholder: "\uBD80\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694"
|
|
8208
|
-
}
|
|
8209
|
-
))), /* @__PURE__ */ import_react18.default.createElement(FormRow, null, /* @__PURE__ */ import_react18.default.createElement(FormEntry, null, /* @__PURE__ */ import_react18.default.createElement(FormLabel, null, "\uC2AC\uB7EC\uADF8"), /* @__PURE__ */ import_react18.default.createElement(
|
|
8210
|
-
component.input,
|
|
8211
|
-
{
|
|
8212
|
-
name: "slug",
|
|
8213
|
-
className: "input-form",
|
|
8214
|
-
placeholder: "\uC81C\uBAA9"
|
|
8215
|
-
}
|
|
8216
|
-
)), /* @__PURE__ */ import_react18.default.createElement(FormEntry, null, /* @__PURE__ */ import_react18.default.createElement(FormLabel, null, "\uD0DC\uADF8"), /* @__PURE__ */ import_react18.default.createElement(
|
|
8217
|
-
component.input,
|
|
8218
|
-
{
|
|
8219
|
-
name: "tags",
|
|
8220
|
-
className: "input-form",
|
|
8221
|
-
placeholder: "\uD0DC\uADF8 1, \uD0DC\uADF8 2, \uD0DC\uADF8 3"
|
|
8222
|
-
}
|
|
8223
|
-
))), /* @__PURE__ */ import_react18.default.createElement(FormRow, null, /* @__PURE__ */ import_react18.default.createElement(FormEntry, null, /* @__PURE__ */ import_react18.default.createElement(FormLabel, null, "\uC124\uBA85"), /* @__PURE__ */ import_react18.default.createElement(
|
|
8224
|
-
StoreTextEditor,
|
|
8225
|
-
{
|
|
8226
|
-
store: form.store,
|
|
8227
|
-
mode: "text",
|
|
8228
|
-
name: "description",
|
|
8229
|
-
className: "text-editor min-h-[80px]",
|
|
8230
|
-
placeholder: "\uC124\uBA85"
|
|
8231
|
-
}
|
|
8232
|
-
))), /* @__PURE__ */ import_react18.default.createElement(FormRow, null, /* @__PURE__ */ import_react18.default.createElement(FormEntry, null, /* @__PURE__ */ import_react18.default.createElement(FormLabel, null, "\uC378\uB124\uC77C"), /* @__PURE__ */ import_react18.default.createElement(
|
|
8233
|
-
PostThumbnailPicker,
|
|
8234
|
-
{
|
|
8235
|
-
store: form.store,
|
|
8236
|
-
textEditorRef
|
|
8237
|
-
}
|
|
8238
|
-
))))), /* @__PURE__ */ import_react18.default.createElement("div", { className: "sticky top-[160px] z-998 bg-white px-4" }, /* @__PURE__ */ import_react18.default.createElement(
|
|
8239
|
-
EditorToolbar,
|
|
8240
|
-
{
|
|
8241
|
-
textEditorRef,
|
|
8242
|
-
className: "max-w-7xl mx-auto"
|
|
8243
|
-
}
|
|
8244
|
-
)), /* @__PURE__ */ import_react18.default.createElement("div", { className: "px-4" }, /* @__PURE__ */ import_react18.default.createElement(
|
|
8245
|
-
StoreTextEditor,
|
|
8246
|
-
{
|
|
8247
|
-
ref: textEditorRef,
|
|
8248
|
-
store: form.store,
|
|
8249
|
-
name: "html",
|
|
8250
|
-
placeholder: "\uC5EC\uAE30\uC5D0 \uBCF8\uBB38\uC744 \uC791\uC131\uD558\uC138\uC694...",
|
|
8251
|
-
updateDelay: 500,
|
|
8252
|
-
editor: {
|
|
8253
|
-
attributes: {
|
|
8254
|
-
class: (0, import_utils6.cn)(textEditorClassName, "pb-[50vh]")
|
|
8255
|
-
}
|
|
8256
|
-
},
|
|
8257
|
-
attachFile
|
|
8258
|
-
}
|
|
8259
|
-
)));
|
|
8176
|
+
) })
|
|
8177
|
+
] });
|
|
8260
8178
|
};
|
|
8261
8179
|
};
|
|
8262
8180
|
// Annotate the CommonJS export names for ESM import in node:
|