@alauda/ui 6.0.1-beta.35 → 6.0.1-beta.36
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/alauda-ui.metadata.json +1 -1
- package/bundles/alauda-ui.umd.js +43 -31
- package/bundles/alauda-ui.umd.js.map +1 -1
- package/bundles/alauda-ui.umd.min.js +1 -1
- package/bundles/alauda-ui.umd.min.js.map +1 -1
- package/esm2015/alauda-ui.ngsummary.json +1 -1
- package/esm2015/public-api.ngsummary.json +1 -1
- package/esm2015/table/public-api.ngsummary.json +1 -1
- package/esm2015/table/table-cell.component.js +2 -2
- package/esm2015/table/table-cell.component.ngfactory.js +1 -1
- package/esm2015/table/table-cell.component.ngsummary.json +1 -1
- package/esm2015/table/table-scroll-wrapper.directive.js +32 -20
- package/esm2015/table/table-scroll-wrapper.directive.ngsummary.json +1 -1
- package/esm2015/table/table.component.js +4 -7
- package/esm2015/table/table.component.ngfactory.js +12 -13
- package/esm2015/table/table.component.scss.ngstyle.js +1 -1
- package/esm2015/table/table.module.js +4 -4
- package/esm2015/table/table.module.ngfactory.js +1 -1
- package/esm2015/table/table.module.ngsummary.json +1 -1
- package/fesm2015/alauda-ui.js +37 -28
- package/fesm2015/alauda-ui.js.map +1 -1
- package/package.json +1 -1
- package/table/table-scroll-wrapper.directive.d.ts +4 -2
- package/theme/_pattern.scss +0 -1
- package/theme/style.css +5 -5
package/bundles/alauda-ui.umd.js
CHANGED
|
@@ -963,7 +963,7 @@
|
|
|
963
963
|
animations: [
|
|
964
964
|
animations.trigger('expand', [
|
|
965
965
|
animations.state('*', animations.style({ height: 0, padding: '0 16px' })),
|
|
966
|
-
animations.state('expanded', animations.style({ height: '*', padding: '16px' })),
|
|
966
|
+
animations.state('expanded', animations.style({ height: '*', 'margin-bottom': '15px', padding: '16px' })),
|
|
967
967
|
animations.transition('* <=> expanded', [animations.animate(250)]),
|
|
968
968
|
]),
|
|
969
969
|
]
|
|
@@ -1224,61 +1224,73 @@
|
|
|
1224
1224
|
};
|
|
1225
1225
|
|
|
1226
1226
|
var CLASS_PREFIX = 'aui-table';
|
|
1227
|
-
var
|
|
1228
|
-
var HAS_SCROLL_CLASS =
|
|
1229
|
-
var SCROLLING_CLASS =
|
|
1230
|
-
var SCROLL_BEFORE_END_CLASS =
|
|
1231
|
-
var
|
|
1232
|
-
|
|
1227
|
+
var SHADOW_CLASS = CLASS_PREFIX + "__scroll-shadow";
|
|
1228
|
+
var HAS_SCROLL_CLASS = SHADOW_CLASS + "--has-scroll";
|
|
1229
|
+
var SCROLLING_CLASS = SHADOW_CLASS + "--scrolling";
|
|
1230
|
+
var SCROLL_BEFORE_END_CLASS = SHADOW_CLASS + "--before-end";
|
|
1231
|
+
var HAS_TABLE_TOP_SHADOW = 'hasTableTopShadow';
|
|
1232
|
+
var HAS_TABLE_BOTTOM_SHADOW = 'hasTableBottomShadow';
|
|
1233
|
+
var HAS_TABLE_VERTICAL_SCROLL = 'hasTableVerticalScroll';
|
|
1234
|
+
var TableScrollShadowDirective = /** @class */ (function () {
|
|
1235
|
+
function TableScrollShadowDirective(el) {
|
|
1233
1236
|
this.el = el;
|
|
1234
1237
|
this.destroy$$ = new rxjs.Subject();
|
|
1238
|
+
this.class = SCROLL_BEFORE_END_CLASS + " " + SHADOW_CLASS;
|
|
1235
1239
|
}
|
|
1236
|
-
Object.defineProperty(
|
|
1240
|
+
Object.defineProperty(TableScrollShadowDirective.prototype, "containerEl", {
|
|
1237
1241
|
get: function () {
|
|
1238
1242
|
return this.el.nativeElement;
|
|
1239
1243
|
},
|
|
1240
1244
|
enumerable: false,
|
|
1241
1245
|
configurable: true
|
|
1242
1246
|
});
|
|
1243
|
-
|
|
1247
|
+
TableScrollShadowDirective.prototype.ngAfterViewInit = function () {
|
|
1244
1248
|
var _this = this;
|
|
1245
1249
|
requestAnimationFrame(function () {
|
|
1246
1250
|
_this.viewMutation();
|
|
1247
1251
|
});
|
|
1248
1252
|
};
|
|
1249
|
-
|
|
1253
|
+
TableScrollShadowDirective.prototype.viewMutation = function () {
|
|
1250
1254
|
var _this = this;
|
|
1251
1255
|
rxjs.merge(observeResizeOn(this.containerEl), rxjs.fromEvent(this.containerEl, 'scroll'))
|
|
1252
1256
|
.pipe(operators.startWith(null), operators.takeUntil(this.destroy$$))
|
|
1253
1257
|
.subscribe(function () {
|
|
1254
|
-
|
|
1255
|
-
_this.
|
|
1256
|
-
var scrollLeft = _this.containerEl.scrollLeft;
|
|
1257
|
-
_this.placeClassList(_this.containerEl.classList, scrollLeft > 0, SCROLLING_CLASS);
|
|
1258
|
-
_this.placeClassList(_this.containerEl.classList, scrollLeft !== scrollDis, SCROLL_BEFORE_END_CLASS);
|
|
1258
|
+
_this.mutateVerticalScroll();
|
|
1259
|
+
_this.mutateHorizontalScroll();
|
|
1259
1260
|
});
|
|
1260
1261
|
};
|
|
1261
|
-
|
|
1262
|
+
TableScrollShadowDirective.prototype.mutateVerticalScroll = function () {
|
|
1263
|
+
var scrollDis = this.containerEl.scrollHeight - this.containerEl.offsetHeight;
|
|
1264
|
+
this.placeClassList(this.containerEl.classList, scrollDis > 0, HAS_TABLE_VERTICAL_SCROLL);
|
|
1265
|
+
var scrollTop = this.containerEl.scrollTop;
|
|
1266
|
+
this.placeClassList(this.containerEl.classList, scrollTop > 0, HAS_TABLE_TOP_SHADOW);
|
|
1267
|
+
this.placeClassList(this.containerEl.classList, scrollTop < scrollDis, HAS_TABLE_BOTTOM_SHADOW);
|
|
1268
|
+
};
|
|
1269
|
+
TableScrollShadowDirective.prototype.mutateHorizontalScroll = function () {
|
|
1270
|
+
var scrollDis = this.containerEl.scrollWidth - this.containerEl.offsetWidth;
|
|
1271
|
+
this.placeClassList(this.containerEl.classList, scrollDis > 0, HAS_SCROLL_CLASS);
|
|
1272
|
+
var scrollLeft = this.containerEl.scrollLeft;
|
|
1273
|
+
this.placeClassList(this.containerEl.classList, scrollLeft > 0, SCROLLING_CLASS);
|
|
1274
|
+
this.placeClassList(this.containerEl.classList, scrollLeft < scrollDis, SCROLL_BEFORE_END_CLASS);
|
|
1275
|
+
};
|
|
1276
|
+
TableScrollShadowDirective.prototype.placeClassList = function (classList, condition, className) {
|
|
1262
1277
|
classList[condition ? 'add' : 'remove'](className);
|
|
1263
1278
|
};
|
|
1264
|
-
|
|
1279
|
+
TableScrollShadowDirective.prototype.ngOnDestroy = function () {
|
|
1265
1280
|
this.destroy$$.next();
|
|
1266
1281
|
};
|
|
1267
|
-
return
|
|
1282
|
+
return TableScrollShadowDirective;
|
|
1268
1283
|
}());
|
|
1269
|
-
|
|
1284
|
+
TableScrollShadowDirective.decorators = [
|
|
1270
1285
|
{ type: i0.Directive, args: [{
|
|
1271
|
-
selector: '[
|
|
1272
|
-
host: {
|
|
1273
|
-
class: "" + SCROLL_BEFORE_END_CLASS,
|
|
1274
|
-
},
|
|
1286
|
+
selector: '[auiTableScrollShadow]',
|
|
1275
1287
|
},] }
|
|
1276
1288
|
];
|
|
1277
|
-
|
|
1289
|
+
TableScrollShadowDirective.ctorParameters = function () { return [
|
|
1278
1290
|
{ type: i0.ElementRef }
|
|
1279
1291
|
]; };
|
|
1280
|
-
|
|
1281
|
-
|
|
1292
|
+
TableScrollShadowDirective.propDecorators = {
|
|
1293
|
+
class: [{ type: i0.HostBinding, args: ['class',] }]
|
|
1282
1294
|
};
|
|
1283
1295
|
|
|
1284
1296
|
var TableComponent = /** @class */ (function (_super) {
|
|
@@ -1323,7 +1335,7 @@
|
|
|
1323
1335
|
selector: 'aui-table',
|
|
1324
1336
|
exportAs: 'auiTable',
|
|
1325
1337
|
encapsulation: i0.ViewEncapsulation.None,
|
|
1326
|
-
template: "
|
|
1338
|
+
template: "\n " + table.CDK_TABLE_TEMPLATE + "\n <ng-container auiTablePlaceholderOutlet></ng-container>\n ",
|
|
1327
1339
|
host: {
|
|
1328
1340
|
class: 'aui-table',
|
|
1329
1341
|
},
|
|
@@ -1343,7 +1355,7 @@
|
|
|
1343
1355
|
useClass: table._CoalescedStyleScheduler,
|
|
1344
1356
|
},
|
|
1345
1357
|
],
|
|
1346
|
-
styles: [".aui-
|
|
1358
|
+
styles: [".aui-table__header-row.aui-table-sticky{margin:0 calc(var(--aui-table-margin) * -1);padding:0}.hasTableTopShadow:before{transform:translate3d(-12px,0,0);top:28px;box-shadow:0 10px 10px -4px rgba(var(--aui-color-n-1),.16)}.hasTableBottomShadow:after,.hasTableTopShadow:before{position:-webkit-sticky;position:sticky;width:calc(100% + 24px);content:\" \";display:block;height:16px;margin-top:-16px;z-index:99}.hasTableBottomShadow:after{transform:translate3d(-12px,12px,0);bottom:0;box-shadow:0 -10px 10px -4px rgba(var(--aui-color-n-1),.16) inset}.aui-table__scroll-wrapper{background-color:rgb(var(--aui-color-n-9));padding:0 12px 12px}.aui-table__scroll-wrapper::-webkit-scrollbar{width:4px;height:4px}.aui-table__scroll-wrapper::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3)}.aui-table__scroll-wrapper .aui-table{padding:0}.aui-table__scroll-wrapper .aui-table__scroll-shadow.hasTableBottomShadow:after,.aui-table__scroll-wrapper .aui-table__scroll-shadow.hasTableTopShadow:before{transform:none;width:100%;left:0}.aui-table__scroll-shadow .aui-table__header-row.aui-table-sticky{margin:0}.aui-table__scroll-shadow .aui-table{padding:0}.aui-table__scroll-shadow .aui-table__row{border:none;padding:0;align-items:stretch}.aui-table__scroll-shadow .aui-table__row .aui-table__cell{border-left:0 solid #eee;border-bottom:var(--aui-table-border-width) solid #eee;border-right:0 solid #eee;border-top:var(--aui-table-border-width) solid #eee}.aui-table__scroll-shadow .aui-table__row .aui-table__cell:first-of-type{border-left-width:var(--aui-table-border-width);padding-left:var(--aui-table-cell-padding-lr)}.aui-table__scroll-shadow .aui-table__row .aui-table__cell:last-of-type{border-right-width:var(--aui-table-border-width);padding-right:var(--aui-table-cell-padding-lr)}.aui-table__scroll-shadow .aui-table__row:first-child:not(.aui-table__header-row) .aui-table__cell:first-of-type{border-top-left-radius:var(--aui-border-radius-l)}.aui-table__scroll-shadow .aui-table__row:first-child:not(.aui-table__header-row) .aui-table__cell:last-of-type{border-top-right-radius:var(--aui-border-radius-l)}.aui-table__scroll-shadow .aui-table__row:last-child .aui-table__cell:first-of-type{border-bottom-left-radius:var(--aui-border-radius-l)}.aui-table__scroll-shadow .aui-table__row:last-child .aui-table__cell:last-of-type{border-bottom-right-radius:var(--aui-border-radius-l)}.aui-table__scroll-shadow .aui-table__row:not(.aui-table__scroll-shadow .aui-table__row:last-child) .aui-table__cell{border-bottom-width:0}.aui-table__scroll-shadow .aui-table__header-row{padding:0;align-items:stretch}.aui-table__scroll-shadow .aui-table__header-row .aui-table__header-cell:first-of-type{padding-left:var(--aui-table-cell-padding-lr)}.aui-table__scroll-shadow .aui-table__header-row .aui-table__header-cell:last-of-type{padding-right:var(--aui-table-cell-padding-lr)}.aui-table__scroll-shadow .aui-table__cell{padding:var(--aui-table-cell-padding-tb-m) calc(var(--aui-table-cell-padding-lr) / 2)}.aui-table__scroll-shadow--has-scroll .aui-table-sticky:not(.aui-table__header-row):after{position:absolute;top:0;bottom:-1px;width:20px;transition:box-shadow .3s;content:\"\";pointer-events:none}.aui-table__scroll-shadow--has-scroll .aui-table-sticky:not(.aui-table__header-row):before{position:absolute;top:0;bottom:-1px;content:\" \";background:linear-gradient(180deg,rgb(var(--aui-color-n-7)),rgb(var(--aui-color-n-7)) 8px,transparent 0,transparent);width:1px;background-size:100% 14px;height:100%}.aui-table__scroll-shadow--has-scroll .aui-table-sticky-border-elem-left{padding-right:calc(var(--aui-table-cell-padding-lr) / 2 * 3)}.aui-table__scroll-shadow--has-scroll .aui-table-sticky-border-elem-left:after{right:calc((var(--aui-table-cell-padding-lr) / 2) * -1)}.aui-table__scroll-shadow--has-scroll .aui-table-sticky-border-elem-left:before{right:calc(var(--aui-table-cell-padding-lr) / 2)}.aui-table__scroll-shadow--has-scroll .aui-table-sticky-border-elem-right{padding-left:calc(var(--aui-table-cell-padding-lr) / 2 * 3)}.aui-table__scroll-shadow--has-scroll .aui-table-sticky-border-elem-right:after{left:calc((var(--aui-table-cell-padding-lr) / 2) * -1)}.aui-table__scroll-shadow--has-scroll .aui-table-sticky-border-elem-right:before{left:calc(var(--aui-table-cell-padding-lr) / 2)}.aui-table__scroll-shadow--scrolling .aui-table-sticky-border-elem-left:not(.aui-table__header-row):after{box-shadow:inset 8px 0 4px -4px rgba(var(--aui-color-n-1),.16)}.aui-table__scroll-shadow--scrolling .aui-table-sticky-border-elem-left:not(.aui-table__header-row):before{background:linear-gradient(180deg,rgb(var(--aui-color-primary)),rgb(var(--aui-color-primary)) 8px,transparent 0,transparent);width:1px;background-size:100% 14px;height:100%}.aui-table__scroll-shadow--before-end .aui-table-sticky-border-elem-right:not(.aui-table__header-row):after{box-shadow:inset -8px 0 4px -4px rgba(var(--aui-color-n-1),.16)}.aui-table__scroll-shadow--before-end .aui-table-sticky-border-elem-right:not(.aui-table__header-row):before{background:linear-gradient(180deg,rgb(var(--aui-color-primary)),rgb(var(--aui-color-primary)) 8px,transparent 0,transparent);width:1px;background-size:100% 14px;height:100%}.aui-table{display:block;color:rgb(var(--aui-color-n-1));font-size:var(--aui-font-size-m);background-color:rgb(var(--aui-color-n-9));padding:0 var(--aui-table-margin) var(--aui-table-margin);border-radius:var(--aui-border-radius-m)}.aui-table::-webkit-scrollbar{width:4px;height:4px}.aui-table::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.3)}.aui-table__header-row,.aui-table__row{display:flex;align-items:center}.aui-table__header-row+.aui-table__row{border-top-left-radius:var(--aui-border-radius-l);border-top-right-radius:var(--aui-border-radius-l)}.aui-table__row{position:relative;border:var(--aui-table-border-width) solid #eee;border-bottom:0 solid #eee;background-color:rgb(var(--aui-color-n-10));padding:0 calc(var(--aui-table-cell-padding-lr) / 2);min-height:calc(var(--aui-table-border-width) + var(--aui-table-row-min-height-m))}.aui-table__row:first-child{border-top-left-radius:var(--aui-border-radius-l);border-top-right-radius:var(--aui-border-radius-l)}.aui-table__row:last-child{border-bottom-width:var(--aui-table-border-width);min-height:calc(var(--aui-table-border-width) + var(--aui-table-row-min-height-m));border-bottom-left-radius:var(--aui-border-radius-l);border-bottom-right-radius:var(--aui-border-radius-l)}.aui-table__row.isDisabled:before{content:\"\";z-index:2;position:absolute;top:0;left:0;width:100%;height:100%;background-color:#fff;opacity:.7;cursor:not-allowed}.aui-table__header-row{background-color:rgb(var(--aui-color-n-9));padding:0 calc(var(--aui-table-cell-padding-lr) / 2)}.aui-table__cell,.aui-table__header-cell{flex:1}.aui-table__cell{padding:var(--aui-table-cell-padding-tb-m) calc(var(--aui-table-cell-padding-lr) / 2);background-color:rgb(var(--aui-color-n-10));overflow:hidden;word-wrap:break-word}.aui-table__header-cell{padding:var(--aui-table-header-cell-padding-tb) calc(var(--aui-table-cell-padding-lr) / 2);font-weight:500;height:var(--aui-table-header-height);line-height:var(--aui-line-height-m);background-color:rgb(var(--aui-color-n-9));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]
|
|
1347
1359
|
},] }
|
|
1348
1360
|
];
|
|
1349
1361
|
TableComponent.propDecorators = {
|
|
@@ -1372,7 +1384,7 @@
|
|
|
1372
1384
|
TableHeaderRowDefDirective,
|
|
1373
1385
|
TableHeaderCellDefDirective,
|
|
1374
1386
|
TableColumnDefDirective,
|
|
1375
|
-
|
|
1387
|
+
TableScrollShadowDirective,
|
|
1376
1388
|
TablePlaceholderOutlet,
|
|
1377
1389
|
TablePlaceholderDefDirective,
|
|
1378
1390
|
],
|
|
@@ -1388,7 +1400,7 @@
|
|
|
1388
1400
|
TableHeaderRowDefDirective,
|
|
1389
1401
|
TableHeaderCellDefDirective,
|
|
1390
1402
|
TableColumnDefDirective,
|
|
1391
|
-
|
|
1403
|
+
TableScrollShadowDirective,
|
|
1392
1404
|
TablePlaceholderOutlet,
|
|
1393
1405
|
TablePlaceholderDefDirective,
|
|
1394
1406
|
],
|
|
@@ -12548,7 +12560,7 @@
|
|
|
12548
12560
|
exports.TableOfContentsModule = TableOfContentsModule;
|
|
12549
12561
|
exports.TableRowComponent = TableRowComponent;
|
|
12550
12562
|
exports.TableRowDefDirective = TableRowDefDirective;
|
|
12551
|
-
exports.
|
|
12563
|
+
exports.TableScrollShadowDirective = TableScrollShadowDirective;
|
|
12552
12564
|
exports.TabsModule = TabsModule;
|
|
12553
12565
|
exports.TagComponent = TagComponent;
|
|
12554
12566
|
exports.TagModule = TagModule;
|