native-document 1.0.137 → 1.0.138
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/native-document.components.min.js +54 -50
- package/package.json +1 -1
- package/src/components/alert/Alert.js +4 -9
- package/src/components/avatar/Avatar.js +2 -2
- package/src/components/avatar/AvatarGroup.js +5 -0
- package/src/components/badge/Badge.js +3 -1
- package/src/components/breadcrumb/BreadCrumb.js +5 -2
- package/src/components/divider/Divider.js +1 -2
- package/src/components/list/ListGroup.js +1 -1
- package/src/components/list/ListItem.js +1 -1
- package/src/components/menu/MenuDivider.js +1 -1
- package/src/components/progress/Progress.js +1 -1
- package/src/components/spacer/Spacer.js +6 -1
- package/src/components/spinner/Spinner.js +1 -1
- package/src/components/splitter/Splitter.js +1 -1
- package/src/components/splitter/SplitterGutter.js +1 -1
- package/src/components/splitter/SplitterPanel.js +1 -1
|
@@ -367,16 +367,16 @@ var NativeComponents = (function (exports) {
|
|
|
367
367
|
// });
|
|
368
368
|
};
|
|
369
369
|
|
|
370
|
-
let DebugManager$
|
|
370
|
+
let DebugManager$1 = {};
|
|
371
371
|
{
|
|
372
|
-
DebugManager$
|
|
372
|
+
DebugManager$1 = {
|
|
373
373
|
log() {},
|
|
374
374
|
warn() {},
|
|
375
375
|
error() {},
|
|
376
376
|
disable() {}
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
var DebugManager$
|
|
379
|
+
var DebugManager$2 = DebugManager$1;
|
|
380
380
|
|
|
381
381
|
class NativeDocumentError extends Error {
|
|
382
382
|
constructor(message, context = {}) {
|
|
@@ -867,17 +867,17 @@ var NativeComponents = (function (exports) {
|
|
|
867
867
|
const method = methods[name];
|
|
868
868
|
|
|
869
869
|
if (typeof method !== 'function') {
|
|
870
|
-
DebugManager$
|
|
870
|
+
DebugManager$2.warn('NDElement.extend', `"${name}" is not a function, skipping`);
|
|
871
871
|
continue;
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
if (protectedMethods.has(name)) {
|
|
875
|
-
DebugManager$
|
|
875
|
+
DebugManager$2.error('NDElement.extend', `Cannot override protected method "${name}"`);
|
|
876
876
|
throw new NativeDocumentError(`Cannot override protected method "${name}"`);
|
|
877
877
|
}
|
|
878
878
|
|
|
879
879
|
if (NDElement.prototype[name]) {
|
|
880
|
-
DebugManager$
|
|
880
|
+
DebugManager$2.warn('NDElement.extend', `Overwriting existing prototype method "${name}"`);
|
|
881
881
|
}
|
|
882
882
|
|
|
883
883
|
NDElement.prototype[name] = method;
|
|
@@ -1102,7 +1102,7 @@ var NativeComponents = (function (exports) {
|
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
1104
|
if (cleanedCount > 0) {
|
|
1105
|
-
DebugManager$
|
|
1105
|
+
DebugManager$2.log('Memory Auto Clean', `🧹 Cleaned ${cleanedCount} orphaned observables`);
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
1108
|
};
|
|
@@ -3958,7 +3958,7 @@ var NativeComponents = (function (exports) {
|
|
|
3958
3958
|
const $getStoreOrThrow = (method, name) => {
|
|
3959
3959
|
const item = $stores.get(name);
|
|
3960
3960
|
if (!item) {
|
|
3961
|
-
DebugManager$
|
|
3961
|
+
DebugManager$2.error('Store', `Store.${method}('${name}') : store not found. Did you call Store.create('${name}') first?`);
|
|
3962
3962
|
throw new NativeDocumentError(
|
|
3963
3963
|
`Store.${method}('${name}') : store not found.`
|
|
3964
3964
|
);
|
|
@@ -3971,7 +3971,7 @@ var NativeComponents = (function (exports) {
|
|
|
3971
3971
|
*/
|
|
3972
3972
|
const $applyReadOnly = (observer, name, context) => {
|
|
3973
3973
|
const readOnlyError = (method) => () => {
|
|
3974
|
-
DebugManager$
|
|
3974
|
+
DebugManager$2.error('Store', `Store.${context}('${name}') is read-only. '${method}()' is not allowed.`);
|
|
3975
3975
|
throw new NativeDocumentError(
|
|
3976
3976
|
`Store.${context}('${name}') is read-only.`
|
|
3977
3977
|
);
|
|
@@ -4002,7 +4002,7 @@ var NativeComponents = (function (exports) {
|
|
|
4002
4002
|
*/
|
|
4003
4003
|
create(name, value) {
|
|
4004
4004
|
if ($stores.has(name)) {
|
|
4005
|
-
DebugManager$
|
|
4005
|
+
DebugManager$2.warn('Store', `Store.create('${name}') : a store with this name already exists. Use Store.get('${name}') to retrieve it.`);
|
|
4006
4006
|
throw new NativeDocumentError(
|
|
4007
4007
|
`Store.create('${name}') : a store with this name already exists.`
|
|
4008
4008
|
);
|
|
@@ -4023,7 +4023,7 @@ var NativeComponents = (function (exports) {
|
|
|
4023
4023
|
*/
|
|
4024
4024
|
createResettable(name, value) {
|
|
4025
4025
|
if ($stores.has(name)) {
|
|
4026
|
-
DebugManager$
|
|
4026
|
+
DebugManager$2.warn('Store', `Store.createResettable('${name}') : a store with this name already exists.`);
|
|
4027
4027
|
throw new NativeDocumentError(
|
|
4028
4028
|
`Store.createResettable('${name}') : a store with this name already exists.`
|
|
4029
4029
|
);
|
|
@@ -4059,7 +4059,7 @@ var NativeComponents = (function (exports) {
|
|
|
4059
4059
|
*/
|
|
4060
4060
|
createComposed(name, computation, dependencies) {
|
|
4061
4061
|
if ($stores.has(name)) {
|
|
4062
|
-
DebugManager$
|
|
4062
|
+
DebugManager$2.warn('Store', `Store.createComposed('${name}') : a store with this name already exists.`);
|
|
4063
4063
|
throw new NativeDocumentError(
|
|
4064
4064
|
`Store.createComposed('${name}') : a store with this name already exists.`
|
|
4065
4065
|
);
|
|
@@ -4082,7 +4082,7 @@ var NativeComponents = (function (exports) {
|
|
|
4082
4082
|
}
|
|
4083
4083
|
const depItem = $stores.get(depName);
|
|
4084
4084
|
if (!depItem) {
|
|
4085
|
-
DebugManager$
|
|
4085
|
+
DebugManager$2.error('Store', `Store.createComposed('${name}') : dependency '${depName}' not found. Create it first.`);
|
|
4086
4086
|
throw new NativeDocumentError(
|
|
4087
4087
|
`Store.createComposed('${name}') : dependency store '${depName}' not found.`
|
|
4088
4088
|
);
|
|
@@ -4116,13 +4116,13 @@ var NativeComponents = (function (exports) {
|
|
|
4116
4116
|
reset(name) {
|
|
4117
4117
|
const item = $getStoreOrThrow('reset', name);
|
|
4118
4118
|
if (item.composed) {
|
|
4119
|
-
DebugManager$
|
|
4119
|
+
DebugManager$2.error('Store', `Store.reset('${name}') : composed stores cannot be reset. Their value is derived from dependencies.`);
|
|
4120
4120
|
throw new NativeDocumentError(
|
|
4121
4121
|
`Store.reset('${name}') : composed stores cannot be reset.`
|
|
4122
4122
|
);
|
|
4123
4123
|
}
|
|
4124
4124
|
if (!item.resettable) {
|
|
4125
|
-
DebugManager$
|
|
4125
|
+
DebugManager$2.error('Store', `Store.reset('${name}') : this store is not resettable. Use Store.createResettable('${name}', value) instead of Store.create().`);
|
|
4126
4126
|
throw new NativeDocumentError(
|
|
4127
4127
|
`Store.reset('${name}') : this store is not resettable. Use Store.createResettable('${name}', value) instead of Store.create().`
|
|
4128
4128
|
);
|
|
@@ -4143,7 +4143,7 @@ var NativeComponents = (function (exports) {
|
|
|
4143
4143
|
const item = $getStoreOrThrow('use', name);
|
|
4144
4144
|
|
|
4145
4145
|
if (item.composed) {
|
|
4146
|
-
DebugManager$
|
|
4146
|
+
DebugManager$2.error('Store', `Store.use('${name}') : composed stores are read-only. Use Store.follow('${name}') instead.`);
|
|
4147
4147
|
throw new NativeDocumentError(
|
|
4148
4148
|
`Store.use('${name}') : composed stores are read-only. Use Store.follow('${name}') instead.`
|
|
4149
4149
|
);
|
|
@@ -4210,7 +4210,7 @@ var NativeComponents = (function (exports) {
|
|
|
4210
4210
|
get(name) {
|
|
4211
4211
|
const item = $stores.get(name);
|
|
4212
4212
|
if (!item) {
|
|
4213
|
-
DebugManager$
|
|
4213
|
+
DebugManager$2.warn('Store', `Store.get('${name}') : store not found.`);
|
|
4214
4214
|
return null;
|
|
4215
4215
|
}
|
|
4216
4216
|
return item.observer;
|
|
@@ -4232,7 +4232,7 @@ var NativeComponents = (function (exports) {
|
|
|
4232
4232
|
delete(name) {
|
|
4233
4233
|
const item = $stores.get(name);
|
|
4234
4234
|
if (!item) {
|
|
4235
|
-
DebugManager$
|
|
4235
|
+
DebugManager$2.warn('Store', `Store.delete('${name}') : store not found, nothing to delete.`);
|
|
4236
4236
|
return;
|
|
4237
4237
|
}
|
|
4238
4238
|
item.subscribers.forEach(follower => follower.destroy());
|
|
@@ -4334,7 +4334,7 @@ var NativeComponents = (function (exports) {
|
|
|
4334
4334
|
return undefined;
|
|
4335
4335
|
},
|
|
4336
4336
|
set(target, prop, value) {
|
|
4337
|
-
DebugManager$
|
|
4337
|
+
DebugManager$2.error('Store', `Forbidden: You cannot overwrite the store key '${String(prop)}'. Use .use('${String(prop)}').set(value) instead.`);
|
|
4338
4338
|
throw new NativeDocumentError(`Store structure is immutable. Use .set() on the observable.`);
|
|
4339
4339
|
},
|
|
4340
4340
|
deleteProperty(target, prop) {
|
|
@@ -4608,22 +4608,17 @@ var NativeComponents = (function (exports) {
|
|
|
4608
4608
|
}
|
|
4609
4609
|
|
|
4610
4610
|
Alert.defaultTemplate = null;
|
|
4611
|
-
Alert.defaultTitleTemplate = null;
|
|
4612
|
-
Alert.defaultButtonsTemplate = null;
|
|
4613
|
-
Alert.defaultContentTemplate = null;
|
|
4614
4611
|
|
|
4615
4612
|
/**
|
|
4616
4613
|
* Sets the default template for all Alert instances
|
|
4617
|
-
* @param {
|
|
4614
|
+
* @param {ValidChildren} template - Template object containing alert factory function
|
|
4618
4615
|
*/
|
|
4619
4616
|
Alert.use = function(template) {
|
|
4620
|
-
Alert.defaultTemplate = template
|
|
4621
|
-
Alert.defaultTitleTemplate = template.alertTitle;
|
|
4622
|
-
Alert.defaultButtonsTemplate = template.alertButtons;
|
|
4623
|
-
Alert.defaultContentTemplate = template.alertContent;
|
|
4617
|
+
Alert.defaultTemplate = template;
|
|
4624
4618
|
};
|
|
4625
4619
|
|
|
4626
|
-
BaseComponent.extends(Alert
|
|
4620
|
+
BaseComponent.extends(Alert);
|
|
4621
|
+
BaseComponent.use(Alert, HasEventEmitter);
|
|
4627
4622
|
|
|
4628
4623
|
/**
|
|
4629
4624
|
* Sets the variant style for the alert
|
|
@@ -5105,10 +5100,10 @@ var NativeComponents = (function (exports) {
|
|
|
5105
5100
|
|
|
5106
5101
|
/**
|
|
5107
5102
|
* Sets the default template for all Avatar instances
|
|
5108
|
-
* @param {
|
|
5103
|
+
* @param {ValidChildren} template - Template object containing avatar factory function
|
|
5109
5104
|
*/
|
|
5110
5105
|
Avatar.use = function(template) {
|
|
5111
|
-
Avatar.defaultTemplate = template
|
|
5106
|
+
Avatar.defaultTemplate = template;
|
|
5112
5107
|
};
|
|
5113
5108
|
|
|
5114
5109
|
Avatar.preset = function(name, callback) {
|
|
@@ -5476,6 +5471,11 @@ var NativeComponents = (function (exports) {
|
|
|
5476
5471
|
}
|
|
5477
5472
|
BaseComponent.extends(AvatarGroup);
|
|
5478
5473
|
|
|
5474
|
+
AvatarGroup.defaultTemplate = null;
|
|
5475
|
+
AvatarGroup.use = function(template) {
|
|
5476
|
+
AvatarGroup.defaultTemplate = template;
|
|
5477
|
+
};
|
|
5478
|
+
|
|
5479
5479
|
AvatarGroup.prototype.items = function() {
|
|
5480
5480
|
this.$description.items = Array.from(arguments);
|
|
5481
5481
|
return this;
|
|
@@ -5518,11 +5518,13 @@ var NativeComponents = (function (exports) {
|
|
|
5518
5518
|
|
|
5519
5519
|
Badge.defaultTemplate = null;
|
|
5520
5520
|
|
|
5521
|
-
Badge.use = function(template) {
|
|
5521
|
+
Badge.use = function(template) {
|
|
5522
|
+
Badge.defaultTemplate = template;
|
|
5523
|
+
};
|
|
5522
5524
|
|
|
5523
5525
|
Badge.preset = function(name, callback) {
|
|
5524
5526
|
if (Badge.prototype[name] || Badge[name]) {
|
|
5525
|
-
DebugManager$
|
|
5527
|
+
DebugManager$2.warn(`Warning: the ${name} method already exists in Badge.`);
|
|
5526
5528
|
return;
|
|
5527
5529
|
}
|
|
5528
5530
|
Badge[name] = (content, props) => callback(new Badge(content, props));
|
|
@@ -5630,10 +5632,13 @@ var NativeComponents = (function (exports) {
|
|
|
5630
5632
|
};
|
|
5631
5633
|
}
|
|
5632
5634
|
|
|
5633
|
-
BaseComponent.extends(Breadcrumb
|
|
5635
|
+
BaseComponent.extends(Breadcrumb);
|
|
5636
|
+
BaseComponent.use(Breadcrumb, HasEventEmitter);
|
|
5634
5637
|
|
|
5635
|
-
Breadcrumb.use = function(template) {};
|
|
5636
5638
|
Breadcrumb.defaultTemplate = null;
|
|
5639
|
+
Breadcrumb.use = function(template) {
|
|
5640
|
+
Breadcrumb.defaultTemplate = template;
|
|
5641
|
+
};
|
|
5637
5642
|
|
|
5638
5643
|
Breadcrumb.prototype.item = function(label, href) {
|
|
5639
5644
|
this.$description.items.push({ label, href });
|
|
@@ -5880,7 +5885,7 @@ var NativeComponents = (function (exports) {
|
|
|
5880
5885
|
MenuDivider.defaultTemplate = null;
|
|
5881
5886
|
|
|
5882
5887
|
MenuDivider.use = function(template) {
|
|
5883
|
-
MenuDivider.defaultTemplate = template
|
|
5888
|
+
MenuDivider.defaultTemplate = template;
|
|
5884
5889
|
};
|
|
5885
5890
|
|
|
5886
5891
|
function MenuGroup(label, props) {
|
|
@@ -6282,14 +6287,13 @@ var NativeComponents = (function (exports) {
|
|
|
6282
6287
|
BaseComponent.extends(Divider);
|
|
6283
6288
|
|
|
6284
6289
|
Divider.defaultTemplate = null;
|
|
6285
|
-
|
|
6286
6290
|
Divider.use = function(template) {
|
|
6287
|
-
Divider.defaultTemplate = template
|
|
6291
|
+
Divider.defaultTemplate = template;
|
|
6288
6292
|
};
|
|
6289
6293
|
|
|
6290
6294
|
Divider.preset = function(name, callback) {
|
|
6291
6295
|
if (Divider.prototype[name] || Divider[name]) {
|
|
6292
|
-
DebugManager$
|
|
6296
|
+
DebugManager$2.warn(`Warning: the ${name} method already exists in Divider.`);
|
|
6293
6297
|
return;
|
|
6294
6298
|
}
|
|
6295
6299
|
Divider[name] = (label, props) => callback(new Divider(label, props));
|
|
@@ -9460,7 +9464,7 @@ var NativeComponents = (function (exports) {
|
|
|
9460
9464
|
ListItem.defaultTemplate = null;
|
|
9461
9465
|
|
|
9462
9466
|
ListItem.use = function(template) {
|
|
9463
|
-
ListItem.defaultTemplate = template
|
|
9467
|
+
ListItem.defaultTemplate = template;
|
|
9464
9468
|
};
|
|
9465
9469
|
|
|
9466
9470
|
ListItem.prototype.content = function(content) {
|
|
@@ -9560,7 +9564,7 @@ var NativeComponents = (function (exports) {
|
|
|
9560
9564
|
ListGroup.defaultTemplate = null;
|
|
9561
9565
|
|
|
9562
9566
|
ListGroup.use = function(template) {
|
|
9563
|
-
ListGroup.defaultTemplate = template
|
|
9567
|
+
ListGroup.defaultTemplate = template;
|
|
9564
9568
|
};
|
|
9565
9569
|
|
|
9566
9570
|
ListGroup.prototype.header = function(header) {
|
|
@@ -10272,12 +10276,12 @@ var NativeComponents = (function (exports) {
|
|
|
10272
10276
|
Progress.defaultTemplate = null;
|
|
10273
10277
|
|
|
10274
10278
|
Progress.use = function(template) {
|
|
10275
|
-
Progress.defaultTemplate = template
|
|
10279
|
+
Progress.defaultTemplate = template;
|
|
10276
10280
|
};
|
|
10277
10281
|
|
|
10278
10282
|
Progress.preset = function(name, callback) {
|
|
10279
10283
|
if (Progress.prototype[name] || Progress[name]) {
|
|
10280
|
-
DebugManager$
|
|
10284
|
+
DebugManager$2.warn(`Warning: the ${name} method already exists in Progress.`);
|
|
10281
10285
|
return;
|
|
10282
10286
|
}
|
|
10283
10287
|
Progress[name] = (props) => callback(new Progress(props));
|
|
@@ -10509,7 +10513,7 @@ var NativeComponents = (function (exports) {
|
|
|
10509
10513
|
|
|
10510
10514
|
Skeleton.preset = function(name, callback) {
|
|
10511
10515
|
if (Skeleton.prototype[name] || Skeleton[name]) {
|
|
10512
|
-
DebugManager$
|
|
10516
|
+
DebugManager$2.warn(`Warning: the ${name} method already exists in Skeleton.`);
|
|
10513
10517
|
return;
|
|
10514
10518
|
}
|
|
10515
10519
|
Skeleton[name] = (props) => callback(new Skeleton(props));
|
|
@@ -10818,14 +10822,14 @@ var NativeComponents = (function (exports) {
|
|
|
10818
10822
|
|
|
10819
10823
|
Spinner.defaultTemplate = null;
|
|
10820
10824
|
Spinner.use = function(template) {
|
|
10821
|
-
Spinner.defaultTemplate = template
|
|
10825
|
+
Spinner.defaultTemplate = template;
|
|
10822
10826
|
};
|
|
10823
10827
|
|
|
10824
10828
|
BaseComponent.extends(Spinner);
|
|
10825
10829
|
|
|
10826
10830
|
Spinner.preset = function(name, callback) {
|
|
10827
10831
|
if (Spinner.prototype[name] || Spinner[name]) {
|
|
10828
|
-
DebugManager$
|
|
10832
|
+
DebugManager$2.warn(`Warning: the ${name} method already exists in Spinner.`);
|
|
10829
10833
|
return;
|
|
10830
10834
|
}
|
|
10831
10835
|
Spinner[name] = (props) => callback(new Spinner(props));
|
|
@@ -10991,7 +10995,7 @@ var NativeComponents = (function (exports) {
|
|
|
10991
10995
|
Splitter.defaultTemplate = null;
|
|
10992
10996
|
|
|
10993
10997
|
Splitter.use = function(template) {
|
|
10994
|
-
Splitter.defaultTemplate = template
|
|
10998
|
+
Splitter.defaultTemplate = template;
|
|
10995
10999
|
};
|
|
10996
11000
|
|
|
10997
11001
|
Splitter.prototype.dynamic = function(){
|
|
@@ -11090,7 +11094,7 @@ var NativeComponents = (function (exports) {
|
|
|
11090
11094
|
SplitterPanel.defaultTemplate = null;
|
|
11091
11095
|
|
|
11092
11096
|
SplitterPanel.use = function(template) {
|
|
11093
|
-
SplitterPanel.defaultTemplate = template
|
|
11097
|
+
SplitterPanel.defaultTemplate = template;
|
|
11094
11098
|
};
|
|
11095
11099
|
|
|
11096
11100
|
SplitterPanel.prototype.content = function(content) {
|
|
@@ -12423,7 +12427,7 @@ var NativeComponents = (function (exports) {
|
|
|
12423
12427
|
|
|
12424
12428
|
VStack.preset = function(name, callback) {
|
|
12425
12429
|
if (VStack.prototype[name] || VStack[name]) {
|
|
12426
|
-
DebugManager$
|
|
12430
|
+
DebugManager$2.warn(`Warning: the ${name} method already exists in VStack.`);
|
|
12427
12431
|
return;
|
|
12428
12432
|
}
|
|
12429
12433
|
VStack[name] = (content, props) => callback(new VStack(content, props));
|
|
@@ -12457,7 +12461,7 @@ var NativeComponents = (function (exports) {
|
|
|
12457
12461
|
|
|
12458
12462
|
ZStack.preset = function(name, callback) {
|
|
12459
12463
|
if (ZStack.prototype[name] || ZStack[name]) {
|
|
12460
|
-
DebugManager$
|
|
12464
|
+
DebugManager$2.warn(`Warning: the ${name} method already exists in ZStack.`);
|
|
12461
12465
|
return;
|
|
12462
12466
|
}
|
|
12463
12467
|
ZStack[name] = (content, props) => callback(new ZStack(content, props));
|
|
@@ -12492,7 +12496,7 @@ var NativeComponents = (function (exports) {
|
|
|
12492
12496
|
|
|
12493
12497
|
HStack.preset = function(name, callback) {
|
|
12494
12498
|
if (HStack.prototype[name] || HStack[name]) {
|
|
12495
|
-
DebugManager$
|
|
12499
|
+
DebugManager$2.warn(`Warning: the ${name} method already exists in HStack.`);
|
|
12496
12500
|
return;
|
|
12497
12501
|
}
|
|
12498
12502
|
HStack[name] = (content, props) => callback(new HStack(content, props));
|
package/package.json
CHANGED
|
@@ -26,22 +26,17 @@ export default function Alert(message, config = {}) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
Alert.defaultTemplate = null;
|
|
29
|
-
Alert.defaultTitleTemplate = null;
|
|
30
|
-
Alert.defaultButtonsTemplate = null;
|
|
31
|
-
Alert.defaultContentTemplate = null;
|
|
32
29
|
|
|
33
30
|
/**
|
|
34
31
|
* Sets the default template for all Alert instances
|
|
35
|
-
* @param {
|
|
32
|
+
* @param {ValidChildren} template - Template object containing alert factory function
|
|
36
33
|
*/
|
|
37
34
|
Alert.use = function(template) {
|
|
38
|
-
Alert.defaultTemplate = template
|
|
39
|
-
Alert.defaultTitleTemplate = template.alertTitle;
|
|
40
|
-
Alert.defaultButtonsTemplate = template.alertButtons;
|
|
41
|
-
Alert.defaultContentTemplate = template.alertContent;
|
|
35
|
+
Alert.defaultTemplate = template;
|
|
42
36
|
};
|
|
43
37
|
|
|
44
|
-
BaseComponent.extends(Alert
|
|
38
|
+
BaseComponent.extends(Alert);
|
|
39
|
+
BaseComponent.use(Alert, HasEventEmitter);
|
|
45
40
|
|
|
46
41
|
/**
|
|
47
42
|
* Sets the variant style for the alert
|
|
@@ -36,10 +36,10 @@ Avatar.defaultTemplate = null;
|
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Sets the default template for all Avatar instances
|
|
39
|
-
* @param {
|
|
39
|
+
* @param {ValidChildren} template - Template object containing avatar factory function
|
|
40
40
|
*/
|
|
41
41
|
Avatar.use = function(template) {
|
|
42
|
-
Avatar.defaultTemplate = template
|
|
42
|
+
Avatar.defaultTemplate = template;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
Avatar.preset = function(name, callback) {
|
|
@@ -17,6 +17,11 @@ export default function AvatarGroup(props = {}) {
|
|
|
17
17
|
|
|
18
18
|
BaseComponent.extends(AvatarGroup);
|
|
19
19
|
|
|
20
|
+
AvatarGroup.defaultTemplate = null;
|
|
21
|
+
AvatarGroup.use = function(template) {
|
|
22
|
+
AvatarGroup.defaultTemplate = template;
|
|
23
|
+
};
|
|
24
|
+
|
|
20
25
|
AvatarGroup.prototype.items = function() {
|
|
21
26
|
this.$description.items = Array.from(arguments);
|
|
22
27
|
return this;
|
|
@@ -24,7 +24,9 @@ BaseComponent.extends(Badge);
|
|
|
24
24
|
|
|
25
25
|
Badge.defaultTemplate = null;
|
|
26
26
|
|
|
27
|
-
Badge.use = function(template) {
|
|
27
|
+
Badge.use = function(template) {
|
|
28
|
+
Badge.defaultTemplate = template;
|
|
29
|
+
};
|
|
28
30
|
|
|
29
31
|
Badge.preset = function(name, callback) {
|
|
30
32
|
if (Badge.prototype[name] || Badge[name]) {
|
|
@@ -15,10 +15,13 @@ export default function Breadcrumb(config = {}) {
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
BaseComponent.extends(Breadcrumb
|
|
18
|
+
BaseComponent.extends(Breadcrumb);
|
|
19
|
+
BaseComponent.use(Breadcrumb, HasEventEmitter);
|
|
19
20
|
|
|
20
|
-
Breadcrumb.use = function(template) {};
|
|
21
21
|
Breadcrumb.defaultTemplate = null;
|
|
22
|
+
Breadcrumb.use = function(template) {
|
|
23
|
+
Breadcrumb.defaultTemplate = template;
|
|
24
|
+
};
|
|
22
25
|
|
|
23
26
|
Breadcrumb.prototype.item = function(label, href) {
|
|
24
27
|
this.$description.items.push({ label, href });
|
|
@@ -26,9 +26,8 @@ export default function Divider(label, props = {}) {
|
|
|
26
26
|
BaseComponent.extends(Divider);
|
|
27
27
|
|
|
28
28
|
Divider.defaultTemplate = null;
|
|
29
|
-
|
|
30
29
|
Divider.use = function(template) {
|
|
31
|
-
Divider.defaultTemplate = template
|
|
30
|
+
Divider.defaultTemplate = template;
|
|
32
31
|
};
|
|
33
32
|
|
|
34
33
|
Divider.preset = function(name, callback) {
|
|
@@ -25,7 +25,7 @@ BaseComponent.use(ListGroup, HasItems);
|
|
|
25
25
|
ListGroup.defaultTemplate = null;
|
|
26
26
|
|
|
27
27
|
ListGroup.use = function(template) {
|
|
28
|
-
ListGroup.defaultTemplate = template
|
|
28
|
+
ListGroup.defaultTemplate = template;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
ListGroup.prototype.header = function(header) {
|
|
@@ -26,7 +26,7 @@ BaseComponent.extends(ListItem);
|
|
|
26
26
|
ListItem.defaultTemplate = null;
|
|
27
27
|
|
|
28
28
|
ListItem.use = function(template) {
|
|
29
|
-
ListItem.defaultTemplate = template
|
|
29
|
+
ListItem.defaultTemplate = template;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
ListItem.prototype.content = function(content) {
|
|
@@ -35,7 +35,7 @@ BaseComponent.extends(Progress, HasEventEmitter);
|
|
|
35
35
|
Progress.defaultTemplate = null;
|
|
36
36
|
|
|
37
37
|
Progress.use = function(template) {
|
|
38
|
-
Progress.defaultTemplate = template
|
|
38
|
+
Progress.defaultTemplate = template;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
Progress.preset = function(name, callback) {
|
|
@@ -23,7 +23,7 @@ BaseComponent.extends(Splitter, HasEventEmitter);
|
|
|
23
23
|
Splitter.defaultTemplate = null;
|
|
24
24
|
|
|
25
25
|
Splitter.use = function(template) {
|
|
26
|
-
Splitter.defaultTemplate = template
|
|
26
|
+
Splitter.defaultTemplate = template;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
Splitter.prototype.dynamic = function(){
|
|
@@ -18,7 +18,7 @@ export default function SplitterGutter(leftPanel, rightPanel, config = {}) {
|
|
|
18
18
|
SplitterGutter.defaultTemplate = null;
|
|
19
19
|
|
|
20
20
|
SplitterGutter.use = function(template) {
|
|
21
|
-
SplitterGutter.defaultTemplate = template
|
|
21
|
+
SplitterGutter.defaultTemplate = template;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
SplitterGutter.prototype.panels = function(leftPanel, rightPanel) {
|
|
@@ -29,7 +29,7 @@ BaseComponent.extends(SplitterPanel, BaseComponent);
|
|
|
29
29
|
SplitterPanel.defaultTemplate = null;
|
|
30
30
|
|
|
31
31
|
SplitterPanel.use = function(template) {
|
|
32
|
-
SplitterPanel.defaultTemplate = template
|
|
32
|
+
SplitterPanel.defaultTemplate = template;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
SplitterPanel.prototype.content = function(content) {
|