@nocobase/app 1.5.0-beta.3 → 1.5.0-beta.30
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/client/.umirc.ts +8 -4
- package/client/public/browser-checker.js +10 -0
- package/client/src/.umi-production/testBrowser.tsx +1 -0
- package/client/src/.umi-production/umi.ts +2 -0
- package/client/src/loading.tsx +25 -0
- package/dist/client/1167.f1f49999.async.js +1 -0
- package/dist/client/5415.623fa605.async.js +73 -0
- package/dist/client/browser-checker.js +10 -0
- package/dist/client/index.html +2 -2
- package/dist/client/index.html.tpl +2 -2
- package/dist/client/{npm._at_ant-design.990f7d57.async.js → npm._at_ant-design.736bcf26.async.js} +3 -5
- package/dist/client/{npm._at_budibase.0cb269b1.async.js → npm._at_budibase.4c85e362.async.js} +3 -3
- package/dist/client/{npm._at_formily.c6e18c32.async.js → npm._at_formily.16deb97f.async.js} +1 -1
- package/dist/client/npm._at_formulajs.0bdd8ac2.async.js +1 -0
- package/dist/client/npm.ahooks.4b44f0c8.async.js +6 -0
- package/dist/client/npm.antd.aedb4432.async.js +440 -0
- package/dist/client/{npm.picomatch.7a2f1314.async.js → npm.picomatch.af2fa5bc.async.js} +1 -1
- package/dist/client/p__index.c598632e.async.js +1584 -0
- package/dist/client/umi.81ae19e5.js +60 -0
- package/lib/index.js +1 -4
- package/package.json +6 -6
- package/src/index.ts +1 -4
- package/dist/client/1010.9386fccf.async.js +0 -71
- package/dist/client/npm._at_formulajs.ff63776b.async.js +0 -1
- package/dist/client/npm.ahooks.b416801a.async.js +0 -6
- package/dist/client/npm.antd.aefa5738.async.js +0 -475
- package/dist/client/npm.rc-util.23a9b855.async.js +0 -18
- package/dist/client/p__index.f14b3008.async.js +0 -1557
- package/dist/client/umi.11cd8cc8.js +0 -21
package/client/.umirc.ts
CHANGED
|
@@ -20,12 +20,12 @@ export default defineConfig({
|
|
|
20
20
|
metas: [{ name: 'viewport', content: 'initial-scale=0.1' }],
|
|
21
21
|
links: [{ rel: 'stylesheet', href: `${appPublicPath}global.css` }],
|
|
22
22
|
headScripts: [
|
|
23
|
-
{
|
|
24
|
-
src: `${appPublicPath}browser-checker.js`,
|
|
25
|
-
},
|
|
26
23
|
{
|
|
27
24
|
content: isDevCmd
|
|
28
|
-
?
|
|
25
|
+
? `
|
|
26
|
+
window['__nocobase_public_path__'] = "${process.env.APP_PUBLIC_PATH || '/'}";
|
|
27
|
+
window['__nocobase_dev_public_path__'] = "/";
|
|
28
|
+
`
|
|
29
29
|
: `
|
|
30
30
|
window['__webpack_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
|
|
31
31
|
window['__nocobase_public_path__'] = '{{env.APP_PUBLIC_PATH}}';
|
|
@@ -36,6 +36,9 @@ export default defineConfig({
|
|
|
36
36
|
window['__nocobase_ws_path__'] = '{{env.WS_PATH}}';
|
|
37
37
|
`,
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
src: `${appPublicPath}browser-checker.js?v=1`,
|
|
41
|
+
},
|
|
39
42
|
],
|
|
40
43
|
cacheDirectoryPath: process.env.APP_CLIENT_CACHE_DIR || `node_modules/.cache`,
|
|
41
44
|
outputPath: path.resolve(__dirname, '../dist/client'),
|
|
@@ -80,5 +83,6 @@ export default defineConfig({
|
|
|
80
83
|
}
|
|
81
84
|
return config;
|
|
82
85
|
},
|
|
86
|
+
extraBabelPlugins: ['react-imported-component/babel'],
|
|
83
87
|
routes: [{ path: '/*', component: 'index' }],
|
|
84
88
|
});
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
const basename = window['__nocobase_public_path__'] || '/';
|
|
2
|
+
let currentPath = window.location.pathname;
|
|
3
|
+
if (currentPath === basename.slice(0, -1)) {
|
|
4
|
+
const newUrl = `${window.location.origin}${basename}${window.location.search}${window.location.hash}`;
|
|
5
|
+
window.location.replace(newUrl);
|
|
6
|
+
} else if (!currentPath.startsWith(basename)) {
|
|
7
|
+
let newPath = basename + (currentPath.startsWith('/') ? currentPath.slice(1) : currentPath);
|
|
8
|
+
let newUrl = window.location.origin + newPath + window.location.search + window.location.hash;
|
|
9
|
+
window.location.replace(newUrl);
|
|
10
|
+
}
|
|
1
11
|
showLog = true;
|
|
2
12
|
function log(m) {
|
|
3
13
|
if (window.console && showLog) {
|
|
@@ -7,6 +7,7 @@ import { renderClient } from '/__w/nocobase/nocobase/node_modules/@umijs/rendere
|
|
|
7
7
|
import { getRoutes } from './core/route';
|
|
8
8
|
import { createPluginManager } from './core/plugin';
|
|
9
9
|
import { createHistory } from './core/history';
|
|
10
|
+
import Loading from '/__w/nocobase/nocobase/packages/core/app/client/src/loading.tsx';
|
|
10
11
|
import { ApplyPluginsType } from 'umi';
|
|
11
12
|
|
|
12
13
|
|
|
@@ -51,6 +52,7 @@ async function render() {
|
|
|
51
52
|
routeComponents,
|
|
52
53
|
pluginManager,
|
|
53
54
|
rootElement: contextOpts.rootElement || document.getElementById('root'),
|
|
55
|
+
loadingComponent: Loading,
|
|
54
56
|
publicPath,
|
|
55
57
|
runtimePublicPath,
|
|
56
58
|
history,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Spin } from 'antd';
|
|
12
|
+
|
|
13
|
+
export default function Loading() {
|
|
14
|
+
return (
|
|
15
|
+
<Spin
|
|
16
|
+
style={{
|
|
17
|
+
width: '100vw',
|
|
18
|
+
height: '100vh',
|
|
19
|
+
display: 'flex',
|
|
20
|
+
justifyContent: 'center',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
}}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[1167],{71167:function(C,D,g){var _=this&&this.__extends||function(){var r=function(n,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var i in o)o.hasOwnProperty(i)&&(e[i]=o[i])},r(n,t)};return function(n,t){r(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),v=this&&this.__assign||function(){return v=Object.assign||function(r){for(var n,t=1,e=arguments.length;t<e;t++){n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r},v.apply(this,arguments)},b=this&&this.__spreadArrays||function(){for(var r=0,n=0,t=arguments.length;n<t;n++)r+=arguments[n].length;for(var e=Array(r),o=0,n=0;n<t;n++)for(var i=arguments[n],s=0,a=i.length;s<a;s++,o++)e[o]=i[s];return e},y=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},d=y(g(67294)),w=y(g(73935)),c=y(g(18446)),E=y(g(76095)),S=function(r){_(n,r);function n(t){var e=r.call(this,t)||this;e.dirtyProps=["modules","formats","bounds","theme","children"],e.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],e.state={generation:0},e.selection=null,e.onEditorChange=function(i,s,a,l){var h,u,p,f;i==="text-change"?(u=(h=e).onEditorChangeText)===null||u===void 0||u.call(h,e.editor.root.innerHTML,s,l,e.unprivilegedEditor):i==="selection-change"&&((f=(p=e).onEditorChangeSelection)===null||f===void 0||f.call(p,s,l,e.unprivilegedEditor))};var o=e.isControlled()?t.value:t.defaultValue;return e.value=o??"",e}return n.prototype.validateProps=function(t){var e;if(d.default.Children.count(t.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(d.default.Children.count(t.children)){var o=d.default.Children.only(t.children);if(((e=o)===null||e===void 0?void 0:e.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&t.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},n.prototype.shouldComponentUpdate=function(t,e){var o=this,i;if(this.validateProps(t),!this.editor||this.state.generation!==e.generation)return!0;if("value"in t){var s=this.getEditorContents(),a=(i=t.value,i??"");this.isEqualValue(a,s)||this.setEditorContents(this.editor,a)}return t.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,t.readOnly),b(this.cleanProps,this.dirtyProps).some(function(l){return!c.default(t[l],o.props[l])})},n.prototype.shouldComponentRegenerate=function(t){var e=this;return this.dirtyProps.some(function(o){return!c.default(t[o],e.props[o])})},n.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},n.prototype.componentWillUnmount=function(){this.destroyEditor()},n.prototype.componentDidUpdate=function(t,e){var o=this;if(this.editor&&this.shouldComponentRegenerate(t)){var i=this.editor.getContents(),s=this.editor.getSelection();this.regenerationSnapshot={delta:i,selection:s},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==e.generation){var a=this.regenerationSnapshot,i=a.delta,l=a.selection;delete this.regenerationSnapshot,this.instantiateEditor();var h=this.editor;h.setContents(i),m(function(){return o.setEditorSelection(h,l)})}},n.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},n.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},n.prototype.isControlled=function(){return"value"in this.props},n.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},n.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},n.prototype.createEditor=function(t,e){var o=new E.default(t,e);return e.tabIndex!=null&&this.setEditorTabIndex(o,e.tabIndex),this.hookEditor(o),o},n.prototype.hookEditor=function(t){this.unprivilegedEditor=this.makeUnprivilegedEditor(t),t.on("editor-change",this.onEditorChange)},n.prototype.unhookEditor=function(t){t.off("editor-change",this.onEditorChange)},n.prototype.getEditorContents=function(){return this.value},n.prototype.getEditorSelection=function(){return this.selection},n.prototype.isDelta=function(t){return t&&t.ops},n.prototype.isEqualValue=function(t,e){return this.isDelta(t)&&this.isDelta(e)?c.default(t.ops,e.ops):c.default(t,e)},n.prototype.setEditorContents=function(t,e){var o=this;this.value=e;var i=this.getEditorSelection();typeof e=="string"?t.setContents(t.clipboard.convert(e)):t.setContents(e),m(function(){return o.setEditorSelection(t,i)})},n.prototype.setEditorSelection=function(t,e){if(this.selection=e,e){var o=t.getLength();e.index=Math.max(0,Math.min(e.index,o-1)),e.length=Math.max(0,Math.min(e.length,o-1-e.index)),t.setSelection(e)}},n.prototype.setEditorTabIndex=function(t,e){var o,i;!((i=(o=t)===null||o===void 0?void 0:o.scroll)===null||i===void 0)&&i.domNode&&(t.scroll.domNode.tabIndex=e)},n.prototype.setEditorReadOnly=function(t,e){e?t.disable():t.enable()},n.prototype.makeUnprivilegedEditor=function(t){var e=t;return{getHTML:function(){return e.root.innerHTML},getLength:e.getLength.bind(e),getText:e.getText.bind(e),getContents:e.getContents.bind(e),getSelection:e.getSelection.bind(e),getBounds:e.getBounds.bind(e)}},n.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var t=w.default.findDOMNode(this.editingArea);if(!t)throw new Error("Cannot find element for editing area");if(t.nodeType===3)throw new Error("Editing area cannot be a text node");return t},n.prototype.renderEditingArea=function(){var t=this,e=this.props,o=e.children,i=e.preserveWhitespace,s=this.state.generation,a={key:s,ref:function(l){t.editingArea=l}};return d.default.Children.count(o)?d.default.cloneElement(d.default.Children.only(o),a):i?d.default.createElement("pre",v({},a)):d.default.createElement("div",v({},a))},n.prototype.render=function(){var t;return d.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(t=this.props.className,t??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},n.prototype.onEditorChangeText=function(t,e,o,i){var s,a;if(this.editor){var l=this.isDelta(this.value)?i.getContents():i.getHTML();l!==this.getEditorContents()&&(this.lastDeltaChangeSet=e,this.value=l,(a=(s=this.props).onChange)===null||a===void 0||a.call(s,t,e,o,i))}},n.prototype.onEditorChangeSelection=function(t,e,o){var i,s,a,l,h,u;if(this.editor){var p=this.getEditorSelection(),f=!p&&t,O=p&&!t;c.default(t,p)||(this.selection=t,(s=(i=this.props).onChangeSelection)===null||s===void 0||s.call(i,t,e,o),f?(l=(a=this.props).onFocus)===null||l===void 0||l.call(a,t,e,o):O&&((u=(h=this.props).onBlur)===null||u===void 0||u.call(h,p,e,o)))}},n.prototype.focus=function(){this.editor&&this.editor.focus()},n.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},n.displayName="React Quill",n.Quill=E.default,n.defaultProps={theme:"snow",modules:{},readOnly:!1},n}(d.default.Component);function m(r){Promise.resolve().then(r)}C.exports=S}}]);
|