@zeedhi/common 1.56.0 → 1.57.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/zd-common.esm.js +36 -5
- package/dist/zd-common.umd.js +35 -4
- package/package.json +2 -2
- package/types/components/zd-iterable/column.d.ts +3 -2
- package/types/components/zd-iterable/interfaces.d.ts +1 -0
- package/types/components/zd-select-multiple/interfaces.d.ts +1 -0
- package/types/components/zd-select-multiple/select-multiple.d.ts +4 -0
- package/types/components/zd-tree-grid/tree-grid.d.ts +11 -0
package/dist/zd-common.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessorManager, Event, KeyMap, Metadata, FormatterParserProvider, Validation, Mask, Accessor, DatasourceFactory, I18n, MethodNotAssignedError, Loader, Router, URL as URL$1, InstanceNotFoundError, Config, Http, dayjs, DateHelper, Utils, Cookie } from '@zeedhi/core';
|
|
1
|
+
import { AccessorManager, Event, KeyMap, Metadata, FormatterParserProvider, Validation, Mask, Accessor, DatasourceFactory, I18n, MethodNotAssignedError, Loader, Router, URL as URL$1, InstanceNotFoundError, Config, Http, VersionService, dayjs, DateHelper, Utils, Cookie } from '@zeedhi/core';
|
|
2
2
|
import merge from 'lodash.merge';
|
|
3
3
|
import debounce from 'lodash.debounce';
|
|
4
4
|
import isUndefined from 'lodash.isundefined';
|
|
@@ -4386,7 +4386,9 @@ class TreeDataStructure {
|
|
|
4386
4386
|
}
|
|
4387
4387
|
}
|
|
4388
4388
|
|
|
4389
|
-
const AutoNumeric$1 = require('@zeedhi/autonumeric/dist/autoNumeric');
|
|
4389
|
+
const AutoNumeric$1 = require('@zeedhi/autonumeric/dist/autoNumeric');
|
|
4390
|
+
const packageContent$1 = require('../package.json');
|
|
4391
|
+
VersionService.addPackageVersion(packageContent$1.name, packageContent$1.version);
|
|
4390
4392
|
|
|
4391
4393
|
/**
|
|
4392
4394
|
* Base class for Number component
|
|
@@ -6239,8 +6241,6 @@ class Column extends Component {
|
|
|
6239
6241
|
super(props);
|
|
6240
6242
|
this.align = 'left';
|
|
6241
6243
|
this.label = '';
|
|
6242
|
-
this.maxWidth = '';
|
|
6243
|
-
this.minWidth = '';
|
|
6244
6244
|
this.mask = '';
|
|
6245
6245
|
this.sortable = true;
|
|
6246
6246
|
this.loading = false;
|
|
@@ -6282,6 +6282,7 @@ class Column extends Component {
|
|
|
6282
6282
|
}, 100);
|
|
6283
6283
|
this.align = this.getInitValue('align', props.align, this.align);
|
|
6284
6284
|
this.label = this.getInitValue('label', props.label, this.label);
|
|
6285
|
+
this.width = this.getInitValue('width', props.width, this.width);
|
|
6285
6286
|
this.maxWidth = this.getInitValue('maxWidth', props.maxWidth, this.maxWidth);
|
|
6286
6287
|
this.minWidth = this.getInitValue('minWidth', props.minWidth, this.minWidth);
|
|
6287
6288
|
this.mask = this.getInitValue('mask', props.mask, this.mask);
|
|
@@ -10197,12 +10198,17 @@ class SelectMultiple extends Select {
|
|
|
10197
10198
|
* Max number of rows the component can have
|
|
10198
10199
|
*/
|
|
10199
10200
|
this.maxRows = undefined;
|
|
10201
|
+
/**
|
|
10202
|
+
* Limit the display of selected options. The rest will be hidden within the 'limitText' string
|
|
10203
|
+
*/
|
|
10204
|
+
this.limit = null;
|
|
10200
10205
|
this.showSelectAll = false;
|
|
10201
10206
|
if (!this.selectedValue) {
|
|
10202
10207
|
this.selectedValue = [];
|
|
10203
10208
|
}
|
|
10204
10209
|
this.showSelectAll = this.getInitValue('showSelectAll', props.showSelectAll, this.showSelectAll);
|
|
10205
10210
|
this.maxRows = this.getInitValue('maxRows', props.maxRows, this.maxRows);
|
|
10211
|
+
this.limit = this.getInitValue('limit', props.limit, this.limit);
|
|
10206
10212
|
this.createAccessors();
|
|
10207
10213
|
}
|
|
10208
10214
|
afterFocus() {
|
|
@@ -12417,6 +12423,29 @@ class TreeGrid extends Grid {
|
|
|
12417
12423
|
this.treeDataStructure.buildTree();
|
|
12418
12424
|
}
|
|
12419
12425
|
}
|
|
12426
|
+
/**
|
|
12427
|
+
* This function takes an array of objects and updates the data in the tree.
|
|
12428
|
+
* @param {IDictionary<any>[]} data - The data to be displayed in the tree.
|
|
12429
|
+
*/
|
|
12430
|
+
updateData(data) {
|
|
12431
|
+
this.datasource.data = data;
|
|
12432
|
+
this.treeDataStructure.treeData = [];
|
|
12433
|
+
this.treeDataStructure.buildTree();
|
|
12434
|
+
}
|
|
12435
|
+
/**
|
|
12436
|
+
* The function deletes the selected rows from the database and then rebuilds the
|
|
12437
|
+
* tree.
|
|
12438
|
+
* @returns The response is an array of promises.
|
|
12439
|
+
*/
|
|
12440
|
+
deleteRows() {
|
|
12441
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12442
|
+
const response = yield Promise.all(this.selectedRows.map((row) => this.datasource.delete(row)));
|
|
12443
|
+
this.treeDataStructure.treeData = [];
|
|
12444
|
+
this.buildTree();
|
|
12445
|
+
this.selectedRows = [];
|
|
12446
|
+
return response;
|
|
12447
|
+
});
|
|
12448
|
+
}
|
|
12420
12449
|
/**
|
|
12421
12450
|
* Expands or collapses a row
|
|
12422
12451
|
* @param row Row object
|
|
@@ -12934,6 +12963,8 @@ class TreeGridEditable extends TreeGrid {
|
|
|
12934
12963
|
}
|
|
12935
12964
|
}
|
|
12936
12965
|
|
|
12937
|
-
const AutoNumeric = require('@zeedhi/autonumeric/dist/autoNumeric');
|
|
12966
|
+
const AutoNumeric = require('@zeedhi/autonumeric/dist/autoNumeric');
|
|
12967
|
+
const packageContent = require('../package.json');
|
|
12968
|
+
VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
12938
12969
|
|
|
12939
12970
|
export { Alert, AlertService, ApexChart, AutoNumeric, Badge, Breadcrumbs, Button, ButtonGroup, CSVReport, Card, Carousel, Checkbox, CheckboxMultiple, ChildNotFoundError, Chip, CodeEditor, Col, CollapseCard, Column, ColumnNotFoundError, Component, ComponentRender, Container, Currency, Dashboard, Date$1 as Date, DateRange, Dialog, DialogService, Divider, Dropdown, FileInput, Footer, Form, Frame, FramePage, Grid, GridColumn, GridColumnEditable, GridEditable, Header, Icon, Icons, Image, Increment, Input, Iterable, IterableColumnsButton, IterableColumnsButtonController, IterablePageComponent, IterablePageInfo, IterablePageSize, IterablePagination, List, ListGroup, ListItem, Loading, LoadingService, Login, LoginButton, MasterDetail, Menu, MenuButton, MenuGroup, MenuLink, MenuSeparator, Modal, ModalCloseButton, ModalService, Month, Number$1 as Number, PDFReport, Password, Progress, Radio, RangeSlider, Report, Row, Search, Select, SelectMultiple, SelectTree, SelectTreeMultiple, SelectableList, SpeedDial, Steppers, SvgMap, Switch, Tab, Table, Tabs, Tag, Text, TextInput, Textarea, Time, Toggleable, Tooltip, Tree, TreeDataStructure, TreeGrid, TreeGridEditable, WatchURL, XLS2Report, XLS3Report, XLSReport, initTheme };
|
package/dist/zd-common.umd.js
CHANGED
|
@@ -4393,7 +4393,9 @@
|
|
|
4393
4393
|
}
|
|
4394
4394
|
}
|
|
4395
4395
|
|
|
4396
|
-
const AutoNumeric$1 = require('@zeedhi/autonumeric/dist/autoNumeric');
|
|
4396
|
+
const AutoNumeric$1 = require('@zeedhi/autonumeric/dist/autoNumeric');
|
|
4397
|
+
const packageContent$1 = require('../package.json');
|
|
4398
|
+
core.VersionService.addPackageVersion(packageContent$1.name, packageContent$1.version);
|
|
4397
4399
|
|
|
4398
4400
|
/**
|
|
4399
4401
|
* Base class for Number component
|
|
@@ -6246,8 +6248,6 @@
|
|
|
6246
6248
|
super(props);
|
|
6247
6249
|
this.align = 'left';
|
|
6248
6250
|
this.label = '';
|
|
6249
|
-
this.maxWidth = '';
|
|
6250
|
-
this.minWidth = '';
|
|
6251
6251
|
this.mask = '';
|
|
6252
6252
|
this.sortable = true;
|
|
6253
6253
|
this.loading = false;
|
|
@@ -6289,6 +6289,7 @@
|
|
|
6289
6289
|
}, 100);
|
|
6290
6290
|
this.align = this.getInitValue('align', props.align, this.align);
|
|
6291
6291
|
this.label = this.getInitValue('label', props.label, this.label);
|
|
6292
|
+
this.width = this.getInitValue('width', props.width, this.width);
|
|
6292
6293
|
this.maxWidth = this.getInitValue('maxWidth', props.maxWidth, this.maxWidth);
|
|
6293
6294
|
this.minWidth = this.getInitValue('minWidth', props.minWidth, this.minWidth);
|
|
6294
6295
|
this.mask = this.getInitValue('mask', props.mask, this.mask);
|
|
@@ -10204,12 +10205,17 @@
|
|
|
10204
10205
|
* Max number of rows the component can have
|
|
10205
10206
|
*/
|
|
10206
10207
|
this.maxRows = undefined;
|
|
10208
|
+
/**
|
|
10209
|
+
* Limit the display of selected options. The rest will be hidden within the 'limitText' string
|
|
10210
|
+
*/
|
|
10211
|
+
this.limit = null;
|
|
10207
10212
|
this.showSelectAll = false;
|
|
10208
10213
|
if (!this.selectedValue) {
|
|
10209
10214
|
this.selectedValue = [];
|
|
10210
10215
|
}
|
|
10211
10216
|
this.showSelectAll = this.getInitValue('showSelectAll', props.showSelectAll, this.showSelectAll);
|
|
10212
10217
|
this.maxRows = this.getInitValue('maxRows', props.maxRows, this.maxRows);
|
|
10218
|
+
this.limit = this.getInitValue('limit', props.limit, this.limit);
|
|
10213
10219
|
this.createAccessors();
|
|
10214
10220
|
}
|
|
10215
10221
|
afterFocus() {
|
|
@@ -12424,6 +12430,29 @@
|
|
|
12424
12430
|
this.treeDataStructure.buildTree();
|
|
12425
12431
|
}
|
|
12426
12432
|
}
|
|
12433
|
+
/**
|
|
12434
|
+
* This function takes an array of objects and updates the data in the tree.
|
|
12435
|
+
* @param {IDictionary<any>[]} data - The data to be displayed in the tree.
|
|
12436
|
+
*/
|
|
12437
|
+
updateData(data) {
|
|
12438
|
+
this.datasource.data = data;
|
|
12439
|
+
this.treeDataStructure.treeData = [];
|
|
12440
|
+
this.treeDataStructure.buildTree();
|
|
12441
|
+
}
|
|
12442
|
+
/**
|
|
12443
|
+
* The function deletes the selected rows from the database and then rebuilds the
|
|
12444
|
+
* tree.
|
|
12445
|
+
* @returns The response is an array of promises.
|
|
12446
|
+
*/
|
|
12447
|
+
deleteRows() {
|
|
12448
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
12449
|
+
const response = yield Promise.all(this.selectedRows.map((row) => this.datasource.delete(row)));
|
|
12450
|
+
this.treeDataStructure.treeData = [];
|
|
12451
|
+
this.buildTree();
|
|
12452
|
+
this.selectedRows = [];
|
|
12453
|
+
return response;
|
|
12454
|
+
});
|
|
12455
|
+
}
|
|
12427
12456
|
/**
|
|
12428
12457
|
* Expands or collapses a row
|
|
12429
12458
|
* @param row Row object
|
|
@@ -12941,7 +12970,9 @@
|
|
|
12941
12970
|
}
|
|
12942
12971
|
}
|
|
12943
12972
|
|
|
12944
|
-
const AutoNumeric = require('@zeedhi/autonumeric/dist/autoNumeric');
|
|
12973
|
+
const AutoNumeric = require('@zeedhi/autonumeric/dist/autoNumeric');
|
|
12974
|
+
const packageContent = require('../package.json');
|
|
12975
|
+
core.VersionService.addPackageVersion(packageContent.name, packageContent.version);
|
|
12945
12976
|
|
|
12946
12977
|
exports.Alert = Alert;
|
|
12947
12978
|
exports.AlertService = AlertService;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeedhi/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.57.0",
|
|
4
4
|
"description": "Zeedhi Common",
|
|
5
5
|
"author": "Zeedhi <zeedhi@teknisa.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"lodash.times": "^4.3.2",
|
|
38
38
|
"mockdate": "^3.0.2"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "099b5a1c0726bb00c757de8985868b197d7a57ad"
|
|
41
41
|
}
|
|
@@ -7,8 +7,9 @@ import { Component } from '../zd-component/component';
|
|
|
7
7
|
export declare class Column extends Component implements IColumn {
|
|
8
8
|
align: ColumnAlign;
|
|
9
9
|
label: string;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
width?: string;
|
|
11
|
+
maxWidth?: string;
|
|
12
|
+
minWidth?: string;
|
|
12
13
|
mask: string;
|
|
13
14
|
type?: ColumnType;
|
|
14
15
|
sortable: boolean;
|
|
@@ -19,6 +19,10 @@ export declare class SelectMultiple extends Select implements ISelectMultiple {
|
|
|
19
19
|
* Max number of rows the component can have
|
|
20
20
|
*/
|
|
21
21
|
maxRows?: string | number;
|
|
22
|
+
/**
|
|
23
|
+
* Limit the display of selected options. The rest will be hidden within the 'limitText' string
|
|
24
|
+
*/
|
|
25
|
+
limit: number | null;
|
|
22
26
|
protected afterFocus(): Promise<void>;
|
|
23
27
|
private setCache;
|
|
24
28
|
showSelectAll: boolean;
|
|
@@ -43,6 +43,17 @@ export declare class TreeGrid extends Grid implements ITreeGrid {
|
|
|
43
43
|
* Build tree data
|
|
44
44
|
*/
|
|
45
45
|
buildTree(doGet?: boolean): void;
|
|
46
|
+
/**
|
|
47
|
+
* This function takes an array of objects and updates the data in the tree.
|
|
48
|
+
* @param {IDictionary<any>[]} data - The data to be displayed in the tree.
|
|
49
|
+
*/
|
|
50
|
+
updateData(data: IDictionary<any>[]): void;
|
|
51
|
+
/**
|
|
52
|
+
* The function deletes the selected rows from the database and then rebuilds the
|
|
53
|
+
* tree.
|
|
54
|
+
* @returns The response is an array of promises.
|
|
55
|
+
*/
|
|
56
|
+
deleteRows(): Promise<any[]>;
|
|
46
57
|
/**
|
|
47
58
|
* Expands or collapses a row
|
|
48
59
|
* @param row Row object
|