UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

173 lines (171 loc) • 9.15 kB
/** * DevExtreme (cjs/__internal/grids/grid_core/editing/const.js) * Version: 23.2.6 * Build date: Wed May 01 2024 * * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VIEWPORT_TOP_NEW_ROW_POSITION = exports.VIEWPORT_BOTTOM_NEW_ROW_POSITION = exports.TARGET_COMPONENT_NAME = exports.ROW_SELECTED_CLASS = exports.ROW_SELECTED = exports.ROW_REMOVED = exports.ROW_MODIFIED = exports.ROW_INSERTED = exports.ROW_CLASS = exports.ROW_BASED_MODES = exports.REQUIRED_EDITOR_LABELLEDBY_MODES = exports.READONLY_CLASS = exports.PAGE_TOP_NEW_ROW_POSITION = exports.PAGE_BOTTOM_NEW_ROW_POSITION = exports.MODES_WITH_DELAYED_FOCUS = exports.METHOD_NAMES = exports.LINK_ICON_CLASS = exports.LINK_CLASS = exports.LAST_NEW_ROW_POSITION = exports.INSERT_INDEX = exports.FORM_BUTTONS_CONTAINER_CLASS = exports.FOCUS_OVERLAY_CLASS = exports.FOCUSABLE_ELEMENT_SELECTOR = exports.FOCUSABLE_ELEMENT_CLASS = exports.FIRST_NEW_ROW_POSITION = exports.EDIT_ROW = exports.EDIT_POPUP_FORM_CLASS = exports.EDIT_POPUP_CLASS = exports.EDIT_MODE_ROW = exports.EDIT_MODE_POPUP = exports.EDIT_MODE_FORM = exports.EDIT_MODE_CELL = exports.EDIT_MODE_BATCH = exports.EDIT_MODES = exports.EDIT_LINK_CLASS = exports.EDIT_ICON_CLASS = exports.EDIT_FORM_ITEM_CLASS = exports.EDIT_FORM_CLASS = exports.EDIT_BUTTON_CLASS = exports.EDITOR_CELL_CLASS = exports.EDITORS_INPUT_SELECTOR = exports.EDITING_POPUP_OPTION_NAME = exports.EDITING_NAMESPACE = exports.EDITING_FORM_OPTION_NAME = exports.EDITING_EDITROWKEY_OPTION_NAME = exports.EDITING_EDITCOLUMNNAME_OPTION_NAME = exports.EDITING_CHANGES_OPTION_NAME = exports.DROPDOWN_EDITOR_OVERLAY_CLASS = exports.DEFAULT_START_EDIT_ACTION = exports.DATA_ROW_CLASS = exports.DATA_EDIT_DATA_UPDATE_TYPE = exports.DATA_EDIT_DATA_REMOVE_TYPE = exports.DATA_EDIT_DATA_INSERT_TYPE = exports.COMMAND_EDIT_WITH_ICONS_CLASS = exports.COMMAND_EDIT_CLASS = exports.CELL_MODIFIED_CLASS = exports.CELL_MODIFIED = exports.CELL_FOCUS_DISABLED_CLASS = exports.CELL_BASED_MODES = exports.BUTTON_NAMES = exports.BUTTON_CLASS = exports.ADD_ROW_BUTTON_CLASS = exports.ACTION_OPTION_NAMES = void 0; var _ui = _interopRequireDefault(require("../../../../ui/scroll_view/ui.scrollable")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj } } const EDITOR_CELL_CLASS = "dx-editor-cell"; exports.EDITOR_CELL_CLASS = "dx-editor-cell"; const ROW_CLASS = "dx-row"; exports.ROW_CLASS = "dx-row"; const CELL_MODIFIED_CLASS = "dx-cell-modified"; exports.CELL_MODIFIED_CLASS = "dx-cell-modified"; const ROW_SELECTED_CLASS = "dx-selection"; exports.ROW_SELECTED_CLASS = "dx-selection"; const EDIT_FORM_CLASS = "edit-form"; exports.EDIT_FORM_CLASS = "edit-form"; const DATA_EDIT_DATA_INSERT_TYPE = "insert"; exports.DATA_EDIT_DATA_INSERT_TYPE = "insert"; const DATA_EDIT_DATA_REMOVE_TYPE = "remove"; exports.DATA_EDIT_DATA_REMOVE_TYPE = "remove"; const EDITING_POPUP_OPTION_NAME = "editing.popup"; exports.EDITING_POPUP_OPTION_NAME = "editing.popup"; const EDITING_FORM_OPTION_NAME = "editing.form"; exports.EDITING_FORM_OPTION_NAME = "editing.form"; const EDITING_EDITROWKEY_OPTION_NAME = "editing.editRowKey"; exports.EDITING_EDITROWKEY_OPTION_NAME = "editing.editRowKey"; const EDITING_EDITCOLUMNNAME_OPTION_NAME = "editing.editColumnName"; exports.EDITING_EDITCOLUMNNAME_OPTION_NAME = "editing.editColumnName"; const TARGET_COMPONENT_NAME = "targetComponent"; exports.TARGET_COMPONENT_NAME = "targetComponent"; const EDITORS_INPUT_SELECTOR = "input:not([type='hidden'])"; exports.EDITORS_INPUT_SELECTOR = EDITORS_INPUT_SELECTOR; const FOCUSABLE_ELEMENT_SELECTOR = "[tabindex]:not([disabled]), ".concat(EDITORS_INPUT_SELECTOR, ":not([disabled])"); exports.FOCUSABLE_ELEMENT_SELECTOR = FOCUSABLE_ELEMENT_SELECTOR; const EDIT_MODE_BATCH = "batch"; exports.EDIT_MODE_BATCH = "batch"; const EDIT_MODE_ROW = "row"; exports.EDIT_MODE_ROW = "row"; const EDIT_MODE_CELL = "cell"; exports.EDIT_MODE_CELL = "cell"; const EDIT_MODE_FORM = "form"; exports.EDIT_MODE_FORM = "form"; const EDIT_MODE_POPUP = "popup"; exports.EDIT_MODE_POPUP = "popup"; const FIRST_NEW_ROW_POSITION = "first"; exports.FIRST_NEW_ROW_POSITION = "first"; const LAST_NEW_ROW_POSITION = "last"; exports.LAST_NEW_ROW_POSITION = "last"; const PAGE_BOTTOM_NEW_ROW_POSITION = "pageBottom"; exports.PAGE_BOTTOM_NEW_ROW_POSITION = "pageBottom"; const PAGE_TOP_NEW_ROW_POSITION = "pageTop"; exports.PAGE_TOP_NEW_ROW_POSITION = "pageTop"; const VIEWPORT_BOTTOM_NEW_ROW_POSITION = "viewportBottom"; exports.VIEWPORT_BOTTOM_NEW_ROW_POSITION = "viewportBottom"; const VIEWPORT_TOP_NEW_ROW_POSITION = "viewportTop"; exports.VIEWPORT_TOP_NEW_ROW_POSITION = "viewportTop"; const EDIT_MODES = ["batch", "row", "cell", "form", "popup"]; exports.EDIT_MODES = EDIT_MODES; const ROW_BASED_MODES = ["row", "form", "popup"]; exports.ROW_BASED_MODES = ROW_BASED_MODES; const CELL_BASED_MODES = ["batch", "cell"]; exports.CELL_BASED_MODES = CELL_BASED_MODES; const REQUIRED_EDITOR_LABELLEDBY_MODES = ["batch", "row", "cell"]; exports.REQUIRED_EDITOR_LABELLEDBY_MODES = REQUIRED_EDITOR_LABELLEDBY_MODES; const MODES_WITH_DELAYED_FOCUS = ["row", "form"]; exports.MODES_WITH_DELAYED_FOCUS = MODES_WITH_DELAYED_FOCUS; const READONLY_CLASS = "readonly"; exports.READONLY_CLASS = "readonly"; const LINK_CLASS = "dx-link"; exports.LINK_CLASS = "dx-link"; const LINK_ICON_CLASS = "dx-link-icon"; exports.LINK_ICON_CLASS = "dx-link-icon"; const ROW_SELECTED = "dx-selection"; exports.ROW_SELECTED = ROW_SELECTED; const EDIT_BUTTON_CLASS = "dx-edit-button"; exports.EDIT_BUTTON_CLASS = "dx-edit-button"; const COMMAND_EDIT_CLASS = "dx-command-edit"; exports.COMMAND_EDIT_CLASS = "dx-command-edit"; const COMMAND_EDIT_WITH_ICONS_CLASS = "".concat("dx-command-edit", "-with-icons"); exports.COMMAND_EDIT_WITH_ICONS_CLASS = COMMAND_EDIT_WITH_ICONS_CLASS; const INSERT_INDEX = "__DX_INSERT_INDEX__"; exports.INSERT_INDEX = INSERT_INDEX; const ROW_INSERTED = "dx-row-inserted"; exports.ROW_INSERTED = ROW_INSERTED; const ROW_MODIFIED = "dx-row-modified"; exports.ROW_MODIFIED = ROW_MODIFIED; const CELL_MODIFIED = "dx-cell-modified"; exports.CELL_MODIFIED = CELL_MODIFIED; const EDITING_NAMESPACE = "dxDataGridEditing"; exports.EDITING_NAMESPACE = EDITING_NAMESPACE; const CELL_FOCUS_DISABLED_CLASS = "dx-cell-focus-disabled"; exports.CELL_FOCUS_DISABLED_CLASS = "dx-cell-focus-disabled"; const DATA_EDIT_DATA_UPDATE_TYPE = "update"; exports.DATA_EDIT_DATA_UPDATE_TYPE = "update"; const DEFAULT_START_EDIT_ACTION = "click"; exports.DEFAULT_START_EDIT_ACTION = "click"; const EDIT_LINK_CLASS = { save: "dx-link-save", cancel: "dx-link-cancel", edit: "dx-link-edit", undelete: "dx-link-undelete", delete: "dx-link-delete", add: "dx-link-add" }; exports.EDIT_LINK_CLASS = EDIT_LINK_CLASS; const EDIT_ICON_CLASS = { save: "save", cancel: "revert", edit: "edit", undelete: "revert", delete: "trash", add: "add" }; exports.EDIT_ICON_CLASS = EDIT_ICON_CLASS; const METHOD_NAMES = { edit: "editRow", delete: "deleteRow", undelete: "undeleteRow", save: "saveEditData", cancel: "cancelEditData", add: "addRowByRowIndex" }; exports.METHOD_NAMES = METHOD_NAMES; const ACTION_OPTION_NAMES = { add: "allowAdding", edit: "allowUpdating", delete: "allowDeleting" }; exports.ACTION_OPTION_NAMES = ACTION_OPTION_NAMES; const BUTTON_NAMES = ["edit", "save", "cancel", "delete", "undelete"]; exports.BUTTON_NAMES = BUTTON_NAMES; const EDITING_CHANGES_OPTION_NAME = "editing.changes"; exports.EDITING_CHANGES_OPTION_NAME = "editing.changes"; const FOCUS_OVERLAY_CLASS = "focus-overlay"; exports.FOCUS_OVERLAY_CLASS = "focus-overlay"; const ADD_ROW_BUTTON_CLASS = "addrow-button"; exports.ADD_ROW_BUTTON_CLASS = "addrow-button"; const DROPDOWN_EDITOR_OVERLAY_CLASS = "dx-dropdowneditor-overlay"; exports.DROPDOWN_EDITOR_OVERLAY_CLASS = "dx-dropdowneditor-overlay"; const DATA_ROW_CLASS = "dx-data-row"; exports.DATA_ROW_CLASS = "dx-data-row"; const ROW_REMOVED = "dx-row-removed"; exports.ROW_REMOVED = ROW_REMOVED; const isRenovatedScrollable = !!_ui.default.IS_RENOVATED_WIDGET; const EDIT_FORM_ITEM_CLASS = "edit-form-item"; exports.EDIT_FORM_ITEM_CLASS = "edit-form-item"; const EDIT_POPUP_CLASS = "edit-popup"; exports.EDIT_POPUP_CLASS = "edit-popup"; const EDIT_POPUP_FORM_CLASS = "edit-popup-form"; exports.EDIT_POPUP_FORM_CLASS = "edit-popup-form"; const FOCUSABLE_ELEMENT_CLASS = isRenovatedScrollable ? "dx-scrollable" : "dx-scrollable-container"; exports.FOCUSABLE_ELEMENT_CLASS = FOCUSABLE_ELEMENT_CLASS; const BUTTON_CLASS = "dx-button"; exports.BUTTON_CLASS = "dx-button"; const FORM_BUTTONS_CONTAINER_CLASS = "form-buttons-container"; exports.FORM_BUTTONS_CONTAINER_CLASS = "form-buttons-container"; const EDIT_ROW = "dx-edit-row"; exports.EDIT_ROW = EDIT_ROW;