@sankhyalabs/ezui 1.1.81 → 1.1.84
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/README.md +2 -1
- package/dist/cjs/ApplicationUtils-d1c1db56.js +35 -0
- package/dist/cjs/{AssetsUtils-02db4f46.js → AssetsUtils-caf95dab.js} +1 -1
- package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/{ez-grid.cjs.entry.js → ez-button_11.cjs.entry.js} +1448 -22
- package/dist/cjs/ez-calendar.cjs.entry.js +217 -0
- package/dist/cjs/ez-collapsible-box_7.cjs.entry.js +853 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +254 -0
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +722 -0
- package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +2 -2
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +3 -3
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/{index-2003dec4.js → index-0bce1636.js} +3 -0
- package/dist/cjs/{index-4fc4a0a4.js → index-789fa661.js} +56 -42
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +19 -25
- package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +10 -7
- package/dist/collection/components/ez-grid/ez-grid.css +4 -1
- package/dist/collection/components/ez-grid/ez-grid.js +4 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +1 -1
- package/dist/collection/components/test-du/test-du.js +3 -27
- package/dist/custom-elements/index.js +79 -85
- package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
- package/dist/esm/{AssetsUtils-76ca41e1.js → AssetsUtils-9b1d9c38.js} +1 -1
- package/dist/esm/ez-action-chip.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/{ez-grid.entry.js → ez-button_11.entry.js} +1428 -12
- package/dist/esm/ez-calendar.entry.js +213 -0
- package/dist/esm/ez-collapsible-box_7.entry.js +843 -0
- package/dist/esm/ez-combo-box.entry.js +250 -0
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +718 -0
- package/dist/esm/ez-label-chip.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +2 -2
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +3 -3
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ezui.js +2 -2
- package/dist/esm/{index-e31373d9.js → index-461f1302.js} +57 -43
- package/dist/esm/{index-077c7fcf.js → index-d80a8d1f.js} +3 -0
- package/dist/esm/loader.js +2 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-57ea4b84.entry.js → p-091b27f2.entry.js} +1 -1
- package/dist/ezui/{p-6d157776.entry.js → p-19d8a928.entry.js} +1 -1
- package/dist/ezui/{p-a4a39579.entry.js → p-39218c31.entry.js} +1 -1
- package/dist/ezui/{p-da31cd21.entry.js → p-6206515e.entry.js} +1 -1
- package/dist/ezui/p-7107d7ef.js +1 -0
- package/dist/ezui/{p-7de3c95d.js → p-7c101b34.js} +1 -1
- package/dist/ezui/p-7c4d4946.js +1 -0
- package/dist/ezui/p-88e84ff2.entry.js +1 -0
- package/dist/ezui/p-8b7a4a16.entry.js +1 -0
- package/dist/ezui/p-9f98c4d1.entry.js +1 -0
- package/dist/ezui/{p-920bb8c9.entry.js → p-a52b3368.entry.js} +1 -1
- package/dist/ezui/p-b1d7488d.entry.js +1 -0
- package/dist/ezui/{p-0a2056d9.entry.js → p-b678dc80.entry.js} +1 -1
- package/dist/ezui/{p-1c8d64d0.entry.js → p-ca6240ff.entry.js} +46 -46
- package/dist/ezui/{p-da63000f.entry.js → p-cc448554.entry.js} +1 -1
- package/dist/ezui/{p-aef3394b.entry.js → p-d93a3e2b.entry.js} +1 -1
- package/dist/ezui/p-f87c7082.js +1 -0
- package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +2 -1
- package/dist/types/components/test-du/test-du.d.ts +0 -6
- package/package.json +3 -3
- package/react/{readme.md → .keepfolder} +0 -0
- package/dist/cjs/ez-button_3.cjs.entry.js +0 -520
- package/dist/cjs/ez-calendar_14.cjs.entry.js +0 -2598
- package/dist/cjs/ez-icon.cjs.entry.js +0 -30
- package/dist/cjs/ez-modal_2.cjs.entry.js +0 -370
- package/dist/esm/ez-button_3.entry.js +0 -514
- package/dist/esm/ez-calendar_14.entry.js +0 -2581
- package/dist/esm/ez-icon.entry.js +0 -26
- package/dist/esm/ez-modal_2.entry.js +0 -365
- package/dist/ezui/p-1e36e3ff.entry.js +0 -1
- package/dist/ezui/p-446ec85b.js +0 -1
- package/dist/ezui/p-8b9ef58b.entry.js +0 -1
- package/dist/ezui/p-983bd291.js +0 -1
- package/dist/ezui/p-9dbf569a.entry.js +0 -1
- package/dist/ezui/p-d64a3939.entry.js +0 -1
|
@@ -899,6 +899,7 @@ var Action;
|
|
|
899
899
|
Action["DATA_SAVED"] = "dataSaved";
|
|
900
900
|
Action["RECORDS_REMOVED"] = "recordsRemoved";
|
|
901
901
|
Action["RECORDS_ADDED"] = "recordsAdded";
|
|
902
|
+
Action["RECORDS_COPIED"] = "recordsCopied";
|
|
902
903
|
Action["DATA_CHANGED"] = "dataChanged";
|
|
903
904
|
Action["EDITION_CANCELED"] = "editionCanceled";
|
|
904
905
|
Action["CHANGE_UNDONE"] = "changeUndone";
|
|
@@ -937,7 +938,6 @@ class StateManager {
|
|
|
937
938
|
}
|
|
938
939
|
process(action) {
|
|
939
940
|
const oldPresent = this._present;
|
|
940
|
-
let hasChange = false;
|
|
941
941
|
let hasHistChange = false;
|
|
942
942
|
this._histClean = false;
|
|
943
943
|
this._reducers.forEach(reducer => {
|
|
@@ -947,7 +947,6 @@ class StateManager {
|
|
|
947
947
|
const newSlice = reducer.reduce(this, oldSlice, action);
|
|
948
948
|
if (newSlice !== oldSlice) {
|
|
949
949
|
this.updateSlice(sliceName, newSlice, isHistoric);
|
|
950
|
-
hasChange = true;
|
|
951
950
|
hasHistChange || (hasHistChange = isHistoric);
|
|
952
951
|
}
|
|
953
952
|
});
|
|
@@ -956,16 +955,6 @@ class StateManager {
|
|
|
956
955
|
this._future = [];
|
|
957
956
|
document.dispatchEvent(new CustomEvent("undoableAction", { detail: this }));
|
|
958
957
|
}
|
|
959
|
-
if (hasChange) {
|
|
960
|
-
console.log(JSON.stringify(this, (_key, value) => {
|
|
961
|
-
if (value instanceof Map) {
|
|
962
|
-
return { dataType: "Map", value: Array.from(value.entries()) };
|
|
963
|
-
}
|
|
964
|
-
else {
|
|
965
|
-
return value;
|
|
966
|
-
}
|
|
967
|
-
}, 3));
|
|
968
|
-
}
|
|
969
958
|
}
|
|
970
959
|
select(sliceName, selector) {
|
|
971
960
|
const isHistoric = this.isHistoric(sliceName);
|
|
@@ -1128,6 +1117,7 @@ class AddedRecordsReducerImpl {
|
|
|
1128
1117
|
reduce(_stateManager, currentState, action) {
|
|
1129
1118
|
switch (action.type) {
|
|
1130
1119
|
case Action.RECORDS_ADDED:
|
|
1120
|
+
case Action.RECORDS_COPIED:
|
|
1131
1121
|
return (currentState || []).concat(action.payload);
|
|
1132
1122
|
case Action.DATA_SAVED:
|
|
1133
1123
|
case Action.EDITION_CANCELED:
|
|
@@ -1260,6 +1250,7 @@ class SelectionReducerImpl {
|
|
|
1260
1250
|
reduce(stateManager, currentState, action) {
|
|
1261
1251
|
switch (action.type) {
|
|
1262
1252
|
case Action.RECORDS_ADDED:
|
|
1253
|
+
case Action.RECORDS_COPIED:
|
|
1263
1254
|
return action.payload.map((r) => r.__record__id__);
|
|
1264
1255
|
case Action.DATA_SAVED:
|
|
1265
1256
|
return updateSavedIds(stateManager, action.payload.records);
|
|
@@ -1387,6 +1378,7 @@ class DataUnit {
|
|
|
1387
1378
|
this._observers = [];
|
|
1388
1379
|
this._filterProviders = [];
|
|
1389
1380
|
this._sortingProvider = undefined;
|
|
1381
|
+
this._interceptors = [];
|
|
1390
1382
|
}
|
|
1391
1383
|
get name() {
|
|
1392
1384
|
return this._name;
|
|
@@ -1454,6 +1446,9 @@ class DataUnit {
|
|
|
1454
1446
|
});
|
|
1455
1447
|
}
|
|
1456
1448
|
// API
|
|
1449
|
+
addInterceptor(interceptor) {
|
|
1450
|
+
this._interceptors.push(interceptor);
|
|
1451
|
+
}
|
|
1457
1452
|
addFilterProvider(provider) {
|
|
1458
1453
|
this._filterProviders.push(provider);
|
|
1459
1454
|
}
|
|
@@ -1479,6 +1474,12 @@ class DataUnit {
|
|
|
1479
1474
|
addRecord() {
|
|
1480
1475
|
this.dispatchAction(Action.RECORDS_ADDED, prepareAddedRecordId(this._stateManager, [{}]));
|
|
1481
1476
|
}
|
|
1477
|
+
copySelected() {
|
|
1478
|
+
const selectedRecords = this.getSelectedRecords();
|
|
1479
|
+
if (selectedRecords) {
|
|
1480
|
+
this.dispatchAction(Action.RECORDS_COPIED, prepareAddedRecordId(this._stateManager, selectedRecords));
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1482
1483
|
removeSelectedRecords() {
|
|
1483
1484
|
const selection = getSelection(this._stateManager);
|
|
1484
1485
|
if (selection) {
|
|
@@ -1504,6 +1505,13 @@ class DataUnit {
|
|
|
1504
1505
|
setSelectionByIndex(selection) {
|
|
1505
1506
|
this.dispatchAction(Action.SELECTION_CHANGED, { type: "index", selection });
|
|
1506
1507
|
}
|
|
1508
|
+
getSelectedRecords() {
|
|
1509
|
+
const selection = this.getSelection();
|
|
1510
|
+
if (selection) {
|
|
1511
|
+
const currentRecords = this.records;
|
|
1512
|
+
return currentRecords === null || currentRecords === void 0 ? void 0 : currentRecords.filter(r => selection.includes(r.__record__id__));
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1507
1515
|
nextRecord() {
|
|
1508
1516
|
this.dispatchAction(Action.NEXT_SELECTED);
|
|
1509
1517
|
}
|
|
@@ -1536,10 +1544,17 @@ class DataUnit {
|
|
|
1536
1544
|
}
|
|
1537
1545
|
// Actions / State manager
|
|
1538
1546
|
dispatchAction(actionType, payload) {
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
this.
|
|
1542
|
-
|
|
1547
|
+
var _a;
|
|
1548
|
+
let action = new DataUnitAction(actionType, payload);
|
|
1549
|
+
(_a = this._interceptors) === null || _a === void 0 ? void 0 : _a.forEach(interceptor => {
|
|
1550
|
+
if (action) {
|
|
1551
|
+
action = interceptor.interceptAction(action);
|
|
1552
|
+
}
|
|
1553
|
+
});
|
|
1554
|
+
if (action) {
|
|
1555
|
+
this._stateManager.process(action);
|
|
1556
|
+
this._observers.forEach(f => f(action));
|
|
1557
|
+
}
|
|
1543
1558
|
}
|
|
1544
1559
|
subscribe(observer) {
|
|
1545
1560
|
this._observers.push(observer);
|
|
@@ -2355,7 +2370,7 @@ exports.printError = printError;
|
|
|
2355
2370
|
|
|
2356
2371
|
|
|
2357
2372
|
|
|
2358
|
-
function
|
|
2373
|
+
function toNormalizedOptions(args) {
|
|
2359
2374
|
const firstArg = args[0];
|
|
2360
2375
|
|
|
2361
2376
|
if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {
|
|
@@ -2422,13 +2437,13 @@ class GraphQLError extends Error {
|
|
|
2422
2437
|
*/
|
|
2423
2438
|
|
|
2424
2439
|
/**
|
|
2425
|
-
* @deprecated Please use the `
|
|
2440
|
+
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
|
|
2426
2441
|
*/
|
|
2427
2442
|
constructor(message, ...rawArgs) {
|
|
2428
2443
|
var _this$nodes, _nodeLocations$, _ref;
|
|
2429
2444
|
|
|
2430
2445
|
const { nodes, source, positions, path, originalError, extensions } =
|
|
2431
|
-
|
|
2446
|
+
toNormalizedOptions(rawArgs);
|
|
2432
2447
|
super(message);
|
|
2433
2448
|
this.name = 'GraphQLError';
|
|
2434
2449
|
this.path = path !== null && path !== void 0 ? path : undefined;
|
|
@@ -2601,7 +2616,7 @@ function printError(error) {
|
|
|
2601
2616
|
* Given a GraphQLError, format it according to the rules described by the
|
|
2602
2617
|
* Response Format, Errors section of the GraphQL Specification.
|
|
2603
2618
|
*
|
|
2604
|
-
* @deprecated Please use `error.
|
|
2619
|
+
* @deprecated Please use `error.toJSON` instead. Will be removed in v17
|
|
2605
2620
|
*/
|
|
2606
2621
|
|
|
2607
2622
|
function formatError(error) {
|
|
@@ -2623,12 +2638,10 @@ exports.syntaxError = syntaxError;
|
|
|
2623
2638
|
* descriptive information about the syntax error's position in the source.
|
|
2624
2639
|
*/
|
|
2625
2640
|
function syntaxError(source, position, description) {
|
|
2626
|
-
return new GraphQLError_1.GraphQLError(
|
|
2627
|
-
`Syntax Error: ${description}`,
|
|
2628
|
-
undefined,
|
|
2641
|
+
return new GraphQLError_1.GraphQLError(`Syntax Error: ${description}`, {
|
|
2629
2642
|
source,
|
|
2630
|
-
[position],
|
|
2631
|
-
);
|
|
2643
|
+
positions: [position],
|
|
2644
|
+
});
|
|
2632
2645
|
}
|
|
2633
2646
|
});
|
|
2634
2647
|
|
|
@@ -4449,8 +4462,9 @@ exports.instanceOf = void 0;
|
|
|
4449
4462
|
* See: https://webpack.js.org/guides/production/
|
|
4450
4463
|
*/
|
|
4451
4464
|
const instanceOf =
|
|
4452
|
-
/* c8 ignore next
|
|
4465
|
+
/* c8 ignore next 6 */
|
|
4453
4466
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
4467
|
+
// eslint-disable-next-line no-undef
|
|
4454
4468
|
function instanceOf(value, constructor) {
|
|
4455
4469
|
return value instanceof constructor;
|
|
4456
4470
|
}
|
|
@@ -8795,36 +8809,30 @@ const buildFromConfig = (fields, dataUnit) => {
|
|
|
8795
8809
|
if (config.visible !== false) {
|
|
8796
8810
|
const tab = config.tab || "Geral";
|
|
8797
8811
|
const descriptor = dataUnit.getField(config.name);
|
|
8798
|
-
if (
|
|
8799
|
-
sheets.
|
|
8800
|
-
|
|
8801
|
-
let isRequired = false;
|
|
8802
|
-
if (config.required === undefined) {
|
|
8803
|
-
if (descriptor) {
|
|
8804
|
-
isRequired = descriptor.required;
|
|
8812
|
+
if (descriptor) {
|
|
8813
|
+
if (!sheets.has(tab)) {
|
|
8814
|
+
sheets.set(tab, new Map());
|
|
8805
8815
|
}
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8816
|
+
const isRequired = config.required === undefined ? descriptor.required : config.required;
|
|
8817
|
+
if (isRequired) {
|
|
8818
|
+
requiredFields.push(config.name);
|
|
8819
|
+
}
|
|
8820
|
+
const tabItens = sheets.get(tab);
|
|
8821
|
+
const fieldMD = { config, descriptor };
|
|
8822
|
+
const group = config.group;
|
|
8823
|
+
if (group) {
|
|
8824
|
+
const key = `group::${group}`;
|
|
8825
|
+
if (!tabItens.has(key)) {
|
|
8826
|
+
tabItens.set(key, { label: group, items: [fieldMD] });
|
|
8827
|
+
}
|
|
8828
|
+
else {
|
|
8829
|
+
tabItens.get(key).items.push(fieldMD);
|
|
8830
|
+
}
|
|
8820
8831
|
}
|
|
8821
8832
|
else {
|
|
8822
|
-
tabItens.
|
|
8833
|
+
tabItens.set(config.name, fieldMD);
|
|
8823
8834
|
}
|
|
8824
8835
|
}
|
|
8825
|
-
else {
|
|
8826
|
-
tabItens.set(config.name, fieldMD);
|
|
8827
|
-
}
|
|
8828
8836
|
}
|
|
8829
8837
|
});
|
|
8830
8838
|
const metadata = new FormMetadata();
|
|
@@ -119648,19 +119656,22 @@ class DataUnitBridge {
|
|
|
119648
119656
|
processAction(action) {
|
|
119649
119657
|
switch (action.type) {
|
|
119650
119658
|
case Action.METADATA_LOADED:
|
|
119651
|
-
|
|
119652
|
-
this._dataUnit.metadata.fields.forEach(f => {
|
|
119653
|
-
if (f.visible !== false) {
|
|
119654
|
-
columnDefs.push({ label: f.label, name: f.name });
|
|
119655
|
-
}
|
|
119656
|
-
});
|
|
119657
|
-
this._gridController.setColumnsDef(columnDefs, true);
|
|
119659
|
+
this._gridController.setColumnsDef(this.buildColumnDefs(), true);
|
|
119658
119660
|
break;
|
|
119659
119661
|
}
|
|
119660
119662
|
}
|
|
119663
|
+
buildColumnDefs() {
|
|
119664
|
+
const columnDefs = [];
|
|
119665
|
+
this._dataUnit.metadata.fields.forEach(f => {
|
|
119666
|
+
if (f.visible !== false) {
|
|
119667
|
+
columnDefs.push({ label: f.label, name: f.name });
|
|
119668
|
+
}
|
|
119669
|
+
});
|
|
119670
|
+
return columnDefs;
|
|
119671
|
+
}
|
|
119661
119672
|
}
|
|
119662
119673
|
|
|
119663
|
-
const ezGridCss = ":
|
|
119674
|
+
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ezgrid__header--background-color:var(--background--xlight, #FFF)}.grid__header.sc-ez-grid{display:flex;justify-content:flex-end;align-items:center;background-color:var(--ezgrid__header--background-color)}";
|
|
119664
119675
|
|
|
119665
119676
|
let EzGrid$1 = class extends HTMLElement$1 {
|
|
119666
119677
|
constructor() {
|
|
@@ -119741,6 +119752,9 @@ let EzGrid$1 = class extends HTMLElement$1 {
|
|
|
119741
119752
|
serverURL: this.serverUrl,
|
|
119742
119753
|
dataUnit: this.dataUnit
|
|
119743
119754
|
});
|
|
119755
|
+
if (this._dataUnitBridge) {
|
|
119756
|
+
this._gridController.setColumnsDef(this._dataUnitBridge.buildColumnDefs(), true);
|
|
119757
|
+
}
|
|
119744
119758
|
}
|
|
119745
119759
|
getPaginationControl() {
|
|
119746
119760
|
if (this.pageSize === -1) {
|
|
@@ -121636,13 +121650,12 @@ let EzUpload$1 = class extends HTMLElement$1 {
|
|
|
121636
121650
|
static get style() { return ezUploadCss; }
|
|
121637
121651
|
};
|
|
121638
121652
|
|
|
121639
|
-
const gridConfigCss = "
|
|
121653
|
+
const gridConfigCss = ".sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-family:var(--font-pattern, \"Sora\");--ez-grid-config__title--font-weight:var(--text-weight--large, 14px);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:center;align-items:center}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size)}.title.sc-grid-config{display:flex;font-family:var(--ez-grid-config__title--font-family);margin:0;font-weight:var(--ez-grid-config__title--font-weight);line-height:1.3}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}";
|
|
121640
121654
|
|
|
121641
121655
|
let GridConfig$1 = class extends HTMLElement$1 {
|
|
121642
121656
|
constructor() {
|
|
121643
121657
|
super();
|
|
121644
121658
|
this.__registerHost();
|
|
121645
|
-
this.__attachShadow();
|
|
121646
121659
|
this.configFinish = createEvent(this, "configFinish", 7);
|
|
121647
121660
|
this.configCancel = createEvent(this, "configCancel", 7);
|
|
121648
121661
|
this._columnListHistory = [];
|
|
@@ -121960,15 +121973,7 @@ let TestDu$1 = class extends HTMLElement$1 {
|
|
|
121960
121973
|
}
|
|
121961
121974
|
]
|
|
121962
121975
|
};
|
|
121963
|
-
this.
|
|
121964
|
-
{ name: "CODPARC", label: "Parceiro" },
|
|
121965
|
-
{ name: "NOMEPARC", label: "Mamão" },
|
|
121966
|
-
{ name: "P", label: "Pêra", group: "Grupo 1" },
|
|
121967
|
-
{ name: "ME", label: "Melancia", tab: "aba 1", group: "Grupo 2" },
|
|
121968
|
-
{ name: "L", label: "Laranja", tab: "aba 1", group: "Grupo 1" },
|
|
121969
|
-
{ name: "LI", label: "Limão", tab: "aba 1", group: "Grupo 2" }
|
|
121970
|
-
];
|
|
121971
|
-
this.dataUnit.records = [
|
|
121976
|
+
this.dataUnit.dataLoader = () => new Promise(accept => accept([
|
|
121972
121977
|
{
|
|
121973
121978
|
__record__id__: "1321321321321321",
|
|
121974
121979
|
CODPARC: 10,
|
|
@@ -121977,21 +121982,10 @@ let TestDu$1 = class extends HTMLElement$1 {
|
|
|
121977
121982
|
L: "Bagaço",
|
|
121978
121983
|
LI: "Azedo"
|
|
121979
121984
|
}
|
|
121980
|
-
];
|
|
121985
|
+
]));
|
|
121981
121986
|
}
|
|
121982
121987
|
render() {
|
|
121983
|
-
|
|
121984
|
-
//return this.somenteDataUnit();
|
|
121985
|
-
return this.configurado();
|
|
121986
|
-
}
|
|
121987
|
-
conteudoEstatico() {
|
|
121988
|
-
return (h("div", null, h("button", { onClick: () => this.form.validate() }, "Validate"), h("ez-form", { ref: ref => this.form = ref }, h("div", null, h("ez-text-input", { label: "Nome (Label est\u00E1tico)", "data-field-name": "NOMEPARC", "data-required": "true" }), h("ez-text-input", { label: "C\u00F3d parc (Label est\u00E1tico)", "data-field-name": "CODPARC", "data-required": "true" })))));
|
|
121989
|
-
}
|
|
121990
|
-
somenteDataUnit() {
|
|
121991
|
-
return (h("ez-form", { dataUnit: this.dataUnit }));
|
|
121992
|
-
}
|
|
121993
|
-
configurado() {
|
|
121994
|
-
return (h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig, ref: ref => this.form = ref }));
|
|
121988
|
+
return (h("ez-grid", { dataUnit: this.dataUnit }));
|
|
121995
121989
|
}
|
|
121996
121990
|
static get style() { return testDuCss; }
|
|
121997
121991
|
};
|
|
@@ -122007,7 +122001,7 @@ const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-i
|
|
|
122007
122001
|
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}]);
|
|
122008
122002
|
const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"]}]);
|
|
122009
122003
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [0,"ez-form",{"dataUnit":[1040],"config":[16]}]);
|
|
122010
|
-
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [
|
|
122004
|
+
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [2,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpVisible":[32]}]);
|
|
122011
122005
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513]}]);
|
|
122012
122006
|
const EzLabelChip = /*@__PURE__*/proxyCustomElement(EzLabelChip$1, [1,"ez-label-chip",{"label":[513],"enabled":[516],"removable":[516],"value":[1540]}]);
|
|
122013
122007
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
@@ -122022,7 +122016,7 @@ const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-i
|
|
|
122022
122016
|
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"]}]);
|
|
122023
122017
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"]}]);
|
|
122024
122018
|
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040]}]);
|
|
122025
|
-
const GridConfig = /*@__PURE__*/proxyCustomElement(GridConfig$1, [
|
|
122019
|
+
const GridConfig = /*@__PURE__*/proxyCustomElement(GridConfig$1, [2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040]}]);
|
|
122026
122020
|
const SelectBox = /*@__PURE__*/proxyCustomElement(SelectBox$1, [1,"select-box",{"selectedOption":[1,"selected-option"]}]);
|
|
122027
122021
|
const TestDu = /*@__PURE__*/proxyCustomElement(TestDu$1, [0,"test-du"]);
|
|
122028
122022
|
const defineCustomElements = (opts) => {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
class ApplicationUtils {
|
|
2
|
+
static async showDialog(title, message, icon = null, confirm, critical = false) {
|
|
3
|
+
return new Promise(resolve => {
|
|
4
|
+
let dialog = document.querySelector("ez-dialog");
|
|
5
|
+
if (!dialog) {
|
|
6
|
+
dialog = document.createElement("ez-dialog");
|
|
7
|
+
window.document.body.appendChild(dialog);
|
|
8
|
+
}
|
|
9
|
+
dialog.show(title, message, critical, confirm, icon).then(ok => resolve(ok));
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
static async alert(title, message, icon = null) {
|
|
13
|
+
return ApplicationUtils.showDialog(title, message, icon, false, false);
|
|
14
|
+
}
|
|
15
|
+
static async error(title, message, icon = null) {
|
|
16
|
+
return ApplicationUtils.showDialog(title, message, icon, false, true);
|
|
17
|
+
}
|
|
18
|
+
static async confirm(title, message, icon = null, critical = false) {
|
|
19
|
+
return ApplicationUtils.showDialog(title, message, icon, true, critical);
|
|
20
|
+
}
|
|
21
|
+
static async info(message) {
|
|
22
|
+
let toast = document.querySelector("ez-toast");
|
|
23
|
+
if (!toast) {
|
|
24
|
+
toast = document.createElement("ez-toast");
|
|
25
|
+
window.document.body.appendChild(toast);
|
|
26
|
+
}
|
|
27
|
+
toast.message = message;
|
|
28
|
+
toast.fadeTime = 4000;
|
|
29
|
+
toast.show();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { ApplicationUtils as A };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getAssetPath, s as setAssetPath } from './index-
|
|
1
|
+
import { a as getAssetPath, s as setAssetPath } from './index-d80a8d1f.js';
|
|
2
2
|
|
|
3
3
|
const getSpritePath = (sprite) => `${getContextAssetsPath("../assets/actions-sprite.svg")}#${sprite}`;
|
|
4
4
|
let ctxLoaded = false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-d80a8d1f.js';
|
|
2
2
|
|
|
3
3
|
const ezActionChipCss = ":host{--ez-action-chip--height:36px;--ez-action-chip--border-radius:var(--border--radius-large, 24px);--ez-action-chip__border:1px solid;--ez-action-chip__border-color-strokes:var(--color--strokes, #DCE0E8);--ez-action-chip--font-size:var(--text--medium, 14px);--ez-action-chip--font-family:var(--font-pattern, Arial);--ez-action-chip--font-weight:var(--text-weight--large, 500);--ez-action-chip__label--title--primary:var(--title--primary, #919191);--ez-action-chip__label-color--disable-secondary:var(--color--disable-secondary, #F2F5F8);--ez-action-chip__label__default--background-color--hover:var(--color--primary-200, #f2faf8);--ez-action-chip__label__default--border-color--hover:var(--color--primary-600, #007a5a)}.label__container{width:fit-content;display:flex;flex-wrap:wrap;position:relative;background-color:#FFFFFF;align-items:center;align-self:center;cursor:pointer;color:var(--ez-action-chip__label--title--primary);fill:var(--ez-action-chip__label--title--primary);border:var(--ez-action-chip__border);border-radius:var(--ez-action-chip--border-radius);border-color:var(--ez-action-chip__border-color-strokes);padding-right:var(--space--medium, 12px);padding-left:var(--space--medium, 12px)}.label__container:hover{border-color:var(--ez-action-chip__label__default--border-color--hover);background-color:var(--ez-action-chip__label__default--background-color--hover)}label{display:flex;align-items:center;font-weight:var(--text-weight--large, 600);cursor:pointer;height:var(--ez-action-chip--height);font-family:var(--ez-action-chip--font-family);font-size:var(--ez-action-chip--font-size)}";
|
|
4
4
|
|