Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TypeScript warnings #735

Merged
merged 2 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff

coding-style-js:
name: JavaScript Coding Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand All @@ -33,6 +34,7 @@ jobs:
- run: yarn check-format

js-dist-current:
name: Check for UnBuilt JS Dist Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Expand All @@ -49,12 +51,18 @@ jobs:
- run: yarn && yarn build
- name: Check if js dist files are current
id: changes
uses: UnicornGlobal/has-changes-action@v1.0.11
run: |
echo "STATUS=$(git status --porcelain)" >> $GITHUB_OUTPUT

- name: Ensure no changes
if: steps.changes.outputs.changed == 1
- name: No changes found
if: steps.changes.outputs.STATUS == ''
run: |
echo "git status is clean"
- name: Changes were found
if: steps.changes.outputs.STATUS != ''
run: |
echo "JS dist files need to be rebuilt"
echo "${{ steps.changes.outputs.STATUS }}"
exit 1

tests-php-low-deps:
Expand Down
40 changes: 20 additions & 20 deletions src/Autocomplete/assets/dist/controller.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { Controller } from '@hotwired/stimulus';
import TomSelect from 'tom-select';

/******************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}

var _default_1_instances, _default_1_getCommonConfig, _default_1_createAutocomplete, _default_1_createAutocompleteWithHtmlContents, _default_1_createAutocompleteWithRemoteData, _default_1_stripTags, _default_1_mergeObjects, _default_1_createTomSelect;
Expand Down Expand Up @@ -193,7 +193,7 @@ class default_1 extends Controller {
this.resetTomSelect();
}
if (changeDisabledState) {
this.changeTomSelectDisabledState((this.formElement.disabled));
this.changeTomSelectDisabledState(this.formElement.disabled);
}
if (changePlaceholder) {
this.updateTomSelectPlaceholder();
Expand Down
2 changes: 1 addition & 1 deletion src/Chartjs/assets/dist/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class default_1 extends Controller {
const parentElement = this.element.parentElement;
if (parentElement && this.chart.options.responsive) {
const originalWidth = parentElement.style.width;
parentElement.style.width = (parentElement.offsetWidth + 1) + 'px';
parentElement.style.width = parentElement.offsetWidth + 1 + 'px';
setTimeout(() => {
parentElement.style.width = originalWidth;
}, 0);
Expand Down
9 changes: 9 additions & 0 deletions src/LiveComponent/assets/dist/ComponentRegistry.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Component from './Component';
declare class ComponentRegistry {
private components;
registerComponent(element: HTMLElement, definition: Component): void;
unregisterComponent(element: HTMLElement): void;
getComponent(element: HTMLElement): Promise<Component>;
}
declare const _default: ComponentRegistry;
export default _default;
Loading