mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Add Tom-Select lib
This commit is contained in:
37
node_modules/.package-lock.json
generated
vendored
37
node_modules/.package-lock.json
generated
vendored
@@ -13,6 +13,27 @@
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/raleway/-/raleway-4.5.0.tgz",
|
||||
"integrity": "sha512-Rzj90wbZQnNzazqzoiu5HzMEMdqMJLUVFOo699sinTXrZRm1aB5iX2HTiK2VlPnH4M6u8yYnJ7CebOyamfWlqw=="
|
||||
},
|
||||
"node_modules/@hotwired/turbo": {
|
||||
"version": "8.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@hotwired/turbo/-/turbo-8.0.5.tgz",
|
||||
"integrity": "sha512-TdZDA7fxVQ2ZycygvpnzjGPmFq4sO/E2QVg+2em/sJ3YTSsIWVEis8HmWlumz+c9DjWcUkcCuB+muF08TInpAQ==",
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
},
|
||||
"node_modules/@orchidjs/sifter": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@orchidjs/sifter/-/sifter-1.1.0.tgz",
|
||||
"integrity": "sha512-mYwHCfr736cIWWdhhSZvDbf90AKt2xyrJspKFC3qyIJG1LtrJeJunYEqCGG4Aq2ijENbc4WkOjszcvNaIAS/pQ==",
|
||||
"dependencies": {
|
||||
"@orchidjs/unicode-variants": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@orchidjs/unicode-variants": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@orchidjs/unicode-variants/-/unicode-variants-1.1.2.tgz",
|
||||
"integrity": "sha512-5DobW1CHgnBROOEpFlEXytED5OosEWESFvg/VYmH0143oXcijYTprRYJTs+55HzGM4IqxiLFSuqEzu9mPNwVsA=="
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
"version": "2.11.8",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
||||
@@ -275,6 +296,22 @@
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/toastify-js/-/toastify-js-1.12.0.tgz",
|
||||
"integrity": "sha512-HeMHCO9yLPvP9k0apGSdPUWrUbLnxUKNFzgUoZp1PHCLploIX/4DSQ7V8H25ef+h4iO9n0he7ImfcndnN6nDrQ=="
|
||||
},
|
||||
"node_modules/tom-select": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/tom-select/-/tom-select-2.4.3.tgz",
|
||||
"integrity": "sha512-MFFrMxP1bpnAMPbdvPCZk0KwYxLqhYZso39torcdoefeV/NThNyDu8dV96/INJ5XQVTL3O55+GqQ78Pkj5oCfw==",
|
||||
"dependencies": {
|
||||
"@orchidjs/sifter": "^1.1.0",
|
||||
"@orchidjs/unicode-variants": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/tom-select"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
18
node_modules/@hotwired/turbo/README.md
generated
vendored
Normal file
18
node_modules/@hotwired/turbo/README.md
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# Turbo
|
||||
|
||||
Turbo uses complementary techniques to dramatically reduce the amount of custom JavaScript that most web applications will need to write:
|
||||
|
||||
* Turbo Drive accelerates links and form submissions by negating the need for full page reloads.
|
||||
* Turbo Frames decompose pages into independent contexts, which scope navigation and can be lazily loaded.
|
||||
* Turbo Streams deliver page changes over WebSocket or in response to form submissions using just HTML and a set of CRUD-like actions.
|
||||
* Turbo Native lets your majestic monolith form the center of your native iOS and Android apps, with seamless transitions between web and native sections.
|
||||
|
||||
It's all done by sending HTML over the wire. And for those instances when that's not enough, you can reach for the other side of Hotwire, and finish the job with [Stimulus](https://github.com/hotwired/stimulus).
|
||||
|
||||
Read more on [turbo.hotwired.dev](https://turbo.hotwired.dev).
|
||||
|
||||
## Contributing
|
||||
|
||||
Please read [CONTRIBUTING.md](./CONTRIBUTING.md).
|
||||
|
||||
© 2024 37signals LLC.
|
||||
6580
node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js
generated
vendored
Normal file
6580
node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6618
node_modules/@hotwired/turbo/dist/turbo.es2017-umd.js
generated
vendored
Normal file
6618
node_modules/@hotwired/turbo/dist/turbo.es2017-umd.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
68
node_modules/@hotwired/turbo/package.json
generated
vendored
Normal file
68
node_modules/@hotwired/turbo/package.json
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"name": "@hotwired/turbo",
|
||||
"version": "8.0.5",
|
||||
"description": "The speed of a single-page web application without having to write any JavaScript",
|
||||
"module": "dist/turbo.es2017-esm.js",
|
||||
"main": "dist/turbo.es2017-umd.js",
|
||||
"files": [
|
||||
"dist/*.js",
|
||||
"dist/*.js.map"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/hotwired/turbo.git"
|
||||
},
|
||||
"keywords": [
|
||||
"hotwire",
|
||||
"turbo",
|
||||
"browser",
|
||||
"pushstate"
|
||||
],
|
||||
"author": "37signals LLC",
|
||||
"contributors": [
|
||||
"Jeffrey Hardy <jeff@basecamp.com>",
|
||||
"Javan Makhmali <javan@javan.us>",
|
||||
"Sam Stephenson <sstephenson@gmail.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/hotwired/turbo/issues"
|
||||
},
|
||||
"homepage": "https://turbo.hotwired.dev",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@open-wc/testing": "^3.1.7",
|
||||
"@playwright/test": "^1.28.0",
|
||||
"@rollup/plugin-node-resolve": "13.1.3",
|
||||
"@web/dev-server-esbuild": "^0.3.3",
|
||||
"@web/test-runner": "^0.15.0",
|
||||
"@web/test-runner-playwright": "^0.9.0",
|
||||
"arg": "^5.0.1",
|
||||
"body-parser": "^1.20.1",
|
||||
"chai": "~4.3.4",
|
||||
"eslint": "^8.13.0",
|
||||
"express": "^4.18.2",
|
||||
"idiomorph": "https://github.com/bigskysoftware/idiomorph.git",
|
||||
"multer": "^1.4.2",
|
||||
"rollup": "^2.35.1"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -fr dist",
|
||||
"clean:win": "rmdir /s /q dist",
|
||||
"build": "rollup -c",
|
||||
"build:win": "rollup -c",
|
||||
"watch": "rollup -wc",
|
||||
"start": "node src/tests/server.mjs",
|
||||
"test": "yarn test:unit && yarn test:browser",
|
||||
"test:browser": "playwright test",
|
||||
"test:unit": "NODE_OPTIONS=--inspect web-test-runner",
|
||||
"test:unit:win": "SET NODE_OPTIONS=--inspect & web-test-runner",
|
||||
"release": "yarn build && npm publish",
|
||||
"lint": "eslint . --ext .js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 14"
|
||||
}
|
||||
}
|
||||
202
node_modules/tom-select/LICENSE
generated
vendored
Normal file
202
node_modules/tom-select/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2013–2015 Brian Reavis
|
||||
|
||||
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.
|
||||
104
node_modules/tom-select/README.md
generated
vendored
Normal file
104
node_modules/tom-select/README.md
generated
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
<p align="center">
|
||||
<h1 align="center">Tom Select</h1>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/orchidjs/tom-select" class="m-1 d-inline-block"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/orchidjs/tom-select?label=GitHub%20stars&color=007ec6"></a>
|
||||
<a href="https://www.jsdelivr.com/package/npm/tom-select" class="m-1 d-inline-block"><img alt="jsDelivr hits (npm)" src="https://img.shields.io/jsdelivr/npm/hm/tom-select?label=jsDelivr%20hits&color=007ec6"></a>
|
||||
<a href="https://www.npmjs.com/package/tom-select" class="m-1 d-inline-block"><img alt="npmjs.org" src="https://img.shields.io/npm/v/tom-select.svg?color=007ec6"></a>
|
||||
<a href="https://github.com/orchidjs/tom-select/actions/workflows/tests.yml" class="m-1 d-inline-block"><img alt="tests" src="https://github.com/orchidjs/tom-select/actions/workflows/tests.yml/badge.svg"></a>
|
||||
<a href="https://coveralls.io/github/orchidjs/tom-select" class="m-1 d-inline-block"><img alt="Coveralls Coverage" src="https://img.shields.io/coveralls/github/orchidjs/tom-select?color=4c1"></a>
|
||||
<a href="https://github.com/orchidjs/tom-select/issues" class="m-1 d-inline-block"><img alt="GitHub Issues" src="https://img.shields.io/github/issues/orchidjs/tom-select"></a>
|
||||
</p>
|
||||
|
||||
Tom Select is a dynamic, framework agnostic, and lightweight (~16kb gzipped) <select> UI control.
|
||||
With autocomplete and native-feeling keyboard navigation, it's useful for tagging, contact lists, country selectors, and so on.
|
||||
Tom Select was forked from [selectize.js](https://tom-select.js.org/docs/selectize.js/) with the goal of modernizing the code base, decoupling from jQuery, and expanding functionality.
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
- **Smart Option Searching / Ranking**<br>Options are efficiently scored and sorted on-the-fly (using [sifter](https://github.com/orchidjs/sifter.js)). Want to search an item's title *and* description? No problem.
|
||||
- **Caret between items**<br>Order matters sometimes. With the <a href="https://tom-select.js.org/plugins/caret-position">Caret Position Plugin</a>, you can use the <kbd>←</kbd> and <kbd>→</kbd> arrow keys to move between selected items</li>
|
||||
- **Select & delete multiple items at once**<br>Hold down <kbd>command</kbd> on Mac or <kbd>ctrl</kbd> on Windows to select more than one item to delete.
|
||||
- **Díåcritîçs supported**<br>Great for international environments.
|
||||
- **Item creation**<br>Allow users to create items on the fly (async saving is supported; the control locks until the callback is fired).
|
||||
- **Remote data loading**<br>For when you have thousands of options and want them provided by the server as the user types.
|
||||
- **Extensible**<br> [Plugin API](https://tom-select.js.org/docs/plugins/) for developing custom features (uses [microplugin](https://github.com/brianreavis/microplugin.js)).
|
||||
- **Accessible**, **Touch Support**, **Clean API**, ...
|
||||
|
||||
## Usage
|
||||
|
||||
```html
|
||||
<input id="tom-select-it" />
|
||||
<link rel="stylesheet" href="/css/tom-select.default.css">
|
||||
<script src="/js/tom-select.complete.js"></script>
|
||||
<script>
|
||||
var config = {};
|
||||
new TomSelect('#tom-select-it',config);
|
||||
</script>
|
||||
```
|
||||
|
||||
Available configuration settings are [documented here](https://tom-select.js.org/docs)
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
All pre-built files needed to use Tom Select can be found in the "dist" folder via any of these sources:
|
||||
|
||||
<table class="table mt-5">
|
||||
<tr>
|
||||
<th class="border-top-0">Source</th>
|
||||
<th class="border-top-0"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.jsdelivr.com/package/npm/tom-select?path=dist">jsDelivr</a></td>
|
||||
<td>
|
||||
The fastest way to add Tom Select into your project is to just include the js and css from jsDelivr.
|
||||
<pre>
|
||||
<link href="https://cdn.jsdelivr.net/npm/tom-select/dist/css/tom-select.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/tom-select/dist/js/tom-select.complete.min.js"></script>
|
||||
</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.npmjs.com/package/tom-select">npm</a></td>
|
||||
<td><pre><code>npm i tom-select</code></pre>
|
||||
<div><a href="https://tom-select.js.org/docs/contribute/">Additional CLI usage</a></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/orchidjs/tom-select/">GitHub</a></td>
|
||||
<td>Clone or <a href="https://github.com/orchidjs/tom-select/archive/master.zip">download</a> the full repo.
|
||||
Use <code>npm run build</code> <a href="/docs/contribute">and other commands</a> to build from source, test and start the doc server.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
## Files
|
||||
- [tom-select.complete.js](https://cdn.jsdelivr.net/npm/tom-select/dist/js/tom-select.complete.js) — Includes dependencies and plugins
|
||||
- [tom-select.base.js](https://cdn.jsdelivr.net/npm/tom-select/dist/js/tom-select.base.js) — Does not include any plugins
|
||||
- [CSS](https://www.jsdelivr.com/package/npm/tom-select?path=dist%2Fcss) — Compiled themes
|
||||
- [SCSS](https://www.jsdelivr.com/package/npm/tom-select?path=dist%2Fscss) — Uncompiled theme sources
|
||||
|
||||
|
||||
## Sponsors
|
||||
<p>
|
||||
Many thanks to all our sponsors who help make development possible. <a href="https://opencollective.com/tom-select">Become a sponsor</a>.
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://opencollective.com/tom-select/sponsor/0/website"><img src="https://opencollective.com/tom-select/sponsor/0/avatar.svg" alt="Trust My Paper Logo"></a>
|
||||
<a href="https://opencollective.com/tom-select/sponsor/2/website"><img src="https://opencollective.com/tom-select/sponsor/2/avatar.svg" alt="WiseEssays.com"></a>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2013–2023 [Contributors](https://github.com/orchidjs/tom-select/graphs/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.
|
||||
12
node_modules/tom-select/dist/cjs/constants.d.ts
generated
vendored
Normal file
12
node_modules/tom-select/dist/cjs/constants.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export declare const KEY_A = 65;
|
||||
export declare const KEY_RETURN = 13;
|
||||
export declare const KEY_ESC = 27;
|
||||
export declare const KEY_LEFT = 37;
|
||||
export declare const KEY_UP = 38;
|
||||
export declare const KEY_RIGHT = 39;
|
||||
export declare const KEY_DOWN = 40;
|
||||
export declare const KEY_BACKSPACE = 8;
|
||||
export declare const KEY_DELETE = 46;
|
||||
export declare const KEY_TAB = 9;
|
||||
export declare const IS_MAC: boolean;
|
||||
export declare const KEY_SHORTCUT: string;
|
||||
16
node_modules/tom-select/dist/cjs/constants.js
generated
vendored
Normal file
16
node_modules/tom-select/dist/cjs/constants.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.KEY_SHORTCUT = exports.IS_MAC = exports.KEY_TAB = exports.KEY_DELETE = exports.KEY_BACKSPACE = exports.KEY_DOWN = exports.KEY_RIGHT = exports.KEY_UP = exports.KEY_LEFT = exports.KEY_ESC = exports.KEY_RETURN = exports.KEY_A = void 0;
|
||||
exports.KEY_A = 65;
|
||||
exports.KEY_RETURN = 13;
|
||||
exports.KEY_ESC = 27;
|
||||
exports.KEY_LEFT = 37;
|
||||
exports.KEY_UP = 38;
|
||||
exports.KEY_RIGHT = 39;
|
||||
exports.KEY_DOWN = 40;
|
||||
exports.KEY_BACKSPACE = 8;
|
||||
exports.KEY_DELETE = 46;
|
||||
exports.KEY_TAB = 9;
|
||||
exports.IS_MAC = typeof navigator === 'undefined' ? false : /Mac/.test(navigator.userAgent);
|
||||
exports.KEY_SHORTCUT = exports.IS_MAC ? 'metaKey' : 'ctrlKey'; // ctrl key or apple key for ma
|
||||
//# sourceMappingURL=constants.js.map
|
||||
1
node_modules/tom-select/dist/cjs/constants.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/constants.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,KAAK,GAAM,EAAE,CAAC;AACd,QAAA,UAAU,GAAK,EAAE,CAAC;AAClB,QAAA,OAAO,GAAK,EAAE,CAAC;AACf,QAAA,QAAQ,GAAK,EAAE,CAAC;AAChB,QAAA,MAAM,GAAM,EAAE,CAAC;AACf,QAAA,SAAS,GAAK,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAK,EAAE,CAAC;AAChB,QAAA,aAAa,GAAI,CAAC,CAAC;AACnB,QAAA,UAAU,GAAK,EAAE,CAAC;AAClB,QAAA,OAAO,GAAK,CAAC,CAAC;AAEd,QAAA,MAAM,GAAU,OAAO,SAAS,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AAC3F,QAAA,YAAY,GAAI,cAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,+BAA+B"}
|
||||
13
node_modules/tom-select/dist/cjs/contrib/highlight.d.ts
generated
vendored
Normal file
13
node_modules/tom-select/dist/cjs/contrib/highlight.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* highlight v3 | MIT license | Johann Burkard <jb@eaio.com>
|
||||
* Highlights arbitrary terms in a node.
|
||||
*
|
||||
* - Modified by Marshal <beatgates@gmail.com> 2011-6-24 (added regex)
|
||||
* - Modified by Brian Reavis <brian@thirdroute.com> 2012-8-27 (cleanup)
|
||||
*/
|
||||
export declare const highlight: (element: HTMLElement, regex: string | RegExp) => void;
|
||||
/**
|
||||
* removeHighlight fn copied from highlight v5 and
|
||||
* edited to remove with(), pass js strict mode, and use without jquery
|
||||
*/
|
||||
export declare const removeHighlight: (el: HTMLElement) => void;
|
||||
69
node_modules/tom-select/dist/cjs/contrib/highlight.js
generated
vendored
Normal file
69
node_modules/tom-select/dist/cjs/contrib/highlight.js
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
"use strict";
|
||||
/**
|
||||
* highlight v3 | MIT license | Johann Burkard <jb@eaio.com>
|
||||
* Highlights arbitrary terms in a node.
|
||||
*
|
||||
* - Modified by Marshal <beatgates@gmail.com> 2011-6-24 (added regex)
|
||||
* - Modified by Brian Reavis <brian@thirdroute.com> 2012-8-27 (cleanup)
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.removeHighlight = exports.highlight = void 0;
|
||||
const vanilla_ts_1 = require("../vanilla.js");
|
||||
const highlight = (element, regex) => {
|
||||
if (regex === null)
|
||||
return;
|
||||
// convet string to regex
|
||||
if (typeof regex === 'string') {
|
||||
if (!regex.length)
|
||||
return;
|
||||
regex = new RegExp(regex, 'i');
|
||||
}
|
||||
// Wrap matching part of text node with highlighting <span>, e.g.
|
||||
// Soccer -> <span class="highlight">Soc</span>cer for regex = /soc/i
|
||||
const highlightText = (node) => {
|
||||
var match = node.data.match(regex);
|
||||
if (match && node.data.length > 0) {
|
||||
var spannode = document.createElement('span');
|
||||
spannode.className = 'highlight';
|
||||
var middlebit = node.splitText(match.index);
|
||||
middlebit.splitText(match[0].length);
|
||||
var middleclone = middlebit.cloneNode(true);
|
||||
spannode.appendChild(middleclone);
|
||||
(0, vanilla_ts_1.replaceNode)(middlebit, spannode);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
// Recurse element node, looking for child text nodes to highlight, unless element
|
||||
// is childless, <script>, <style>, or already highlighted: <span class="hightlight">
|
||||
const highlightChildren = (node) => {
|
||||
if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName) && (node.className !== 'highlight' || node.tagName !== 'SPAN')) {
|
||||
Array.from(node.childNodes).forEach(element => {
|
||||
highlightRecursive(element);
|
||||
});
|
||||
}
|
||||
};
|
||||
const highlightRecursive = (node) => {
|
||||
if (node.nodeType === 3) {
|
||||
return highlightText(node);
|
||||
}
|
||||
highlightChildren(node);
|
||||
return 0;
|
||||
};
|
||||
highlightRecursive(element);
|
||||
};
|
||||
exports.highlight = highlight;
|
||||
/**
|
||||
* removeHighlight fn copied from highlight v5 and
|
||||
* edited to remove with(), pass js strict mode, and use without jquery
|
||||
*/
|
||||
const removeHighlight = (el) => {
|
||||
var elements = el.querySelectorAll("span.highlight");
|
||||
Array.prototype.forEach.call(elements, function (el) {
|
||||
var parent = el.parentNode;
|
||||
parent.replaceChild(el.firstChild, el);
|
||||
parent.normalize();
|
||||
});
|
||||
};
|
||||
exports.removeHighlight = removeHighlight;
|
||||
//# sourceMappingURL=highlight.js.map
|
||||
1
node_modules/tom-select/dist/cjs/contrib/highlight.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/contrib/highlight.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"highlight.js","sourceRoot":"","sources":["../../../src/contrib/highlight.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,8CAA0C;AAGnC,MAAM,SAAS,GAAG,CAAC,OAAmB,EAAE,KAAmB,EAAE,EAAE;IAErE,IAAI,KAAK,KAAK,IAAI;QAAG,OAAO;IAE5B,yBAAyB;IACzB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAE/B,IAAI,CAAC,KAAK,CAAC,MAAM;YAAG,OAAO;QAC3B,KAAK,GAAG,IAAI,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;IAGD,iEAAiE;IACjE,wEAAwE;IACxE,MAAM,aAAa,GAAG,CAAE,IAAS,EAAU,EAAE;QAE5C,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,IAAI,QAAQ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AC;IAEF,kBAAkB,CAAE,OAAO,CAAE,CAAC;AAC/B,CAAC,CAAC;AAxDW,QAAA,SAAS,aAwDpB;AAEF;;;GAGG;AACI,MAAM,eAAe,GAAG,CAAC,EAAc,EAAE,EAAE;IACjD,IAAI,QAAQ,GAAG,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACrD,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAS,EAAc;QAC7D,IAAI,MAAM,GAAG,EAAE,CAAC,UAAkB,CAAC;QACnC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,UAAkB,EAAE,EAAE,CAAC,CAAC;QAC/C,MAAM,CAAC,SAAS,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,eAAe,mBAO1B"}
|
||||
20
node_modules/tom-select/dist/cjs/contrib/microevent.d.ts
generated
vendored
Normal file
20
node_modules/tom-select/dist/cjs/contrib/microevent.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* MicroEvent - to make any js object an event emitter
|
||||
*
|
||||
* - pure javascript - server compatible, browser compatible
|
||||
* - dont rely on the browser doms
|
||||
* - super simple - you get it immediatly, no mistery, no magic involved
|
||||
*
|
||||
* @author Jerome Etienne (https://github.com/jeromeetienne)
|
||||
*/
|
||||
type TCallback = (...args: any) => any;
|
||||
export default class MicroEvent {
|
||||
_events: {
|
||||
[key: string]: TCallback[];
|
||||
};
|
||||
constructor();
|
||||
on(events: string, fct: TCallback): void;
|
||||
off(events: string, fct: TCallback): void;
|
||||
trigger(events: string, ...args: any): void;
|
||||
}
|
||||
export {};
|
||||
64
node_modules/tom-select/dist/cjs/contrib/microevent.js
generated
vendored
Normal file
64
node_modules/tom-select/dist/cjs/contrib/microevent.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
/**
|
||||
* MicroEvent - to make any js object an event emitter
|
||||
*
|
||||
* - pure javascript - server compatible, browser compatible
|
||||
* - dont rely on the browser doms
|
||||
* - super simple - you get it immediatly, no mistery, no magic involved
|
||||
*
|
||||
* @author Jerome Etienne (https://github.com/jeromeetienne)
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
/**
|
||||
* Execute callback for each event in space separated list of event names
|
||||
*
|
||||
*/
|
||||
function forEvents(events, callback) {
|
||||
events.split(/\s+/).forEach((event) => {
|
||||
callback(event);
|
||||
});
|
||||
}
|
||||
class MicroEvent {
|
||||
constructor() {
|
||||
this._events = {};
|
||||
}
|
||||
on(events, fct) {
|
||||
forEvents(events, (event) => {
|
||||
const event_array = this._events[event] || [];
|
||||
event_array.push(fct);
|
||||
this._events[event] = event_array;
|
||||
});
|
||||
}
|
||||
off(events, fct) {
|
||||
var n = arguments.length;
|
||||
if (n === 0) {
|
||||
this._events = {};
|
||||
return;
|
||||
}
|
||||
forEvents(events, (event) => {
|
||||
if (n === 1) {
|
||||
delete this._events[event];
|
||||
return;
|
||||
}
|
||||
const event_array = this._events[event];
|
||||
if (event_array === undefined)
|
||||
return;
|
||||
event_array.splice(event_array.indexOf(fct), 1);
|
||||
this._events[event] = event_array;
|
||||
});
|
||||
}
|
||||
trigger(events, ...args) {
|
||||
var self = this;
|
||||
forEvents(events, (event) => {
|
||||
const event_array = self._events[event];
|
||||
if (event_array === undefined)
|
||||
return;
|
||||
event_array.forEach(fct => {
|
||||
fct.apply(self, args);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.default = MicroEvent;
|
||||
;
|
||||
//# sourceMappingURL=microevent.js.map
|
||||
1
node_modules/tom-select/dist/cjs/contrib/microevent.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/contrib/microevent.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"microevent.js","sourceRoot":"","sources":["../../../src/contrib/microevent.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAI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QACnC,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,CAAC,MAAa,EAAE,GAAG,IAAQ;QACjC,IAAI,IAAI,GAAG,IAAI,CAAC;QAEhB,SAAS,CAAC,MAAM,EAAC,CAAC,KAAK,EAAE,EAAE;YAC1B,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACxC,IAAI,WAAW,KAAK,SAAS;gBAAG,OAAO;YACvC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACzB,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAE,CAAC;YACxB,CAAC,CAAC,CAAC;QAEJ,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAlDD,6BAkDC;AAAA,CAAC"}
|
||||
71
node_modules/tom-select/dist/cjs/contrib/microplugin.d.ts
generated
vendored
Normal file
71
node_modules/tom-select/dist/cjs/contrib/microplugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* microplugin.js
|
||||
* Copyright (c) 2013 Brian Reavis & 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.
|
||||
*
|
||||
* @author Brian Reavis <brian@thirdroute.com>
|
||||
*/
|
||||
type TSettings = {
|
||||
[key: string]: any;
|
||||
};
|
||||
type TPlugins = {
|
||||
names: string[];
|
||||
settings: TSettings;
|
||||
requested: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
loaded: {
|
||||
[key: string]: any;
|
||||
};
|
||||
};
|
||||
export type TPluginItem = {
|
||||
name: string;
|
||||
options: {};
|
||||
};
|
||||
export type TPluginHash = {
|
||||
[key: string]: {};
|
||||
};
|
||||
export default function MicroPlugin(Interface: any): {
|
||||
new (): {
|
||||
[x: string]: any;
|
||||
plugins: TPlugins;
|
||||
/**
|
||||
* Initializes the listed plugins (with options).
|
||||
* Acceptable formats:
|
||||
*
|
||||
* List (without options):
|
||||
* ['a', 'b', 'c']
|
||||
*
|
||||
* List (with options):
|
||||
* [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
|
||||
*
|
||||
* Hash (with options):
|
||||
* {'a': { ... }, 'b': { ... }, 'c': { ... }}
|
||||
*
|
||||
* @param {array|object} plugins
|
||||
*/
|
||||
initializePlugins(plugins: string[] | TPluginItem[] | TPluginHash): void;
|
||||
loadPlugin(name: string): void;
|
||||
/**
|
||||
* Initializes a plugin.
|
||||
*
|
||||
*/
|
||||
require(name: string): any;
|
||||
};
|
||||
[x: string]: any;
|
||||
/**
|
||||
* Registers a plugin.
|
||||
*
|
||||
* @param {function} fn
|
||||
*/
|
||||
define(name: string, fn: (this: any, settings: TSettings) => any): void;
|
||||
};
|
||||
export {};
|
||||
112
node_modules/tom-select/dist/cjs/contrib/microplugin.js
generated
vendored
Normal file
112
node_modules/tom-select/dist/cjs/contrib/microplugin.js
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
"use strict";
|
||||
/**
|
||||
* microplugin.js
|
||||
* Copyright (c) 2013 Brian Reavis & 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.
|
||||
*
|
||||
* @author Brian Reavis <brian@thirdroute.com>
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = MicroPlugin;
|
||||
function MicroPlugin(Interface) {
|
||||
Interface.plugins = {};
|
||||
return class extends Interface {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.plugins = {
|
||||
names: [],
|
||||
settings: {},
|
||||
requested: {},
|
||||
loaded: {}
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Registers a plugin.
|
||||
*
|
||||
* @param {function} fn
|
||||
*/
|
||||
static define(name, fn) {
|
||||
Interface.plugins[name] = {
|
||||
'name': name,
|
||||
'fn': fn
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Initializes the listed plugins (with options).
|
||||
* Acceptable formats:
|
||||
*
|
||||
* List (without options):
|
||||
* ['a', 'b', 'c']
|
||||
*
|
||||
* List (with options):
|
||||
* [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
|
||||
*
|
||||
* Hash (with options):
|
||||
* {'a': { ... }, 'b': { ... }, 'c': { ... }}
|
||||
*
|
||||
* @param {array|object} plugins
|
||||
*/
|
||||
initializePlugins(plugins) {
|
||||
var key, name;
|
||||
const self = this;
|
||||
const queue = [];
|
||||
if (Array.isArray(plugins)) {
|
||||
plugins.forEach((plugin) => {
|
||||
if (typeof plugin === 'string') {
|
||||
queue.push(plugin);
|
||||
}
|
||||
else {
|
||||
self.plugins.settings[plugin.name] = plugin.options;
|
||||
queue.push(plugin.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
else if (plugins) {
|
||||
for (key in plugins) {
|
||||
if (plugins.hasOwnProperty(key)) {
|
||||
self.plugins.settings[key] = plugins[key];
|
||||
queue.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
while (name = queue.shift()) {
|
||||
self.require(name);
|
||||
}
|
||||
}
|
||||
loadPlugin(name) {
|
||||
var self = this;
|
||||
var plugins = self.plugins;
|
||||
var plugin = Interface.plugins[name];
|
||||
if (!Interface.plugins.hasOwnProperty(name)) {
|
||||
throw new Error('Unable to find "' + name + '" plugin');
|
||||
}
|
||||
plugins.requested[name] = true;
|
||||
plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);
|
||||
plugins.names.push(name);
|
||||
}
|
||||
/**
|
||||
* Initializes a plugin.
|
||||
*
|
||||
*/
|
||||
require(name) {
|
||||
var self = this;
|
||||
var plugins = self.plugins;
|
||||
if (!self.plugins.loaded.hasOwnProperty(name)) {
|
||||
if (plugins.requested[name]) {
|
||||
throw new Error('Plugin has circular dependency ("' + name + '")');
|
||||
}
|
||||
self.loadPlugin(name);
|
||||
}
|
||||
return plugins.loaded[name];
|
||||
}
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=microplugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/contrib/microplugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/contrib/microplugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"microplugin.js","sourceRoot":"","sources":["../../../src/contrib/microplugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAmBH,8BAuGC;AAvGD,SAAwB,WAAW,CAAC,SAAc;IAEjD,SAAS,CAAC,OAAO,GAAG,EAAE,CAAC;IAEvB,OAAO,KAAM,SAAQ,SAAS;QAAvB;;YAEC,YAAO,GAAY;gBACzB,KAAK,EAAO,EAAE;gBACd,QAAQ,EAAI,EAAE;gBACd,SAAS,EAAG,EAAE;gBACd,MAAM,EAAM,EAAE;aACd,CAAC;QA0FH,CAAC;QAxFA;;;;WAIG;QACH,MAAM,CAAC,MAAM,CAAC,IAAW,EAAE,EAAqC;YAC/D,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG;gBACzB,MAAM,EAAG,IAAI;gBACb,IAAI,EAAK,EAAE;aACX,CAAC;QACH,CAAC;QAGD;;;;;;;;;;;;;;WAcG;QACH,iBAAiB,CAAC,OAA0C;YAC3D,IAAI,GAAG,EAAE,IAAI,CAAC;YACd,MAAM,IAAI,GAAI,IAAI,CAAC;YACn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AI,IAAI,GAAG,UAAU,CAAC,CAAC;YAC1D,CAAC;YAED,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YAC/B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAClF,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED;;;WAGG;QACH,OAAO,CAAC,IAAW;YAClB,IAAI,IAAI,GAAG,IAAI,CAAC;YAChB,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAE3B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/C,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC7B,MAAM,IAAI,KAAK,CAAC,mCAAmC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;gBACpE,CAAC;gBACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC;YAED,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC;KAED,CAAC;AAEH,CAAC"}
|
||||
52
node_modules/tom-select/dist/cjs/defaults.d.ts
generated
vendored
Normal file
52
node_modules/tom-select/dist/cjs/defaults.d.ts
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
declare const _default: {
|
||||
options: never[];
|
||||
optgroups: never[];
|
||||
plugins: never[];
|
||||
delimiter: string;
|
||||
splitOn: null;
|
||||
persist: boolean;
|
||||
diacritics: boolean;
|
||||
create: null;
|
||||
createOnBlur: boolean;
|
||||
createFilter: null;
|
||||
highlight: boolean;
|
||||
openOnFocus: boolean;
|
||||
shouldOpen: null;
|
||||
maxOptions: number;
|
||||
maxItems: null;
|
||||
hideSelected: null;
|
||||
duplicates: boolean;
|
||||
addPrecedence: boolean;
|
||||
selectOnTab: boolean;
|
||||
preload: null;
|
||||
allowEmptyOption: boolean;
|
||||
refreshThrottle: number;
|
||||
loadThrottle: number;
|
||||
loadingClass: string;
|
||||
dataAttr: null;
|
||||
optgroupField: string;
|
||||
valueField: string;
|
||||
labelField: string;
|
||||
disabledField: string;
|
||||
optgroupLabelField: string;
|
||||
optgroupValueField: string;
|
||||
lockOptgroupOrder: boolean;
|
||||
sortField: string;
|
||||
searchField: string[];
|
||||
searchConjunction: string;
|
||||
mode: null;
|
||||
wrapperClass: string;
|
||||
controlClass: string;
|
||||
dropdownClass: string;
|
||||
dropdownContentClass: string;
|
||||
itemClass: string;
|
||||
optionClass: string;
|
||||
dropdownParent: null;
|
||||
controlInput: string;
|
||||
copyClassesToDropdown: boolean;
|
||||
placeholder: null;
|
||||
hidePlaceholder: null;
|
||||
shouldLoad: (query: string) => boolean;
|
||||
render: {};
|
||||
};
|
||||
export default _default;
|
||||
84
node_modules/tom-select/dist/cjs/defaults.js
generated
vendored
Normal file
84
node_modules/tom-select/dist/cjs/defaults.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = {
|
||||
options: [],
|
||||
optgroups: [],
|
||||
plugins: [],
|
||||
delimiter: ',',
|
||||
splitOn: null, // regexp or string for splitting up values from a paste command
|
||||
persist: true,
|
||||
diacritics: true,
|
||||
create: null,
|
||||
createOnBlur: false,
|
||||
createFilter: null,
|
||||
highlight: true,
|
||||
openOnFocus: true,
|
||||
shouldOpen: null,
|
||||
maxOptions: 50,
|
||||
maxItems: null,
|
||||
hideSelected: null,
|
||||
duplicates: false,
|
||||
addPrecedence: false,
|
||||
selectOnTab: false,
|
||||
preload: null,
|
||||
allowEmptyOption: false,
|
||||
//closeAfterSelect: false,
|
||||
refreshThrottle: 300,
|
||||
loadThrottle: 300,
|
||||
loadingClass: 'loading',
|
||||
dataAttr: null, //'data-data',
|
||||
optgroupField: 'optgroup',
|
||||
valueField: 'value',
|
||||
labelField: 'text',
|
||||
disabledField: 'disabled',
|
||||
optgroupLabelField: 'label',
|
||||
optgroupValueField: 'value',
|
||||
lockOptgroupOrder: false,
|
||||
sortField: '$order',
|
||||
searchField: ['text'],
|
||||
searchConjunction: 'and',
|
||||
mode: null,
|
||||
wrapperClass: 'ts-wrapper',
|
||||
controlClass: 'ts-control',
|
||||
dropdownClass: 'ts-dropdown',
|
||||
dropdownContentClass: 'ts-dropdown-content',
|
||||
itemClass: 'item',
|
||||
optionClass: 'option',
|
||||
dropdownParent: null,
|
||||
controlInput: '<input type="text" autocomplete="off" size="1" />',
|
||||
copyClassesToDropdown: false,
|
||||
placeholder: null,
|
||||
hidePlaceholder: null,
|
||||
shouldLoad: function (query) {
|
||||
return query.length > 0;
|
||||
},
|
||||
/*
|
||||
load : null, // function(query, callback) { ... }
|
||||
score : null, // function(search) { ... }
|
||||
onInitialize : null, // function() { ... }
|
||||
onChange : null, // function(value) { ... }
|
||||
onItemAdd : null, // function(value, $item) { ... }
|
||||
onItemRemove : null, // function(value) { ... }
|
||||
onClear : null, // function() { ... }
|
||||
onOptionAdd : null, // function(value, data) { ... }
|
||||
onOptionRemove : null, // function(value) { ... }
|
||||
onOptionClear : null, // function() { ... }
|
||||
onOptionGroupAdd : null, // function(id, data) { ... }
|
||||
onOptionGroupRemove : null, // function(id) { ... }
|
||||
onOptionGroupClear : null, // function() { ... }
|
||||
onDropdownOpen : null, // function(dropdown) { ... }
|
||||
onDropdownClose : null, // function(dropdown) { ... }
|
||||
onType : null, // function(str) { ... }
|
||||
onDelete : null, // function(values) { ... }
|
||||
*/
|
||||
render: {
|
||||
/*
|
||||
item: null,
|
||||
optgroup: null,
|
||||
optgroup_header: null,
|
||||
option: null,
|
||||
option_create: null
|
||||
*/
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=defaults.js.map
|
||||
1
node_modules/tom-select/dist/cjs/defaults.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/defaults.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/defaults.ts"],"names":[],"mappings":";;AACA,kBAAe;IACd,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,EAAE;IAEb,OAAO,EAAE,EAAE;IACX,SAAS,EAAE,GAAG;IACd,OAAO,EAAE,IAAI,EAAE,gEAAgE;IAC/E,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,UAAU,EAAE,IAAI;IAChB,UAAU,EAAE,EAAE;IACd,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;IAClB,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,IAAI;IACb,gBAAgB,EAAE,KAAK;IACvB,0BAA0B;IAC1B,eAAe,EAAE,GAAG;IAGpB,YAAY,EAAE,GAAG;IACjB,YAAY,EAAE,SAAS;IAEvB,QAAQ,EAAE,IAAI,EAAE,cAAc;IAC9B,aAAa,EAAE,UAAU;IACzB,UAAU,EAAE,OAAO;IACnB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,UAAU;IACzB,kBAAkB,EAAE,OAAO;IAC3B,kBAAkB,EAAE,OAAO;IAC3B,iBAAiB,EAAE,KAAK;IAExB,SAAS,EAAE,QAAQ;IACnB,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB,iBAAiB,EAAE,KAAK;IAExB,IAAI,EAAE,IAAI;IACV,YAAY,EAAE,YAAY;IAC1B,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,oBAAoB,EAAE,qBAAqB;IAC3C,SAAS,EAAE,MAAM;IACjB,WAAW,EAAE,QAAQ;IAErB,cAAc,EAAE,IAAI;IACpB,YAAY,EAAE,mDAAmD;IAEjE,qBAAqB,EAAE,KAAK;IAE5B,WAAW,EAAE,IAAI;IACjB,eAAe,EAAE,IAAI;IAErB,UAAU,EAAE,UAAS,KAAY;QAChC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IACzB,CAAC;IAED;;;;;;;;;;;;;;;;;;MAkBE;IAEF,MAAM,EAAE;IACP;;;;;;MAME;KACF;CACD,CAAC"}
|
||||
3
node_modules/tom-select/dist/cjs/getSettings.d.ts
generated
vendored
Normal file
3
node_modules/tom-select/dist/cjs/getSettings.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { TomSettings, RecursivePartial } from './types/index.ts';
|
||||
import { TomInput } from './types/index.ts';
|
||||
export default function getSettings(input: TomInput, settings_user: RecursivePartial<TomSettings>): TomSettings;
|
||||
146
node_modules/tom-select/dist/cjs/getSettings.js
generated
vendored
Normal file
146
node_modules/tom-select/dist/cjs/getSettings.js
generated
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = getSettings;
|
||||
const defaults_ts_1 = require("./defaults.js");
|
||||
const utils_ts_1 = require("./utils.js");
|
||||
function getSettings(input, settings_user) {
|
||||
var settings = Object.assign({}, defaults_ts_1.default, settings_user);
|
||||
var attr_data = settings.dataAttr;
|
||||
var field_label = settings.labelField;
|
||||
var field_value = settings.valueField;
|
||||
var field_disabled = settings.disabledField;
|
||||
var field_optgroup = settings.optgroupField;
|
||||
var field_optgroup_label = settings.optgroupLabelField;
|
||||
var field_optgroup_value = settings.optgroupValueField;
|
||||
var tag_name = input.tagName.toLowerCase();
|
||||
var placeholder = input.getAttribute('placeholder') || input.getAttribute('data-placeholder');
|
||||
if (!placeholder && !settings.allowEmptyOption) {
|
||||
let option = input.querySelector('option[value=""]');
|
||||
if (option) {
|
||||
placeholder = option.textContent;
|
||||
}
|
||||
}
|
||||
var settings_element = {
|
||||
placeholder: placeholder,
|
||||
options: [],
|
||||
optgroups: [],
|
||||
items: [],
|
||||
maxItems: null,
|
||||
};
|
||||
/**
|
||||
* Initialize from a <select> element.
|
||||
*
|
||||
*/
|
||||
var init_select = () => {
|
||||
var tagName;
|
||||
var options = settings_element.options;
|
||||
var optionsMap = {};
|
||||
var group_count = 1;
|
||||
let $order = 0;
|
||||
var readData = (el) => {
|
||||
var data = Object.assign({}, el.dataset); // get plain object from DOMStringMap
|
||||
var json = attr_data && data[attr_data];
|
||||
if (typeof json === 'string' && json.length) {
|
||||
data = Object.assign(data, JSON.parse(json));
|
||||
}
|
||||
return data;
|
||||
};
|
||||
var addOption = (option, group) => {
|
||||
var value = (0, utils_ts_1.hash_key)(option.value);
|
||||
if (value == null)
|
||||
return;
|
||||
if (!value && !settings.allowEmptyOption)
|
||||
return;
|
||||
// if the option already exists, it's probably been
|
||||
// duplicated in another optgroup. in this case, push
|
||||
// the current group to the "optgroup" property on the
|
||||
// existing option so that it's rendered in both places.
|
||||
if (optionsMap.hasOwnProperty(value)) {
|
||||
if (group) {
|
||||
var arr = optionsMap[value][field_optgroup];
|
||||
if (!arr) {
|
||||
optionsMap[value][field_optgroup] = group;
|
||||
}
|
||||
else if (!Array.isArray(arr)) {
|
||||
optionsMap[value][field_optgroup] = [arr, group];
|
||||
}
|
||||
else {
|
||||
arr.push(group);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
var option_data = readData(option);
|
||||
option_data[field_label] = option_data[field_label] || option.textContent;
|
||||
option_data[field_value] = option_data[field_value] || value;
|
||||
option_data[field_disabled] = option_data[field_disabled] || option.disabled;
|
||||
option_data[field_optgroup] = option_data[field_optgroup] || group;
|
||||
option_data.$option = option;
|
||||
option_data.$order = option_data.$order || ++$order;
|
||||
optionsMap[value] = option_data;
|
||||
options.push(option_data);
|
||||
}
|
||||
if (option.selected) {
|
||||
settings_element.items.push(value);
|
||||
}
|
||||
};
|
||||
var addGroup = (optgroup) => {
|
||||
var id, optgroup_data;
|
||||
optgroup_data = readData(optgroup);
|
||||
optgroup_data[field_optgroup_label] = optgroup_data[field_optgroup_label] || optgroup.getAttribute('label') || '';
|
||||
optgroup_data[field_optgroup_value] = optgroup_data[field_optgroup_value] || group_count++;
|
||||
optgroup_data[field_disabled] = optgroup_data[field_disabled] || optgroup.disabled;
|
||||
optgroup_data.$order = optgroup_data.$order || ++$order;
|
||||
settings_element.optgroups.push(optgroup_data);
|
||||
id = optgroup_data[field_optgroup_value];
|
||||
(0, utils_ts_1.iterate)(optgroup.children, (option) => {
|
||||
addOption(option, id);
|
||||
});
|
||||
};
|
||||
settings_element.maxItems = input.hasAttribute('multiple') ? null : 1;
|
||||
(0, utils_ts_1.iterate)(input.children, (child) => {
|
||||
tagName = child.tagName.toLowerCase();
|
||||
if (tagName === 'optgroup') {
|
||||
addGroup(child);
|
||||
}
|
||||
else if (tagName === 'option') {
|
||||
addOption(child);
|
||||
}
|
||||
});
|
||||
};
|
||||
/**
|
||||
* Initialize from a <input type="text"> element.
|
||||
*
|
||||
*/
|
||||
var init_textbox = () => {
|
||||
const data_raw = input.getAttribute(attr_data);
|
||||
if (!data_raw) {
|
||||
var value = input.value.trim() || '';
|
||||
if (!settings.allowEmptyOption && !value.length)
|
||||
return;
|
||||
const values = value.split(settings.delimiter);
|
||||
(0, utils_ts_1.iterate)(values, (value) => {
|
||||
const option = {};
|
||||
option[field_label] = value;
|
||||
option[field_value] = value;
|
||||
settings_element.options.push(option);
|
||||
});
|
||||
settings_element.items = values;
|
||||
}
|
||||
else {
|
||||
settings_element.options = JSON.parse(data_raw);
|
||||
(0, utils_ts_1.iterate)(settings_element.options, (opt) => {
|
||||
settings_element.items.push(opt[field_value]);
|
||||
});
|
||||
}
|
||||
};
|
||||
if (tag_name === 'select') {
|
||||
init_select();
|
||||
}
|
||||
else {
|
||||
init_textbox();
|
||||
}
|
||||
return Object.assign({}, defaults_ts_1.default, settings_element, settings_user);
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=getSettings.js.map
|
||||
1
node_modules/tom-select/dist/cjs/getSettings.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/getSettings.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/tom-select/dist/cjs/package.json
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/package.json
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"type":"commonjs"}
|
||||
16
node_modules/tom-select/dist/cjs/plugins/caret_position/plugin.d.ts
generated
vendored
Normal file
16
node_modules/tom-select/dist/cjs/plugins/caret_position/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Plugin: "dropdown_input" (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';
|
||||
export default function (this: TomSelect): void;
|
||||
66
node_modules/tom-select/dist/cjs/plugins/caret_position/plugin.js
generated
vendored
Normal file
66
node_modules/tom-select/dist/cjs/plugins/caret_position/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "dropdown_input" (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");
|
||||
function default_1() {
|
||||
var self = this;
|
||||
/**
|
||||
* Moves the caret to the specified index.
|
||||
*
|
||||
* The input must be moved by leaving it in place and moving the
|
||||
* siblings, due to the fact that focus cannot be restored once lost
|
||||
* on mobile webkit devices
|
||||
*
|
||||
*/
|
||||
self.hook('instead', 'setCaret', (new_pos) => {
|
||||
if (self.settings.mode === 'single' || !self.control.contains(self.control_input)) {
|
||||
new_pos = self.items.length;
|
||||
}
|
||||
else {
|
||||
new_pos = Math.max(0, Math.min(self.items.length, new_pos));
|
||||
if (new_pos != self.caretPos && !self.isPending) {
|
||||
self.controlChildren().forEach((child, j) => {
|
||||
if (j < new_pos) {
|
||||
self.control_input.insertAdjacentElement('beforebegin', child);
|
||||
}
|
||||
else {
|
||||
self.control.appendChild(child);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
self.caretPos = new_pos;
|
||||
});
|
||||
self.hook('instead', 'moveCaret', (direction) => {
|
||||
if (!self.isFocused)
|
||||
return;
|
||||
// move caret before or after selected items
|
||||
const last_active = self.getLastActive(direction);
|
||||
if (last_active) {
|
||||
const idx = (0, vanilla_ts_1.nodeIndex)(last_active);
|
||||
self.setCaret(direction > 0 ? idx + 1 : idx);
|
||||
self.setActiveItem();
|
||||
(0, vanilla_ts_1.removeClasses)(last_active, 'last-active');
|
||||
// move caret left or right of current position
|
||||
}
|
||||
else {
|
||||
self.setCaret(self.caretPos + direction);
|
||||
}
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/caret_position/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/caret_position/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/caret_position/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAMH,4BAqDC;AAxDD,iDAA4D;AAG5D;IACC,IAAI,IAAI,GAAG,IAAI,CAAC;IAEhB;;;;;;;OAOG;IACH,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,UAAU,EAAC,CAAC,OAAc,EAAE,EAAE;QAEjD,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,EAAG,CAAC;YACpF,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;QAC7B,CAAC;aAAM,CAAC;YACP,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;YAE5D,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;gBAEjD,IAAI,CAAC,eAAe,EAAE,CAAC,OAAO,CAAC,CAAC,KAAK,EAAC,CAAC,EAAE,EAAE;oBAC1C,IAAI,CAAC,GAAG,OAAO,EAAE,CAAC;wBACjB,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,aAAa,EAAE,KAAK,CAAE,CAAC;oBACjE,CAAC;yBAAM,CAAC;wBACP,IAAI,CAAC,OAAO,CAAC,WAAW,CAAE,KAAK,CAAE,CAAC;oBACnC,CAAC;gBACF,CAAC,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,WAAW,EAAC,CAAC,SAAgB,EAAE,EAAE;QAEpD,IAAI,CAAC,IAAI,CAAC,SAAS;YAAG,OAAO;QAE7B,4CAA4C;QAC5C,MAAM,WAAW,GAAI,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QACnD,IAAI,WAAW,EAAE,CAAC;YACjB,MAAM,GAAG,GAAG,IAAA,sBAAS,EAAC,WAAW,CAAC,CAAC;YACnC,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAA,CAAC,CAAC,GAAG,CAAC,CAAC;YAC5C,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,IAAA,0BAAa,EAAC,WAA0B,EAAC,aAAa,CAAC,CAAC;YAEzD,+CAA+C;QAC/C,CAAC;aAAI,CAAC;YACL,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;QAE1C,CAAC;IAEF,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
|
||||
16
node_modules/tom-select/dist/cjs/plugins/change_listener/plugin.d.ts
generated
vendored
Normal file
16
node_modules/tom-select/dist/cjs/plugins/change_listener/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Plugin: "change_listener" (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';
|
||||
export default function (this: TomSelect): void;
|
||||
25
node_modules/tom-select/dist/cjs/plugins/change_listener/plugin.js
generated
vendored
Normal file
25
node_modules/tom-select/dist/cjs/plugins/change_listener/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "change_listener" (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 utils_ts_1 = require("../../utils.js");
|
||||
function default_1() {
|
||||
(0, utils_ts_1.addEvent)(this.input, 'change', () => {
|
||||
this.sync();
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/change_listener/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/change_listener/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/change_listener/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAKH,4BAIC;AAND,6CAA0C;AAE1C;IACC,IAAA,mBAAQ,EAAC,IAAI,CAAC,KAAK,EAAC,QAAQ,EAAC,GAAE,EAAE;QAChC,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC,CAAC,CAAC;AACJ,CAAC;AAAA,CAAC"}
|
||||
17
node_modules/tom-select/dist/cjs/plugins/checkbox_options/plugin.d.ts
generated
vendored
Normal file
17
node_modules/tom-select/dist/cjs/plugins/checkbox_options/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Plugin: "checkbox_options" (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 { CBOptions } from './types.ts';
|
||||
export default function (this: TomSelect, userOptions: CBOptions): void;
|
||||
108
node_modules/tom-select/dist/cjs/plugins/checkbox_options/plugin.js
generated
vendored
Normal file
108
node_modules/tom-select/dist/cjs/plugins/checkbox_options/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "checkbox_options" (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 utils_ts_1 = require("../../utils.js");
|
||||
const vanilla_ts_1 = require("../../vanilla.js");
|
||||
function default_1(userOptions) {
|
||||
var self = this;
|
||||
var orig_onOptionSelect = self.onOptionSelect;
|
||||
self.settings.hideSelected = false;
|
||||
const cbOptions = Object.assign({
|
||||
// so that the user may add different ones as well
|
||||
className: "tomselect-checkbox",
|
||||
// the following default to the historic plugin's values
|
||||
checkedClassNames: undefined,
|
||||
uncheckedClassNames: undefined,
|
||||
}, userOptions);
|
||||
var UpdateChecked = function (checkbox, toCheck) {
|
||||
if (toCheck) {
|
||||
checkbox.checked = true;
|
||||
if (cbOptions.uncheckedClassNames) {
|
||||
checkbox.classList.remove(...cbOptions.uncheckedClassNames);
|
||||
}
|
||||
if (cbOptions.checkedClassNames) {
|
||||
checkbox.classList.add(...cbOptions.checkedClassNames);
|
||||
}
|
||||
}
|
||||
else {
|
||||
checkbox.checked = false;
|
||||
if (cbOptions.checkedClassNames) {
|
||||
checkbox.classList.remove(...cbOptions.checkedClassNames);
|
||||
}
|
||||
if (cbOptions.uncheckedClassNames) {
|
||||
checkbox.classList.add(...cbOptions.uncheckedClassNames);
|
||||
}
|
||||
}
|
||||
};
|
||||
// update the checkbox for an option
|
||||
var UpdateCheckbox = function (option) {
|
||||
setTimeout(() => {
|
||||
var checkbox = option.querySelector('input.' + cbOptions.className);
|
||||
if (checkbox instanceof HTMLInputElement) {
|
||||
UpdateChecked(checkbox, option.classList.contains('selected'));
|
||||
}
|
||||
}, 1);
|
||||
};
|
||||
// add checkbox to option template
|
||||
self.hook('after', 'setupTemplates', () => {
|
||||
var orig_render_option = self.settings.render.option;
|
||||
self.settings.render.option = ((data, escape_html) => {
|
||||
var rendered = (0, vanilla_ts_1.getDom)(orig_render_option.call(self, data, escape_html));
|
||||
var checkbox = document.createElement('input');
|
||||
if (cbOptions.className) {
|
||||
checkbox.classList.add(cbOptions.className);
|
||||
}
|
||||
checkbox.addEventListener('click', function (evt) {
|
||||
(0, utils_ts_1.preventDefault)(evt);
|
||||
});
|
||||
checkbox.type = 'checkbox';
|
||||
const hashed = (0, utils_ts_1.hash_key)(data[self.settings.valueField]);
|
||||
UpdateChecked(checkbox, !!(hashed && self.items.indexOf(hashed) > -1));
|
||||
rendered.prepend(checkbox);
|
||||
return rendered;
|
||||
});
|
||||
});
|
||||
// uncheck when item removed
|
||||
self.on('item_remove', (value) => {
|
||||
var option = self.getOption(value);
|
||||
if (option) { // if dropdown hasn't been opened yet, the option won't exist
|
||||
option.classList.remove('selected'); // selected class won't be removed yet
|
||||
UpdateCheckbox(option);
|
||||
}
|
||||
});
|
||||
// check when item added
|
||||
self.on('item_add', (value) => {
|
||||
var option = self.getOption(value);
|
||||
if (option) { // if dropdown hasn't been opened yet, the option won't exist
|
||||
UpdateCheckbox(option);
|
||||
}
|
||||
});
|
||||
// remove items when selected option is clicked
|
||||
self.hook('instead', 'onOptionSelect', (evt, option) => {
|
||||
if (option.classList.contains('selected')) {
|
||||
option.classList.remove('selected');
|
||||
self.removeItem(option.dataset.value);
|
||||
self.refreshOptions();
|
||||
(0, utils_ts_1.preventDefault)(evt, true);
|
||||
return;
|
||||
}
|
||||
orig_onOptionSelect.call(self, evt, option);
|
||||
UpdateCheckbox(option);
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/checkbox_options/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/checkbox_options/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/checkbox_options/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AASH,4BA2GC;AAhHD,6CAA0D;AAC1D,iDAA0C;AAI1C,mBAAwC,WAAqB;IAC5D,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC;IAE9C,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,KAAK,CAAC;IAEnC,M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ins/checkbox_options/types.d.ts
generated
vendored
Normal file
14
node_modules/tom-select/dist/cjs/plugins/checkbox_options/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export type CBOptions = {
|
||||
/**
|
||||
* a unique class name for the checkbox to find the input
|
||||
*/
|
||||
className?: string;
|
||||
/**
|
||||
* class name to add if checkbox is checked and remove otherwise
|
||||
*/
|
||||
checkedClassNames?: string[];
|
||||
/**
|
||||
* class name to add if checkbox was not checked and remove otherwise
|
||||
*/
|
||||
uncheckedClassNames?: string[];
|
||||
};
|
||||
3
node_modules/tom-select/dist/cjs/plugins/checkbox_options/types.js
generated
vendored
Normal file
3
node_modules/tom-select/dist/cjs/plugins/checkbox_options/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/checkbox_options/types.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/checkbox_options/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/checkbox_options/types.ts"],"names":[],"mappings":""}
|
||||
17
node_modules/tom-select/dist/cjs/plugins/clear_button/plugin.d.ts
generated
vendored
Normal file
17
node_modules/tom-select/dist/cjs/plugins/clear_button/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Plugin: "dropdown_header" (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 { CBOptions } from './types.ts';
|
||||
export default function (this: TomSelect, userOptions: CBOptions): void;
|
||||
44
node_modules/tom-select/dist/cjs/plugins/clear_button/plugin.js
generated
vendored
Normal file
44
node_modules/tom-select/dist/cjs/plugins/clear_button/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "dropdown_header" (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");
|
||||
function default_1(userOptions) {
|
||||
const self = this;
|
||||
const options = Object.assign({
|
||||
className: 'clear-button',
|
||||
title: 'Clear All',
|
||||
html: (data) => {
|
||||
return `<div class="${data.className}" title="${data.title}">⨯</div>`;
|
||||
}
|
||||
}, userOptions);
|
||||
self.on('initialize', () => {
|
||||
var button = (0, vanilla_ts_1.getDom)(options.html(options));
|
||||
button.addEventListener('click', (evt) => {
|
||||
if (self.isLocked)
|
||||
return;
|
||||
self.clear();
|
||||
if (self.settings.mode === 'single' && self.settings.allowEmptyOption) {
|
||||
self.addItem('');
|
||||
}
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
});
|
||||
self.control.appendChild(button);
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/clear_button/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/clear_button/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/clear_button/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAMH,4BA6BC;AAhCD,iDAA0C;AAG1C,mBAAwC,WAAqB;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,SAAS,EAAE,cAAc;QACzB,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,CAAC,IAAc,EAAE,EAAE;YACxB,OAAO,eAAe,IAAI,CAAC,SAAS,YAAY,IAAI,CAAC,KAAK,kBAAkB,CAAC;QAC9E,CAAC;KACD,EAAE,WAAW,CAAC,CAAC;IAEhB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAC,GAAE,EAAE;QACxB,IAAI,MAAM,GAAG,IAAA,mBAAM,EAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3C,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAC,CAAC,GAAG,EAAC,EAAE;YAEtC,IAAI,IAAI,CAAC,QAAQ;gBAAG,OAAO;YAE3B,IAAI,CAAC,KAAK,EAAE,CAAC;YAEb,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;gBACvE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YAClB,CAAC;YAED,GAAG,CAAC,cAAc,EAAE,CAAC;YACrB,GAAG,CAAC,eAAe,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
|
||||
5
node_modules/tom-select/dist/cjs/plugins/clear_button/types.d.ts
generated
vendored
Normal file
5
node_modules/tom-select/dist/cjs/plugins/clear_button/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export type CBOptions = {
|
||||
className?: string;
|
||||
title?: string;
|
||||
html?: (data: CBOptions) => string;
|
||||
};
|
||||
3
node_modules/tom-select/dist/cjs/plugins/clear_button/types.js
generated
vendored
Normal file
3
node_modules/tom-select/dist/cjs/plugins/clear_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/clear_button/types.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/clear_button/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/clear_button/types.ts"],"names":[],"mappings":""}
|
||||
16
node_modules/tom-select/dist/cjs/plugins/drag_drop/plugin.d.ts
generated
vendored
Normal file
16
node_modules/tom-select/dist/cjs/plugins/drag_drop/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Plugin: "drag_drop" (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';
|
||||
export default function (this: TomSelect): void;
|
||||
117
node_modules/tom-select/dist/cjs/plugins/drag_drop/plugin.js
generated
vendored
Normal file
117
node_modules/tom-select/dist/cjs/plugins/drag_drop/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,117 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "drag_drop" (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 utils_ts_1 = require("../../utils.js");
|
||||
const vanilla_ts_1 = require("../../vanilla.js");
|
||||
const insertAfter = (referenceNode, newNode) => {
|
||||
var _a;
|
||||
(_a = referenceNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, referenceNode.nextSibling);
|
||||
};
|
||||
const insertBefore = (referenceNode, newNode) => {
|
||||
var _a;
|
||||
(_a = referenceNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, referenceNode);
|
||||
};
|
||||
const isBefore = (referenceNode, newNode) => {
|
||||
do {
|
||||
newNode = newNode === null || newNode === void 0 ? void 0 : newNode.previousElementSibling;
|
||||
if (referenceNode == newNode) {
|
||||
return true;
|
||||
}
|
||||
} while (newNode && newNode.previousElementSibling);
|
||||
return false;
|
||||
};
|
||||
function default_1() {
|
||||
var self = this;
|
||||
if (self.settings.mode !== 'multi')
|
||||
return;
|
||||
var orig_lock = self.lock;
|
||||
var orig_unlock = self.unlock;
|
||||
let sortable = true;
|
||||
let drag_item;
|
||||
/**
|
||||
* Add draggable attribute to item
|
||||
*/
|
||||
self.hook('after', 'setupTemplates', () => {
|
||||
var orig_render_item = self.settings.render.item;
|
||||
self.settings.render.item = (data, escape) => {
|
||||
const item = (0, vanilla_ts_1.getDom)(orig_render_item.call(self, data, escape));
|
||||
(0, vanilla_ts_1.setAttr)(item, { 'draggable': 'true' });
|
||||
// prevent doc_mousedown (see tom-select.ts)
|
||||
const mousedown = (evt) => {
|
||||
if (!sortable)
|
||||
(0, utils_ts_1.preventDefault)(evt);
|
||||
evt.stopPropagation();
|
||||
};
|
||||
const dragStart = (evt) => {
|
||||
drag_item = item;
|
||||
setTimeout(() => {
|
||||
item.classList.add('ts-dragging');
|
||||
}, 0);
|
||||
};
|
||||
const dragOver = (evt) => {
|
||||
evt.preventDefault();
|
||||
item.classList.add('ts-drag-over');
|
||||
moveitem(item, drag_item);
|
||||
};
|
||||
const dragLeave = () => {
|
||||
item.classList.remove('ts-drag-over');
|
||||
};
|
||||
const moveitem = (targetitem, dragitem) => {
|
||||
if (dragitem === undefined)
|
||||
return;
|
||||
if (isBefore(dragitem, item)) {
|
||||
insertAfter(targetitem, dragitem);
|
||||
}
|
||||
else {
|
||||
insertBefore(targetitem, dragitem);
|
||||
}
|
||||
};
|
||||
const dragend = () => {
|
||||
document.querySelectorAll('.ts-drag-over').forEach(el => el.classList.remove('ts-drag-over'));
|
||||
drag_item === null || drag_item === void 0 ? void 0 : drag_item.classList.remove('ts-dragging');
|
||||
drag_item = undefined;
|
||||
var values = [];
|
||||
self.control.querySelectorAll(`[data-value]`).forEach((el) => {
|
||||
if (el.dataset.value) {
|
||||
let value = el.dataset.value;
|
||||
if (value) {
|
||||
values.push(value);
|
||||
}
|
||||
}
|
||||
});
|
||||
self.setValue(values);
|
||||
};
|
||||
(0, utils_ts_1.addEvent)(item, 'mousedown', mousedown);
|
||||
(0, utils_ts_1.addEvent)(item, 'dragstart', dragStart);
|
||||
(0, utils_ts_1.addEvent)(item, 'dragenter', dragOver);
|
||||
(0, utils_ts_1.addEvent)(item, 'dragover', dragOver);
|
||||
(0, utils_ts_1.addEvent)(item, 'dragleave', dragLeave);
|
||||
(0, utils_ts_1.addEvent)(item, 'dragend', dragend);
|
||||
return item;
|
||||
};
|
||||
});
|
||||
self.hook('instead', 'lock', () => {
|
||||
sortable = false;
|
||||
return orig_lock.call(self);
|
||||
});
|
||||
self.hook('instead', 'unlock', () => {
|
||||
sortable = true;
|
||||
return orig_unlock.call(self);
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/drag_drop/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/drag_drop/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/drag_drop/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AA8BH,4BAmGC;AA7HD,6CAAuE;AACvE,iDAAmD;AAGnD,MAAM,WAAW,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAE,EAAE;;IAC9D,MAAA,aAAa,CAAC,UAAU,0CAAE,YAAY,CAAC,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;AAC5E,CAAC,CAAA;AAED,MAAM,YAAY,GAAG,CAAC,aAAqB,EAAE,OAAe,EAAE,EAAE;;IAC/D,MAAA,aAAa,CAAC,UAAU,0CAAE,YAAY,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;AAChE,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,aAAoC,EAAE,OAA8B,EAAE,EAAE;IAEzF,GAAE,CAAC;QACF,OAAO,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,sBAAsB,CAAC;QAE1C,IAAI,aAAa,IAAI,OAAO,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC;QACb,CAAC;IAEF,CAAC,QAAO,OAAO,IAAI,OAAO,CAAC,s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,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;wBACpB,CAAC;oBACF,CAAC;gBACF,CAAC,CAAC,CAAC;gBAEH,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YACvB,CAAC,CAAA;YAGD,IAAA,mBAAQ,EAAC,IAAI,EAAC,WAAW,EAAE,SAAS,CAAC,CAAC;YACtC,IAAA,mBAAQ,EAAC,IAAI,EAAC,WAAW,EAAE,SAAS,CAAC,CAAC;YACtC,IAAA,mBAAQ,EAAC,IAAI,EAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;YACpC,IAAA,mBAAQ,EAAC,IAAI,EAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YACpC,IAAA,mBAAQ,EAAC,IAAI,EAAC,WAAW,EAAE,SAAS,CAAC,CAAC;YACtC,IAAA,mBAAQ,EAAC,IAAI,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAElC,OAAO,IAAI,CAAC;QACb,CAAC,CAAA;IACF,CAAC,CAAC,CAAC;IAIH,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,MAAM,EAAC,GAAE,EAAE;QAC9B,QAAQ,GAAG,KAAK,CAAC;QACjB,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,QAAQ,EAAC,GAAE,EAAE;QAChC,QAAQ,GAAG,IAAI,CAAC;QAChB,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
|
||||
17
node_modules/tom-select/dist/cjs/plugins/dropdown_header/plugin.d.ts
generated
vendored
Normal file
17
node_modules/tom-select/dist/cjs/plugins/dropdown_header/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Plugin: "dropdown_header" (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 { DHOptions } from './types.ts';
|
||||
export default function (this: TomSelect, userOptions: DHOptions): void;
|
||||
50
node_modules/tom-select/dist/cjs/plugins/dropdown_header/plugin.js
generated
vendored
Normal file
50
node_modules/tom-select/dist/cjs/plugins/dropdown_header/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "dropdown_header" (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 self = this;
|
||||
const options = Object.assign({
|
||||
title: 'Untitled',
|
||||
headerClass: 'dropdown-header',
|
||||
titleRowClass: 'dropdown-header-title',
|
||||
labelClass: 'dropdown-header-label',
|
||||
closeClass: 'dropdown-header-close',
|
||||
html: (data) => {
|
||||
return ('<div class="' + data.headerClass + '">' +
|
||||
'<div class="' + data.titleRowClass + '">' +
|
||||
'<span class="' + data.labelClass + '">' + data.title + '</span>' +
|
||||
'<a class="' + data.closeClass + '">×</a>' +
|
||||
'</div>' +
|
||||
'</div>');
|
||||
}
|
||||
}, userOptions);
|
||||
self.on('initialize', () => {
|
||||
var header = (0, vanilla_ts_1.getDom)(options.html(options));
|
||||
var close_link = header.querySelector('.' + options.closeClass);
|
||||
if (close_link) {
|
||||
close_link.addEventListener('click', (evt) => {
|
||||
(0, utils_ts_1.preventDefault)(evt, true);
|
||||
self.close();
|
||||
});
|
||||
}
|
||||
self.dropdown.insertBefore(header, self.dropdown.firstChild);
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/dropdown_header/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/dropdown_header/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/dropdown_header/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAOH,4BAoCC;AAxCD,iDAA0C;AAC1C,6CAAgD;AAGhD,mBAAwC,WAAqB;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,KAAK,EAAW,UAAU;QAC1B,WAAW,EAAK,iBAAiB;QACjC,aAAa,EAAG,uBAAuB;QACvC,UAAU,EAAM,uBAAuB;QACvC,UAAU,EAAM,uBAAuB;QAEvC,IAAI,EAAE,CAAC,IAAc,EAAE,EAAE;YACxB,OAAO,CACN,cAAc,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI;gBACvC,cAAc,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI;gBACzC,eAAe,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,SAAS;gBACjE,YAAY,GAAG,IAAI,CAAC,UAAU,GAAG,eAAe;gBACjD,QAAQ;gBACT,QAAQ,CACR,CAAC;QACH,CAAC;KACD,EAAE,WAAW,CAAC,CAAC;IAEhB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAC,GAAE,EAAE;QACxB,IAAI,MAAM,GAAG,IAAA,mBAAM,EAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAE3C,IAAI,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,GAAG,GAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC9D,IAAI,UAAU,EAAE,CAAC;YAChB,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAC,CAAC,GAAG,EAAC,EAAE;gBAC1C,IAAA,yBAAc,EAAC,GAAG,EAAC,IAAI,CAAC,CAAC;gBACzB,IAAI,CAAC,KAAK,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
|
||||
8
node_modules/tom-select/dist/cjs/plugins/dropdown_header/types.d.ts
generated
vendored
Normal file
8
node_modules/tom-select/dist/cjs/plugins/dropdown_header/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export type DHOptions = {
|
||||
title?: string;
|
||||
headerClass?: string;
|
||||
titleRowClass?: string;
|
||||
labelClass?: string;
|
||||
closeClass?: string;
|
||||
html?: (data: DHOptions) => string;
|
||||
};
|
||||
3
node_modules/tom-select/dist/cjs/plugins/dropdown_header/types.js
generated
vendored
Normal file
3
node_modules/tom-select/dist/cjs/plugins/dropdown_header/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/dropdown_header/types.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/dropdown_header/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/dropdown_header/types.ts"],"names":[],"mappings":""}
|
||||
16
node_modules/tom-select/dist/cjs/plugins/dropdown_input/plugin.d.ts
generated
vendored
Normal file
16
node_modules/tom-select/dist/cjs/plugins/dropdown_input/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Plugin: "dropdown_input" (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';
|
||||
export default function (this: TomSelect): void;
|
||||
77
node_modules/tom-select/dist/cjs/plugins/dropdown_input/plugin.js
generated
vendored
Normal file
77
node_modules/tom-select/dist/cjs/plugins/dropdown_input/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "dropdown_input" (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 constants = require("../../constants.js");
|
||||
const vanilla_ts_1 = require("../../vanilla.js");
|
||||
const utils_ts_1 = require("../../utils.js");
|
||||
function default_1() {
|
||||
const self = this;
|
||||
self.settings.shouldOpen = true; // make sure the input is shown even if there are no options to display in the dropdown
|
||||
self.hook('before', 'setup', () => {
|
||||
self.focus_node = self.control;
|
||||
(0, vanilla_ts_1.addClasses)(self.control_input, 'dropdown-input');
|
||||
const div = (0, vanilla_ts_1.getDom)('<div class="dropdown-input-wrap">');
|
||||
div.append(self.control_input);
|
||||
self.dropdown.insertBefore(div, self.dropdown.firstChild);
|
||||
// set a placeholder in the select control
|
||||
const placeholder = (0, vanilla_ts_1.getDom)('<input class="items-placeholder" tabindex="-1" />');
|
||||
placeholder.placeholder = self.settings.placeholder || '';
|
||||
self.control.append(placeholder);
|
||||
});
|
||||
self.on('initialize', () => {
|
||||
// set tabIndex on control to -1, otherwise [shift+tab] will put focus right back on control_input
|
||||
self.control_input.addEventListener('keydown', (evt) => {
|
||||
//addEvent(self.control_input,'keydown' as const,(evt:KeyboardEvent) =>{
|
||||
switch (evt.keyCode) {
|
||||
case constants.KEY_ESC:
|
||||
if (self.isOpen) {
|
||||
(0, utils_ts_1.preventDefault)(evt, true);
|
||||
self.close();
|
||||
}
|
||||
self.clearActiveItems();
|
||||
return;
|
||||
case constants.KEY_TAB:
|
||||
self.focus_node.tabIndex = -1;
|
||||
break;
|
||||
}
|
||||
return self.onKeyDown.call(self, evt);
|
||||
});
|
||||
self.on('blur', () => {
|
||||
self.focus_node.tabIndex = self.isDisabled ? -1 : self.tabIndex;
|
||||
});
|
||||
// give the control_input focus when the dropdown is open
|
||||
self.on('dropdown_open', () => {
|
||||
self.control_input.focus();
|
||||
});
|
||||
// prevent onBlur from closing when focus is on the control_input
|
||||
const orig_onBlur = self.onBlur;
|
||||
self.hook('instead', 'onBlur', (evt) => {
|
||||
if (evt && evt.relatedTarget == self.control_input)
|
||||
return;
|
||||
return orig_onBlur.call(self);
|
||||
});
|
||||
(0, utils_ts_1.addEvent)(self.control_input, 'blur', () => self.onBlur());
|
||||
// return focus to control to allow further keyboard input
|
||||
self.hook('before', 'close', () => {
|
||||
if (!self.isOpen)
|
||||
return;
|
||||
self.focus_node.focus({ preventScroll: true });
|
||||
});
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/dropdown_input/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/dropdown_input/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/dropdown_input/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAQH,4BAsEC;AA3ED,gDAAgD;AAChD,iDAAsD;AACtD,6CAA0D;AAG1D;IACC,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,IAAI,CAAC,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,uFAAuF;IAExH,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAC,OAAO,EAAC,GAAE,EAAE;QAC9B,IAAI,CAAC,UAAU,GAAI,IAAI,CAAC,OAAO,CAAC;QAEhC,IAAA,uBAAU,EAAE,IAAI,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;QAEjD,MAAM,GAAG,GAAG,IAAA,mBAAM,EAAC,mCAAmC,CAAC,CAAC;QACzD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAE1D,0CAA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AAC,CAAC,CAAC;QAEH,iEAAiE;QACjE,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,QAAQ,EAAC,CAAC,GAAe,EAAC,EAAE;YAC/C,IAAI,GAAG,IAAI,GAAG,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa;gBAAG,OAAO;YAC5D,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,IAAA,mBAAQ,EAAC,IAAI,CAAC,aAAa,EAAC,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAE,CAAC;QAE1D,0DAA0D;QAC1D,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAC,OAAO,EAAC,GAAG,EAAE;YAE/B,IAAI,CAAC,IAAI,CAAC,MAAM;gBAAG,OAAO;YAC1B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAC,aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IAEJ,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
|
||||
15
node_modules/tom-select/dist/cjs/plugins/input_autogrow/plugin.d.ts
generated
vendored
Normal file
15
node_modules/tom-select/dist/cjs/plugins/input_autogrow/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Plugin: "input_autogrow" (Tom Select)
|
||||
*
|
||||
* 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';
|
||||
export default function (this: TomSelect): void;
|
||||
47
node_modules/tom-select/dist/cjs/plugins/input_autogrow/plugin.js
generated
vendored
Normal file
47
node_modules/tom-select/dist/cjs/plugins/input_autogrow/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "input_autogrow" (Tom Select)
|
||||
*
|
||||
* 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 utils_ts_1 = require("../../utils.js");
|
||||
function default_1() {
|
||||
var self = this;
|
||||
self.on('initialize', () => {
|
||||
var test_input = document.createElement('span');
|
||||
var control = self.control_input;
|
||||
test_input.style.cssText = 'position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ';
|
||||
self.wrapper.appendChild(test_input);
|
||||
var transfer_styles = ['letterSpacing', 'fontSize', 'fontFamily', 'fontWeight', 'textTransform'];
|
||||
for (const style_name of transfer_styles) {
|
||||
// @ts-ignore TS7015 https://stackoverflow.com/a/50506154/697576
|
||||
test_input.style[style_name] = control.style[style_name];
|
||||
}
|
||||
/**
|
||||
* Set the control width
|
||||
*
|
||||
*/
|
||||
var resize = () => {
|
||||
test_input.textContent = control.value;
|
||||
control.style.width = test_input.clientWidth + 'px';
|
||||
};
|
||||
resize();
|
||||
self.on('update item_add item_remove', resize);
|
||||
(0, utils_ts_1.addEvent)(control, 'input', resize);
|
||||
(0, utils_ts_1.addEvent)(control, 'keyup', resize);
|
||||
(0, utils_ts_1.addEvent)(control, 'blur', resize);
|
||||
(0, utils_ts_1.addEvent)(control, 'update', resize);
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/input_autogrow/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/input_autogrow/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/input_autogrow/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAKH,4BAsCC;AAxCD,6CAA0C;AAE1C;IACC,IAAI,IAAI,GAAO,IAAI,CAAC;IAEpB,IAAI,CAAC,EAAE,CAAC,YAAY,EAAC,GAAE,EAAE;QAGxB,IAAI,UAAU,GAAM,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACnD,IAAI,OAAO,GAAO,IAAI,CAAC,aAAa,CAAC;QACrC,UAAU,CAAC,KAAK,CAAC,OAAO,GAAG,0FAA0F,CAAC;QAEtH,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAGrC,IAAI,eAAe,GAAK,CAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,CAAE,CAAC;QAErG,KAAK,MAAM,UAAU,IAAI,eAAe,EAAE,CAAC;YAC1C,gEAAgE;YAChE,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1D,CAAC;QAGD;;;WAGG;QACH,IAAI,MAAM,GAAG,GAAE,EAAE;YAChB,UAAU,CAAC,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC;YACvC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAI,UAAU,CAAC,WAAW,GAAC,IAAI,CAAC;QACpD,CAAC,CAAC;QAEF,MAAM,EAAE,CAAC;QACT,IAAI,CAAC,EAAE,CAAC,6BAA6B,EAAC,MAAM,CAAC,CAAC;QAC9C,IAAA,mBAAQ,EAAC,OAAO,EAAC,OAAO,EAAE,MAAM,CAAE,CAAC;QACnC,IAAA,mBAAQ,EAAC,OAAO,EAAC,OAAO,EAAE,MAAM,CAAE,CAAC;QACnC,IAAA,mBAAQ,EAAC,OAAO,EAAC,MAAM,EAAE,MAAM,CAAE,CAAC;QAClC,IAAA,mBAAQ,EAAC,OAAO,EAAC,QAAQ,EAAE,MAAM,CAAE,CAAC;IACrC,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
|
||||
15
node_modules/tom-select/dist/cjs/plugins/no_active_items/plugin.d.ts
generated
vendored
Normal file
15
node_modules/tom-select/dist/cjs/plugins/no_active_items/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Plugin: "no_active_items" (Tom Select)
|
||||
*
|
||||
* 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';
|
||||
export default function (this: TomSelect): void;
|
||||
22
node_modules/tom-select/dist/cjs/plugins/no_active_items/plugin.js
generated
vendored
Normal file
22
node_modules/tom-select/dist/cjs/plugins/no_active_items/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "no_active_items" (Tom Select)
|
||||
*
|
||||
* 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;
|
||||
function default_1() {
|
||||
this.hook('instead', 'setActiveItem', () => { });
|
||||
this.hook('instead', 'selectAll', () => { });
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/no_active_items/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/no_active_items/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/no_active_items/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAIH,4BAGC;AAHD;IACC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,eAAe,EAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAC9C,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,WAAW,EAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AAC3C,CAAC;AAAA,CAAC"}
|
||||
15
node_modules/tom-select/dist/cjs/plugins/no_backspace_delete/plugin.d.ts
generated
vendored
Normal file
15
node_modules/tom-select/dist/cjs/plugins/no_backspace_delete/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Plugin: "input_autogrow" (Tom Select)
|
||||
*
|
||||
* 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';
|
||||
export default function (this: TomSelect): void;
|
||||
28
node_modules/tom-select/dist/cjs/plugins/no_backspace_delete/plugin.js
generated
vendored
Normal file
28
node_modules/tom-select/dist/cjs/plugins/no_backspace_delete/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "input_autogrow" (Tom Select)
|
||||
*
|
||||
* 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;
|
||||
function default_1() {
|
||||
var self = this;
|
||||
var orig_deleteSelection = self.deleteSelection;
|
||||
this.hook('instead', 'deleteSelection', (evt) => {
|
||||
if (self.activeItems.length) {
|
||||
return orig_deleteSelection.call(self, evt);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/no_backspace_delete/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/no_backspace_delete/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/no_backspace_delete/plugin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;AAIH,4BAaC;AAbD;IACC,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC;IAEhD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,iBAAiB,EAAC,CAAC,GAAiB,EAAE,EAAE;QAE3D,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;YAC7B,OAAO,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,KAAK,CAAC;IACd,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
|
||||
16
node_modules/tom-select/dist/cjs/plugins/optgroup_columns/plugin.d.ts
generated
vendored
Normal file
16
node_modules/tom-select/dist/cjs/plugins/optgroup_columns/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Plugin: "optgroup_columns" (Tom Select.js)
|
||||
* 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';
|
||||
export default function (this: TomSelect): void;
|
||||
51
node_modules/tom-select/dist/cjs/plugins/optgroup_columns/plugin.js
generated
vendored
Normal file
51
node_modules/tom-select/dist/cjs/plugins/optgroup_columns/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "optgroup_columns" (Tom Select.js)
|
||||
* 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 constants = require("../../constants.js");
|
||||
const vanilla_ts_1 = require("../../vanilla.js");
|
||||
function default_1() {
|
||||
var self = this;
|
||||
var orig_keydown = self.onKeyDown;
|
||||
self.hook('instead', 'onKeyDown', (evt) => {
|
||||
var index, option, options, optgroup;
|
||||
if (!self.isOpen || !(evt.keyCode === constants.KEY_LEFT || evt.keyCode === constants.KEY_RIGHT)) {
|
||||
return orig_keydown.call(self, evt);
|
||||
}
|
||||
self.ignoreHover = true;
|
||||
optgroup = (0, vanilla_ts_1.parentMatch)(self.activeOption, '[data-group]');
|
||||
index = (0, vanilla_ts_1.nodeIndex)(self.activeOption, '[data-selectable]');
|
||||
if (!optgroup) {
|
||||
return;
|
||||
}
|
||||
if (evt.keyCode === constants.KEY_LEFT) {
|
||||
optgroup = optgroup.previousSibling;
|
||||
}
|
||||
else {
|
||||
optgroup = optgroup.nextSibling;
|
||||
}
|
||||
if (!optgroup) {
|
||||
return;
|
||||
}
|
||||
options = optgroup.querySelectorAll('[data-selectable]');
|
||||
option = options[Math.min(options.length - 1, index)];
|
||||
if (option) {
|
||||
self.setActiveOption(option);
|
||||
}
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/optgroup_columns/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/optgroup_columns/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources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AAC,MAAM,GAAG,CAAC,EAAE,KAAK,CAAC,CAAiB,CAAC;QAE1E,IAAI,MAAM,EAAE,CAAC;YACZ,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;IAEF,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
|
||||
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
vend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,EAAE;gBACzC,IAAA,yBAAc,EAAC,GAAG,EAAC,IAAI,CAAC,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":""}
|
||||
21
node_modules/tom-select/dist/cjs/plugins/restore_on_backspace/plugin.d.ts
generated
vendored
Normal file
21
node_modules/tom-select/dist/cjs/plugins/restore_on_backspace/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Plugin: "restore_on_backspace" (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 { TomOption } from '../../types/index.ts';
|
||||
type TPluginOptions = {
|
||||
text?: (option: TomOption) => string;
|
||||
};
|
||||
export default function (this: TomSelect, userOptions: TPluginOptions): void;
|
||||
export {};
|
||||
24
node_modules/tom-select/dist/cjs/plugins/restore_on_backspace/plugin.js
generated
vendored
Normal file
24
node_modules/tom-select/dist/cjs/plugins/restore_on_backspace/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = default_1;
|
||||
function default_1(userOptions) {
|
||||
const self = this;
|
||||
const options = Object.assign({
|
||||
text: (option) => {
|
||||
return option[self.settings.labelField];
|
||||
}
|
||||
}, userOptions);
|
||||
self.on('item_remove', function (value) {
|
||||
if (!self.isFocused) {
|
||||
return;
|
||||
}
|
||||
if (self.control_input.value.trim() === '') {
|
||||
var option = self.options[value];
|
||||
if (option) {
|
||||
self.setTextboxValue(options.text.call(self, option));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/restore_on_backspace/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/restore_on_backspace/plugin.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../../src/plugins/restore_on_backspace/plugin.ts"],"names":[],"mappings":";;AAqBA,4BAsBC;AAtBD,mBAAwC,WAA0B;IACjE,MAAM,IAAI,GAAG,IAAI,CAAC;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,IAAI,EAAE,CAAC,MAAgB,EAAE,EAAE;YAC1B,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QACzC,CAAC;KACD,EAAC,WAAW,CAAC,CAAC;IAEf,IAAI,CAAC,EAAE,CAAC,aAAa,EAAC,UAAS,KAAY;QAC1C,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACrB,OAAO;QACR,CAAC;QAED,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAC5C,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACjC,IAAI,MAAM,EAAE,CAAC;gBACZ,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;YACvD,CAAC;QACF,CAAC;IACF,CAAC,CAAC,CAAC;AAEJ,CAAC;AAAA,CAAC"}
|
||||
16
node_modules/tom-select/dist/cjs/plugins/virtual_scroll/plugin.d.ts
generated
vendored
Normal file
16
node_modules/tom-select/dist/cjs/plugins/virtual_scroll/plugin.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Plugin: "restore_on_backspace" (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';
|
||||
export default function (this: TomSelect): void;
|
||||
170
node_modules/tom-select/dist/cjs/plugins/virtual_scroll/plugin.js
generated
vendored
Normal file
170
node_modules/tom-select/dist/cjs/plugins/virtual_scroll/plugin.js
generated
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
"use strict";
|
||||
/**
|
||||
* Plugin: "restore_on_backspace" (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");
|
||||
function default_1() {
|
||||
const self = this;
|
||||
const orig_canLoad = self.canLoad;
|
||||
const orig_clearActiveOption = self.clearActiveOption;
|
||||
const orig_loadCallback = self.loadCallback;
|
||||
var pagination = {};
|
||||
var dropdown_content;
|
||||
var loading_more = false;
|
||||
var load_more_opt;
|
||||
var default_values = [];
|
||||
if (!self.settings.shouldLoadMore) {
|
||||
// return true if additional results should be loaded
|
||||
self.settings.shouldLoadMore = () => {
|
||||
const scroll_percent = dropdown_content.clientHeight / (dropdown_content.scrollHeight - dropdown_content.scrollTop);
|
||||
if (scroll_percent > 0.9) {
|
||||
return true;
|
||||
}
|
||||
if (self.activeOption) {
|
||||
var selectable = self.selectable();
|
||||
var index = Array.from(selectable).indexOf(self.activeOption);
|
||||
if (index >= (selectable.length - 2)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
if (!self.settings.firstUrl) {
|
||||
throw 'virtual_scroll plugin requires a firstUrl() method';
|
||||
}
|
||||
// in order for virtual scrolling to work,
|
||||
// options need to be ordered the same way they're returned from the remote data source
|
||||
self.settings.sortField = [{ field: '$order' }, { field: '$score' }];
|
||||
// can we load more results for given query?
|
||||
const canLoadMore = (query) => {
|
||||
if (typeof self.settings.maxOptions === 'number' && dropdown_content.children.length >= self.settings.maxOptions) {
|
||||
return false;
|
||||
}
|
||||
if ((query in pagination) && pagination[query]) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
const clearFilter = (option, value) => {
|
||||
if (self.items.indexOf(value) >= 0 || default_values.indexOf(value) >= 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
// set the next url that will be
|
||||
self.setNextUrl = (value, next_url) => {
|
||||
pagination[value] = next_url;
|
||||
};
|
||||
// getUrl() to be used in settings.load()
|
||||
self.getUrl = (query) => {
|
||||
if (query in pagination) {
|
||||
const next_url = pagination[query];
|
||||
pagination[query] = false;
|
||||
return next_url;
|
||||
}
|
||||
// if the user goes back to a previous query
|
||||
// we need to load the first page again
|
||||
self.clearPagination();
|
||||
return self.settings.firstUrl.call(self, query);
|
||||
};
|
||||
// clear pagination
|
||||
self.clearPagination = () => {
|
||||
pagination = {};
|
||||
};
|
||||
// don't clear the active option (and cause unwanted dropdown scroll)
|
||||
// while loading more results
|
||||
self.hook('instead', 'clearActiveOption', () => {
|
||||
if (loading_more) {
|
||||
return;
|
||||
}
|
||||
return orig_clearActiveOption.call(self);
|
||||
});
|
||||
// override the canLoad method
|
||||
self.hook('instead', 'canLoad', (query) => {
|
||||
// first time the query has been seen
|
||||
if (!(query in pagination)) {
|
||||
return orig_canLoad.call(self, query);
|
||||
}
|
||||
return canLoadMore(query);
|
||||
});
|
||||
// wrap the load
|
||||
self.hook('instead', 'loadCallback', (options, optgroups) => {
|
||||
if (!loading_more) {
|
||||
self.clearOptions(clearFilter);
|
||||
}
|
||||
else if (load_more_opt) {
|
||||
const first_option = options[0];
|
||||
if (first_option !== undefined) {
|
||||
load_more_opt.dataset.value = first_option[self.settings.valueField];
|
||||
}
|
||||
}
|
||||
orig_loadCallback.call(self, options, optgroups);
|
||||
loading_more = false;
|
||||
});
|
||||
// add templates to dropdown
|
||||
// loading_more if we have another url in the queue
|
||||
// no_more_results if we don't have another url in the queue
|
||||
self.hook('after', 'refreshOptions', () => {
|
||||
const query = self.lastValue;
|
||||
var option;
|
||||
if (canLoadMore(query)) {
|
||||
option = self.render('loading_more', { query: query });
|
||||
if (option) {
|
||||
option.setAttribute('data-selectable', ''); // so that navigating dropdown with [down] keypresses can navigate to this node
|
||||
load_more_opt = option;
|
||||
}
|
||||
}
|
||||
else if ((query in pagination) && !dropdown_content.querySelector('.no-results')) {
|
||||
option = self.render('no_more_results', { query: query });
|
||||
}
|
||||
if (option) {
|
||||
(0, vanilla_ts_1.addClasses)(option, self.settings.optionClass);
|
||||
dropdown_content.append(option);
|
||||
}
|
||||
});
|
||||
// add scroll listener and default templates
|
||||
self.on('initialize', () => {
|
||||
default_values = Object.keys(self.options);
|
||||
dropdown_content = self.dropdown_content;
|
||||
// default templates
|
||||
self.settings.render = Object.assign({}, {
|
||||
loading_more: () => {
|
||||
return `<div class="loading-more-results">Loading more results ... </div>`;
|
||||
},
|
||||
no_more_results: () => {
|
||||
return `<div class="no-more-results">No more results</div>`;
|
||||
}
|
||||
}, self.settings.render);
|
||||
// watch dropdown content scroll position
|
||||
dropdown_content.addEventListener('scroll', () => {
|
||||
if (!self.settings.shouldLoadMore.call(self)) {
|
||||
return;
|
||||
}
|
||||
// !important: this will get checked again in load() but we still need to check here otherwise loading_more will be set to true
|
||||
if (!canLoadMore(self.lastValue)) {
|
||||
return;
|
||||
}
|
||||
// don't call load() too much
|
||||
if (loading_more)
|
||||
return;
|
||||
loading_more = true;
|
||||
self.load.call(self, self.lastValue);
|
||||
});
|
||||
});
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=plugin.js.map
|
||||
1
node_modules/tom-select/dist/cjs/plugins/virtual_scroll/plugin.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/plugins/virtual_scroll/plugin.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/tom-select/dist/cjs/tom-select.complete.d.ts
generated
vendored
Normal file
2
node_modules/tom-select/dist/cjs/tom-select.complete.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import TomSelect from './tom-select.ts';
|
||||
export default TomSelect;
|
||||
33
node_modules/tom-select/dist/cjs/tom-select.complete.js
generated
vendored
Normal file
33
node_modules/tom-select/dist/cjs/tom-select.complete.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tom_select_ts_1 = require("./tom-select.js");
|
||||
const plugin_ts_1 = require("./plugins/change_listener/plugin.js");
|
||||
const plugin_ts_2 = require("./plugins/checkbox_options/plugin.js");
|
||||
const plugin_ts_3 = require("./plugins/clear_button/plugin.js");
|
||||
const plugin_ts_4 = require("./plugins/drag_drop/plugin.js");
|
||||
const plugin_ts_5 = require("./plugins/dropdown_header/plugin.js");
|
||||
const plugin_ts_6 = require("./plugins/caret_position/plugin.js");
|
||||
const plugin_ts_7 = require("./plugins/dropdown_input/plugin.js");
|
||||
const plugin_ts_8 = require("./plugins/input_autogrow/plugin.js");
|
||||
const plugin_ts_9 = require("./plugins/no_backspace_delete/plugin.js");
|
||||
const plugin_ts_10 = require("./plugins/no_active_items/plugin.js");
|
||||
const plugin_ts_11 = require("./plugins/optgroup_columns/plugin.js");
|
||||
const plugin_ts_12 = require("./plugins/remove_button/plugin.js");
|
||||
const plugin_ts_13 = require("./plugins/restore_on_backspace/plugin.js");
|
||||
const plugin_ts_14 = require("./plugins/virtual_scroll/plugin.js");
|
||||
tom_select_ts_1.default.define('change_listener', plugin_ts_1.default);
|
||||
tom_select_ts_1.default.define('checkbox_options', plugin_ts_2.default);
|
||||
tom_select_ts_1.default.define('clear_button', plugin_ts_3.default);
|
||||
tom_select_ts_1.default.define('drag_drop', plugin_ts_4.default);
|
||||
tom_select_ts_1.default.define('dropdown_header', plugin_ts_5.default);
|
||||
tom_select_ts_1.default.define('caret_position', plugin_ts_6.default);
|
||||
tom_select_ts_1.default.define('dropdown_input', plugin_ts_7.default);
|
||||
tom_select_ts_1.default.define('input_autogrow', plugin_ts_8.default);
|
||||
tom_select_ts_1.default.define('no_backspace_delete', plugin_ts_9.default);
|
||||
tom_select_ts_1.default.define('no_active_items', plugin_ts_10.default);
|
||||
tom_select_ts_1.default.define('optgroup_columns', plugin_ts_11.default);
|
||||
tom_select_ts_1.default.define('remove_button', plugin_ts_12.default);
|
||||
tom_select_ts_1.default.define('restore_on_backspace', plugin_ts_13.default);
|
||||
tom_select_ts_1.default.define('virtual_scroll', plugin_ts_14.default);
|
||||
exports.default = tom_select_ts_1.default;
|
||||
//# sourceMappingURL=tom-select.complete.js.map
|
||||
1
node_modules/tom-select/dist/cjs/tom-select.complete.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/tom-select.complete.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tom-select.complete.js","sourceRoot":"","sources":["../../src/tom-select.complete.ts"],"names":[],"mappings":";;AAAA,mDAAwC;AAExC,mEAAkE;AAClE,oEAAoE;AACpE,gEAA4D;AAC5D,6DAAsD;AACtD,mEAAkE;AAClE,kEAAgE;AAChE,kEAAgE;AAChE,kEAAgE;AAChE,uEAA0E;AAC1E,oEAAkE;AAClE,qEAAoE;AACpE,kEAA8D;AAC9D,yEAA4E;AAC5E,mEAAgE;AAEhE,uBAAS,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAe,CAAC,CAAC;AACrD,uBAAS,CAAC,MAAM,CAAC,kBAAkB,EAAE,mBAAgB,CAAC,CAAC;AACvD,uBAAS,CAAC,MAAM,CAAC,cAAc,EAAE,mBAAY,CAAC,CAAC;AAC/C,uBAAS,CAAC,MAAM,CAAC,WAAW,EAAE,mBAAS,CAAC,CAAC;AACzC,uBAAS,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAe,CAAC,CAAC;AACrD,uBAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,mBAAc,CAAC,CAAC;AACnD,uBAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,mBAAc,CAAC,CAAC;AACnD,uBAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,mBAAc,CAAC,CAAC;AACnD,uBAAS,CAAC,MAAM,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;AAC7D,uBAAS,CAAC,MAAM,CAAC,iBAAiB,EAAE,oBAAe,CAAC,CAAC;AACrD,uBAAS,CAAC,MAAM,CAAC,kBAAkB,EAAE,oBAAgB,CAAC,CAAC;AACvD,uBAAS,CAAC,MAAM,CAAC,eAAe,EAAE,oBAAa,CAAC,CAAC;AACjD,uBAAS,CAAC,MAAM,CAAC,sBAAsB,EAAE,oBAAoB,CAAC,CAAC;AAC/D,uBAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,oBAAc,CAAC,CAAC;AAEnD,kBAAe,uBAAS,CAAC"}
|
||||
594
node_modules/tom-select/dist/cjs/tom-select.d.ts
generated
vendored
Normal file
594
node_modules/tom-select/dist/cjs/tom-select.d.ts
generated
vendored
Normal file
@@ -0,0 +1,594 @@
|
||||
import { Sifter } from '@orchidjs/sifter';
|
||||
import { TomInput, TomArgObject, TomOption, TomOptions, TomCreateCallback, TomItem, TomSettings, TomTemplateNames, TomClearFilter, RecursivePartial } from './types/index.ts';
|
||||
declare const TomSelect_base: {
|
||||
new (): {
|
||||
[x: string]: any;
|
||||
plugins: {
|
||||
names: string[];
|
||||
settings: {
|
||||
[key: string]: any;
|
||||
};
|
||||
requested: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
loaded: {
|
||||
[key: string]: any;
|
||||
};
|
||||
};
|
||||
initializePlugins(plugins: string[] | import("./contrib/microplugin.ts").TPluginItem[] | import("./contrib/microplugin.ts").TPluginHash): void;
|
||||
loadPlugin(name: string): void;
|
||||
require(name: string): any;
|
||||
};
|
||||
[x: string]: any;
|
||||
define(name: string, fn: (this: any, settings: {
|
||||
[key: string]: any;
|
||||
}) => any): void;
|
||||
};
|
||||
export default class TomSelect extends TomSelect_base {
|
||||
control_input: HTMLInputElement;
|
||||
wrapper: HTMLElement;
|
||||
dropdown: HTMLElement;
|
||||
control: HTMLElement;
|
||||
dropdown_content: HTMLElement;
|
||||
focus_node: HTMLElement;
|
||||
order: number;
|
||||
settings: TomSettings;
|
||||
input: TomInput;
|
||||
tabIndex: number;
|
||||
is_select_tag: boolean;
|
||||
rtl: boolean;
|
||||
private inputId;
|
||||
private _destroy;
|
||||
sifter: Sifter;
|
||||
isOpen: boolean;
|
||||
isDisabled: boolean;
|
||||
isReadOnly: boolean;
|
||||
isRequired: boolean;
|
||||
isInvalid: boolean;
|
||||
isValid: boolean;
|
||||
isLocked: boolean;
|
||||
isFocused: boolean;
|
||||
isInputHidden: boolean;
|
||||
isSetup: boolean;
|
||||
ignoreFocus: boolean;
|
||||
ignoreHover: boolean;
|
||||
hasOptions: boolean;
|
||||
currentResults?: ReturnType<Sifter['search']>;
|
||||
lastValue: string;
|
||||
caretPos: number;
|
||||
loading: number;
|
||||
loadedSearches: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
activeOption: null | HTMLElement;
|
||||
activeItems: TomItem[];
|
||||
optgroups: TomOptions;
|
||||
options: TomOptions;
|
||||
userOptions: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
items: string[];
|
||||
private refreshTimeout;
|
||||
constructor(input_arg: string | TomInput, user_settings: RecursivePartial<TomSettings>);
|
||||
/**
|
||||
* set up event bindings.
|
||||
*
|
||||
*/
|
||||
setup(): void;
|
||||
/**
|
||||
* Register options and optgroups
|
||||
*
|
||||
*/
|
||||
setupOptions(options?: TomOption[], optgroups?: TomOption[]): void;
|
||||
/**
|
||||
* Sets up default rendering functions.
|
||||
*/
|
||||
setupTemplates(): void;
|
||||
/**
|
||||
* Maps fired events to callbacks provided
|
||||
* in the settings used when creating the control.
|
||||
*/
|
||||
setupCallbacks(): void;
|
||||
/**
|
||||
* Sync the Tom Select instance with the original input or select
|
||||
*
|
||||
*/
|
||||
sync(get_settings?: boolean): void;
|
||||
/**
|
||||
* Triggered when the main control element
|
||||
* has a click event.
|
||||
*
|
||||
*/
|
||||
onClick(): void;
|
||||
/**
|
||||
* @deprecated v1.7
|
||||
*
|
||||
*/
|
||||
onMouseDown(): void;
|
||||
/**
|
||||
* Triggered when the value of the control has been changed.
|
||||
* This should propagate the event to the original DOM
|
||||
* input / select element.
|
||||
*/
|
||||
onChange(): void;
|
||||
/**
|
||||
* Triggered on <input> paste.
|
||||
*
|
||||
*/
|
||||
onPaste(e: MouseEvent | KeyboardEvent): void;
|
||||
/**
|
||||
* Triggered on <input> keypress.
|
||||
*
|
||||
*/
|
||||
onKeyPress(e: KeyboardEvent): void;
|
||||
/**
|
||||
* Triggered on <input> keydown.
|
||||
*
|
||||
*/
|
||||
onKeyDown(e: KeyboardEvent): void;
|
||||
/**
|
||||
* Triggered on <input> keyup.
|
||||
*
|
||||
*/
|
||||
onInput(e: MouseEvent | KeyboardEvent): void;
|
||||
_onInput(): void;
|
||||
/**
|
||||
* Triggered when the user rolls over
|
||||
* an option in the autocomplete dropdown menu.
|
||||
*
|
||||
*/
|
||||
onOptionHover(evt: MouseEvent | KeyboardEvent, option: HTMLElement): void;
|
||||
/**
|
||||
* Triggered on <input> focus.
|
||||
*
|
||||
*/
|
||||
onFocus(e?: MouseEvent | KeyboardEvent): void;
|
||||
/**
|
||||
* Triggered on <input> blur.
|
||||
*
|
||||
*/
|
||||
onBlur(e?: FocusEvent): void;
|
||||
/**
|
||||
* Triggered when the user clicks on an option
|
||||
* in the autocomplete dropdown menu.
|
||||
*
|
||||
*/
|
||||
onOptionSelect(evt: MouseEvent | KeyboardEvent, option: HTMLElement): void;
|
||||
/**
|
||||
* Return true if the given option can be selected
|
||||
*
|
||||
*/
|
||||
canSelect(option: HTMLElement | null): boolean;
|
||||
/**
|
||||
* Triggered when the user clicks on an item
|
||||
* that has been selected.
|
||||
*
|
||||
*/
|
||||
onItemSelect(evt?: MouseEvent, item?: TomItem): boolean;
|
||||
/**
|
||||
* Determines whether or not to invoke
|
||||
* the user-provided option provider / loader
|
||||
*
|
||||
* Note, there is a subtle difference between
|
||||
* this.canLoad() and this.settings.shouldLoad();
|
||||
*
|
||||
* - settings.shouldLoad() is a user-input validator.
|
||||
* When false is returned, the not_loading template
|
||||
* will be added to the dropdown
|
||||
*
|
||||
* - canLoad() is lower level validator that checks
|
||||
* the Tom Select instance. There is no inherent user
|
||||
* feedback when canLoad returns false
|
||||
*
|
||||
*/
|
||||
canLoad(value: string): boolean;
|
||||
/**
|
||||
* Invokes the user-provided option provider / loader.
|
||||
*
|
||||
*/
|
||||
load(value: string): void;
|
||||
/**
|
||||
* Invoked by the user-provided option provider
|
||||
*
|
||||
*/
|
||||
loadCallback(options: TomOption[], optgroups: TomOption[]): void;
|
||||
preload(): void;
|
||||
/**
|
||||
* Sets the input field of the control to the specified value.
|
||||
*
|
||||
*/
|
||||
setTextboxValue(value?: string): void;
|
||||
/**
|
||||
* Returns the value of the control. If multiple items
|
||||
* can be selected (e.g. <select multiple>), this returns
|
||||
* an array. If only one item can be selected, this
|
||||
* returns a string.
|
||||
*
|
||||
*/
|
||||
getValue(): string | string[];
|
||||
/**
|
||||
* Resets the selected items to the given value.
|
||||
*
|
||||
*/
|
||||
setValue(value: string | string[], silent?: boolean): void;
|
||||
/**
|
||||
* Resets the number of max items to the given value
|
||||
*
|
||||
*/
|
||||
setMaxItems(value: null | number): void;
|
||||
/**
|
||||
* Sets the selected item.
|
||||
*
|
||||
*/
|
||||
setActiveItem(item?: TomItem, e?: MouseEvent | KeyboardEvent): void;
|
||||
/**
|
||||
* Set the active and last-active classes
|
||||
*
|
||||
*/
|
||||
setActiveItemClass(item: TomItem): void;
|
||||
/**
|
||||
* Remove active item
|
||||
*
|
||||
*/
|
||||
removeActiveItem(item: TomItem): void;
|
||||
/**
|
||||
* Clears all the active items
|
||||
*
|
||||
*/
|
||||
clearActiveItems(): void;
|
||||
/**
|
||||
* Sets the selected item in the dropdown menu
|
||||
* of available options.
|
||||
*
|
||||
*/
|
||||
setActiveOption(option: null | HTMLElement, scroll?: boolean): void;
|
||||
/**
|
||||
* Sets the dropdown_content scrollTop to display the option
|
||||
*
|
||||
*/
|
||||
scrollToOption(option: null | HTMLElement, behavior?: string): void;
|
||||
/**
|
||||
* Scroll the dropdown to the given position
|
||||
*
|
||||
*/
|
||||
scroll(scrollTop: number, behavior?: string): void;
|
||||
/**
|
||||
* Clears the active option
|
||||
*
|
||||
*/
|
||||
clearActiveOption(): void;
|
||||
/**
|
||||
* Selects all items (CTRL + A).
|
||||
*/
|
||||
selectAll(): void;
|
||||
/**
|
||||
* Determines if the control_input should be in a hidden or visible state
|
||||
*
|
||||
*/
|
||||
inputState(): void;
|
||||
/**
|
||||
* Get the input value
|
||||
*/
|
||||
inputValue(): string;
|
||||
/**
|
||||
* Gives the control focus.
|
||||
*/
|
||||
focus(): void;
|
||||
/**
|
||||
* Forces the control out of focus.
|
||||
*
|
||||
*/
|
||||
blur(): void;
|
||||
/**
|
||||
* Returns a function that scores an object
|
||||
* to show how good of a match it is to the
|
||||
* provided query.
|
||||
*
|
||||
* @return {function}
|
||||
*/
|
||||
getScoreFunction(query: string): (data: {}) => number;
|
||||
/**
|
||||
* Returns search options for sifter (the system
|
||||
* for scoring and sorting results).
|
||||
*
|
||||
* @see https://github.com/orchidjs/sifter.js
|
||||
* @return {object}
|
||||
*/
|
||||
getSearchOptions(): {
|
||||
fields: string[];
|
||||
conjunction: string;
|
||||
sort: string | import("@orchidjs/sifter").SortFn | import("@orchidjs/sifter").Sort[];
|
||||
nesting: boolean;
|
||||
};
|
||||
/**
|
||||
* Searches through available options and returns
|
||||
* a sorted array of matches.
|
||||
*
|
||||
*/
|
||||
search(query: string): ReturnType<Sifter['search']>;
|
||||
/**
|
||||
* Refreshes the list of available options shown
|
||||
* in the autocomplete dropdown menu.
|
||||
*
|
||||
*/
|
||||
refreshOptions(triggerDropdown?: boolean): void;
|
||||
/**
|
||||
* Return list of selectable options
|
||||
*
|
||||
*/
|
||||
selectable(): NodeList;
|
||||
/**
|
||||
* Adds an available option. If it already exists,
|
||||
* nothing will happen. Note: this does not refresh
|
||||
* the options list dropdown (use `refreshOptions`
|
||||
* for that).
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* this.addOption(data)
|
||||
*
|
||||
*/
|
||||
addOption(data: TomOption, user_created?: boolean): false | string;
|
||||
/**
|
||||
* Add multiple options
|
||||
*
|
||||
*/
|
||||
addOptions(data: TomOption[], user_created?: boolean): void;
|
||||
/**
|
||||
* @deprecated 1.7.7
|
||||
*/
|
||||
registerOption(data: TomOption): false | string;
|
||||
/**
|
||||
* Registers an option group to the pool of option groups.
|
||||
*
|
||||
* @return {boolean|string}
|
||||
*/
|
||||
registerOptionGroup(data: TomOption): string | false;
|
||||
/**
|
||||
* Registers a new optgroup for options
|
||||
* to be bucketed into.
|
||||
*
|
||||
*/
|
||||
addOptionGroup(id: string, data: TomOption): void;
|
||||
/**
|
||||
* Removes an existing option group.
|
||||
*
|
||||
*/
|
||||
removeOptionGroup(id: string): void;
|
||||
/**
|
||||
* Clears all existing option groups.
|
||||
*/
|
||||
clearOptionGroups(): void;
|
||||
/**
|
||||
* Updates an option available for selection. If
|
||||
* it is visible in the selected items or options
|
||||
* dropdown, it will be re-rendered automatically.
|
||||
*
|
||||
*/
|
||||
updateOption(value: string, data: TomOption): void;
|
||||
/**
|
||||
* Removes a single option.
|
||||
*
|
||||
*/
|
||||
removeOption(value: string, silent?: boolean): void;
|
||||
/**
|
||||
* Clears all options.
|
||||
*/
|
||||
clearOptions(filter?: TomClearFilter): void;
|
||||
/**
|
||||
* Used by clearOptions() to decide whether or not an option should be removed
|
||||
* Return true to keep an option, false to remove
|
||||
*
|
||||
*/
|
||||
clearFilter(option: TomOption, value: string): boolean;
|
||||
/**
|
||||
* Returns the dom element of the option
|
||||
* matching the given value.
|
||||
*
|
||||
*/
|
||||
getOption(value: undefined | null | boolean | string | number, create?: boolean): null | HTMLElement;
|
||||
/**
|
||||
* Returns the dom element of the next or previous dom element of the same type
|
||||
* Note: adjacent options may not be adjacent DOM elements (optgroups)
|
||||
*
|
||||
*/
|
||||
getAdjacent(option: null | HTMLElement, direction: number, type?: string): HTMLElement | null;
|
||||
/**
|
||||
* Returns the dom element of the item
|
||||
* matching the given value.
|
||||
*
|
||||
*/
|
||||
getItem(item: string | TomItem | null): null | TomItem;
|
||||
/**
|
||||
* "Selects" multiple items at once. Adds them to the list
|
||||
* at the current caret position.
|
||||
*
|
||||
*/
|
||||
addItems(values: string | string[], silent?: boolean): void;
|
||||
/**
|
||||
* "Selects" an item. Adds it to the list
|
||||
* at the current caret position.
|
||||
*
|
||||
*/
|
||||
addItem(value: string, silent?: boolean): void;
|
||||
/**
|
||||
* Removes the selected item matching
|
||||
* the provided value.
|
||||
*
|
||||
*/
|
||||
removeItem(item?: string | TomItem | null, silent?: boolean): void;
|
||||
/**
|
||||
* Invokes the `create` method provided in the
|
||||
* TomSelect options that should provide the data
|
||||
* for the new item, given the user input.
|
||||
*
|
||||
* Once this completes, it will be added
|
||||
* to the item list.
|
||||
*
|
||||
*/
|
||||
createItem(input?: null | string, callback?: TomCreateCallback): boolean;
|
||||
/**
|
||||
* Re-renders the selected item lists.
|
||||
*/
|
||||
refreshItems(): void;
|
||||
/**
|
||||
* Updates all state-dependent attributes
|
||||
* and CSS classes.
|
||||
*/
|
||||
refreshState(): void;
|
||||
/**
|
||||
* Update the `required` attribute of both input and control input.
|
||||
*
|
||||
* The `required` property needs to be activated on the control input
|
||||
* for the error to be displayed at the right place. `required` also
|
||||
* needs to be temporarily deactivated on the input since the input is
|
||||
* hidden and can't show errors.
|
||||
*/
|
||||
refreshValidityState(): void;
|
||||
/**
|
||||
* Determines whether or not more items can be added
|
||||
* to the control without exceeding the user-defined maximum.
|
||||
*
|
||||
* @returns {boolean}
|
||||
*/
|
||||
isFull(): boolean;
|
||||
/**
|
||||
* Refreshes the original <select> or <input>
|
||||
* element to reflect the current state.
|
||||
*
|
||||
*/
|
||||
updateOriginalInput(opts?: TomArgObject): void;
|
||||
/**
|
||||
* Shows the autocomplete dropdown containing
|
||||
* the available options.
|
||||
*/
|
||||
open(): void;
|
||||
/**
|
||||
* Closes the autocomplete dropdown menu.
|
||||
*/
|
||||
close(setTextboxValue?: boolean): void;
|
||||
/**
|
||||
* Calculates and applies the appropriate
|
||||
* position of the dropdown if dropdownParent = 'body'.
|
||||
* Otherwise, position is determined by css
|
||||
*/
|
||||
positionDropdown(): void;
|
||||
/**
|
||||
* Resets / clears all selected items
|
||||
* from the control.
|
||||
*
|
||||
*/
|
||||
clear(silent?: boolean): void;
|
||||
/**
|
||||
* A helper method for inserting an element
|
||||
* at the current caret position.
|
||||
*
|
||||
*/
|
||||
insertAtCaret(el: HTMLElement): void;
|
||||
/**
|
||||
* Removes the current selected item(s).
|
||||
*
|
||||
*/
|
||||
deleteSelection(e: KeyboardEvent): boolean;
|
||||
/**
|
||||
* Return true if the items should be deleted
|
||||
*/
|
||||
shouldDelete(items: TomItem[], evt: MouseEvent | KeyboardEvent): boolean;
|
||||
/**
|
||||
* Selects the previous / next item (depending on the `direction` argument).
|
||||
*
|
||||
* > 0 - right
|
||||
* < 0 - left
|
||||
*
|
||||
*/
|
||||
advanceSelection(direction: number, e?: MouseEvent | KeyboardEvent): void;
|
||||
moveCaret(direction: number): void;
|
||||
/**
|
||||
* Get the last active item
|
||||
*
|
||||
*/
|
||||
getLastActive(direction?: number): any;
|
||||
/**
|
||||
* Moves the caret to the specified index.
|
||||
*
|
||||
* The input must be moved by leaving it in place and moving the
|
||||
* siblings, due to the fact that focus cannot be restored once lost
|
||||
* on mobile webkit devices
|
||||
*
|
||||
*/
|
||||
setCaret(new_pos: number): void;
|
||||
/**
|
||||
* Return list of item dom elements
|
||||
*
|
||||
*/
|
||||
controlChildren(): TomItem[];
|
||||
/**
|
||||
* Disables user input on the control. Used while
|
||||
* items are being asynchronously created.
|
||||
*/
|
||||
lock(): void;
|
||||
/**
|
||||
* Re-enables user input on the control.
|
||||
*/
|
||||
unlock(): void;
|
||||
/**
|
||||
* Disable or enable user input on the control
|
||||
*/
|
||||
setLocked(lock?: boolean): void;
|
||||
/**
|
||||
* Disables user input on the control completely.
|
||||
* While disabled, it cannot receive focus.
|
||||
*/
|
||||
disable(): void;
|
||||
/**
|
||||
* Enables the control so that it can respond
|
||||
* to focus and user input.
|
||||
*/
|
||||
enable(): void;
|
||||
setDisabled(disabled: boolean): void;
|
||||
setReadOnly(isReadOnly: boolean): void;
|
||||
/**
|
||||
* Completely destroys the control and
|
||||
* unbinds all event listeners so that it can
|
||||
* be garbage collected.
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* A helper method for rendering "item" and
|
||||
* "option" templates, given the data.
|
||||
*
|
||||
*/
|
||||
render(templateName: TomTemplateNames, data?: any): null | HTMLElement;
|
||||
/**
|
||||
* Type guarded rendering
|
||||
*
|
||||
*/
|
||||
_render(templateName: TomTemplateNames, data?: any): HTMLElement;
|
||||
/**
|
||||
* Clears the render cache for a template. If
|
||||
* no template is given, clears all render
|
||||
* caches.
|
||||
*
|
||||
*/
|
||||
clearCache(): void;
|
||||
/**
|
||||
* Removes a value from item and option caches
|
||||
*
|
||||
*/
|
||||
uncacheValue(value: string): void;
|
||||
/**
|
||||
* Determines whether or not to display the
|
||||
* create item prompt, given a user input.
|
||||
*
|
||||
*/
|
||||
canCreate(input: string): boolean;
|
||||
/**
|
||||
* Wraps this.`method` so that `new_fn` can be invoked 'before', 'after', or 'instead' of the original method
|
||||
*
|
||||
* this.hook('instead','onKeyDown',function( arg1, arg2 ...){
|
||||
*
|
||||
* });
|
||||
*/
|
||||
hook(when: string, method: string, new_fn: any): void;
|
||||
}
|
||||
export {};
|
||||
2272
node_modules/tom-select/dist/cjs/tom-select.js
generated
vendored
Normal file
2272
node_modules/tom-select/dist/cjs/tom-select.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/tom-select/dist/cjs/tom-select.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/tom-select.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/tom-select/dist/cjs/tom-select.popular.d.ts
generated
vendored
Normal file
2
node_modules/tom-select/dist/cjs/tom-select.popular.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import TomSelect from './tom-select.ts';
|
||||
export default TomSelect;
|
||||
15
node_modules/tom-select/dist/cjs/tom-select.popular.js
generated
vendored
Normal file
15
node_modules/tom-select/dist/cjs/tom-select.popular.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tom_select_ts_1 = require("./tom-select.js");
|
||||
const plugin_ts_1 = require("./plugins/caret_position/plugin.js");
|
||||
const plugin_ts_2 = require("./plugins/dropdown_input/plugin.js");
|
||||
const plugin_ts_3 = require("./plugins/no_backspace_delete/plugin.js");
|
||||
const plugin_ts_4 = require("./plugins/remove_button/plugin.js");
|
||||
const plugin_ts_5 = require("./plugins/restore_on_backspace/plugin.js");
|
||||
tom_select_ts_1.default.define('caret_position', plugin_ts_1.default);
|
||||
tom_select_ts_1.default.define('dropdown_input', plugin_ts_2.default);
|
||||
tom_select_ts_1.default.define('no_backspace_delete', plugin_ts_3.default);
|
||||
tom_select_ts_1.default.define('remove_button', plugin_ts_4.default);
|
||||
tom_select_ts_1.default.define('restore_on_backspace', plugin_ts_5.default);
|
||||
exports.default = tom_select_ts_1.default;
|
||||
//# sourceMappingURL=tom-select.popular.js.map
|
||||
1
node_modules/tom-select/dist/cjs/tom-select.popular.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/tom-select.popular.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"tom-select.popular.js","sourceRoot":"","sources":["../../src/tom-select.popular.ts"],"names":[],"mappings":";;AAAA,mDAAwC;AAExC,kEAAgE;AAChE,kEAAgE;AAChE,uEAA0E;AAC1E,iEAA8D;AAC9D,wEAA4E;AAE5E,uBAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,mBAAc,CAAC,CAAC;AACnD,uBAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,mBAAc,CAAC,CAAC;AACnD,uBAAS,CAAC,MAAM,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;AAC7D,uBAAS,CAAC,MAAM,CAAC,eAAe,EAAE,mBAAa,CAAC,CAAC;AACjD,uBAAS,CAAC,MAAM,CAAC,sBAAsB,EAAE,mBAAoB,CAAC,CAAC;AAE/D,kBAAe,uBAAS,CAAC"}
|
||||
49
node_modules/tom-select/dist/cjs/types/core.d.ts
generated
vendored
Normal file
49
node_modules/tom-select/dist/cjs/types/core.d.ts
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import type TomSelect from '../tom-select.ts';
|
||||
import { escape_html } from '../utils.ts';
|
||||
export interface TomInput extends HTMLElement {
|
||||
tomselect?: TomSelect;
|
||||
disabled: boolean;
|
||||
readOnly?: boolean;
|
||||
required: boolean;
|
||||
value: string;
|
||||
type: string;
|
||||
validity: ValidityState;
|
||||
}
|
||||
export type TomArgObject = {
|
||||
silent?: boolean;
|
||||
};
|
||||
export type TomOption = {
|
||||
[key: string]: any;
|
||||
};
|
||||
export type TomOptions = {
|
||||
[key: string]: TomOption;
|
||||
};
|
||||
export type TomCreateFilter = (input: string) => boolean;
|
||||
export type TomCreateCallback = (data?: TomOption) => void;
|
||||
export type TomCreate = (input: string, create: TomCreateCallback) => boolean;
|
||||
export interface TomItem extends HTMLElement {
|
||||
dataset: {
|
||||
value: string;
|
||||
};
|
||||
}
|
||||
export type TomLoadCallback = TomSelect['loadCallback'];
|
||||
export type TomTemplate = (data: TomOption, escape: typeof escape_html) => string | HTMLElement;
|
||||
export type TomTemplateNull = (data: TomOption, escape: typeof escape_html) => null | string | HTMLElement;
|
||||
export type TomTemplates = {
|
||||
'dropdown': TomTemplate;
|
||||
'optgroup': TomTemplate;
|
||||
'optgroup_header': TomTemplate;
|
||||
'option': TomTemplate;
|
||||
'item': TomTemplate;
|
||||
'option_create': TomTemplate;
|
||||
'no_results': TomTemplate;
|
||||
'loading': TomTemplate;
|
||||
'not_loading': TomTemplateNull;
|
||||
'loading_more': TomTemplateNull;
|
||||
'no_more_results': TomTemplateNull;
|
||||
};
|
||||
export type TomTemplateNames = keyof TomTemplates;
|
||||
export type TomClearFilter = (option: TomOption, value: string) => boolean;
|
||||
export type RecursivePartial<T> = {
|
||||
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];
|
||||
};
|
||||
3
node_modules/tom-select/dist/cjs/types/core.js
generated
vendored
Normal file
3
node_modules/tom-select/dist/cjs/types/core.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=core.js.map
|
||||
1
node_modules/tom-select/dist/cjs/types/core.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/types/core.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/types/core.ts"],"names":[],"mappings":""}
|
||||
2
node_modules/tom-select/dist/cjs/types/index.d.ts
generated
vendored
Normal file
2
node_modules/tom-select/dist/cjs/types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './core.ts';
|
||||
export * from './settings.ts';
|
||||
19
node_modules/tom-select/dist/cjs/types/index.js
generated
vendored
Normal file
19
node_modules/tom-select/dist/cjs/types/index.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./core.js"), exports);
|
||||
__exportStar(require("./settings.js"), exports);
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/tom-select/dist/cjs/types/index.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/types/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,4CAA0B;AAC1B,gDAA8B"}
|
||||
79
node_modules/tom-select/dist/cjs/types/settings.d.ts
generated
vendored
Normal file
79
node_modules/tom-select/dist/cjs/types/settings.d.ts
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import { TomCreateFilter, TomCreate, TomLoadCallback, TomTemplates, TomOption } from './index.ts';
|
||||
import { TPluginItem, TPluginHash } from '../contrib/microplugin.ts';
|
||||
import { type Sort as SifterSort, type SortFn as SifterSortFn } from '@orchidjs/sifter';
|
||||
export type TomSettings = {
|
||||
options?: any[];
|
||||
optgroups?: any[];
|
||||
items?: string[];
|
||||
plugins: string[] | TPluginItem[] | TPluginHash;
|
||||
delimiter: string;
|
||||
splitOn: RegExp | string;
|
||||
persist: boolean;
|
||||
diacritics: boolean;
|
||||
create: boolean | TomCreate;
|
||||
createOnBlur: boolean;
|
||||
createFilter: RegExp | string | TomCreateFilter;
|
||||
highlight: boolean;
|
||||
openOnFocus: boolean;
|
||||
shouldOpen: boolean;
|
||||
maxOptions: number;
|
||||
maxItems: null | number;
|
||||
hideSelected: boolean;
|
||||
duplicates: boolean;
|
||||
addPrecedence: boolean;
|
||||
selectOnTab: boolean;
|
||||
preload: boolean | string;
|
||||
allowEmptyOption: boolean;
|
||||
closeAfterSelect: boolean;
|
||||
refreshThrottle: number;
|
||||
loadThrottle: number;
|
||||
loadingClass: string;
|
||||
dataAttr: string;
|
||||
optgroupField: string;
|
||||
valueField: string;
|
||||
labelField: string;
|
||||
disabledField: string;
|
||||
optgroupLabelField: string;
|
||||
optgroupValueField: string;
|
||||
lockOptgroupOrder: boolean;
|
||||
sortField: string | SifterSort[] | SifterSortFn;
|
||||
searchField: string[];
|
||||
searchConjunction: string;
|
||||
nesting: boolean;
|
||||
mode: string;
|
||||
wrapperClass: string;
|
||||
controlClass: string;
|
||||
dropdownClass: string;
|
||||
dropdownContentClass: string;
|
||||
itemClass: string;
|
||||
optionClass: string;
|
||||
dropdownParent: string;
|
||||
controlInput: string | HTMLInputElement;
|
||||
copyClassesToDropdown: boolean;
|
||||
placeholder: string;
|
||||
hidePlaceholder: boolean;
|
||||
load: (value: string, callback: TomLoadCallback) => void;
|
||||
score?: (query: string) => () => any;
|
||||
shouldLoad: (query: string) => boolean;
|
||||
onInitialize: () => void;
|
||||
onChange: (value: string | number) => void;
|
||||
onItemAdd: (value: string | number, item: HTMLDivElement) => void;
|
||||
onItemRemove: (value: string | number, item: HTMLDivElement) => void;
|
||||
onClear: () => void;
|
||||
onOptionAdd: (value: string | number, data: TomOption) => void;
|
||||
onOptionRemove: (value: string | number) => void;
|
||||
onOptionClear: () => void;
|
||||
onOptionGroupAdd: (value: string | number, data: TomOption) => void;
|
||||
onOptionGroupRemove: (value: string | number) => void;
|
||||
onOptionGroupClear: () => void;
|
||||
onDropdownOpen: (dropdown: HTMLDivElement) => void;
|
||||
onDropdownClose: (dropdown: HTMLDivElement) => void;
|
||||
onType: (str: string) => void;
|
||||
onLoad: (options: TomOption[], optgroups: TomOption[]) => void;
|
||||
onFocus: () => void;
|
||||
onBlur: () => void;
|
||||
onDelete: (values: string[], evt: KeyboardEvent | MouseEvent) => boolean;
|
||||
render: TomTemplates;
|
||||
firstUrl: (query: string) => any;
|
||||
shouldLoadMore: () => boolean;
|
||||
};
|
||||
3
node_modules/tom-select/dist/cjs/types/settings.js
generated
vendored
Normal file
3
node_modules/tom-select/dist/cjs/types/settings.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=settings.js.map
|
||||
1
node_modules/tom-select/dist/cjs/types/settings.js.map
generated
vendored
Normal file
1
node_modules/tom-select/dist/cjs/types/settings.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/types/settings.ts"],"names":[],"mappings":""}
|
||||
95
node_modules/tom-select/dist/cjs/utils.d.ts
generated
vendored
Normal file
95
node_modules/tom-select/dist/cjs/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
import type TomSelect from './tom-select.ts';
|
||||
import { TomLoadCallback } from './types/index.ts';
|
||||
/**
|
||||
* Converts a scalar to its best string representation
|
||||
* for hash keys and HTML attribute values.
|
||||
*
|
||||
* Transformations:
|
||||
* 'str' -> 'str'
|
||||
* null -> ''
|
||||
* undefined -> ''
|
||||
* true -> '1'
|
||||
* false -> '0'
|
||||
* 0 -> '0'
|
||||
* 1 -> '1'
|
||||
*
|
||||
*/
|
||||
export declare const hash_key: (value: undefined | null | boolean | string | number) => string | null;
|
||||
export declare const get_hash: (value: boolean | string | number) => string;
|
||||
/**
|
||||
* Escapes a string for use within HTML.
|
||||
*
|
||||
*/
|
||||
export declare const escape_html: (str: string) => string;
|
||||
/**
|
||||
* use setTimeout if timeout > 0
|
||||
*/
|
||||
export declare const timeout: (fn: () => void, timeout: number) => number | null;
|
||||
/**
|
||||
* Debounce the user provided load function
|
||||
*
|
||||
*/
|
||||
export declare const loadDebounce: (fn: (value: string, callback: TomLoadCallback) => void, delay: number) => (this: TomSelect, value: string, callback: TomLoadCallback) => void;
|
||||
/**
|
||||
* Debounce all fired events types listed in `types`
|
||||
* while executing the provided `fn`.
|
||||
*
|
||||
*/
|
||||
export declare const debounce_events: (self: TomSelect, types: string[], fn: () => void) => void;
|
||||
/**
|
||||
* Determines the current selection within a text input control.
|
||||
* Returns an object containing:
|
||||
* - start
|
||||
* - length
|
||||
*
|
||||
* Note: "selectionStart, selectionEnd ... apply only to inputs of types text, search, URL, tel and password"
|
||||
* - https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
|
||||
*/
|
||||
export declare const getSelection: (input: HTMLInputElement) => {
|
||||
start: number;
|
||||
length: number;
|
||||
};
|
||||
/**
|
||||
* Prevent default
|
||||
*
|
||||
*/
|
||||
export declare const preventDefault: (evt?: Event, stop?: boolean) => void;
|
||||
/**
|
||||
* Add event helper
|
||||
*
|
||||
*/
|
||||
export declare const addEvent: (target: EventTarget, type: string, callback: EventListenerOrEventListenerObject, options?: object) => void;
|
||||
/**
|
||||
* Return true if the requested key is down
|
||||
* Will return false if more than one control character is pressed ( when [ctrl+shift+a] != [ctrl+a] )
|
||||
* The current evt may not always set ( eg calling advanceSelection() )
|
||||
*
|
||||
*/
|
||||
export declare const isKeyDown: (key_name: keyof (KeyboardEvent | MouseEvent), evt?: KeyboardEvent | MouseEvent) => boolean;
|
||||
/**
|
||||
* Get the id of an element
|
||||
* If the id attribute is not set, set the attribute with the given id
|
||||
*
|
||||
*/
|
||||
export declare const getId: (el: Element, id: string) => string;
|
||||
/**
|
||||
* Returns a string with backslashes added before characters that need to be escaped.
|
||||
*/
|
||||
export declare const addSlashes: (str: string) => string;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export declare const append: (parent: Element | DocumentFragment, node: string | Node | null | undefined) => void;
|
||||
/**
|
||||
* Iterates over arrays and hashes.
|
||||
*
|
||||
* ```
|
||||
* iterate(this.items, function(item, id) {
|
||||
* // invoked for each item
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
export declare const iterate: (object: [] | {
|
||||
[key: string]: any;
|
||||
}, callback: (value: any, key: any) => any) => void;
|
||||
212
node_modules/tom-select/dist/cjs/utils.js
generated
vendored
Normal file
212
node_modules/tom-select/dist/cjs/utils.js
generated
vendored
Normal file
@@ -0,0 +1,212 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.iterate = exports.append = exports.addSlashes = exports.getId = exports.isKeyDown = exports.addEvent = exports.preventDefault = exports.getSelection = exports.debounce_events = exports.loadDebounce = exports.timeout = exports.escape_html = exports.get_hash = exports.hash_key = void 0;
|
||||
/**
|
||||
* Converts a scalar to its best string representation
|
||||
* for hash keys and HTML attribute values.
|
||||
*
|
||||
* Transformations:
|
||||
* 'str' -> 'str'
|
||||
* null -> ''
|
||||
* undefined -> ''
|
||||
* true -> '1'
|
||||
* false -> '0'
|
||||
* 0 -> '0'
|
||||
* 1 -> '1'
|
||||
*
|
||||
*/
|
||||
const hash_key = (value) => {
|
||||
if (typeof value === 'undefined' || value === null)
|
||||
return null;
|
||||
return (0, exports.get_hash)(value);
|
||||
};
|
||||
exports.hash_key = hash_key;
|
||||
const get_hash = (value) => {
|
||||
if (typeof value === 'boolean')
|
||||
return value ? '1' : '0';
|
||||
return value + '';
|
||||
};
|
||||
exports.get_hash = get_hash;
|
||||
/**
|
||||
* Escapes a string for use within HTML.
|
||||
*
|
||||
*/
|
||||
const escape_html = (str) => {
|
||||
return (str + '')
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"');
|
||||
};
|
||||
exports.escape_html = escape_html;
|
||||
/**
|
||||
* use setTimeout if timeout > 0
|
||||
*/
|
||||
const timeout = (fn, timeout) => {
|
||||
if (timeout > 0) {
|
||||
return window.setTimeout(fn, timeout);
|
||||
}
|
||||
fn.call(null);
|
||||
return null;
|
||||
};
|
||||
exports.timeout = timeout;
|
||||
/**
|
||||
* Debounce the user provided load function
|
||||
*
|
||||
*/
|
||||
const loadDebounce = (fn, delay) => {
|
||||
var timeout;
|
||||
return function (value, callback) {
|
||||
var self = this;
|
||||
if (timeout) {
|
||||
self.loading = Math.max(self.loading - 1, 0);
|
||||
clearTimeout(timeout);
|
||||
}
|
||||
timeout = setTimeout(function () {
|
||||
timeout = null;
|
||||
self.loadedSearches[value] = true;
|
||||
fn.call(self, value, callback);
|
||||
}, delay);
|
||||
};
|
||||
};
|
||||
exports.loadDebounce = loadDebounce;
|
||||
/**
|
||||
* Debounce all fired events types listed in `types`
|
||||
* while executing the provided `fn`.
|
||||
*
|
||||
*/
|
||||
const debounce_events = (self, types, fn) => {
|
||||
var type;
|
||||
var trigger = self.trigger;
|
||||
var event_args = {};
|
||||
// override trigger method
|
||||
self.trigger = function () {
|
||||
var type = arguments[0];
|
||||
if (types.indexOf(type) !== -1) {
|
||||
event_args[type] = arguments;
|
||||
}
|
||||
else {
|
||||
return trigger.apply(self, arguments);
|
||||
}
|
||||
};
|
||||
// invoke provided function
|
||||
fn.apply(self, []);
|
||||
self.trigger = trigger;
|
||||
// trigger queued events
|
||||
for (type of types) {
|
||||
if (type in event_args) {
|
||||
trigger.apply(self, event_args[type]);
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.debounce_events = debounce_events;
|
||||
/**
|
||||
* Determines the current selection within a text input control.
|
||||
* Returns an object containing:
|
||||
* - start
|
||||
* - length
|
||||
*
|
||||
* Note: "selectionStart, selectionEnd ... apply only to inputs of types text, search, URL, tel and password"
|
||||
* - https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
|
||||
*/
|
||||
const getSelection = (input) => {
|
||||
return {
|
||||
start: input.selectionStart || 0,
|
||||
length: (input.selectionEnd || 0) - (input.selectionStart || 0),
|
||||
};
|
||||
};
|
||||
exports.getSelection = getSelection;
|
||||
/**
|
||||
* Prevent default
|
||||
*
|
||||
*/
|
||||
const preventDefault = (evt, stop = false) => {
|
||||
if (evt) {
|
||||
evt.preventDefault();
|
||||
if (stop) {
|
||||
evt.stopPropagation();
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.preventDefault = preventDefault;
|
||||
/**
|
||||
* Add event helper
|
||||
*
|
||||
*/
|
||||
const addEvent = (target, type, callback, options) => {
|
||||
target.addEventListener(type, callback, options);
|
||||
};
|
||||
exports.addEvent = addEvent;
|
||||
/**
|
||||
* Return true if the requested key is down
|
||||
* Will return false if more than one control character is pressed ( when [ctrl+shift+a] != [ctrl+a] )
|
||||
* The current evt may not always set ( eg calling advanceSelection() )
|
||||
*
|
||||
*/
|
||||
const isKeyDown = (key_name, evt) => {
|
||||
if (!evt) {
|
||||
return false;
|
||||
}
|
||||
if (!evt[key_name]) {
|
||||
return false;
|
||||
}
|
||||
var count = (evt.altKey ? 1 : 0) + (evt.ctrlKey ? 1 : 0) + (evt.shiftKey ? 1 : 0) + (evt.metaKey ? 1 : 0);
|
||||
if (count === 1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
exports.isKeyDown = isKeyDown;
|
||||
/**
|
||||
* Get the id of an element
|
||||
* If the id attribute is not set, set the attribute with the given id
|
||||
*
|
||||
*/
|
||||
const getId = (el, id) => {
|
||||
const existing_id = el.getAttribute('id');
|
||||
if (existing_id) {
|
||||
return existing_id;
|
||||
}
|
||||
el.setAttribute('id', id);
|
||||
return id;
|
||||
};
|
||||
exports.getId = getId;
|
||||
/**
|
||||
* Returns a string with backslashes added before characters that need to be escaped.
|
||||
*/
|
||||
const addSlashes = (str) => {
|
||||
return str.replace(/[\\"']/g, '\\$&');
|
||||
};
|
||||
exports.addSlashes = addSlashes;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
const append = (parent, node) => {
|
||||
if (node)
|
||||
parent.append(node);
|
||||
};
|
||||
exports.append = append;
|
||||
/**
|
||||
* Iterates over arrays and hashes.
|
||||
*
|
||||
* ```
|
||||
* iterate(this.items, function(item, id) {
|
||||
* // invoked for each item
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
const iterate = (object, callback) => {
|
||||
if (Array.isArray(object)) {
|
||||
object.forEach(callback);
|
||||
}
|
||||
else {
|
||||
for (var key in object) {
|
||||
if (object.hasOwnProperty(key)) {
|
||||
callback(object[key], key);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
exports.iterate = iterate;
|
||||
//# sourceMappingURL=utils.js.map
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user