@sankhyalabs/sankhyablocks 4.0.2 → 4.0.3
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/{SnkFormConfigManager-b1b19f62.js → SnkFormConfigManager-eb44235b.js} +14 -11
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +25 -15
- package/dist/cjs/snk-form-view.cjs.entry.js +5 -1
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid-config.cjs.entry.js +3 -5
- package/dist/cjs/{snk-guides-viewer-eb764a6b.js → snk-guides-viewer-a0f5f546.js} +2 -10
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view.css +6 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view.js +29 -33
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +41 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -9
- package/dist/collection/components/snk-form/SnkFormConfigManager.js +14 -11
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +3 -5
- package/dist/components/SnkFormConfigManager.js +14 -11
- package/dist/components/snk-detail-view2.js +25 -24
- package/dist/components/snk-form-view2.js +7 -1
- package/dist/components/snk-grid-config2.js +3 -5
- package/dist/esm/{SnkFormConfigManager-3d21511e.js → SnkFormConfigManager-ca1dbe03.js} +14 -11
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +25 -15
- package/dist/esm/snk-form-view.entry.js +5 -1
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/snk-grid-config.entry.js +3 -5
- package/dist/esm/{snk-guides-viewer-5513f260.js → snk-guides-viewer-4e53ebba.js} +2 -10
- package/dist/esm/snk-guides-viewer.entry.js +2 -2
- package/dist/sankhyablocks/p-080e7651.js +1 -0
- package/dist/sankhyablocks/{p-6d9b7544.entry.js → p-6d555d55.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bba73eb1.entry.js → p-73aa9bd4.entry.js} +1 -1
- package/dist/sankhyablocks/p-9143adf7.entry.js +1 -0
- package/dist/sankhyablocks/p-9ebb164d.entry.js +1 -0
- package/dist/sankhyablocks/p-acad56e2.js +1 -0
- package/dist/sankhyablocks/p-f219bb13.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view.d.ts +5 -7
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +8 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +0 -1
- package/dist/types/components.d.ts +20 -12
- package/package.json +1 -1
- package/dist/sankhyablocks/p-1151781b.entry.js +0 -1
- package/dist/sankhyablocks/p-1305e673.js +0 -1
- package/dist/sankhyablocks/p-7610b125.entry.js +0 -1
- package/dist/sankhyablocks/p-86f10dfc.js +0 -1
- package/dist/sankhyablocks/p-976282de.entry.js +0 -1
@@ -38,9 +38,10 @@ class SnkFormConfigManager {
|
|
38
38
|
return new Promise(resolve => {
|
39
39
|
var _a;
|
40
40
|
const cardsState = ((_a = this._config) === null || _a === void 0 ? void 0 : _a.cardsState) || new Map;
|
41
|
-
this.updateFixSequence(cardConfig, cardsState);
|
42
41
|
const currentConfig = cardsState.get(cardId);
|
43
|
-
cardsState.set(cardId,
|
42
|
+
cardsState.set(cardId, propertyChanged === "fixed" ?
|
43
|
+
this.updateFixSequence(Object.assign(Object.assign({}, currentConfig), { fixed: cardConfig.fixed }), cardsState)
|
44
|
+
: Object.assign(Object.assign({}, currentConfig), { [propertyChanged]: cardConfig[propertyChanged] }));
|
44
45
|
ConfigStorage.ConfigStorage.saveCardState(cardsState, this._configName)
|
45
46
|
.then(savedCardConfig => {
|
46
47
|
this._config = Object.assign(Object.assign({}, this._config), { cardsState });
|
@@ -48,21 +49,23 @@ class SnkFormConfigManager {
|
|
48
49
|
});
|
49
50
|
});
|
50
51
|
}
|
51
|
-
updateFixSequence(
|
52
|
-
if (!cardConfig.fixed) {
|
53
|
-
delete cardConfig.fixSequence;
|
54
|
-
return;
|
55
|
-
}
|
56
|
-
if (cardConfig.fixSequence != undefined) {
|
57
|
-
return;
|
58
|
-
}
|
52
|
+
updateFixSequence(updatingCardConfig, cardsState) {
|
59
53
|
let maxSequence = -1;
|
60
54
|
Array.from(cardsState.values()).forEach(cardConfig => {
|
55
|
+
if (!cardConfig.fixed) {
|
56
|
+
delete updatingCardConfig.fixSequence;
|
57
|
+
}
|
61
58
|
if (cardConfig.fixSequence != undefined) {
|
62
59
|
maxSequence = Math.max(maxSequence, cardConfig.fixSequence);
|
63
60
|
}
|
64
61
|
});
|
65
|
-
|
62
|
+
if (updatingCardConfig.fixed) {
|
63
|
+
updatingCardConfig.fixSequence = maxSequence + 1;
|
64
|
+
}
|
65
|
+
else {
|
66
|
+
delete updatingCardConfig.fixSequence;
|
67
|
+
}
|
68
|
+
return updatingCardConfig;
|
66
69
|
}
|
67
70
|
getFieldsList(dataUnit) {
|
68
71
|
var _a;
|
package/dist/cjs/loader.cjs.js
CHANGED
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
16
16
|
return patchEsm().then(() => {
|
17
|
-
return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config.cjs",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-detail-view.cjs",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"
|
17
|
+
return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config.cjs",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-detail-view.cjs",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-configurator.cjs",[[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[2,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"_permissions":[32]}]]],["snk-grid-config.cjs",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"]}]]],["snk-field-config.cjs",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-item.cjs",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["snk-filter-list.cjs",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["snk-filter-bar.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-grid.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}]]],["snk-config-options.cjs",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config.cjs",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-form-config.cjs",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-exporter-email-sender.cjs",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter.cjs",[[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-guides-viewer.cjs",[[2,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_currentViewMode":[32],"goToView":[64]}]]],["snk-form.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadGridConfig":[64],"loadTotals":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64]}]]],["snk-form-summary.cjs",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["snk-form-view.cjs",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["snk-filter-modal.cjs",[[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}]]],["snk-select-box.cjs",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]]], options);
|
18
18
|
});
|
19
19
|
};
|
20
20
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
17
17
|
};
|
18
18
|
|
19
19
|
patchBrowser().then(options => {
|
20
|
-
return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config.cjs",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-detail-view.cjs",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"
|
20
|
+
return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config.cjs",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-detail-view.cjs",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-configurator.cjs",[[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[2,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-taskbar.cjs",[[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"presentationMode":[1537,"presentation-mode"],"_permissions":[32]}]]],["snk-grid-config.cjs",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"]}]]],["snk-field-config.cjs",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-item.cjs",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["snk-filter-list.cjs",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["snk-filter-bar.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-grid.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}]]],["snk-config-options.cjs",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config.cjs",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-form-config.cjs",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-exporter-email-sender.cjs",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter.cjs",[[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-guides-viewer.cjs",[[2,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_currentViewMode":[32],"goToView":[64]}]]],["snk-form.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadGridConfig":[64],"loadTotals":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64]}]]],["snk-form-summary.cjs",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["snk-form-view.cjs",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["snk-filter-modal.cjs",[[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}]]],["snk-select-box.cjs",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]]], options);
|
21
21
|
});
|
22
22
|
|
23
23
|
exports.setNonce = index.setNonce;
|
@@ -3,21 +3,21 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
6
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-eb44235b.js');
|
7
7
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
8
8
|
require('./DataFetcher-bceeaf2d.js');
|
9
9
|
require('@sankhyalabs/core');
|
10
10
|
const index$1 = require('./index-f400b1d6.js');
|
11
11
|
const taskbarElements = require('./taskbar-elements-5e87cf44.js');
|
12
12
|
const constants = require('./constants-450c0bb7.js');
|
13
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
13
|
+
const snkGuidesViewer = require('./snk-guides-viewer-a0f5f546.js');
|
14
14
|
require('./ConfigStorage-b47fb254.js');
|
15
15
|
require('./form-config-fetcher-0c6628d5.js');
|
16
16
|
require('./_commonjsHelpers-537d719a.js');
|
17
17
|
require('./index-fc7ca86c.js');
|
18
18
|
require('./taskbar-processor-6f3d2a75.js');
|
19
19
|
|
20
|
-
const snkDetailViewCss = ".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px}.detail-header.sc-snk-detail-view{padding-bottom:0}";
|
20
|
+
const snkDetailViewCss = ".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.level-path.sc-snk-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px}.detail-header.sc-snk-detail-view{padding-bottom:0}";
|
21
21
|
|
22
22
|
const SnkDetailView = class {
|
23
23
|
constructor(hostRef) {
|
@@ -26,10 +26,9 @@ const SnkDetailView = class {
|
|
26
26
|
this.snkSwitchGuide = index.createEvent(this, "snkSwitchGuide", 7);
|
27
27
|
this.formConfigManager = undefined;
|
28
28
|
this.dataUnitName = undefined;
|
29
|
-
this.
|
29
|
+
this.guideItemPath = undefined;
|
30
30
|
this.entityName = undefined;
|
31
31
|
this.label = undefined;
|
32
|
-
this.levelPath = undefined;
|
33
32
|
this.dataUnit = undefined;
|
34
33
|
this.selectedForm = undefined;
|
35
34
|
this.dataState = undefined;
|
@@ -88,6 +87,20 @@ const SnkDetailView = class {
|
|
88
87
|
snkGuidesViewer.SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this.formConfigManager).then(() => index.forceUpdate(this));
|
89
88
|
evt.stopPropagation();
|
90
89
|
}
|
90
|
+
updateLabel() {
|
91
|
+
const guideItemPathSize = this.guideItemPath ? this.guideItemPath.length : 0;
|
92
|
+
if (guideItemPathSize > 0) {
|
93
|
+
const labels = guideItemPathSize > 0 ? this.guideItemPath.map(item => item.label) : undefined;
|
94
|
+
this.label = labels.pop();
|
95
|
+
this._levelPath = labels.length > 0 ? labels.join(" / ") : undefined;
|
96
|
+
this._guideId = this.guideItemPath[guideItemPathSize - 1].id;
|
97
|
+
}
|
98
|
+
else {
|
99
|
+
this.label = "";
|
100
|
+
this._levelPath = undefined;
|
101
|
+
this._guideId = undefined;
|
102
|
+
}
|
103
|
+
}
|
91
104
|
getNewGuideItem(currentRecord) {
|
92
105
|
if (currentRecord == undefined) {
|
93
106
|
return;
|
@@ -124,10 +137,10 @@ const SnkDetailView = class {
|
|
124
137
|
}
|
125
138
|
formName = forms[0];
|
126
139
|
}
|
127
|
-
return `${this.stripFormPattern(this.
|
140
|
+
return `${this.stripFormPattern(this._guideId)}__FORM:${formName}`;
|
128
141
|
}
|
129
142
|
getChildGuideId(child) {
|
130
|
-
return `${this.stripFormPattern(this.
|
143
|
+
return `${this.stripFormPattern(this._guideId)}::${child}`;
|
131
144
|
}
|
132
145
|
stripFormPattern(guideId) {
|
133
146
|
return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
|
@@ -141,7 +154,7 @@ const SnkDetailView = class {
|
|
141
154
|
return;
|
142
155
|
}
|
143
156
|
const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
|
144
|
-
this._cardsState = formConfig
|
157
|
+
//this._cardsState = formConfig?.cardsState;
|
145
158
|
this._formMetadata = form.buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
|
146
159
|
}
|
147
160
|
dataUnitReadyHandler(evt) {
|
@@ -158,7 +171,7 @@ const SnkDetailView = class {
|
|
158
171
|
return [];
|
159
172
|
}
|
160
173
|
emitSwitchEvent(mode) {
|
161
|
-
const guideId = mode === constants.VIEW_MODE.GRID ? this.stripFormPattern(this.
|
174
|
+
const guideId = mode === constants.VIEW_MODE.GRID ? this.stripFormPattern(this._guideId) : this.getFormGuideId();
|
162
175
|
if (guideId) {
|
163
176
|
this.snkSwitchGuide.emit(guideId);
|
164
177
|
}
|
@@ -179,12 +192,9 @@ const SnkDetailView = class {
|
|
179
192
|
this.formConfigManager.loadConfig();
|
180
193
|
}
|
181
194
|
render() {
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
}
|
186
|
-
const cardConfig = (_a = this._cardsState) === null || _a === void 0 ? void 0 : _a.get(this.selectedForm);
|
187
|
-
return (index.h(index.Host, null, snkGuidesViewer.SnkGuidesViewer.buildFixedForms(this.formConfigManager.getConfig((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.insertionMode, this.dataUnit), this._formMetadata, this.selectedForm, this.dataUnit, undefined, this.levelPath), index.h("snk-data-unit", { dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: evt => this.dataState = evt.detail }, index.h("ez-view-stack", { ref: ref => this.updateViewStack(ref) }, index.h("stack-item", null, index.h("div", { class: "ez-box ez-box--shadow grid-container" }, index.h("div", { class: "ez-flex ez-size-width--full ez-padding--large detail-header" }, index.h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this.label)), index.h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, onGridDoubleClick: () => this.emitSwitchEvent(constants.VIEW_MODE.FORM), onActionClick: evt => this.executeActionHandler(evt), presentationMode: index$1.PresentationMode.SECONDARY }))), index.h("stack-item", null, index.h("snk-form-view", { ref: (ref) => this._snkFormView = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this.levelPath }, index.h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: index$1.PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit })))))));
|
195
|
+
this.updateLabel();
|
196
|
+
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
197
|
+
return (index.h(index.Host, null, index.h("snk-data-unit", { dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: evt => this.dataState = evt.detail }, index.h("ez-view-stack", { ref: ref => this.updateViewStack(ref) }, index.h("stack-item", null, index.h("div", { class: "ez-box ez-box--shadow grid-container" }, index.h("div", { class: "ez-flex ez-size-width--full ez-padding--large detail-header" }, index.h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? index.h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), index.h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, onGridDoubleClick: () => this.emitSwitchEvent(constants.VIEW_MODE.FORM), onActionClick: evt => this.executeActionHandler(evt), presentationMode: index$1.PresentationMode.SECONDARY }))), index.h("stack-item", null, index.h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath }, index.h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: index$1.PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit })))))));
|
188
198
|
}
|
189
199
|
static get watchers() { return {
|
190
200
|
"dataState": ["observerDataState"]
|
@@ -21,6 +21,8 @@ const SnkFormView = class {
|
|
21
21
|
this.contracted = undefined;
|
22
22
|
this.fixed = false;
|
23
23
|
this.summaryFields = undefined;
|
24
|
+
this.canExpand = true;
|
25
|
+
this.canFix = true;
|
24
26
|
this.recordsValidator = undefined;
|
25
27
|
}
|
26
28
|
async showUp() {
|
@@ -83,7 +85,9 @@ const SnkFormView = class {
|
|
83
85
|
}
|
84
86
|
}
|
85
87
|
render() {
|
86
|
-
return (index.h(index.Host, { class: "ez-box__container" }, index.h("div", { class: "summary-header ez-flex ez-size-width--full" }, index.h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? index.h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), index.h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" },
|
88
|
+
return (index.h(index.Host, { class: "ez-box__container" }, index.h("div", { class: "summary-header ez-flex ez-size-width--full" }, index.h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? index.h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), index.h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
|
89
|
+
index.h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": core.ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
|
90
|
+
index.h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.contracted ? "expandir_card" : "recolher_card", "data-element-id": core.ElementIDUtils.getInternalIDInfo("toggleExpand_ezFormCard"), onClick: () => this.changeContracted(), title: this.contracted ? "Expandir" : "Resumir" }))), index.h("slot", null), this.contracted
|
87
91
|
?
|
88
92
|
index.h("snk-form-summary", { summary: this.getCardSummary() })
|
89
93
|
:
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-eb44235b.js');
|
8
8
|
require('./ConfigStorage-b47fb254.js');
|
9
9
|
require('./form-config-fetcher-0c6628d5.js');
|
10
10
|
require('./DataFetcher-bceeaf2d.js');
|
@@ -254,12 +254,10 @@ const SnkGridConfig = class {
|
|
254
254
|
}
|
255
255
|
_newConfig.columns = _newColumnConfigList;
|
256
256
|
ConfigStorage.ConfigStorage.saveGridConfig(_newConfig, this.configName)
|
257
|
-
.then((
|
257
|
+
.then((savedConfig) => {
|
258
|
+
this.configChange.emit(savedConfig);
|
259
|
+
this._orderList.clearHistory();
|
258
260
|
utils.ApplicationUtils.info(this.getMessage("snkGridConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
259
|
-
if ((response === null || response === void 0 ? void 0 : response.resource) != undefined) {
|
260
|
-
this.configChange.emit(response === null || response === void 0 ? void 0 : response.resource);
|
261
|
-
this._orderList.clearHistory();
|
262
|
-
}
|
263
261
|
});
|
264
262
|
function adjustPriorityOrder(column, _newColumnConfig) {
|
265
263
|
if (orderArray) {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
const index = require('./index-21bd01e1.js');
|
4
4
|
const core = require('@sankhyalabs/core');
|
5
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
5
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-eb44235b.js');
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
7
7
|
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
8
8
|
const taskbarElements = require('./taskbar-elements-5e87cf44.js');
|
@@ -214,14 +214,6 @@ const SnkGuidesViewer = class {
|
|
214
214
|
}
|
215
215
|
return `${this.entityPath}/${entityName}`;
|
216
216
|
}
|
217
|
-
getLevelPath() {
|
218
|
-
const labels = this._breadcrumbItems && this._breadcrumbItems.length > 0 ? this._breadcrumbItems.map(item => item.label) : undefined;
|
219
|
-
if (labels && labels.length > 1) {
|
220
|
-
labels.pop();
|
221
|
-
return labels.join(" / ");
|
222
|
-
}
|
223
|
-
return undefined;
|
224
|
-
}
|
225
217
|
getContent() {
|
226
218
|
var _a, _b, _c, _d;
|
227
219
|
if (!this.selectedGuide) {
|
@@ -238,7 +230,7 @@ const SnkGuidesViewer = class {
|
|
238
230
|
if (guideId.includes(FORM_NAME_PREFIX)) {
|
239
231
|
[detailId, formName] = guideId.split(FORM_NAME_PREFIX);
|
240
232
|
}
|
241
|
-
content = this.wrapDetail(levels, index.h("snk-detail-view", {
|
233
|
+
content = this.wrapDetail(levels, index.h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(detailId, evt.detail), entityName: childEntityName, selectedForm: formName, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail) }));
|
242
234
|
}
|
243
235
|
else {
|
244
236
|
const cardId = this.selectedGuide.id;
|
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-a0f5f546.js');
|
6
6
|
require('./index-21bd01e1.js');
|
7
7
|
require('@sankhyalabs/core');
|
8
|
-
require('./SnkFormConfigManager-
|
8
|
+
require('./SnkFormConfigManager-eb44235b.js');
|
9
9
|
require('./ConfigStorage-b47fb254.js');
|
10
10
|
require('./form-config-fetcher-0c6628d5.js');
|
11
11
|
require('./DataFetcher-bceeaf2d.js');
|
@@ -9,10 +9,9 @@ export class SnkDetailView {
|
|
9
9
|
constructor() {
|
10
10
|
this.formConfigManager = undefined;
|
11
11
|
this.dataUnitName = undefined;
|
12
|
-
this.
|
12
|
+
this.guideItemPath = undefined;
|
13
13
|
this.entityName = undefined;
|
14
14
|
this.label = undefined;
|
15
|
-
this.levelPath = undefined;
|
16
15
|
this.dataUnit = undefined;
|
17
16
|
this.selectedForm = undefined;
|
18
17
|
this.dataState = undefined;
|
@@ -71,6 +70,20 @@ export class SnkDetailView {
|
|
71
70
|
SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this.formConfigManager).then(() => forceUpdate(this));
|
72
71
|
evt.stopPropagation();
|
73
72
|
}
|
73
|
+
updateLabel() {
|
74
|
+
const guideItemPathSize = this.guideItemPath ? this.guideItemPath.length : 0;
|
75
|
+
if (guideItemPathSize > 0) {
|
76
|
+
const labels = guideItemPathSize > 0 ? this.guideItemPath.map(item => item.label) : undefined;
|
77
|
+
this.label = labels.pop();
|
78
|
+
this._levelPath = labels.length > 0 ? labels.join(" / ") : undefined;
|
79
|
+
this._guideId = this.guideItemPath[guideItemPathSize - 1].id;
|
80
|
+
}
|
81
|
+
else {
|
82
|
+
this.label = "";
|
83
|
+
this._levelPath = undefined;
|
84
|
+
this._guideId = undefined;
|
85
|
+
}
|
86
|
+
}
|
74
87
|
getNewGuideItem(currentRecord) {
|
75
88
|
if (currentRecord == undefined) {
|
76
89
|
return;
|
@@ -107,10 +120,10 @@ export class SnkDetailView {
|
|
107
120
|
}
|
108
121
|
formName = forms[0];
|
109
122
|
}
|
110
|
-
return `${this.stripFormPattern(this.
|
123
|
+
return `${this.stripFormPattern(this._guideId)}__FORM:${formName}`;
|
111
124
|
}
|
112
125
|
getChildGuideId(child) {
|
113
|
-
return `${this.stripFormPattern(this.
|
126
|
+
return `${this.stripFormPattern(this._guideId)}::${child}`;
|
114
127
|
}
|
115
128
|
stripFormPattern(guideId) {
|
116
129
|
return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
|
@@ -124,7 +137,7 @@ export class SnkDetailView {
|
|
124
137
|
return;
|
125
138
|
}
|
126
139
|
const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
|
127
|
-
this._cardsState = formConfig
|
140
|
+
//this._cardsState = formConfig?.cardsState;
|
128
141
|
this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
|
129
142
|
}
|
130
143
|
dataUnitReadyHandler(evt) {
|
@@ -141,7 +154,7 @@ export class SnkDetailView {
|
|
141
154
|
return [];
|
142
155
|
}
|
143
156
|
emitSwitchEvent(mode) {
|
144
|
-
const guideId = mode === VIEW_MODE.GRID ? this.stripFormPattern(this.
|
157
|
+
const guideId = mode === VIEW_MODE.GRID ? this.stripFormPattern(this._guideId) : this.getFormGuideId();
|
145
158
|
if (guideId) {
|
146
159
|
this.snkSwitchGuide.emit(guideId);
|
147
160
|
}
|
@@ -162,12 +175,9 @@ export class SnkDetailView {
|
|
162
175
|
this.formConfigManager.loadConfig();
|
163
176
|
}
|
164
177
|
render() {
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
}
|
169
|
-
const cardConfig = (_a = this._cardsState) === null || _a === void 0 ? void 0 : _a.get(this.selectedForm);
|
170
|
-
return (h(Host, null, SnkGuidesViewer.buildFixedForms(this.formConfigManager.getConfig((_b = this.dataState) === null || _b === void 0 ? void 0 : _b.insertionMode, this.dataUnit), this._formMetadata, this.selectedForm, this.dataUnit, undefined, this.levelPath), h("snk-data-unit", { dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: evt => this.dataState = evt.detail }, h("ez-view-stack", { ref: ref => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: evt => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this.levelPath }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit })))))));
|
178
|
+
this.updateLabel();
|
179
|
+
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
180
|
+
return (h(Host, null, h("snk-data-unit", { dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: evt => this.dataState = evt.detail }, h("ez-view-stack", { ref: ref => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: evt => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit })))))));
|
171
181
|
}
|
172
182
|
static get is() { return "snk-detail-view"; }
|
173
183
|
static get encapsulation() { return "scoped"; }
|
@@ -220,13 +230,16 @@ export class SnkDetailView {
|
|
220
230
|
"attribute": "data-unit-name",
|
221
231
|
"reflect": false
|
222
232
|
},
|
223
|
-
"
|
233
|
+
"guideItemPath": {
|
224
234
|
"type": "unknown",
|
225
235
|
"mutable": false,
|
226
236
|
"complexType": {
|
227
|
-
"original": "IGuideItem",
|
228
|
-
"resolved": "IGuideItem",
|
237
|
+
"original": "Array<IGuideItem>",
|
238
|
+
"resolved": "IGuideItem[]",
|
229
239
|
"references": {
|
240
|
+
"Array": {
|
241
|
+
"location": "global"
|
242
|
+
},
|
230
243
|
"IGuideItem": {
|
231
244
|
"location": "import",
|
232
245
|
"path": "@sankhyalabs/ezui/dist/types/components/ez-guide-navigator/interfaces"
|
@@ -237,7 +250,7 @@ export class SnkDetailView {
|
|
237
250
|
"optional": false,
|
238
251
|
"docs": {
|
239
252
|
"tags": [],
|
240
|
-
"text": "
|
253
|
+
"text": "Caminho do identificador da guia vinculada."
|
241
254
|
}
|
242
255
|
},
|
243
256
|
"entityName": {
|
@@ -274,23 +287,6 @@ export class SnkDetailView {
|
|
274
287
|
"attribute": "label",
|
275
288
|
"reflect": false
|
276
289
|
},
|
277
|
-
"levelPath": {
|
278
|
-
"type": "string",
|
279
|
-
"mutable": false,
|
280
|
-
"complexType": {
|
281
|
-
"original": "string",
|
282
|
-
"resolved": "string",
|
283
|
-
"references": {}
|
284
|
-
},
|
285
|
-
"required": false,
|
286
|
-
"optional": false,
|
287
|
-
"docs": {
|
288
|
-
"tags": [],
|
289
|
-
"text": "Caminho amig\u00E1vel para se chegar a este detalhe."
|
290
|
-
},
|
291
|
-
"attribute": "level-path",
|
292
|
-
"reflect": false
|
293
|
-
},
|
294
290
|
"dataUnit": {
|
295
291
|
"type": "unknown",
|
296
292
|
"mutable": true,
|
@@ -12,6 +12,8 @@ export class SnkFormView {
|
|
12
12
|
this.contracted = undefined;
|
13
13
|
this.fixed = false;
|
14
14
|
this.summaryFields = undefined;
|
15
|
+
this.canExpand = true;
|
16
|
+
this.canFix = true;
|
15
17
|
this.recordsValidator = undefined;
|
16
18
|
}
|
17
19
|
async showUp() {
|
@@ -74,7 +76,9 @@ export class SnkFormView {
|
|
74
76
|
}
|
75
77
|
}
|
76
78
|
render() {
|
77
|
-
return (h(Host, { class: "ez-box__container" }, h("div", { class: "summary-header ez-flex ez-size-width--full" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" },
|
79
|
+
return (h(Host, { class: "ez-box__container" }, h("div", { class: "summary-header ez-flex ez-size-width--full" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
|
80
|
+
h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
|
81
|
+
h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.contracted ? "expandir_card" : "recolher_card", "data-element-id": ElementIDUtils.getInternalIDInfo("toggleExpand_ezFormCard"), onClick: () => this.changeContracted(), title: this.contracted ? "Expandir" : "Resumir" }))), h("slot", null), this.contracted
|
78
82
|
?
|
79
83
|
h("snk-form-summary", { summary: this.getCardSummary() })
|
80
84
|
:
|
@@ -268,6 +272,42 @@ export class SnkFormView {
|
|
268
272
|
"text": ""
|
269
273
|
}
|
270
274
|
},
|
275
|
+
"canExpand": {
|
276
|
+
"type": "boolean",
|
277
|
+
"mutable": false,
|
278
|
+
"complexType": {
|
279
|
+
"original": "boolean",
|
280
|
+
"resolved": "boolean",
|
281
|
+
"references": {}
|
282
|
+
},
|
283
|
+
"required": false,
|
284
|
+
"optional": false,
|
285
|
+
"docs": {
|
286
|
+
"tags": [],
|
287
|
+
"text": "Define se o bot\u00E3o de expandir deve ser apresentado."
|
288
|
+
},
|
289
|
+
"attribute": "can-expand",
|
290
|
+
"reflect": false,
|
291
|
+
"defaultValue": "true"
|
292
|
+
},
|
293
|
+
"canFix": {
|
294
|
+
"type": "boolean",
|
295
|
+
"mutable": false,
|
296
|
+
"complexType": {
|
297
|
+
"original": "boolean",
|
298
|
+
"resolved": "boolean",
|
299
|
+
"references": {}
|
300
|
+
},
|
301
|
+
"required": false,
|
302
|
+
"optional": false,
|
303
|
+
"docs": {
|
304
|
+
"tags": [],
|
305
|
+
"text": "Define se o bot\u00E3o de fixar deve ser apresentado."
|
306
|
+
},
|
307
|
+
"attribute": "can-fix",
|
308
|
+
"reflect": false,
|
309
|
+
"defaultValue": "true"
|
310
|
+
},
|
271
311
|
"recordsValidator": {
|
272
312
|
"type": "unknown",
|
273
313
|
"mutable": false,
|
@@ -205,14 +205,6 @@ export class SnkGuidesViewer {
|
|
205
205
|
}
|
206
206
|
return `${this.entityPath}/${entityName}`;
|
207
207
|
}
|
208
|
-
getLevelPath() {
|
209
|
-
const labels = this._breadcrumbItems && this._breadcrumbItems.length > 0 ? this._breadcrumbItems.map(item => item.label) : undefined;
|
210
|
-
if (labels && labels.length > 1) {
|
211
|
-
labels.pop();
|
212
|
-
return labels.join(" / ");
|
213
|
-
}
|
214
|
-
return undefined;
|
215
|
-
}
|
216
208
|
getContent() {
|
217
209
|
var _a, _b, _c, _d;
|
218
210
|
if (!this.selectedGuide) {
|
@@ -229,7 +221,7 @@ export class SnkGuidesViewer {
|
|
229
221
|
if (guideId.includes(FORM_NAME_PREFIX)) {
|
230
222
|
[detailId, formName] = guideId.split(FORM_NAME_PREFIX);
|
231
223
|
}
|
232
|
-
content = this.wrapDetail(levels, h("snk-detail-view", {
|
224
|
+
content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(detailId, evt.detail), entityName: childEntityName, selectedForm: formName, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail) }));
|
233
225
|
}
|
234
226
|
else {
|
235
227
|
const cardId = this.selectedGuide.id;
|