mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 08:38:45 +02:00
N°8772 - Form dependencies manager implementation
- Form SDK implementation - Basic Forms - Dynamics Forms - Basic Blocks + Data Model Block - Form Compilation - Turbo integration
This commit is contained in:
17
node_modules/tom-select/dist/cjs/plugins/remove_button/plugin.d.ts
generated
vendored
Normal file
17
node_modules/tom-select/dist/cjs/plugins/remove_button/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Plugin: "remove_button" (Tom Select)
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
||||
* file except in compliance with the License. You may obtain a copy of the License at:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under
|
||||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
||||
* ANY KIND, either express or implied. See the License for the specific language
|
||||
* governing permissions and limitations under the License.
|
||||
*
|
||||
*/
|
||||
import type TomSelect from '../../tom-select.ts';
|
||||
import { RBOptions } from './types.ts';
|
||||
export default function (this: TomSelect, userOptions: RBOptions): void;
|
||||
61
node_modules/tom-select/dist/cjs/plugins/remove_button/plugin.js
generated
vendored
Normal file
61
node_modules/tom-select/dist/cjs/plugins/remove_button/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "remove_button" (Tom Select)
|
||||
* Copyright (c) contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
||||
* file except in compliance with the License. You may obtain a copy of the License at:
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under
|
||||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
||||
* ANY KIND, either express or implied. See the License for the specific language
|
||||
* governing permissions and limitations under the License.
|
||||
*
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = default_1;
|
||||
const vanilla_ts_1 = require("../../vanilla.js");
|
||||
const utils_ts_1 = require("../../utils.js");
|
||||
function default_1(userOptions) {
|
||||
const options = Object.assign({
|
||||
label: '×',
|
||||
title: 'Remove',
|
||||
className: 'remove',
|
||||
append: true
|
||||
}, userOptions);
|
||||
//options.className = 'remove-single';
|
||||
var self = this;
|
||||
// override the render method to add remove button to each item
|
||||
if (!options.append) {
|
||||
return;
|
||||
}
|
||||
var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + (0, utils_ts_1.escape_html)(options.title) + '">' + options.label + '</a>';
|
||||
self.hook('after', 'setupTemplates', () => {
|
||||
var orig_render_item = self.settings.render.item;
|
||||
self.settings.render.item = (data, escape) => {
|
||||
var item = (0, vanilla_ts_1.getDom)(orig_render_item.call(self, data, escape));
|
||||
var close_button = (0, vanilla_ts_1.getDom)(html);
|
||||
item.appendChild(close_button);
|
||||
(0, utils_ts_1.addEvent)(close_button, 'mousedown', (evt) => {
|
||||
(0, utils_ts_1.preventDefault)(evt, true);
|
||||
});
|
||||
(0, utils_ts_1.addEvent)(close_button, 'click', (evt) => {
|
||||
if (self.isLocked)
|
||||
return;
|
||||
// propagating will trigger the dropdown to show for single mode
|
||||
(0, utils_ts_1.preventDefault)(evt, true);
|
||||
if (self.isLocked)
|
||||
return;
|
||||
if (!self.shouldDelete([item], evt))
|
||||
return;
|
||||
self.removeItem(item);
|
||||
self.refreshOptions(false);
|
||||
self.inputState();
|
||||
});
|
||||
return item;
|
||||
};
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/remove_button/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/remove_button/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","source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AC,CAAC;YAC1B,CAAC,CAAC,CAAC;YAEH,IAAA,mBAAQ,EAAC,YAAY,EAAC,OAAO,EAAC,CAAC,GAAG,EAAE,EAAE;gBAErC,IAAI,IAAI,CAAC,QAAQ;oBAAG,OAAO;gBAE3B,gEAAgE;gBAChE,IAAA,yBAAc,EAAC,GAAG,EAAC,IAAI,CAAC,CAAC;gBAEzB,IAAI,IAAI,CAAC,QAAQ;oBAAG,OAAO;gBAC3B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,EAAC,GAAiB,CAAC;oBAAG,OAAO;gBAE1D,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;gBACtB,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;gBAC3B,IAAI,CAAC,UAAU,EAAE,CAAC;YACnB,CAAC,CAAC,CAAC;YAEH,OAAO,IAAI,CAAC;QACb,CAAC,CAAC;IAEH,CAAC,CAAC,CAAC;AAGJ,CAAC;AAAA,CAAC"}
|
||||
6
node_modules/tom-select/dist/cjs/plugins/remove_button/types.d.ts
generated
vendored
Normal file
6
node_modules/tom-select/dist/cjs/plugins/remove_button/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export type RBOptions = {
|
||||
label?: string;
|
||||
title?: string;
|
||||
className?: string;
|
||||
append?: boolean;
|
||||
};
|
||||
3
node_modules/tom-select/dist/cjs/plugins/remove_button/types.js
generated
vendored
Normal file
3
node_modules/tom-select/dist/cjs/plugins/remove_button/types.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/remove_button/types.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/remove_button/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/remove_button/types.ts"],"names":[],"mappings":""}
|
||||
Reference in New Issue
Block a user