@tachybase/client 1.0.18 → 1.1.0
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/es/application/Application.d.ts +2 -0
- package/es/application/Application.mjs +15 -0
- package/es/application/TrackingManager.d.ts +13 -0
- package/es/application/TrackingManager.mjs +30 -0
- package/es/application/components/SharePage.d.ts +4 -0
- package/es/application/components/SharePage.mjs +113 -0
- package/es/application/components/ShareSchemaComponent.d.ts +1 -0
- package/es/application/components/ShareSchemaComponent.mjs +10 -0
- package/es/application/components/index.d.ts +2 -0
- package/es/application/components/index.mjs +2 -0
- package/es/built-in/admin-layout/index.d.ts +1 -0
- package/es/built-in/admin-layout/index.mjs +1 -0
- package/es/collection-manager/interfaces/__tests__/json.mjs +2 -2
- package/es/collection-manager/interfaces/integer.d.ts +12 -0
- package/es/collection-manager/interfaces/integer.mjs +13 -1
- package/es/collection-manager/interfaces/number.d.ts +16 -0
- package/es/collection-manager/interfaces/number.mjs +22 -1
- package/es/collection-manager/interfaces/percent.d.ts +12 -0
- package/es/collection-manager/interfaces/percent.mjs +12 -0
- package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToFormInitializerItems.d.ts +3 -0
- package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToFormInitializerItems.mjs +67 -0
- package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToInitializerItems.d.ts +3 -0
- package/es/data-source/collection-fields-to-initializer-items/CollectionFieldsToInitializerItems.mjs +37 -0
- package/es/data-source/collection-fields-to-initializer-items/index.d.ts +1 -0
- package/es/data-source/collection-fields-to-initializer-items/index.mjs +1 -0
- package/es/data-source/collection-fields-to-initializer-items/items/AssociationCollectionFields.d.ts +3 -0
- package/es/data-source/collection-fields-to-initializer-items/items/AssociationCollectionFields.mjs +59 -0
- package/es/data-source/collection-fields-to-initializer-items/items/ParentCollectionFields.d.ts +3 -0
- package/es/data-source/collection-fields-to-initializer-items/items/ParentCollectionFields.mjs +34 -0
- package/es/data-source/collection-fields-to-initializer-items/items/SelfFields.d.ts +3 -0
- package/es/data-source/collection-fields-to-initializer-items/items/SelfFields.mjs +14 -0
- package/es/data-source/collection-fields-to-initializer-items/items/index.d.ts +3 -0
- package/es/data-source/collection-fields-to-initializer-items/items/index.mjs +7 -0
- package/es/data-source/collection-fields-to-initializer-items/utils/getInitializerItemsByFields.d.ts +5 -0
- package/es/data-source/collection-fields-to-initializer-items/utils/getInitializerItemsByFields.mjs +91 -0
- package/es/data-source/collection-fields-to-initializer-items/utils/index.d.ts +3 -0
- package/es/data-source/collection-fields-to-initializer-items/utils/index.mjs +3 -0
- package/es/data-source/collection-fields-to-initializer-items/utils/type.d.ts +108 -0
- package/es/data-source/collection-fields-to-initializer-items/utils/type.mjs +0 -0
- package/es/data-source/collection-fields-to-initializer-items/utils/useCollectionFieldContext.d.ts +21 -0
- package/es/data-source/collection-fields-to-initializer-items/utils/useCollectionFieldContext.mjs +31 -0
- package/es/data-source/index.d.ts +1 -0
- package/es/data-source/index.mjs +1 -0
- package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +0 -8
- package/es/modules/blocks/data-blocks/form/hooks/useEditFormBlockDecoratorProps.d.ts +1 -3
- package/es/modules/blocks/data-blocks/form/hooks/useEditFormBlockDecoratorProps.mjs +4 -1
- package/es/modules/fields/component/InputNumber/inputNumberComponentFieldSettings.mjs +91 -0
- package/es/schema-component/antd/index.d.ts +2 -0
- package/es/schema-component/antd/index.mjs +2 -0
- package/es/schema-component/antd/page/Page.Settings.mjs +33 -0
- package/es/schema-component/antd/page/Page.mjs +113 -18
- package/es/schema-component/antd/page/hooks/index.d.ts +1 -0
- package/es/schema-component/antd/page/hooks/index.mjs +1 -0
- package/es/schema-component/antd/page/hooks/useShareActions.d.ts +7 -0
- package/es/schema-component/antd/page/hooks/useShareActions.mjs +245 -0
- package/es/schema-component/antd/page/index.d.ts +1 -0
- package/es/schema-component/antd/page/index.mjs +1 -0
- package/es/schema-component/antd/page/style.d.ts +5 -0
- package/es/schema-component/antd/page/style.mjs +59 -2
- package/es/schema-component/antd/slider/index.d.ts +1 -0
- package/es/schema-component/antd/slider/index.mjs +1 -0
- package/es/schema-component/antd/slider/slider.d.ts +3 -0
- package/es/schema-component/antd/slider/slider.mjs +11 -0
- package/es/schema-component/antd/tracking-link/index.d.ts +10 -0
- package/es/schema-component/antd/tracking-link/index.mjs +25 -0
- package/es/schema-initializer/utils.d.ts +1 -0
- package/es/schema-initializer/utils.mjs +1 -1
- package/lib/application/Application.js +15 -0
- package/lib/application/TrackingManager.js +66 -0
- package/lib/application/components/SharePage.js +150 -0
- package/lib/application/components/ShareSchemaComponent.js +44 -0
- package/lib/application/components/index.js +18 -0
- package/lib/block-provider/hooks/index.js +2 -2
- package/lib/built-in/admin-layout/index.js +9 -0
- package/lib/collection-manager/interfaces/__tests__/json.js +4 -4
- package/lib/collection-manager/interfaces/integer.js +13 -1
- package/lib/collection-manager/interfaces/number.js +22 -1
- package/lib/collection-manager/interfaces/percent.js +12 -0
- package/lib/data-source/collection-fields-to-initializer-items/CollectionFieldsToFormInitializerItems.js +102 -0
- package/lib/data-source/collection-fields-to-initializer-items/CollectionFieldsToInitializerItems.js +71 -0
- package/lib/data-source/collection-fields-to-initializer-items/index.js +65 -0
- package/lib/data-source/collection-fields-to-initializer-items/items/AssociationCollectionFields.js +93 -0
- package/lib/data-source/collection-fields-to-initializer-items/items/ParentCollectionFields.js +68 -0
- package/lib/data-source/collection-fields-to-initializer-items/items/SelfFields.js +48 -0
- package/lib/data-source/collection-fields-to-initializer-items/items/index.js +40 -0
- package/lib/data-source/collection-fields-to-initializer-items/utils/getInitializerItemsByFields.js +127 -0
- package/lib/data-source/collection-fields-to-initializer-items/utils/index.js +83 -0
- package/lib/data-source/collection-fields-to-initializer-items/utils/type.js +19 -0
- package/lib/data-source/collection-fields-to-initializer-items/utils/useCollectionFieldContext.js +65 -0
- package/lib/data-source/index.js +12 -3
- package/lib/locale/zh-CN.js +18 -0
- package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +0 -8
- package/lib/modules/blocks/data-blocks/form/hooks/useEditFormBlockDecoratorProps.js +4 -1
- package/lib/modules/fields/component/InputNumber/inputNumberComponentFieldSettings.js +91 -0
- package/lib/schema-component/antd/index.js +161 -133
- package/lib/schema-component/antd/page/Page.Settings.js +33 -0
- package/lib/schema-component/antd/page/Page.js +113 -18
- package/lib/schema-component/antd/page/hooks/index.js +65 -0
- package/lib/schema-component/antd/page/hooks/useShareActions.js +293 -0
- package/lib/schema-component/antd/page/index.js +9 -0
- package/lib/schema-component/antd/page/style.js +60 -2
- package/lib/schema-component/antd/slider/index.js +65 -0
- package/lib/schema-component/antd/slider/slider.js +46 -0
- package/lib/schema-component/antd/tracking-link/index.js +59 -0
- package/lib/schema-initializer/utils.js +2 -1
- package/package.json +8 -7
|
@@ -70,6 +70,7 @@ const external_schema_initializer_index_js_namespaceObject = require("./schema-i
|
|
|
70
70
|
const components_index_js_namespaceObject = require("./schema-initializer/components/index.js");
|
|
71
71
|
const external_schema_settings_index_js_namespaceObject = require("./schema-settings/index.js");
|
|
72
72
|
const external_SystemSettingsManager_js_namespaceObject = require("./SystemSettingsManager.js");
|
|
73
|
+
const external_TrackingManager_js_namespaceObject = require("./TrackingManager.js");
|
|
73
74
|
const external_UserSettingsManager_js_namespaceObject = require("./UserSettingsManager.js");
|
|
74
75
|
const external_utils_index_js_namespaceObject = require("./utils/index.js");
|
|
75
76
|
const globalDeps_js_namespaceObject = require("./utils/globalDeps.js");
|
|
@@ -130,6 +131,18 @@ class Application {
|
|
|
130
131
|
path: '*',
|
|
131
132
|
Component: this.components['AppNotFound']
|
|
132
133
|
});
|
|
134
|
+
this.router.add('share', {
|
|
135
|
+
path: '/share',
|
|
136
|
+
Component: external_components_index_js_namespaceObject.SharePage
|
|
137
|
+
});
|
|
138
|
+
this.router.add('share.page', {
|
|
139
|
+
path: '/share/:name',
|
|
140
|
+
Component: external_components_index_js_namespaceObject.ShareSchemaComponent
|
|
141
|
+
});
|
|
142
|
+
this.router.add('share.notAuthorized', {
|
|
143
|
+
path: '/share/not-authorized',
|
|
144
|
+
element: null
|
|
145
|
+
});
|
|
133
146
|
}
|
|
134
147
|
getOptions() {
|
|
135
148
|
return this.options;
|
|
@@ -316,6 +329,7 @@ class Application {
|
|
|
316
329
|
_define_property(this, "schemaSettingsManager", void 0);
|
|
317
330
|
_define_property(this, "dataSourceManager", void 0);
|
|
318
331
|
_define_property(this, "noticeManager", void 0);
|
|
332
|
+
_define_property(this, "trackingManager", void 0);
|
|
319
333
|
_define_property(this, "pluginContextMenu", void 0);
|
|
320
334
|
_define_property(this, "AttachmentPreviewManager", void 0);
|
|
321
335
|
_define_property(this, "name", void 0);
|
|
@@ -357,6 +371,7 @@ class Application {
|
|
|
357
371
|
this.schemaInitializerManager = new external_schema_initializer_index_js_namespaceObject.SchemaInitializerManager(options.schemaInitializers, this);
|
|
358
372
|
this.dataSourceManager = new DataSourceManager_js_namespaceObject.DataSourceManager(options.dataSourceManager, this);
|
|
359
373
|
this.noticeManager = new external_NoticesManager_js_namespaceObject.NoticeManager(this);
|
|
374
|
+
this.trackingManager = new external_TrackingManager_js_namespaceObject.TrackingManager(this);
|
|
360
375
|
this.addDefaultProviders();
|
|
361
376
|
this.addReactRouterComponents();
|
|
362
377
|
this.addProviders(options.providers || []);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
TrackingManager: function() {
|
|
30
|
+
return TrackingManager;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
function _define_property(obj, key, value) {
|
|
34
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
35
|
+
value: value,
|
|
36
|
+
enumerable: true,
|
|
37
|
+
configurable: true,
|
|
38
|
+
writable: true
|
|
39
|
+
});
|
|
40
|
+
else obj[key] = value;
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
class TrackingManager {
|
|
44
|
+
async logEvent(type, key, values) {
|
|
45
|
+
const data = {
|
|
46
|
+
type,
|
|
47
|
+
key,
|
|
48
|
+
values
|
|
49
|
+
};
|
|
50
|
+
this.api.resource('instrumentation').create({
|
|
51
|
+
values: {
|
|
52
|
+
...data
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
constructor(app){
|
|
57
|
+
_define_property(this, "app", void 0);
|
|
58
|
+
_define_property(this, "api", void 0);
|
|
59
|
+
this.app = app;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
var __webpack_export_target__ = exports;
|
|
63
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
64
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
65
|
+
value: true
|
|
66
|
+
});
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
useShareToken: ()=>useShareToken,
|
|
30
|
+
SharePage: ()=>SharePage,
|
|
31
|
+
NotAuthorityResult: ()=>NotAuthorityResult,
|
|
32
|
+
ShareLayout: ()=>ShareLayout
|
|
33
|
+
});
|
|
34
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
35
|
+
const external_react_namespaceObject = require("react");
|
|
36
|
+
const css_namespaceObject = require("@emotion/css");
|
|
37
|
+
const external_antd_namespaceObject = require("antd");
|
|
38
|
+
const external_react_router_namespaceObject = require("react-router");
|
|
39
|
+
const external_react_router_dom_namespaceObject = require("react-router-dom");
|
|
40
|
+
const index_js_namespaceObject = require("../../api-client/index.js");
|
|
41
|
+
const admin_layout_index_js_namespaceObject = require("../../built-in/admin-layout/index.js");
|
|
42
|
+
const pinned_list_index_js_namespaceObject = require("../../built-in/pinned-list/index.js");
|
|
43
|
+
const system_settings_index_js_namespaceObject = require("../../built-in/system-settings/index.js");
|
|
44
|
+
const external_user_index_js_namespaceObject = require("../../user/index.js");
|
|
45
|
+
const external_hooks_index_js_namespaceObject = require("../hooks/index.js");
|
|
46
|
+
function _tagged_template_literal(strings, raw) {
|
|
47
|
+
if (!raw) raw = strings.slice(0);
|
|
48
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
49
|
+
raw: {
|
|
50
|
+
value: Object.freeze(raw)
|
|
51
|
+
}
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
function _templateObject() {
|
|
55
|
+
const data = _tagged_template_literal([
|
|
56
|
+
"\n display: flex;\n flex-direction: column;\n position: relative;\n overflow-y: auto;\n > div {\n position: relative;\n }\n .ant-layout-footer {\n position: absolute;\n bottom: 0;\n text-align: center;\n width: 100%;\n z-index: 0;\n padding: 0px 50px;\n }\n "
|
|
57
|
+
]);
|
|
58
|
+
_templateObject = function() {
|
|
59
|
+
return data;
|
|
60
|
+
};
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
function useShareToken() {
|
|
64
|
+
const url = new URL(window.location.href);
|
|
65
|
+
const api = (0, index_js_namespaceObject.useAPIClient)();
|
|
66
|
+
const token = url.searchParams.get('token');
|
|
67
|
+
return token && api.auth.setToken(token), api.auth.getToken();
|
|
68
|
+
}
|
|
69
|
+
const ShareLayout = ()=>{
|
|
70
|
+
var _result_data_data_logo, _result_data_data, _result_data, _result_data_data1, _result_data1;
|
|
71
|
+
const { styles } = (0, admin_layout_index_js_namespaceObject.useStyles)();
|
|
72
|
+
const app = (0, external_hooks_index_js_namespaceObject.useApp)();
|
|
73
|
+
const result = (0, system_settings_index_js_namespaceObject.useSystemSettings)();
|
|
74
|
+
const sideMenuRef = (0, external_react_namespaceObject.useRef)();
|
|
75
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Layout, {
|
|
76
|
+
style: {
|
|
77
|
+
height: '100%'
|
|
78
|
+
},
|
|
79
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Layout.Content, {
|
|
80
|
+
className: (0, css_namespaceObject.css)(_templateObject()),
|
|
81
|
+
children: [
|
|
82
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Layout.Header, {
|
|
83
|
+
className: styles.header,
|
|
84
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
85
|
+
className: styles.headerA,
|
|
86
|
+
children: [
|
|
87
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
88
|
+
className: styles.headerB,
|
|
89
|
+
children: [
|
|
90
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
91
|
+
className: styles.titleContainer,
|
|
92
|
+
onClick: ()=>{
|
|
93
|
+
location.href = app.adminUrl;
|
|
94
|
+
},
|
|
95
|
+
children: [
|
|
96
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
|
|
97
|
+
className: styles.logo,
|
|
98
|
+
src: null == result ? void 0 : null === (_result_data = result.data) || void 0 === _result_data ? void 0 : null === (_result_data_data = _result_data.data) || void 0 === _result_data_data ? void 0 : null === (_result_data_data_logo = _result_data_data.logo) || void 0 === _result_data_data_logo ? void 0 : _result_data_data_logo.url
|
|
99
|
+
}),
|
|
100
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h1", {
|
|
101
|
+
className: styles.title,
|
|
102
|
+
children: null == result ? void 0 : null === (_result_data1 = result.data) || void 0 === _result_data1 ? void 0 : null === (_result_data_data1 = _result_data1.data) || void 0 === _result_data_data1 ? void 0 : _result_data_data1.title
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(admin_layout_index_js_namespaceObject.MenuEditor, {
|
|
107
|
+
sideMenuRef: sideMenuRef
|
|
108
|
+
}),
|
|
109
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
110
|
+
className: styles.headerTabs,
|
|
111
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(admin_layout_index_js_namespaceObject.AdminTabs, {})
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
}),
|
|
115
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
116
|
+
className: styles.right,
|
|
117
|
+
children: [
|
|
118
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(pinned_list_index_js_namespaceObject.PinnedPluginList, {
|
|
119
|
+
belongToFilter: "pinnedmenu"
|
|
120
|
+
}),
|
|
121
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_user_index_js_namespaceObject.CurrentUser, {})
|
|
122
|
+
]
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
})
|
|
126
|
+
}),
|
|
127
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_router_dom_namespaceObject.Outlet, {})
|
|
128
|
+
]
|
|
129
|
+
})
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
const SharePage = ()=>{
|
|
133
|
+
const shareToken = useShareToken();
|
|
134
|
+
return shareToken ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(admin_layout_index_js_namespaceObject.AdminProvider, {
|
|
135
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ShareLayout, {})
|
|
136
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(NotAuthorityResult, {});
|
|
137
|
+
};
|
|
138
|
+
function NotAuthorityResult() {
|
|
139
|
+
const { pathname, search } = (0, external_react_router_namespaceObject.useLocation)();
|
|
140
|
+
const redirect = "?redirect=".concat(pathname).concat(search);
|
|
141
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_router_namespaceObject.Navigate, {
|
|
142
|
+
replace: true,
|
|
143
|
+
to: "/signin".concat(redirect)
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
var __webpack_export_target__ = exports;
|
|
147
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
148
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
149
|
+
value: true
|
|
150
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
ShareSchemaComponent: ()=>ShareSchemaComponent
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const external_react_router_namespaceObject = require("react-router");
|
|
33
|
+
const index_js_namespaceObject = require("../../schema-component/index.js");
|
|
34
|
+
function ShareSchemaComponent() {
|
|
35
|
+
const params = (0, external_react_router_namespaceObject.useParams)();
|
|
36
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.RemoteSchemaComponent, {
|
|
37
|
+
uid: params.name
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
var __webpack_export_target__ = exports;
|
|
41
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
42
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
43
|
+
value: true
|
|
44
|
+
});
|
|
@@ -9,6 +9,12 @@ var __webpack_modules__ = {
|
|
|
9
9
|
"./RouterContextCleaner": function(module) {
|
|
10
10
|
module.exports = require("./RouterContextCleaner.js");
|
|
11
11
|
},
|
|
12
|
+
"./SharePage": function(module) {
|
|
13
|
+
module.exports = require("./SharePage.js");
|
|
14
|
+
},
|
|
15
|
+
"./ShareSchemaComponent": function(module) {
|
|
16
|
+
module.exports = require("./ShareSchemaComponent.js");
|
|
17
|
+
},
|
|
12
18
|
"./defaultComponents": function(module) {
|
|
13
19
|
module.exports = require("./defaultComponents.js");
|
|
14
20
|
}
|
|
@@ -85,6 +91,18 @@ for(var __WEBPACK_IMPORT_KEY__ in _RouterContextCleaner__WEBPACK_IMPORTED_MODULE
|
|
|
85
91
|
return _RouterContextCleaner__WEBPACK_IMPORTED_MODULE_3__[key];
|
|
86
92
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
87
93
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
94
|
+
var _SharePage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./SharePage");
|
|
95
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
96
|
+
for(var __WEBPACK_IMPORT_KEY__ in _SharePage__WEBPACK_IMPORTED_MODULE_4__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
97
|
+
return _SharePage__WEBPACK_IMPORTED_MODULE_4__[key];
|
|
98
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
99
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
100
|
+
var _ShareSchemaComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("./ShareSchemaComponent");
|
|
101
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
102
|
+
for(var __WEBPACK_IMPORT_KEY__ in _ShareSchemaComponent__WEBPACK_IMPORTED_MODULE_5__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
103
|
+
return _ShareSchemaComponent__WEBPACK_IMPORTED_MODULE_5__[key];
|
|
104
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
105
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
88
106
|
var __webpack_export_target__ = exports;
|
|
89
107
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
90
108
|
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
@@ -15,7 +15,7 @@ var __webpack_modules__ = {
|
|
|
15
15
|
"../../filter-provider/utils": function(module) {
|
|
16
16
|
module.exports = require("../../filter-provider/utils.js");
|
|
17
17
|
},
|
|
18
|
-
"
|
|
18
|
+
"../..": function(module) {
|
|
19
19
|
module.exports = require("../../index.js");
|
|
20
20
|
},
|
|
21
21
|
"../../record-provider": function(module) {
|
|
@@ -235,7 +235,7 @@ var lodash_omit__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/ __webpack_r
|
|
|
235
235
|
var react_i18next__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("react-i18next");
|
|
236
236
|
var react_router_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("react-router-dom");
|
|
237
237
|
var react_to_print__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("react-to-print");
|
|
238
|
-
var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("
|
|
238
|
+
var ___WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../..");
|
|
239
239
|
var _api_client__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../../api-client");
|
|
240
240
|
var _built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../built-in/dynamic-page/utils");
|
|
241
241
|
var _collection_manager__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../../collection-manager");
|
|
@@ -26,6 +26,9 @@ var __webpack_modules__ = {
|
|
|
26
26
|
},
|
|
27
27
|
"./filterByACL": function(module) {
|
|
28
28
|
module.exports = require("./filterByACL.js");
|
|
29
|
+
},
|
|
30
|
+
"./style?6351": function(module) {
|
|
31
|
+
module.exports = require("./style.js");
|
|
29
32
|
}
|
|
30
33
|
};
|
|
31
34
|
var __webpack_module_cache__ = {};
|
|
@@ -130,6 +133,12 @@ for(var __WEBPACK_IMPORT_KEY__ in _filterByACL__WEBPACK_IMPORTED_MODULE_8__)if (
|
|
|
130
133
|
return _filterByACL__WEBPACK_IMPORTED_MODULE_8__[key];
|
|
131
134
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
132
135
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
136
|
+
var _style__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./style?6351");
|
|
137
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
138
|
+
for(var __WEBPACK_IMPORT_KEY__ in _style__WEBPACK_IMPORTED_MODULE_9__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
139
|
+
return _style__WEBPACK_IMPORTED_MODULE_9__[key];
|
|
140
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
141
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
133
142
|
var __webpack_export_target__ = exports;
|
|
134
143
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
135
144
|
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
@@ -3,8 +3,8 @@ var __webpack_exports__ = {};
|
|
|
3
3
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
4
4
|
require("react");
|
|
5
5
|
const client_namespaceObject = require("@tachybase/test/client");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const index_js_namespaceObject = require("../../../common/appInfo/index.js");
|
|
7
|
+
const checkbox_index_js_namespaceObject = require("../../../schema-component/antd/checkbox/index.js");
|
|
8
8
|
const input_index_js_namespaceObject = require("../../../schema-component/antd/input/index.js");
|
|
9
9
|
const SchemaComponent_js_namespaceObject = require("../../../schema-component/core/SchemaComponent.js");
|
|
10
10
|
const SchemaComponentProvider_js_namespaceObject = require("../../../schema-component/core/SchemaComponentProvider.js");
|
|
@@ -12,7 +12,7 @@ const external_json_js_namespaceObject = require("../json.js");
|
|
|
12
12
|
const Component = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaComponentProvider_js_namespaceObject.SchemaComponentProvider, {
|
|
13
13
|
components: {
|
|
14
14
|
Input: input_index_js_namespaceObject.Input,
|
|
15
|
-
Checkbox:
|
|
15
|
+
Checkbox: checkbox_index_js_namespaceObject.Checkbox
|
|
16
16
|
},
|
|
17
17
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaComponent_js_namespaceObject.SchemaComponent, {
|
|
18
18
|
schema: external_json_js_namespaceObject.json
|
|
@@ -23,7 +23,7 @@ describe('JSON', ()=>{
|
|
|
23
23
|
(0, client_namespaceObject.render)(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Component, {}), {
|
|
24
24
|
wrapper: (param)=>{
|
|
25
25
|
let { children } = param;
|
|
26
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
26
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.CurrentAppInfoContext.Provider, {
|
|
27
27
|
value: {
|
|
28
28
|
data: {
|
|
29
29
|
database: {
|
|
@@ -80,7 +80,19 @@ class IntegerFieldInterface extends CollectionFieldInterface_js_namespaceObject.
|
|
|
80
80
|
unique: external_properties_index_js_namespaceObject.unique
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
autoIncrement: external_properties_index_js_namespaceObject.autoIncrement
|
|
83
|
+
autoIncrement: external_properties_index_js_namespaceObject.autoIncrement,
|
|
84
|
+
'uiSchema.x-component-props.addonBefore': {
|
|
85
|
+
type: 'string',
|
|
86
|
+
title: '{{t("Prefix")}}',
|
|
87
|
+
'x-decorator': 'FormItem',
|
|
88
|
+
'x-component': 'Input'
|
|
89
|
+
},
|
|
90
|
+
'uiSchema.x-component-props.addonAfter': {
|
|
91
|
+
type: 'string',
|
|
92
|
+
title: '{{t("Suffix")}}',
|
|
93
|
+
'x-decorator': 'FormItem',
|
|
94
|
+
'x-component': 'Input'
|
|
95
|
+
}
|
|
84
96
|
}), _define_property(this, "filterable", {
|
|
85
97
|
operators: external_properties_index_js_namespaceObject.operators.number
|
|
86
98
|
}), _define_property(this, "titleUsable", true), _define_property(this, "validateSchema", (fieldSchema)=>({
|
|
@@ -113,7 +113,16 @@ class NumberFieldInterface extends CollectionFieldInterface_js_namespaceObject.C
|
|
|
113
113
|
step: '1'
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
}), _define_property(this, "
|
|
116
|
+
}), _define_property(this, "componentOptions", [
|
|
117
|
+
{
|
|
118
|
+
label: '{{t("InputNumber")}}',
|
|
119
|
+
value: 'InputNumber'
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
label: '{{t("Slider")}}',
|
|
123
|
+
value: 'Slider'
|
|
124
|
+
}
|
|
125
|
+
]), _define_property(this, "availableTypes", [
|
|
117
126
|
'double',
|
|
118
127
|
'float',
|
|
119
128
|
'decimal'
|
|
@@ -152,6 +161,18 @@ class NumberFieldInterface extends CollectionFieldInterface_js_namespaceObject.C
|
|
|
152
161
|
label: '1.00000'
|
|
153
162
|
}
|
|
154
163
|
]
|
|
164
|
+
},
|
|
165
|
+
'uiSchema.x-component-props.addonBefore': {
|
|
166
|
+
type: 'string',
|
|
167
|
+
title: '{{t("Prefix")}}',
|
|
168
|
+
'x-decorator': 'FormItem',
|
|
169
|
+
'x-component': 'Input'
|
|
170
|
+
},
|
|
171
|
+
'uiSchema.x-component-props.addonAfter': {
|
|
172
|
+
type: 'string',
|
|
173
|
+
title: '{{t("Suffix")}}',
|
|
174
|
+
'x-decorator': 'FormItem',
|
|
175
|
+
'x-component': 'Input'
|
|
155
176
|
}
|
|
156
177
|
}), _define_property(this, "filterable", {
|
|
157
178
|
operators: external_properties_index_js_namespaceObject.operators.number
|
|
@@ -128,6 +128,18 @@ class PercentFieldInterface extends CollectionFieldInterface_js_namespaceObject.
|
|
|
128
128
|
label: '1.00000%'
|
|
129
129
|
}
|
|
130
130
|
]
|
|
131
|
+
},
|
|
132
|
+
'uiSchema.x-component-props.addonBefore': {
|
|
133
|
+
type: 'string',
|
|
134
|
+
title: '{{t("Prefix")}}',
|
|
135
|
+
'x-decorator': 'FormItem',
|
|
136
|
+
'x-component': 'Input'
|
|
137
|
+
},
|
|
138
|
+
'uiSchema.x-component-props.addonAfter': {
|
|
139
|
+
type: 'string',
|
|
140
|
+
title: '{{t("Suffix")}}',
|
|
141
|
+
'x-decorator': 'FormItem',
|
|
142
|
+
'x-component': 'Input'
|
|
131
143
|
}
|
|
132
144
|
}), _define_property(this, "filterable", {
|
|
133
145
|
operators: external_properties_index_js_namespaceObject.operators.number
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
CollectionFieldsToFormInitializerItems: ()=>CollectionFieldsToFormInitializerItems,
|
|
30
|
+
findKanbanFormItem: ()=>findKanbanFormItem
|
|
31
|
+
});
|
|
32
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
33
|
+
const utils_js_namespaceObject = require("../../schema-initializer/utils.js");
|
|
34
|
+
const external_CollectionFieldsToInitializerItems_js_namespaceObject = require("./CollectionFieldsToInitializerItems.js");
|
|
35
|
+
const findKanbanFormItem = (schema, key, action)=>{
|
|
36
|
+
const s = (0, utils_js_namespaceObject.findSchema)(schema, 'x-component', 'Kanban');
|
|
37
|
+
return (0, utils_js_namespaceObject.findSchema)(s, key, action);
|
|
38
|
+
};
|
|
39
|
+
const CollectionFieldsToFormInitializerItems = (props)=>{
|
|
40
|
+
const block = (null == props ? void 0 : props.block) || 'Form';
|
|
41
|
+
const fieldItemSchema = {
|
|
42
|
+
'x-toolbar': 'FormItemSchemaToolbar',
|
|
43
|
+
'x-settings': 'fieldSettings:FormItem',
|
|
44
|
+
'x-decorator': 'FormItem'
|
|
45
|
+
};
|
|
46
|
+
const initializerItem = {
|
|
47
|
+
remove: utils_js_namespaceObject.removeGridFormItem
|
|
48
|
+
};
|
|
49
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CollectionFieldsToInitializerItems_js_namespaceObject.CollectionFieldsToInitializerItems, {
|
|
50
|
+
block: block,
|
|
51
|
+
selfField: {
|
|
52
|
+
filter: (field)=>!field.treeChildren,
|
|
53
|
+
getSchema: (field, param)=>{
|
|
54
|
+
let { targetCollection } = param;
|
|
55
|
+
var _field_uiSchema_xcomponentprops, _field_uiSchema;
|
|
56
|
+
const isFileCollection = (null == targetCollection ? void 0 : targetCollection.template) === 'file';
|
|
57
|
+
const isAssociationField = targetCollection;
|
|
58
|
+
const fieldNames = null == field ? void 0 : null === (_field_uiSchema = field.uiSchema) || void 0 === _field_uiSchema ? void 0 : null === (_field_uiSchema_xcomponentprops = _field_uiSchema['x-component-props']) || void 0 === _field_uiSchema_xcomponentprops ? void 0 : _field_uiSchema_xcomponentprops['fieldNames'];
|
|
59
|
+
return {
|
|
60
|
+
...fieldItemSchema,
|
|
61
|
+
'x-component-props': isFileCollection ? {
|
|
62
|
+
fieldNames: {
|
|
63
|
+
label: 'preview',
|
|
64
|
+
value: 'id'
|
|
65
|
+
}
|
|
66
|
+
} : isAssociationField && fieldNames ? {
|
|
67
|
+
fieldNames: {
|
|
68
|
+
...fieldNames,
|
|
69
|
+
label: (null == targetCollection ? void 0 : targetCollection.titleField) || fieldNames.label
|
|
70
|
+
}
|
|
71
|
+
} : {}
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
getInitializerItem: ()=>({
|
|
75
|
+
...initializerItem,
|
|
76
|
+
find: (null == props ? void 0 : props.block) === 'Kanban' ? findKanbanFormItem : void 0
|
|
77
|
+
})
|
|
78
|
+
},
|
|
79
|
+
parentField: {
|
|
80
|
+
getSchema: ()=>fieldItemSchema,
|
|
81
|
+
getInitializerItem: ()=>initializerItem
|
|
82
|
+
},
|
|
83
|
+
associationField: {
|
|
84
|
+
filterSelfField: (field)=>{
|
|
85
|
+
if ('Form' !== block) return true;
|
|
86
|
+
return (null == field ? void 0 : field.interface) === 'm2o';
|
|
87
|
+
},
|
|
88
|
+
filterAssociationField (collectionField) {
|
|
89
|
+
return (null == collectionField ? void 0 : collectionField.interface) && ![
|
|
90
|
+
'subTable'
|
|
91
|
+
].includes(null == collectionField ? void 0 : collectionField.interface) && !collectionField.treeChildren;
|
|
92
|
+
},
|
|
93
|
+
getSchema: ()=>fieldItemSchema,
|
|
94
|
+
getInitializerItem: ()=>initializerItem
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
var __webpack_export_target__ = exports;
|
|
99
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
100
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
101
|
+
value: true
|
|
102
|
+
});
|
package/lib/data-source/collection-fields-to-initializer-items/CollectionFieldsToInitializerItems.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
CollectionFieldsToInitializerItems: ()=>CollectionFieldsToInitializerItems
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const index_js_namespaceObject = require("./items/index.js");
|
|
33
|
+
const external_utils_index_js_namespaceObject = require("./utils/index.js");
|
|
34
|
+
const CollectionFieldsToInitializerItems = (props)=>{
|
|
35
|
+
const { selfField, parentField, associationField, block } = props;
|
|
36
|
+
const context = (0, external_utils_index_js_namespaceObject.useCollectionFieldContext)();
|
|
37
|
+
if (!context.collection) return null;
|
|
38
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.SelfFields, {
|
|
41
|
+
block: block,
|
|
42
|
+
...selfField,
|
|
43
|
+
context: {
|
|
44
|
+
...context,
|
|
45
|
+
collection: context.collection
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
parentField && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.ParentCollectionFields, {
|
|
49
|
+
block: block,
|
|
50
|
+
...parentField,
|
|
51
|
+
context: {
|
|
52
|
+
...context,
|
|
53
|
+
collection: context.collection
|
|
54
|
+
}
|
|
55
|
+
}),
|
|
56
|
+
associationField && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.AssociationCollectionFields, {
|
|
57
|
+
block: block,
|
|
58
|
+
...associationField,
|
|
59
|
+
context: {
|
|
60
|
+
...context,
|
|
61
|
+
collection: context.collection
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
var __webpack_export_target__ = exports;
|
|
68
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
69
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
70
|
+
value: true
|
|
71
|
+
});
|