@entryscape/rdforms 10.15.0 → 10.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -38
- package/dist/rdforms.bootstrap.js +1 -1
- package/dist/rdforms.bootstrap.js.LICENSE.txt +1 -1
- package/dist/rdforms.jquery.js +1 -1
- package/dist/rdforms.node.js +7 -7
- package/dist/rdforms.react.js +4 -4
- package/package.json +49 -54
- package/src/template/Item.js +1 -1
- package/src/template/ItemStore.js +2 -2
- package/src/template/OntologyStore.js +1 -1
- package/src/utils.js +1 -1
- package/src/view/View.js +1 -0
- package/src/view/bootstrap/choice.js +2 -2
- package/src/view/jquery/labels.js +2 -1
- package/src/view/jquery/text.js +1 -1
- package/src/view/react/labels.js +4 -2
- package/src/view/renderingContext.js +3 -1
- package/dist/rdforms.bmd.js +0 -2
- package/dist/rdforms.bmd.js.LICENSE.txt +0 -81
- package/renderers/bmd.js +0 -9
- package/src/spec/nls/de/spec.nls +0 -35
- package/src/view/bmd/DateTimeMD.js +0 -120
- package/src/view/bmd/Selectize.css +0 -163
- package/src/view/bmd/Selectize.js +0 -69
- package/src/view/bmd/all.js +0 -27
- package/src/view/bmd/style.css +0 -150
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Determine if an object is a Buffer
|
|
3
|
-
*
|
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
-
* @license MIT
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/*!
|
|
9
|
-
* The buffer module from node.js, for the browser.
|
|
10
|
-
*
|
|
11
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
12
|
-
* @license MIT
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/*!
|
|
16
|
-
* jQuery JavaScript Library v3.7.1
|
|
17
|
-
* https://jquery.com/
|
|
18
|
-
*
|
|
19
|
-
* Copyright OpenJS Foundation and other contributors
|
|
20
|
-
* Released under the MIT license
|
|
21
|
-
* https://jquery.org/license
|
|
22
|
-
*
|
|
23
|
-
* Date: 2023-08-28T13:37Z
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
27
|
-
|
|
28
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
29
|
-
|
|
30
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Character class utilities for XML NS 1.0 edition 3.
|
|
34
|
-
*
|
|
35
|
-
* @author Louis-Dominique Dubeau
|
|
36
|
-
* @license MIT
|
|
37
|
-
* @copyright Louis-Dominique Dubeau
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Character classes and associated utilities for the 2nd edition of XML 1.1.
|
|
42
|
-
*
|
|
43
|
-
* @author Louis-Dominique Dubeau
|
|
44
|
-
* @license MIT
|
|
45
|
-
* @copyright Louis-Dominique Dubeau
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Character classes and associated utilities for the 5th edition of XML 1.0.
|
|
50
|
-
*
|
|
51
|
-
* @author Louis-Dominique Dubeau
|
|
52
|
-
* @license MIT
|
|
53
|
-
* @copyright Louis-Dominique Dubeau
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
/**!
|
|
57
|
-
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
58
|
-
* @version 1.16.1
|
|
59
|
-
* @license
|
|
60
|
-
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
61
|
-
*
|
|
62
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
63
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
64
|
-
* in the Software without restriction, including without limitation the rights
|
|
65
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
66
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
67
|
-
* furnished to do so, subject to the following conditions:
|
|
68
|
-
*
|
|
69
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
70
|
-
* copies or substantial portions of the Software.
|
|
71
|
-
*
|
|
72
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
73
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
74
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
75
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
76
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
77
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
78
|
-
* SOFTWARE.
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
//! moment.js
|
package/renderers/bmd.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import 'whatwg-fetch';
|
|
2
|
-
import '../src/view/bmd/all';
|
|
3
|
-
import '../src/view/bmd/style.css';
|
|
4
|
-
|
|
5
|
-
export { default as Editor } from '../src/view/Editor';
|
|
6
|
-
export { default as Presenter } from '../src/view/Presenter';
|
|
7
|
-
export { default as ValidationPresenter } from '../src/view/ValidationPresenter';
|
|
8
|
-
export { default as LevelEditor } from '../src/view/bootstrap/LevelEditor';
|
|
9
|
-
export * from '../main';
|
package/src/spec/nls/de/spec.nls
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tocHeading": "Innehållsförteckning",
|
|
3
|
-
"introHeading": "Introduktion",
|
|
4
|
-
"nsHeading": "Namnrymder",
|
|
5
|
-
"mainAPHeading": "Primära klasser",
|
|
6
|
-
"suppAPHeading": "Stödjande klasser",
|
|
7
|
-
"vocsHeading": "Vokabulärer",
|
|
8
|
-
"apxHeadings": "Appendix",
|
|
9
|
-
"apxHeading": "Appendix ${id} - ${name}",
|
|
10
|
-
"vocabTableHeadingLabel": "Beteckning",
|
|
11
|
-
"vocabTableHeadingValue": "Värde",
|
|
12
|
-
"vocabLabel": "Beteckning",
|
|
13
|
-
"vocabLiteralValue": "Värde",
|
|
14
|
-
"vocabURIValue": "Värde",
|
|
15
|
-
"vocabDescription": "Beskrivning",
|
|
16
|
-
"vocabSeeAlso": "Se också",
|
|
17
|
-
"fieldLiteral": "Sträng",
|
|
18
|
-
"fieldLangLit": "Sträng med språk",
|
|
19
|
-
"fieldDatatype": "Datatyp (${datatype})",
|
|
20
|
-
"fieldURI": "Webbadress (URI)",
|
|
21
|
-
"fieldRef": "Entiteten beskrivs av ",
|
|
22
|
-
"fieldLabel": "Beteckning",
|
|
23
|
-
"fieldDescription": "Beskrivning",
|
|
24
|
-
"fieldProperty": "Egenskap",
|
|
25
|
-
"fieldRange": "Värdemängd",
|
|
26
|
-
"fieldLevel": "Kravnivå",
|
|
27
|
-
"unlimited": "n",
|
|
28
|
-
"fieldCardinality": "Kardinalitet",
|
|
29
|
-
"fieldTableHeaderProperty": "Property",
|
|
30
|
-
"fieldTableHeaderLevel": "Kravnivå",
|
|
31
|
-
"levelMandatory": "Obligatorisk",
|
|
32
|
-
"levelRecommended": "Rekommenderad",
|
|
33
|
-
"levelOptional": "Valfri",
|
|
34
|
-
"class": "Klass"
|
|
35
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import moment from 'moment';
|
|
2
|
-
import jquery from 'jquery';
|
|
3
|
-
import DateTimeBase from '../bootstrap/DateTimeBase';
|
|
4
|
-
import { getNamedGraphId } from '../viewUtils';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A Date and time picker.
|
|
8
|
-
*/
|
|
9
|
-
export default class DateTimeMD extends DateTimeBase {
|
|
10
|
-
buildUI() {
|
|
11
|
-
const disabledAttr = getNamedGraphId(this.binding, this.context) ? 'disabled' : '';
|
|
12
|
-
this.tpdate = null;
|
|
13
|
-
this.dpdate = null;
|
|
14
|
-
const bundle = this.context.view.messages;
|
|
15
|
-
const yearOption = this.includeYearOption() ? `<option value="Year">${bundle.date_year}</option>` : '';
|
|
16
|
-
const dateOption = this.includeDateOption() ? `<option value="Date" selected="true">${bundle.date_date}</option>` : '';
|
|
17
|
-
const dateTimeOption = this.includeDateTimeOption() ? `<option value="DateTime">${bundle.date_date_and_time}</option>` : '';
|
|
18
|
-
|
|
19
|
-
this.domNode.innerHTML = `<div class="rdformsDateValue rdformsFieldInput" xmlns="http://www.w3.org/1999/html">
|
|
20
|
-
<div class="rdformsDatepicker form-group input" style="padding-right: 15px;">
|
|
21
|
-
<input ${disabledAttr} class="form-control dateInput date" type="text" placeholder="YYYY-MM-DD" />
|
|
22
|
-
<span >
|
|
23
|
-
<button ${disabledAttr} type="button" class="btn btn-primary bmd-btn-fab bmd-btn-fab-sm dateButton"><span class="fa fa-calendar"></span>
|
|
24
|
-
<div class="ripple-container"></div></button>
|
|
25
|
-
</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="form-group input" style="display:none;">
|
|
28
|
-
<input ${disabledAttr} type="text" class="form-control timeInput" placeholder="HH:MM"/>
|
|
29
|
-
<span>
|
|
30
|
-
<button ${disabledAttr} type="button" class="btn btn-primary bmd-btn-fab bmd-btn-fab-sm timeButton"><span class="fa fa-clock"></span></button>
|
|
31
|
-
</span>
|
|
32
|
-
</div>
|
|
33
|
-
<div class="form-group input" style="display:none;">
|
|
34
|
-
<input ${disabledAttr} type="text" class="form-control yearInput" placeholder="YYYY"/>
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<select ${disabledAttr} class="form-control dateControl">
|
|
38
|
-
${yearOption}
|
|
39
|
-
${dateOption}
|
|
40
|
-
${dateTimeOption}
|
|
41
|
-
</select>
|
|
42
|
-
</div>`;
|
|
43
|
-
this.cal = jquery(this.domNode).find('.date')[0];
|
|
44
|
-
this.dateButton = jquery(this.domNode).find('.dateButton')[0];
|
|
45
|
-
this.timeInput = jquery(this.domNode).find('.timeInput')[0];
|
|
46
|
-
this.timeButton = jquery(this.domNode).find('.timeButton')[0];
|
|
47
|
-
this.yearInput = jquery(this.domNode).find('.yearInput')[0];
|
|
48
|
-
this.dateControl = jquery(this.domNode).find('.dateControl')[0];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
initDatePicker() {
|
|
52
|
-
this.$datepicker = jquery(this.cal).bootstrapMaterialDatePicker({
|
|
53
|
-
time: false,
|
|
54
|
-
date: true,
|
|
55
|
-
triggerEvent: 'none',
|
|
56
|
-
switchOnClick: true,
|
|
57
|
-
lang: this.context.view.getLocale(),
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// time
|
|
61
|
-
this.$timepicker = jquery(this.timeInput).bootstrapMaterialDatePicker({
|
|
62
|
-
format: 'HH:mm',
|
|
63
|
-
time: true,
|
|
64
|
-
date: false,
|
|
65
|
-
triggerEvent: 'none',
|
|
66
|
-
switchOnClick: true,
|
|
67
|
-
lang: this.context.view.getLocale(),
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
jquery(this.dateButton).click(() => {
|
|
71
|
-
this.$datepicker.bootstrapMaterialDatePicker('_fireCalendar');
|
|
72
|
-
});
|
|
73
|
-
this.$datepicker.on('change', (evt, mInstance) => {
|
|
74
|
-
const m = mInstance || moment(evt.target.value, undefined, this.context.view.getLocale());
|
|
75
|
-
|
|
76
|
-
if (this.tpdate) {
|
|
77
|
-
const tpd = moment(this.tpdate, undefined, this.context.view.getLocale());
|
|
78
|
-
m.minute(tpd.minute());
|
|
79
|
-
m.hour(tpd.hour());
|
|
80
|
-
}
|
|
81
|
-
this.dpdate = m.toDate();
|
|
82
|
-
this.setDateInBinding(this.dpdate);
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
if (!this.item.isEnabled()) {
|
|
86
|
-
this.$datepicker.prop('disabled', true);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
jquery(this.timeButton).click(() => {
|
|
90
|
-
this.$timepicker.bootstrapMaterialDatePicker('_fireCalendar');
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
this.$timepicker.on('change', (evt, mInstance) => {
|
|
94
|
-
const m = mInstance || moment(evt.target.value, undefined, this.context.view.getLocale());
|
|
95
|
-
|
|
96
|
-
if (this.dpdate != null) {
|
|
97
|
-
const dpd = moment(this.dpdate, undefined, this.context.view.getLocale());
|
|
98
|
-
dpd.minute(m.minute());
|
|
99
|
-
dpd.hour(m.hour());
|
|
100
|
-
this.tpdate = dpd.toDate();
|
|
101
|
-
this.setDateInBinding(this.tpdate);
|
|
102
|
-
} else {
|
|
103
|
-
this.tpdate = m.toDate();
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
if (!this.item.isEnabled()) {
|
|
108
|
-
this.$timepicker.prop('disabled', true);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
setDateInPicker(d) {
|
|
113
|
-
this.$datepicker.bootstrapMaterialDatePicker('setDate', d);
|
|
114
|
-
this.$timepicker.bootstrapMaterialDatePicker('setTime', d);
|
|
115
|
-
this.dpdate = d;
|
|
116
|
-
this.tpdate = d;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
DateTimeBase.register(DateTimeMD);
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/* SELECTIZE */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
.selectize-control.single,
|
|
5
|
-
.selectize-control.multi {
|
|
6
|
-
padding: 0;
|
|
7
|
-
}
|
|
8
|
-
.selectize-control.single .selectize-input,
|
|
9
|
-
.selectize-control.multi .selectize-input,
|
|
10
|
-
.selectize-control.single .selectize-input.input-active,
|
|
11
|
-
.selectize-control.multi .selectize-input.input-active {
|
|
12
|
-
cursor: text;
|
|
13
|
-
background: transparent;
|
|
14
|
-
-webkit-box-shadow: none;
|
|
15
|
-
box-shadow: none;
|
|
16
|
-
border: 0;
|
|
17
|
-
padding: 0;
|
|
18
|
-
height: 100%;
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
line-height: 30px;
|
|
21
|
-
}
|
|
22
|
-
.selectize-control.single .selectize-input .has-items,
|
|
23
|
-
.selectize-control.multi .selectize-input .has-items,
|
|
24
|
-
.selectize-control.single .selectize-input.input-active .has-items,
|
|
25
|
-
.selectize-control.multi .selectize-input.input-active .has-items {
|
|
26
|
-
padding: 0;
|
|
27
|
-
}
|
|
28
|
-
.selectize-control.single .selectize-input:after,
|
|
29
|
-
.selectize-control.multi .selectize-input:after,
|
|
30
|
-
.selectize-control.single .selectize-input.input-active:after,
|
|
31
|
-
.selectize-control.multi .selectize-input.input-active:after {
|
|
32
|
-
right: 5px;
|
|
33
|
-
position: absolute;
|
|
34
|
-
/* font-size: 25px;
|
|
35
|
-
content: "\e5c5";
|
|
36
|
-
font-family: 'Material Icons'; */
|
|
37
|
-
font-size: 20px;
|
|
38
|
-
content: "\f0d7";
|
|
39
|
-
font-family: FontAwesome;
|
|
40
|
-
speak: none;
|
|
41
|
-
font-style: normal;
|
|
42
|
-
font-weight: normal;
|
|
43
|
-
font-variant: normal;
|
|
44
|
-
text-transform: none;
|
|
45
|
-
line-height: 1;
|
|
46
|
-
-webkit-font-smoothing: antialiased;
|
|
47
|
-
-moz-osx-font-smoothing: grayscale;
|
|
48
|
-
}
|
|
49
|
-
.selectize-control.single .selectize-input input,
|
|
50
|
-
.selectize-control.multi .selectize-input input,
|
|
51
|
-
.selectize-control.single .selectize-input.input-active input,
|
|
52
|
-
.selectize-control.multi .selectize-input.input-active input {
|
|
53
|
-
font-size: 14px;
|
|
54
|
-
outline: 0;
|
|
55
|
-
border: 0;
|
|
56
|
-
background: transparent;
|
|
57
|
-
}
|
|
58
|
-
.selectize-control.single .selectize-input.label-floating-fix input,
|
|
59
|
-
.selectize-control.multi .selectize-input.label-floating-fix input,
|
|
60
|
-
.selectize-control.single .selectize-input.input-active.label-floating-fix input,
|
|
61
|
-
.selectize-control.multi .selectize-input.input-active.label-floating-fix input {
|
|
62
|
-
opacity: 0;
|
|
63
|
-
}
|
|
64
|
-
.selectize-control.single .selectize-input > div,
|
|
65
|
-
.selectize-control.multi .selectize-input > div,
|
|
66
|
-
.selectize-control.single .selectize-input.input-active > div,
|
|
67
|
-
.selectize-control.multi .selectize-input.input-active > div,
|
|
68
|
-
.selectize-control.single .selectize-input > .item,
|
|
69
|
-
.selectize-control.multi .selectize-input > .item,
|
|
70
|
-
.selectize-control.single .selectize-input.input-active > .item,
|
|
71
|
-
.selectize-control.multi .selectize-input.input-active > .item {
|
|
72
|
-
display: inline-block;
|
|
73
|
-
margin: 0 8px 3px 0;
|
|
74
|
-
padding: 0;
|
|
75
|
-
background: transparent;
|
|
76
|
-
border: 0;
|
|
77
|
-
}
|
|
78
|
-
.selectize-control.single .selectize-input > div:after,
|
|
79
|
-
.selectize-control.multi .selectize-input > div:after,
|
|
80
|
-
.selectize-control.single .selectize-input.input-active > div:after,
|
|
81
|
-
.selectize-control.multi .selectize-input.input-active > div:after,
|
|
82
|
-
.selectize-control.single .selectize-input > .item:after,
|
|
83
|
-
.selectize-control.multi .selectize-input > .item:after,
|
|
84
|
-
.selectize-control.single .selectize-input.input-active > .item:after,
|
|
85
|
-
.selectize-control.multi .selectize-input.input-active > .item:after {
|
|
86
|
-
content: ",";
|
|
87
|
-
}
|
|
88
|
-
.selectize-control.single .selectize-input > div:last-of-type:after,
|
|
89
|
-
.selectize-control.multi .selectize-input > div:last-of-type:after,
|
|
90
|
-
.selectize-control.single .selectize-input.input-active > div:last-of-type:after,
|
|
91
|
-
.selectize-control.multi .selectize-input.input-active > div:last-of-type:after,
|
|
92
|
-
.selectize-control.single .selectize-input > .item:last-of-type:after,
|
|
93
|
-
.selectize-control.multi .selectize-input > .item:last-of-type:after,
|
|
94
|
-
.selectize-control.single .selectize-input.input-active > .item:last-of-type:after,
|
|
95
|
-
.selectize-control.multi .selectize-input.input-active > .item:last-of-type:after {
|
|
96
|
-
content: "";
|
|
97
|
-
}
|
|
98
|
-
.selectize-control.single .selectize-input > div.active,
|
|
99
|
-
.selectize-control.multi .selectize-input > div.active,
|
|
100
|
-
.selectize-control.single .selectize-input.input-active > div.active,
|
|
101
|
-
.selectize-control.multi .selectize-input.input-active > div.active,
|
|
102
|
-
.selectize-control.single .selectize-input > .item.active,
|
|
103
|
-
.selectize-control.multi .selectize-input > .item.active,
|
|
104
|
-
.selectize-control.single .selectize-input.input-active > .item.active,
|
|
105
|
-
.selectize-control.multi .selectize-input.input-active > .item.active {
|
|
106
|
-
font-weight: bold;
|
|
107
|
-
background: transparent;
|
|
108
|
-
border: 0;
|
|
109
|
-
}
|
|
110
|
-
.selectize-control.single .selectize-dropdown,
|
|
111
|
-
.selectize-control.multi .selectize-dropdown {
|
|
112
|
-
position: absolute;
|
|
113
|
-
z-index: 1000;
|
|
114
|
-
border: 0;
|
|
115
|
-
width: 100% !important;
|
|
116
|
-
left: 0 !important;
|
|
117
|
-
height: auto;
|
|
118
|
-
background-color: #FFF;
|
|
119
|
-
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
120
|
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
|
121
|
-
border-radius: 2px;
|
|
122
|
-
padding: 0;
|
|
123
|
-
margin-top: 3px;
|
|
124
|
-
}
|
|
125
|
-
.selectize-control.single .selectize-dropdown .active,
|
|
126
|
-
.selectize-control.multi .selectize-dropdown .active {
|
|
127
|
-
background-color: inherit;
|
|
128
|
-
}
|
|
129
|
-
.selectize-control.single .selectize-dropdown .highlight,
|
|
130
|
-
.selectize-control.multi .selectize-dropdown .highlight {
|
|
131
|
-
background-color: #d5d8ff;
|
|
132
|
-
}
|
|
133
|
-
.selectize-control.single .selectize-dropdown .selected,
|
|
134
|
-
.selectize-control.multi .selectize-dropdown .selected,
|
|
135
|
-
.selectize-control.single .selectize-dropdown .selected.active,
|
|
136
|
-
.selectize-control.multi .selectize-dropdown .selected.active {
|
|
137
|
-
background-color: #EEEEEE;
|
|
138
|
-
}
|
|
139
|
-
.selectize-control.single .selectize-dropdown [data-selectable],
|
|
140
|
-
.selectize-control.multi .selectize-dropdown [data-selectable],
|
|
141
|
-
.selectize-control.single .selectize-dropdown .optgroup-header,
|
|
142
|
-
.selectize-control.multi .selectize-dropdown .optgroup-header {
|
|
143
|
-
padding: 10px 20px;
|
|
144
|
-
cursor: pointer;
|
|
145
|
-
}
|
|
146
|
-
.selectize-control.single .dropdown-active ~ .selectize-dropdown,
|
|
147
|
-
.selectize-control.multi .dropdown-active ~ .selectize-dropdown {
|
|
148
|
-
display: block;
|
|
149
|
-
}
|
|
150
|
-
.dropdownjs::after {
|
|
151
|
-
right: 5px;
|
|
152
|
-
top: 3px;
|
|
153
|
-
font-size: 25px;
|
|
154
|
-
position: absolute;
|
|
155
|
-
font-family: 'Material Icons';
|
|
156
|
-
font-style: normal;
|
|
157
|
-
font-weight: 400;
|
|
158
|
-
content: "\e5c5";
|
|
159
|
-
pointer-events: none;
|
|
160
|
-
color: #757575;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import '@selectize/selectize/dist/js/standalone/selectize.min';
|
|
2
|
-
//import '@selectize/selectize/dist/css/selectize.bootstrap4.css';
|
|
3
|
-
import renderingContext from '../renderingContext';
|
|
4
|
-
import utils from '../../utils';
|
|
5
|
-
import { getNamedGraphId } from '../viewUtils';
|
|
6
|
-
|
|
7
|
-
renderingContext.renderSelect = function (fieldDiv, binding, context) {
|
|
8
|
-
const formgroup = jquery('<div class="form-group selectizeException">').appendTo(fieldDiv);
|
|
9
|
-
const formcontrol = jquery('<div class="form-control">').appendTo(formgroup);
|
|
10
|
-
const $select = jquery('<input type="text">').appendTo(formcontrol);
|
|
11
|
-
|
|
12
|
-
const items = [];
|
|
13
|
-
// Sets the value if any
|
|
14
|
-
if (binding.getValue()) {
|
|
15
|
-
items.push(binding.getValue());
|
|
16
|
-
}
|
|
17
|
-
let sel;
|
|
18
|
-
const settings = {
|
|
19
|
-
items,
|
|
20
|
-
valueField: 'id',
|
|
21
|
-
labelField: 'text',
|
|
22
|
-
sortField: 'text',
|
|
23
|
-
searchField: 'text',
|
|
24
|
-
allowEmptyOption: false,
|
|
25
|
-
preload: 'focus',
|
|
26
|
-
maxItems: 1,
|
|
27
|
-
mode: 'single',
|
|
28
|
-
onChange(value) {
|
|
29
|
-
const op = sel.options[value];
|
|
30
|
-
binding.setChoice(op ? op.choice : null);
|
|
31
|
-
this.clearCache();
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
let disable = true;
|
|
35
|
-
if (context.choices && context.choices.length > 0) {
|
|
36
|
-
disable = false;
|
|
37
|
-
settings.options = context.choices;
|
|
38
|
-
} else if (context.chooser && typeof context.chooser.search === 'function') {
|
|
39
|
-
disable = false;
|
|
40
|
-
settings.load = (query, callback) => {
|
|
41
|
-
context.chooser.search(binding, query).then((choices) => {
|
|
42
|
-
callback(choices.map(c => ({
|
|
43
|
-
id: c.value,
|
|
44
|
-
text: utils.getLocalizedValue(c.editlabel || c.label, context.view.getLocale()).value || '',
|
|
45
|
-
choice: c,
|
|
46
|
-
})));
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
sel = $select.selectize(settings)[0].selectize;
|
|
51
|
-
|
|
52
|
-
if (disable || getNamedGraphId(binding, context)) {
|
|
53
|
-
sel.disable();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
context.clear = () => {
|
|
57
|
-
sel.clear();
|
|
58
|
-
};
|
|
59
|
-
context.setValue = (choice) => {
|
|
60
|
-
$select.toggleClass('mismatch', choice.mismatch === true);
|
|
61
|
-
const label = utils.getLocalizedValue(choice.editlabel || choice.label, context.view.getLocale()).value || '';
|
|
62
|
-
const op = sel.options[choice.value];
|
|
63
|
-
if (!op) {
|
|
64
|
-
sel.addOption({ id: choice.value, text: label, choice });
|
|
65
|
-
}
|
|
66
|
-
sel.addItem(choice.value, true);
|
|
67
|
-
// $select.val(choice.value).trigger('change');
|
|
68
|
-
};
|
|
69
|
-
};
|
package/src/view/bmd/all.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import renderingContext from '../renderingContext';
|
|
2
|
-
// bootstrap + rdforms components + bmd
|
|
3
|
-
import '../bootstrap/components';
|
|
4
|
-
import 'arrive';
|
|
5
|
-
import 'bootstrap-material-design';
|
|
6
|
-
import 'bootstrap-material-datetimepicker';
|
|
7
|
-
|
|
8
|
-
import './DateTimeMD';
|
|
9
|
-
import './Selectize';
|
|
10
|
-
|
|
11
|
-
import 'bootstrap-material-design/dist/css/bootstrap-material-design.css';
|
|
12
|
-
import 'bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker.css';
|
|
13
|
-
import 'selectize-bootstrap4-theme/dist/css/selectize.bootstrap4.css';
|
|
14
|
-
import 'bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker.css';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// TODO revisit the below strategy. Perhaps use arrive.js as suggested by bmd
|
|
18
|
-
// https://github.com/FezVrasta/bootstrap-material-design/tree/v3#arrivejs-support
|
|
19
|
-
// updateMaterial called only by postEditorRender
|
|
20
|
-
const updateMaterial = (node) => {
|
|
21
|
-
jquery('body').bootstrapMaterialDesign();
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
renderingContext.postEditorRenderer = function (fieldDiv, binding, context) {
|
|
25
|
-
context.$controlDiv.appendTo(fieldDiv);
|
|
26
|
-
updateMaterial(fieldDiv);
|
|
27
|
-
};
|
package/src/view/bmd/style.css
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
@import '../bootstrap/style.css';
|
|
2
|
-
@import './Selectize.css';
|
|
3
|
-
|
|
4
|
-
.rdforms .form-group {
|
|
5
|
-
display: inline;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.rdforms select.rdformsLanguage {
|
|
9
|
-
display: inline;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.rdforms.rdformsEditor .rdformsFieldControl {
|
|
13
|
-
height: auto;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.rdforms .cardinality .btn {
|
|
17
|
-
background-color: #333;
|
|
18
|
-
color: #fff !important;
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.rdforms .cardinality .btn:hover {
|
|
23
|
-
background-color: #626262 !important;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.rdforms .cardinality .btn.active {
|
|
27
|
-
background-color: #00a946;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.rdforms .cardinality .btn.active:hover {
|
|
31
|
-
background-color: #00b85c !important;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.popover a {
|
|
35
|
-
color: #333;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.popover .popover-title {
|
|
39
|
-
color: black;
|
|
40
|
-
font-weight: bold;
|
|
41
|
-
border-radius: 0px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.rdformsDatepicker input {
|
|
45
|
-
display: inline-block;
|
|
46
|
-
width: 12em;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.rdforms .selectize-dropdown-content > .option {
|
|
50
|
-
min-height: 42px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.rdforms .form-group.selectizeException {
|
|
54
|
-
display: inline-block;
|
|
55
|
-
min-width: 300px;
|
|
56
|
-
margin: 0;
|
|
57
|
-
padding-top: 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.rdforms .browseChoices.btn.bmd-btn-fab{
|
|
61
|
-
margin-top: -5px;
|
|
62
|
-
margin-left: 13px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.selectize-control.single .selectize-dropdown .active, .selectize-control.multi .selectize-dropdown .active {
|
|
66
|
-
background-color: #EEEEEE !important;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.selectize-control.single .selectize-dropdown .selected {
|
|
70
|
-
background-color: inherit;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.selectize-control.single .selectize-input input,
|
|
74
|
-
.selectize-control.single .selectize-input {
|
|
75
|
-
font-size: 16px !important;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.selectize-input {
|
|
79
|
-
cursor: pointer;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.rdformsEditor .rdformsFieldControl:not(.rdformsLangFieldControl) {
|
|
83
|
-
width: auto !important;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.rdforms .selectize-dropdown-content {
|
|
87
|
-
max-height: 200px;
|
|
88
|
-
overflow-x: hidden;
|
|
89
|
-
overflow-y: auto;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.selectize-control.single .selectize-dropdown {
|
|
93
|
-
z-index:1001 !important;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.rdforms .rdformsDateValue .dateInput {
|
|
97
|
-
width: 5.7em;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.rdforms .rdformsDateValue .yearInput,
|
|
101
|
-
.rdforms .rdformsDateValue .timeInput {
|
|
102
|
-
width: 3em;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.rdforms .rdformsDateValue .dateControl {
|
|
106
|
-
margin-right: 3px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.rdforms .rdformsDateValue>.form-group {
|
|
110
|
-
margin-right: 2em;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.rdformsEditor .cardgroupEditor>.rdformsFields>.rdformsGroup,
|
|
114
|
-
.cardgroup>.rdformsFields>.rdformsGroup,
|
|
115
|
-
.rdformsCard>.rdformsFields>.rdformsGroup {
|
|
116
|
-
border-radius: 2px;
|
|
117
|
-
color: rgba(0,0,0, 0.87);
|
|
118
|
-
background: #fff;
|
|
119
|
-
padding: 7px 10px 10px 10px;
|
|
120
|
-
margin-top: 10px;
|
|
121
|
-
margin-right: -10px;
|
|
122
|
-
box-shadow: 0px 3px 6px -1px rgba(0,0,0,0.3);
|
|
123
|
-
}
|
|
124
|
-
.rdformsLangFieldControl .fa-times{
|
|
125
|
-
position: absolute;
|
|
126
|
-
right: 0;
|
|
127
|
-
top: 1.1em;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
.selectize-control.single .selectize-input:after,
|
|
134
|
-
.selectize-control.single .selectize-input.input-active:after {
|
|
135
|
-
cursor: pointer;
|
|
136
|
-
font-weight: 900;
|
|
137
|
-
font-family: 'Font Awesome\ 5 Free';
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.rdforms.rdformsEditor .rdformsLangFieldControl>.action {
|
|
141
|
-
margin-top: 10px;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.rdformsActionButton:focus {
|
|
145
|
-
color: #009688;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.rdforms .rdformsLabelRow>.rdformsActionButton.action {
|
|
149
|
-
margin-top: -5px;
|
|
150
|
-
}
|