forked from swimlane/ngx-datatable
-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: sync from upstream #2
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
Open
bobbyg603
wants to merge
10
commits into
master
Choose a base branch
from
sync
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* fix: revert table diff to prevent crash on large arrays
- Fix: Prevent browser page crash when user inputs large Arrays
* fix: allow partial overrides of CSS classes (swimlane#151) * refactor: use interface for row properties that may be set by the datatable (swimlane#153) * fix: allow partial overrides of messages (swimlane#152) * refactor: only export symbols that are meant to be exported BREAKING CHANGE: Removed several symbols from the public API that were intended to be internal. * refactor: simplify column directive converting (swimlane#154) * refactor: always use type event (swimlane#158) * refactor: remove useless cleanup (swimlane#164) This never made any sense. `cellTemplate` and `ghostLoaderTemplate` were never defined. * fix: only run disabled check on rows We previously ran `disableRowCheck` on groups instead of each row if rows were grouped. With this change, we only run the check on rows. Besides this, the uncommon `disableRow$` subject was removed from template contexts and replaced with a proper `disabled` field. This simplifies the usage and prevents wrong expectations. Although even shown in our example, calling `next` on the subject works but the value will be overridden on the next CD cycle, so it was pointless. Replacing the subject with a normal boolean resolves this problem. Being able to subscribe to the subject is also not needed. An application always knows whether a row was disabled because they set it. BREAKING CHANGE: The row detail context (`RowDetailContext`) no longer contains `disableRow$?: Observable<boolean>`. Use the new `disabled: boolean` value instead. BREAKING CHANGE: The cell context (`CellContext`) no longer contains `disableRow$?: Observable<boolean>`. Use the new `disabled: boolean` value instead. BREAKING CHANGE: `disableRowCheck` will only be called with actual rows. Although documented otherwise, in the case of groups, the `disableRowCheck` was only called for groups instead of each row inside that group. This allows disabling single rows inside a group and not only entire groups. To update the disabled state of a row just update the row itself instead of using the previous `disableRow$` subject. * refactor: enable `strictFunctionTypes` (swimlane#165) The overall goal is to enable TypeScript strict mode. To achieve this, we need to enable each subset first. * fix: add missing type to comparator (swimlane#167) * refactor: add dedicated type for `SelectEvent` (swimlane#168) * remove non-existent offsetX input * docs: use HttpClient (swimlane#166) Replacing direct use of XMLHttpRequest with HttpClient. This indirectly also improves typing, as the previous code was using implicit any. This will help us to enable noImplicitAny in the future. * fix import * docs: add missing type for sorting (swimlane#172) * docs: add missing type for server paging (swimlane#169) Co-authored-by: Fabio Huser <[email protected]> * docs: fix typing of cell class (swimlane#175) Co-authored-by: Fabio Huser <[email protected]> * refactor: simplify column in group iteration (swimlane#180) Co-authored-by: Fabio Huser <[email protected]> * refactor: add missing internal types (swimlane#178) Co-authored-by: Fabio Huser <[email protected]> * refactor: disable type check around detail height (swimlane#179) * refactor: disable type check around detail height --------- Co-authored-by: Fabio Huser <[email protected]> * refactor: adjust the type of rowClass as it is never called with groups (swimlane#176) This is a refactoring as we never released typing yet. Co-authored-by: Fabio Huser <[email protected]> * feat: add type for context menu event (swimlane#174) Co-authored-by: Fabio Huser <[email protected]> * refactor: simplify total width calculation (swimlane#177) * docs: add missing type for functions (swimlane#170) Co-authored-by: Fabio Huser <[email protected]> * feat: add type for details toggle event (swimlane#173) * docs: add missing type for updateValue functions (swimlane#171) Co-authored-by: Fabio Huser <[email protected]> * test: clean up test code (swimlane#127) * refactor: always use the same event type for reorder columns (swimlane#186) * refactor: remove unused code in long-press directive (swimlane#182) * refactor: introduce new `TableColumnInternal` interface to remove internal properties from public API (swimlane#163) * refactor: consolidate internal column creation * refactor: introduce new `TableColumnInternal` interface to remove internal properties from public API The datable already always "converted" (setting defaults) columns to an internal column definition. Previously, the same interface was used for application provided columns and internal columns. With this change, the interface is split. This brings two main benefits: 1. We can remove internal properties from the public interface (like `$$id`). 2. We can define internal properties that get defaulted as non-optional. This change is relevant to enable strict null checks. * update column type in math.ts to fix build * add type cast in math.spec.ts * refactor: move header styles to the component (swimlane#187) * refactor: remove implicit this in the throttle decorator (swimlane#189) * refactor: remove implicit this from tree grouping (swimlane#188) * refactor: avoid redundant value lookup in map (swimlane#191) * refactor: reflect in type that messages and cssClasses configs are always defined (swimlane#190) * build: remove browserlist (swimlane#194) This is no longer needed as we only target evergreen browsers. Angular also no longer has this file by default generated. * refactor: move footer styles to a component level (swimlane#198) * refactor: replace useless subject (swimlane#195) * docs: migrate examples to standalone (swimlane#197) Running the angular migration script on the examples * docs: bootstrap application in a standalone way (swimlane#200) * fix import in main.ts * refactor: add undefined to types were needed * refactor: remove unused vendor prefixes (swimlane#193) * docs: lazy load examples (swimlane#201) * refactor: remove column resize directive BREAKING CHANGE: removed `ResizeableDirective`. This directive was intended for internal use to handle column resizing, which is now managed directly in the `DataTableHeaderCellComponent`. * test: unit tests for header cell * fix: apply even/odd classes correctly when rows are grouped (swimlane#111) BREAKING CHANGE: Previously `CellContext.rowIndex` was a `string` if the row was inside a group. Now `CellContext.rowIndex` is always a number. Either containing the index of the row or if the row is inside a group, the index of the group. To access the index value of a row within a group, use the new`CellContext.rowInGroupIndex`. * refactor: deprecate `PageEvent.limit` (swimlane#196) DEPRECATED: `PageEvent.limit` should no longer be used. Use the `PageEvent.pageSize` instead as this will hold the same value as `PageEvent.limit` if the table used the value of the limit input. * refactor: move body styles to component level (swimlane#202) * refactor: simplify tree construction (swimlane#205) * refactor: move fixed-header styles to component level (swimlane#203) * refactor: make column resize handling typesafe (swimlane#204) * refactor: remove duplicate template code * refactor: remove custom test matchers * update lint rules * fix: remove unwanted space below the rows (swimlane#214) BREAKING CHANGE: The datatable body no longer has spacing below the last row. If needed for whatever reason, this must be added manually. Workarounds removing this extra space must be dropped. * refactor: move horizontal scroll styles to respective components (swimlane#211) * refactor: ensure that rows are always defined internally (swimlane#192) BREAKING CHANGE: The datatable no longer accepts `undefined` as a value of the `count` input. The TypeScript type never allowed `undefined` but it previously worked anyway. Now passing `undefined` will lead to an error. Instead of `undefined` just pass `0` which has the same effect. * refactor: tree level should start from 0 * refactor: remove unused styles (swimlane#217) * refactor: move fixed-row styles to respective components (swimlane#218) * refactor: don't render wrapper if col group columns are empty * refactor: remove explicit standalone flags (swimlane#222) * refactor: move display related styles to respective components (swimlane#221) * feat: add touch support for reorderable and resizable features (swimlane#181) * feat: port touch events to newest version * test(draggable): use MouseEvent constructor to simulate dragging * style(draggable): run prettier * feat: include pager aria labels in text messages BREAKING CHANGE: `INgxDatatableConfig.messages` now requires new keys for the pager aria labels. * fix: introduce a default value for rows In swimlane#192 we introduced `rows` that are always defined internally. As other setters may use `rows` before initialization (via input), a default value is required. * refactor: remove unnecessary checks Remove check for `this._rows` as it's always defined. * refactor: move selection component into the body component (swimlane#213) * perf: only calculate render offset once for all rows (swimlane#210) * refactor: calculate actual index based on index offset (swimlane#212) * refactor: add missing Row type for TRow (swimlane#234) * refactor: add missing null and declaration (swimlane#237) * refactor: merge contexts into one object to avoid type issues (swimlane#235) * refactor: drop useless group signal (swimlane#236) * fix: prevent errors with row-specific ghost in combination with grouping, selection and trees (swimlane#241) This is just preventing runtime errors and not supporting the combination. Since we use `undefined` to mark loading rows, we do not have access to group keys and alike. So it is not possible yet to have loading rows inside a group or a tree structure. To solve this, we need to enhance the API. * refactor: move ghost loading out of cells (swimlane#239) * refactor: remove unused internal event (swimlane#206) * refactor: drop useless stable sort code (swimlane#244) Since ES2019 Array.sort is guaranteed to be stable. * refactor: allow undefined on internal prop (swimlane#243) * refactor: allow undefined on internal prop * refactor: add missing Row type * refactor: add new internal type for sortable rows Sortable rows require a prop attribute. This should be reflected in the type to avoid unnecessary casting. * refactor: split activation event (swimlane#245) * Refactor/fine tune api (swimlane#246) * refactor: mark all inputs on the table-column directive as optional The interface should be assignable to directive. Every field in the interface is optional, so it has to be in the directive as well. * refactor: mark row param of rowHeight function as always defined * feat: include sorts in page event (swimlane#248) * Refactor/enable strict null checks (swimlane#247) * refactor: improve typing related to null checks * docs: improve typing related to null checks * test: improve typing related to null checks * build: enable strict null checks * refactor: drop unused inputs of footer directive (swimlane#249) BREAKING CHANGE: All inputs except `template` of `DatatableFooterDirective` have been dropped. Those were unused. Remove any usages without replacement. * refactor: remove unused ghost loading input internally (swimlane#251) * Refactor/enable strict init checks (swimlane#250) * refactor: improve typing related to strict property init checks * docs: improve typing related to strict property init checks * test: improve typing related to strict property init checks * build: enable strict mode * refactor: move cell styles into respective components (swimlane#254) * refactor: move or replace `[hidden]` style to drop in from global styles (swimlane#257) * refactor: move scroll-vertical style to the body component (swimlane#258) * refactor: remove general `box-sizing: border-box` (swimlane#256) BREAKING CHANGE: Previously the datatable applied `box-sizing: border-box` to all its elements. This is no longer the case. Custom themes that depend on this must set this behavior manually, using: ```css *, *:before, *:after { box-sizing: border-box; } ``` * feat: introduce a new `providedNgxDatatableConfig` for a standalone way to configure the datatable. (swimlane#259) This also removes the previous breaking change of requiring new messages. Since all messages are now optional. * refactor: all header pinned columns should be flex (swimlane#253) We accidentally removed the flex container on column groups for pinning. Please note that we have the same in body rows where we kept the container as flex. * refactor: base internal row length on rowCount property (swimlane#261) The number of potentially rendered rows should be based on the `rowCount` property which can be supplied externally for server paging. This is needed for ghost loading as apps may provide rows which are shorter than the `rowCount` and thus than the rendered rows. By filling up the internal rows with `undefined` the ghost loading works even though the rows provided are too short. * refactor: enable view encapsulation on root component * fix: fix keyboard interaction for cell selection mode * refactor: migrate to input signals * upgrade angular cli to v20 * upgrade node and yarn * upgraded angular packages to v20 * upgraded the rest of the angular packages and removed support for angular 17 and earlier versions * fix linting errors * remove all occurrences of standalone from component decorators --------- Co-authored-by: Maxi <[email protected]> Co-authored-by: Maximilian Koeller <[email protected]> Co-authored-by: Fabio Huser <[email protected]> Co-authored-by: Chintan Kavathia <[email protected]> Co-authored-by: chintankavathia <[email protected]> Co-authored-by: Colin Frick <[email protected]> Co-authored-by: Robert Worgul <[email protected]> Co-authored-by: Linus Schlumberger <[email protected]> Co-authored-by: Colin Frick <[email protected]>
* Changes v1 * Update changelog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Syncs changes from Swimlane to our fork, hopefully fixing security issues in the enterprise dashboard.