@nova-design-system/nova-react 3.2.0 → 3.4.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/cjs/{index-B2jv2KXv.js → index-CrgVjOZF.js} +1121 -1100
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{nv-alert.entry-pxBJfmIm.js → nv-alert.entry-CW72ajnD.js} +7 -7
- package/dist/cjs/{nv-avatar.entry-CHtVctSK.js → nv-avatar.entry-D9wUCu5K.js} +7 -7
- package/dist/cjs/{nv-badge_2.entry-BO88KO1O.js → nv-badge_2.entry-CQs2Sf6G.js} +1 -1
- package/dist/cjs/{nv-breadcrumb.entry-7azRtyl5.js → nv-breadcrumb.entry-CGrSsjAL.js} +1 -1
- package/dist/cjs/{nv-breadcrumbs.entry-DfZVMKpY.js → nv-breadcrumbs.entry-HStUGnwu.js} +1 -1
- package/dist/cjs/{nv-button.entry-DW9SblsY.js → nv-button.entry-BJfYc4Ow.js} +7 -7
- package/dist/cjs/{nv-calendar.entry-BeayRRor.js → nv-calendar.entry-Co8f_3E5.js} +396 -147
- package/dist/cjs/{nv-col.entry-C6oEkSbI.js → nv-col.entry-PJML3P46.js} +1 -1
- package/dist/cjs/{nv-datagrid.entry-xhQP6JJP.js → nv-datagrid.entry-Bpwt9yDb.js} +50 -17
- package/dist/cjs/{nv-datagridcolumn.entry-CjYmo4fM.js → nv-datagridcolumn.entry-Dfifeiia.js} +1 -1
- package/dist/cjs/{nv-dialog.entry-mxETaZbc.js → nv-dialog.entry-eUEzDdrS.js} +3 -3
- package/dist/cjs/{nv-dialogfooter_2.entry-DnLg2DHy.js → nv-dialogfooter_2.entry-HQyyE6VN.js} +3 -3
- package/dist/cjs/{nv-fieldcheckbox.entry-Be9__i15.js → nv-fieldcheckbox.entry-C5AMgttR.js} +1 -1
- package/dist/cjs/nv-fielddate.entry-Dkqz-UqJ.js +303 -0
- package/dist/cjs/nv-fielddaterange.entry-D6QmyWHp.js +462 -0
- package/dist/cjs/{nv-fielddropdown.entry-BPwviyCp.js → nv-fielddropdown.entry-BpZz90ob.js} +2 -2
- package/dist/cjs/{nv-fielddropdownitem.entry-BGuUR9KP.js → nv-fielddropdownitem.entry-BbJ9SKGo.js} +1 -1
- package/dist/cjs/{nv-fieldmultiselect.entry-Lrxr1gsi.js → nv-fieldmultiselect.entry-mnYvhkj0.js} +2 -2
- package/dist/cjs/nv-fieldnumber.entry-B5ED8fCU.js +130 -0
- package/dist/cjs/nv-fieldpassword.entry-ohASip15.js +121 -0
- package/dist/cjs/{nv-fieldradio.entry-CDu8xs0p.js → nv-fieldradio.entry-BPipemAC.js} +4 -4
- package/dist/cjs/{nv-fieldselect.entry-NEdv8bQK.js → nv-fieldselect.entry-BWZX6L-B.js} +7 -7
- package/dist/cjs/{nv-fieldslider.entry-51gF9XPz.js → nv-fieldslider.entry-nmE8TjBA.js} +28 -23
- package/dist/cjs/nv-fieldtext.entry-DxoznMYV.js +123 -0
- package/dist/cjs/nv-fieldtextarea.entry-BccBiMKe.js +198 -0
- package/dist/cjs/{nv-fieldtime.entry-MbaWbVtc.js → nv-fieldtime.entry-BmQ5DFbN.js} +67 -67
- package/dist/cjs/{nv-icon.entry-BSSHr-ud.js → nv-icon.entry-DE-sMmDp.js} +8 -8
- package/dist/cjs/{nv-iconbutton_2.entry-DMaO-JWz.js → nv-iconbutton_2.entry-DguqeTa3.js} +3 -3
- package/dist/cjs/{nv-menu.entry-D5_lj9XB.js → nv-menu.entry-UTPRtlti.js} +2 -2
- package/dist/cjs/{nv-menuitem.entry-fhnYI91K.js → nv-menuitem.entry-CaRqhVtk.js} +2 -2
- package/dist/cjs/{nv-popover.entry-CYqBaVbr.js → nv-popover.entry-ByFhVB2j.js} +3 -3
- package/dist/cjs/{nv-row.entry-BUheLufV.js → nv-row.entry-BIwxIl3Q.js} +2 -2
- package/dist/cjs/{nv-stack.entry-DNPce51E.js → nv-stack.entry-xDwyG0Xr.js} +2 -2
- package/dist/cjs/{nv-table.entry-DXQM8l3t.js → nv-table.entry-DCMcpbpc.js} +3 -3
- package/dist/cjs/{nv-tablecolumn.entry-DROQK_0c.js → nv-tablecolumn.entry-D_kTZ7Mp.js} +1 -1
- package/dist/cjs/{nv-toggle.entry-fMzTrdte.js → nv-toggle.entry-tds7tIzF.js} +3 -3
- package/dist/cjs/{nv-tooltip.entry-yB2Ek1Cz.js → nv-tooltip.entry-PfQ2HgFG.js} +2 -2
- package/dist/generated/components.js +9 -4
- package/dist/types/generated/components.d.ts +15 -4
- package/package.json +2 -2
- package/dist/cjs/nv-fielddate.entry-BlNily-X.js +0 -269
- package/dist/cjs/nv-fielddaterange.entry-CycpKoJd.js +0 -408
- package/dist/cjs/nv-fieldnumber.entry-B1VySoWj.js +0 -130
- package/dist/cjs/nv-fieldpassword.entry-D7Qlx7Bh.js +0 -121
- package/dist/cjs/nv-fieldtext.entry-Bug9zMgo.js +0 -123
- package/dist/cjs/nv-fieldtextarea.entry-D44HbsVQ.js +0 -198
- /package/dist/cjs/{constants-b97e736d-BzFAKCkR.js → constants-4faa1fae-BzFAKCkR.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var dom_utilsAc71e0ef = require('./dom.utils-ac71e0ef-CmIwRr6O.js');
|
|
5
|
-
var
|
|
5
|
+
var constants4faa1fae = require('./constants-4faa1fae-BzFAKCkR.js');
|
|
6
6
|
require('react');
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -3317,6 +3317,7 @@ const NvDatagrid = class {
|
|
|
3317
3317
|
index.registerInstance(this, hostRef);
|
|
3318
3318
|
this.action = index.createEvent(this, "action");
|
|
3319
3319
|
this.selectedRows = index.createEvent(this, "selectedRows");
|
|
3320
|
+
this.stateChanged = index.createEvent(this, "stateChanged");
|
|
3320
3321
|
this.templateCache = new Map();
|
|
3321
3322
|
this.headerTemplateCache = new Map();
|
|
3322
3323
|
this.minPageIndex = 1;
|
|
@@ -3328,7 +3329,7 @@ const NvDatagrid = class {
|
|
|
3328
3329
|
this.globalFilterSearchTerm = '';
|
|
3329
3330
|
this.columnData = [];
|
|
3330
3331
|
this.paginationState = null;
|
|
3331
|
-
this.
|
|
3332
|
+
this.sortingState = [];
|
|
3332
3333
|
this.rowSelectionState = {};
|
|
3333
3334
|
//#endregion STATES
|
|
3334
3335
|
/****************************************************************************/
|
|
@@ -3408,6 +3409,10 @@ const NvDatagrid = class {
|
|
|
3408
3409
|
* Whether to enable row selection for the data grid.
|
|
3409
3410
|
*/
|
|
3410
3411
|
this.enableRowSelection = false;
|
|
3412
|
+
/**
|
|
3413
|
+
* The overall state
|
|
3414
|
+
*/
|
|
3415
|
+
this.state = null;
|
|
3411
3416
|
this.debouncedFilter = debounce((value) => {
|
|
3412
3417
|
var _a;
|
|
3413
3418
|
(_a = this.table) === null || _a === void 0 ? void 0 : _a.setGlobalFilter(value);
|
|
@@ -3459,9 +3464,9 @@ const NvDatagrid = class {
|
|
|
3459
3464
|
return;
|
|
3460
3465
|
const nextOrder = header.column.getNextSortingOrder();
|
|
3461
3466
|
switch (nextOrder) {
|
|
3462
|
-
case
|
|
3467
|
+
case constants4faa1fae.SortingPossibility.Asc:
|
|
3463
3468
|
return 'Sort ascending';
|
|
3464
|
-
case
|
|
3469
|
+
case constants4faa1fae.SortingPossibility.Desc:
|
|
3465
3470
|
return 'Sort descending';
|
|
3466
3471
|
default:
|
|
3467
3472
|
return 'Clear sort';
|
|
@@ -3685,10 +3690,10 @@ const NvDatagrid = class {
|
|
|
3685
3690
|
if (this.enableSorting) {
|
|
3686
3691
|
tableOptions.getSortedRowModel = getSortedRowModel();
|
|
3687
3692
|
tableOptions.enableSorting = this.enableSorting;
|
|
3688
|
-
tableOptions.state.sorting = this.
|
|
3693
|
+
tableOptions.state.sorting = this.sortingState;
|
|
3689
3694
|
tableOptions.onSortingChange = updater => {
|
|
3690
|
-
const newSorting = typeof updater === 'function' ? updater(this.
|
|
3691
|
-
this.
|
|
3695
|
+
const newSorting = typeof updater === 'function' ? updater(this.sortingState) : updater;
|
|
3696
|
+
this.sortingState = newSorting; // Will automatically trigger the searchTerm watcher and update the table
|
|
3692
3697
|
};
|
|
3693
3698
|
}
|
|
3694
3699
|
if (this.enableRowSelection) {
|
|
@@ -4153,10 +4158,10 @@ const NvDatagrid = class {
|
|
|
4153
4158
|
if (!header.column.getCanSort())
|
|
4154
4159
|
return null;
|
|
4155
4160
|
const sortState = header.column.getIsSorted();
|
|
4156
|
-
if (sortState ===
|
|
4161
|
+
if (sortState === constants4faa1fae.SortingPossibility.Asc) {
|
|
4157
4162
|
return (index.h("div", { class: "inline-flex align-middle" }, index.h("nv-icon", { name: "arrow-up" })));
|
|
4158
4163
|
}
|
|
4159
|
-
if (sortState ===
|
|
4164
|
+
if (sortState === constants4faa1fae.SortingPossibility.Desc) {
|
|
4160
4165
|
return (index.h("div", { class: "inline-flex align-middle" }, index.h("nv-icon", { name: "arrow-down" })));
|
|
4161
4166
|
}
|
|
4162
4167
|
return null;
|
|
@@ -4226,7 +4231,7 @@ const NvDatagrid = class {
|
|
|
4226
4231
|
this.table.options.state.pagination = newValue;
|
|
4227
4232
|
}
|
|
4228
4233
|
}
|
|
4229
|
-
|
|
4234
|
+
handleSortingState(newValue) {
|
|
4230
4235
|
if (!this.table) {
|
|
4231
4236
|
console.warn('Table is not initialized yet.');
|
|
4232
4237
|
return;
|
|
@@ -4259,6 +4264,33 @@ const NvDatagrid = class {
|
|
|
4259
4264
|
this.table.options.state.rowSelection = newValue;
|
|
4260
4265
|
}
|
|
4261
4266
|
}
|
|
4267
|
+
handleStateChange(newValue) {
|
|
4268
|
+
if (newValue) {
|
|
4269
|
+
// Only update internal state if values are different to avoid loops
|
|
4270
|
+
if (this.globalFilterSearchTerm !== newValue.globalFilterSearchTerm) {
|
|
4271
|
+
this.globalFilterSearchTerm = newValue.globalFilterSearchTerm;
|
|
4272
|
+
}
|
|
4273
|
+
if (JSON.stringify(this.paginationState) !==
|
|
4274
|
+
JSON.stringify(newValue.paginationState)) {
|
|
4275
|
+
this.paginationState = newValue.paginationState;
|
|
4276
|
+
}
|
|
4277
|
+
if (JSON.stringify(this.sortingState) !==
|
|
4278
|
+
JSON.stringify(newValue.sortingState)) {
|
|
4279
|
+
this.sortingState = newValue.sortingState;
|
|
4280
|
+
}
|
|
4281
|
+
}
|
|
4282
|
+
}
|
|
4283
|
+
// Add watchers for internal state to emit changes
|
|
4284
|
+
handleInternalStateChange() {
|
|
4285
|
+
// Only emit if the state has actually changed
|
|
4286
|
+
const newState = {
|
|
4287
|
+
globalFilterSearchTerm: this.globalFilterSearchTerm,
|
|
4288
|
+
paginationState: this.paginationState,
|
|
4289
|
+
sortingState: this.sortingState,
|
|
4290
|
+
};
|
|
4291
|
+
// Emit the new state and let the parent component update the prop
|
|
4292
|
+
this.stateChanged.emit(newState);
|
|
4293
|
+
}
|
|
4262
4294
|
//#endregion WATCHERS
|
|
4263
4295
|
/****************************************************************************/
|
|
4264
4296
|
//#region LIFECYCLE
|
|
@@ -4289,7 +4321,7 @@ const NvDatagrid = class {
|
|
|
4289
4321
|
const rows = !this.table || this.table === undefined || this.parsedData.length === 0
|
|
4290
4322
|
? []
|
|
4291
4323
|
: (_c = (_b = this.table) === null || _b === void 0 ? void 0 : _b.getRowModel()) === null || _c === void 0 ? void 0 : _c.rows;
|
|
4292
|
-
return (index.h(index.Host, { key: '
|
|
4324
|
+
return (index.h(index.Host, { key: '95d3cea67d17f1aab33e7bc054161760e6d6df54' }, index.h("div", { key: 'b6cbdf841ab4ba64d2ccbf49fc6caf9ef082c7ee', class: "hidden" }, index.h("slot", { key: '18dde7efeec5c1bc38a044a683910db41f70e22d' })), index.h("slot", { key: 'd3ffb496e938ee3c91c5a7422357cbee90100d84', name: "before" }), this.enableGlobalFilter && this.table && (index.h("div", { key: '0ab19e6c1c585d4e77004ec9238dba3baff83614', class: `search-container justify-${this.globalFilterPosition}` }, index.h("nv-fieldtext", { key: '76722d31da818102347278c7b62a93deaa9c29a1', value: this.globalFilterSearchTerm, onInput: this.handleGlobalFilteringOnInput, placeholder: "Search all columns..." }))), this.parsedColumns.length === 0 && this.parsedData.length === 0 ? (index.h("div", { class: "no-data" }, this.noColumnsNoDataMessage)) : (index.h("div", null, index.h("table", null, this.parsedColumns.length > 0 && headerGroups.length > 0 && (index.h("thead", null, this.parsedColumns.length > 0 && headerGroups
|
|
4293
4325
|
? headerGroups === null || headerGroups === void 0 ? void 0 : headerGroups.map(headerGroup => (index.h("tr", { key: headerGroup.id }, headerGroup.headers.map(header => {
|
|
4294
4326
|
return this.getHeaderCell(header);
|
|
4295
4327
|
}))))
|
|
@@ -4300,7 +4332,7 @@ const NvDatagrid = class {
|
|
|
4300
4332
|
return (index.h("td", { key: cell.id, "data-row-id": rowId }, this.flexRender(cell.column.columnDef.cell, cell.getContext())));
|
|
4301
4333
|
})));
|
|
4302
4334
|
}))), this.table && this.enableRowSelection ? (index.h("tfoot", null, index.h("tr", null, index.h("td", { colSpan: 20 }, this.enableRowSelection && this.table ? (index.h("div", null, this.rowSelectionState &&
|
|
4303
|
-
Object.keys(this.rowSelectionState).length > 0 ? (index.h("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (index.h("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), index.h("slot", { key: '
|
|
4335
|
+
Object.keys(this.rowSelectionState).length > 0 ? (index.h("span", null, Object.keys(this.rowSelectionState).length, " of", ' ', ((_e = (_d = this.table.getPreFilteredRowModel()) === null || _d === void 0 ? void 0 : _d.rows) === null || _e === void 0 ? void 0 : _e.length) || 0, ' ', "Total Rows Selected")) : (index.h("span", null, "No rows selected")))) : null)))) : null), this.getPagination())), index.h("slot", { key: 'ee4cdbb4683a3da20154fd60580d694d8f78feb8', name: "after" })));
|
|
4304
4336
|
}
|
|
4305
4337
|
get el() { return index.getElement(this); }
|
|
4306
4338
|
static get watchers() { return {
|
|
@@ -4308,11 +4340,12 @@ const NvDatagrid = class {
|
|
|
4308
4340
|
"data": ["parseData"],
|
|
4309
4341
|
"parsedColumns": ["handleParsedChange"],
|
|
4310
4342
|
"parsedData": ["handleParsedChange"],
|
|
4311
|
-
"globalFilterSearchTerm": ["handleGlobalFilterSearchTerm"],
|
|
4312
|
-
"paginationState": ["handlePaginationState"],
|
|
4313
|
-
"
|
|
4343
|
+
"globalFilterSearchTerm": ["handleGlobalFilterSearchTerm", "handleInternalStateChange"],
|
|
4344
|
+
"paginationState": ["handlePaginationState", "handleInternalStateChange"],
|
|
4345
|
+
"sortingState": ["handleSortingState", "handleInternalStateChange"],
|
|
4314
4346
|
"pageSize": ["handlePageSize"],
|
|
4315
|
-
"rowSelectionState": ["handleRowSelectionState"]
|
|
4347
|
+
"rowSelectionState": ["handleRowSelectionState"],
|
|
4348
|
+
"state": ["handleStateChange"]
|
|
4316
4349
|
}; }
|
|
4317
4350
|
};
|
|
4318
4351
|
NvDatagrid.style = NvDatagridStyle0;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
4
|
var events_utilsFe1d907f = require('./events.utils-fe1d907f-01N__3wY.js');
|
|
5
5
|
var clsx297c1ffe = require('./clsx-297c1ffe-BtxeOLZW.js');
|
|
6
|
-
var
|
|
6
|
+
var constants4faa1fae = require('./constants-4faa1fae-BzFAKCkR.js');
|
|
7
7
|
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
8
8
|
require('react');
|
|
9
9
|
|
|
@@ -782,7 +782,7 @@ const NvDialog = class {
|
|
|
782
782
|
//#region RENDER
|
|
783
783
|
render() {
|
|
784
784
|
const hasForm = this.form || this.el.querySelector('form');
|
|
785
|
-
return (index.h(index.Host, { key: 'c1eb9b79f52028c3ef7a57bad99260a45b678eb5' }, index.h("slot", { key: '65a624853aa7242dc849a1196c6b5b8c331d426f', name: "trigger" }), index.h("dialog", { key: '17369b9be014e9136d77f99628b4bc8184d36370', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx297c1ffe.clsx({ full: this.full }) }, index.h("div", { key: '8a17cd8deff162b333e2ac90c487454743d76f3d', class: "content" }, !this.undismissable && (index.h("nv-button", { key: 'd61a63785ce284ce2039be5c62d6e2bcce2a9b44', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleCloseButton, "aria-label": "Close dialog" }, index.h("nv-icon", { key: '5a0adb449785bc684c41d0e35aad08ccb725386a', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-dialogheader", { id: "dialog-header" })), index.h("div", { key: '7c39e52d8fe6fc9ab2fdc2574a0c105d790bbfbe', class: "content-body", id: "dialog-content" }, index.h("slot", { key: '038d9f3623177af5d996631dd9ae25fec49fd778' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ?
|
|
785
|
+
return (index.h(index.Host, { key: 'c1eb9b79f52028c3ef7a57bad99260a45b678eb5' }, index.h("slot", { key: '65a624853aa7242dc849a1196c6b5b8c331d426f', name: "trigger" }), index.h("dialog", { key: '17369b9be014e9136d77f99628b4bc8184d36370', ref: el => (this.dialogElement = el), onClose: this.handleDialogClose, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-header", "aria-describedby": "dialog-content", class: clsx297c1ffe.clsx({ full: this.full }) }, index.h("div", { key: '8a17cd8deff162b333e2ac90c487454743d76f3d', class: "content" }, !this.undismissable && (index.h("nv-button", { key: 'd61a63785ce284ce2039be5c62d6e2bcce2a9b44', class: "close-button", emphasis: "lower", size: "sm", onClick: this.handleCloseButton, "aria-label": "Close dialog" }, index.h("nv-icon", { key: '5a0adb449785bc684c41d0e35aad08ccb725386a', name: "x", size: "sm" }))), this.headerElement ? (index.h("slot", { name: "header" })) : (index.h("nv-dialogheader", { id: "dialog-header" })), index.h("div", { key: '7c39e52d8fe6fc9ab2fdc2574a0c105d790bbfbe', class: "content-body", id: "dialog-content" }, index.h("slot", { key: '038d9f3623177af5d996631dd9ae25fec49fd778' })), this.footerElement ? (index.h("slot", { name: "footer" })) : (index.h("nv-dialogfooter", { form: this.form, primaryButtonType: hasForm ? constants4faa1fae.ButtonType.Submit : constants4faa1fae.ButtonType.Button, onDialogCanceled: this.handleCancelButton, undismissable: this.undismissable }))))));
|
|
786
786
|
}
|
|
787
787
|
get el() { return index.getElement(this); }
|
|
788
788
|
static get watchers() { return {
|
package/dist/cjs/{nv-dialogfooter_2.entry-DnLg2DHy.js → nv-dialogfooter_2.entry-HQyyE6VN.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
|
+
var constants4faa1fae = require('./constants-4faa1fae-BzFAKCkR.js');
|
|
5
5
|
require('react');
|
|
6
6
|
|
|
7
7
|
const nvDialogfooterCss = "nv-dialogfooter{display:flex;padding:var(--dialog-footer-padding-top) var(--dialog-footer-padding-x) var(--dialog-footer-padding-bottom) var(--dialog-footer-padding-x);justify-content:flex-end;align-items:flex-end;gap:var(--dialog-footer-gap-y);align-self:stretch}";
|
|
@@ -54,7 +54,7 @@ const NvDialogfooter = class {
|
|
|
54
54
|
/**
|
|
55
55
|
* Sets the type of the primary button.
|
|
56
56
|
*/
|
|
57
|
-
this.primaryButtonType =
|
|
57
|
+
this.primaryButtonType = constants4faa1fae.ButtonType.Button;
|
|
58
58
|
//#endregion EVENTS
|
|
59
59
|
/****************************************************************************/
|
|
60
60
|
//#region METHODS
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CrgVjOZF.js');
|
|
4
|
+
var inputmaskEdcad3c1 = require('./inputmask-edcad3c1-B9Omti4z.js');
|
|
5
|
+
var v4A79185f4 = require('./v4-a79185f4-2n0dOd_Y.js');
|
|
6
|
+
require('react');
|
|
7
|
+
require('./_commonjsHelpers-1789f0cf-BJu3ubxk.js');
|
|
8
|
+
|
|
9
|
+
const nvFielddateCss = "nv-fieldslider .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-hover)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .track-range{background:var(--components-slider-track-filled-focus)}nv-fieldslider .slider-container .track-container:has(.thumb:focus) .thumb{border-color:var(--components-slider-track-filled-focus)}nv-fieldslider[error] .slider-container .track-container .track .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb{border-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:hover{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-handler-background-error)}nv-fieldslider[error] .slider-container .track-container .track .thumb:focus{border-color:var(--components-slider-track-filled-error);outline:calc(var(--focus-outline-stroke) * 1) solid var(--components-slider-track-filled-error);outline-offset:calc(var(--focus-outline-offset) * 1);background-color:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .track-range{background:var(--components-slider-track-filled-error)}nv-fieldslider[error] .slider-container .track-container:has(.thumb:hover) .thumb{border-color:var(--components-slider-track-filled-error)}nv-fielddate{--nv-field-border-default:var(--components-form-field-border-default);--nv-field-border-hover:var(--components-form-field-border-hover);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--components-form-field-border-default);--nv-field-border-readonly:var(--components-form-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-brand);--nv-field-background:var(--components-form-field-background-default);display:flex;flex-direction:column;align-items:flex-start;gap:var(--form-gap-y);box-sizing:border-box;max-width:480px}nv-fielddate[fluid]:not([fluid=false]){max-width:unset}nv-fielddate[readonly]:not([readonly=false]){--nv-field-border-default:var(--components-form-field-border-readonly);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--components-form-field-border-focus);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-background:var(--components-form-field-background-readonly)}nv-fielddate[error]:not([error=false]){--nv-field-border-default:var(--components-form-field-border-error);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-destructive-in-field)}nv-fielddate[success]:not([success=false]){--nv-field-border-default:var(--components-form-field-border-success);--nv-field-border-hover:var(--nv-field-border-default);--nv-field-border-focus:var(--nv-field-border-default);--nv-field-border-disabled:var(--nv-field-border-default);--nv-field-border-readonly:var(--nv-field-border-default);--nv-field-focus-box-shadow:var(--color-focus-success)}nv-fielddate[required]:not([required=false]) label::after{content:\"*\";color:var(--components-form-text-required);font-weight:700}nv-fielddate label{display:flex;align-items:center;gap:var(--form-label-gap);align-self:stretch;color:var(--components-form-text-label-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-label-font-size);font-style:normal;font-weight:500;line-height:var(--form-label-line-height)}nv-fielddate nv-popover{width:100%;display:block}nv-fielddate nv-popover [data-scope=popover]{padding:0;background-color:var(--components-list-dropdown-background);border:1px solid var(--components-list-dropdown-border);width:auto}nv-fielddate nv-popover [slot=content]{display:block;width:100%}nv-fielddate nv-popover .datepicker-container{border:none}nv-fielddate .input-wrapper{display:flex;flex-wrap:wrap;gap:var(--form-gap-x);align-items:stretch;align-self:stretch;display:flex;align-items:center;gap:8px}nv-fielddate .input-wrapper .input-container{display:flex;flex-grow:1;justify-content:center;align-items:center;align-self:stretch;border-radius:var(--form-field-radius);border-width:1px;border-style:solid;border-color:var(--nv-field-border-default);opacity:var(--components-form-opacity-default, 1);background:var(--nv-field-background);transition:all 150ms ease-out}nv-fielddate .input-wrapper .input-container:hover{border-color:var(--nv-field-border-hover)}nv-fielddate .input-wrapper .input-container:focus-within,nv-fielddate .input-wrapper .input-container:focus-within:hover,nv-fielddate .input-wrapper .input-container:focus,nv-fielddate .input-wrapper .input-container:focus:hover{border-color:var(--nv-field-border-focus);box-shadow:0px 0px 0px var(--focus-field-stroke) var(--nv-field-focus-box-shadow)}nv-fielddate .input-wrapper .input-container:has(input:read-only){opacity:0.5;background-color:var(--components-form-field-background-readonly);border-color:var(--nv-field-border-readonly)}nv-fielddate .input-wrapper .input-container:has(input:disabled){opacity:0.5;background-color:var(--components-form-field-background-disabled);border-color:var(--nv-field-border-disabled)}nv-fielddate .input-wrapper .input-container input{display:flex;align-items:center;flex:1 0 0;overflow:hidden;background-color:transparent;color:var(--components-form-field-content-text);padding:var(--form-field-padding-y) var(--form-field-padding-x);font-size:var(--form-field-font-size);font-style:normal;font-weight:500;line-height:var(--form-field-line-height);width:100%;}nv-fielddate .input-wrapper .input-container input:focus{outline:none}nv-fielddate .input-wrapper .input-container input::placeholder{overflow:hidden;color:var(--components-form-field-content-placeholder);text-overflow:ellipsis;font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-field-font-size);font-style:normal;font-weight:400;line-height:var(--form-field-line-height)}nv-fielddate .input-wrapper .input-container input[type=password]::-ms-clear,nv-fielddate .input-wrapper .input-container input[type=password]::-ms-reveal{display:none;width:0;height:0}nv-fielddate .input-wrapper .input-container>nv-iconbutton{border:0px;border-radius:0px}nv-fielddate .input-wrapper .input-container>nv-iconbutton:focus-visible{border-radius:var(--button-md-border-radius);outline-offset:-3px}nv-fielddate .input-wrapper .input-container nv-icon.validation{color:var(--nv-field-border-default)}nv-fielddate .description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height)}nv-fielddate .error-description{display:flex;align-items:center;align-self:stretch;gap:var(--spacing-1);color:var(--components-form-text-description-default);font-family:\"TT Norms Pro\", sans-serif;font-size:var(--form-description-font-size);font-style:normal;line-height:var(--form-description-line-height);color:var(--components-form-text-description-error)}";
|
|
10
|
+
const NvFielddateStyle0 = nvFielddateCss;
|
|
11
|
+
|
|
12
|
+
const NvFielddate = class {
|
|
13
|
+
constructor(hostRef) {
|
|
14
|
+
index.registerInstance(this, hostRef);
|
|
15
|
+
this.valueChanged = index.createEvent(this, "valueChanged");
|
|
16
|
+
this.popoverId = v4A79185f4.v4();
|
|
17
|
+
/****************************************************************************/
|
|
18
|
+
//#region PROPERTIES
|
|
19
|
+
/**
|
|
20
|
+
* Sets the ID for the input element and the for attribute of the associated
|
|
21
|
+
* label. If no ID is provided, a random one will be automatically generated.
|
|
22
|
+
*/
|
|
23
|
+
this.inputId = v4A79185f4.v4();
|
|
24
|
+
/**
|
|
25
|
+
* Disables the input field.
|
|
26
|
+
*/
|
|
27
|
+
this.disabled = false;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the input field as read-only.
|
|
30
|
+
*/
|
|
31
|
+
this.readonly = false;
|
|
32
|
+
/**
|
|
33
|
+
* Marks the input field as required.
|
|
34
|
+
*/
|
|
35
|
+
this.required = false;
|
|
36
|
+
/**
|
|
37
|
+
* Indicates an error state.
|
|
38
|
+
*/
|
|
39
|
+
this.error = false;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates a success state.
|
|
42
|
+
*/
|
|
43
|
+
this.success = false;
|
|
44
|
+
/**
|
|
45
|
+
* Autofocus the input when the component is mounted.
|
|
46
|
+
*/
|
|
47
|
+
this.autofocus = false;
|
|
48
|
+
/**
|
|
49
|
+
* The initial value of the input (date in string format).
|
|
50
|
+
* @bind value
|
|
51
|
+
*/
|
|
52
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
53
|
+
// eslint-disable-next-line @stencil-community/strict-mutable
|
|
54
|
+
this.value = '';
|
|
55
|
+
/**
|
|
56
|
+
* The current value of the input date in string format.
|
|
57
|
+
*/
|
|
58
|
+
this.singleValue = '';
|
|
59
|
+
/**
|
|
60
|
+
* Controls the opening of the popover.
|
|
61
|
+
*/
|
|
62
|
+
this.open = false;
|
|
63
|
+
/**
|
|
64
|
+
* First day of the week 0 = Sunday, 1 = Monday, etc.
|
|
65
|
+
* @default 1
|
|
66
|
+
*/
|
|
67
|
+
this.firstDayOfWeek = 1;
|
|
68
|
+
/**
|
|
69
|
+
* Number of calendars to display
|
|
70
|
+
* @default 1
|
|
71
|
+
*/
|
|
72
|
+
this.numberOfCalendars = 1;
|
|
73
|
+
/**
|
|
74
|
+
* Minimum date for selection ISO string format, ex: 2025-01-01
|
|
75
|
+
*/
|
|
76
|
+
this.min = '';
|
|
77
|
+
/**
|
|
78
|
+
* Maximum date for selection ISO string format, ex: 2025-12-31
|
|
79
|
+
*/
|
|
80
|
+
this.max = '';
|
|
81
|
+
/** Locale for date formatting
|
|
82
|
+
* @default 'en-BE'
|
|
83
|
+
*/
|
|
84
|
+
this.locale = 'en-BE';
|
|
85
|
+
/** Date format ex: YYYY-MM-DD, DD-MM-YYYY, etc.
|
|
86
|
+
* @default 'YYYY-MM-DD'
|
|
87
|
+
* @note If the date format is in UTC mode, the date will be displayed in UTC time.
|
|
88
|
+
* @note If the date format is not in UTC mode, the date will be displayed in the local time.
|
|
89
|
+
*/
|
|
90
|
+
this.dateFormat = 'YYYY-MM-DD';
|
|
91
|
+
/**
|
|
92
|
+
* Footer placement
|
|
93
|
+
* @default 'bottom'
|
|
94
|
+
*/
|
|
95
|
+
this.shortcutsPlacement = 'bottom';
|
|
96
|
+
/**
|
|
97
|
+
* Show action buttons
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
100
|
+
this.showActions = false;
|
|
101
|
+
/**
|
|
102
|
+
* Allows the field to stretch and fill the entire width of its container.
|
|
103
|
+
*/
|
|
104
|
+
this.fluid = false;
|
|
105
|
+
/**
|
|
106
|
+
* Closes the popover when a click is detected outside the component.
|
|
107
|
+
* @param {MouseEvent} event - The click event.
|
|
108
|
+
*/
|
|
109
|
+
this.handleClickOutside = (event) => {
|
|
110
|
+
if (this.open && this.el && !this.el.contains(event.target)) {
|
|
111
|
+
this.open = false;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Focuses the input when the input container is clicked.
|
|
116
|
+
* @param {MouseEvent} event - The click event.
|
|
117
|
+
*/
|
|
118
|
+
this.handleInputContainerClick = (event) => {
|
|
119
|
+
if (this.readonly || this.disabled) {
|
|
120
|
+
event.preventDefault();
|
|
121
|
+
event.stopPropagation();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
this.inputElement.focus();
|
|
125
|
+
// Select the first characters based on the date format
|
|
126
|
+
const format = this.dateFormat;
|
|
127
|
+
if (format.startsWith('DD')) {
|
|
128
|
+
this.inputElement.setSelectionRange(0, 2);
|
|
129
|
+
}
|
|
130
|
+
else if (format.startsWith('MM')) {
|
|
131
|
+
this.inputElement.setSelectionRange(0, 2);
|
|
132
|
+
}
|
|
133
|
+
else if (format.startsWith('YYYY')) {
|
|
134
|
+
this.inputElement.setSelectionRange(0, 4);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Handles the input event on the input element.
|
|
139
|
+
* Updates the singleValue and emits the valueChanged event.
|
|
140
|
+
* @param {Event} event - The input event.
|
|
141
|
+
*/
|
|
142
|
+
this.handleInput = (event) => {
|
|
143
|
+
if (this.readonly || this.disabled) {
|
|
144
|
+
event.preventDefault();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const input = event.target;
|
|
148
|
+
const previousValue = this.value;
|
|
149
|
+
this.singleValue = input.value;
|
|
150
|
+
this.value = input.value;
|
|
151
|
+
// Only emit valueChanged if the value actually changed
|
|
152
|
+
if (previousValue !== input.value) {
|
|
153
|
+
this.valueChanged.emit(input.value);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* Toggles the opening/closing of the popover.
|
|
158
|
+
*/
|
|
159
|
+
this.toggleCalendar = () => {
|
|
160
|
+
if (this.readonly || this.disabled) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
this.open = !this.open;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Handles focus events on the input element.
|
|
167
|
+
* @param {FocusEvent} event - The focus event.
|
|
168
|
+
*/
|
|
169
|
+
this.handleFocus = (event) => {
|
|
170
|
+
if (this.readonly || this.disabled) {
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
event.target.blur();
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
/**
|
|
177
|
+
* Prevents the valueChanged event from the calendar from propagating up.
|
|
178
|
+
* @param {CustomEvent} event - The valueChanged event from nv-calendar.
|
|
179
|
+
*/
|
|
180
|
+
this.handleCalendarValueChanged = (event) => {
|
|
181
|
+
event.stopPropagation();
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Sets the reference to the popover element.
|
|
185
|
+
* @param {HTMLNvPopoverElement} el - The popover element.
|
|
186
|
+
*/
|
|
187
|
+
this.setPopoverRef = (el) => {
|
|
188
|
+
this.popoverElement = el;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Sets the reference to the input element.
|
|
192
|
+
* @param {HTMLInputElement} el - The input element.
|
|
193
|
+
*/
|
|
194
|
+
this.setInputRef = (el) => {
|
|
195
|
+
this.inputElement = el;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
//#endregion PROPERTIES
|
|
199
|
+
/****************************************************************************/
|
|
200
|
+
//#region METHODS
|
|
201
|
+
/**
|
|
202
|
+
* Converts the nv-calendar date format to the format expected by Inputmask.
|
|
203
|
+
* @param {string} format - The date format.
|
|
204
|
+
* @returns {string} Format adapted for Inputmask.
|
|
205
|
+
*/
|
|
206
|
+
convertToInputmaskFormat(format) {
|
|
207
|
+
switch (format) {
|
|
208
|
+
case 'DD/MM/YYYY':
|
|
209
|
+
return 'dd/mm/yyyy';
|
|
210
|
+
case 'MM/DD/YYYY':
|
|
211
|
+
return 'mm/dd/yyyy';
|
|
212
|
+
case 'YYYY-MM-DD':
|
|
213
|
+
return 'yyyy-mm-dd';
|
|
214
|
+
case 'DD.MM.YYYY':
|
|
215
|
+
return 'dd.mm.yyyy';
|
|
216
|
+
case 'YYYYMMDD':
|
|
217
|
+
return 'yyyymmdd';
|
|
218
|
+
default:
|
|
219
|
+
return format;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
//#endregion METHODS
|
|
223
|
+
/****************************************************************************/
|
|
224
|
+
//#region LIFECYCLE
|
|
225
|
+
connectedCallback() {
|
|
226
|
+
document.addEventListener('click', this.handleClickOutside);
|
|
227
|
+
}
|
|
228
|
+
componentWillLoad() {
|
|
229
|
+
if (this.value) {
|
|
230
|
+
this.singleValue = this.value;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
componentDidLoad() {
|
|
234
|
+
const inputs = this.el.querySelectorAll('.input-wrapper input');
|
|
235
|
+
inputs.forEach((input) => {
|
|
236
|
+
inputmaskEdcad3c1.Inputmask({
|
|
237
|
+
alias: 'datetime',
|
|
238
|
+
inputFormat: this.convertToInputmaskFormat(this.dateFormat),
|
|
239
|
+
placeholder: '_'.repeat(this.dateFormat.length),
|
|
240
|
+
}).mask(input);
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
disconnectedCallback() {
|
|
244
|
+
document.removeEventListener('click', this.handleClickOutside);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Handles the single date selection event from nv-calendar.
|
|
248
|
+
* Updates the input value and closes the popover.
|
|
249
|
+
* @param {CustomEvent} event - The event from nv-calendar.
|
|
250
|
+
*/
|
|
251
|
+
handleSingleDateChange(event) {
|
|
252
|
+
const value = event.detail;
|
|
253
|
+
const previousValue = this.value;
|
|
254
|
+
this.singleValue = value;
|
|
255
|
+
this.value = value;
|
|
256
|
+
// Only emit valueChanged if the value actually changed
|
|
257
|
+
if (previousValue !== value) {
|
|
258
|
+
this.valueChanged.emit(value);
|
|
259
|
+
}
|
|
260
|
+
if (!this.showActions) {
|
|
261
|
+
this.open = false;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
handleClosePopover() {
|
|
265
|
+
this.open = false;
|
|
266
|
+
}
|
|
267
|
+
handleKeyDown(event) {
|
|
268
|
+
if (!this.open) {
|
|
269
|
+
if (event.key === 'ArrowDown') {
|
|
270
|
+
this.open = true;
|
|
271
|
+
event.preventDefault();
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
// Verify if the popover element is defined
|
|
277
|
+
if (!this.popoverElement) {
|
|
278
|
+
console.warn('nv-fielddate -> Popover element is not defined');
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
handleValueChange(newValue) {
|
|
283
|
+
this.singleValue = newValue;
|
|
284
|
+
}
|
|
285
|
+
//#endregion EVENTS
|
|
286
|
+
/****************************************************************************/
|
|
287
|
+
//#region RENDER
|
|
288
|
+
render() {
|
|
289
|
+
return (index.h(index.Host, { key: '4af4649cc8fdc95f2f12d1c495549a006c82c742' }, ((this.label && this.label.length > 0) ||
|
|
290
|
+
this.el.querySelector('[slot="label"]')) && (index.h("label", { key: 'c4905c94c62c8eb01120b30e3b5c16c2dafec20d', htmlFor: this.inputId }, index.h("slot", { key: 'b8e952b9a6acb9f136d3461514b82a6767723c3c', name: "label" }, this.label))), index.h("nv-popover", { key: 'de6620c60eb3db3c6f0f435977f257636be81a80', ref: this.setPopoverRef, id: this.popoverId, triggerMode: "controlled", placement: "bottom-start", open: this.open }, index.h("div", { key: 'e2189ad3476f3d088c07153bc4c1e63357317ded', slot: "trigger", class: "input-wrapper" }, index.h("slot", { key: 'a35e545f1379c479734719d8460d5031631f5730', name: "before-input" }), index.h("div", { key: '01338c24dfff69e019ff6d2344f176effb2dac06', class: "input-container", onClick: this.handleInputContainerClick }, index.h("slot", { key: 'f6552d188174e77e8f75a9b0554e3ea78c57056d', name: "leading-input" }), index.h("input", { key: '1b9ad6226166b6bf08afda41f0f6b789fe12dd27', id: this.inputId, ref: this.setInputRef, placeholder: this.placeholder, name: this.name, disabled: this.disabled, readOnly: this.readonly, required: this.required, autofocus: this.autofocus, value: this.singleValue, onInput: this.handleInput, onFocus: this.handleFocus, "data-scope": "date" }), this.error && (index.h("nv-icon", { key: '0527f051261672a8df205d26dcb253c20b3dfd4b', name: "alert-circle", class: "validation", size: "md" })), this.success && (index.h("nv-icon", { key: 'ed83a0a0b7a88f392f16bf97f20885261f88665d', name: "circle-check", class: "validation", size: "md" })), index.h("nv-iconbutton", { key: '6abf3dff6a1bcc0759bea91ab3674d61f4c016c2', class: "toggle-calendar-icon", name: "calendar" //{this.open ? 'chevron-top' : 'chevron-down'}
|
|
291
|
+
,
|
|
292
|
+
size: "md", emphasis: "lower", "aria-label": this.open ? 'Hide calendar' : 'Show calendar', "aria-pressed": this.open.toString(), onClick: this.toggleCalendar, tabIndex: this.disabled ? -1 : 0 })), index.h("slot", { key: '76d584ac756b228e356a17ad36e4558f9a497ea3', name: "after-input" })), index.h("div", { key: '4914e6fa5046fb287bedb841f2a0b71f1f86e5a3', slot: "content" }, index.h("nv-calendar", { key: 'fcfb949ee9c378aac2d7c792ed79fcb3cbf8e987', dateFormat: this.dateFormat, singleValue: this.singleValue, firstDayOfWeek: this.firstDayOfWeek, numberOfCalendars: this.numberOfCalendars, min: this.min, max: this.max, locale: this.locale, shortcutsPlacement: this.shortcutsPlacement, showActions: this.showActions, shortcuts: this.shortcuts, showWeekNumbers: this.showWeekNumbers, disabledDates: this.disabledDates, onValueChanged: this.handleCalendarValueChanged }))), ((this.description && this.description.length > 0) ||
|
|
293
|
+
this.el.querySelector('[slot="description"]')) && (index.h("div", { key: '52ffcb5f41161b9dc95c0fc18a252b6568817ffb', class: "description" }, index.h("slot", { key: '91c68f28fe31f5ecfa58d80e5decb018890f18fe', name: "description" }, this.description))), (this.errorDescription ||
|
|
294
|
+
this.el.querySelector('[slot="error-description"]')) && (index.h("div", { key: '0c0b8c65f261c2439446dd05014d172e6b829244', hidden: !this.error, class: "error-description" }, this.el.querySelector('[slot="error-description"]') ? (index.h("slot", { name: "error-description" })) : (this.errorDescription))), index.h("slot", { key: 'cf9410ad858faf59d7ada7ce70b18aa768e30a65' })));
|
|
295
|
+
}
|
|
296
|
+
get el() { return index.getElement(this); }
|
|
297
|
+
static get watchers() { return {
|
|
298
|
+
"value": ["handleValueChange"]
|
|
299
|
+
}; }
|
|
300
|
+
};
|
|
301
|
+
NvFielddate.style = NvFielddateStyle0;
|
|
302
|
+
|
|
303
|
+
exports.nv_fielddate = NvFielddate;
|