@bpmn-io/form-js-editor 1.1.0 → 1.3.0-alpha.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.
Files changed (34) hide show
  1. package/LICENSE +22 -22
  2. package/README.md +116 -116
  3. package/dist/assets/dragula.css +1 -1
  4. package/dist/assets/form-js-editor-base.css +797 -758
  5. package/dist/assets/form-js-editor.css +365 -10
  6. package/dist/assets/properties-panel.css +322 -2
  7. package/dist/index.cjs +2901 -1904
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.es.js +2901 -1905
  10. package/dist/index.es.js.map +1 -1
  11. package/dist/types/FormEditor.d.ts +1 -0
  12. package/dist/types/core/index.d.ts +7 -5
  13. package/dist/types/features/dragging/Dragging.d.ts +3 -1
  14. package/dist/types/features/modeling/Modeling.d.ts +4 -0
  15. package/dist/types/features/modeling/behavior/KeyBehavior.d.ts +1 -1
  16. package/dist/types/features/modeling/behavior/PathBehavior.d.ts +8 -0
  17. package/dist/types/features/modeling/behavior/index.d.ts +2 -0
  18. package/dist/types/features/modeling/cmd/MoveFormFieldHandler.d.ts +3 -1
  19. package/dist/types/features/modeling/cmd/UpdateKeyClaimHandler.d.ts +3 -3
  20. package/dist/types/features/modeling/cmd/UpdatePathClaimHandler.d.ts +14 -0
  21. package/dist/types/features/modeling/cmd/Util.d.ts +1 -0
  22. package/dist/types/features/modeling/index.d.ts +1 -0
  23. package/dist/types/features/properties-panel/Util.d.ts +1 -0
  24. package/dist/types/features/properties-panel/entries/GroupEntries.d.ts +10 -0
  25. package/dist/types/features/properties-panel/entries/PathEntry.d.ts +9 -0
  26. package/dist/types/features/properties-panel/entries/index.d.ts +2 -0
  27. package/dist/types/features/properties-panel/groups/{CustomValuesGroup.d.ts → CustomPropertiesGroup.d.ts} +2 -1
  28. package/dist/types/features/properties-panel/groups/index.d.ts +1 -1
  29. package/dist/types/render/components/Util.d.ts +1 -2
  30. package/dist/types/types.d.ts +28 -28
  31. package/package.json +5 -5
  32. package/dist/types/core/FieldFactory.d.ts +0 -18
  33. package/dist/types/import/Importer.d.ts +0 -53
  34. package/dist/types/import/index.d.ts +0 -5
@@ -1,8 +1,4 @@
1
1
  .fjs-editor-container {
2
- --color-children-border: var(
3
- --cds-border-strong,
4
- var(--cds-border-strong-01, var(--color-grey-225-10-75))
5
- );
6
2
  --color-children-selected-border: var(--cds-border-interactive, var(--color-blue-219-100-53));
7
3
  --color-children-selected-background: transparent;
8
4
  --color-children-hover-border: var(--cds-border-interactive, var(--color-blue-219-100-53-05));
@@ -188,6 +184,11 @@
188
184
  display: flex;
189
185
  }
190
186
 
187
+ .fjs-no-json-lint .cm-lint-marker,
188
+ .fjs-no-json-lint .cm-lintPoint-error {
189
+ display: none;
190
+ }
191
+
191
192
  .fjs-editor-container .fjs-form-editor {
192
193
  display: flex;
193
194
  flex: 1;
@@ -218,29 +219,63 @@
218
219
  }
219
220
 
220
221
  .fjs-editor-container .fjs-children .fjs-children {
221
- border: dashed 2px var(--color-children-border);
222
+ margin: 3px 0;
222
223
  }
223
224
 
224
225
  .fjs-editor-container .fjs-children .fjs-element {
225
226
  position: relative;
226
227
  border: solid 2px transparent;
228
+ outline: none;
229
+ }
230
+
231
+ .fjs-editor-container .fjs-form > .fjs-element {
232
+ border: none;
227
233
  }
228
234
 
229
235
  .fjs-editor-container .fjs-form-field:not(.fjs-powered-by) {
230
236
  margin: 1px 6px;
231
237
  }
232
238
 
239
+ .fjs-editor-container .fjs-children .fjs-element.fjs-outlined {
240
+ border-color: var(--color-borders-group);
241
+ }
242
+
233
243
  .fjs-editor-container .fjs-children .fjs-element.fjs-editor-selected {
234
244
  border-color: var(--color-children-selected-border) !important;
235
245
  background-color: var(--color-children-selected-background);
236
246
  }
237
247
 
238
- .fjs-editor-container .fjs-children .fjs-element:hover,
239
- .fjs-editor-container .fjs-children .fjs-element:focus-within {
248
+ .fjs-editor-container .fjs-children .fjs-element:hover.fjs-editor-hovered,
249
+ .fjs-editor-container .fjs-children .fjs-element:focus {
240
250
  border-color: var(--color-children-hover-border);
251
+ }
252
+
253
+ .fjs-editor-container .fjs-layout-column:first-child > .fjs-element[data-field-type=group] {
254
+ margin-left: -6px;
255
+ }
256
+
257
+ .fjs-editor-container .fjs-layout-column:last-child > .fjs-element[data-field-type=group] {
258
+ margin-right: -6px;
259
+ }
260
+
261
+ .fjs-editor-container .fjs-form-field-group,
262
+ .fjs-editor-container .fjs-form-field-group .fjs-form-field-group .fjs-form-field-group {
263
+ margin: 1px 6px;
264
+ padding: 0px;
265
+ }
266
+
267
+ .fjs-editor-container .fjs-form-field-group.fjs-outlined {
241
268
  outline: none;
242
269
  }
243
270
 
271
+ .fjs-editor-container .fjs-form-field-group .cds--grid {
272
+ padding: 0 2rem;
273
+ }
274
+
275
+ .fjs-editor-container .fjs-form-field-group > label {
276
+ margin-top: 6px;
277
+ }
278
+
244
279
  .fjs-editor-container .fjs-input:disabled,
245
280
  .fjs-editor-container .fjs-textarea:disabled,
246
281
  .fjs-editor-container .fjs-taglist-input:disabled,
@@ -269,6 +304,10 @@
269
304
  height: 100%;
270
305
  }
271
306
 
307
+ .fjs-cursor-grabbing .fjs-editor-container .fjs-empty-editor {
308
+ display: none;
309
+ }
310
+
272
311
  .fjs-editor-container .fjs-empty-editor .fjs-empty-editor-card {
273
312
  display: flex;
274
313
  flex-direction: column;
@@ -309,12 +348,12 @@
309
348
  }
310
349
 
311
350
  .fjs-editor-container .fjs-row-dragger:hover svg,
312
- .fjs-editor-container .fjs-drag-row-move:hover .fjs-row-dragger svg {
351
+ .fjs-editor-container .fjs-drag-row-move:hover > .fjs-row-dragger svg {
313
352
  visibility: visible;
314
353
  }
315
354
 
316
355
  .fjs-editor-container .fjs-drag-move {
317
- padding-left: 3px;
356
+ padding: 0 3px;
318
357
  }
319
358
 
320
359
  .fjs-editor-container .fjs-field-resize-handle {
@@ -354,7 +393,7 @@
354
393
  display: none;
355
394
  }
356
395
 
357
- .fjs-editor-container .fjs-children .fjs-editor-selected .fjs-field-resize-handle {
396
+ .fjs-editor-container .fjs-children .fjs-editor-selected > .fjs-field-resize-handle {
358
397
  visibility: visible;
359
398
  }
360
399
 
@@ -772,10 +811,14 @@
772
811
  --color-grey-225-10-90: hsl(225, 10%, 90%);
773
812
  --color-grey-225-10-95: hsl(225, 10%, 95%);
774
813
  --color-grey-225-10-97: hsl(225, 10%, 97%);
814
+ --color-grey-0-0-22: hsl(0, 0%, 22%);
775
815
  --color-blue-205-100-35: hsl(205, 100%, 35%);
776
816
  --color-blue-205-100-45: hsl(205, 100%, 45%);
777
817
  --color-blue-205-100-50: hsl(205, 100%, 50%);
818
+ --color-blue-205-100-85: hsl(205, 100%, 85%);
778
819
  --color-blue-205-100-95: hsl(205, 100%, 95%);
820
+ --color-blue-219-99-53: hsl(219, 99%, 53%);
821
+ --color-blue-218-100-74: hsl(218, 100%, 74%);
779
822
  --color-green-150-86-44: hsl(150, 86%, 44%);
780
823
  --color-red-360-100-40: hsl(360, 100%, 40%);
781
824
  --color-red-360-100-45: hsl(360, 100%, 45%);
@@ -809,6 +852,7 @@
809
852
  --arrow-fill-color: var(--color-grey-225-10-35);
810
853
  --arrow-hover-background-color: var(--color-grey-225-10-95);
811
854
  --dot-color: var(--color-grey-225-10-35);
855
+ --dot-color-error: var(--color-red-360-100-45);
812
856
  --list-badge-color: var(--color-white);
813
857
  --list-badge-background-color: var(--color-grey-225-10-35);
814
858
  --input-background-color: var(--color-grey-225-10-97);
@@ -843,7 +887,16 @@
843
887
  --feel-hover-background-color: var(--color-grey-225-10-97);
844
888
  --feel-active-background-color: transparent;
845
889
  --feel-required-color: var(--color-grey-225-10-55);
890
+ --feel-open-popup-color: hsla(0, 0%, 32%, 1);
891
+ --feel-open-popup-background-color: var(--color-white);
892
+ --feel-open-popup-hover-color: hsla(219, 99%, 53%, 1);
846
893
  --feel-indicator-background-color: var(--color-grey-225-10-90);
894
+ --feelers-select-color: var(--color-blue-205-100-85);
895
+ --tooltip-underline-color: var(--color-blue-219-99-53);
896
+ --tooltip-background-color: var(--color-grey-0-0-22);
897
+ --tooltip-link: var(--color-blue-218-100-74);
898
+ --tooltip-code-background-color: var(--color-grey-225-10-97);
899
+ --tooltip-code-border-color: var(--color-grey-225-10-85);
847
900
  --text-size-base: 14px;
848
901
  --text-size-small: 13px;
849
902
  --text-size-smallest: 12px;
@@ -1088,6 +1141,10 @@
1088
1141
  background-color: var(--dot-color);
1089
1142
  }
1090
1143
 
1144
+ .bio-properties-panel-dot--error {
1145
+ --dot-color: var(--dot-color-error);
1146
+ }
1147
+
1091
1148
  /**
1092
1149
  * Lists
1093
1150
  */
@@ -1115,6 +1172,10 @@
1115
1172
  background-color: var(--list-badge-background-color);
1116
1173
  }
1117
1174
 
1175
+ .bio-properties-panel-list-badge--error {
1176
+ --list-badge-background-color: var(--dot-color-error);
1177
+ }
1178
+
1118
1179
  /**
1119
1180
  * Basic entries
1120
1181
  */
@@ -1803,6 +1864,11 @@ textarea.bio-properties-panel-input {
1803
1864
  background-color: transparent;
1804
1865
  }
1805
1866
 
1867
+ /* @Note(pinussilvestrus): mitigate low contrast - https://github.com/bpmn-io/cm-theme/issues/4 */
1868
+ .bio-properties-panel-feelers-editor .cm-content ::selection {
1869
+ background: var(--feelers-select-color, hsl(205, 100%, 85%));
1870
+ }
1871
+
1806
1872
  .bio-properties-panel-feelers-editor .cm-editor.cm-focused {
1807
1873
  background-color: transparent;
1808
1874
  }
@@ -1835,3 +1901,292 @@ textarea.bio-properties-panel-input {
1835
1901
  .bio-properties-panel-feel-toggle-switch .bio-properties-panel-feel-entry:not(.feel-active) .bio-properties-panel-feel-container {
1836
1902
  margin-left: auto;
1837
1903
  }
1904
+
1905
+ .bio-properties-panel-tooltip-wrapper {
1906
+ text-decoration: underline;
1907
+ text-decoration-style: dotted;
1908
+ text-underline-offset: 2px;
1909
+ font: inherit;
1910
+ }
1911
+
1912
+ .bio-properties-panel-tooltip {
1913
+ display: flex;
1914
+ color: var(--color-white, white);
1915
+ position: fixed;
1916
+ z-index: 1000;
1917
+ padding-right: 6px;
1918
+ max-width: 300px;
1919
+ font-size: var(--text-size-small);
1920
+ font-family: var(--font-family);
1921
+ }
1922
+
1923
+ .bio-properties-panel-tooltip-content {
1924
+ background-color: var(--tooltip-background-color);
1925
+ padding: 16px;
1926
+ border-radius: 2px;
1927
+ font-weight: 400;
1928
+ white-space: pre-wrap;
1929
+ }
1930
+
1931
+ .bio-properties-panel-tooltip-content code,
1932
+ .bio-properties-panel-tooltip-content pre {
1933
+ color: var(--description-color);
1934
+ font-family: var(--font-family);
1935
+ font-size: var(--text-size-small);
1936
+ line-height: var(--line-height-condensed);
1937
+ padding: 0 2px;
1938
+ background-color: var(--tooltip-code-background-color);
1939
+ border: 1px solid var(--tooltip-code-border-color);
1940
+ border-radius: 3px;
1941
+ }
1942
+
1943
+ .bio-properties-panel-tooltip p:first-child {
1944
+ margin-top: 0;
1945
+ }
1946
+
1947
+ .bio-properties-panel-tooltip p:last-child {
1948
+ margin-bottom: 0;
1949
+ }
1950
+
1951
+ .bio-properties-panel-tooltip-content a {
1952
+ color: var(--tooltip-link);
1953
+ }
1954
+
1955
+ .bio-properties-panel-tooltip .bio-properties-panel-tooltip-arrow {
1956
+ width: 0;
1957
+ height: 0;
1958
+ border-top: 5px solid transparent;
1959
+ border-bottom: 5px solid transparent;
1960
+ border-left: 5px solid var(--tooltip-background-color);
1961
+ margin-top: 16px;
1962
+ }
1963
+
1964
+ .bio-properties-panel-feelers-editor-container .bio-properties-panel-feelers-editor__open-popup-placeholder,
1965
+ .bio-properties-panel-feel-editor-container .bio-properties-panel-feel-editor__open-popup-placeholder {
1966
+ display: none;
1967
+ justify-content: center;
1968
+ flex-direction: column;
1969
+ color: hsla(0, 0%, 9%, 0.25);
1970
+ padding: 3px 6px 2px;
1971
+ border: 1px solid var(--input-border-color);
1972
+ border-radius: 2px;
1973
+ background-color: var(--input-background-color);
1974
+ font-size: var(--text-size-base);
1975
+ font-family: inherit;
1976
+ width: 100%;
1977
+ min-height: 100%;
1978
+ }
1979
+
1980
+ .bio-properties-panel-feelers-editor-container.popupOpen .bio-properties-panel-input,
1981
+ .bio-properties-panel-feel-editor-container.popupOpen .bio-properties-panel-input {
1982
+ display: none;
1983
+ }
1984
+
1985
+ .bio-properties-panel-feelers-editor-container.popupOpen .bio-properties-panel-feelers-editor__open-popup-placeholder,
1986
+ .bio-properties-panel-feel-editor-container.popupOpen .bio-properties-panel-feel-editor__open-popup-placeholder {
1987
+ display: flex;
1988
+ }
1989
+
1990
+ .bio-properties-panel-popup {
1991
+ --popup-background-color: hsla(0, 0%, 96%, 1);
1992
+ --popup-header-background-color: white;
1993
+ --popup-font-color: hsla(0, 0%, 0%, 1);
1994
+ --popup-title-color: hsla(0, 0%, 0%, 1);
1995
+ --feel-popup-close-background-color: hsla(219, 99%, 53%, 1);
1996
+ --feel-popup-gutters-background-color: hsla(0, 0%, 90%, 1);
1997
+ position: absolute;
1998
+ display: flex;
1999
+ flex: auto;
2000
+ flex-direction: column;
2001
+ font-family: IBM Plex Sans, sans-serif;
2002
+ padding: 0;
2003
+ z-index: 1001;
2004
+ box-shadow: 0px 2px 6px 0px hsla(0, 0%, 0%, 0.3);
2005
+ background-color: var(--popup-background-color);
2006
+ color: var(--popup-font-color);
2007
+ height: auto;
2008
+ width: auto;
2009
+ overflow: hidden;
2010
+ font-size: 14px;
2011
+ }
2012
+
2013
+ .bio-properties-panel-popup h1,
2014
+ .bio-properties-panel-popup h2,
2015
+ .bio-properties-panel-popup h3,
2016
+ .bio-properties-panel-popup h4 {
2017
+ font-weight: 500;
2018
+ font-size: inherit;
2019
+ }
2020
+
2021
+ .bio-properties-panel-popup .bio-properties-panel-popup__header,
2022
+ .bio-properties-panel-popup .bio-properties-panel-popup__body,
2023
+ .bio-properties-panel-popup .bio-properties-panel-popup__footer {
2024
+ padding: 12px;
2025
+ display: flex;
2026
+ }
2027
+
2028
+ .bio-properties-panel-popup .bio-properties-panel-popup__body:not(:first-child) {
2029
+ padding-top: 0;
2030
+ }
2031
+
2032
+ .bio-properties-panel-popup .bio-properties-panel-popup__header {
2033
+ background-color: var(--popup-header-background-color);
2034
+ margin: 0;
2035
+ font-size: 12px;
2036
+ font-weight: 400;
2037
+ line-height: 16px;
2038
+ text-align: left;
2039
+ color: var(--popup-title-color);
2040
+ }
2041
+
2042
+ .bio-properties-panel-popup .bio-properties-panel-popup__header.draggable {
2043
+ cursor: grab;
2044
+ }
2045
+
2046
+ .bio-properties-panel-popup .bio-properties-panel-popup__drag-handle {
2047
+ display: flex;
2048
+ }
2049
+
2050
+ .bio-properties-panel-popup .bio-properties-panel-popup__drag-preview {
2051
+ width: 1px;
2052
+ height: 1px;
2053
+ position: absolute;
2054
+ top: 0;
2055
+ }
2056
+
2057
+ .bio-properties-panel-popup .bio-properties-panel-popup__title {
2058
+ margin-left: 8px;
2059
+ }
2060
+
2061
+ .bio-properties-panel-popup .bio-properties-panel-popup__title::first-letter {
2062
+ text-transform: capitalize;
2063
+ }
2064
+
2065
+ .bio-properties-panel-popup .bio-properties-panel-popup__header svg {
2066
+ margin-left: -4px;
2067
+ }
2068
+
2069
+ .bio-properties-panel-popup .bio-properties-panel-popup__body {
2070
+ font-size: inherit;
2071
+ height: 100%;
2072
+ display: flex;
2073
+ overflow: auto;
2074
+ padding-bottom: 0;
2075
+ }
2076
+
2077
+ .bio-properties-panel-popup .bio-properties-panel-popup__footer {
2078
+ position: absolute;
2079
+ bottom: 0;
2080
+ right: 8px;
2081
+ }
2082
+
2083
+ .bio-properties-panel-feel-popup {
2084
+ min-height: 400px;
2085
+ width: fit-content;
2086
+ }
2087
+
2088
+ .bio-properties-panel-feel-popup .bio-properties-panel-feel-popup__body {
2089
+ display: flex;
2090
+ margin: 0;
2091
+ padding: 0;
2092
+ height: 100%;
2093
+ width: 100%;
2094
+ }
2095
+
2096
+ .bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container {
2097
+ display: flex;
2098
+ min-width: 100%;
2099
+ }
2100
+
2101
+ .bio-properties-panel-feel-popup .bio-properties-panel-feelers-editor-container {
2102
+ width: 100%;
2103
+ display: flex;
2104
+ }
2105
+
2106
+ .bio-properties-panel-feel-popup .bio-properties-panel-feelers-editor-container .bio-properties-panel-feelers-editor {
2107
+ display: flex;
2108
+ }
2109
+
2110
+ .bio-properties-panel-feel-popup .bio-properties-panel-feelers-editor-container .bio-properties-panel-feelers-editor .cm-editor {
2111
+ width: 100%;
2112
+ }
2113
+
2114
+ .bio-properties-panel-feel-popup .bio-properties-panel-input {
2115
+ width: 100%;
2116
+ resize: none;
2117
+ padding: 0;
2118
+ margin-left: -12px;
2119
+ overflow: hidden;
2120
+ overflow-y: auto;
2121
+ }
2122
+
2123
+ .bio-properties-panel-feel-popup .bio-properties-panel-open-feel-popup {
2124
+ display: none !important;
2125
+ }
2126
+
2127
+ .bio-properties-panel-feelers-editor-container .bio-properties-panel-open-feel-popup,
2128
+ .bio-properties-panel-feel-container .bio-properties-panel-open-feel-popup {
2129
+ position: absolute;
2130
+ display: none;
2131
+ right: 0;
2132
+ bottom: -1px;
2133
+ background: none;
2134
+ border: none;
2135
+ color: var(--feel-open-popup-color);
2136
+ cursor: pointer;
2137
+ }
2138
+
2139
+ .bio-properties-panel-open-feel-popup svg {
2140
+ background: var(--feel-open-popup-background-color);
2141
+ }
2142
+
2143
+ .bio-properties-panel-feelers-editor-container:hover .bio-properties-panel-open-feel-popup,
2144
+ .bio-properties-panel-feel-container:hover .bio-properties-panel-open-feel-popup,
2145
+ .bio-properties-panel-feelers-editor-container:focus-within .bio-properties-panel-open-feel-popup,
2146
+ .bio-properties-panel-feel-container:focus-within .bio-properties-panel-open-feel-popup {
2147
+ display: block;
2148
+ }
2149
+
2150
+ .bio-properties-panel-feelers-editor-container .bio-properties-panel-open-feel-popup {
2151
+ bottom: 0;
2152
+ }
2153
+
2154
+ .bio-properties-panel-feelers-editor-container .bio-properties-panel-open-feel-popup:hover,
2155
+ .bio-properties-panel-feel-container .bio-properties-panel-open-feel-popup:hover {
2156
+ color: var(--feel-open-popup-hover-color);
2157
+ }
2158
+
2159
+ .bio-properties-panel-feel-popup .bio-properties-panel-popup__footer .bio-properties-panel-feel-popup__close-btn {
2160
+ background: var(--feel-popup-close-background-color);
2161
+ width: 66px;
2162
+ font-weight: 400;
2163
+ font-size: 14px;
2164
+ font-family: inherit;
2165
+ color: white;
2166
+ border: none;
2167
+ height: 32px;
2168
+ cursor: pointer;
2169
+ }
2170
+
2171
+ .bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container .cm-editor {
2172
+ width: 100%;
2173
+ height: 100%;
2174
+ }
2175
+
2176
+ .bio-properties-panel-feel-popup .bio-properties-panel-feel-editor-container .cm-editor .cm-content {
2177
+ padding-left: 4px;
2178
+ }
2179
+
2180
+ .bio-properties-panel-feel-popup .cm-gutters {
2181
+ background-color: var(--feel-popup-gutters-background-color);
2182
+ border: none;
2183
+ padding: 0;
2184
+ }
2185
+
2186
+ .bio-properties-panel-feel-popup .cm-gutter {
2187
+ min-width: 32px;
2188
+ }
2189
+
2190
+ .bio-properties-panel-feel-popup .cm-gutters .cm-lineNumbers .cm-gutterElement {
2191
+ text-align: center;
2192
+ }