native-document 1.0.158 → 1.0.160

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.
@@ -1,6 +1,5 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
- // import { parse } from '@babel/parser';
4
3
  import MagicString from 'magic-string';
5
4
 
6
5
  import { fileURLToPath } from 'node:url';
@@ -1,16 +1,16 @@
1
1
  var NativeComponents = (function (exports) {
2
2
  'use strict';
3
3
 
4
- let DebugManager$2 = {};
4
+ let DebugManager$1 = {};
5
5
  {
6
- DebugManager$2 = {
6
+ DebugManager$1 = {
7
7
  log() {},
8
8
  warn() {},
9
9
  error() {},
10
10
  disable() {}
11
11
  };
12
12
  }
13
- var DebugManager$1 = DebugManager$2;
13
+ var DebugManager$2 = DebugManager$1;
14
14
 
15
15
  class NativeDocumentError extends Error {
16
16
  constructor(message, context = {}) {
@@ -275,7 +275,7 @@ var NativeComponents = (function (exports) {
275
275
  }
276
276
  }
277
277
  if (cleanedCount > 0) {
278
- DebugManager$1.log('Memory Auto Clean', `🧹 Cleaned ${cleanedCount} orphaned observables`);
278
+ DebugManager$2.log('Memory Auto Clean', `🧹 Cleaned ${cleanedCount} orphaned observables`);
279
279
  }
280
280
  }
281
281
  };
@@ -900,7 +900,7 @@ var NativeComponents = (function (exports) {
900
900
  const regex = new RegExp(pattern, flags);
901
901
  return regex.test(String(value));
902
902
  } catch (error){
903
- DebugManager$1.warn('Invalid regex pattern:', pattern, error);
903
+ DebugManager$2.warn('Invalid regex pattern:', pattern, error);
904
904
  return false;
905
905
  }
906
906
  }
@@ -2002,6 +2002,186 @@ var NativeComponents = (function (exports) {
2002
2002
  );
2003
2003
  };
2004
2004
 
2005
+ const STATE = {
2006
+ UNRESOLVED: 'unresolved',
2007
+ PENDING: 'pending',
2008
+ READY: 'ready',
2009
+ REFRESHING: 'refreshing',
2010
+ ERRORED: 'errored',
2011
+ };
2012
+
2013
+ function ObservableResource(fn, deps, config) {
2014
+ this.$fn = (config.debounce > 0) ? debounce(fn, config.debounce) : fn;
2015
+ this.$dependencies = deps;
2016
+ this.$config = config;
2017
+ this.$controller = null;
2018
+ this.$subscriptions = [];
2019
+
2020
+ this.data = config.initial ?? new ObservableItem(null);
2021
+ this.error = new ObservableItem(null);
2022
+ this.state = new ObservableItem(STATE.UNRESOLVED);
2023
+
2024
+ this.loading = ObservableItem.computed(
2025
+ (state) => state === STATE.PENDING || state === STATE.REFRESHING,
2026
+ [this.state]
2027
+ );
2028
+
2029
+ if (config.auto) {
2030
+ if (deps.length > 0) {
2031
+ this.$watchDependencies();
2032
+ return;
2033
+ }
2034
+ this.fetch();
2035
+ }
2036
+ }
2037
+
2038
+ ObservableResource.prototype.$abort = function() {
2039
+ if (this.$controller) {
2040
+ this.$controller.abort();
2041
+ this.$controller = null;
2042
+ }
2043
+ };
2044
+
2045
+ ObservableResource.prototype.$runWithAbortController = function(isRefetch = false) {
2046
+ this.$abort();
2047
+
2048
+ this.$controller = new AbortController();
2049
+ const signal = this.$controller.signal;
2050
+
2051
+ const hasData = this.data.val() !== null;
2052
+ const nextState = isRefetch && hasData ? STATE.REFRESHING : STATE.PENDING;
2053
+
2054
+ this.error.set(null);
2055
+ this.state.set(nextState);
2056
+
2057
+ const depValues = this.$dependencies.map(dep => dep.val());
2058
+ const args = [...depValues, signal];
2059
+
2060
+ Promise.resolve(this.$fn(...args))
2061
+ .then(result => {
2062
+ if (signal.aborted) {
2063
+ return;
2064
+ }
2065
+ this.data.set(result);
2066
+ this.error.set(null);
2067
+ this.state.set(STATE.READY);
2068
+ this.$controller = null;
2069
+ })
2070
+ .catch(err => {
2071
+ if (signal.aborted) {
2072
+ return;
2073
+ }
2074
+ this.error.set(err);
2075
+ this.state.set(STATE.ERRORED);
2076
+ this.$controller = null;
2077
+ });
2078
+ };
2079
+ ObservableResource.prototype.$runWithoutAbortController = function(isRefetch = false) {
2080
+ const hasData = this.data.val() !== null;
2081
+ const nextState = isRefetch && hasData ? STATE.REFRESHING : STATE.PENDING;
2082
+
2083
+ this.error.set(null);
2084
+ this.state.set(nextState);
2085
+
2086
+ const args = this.$dependencies.map(dep => dep.val());
2087
+
2088
+ Promise.resolve(this.$fn(...args))
2089
+ .then(result => {
2090
+ this.data.set(result);
2091
+ this.error.set(null);
2092
+ this.state.set(STATE.READY);
2093
+ })
2094
+ .catch(err => {
2095
+ this.error.set(err);
2096
+ this.state.set(STATE.ERRORED);
2097
+ });
2098
+ };
2099
+
2100
+ ObservableResource.prototype.$run = function(isRefetch = false) {
2101
+ const needsSignal = this.$fn.length > this.$dependencies.length;
2102
+ if(needsSignal) {
2103
+ this.$run = this.$runWithAbortController;
2104
+ return this.$runWithAbortController(isRefetch);
2105
+ }
2106
+ this.$run = this.$runWithoutAbortController;
2107
+
2108
+ return this.$run(isRefetch);
2109
+ };
2110
+
2111
+ ObservableResource.prototype.$watchDependencies = function() {
2112
+ this.$subscriptions.forEach(unsub => unsub());
2113
+ this.$subscriptions = [];
2114
+
2115
+ this.$dependencies.forEach(dep => {
2116
+ const callback = () => this.$run(true);
2117
+ dep.subscribe(callback);
2118
+ this.$subscriptions.push(() => dep.unsubscribe(callback));
2119
+ });
2120
+ if (!this.$config.lazy) {
2121
+ this.$run(false);
2122
+ }
2123
+ };
2124
+
2125
+ ObservableResource.prototype.fetch = function() {
2126
+ this.$run(false);
2127
+ return this;
2128
+ };
2129
+
2130
+ ObservableResource.prototype.refetch = function() {
2131
+ this.$run(true);
2132
+ return this;
2133
+ };
2134
+
2135
+ ObservableResource.prototype.mutate = function(value) {
2136
+ this.data.set(value);
2137
+ this.state.set(STATE.READY);
2138
+ return this;
2139
+ };
2140
+
2141
+ ObservableResource.prototype.destroy = function() {
2142
+ this.$abort();
2143
+ this.$subscriptions.forEach(unsub => unsub());
2144
+ this.$subscriptions = [];
2145
+ };
2146
+
2147
+ ObservableResource.prototype.isReady = function() {
2148
+ return this.state.isEqualTo(STATE.READY);
2149
+ };
2150
+
2151
+ ObservableResource.prototype.isPending = function() {
2152
+ return this.state.isEqualTo(STATE.PENDING);
2153
+ };
2154
+
2155
+ ObservableResource.prototype.isRefreshing = function() {
2156
+ return this.state.isEqualTo(STATE.REFRESHING);
2157
+ };
2158
+
2159
+ ObservableResource.prototype.isErrored = function() {
2160
+ return this.state.isEqualTo(STATE.ERRORED);
2161
+ };
2162
+
2163
+ ObservableResource.prototype.isUnresolved = function() {
2164
+ return this.state.isEqualTo(STATE.UNRESOLVED);
2165
+ };
2166
+
2167
+ ObservableResource.prototype.onSuccess = function(callback) {
2168
+ this.data.subscribe((value) => {
2169
+ if (this.state.val() === STATE.READY) {
2170
+ callback(value);
2171
+ }
2172
+ });
2173
+ return this;
2174
+ };
2175
+
2176
+ ObservableResource.prototype.onError = function(callback) {
2177
+ this.error.subscribe((err) => {
2178
+ if (err !== null) {
2179
+ callback(err);
2180
+ }
2181
+ });
2182
+ return this;
2183
+ };
2184
+
2005
2185
  /**
2006
2186
  *
2007
2187
  * @param {*} value
@@ -2132,9 +2312,9 @@ var NativeComponents = (function (exports) {
2132
2312
  * const computed = Observable.computed(() => { ... }, batch);
2133
2313
  */
2134
2314
  Observable.computed = function(callback, dependencies = []) {
2135
- const initialValue = callback();
2136
- const observable = new ObservableItem(initialValue);
2137
2315
  const getValues = () => dependencies.map((item) => item.val());
2316
+ const initialValue = callback(...getValues());
2317
+ const observable = new ObservableItem(initialValue);
2138
2318
  const updatedValue = nextTick(() => observable.set(callback(...getValues())));
2139
2319
 
2140
2320
  if(Validator.isFunction(dependencies)) {
@@ -2203,6 +2383,15 @@ var NativeComponents = (function (exports) {
2203
2383
  Observable.object = Observable.init;
2204
2384
  Observable.json = Observable.init;
2205
2385
 
2386
+
2387
+ Observable.resource = function(fn, deps = [], options = false) {
2388
+ const config = (typeof options === 'boolean')
2389
+ ? { auto: options, debounce: 0, lazy: false }
2390
+ : { auto: false, debounce: 0, lazy: false, ...options };
2391
+
2392
+ return new ObservableResource(fn, deps, config);
2393
+ };
2394
+
2206
2395
  const BOOLEAN_ATTRIBUTES = new Set([
2207
2396
  'checked',
2208
2397
  'selected',
@@ -2820,7 +3009,7 @@ var NativeComponents = (function (exports) {
2820
3009
  return condition ? ElementCreator.getChild(child) : null;
2821
3010
  }
2822
3011
 
2823
- return DebugManager$1.warn('ShowIf', "ShowIf : condition must be an Observable or boolean / "+comment, condition);
3012
+ return DebugManager$2.warn('ShowIf', "ShowIf : condition must be an Observable or boolean / "+comment, condition);
2824
3013
  }
2825
3014
  const element = Anchor('Show if : '+(comment || ''));
2826
3015
 
@@ -3202,7 +3391,7 @@ var NativeComponents = (function (exports) {
3202
3391
  const method = methods[name];
3203
3392
 
3204
3393
  if (typeof method !== 'function') {
3205
- DebugManager$1.warn(`⚠️ extends(): "${name}" is not a function, skipping`);
3394
+ DebugManager$2.warn(`⚠️ extends(): "${name}" is not a function, skipping`);
3206
3395
  continue;
3207
3396
  }
3208
3397
 
@@ -3212,6 +3401,31 @@ var NativeComponents = (function (exports) {
3212
3401
  return this;
3213
3402
  };
3214
3403
 
3404
+
3405
+ NDElement.prototype.attr = function(name, value) {
3406
+ if(value?.__$Observable) {
3407
+ bindAttributeWithObservable(this.$element, name, value);
3408
+ return this;
3409
+ }
3410
+ this.$element.setAttribute(name, value);
3411
+ };
3412
+
3413
+ NDElement.prototype.attrs = function(attrs) {
3414
+ AttributesWrapper(this.$element, attrs);
3415
+ return this;
3416
+ };
3417
+
3418
+ NDElement.prototype.class = function(classes) {
3419
+ bindClassAttribute(this.$element, classes);
3420
+ return this;
3421
+ };
3422
+
3423
+ NDElement.prototype.style = function(style) {
3424
+ bindStyleAttribute(this.$element, style);
3425
+ return this;
3426
+ };
3427
+
3428
+
3215
3429
  /**
3216
3430
  * Extends the NDElement prototype with new methods available to all NDElement instances.
3217
3431
  * Use this to add global methods to all NDElements.
@@ -3252,17 +3466,17 @@ var NativeComponents = (function (exports) {
3252
3466
  const method = methods[name];
3253
3467
 
3254
3468
  if (typeof method !== 'function') {
3255
- DebugManager$1.warn('NDElement.extend', `"${name}" is not a function, skipping`);
3469
+ DebugManager$2.warn('NDElement.extend', `"${name}" is not a function, skipping`);
3256
3470
  continue;
3257
3471
  }
3258
3472
 
3259
3473
  if (protectedMethods.has(name)) {
3260
- DebugManager$1.error('NDElement.extend', `Cannot override protected method "${name}"`);
3474
+ DebugManager$2.error('NDElement.extend', `Cannot override protected method "${name}"`);
3261
3475
  throw new NativeDocumentError(`Cannot override protected method "${name}"`);
3262
3476
  }
3263
3477
 
3264
3478
  if (NDElement.prototype[name]) {
3265
- DebugManager$1.warn('NDElement.extend', `Overwriting existing prototype method "${name}"`);
3479
+ DebugManager$2.warn('NDElement.extend', `Overwriting existing prototype method "${name}"`);
3266
3480
  }
3267
3481
 
3268
3482
  NDElement.prototype[name] = method;
@@ -3435,6 +3649,10 @@ var NativeComponents = (function (exports) {
3435
3649
  return props;
3436
3650
  };
3437
3651
 
3652
+ BaseComponent.prototype.props = function(props) {
3653
+ this.$description.props = props;
3654
+ return this;
3655
+ };
3438
3656
 
3439
3657
  BaseComponent.prototype.style = function(style) {
3440
3658
  const props = this.getEditableProps();
@@ -3547,7 +3765,7 @@ var NativeComponents = (function (exports) {
3547
3765
  */
3548
3766
  Object.defineProperty(AccordionItem.prototype, 'id', {
3549
3767
  get() {
3550
- this.$description.id;
3768
+ return this.$description.id;
3551
3769
  }
3552
3770
  });
3553
3771
 
@@ -3690,6 +3908,7 @@ var NativeComponents = (function (exports) {
3690
3908
  */
3691
3909
  AccordionItem.prototype.renderContent = function(renderFn) {
3692
3910
  this.$description.renderContent = renderFn;
3911
+ return this;
3693
3912
  };
3694
3913
 
3695
3914
  /**
@@ -3984,7 +4203,7 @@ var NativeComponents = (function (exports) {
3984
4203
 
3985
4204
  Alert.preset = function(name, callback) {
3986
4205
  if (Alert.prototype[name] || Alert[name]) {
3987
- DebugManager$1.warn(`Warning: the ${name} method already exist in Alert.`);
4206
+ DebugManager$2.warn(`Warning: the ${name} method already exist in Alert.`);
3988
4207
  return;
3989
4208
  }
3990
4209
  Alert[name] = (content, props) => callback(new Alert(content, props));
@@ -4298,7 +4517,7 @@ var NativeComponents = (function (exports) {
4298
4517
 
4299
4518
  Avatar.preset = function(name, callback) {
4300
4519
  if (Avatar.prototype[name] || Avatar[name]) {
4301
- DebugManager$1.warn(`Warning: the ${name} method already exists in Avatar.`);
4520
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Avatar.`);
4302
4521
  return;
4303
4522
  }
4304
4523
  Avatar[name] = (label, props) => callback(new Avatar(label, props));
@@ -4720,7 +4939,7 @@ var NativeComponents = (function (exports) {
4720
4939
 
4721
4940
  Badge.preset = function(name, callback) {
4722
4941
  if (Badge.prototype[name] || Badge[name]) {
4723
- DebugManager$1.warn(`Warning: the ${name} method already exists in Badge.`);
4942
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Badge.`);
4724
4943
  return;
4725
4944
  }
4726
4945
  Badge[name] = (content, props) => callback(new Badge(content, props));
@@ -4838,7 +5057,7 @@ var NativeComponents = (function (exports) {
4838
5057
 
4839
5058
  Breadcrumb.preset = function(name, callback) {
4840
5059
  if (Breadcrumb.prototype[name] || Breadcrumb[name]) {
4841
- DebugManager$1.warn(`Warning: the ${name} method already exist in Breadcrumb.`);
5060
+ DebugManager$2.warn(`Warning: the ${name} method already exist in Breadcrumb.`);
4842
5061
  return;
4843
5062
  }
4844
5063
  Breadcrumb[name] = (props) => callback(new Breadcrumb(props));
@@ -4928,7 +5147,7 @@ var NativeComponents = (function (exports) {
4928
5147
 
4929
5148
  Button.preset = function(name, callback) {
4930
5149
  if (Button.prototype[name] || Button[name]) {
4931
- DebugManager$1.warn(`Warning: the ${name} method already exist in Button.`);
5150
+ DebugManager$2.warn(`Warning: the ${name} method already exist in Button.`);
4932
5151
  return;
4933
5152
  }
4934
5153
  Button[name] = (label, props) => callback(new Button(label, props));
@@ -5810,7 +6029,7 @@ var NativeComponents = (function (exports) {
5810
6029
 
5811
6030
  Divider.preset = function(name, callback) {
5812
6031
  if (Divider.prototype[name] || Divider[name]) {
5813
- DebugManager$1.warn(`Warning: the ${name} method already exists in Divider.`);
6032
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Divider.`);
5814
6033
  return;
5815
6034
  }
5816
6035
  Divider[name] = (label, props) => callback(new Divider(label, props));
@@ -6229,7 +6448,7 @@ var NativeComponents = (function (exports) {
6229
6448
 
6230
6449
  Dropdown.preset = function(name, callback) {
6231
6450
  if (Dropdown.prototype[name] || Dropdown[name]) {
6232
- DebugManager$1.warn(`Warning: the ${name} method already exist in Dropdown.`);
6451
+ DebugManager$2.warn(`Warning: the ${name} method already exist in Dropdown.`);
6233
6452
  return;
6234
6453
  }
6235
6454
  Dropdown[name] = (props) => callback(new Dropdown(props));
@@ -10284,7 +10503,7 @@ var NativeComponents = (function (exports) {
10284
10503
 
10285
10504
  Modal.preset = function(name, callback) {
10286
10505
  if (Modal.prototype[name] || Modal[name]) {
10287
- DebugManager$1.warn(`Warning: the ${name} method already exist in Modal.`);
10506
+ DebugManager$2.warn(`Warning: the ${name} method already exist in Modal.`);
10288
10507
  return;
10289
10508
  }
10290
10509
  Modal[name] = (content, props) => callback(new Modal(content, props));
@@ -10535,7 +10754,7 @@ var NativeComponents = (function (exports) {
10535
10754
 
10536
10755
  Pagination.preset = function(name, callback) {
10537
10756
  if (Pagination.prototype[name] || Pagination[name]) {
10538
- DebugManager$1.warn(`Warning: the ${name} method already exist in Pagination.`);
10757
+ DebugManager$2.warn(`Warning: the ${name} method already exist in Pagination.`);
10539
10758
  return;
10540
10759
  }
10541
10760
  Pagination[name] = (props) => callback(new Pagination(props));
@@ -10830,7 +11049,7 @@ var NativeComponents = (function (exports) {
10830
11049
 
10831
11050
  Popover.preset = function(name, callback) {
10832
11051
  if (Popover.prototype[name] || Popover[name]) {
10833
- DebugManager$1.warn(`Warning: the ${name} method already exist in Popover.`);
11052
+ DebugManager$2.warn(`Warning: the ${name} method already exist in Popover.`);
10834
11053
  return;
10835
11054
  }
10836
11055
  Popover[name] = (content, props) => callback(new Popover(content, props));
@@ -11132,7 +11351,7 @@ var NativeComponents = (function (exports) {
11132
11351
 
11133
11352
  Progress.preset = function(name, callback) {
11134
11353
  if (Progress.prototype[name] || Progress[name]) {
11135
- DebugManager$1.warn(`Warning: the ${name} method already exists in Progress.`);
11354
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Progress.`);
11136
11355
  return;
11137
11356
  }
11138
11357
  Progress[name] = (props) => callback(new Progress(props));
@@ -11434,7 +11653,7 @@ var NativeComponents = (function (exports) {
11434
11653
 
11435
11654
  VStack.preset = function(name, callback) {
11436
11655
  if (VStack.prototype[name] || VStack[name]) {
11437
- DebugManager$1.warn(`Warning: the ${name} method already exists in VStack.`);
11656
+ DebugManager$2.warn(`Warning: the ${name} method already exists in VStack.`);
11438
11657
  return;
11439
11658
  }
11440
11659
  VStack[name] = (content, props) => callback(new VStack(content, props));
@@ -11609,7 +11828,7 @@ var NativeComponents = (function (exports) {
11609
11828
 
11610
11829
  FixedStack.preset = function(name, callback) {
11611
11830
  if(FixedStack.prototype[name] || FixedStack[name]) {
11612
- DebugManager$1.warn(`Warning: the ${name} method already exists in FixedStack.`);
11831
+ DebugManager$2.warn(`Warning: the ${name} method already exists in FixedStack.`);
11613
11832
  return;
11614
11833
  }
11615
11834
  FixedStack[name] = (content, props) => callback(new FixedStack(content, props));
@@ -11639,7 +11858,7 @@ var NativeComponents = (function (exports) {
11639
11858
 
11640
11859
  HStack.preset = function(name, callback) {
11641
11860
  if (HStack.prototype[name] || HStack[name]) {
11642
- DebugManager$1.warn(`Warning: the ${name} method already exists in HStack.`);
11861
+ DebugManager$2.warn(`Warning: the ${name} method already exists in HStack.`);
11643
11862
  return;
11644
11863
  }
11645
11864
  HStack[name] = (content, props) => callback(new HStack(content, props));
@@ -11669,7 +11888,7 @@ var NativeComponents = (function (exports) {
11669
11888
 
11670
11889
  AbsoluteStack.preset = function(name, callback) {
11671
11890
  if(AbsoluteStack.prototype[name] || AbsoluteStack[name]) {
11672
- DebugManager$1.warn(`Warning: the ${name} method already exists in AbsoluteStack.`);
11891
+ DebugManager$2.warn(`Warning: the ${name} method already exists in AbsoluteStack.`);
11673
11892
  return;
11674
11893
  }
11675
11894
  AbsoluteStack[name] = (content, props) => callback(new AbsoluteStack(content, props));
@@ -11699,7 +11918,7 @@ var NativeComponents = (function (exports) {
11699
11918
 
11700
11919
  RelativeStack.preset = function(name, callback) {
11701
11920
  if(RelativeStack.prototype[name] || RelativeStack[name]) {
11702
- DebugManager$1.warn(`Warning: the ${name} method already exists in RelativeStack.`);
11921
+ DebugManager$2.warn(`Warning: the ${name} method already exists in RelativeStack.`);
11703
11922
  return;
11704
11923
  }
11705
11924
  RelativeStack[name] = (content, props) => callback(new RelativeStack(content, props));
@@ -12203,7 +12422,7 @@ var NativeComponents = (function (exports) {
12203
12422
  * @param {?Function=} customWrapper
12204
12423
  * @returns {Function}
12205
12424
  */
12206
- function HtmlElementWrapper(name, customWrapper = null) {
12425
+ function HtmlElementWrapper(name, customWrapper = null) {
12207
12426
  if(name) {
12208
12427
  if(customWrapper) {
12209
12428
  let node = null;
@@ -12271,7 +12490,7 @@ var NativeComponents = (function (exports) {
12271
12490
 
12272
12491
  Skeleton.preset = function(name, callback) {
12273
12492
  if (Skeleton.prototype[name] || Skeleton[name]) {
12274
- DebugManager$1.warn(`Warning: the ${name} method already exists in Skeleton.`);
12493
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Skeleton.`);
12275
12494
  return;
12276
12495
  }
12277
12496
  Skeleton[name] = (props) => callback(new Skeleton(props));
@@ -12635,7 +12854,7 @@ var NativeComponents = (function (exports) {
12635
12854
 
12636
12855
  Spinner.preset = function(name, callback) {
12637
12856
  if (Spinner.prototype[name] || Spinner[name]) {
12638
- DebugManager$1.warn(`Warning: the ${name} method already exists in Spinner.`);
12857
+ DebugManager$2.warn(`Warning: the ${name} method already exists in Spinner.`);
12639
12858
  return;
12640
12859
  }
12641
12860
  Spinner[name] = (props) => callback(new Spinner(props));
@@ -13205,7 +13424,7 @@ var NativeComponents = (function (exports) {
13205
13424
 
13206
13425
  Stepper.preset = function(name, callback) {
13207
13426
  if (Stepper.prototype[name] || Stepper[name]) {
13208
- DebugManager$1.warn(`Warning: the ${name} method already exist in Stepper.`);
13427
+ DebugManager$2.warn(`Warning: the ${name} method already exist in Stepper.`);
13209
13428
  return;
13210
13429
  }
13211
13430
  Stepper[name] = (props) => callback(new Stepper(props));
@@ -13796,9 +14015,14 @@ var NativeComponents = (function (exports) {
13796
14015
  return new SimpleTable(props);
13797
14016
  };
13798
14017
 
13799
- SimpleTable.prototype.column = function(key, title, callback) {
14018
+ SimpleTable.prototype.column = function(key, title, props, callback) {
14019
+ if(typeof props === 'function') {
14020
+ callback = props;
14021
+ props = {};
14022
+ }
13800
14023
  const column = new Column(key);
13801
14024
  column.title(title);
14025
+ column.props(props);
13802
14026
  callback && callback(column);
13803
14027
  this.$description.columns.push(column);
13804
14028
  this.$description.header.push(column);
@@ -14014,9 +14238,15 @@ var NativeComponents = (function (exports) {
14014
14238
  // COLONNES
14015
14239
  // ---------------------------------------------
14016
14240
 
14017
- DataTable.prototype.column = function(key, title, callback) {
14241
+
14242
+ DataTable.prototype.column = function(key, title, props, callback) {
14243
+ if(typeof props === 'function') {
14244
+ callback = props;
14245
+ props = {};
14246
+ }
14018
14247
  const column = new Column(key);
14019
14248
  column.title(title);
14249
+ column.props(props);
14020
14250
  callback && callback(column);
14021
14251
  this.$description.columns.push(column);
14022
14252
  this.$description.header.push(column);
@@ -14158,7 +14388,7 @@ var NativeComponents = (function (exports) {
14158
14388
 
14159
14389
  DataTable.prototype.selectedRows = function($obs) {
14160
14390
  if(!$obs.__$isObservableArray) {
14161
- DebugManager$1.warn('Database', 'selectedRow should take an Observable array');
14391
+ DebugManager$2.warn('Database', 'selectedRow should take an Observable array');
14162
14392
  }
14163
14393
  this.$description.$selectedRows = $obs;
14164
14394
  return this;
@@ -14705,7 +14935,7 @@ var NativeComponents = (function (exports) {
14705
14935
 
14706
14936
  Tooltip.preset = function(name, callback) {
14707
14937
  if (Tooltip.prototype[name] || Tooltip[name]) {
14708
- DebugManager$1.warn(`Warning: the ${name} method already exist in Tooltip.`);
14938
+ DebugManager$2.warn(`Warning: the ${name} method already exist in Tooltip.`);
14709
14939
  return;
14710
14940
  }
14711
14941
  Tooltip[name] = (content, props) => callback(new Tooltip(content, props));