neo.mjs 5.16.4 → 5.17.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.
@@ -0,0 +1,128 @@
1
+ .neo-tree-list {
2
+ &.root-not-collapsible {
3
+ .neo-accordion-style {
4
+ .neo-list-folder.neo-not-collapsible {
5
+ pointer-events: none;
6
+ font-size: 1.2em;
7
+ font-weight: 100;
8
+
9
+ // needs to have double class call
10
+ .neo-list-item-content::before {
11
+ content: unset !important;
12
+ }
13
+ }
14
+ }
15
+ }
16
+
17
+ &.first-parent-not-visible {
18
+ .neo-accordion-style {
19
+ & > li:first-child {
20
+ display: none;
21
+ }
22
+ }
23
+ }
24
+
25
+ .neo-accordion-style {
26
+ .neo-list-item-content::before {
27
+ content: unset;
28
+ }
29
+
30
+ .neo-list-item:focus {
31
+ outline: unset;
32
+ }
33
+
34
+ // remove indentation
35
+ ul {
36
+ padding-left: 0 !important;
37
+ }
38
+
39
+ // base folder
40
+ & > .neo-list-folder {
41
+ & > .neo-list-item-content {
42
+ // folder closed
43
+ &::before {
44
+ content: "\f077" !important;
45
+ position: absolute;
46
+ right: 5px;
47
+ text-align: center;
48
+ }
49
+ }
50
+
51
+ // folder open
52
+ &.neo-folder-open {
53
+ .neo-list-item-content:before {
54
+ content: "\f078" !important;
55
+ }
56
+ }
57
+ }
58
+
59
+
60
+ // sub folder
61
+ ul {
62
+ .neo-list-folder {
63
+ // remove original folder icon
64
+ .neo-list-item-content::before {
65
+ content: unset !important;
66
+ }
67
+
68
+ // folder closed
69
+ &.neo-list-item:before {
70
+ color: var(--list-item-glyph-color);
71
+ display: inline-block;
72
+ font-family: var(--fa-style-family-classic);
73
+ font-weight: 900;
74
+
75
+ background-color: palevioletred;
76
+ content: "\f077" !important;
77
+ margin-right: .5em;
78
+ width: 25px;
79
+ height: 25px;
80
+ text-align: center;
81
+ line-height: 25px;
82
+ }
83
+
84
+ // folder open
85
+ &.neo-folder-open {
86
+ &.neo-list-item:before {
87
+ content: "\f078" !important;
88
+ }
89
+ }
90
+
91
+ }
92
+ }
93
+
94
+ .neo-list-item {
95
+ display: flex;
96
+ flex-direction: row;
97
+ align-items: center;
98
+ margin-right: 0;
99
+ padding-right: 10px;
100
+
101
+ .neo-accordion-item-icon {
102
+ width: 25px;
103
+ height: 25px;
104
+ text-align: center;
105
+ line-height: 25px;
106
+ margin-right: .5em;
107
+ }
108
+
109
+ .neo-list-item-content {
110
+ display: flex;
111
+ flex-direction: column;
112
+ width: 85%;
113
+
114
+ .neo-list-item-content-header {
115
+ font-weight: 700;
116
+ text-overflow: ellipsis;
117
+ overflow: hidden;
118
+ white-space: nowrap;
119
+ width: 100%;
120
+ }
121
+
122
+ .neo-list-item-content-text {
123
+ font-size: 0.8em;
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
@@ -245,12 +245,12 @@ const DefaultConfig = {
245
245
  useVdomWorker: true,
246
246
  /**
247
247
  * buildScripts/injectPackageVersion.mjs will update this value
248
- * @default '5.16.4'
248
+ * @default '5.17.0'
249
249
  * @memberOf! module:Neo
250
250
  * @name config.version
251
251
  * @type String
252
252
  */
253
- version: '5.16.4'
253
+ version: '5.17.0'
254
254
  };
255
255
 
256
256
  Object.assign(DefaultConfig, {
@@ -0,0 +1,73 @@
1
+ import Base from '../component/Base.mjs';
2
+ import NeoArray from '../util/Array.mjs';
3
+
4
+ /**
5
+ * @class Neo.component.StatusBadge
6
+ * @extends Neo.component.Base
7
+ */
8
+ class StatusBadge extends Base {
9
+ /**
10
+ * Valid values for state
11
+ * @member {String[]} states=['error','neutral','success']
12
+ * @protected
13
+ * @static
14
+ */
15
+ static states = ['error', 'neutral', 'success']
16
+
17
+ static config = {
18
+ /**
19
+ * @member {String} className='Neo.component.StatusBadge'
20
+ * @protected
21
+ */
22
+ className: 'Neo.component.StatusBadge',
23
+ /**
24
+ * @member {String} ntype='status-badge'
25
+ * @protected
26
+ */
27
+ ntype: 'status-badge',
28
+ /**
29
+ * @member {String[]} baseCls=['neo-status-badge']
30
+ * @protected
31
+ */
32
+ baseCls: ['neo-status-badge'],
33
+ /**
34
+ * @member {String} state_='neutral'
35
+ */
36
+ state_: 'neutral',
37
+ /**
38
+ * @member {Object} vdom
39
+ */
40
+ vdom:
41
+ {}
42
+ }
43
+
44
+ /**
45
+ * Triggered after the state config got changed
46
+ * @param {String} value
47
+ * @param {String} oldValue
48
+ * @protected
49
+ */
50
+ afterSetState(value, oldValue) {
51
+ let cls = this.cls;
52
+
53
+ NeoArray.remove(cls, 'neo-state-' + oldValue);
54
+ NeoArray.add(cls, 'neo-state-' + value);
55
+
56
+ this.cls = cls
57
+ }
58
+
59
+ /**
60
+ * Triggered before the state config gets changed
61
+ * @param {String} value
62
+ * @param {String} oldValue
63
+ * @returns {String}
64
+ * @protected
65
+ */
66
+ beforeSetState(value, oldValue) {
67
+ return this.beforeSetEnumValue(value, oldValue, 'state')
68
+ }
69
+ }
70
+
71
+ Neo.applyClassConfig(StatusBadge);
72
+
73
+ export default StatusBadge;
package/src/core/Base.mjs CHANGED
@@ -293,6 +293,7 @@ class Base {
293
293
  * Applies all class configs to this instance
294
294
  * @param {Object} config
295
295
  * @param {Boolean} [preventOriginalConfig] True prevents the instance from getting an originalConfig property
296
+ * @protected
296
297
  */
297
298
  initConfig(config, preventOriginalConfig) {
298
299
  let me = this;
@@ -304,6 +305,7 @@ class Base {
304
305
  /**
305
306
  * Does get triggered with a delay to ensure that Neo.workerId & Neo.worker.Manager are defined
306
307
  * Remote method access via promises
308
+ * @protected
307
309
  */
308
310
  initRemote() {
309
311
  let me = this,
@@ -333,6 +335,7 @@ class Base {
333
335
  * @param {Object} config
334
336
  * @param {Boolean} [preventOriginalConfig] True prevents the instance from getting an originalConfig property
335
337
  * @returns {Object} config
338
+ * @protected
336
339
  */
337
340
  mergeConfig(config, preventOriginalConfig) {
338
341
  let me = this,
@@ -413,6 +416,7 @@ class Base {
413
416
  * When using set(), configs without a trailing underscore can already be assigned,
414
417
  * so the hasOwnProperty() check will return true
415
418
  * @param {Boolean} [forceAssign=false]
419
+ * @protected
416
420
  */
417
421
  processConfigs(forceAssign=false) {
418
422
  let me = this,
@@ -439,6 +443,7 @@ class Base {
439
443
  /**
440
444
  * @param {String} className
441
445
  * @param {Object} remote
446
+ * @protected
442
447
  */
443
448
  static sendRemotes(className, remote) {
444
449
  let origin;
@@ -482,6 +487,7 @@ class Base {
482
487
  * so that afterSet(), beforeGet() and beforeSet() methods can get the new values right away
483
488
  * @param {Object} config
484
489
  * @returns {Object}
490
+ * @protected
485
491
  */
486
492
  setFields(config) {
487
493
  let me = this,