@nocobase/client 0.8.1-alpha.4 → 0.9.0-alpha.2
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/ACLProvider.d.ts +16 -2
- package/es/acl/ACLProvider.js +271 -100
- package/es/acl/Configuration/ConfigureCenter.d.ts +2 -0
- package/es/acl/Configuration/ConfigureCenter.js +254 -0
- package/es/acl/Configuration/MenuConfigure.js +2 -2
- package/es/acl/Configuration/PermisionProvider.d.ts +4 -0
- package/es/acl/Configuration/PermisionProvider.js +132 -0
- package/es/acl/Configuration/RoleConfigure.js +98 -23
- package/es/acl/Configuration/RoleTable.d.ts +1 -1
- package/es/acl/Configuration/RoleTable.js +6 -3
- package/es/acl/Configuration/RolesResourcesActions.js +2 -2
- package/es/acl/Configuration/index.d.ts +1 -0
- package/es/acl/Configuration/index.js +2 -1
- package/es/acl/Configuration/schemas/roleCollections.js +41 -13
- package/es/acl/Configuration/schemas/roles.js +42 -2
- package/es/acl/Configuration/schemas/scopes.js +2 -0
- package/es/acl/index.d.ts +1 -0
- package/es/acl/index.js +2 -1
- package/es/acl/style.less +10 -0
- package/es/antd-config-provider/index.d.ts +3 -1
- package/es/antd-config-provider/index.js +25 -6
- package/es/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/es/antd-config-provider/loadConstrueLocale.js +293 -0
- package/es/api-client/APIClient.js +5 -0
- package/es/block-provider/FormBlockProvider.js +5 -2
- package/es/block-provider/KanbanBlockProvider.js +3 -3
- package/es/block-provider/SharedFilterProvider.d.ts +1 -0
- package/es/block-provider/SharedFilterProvider.js +22 -6
- package/es/collection-manager/CollectionHistoryProvider.js +14 -2
- package/es/collection-manager/hooks/useCollection.d.ts +1 -0
- package/es/collection-manager/hooks/useCollection.js +10 -0
- package/es/collection-manager/interfaces/index.d.ts +0 -1
- package/es/collection-manager/interfaces/index.js +0 -1
- package/es/collection-manager/interfaces/o2m.js +1 -0
- package/es/collection-manager/interfaces/properties/operators.js +7 -0
- package/es/collection-manager/interfaces/subTable.js +1 -0
- package/es/collection-manager/templates/calendar.js +5 -0
- package/es/formula/Expression.d.ts +2 -0
- package/es/formula/Expression.js +296 -0
- package/es/formula/Result.d.ts +2 -0
- package/es/formula/Result.js +91 -0
- package/es/formula/index.d.ts +6 -0
- package/es/formula/index.js +8 -0
- package/es/i18n/i18n.js +7 -12
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- package/es/locale/en_US.d.ts +108 -28
- package/es/locale/en_US.js +108 -28
- package/es/locale/index.d.ts +201 -4
- package/es/locale/index.js +191 -58
- package/es/locale/ja_JP.d.ts +4 -0
- package/es/locale/ja_JP.js +4 -0
- package/es/locale/zh_CN.d.ts +11 -1
- package/es/locale/zh_CN.js +12 -2
- package/es/plugin-manager/PluginManager.js +19 -13
- package/es/pm/PluginManagerLink.js +38 -43
- package/es/pm/index.d.ts +1 -0
- package/es/pm/index.js +84 -35
- package/es/record-provider/index.d.ts +1 -0
- package/es/record-provider/index.js +7 -4
- package/es/route-switch/antd/admin-layout/index.d.ts +1 -0
- package/es/route-switch/antd/admin-layout/index.js +4 -6
- package/es/schema-component/antd/action/Action.js +19 -16
- package/es/schema-component/antd/association-filter/AssociationFilter.Item.js +24 -23
- package/es/schema-component/antd/cron/Cron.d.ts +0 -1
- package/es/schema-component/antd/cron/Cron.js +16 -19
- package/es/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/es/schema-component/antd/cron/locale/index.js +6 -0
- package/es/schema-component/antd/filter/useFilterActionProps.js +17 -23
- package/es/schema-component/antd/form-item/FormItem.js +5 -4
- package/es/schema-component/antd/index.d.ts +1 -2
- package/es/schema-component/antd/index.js +1 -2
- package/es/schema-component/antd/page/FixedBlock.d.ts +1 -1
- package/es/schema-component/antd/page/FixedBlock.js +70 -21
- package/es/schema-component/antd/page/Page.js +15 -10
- package/es/schema-component/antd/remote-select/RemoteSelect.js +12 -2
- package/es/schema-component/antd/table/Table.Array.js +1 -1
- package/es/schema-component/antd/table-v2/Table.js +13 -6
- package/es/schema-component/antd/table-v2/TableBlockDesigner.js +24 -8
- package/es/schema-component/hooks/useDesignable.d.ts +1 -1
- package/es/schema-component/hooks/useDesignable.js +45 -16
- package/es/schema-component/hooks/useFieldTitle.js +3 -1
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
- package/es/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
- package/es/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
- package/es/schema-initializer/utils.js +6 -9
- package/es/schema-templates/BlockTemplate.js +2 -2
- package/es/schema-templates/SchemaTemplateManagerProvider.js +1 -1
- package/es/system-settings/SystemSettingsShortcut.js +1 -1
- package/lib/acl/ACLProvider.d.ts +16 -2
- package/lib/acl/ACLProvider.js +283 -102
- package/lib/acl/Configuration/ConfigureCenter.d.ts +2 -0
- package/lib/acl/Configuration/ConfigureCenter.js +278 -0
- package/lib/acl/Configuration/MenuConfigure.js +3 -3
- package/lib/acl/Configuration/PermisionProvider.d.ts +4 -0
- package/lib/acl/Configuration/PermisionProvider.js +156 -0
- package/lib/acl/Configuration/RoleConfigure.js +107 -23
- package/lib/acl/Configuration/RoleTable.d.ts +1 -1
- package/lib/acl/Configuration/RoleTable.js +8 -4
- package/lib/acl/Configuration/RolesResourcesActions.js +2 -2
- package/lib/acl/Configuration/index.d.ts +1 -0
- package/lib/acl/Configuration/index.js +15 -1
- package/lib/acl/Configuration/schemas/roleCollections.js +41 -13
- package/lib/acl/Configuration/schemas/roles.js +47 -2
- package/lib/acl/Configuration/schemas/scopes.js +2 -0
- package/lib/acl/index.d.ts +1 -0
- package/lib/acl/index.js +3 -1
- package/lib/acl/style.less +10 -0
- package/lib/antd-config-provider/index.d.ts +3 -1
- package/lib/antd-config-provider/index.js +40 -6
- package/lib/antd-config-provider/loadConstrueLocale.d.ts +1 -0
- package/lib/antd-config-provider/loadConstrueLocale.js +304 -0
- package/lib/api-client/APIClient.js +5 -0
- package/lib/block-provider/FormBlockProvider.js +9 -3
- package/lib/block-provider/KanbanBlockProvider.js +3 -3
- package/lib/block-provider/SharedFilterProvider.d.ts +1 -0
- package/lib/block-provider/SharedFilterProvider.js +26 -7
- package/lib/collection-manager/CollectionHistoryProvider.js +14 -1
- package/lib/collection-manager/hooks/useCollection.d.ts +1 -0
- package/lib/collection-manager/hooks/useCollection.js +10 -0
- package/lib/collection-manager/interfaces/index.d.ts +0 -1
- package/lib/collection-manager/interfaces/index.js +0 -13
- package/lib/collection-manager/interfaces/o2m.js +1 -0
- package/lib/collection-manager/interfaces/properties/operators.js +7 -0
- package/lib/collection-manager/interfaces/subTable.js +1 -0
- package/lib/collection-manager/templates/calendar.js +5 -0
- package/lib/formula/Expression.d.ts +2 -0
- package/lib/formula/Expression.js +319 -0
- package/lib/formula/Result.d.ts +2 -0
- package/lib/formula/Result.js +114 -0
- package/lib/formula/index.d.ts +6 -0
- package/lib/formula/index.js +22 -0
- package/lib/i18n/i18n.js +7 -14
- package/lib/index.d.ts +2 -1
- package/lib/index.js +26 -13
- package/lib/locale/en_US.d.ts +108 -28
- package/lib/locale/en_US.js +108 -28
- package/lib/locale/index.d.ts +201 -4
- package/lib/locale/index.js +197 -67
- package/lib/locale/ja_JP.d.ts +4 -0
- package/lib/locale/ja_JP.js +4 -0
- package/lib/locale/zh_CN.d.ts +11 -1
- package/lib/locale/zh_CN.js +12 -2
- package/lib/plugin-manager/PluginManager.js +20 -13
- package/lib/pm/PluginManagerLink.js +37 -43
- package/lib/pm/index.d.ts +1 -0
- package/lib/pm/index.js +90 -35
- package/lib/record-provider/index.d.ts +1 -0
- package/lib/record-provider/index.js +7 -4
- package/lib/route-switch/antd/admin-layout/index.d.ts +1 -0
- package/lib/route-switch/antd/admin-layout/index.js +5 -4
- package/lib/schema-component/antd/action/Action.js +19 -16
- package/lib/schema-component/antd/association-filter/AssociationFilter.Item.js +22 -21
- package/lib/schema-component/antd/cron/Cron.d.ts +0 -1
- package/lib/schema-component/antd/cron/Cron.js +19 -24
- package/lib/schema-component/antd/cron/locale/index.d.ts +37 -0
- package/lib/schema-component/antd/cron/locale/index.js +18 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +16 -23
- package/lib/schema-component/antd/form-item/FormItem.js +6 -4
- package/lib/schema-component/antd/index.d.ts +1 -2
- package/lib/schema-component/antd/index.js +8 -21
- package/lib/schema-component/antd/page/FixedBlock.d.ts +1 -1
- package/lib/schema-component/antd/page/FixedBlock.js +71 -21
- package/lib/schema-component/antd/page/Page.js +14 -9
- package/lib/schema-component/antd/remote-select/RemoteSelect.js +18 -3
- package/lib/schema-component/antd/table/Table.Array.js +1 -1
- package/lib/schema-component/antd/table-v2/Table.js +14 -6
- package/lib/schema-component/antd/table-v2/TableBlockDesigner.js +25 -8
- package/lib/schema-component/hooks/useDesignable.d.ts +1 -1
- package/lib/schema-component/hooks/useDesignable.js +47 -18
- package/lib/schema-component/hooks/useFieldTitle.js +4 -1
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.d.ts +3 -0
- package/lib/schema-initializer/buttons/ReadPrettyFormActionInitializers.js +1 -0
- package/lib/schema-initializer/buttons/TableActionColumnInitializers.js +1 -0
- package/lib/schema-initializer/utils.js +6 -9
- package/lib/schema-templates/BlockTemplate.js +2 -2
- package/lib/schema-templates/SchemaTemplateManagerProvider.js +1 -1
- package/lib/system-settings/SystemSettingsShortcut.js +1 -1
- package/package.json +6 -11
- package/es/collection-manager/interfaces/formula.d.ts +0 -2
- package/es/collection-manager/interfaces/formula.js +0 -74
- package/es/schema-component/antd/formula-input/Compute.d.ts +0 -3
- package/es/schema-component/antd/formula-input/Compute.js +0 -55
- package/es/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
- package/es/schema-component/antd/formula-input/FormulaInput.js +0 -167
- package/es/schema-component/antd/formula-input/index.d.ts +0 -1
- package/es/schema-component/antd/formula-input/index.js +0 -7
- package/lib/collection-manager/interfaces/formula.d.ts +0 -2
- package/lib/collection-manager/interfaces/formula.js +0 -83
- package/lib/schema-component/antd/formula-input/Compute.d.ts +0 -3
- package/lib/schema-component/antd/formula-input/Compute.js +0 -79
- package/lib/schema-component/antd/formula-input/FormulaInput.d.ts +0 -3
- package/lib/schema-component/antd/formula-input/FormulaInput.js +0 -191
- package/lib/schema-component/antd/formula-input/index.d.ts +0 -1
- package/lib/schema-component/antd/formula-input/index.js +0 -18
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.loadConstrueLocale = void 0;
|
|
7
|
+
|
|
8
|
+
var _cronstrue = _interopRequireDefault(require("cronstrue"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
13
|
+
|
|
14
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
15
|
+
|
|
16
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
17
|
+
|
|
18
|
+
var CronstrueLocale = /*#__PURE__*/function () {
|
|
19
|
+
function CronstrueLocale(data) {
|
|
20
|
+
_classCallCheck(this, CronstrueLocale);
|
|
21
|
+
|
|
22
|
+
this.data = void 0;
|
|
23
|
+
this.data = data;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_createClass(CronstrueLocale, [{
|
|
27
|
+
key: "atX0SecondsPastTheMinuteGt20",
|
|
28
|
+
value: function atX0SecondsPastTheMinuteGt20() {
|
|
29
|
+
return this.data['atX0SecondsPastTheMinuteGt20'];
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
key: "atX0MinutesPastTheHourGt20",
|
|
33
|
+
value: function atX0MinutesPastTheHourGt20() {
|
|
34
|
+
return this.data['atX0MinutesPastTheHourGt20'];
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
key: "commaMonthX0ThroughMonthX1",
|
|
38
|
+
value: function commaMonthX0ThroughMonthX1() {
|
|
39
|
+
return this.data['commaMonthX0ThroughMonthX1'];
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "commaYearX0ThroughYearX1",
|
|
43
|
+
value: function commaYearX0ThroughYearX1() {
|
|
44
|
+
return this.data['commaYearX0ThroughYearX1'];
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
key: "use24HourTimeFormatByDefault",
|
|
48
|
+
value: function use24HourTimeFormatByDefault() {
|
|
49
|
+
return this.data['use24HourTimeFormatByDefault'];
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
key: "anErrorOccuredWhenGeneratingTheExpressionD",
|
|
53
|
+
value: function anErrorOccuredWhenGeneratingTheExpressionD() {
|
|
54
|
+
return this.data['anErrorOccuredWhenGeneratingTheExpressionD'];
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "everyMinute",
|
|
58
|
+
value: function everyMinute() {
|
|
59
|
+
return this.data['everyMinute'];
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
key: "everyHour",
|
|
63
|
+
value: function everyHour() {
|
|
64
|
+
return this.data['everyHour'];
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
key: "atSpace",
|
|
68
|
+
value: function atSpace() {
|
|
69
|
+
return this.data['atSpace'];
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
key: "everyMinuteBetweenX0AndX1",
|
|
73
|
+
value: function everyMinuteBetweenX0AndX1() {
|
|
74
|
+
return this.data['everyMinuteBetweenX0AndX1'];
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
key: "at",
|
|
78
|
+
value: function at() {
|
|
79
|
+
return this.data['at'];
|
|
80
|
+
}
|
|
81
|
+
}, {
|
|
82
|
+
key: "spaceAnd",
|
|
83
|
+
value: function spaceAnd() {
|
|
84
|
+
return this.data['spaceAnd'];
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
87
|
+
key: "everySecond",
|
|
88
|
+
value: function everySecond() {
|
|
89
|
+
return this.data['everySecond'];
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
key: "everyX0Seconds",
|
|
93
|
+
value: function everyX0Seconds() {
|
|
94
|
+
return this.data['everyX0Seconds'];
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
key: "secondsX0ThroughX1PastTheMinute",
|
|
98
|
+
value: function secondsX0ThroughX1PastTheMinute() {
|
|
99
|
+
return this.data['secondsX0ThroughX1PastTheMinute'];
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
key: "atX0SecondsPastTheMinute",
|
|
103
|
+
value: function atX0SecondsPastTheMinute() {
|
|
104
|
+
return this.data['atX0SecondsPastTheMinute'];
|
|
105
|
+
}
|
|
106
|
+
}, {
|
|
107
|
+
key: "everyX0Minutes",
|
|
108
|
+
value: function everyX0Minutes() {
|
|
109
|
+
return this.data['everyX0Minutes'];
|
|
110
|
+
}
|
|
111
|
+
}, {
|
|
112
|
+
key: "minutesX0ThroughX1PastTheHour",
|
|
113
|
+
value: function minutesX0ThroughX1PastTheHour() {
|
|
114
|
+
return this.data['minutesX0ThroughX1PastTheHour'];
|
|
115
|
+
}
|
|
116
|
+
}, {
|
|
117
|
+
key: "atX0MinutesPastTheHour",
|
|
118
|
+
value: function atX0MinutesPastTheHour() {
|
|
119
|
+
return this.data['atX0MinutesPastTheHour'];
|
|
120
|
+
}
|
|
121
|
+
}, {
|
|
122
|
+
key: "everyX0Hours",
|
|
123
|
+
value: function everyX0Hours() {
|
|
124
|
+
return this.data['everyX0Hours'];
|
|
125
|
+
}
|
|
126
|
+
}, {
|
|
127
|
+
key: "betweenX0AndX1",
|
|
128
|
+
value: function betweenX0AndX1() {
|
|
129
|
+
return this.data['betweenX0AndX1'];
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
key: "atX0",
|
|
133
|
+
value: function atX0() {
|
|
134
|
+
return this.data['atX0'];
|
|
135
|
+
}
|
|
136
|
+
}, {
|
|
137
|
+
key: "commaEveryDay",
|
|
138
|
+
value: function commaEveryDay() {
|
|
139
|
+
return this.data['commaEveryDay'];
|
|
140
|
+
}
|
|
141
|
+
}, {
|
|
142
|
+
key: "commaEveryX0DaysOfTheWeek",
|
|
143
|
+
value: function commaEveryX0DaysOfTheWeek() {
|
|
144
|
+
return this.data['commaEveryX0DaysOfTheWeek'];
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
key: "commaX0ThroughX1",
|
|
148
|
+
value: function commaX0ThroughX1() {
|
|
149
|
+
return this.data['commaX0ThroughX1'];
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "commaAndX0ThroughX1",
|
|
153
|
+
value: function commaAndX0ThroughX1() {
|
|
154
|
+
return this.data['commaAndX0ThroughX1'];
|
|
155
|
+
}
|
|
156
|
+
}, {
|
|
157
|
+
key: "first",
|
|
158
|
+
value: function first() {
|
|
159
|
+
return this.data['first'];
|
|
160
|
+
}
|
|
161
|
+
}, {
|
|
162
|
+
key: "second",
|
|
163
|
+
value: function second() {
|
|
164
|
+
return this.data['second'];
|
|
165
|
+
}
|
|
166
|
+
}, {
|
|
167
|
+
key: "third",
|
|
168
|
+
value: function third() {
|
|
169
|
+
return this.data['third'];
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
key: "fourth",
|
|
173
|
+
value: function fourth() {
|
|
174
|
+
return this.data['fourth'];
|
|
175
|
+
}
|
|
176
|
+
}, {
|
|
177
|
+
key: "fifth",
|
|
178
|
+
value: function fifth() {
|
|
179
|
+
return this.data['fifth'];
|
|
180
|
+
}
|
|
181
|
+
}, {
|
|
182
|
+
key: "commaOnThe",
|
|
183
|
+
value: function commaOnThe() {
|
|
184
|
+
return this.data['commaOnThe'];
|
|
185
|
+
}
|
|
186
|
+
}, {
|
|
187
|
+
key: "spaceX0OfTheMonth",
|
|
188
|
+
value: function spaceX0OfTheMonth() {
|
|
189
|
+
return this.data['spaceX0OfTheMonth'];
|
|
190
|
+
}
|
|
191
|
+
}, {
|
|
192
|
+
key: "lastDay",
|
|
193
|
+
value: function lastDay() {
|
|
194
|
+
return this.data['lastDay'];
|
|
195
|
+
}
|
|
196
|
+
}, {
|
|
197
|
+
key: "commaOnTheLastX0OfTheMonth",
|
|
198
|
+
value: function commaOnTheLastX0OfTheMonth() {
|
|
199
|
+
return this.data['commaOnTheLastX0OfTheMonth'];
|
|
200
|
+
}
|
|
201
|
+
}, {
|
|
202
|
+
key: "commaOnlyOnX0",
|
|
203
|
+
value: function commaOnlyOnX0() {
|
|
204
|
+
return this.data['commaOnlyOnX0'];
|
|
205
|
+
}
|
|
206
|
+
}, {
|
|
207
|
+
key: "commaAndOnX0",
|
|
208
|
+
value: function commaAndOnX0() {
|
|
209
|
+
return this.data['commaAndOnX0'];
|
|
210
|
+
}
|
|
211
|
+
}, {
|
|
212
|
+
key: "commaEveryX0Months",
|
|
213
|
+
value: function commaEveryX0Months() {
|
|
214
|
+
return this.data['commaEveryX0Months'];
|
|
215
|
+
}
|
|
216
|
+
}, {
|
|
217
|
+
key: "commaOnlyInX0",
|
|
218
|
+
value: function commaOnlyInX0() {
|
|
219
|
+
return this.data['commaOnlyInX0'];
|
|
220
|
+
}
|
|
221
|
+
}, {
|
|
222
|
+
key: "commaOnTheLastDayOfTheMonth",
|
|
223
|
+
value: function commaOnTheLastDayOfTheMonth() {
|
|
224
|
+
return this.data['commaOnTheLastDayOfTheMonth'];
|
|
225
|
+
}
|
|
226
|
+
}, {
|
|
227
|
+
key: "commaOnTheLastWeekdayOfTheMonth",
|
|
228
|
+
value: function commaOnTheLastWeekdayOfTheMonth() {
|
|
229
|
+
return this.data['commaOnTheLastWeekdayOfTheMonth'];
|
|
230
|
+
}
|
|
231
|
+
}, {
|
|
232
|
+
key: "commaDaysBeforeTheLastDayOfTheMonth",
|
|
233
|
+
value: function commaDaysBeforeTheLastDayOfTheMonth() {
|
|
234
|
+
return this.data['commaDaysBeforeTheLastDayOfTheMonth'];
|
|
235
|
+
}
|
|
236
|
+
}, {
|
|
237
|
+
key: "firstWeekday",
|
|
238
|
+
value: function firstWeekday() {
|
|
239
|
+
return this.data['firstWeekday'];
|
|
240
|
+
}
|
|
241
|
+
}, {
|
|
242
|
+
key: "weekdayNearestDayX0",
|
|
243
|
+
value: function weekdayNearestDayX0() {
|
|
244
|
+
return this.data['weekdayNearestDayX0'];
|
|
245
|
+
}
|
|
246
|
+
}, {
|
|
247
|
+
key: "commaOnTheX0OfTheMonth",
|
|
248
|
+
value: function commaOnTheX0OfTheMonth() {
|
|
249
|
+
return this.data['commaOnTheX0OfTheMonth'];
|
|
250
|
+
}
|
|
251
|
+
}, {
|
|
252
|
+
key: "commaEveryX0Days",
|
|
253
|
+
value: function commaEveryX0Days() {
|
|
254
|
+
return this.data['commaEveryX0Days'];
|
|
255
|
+
}
|
|
256
|
+
}, {
|
|
257
|
+
key: "commaBetweenDayX0AndX1OfTheMonth",
|
|
258
|
+
value: function commaBetweenDayX0AndX1OfTheMonth() {
|
|
259
|
+
return this.data['commaBetweenDayX0AndX1OfTheMonth'];
|
|
260
|
+
}
|
|
261
|
+
}, {
|
|
262
|
+
key: "commaOnDayX0OfTheMonth",
|
|
263
|
+
value: function commaOnDayX0OfTheMonth() {
|
|
264
|
+
return this.data['commaOnDayX0OfTheMonth'];
|
|
265
|
+
}
|
|
266
|
+
}, {
|
|
267
|
+
key: "commaEveryHour",
|
|
268
|
+
value: function commaEveryHour() {
|
|
269
|
+
return this.data['commaEveryHour'];
|
|
270
|
+
}
|
|
271
|
+
}, {
|
|
272
|
+
key: "commaEveryX0Years",
|
|
273
|
+
value: function commaEveryX0Years() {
|
|
274
|
+
return this.data['commaEveryX0Years'];
|
|
275
|
+
}
|
|
276
|
+
}, {
|
|
277
|
+
key: "commaStartingX0",
|
|
278
|
+
value: function commaStartingX0() {
|
|
279
|
+
return this.data['commaStartingX0'];
|
|
280
|
+
}
|
|
281
|
+
}, {
|
|
282
|
+
key: "daysOfTheWeek",
|
|
283
|
+
value: function daysOfTheWeek() {
|
|
284
|
+
return this.data['daysOfTheWeek'];
|
|
285
|
+
}
|
|
286
|
+
}, {
|
|
287
|
+
key: "monthsOfTheYear",
|
|
288
|
+
value: function monthsOfTheYear() {
|
|
289
|
+
return this.data['monthsOfTheYear'];
|
|
290
|
+
}
|
|
291
|
+
}]);
|
|
292
|
+
|
|
293
|
+
return CronstrueLocale;
|
|
294
|
+
}();
|
|
295
|
+
|
|
296
|
+
var loadConstrueLocale = function loadConstrueLocale(data) {
|
|
297
|
+
_cronstrue.default.initialize({
|
|
298
|
+
load: function load(availableLocales) {
|
|
299
|
+
availableLocales[data === null || data === void 0 ? void 0 : data.lang] = new CronstrueLocale(data === null || data === void 0 ? void 0 : data.cronstrue);
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
exports.loadConstrueLocale = loadConstrueLocale;
|
|
@@ -85,6 +85,11 @@ var APIClient = /*#__PURE__*/function (_APIClientSDK) {
|
|
|
85
85
|
}, {
|
|
86
86
|
key: "interceptors",
|
|
87
87
|
value: function interceptors() {
|
|
88
|
+
this.axios.interceptors.request.use(function (config) {
|
|
89
|
+
config.headers['X-With-ACL-Meta'] = true;
|
|
90
|
+
return config;
|
|
91
|
+
});
|
|
92
|
+
|
|
88
93
|
_get(_getPrototypeOf(APIClient.prototype), "interceptors", this).call(this);
|
|
89
94
|
|
|
90
95
|
this.notification();
|
|
@@ -13,20 +13,24 @@ var _react = require("@formily/react");
|
|
|
13
13
|
|
|
14
14
|
var _antd = require("antd");
|
|
15
15
|
|
|
16
|
+
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
|
|
17
|
+
|
|
16
18
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
17
19
|
|
|
18
|
-
var
|
|
20
|
+
var _collectionManager = require("../collection-manager");
|
|
19
21
|
|
|
20
|
-
var
|
|
22
|
+
var _recordProvider = require("../record-provider");
|
|
21
23
|
|
|
22
24
|
var _schemaComponent = require("../schema-component");
|
|
23
25
|
|
|
24
|
-
var
|
|
26
|
+
var _BlockProvider = require("./BlockProvider");
|
|
25
27
|
|
|
26
28
|
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); }
|
|
27
29
|
|
|
28
30
|
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; }
|
|
29
31
|
|
|
32
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
+
|
|
30
34
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
35
|
|
|
32
36
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -53,6 +57,7 @@ var InternalFormBlockProvider = function InternalFormBlockProvider(props) {
|
|
|
53
57
|
service = _useBlockRequestConte.service;
|
|
54
58
|
|
|
55
59
|
var formBlockRef = (0, _react2.useRef)();
|
|
60
|
+
var record = (0, _recordProvider.useRecord)();
|
|
56
61
|
|
|
57
62
|
if (service.loading) {
|
|
58
63
|
return /*#__PURE__*/_react2.default.createElement(_antd.Spin, null);
|
|
@@ -69,6 +74,7 @@ var InternalFormBlockProvider = function InternalFormBlockProvider(props) {
|
|
|
69
74
|
formBlockRef: formBlockRef
|
|
70
75
|
}
|
|
71
76
|
}, readPretty ? /*#__PURE__*/_react2.default.createElement(_recordProvider.RecordProvider, {
|
|
77
|
+
parent: (0, _isEmpty.default)(record === null || record === void 0 ? void 0 : record.__parent) ? record : record === null || record === void 0 ? void 0 : record.__parent,
|
|
72
78
|
record: service === null || service === void 0 ? void 0 : (_service$data = service.data) === null || _service$data === void 0 ? void 0 : _service$data.data
|
|
73
79
|
}, /*#__PURE__*/_react2.default.createElement("div", {
|
|
74
80
|
ref: formBlockRef
|
|
@@ -227,14 +227,14 @@ var useDisableCardDrag = function useDisableCardDrag() {
|
|
|
227
227
|
var _useACLRoleContext = (0, _acl.useACLRoleContext)(),
|
|
228
228
|
allowAll = _useACLRoleContext.allowAll,
|
|
229
229
|
allowConfigure = _useACLRoleContext.allowConfigure,
|
|
230
|
-
|
|
230
|
+
parseAction = _useACLRoleContext.parseAction;
|
|
231
231
|
|
|
232
232
|
if (allowAll || allowConfigure) {
|
|
233
233
|
return false;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
var result =
|
|
237
|
-
|
|
236
|
+
var result = parseAction("".concat(ctx === null || ctx === void 0 ? void 0 : (_ctx$props = ctx.props) === null || _ctx$props === void 0 ? void 0 : _ctx$props.resource, ":update"), {
|
|
237
|
+
ignoreScope: true
|
|
238
238
|
});
|
|
239
239
|
return !result;
|
|
240
240
|
};
|
|
@@ -12,6 +12,7 @@ export declare type SharedFilterContextValue = {
|
|
|
12
12
|
setSharedFilterStore: (filterStore: SharedFilterStore) => void;
|
|
13
13
|
getFilterParams: (filterStore?: SharedFilterStore) => any;
|
|
14
14
|
};
|
|
15
|
+
export declare const mergeFilter: (filters: any[], op?: string) => any;
|
|
15
16
|
export declare const getFilterParams: (filterStore?: SharedFilterStore) => {
|
|
16
17
|
$and: SharedFilter[];
|
|
17
18
|
} | {
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.getFilterParams = exports.concatFilter = exports.SharedFilterProvider = exports.SharedFilterContext = exports.SHARED_FILTER_CONDITION = void 0;
|
|
8
|
+
exports.mergeFilter = exports.getFilterParams = exports.concatFilter = exports.SharedFilterProvider = exports.SharedFilterContext = exports.SHARED_FILTER_CONDITION = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -25,6 +25,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
25
25
|
|
|
26
26
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
27
|
|
|
28
|
+
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; }
|
|
29
|
+
|
|
28
30
|
var SHARED_FILTER_CONDITION;
|
|
29
31
|
exports.SHARED_FILTER_CONDITION = SHARED_FILTER_CONDITION;
|
|
30
32
|
|
|
@@ -33,11 +35,28 @@ exports.SHARED_FILTER_CONDITION = SHARED_FILTER_CONDITION;
|
|
|
33
35
|
SHARED_FILTER_CONDITION["OR"] = "$or";
|
|
34
36
|
})(SHARED_FILTER_CONDITION || (exports.SHARED_FILTER_CONDITION = SHARED_FILTER_CONDITION = {}));
|
|
35
37
|
|
|
38
|
+
var mergeFilter = function mergeFilter(filters) {
|
|
39
|
+
var op = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '$and';
|
|
40
|
+
var items = filters.filter(Boolean);
|
|
41
|
+
|
|
42
|
+
if (items.length === 0) {
|
|
43
|
+
return {};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (items.length === 1) {
|
|
47
|
+
return items[0];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return _defineProperty({}, op, items);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.mergeFilter = mergeFilter;
|
|
54
|
+
|
|
36
55
|
var getFilterParams = function getFilterParams(filterStore) {
|
|
37
|
-
var newAssociationFilterList = Object.entries(filterStore).map(function (
|
|
38
|
-
var
|
|
39
|
-
key =
|
|
40
|
-
filter =
|
|
56
|
+
var newAssociationFilterList = Object.entries(filterStore).map(function (_ref2) {
|
|
57
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
58
|
+
key = _ref3[0],
|
|
59
|
+
filter = _ref3[1];
|
|
41
60
|
|
|
42
61
|
return filter;
|
|
43
62
|
});
|
|
@@ -56,12 +75,12 @@ var SharedFilterContext = /*#__PURE__*/(0, _react.createContext)({
|
|
|
56
75
|
exports.SharedFilterContext = SharedFilterContext;
|
|
57
76
|
|
|
58
77
|
var concatFilter = function concatFilter(f1, f2) {
|
|
59
|
-
var newAnd = [f1.$and, f2.$and].filter(function (i) {
|
|
78
|
+
var newAnd = [f1 === null || f1 === void 0 ? void 0 : f1.$and, f2 === null || f2 === void 0 ? void 0 : f2.$and].filter(function (i) {
|
|
60
79
|
return i;
|
|
61
80
|
}).reduce(function (pre, cur) {
|
|
62
81
|
return pre.concat(cur);
|
|
63
82
|
}, []);
|
|
64
|
-
var newOr = [f1.$or, f2.$or].filter(function (i) {
|
|
83
|
+
var newOr = [f1 === null || f1 === void 0 ? void 0 : f1.$or, f2 === null || f2 === void 0 ? void 0 : f2.$or].filter(function (i) {
|
|
65
84
|
return i;
|
|
66
85
|
}).reduce(function (pre, cur) {
|
|
67
86
|
return pre.concat(cur);
|
|
@@ -11,6 +11,8 @@ var _antd = require("antd");
|
|
|
11
11
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
+
var _reactRouterDom = require("react-router-dom");
|
|
15
|
+
|
|
14
16
|
var _apiClient = require("../api-client");
|
|
15
17
|
|
|
16
18
|
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); }
|
|
@@ -43,7 +45,18 @@ var CollectionHistoryProvider = function CollectionHistoryProvider(props) {
|
|
|
43
45
|
sort: ['sort']
|
|
44
46
|
}
|
|
45
47
|
};
|
|
46
|
-
var
|
|
48
|
+
var location = (0, _reactRouterDom.useLocation)(); // console.log('location', location);
|
|
49
|
+
|
|
50
|
+
var service = (0, _apiClient.useRequest)(options, {
|
|
51
|
+
manual: true
|
|
52
|
+
});
|
|
53
|
+
var isAdminPage = location.pathname.startsWith('/admin');
|
|
54
|
+
var token = api.auth.getToken() || '';
|
|
55
|
+
(0, _react.useEffect)(function () {
|
|
56
|
+
if (isAdminPage && token) {
|
|
57
|
+
service.run();
|
|
58
|
+
}
|
|
59
|
+
}, [isAdminPage, token]); // 刷新 collecionHistory
|
|
47
60
|
|
|
48
61
|
var refreshCH = /*#__PURE__*/function () {
|
|
49
62
|
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
@@ -4,6 +4,7 @@ export declare const useCollection: () => {
|
|
|
4
4
|
resource: import("@nocobase/sdk").IResource;
|
|
5
5
|
getField(name: SchemaKey): CollectionFieldOptions;
|
|
6
6
|
fields: import("../types").FieldOptions[];
|
|
7
|
+
getPrimaryKey: () => any;
|
|
7
8
|
currentFields: import("../types").FieldOptions[];
|
|
8
9
|
inheritedFields: any[];
|
|
9
10
|
name?: string;
|
|
@@ -48,6 +48,16 @@ var useCollection = function useCollection() {
|
|
|
48
48
|
});
|
|
49
49
|
},
|
|
50
50
|
fields: totalFields,
|
|
51
|
+
getPrimaryKey: function getPrimaryKey() {
|
|
52
|
+
if (collection.targetKey || collection.filterTargetKey) {
|
|
53
|
+
return collection.targetKey || collection.filterTargetKey;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var field = currentFields.find(function (field) {
|
|
57
|
+
return field.primaryKey;
|
|
58
|
+
});
|
|
59
|
+
return field ? field.name : 'id';
|
|
60
|
+
},
|
|
51
61
|
currentFields: currentFields,
|
|
52
62
|
inheritedFields: inheritedFields
|
|
53
63
|
});
|
|
@@ -108,19 +108,6 @@ Object.keys(_email).forEach(function (key) {
|
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
var _formula = require("./formula");
|
|
112
|
-
|
|
113
|
-
Object.keys(_formula).forEach(function (key) {
|
|
114
|
-
if (key === "default" || key === "__esModule") return;
|
|
115
|
-
if (key in exports && exports[key] === _formula[key]) return;
|
|
116
|
-
Object.defineProperty(exports, key, {
|
|
117
|
-
enumerable: true,
|
|
118
|
-
get: function get() {
|
|
119
|
-
return _formula[key];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
111
|
var _icon = require("./icon");
|
|
125
112
|
|
|
126
113
|
Object.keys(_icon).forEach(function (key) {
|
|
@@ -153,6 +153,13 @@ var id = [{
|
|
|
153
153
|
visible: function visible(field) {
|
|
154
154
|
return field.collectionName === 'users';
|
|
155
155
|
}
|
|
156
|
+
}, {
|
|
157
|
+
label: '{{t("is not current logged-in user")}}',
|
|
158
|
+
value: '$isNotCurrentUser',
|
|
159
|
+
noValue: true,
|
|
160
|
+
visible: function visible(field) {
|
|
161
|
+
return field.collectionName === 'users';
|
|
162
|
+
}
|
|
156
163
|
}, {
|
|
157
164
|
label: '{{t("exists")}}',
|
|
158
165
|
value: '$exists',
|