@indfnd/common 1.1.42 → 1.1.44
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/CHANGELOG.md +20 -0
- package/dist/ind-common.es.js +133 -23
- package/dist/ind-common.umd.cjs +86 -86
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.44](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.43...v1.1.44) (2026-01-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 替换npmtoken ([bb95417](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/bb95417282a2b9835490a2fd6e428db064c459a9))
|
|
11
|
+
|
|
12
|
+
### [1.1.43](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.42...v1.1.43) (2026-01-29)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* data-picker增加on-change触发 ([00d21a7](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/00d21a7028f2e3dfb992f42934555f37f5ec2702))
|
|
18
|
+
* table表格增加keepSelected属性 ([73dd3ed](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/73dd3ed26a015febb257e93b7920a50a12055887))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* table和formImpl增加intNums控制数字输入框长度 ([dd9c1a2](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/dd9c1a2d1a8d811121a915a079453f61268bb1c4))
|
|
24
|
+
|
|
5
25
|
### [1.1.42](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.41...v1.1.42) (2026-01-23)
|
|
6
26
|
|
|
7
27
|
|
package/dist/ind-common.es.js
CHANGED
|
@@ -32,7 +32,7 @@ var lodash = { exports: {} };
|
|
|
32
32
|
(function(module2, exports2) {
|
|
33
33
|
(function() {
|
|
34
34
|
var undefined$1;
|
|
35
|
-
var VERSION2 = "4.17.
|
|
35
|
+
var VERSION2 = "4.17.23";
|
|
36
36
|
var LARGE_ARRAY_SIZE = 200;
|
|
37
37
|
var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
|
|
38
38
|
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
@@ -1918,8 +1918,28 @@ var lodash = { exports: {} };
|
|
|
1918
1918
|
}
|
|
1919
1919
|
function baseUnset(object, path) {
|
|
1920
1920
|
path = castPath(path, object);
|
|
1921
|
-
|
|
1922
|
-
|
|
1921
|
+
var index2 = -1, length = path.length;
|
|
1922
|
+
if (!length) {
|
|
1923
|
+
return true;
|
|
1924
|
+
}
|
|
1925
|
+
var isRootPrimitive = object == null || typeof object !== "object" && typeof object !== "function";
|
|
1926
|
+
while (++index2 < length) {
|
|
1927
|
+
var key = path[index2];
|
|
1928
|
+
if (typeof key !== "string") {
|
|
1929
|
+
continue;
|
|
1930
|
+
}
|
|
1931
|
+
if (key === "__proto__" && !hasOwnProperty.call(object, "__proto__")) {
|
|
1932
|
+
return false;
|
|
1933
|
+
}
|
|
1934
|
+
if (key === "constructor" && index2 + 1 < length && typeof path[index2 + 1] === "string" && path[index2 + 1] === "prototype") {
|
|
1935
|
+
if (isRootPrimitive && index2 === 0) {
|
|
1936
|
+
continue;
|
|
1937
|
+
}
|
|
1938
|
+
return false;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
var obj = parent(object, path);
|
|
1942
|
+
return obj == null || delete obj[toKey(last(path))];
|
|
1923
1943
|
}
|
|
1924
1944
|
function baseUpdate(object, path, updater, customizer) {
|
|
1925
1945
|
return baseSet(object, path, updater(baseGet(object, path)), customizer);
|
|
@@ -5460,7 +5480,7 @@ var lodash = { exports: {} };
|
|
|
5460
5480
|
})(lodash, lodash.exports);
|
|
5461
5481
|
var _ = lodash.exports;
|
|
5462
5482
|
const name$1 = "@indfnd/common";
|
|
5463
|
-
const version = "1.1.
|
|
5483
|
+
const version = "1.1.43";
|
|
5464
5484
|
const author = "huxuetong";
|
|
5465
5485
|
const publishConfig = {
|
|
5466
5486
|
registry: "https://registry.npmjs.org/"
|
|
@@ -5521,7 +5541,7 @@ const dependencies = {
|
|
|
5521
5541
|
wangeditor: "^3.1.1"
|
|
5522
5542
|
};
|
|
5523
5543
|
const devDependencies = {
|
|
5524
|
-
"@indfnd/utils": "^0.1.
|
|
5544
|
+
"@indfnd/utils": "^0.1.33",
|
|
5525
5545
|
"ag-grid-community": "^30.1.0",
|
|
5526
5546
|
"ag-grid-enterprise": "^30.1.0",
|
|
5527
5547
|
"ag-grid-vue": "^30.1.0",
|
|
@@ -48603,6 +48623,7 @@ const __vue2_script$1w = {
|
|
|
48603
48623
|
},
|
|
48604
48624
|
emitChange(value) {
|
|
48605
48625
|
this.$emit("input", value);
|
|
48626
|
+
this.$emit("on-change", value);
|
|
48606
48627
|
},
|
|
48607
48628
|
handleOpenChange(eventName, value) {
|
|
48608
48629
|
this.$emit(eventName, value);
|
|
@@ -49340,20 +49361,25 @@ var FormImpl = {
|
|
|
49340
49361
|
},
|
|
49341
49362
|
on: {
|
|
49342
49363
|
"on-blur": (event) => {
|
|
49343
|
-
var _a2;
|
|
49364
|
+
var _a2, _b2, _c2, _d2;
|
|
49344
49365
|
let v = event.target.value;
|
|
49345
|
-
let
|
|
49366
|
+
let intNums = ((_a2 = d.props) == null ? void 0 : _a2.intNums) === void 0 ? ((_b2 = this.$config) == null ? void 0 : _b2.indNumDefault) || 13 : (_c2 = d.props) == null ? void 0 : _c2.intNums;
|
|
49367
|
+
let formatPattern = new RegExp(
|
|
49368
|
+
`(-?)(\\d{1,${intNums}})(\\d{0,999})(\\.\\d{1,6})?`
|
|
49369
|
+
);
|
|
49370
|
+
let formatRlt = formatPattern.exec(v);
|
|
49346
49371
|
if (d && d.props && d.props.scale === 0) {
|
|
49347
|
-
|
|
49372
|
+
let formatPatternNoScale = new RegExp(`(-?)(\\d{1,${intNums}})(\\d{0,999})?`);
|
|
49373
|
+
formatRlt = formatPatternNoScale.exec(v);
|
|
49348
49374
|
} else if (d && d.props && d.props.scale) {
|
|
49349
49375
|
let scale = d.props.scale;
|
|
49350
|
-
let
|
|
49351
|
-
`(-?)(\\d{1
|
|
49376
|
+
let formatPattern2 = new RegExp(
|
|
49377
|
+
`(-?)(\\d{1,${intNums}})(\\d{0,999})(\\.\\d{1,${scale}})?`
|
|
49352
49378
|
);
|
|
49353
|
-
formatRlt =
|
|
49379
|
+
formatRlt = formatPattern2.exec(v);
|
|
49354
49380
|
}
|
|
49355
49381
|
if (formatRlt && formatRlt.length) {
|
|
49356
|
-
v = (((
|
|
49382
|
+
v = (((_d2 = d == null ? void 0 : d.props) == null ? void 0 : _d2.enableNegative) ? formatRlt[1] : "") + formatRlt[2] + (formatRlt[4] || "");
|
|
49357
49383
|
}
|
|
49358
49384
|
this.form[d.formKey] = parseFloat(v);
|
|
49359
49385
|
this.$refs[d.formKey] && this.$refs[d.formKey].setCurrentValue(v);
|
|
@@ -51915,7 +51941,7 @@ var AgTooltip = /* @__PURE__ */ function() {
|
|
|
51915
51941
|
const __vue2_script$1j = {
|
|
51916
51942
|
name: "IndAgInput",
|
|
51917
51943
|
render(h) {
|
|
51918
|
-
const { value, data: data2, colDef, scaleFn, api, node, column } = this.params;
|
|
51944
|
+
const { intNums, value, data: data2, colDef, scaleFn, api, node, column } = this.params;
|
|
51919
51945
|
const { props } = (colDef == null ? void 0 : colDef.cellRendererParams) || {};
|
|
51920
51946
|
const { type, disabled: disabledDef, textCondition } = props || {};
|
|
51921
51947
|
const disabled = disabledDef instanceof Function ? disabledDef(data2) : disabledDef;
|
|
@@ -51965,7 +51991,8 @@ const __vue2_script$1j = {
|
|
|
51965
51991
|
let v = event.target.value;
|
|
51966
51992
|
let updateV = null;
|
|
51967
51993
|
if (type == "number") {
|
|
51968
|
-
let
|
|
51994
|
+
let formatPattern = new RegExp(`(-?)(\\d{1,${intNums}})(\\d{0,999})(\\.\\d{1,6})?`);
|
|
51995
|
+
let formatRlt = formatPattern.exec(v);
|
|
51969
51996
|
if (formatRlt && formatRlt.length) {
|
|
51970
51997
|
v = ((props == null ? void 0 : props.enableNegative) ? formatRlt[1] : "") + formatRlt[2] + (formatRlt[4] || "");
|
|
51971
51998
|
}
|
|
@@ -53331,6 +53358,8 @@ const __vue2_script$15 = {
|
|
|
53331
53358
|
AgUploadImg
|
|
53332
53359
|
},
|
|
53333
53360
|
props: {
|
|
53361
|
+
intNums: Number,
|
|
53362
|
+
keepSelected: Boolean,
|
|
53334
53363
|
uuid: String,
|
|
53335
53364
|
showMenu: Boolean,
|
|
53336
53365
|
rowHeight: Number,
|
|
@@ -54092,7 +54121,9 @@ const __vue2_script$15 = {
|
|
|
54092
54121
|
this.currentPage = 1;
|
|
54093
54122
|
this.tableRefresh();
|
|
54094
54123
|
} else {
|
|
54124
|
+
this.showZeroSwitch ? this.rowDataFiltered : this.tableData;
|
|
54095
54125
|
let topData = [];
|
|
54126
|
+
let restData = [];
|
|
54096
54127
|
if (sortParams.order === void 0) {
|
|
54097
54128
|
if (this.dataApi) {
|
|
54098
54129
|
let tableDataTmp = _.cloneDeep(this.tableData);
|
|
@@ -54104,9 +54135,9 @@ const __vue2_script$15 = {
|
|
|
54104
54135
|
} else {
|
|
54105
54136
|
if (this.noSortLine > -1) {
|
|
54106
54137
|
topData = this.tableData.slice(0, this.noSortLine);
|
|
54107
|
-
this.tableData.
|
|
54138
|
+
restData = this.tableData.slice(this.noSortLine);
|
|
54108
54139
|
}
|
|
54109
|
-
|
|
54140
|
+
restData.sort((a, b) => {
|
|
54110
54141
|
if (typeof a[this.sortParams.sort] == "number" && typeof b[this.sortParams.sort] == "number") {
|
|
54111
54142
|
let _a = isNaN(parseFloat(a[this.sortParams.sort])) ? 0 : parseFloat(a[this.sortParams.sort]);
|
|
54112
54143
|
let _b = isNaN(parseFloat(b[this.sortParams.sort])) ? 0 : parseFloat(b[this.sortParams.sort]);
|
|
@@ -54118,11 +54149,15 @@ const __vue2_script$15 = {
|
|
|
54118
54149
|
}
|
|
54119
54150
|
});
|
|
54120
54151
|
if (this.noSortLine > -1) {
|
|
54121
|
-
this.tableData
|
|
54152
|
+
this.tableData = [...topData, ...restData];
|
|
54153
|
+
} else {
|
|
54154
|
+
this.tableData = [...restData];
|
|
54122
54155
|
}
|
|
54123
54156
|
}
|
|
54124
54157
|
this.$nextTick().then(() => {
|
|
54158
|
+
var _a;
|
|
54125
54159
|
this.gridApi.refreshCells({ force: true });
|
|
54160
|
+
(_a = this.gridApi) == null ? void 0 : _a.redrawRows();
|
|
54126
54161
|
});
|
|
54127
54162
|
}
|
|
54128
54163
|
this.$emit("on-sort-change", sortParams);
|
|
@@ -54338,6 +54373,11 @@ const __vue2_script$15 = {
|
|
|
54338
54373
|
agColumn.rowDrag = column.rowDrag;
|
|
54339
54374
|
}
|
|
54340
54375
|
agColumn.sortable = column.sortable;
|
|
54376
|
+
if (column.comparator) {
|
|
54377
|
+
agColumn.comparator = column.comparator;
|
|
54378
|
+
} else {
|
|
54379
|
+
agColumn.comparator = () => 0;
|
|
54380
|
+
}
|
|
54341
54381
|
if (column.type == "index") {
|
|
54342
54382
|
agColumn.cellRenderer = function(params) {
|
|
54343
54383
|
if (params.node.rowPinned) {
|
|
@@ -54389,6 +54429,7 @@ const __vue2_script$15 = {
|
|
|
54389
54429
|
if (column.type) {
|
|
54390
54430
|
if (column.isSum) {
|
|
54391
54431
|
agColumn.cellRendererSelector = (params) => {
|
|
54432
|
+
var _a2;
|
|
54392
54433
|
if (params.node.rowPinned) {
|
|
54393
54434
|
return {
|
|
54394
54435
|
component: "AgFormat",
|
|
@@ -54403,13 +54444,15 @@ const __vue2_script$15 = {
|
|
|
54403
54444
|
params: {
|
|
54404
54445
|
...column.cellRendererParams,
|
|
54405
54446
|
scopedSlots: this.$scopedSlots,
|
|
54406
|
-
scaleFn: () => this.dealColumnScale(column)
|
|
54447
|
+
scaleFn: () => this.dealColumnScale(column),
|
|
54448
|
+
intNums: this.intNums == void 0 ? ((_a2 = this.$config) == null ? void 0 : _a2.indNumDefault) || 13 : this.intNums
|
|
54407
54449
|
}
|
|
54408
54450
|
};
|
|
54409
54451
|
}
|
|
54410
54452
|
};
|
|
54411
54453
|
} else {
|
|
54412
54454
|
agColumn.cellRendererSelector = (params) => {
|
|
54455
|
+
var _a2;
|
|
54413
54456
|
if (params.node.rowPinned) {
|
|
54414
54457
|
return void 0;
|
|
54415
54458
|
} else {
|
|
@@ -54418,7 +54461,8 @@ const __vue2_script$15 = {
|
|
|
54418
54461
|
params: {
|
|
54419
54462
|
...column.cellRendererParams,
|
|
54420
54463
|
scopedSlots: this.$scopedSlots,
|
|
54421
|
-
scaleFn: () => this.dealColumnScale(column)
|
|
54464
|
+
scaleFn: () => this.dealColumnScale(column),
|
|
54465
|
+
intNums: this.intNums == void 0 ? ((_a2 = this.$config) == null ? void 0 : _a2.indNumDefault) || 13 : this.intNums
|
|
54422
54466
|
}
|
|
54423
54467
|
};
|
|
54424
54468
|
}
|
|
@@ -54800,6 +54844,12 @@ const __vue2_script$15 = {
|
|
|
54800
54844
|
if (this.gridApi) {
|
|
54801
54845
|
this.gridApi.hideOverlay();
|
|
54802
54846
|
}
|
|
54847
|
+
const keepSelected = this.keepSelected == void 0 ? this.$config.agKeepSelected || false : this.keepSelected;
|
|
54848
|
+
let selectedRowsCache;
|
|
54849
|
+
if (keepSelected && this.gridApi) {
|
|
54850
|
+
selectedRowsCache = this.getSelection();
|
|
54851
|
+
console.log("new selectedRowsCache:", selectedRowsCache);
|
|
54852
|
+
}
|
|
54803
54853
|
this.tableLoading = true;
|
|
54804
54854
|
this.dataApi(
|
|
54805
54855
|
Object.assign(
|
|
@@ -54809,6 +54859,7 @@ const __vue2_script$15 = {
|
|
|
54809
54859
|
this.searchParams
|
|
54810
54860
|
)
|
|
54811
54861
|
).then(async (result) => {
|
|
54862
|
+
var _a;
|
|
54812
54863
|
if (result) {
|
|
54813
54864
|
this.overlayNoRowsTemplate = '<span style="padding: 10px;">\u6570\u636E\u4E3A\u7A7A</span>';
|
|
54814
54865
|
this.$emit("on-data-load", result);
|
|
@@ -54830,7 +54881,41 @@ const __vue2_script$15 = {
|
|
|
54830
54881
|
});
|
|
54831
54882
|
}
|
|
54832
54883
|
this.tableData = await this.renderTreeData(data2);
|
|
54833
|
-
|
|
54884
|
+
console.log("rowKey:", this.rowKey);
|
|
54885
|
+
if (keepSelected && (selectedRowsCache == null ? void 0 : selectedRowsCache.length) > 0 && this.gridApi && this.rowKey !== "") {
|
|
54886
|
+
this.$nextTick(() => {
|
|
54887
|
+
const copyTableData = _.cloneDeep(this.rowDataFiltered);
|
|
54888
|
+
const visibleData = selectedRowsCache.filter((cachedRow) => {
|
|
54889
|
+
if (!cachedRow.hasOwnProperty(this.rowKey) || cachedRow[this.rowKey] === void 0) {
|
|
54890
|
+
console.log("rowKey\u4E0D\u5B58\u5728", this.rowKey);
|
|
54891
|
+
return false;
|
|
54892
|
+
}
|
|
54893
|
+
return copyTableData.some((row) => row[this.rowKey] === cachedRow[this.rowKey]);
|
|
54894
|
+
});
|
|
54895
|
+
if (visibleData.length === 0) {
|
|
54896
|
+
return;
|
|
54897
|
+
}
|
|
54898
|
+
this.setSelectionByRowKey(visibleData, true);
|
|
54899
|
+
const rowIndexs = visibleData.map((selectRow) => {
|
|
54900
|
+
const index2 = copyTableData.findIndex(
|
|
54901
|
+
(row) => row[this.rowKey] === selectRow[this.rowKey]
|
|
54902
|
+
);
|
|
54903
|
+
return index2;
|
|
54904
|
+
}).filter((idx) => idx !== -1);
|
|
54905
|
+
if (rowIndexs.length > 0) {
|
|
54906
|
+
const minIndex = Math.min(...rowIndexs);
|
|
54907
|
+
this.gridApi.ensureIndexVisible(minIndex, "middle");
|
|
54908
|
+
}
|
|
54909
|
+
});
|
|
54910
|
+
}
|
|
54911
|
+
this.totalNumber = ((_a = result == null ? void 0 : result.data) == null ? void 0 : _a.total) || 0;
|
|
54912
|
+
setTimeout(() => {
|
|
54913
|
+
if (this.gridApi) {
|
|
54914
|
+
this.refreshCells();
|
|
54915
|
+
this.redrawRows();
|
|
54916
|
+
console.log("dataApi refreshRows");
|
|
54917
|
+
}
|
|
54918
|
+
}, 0);
|
|
54834
54919
|
this.$emit("on-data-format-load", result);
|
|
54835
54920
|
}
|
|
54836
54921
|
this.tableLoading = false;
|
|
@@ -54841,6 +54926,13 @@ const __vue2_script$15 = {
|
|
|
54841
54926
|
});
|
|
54842
54927
|
} else if (!this.dataApi) {
|
|
54843
54928
|
this.totalNumber = this.value.length;
|
|
54929
|
+
setTimeout(() => {
|
|
54930
|
+
if (this.gridApi) {
|
|
54931
|
+
this.refreshCells();
|
|
54932
|
+
this.redrawRows();
|
|
54933
|
+
console.log("noDataApi refreshRows");
|
|
54934
|
+
}
|
|
54935
|
+
}, 0);
|
|
54844
54936
|
}
|
|
54845
54937
|
this.optionDropdownVisible = false;
|
|
54846
54938
|
},
|
|
@@ -54920,6 +55012,23 @@ const __vue2_script$15 = {
|
|
|
54920
55012
|
this.gridApi.setNodesSelected({ nodes: deselected, newValue: false });
|
|
54921
55013
|
}, 50);
|
|
54922
55014
|
},
|
|
55015
|
+
setSelectionByRowKey(items, cancelOthers) {
|
|
55016
|
+
if (this.rowKey === "")
|
|
55017
|
+
return;
|
|
55018
|
+
let sels = (items || []).map((d) => d[this.rowKey]);
|
|
55019
|
+
let selected = [], deselected = [];
|
|
55020
|
+
setTimeout(() => {
|
|
55021
|
+
this.gridApi.forEachNode((node) => {
|
|
55022
|
+
if (sels.includes(node.data[this.rowKey])) {
|
|
55023
|
+
selected.push(node);
|
|
55024
|
+
} else if (cancelOthers) {
|
|
55025
|
+
deselected.push(node);
|
|
55026
|
+
}
|
|
55027
|
+
});
|
|
55028
|
+
this.gridApi.setNodesSelected({ nodes: selected, newValue: true });
|
|
55029
|
+
this.gridApi.setNodesSelected({ nodes: deselected, newValue: false });
|
|
55030
|
+
}, 50);
|
|
55031
|
+
},
|
|
54923
55032
|
getXData() {
|
|
54924
55033
|
if (this.unitType == "X") {
|
|
54925
55034
|
return this.tableData;
|
|
@@ -63945,8 +64054,8 @@ var ConditionPanel = /* @__PURE__ */ function() {
|
|
|
63945
64054
|
return __component__$n.exports;
|
|
63946
64055
|
}();
|
|
63947
64056
|
/*!
|
|
63948
|
-
* Signature Pad v4.
|
|
63949
|
-
* (c)
|
|
64057
|
+
* Signature Pad v4.2.0 | https://github.com/szimek/signature_pad
|
|
64058
|
+
* (c) 2024 Szymon Nowak | Released under the MIT license
|
|
63950
64059
|
*/
|
|
63951
64060
|
class Point {
|
|
63952
64061
|
constructor(x, y, pressure, time) {
|
|
@@ -64151,8 +64260,9 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
64151
64260
|
this.penColor = options.penColor || "black";
|
|
64152
64261
|
this.backgroundColor = options.backgroundColor || "rgba(0,0,0,0)";
|
|
64153
64262
|
this.compositeOperation = options.compositeOperation || "source-over";
|
|
64263
|
+
this.canvasContextOptions = "canvasContextOptions" in options ? options.canvasContextOptions : {};
|
|
64154
64264
|
this._strokeMoveUpdate = this.throttle ? throttle(SignaturePad.prototype._strokeUpdate, this.throttle) : SignaturePad.prototype._strokeUpdate;
|
|
64155
|
-
this._ctx = canvas.getContext("2d");
|
|
64265
|
+
this._ctx = canvas.getContext("2d", this.canvasContextOptions);
|
|
64156
64266
|
this.clear();
|
|
64157
64267
|
this.on();
|
|
64158
64268
|
}
|