@ni/nimble-components 18.13.6 → 19.0.1
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 +141 -94
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +969 -967
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/icon-base/icon-metadata.js +9 -6
- package/dist/esm/icon-base/icon-metadata.js.map +1 -1
- package/dist/esm/icons/all-icons.d.ts +3 -2
- package/dist/esm/icons/all-icons.js +3 -2
- package/dist/esm/icons/all-icons.js.map +1 -1
- package/dist/esm/icons/down-right-from-square.d.ts +13 -0
- package/dist/esm/icons/down-right-from-square.js +16 -0
- package/dist/esm/icons/down-right-from-square.js.map +1 -0
- package/dist/esm/icons/file-arrow-curved-right.d.ts +13 -0
- package/dist/esm/icons/file-arrow-curved-right.js +16 -0
- package/dist/esm/icons/file-arrow-curved-right.js.map +1 -0
- package/dist/esm/icons/up-right-from-square.d.ts +13 -0
- package/dist/esm/icons/up-right-from-square.js +16 -0
- package/dist/esm/icons/up-right-from-square.js.map +1 -0
- package/dist/esm/table/types.d.ts +6 -1
- package/dist/esm/table/types.js.map +1 -1
- package/dist/esm/table-column/base/group-header-view/index.d.ts +3 -2
- package/dist/esm/table-column/base/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/text/cell-view/index.d.ts +6 -8
- package/dist/esm/table-column/text/cell-view/index.js +12 -21
- package/dist/esm/table-column/text/cell-view/index.js.map +1 -1
- package/dist/esm/table-column/text/group-header-view/index.d.ts +8 -12
- package/dist/esm/table-column/text/group-header-view/index.js +11 -27
- package/dist/esm/table-column/text/group-header-view/index.js.map +1 -1
- package/dist/esm/table-column/text/index.d.ts +3 -28
- package/dist/esm/table-column/text/index.js +3 -23
- package/dist/esm/table-column/text/index.js.map +1 -1
- package/dist/esm/table-column/text-base/cell-view/index.d.ts +30 -0
- package/dist/esm/table-column/text-base/cell-view/index.js +23 -0
- package/dist/esm/table-column/text-base/cell-view/index.js.map +1 -0
- package/dist/esm/table-column/text-base/cell-view/styles.js.map +1 -0
- package/dist/esm/table-column/text-base/cell-view/template.d.ts +2 -0
- package/dist/esm/table-column/{text → text-base}/cell-view/template.js +1 -1
- package/dist/esm/table-column/text-base/cell-view/template.js.map +1 -0
- package/dist/esm/table-column/text-base/group-header-view/index.d.ts +35 -0
- package/dist/esm/table-column/text-base/group-header-view/index.js +31 -0
- package/dist/esm/table-column/text-base/group-header-view/index.js.map +1 -0
- package/dist/esm/table-column/text-base/group-header-view/styles.js.map +1 -0
- package/dist/esm/table-column/text-base/group-header-view/template.d.ts +2 -0
- package/dist/esm/table-column/{text → text-base}/group-header-view/template.js +2 -4
- package/dist/esm/table-column/text-base/group-header-view/template.js.map +1 -0
- package/dist/esm/table-column/text-base/index.d.ts +32 -0
- package/dist/esm/table-column/text-base/index.js +26 -0
- package/dist/esm/table-column/text-base/index.js.map +1 -0
- package/package.json +3 -3
- package/dist/esm/icons/file-export.d.ts +0 -13
- package/dist/esm/icons/file-export.js +0 -16
- package/dist/esm/icons/file-export.js.map +0 -1
- package/dist/esm/icons/share-square.d.ts +0 -13
- package/dist/esm/icons/share-square.js +0 -16
- package/dist/esm/icons/share-square.js.map +0 -1
- package/dist/esm/table-column/text/cell-view/styles.js.map +0 -1
- package/dist/esm/table-column/text/cell-view/template.d.ts +0 -2
- package/dist/esm/table-column/text/cell-view/template.js.map +0 -1
- package/dist/esm/table-column/text/group-header-view/styles.js.map +0 -1
- package/dist/esm/table-column/text/group-header-view/template.d.ts +0 -2
- package/dist/esm/table-column/text/group-header-view/template.js.map +0 -1
- /package/dist/esm/table-column/{text → text-base}/cell-view/styles.d.ts +0 -0
- /package/dist/esm/table-column/{text → text-base}/cell-view/styles.js +0 -0
- /package/dist/esm/table-column/{text → text-base}/group-header-view/styles.d.ts +0 -0
- /package/dist/esm/table-column/{text → text-base}/group-header-view/styles.js +0 -0
|
@@ -16366,7 +16366,7 @@
|
|
|
16366
16366
|
|
|
16367
16367
|
/**
|
|
16368
16368
|
* Do not edit directly
|
|
16369
|
-
* Generated on
|
|
16369
|
+
* Generated on Fri, 12 May 2023 23:29:26 GMT
|
|
16370
16370
|
*/
|
|
16371
16371
|
const Information100DarkUi = "#a46eff";
|
|
16372
16372
|
const Information100LightUi = "#804ad9";
|
|
@@ -19060,6 +19060,10 @@
|
|
|
19060
19060
|
name: 'dot_solid_dot_stroke_measurement_16_x_16',
|
|
19061
19061
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M5 3h1v3H5zM6 4h4v1H6zM10 3h1v3h-1zM7 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm5-2c-1.103 0-2 .897-2 2s.897 2 2 2 2-.897 2-2-.897-2-2-2m0-1a3 3 0 1 1 0 6 3 3 0 0 1 0-6Z"/></svg>`
|
|
19062
19062
|
};
|
|
19063
|
+
const downRightFromSquare16X16 = {
|
|
19064
|
+
name: 'down_right_from_square_16_x_16',
|
|
19065
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="m5.958 10.03 2.063-6.281.49 2.344 4.117-4.122 1.414 1.414L9.94 7.487l2.324.504-6.306 2.038Z"/><path class="cls-1" d="M8 10.42V12H4V8h1.572l.657-2H2v8h8V9.774l-2 .646z"/></svg>`
|
|
19066
|
+
};
|
|
19063
19067
|
const download16X16 = {
|
|
19064
19068
|
name: 'download_16_x_16',
|
|
19065
19069
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M14 9v5H2V9h1v4h10V9Zm-5.982 2L11 5.1 8.996 6.412 9 2H7v4.387L5 5.1Z"/></svg>`
|
|
@@ -19084,14 +19088,14 @@
|
|
|
19084
19088
|
name: 'file_16_x_16',
|
|
19085
19089
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M4 3v10h8V7H8V3Zm5 0v3h3Z"/></svg>`
|
|
19086
19090
|
};
|
|
19091
|
+
const fileArrowCurvedRight16X16 = {
|
|
19092
|
+
name: 'file_arrow_curved_right_16_x_16',
|
|
19093
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="m7 2 3 3H7V2ZM6 6V2H2v12h4.282l.03-.187A4.508 4.508 0 0 1 10 10.065V6H6Zm8 5.5L11 9v2c-1.817-.091-3.412 1.137-3.701 2.97.576-.672 2.077-2.065 3.701-1.82V14l3-2.5Z"/></svg>`
|
|
19094
|
+
};
|
|
19087
19095
|
const fileDrawer16X16 = {
|
|
19088
19096
|
name: 'file_drawer_16_x_16',
|
|
19089
19097
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M2 4v10h12V4Zm8 4H6V6h4Zm4-5H2V2h12Z"/></svg>`
|
|
19090
19098
|
};
|
|
19091
|
-
const fileExport = {
|
|
19092
|
-
name: 'file_export',
|
|
19093
|
-
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M6.8 13.6H2V3h4.2v4.2h4.2V10c-2 0-3.6 1.6-3.6 3.6Zm3.7-7.4H7.3V3l3.2 3.2Z"/><path d="M11.6 9.2v1.6c-1.9-.2-3.6 1.1-3.9 3 .6-.7 2.2-2.2 3.9-1.8v1.5l2.4-2.1-2.4-2.2Z"/></svg>`
|
|
19094
|
-
};
|
|
19095
19099
|
const fileSearch16X16 = {
|
|
19096
19100
|
name: 'file_search_16_x_16',
|
|
19097
19101
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M14 6v6h-3.333a3.662 3.662 0 0 0 .249-1.302A3.701 3.701 0 0 0 7.22 7 3.654 3.654 0 0 0 6 7.223V2h4v4Zm-3-4v3h3Zm-1.126 8.698a2.697 2.697 0 0 1-4.73 1.772L2.521 14l-.48-.823 2.613-1.523a2.698 2.698 0 1 1 5.22-.956Zm-.952 0a1.745 1.745 0 1 0-1.745 1.745 1.747 1.747 0 0 0 1.745-1.745Z"/></svg>`
|
|
@@ -19268,10 +19272,6 @@
|
|
|
19268
19272
|
name: 'share_nodes_16_x_16',
|
|
19269
19273
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M12 10c-.601 0-1.134.27-1.5.69L5.954 8.419a2 2 0 0 0 0-.836l4.544-2.273c.367.42.9.691 1.501.691a2 2 0 1 0-1.955-1.582L5.501 6.691C5.134 6.27 4.6 6 4 6a2 2 0 1 0 0 4c.601 0 1.134-.27 1.5-.69l4.545 2.272A2 2 0 1 0 12 10Z"/></svg>`
|
|
19270
19274
|
};
|
|
19271
|
-
const shareSquare16X16 = {
|
|
19272
|
-
name: 'share_square_16_x_16',
|
|
19273
|
-
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="m13.984 2.012-2.069 6.153-.565-2.722-3.544 3.544-.822-.822 3.544-3.544-2.723-.566ZM2 4v10h10v-4h-2v2H4V6h2V4Z"/></svg>`
|
|
19274
|
-
};
|
|
19275
19275
|
const shieldCheck16X16 = {
|
|
19276
19276
|
name: 'shield_check_16_x_16',
|
|
19277
19277
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M2 2v5.11C2 10.39 8 14 8 14s6-3.281 6-6.89V2Zm4.788 8.2L4 7.388 5.225 6.2l1.553 1.61 4.06-4.01L12 5.013Z"/></svg>`
|
|
@@ -19384,6 +19384,10 @@
|
|
|
19384
19384
|
name: 'unlock_16_x_16',
|
|
19385
19385
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M6.062 8V5.986a2.407 2.407 0 0 1 .566-1.516A1.834 1.834 0 0 1 8 4a1.883 1.883 0 0 1 2 2h2a3.888 3.888 0 0 0-4-4 3.822 3.822 0 0 0-2.81 1.078A4.349 4.349 0 0 0 4.062 6v2H3v6h10V8Z"/></svg>`
|
|
19386
19386
|
};
|
|
19387
|
+
const upRightFromSquare16X16 = {
|
|
19388
|
+
name: 'up_right_from_square_16_x_16',
|
|
19389
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M8 10.828V12H4V8h1.172l2-2H2v8h8V8.828l-2 2Z"/><path class="cls-1" d="m14.042 1.97-2.063 6.281-.49-2.344-4.117 4.122-1.414-1.414 4.102-4.102-2.324-.504 6.306-2.038z"/></svg>`
|
|
19390
|
+
};
|
|
19387
19391
|
const upload16X16 = {
|
|
19388
19392
|
name: 'upload_16_x_16',
|
|
19389
19393
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path class="cls-1" d="M14 9v5H2V9h1v4h10V9ZM7.982 2 5 7.9l2.004-1.312L7 11h2V6.613L11 7.9Z"/></svg>`
|
|
@@ -22080,6 +22084,18 @@
|
|
|
22080
22084
|
registerIcon('icon-dot-solid-dot-stroke-measurement', IconDotSolidDotStrokeMeasurement);
|
|
22081
22085
|
DesignSystem.tagFor(IconDotSolidDotStrokeMeasurement);
|
|
22082
22086
|
|
|
22087
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22088
|
+
/**
|
|
22089
|
+
* The icon component for the 'downRightFromSquare' icon
|
|
22090
|
+
*/
|
|
22091
|
+
class IconDownRightFromSquare extends Icon {
|
|
22092
|
+
constructor() {
|
|
22093
|
+
super(downRightFromSquare16X16);
|
|
22094
|
+
}
|
|
22095
|
+
}
|
|
22096
|
+
registerIcon('icon-down-right-from-square', IconDownRightFromSquare);
|
|
22097
|
+
DesignSystem.tagFor(IconDownRightFromSquare);
|
|
22098
|
+
|
|
22083
22099
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22084
22100
|
/**
|
|
22085
22101
|
* The icon component for the 'download' icon
|
|
@@ -22142,27 +22158,27 @@
|
|
|
22142
22158
|
|
|
22143
22159
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22144
22160
|
/**
|
|
22145
|
-
* The icon component for the '
|
|
22161
|
+
* The icon component for the 'fileArrowCurvedRight' icon
|
|
22146
22162
|
*/
|
|
22147
|
-
class
|
|
22163
|
+
class IconFileArrowCurvedRight extends Icon {
|
|
22148
22164
|
constructor() {
|
|
22149
|
-
super(
|
|
22165
|
+
super(fileArrowCurvedRight16X16);
|
|
22150
22166
|
}
|
|
22151
22167
|
}
|
|
22152
|
-
registerIcon('icon-file-
|
|
22153
|
-
DesignSystem.tagFor(
|
|
22168
|
+
registerIcon('icon-file-arrow-curved-right', IconFileArrowCurvedRight);
|
|
22169
|
+
DesignSystem.tagFor(IconFileArrowCurvedRight);
|
|
22154
22170
|
|
|
22155
22171
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22156
22172
|
/**
|
|
22157
|
-
* The icon component for the '
|
|
22173
|
+
* The icon component for the 'fileDrawer' icon
|
|
22158
22174
|
*/
|
|
22159
|
-
class
|
|
22175
|
+
class IconFileDrawer extends Icon {
|
|
22160
22176
|
constructor() {
|
|
22161
|
-
super(
|
|
22177
|
+
super(fileDrawer16X16);
|
|
22162
22178
|
}
|
|
22163
22179
|
}
|
|
22164
|
-
registerIcon('icon-file-
|
|
22165
|
-
DesignSystem.tagFor(
|
|
22180
|
+
registerIcon('icon-file-drawer', IconFileDrawer);
|
|
22181
|
+
DesignSystem.tagFor(IconFileDrawer);
|
|
22166
22182
|
|
|
22167
22183
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22168
22184
|
/**
|
|
@@ -22680,18 +22696,6 @@
|
|
|
22680
22696
|
registerIcon('icon-share-nodes', IconShareNodes);
|
|
22681
22697
|
DesignSystem.tagFor(IconShareNodes);
|
|
22682
22698
|
|
|
22683
|
-
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22684
|
-
/**
|
|
22685
|
-
* The icon component for the 'shareSquare' icon
|
|
22686
|
-
*/
|
|
22687
|
-
class IconShareSquare extends Icon {
|
|
22688
|
-
constructor() {
|
|
22689
|
-
super(shareSquare16X16);
|
|
22690
|
-
}
|
|
22691
|
-
}
|
|
22692
|
-
registerIcon('icon-share-square', IconShareSquare);
|
|
22693
|
-
DesignSystem.tagFor(IconShareSquare);
|
|
22694
|
-
|
|
22695
22699
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22696
22700
|
/**
|
|
22697
22701
|
* The icon component for the 'shieldCheck' icon
|
|
@@ -23016,6 +23020,18 @@
|
|
|
23016
23020
|
registerIcon('icon-unlock', IconUnlock);
|
|
23017
23021
|
DesignSystem.tagFor(IconUnlock);
|
|
23018
23022
|
|
|
23023
|
+
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
23024
|
+
/**
|
|
23025
|
+
* The icon component for the 'upRightFromSquare' icon
|
|
23026
|
+
*/
|
|
23027
|
+
class IconUpRightFromSquare extends Icon {
|
|
23028
|
+
constructor() {
|
|
23029
|
+
super(upRightFromSquare16X16);
|
|
23030
|
+
}
|
|
23031
|
+
}
|
|
23032
|
+
registerIcon('icon-up-right-from-square', IconUpRightFromSquare);
|
|
23033
|
+
DesignSystem.tagFor(IconUpRightFromSquare);
|
|
23034
|
+
|
|
23019
23035
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
23020
23036
|
/**
|
|
23021
23037
|
* The icon component for the 'upload' icon
|
|
@@ -31290,15 +31306,41 @@
|
|
|
31290
31306
|
DesignSystem.getOrCreate().withPrefix('nimble').register(anchorCellView());
|
|
31291
31307
|
const tableColumnAnchorCellViewTag = DesignSystem.tagFor(TableColumnAnchorCellView);
|
|
31292
31308
|
|
|
31309
|
+
/**
|
|
31310
|
+
* The group header view base class for displaying fields of any type as text.
|
|
31311
|
+
*/
|
|
31312
|
+
class TableColumnTextGroupHeaderViewBase extends TableGroupHeaderView {
|
|
31313
|
+
constructor() {
|
|
31314
|
+
super(...arguments);
|
|
31315
|
+
/** @internal */
|
|
31316
|
+
this.hasOverflow = false;
|
|
31317
|
+
}
|
|
31318
|
+
get content() {
|
|
31319
|
+
return this.shouldUsePlaceholder ? this.placeholder : this.text;
|
|
31320
|
+
}
|
|
31321
|
+
/** @internal */
|
|
31322
|
+
updateTitleOverflow() {
|
|
31323
|
+
this.hasOverflow = this.textSpan.offsetWidth < this.textSpan.scrollWidth;
|
|
31324
|
+
}
|
|
31325
|
+
/** @internal */
|
|
31326
|
+
clearTitleOverflow() {
|
|
31327
|
+
this.hasOverflow = false;
|
|
31328
|
+
}
|
|
31329
|
+
}
|
|
31330
|
+
__decorate$1([
|
|
31331
|
+
observable
|
|
31332
|
+
], TableColumnTextGroupHeaderViewBase.prototype, "hasOverflow", void 0);
|
|
31333
|
+
__decorate$1([
|
|
31334
|
+
volatile
|
|
31335
|
+
], TableColumnTextGroupHeaderViewBase.prototype, "content", null);
|
|
31336
|
+
|
|
31293
31337
|
const template$6 = html `
|
|
31294
31338
|
<span
|
|
31295
31339
|
${ref('textSpan')}
|
|
31296
|
-
class="${x => (
|
|
31340
|
+
class="${x => (x.shouldUsePlaceholder ? 'placeholder' : '')}"
|
|
31297
31341
|
@mouseover="${x => x.updateTitleOverflow()}"
|
|
31298
31342
|
@mouseout="${x => x.clearTitleOverflow()}"
|
|
31299
|
-
title="${x => (x.
|
|
31300
|
-
? x.content
|
|
31301
|
-
: undefined)}"
|
|
31343
|
+
title="${x => (x.hasOverflow && x.content ? x.content : undefined)}"
|
|
31302
31344
|
>
|
|
31303
31345
|
${x => x.content}
|
|
31304
31346
|
</span>
|
|
@@ -31319,33 +31361,19 @@
|
|
|
31319
31361
|
`;
|
|
31320
31362
|
|
|
31321
31363
|
/**
|
|
31322
|
-
* The
|
|
31323
|
-
* grouped by a TableColumnText column.
|
|
31364
|
+
* The group header view for displaying string fields as text.
|
|
31324
31365
|
*/
|
|
31325
|
-
class TableColumnTextGroupHeaderView extends
|
|
31326
|
-
|
|
31327
|
-
|
|
31328
|
-
/** @internal */
|
|
31329
|
-
this.isValidContentAndHasOverflow = false;
|
|
31330
|
-
}
|
|
31331
|
-
get content() {
|
|
31332
|
-
return typeof this.groupHeaderValue === 'string'
|
|
31333
|
-
? this.groupHeaderValue
|
|
31334
|
-
: this.columnConfig?.placeholder ?? '';
|
|
31366
|
+
class TableColumnTextGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
|
|
31367
|
+
get text() {
|
|
31368
|
+
return this.groupHeaderValue;
|
|
31335
31369
|
}
|
|
31336
|
-
|
|
31337
|
-
|
|
31370
|
+
get placeholder() {
|
|
31371
|
+
return this.columnConfig?.placeholder ?? '';
|
|
31338
31372
|
}
|
|
31339
|
-
|
|
31340
|
-
this.
|
|
31373
|
+
get shouldUsePlaceholder() {
|
|
31374
|
+
return typeof this.groupHeaderValue !== 'string';
|
|
31341
31375
|
}
|
|
31342
31376
|
}
|
|
31343
|
-
__decorate$1([
|
|
31344
|
-
observable
|
|
31345
|
-
], TableColumnTextGroupHeaderView.prototype, "isValidContentAndHasOverflow", void 0);
|
|
31346
|
-
__decorate$1([
|
|
31347
|
-
volatile
|
|
31348
|
-
], TableColumnTextGroupHeaderView.prototype, "content", null);
|
|
31349
31377
|
const tableColumnTextGroupHeaderView = TableColumnTextGroupHeaderView.compose({
|
|
31350
31378
|
baseName: 'table-column-text-group-header',
|
|
31351
31379
|
template: template$6,
|
|
@@ -31474,24 +31502,31 @@
|
|
|
31474
31502
|
.register(nimbleTableColumnAnchor());
|
|
31475
31503
|
DesignSystem.tagFor(TableColumnAnchor);
|
|
31476
31504
|
|
|
31477
|
-
|
|
31478
|
-
|
|
31479
|
-
|
|
31480
|
-
|
|
31481
|
-
|
|
31482
|
-
|
|
31483
|
-
|
|
31484
|
-
|
|
31485
|
-
|
|
31486
|
-
|
|
31487
|
-
|
|
31505
|
+
/**
|
|
31506
|
+
* The base class for table columns that display fields of any type as text.
|
|
31507
|
+
*/
|
|
31508
|
+
class TableColumnTextBase extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI((TableColumn))) {
|
|
31509
|
+
fieldNameChanged() {
|
|
31510
|
+
this.columnInternals.dataRecordFieldNames = [this.fieldName];
|
|
31511
|
+
this.columnInternals.operandDataRecordFieldName = this.fieldName;
|
|
31512
|
+
}
|
|
31513
|
+
placeholderChanged() {
|
|
31514
|
+
this.columnInternals.columnConfig = {
|
|
31515
|
+
placeholder: this.placeholder ?? ''
|
|
31516
|
+
};
|
|
31517
|
+
}
|
|
31488
31518
|
}
|
|
31489
|
-
|
|
31519
|
+
__decorate$1([
|
|
31520
|
+
attr({ attribute: 'field-name' })
|
|
31521
|
+
], TableColumnTextBase.prototype, "fieldName", void 0);
|
|
31522
|
+
__decorate$1([
|
|
31523
|
+
attr
|
|
31524
|
+
], TableColumnTextBase.prototype, "placeholder", void 0);
|
|
31490
31525
|
|
|
31491
31526
|
const template$5 = html `
|
|
31492
31527
|
<span
|
|
31493
31528
|
${ref('textSpan')}
|
|
31494
|
-
class="${x => (
|
|
31529
|
+
class="${x => (x.shouldUsePlaceholder ? 'placeholder' : '')}"
|
|
31495
31530
|
@mouseover="${x => {
|
|
31496
31531
|
x.isValidContentAndHasOverflow = !!x.content && x.textSpan.offsetWidth < x.textSpan.scrollWidth;
|
|
31497
31532
|
}}"
|
|
@@ -31504,27 +31539,54 @@
|
|
|
31504
31539
|
</span>
|
|
31505
31540
|
`;
|
|
31506
31541
|
|
|
31542
|
+
const styles$9 = css `
|
|
31543
|
+
span {
|
|
31544
|
+
font: ${bodyFont};
|
|
31545
|
+
color: ${bodyFontColor};
|
|
31546
|
+
white-space: nowrap;
|
|
31547
|
+
overflow: hidden;
|
|
31548
|
+
text-overflow: ellipsis;
|
|
31549
|
+
}
|
|
31550
|
+
|
|
31551
|
+
.placeholder {
|
|
31552
|
+
color: ${controlLabelFontColor};
|
|
31553
|
+
}
|
|
31554
|
+
`;
|
|
31555
|
+
|
|
31507
31556
|
/**
|
|
31508
|
-
*
|
|
31557
|
+
* The cell view base class for displaying fields of any type as text.
|
|
31509
31558
|
*/
|
|
31510
|
-
class
|
|
31559
|
+
class TableColumnTextCellViewBase extends TableCellView {
|
|
31511
31560
|
constructor() {
|
|
31512
31561
|
super(...arguments);
|
|
31513
31562
|
/** @internal */
|
|
31514
31563
|
this.isValidContentAndHasOverflow = false;
|
|
31515
31564
|
}
|
|
31516
31565
|
get content() {
|
|
31517
|
-
return
|
|
31518
|
-
? this.cellRecord.value
|
|
31519
|
-
: this.columnConfig.placeholder;
|
|
31566
|
+
return this.shouldUsePlaceholder ? this.placeholder : this.text;
|
|
31520
31567
|
}
|
|
31521
31568
|
}
|
|
31522
31569
|
__decorate$1([
|
|
31523
31570
|
observable
|
|
31524
|
-
],
|
|
31571
|
+
], TableColumnTextCellViewBase.prototype, "isValidContentAndHasOverflow", void 0);
|
|
31525
31572
|
__decorate$1([
|
|
31526
31573
|
volatile
|
|
31527
|
-
],
|
|
31574
|
+
], TableColumnTextCellViewBase.prototype, "content", null);
|
|
31575
|
+
|
|
31576
|
+
/**
|
|
31577
|
+
* A cell view for displaying string fields as text
|
|
31578
|
+
*/
|
|
31579
|
+
class TableColumnTextCellView extends TableColumnTextCellViewBase {
|
|
31580
|
+
get text() {
|
|
31581
|
+
return this.cellRecord.value;
|
|
31582
|
+
}
|
|
31583
|
+
get placeholder() {
|
|
31584
|
+
return this.columnConfig.placeholder;
|
|
31585
|
+
}
|
|
31586
|
+
get shouldUsePlaceholder() {
|
|
31587
|
+
return typeof this.cellRecord.value !== 'string';
|
|
31588
|
+
}
|
|
31589
|
+
}
|
|
31528
31590
|
const textCellView = TableColumnTextCellView.compose({
|
|
31529
31591
|
baseName: 'table-column-text-cell-view',
|
|
31530
31592
|
template: template$5,
|
|
@@ -31534,9 +31596,9 @@
|
|
|
31534
31596
|
const tableColumnTextCellViewTag = DesignSystem.tagFor(TableColumnTextCellView);
|
|
31535
31597
|
|
|
31536
31598
|
/**
|
|
31537
|
-
* The table column for displaying
|
|
31599
|
+
* The table column for displaying string fields as text.
|
|
31538
31600
|
*/
|
|
31539
|
-
class TableColumnText extends
|
|
31601
|
+
class TableColumnText extends TableColumnTextBase {
|
|
31540
31602
|
constructor() {
|
|
31541
31603
|
super({
|
|
31542
31604
|
cellRecordFieldNames: ['value'],
|
|
@@ -31546,22 +31608,7 @@
|
|
|
31546
31608
|
});
|
|
31547
31609
|
this.columnInternals.sortOperation = TableColumnSortOperation.localeAwareCaseSensitive;
|
|
31548
31610
|
}
|
|
31549
|
-
fieldNameChanged() {
|
|
31550
|
-
this.columnInternals.dataRecordFieldNames = [this.fieldName];
|
|
31551
|
-
this.columnInternals.operandDataRecordFieldName = this.fieldName;
|
|
31552
|
-
}
|
|
31553
|
-
placeholderChanged() {
|
|
31554
|
-
this.columnInternals.columnConfig = {
|
|
31555
|
-
placeholder: this.placeholder ?? ''
|
|
31556
|
-
};
|
|
31557
|
-
}
|
|
31558
31611
|
}
|
|
31559
|
-
__decorate$1([
|
|
31560
|
-
attr({ attribute: 'field-name' })
|
|
31561
|
-
], TableColumnText.prototype, "fieldName", void 0);
|
|
31562
|
-
__decorate$1([
|
|
31563
|
-
attr
|
|
31564
|
-
], TableColumnText.prototype, "placeholder", void 0);
|
|
31565
31612
|
const nimbleTableColumnText = TableColumnText.compose({
|
|
31566
31613
|
baseName: 'table-column-text',
|
|
31567
31614
|
template: template$8,
|