@ni/nimble-components 18.9.0 → 18.10.0
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/all-components-bundle.js +522 -197
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1619 -1452
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/all-components.d.ts +1 -0
- package/dist/esm/all-components.js +1 -0
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/anchor/index.js +1 -0
- package/dist/esm/anchor/index.js.map +1 -1
- package/dist/esm/anchor-menu-item/index.d.ts +1 -3
- package/dist/esm/anchor-menu-item/index.js +2 -2
- package/dist/esm/anchor-menu-item/index.js.map +1 -1
- package/dist/esm/anchor-tab/index.js +1 -0
- package/dist/esm/anchor-tab/index.js.map +1 -1
- package/dist/esm/anchor-tab/styles.js +8 -0
- package/dist/esm/anchor-tab/styles.js.map +1 -1
- package/dist/esm/anchor-tab/template.d.ts +1 -1
- package/dist/esm/anchor-tab/template.js +4 -1
- package/dist/esm/anchor-tab/template.js.map +1 -1
- package/dist/esm/anchor-tree-item/index.d.ts +57 -0
- package/dist/esm/anchor-tree-item/index.js +117 -0
- package/dist/esm/anchor-tree-item/index.js.map +1 -0
- package/dist/esm/anchor-tree-item/styles.d.ts +1 -0
- package/dist/esm/anchor-tree-item/styles.js +108 -0
- package/dist/esm/anchor-tree-item/styles.js.map +1 -0
- package/dist/esm/anchor-tree-item/template.d.ts +4 -0
- package/dist/esm/anchor-tree-item/template.js +41 -0
- package/dist/esm/anchor-tree-item/template.js.map +1 -0
- package/dist/esm/table/components/cell/index.d.ts +4 -13
- package/dist/esm/table/components/cell/index.js +4 -35
- package/dist/esm/table/components/cell/index.js.map +1 -1
- package/dist/esm/table/components/cell/styles.js +1 -1
- package/dist/esm/table/components/cell/template.d.ts +3 -1
- package/dist/esm/table/components/cell/template.js +7 -3
- package/dist/esm/table/components/cell/template.js.map +1 -1
- package/dist/esm/table/components/row/index.d.ts +1 -0
- package/dist/esm/table/components/row/index.js +9 -0
- package/dist/esm/table/components/row/index.js.map +1 -1
- package/dist/esm/table/components/row/template.js +1 -2
- package/dist/esm/table/components/row/template.js.map +1 -1
- package/dist/esm/table/index.d.ts +9 -0
- package/dist/esm/table/index.js +10 -0
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/table/models/virtualizer.d.ts +1 -0
- package/dist/esm/table/models/virtualizer.js +21 -0
- package/dist/esm/table/models/virtualizer.js.map +1 -1
- package/dist/esm/table/template.js +1 -1
- package/dist/esm/table/template.js.map +1 -1
- package/dist/esm/table-column/base/cell-view/index.d.ts +16 -0
- package/dist/esm/table-column/base/cell-view/index.js +22 -0
- package/dist/esm/table-column/base/cell-view/index.js.map +1 -0
- package/dist/esm/table-column/base/index.d.ts +10 -13
- package/dist/esm/table-column/base/index.js +12 -0
- package/dist/esm/table-column/base/index.js.map +1 -1
- package/dist/esm/table-column/text/cell-view/index.d.ts +18 -0
- package/dist/esm/table-column/text/cell-view/index.js +35 -0
- package/dist/esm/table-column/text/cell-view/index.js.map +1 -0
- package/dist/esm/table-column/text/cell-view/styles.d.ts +1 -0
- package/dist/esm/table-column/text/{styles.js → cell-view/styles.js} +2 -2
- package/dist/esm/table-column/text/cell-view/styles.js.map +1 -0
- package/dist/esm/table-column/text/cell-view/template.d.ts +2 -0
- package/dist/esm/table-column/text/cell-view/template.js +17 -0
- package/dist/esm/table-column/text/cell-view/template.js.map +1 -0
- package/dist/esm/table-column/text/index.d.ts +2 -3
- package/dist/esm/table-column/text/index.js +2 -4
- package/dist/esm/table-column/text/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/table-column/text/styles.d.ts +0 -1
- package/dist/esm/table-column/text/styles.js.map +0 -1
- package/dist/esm/table-column/text/template.d.ts +0 -3
- package/dist/esm/table-column/text/template.js +0 -24
- package/dist/esm/table-column/text/template.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,UAAU,CAAC;AAClB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,SAAS,CAAC;AACjB,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,CAAC;AAClB,OAAO,WAAW,CAAC;AACnB,OAAO,UAAU,CAAC;AAClB,OAAO,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,SAAS,CAAC;AACjB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,QAAQ,CAAC;AAChB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AACzB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,UAAU,CAAC;AAClB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,eAAe,CAAC;AACvB,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,SAAS,CAAC;AACjB,OAAO,eAAe,CAAC;AACvB,OAAO,UAAU,CAAC;AAClB,OAAO,WAAW,CAAC;AACnB,OAAO,UAAU,CAAC;AAClB,OAAO,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,SAAS,CAAC;AACjB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,QAAQ,CAAC;AAChB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AACzB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC"}
|
package/dist/esm/anchor/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __decorate([
|
|
|
24
24
|
__decorate([
|
|
25
25
|
attr
|
|
26
26
|
], Anchor.prototype, "appearance", void 0);
|
|
27
|
+
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
27
28
|
const nimbleAnchor = Anchor.compose({
|
|
28
29
|
baseName: 'anchor',
|
|
29
30
|
baseClass: FoundationAnchor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/anchor/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAE7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAStC;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU;IAAtC;;QACI;;;;WAIG;QAEI,oBAAe,GAAG,KAAK,CAAC;IASnC,CAAC;CAAA;AATG;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;+CAC1B;AAQ/B;IADC,IAAI;0CAC+B;AAGxC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAgB;IAC/C,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACX,cAAc,EAAE,IAAI;KACvB;CACJ,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/anchor/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EACZ,MAAM,IAAI,gBAAgB,EAE7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAStC;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,UAAU;IAAtC;;QACI;;;;WAIG;QAEI,oBAAe,GAAG,KAAK,CAAC;IASnC,CAAC;CAAA;AATG;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;+CAC1B;AAQ/B;IADC,IAAI;0CAC+B;AAGxC,uFAAuF;AAEvF,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAgB;IAC/C,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACX,cAAc,EAAE,IAAI;KACvB;CACJ,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MenuItemColumnCount
|
|
1
|
+
import { MenuItemColumnCount } from '@microsoft/fast-foundation';
|
|
2
2
|
import { AnchorBase } from '../anchor-base';
|
|
3
3
|
declare global {
|
|
4
4
|
interface HTMLElementTagNameMap {
|
|
@@ -33,6 +33,4 @@ export declare class AnchorMenuItem extends AnchorBase {
|
|
|
33
33
|
get tabIndex(): number;
|
|
34
34
|
set tabIndex(value: number);
|
|
35
35
|
}
|
|
36
|
-
export interface AnchorMenuItem extends StartEnd {
|
|
37
|
-
}
|
|
38
36
|
export declare const anchorMenuItemTag: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { attr, observable } from '@microsoft/fast-element';
|
|
3
|
-
import { DesignSystem, MenuItem as FoundationMenuItem
|
|
3
|
+
import { DesignSystem, MenuItem as FoundationMenuItem } from '@microsoft/fast-foundation';
|
|
4
4
|
import { keyEnter } from '@microsoft/fast-web-utilities';
|
|
5
5
|
import { AnchorBase } from '../anchor-base';
|
|
6
6
|
import { styles } from './styles';
|
|
@@ -79,6 +79,7 @@ __decorate([
|
|
|
79
79
|
__decorate([
|
|
80
80
|
observable
|
|
81
81
|
], AnchorMenuItem.prototype, "startColumnCount", void 0);
|
|
82
|
+
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
82
83
|
const nimbleAnchorMenuItem = AnchorMenuItem.compose({
|
|
83
84
|
baseName: 'anchor-menu-item',
|
|
84
85
|
template,
|
|
@@ -87,7 +88,6 @@ const nimbleAnchorMenuItem = AnchorMenuItem.compose({
|
|
|
87
88
|
delegatesFocus: true
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
|
-
applyMixins(AnchorMenuItem, StartEnd);
|
|
91
91
|
DesignSystem.getOrCreate()
|
|
92
92
|
.withPrefix('nimble')
|
|
93
93
|
.register(nimbleAnchorMenuItem());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/anchor-menu-item/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACH,YAAY,EAEZ,QAAQ,IAAI,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/anchor-menu-item/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACH,YAAY,EAEZ,QAAQ,IAAI,kBAAkB,EAEjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAA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tC,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC;IACjC,CAAC;CACJ;AAtEG;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;gDACF;AAMxB;IADC,UAAU;8CACuB;AASlC;IADC,UAAU;wDACsC;AAyDrD,uFAAuF;AAEvF,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,CAAgB;IAC/D,QAAQ,EAAE,kBAAkB;IAC5B,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACX,cAAc,EAAE,IAAI;KACvB;CACJ,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAErE,gFAAgF;AAChF,iFAAiF;AACjF,oFAAoF;AACpF,gEAAgE;AAChE,EAAE;AACF,gFAAgF;AAChF,6EAA6E;AAC7E,4DAA4D;AAC5D,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAC3F,MAAM,CAAC,cAAc,CAAC,kBAAkB,EAAE,MAAM,CAAC,WAAW,EAAE;IAC1D,KAAK,CAAC,QAAiB;QACnB,OAAO,CACH,kBAAkB,CAAC,QAAQ,CAAC,IAAI,QAAQ,YAAY,cAAc,CACrE,CAAC;IACN,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -22,6 +22,7 @@ export class AnchorTab extends AnchorBase {
|
|
|
22
22
|
__decorate([
|
|
23
23
|
attr({ mode: 'boolean' })
|
|
24
24
|
], AnchorTab.prototype, "disabled", void 0);
|
|
25
|
+
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
25
26
|
const nimbleAnchorTab = AnchorTab.compose({
|
|
26
27
|
baseName: 'anchor-tab',
|
|
27
28
|
template,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/anchor-tab/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EAGf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IAAzC;;QACI;;;;;WAKG;QAEI,aAAQ,GAAG,KAAK,CAAC;IAC5B,CAAC;CAAA;AADG;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;2CACF;AAG5B,MAAM,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC;IACtC,QAAQ,EAAE,YAAY;IACtB,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/anchor-tab/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,YAAY,EAGf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUtC;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IAAzC;;QACI;;;;;WAKG;QAEI,aAAQ,GAAG,KAAK,CAAC;IAC5B,CAAC;CAAA;AADG;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;2CACF;AAG5B,uFAAuF;AAEvF,MAAM,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC;IACtC,QAAQ,EAAE,YAAY;IACtB,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/anchor-tab/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,SAAS
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/anchor-tab/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,SAAS;;;;;;;;;;;;;;;;CAgBd,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
-
import
|
|
2
|
+
import { FoundationElementTemplate } from '@microsoft/fast-foundation';
|
|
3
3
|
import type { AnchorTab, TabOptions } from '.';
|
|
4
4
|
export declare const template: FoundationElementTemplate<ViewTemplate<AnchorTab>, TabOptions>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { html } from '@microsoft/fast-element';
|
|
2
|
-
|
|
2
|
+
import { endSlotTemplate, startSlotTemplate } from '@microsoft/fast-foundation';
|
|
3
|
+
export const template = (context, definition) => html `
|
|
3
4
|
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
|
|
4
5
|
<a
|
|
5
6
|
download="${x => x.download}"
|
|
@@ -12,7 +13,9 @@ export const template = () => html `
|
|
|
12
13
|
type="${x => x.type}"
|
|
13
14
|
tabindex="-1"
|
|
14
15
|
>
|
|
16
|
+
${startSlotTemplate(context, definition)}
|
|
15
17
|
<slot></slot>
|
|
18
|
+
${endSlotTemplate(context, definition)}
|
|
16
19
|
</a>
|
|
17
20
|
</template>
|
|
18
21
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/anchor-tab/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/anchor-tab/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAgB,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACH,eAAe,EAEf,iBAAiB,EACpB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,CAAC,MAAM,QAAQ,GAGjB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,IAAI,CAAW;2DACe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;;wBAElD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;mBACpB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;wBAC5B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;oBACnB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;8BACD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc;mBAChC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG;sBACP,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM;oBACf,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;;;cAGjB,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC;;cAEtC,eAAe,CAAC,OAAO,EAAE,UAAU,CAAC;;;CAGjD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AnchorBase } from '../anchor-base';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
'nimble-anchor-tree-item': AnchorTreeItem;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A nimble-styled anchor tree item
|
|
9
|
+
*/
|
|
10
|
+
export declare class AnchorTreeItem extends AnchorBase {
|
|
11
|
+
/**
|
|
12
|
+
* When true, the control will appear selected by user interaction.
|
|
13
|
+
* @public
|
|
14
|
+
* @remarks
|
|
15
|
+
* HTML Attribute: selected
|
|
16
|
+
*/
|
|
17
|
+
selected: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information.
|
|
20
|
+
* @public
|
|
21
|
+
* @remarks
|
|
22
|
+
* HTML Attribute: disabled
|
|
23
|
+
*/
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the tree is nested
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
isNestedItem(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Handle focus events
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
handleFocus(_e: FocusEvent): void;
|
|
37
|
+
/**
|
|
38
|
+
* Handle blur events
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
handleBlur(_e: FocusEvent): void;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
keydownHandler(e: KeyboardEvent): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Activating the anchor by pressing the Enter key results in a click event.
|
|
49
|
+
* This bubbles up to the Nimble tree-view's click handler, causing the tree item
|
|
50
|
+
* to be selected. We don't want that for anchor tree items. We'll stop propagation
|
|
51
|
+
* of the event to prevent that.
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
clickHandler(e: MouseEvent): boolean;
|
|
55
|
+
protected selectedChanged(_prev: boolean | undefined, _next: boolean): void;
|
|
56
|
+
}
|
|
57
|
+
export declare const anchorTreeItemTag: string;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
3
|
+
import { DesignSystem, isTreeItemElement, TreeItem as FoundationTreeItem } from '@microsoft/fast-foundation';
|
|
4
|
+
import { keyArrowLeft, keyEnter } from '@microsoft/fast-web-utilities';
|
|
5
|
+
import { AnchorBase } from '../anchor-base';
|
|
6
|
+
import { styles } from './styles';
|
|
7
|
+
import { template } from './template';
|
|
8
|
+
/**
|
|
9
|
+
* A nimble-styled anchor tree item
|
|
10
|
+
*/
|
|
11
|
+
export class AnchorTreeItem extends AnchorBase {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
/**
|
|
15
|
+
* When true, the control will appear selected by user interaction.
|
|
16
|
+
* @public
|
|
17
|
+
* @remarks
|
|
18
|
+
* HTML Attribute: selected
|
|
19
|
+
*/
|
|
20
|
+
this.selected = false;
|
|
21
|
+
/**
|
|
22
|
+
* When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information.
|
|
23
|
+
* @public
|
|
24
|
+
* @remarks
|
|
25
|
+
* HTML Attribute: disabled
|
|
26
|
+
*/
|
|
27
|
+
this.disabled = false;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Whether the tree is nested
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
isNestedItem() {
|
|
35
|
+
return isTreeItemElement(this.parentElement);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Handle focus events
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
handleFocus(_e) {
|
|
43
|
+
this.setAttribute('tabindex', '0');
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Handle blur events
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
handleBlur(_e) {
|
|
51
|
+
this.setAttribute('tabindex', '-1');
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
keydownHandler(e) {
|
|
57
|
+
if (e.defaultPrevented) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
switch (e.key) {
|
|
61
|
+
case keyEnter:
|
|
62
|
+
// Do not let the event bubble up to the FAST tree, or it will
|
|
63
|
+
// prevent the default action.
|
|
64
|
+
e.stopPropagation();
|
|
65
|
+
break;
|
|
66
|
+
case keyArrowLeft:
|
|
67
|
+
// For FAST tree items, the FAST tree view handles this navigation,
|
|
68
|
+
// but since our anchor tree item is not "instanceof FASTTreeItem",
|
|
69
|
+
// the FAST tree view won't do this for us. We do it ourselves.
|
|
70
|
+
if (this.parentElement && this.isNestedItem()) {
|
|
71
|
+
FoundationTreeItem.focusItem(this.parentElement);
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Activating the anchor by pressing the Enter key results in a click event.
|
|
80
|
+
* This bubbles up to the Nimble tree-view's click handler, causing the tree item
|
|
81
|
+
* to be selected. We don't want that for anchor tree items. We'll stop propagation
|
|
82
|
+
* of the event to prevent that.
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
clickHandler(e) {
|
|
86
|
+
if (e.defaultPrevented) {
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
e.stopPropagation();
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
selectedChanged(_prev, _next) {
|
|
93
|
+
if (this.$fastController.isConnected) {
|
|
94
|
+
this.$emit('selected-change', this);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
__decorate([
|
|
99
|
+
attr({ mode: 'boolean' })
|
|
100
|
+
], AnchorTreeItem.prototype, "selected", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
attr({ mode: 'boolean' })
|
|
103
|
+
], AnchorTreeItem.prototype, "disabled", void 0);
|
|
104
|
+
// FoundationAnchor already applies the StartEnd mixin, so we don't need to do it here.
|
|
105
|
+
const nimbleAnchorTreeItem = AnchorTreeItem.compose({
|
|
106
|
+
baseName: 'anchor-tree-item',
|
|
107
|
+
template,
|
|
108
|
+
styles,
|
|
109
|
+
shadowOptions: {
|
|
110
|
+
delegatesFocus: true
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
DesignSystem.getOrCreate()
|
|
114
|
+
.withPrefix('nimble')
|
|
115
|
+
.register(nimbleAnchorTreeItem());
|
|
116
|
+
export const anchorTreeItemTag = DesignSystem.tagFor(AnchorTreeItem);
|
|
117
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/anchor-tree-item/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,C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AAC;iBACpD;gBACD,MAAM;YACV,QAAQ;SACX;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACI,YAAY,CAAC,CAAa;QAC7B,IAAI,CAAC,CAAC,gBAAgB,EAAE;YACpB,OAAO,KAAK,CAAC;SAChB;QACD,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAES,eAAe,CACrB,KAA0B,EAC1B,KAAc;QAEd,IAAI,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE;YAClC,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;SACvC;IACL,CAAC;CACJ;AAvFG;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;gDACF;AASxB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;gDACF;AAgF5B,uFAAuF;AAEvF,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,CAAgB;IAC/D,QAAQ,EAAE,kBAAkB;IAC5B,QAAQ;IACR,MAAM;IACN,aAAa,EAAE;QACX,cAAc,EAAE,IAAI;KACvB;CACJ,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,oBAAoB,EAAE,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,iBAAiB,GAAG,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { bodyFontFamily, bodyFontWeight, bodyFontColor, borderHoverColor, borderWidth, iconSize, fillHoverColor, fillHoverSelectedColor, fillSelectedColor, bodyFontSize } from '../theme-provider/design-tokens';
|
|
4
|
+
import { focusVisible } from '../utilities/style/focus';
|
|
5
|
+
export const styles = css `
|
|
6
|
+
${display('block')}
|
|
7
|
+
|
|
8
|
+
:host {
|
|
9
|
+
${
|
|
10
|
+
/* don't set font-size here or else it overrides what we set on .items */ ''}
|
|
11
|
+
font-family: ${bodyFontFamily};
|
|
12
|
+
font-weight: ${bodyFontWeight};
|
|
13
|
+
contain: content;
|
|
14
|
+
position: relative;
|
|
15
|
+
outline: none;
|
|
16
|
+
color: ${bodyFontColor};
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
--ni-private-tree-item-nested-width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.control {
|
|
22
|
+
display: flex;
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
color: ${bodyFontColor};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.control${focusVisible} {
|
|
28
|
+
box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
|
|
29
|
+
outline: ${borderWidth} solid ${borderHoverColor};
|
|
30
|
+
outline-offset: -2px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([disabled]) .control {
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.positioning-region {
|
|
38
|
+
display: flex;
|
|
39
|
+
position: relative;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
height: calc(${iconSize} * 2);
|
|
42
|
+
width: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.positioning-region:hover {
|
|
46
|
+
background: ${fillHoverColor};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host([selected]) .positioning-region {
|
|
50
|
+
background: ${fillSelectedColor};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host([selected]) .positioning-region:hover {
|
|
54
|
+
background: ${fillHoverSelectedColor};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.positioning-region::before {
|
|
58
|
+
content: '';
|
|
59
|
+
display: block;
|
|
60
|
+
width: var(--ni-private-tree-item-nested-width);
|
|
61
|
+
flex-shrink: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.content-region {
|
|
65
|
+
display: inline-flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
width: 100%;
|
|
69
|
+
padding-left: 10px;
|
|
70
|
+
font: inherit;
|
|
71
|
+
font-size: ${bodyFontSize};
|
|
72
|
+
user-select: none;
|
|
73
|
+
position: relative;
|
|
74
|
+
margin-inline-start: ${iconSize};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:host([disabled]) .content-region {
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
${
|
|
83
|
+
/* this rule keeps children without an icon text aligned with parents */ ''}
|
|
84
|
+
span[part="start"] {
|
|
85
|
+
width: ${iconSize};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
${ /* the start class is applied when the corresponding slot is filled */''}
|
|
89
|
+
.start {
|
|
90
|
+
display: flex;
|
|
91
|
+
fill: currentcolor;
|
|
92
|
+
margin-inline-start: ${iconSize};
|
|
93
|
+
margin-inline-end: ${iconSize};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
slot[name='start']::slotted(*) {
|
|
97
|
+
width: ${iconSize};
|
|
98
|
+
height: ${iconSize};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
${ /* the end class is applied when the corresponding slot is filled */''}
|
|
102
|
+
.end {
|
|
103
|
+
display: flex;
|
|
104
|
+
fill: currentcolor;
|
|
105
|
+
margin-inline-start: ${iconSize};
|
|
106
|
+
}
|
|
107
|
+
`;
|
|
108
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/anchor-tree-item/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACH,cAAc,EACd,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,OAAO,CAAC;;;UAGZ;AACE,yEAAyE,CAAC,EAC9E;uBACe,cAAc;uBACd,cAAc;;;;iBAIpB,aAAa;;;;;;;;iBAQb,aAAa;;;cAGhB,YAAY;kCACQ,WAAW,IAAI,gBAAgB;mBAC9C,WAAW,UAAU,gBAAgB;;;;;;;;;;;;uBAYjC,QAAQ;;;;;sBAKT,cAAc;;;;sBAId,iBAAiB;;;;sBAIjB,sBAAsB;;;;;;;;;;;;;;;;;qBAiBvB,YAAY;;;+BAGF,QAAQ;;;;;;;;MAQjC;AACE,wEAAwE,CAAC,EAC7E;;iBAEa,QAAQ;;;MAGnB,CAAA,sEAAuE,EAAE;;;;+BAIhD,QAAQ;6BACV,QAAQ;;;;iBAIpB,QAAQ;kBACP,QAAQ;;;MAGpB,CAAA,oEAAqE,EAAE;;;;+BAI9C,QAAQ;;CAEtC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import { AnchorOptions, FoundationElementTemplate } from '@microsoft/fast-foundation';
|
|
3
|
+
import type { AnchorTreeItem } from '.';
|
|
4
|
+
export declare const template: FoundationElementTemplate<ViewTemplate<AnchorTreeItem>, AnchorOptions>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { html, ref } from '@microsoft/fast-element';
|
|
2
|
+
import { endSlotTemplate, startSlotTemplate } from '@microsoft/fast-foundation';
|
|
3
|
+
export const template = (context, definition) => html `
|
|
4
|
+
<template
|
|
5
|
+
role="treeitem"
|
|
6
|
+
slot="${x => (x.isNestedItem() ? 'item' : null)}"
|
|
7
|
+
tabindex="-1"
|
|
8
|
+
aria-disabled="${x => x.disabled}"
|
|
9
|
+
aria-selected="${x => x.selected}"
|
|
10
|
+
@focusin="${(x, c) => x.handleFocus(c.event)}"
|
|
11
|
+
@focusout="${(x, c) => x.handleBlur(c.event)}"
|
|
12
|
+
@keydown="${(x, c) => x.keydownHandler(c.event)}"
|
|
13
|
+
@click="${(x, c) => x.clickHandler(c.event)}"
|
|
14
|
+
>
|
|
15
|
+
<a
|
|
16
|
+
class="control"
|
|
17
|
+
part="control"
|
|
18
|
+
tabindex="0"
|
|
19
|
+
download="${x => x.download}"
|
|
20
|
+
href=${x => (x.disabled ? null : x.href)}
|
|
21
|
+
hreflang="${x => x.hreflang}"
|
|
22
|
+
ping="${x => x.ping}"
|
|
23
|
+
referrerpolicy="${x => x.referrerpolicy}"
|
|
24
|
+
rel="${x => x.rel}"
|
|
25
|
+
target="${x => x.target}"
|
|
26
|
+
type="${x => x.type}"
|
|
27
|
+
${ref('control')}
|
|
28
|
+
>
|
|
29
|
+
<div class="positioning-region" part="positioning-region">
|
|
30
|
+
<div class="content-region" part="content-region">
|
|
31
|
+
${startSlotTemplate(context, definition)}
|
|
32
|
+
<span class="content" part="content">
|
|
33
|
+
<slot></slot>
|
|
34
|
+
</span>
|
|
35
|
+
${endSlotTemplate(context, definition)}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</a>
|
|
39
|
+
</template>
|
|
40
|
+
`;
|
|
41
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/anchor-tree-item/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAgB,MAAM,yBA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C,EAAE,CAAC,CAAC,CAAC,IAAI;cACjB,GAAG,CAAC,SAAS,CAAC;;;;sBAIN,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC;;;;sBAItC,eAAe,CAAC,OAAO,EAAE,UAAU,CAAC;;;;;CAKzD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ViewTemplate } from '@microsoft/fast-element';
|
|
2
2
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
|
+
import type { MenuButton } from '../../../menu-button';
|
|
3
4
|
import type { MenuButtonToggleEventDetail } from '../../../menu-button/types';
|
|
4
5
|
import type { TableCellRecord, TableCellState } from '../../../table-column/base/types';
|
|
5
6
|
declare global {
|
|
@@ -13,22 +14,12 @@ declare global {
|
|
|
13
14
|
*/
|
|
14
15
|
export declare class TableCell<TCellRecord extends TableCellRecord = TableCellRecord> extends FoundationElement {
|
|
15
16
|
cellState?: TableCellState<TCellRecord>;
|
|
16
|
-
cellTemplate?: ViewTemplate;
|
|
17
|
-
cellStyles?: ElementStyles;
|
|
18
17
|
hasActionMenu: boolean;
|
|
19
18
|
menuOpen: boolean;
|
|
20
19
|
actionMenuLabel?: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
readonly cellContentContainer: HTMLElement;
|
|
25
|
-
private customCellView?;
|
|
26
|
-
connectedCallback(): void;
|
|
27
|
-
disconnectedCallback(): void;
|
|
20
|
+
cellViewTemplate?: ViewTemplate<TableCell>;
|
|
21
|
+
readonly actionMenuButton?: MenuButton;
|
|
28
22
|
onActionMenuBeforeToggle(event: CustomEvent<MenuButtonToggleEventDetail>): void;
|
|
29
23
|
onActionMenuToggle(event: CustomEvent<MenuButtonToggleEventDetail>): void;
|
|
30
|
-
protected cellStateChanged(): void;
|
|
31
|
-
protected cellTemplateChanged(): void;
|
|
32
|
-
protected cellStylesChanged(prev?: ElementStyles, next?: ElementStyles): void;
|
|
33
24
|
}
|
|
34
25
|
export declare const tableCellTag: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { attr,
|
|
2
|
+
import { attr, observable } from '@microsoft/fast-element';
|
|
3
3
|
import { DesignSystem, FoundationElement } from '@microsoft/fast-foundation';
|
|
4
4
|
import { styles } from './styles';
|
|
5
5
|
import { template } from './template';
|
|
@@ -12,18 +12,6 @@ export class TableCell extends FoundationElement {
|
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.hasActionMenu = false;
|
|
14
14
|
this.menuOpen = false;
|
|
15
|
-
this.customCellView = undefined;
|
|
16
|
-
}
|
|
17
|
-
connectedCallback() {
|
|
18
|
-
super.connectedCallback();
|
|
19
|
-
this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
|
|
20
|
-
}
|
|
21
|
-
disconnectedCallback() {
|
|
22
|
-
super.disconnectedCallback();
|
|
23
|
-
if (this.customCellView) {
|
|
24
|
-
this.customCellView.dispose();
|
|
25
|
-
this.customCellView = undefined;
|
|
26
|
-
}
|
|
27
15
|
}
|
|
28
16
|
onActionMenuBeforeToggle(event) {
|
|
29
17
|
this.$emit('cell-action-menu-beforetoggle', event.detail);
|
|
@@ -32,32 +20,10 @@ export class TableCell extends FoundationElement {
|
|
|
32
20
|
this.menuOpen = event.detail.newState;
|
|
33
21
|
this.$emit('cell-action-menu-toggle', event.detail);
|
|
34
22
|
}
|
|
35
|
-
cellStateChanged() {
|
|
36
|
-
this.customCellView?.bind(this.cellState, defaultExecutionContext);
|
|
37
|
-
}
|
|
38
|
-
cellTemplateChanged() {
|
|
39
|
-
if (this.$fastController.isConnected) {
|
|
40
|
-
this.customCellView = this.cellTemplate?.render(this.cellState, this.cellContentContainer);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
cellStylesChanged(prev, next) {
|
|
44
|
-
if (prev) {
|
|
45
|
-
this.$fastController.removeStyles(prev);
|
|
46
|
-
}
|
|
47
|
-
if (next) {
|
|
48
|
-
this.$fastController.addStyles(next);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
23
|
}
|
|
52
24
|
__decorate([
|
|
53
25
|
observable
|
|
54
26
|
], TableCell.prototype, "cellState", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
observable
|
|
57
|
-
], TableCell.prototype, "cellTemplate", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
observable
|
|
60
|
-
], TableCell.prototype, "cellStyles", void 0);
|
|
61
27
|
__decorate([
|
|
62
28
|
attr({ attribute: 'has-action-menu', mode: 'boolean' })
|
|
63
29
|
], TableCell.prototype, "hasActionMenu", void 0);
|
|
@@ -67,6 +33,9 @@ __decorate([
|
|
|
67
33
|
__decorate([
|
|
68
34
|
attr({ attribute: 'action-menu-label' })
|
|
69
35
|
], TableCell.prototype, "actionMenuLabel", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
observable
|
|
38
|
+
], TableCell.prototype, "cellViewTemplate", void 0);
|
|
70
39
|
const nimbleTableCell = TableCell.compose({
|
|
71
40
|
baseName: 'table-cell',
|
|
72
41
|
template,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table/components/cell/index.ts"],"names":[],"mappings":";AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table/components/cell/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAgB,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAO7E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC;;;GAGG;AACH,MAAM,OAAO,SAEX,SAAQ,iBAAiB;IAF3B;;QAOW,kBAAa,GAAG,KAAK,CAAC;QAGtB,aAAQ,GAAG,KAAK,CAAC;IAsB5B,CAAC;IAZU,wBAAwB,CAC3B,KAA+C;QAE/C,IAAI,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;IAEM,kBAAkB,CACrB,KAA+C;QAE/C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;CACJ;AA5BG;IADC,UAAU;4CACoC;AAG/C;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;gDAC3B;AAG7B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;2CAC1B;AAGxB;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;kDACT;AAGhC;IADC,UAAU;mDACuC;AAkBtD,MAAM,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC;IACtC,QAAQ,EAAE,YAAY;IACtB,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import { ViewTemplate } from '@microsoft/fast-element';
|
|
1
2
|
import type { TableCell } from '.';
|
|
2
|
-
export declare const template:
|
|
3
|
+
export declare const template: ViewTemplate<TableCell<import("../../../table-column/base/types").TableCellRecord>, any>;
|
|
4
|
+
export declare const createCellViewTemplate: (cellViewTag: string) => ViewTemplate<TableCell>;
|