dbm 1.2.8 → 1.3.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/css/admin.css ADDED
@@ -0,0 +1,99 @@
1
+ .dbm-admin {
2
+ background-color: #f6f7f9;
3
+ }
4
+
5
+ .dbm-admin-box {
6
+ box-sizing: border-box;
7
+ border-radius: 15px;
8
+ background-color: #FFFFFF;
9
+ box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
10
+ }
11
+
12
+ .dbm-admin-box-padding {
13
+ padding: 20px;
14
+ }
15
+
16
+ .dbm-admin-hero {
17
+ background: rgb(41,56,97);
18
+ background: linear-gradient(117deg, #4b4795 0%, #608be1 100%);
19
+ }
20
+
21
+ .dbm-admin-hero .on-hero-text {
22
+ color: #FFFFFF;
23
+ }
24
+
25
+ .dbm-admin-hero-overlap {
26
+ position: relative;
27
+ top: -40px;
28
+ }
29
+
30
+ .page-title-form-field {
31
+ font-weight: 700;
32
+ font-size: 24px;
33
+ }
34
+
35
+ .dbm-admin-logo {
36
+ height: 24px;
37
+ width: auto;
38
+ }
39
+
40
+ .ce-block__content,
41
+ .ce-toolbar__content {
42
+ max-width: none;
43
+ }
44
+
45
+ .editor-block-box {
46
+ border: 1px solid #1A1A1A;
47
+ border-radius: 5px;
48
+ box-sizing: border-box;
49
+ }
50
+ .editor-block-box-padding {
51
+ padding: 20px;
52
+ }
53
+
54
+ .image.editor-preview {
55
+ width: 120px;
56
+ height: 120px;
57
+ }
58
+
59
+ .dbm-admin .save-all-position {
60
+ position: fixed;
61
+ bottom: 10px;
62
+ right: 10px;
63
+ }
64
+
65
+ .image-library-preview {
66
+ width: 120px;
67
+ height: 120px;
68
+ }
69
+
70
+ .image-library-margins {
71
+ margin-right: 5px;
72
+ margin-bottom: 5px;
73
+ }
74
+
75
+ .action-button {
76
+ border: 1px solid #ADADAD;
77
+ color: #ADADAD;
78
+ font-size: 10px;
79
+ border-radius: 9999px;
80
+ cursor: pointer;
81
+ }
82
+
83
+ .action-button:hover {
84
+ background-color: #ADADAD;
85
+ color: #FFFFFF;
86
+ }
87
+
88
+ .action-button-padding {
89
+ padding: 3px 10px;
90
+ }
91
+
92
+ .language-circle {
93
+ width: 28px;
94
+ height: 28px;
95
+ border-radius: 9999px;
96
+ background-color: #ADADAD;
97
+ font-size: 10px;
98
+ font-weight: bold;
99
+ }
package/css/all.css ADDED
@@ -0,0 +1,8 @@
1
+ @import './variables.css';
2
+ @import './utils.css';
3
+ @import './ratio.css';
4
+ @import './admin.css';
5
+ @import './rows.css';
6
+ @import './icons.css';
7
+ @import './tags.css';
8
+ @import './elements.css';
@@ -0,0 +1,27 @@
1
+ .popover-holder {
2
+ border: none;
3
+ padding: 0;
4
+ margin: 0;
5
+ overflow: visible;
6
+ background-color: transparent;
7
+ color: inherit;
8
+ }
9
+
10
+ .dropdown-menu-min-width {
11
+ min-width: 300px;
12
+ }
13
+
14
+ .dropdown-menu-max-height {
15
+ max-height: 400px;
16
+ overflow: auto;
17
+ }
18
+
19
+ .standard-dropdown {
20
+ border: 1px solid #000000;
21
+ background-color: #FFFFFF;
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ .standard-dropdown-row-padding {
26
+ padding: 8px 15px;
27
+ }
package/css/icons.css ADDED
@@ -0,0 +1,35 @@
1
+ .standard-icon {
2
+ width: var(--standard-icon-size, 24px);
3
+ height: var(--standard-icon-size, 24px);
4
+ }
5
+
6
+ .text-row-icon {
7
+ width: var(--standard-icon-size, 24px);
8
+ height: var(--standard-icon-size, 24px);
9
+ }
10
+
11
+ .standard-icon-color {
12
+ filter: url("#standard-icon-color");
13
+ }
14
+
15
+ .action-icon-color {
16
+ filter: url("#action-icon-color");
17
+ }
18
+
19
+ .text-icon-color {
20
+ filter: url("#text-icon-color");
21
+ }
22
+
23
+ .white-icon-color {
24
+ filter: url("#white-icon-color");
25
+ }
26
+
27
+ .hover-item:hover .remove-action-icon-color,
28
+ .hover-icon.remove-action-icon-color:hover {
29
+ filter: url("#remove-action-icon-hover-color");
30
+ }
31
+
32
+ .drag-handle-icon {
33
+ width: 8px;
34
+ height: 12px;
35
+ }
package/css/ratio.css ADDED
@@ -0,0 +1,11 @@
1
+ .ratio-1-1 {
2
+ aspect-ratio: 1;
3
+ }
4
+
5
+ .ratio-4-3 {
6
+ aspect-ratio: 1.33;
7
+ }
8
+
9
+ .ratio-16-9 {
10
+ aspect-ratio: 1.78;
11
+ }
package/css/rows.css ADDED
@@ -0,0 +1,28 @@
1
+ .standard-alternating-rows > .standard-row:nth-of-type(2n+1),
2
+ .standard-alternating-rows > *:nth-of-type(2n+1) .standard-row {
3
+ background-color: var(--alternating-rows-background, #F8F8F8);
4
+ }
5
+
6
+ .standard-row-padding {
7
+ padding: var(--standard-row-vertical-padding, 4px) var(--standard-row-horizonal-padding, 10px);
8
+ }
9
+
10
+ .standard-row-padding-horizontal-padding {
11
+ padding-left: var(--standard-row-horizonal-padding, 10px);
12
+ padding-right: var(--standard-row-horizonal-padding, 10px);
13
+ }
14
+
15
+ .standard-row-padding-vertival-padding {
16
+ padding-top: var(--standard-row-vertical-padding, 4px);
17
+ padding-bottom: var(--standard-row-vertical-padding, 4px);
18
+ }
19
+
20
+ .hierarchy-indent {
21
+ margin-left: var(--hierarchy-indent-margin-left, 40px);
22
+ }
23
+
24
+ .append-drop-position {
25
+ height: 12px;
26
+ border: 1px dashed rgba(0, 0, 0, 0.1);
27
+ border-radius: 4px;
28
+ }
package/css/tags.css ADDED
@@ -0,0 +1,114 @@
1
+ .standard-tag {
2
+ border-radius: var(--standard-tag-border-radius, 9999px);
3
+
4
+ border-style: solid;
5
+ border-width: var(--standard-tag-border-width, 1px);
6
+ }
7
+
8
+ .standard-tag,
9
+ .complex-standard-tag {
10
+ font-size: var(--standard-tag-font-size, 14px);
11
+ line-height: 1;
12
+ }
13
+
14
+ .complex-standard-tag.info-tag .standard-tag-part,
15
+ .standard-tag.info-tag {
16
+ background-color: #f1f4f9;
17
+ border-color: #d2dcec;
18
+ }
19
+
20
+ .complex-standard-tag.add-tag .standard-tag-part,
21
+ .standard-tag.add-tag {
22
+ background-color: #FFFFFF;
23
+ border-color: #ADADAD;
24
+ border-style: dashed;
25
+ }
26
+
27
+ .standard-tag-part {
28
+ border-top-style: solid;
29
+ border-top-width: var(--standard-tag-border-width, 1px);
30
+ border-bottom-style: solid;
31
+ border-bottom-width: var(--standard-tag-border-width, 1px);
32
+ }
33
+
34
+ .standard-tag-part.start {
35
+ border-top-left-radius: var(--standard-tag-border-radius, 9999px);
36
+ border-bottom-left-radius: var(--standard-tag-border-radius, 9999px);
37
+
38
+ border-left-style: solid;
39
+ border-left-width: var(--standard-tag-border-width, 1px);
40
+ }
41
+
42
+ .standard-tag-part.end {
43
+ border-top-right-radius: var(--standard-tag-border-radius, 9999px);
44
+ border-bottom-right-radius: var(--standard-tag-border-radius, 9999px);
45
+
46
+ border-right-style: solid;
47
+ border-right-width: var(--standard-tag-border-width, 1px);
48
+ }
49
+
50
+ .standard-tag-padding {
51
+ padding: var(--standard-tag-vertical-padding, 5px) var(--standard-tag-horizontal-padding, 12px);
52
+ }
53
+
54
+ .standard-tag-start-padding {
55
+ padding-left: var(--standard-tag-horizontal-padding, 12px);
56
+ padding-top: var(--standard-tag-vertical-padding, 5px);
57
+ padding-bottom: var(--standard-tag-vertical-padding, 5px);
58
+ }
59
+
60
+ .standard-tag-end-padding {
61
+ padding-right: var(--standard-tag-horizontal-padding, 12px);
62
+ padding-top: var(--standard-tag-vertical-padding, 5px);
63
+ padding-bottom: var(--standard-tag-vertical-padding, 5px);
64
+ }
65
+
66
+ .standard-tag-horizontal-padding {
67
+ padding-left: var(--standard-tag-horizontal-padding, 12px);
68
+ padding-right: var(--standard-tag-horizontal-padding, 12px);
69
+ }
70
+
71
+ .standard-tag-vertical-padding {
72
+ padding-top: var(--standard-tag-vertical-padding, 5px);
73
+ padding-bottom: var(--standard-tag-vertical-padding, 5px);
74
+ }
75
+
76
+ .standard-tag-part-padding {
77
+ padding-left: var(--standard-tag-part-horizontal-padding, 6px);
78
+ padding-right: var(--standard-tag-part-horizontal-padding, 6px);
79
+ }
80
+
81
+ .standard-tag-part-padding-left {
82
+ padding-left: var(--standard-tag-part-horizontal-padding, 6px);
83
+ }
84
+
85
+ .standard-tag-part-padding-right {
86
+ padding-right: var(--standard-tag-part-horizontal-padding, 6px);
87
+ }
88
+
89
+ .standard-tag-part-separator {
90
+ width: 1px;
91
+ height: 100%;
92
+ background-color: rgba(255,255,255,0.6);
93
+ }
94
+
95
+ .standard-tag-icon {
96
+ width: 12px;
97
+ aspect-ratio: 1;
98
+ }
99
+
100
+ .standard-tag-list {
101
+
102
+ }
103
+
104
+ .standard-tag-list-expand {
105
+ margin-right: calc(-1 * var(--standard-tag-list-horizontal-margin, 10px));
106
+ margin-bottom: calc(-1 * var(--standard-tag-list-vertical-margin, 5px));
107
+ overflow: hidden;
108
+ }
109
+
110
+ .standard-tag-list .standard-tag-list-item{
111
+ float: left;
112
+ margin-right: var(--standard-tag-list-horizontal-margin, 10px);
113
+ margin-bottom: var(--standard-tag-list-vertical-margin, 5px);
114
+ }
package/css/utils.css ADDED
@@ -0,0 +1,256 @@
1
+ .text-align-center {
2
+ text-align: center;
3
+ }
4
+
5
+ .text-align-left {
6
+ text-align: left;
7
+ }
8
+
9
+ .text-align-right {
10
+ text-align: right;
11
+ }
12
+
13
+ .bold-text {
14
+ font-weight: bold;
15
+ }
16
+
17
+ .paragraph-no-margins-around > p:first-of-type {
18
+ margin-top: 0;
19
+ }
20
+
21
+ .paragraph-no-margins-around > p:last-of-type {
22
+ margin-bottom: 0;
23
+ }
24
+
25
+ .no-margins {
26
+ margin: 0;
27
+ }
28
+
29
+ .flex-row.vertically-center-items {
30
+ align-items: center;
31
+ }
32
+
33
+ .flex-row.vertically-baseline-items {
34
+ align-items: baseline;
35
+ }
36
+
37
+ .flex-row.vertically-end-items,
38
+ .flex-row.vertically-bottom-items {
39
+ align-items: flex-end;
40
+ }
41
+
42
+
43
+ .flex-no-resize {
44
+ flex-grow: 0;
45
+ flex-shrink: 0;
46
+ }
47
+
48
+ .flex-resize {
49
+ flex-grow: 1;
50
+ flex-shrink: 1;
51
+ }
52
+
53
+ .flex-wrap {
54
+ flex-wrap: wrap;
55
+ }
56
+
57
+ .full-size {
58
+ width: 100%;
59
+ height: 100%;
60
+ }
61
+
62
+ .full-width {
63
+ width: 100%;
64
+ }
65
+
66
+ .full-height {
67
+ height: 100%;
68
+ }
69
+
70
+ .absolute-container {
71
+ position: relative;
72
+ }
73
+ .position-relative {
74
+ position: relative;
75
+ }
76
+ .position-absolute {
77
+ position: absolute;
78
+ }
79
+ .absolute-overlay {
80
+ position: absolute;
81
+ left: 0;
82
+ top: 0;
83
+ right: 0;
84
+ bottom: 0;
85
+ }
86
+
87
+ .absolute-for-transform {
88
+ position: absolute;
89
+ left: 0;
90
+ top: 0;
91
+ }
92
+
93
+ .top-left {
94
+ left: 0;
95
+ top: 0;
96
+ }
97
+
98
+ .top-right {
99
+ right: 0;
100
+ top: 0;
101
+ }
102
+
103
+ .bottom-left {
104
+ left: 0;
105
+ bottom: 0;
106
+ }
107
+
108
+ .bottom-right {
109
+ right: 0;
110
+ bottom: 0;
111
+ }
112
+
113
+ .transform-y50-percent-overlap {
114
+ transform: translateY(-50%);
115
+ }
116
+
117
+ .centered-tip-text {
118
+ position: absolute;
119
+ left: 50%;
120
+ transform: translate(-50%, 2px);
121
+ font-size: 10px;
122
+ width: 200px;
123
+ text-align: center;
124
+ }
125
+
126
+ .overflow-hidden {
127
+ overflow: hidden;
128
+ }
129
+
130
+ .flex-row {
131
+ display: flex;
132
+ }
133
+
134
+ .flex-column {
135
+ display: flex;
136
+ flex-direction: column;
137
+ }
138
+
139
+ .flex-row.justify-center {
140
+ justify-content: center;
141
+ }
142
+
143
+ .flex-row.justify-between {
144
+ justify-content: space-between;
145
+ }
146
+
147
+ .cursor-pointer {
148
+ cursor: pointer;
149
+ }
150
+
151
+ .cursor-grab {
152
+ cursor: grab;
153
+ }
154
+
155
+ .display-block {
156
+ display: block;
157
+ }
158
+
159
+ .display-none {
160
+ display: none;
161
+ }
162
+
163
+ .image.background-cover {
164
+ background-position: center center;
165
+ background-repeat: no-repeat;
166
+ background-size: cover;
167
+ }
168
+
169
+ .image.background-contain {
170
+ background-position: center center;
171
+ background-repeat: no-repeat;
172
+ background-size: contain;
173
+ }
174
+
175
+ .image.background-center {
176
+ background-position: center center;
177
+ background-repeat: no-repeat;
178
+ }
179
+
180
+ .image.background-top-left {
181
+ background-position: top left;
182
+ background-repeat: no-repeat;
183
+ }
184
+
185
+ .image.background-center-left {
186
+ background-position: center left;
187
+ background-repeat: no-repeat;
188
+ }
189
+
190
+ .border-box-sizing {
191
+ box-sizing: border-box;
192
+ }
193
+
194
+ @media (prefers-reduced-motion: no-preference) {
195
+ .color-fade {
196
+ transition: color 0.3s ease-out;
197
+ }
198
+ }
199
+
200
+ .no-pointer-events {
201
+ pointer-events: none;
202
+ }
203
+
204
+ .all-pointer-events {
205
+ pointer-events: all;
206
+ }
207
+
208
+ .integrated-field {
209
+ box-sizing: border-box;
210
+ border: none;
211
+ display: block;
212
+ }
213
+
214
+ .centered-cell-holder {
215
+ display: flex;
216
+ justify-content: center;
217
+ align-items: center;
218
+ }
219
+
220
+ button.skip-default {
221
+ appearance: none;
222
+ border: none;
223
+ padding: 0;
224
+ text-align: inherit;
225
+ background: none;
226
+ color: inherit;
227
+ display: block;
228
+ font-size: inherit;
229
+ line-height: inherit;
230
+ font-family: inherit;
231
+ }
232
+
233
+ .no-opacity {
234
+ opacity: 0;
235
+ }
236
+
237
+ .clear-both {
238
+ clear: both;
239
+ }
240
+
241
+ .custom-styled-link {
242
+ color: inherit;
243
+ text-decoration: none;
244
+ }
245
+
246
+ .no-line-height {
247
+ line-height: 1;
248
+ }
249
+
250
+ .object-fit-cover {
251
+ object-fit: cover;
252
+ }
253
+
254
+ .full-rounded {
255
+ border-radius: 9999px;
256
+ }
@@ -0,0 +1,3 @@
1
+ :root {
2
+
3
+ }
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "dbm",
3
- "version": "1.2.8",
3
+ "version": "1.3.0",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./css/all.css": "./css/all.css"
9
+ },
6
10
  "scripts": {},
7
11
  "keywords": [],
8
12
  "author": "",
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import Dbm from "../../../../index.js";
3
+
4
+ export default class FormattedField extends Dbm.react.BaseObject {
5
+ _construct() {
6
+ super._construct();
7
+ }
8
+
9
+ _renderMainElement() {
10
+
11
+ let label = this.getPropValue("label");
12
+ let fieldName = this.getPropValue("fieldName");
13
+
14
+ return React.createElement("div", {},
15
+ React.createElement(Dbm.react.form.LabelledArea, {label: label}),
16
+ React.createElement(Dbm.react.admin.editorsgroup.EditField, {"fieldName": fieldName},
17
+ React.createElement(Dbm.react.thirdparty.tinymce.InlineEditor, {value: Dbm.react.source.contextVariable("valueEditor.editValue.value"), className: "standard-field standard-field-padding full-width"})
18
+ )
19
+ )
20
+ }
21
+ }
@@ -0,0 +1,38 @@
1
+ import React from "react";
2
+ import Dbm from "../../../../index.js";
3
+
4
+ export default class FormattedFieldWithTranslations extends Dbm.react.BaseObject {
5
+ _construct() {
6
+ super._construct();
7
+ }
8
+
9
+ _renderMainElement() {
10
+
11
+ let label = this.getPropValue("label");
12
+ let fieldName = this.getPropValue("fieldName");
13
+
14
+ let fieldNameSource = Dbm.react.source.contextVariable("fieldName");
15
+ let editorValueSource = Dbm.react.source.contextVariable("valueEditor.editValue.value");
16
+
17
+ return React.createElement("div", {},
18
+ React.createElement("label", {className: "standard-field-label"}, label),
19
+ React.createElement(Dbm.react.context.AddContextVariables, {values: {"fieldName": fieldName}},
20
+ React.createElement(Dbm.react.admin.editorsgroup.EditField, {"fieldName": fieldNameSource},
21
+ React.createElement(Dbm.react.thirdparty.tinymce.InlineEditor, {value: editorValueSource, className: "standard-field standard-field-padding full-width"})
22
+ ),
23
+ React.createElement(Dbm.react.area.List, {items: Dbm.getRepositoryItem("site").properties.availableLanguages, as: "language"},
24
+ React.createElement("div", {className: "flex-row small-item-spacing vertically-center-items"},
25
+ React.createElement("div", {className: "flex-row-item flex-no-resize"},
26
+ Dbm.react.text.text(Dbm.react.source.contextVariable("language.code"))
27
+ ),
28
+ React.createElement("div", {className: "flex-row-item flex-resize"},
29
+ React.createElement(Dbm.react.admin.editorsgroup.EditFieldTranslation, {"fieldName": fieldNameSource, "language": Dbm.react.source.contextVariable("language.code")},
30
+ React.createElement(Dbm.react.thirdparty.tinymce.InlineEditor, {value: editorValueSource, className: "standard-field standard-field-padding full-width"})
31
+ ),
32
+ )
33
+ )
34
+ )
35
+ )
36
+ )
37
+ }
38
+ }