@nocobase/client 0.7.6-alpha.2 → 0.8.0-alpha.4
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/acl/ACLShortcut.d.ts +2 -0
- package/es/acl/ACLShortcut.js +31 -2
- package/es/api-client/APIClient.d.ts +1 -0
- package/es/api-client/APIClient.js +6 -1
- package/es/application/Application.d.ts +3 -1
- package/es/application/Application.js +131 -39
- package/es/block-provider/BlockProvider.js +12 -1
- package/es/block-provider/CalendarBlockProvider.d.ts +1 -0
- package/es/block-provider/CalendarBlockProvider.js +6 -3
- package/es/block-provider/TableSelectorProvider.js +21 -6
- package/es/block-provider/hooks/index.d.ts +6 -0
- package/es/block-provider/hooks/index.js +485 -115
- package/es/collection-manager/CollectionManagerProvider.js +26 -45
- package/es/collection-manager/CollectionManagerShortcut.d.ts +2 -0
- package/es/collection-manager/CollectionManagerShortcut.js +38 -3
- package/es/collection-manager/Configuration/AddFieldAction.d.ts +5 -1
- package/es/collection-manager/Configuration/AddFieldAction.js +44 -13
- package/es/collection-manager/Configuration/EditFieldAction.d.ts +1 -0
- package/es/collection-manager/Configuration/EditFieldAction.js +24 -11
- package/es/collection-manager/Configuration/index.d.ts +2 -0
- package/es/collection-manager/Configuration/index.js +2 -0
- package/es/collection-manager/Configuration/schemas/collectionFields.js +2 -2
- package/es/collection-manager/index.d.ts +1 -0
- package/es/collection-manager/index.js +2 -1
- package/es/collection-manager/interfaces/index.d.ts +1 -0
- package/es/collection-manager/interfaces/index.js +1 -0
- package/es/collection-manager/interfaces/json.d.ts +2 -0
- package/es/collection-manager/interfaces/json.js +48 -0
- package/es/collection-manager/interfaces/m2o.js +3 -3
- package/es/collection-manager/interfaces/o2m.js +5 -6
- package/es/collection-manager/interfaces/o2o.js +5 -5
- package/es/collection-manager/interfaces/properties/index.d.ts +14 -0
- package/es/collection-manager/interfaces/properties/index.js +23 -0
- package/es/collection-manager/interfaces/sequence.js +13 -9
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/locale/en_US.d.ts +14 -1
- package/es/locale/en_US.js +15 -2
- package/es/locale/ja_JP.d.ts +2 -1
- package/es/locale/ja_JP.js +2 -1
- package/es/locale/ru_RU.d.ts +2 -1
- package/es/locale/ru_RU.js +2 -1
- package/es/locale/tr_TR.d.ts +1 -1
- package/es/locale/tr_TR.js +1 -1
- package/es/locale/zh_CN.d.ts +40 -1
- package/es/locale/zh_CN.js +41 -2
- package/es/plugin-manager/PluginManager.js +35 -23
- package/es/pm/PluginManagerLink.d.ts +2 -0
- package/es/pm/PluginManagerLink.js +111 -0
- package/es/pm/index.d.ts +4 -0
- package/es/pm/index.js +422 -0
- package/es/route-switch/antd/admin-layout/index.js +1 -1
- package/es/schema-component/antd/action/Action.Designer.js +35 -12
- package/es/schema-component/antd/action/Action.Modal.js +4 -2
- package/es/schema-component/antd/action/Action.js +3 -3
- package/es/schema-component/antd/action/context.d.ts +2 -0
- package/es/schema-component/antd/action/hooks.d.ts +1 -0
- package/es/schema-component/antd/calendar/Calendar.Designer.js +19 -6
- package/es/schema-component/antd/calendar/Calendar.js +23 -2
- package/es/schema-component/antd/calendar/Title.js +18 -3
- package/es/schema-component/antd/calendar/components/Header.d.ts +10 -0
- package/es/schema-component/antd/calendar/components/Header.js +43 -0
- package/es/schema-component/antd/calendar/style.less +53 -9
- package/es/schema-component/antd/calendar/types.d.ts +6 -0
- package/es/schema-component/antd/calendar/utils.d.ts +2 -0
- package/es/schema-component/antd/calendar/utils.js +7 -0
- package/es/schema-component/antd/checkbox/Checkbox.js +13 -4
- package/es/schema-component/antd/formula-input/FormulaInput.js +28 -37
- package/es/schema-component/antd/input/Input.d.ts +1 -0
- package/es/schema-component/antd/input/Input.js +2 -0
- package/es/schema-component/antd/input/Json.d.ts +6 -0
- package/es/schema-component/antd/input/Json.js +41 -0
- package/es/schema-component/antd/input/ReadPretty.d.ts +3 -0
- package/es/schema-component/antd/input/ReadPretty.js +15 -0
- package/es/schema-component/antd/input/index.d.ts +1 -0
- package/es/schema-component/antd/input/index.js +2 -1
- package/es/schema-component/antd/markdown/Markdown.Void.js +5 -2
- package/es/schema-component/antd/radio/Radio.js +2 -1
- package/es/schema-component/antd/select/ReadPretty.js +2 -1
- package/es/schema-component/antd/table-v2/TableSelectorDesigner.js +16 -2
- package/es/schema-component/antd/upload/Upload.js +2 -1
- package/es/schema-component/antd/upload/shared.js +5 -6
- package/es/schema-component/antd/upload/type.d.ts +2 -0
- package/es/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/BulkEditFormItemInitializers.js +50 -0
- package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +35 -0
- package/es/schema-initializer/buttons/FormActionInitializers.d.ts +132 -0
- package/es/schema-initializer/buttons/FormActionInitializers.js +118 -0
- package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
- package/es/schema-initializer/buttons/TabPaneInitializers.js +13 -0
- package/es/schema-initializer/buttons/TableActionInitializers.d.ts +56 -2
- package/es/schema-initializer/buttons/TableActionInitializers.js +45 -0
- package/es/schema-initializer/buttons/index.d.ts +2 -0
- package/es/schema-initializer/buttons/index.js +2 -0
- package/es/schema-initializer/components/BulkEditField.d.ts +7 -0
- package/es/schema-initializer/components/BulkEditField.js +187 -0
- package/es/schema-initializer/components/index.d.ts +1 -0
- package/es/schema-initializer/components/index.js +2 -1
- package/es/schema-initializer/items/BlockInitializer.js +8 -8
- package/es/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/BulkEditSubmitActionInitializer.js +24 -0
- package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +103 -0
- package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +1 -0
- package/es/schema-initializer/items/CustomizeBulkEditActionInitializer.js +61 -0
- package/es/schema-initializer/items/index.d.ts +3 -0
- package/es/schema-initializer/items/index.js +3 -0
- package/es/schema-initializer/utils.d.ts +1 -0
- package/es/schema-initializer/utils.js +67 -12
- package/es/schema-settings/SchemaSettings.d.ts +6 -0
- package/es/schema-settings/SchemaSettings.js +4 -1
- package/es/schema-templates/BlockTemplatePage.d.ts +1 -0
- package/es/schema-templates/BlockTemplatePage.js +7 -0
- package/es/schema-templates/SchemaTemplateShortcut.js +1 -1
- package/es/system-settings/SystemSettingsShortcut.d.ts +2 -0
- package/es/system-settings/SystemSettingsShortcut.js +134 -5
- package/lib/acl/ACLShortcut.d.ts +2 -0
- package/lib/acl/ACLShortcut.js +41 -4
- package/lib/api-client/APIClient.d.ts +1 -0
- package/lib/api-client/APIClient.js +6 -1
- package/lib/application/Application.d.ts +3 -1
- package/lib/application/Application.js +139 -39
- package/lib/block-provider/BlockProvider.js +11 -0
- package/lib/block-provider/CalendarBlockProvider.d.ts +1 -0
- package/lib/block-provider/CalendarBlockProvider.js +6 -3
- package/lib/block-provider/TableSelectorProvider.js +21 -6
- package/lib/block-provider/hooks/index.d.ts +6 -0
- package/lib/block-provider/hooks/index.js +496 -115
- package/lib/collection-manager/CollectionManagerProvider.js +28 -47
- package/lib/collection-manager/CollectionManagerShortcut.d.ts +2 -0
- package/lib/collection-manager/CollectionManagerShortcut.js +47 -4
- package/lib/collection-manager/Configuration/AddFieldAction.d.ts +5 -1
- package/lib/collection-manager/Configuration/AddFieldAction.js +48 -12
- package/lib/collection-manager/Configuration/EditFieldAction.d.ts +1 -0
- package/lib/collection-manager/Configuration/EditFieldAction.js +26 -10
- package/lib/collection-manager/Configuration/index.d.ts +2 -0
- package/lib/collection-manager/Configuration/index.js +26 -0
- package/lib/collection-manager/Configuration/schemas/collectionFields.js +2 -2
- package/lib/collection-manager/index.d.ts +1 -0
- package/lib/collection-manager/index.js +14 -0
- package/lib/collection-manager/interfaces/index.d.ts +1 -0
- package/lib/collection-manager/interfaces/index.js +13 -0
- package/lib/collection-manager/interfaces/json.d.ts +2 -0
- package/lib/collection-manager/interfaces/json.js +58 -0
- package/lib/collection-manager/interfaces/m2o.js +2 -2
- package/lib/collection-manager/interfaces/o2m.js +4 -5
- package/lib/collection-manager/interfaces/o2o.js +4 -4
- package/lib/collection-manager/interfaces/properties/index.d.ts +14 -0
- package/lib/collection-manager/interfaces/properties/index.js +25 -1
- package/lib/collection-manager/interfaces/sequence.js +13 -9
- package/lib/index.d.ts +1 -0
- package/lib/index.js +13 -0
- package/lib/locale/en_US.d.ts +14 -1
- package/lib/locale/en_US.js +15 -2
- package/lib/locale/ja_JP.d.ts +2 -1
- package/lib/locale/ja_JP.js +2 -1
- package/lib/locale/ru_RU.d.ts +2 -1
- package/lib/locale/ru_RU.js +2 -1
- package/lib/locale/tr_TR.d.ts +1 -1
- package/lib/locale/tr_TR.js +1 -1
- package/lib/locale/zh_CN.d.ts +40 -1
- package/lib/locale/zh_CN.js +41 -2
- package/lib/plugin-manager/PluginManager.js +33 -21
- package/lib/pm/PluginManagerLink.d.ts +2 -0
- package/lib/pm/PluginManagerLink.js +138 -0
- package/lib/pm/index.d.ts +4 -0
- package/lib/pm/index.js +474 -0
- package/lib/route-switch/antd/admin-layout/index.js +1 -1
- package/lib/schema-component/antd/action/Action.Designer.js +35 -12
- package/lib/schema-component/antd/action/Action.Modal.js +4 -2
- package/lib/schema-component/antd/action/Action.js +3 -3
- package/lib/schema-component/antd/action/context.d.ts +2 -0
- package/lib/schema-component/antd/action/hooks.d.ts +1 -0
- package/lib/schema-component/antd/calendar/Calendar.Designer.js +19 -6
- package/lib/schema-component/antd/calendar/Calendar.js +24 -2
- package/lib/schema-component/antd/calendar/Title.js +18 -2
- package/lib/schema-component/antd/calendar/components/Header.d.ts +10 -0
- package/lib/schema-component/antd/calendar/components/Header.js +57 -0
- package/lib/schema-component/antd/calendar/style.less +53 -9
- package/lib/schema-component/antd/calendar/types.d.ts +6 -0
- package/lib/schema-component/antd/calendar/utils.d.ts +2 -0
- package/lib/schema-component/antd/calendar/utils.js +18 -2
- package/lib/schema-component/antd/checkbox/Checkbox.js +13 -4
- package/lib/schema-component/antd/formula-input/FormulaInput.js +28 -37
- package/lib/schema-component/antd/input/Input.d.ts +1 -0
- package/lib/schema-component/antd/input/Input.js +3 -0
- package/lib/schema-component/antd/input/Json.d.ts +6 -0
- package/lib/schema-component/antd/input/Json.js +53 -0
- package/lib/schema-component/antd/input/ReadPretty.d.ts +3 -0
- package/lib/schema-component/antd/input/ReadPretty.js +16 -0
- package/lib/schema-component/antd/input/index.d.ts +1 -0
- package/lib/schema-component/antd/input/index.js +13 -0
- package/lib/schema-component/antd/markdown/Markdown.Void.js +8 -2
- package/lib/schema-component/antd/radio/Radio.js +2 -1
- package/lib/schema-component/antd/select/ReadPretty.js +2 -1
- package/lib/schema-component/antd/table-v2/TableSelectorDesigner.js +17 -2
- package/lib/schema-component/antd/upload/Upload.js +2 -1
- package/lib/schema-component/antd/upload/shared.js +4 -5
- package/lib/schema-component/antd/upload/type.d.ts +2 -0
- package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.d.ts +1 -0
- package/lib/schema-initializer/buttons/BulkEditFormItemInitializers.js +66 -0
- package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.d.ts +1 -0
- package/lib/schema-initializer/buttons/CreateFormBulkEditBlockInitializers.js +50 -0
- package/lib/schema-initializer/buttons/FormActionInitializers.d.ts +132 -0
- package/lib/schema-initializer/buttons/FormActionInitializers.js +121 -2
- package/lib/schema-initializer/buttons/TabPaneInitializers.d.ts +1 -0
- package/lib/schema-initializer/buttons/TabPaneInitializers.js +18 -2
- package/lib/schema-initializer/buttons/TableActionInitializers.d.ts +56 -2
- package/lib/schema-initializer/buttons/TableActionInitializers.js +45 -0
- package/lib/schema-initializer/buttons/index.d.ts +2 -0
- package/lib/schema-initializer/buttons/index.js +26 -0
- package/lib/schema-initializer/components/BulkEditField.d.ts +7 -0
- package/lib/schema-initializer/components/BulkEditField.js +210 -0
- package/lib/schema-initializer/components/index.d.ts +1 -0
- package/lib/schema-initializer/components/index.js +13 -0
- package/lib/schema-initializer/items/BlockInitializer.js +8 -7
- package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/BulkEditSubmitActionInitializer.js +37 -0
- package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CreateFormBulkEditBlockInitializer.js +121 -0
- package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.d.ts +1 -0
- package/lib/schema-initializer/items/CustomizeBulkEditActionInitializer.js +74 -0
- package/lib/schema-initializer/items/index.d.ts +3 -0
- package/lib/schema-initializer/items/index.js +39 -0
- package/lib/schema-initializer/utils.d.ts +1 -0
- package/lib/schema-initializer/utils.js +71 -13
- package/lib/schema-settings/SchemaSettings.d.ts +6 -0
- package/lib/schema-settings/SchemaSettings.js +3 -0
- package/lib/schema-templates/BlockTemplatePage.d.ts +1 -0
- package/lib/schema-templates/BlockTemplatePage.js +12 -2
- package/lib/schema-templates/SchemaTemplateShortcut.js +1 -1
- package/lib/system-settings/SystemSettingsShortcut.d.ts +2 -0
- package/lib/system-settings/SystemSettingsShortcut.js +145 -7
- package/package.json +5 -4
|
@@ -76,7 +76,7 @@ var MenuGroup = function MenuGroup(props) {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
var ActionDesigner = function ActionDesigner(props) {
|
|
79
|
-
var _fieldSchema$xCompon, _fieldSchema$xCompon2, _fieldSchema$xCompon3, _fieldSchema$xCompon4, _fieldSchema$xAction, _fieldSchema$xAction2, _fieldSchema$xAction3, _fieldSchema$xAction4, _fieldSchema$xAction5, _fieldSchema$xAction6, _fieldSchema$xAction7, _fieldSchema$xAction8, _fieldSchema$xAction9;
|
|
79
|
+
var _fieldSchema$xCompon, _fieldSchema$xCompon2, _fieldSchema$xCompon3, _fieldSchema$xCompon4, _fieldSchema$xAction, _fieldSchema$xAction2, _fieldSchema$xAction3, _fieldSchema$xAction4, _fieldSchema$xAction5, _fieldSchema$xAction6, _fieldSchema$xAction7, _fieldSchema$xAction8, _fieldSchema$xAction9, _fieldSchema$xAction10;
|
|
80
80
|
|
|
81
81
|
var modalTip = props.modalTip,
|
|
82
82
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
@@ -92,6 +92,7 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
92
92
|
|
|
93
93
|
var compile = (0, _.useCompile)();
|
|
94
94
|
var isPopupAction = ['create', 'update', 'view', 'customize:popup'].includes(fieldSchema['x-action'] || '');
|
|
95
|
+
var isUpdateModePopupAction = ['customize:bulkUpdate', 'customize:bulkEdit'].includes(fieldSchema['x-action']);
|
|
95
96
|
var context = (0, _.useActionContext)();
|
|
96
97
|
|
|
97
98
|
var _useState = (0, _react2.useState)(),
|
|
@@ -200,12 +201,32 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
200
201
|
});
|
|
201
202
|
dn.refresh();
|
|
202
203
|
}
|
|
203
|
-
}),
|
|
204
|
+
}), isUpdateModePopupAction && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SelectItem, {
|
|
205
|
+
title: t('Data will be updated'),
|
|
206
|
+
options: [{
|
|
207
|
+
label: t('Selected'),
|
|
208
|
+
value: 'selected'
|
|
209
|
+
}, {
|
|
210
|
+
label: t('All'),
|
|
211
|
+
value: 'all'
|
|
212
|
+
}],
|
|
213
|
+
value: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction === void 0 ? void 0 : _fieldSchema$xAction['updateMode'],
|
|
214
|
+
onChange: function onChange(value) {
|
|
215
|
+
fieldSchema['x-action-settings']['updateMode'] = value;
|
|
216
|
+
dn.emit('patch', {
|
|
217
|
+
schema: {
|
|
218
|
+
'x-uid': fieldSchema['x-uid'],
|
|
219
|
+
'x-action-settings': fieldSchema['x-action-settings']
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
dn.refresh();
|
|
223
|
+
}
|
|
224
|
+
}), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction2 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction2 === void 0 ? void 0 : _fieldSchema$xAction2.assignedValues) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ActionModalItem, {
|
|
204
225
|
title: t('Assign field values'),
|
|
205
226
|
initialSchema: initialSchema,
|
|
206
|
-
initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$
|
|
227
|
+
initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction3 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction3 === void 0 ? void 0 : _fieldSchema$xAction3.assignedValues,
|
|
207
228
|
modalTip: tips[actionType],
|
|
208
|
-
uid: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$
|
|
229
|
+
uid: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction4 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction4 === void 0 ? void 0 : _fieldSchema$xAction4.schemaUid,
|
|
209
230
|
onSubmit: function onSubmit(assignedValues) {
|
|
210
231
|
var _schema2;
|
|
211
232
|
|
|
@@ -215,10 +236,10 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
215
236
|
});
|
|
216
237
|
dn.refresh();
|
|
217
238
|
}
|
|
218
|
-
}), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$
|
|
239
|
+
}), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction5 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction5 === void 0 ? void 0 : _fieldSchema$xAction5.requestSettings) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ActionModalItem, {
|
|
219
240
|
title: t('Request settings'),
|
|
220
241
|
schema: _utils.requestSettingsSchema,
|
|
221
|
-
initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$
|
|
242
|
+
initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction6 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction6 === void 0 ? void 0 : _fieldSchema$xAction6.requestSettings,
|
|
222
243
|
onSubmit: function onSubmit(requestSettings) {
|
|
223
244
|
var _schema3;
|
|
224
245
|
|
|
@@ -228,9 +249,9 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
228
249
|
});
|
|
229
250
|
dn.refresh();
|
|
230
251
|
}
|
|
231
|
-
}), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$
|
|
252
|
+
}), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction7 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction7 === void 0 ? void 0 : _fieldSchema$xAction7.skipValidator) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SwitchItem, {
|
|
232
253
|
title: t('Skip required validation'),
|
|
233
|
-
checked: !!(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$
|
|
254
|
+
checked: !!(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction8 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction8 === void 0 ? void 0 : _fieldSchema$xAction8.skipValidator),
|
|
234
255
|
onChange: function onChange(value) {
|
|
235
256
|
var _schema4;
|
|
236
257
|
|
|
@@ -239,21 +260,23 @@ var ActionDesigner = function ActionDesigner(props) {
|
|
|
239
260
|
schema: (_schema4 = {}, _defineProperty(_schema4, 'x-uid', fieldSchema['x-uid']), _defineProperty(_schema4, 'x-action-settings', _objectSpread({}, fieldSchema['x-action-settings'])), _schema4)
|
|
240
261
|
});
|
|
241
262
|
}
|
|
242
|
-
}), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$
|
|
263
|
+
}), (0, _shared.isValid)(fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction9 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction9 === void 0 ? void 0 : _fieldSchema$xAction9['onSuccess']) && /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.ModalItem, {
|
|
243
264
|
title: {
|
|
244
265
|
'customize:save': t('After successful save'),
|
|
245
266
|
'customize:update': t('After successful update'),
|
|
246
267
|
'customize:table:request': t('After successful request'),
|
|
247
|
-
'customize:form:request': t('After successful request')
|
|
268
|
+
'customize:form:request': t('After successful request'),
|
|
269
|
+
'customize:bulkUpdate': t('After successful bulk update')
|
|
248
270
|
}[actionType],
|
|
249
|
-
initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$
|
|
271
|
+
initialValues: fieldSchema === null || fieldSchema === void 0 ? void 0 : (_fieldSchema$xAction10 = fieldSchema['x-action-settings']) === null || _fieldSchema$xAction10 === void 0 ? void 0 : _fieldSchema$xAction10['onSuccess'],
|
|
250
272
|
schema: {
|
|
251
273
|
type: 'object',
|
|
252
274
|
title: {
|
|
253
275
|
'customize:save': t('After successful save'),
|
|
254
276
|
'customize:update': t('After successful update'),
|
|
255
277
|
'customize:table:request': t('After successful request'),
|
|
256
|
-
'customize:form:request': t('After successful request')
|
|
278
|
+
'customize:form:request': t('After successful request'),
|
|
279
|
+
'customize:bulkUpdate': t('After successful bulk update')
|
|
257
280
|
}[actionType],
|
|
258
281
|
properties: {
|
|
259
282
|
successMessage: {
|
|
@@ -21,7 +21,7 @@ var _ = require(".");
|
|
|
21
21
|
|
|
22
22
|
var _templateObject, _templateObject2;
|
|
23
23
|
|
|
24
|
-
var _excluded = ["footerNodeName"];
|
|
24
|
+
var _excluded = ["footerNodeName", "width"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
@@ -40,6 +40,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
40
40
|
var ActionModal = (0, _react.observer)(function (props) {
|
|
41
41
|
var _props$footerNodeName = props.footerNodeName,
|
|
42
42
|
footerNodeName = _props$footerNodeName === void 0 ? 'Action.Modal.Footer' : _props$footerNodeName,
|
|
43
|
+
_props$width = props.width,
|
|
44
|
+
width = _props$width === void 0 ? '80%' : _props$width,
|
|
43
45
|
others = _objectWithoutProperties(props, _excluded);
|
|
44
46
|
|
|
45
47
|
var _useActionContext = (0, _.useActionContext)(),
|
|
@@ -60,7 +62,7 @@ var ActionModal = (0, _react.observer)(function (props) {
|
|
|
60
62
|
e.stopPropagation();
|
|
61
63
|
}
|
|
62
64
|
}, /*#__PURE__*/_react2.default.createElement(_antd.Modal, _objectSpread(_objectSpread({
|
|
63
|
-
width:
|
|
65
|
+
width: width,
|
|
64
66
|
title: field.title
|
|
65
67
|
}, others), {}, {
|
|
66
68
|
destroyOnClose: true,
|
|
@@ -43,7 +43,7 @@ var _context = require("./context");
|
|
|
43
43
|
|
|
44
44
|
var _hooks2 = require("./hooks");
|
|
45
45
|
|
|
46
|
-
var _excluded = ["popover", "confirm", "containerRefKey", "component", "useAction", "className", "
|
|
46
|
+
var _excluded = ["popover", "confirm", "containerRefKey", "component", "useAction", "className", "icon", "title"];
|
|
47
47
|
|
|
48
48
|
var _templateObject, _templateObject2;
|
|
49
49
|
|
|
@@ -89,7 +89,6 @@ var Action = (0, _react.observer)(function (props) {
|
|
|
89
89
|
_props$useAction = props.useAction,
|
|
90
90
|
useAction = _props$useAction === void 0 ? _hooks2.useA : _props$useAction,
|
|
91
91
|
className = props.className,
|
|
92
|
-
disabled = props.disabled,
|
|
93
92
|
icon = props.icon,
|
|
94
93
|
title = props.title,
|
|
95
94
|
others = _objectWithoutProperties(props, _excluded);
|
|
@@ -159,7 +158,8 @@ var Action = (0, _react.observer)(function (props) {
|
|
|
159
158
|
formValueChanged: formValueChanged,
|
|
160
159
|
setFormValueChanged: setFormValueChanged,
|
|
161
160
|
openMode: openMode,
|
|
162
|
-
containerRefKey: containerRefKey
|
|
161
|
+
containerRefKey: containerRefKey,
|
|
162
|
+
fieldSchema: fieldSchema
|
|
163
163
|
}
|
|
164
164
|
}, popover && /*#__PURE__*/_react2.default.createElement(_react.RecursionField, {
|
|
165
165
|
basePath: field.address,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { Schema } from '@formily/react';
|
|
2
3
|
export declare const ActionContext: import("react").Context<ActionContextProps>;
|
|
3
4
|
export interface ActionContextProps {
|
|
4
5
|
button?: any;
|
|
@@ -8,4 +9,5 @@ export interface ActionContextProps {
|
|
|
8
9
|
containerRefKey?: string;
|
|
9
10
|
formValueChanged?: boolean;
|
|
10
11
|
setFormValueChanged?: (v: boolean) => void;
|
|
12
|
+
fieldSchema?: Schema;
|
|
11
13
|
}
|
|
@@ -9,6 +9,7 @@ export declare const useActionContext: () => {
|
|
|
9
9
|
containerRefKey?: string;
|
|
10
10
|
formValueChanged?: boolean;
|
|
11
11
|
setFormValueChanged?: (v: boolean) => void;
|
|
12
|
+
fieldSchema?: import("@formily/react").Schema<any, any, any, any, any, any, any, any, any>;
|
|
12
13
|
};
|
|
13
14
|
export declare const useCloseAction: () => {
|
|
14
15
|
run(): Promise<void>;
|
|
@@ -103,12 +103,25 @@ var CalendarDesigner = function CalendarDesigner() {
|
|
|
103
103
|
});
|
|
104
104
|
dn.refresh();
|
|
105
105
|
}
|
|
106
|
+
}), /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SwitchItem, {
|
|
107
|
+
title: t('Show lunar'),
|
|
108
|
+
checked: field.decoratorProps.showLunar,
|
|
109
|
+
onChange: function onChange(v) {
|
|
110
|
+
var _schema2;
|
|
111
|
+
|
|
112
|
+
field.decoratorProps.showLunar = v;
|
|
113
|
+
fieldSchema['x-decorator-props']['showLunar'] = v;
|
|
114
|
+
dn.emit('patch', {
|
|
115
|
+
schema: (_schema2 = {}, _defineProperty(_schema2, 'x-uid', fieldSchema['x-uid']), _defineProperty(_schema2, 'x-decorator-props', field.decoratorProps), _schema2)
|
|
116
|
+
});
|
|
117
|
+
dn.refresh();
|
|
118
|
+
}
|
|
106
119
|
}), /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.SelectItem, {
|
|
107
120
|
title: t('Start date field'),
|
|
108
121
|
value: fieldNames.start,
|
|
109
122
|
options: useOptions('date'),
|
|
110
123
|
onChange: function onChange(start) {
|
|
111
|
-
var
|
|
124
|
+
var _schema3;
|
|
112
125
|
|
|
113
126
|
var fieldNames = field.decoratorProps.fieldNames || {};
|
|
114
127
|
fieldNames['start'] = start;
|
|
@@ -116,7 +129,7 @@ var CalendarDesigner = function CalendarDesigner() {
|
|
|
116
129
|
fieldSchema['x-decorator-props']['fieldNames'] = fieldNames;
|
|
117
130
|
service.refresh();
|
|
118
131
|
dn.emit('patch', {
|
|
119
|
-
schema: (
|
|
132
|
+
schema: (_schema3 = {}, _defineProperty(_schema3, 'x-uid', fieldSchema['x-uid']), _defineProperty(_schema3, 'x-decorator-props', field.decoratorProps), _schema3)
|
|
120
133
|
});
|
|
121
134
|
dn.refresh();
|
|
122
135
|
}
|
|
@@ -125,7 +138,7 @@ var CalendarDesigner = function CalendarDesigner() {
|
|
|
125
138
|
value: fieldNames.end,
|
|
126
139
|
options: useOptions('date'),
|
|
127
140
|
onChange: function onChange(end) {
|
|
128
|
-
var
|
|
141
|
+
var _schema4;
|
|
129
142
|
|
|
130
143
|
var fieldNames = field.decoratorProps.fieldNames || {};
|
|
131
144
|
fieldNames['end'] = end;
|
|
@@ -133,7 +146,7 @@ var CalendarDesigner = function CalendarDesigner() {
|
|
|
133
146
|
fieldSchema['x-decorator-props']['fieldNames'] = fieldNames;
|
|
134
147
|
service.refresh();
|
|
135
148
|
dn.emit('patch', {
|
|
136
|
-
schema: (
|
|
149
|
+
schema: (_schema4 = {}, _defineProperty(_schema4, 'x-uid', fieldSchema['x-uid']), _defineProperty(_schema4, 'x-decorator-props', field.decoratorProps), _schema4)
|
|
137
150
|
});
|
|
138
151
|
dn.refresh();
|
|
139
152
|
}
|
|
@@ -155,7 +168,7 @@ var CalendarDesigner = function CalendarDesigner() {
|
|
|
155
168
|
// icon: field.componentProps.icon,
|
|
156
169
|
},
|
|
157
170
|
onSubmit: function onSubmit(_ref) {
|
|
158
|
-
var _service$params,
|
|
171
|
+
var _service$params, _schema5;
|
|
159
172
|
|
|
160
173
|
var filter = _ref.filter;
|
|
161
174
|
var params = field.decoratorProps.params || {};
|
|
@@ -166,7 +179,7 @@ var CalendarDesigner = function CalendarDesigner() {
|
|
|
166
179
|
filter: filter
|
|
167
180
|
}));
|
|
168
181
|
dn.emit('patch', {
|
|
169
|
-
schema: (
|
|
182
|
+
schema: (_schema5 = {}, _defineProperty(_schema5, 'x-uid', fieldSchema['x-uid']), _defineProperty(_schema5, 'x-decorator-props', field.decoratorProps), _schema5)
|
|
170
183
|
});
|
|
171
184
|
}
|
|
172
185
|
}), /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.Divider, null), /*#__PURE__*/_react2.default.createElement(_schemaSettings.SchemaSettings.Template, {
|
|
@@ -33,6 +33,8 @@ var _useProps2 = require("../../hooks/useProps");
|
|
|
33
33
|
|
|
34
34
|
var _action = require("../action");
|
|
35
35
|
|
|
36
|
+
var _Header = _interopRequireDefault(require("./components/Header"));
|
|
37
|
+
|
|
36
38
|
var _context = require("./context");
|
|
37
39
|
|
|
38
40
|
require("./style.less");
|
|
@@ -152,7 +154,8 @@ var CalendarRecordViewer = function CalendarRecordViewer(props) {
|
|
|
152
154
|
var Calendar = (0, _react.observer)(function (props) {
|
|
153
155
|
var _useProps = (0, _useProps2.useProps)(props),
|
|
154
156
|
dataSource = _useProps.dataSource,
|
|
155
|
-
fieldNames = _useProps.fieldNames
|
|
157
|
+
fieldNames = _useProps.fieldNames,
|
|
158
|
+
showLunar = _useProps.showLunar;
|
|
156
159
|
|
|
157
160
|
var events = useEvents(dataSource, fieldNames);
|
|
158
161
|
|
|
@@ -217,7 +220,26 @@ var Calendar = (0, _react.observer)(function (props) {
|
|
|
217
220
|
},
|
|
218
221
|
defaultDate: new Date(),
|
|
219
222
|
components: {
|
|
220
|
-
toolbar:
|
|
223
|
+
toolbar: function toolbar(props) {
|
|
224
|
+
return /*#__PURE__*/_react2.default.createElement(Toolbar, _objectSpread(_objectSpread({}, props), {}, {
|
|
225
|
+
showLunar: showLunar
|
|
226
|
+
}));
|
|
227
|
+
},
|
|
228
|
+
week: {
|
|
229
|
+
header: function header(props) {
|
|
230
|
+
return /*#__PURE__*/_react2.default.createElement(_Header.default, _objectSpread(_objectSpread({}, props), {}, {
|
|
231
|
+
type: "week",
|
|
232
|
+
showLunar: showLunar
|
|
233
|
+
}));
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
month: {
|
|
237
|
+
dateHeader: function dateHeader(props) {
|
|
238
|
+
return /*#__PURE__*/_react2.default.createElement(_Header.default, _objectSpread(_objectSpread({}, props), {}, {
|
|
239
|
+
showLunar: showLunar
|
|
240
|
+
}));
|
|
241
|
+
}
|
|
242
|
+
}
|
|
221
243
|
},
|
|
222
244
|
localizer: localizer
|
|
223
245
|
}));
|
|
@@ -15,6 +15,8 @@ var _hooks = require("../../hooks");
|
|
|
15
15
|
|
|
16
16
|
var _context = require("./context");
|
|
17
17
|
|
|
18
|
+
var _utils = require("./utils");
|
|
19
|
+
|
|
18
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
21
|
|
|
20
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -24,14 +26,28 @@ var Title = (0, _react.observer)(function () {
|
|
|
24
26
|
DesignableBar = _useDesignable.DesignableBar;
|
|
25
27
|
|
|
26
28
|
var _useContext = (0, _react2.useContext)(_context.CalendarToolbarContext),
|
|
27
|
-
|
|
29
|
+
date = _useContext.date,
|
|
30
|
+
view = _useContext.view,
|
|
31
|
+
label = _useContext.label,
|
|
32
|
+
showLunar = _useContext.showLunar;
|
|
33
|
+
|
|
34
|
+
var lunarElement = (0, _react2.useMemo)(function () {
|
|
35
|
+
if (!showLunar || view !== 'day') {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
28
38
|
|
|
39
|
+
return /*#__PURE__*/_react2.default.createElement("span", null, (0, _utils.getLunarDay)(date));
|
|
40
|
+
}, [view, date, showLunar]);
|
|
29
41
|
return /*#__PURE__*/_react2.default.createElement("div", {
|
|
30
42
|
className: "ant-btn-group",
|
|
31
43
|
style: {
|
|
32
44
|
fontSize: '1.75em',
|
|
33
45
|
fontWeight: 300
|
|
34
46
|
}
|
|
35
|
-
}, label, /*#__PURE__*/_react2.default.createElement(
|
|
47
|
+
}, /*#__PURE__*/_react2.default.createElement("span", null, label), /*#__PURE__*/_react2.default.createElement("span", {
|
|
48
|
+
style: {
|
|
49
|
+
marginLeft: '4px'
|
|
50
|
+
}
|
|
51
|
+
}, lunarElement), /*#__PURE__*/_react2.default.createElement(DesignableBar, null));
|
|
36
52
|
});
|
|
37
53
|
exports.Title = Title;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const Header: ({ date, label, drilldownView, onDrillDown, showLunar, type, localizer }: {
|
|
2
|
+
date: any;
|
|
3
|
+
label: any;
|
|
4
|
+
drilldownView: any;
|
|
5
|
+
onDrillDown: any;
|
|
6
|
+
showLunar?: boolean;
|
|
7
|
+
type: any;
|
|
8
|
+
localizer: any;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
export default Header;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _utils = require("../utils");
|
|
13
|
+
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
|
|
16
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
+
|
|
18
|
+
var Header = function Header(_ref) {
|
|
19
|
+
var date = _ref.date,
|
|
20
|
+
label = _ref.label,
|
|
21
|
+
drilldownView = _ref.drilldownView,
|
|
22
|
+
onDrillDown = _ref.onDrillDown,
|
|
23
|
+
_ref$showLunar = _ref.showLunar,
|
|
24
|
+
showLunar = _ref$showLunar === void 0 ? false : _ref$showLunar,
|
|
25
|
+
type = _ref.type,
|
|
26
|
+
localizer = _ref.localizer;
|
|
27
|
+
var lunarElement = (0, _react.useMemo)(function () {
|
|
28
|
+
if (!showLunar) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
33
|
+
className: "rbc-date-lunar"
|
|
34
|
+
}, (0, _utils.getLunarDay)(date));
|
|
35
|
+
}, [date, showLunar]);
|
|
36
|
+
var child = (0, _react.useMemo)(function () {
|
|
37
|
+
if (type === 'week') {
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("span", null, localizer.format(date, 'ddd')), /*#__PURE__*/_react.default.createElement("div", {
|
|
39
|
+
className: "rbc-date-wrap"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
41
|
+
className: "rbc-date-solar"
|
|
42
|
+
}, localizer.format(date, 'DD')), lunarElement));
|
|
43
|
+
} else {
|
|
44
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
45
|
+
className: "rbc-date-solar"
|
|
46
|
+
}, label), lunarElement);
|
|
47
|
+
}
|
|
48
|
+
}, [type]);
|
|
49
|
+
var Wrapper = drilldownView ? 'a' : _react.default.Fragment;
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(Wrapper, {
|
|
51
|
+
onClick: onDrillDown,
|
|
52
|
+
role: "cell"
|
|
53
|
+
}, child);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var _default = Header;
|
|
57
|
+
exports.default = _default;
|
|
@@ -74,7 +74,6 @@ button.rbc-input::-moz-focus-inner {
|
|
|
74
74
|
text-overflow: ellipsis;
|
|
75
75
|
white-space: nowrap;
|
|
76
76
|
padding: 4px 12px;
|
|
77
|
-
text-align: right;
|
|
78
77
|
vertical-align: middle;
|
|
79
78
|
// font-weight: 500;
|
|
80
79
|
min-height: 32px;
|
|
@@ -338,24 +337,39 @@ button.rbc-input::-moz-focus-inner {
|
|
|
338
337
|
// cursor: pointer;
|
|
339
338
|
flex: 1 1 0;
|
|
340
339
|
min-width: 0;
|
|
341
|
-
padding-
|
|
340
|
+
padding-left: 12px;
|
|
342
341
|
padding-top: 4px;
|
|
343
|
-
text-align: right;
|
|
344
342
|
}
|
|
345
|
-
.rbc-date-cell.rbc-now
|
|
343
|
+
.rbc-date-cell.rbc-now span {
|
|
346
344
|
// font-weight: bold;
|
|
347
345
|
color: #1890ff;
|
|
348
346
|
}
|
|
349
|
-
.rbc-date-cell
|
|
350
|
-
.rbc-date-cell
|
|
351
|
-
.rbc-date-cell
|
|
347
|
+
.rbc-date-cell a,
|
|
348
|
+
.rbc-date-cell a:active,
|
|
349
|
+
.rbc-date-cell a:visited {
|
|
352
350
|
color: inherit;
|
|
353
351
|
text-decoration: none;
|
|
354
352
|
}
|
|
355
|
-
.rbc-date-cell
|
|
353
|
+
.rbc-date-cell a:hover {
|
|
356
354
|
color: #1890ff;
|
|
357
355
|
}
|
|
358
356
|
|
|
357
|
+
.rbc-date-cell .rbc-date-solar {
|
|
358
|
+
font-weight: 500;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.rbc-date-cell .rbc-date-lunar {
|
|
362
|
+
padding-left: 12px;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.rbc-date-cell:not(.rbc-off-range) .rbc-date-lunar {
|
|
366
|
+
color: #aaa
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.rbc-date-cell .rbc-date-lunar:hover {
|
|
370
|
+
color: inherit
|
|
371
|
+
}
|
|
372
|
+
|
|
359
373
|
.rbc-row-bg {
|
|
360
374
|
display: flex;
|
|
361
375
|
flex-direction: row;
|
|
@@ -553,6 +567,36 @@ button.rbc-input::-moz-focus-inner {
|
|
|
553
567
|
.rbc-time-header-cell {
|
|
554
568
|
min-height: 32px !important;
|
|
555
569
|
}
|
|
570
|
+
.rbc-time-header-cell .rbc-header {
|
|
571
|
+
display: flex;
|
|
572
|
+
}
|
|
573
|
+
.rbc-time-header-cell .rbc-header.rbc-today {
|
|
574
|
+
border-color: #1890ff;
|
|
575
|
+
background-color: #e6f7ff;
|
|
576
|
+
color: #1890ff
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.rbc-time-header-cell .rbc-header a {
|
|
580
|
+
display: flex;
|
|
581
|
+
flex-direction: column;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.rbc-time-header-cell .rbc-date-wrap {
|
|
585
|
+
display: flex;
|
|
586
|
+
align-items: center;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.rbc-time-header-cell .rbc-date-solar {
|
|
590
|
+
font-size: 18px;
|
|
591
|
+
}
|
|
592
|
+
.rbc-time-header-cell .rbc-date-lunar {
|
|
593
|
+
margin-left: 4px;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.rbc-time-header-cell .rbc-header:not(.rbc-today) .rbc-date-lunar {
|
|
597
|
+
color: #aaa;
|
|
598
|
+
}
|
|
599
|
+
|
|
556
600
|
.rbc-calendar.view-week {
|
|
557
601
|
.rbc-time-header-cell {
|
|
558
602
|
margin-top: -32px;
|
|
@@ -695,7 +739,7 @@ button.rbc-input::-moz-focus-inner {
|
|
|
695
739
|
|
|
696
740
|
.rbc-time-header-content {
|
|
697
741
|
flex: 1;
|
|
698
|
-
display: flex;
|
|
742
|
+
// display: flex;
|
|
699
743
|
min-width: 0;
|
|
700
744
|
flex-direction: column;
|
|
701
745
|
// border-left: 1px solid #f0f0f0;
|
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.toEvents = void 0;
|
|
6
|
+
exports.toEvents = exports.getLunarDay = void 0;
|
|
7
7
|
|
|
8
8
|
var _lodash = require("lodash");
|
|
9
9
|
|
|
10
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
11
|
+
|
|
12
|
+
var _solarlunarEs = _interopRequireDefault(require("solarlunar-es"));
|
|
13
|
+
|
|
10
14
|
var _i18n = require("../../../i18n");
|
|
11
15
|
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
12
18
|
var toEvents = function toEvents(data, fieldNames) {
|
|
13
19
|
return data === null || data === void 0 ? void 0 : data.map(function (item) {
|
|
14
20
|
return {
|
|
@@ -20,4 +26,14 @@ var toEvents = function toEvents(data, fieldNames) {
|
|
|
20
26
|
});
|
|
21
27
|
};
|
|
22
28
|
|
|
23
|
-
exports.toEvents = toEvents;
|
|
29
|
+
exports.toEvents = toEvents;
|
|
30
|
+
|
|
31
|
+
var getLunarDay = function getLunarDay(date) {
|
|
32
|
+
var md = (0, _moment.default)(date);
|
|
33
|
+
|
|
34
|
+
var result = _solarlunarEs.default.solar2lunar(md.year(), md.month() + 1, md.date());
|
|
35
|
+
|
|
36
|
+
return typeof result !== 'number' ? result.lunarFestival || result.term || result.dayCn : result;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.getLunarDay = getLunarDay;
|
|
@@ -25,7 +25,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
25
25
|
|
|
26
26
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
27
|
|
|
28
|
-
var Checkbox = (0, _react.connect)(
|
|
28
|
+
var Checkbox = (0, _react.connect)(function (props) {
|
|
29
|
+
var changeHandler = function changeHandler(val) {
|
|
30
|
+
props === null || props === void 0 ? void 0 : props.onChange(val);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return /*#__PURE__*/_react2.default.createElement(_antd.Checkbox, _objectSpread(_objectSpread({}, props), {}, {
|
|
34
|
+
onChange: changeHandler
|
|
35
|
+
}));
|
|
36
|
+
}, (0, _react.mapProps)({
|
|
29
37
|
value: 'checked',
|
|
30
38
|
onInput: 'onChange'
|
|
31
39
|
}, function (props, field) {
|
|
@@ -33,7 +41,7 @@ var Checkbox = (0, _react.connect)(_antd.Checkbox, (0, _react.mapProps)({
|
|
|
33
41
|
return _objectSpread({}, props);
|
|
34
42
|
}), (0, _react.mapReadPretty)(function (props) {
|
|
35
43
|
if (!(0, _shared.isValid)(props.value)) {
|
|
36
|
-
return
|
|
44
|
+
return null;
|
|
37
45
|
}
|
|
38
46
|
|
|
39
47
|
return props.value ? /*#__PURE__*/_react2.default.createElement(_icons.CheckOutlined, {
|
|
@@ -48,7 +56,7 @@ Checkbox.Group = (0, _react.connect)(_antd.Checkbox.Group, (0, _react.mapProps)(
|
|
|
48
56
|
dataSource: 'options'
|
|
49
57
|
}), (0, _react.mapReadPretty)(function (props) {
|
|
50
58
|
if (!(0, _shared.isValid)(props.value)) {
|
|
51
|
-
return
|
|
59
|
+
return null;
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
var _props$options = props.options,
|
|
@@ -61,7 +69,8 @@ Checkbox.Group = (0, _react.connect)(_antd.Checkbox.Group, (0, _react.mapProps)(
|
|
|
61
69
|
}).map(function (option, key) {
|
|
62
70
|
return /*#__PURE__*/_react2.default.createElement(_antd.Tag, {
|
|
63
71
|
key: key,
|
|
64
|
-
color: option.color
|
|
72
|
+
color: option.color,
|
|
73
|
+
icon: option.icon
|
|
65
74
|
}, option.label);
|
|
66
75
|
}));
|
|
67
76
|
}));
|