@kizmann/nano-ui 1.0.2 → 1.0.3
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/dist/nano-ui.js +2 -2
- package/dist/nano-ui.js.map +1 -1
- package/package.json +5 -4
- package/src/config/src/builder/builder.js +10 -10
- package/src/config/src/builder/prototypes/button/n-button-group.js +3 -3
- package/src/config/src/builder/prototypes/button/n-button.js +8 -8
- package/src/config/src/builder/prototypes/cascader/n-cascader.js +3 -3
- package/src/config/src/builder/prototypes/checkbox/n-checkbox-group.js +3 -3
- package/src/config/src/builder/prototypes/checkbox/n-checkbox.js +3 -3
- package/src/config/src/builder/prototypes/confirm/n-confirm.js +3 -3
- package/src/config/src/builder/prototypes/datepicker/n-datepicker.js +3 -3
- package/src/config/src/builder/prototypes/datetimepicker/n-datetimepicker.js +3 -3
- package/src/config/src/builder/prototypes/durationpicker/n-durationpicker.js +3 -3
- package/src/config/src/builder/prototypes/empty/n-empty.js +3 -3
- package/src/config/src/builder/prototypes/form/n-form-group.js +3 -3
- package/src/config/src/builder/prototypes/form/n-form-item.js +3 -3
- package/src/config/src/builder/prototypes/form/n-form.js +3 -3
- package/src/config/src/builder/prototypes/html/div.js +3 -3
- package/src/config/src/builder/prototypes/html/nano.js +3 -3
- package/src/config/src/builder/prototypes/html/span.js +3 -3
- package/src/config/src/builder/prototypes/info/n-info-column.js +3 -3
- package/src/config/src/builder/prototypes/info/n-info.js +3 -3
- package/src/config/src/builder/prototypes/input/n-input.js +7 -7
- package/src/config/src/builder/prototypes/input-number/n-input-number.js +7 -7
- package/src/config/src/builder/prototypes/loader/n-loader.js +3 -3
- package/src/config/src/builder/prototypes/modal/n-modal.js +3 -3
- package/src/config/src/builder/prototypes/popover/n-popover-group.js +3 -3
- package/src/config/src/builder/prototypes/popover/n-popover-item.js +3 -3
- package/src/config/src/builder/prototypes/popover/n-popover.js +3 -3
- package/src/config/src/builder/prototypes/radio/n-radio-group.js +3 -3
- package/src/config/src/builder/prototypes/radio/n-radio.js +3 -3
- package/src/config/src/builder/prototypes/rating/n-rating.js +3 -3
- package/src/config/src/builder/prototypes/select/n-select.js +3 -3
- package/src/config/src/builder/prototypes/slider/n-slider.js +3 -3
- package/src/config/src/builder/prototypes/switch/n-switch.js +7 -7
- package/src/config/src/builder/prototypes/table/n-table-column.js +3 -3
- package/src/config/src/builder/prototypes/table/n-table.js +3 -3
- package/src/config/src/builder/prototypes/tabs/n-tabs-item.js +3 -3
- package/src/config/src/builder/prototypes/tabs/n-tabs.js +3 -3
- package/src/config/src/builder/prototypes/tags/n-tags-item.js +3 -3
- package/src/config/src/builder/prototypes/tags/n-tags.js +3 -3
- package/src/config/src/builder/prototypes/textarea/n-textarea.js +3 -3
- package/src/config/src/builder/prototypes/timepicker/n-timepicker.js +3 -3
- package/src/config/src/builder/prototypes/transfer/n-transfer.js +3 -3
- package/src/draggable/src/draggrid/draggrid.js +2 -2
- package/src/draggable/src/draggrid-item/draggrid-item.js +1 -1
- package/src/draggable/src/draghandler/draghandler.js +14 -14
- package/src/draggable/src/draglist/draglist.js +2 -2
- package/src/draggable/src/draglist-item/draglist-item.js +1 -1
- package/src/draggable/src/dropzone/dropzone.js +1 -1
- package/src/index.js +13 -13
- package/src/preview/src/preview/preview.js +2 -2
- package/src/preview/src/preview-video/preview-video.js +4 -4
- package/src/virtualscroller/src/virtualscroller/virtualscroller.beta.js +1 -1
- package/types/index.d.ts +44 -0
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NSlider'] = Locale.trans('NSlider');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NSlider'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NSlider']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NSwitch'] = Locale.trans('NSwitch');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NSwitch'] = {
|
6
6
|
childs: true, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NSwitch']['props'] = {
|
10
10
|
modelValue: {
|
11
11
|
for: ['binds', 'props'], type: 'Any'
|
12
12
|
},
|
@@ -17,15 +17,15 @@ global.NanoBuilderIndexies['NSwitch']['props'] = {
|
|
17
17
|
for: ['binds', 'props'], type: 'Any'
|
18
18
|
},
|
19
19
|
onType: {
|
20
|
-
for: ['binds', 'props'], type: 'String', options:
|
20
|
+
for: ['binds', 'props'], type: 'String', options: window.NanoPrototypeTypes
|
21
21
|
},
|
22
22
|
offType: {
|
23
|
-
for: ['binds', 'props'], type: 'String', options:
|
23
|
+
for: ['binds', 'props'], type: 'String', options: window.NanoPrototypeTypes
|
24
24
|
},
|
25
25
|
size: {
|
26
|
-
for: ['binds', 'props'], type: 'String', options:
|
26
|
+
for: ['binds', 'props'], type: 'String', options: window.NanoPrototypeSizes
|
27
27
|
},
|
28
28
|
disabled: {
|
29
|
-
for: ['binds', 'props'], type: 'Boolean', options:
|
29
|
+
for: ['binds', 'props'], type: 'Boolean', options: window.NanoPrototypeBools
|
30
30
|
},
|
31
31
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NTableColumn'] = Locale.trans('NTableColumn');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NTableColumn'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NTableColumn']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NTable'] = Locale.trans('NTable');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NTable'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NTable']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NTabsItem'] = Locale.trans('NTabsItem');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NTabsItem'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NTabsItem']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NTabs'] = Locale.trans('NTabs');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NTabs'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NTabs']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NTagsItem'] = Locale.trans('NTagsItem');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NTagsItem'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NTagsItem']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NTags'] = Locale.trans('NTags');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NTags'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NTags']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NButton'] = Locale.trans('NButton');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NButton'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NButton']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NTimepicker'] = Locale.trans('NTimepicker');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NTimepicker'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NTimepicker']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { Locale } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.NanoBuilderTypes['NTransfer'] = Locale.trans('NTransfer');
|
4
4
|
|
5
|
-
|
5
|
+
window.NanoBuilderIndexies['NTransfer'] = {
|
6
6
|
childs: false, props: {}
|
7
7
|
};
|
8
8
|
|
9
|
-
|
9
|
+
window.NanoBuilderIndexies['NTransfer']['props'] = {
|
10
10
|
//
|
11
11
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { UUID, Num, Arr, Obj, Dom, Any, Event, Locale } from "@kizmann/pico-js";
|
2
2
|
import NDraghandler from "../draghandler/draghandler";
|
3
3
|
|
4
|
-
|
4
|
+
window.DEBUG_NDLIST = false;
|
5
5
|
|
6
6
|
export default {
|
7
7
|
|
@@ -390,7 +390,7 @@ export default {
|
|
390
390
|
{
|
391
391
|
this.virtuals = this.drag.reduce(this.items);
|
392
392
|
|
393
|
-
if (
|
393
|
+
if ( window.DEBUG_NDLIST ) {
|
394
394
|
console.log('Total virtual items mounted: ' + this.virtuals.length);
|
395
395
|
}
|
396
396
|
},
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Arr, Obj, Num, Any, Dom, Event, Locale, UUID } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.dragMods = [];
|
4
4
|
|
5
5
|
class NDragCounter
|
6
6
|
{
|
@@ -38,21 +38,21 @@ class NDragCounter
|
|
38
38
|
|
39
39
|
update()
|
40
40
|
{
|
41
|
-
|
41
|
+
window.dragMods = window.keyMods;
|
42
42
|
|
43
43
|
let classList = [
|
44
44
|
'n-draggable__counter'
|
45
45
|
];
|
46
46
|
|
47
|
-
if ( Arr.has(
|
47
|
+
if ( Arr.has(window.dragMods, 18) ) {
|
48
48
|
classList.push('n-modify--alt');
|
49
49
|
}
|
50
50
|
|
51
|
-
if ( Arr.has(
|
51
|
+
if ( Arr.has(window.dragMods, 17) ) {
|
52
52
|
classList.push('n-modify--ctrl');
|
53
53
|
}
|
54
54
|
|
55
|
-
if ( Arr.has(
|
55
|
+
if ( Arr.has(window.dragMods, 91) ) {
|
56
56
|
classList.push('n-modify--meta');
|
57
57
|
}
|
58
58
|
|
@@ -61,7 +61,7 @@ class NDragCounter
|
|
61
61
|
|
62
62
|
}
|
63
63
|
|
64
|
-
|
64
|
+
window.DragCounter = new NDragCounter;
|
65
65
|
|
66
66
|
class NDragIndicator
|
67
67
|
{
|
@@ -154,8 +154,8 @@ class NDraghandler
|
|
154
154
|
{
|
155
155
|
this.DragIndicator = new NDragIndicator(frame || this.rootNode.$el);
|
156
156
|
|
157
|
-
if (
|
158
|
-
this.bindDragstart.call(this, ...
|
157
|
+
if ( window.DragCache ) {
|
158
|
+
this.bindDragstart.call(this, ...window.DragCache);
|
159
159
|
}
|
160
160
|
|
161
161
|
Dom.find(this.rootNode.$el).on('dragenter', (event) => {
|
@@ -356,7 +356,7 @@ class NDraghandler
|
|
356
356
|
return Arr.find(this.rootNode.virtuals, { [this.rootNode.uniqueProp]: id });
|
357
357
|
});
|
358
358
|
|
359
|
-
|
359
|
+
window.DragCounter.get(event, cache.length);
|
360
360
|
|
361
361
|
Arr.map(cache, (value) => {
|
362
362
|
return { value, item: Obj.get(this.rootNode, value.route) };
|
@@ -365,7 +365,7 @@ class NDraghandler
|
|
365
365
|
Event.fire('NDrag:start', this.rootNode.group,
|
366
366
|
this.dropNodes = cache);
|
367
367
|
|
368
|
-
|
368
|
+
window.DragCache = [
|
369
369
|
this.rootNode.group, this.dropNodes
|
370
370
|
];
|
371
371
|
|
@@ -462,7 +462,7 @@ class NDraghandler
|
|
462
462
|
|
463
463
|
Event.fire('NDrag:end');
|
464
464
|
|
465
|
-
|
465
|
+
window.DragCache = null;
|
466
466
|
}
|
467
467
|
|
468
468
|
onDragdropNode(event, node)
|
@@ -646,15 +646,15 @@ class NDraghandler
|
|
646
646
|
|
647
647
|
let eventName = 'move';
|
648
648
|
|
649
|
-
if ( Arr.has(
|
649
|
+
if ( Arr.has(window.dragMods, 18) ) {
|
650
650
|
eventName = 'moveAlt';
|
651
651
|
}
|
652
652
|
|
653
|
-
if ( Arr.has(
|
653
|
+
if ( Arr.has(window.dragMods, 17) ) {
|
654
654
|
eventName = 'moveCtrl';
|
655
655
|
}
|
656
656
|
|
657
|
-
if ( Arr.has(
|
657
|
+
if ( Arr.has(window.dragMods, 91) ) {
|
658
658
|
eventName = 'moveMeta';
|
659
659
|
}
|
660
660
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { UUID, Num, Arr, Obj, Dom, Any, Event, Locale } from "@kizmann/pico-js";
|
2
2
|
import NDraghandler from "../draghandler/draghandler";
|
3
3
|
|
4
|
-
|
4
|
+
window.DEBUG_NDLIST = false;
|
5
5
|
|
6
6
|
export default {
|
7
7
|
|
@@ -445,7 +445,7 @@ export default {
|
|
445
445
|
{
|
446
446
|
this.virtuals = this.drag.reduce(this.items);
|
447
447
|
|
448
|
-
if (
|
448
|
+
if ( window.DEBUG_NDLIST ) {
|
449
449
|
console.log('Total virtual items mounted: ' + this.virtuals.length);
|
450
450
|
}
|
451
451
|
},
|
package/src/index.js
CHANGED
@@ -31,17 +31,17 @@ export const Settings = {
|
|
31
31
|
notifyPosition: 'bottom-start'
|
32
32
|
};
|
33
33
|
|
34
|
-
export function Install(App, Icons = {}
|
34
|
+
export function Install(App, Icons = {})
|
35
35
|
{
|
36
36
|
/**
|
37
|
-
* @const
|
37
|
+
* @const window.pi
|
38
38
|
*/
|
39
39
|
|
40
|
-
if ( typeof
|
40
|
+
if ( typeof window.pi === 'undefined' ) {
|
41
41
|
return console.error('pico-js is not available.');
|
42
42
|
}
|
43
43
|
|
44
|
-
Obj.each(
|
44
|
+
Obj.each(window.pi, (value, key) => {
|
45
45
|
App.config.globalProperties[key] = value;
|
46
46
|
});
|
47
47
|
|
@@ -52,8 +52,8 @@ export function Install(App, Icons = {}, Styles = {})
|
|
52
52
|
App.config.globalProperties.trans = Locale.trans;
|
53
53
|
App.config.globalProperties.choice = Locale.choice;
|
54
54
|
|
55
|
-
|
56
|
-
|
55
|
+
window.nano.Icons = Obj.assign(Icons, window.nano.Icons);
|
56
|
+
window.nano.Settings = Obj.assign(Settings, window.nano.Settings);
|
57
57
|
|
58
58
|
require('./alert/index').default(App);
|
59
59
|
require('./notification/index').default(App);
|
@@ -103,26 +103,26 @@ export const Nano = {
|
|
103
103
|
Icons: Icons, Settings: Settings, Install: Install
|
104
104
|
};
|
105
105
|
|
106
|
-
|
106
|
+
window.keyMods = [];
|
107
107
|
|
108
108
|
Dom.find(document).on('keydown', (event) => {
|
109
|
-
Arr.add(
|
109
|
+
Arr.add(window.keyMods, event.which);
|
110
110
|
});
|
111
111
|
|
112
112
|
Dom.find(document).on('keyup', (event) => {
|
113
|
-
Arr.remove(
|
113
|
+
Arr.remove(window.keyMods, event.which);
|
114
114
|
});
|
115
115
|
|
116
116
|
Dom.find(document).on('dragstart', (event) => {
|
117
|
-
Arr.add(
|
117
|
+
Arr.add(window.keyMods, event.which);
|
118
118
|
});
|
119
119
|
|
120
120
|
Dom.find(document).on('dragend', (event) => {
|
121
|
-
|
121
|
+
window.keyMods = [];
|
122
122
|
});
|
123
123
|
|
124
|
-
if ( typeof
|
125
|
-
|
124
|
+
if ( typeof window.nano === 'undefined' ) {
|
125
|
+
window.nano = Nano;
|
126
126
|
}
|
127
127
|
|
128
128
|
export default Nano;
|
@@ -129,11 +129,11 @@ export default {
|
|
129
129
|
if ( Arr.has(exts, extension) ) fallback = key;
|
130
130
|
});
|
131
131
|
|
132
|
-
if (
|
132
|
+
if ( window.resolveVimeo(file) ) {
|
133
133
|
fallback = 'video';
|
134
134
|
}
|
135
135
|
|
136
|
-
if (
|
136
|
+
if ( window.resolveYoutube(file) ) {
|
137
137
|
fallback = 'video';
|
138
138
|
}
|
139
139
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Obj, Arr, Str, Any, Dom } from "@kizmann/pico-js";
|
2
2
|
|
3
|
-
|
3
|
+
window.resolveYoutube = function(url, fallback = null) {
|
4
4
|
|
5
5
|
if ( ! Any.isString(url) ) {
|
6
6
|
return fallback;
|
@@ -33,7 +33,7 @@ global.resolveYoutube = function(url, fallback = null) {
|
|
33
33
|
return fallback;
|
34
34
|
}
|
35
35
|
|
36
|
-
|
36
|
+
window.resolveVimeo = function(url, fallback = null) {
|
37
37
|
|
38
38
|
if ( ! Any.isString(url) ) {
|
39
39
|
return fallback;
|
@@ -117,7 +117,7 @@ export default {
|
|
117
117
|
|
118
118
|
resolveYoutube()
|
119
119
|
{
|
120
|
-
let youtube =
|
120
|
+
let youtube = window.resolveYoutube(this.src);
|
121
121
|
|
122
122
|
if ( ! youtube ) {
|
123
123
|
return false;
|
@@ -132,7 +132,7 @@ export default {
|
|
132
132
|
|
133
133
|
resolveVimeo()
|
134
134
|
{
|
135
|
-
let vimeo =
|
135
|
+
let vimeo = window.resolveVimeo(this.src);
|
136
136
|
|
137
137
|
if ( ! vimeo ) {
|
138
138
|
return false;
|
package/types/index.d.ts
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
// types/index.d.ts
|
2
|
+
// import Cookie from "./library/cookie";
|
3
|
+
|
4
|
+
declare interface IconsInterface {
|
5
|
+
handle: string;
|
6
|
+
checked: string;
|
7
|
+
circle: string;
|
8
|
+
intermediate: string;
|
9
|
+
clock: string;
|
10
|
+
calendar: string;
|
11
|
+
times: string;
|
12
|
+
primary: string;
|
13
|
+
success: string;
|
14
|
+
warning: string;
|
15
|
+
danger: string;
|
16
|
+
info: string;
|
17
|
+
angleUp: string;
|
18
|
+
angleRight: string;
|
19
|
+
angleDown: string;
|
20
|
+
angleLeft: string;
|
21
|
+
angleDoubleLeft: string;
|
22
|
+
angleDoubleRight: string;
|
23
|
+
[key: string]: string;
|
24
|
+
}
|
25
|
+
|
26
|
+
export declare module "@kizmann/nano-ui" {
|
27
|
+
|
28
|
+
function Install(App: any, Icons?: Partial<IconsInterface>): void;
|
29
|
+
|
30
|
+
const Icons: typeof IconsInterface;
|
31
|
+
const Settings: typeof SettingsInterface;
|
32
|
+
|
33
|
+
export {
|
34
|
+
Icons,
|
35
|
+
Settings,
|
36
|
+
Install
|
37
|
+
};
|
38
|
+
|
39
|
+
export default {
|
40
|
+
Icons,
|
41
|
+
Settings,
|
42
|
+
Install
|
43
|
+
};
|
44
|
+
}
|