@bigbinary/neeto-fields-frontend 1.3.25 → 1.3.27
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/README.md +178 -162
- package/dist/index.cjs.js +12 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
# neeto-fields-nano
|
|
2
2
|
|
|
3
|
-
The `neeto-fields-nano` enables the management of dynamically added fields
|
|
4
|
-
referred to as custom fields) across neeto applications. The nano exports
|
|
3
|
+
The `neeto-fields-nano` enables the management of dynamically added fields
|
|
4
|
+
(often referred to as custom fields) across neeto applications. The nano exports
|
|
5
|
+
the `@bigbinary/neeto-fields-frontend` NPM package and `neeto-fields-engine`
|
|
6
|
+
Rails engine for development.
|
|
5
7
|
|
|
6
8
|
# Contents
|
|
7
9
|
|
|
8
10
|
1. [Development with Host Application](#development-with-host-application)
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
- [Engine](#engine)
|
|
12
|
+
- [Installation](#installation)
|
|
13
|
+
- [customizability](#customizability)
|
|
14
|
+
- [Frontend package](#frontend-package)
|
|
15
|
+
- [Installation](#installation-1)
|
|
16
|
+
- [Instructions for development](#instructions-for-development)
|
|
17
|
+
- [Components](#components)
|
|
18
|
+
- [FieldsDashBoard](#1-fieldsdashboard)
|
|
19
|
+
- [FieldsPane](#2-fieldspane)
|
|
20
|
+
- [FieldValuesContainer](#3-fieldvaluescontainer)
|
|
21
|
+
- [FieldInputs](#4-fieldinputs)
|
|
22
|
+
- [InlineFieldValueInputProps](#5-inlinefieldvalueinput)
|
|
23
|
+
- [FieldDeleteAlert](#6-fielddeletealert)
|
|
24
|
+
- [Functions](#functions)
|
|
25
|
+
- [mergeInitialValues](#1-neetofieldsutilsmergeinitialvalues)
|
|
26
|
+
- [transformValues](#2-neetofieldsutilstransformvalues)
|
|
27
|
+
- [Hooks](#hooks)
|
|
28
|
+
- [useFetchFields](#1-usefetchfields)
|
|
29
|
+
- [useShowFields](#2-useshowfield)
|
|
30
|
+
- [useCreateField](#3-usecreatefield)
|
|
31
|
+
- [useUpdateField](#4-useupdatefield)
|
|
32
|
+
- [useDestroyField](#5-usedestroyfield)
|
|
31
33
|
2. [Instructions for Publishing](#instructions-for-publishing)
|
|
32
34
|
|
|
33
35
|
## Development with Host Application
|
|
@@ -40,54 +42,59 @@ The engine is used to manage fields for any entity across neeto products.
|
|
|
40
42
|
|
|
41
43
|
1. Add this line to your application's Gemfile:
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
```ruby
|
|
46
|
+
source "NEETO_GEM_SERVER_URL" do
|
|
47
|
+
# ..existing gems
|
|
46
48
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
gem 'neeto-fields-engine'
|
|
50
|
+
end
|
|
51
|
+
```
|
|
50
52
|
|
|
51
53
|
2. And then execute:
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
```ruby
|
|
56
|
+
bundle install
|
|
57
|
+
```
|
|
56
58
|
|
|
57
59
|
3. Add this line to your application's `config/routes.rb` file:
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
```ruby
|
|
62
|
+
mount NeetoFieldsEngine::Engine => "/neeto_fields_engine"
|
|
63
|
+
```
|
|
62
64
|
|
|
63
|
-
4. Run the following command to copy the migrations from the engine to the host
|
|
65
|
+
4. Run the following command to copy the migrations from the engine to the host
|
|
66
|
+
application:
|
|
64
67
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
```ruby
|
|
69
|
+
rails g neeto_fields_engine:install
|
|
70
|
+
```
|
|
68
71
|
|
|
69
72
|
5. Add the migrations to the database:
|
|
70
73
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
```ruby
|
|
75
|
+
bundle exec rails db:migrate
|
|
76
|
+
```
|
|
74
77
|
|
|
75
|
-
6. Generate the required associations between models using the following
|
|
78
|
+
6. Generate the required associations between models using the following
|
|
79
|
+
command:
|
|
76
80
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
```ruby
|
|
82
|
+
rails g neeto_fields_engine:associations
|
|
83
|
+
```
|
|
80
84
|
|
|
81
|
-
|
|
85
|
+
This will prompt the user to enter 2 things:
|
|
82
86
|
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
1. Name of Owner model.
|
|
88
|
+
2. Names of Resource models.
|
|
85
89
|
|
|
86
|
-
|
|
90
|
+
Explore
|
|
91
|
+
[Owner & Resource Information](docs/engine/owner-resource-information.md) for
|
|
92
|
+
details.
|
|
87
93
|
|
|
88
94
|
#### Customizability
|
|
89
95
|
|
|
90
|
-
Refer [Engine customizability](docs/engine/customizability.md) to learn about
|
|
96
|
+
Refer [Engine customizability](docs/engine/customizability.md) to learn about
|
|
97
|
+
customizing the engine's default behavior.
|
|
91
98
|
|
|
92
99
|
### Frontend package
|
|
93
100
|
|
|
@@ -110,7 +117,9 @@ yarn add uuid
|
|
|
110
117
|
|
|
111
118
|
### Instructions for development
|
|
112
119
|
|
|
113
|
-
Check the
|
|
120
|
+
Check the
|
|
121
|
+
[Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0)
|
|
122
|
+
for step-by-step instructions to develop the frontend package.
|
|
114
123
|
|
|
115
124
|
### Components
|
|
116
125
|
|
|
@@ -158,12 +167,15 @@ default, but you can customize its behavior by passing optional props.
|
|
|
158
167
|
`inactive` states.
|
|
159
168
|
9. `breadcrumbs`: Specifies the breadcrumbs to be displayed on the dashboard
|
|
160
169
|
page.
|
|
161
|
-
10. `
|
|
170
|
+
10. `helpDescription`: To set the description of the popover, this can be a
|
|
171
|
+
string or a custom component.
|
|
172
|
+
11. `helpDocUrl`: Specify the URL to the help documentation about fields. This
|
|
162
173
|
URL will be shown in the `NoData` screen.
|
|
163
|
-
|
|
174
|
+
12. `nameAliases`: This property accepts alias names as key-value pairs to be
|
|
164
175
|
displayed for the names of resource types in header and menubar.
|
|
165
|
-
|
|
166
|
-
|
|
176
|
+
13. `headerTitle`: Specify the header title explicitly. Default is 'fields'. TIt
|
|
177
|
+
also specifies the title of `HelpPopover`.
|
|
178
|
+
14. `resources`: For owner-based field categorization, provide an array of
|
|
167
179
|
objects with `id` and `name` properties for each owner. For resource
|
|
168
180
|
type-based categorization, use an array of objects with `label` and `value`
|
|
169
181
|
properties representing each resource types.
|
|
@@ -176,81 +188,80 @@ default, but you can customize its behavior by passing optional props.
|
|
|
176
188
|
|
|
177
189
|
1. When `Organization` is the owner of the fields.
|
|
178
190
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
191
|
+
```jsx
|
|
192
|
+
import { FieldsDashboard } from "@bigbinary/neeto-fields-frontend";
|
|
193
|
+
|
|
194
|
+
<FieldsDashboard
|
|
195
|
+
allowedKinds={["text", "number"]}
|
|
196
|
+
buildColumnData={({ defaultColumns }) => [
|
|
197
|
+
...defaultColumns,
|
|
198
|
+
{
|
|
199
|
+
dataIndex: "isSystem",
|
|
200
|
+
index: "isSystem",
|
|
201
|
+
title: t("titles.systemField"),
|
|
202
|
+
render: boolVal => (boolVal ? "Yes" : "No"),
|
|
203
|
+
},
|
|
204
|
+
]}
|
|
205
|
+
fieldStatesTaxonomy={{ active: "Active", inactive: "Deactivated" }}
|
|
206
|
+
paneProps={{
|
|
207
|
+
children: <HostSpecificInputFields />,
|
|
208
|
+
validations: {
|
|
209
|
+
hostSpecificInputName: validationSchema,
|
|
210
|
+
},
|
|
211
|
+
initialValues: {
|
|
212
|
+
hostSpecificInputName: initialValue,
|
|
213
|
+
},
|
|
214
|
+
}}
|
|
215
|
+
breadcrumbs={[
|
|
216
|
+
{
|
|
217
|
+
link: "/",
|
|
218
|
+
text: "Home",
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
link: "/",
|
|
222
|
+
text: "Settings",
|
|
223
|
+
},
|
|
224
|
+
]}
|
|
225
|
+
/>;
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
#### Usage in [neetoDesk](https://github.com/bigbinary/neeto-desk-web/blob/34068bb579335d3eb6041279f6f3f660099d7f1c/app/javascript/src/components/TicketFields/List/index.jsx#L119C8-L130C11)
|
|
229
|
+
|
|
230
|
+
2. When `Organization` is not owner of the fields. Let's say the owner is
|
|
231
|
+
`Project`.
|
|
232
|
+
|
|
233
|
+
```jsx
|
|
234
|
+
import { FieldsDashboard } from "@bigbinary/neeto-fields-frontend";
|
|
235
|
+
|
|
236
|
+
<FieldsDashboard
|
|
237
|
+
allowedKinds={["text", "number"]}
|
|
238
|
+
resourceType="tasks"
|
|
239
|
+
showOwnersInMenu
|
|
240
|
+
fieldStatesTaxonomy={{ active: "Active", inactive: "Deactivated" }}
|
|
241
|
+
paneProps={{
|
|
242
|
+
children: <HostSpecificInputFields />,
|
|
243
|
+
validations: {
|
|
244
|
+
hostSpecificInputName: validationSchema,
|
|
245
|
+
},
|
|
246
|
+
initialValues: {
|
|
247
|
+
hostSpecificInputName: initialValue,
|
|
248
|
+
},
|
|
249
|
+
}}
|
|
250
|
+
breadcrumbs={[
|
|
251
|
+
{
|
|
252
|
+
link: "/",
|
|
253
|
+
text: "Home",
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
link: "/",
|
|
257
|
+
text: "Settings",
|
|
258
|
+
},
|
|
259
|
+
]}
|
|
260
|
+
/>;
|
|
261
|
+
```
|
|
250
262
|
|
|
251
263
|
#### Usage in [neetoForm](https://github.com/bigbinary/neeto-form-web/blob/1ae06a0f49f62b20ced313c1672fb336553b867c/app/javascript/src/components/Form/Settings/Fields.jsx#L35C7-L47C9)
|
|
252
264
|
|
|
253
|
-
|
|
254
265
|
#### 2. `FieldsPane`
|
|
255
266
|
|
|
256
267
|
<div align="center">
|
|
@@ -281,24 +292,24 @@ The `FieldsPane` component handles the `Add / Edit` operations of the field.
|
|
|
281
292
|
|
|
282
293
|
#### Usage
|
|
283
294
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
295
|
+
```jsx
|
|
296
|
+
import { FieldsPane } from "@biginary/neeto-fields-frontend";
|
|
297
|
+
|
|
298
|
+
const [fieldPaneOpen, setFieldPaneOpen] = useState(false);
|
|
299
|
+
|
|
300
|
+
<FieldsPane
|
|
301
|
+
isOpen={fieldPaneOpen}
|
|
302
|
+
allowedKinds={["text", "number"]}
|
|
303
|
+
resourceType="users"
|
|
304
|
+
additionalValidations={{
|
|
305
|
+
hostSpecificInputName: validationSchema,
|
|
306
|
+
}}
|
|
307
|
+
initialValues={{ hostSpecificInputName: initialValue }}
|
|
308
|
+
onClose={() => setFieldPaneOpen(false)}
|
|
309
|
+
>
|
|
310
|
+
<HostSpecificInputFields />
|
|
311
|
+
</FieldsPane>;
|
|
312
|
+
```
|
|
302
313
|
|
|
303
314
|
## 3. `FieldValuesContainer`
|
|
304
315
|
|
|
@@ -405,8 +416,8 @@ The `FieldInputs` component render the input UI for the fetched fields.
|
|
|
405
416
|
> [`mergeInitialValues`](#1-neetofieldsutilsmergeinitialvalues) function.
|
|
406
417
|
>
|
|
407
418
|
> To submit the values from this formik form, you need to use
|
|
408
|
-
> [`transformValues`](#2-neetofieldsutilstransformvalues) function to capture
|
|
409
|
-
> data from neeto-fields.
|
|
419
|
+
> [`transformValues`](#2-neetofieldsutilstransformvalues) function to capture
|
|
420
|
+
> the right data from neeto-fields.
|
|
410
421
|
|
|
411
422
|
#### Usage
|
|
412
423
|
|
|
@@ -496,7 +507,8 @@ const buildColumnDataForFields = (fields, onFieldValueUpdateSuccess) =>
|
|
|
496
507
|
<img src="https://github.com/bigbinary/neeto-fields-nano/assets/35305344/6518b206-58f3-4375-bc68-7134ad68c168" alt="Field delete alert" width="500"/>
|
|
497
508
|
</div>
|
|
498
509
|
|
|
499
|
-
The `FieldDeleteAlert` component handles delete operation on fields. It accepts
|
|
510
|
+
The `FieldDeleteAlert` component handles delete operation on fields. It accepts
|
|
511
|
+
the following props:
|
|
500
512
|
|
|
501
513
|
#### Props
|
|
502
514
|
|
|
@@ -505,8 +517,10 @@ The `FieldDeleteAlert` component handles delete operation on fields. It accepts
|
|
|
505
517
|
3. `resourceTypeName`: The type of resource.
|
|
506
518
|
4. `isDeleteAlertOpen`: Boolean state which specifies whether the alert is open.
|
|
507
519
|
5. `isDeleting`: Boolean state indicating whether the field is being deleted.
|
|
508
|
-
6. `handleDelete`: The callback function responsible for deleting the specified
|
|
509
|
-
|
|
520
|
+
6. `handleDelete`: The callback function responsible for deleting the specified
|
|
521
|
+
field.
|
|
522
|
+
7. `handleAlertClose`: The callback function to be executed on closing the
|
|
523
|
+
alert.
|
|
510
524
|
|
|
511
525
|
#### Usage
|
|
512
526
|
|
|
@@ -672,16 +686,18 @@ organization._
|
|
|
672
686
|
|
|
673
687
|
## Instructions for Publishing
|
|
674
688
|
|
|
675
|
-
Consult the
|
|
689
|
+
Consult the
|
|
690
|
+
[building and releasing packages](https://neeto-engineering.neetokb.com/articles/building-and-releasing-packages)
|
|
691
|
+
guide for details on how to publish.
|
|
676
692
|
|
|
677
693
|
## Integrations
|
|
678
694
|
|
|
679
|
-
| Projects
|
|
680
|
-
|
|
|
681
|
-
| neetoForm
|
|
682
|
-
| neetoDesk
|
|
683
|
-
| neetoPlanner
|
|
684
|
-
| neetoCrm
|
|
685
|
-
| neetoChat
|
|
686
|
-
| neetoCal
|
|
687
|
-
| neetoTestify
|
|
695
|
+
| Projects | Integrated |
|
|
696
|
+
| ------------ | :----------------: |
|
|
697
|
+
| neetoForm | :white_check_mark: |
|
|
698
|
+
| neetoDesk | :white_check_mark: |
|
|
699
|
+
| neetoPlanner | :white_check_mark: |
|
|
700
|
+
| neetoCrm | :white_check_mark: |
|
|
701
|
+
| neetoChat | :white_check_mark: |
|
|
702
|
+
| neetoCal | :white_check_mark: |
|
|
703
|
+
| neetoTestify | :white_check_mark: |
|
package/dist/index.cjs.js
CHANGED
|
@@ -675,7 +675,7 @@ var dayjs_min = {exports: {}};
|
|
|
675
675
|
dayjs_min.exports;
|
|
676
676
|
|
|
677
677
|
(function (module, exports) {
|
|
678
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",
|
|
678
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",D={};D[v]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return v;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(v=i),i||!r&&v},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var v=this.$locale().weekStart||0,D=(y<v?y+7:y)-v;return $(r?m-D:m+(6-D),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,v=O.m(this,M);return v=(l={},l[c]=v/12,l[f]=v,l[h]=v/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?v:O.a(v)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[v],w.Ls=D,w.p={},w}));
|
|
679
679
|
} (dayjs_min, dayjs_min.exports));
|
|
680
680
|
|
|
681
681
|
var dayjs_minExports = dayjs_min.exports;
|
|
@@ -2520,7 +2520,7 @@ var buildDefaultColumns = function buildDefaultColumns(_ref2) {
|
|
|
2520
2520
|
key: "name",
|
|
2521
2521
|
dataIndex: "name",
|
|
2522
2522
|
title: i18next.t("neetoFields.titles.fieldName"),
|
|
2523
|
-
width:
|
|
2523
|
+
width: 300,
|
|
2524
2524
|
render: function render(name, field) {
|
|
2525
2525
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2526
2526
|
className: "flex items-center justify-between gap-x-3"
|
|
@@ -2548,12 +2548,12 @@ var buildDefaultColumns = function buildDefaultColumns(_ref2) {
|
|
|
2548
2548
|
render: function render(kind) {
|
|
2549
2549
|
return DISPLAY_KINDS[kind];
|
|
2550
2550
|
},
|
|
2551
|
-
width:
|
|
2551
|
+
width: 180
|
|
2552
2552
|
}, {
|
|
2553
2553
|
key: "isRequired",
|
|
2554
2554
|
dataIndex: "isRequired",
|
|
2555
2555
|
title: i18next.t("neetoFields.titles.required"),
|
|
2556
|
-
width:
|
|
2556
|
+
width: 140,
|
|
2557
2557
|
render: function render(boolVal) {
|
|
2558
2558
|
return boolVal ? i18next.t("neetoFields.common.yes") : i18next.t("neetoFields.common.no");
|
|
2559
2559
|
}
|
|
@@ -3072,14 +3072,17 @@ var Header = reactUtils.withT(function (_ref) {
|
|
|
3072
3072
|
actionBlock: /*#__PURE__*/React__default["default"].createElement(ActionBlock, actionBlockProps),
|
|
3073
3073
|
searchProps: searchInputProps,
|
|
3074
3074
|
size: "small",
|
|
3075
|
-
title: /*#__PURE__*/React__default["default"].createElement("span", null, title, /*#__PURE__*/React__default["default"].createElement(HelpPopover__default["default"], {
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3075
|
+
title: /*#__PURE__*/React__default["default"].createElement("span", null, title, (helpDocUrl || helpDescription) && /*#__PURE__*/React__default["default"].createElement(HelpPopover__default["default"], _extends({
|
|
3076
|
+
className: "ml-2 self-center"
|
|
3077
|
+
}, helpDocUrl && {
|
|
3078
|
+
title: title
|
|
3079
|
+
}, helpDescription && {
|
|
3080
|
+
description: helpDescription
|
|
3081
|
+
}, helpDocUrl && {
|
|
3079
3082
|
helpLinkProps: {
|
|
3080
3083
|
href: helpDocUrl
|
|
3081
3084
|
}
|
|
3082
|
-
}))
|
|
3085
|
+
})))
|
|
3083
3086
|
});
|
|
3084
3087
|
});
|
|
3085
3088
|
|