native-document 1.0.131 → 1.0.133
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.
|
@@ -5454,78 +5454,6 @@ var NativeComponents = (function (exports) {
|
|
|
5454
5454
|
return this.badgePosition('bottom-trailing');
|
|
5455
5455
|
};
|
|
5456
5456
|
|
|
5457
|
-
/**
|
|
5458
|
-
* Mixin for managing a collection of items with manipulation methods
|
|
5459
|
-
* @class
|
|
5460
|
-
*/
|
|
5461
|
-
function HasItems() {}
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
HasItems.prototype.trailing = () => {};
|
|
5465
|
-
|
|
5466
|
-
/**
|
|
5467
|
-
* Sets a dynamic observable array to store items
|
|
5468
|
-
* @param {ObservableArray?} [observableArray=null] - Observable array to use, or creates a new one if null
|
|
5469
|
-
* @returns {HasItems}
|
|
5470
|
-
*/
|
|
5471
|
-
HasItems.prototype.dynamic = function(observableArray = null) {
|
|
5472
|
-
this.$description.items = observableArray || $$1.array([]);
|
|
5473
|
-
return this;
|
|
5474
|
-
};
|
|
5475
|
-
|
|
5476
|
-
/**
|
|
5477
|
-
* Replaces all existing items with a new array of items
|
|
5478
|
-
* @param {Array} items - Array of new items
|
|
5479
|
-
* @returns {HasItems}
|
|
5480
|
-
*/
|
|
5481
|
-
HasItems.prototype.items = function(items) {
|
|
5482
|
-
this.$description.items.splice(0, this.$description.items.length, ...items);
|
|
5483
|
-
return this;
|
|
5484
|
-
};
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
/**
|
|
5488
|
-
* Clears all items from the collection
|
|
5489
|
-
* @returns {HasItems}
|
|
5490
|
-
*/
|
|
5491
|
-
HasItems.prototype.clear = function() {
|
|
5492
|
-
const items = this.$description.items;
|
|
5493
|
-
if(Array.isArray(items)) {
|
|
5494
|
-
items.splice(0, items.length);
|
|
5495
|
-
return this;
|
|
5496
|
-
}
|
|
5497
|
-
items.clear();
|
|
5498
|
-
return this;
|
|
5499
|
-
};
|
|
5500
|
-
|
|
5501
|
-
/**
|
|
5502
|
-
* Removes a specific item from the collection
|
|
5503
|
-
* @param {*} item - The item to remove
|
|
5504
|
-
* @returns {HasItems}
|
|
5505
|
-
*/
|
|
5506
|
-
HasItems.prototype.removeItem = function(item) {
|
|
5507
|
-
const items = this.$description.items;
|
|
5508
|
-
if(Array.isArray(items)) {
|
|
5509
|
-
const index = items.indexOf(item);
|
|
5510
|
-
if(index > -1) {
|
|
5511
|
-
items.splice(index, 1);
|
|
5512
|
-
return this;
|
|
5513
|
-
}
|
|
5514
|
-
}
|
|
5515
|
-
items.removeItem(item);
|
|
5516
|
-
return this;
|
|
5517
|
-
};
|
|
5518
|
-
|
|
5519
|
-
/**
|
|
5520
|
-
* Sets the render function for items
|
|
5521
|
-
* @param {(element: *) => ValidChildren} renderFn - Render function to apply
|
|
5522
|
-
* @returns {HasItems}
|
|
5523
|
-
*/
|
|
5524
|
-
HasItems.prototype.render = function(renderFn) {
|
|
5525
|
-
this.$description.render = renderFn;
|
|
5526
|
-
return this;
|
|
5527
|
-
};
|
|
5528
|
-
|
|
5529
5457
|
function AvatarGroup(props = {}) {
|
|
5530
5458
|
if(!(this instanceof AvatarGroup)) {
|
|
5531
5459
|
return new AvatarGroup(props);
|
|
@@ -5539,7 +5467,7 @@ var NativeComponents = (function (exports) {
|
|
|
5539
5467
|
};
|
|
5540
5468
|
|
|
5541
5469
|
}
|
|
5542
|
-
BaseComponent.
|
|
5470
|
+
BaseComponent.extends(AvatarGroup);
|
|
5543
5471
|
|
|
5544
5472
|
AvatarGroup.prototype.items = function() {
|
|
5545
5473
|
this.$description.items = Array.from(arguments);
|
|
@@ -5857,6 +5785,78 @@ var NativeComponents = (function (exports) {
|
|
|
5857
5785
|
return this;
|
|
5858
5786
|
};
|
|
5859
5787
|
|
|
5788
|
+
/**
|
|
5789
|
+
* Mixin for managing a collection of items with manipulation methods
|
|
5790
|
+
* @class
|
|
5791
|
+
*/
|
|
5792
|
+
function HasItems() {}
|
|
5793
|
+
|
|
5794
|
+
|
|
5795
|
+
HasItems.prototype.trailing = () => {};
|
|
5796
|
+
|
|
5797
|
+
/**
|
|
5798
|
+
* Sets a dynamic observable array to store items
|
|
5799
|
+
* @param {ObservableArray?} [observableArray=null] - Observable array to use, or creates a new one if null
|
|
5800
|
+
* @returns {HasItems}
|
|
5801
|
+
*/
|
|
5802
|
+
HasItems.prototype.dynamic = function(observableArray = null) {
|
|
5803
|
+
this.$description.items = observableArray || $$1.array([]);
|
|
5804
|
+
return this;
|
|
5805
|
+
};
|
|
5806
|
+
|
|
5807
|
+
/**
|
|
5808
|
+
* Replaces all existing items with a new array of items
|
|
5809
|
+
* @param {Array} items - Array of new items
|
|
5810
|
+
* @returns {HasItems}
|
|
5811
|
+
*/
|
|
5812
|
+
HasItems.prototype.items = function(items) {
|
|
5813
|
+
this.$description.items.splice(0, this.$description.items.length, ...items);
|
|
5814
|
+
return this;
|
|
5815
|
+
};
|
|
5816
|
+
|
|
5817
|
+
|
|
5818
|
+
/**
|
|
5819
|
+
* Clears all items from the collection
|
|
5820
|
+
* @returns {HasItems}
|
|
5821
|
+
*/
|
|
5822
|
+
HasItems.prototype.clear = function() {
|
|
5823
|
+
const items = this.$description.items;
|
|
5824
|
+
if(Array.isArray(items)) {
|
|
5825
|
+
items.splice(0, items.length);
|
|
5826
|
+
return this;
|
|
5827
|
+
}
|
|
5828
|
+
items.clear();
|
|
5829
|
+
return this;
|
|
5830
|
+
};
|
|
5831
|
+
|
|
5832
|
+
/**
|
|
5833
|
+
* Removes a specific item from the collection
|
|
5834
|
+
* @param {*} item - The item to remove
|
|
5835
|
+
* @returns {HasItems}
|
|
5836
|
+
*/
|
|
5837
|
+
HasItems.prototype.removeItem = function(item) {
|
|
5838
|
+
const items = this.$description.items;
|
|
5839
|
+
if(Array.isArray(items)) {
|
|
5840
|
+
const index = items.indexOf(item);
|
|
5841
|
+
if(index > -1) {
|
|
5842
|
+
items.splice(index, 1);
|
|
5843
|
+
return this;
|
|
5844
|
+
}
|
|
5845
|
+
}
|
|
5846
|
+
items.removeItem(item);
|
|
5847
|
+
return this;
|
|
5848
|
+
};
|
|
5849
|
+
|
|
5850
|
+
/**
|
|
5851
|
+
* Sets the render function for items
|
|
5852
|
+
* @param {(element: *) => ValidChildren} renderFn - Render function to apply
|
|
5853
|
+
* @returns {HasItems}
|
|
5854
|
+
*/
|
|
5855
|
+
HasItems.prototype.render = function(renderFn) {
|
|
5856
|
+
this.$description.render = renderFn;
|
|
5857
|
+
return this;
|
|
5858
|
+
};
|
|
5859
|
+
|
|
5860
5860
|
function MenuDivider(props = {}) {
|
|
5861
5861
|
if(!(this instanceof MenuDivider)) {
|
|
5862
5862
|
return new MenuDivider(props);
|
|
@@ -12396,7 +12396,7 @@ var NativeComponents = (function (exports) {
|
|
|
12396
12396
|
this.$description.orientation = 'vertical';
|
|
12397
12397
|
this.$description.alignment = 'leading';
|
|
12398
12398
|
}
|
|
12399
|
-
|
|
12399
|
+
BaseComponent.extends(VStack);
|
|
12400
12400
|
|
|
12401
12401
|
VStack.preset = function(name, callback) {
|
|
12402
12402
|
if (VStack.prototype[name] || VStack[name]) {
|
|
@@ -12455,7 +12455,7 @@ var NativeComponents = (function (exports) {
|
|
|
12455
12455
|
this.$description.orientation = 'horizontal';
|
|
12456
12456
|
}
|
|
12457
12457
|
|
|
12458
|
-
|
|
12458
|
+
BaseComponent.extends(HStack);
|
|
12459
12459
|
|
|
12460
12460
|
HStack.preset = function(name, callback) {
|
|
12461
12461
|
if (HStack.prototype[name] || HStack[name]) {
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import BaseComponent from "../BaseComponent";
|
|
2
|
-
import HasItems from "../$traits/HasItems";
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
export default function AvatarGroup(props = {}) {
|
|
@@ -16,7 +15,7 @@ export default function AvatarGroup(props = {}) {
|
|
|
16
15
|
|
|
17
16
|
};
|
|
18
17
|
|
|
19
|
-
BaseComponent.
|
|
18
|
+
BaseComponent.extends(AvatarGroup);
|
|
20
19
|
|
|
21
20
|
AvatarGroup.prototype.items = function() {
|
|
22
21
|
this.$description.items = Array.from(arguments);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Stack from "./Stack";
|
|
2
2
|
import DebugManager from "../../core/utils/debug-manager";
|
|
3
|
+
import BaseComponent from "../BaseComponent";
|
|
3
4
|
|
|
4
5
|
export default function HStack(content, props = {}) {
|
|
5
6
|
if (!(this instanceof HStack)) {
|
|
@@ -10,7 +11,7 @@ export default function HStack(content, props = {}) {
|
|
|
10
11
|
this.$description.orientation = 'horizontal';
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
BaseComponent.extends(HStack);
|
|
14
15
|
|
|
15
16
|
HStack.preset = function(name, callback) {
|
|
16
17
|
if (HStack.prototype[name] || HStack[name]) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Stack from "./Stack";
|
|
2
2
|
import DebugManager from "../../core/utils/debug-manager";
|
|
3
|
+
import BaseComponent from "../BaseComponent";
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
export default function VStack(content, props = {}) {
|
|
@@ -9,7 +10,7 @@ export default function VStack(content, props = {}) {
|
|
|
9
10
|
this.$description.orientation = 'vertical';
|
|
10
11
|
this.$description.alignment = 'leading';
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
+
BaseComponent.extends(VStack);
|
|
13
14
|
|
|
14
15
|
VStack.preset = function(name, callback) {
|
|
15
16
|
if (VStack.prototype[name] || VStack[name]) {
|