angular-slickgrid 4.2.0 → 4.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/{dist/app → app}/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +2 -2
- package/{dist/app → app}/modules/angular-slickgrid/constants.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/extensions/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/extensions/slickRowDetailView.d.ts +0 -2
- package/{dist/app → app}/modules/angular-slickgrid/global-grid-options.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/angularComponentOutput.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/angularGridInstance.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/externalTestingDependencies.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/gridOption.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/rowDetailView.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/models/slickGrid.interface.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/modules/angular-slickgrid.module.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/angularUtil.service.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/bsDropdown.service.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/container.service.d.ts +1 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/index.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/translater.service.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/services/utilities.d.ts +0 -0
- package/{dist/app → app}/modules/angular-slickgrid/slickgrid-config.d.ts +0 -0
- package/docs/assets/lib/multiple-select/README.md +17 -0
- package/{dist/esm2020 → esm2020}/angular-slickgrid.mjs +0 -0
- package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +1170 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/constants.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/extensions/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +298 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/global-grid-options.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/index.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/angularComponentOutput.interface.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +2 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/models/index.mjs +1 -1
- package/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +2 -0
- package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +43 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +4 -4
- package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +29 -0
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/index.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/services/utilities.mjs +1 -1
- package/{dist/esm2020 → esm2020}/app/modules/angular-slickgrid/slickgrid-config.mjs +1 -1
- package/{dist/esm2020 → esm2020}/public_api.mjs +1 -1
- package/{dist/fesm2015 → fesm2015}/angular-slickgrid.mjs +48 -51
- package/fesm2015/angular-slickgrid.mjs.map +1 -0
- package/{dist/fesm2020 → fesm2020}/angular-slickgrid.mjs +48 -51
- package/fesm2020/angular-slickgrid.mjs.map +1 -0
- package/{dist/i18n → i18n}/en.json +89 -89
- package/{dist/i18n → i18n}/fr.json +90 -90
- package/{dist/angular-slickgrid.d.ts → index.d.ts} +0 -0
- package/package.json +33 -118
- package/{dist/public_api.d.ts → public_api.d.ts} +0 -0
- package/test/cypress/node_modules/@cypress/request/README.md +1038 -0
- package/test/cypress/node_modules/@cypress/xvfb/README.md +48 -0
- package/test/cypress/node_modules/@cypress/xvfb/node_modules/debug/README.md +437 -0
- package/test/cypress/node_modules/@types/node/README.md +16 -0
- package/test/cypress/node_modules/@types/sinonjs__fake-timers/README.md +16 -0
- package/test/cypress/node_modules/@types/sizzle/README.md +16 -0
- package/test/cypress/node_modules/@types/yauzl/README.md +16 -0
- package/test/cypress/node_modules/@types/yauzl/node_modules/@types/node/README.md +16 -0
- package/test/cypress/node_modules/aggregate-error/README.md +61 -0
- package/test/cypress/node_modules/ansi-colors/README.md +315 -0
- package/test/cypress/node_modules/ansi-escapes/README.md +245 -0
- package/test/cypress/node_modules/ansi-regex/README.md +78 -0
- package/test/cypress/node_modules/ansi-styles/README.md +152 -0
- package/test/cypress/node_modules/arch/README.md +71 -0
- package/test/cypress/node_modules/asn1/README.md +50 -0
- package/test/cypress/node_modules/assert-plus/README.md +162 -0
- package/test/cypress/node_modules/astral-regex/README.md +46 -0
- package/test/cypress/node_modules/async/README.md +60 -0
- package/test/cypress/node_modules/asynckit/README.md +233 -0
- package/test/cypress/node_modules/at-least-node/README.md +25 -0
- package/test/cypress/node_modules/aws-sign2/README.md +4 -0
- package/test/cypress/node_modules/aws4/README.md +183 -0
- package/test/cypress/node_modules/balanced-match/README.md +91 -0
- package/test/cypress/node_modules/base64-js/README.md +34 -0
- package/test/cypress/node_modules/bcrypt-pbkdf/README.md +45 -0
- package/test/cypress/node_modules/blob-util/README.md +623 -0
- package/test/cypress/node_modules/bluebird/README.md +57 -0
- package/test/cypress/node_modules/brace-expansion/README.md +129 -0
- package/test/cypress/node_modules/buffer/README.md +410 -0
- package/test/cypress/node_modules/buffer-crc32/README.md +47 -0
- package/test/cypress/node_modules/cachedir/README.md +27 -0
- package/test/cypress/node_modules/caseless/README.md +45 -0
- package/test/cypress/node_modules/chalk/README.md +293 -0
- package/test/cypress/node_modules/chalk/node_modules/supports-color/README.md +76 -0
- package/test/cypress/node_modules/check-more-types/README.md +952 -0
- package/test/cypress/node_modules/ci-info/README.md +114 -0
- package/test/cypress/node_modules/clean-stack/README.md +76 -0
- package/test/cypress/node_modules/cli-cursor/README.md +55 -0
- package/test/cypress/node_modules/cli-table3/README.md +218 -0
- package/test/cypress/node_modules/cli-truncate/README.md +139 -0
- package/test/cypress/node_modules/color-convert/README.md +68 -0
- package/test/cypress/node_modules/color-name/README.md +11 -0
- package/test/cypress/node_modules/colorette/README.md +102 -0
- package/test/cypress/node_modules/colors/README.md +221 -0
- package/test/cypress/node_modules/combined-stream/README.md +138 -0
- package/test/cypress/node_modules/commander/README.md +737 -0
- package/test/cypress/node_modules/common-tags/README.md +687 -0
- package/test/cypress/node_modules/core-util-is/README.md +3 -0
- package/test/cypress/node_modules/cross-spawn/README.md +96 -0
- package/test/cypress/node_modules/cypress/README.md +25 -0
- package/test/cypress/node_modules/cypress/mount-utils/README.md +14 -0
- package/test/cypress/node_modules/cypress/react/README.md +414 -0
- package/test/cypress/node_modules/cypress/vue/README.md +678 -0
- package/test/cypress/node_modules/cypress/vue2/README.md +693 -0
- package/test/cypress/node_modules/dashdash/README.md +574 -0
- package/test/cypress/node_modules/dayjs/README.md +128 -0
- package/test/cypress/node_modules/debug/README.md +455 -0
- package/test/cypress/node_modules/delayed-stream/README.md +141 -0
- package/test/cypress/node_modules/ecc-jsbn/README.md +8 -0
- package/test/cypress/node_modules/emoji-regex/README.md +73 -0
- package/test/cypress/node_modules/end-of-stream/README.md +54 -0
- package/test/cypress/node_modules/enquirer/README.md +1752 -0
- package/test/cypress/node_modules/escape-string-regexp/README.md +27 -0
- package/test/cypress/node_modules/eventemitter2/README.md +809 -0
- package/test/cypress/node_modules/execa/README.md +656 -0
- package/test/cypress/node_modules/executable/README.md +64 -0
- package/test/cypress/node_modules/extend/README.md +81 -0
- package/test/cypress/node_modules/extract-zip/README.md +57 -0
- package/test/cypress/node_modules/extract-zip/node_modules/debug/README.md +455 -0
- package/test/cypress/node_modules/extsprintf/README.md +46 -0
- package/test/cypress/node_modules/fd-slicer/README.md +199 -0
- package/test/cypress/node_modules/figures/README.md +139 -0
- package/test/cypress/node_modules/forever-agent/README.md +4 -0
- package/test/cypress/node_modules/form-data/README.md +234 -0
- package/test/cypress/node_modules/fs-extra/README.md +264 -0
- package/test/cypress/node_modules/fs.realpath/README.md +33 -0
- package/test/cypress/node_modules/get-stream/README.md +124 -0
- package/test/cypress/node_modules/getos/README.md +79 -0
- package/test/cypress/node_modules/getpass/README.md +32 -0
- package/test/cypress/node_modules/glob/README.md +375 -0
- package/test/cypress/node_modules/global-dirs/README.md +72 -0
- package/test/cypress/node_modules/graceful-fs/README.md +133 -0
- package/test/cypress/node_modules/has-flag/README.md +89 -0
- package/test/cypress/node_modules/http-signature/README.md +80 -0
- package/test/cypress/node_modules/human-signals/README.md +155 -0
- package/test/cypress/node_modules/ieee754/README.md +51 -0
- package/test/cypress/node_modules/indent-string/README.md +70 -0
- package/test/cypress/node_modules/inflight/README.md +37 -0
- package/test/cypress/node_modules/inherits/README.md +42 -0
- package/test/cypress/node_modules/ini/README.md +102 -0
- package/test/cypress/node_modules/is-ci/README.md +50 -0
- package/test/cypress/node_modules/is-fullwidth-code-point/README.md +39 -0
- package/test/cypress/node_modules/is-installed-globally/README.md +31 -0
- package/test/cypress/node_modules/is-path-inside/README.md +63 -0
- package/test/cypress/node_modules/is-stream/README.md +57 -0
- package/test/cypress/node_modules/is-typedarray/README.md +16 -0
- package/test/cypress/node_modules/isexe/README.md +51 -0
- package/test/cypress/node_modules/isstream/README.md +66 -0
- package/test/cypress/node_modules/jsbn/README.md +175 -0
- package/test/cypress/node_modules/json-schema/README.md +3 -0
- package/test/cypress/node_modules/json-stringify-safe/README.md +52 -0
- package/test/cypress/node_modules/jsonfile/README.md +205 -0
- package/test/cypress/node_modules/jsonfile/node_modules/universalify/README.md +76 -0
- package/test/cypress/node_modules/jsprim/README.md +287 -0
- package/test/cypress/node_modules/lazy-ass/README.md +269 -0
- package/test/cypress/node_modules/listr2/README.md +17 -0
- package/test/cypress/node_modules/lodash/README.md +39 -0
- package/test/cypress/node_modules/lodash.once/README.md +18 -0
- package/test/cypress/node_modules/log-symbols/README.md +51 -0
- package/test/cypress/node_modules/log-update/README.md +97 -0
- package/test/cypress/node_modules/log-update/node_modules/slice-ansi/README.md +66 -0
- package/test/cypress/node_modules/log-update/node_modules/wrap-ansi/README.md +97 -0
- package/test/cypress/node_modules/lru-cache/README.md +166 -0
- package/test/cypress/node_modules/merge-stream/README.md +78 -0
- package/test/cypress/node_modules/mime-db/README.md +102 -0
- package/test/cypress/node_modules/mime-types/README.md +123 -0
- package/test/cypress/node_modules/mimic-fn/README.md +69 -0
- package/test/cypress/node_modules/minimatch/README.md +209 -0
- package/test/cypress/node_modules/ms/README.md +60 -0
- package/test/cypress/node_modules/npm-run-path/README.md +115 -0
- package/test/cypress/node_modules/once/README.md +79 -0
- package/test/cypress/node_modules/onetime/README.md +94 -0
- package/test/cypress/node_modules/ospath/README.md +53 -0
- package/test/cypress/node_modules/p-map/README.md +89 -0
- package/test/cypress/node_modules/path-is-absolute/README.md +59 -0
- package/test/cypress/node_modules/path-key/README.md +61 -0
- package/test/cypress/node_modules/pend/README.md +41 -0
- package/test/cypress/node_modules/performance-now/README.md +30 -0
- package/test/cypress/node_modules/pify/README.md +119 -0
- package/test/cypress/node_modules/pretty-bytes/README.md +131 -0
- package/test/cypress/node_modules/proxy-from-env/README.md +131 -0
- package/test/cypress/node_modules/psl/README.md +215 -0
- package/test/cypress/node_modules/pump/README.md +65 -0
- package/test/cypress/node_modules/punycode/README.md +122 -0
- package/test/cypress/node_modules/qs/README.md +475 -0
- package/test/cypress/node_modules/request-progress/README.md +78 -0
- package/test/cypress/node_modules/restore-cursor/README.md +26 -0
- package/test/cypress/node_modules/rimraf/README.md +101 -0
- package/test/cypress/node_modules/rxjs/README.md +147 -0
- package/test/cypress/node_modules/rxjs/_esm2015/README.md +147 -0
- package/test/cypress/node_modules/rxjs/_esm5/README.md +147 -0
- package/test/cypress/node_modules/rxjs/src/README.md +147 -0
- package/test/cypress/node_modules/safe-buffer/README.md +584 -0
- package/test/cypress/node_modules/safer-buffer/README.md +156 -0
- package/test/cypress/node_modules/semver/README.md +566 -0
- package/test/cypress/node_modules/shebang-command/README.md +34 -0
- package/test/cypress/node_modules/shebang-regex/README.md +33 -0
- package/test/cypress/node_modules/signal-exit/README.md +39 -0
- package/test/cypress/node_modules/slice-ansi/README.md +72 -0
- package/test/cypress/node_modules/sshpk/README.md +804 -0
- package/test/cypress/node_modules/string-width/README.md +50 -0
- package/test/cypress/node_modules/strip-ansi/README.md +46 -0
- package/test/cypress/node_modules/strip-final-newline/README.md +30 -0
- package/test/cypress/node_modules/supports-color/README.md +77 -0
- package/test/cypress/node_modules/throttleit/README.md +32 -0
- package/test/cypress/node_modules/tmp/README.md +365 -0
- package/test/cypress/node_modules/tough-cookie/README.md +527 -0
- package/test/cypress/node_modules/tslib/README.md +142 -0
- package/test/cypress/node_modules/tunnel-agent/README.md +4 -0
- package/test/cypress/node_modules/tweetnacl/README.md +459 -0
- package/test/cypress/node_modules/type-fest/README.md +760 -0
- package/test/cypress/node_modules/universalify/README.md +76 -0
- package/test/cypress/node_modules/untildify/README.md +30 -0
- package/test/cypress/node_modules/uuid/README.md +505 -0
- package/test/cypress/node_modules/verror/README.md +528 -0
- package/test/cypress/node_modules/verror/node_modules/extsprintf/README.md +46 -0
- package/test/cypress/node_modules/which/README.md +54 -0
- package/test/cypress/node_modules/wrap-ansi/README.md +91 -0
- package/test/cypress/node_modules/wrappy/README.md +36 -0
- package/test/cypress/node_modules/yallist/README.md +204 -0
- package/test/cypress/node_modules/yauzl/README.md +658 -0
- package/.browserslistrc +0 -12
- package/.codecov.yml +0 -17
- package/.editorconfig +0 -18
- package/.eslintrc.json +0 -50
- package/.github/CODE_OF_CONDUCT.md +0 -76
- package/.github/FUNDING.yml +0 -8
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -54
- package/.github/ISSUE_TEMPLATE/config.yml +0 -5
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -44
- package/.github/renovate.json5 +0 -26
- package/.github/stale.yml +0 -7
- package/.github/workflows/main.yml +0 -83
- package/.vscode/extensions.json +0 -9
- package/.vscode/launch.json +0 -72
- package/.vscode/settings.json +0 -7
- package/.vscode/tasks.json +0 -77
- package/CHANGELOG.md +0 -1172
- package/angular.json +0 -148
- package/dist/LICENSE +0 -20
- package/dist/README.md +0 -182
- package/dist/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +0 -1171
- package/dist/esm2020/app/modules/angular-slickgrid/extensions/slickRowDetailView.mjs +0 -300
- package/dist/esm2020/app/modules/angular-slickgrid/models/angularGridInstance.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/gridOption.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/rowDetailView.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/models/slickGrid.interface.mjs +0 -2
- package/dist/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +0 -46
- package/dist/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +0 -26
- package/dist/fesm2015/angular-slickgrid.mjs.map +0 -1
- package/dist/fesm2020/angular-slickgrid.mjs.map +0 -1
- package/dist/package.json +0 -79
- package/global.d.ts +0 -1
- package/ngcc.config.js +0 -13
- package/screenshots/column-picker.png +0 -0
- package/screenshots/composite-editor.png +0 -0
- package/screenshots/draggable-grouping.png +0 -0
- package/screenshots/editors.png +0 -0
- package/screenshots/export-to-file.png +0 -0
- package/screenshots/filter_and_sort.png +0 -0
- package/screenshots/formatters.png +0 -0
- package/screenshots/frozen.png +0 -0
- package/screenshots/multipleSelectFilter.png +0 -0
- package/screenshots/pagination.png +0 -0
- package/screenshots/selectFilter.png +0 -0
- package/screenshots/singleFilter.png +0 -0
- package/src/app/app-routing.module.ts +0 -83
- package/src/app/app.component.html +0 -160
- package/src/app/app.component.scss +0 -65
- package/src/app/app.component.ts +0 -10
- package/src/app/app.module.ts +0 -175
- package/src/app/examples/custom-angularComponentEditor.ts +0 -184
- package/src/app/examples/custom-angularComponentFilter.ts +0 -126
- package/src/app/examples/custom-inputEditor.ts +0 -124
- package/src/app/examples/custom-inputFilter.ts +0 -142
- package/src/app/examples/custom-titleFormatter.component.ts +0 -8
- package/src/app/examples/editor-ng-select.component.ts +0 -37
- package/src/app/examples/filter-ng-select.component.ts +0 -32
- package/src/app/examples/grid-additem.component.html +0 -48
- package/src/app/examples/grid-additem.component.ts +0 -272
- package/src/app/examples/grid-angular.component.html +0 -79
- package/src/app/examples/grid-angular.component.scss +0 -28
- package/src/app/examples/grid-angular.component.ts +0 -370
- package/src/app/examples/grid-autoheight.component.html +0 -52
- package/src/app/examples/grid-autoheight.component.ts +0 -147
- package/src/app/examples/grid-basic.component.html +0 -29
- package/src/app/examples/grid-basic.component.ts +0 -82
- package/src/app/examples/grid-clientside.component.html +0 -51
- package/src/app/examples/grid-clientside.component.ts +0 -293
- package/src/app/examples/grid-colspan.component.html +0 -39
- package/src/app/examples/grid-colspan.component.scss +0 -11
- package/src/app/examples/grid-colspan.component.ts +0 -155
- package/src/app/examples/grid-composite-editor.component.html +0 -79
- package/src/app/examples/grid-composite-editor.component.scss +0 -19
- package/src/app/examples/grid-composite-editor.component.ts +0 -948
- package/src/app/examples/grid-contextmenu.component.html +0 -62
- package/src/app/examples/grid-contextmenu.component.scss +0 -44
- package/src/app/examples/grid-contextmenu.component.ts +0 -473
- package/src/app/examples/grid-custom-tooltip.component.html +0 -25
- package/src/app/examples/grid-custom-tooltip.component.scss +0 -77
- package/src/app/examples/grid-custom-tooltip.component.ts +0 -483
- package/src/app/examples/grid-draggrouping.component.html +0 -93
- package/src/app/examples/grid-draggrouping.component.ts +0 -397
- package/src/app/examples/grid-editor.component.html +0 -88
- package/src/app/examples/grid-editor.component.ts +0 -699
- package/src/app/examples/grid-formatter.component.html +0 -26
- package/src/app/examples/grid-formatter.component.ts +0 -162
- package/src/app/examples/grid-frozen.component.html +0 -65
- package/src/app/examples/grid-frozen.component.scss +0 -11
- package/src/app/examples/grid-frozen.component.ts +0 -303
- package/src/app/examples/grid-graphql-nopage.component.html +0 -33
- package/src/app/examples/grid-graphql-nopage.component.scss +0 -9
- package/src/app/examples/grid-graphql-nopage.component.ts +0 -242
- package/src/app/examples/grid-graphql.component.html +0 -87
- package/src/app/examples/grid-graphql.component.ts +0 -304
- package/src/app/examples/grid-grouping.component.html +0 -80
- package/src/app/examples/grid-grouping.component.ts +0 -313
- package/src/app/examples/grid-headerbutton.component.html +0 -31
- package/src/app/examples/grid-headerbutton.component.scss +0 -10
- package/src/app/examples/grid-headerbutton.component.ts +0 -233
- package/src/app/examples/grid-headermenu.component.html +0 -31
- package/src/app/examples/grid-headermenu.component.scss +0 -25
- package/src/app/examples/grid-headermenu.component.ts +0 -159
- package/src/app/examples/grid-localization.component.html +0 -54
- package/src/app/examples/grid-localization.component.ts +0 -293
- package/src/app/examples/grid-menu.component.html +0 -37
- package/src/app/examples/grid-menu.component.scss +0 -28
- package/src/app/examples/grid-menu.component.ts +0 -229
- package/src/app/examples/grid-odata.component.html +0 -116
- package/src/app/examples/grid-odata.component.ts +0 -441
- package/src/app/examples/grid-range.component.html +0 -74
- package/src/app/examples/grid-range.component.ts +0 -291
- package/src/app/examples/grid-remote.component.html +0 -37
- package/src/app/examples/grid-remote.component.ts +0 -153
- package/src/app/examples/grid-resize-by-content.component.html +0 -62
- package/src/app/examples/grid-resize-by-content.component.scss +0 -19
- package/src/app/examples/grid-resize-by-content.component.ts +0 -780
- package/src/app/examples/grid-rowdetail.component.html +0 -35
- package/src/app/examples/grid-rowdetail.component.ts +0 -205
- package/src/app/examples/grid-rowmove.component.html +0 -49
- package/src/app/examples/grid-rowmove.component.ts +0 -234
- package/src/app/examples/grid-rowselection.component.html +0 -76
- package/src/app/examples/grid-rowselection.component.ts +0 -267
- package/src/app/examples/grid-state.component.html +0 -36
- package/src/app/examples/grid-state.component.ts +0 -259
- package/src/app/examples/grid-tabs.component.html +0 -35
- package/src/app/examples/grid-tabs.component.ts +0 -115
- package/src/app/examples/grid-trading.component.html +0 -58
- package/src/app/examples/grid-trading.component.scss +0 -49
- package/src/app/examples/grid-trading.component.ts +0 -319
- package/src/app/examples/grid-tree-data-hierarchical.component.html +0 -79
- package/src/app/examples/grid-tree-data-hierarchical.component.scss +0 -47
- package/src/app/examples/grid-tree-data-hierarchical.component.ts +0 -311
- package/src/app/examples/grid-tree-data-parent-child.component.html +0 -108
- package/src/app/examples/grid-tree-data-parent-child.component.scss +0 -10
- package/src/app/examples/grid-tree-data-parent-child.component.ts +0 -351
- package/src/app/examples/home.component.html +0 -41
- package/src/app/examples/home.component.ts +0 -9
- package/src/app/examples/rowdetail-preload.component.ts +0 -10
- package/src/app/examples/rowdetail-view.component.html +0 -36
- package/src/app/examples/rowdetail-view.component.ts +0 -54
- package/src/app/examples/swt-common-grid-pagination.component.ts +0 -156
- package/src/app/examples/swt-common-grid-test.component.html +0 -30
- package/src/app/examples/swt-common-grid-test.component.ts +0 -219
- package/src/app/examples/swt-common-grid.component.ts +0 -436
- package/src/app/examples/swt-logger.service.ts +0 -165
- package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.html +0 -4
- package/src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts +0 -1395
- package/src/app/modules/angular-slickgrid/constants.ts +0 -97
- package/src/app/modules/angular-slickgrid/extensions/index.ts +0 -1
- package/src/app/modules/angular-slickgrid/extensions/slickRowDetailView.ts +0 -375
- package/src/app/modules/angular-slickgrid/global-grid-options.ts +0 -245
- package/src/app/modules/angular-slickgrid/index.ts +0 -11
- package/src/app/modules/angular-slickgrid/models/angularComponentOutput.interface.ts +0 -6
- package/src/app/modules/angular-slickgrid/models/angularGridInstance.interface.ts +0 -68
- package/src/app/modules/angular-slickgrid/models/externalTestingDependencies.interface.ts +0 -37
- package/src/app/modules/angular-slickgrid/models/gridOption.interface.ts +0 -12
- package/src/app/modules/angular-slickgrid/models/index.ts +0 -6
- package/src/app/modules/angular-slickgrid/models/rowDetailView.interface.ts +0 -33
- package/src/app/modules/angular-slickgrid/models/slickGrid.interface.ts +0 -7
- package/src/app/modules/angular-slickgrid/modules/angular-slickgrid.module.ts +0 -37
- package/src/app/modules/angular-slickgrid/services/angularUtil.service.ts +0 -48
- package/src/app/modules/angular-slickgrid/services/bsDropdown.service.ts +0 -142
- package/src/app/modules/angular-slickgrid/services/container.service.ts +0 -24
- package/src/app/modules/angular-slickgrid/services/index.ts +0 -5
- package/src/app/modules/angular-slickgrid/services/translater.service.ts +0 -38
- package/src/app/modules/angular-slickgrid/services/utilities.ts +0 -19
- package/src/app/modules/angular-slickgrid/slickgrid-config.ts +0 -10
- package/src/app/slickgrid-custom-variables.scss +0 -10
- package/src/assets/.gitkeep +0 -0
- package/src/assets/data/collection_100_numbers.json +0 -12
- package/src/assets/data/collection_500_numbers.json +0 -52
- package/src/assets/data/countries.json +0 -245
- package/src/assets/data/country_names.json +0 -245
- package/src/assets/data/customers_100.json +0 -102
- package/src/assets/i18n/en.json +0 -90
- package/src/assets/i18n/fr.json +0 -91
- package/src/environments/environment.prod.ts +0 -3
- package/src/environments/environment.ts +0 -8
- package/src/favicon.ico +0 -0
- package/src/index.html +0 -18
- package/src/main.ts +0 -13
- package/src/polyfills.ts +0 -52
- package/src/public_api.ts +0 -1
- package/src/styles.scss +0 -66
- package/src/typings.d.ts +0 -10
- package/tsconfig.app.json +0 -25
- package/tsconfig.json +0 -40
- package/tsconfig.spec.json +0 -23
|
@@ -1,699 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import { Instance as FlatpickrInstance } from 'flatpickr/dist/types/instance';
|
|
5
|
-
import {
|
|
6
|
-
AngularGridInstance,
|
|
7
|
-
AutocompleteOption,
|
|
8
|
-
Column,
|
|
9
|
-
Editors,
|
|
10
|
-
EditorArguments,
|
|
11
|
-
EditorValidator,
|
|
12
|
-
FieldType,
|
|
13
|
-
Filters,
|
|
14
|
-
FlatpickrOption,
|
|
15
|
-
Formatter,
|
|
16
|
-
Formatters,
|
|
17
|
-
GridOption,
|
|
18
|
-
LongTextEditorOption,
|
|
19
|
-
OnEventArgs,
|
|
20
|
-
OperatorType,
|
|
21
|
-
SortComparers,
|
|
22
|
-
SlickNamespace,
|
|
23
|
-
} from './../modules/angular-slickgrid';
|
|
24
|
-
import { CustomInputEditor } from './custom-inputEditor';
|
|
25
|
-
import { CustomInputFilter } from './custom-inputFilter';
|
|
26
|
-
import { Subject } from 'rxjs';
|
|
27
|
-
|
|
28
|
-
// using external non-typed js libraries
|
|
29
|
-
declare const Slick: SlickNamespace;
|
|
30
|
-
|
|
31
|
-
const NB_ITEMS = 100;
|
|
32
|
-
const URL_SAMPLE_COLLECTION_DATA = 'assets/data/collection_100_numbers.json';
|
|
33
|
-
const URL_COUNTRIES_COLLECTION = 'assets/data/countries.json';
|
|
34
|
-
const URL_COUNTRY_NAMES = 'assets/data/country_names.json';
|
|
35
|
-
|
|
36
|
-
// you can create custom validator to pass to an inline editor
|
|
37
|
-
const myCustomTitleValidator: EditorValidator = (value: any, args?: EditorArguments) => {
|
|
38
|
-
// you can get the Editor Args which can be helpful, e.g. we can get the Translate Service from it
|
|
39
|
-
const grid = args && args.grid;
|
|
40
|
-
const gridOptions = (grid?.getOptions?.() ?? {}) as GridOption;
|
|
41
|
-
const translate = gridOptions.i18n;
|
|
42
|
-
|
|
43
|
-
// to get the editor object, you'll need to use "internalColumnEditor"
|
|
44
|
-
// don't use "editor" property since that one is what SlickGrid uses internally by it's editor factory
|
|
45
|
-
const columnEditor = args && args.column && args.column.internalColumnEditor;
|
|
46
|
-
|
|
47
|
-
if (value === null || value === undefined || !value.length) {
|
|
48
|
-
return { valid: false, msg: 'This is a required field' };
|
|
49
|
-
} else if (!/^Task\s\d+$/.test(value)) {
|
|
50
|
-
return { valid: false, msg: 'Your title is invalid, it must start with "Task" followed by a number' };
|
|
51
|
-
// OR use the Translate Service with your custom message
|
|
52
|
-
// return { valid: false, msg: translate.instant('YOUR_ERROR', { x: value }) };
|
|
53
|
-
}
|
|
54
|
-
return { valid: true, msg: '' };
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
// create a custom Formatter to show the Task + value
|
|
58
|
-
const taskFormatter: Formatter = (row, cell, value, columnDef, dataContext) => {
|
|
59
|
-
if (value && Array.isArray(value)) {
|
|
60
|
-
const taskValues = value.map((val) => `Task ${val}`);
|
|
61
|
-
const values = taskValues.join(', ');
|
|
62
|
-
return `<span title="${values}">${values}</span>`;
|
|
63
|
-
}
|
|
64
|
-
return '';
|
|
65
|
-
};
|
|
66
|
-
@Component({
|
|
67
|
-
templateUrl: './grid-editor.component.html'
|
|
68
|
-
})
|
|
69
|
-
export class GridEditorComponent implements OnInit {
|
|
70
|
-
title = 'Example 3: Editors / Delete';
|
|
71
|
-
subTitle = `
|
|
72
|
-
Grid with Inline Editors and onCellClick actions (<a href="https://github.com/ghiscoding/Angular-Slickgrid/wiki/Editors" target="_blank">Wiki docs</a>).
|
|
73
|
-
<ul>
|
|
74
|
-
<li>Multiple Editors & Filters are available: AutoComplete, Checkbox, Date, Slider, SingleSelect, MultipleSelect, Float, Text, LongText... even Custom Editor</li>
|
|
75
|
-
<li>When using "enableCellNavigation: true", clicking on a cell will automatically make it active & selected.</li>
|
|
76
|
-
<ul><li>If you don't want this behavior, then you should disable "enableCellNavigation"</li></ul>
|
|
77
|
-
<li>Inline Editors requires "enableCellNavigation: true" (not sure why though)</li>
|
|
78
|
-
<li>
|
|
79
|
-
Support Excel Copy Buffer (SlickGrid Copy Manager Plugin), you can use it by simply enabling "enableExcelCopyBuffer" flag.
|
|
80
|
-
Note that it will only evaluate Formatter when the "exportWithFormatter" flag is enabled (through "ExportOptions" or the column definition)
|
|
81
|
-
</li>
|
|
82
|
-
<li>MultipleSelect & SingeSelect Editors & Filters can use a regular "collection" or "collectionAsync" to load it asynchronously</li>
|
|
83
|
-
<ul>
|
|
84
|
-
<li>Click on "Add Item" and see the Editor/Filter or the "Prerequesites" column change</li>
|
|
85
|
-
<li>Any Editor/Filter with a "collection" can be changed dynamically later in the future</li>
|
|
86
|
-
</ul>
|
|
87
|
-
</ul>
|
|
88
|
-
`;
|
|
89
|
-
|
|
90
|
-
private _commandQueue: any = [];
|
|
91
|
-
angularGrid!: AngularGridInstance;
|
|
92
|
-
columnDefinitions!: Column[];
|
|
93
|
-
gridOptions!: GridOption;
|
|
94
|
-
dataset!: any[];
|
|
95
|
-
gridObj: any;
|
|
96
|
-
isAutoEdit = true;
|
|
97
|
-
alertWarning: any;
|
|
98
|
-
updatedObject: any;
|
|
99
|
-
selectedLanguage = 'en';
|
|
100
|
-
duplicateTitleHeaderCount = 1;
|
|
101
|
-
|
|
102
|
-
constructor(private http: HttpClient, private translate: TranslateService) { }
|
|
103
|
-
|
|
104
|
-
ngOnInit() {
|
|
105
|
-
this.prepareGrid();
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
angularGridReady(angularGrid: AngularGridInstance) {
|
|
109
|
-
this.angularGrid = angularGrid;
|
|
110
|
-
this.gridObj = angularGrid.slickGrid;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
prepareGrid() {
|
|
114
|
-
this.columnDefinitions = [
|
|
115
|
-
{
|
|
116
|
-
id: 'edit',
|
|
117
|
-
field: 'id',
|
|
118
|
-
excludeFromColumnPicker: true,
|
|
119
|
-
excludeFromGridMenu: true,
|
|
120
|
-
excludeFromHeaderMenu: true,
|
|
121
|
-
formatter: Formatters.editIcon,
|
|
122
|
-
minWidth: 30,
|
|
123
|
-
maxWidth: 30,
|
|
124
|
-
// use onCellClick OR grid.onClick.subscribe which you can see down below
|
|
125
|
-
onCellClick: (e: Event, args: OnEventArgs) => {
|
|
126
|
-
console.log(args);
|
|
127
|
-
this.alertWarning = `Editing: ${args.dataContext.title}`;
|
|
128
|
-
this.angularGrid.gridService.highlightRow(args.row, 1500);
|
|
129
|
-
this.angularGrid.gridService.setSelectedRow(args.row);
|
|
130
|
-
}
|
|
131
|
-
}, {
|
|
132
|
-
id: 'delete',
|
|
133
|
-
field: 'id',
|
|
134
|
-
excludeFromColumnPicker: true,
|
|
135
|
-
excludeFromGridMenu: true,
|
|
136
|
-
excludeFromHeaderMenu: true,
|
|
137
|
-
formatter: Formatters.deleteIcon,
|
|
138
|
-
minWidth: 30,
|
|
139
|
-
maxWidth: 30,
|
|
140
|
-
// use onCellClick OR grid.onClick.subscribe which you can see down below
|
|
141
|
-
/*
|
|
142
|
-
onCellClick: (e: Event, args: OnEventArgs) => {
|
|
143
|
-
console.log(args);
|
|
144
|
-
this.alertWarning = `Deleting: ${args.dataContext.title}`;
|
|
145
|
-
}
|
|
146
|
-
*/
|
|
147
|
-
}, {
|
|
148
|
-
id: 'title',
|
|
149
|
-
name: 'Title',
|
|
150
|
-
field: 'title',
|
|
151
|
-
minWidth: 100,
|
|
152
|
-
filterable: true,
|
|
153
|
-
sortable: true,
|
|
154
|
-
type: FieldType.string,
|
|
155
|
-
editor: {
|
|
156
|
-
model: Editors.longText,
|
|
157
|
-
required: true,
|
|
158
|
-
maxLength: 12,
|
|
159
|
-
editorOptions: {
|
|
160
|
-
// you can change textarea cols,rows (defaults to 40,4)
|
|
161
|
-
cols: 42,
|
|
162
|
-
rows: 5,
|
|
163
|
-
buttonTexts: {
|
|
164
|
-
/* you can change button texts (defaults to "Cancel", "Save") */
|
|
165
|
-
// cancel: 'Close',
|
|
166
|
-
// save: 'Done'
|
|
167
|
-
|
|
168
|
-
/* or with translations (defaults to "CANCEL", "SAVE") */
|
|
169
|
-
// cancelKey: 'CANCEL',
|
|
170
|
-
// saveKey: 'SAVE'
|
|
171
|
-
}
|
|
172
|
-
} as LongTextEditorOption,
|
|
173
|
-
validator: myCustomTitleValidator,
|
|
174
|
-
},
|
|
175
|
-
onCellChange: (e: Event, args: OnEventArgs) => {
|
|
176
|
-
console.log(args);
|
|
177
|
-
this.alertWarning = `Updated Title: ${args.dataContext.title}`;
|
|
178
|
-
}
|
|
179
|
-
}, {
|
|
180
|
-
id: 'title2',
|
|
181
|
-
name: 'Title, Custom Editor',
|
|
182
|
-
field: 'title',
|
|
183
|
-
minWidth: 70,
|
|
184
|
-
filterable: true,
|
|
185
|
-
sortable: true,
|
|
186
|
-
type: FieldType.string,
|
|
187
|
-
editor: {
|
|
188
|
-
model: CustomInputEditor,
|
|
189
|
-
placeholder: 'custom',
|
|
190
|
-
validator: myCustomTitleValidator, // use a custom validator
|
|
191
|
-
},
|
|
192
|
-
filter: {
|
|
193
|
-
model: CustomInputFilter,
|
|
194
|
-
placeholder: '🔎︎ custom',
|
|
195
|
-
},
|
|
196
|
-
}, {
|
|
197
|
-
id: 'duration',
|
|
198
|
-
name: 'Duration (days)',
|
|
199
|
-
field: 'duration',
|
|
200
|
-
minWidth: 100,
|
|
201
|
-
filterable: true,
|
|
202
|
-
sortable: true,
|
|
203
|
-
formatter: Formatters.complexObject,
|
|
204
|
-
type: FieldType.number,
|
|
205
|
-
exportWithFormatter: true,
|
|
206
|
-
filter: { model: Filters.slider, params: { hideSliderNumber: false } },
|
|
207
|
-
editor: {
|
|
208
|
-
model: Editors.slider,
|
|
209
|
-
minValue: 0,
|
|
210
|
-
maxValue: 100,
|
|
211
|
-
// params: { hideSliderNumber: true },
|
|
212
|
-
},
|
|
213
|
-
/*
|
|
214
|
-
editor: {
|
|
215
|
-
// default is 0 decimals, if no decimals is passed it will accept 0 or more decimals
|
|
216
|
-
// however if you pass the "decimalPlaces", it will validate with that maximum
|
|
217
|
-
alwaysSaveOnEnterKey: true, // defaults to False, when set to true and user presses ENTER it will always call a Save even if value is empty
|
|
218
|
-
model: Editors.float,
|
|
219
|
-
placeholder: 'enter number',
|
|
220
|
-
title: 'Your number must be bigger than 5', // add a custom title, to see it as a real tooltip you'll need to implement something like tipsy jquery lib
|
|
221
|
-
minValue: 5,
|
|
222
|
-
maxValue: 365,
|
|
223
|
-
// the default validation error message is in English but you can override it by using "errorMessage"
|
|
224
|
-
// errorMessage: this.i18n.tr('INVALID_FLOAT', { maxDecimal: 2 }),
|
|
225
|
-
params: { decimalPlaces: 2 },
|
|
226
|
-
},
|
|
227
|
-
*/
|
|
228
|
-
}, {
|
|
229
|
-
id: 'complete',
|
|
230
|
-
name: '% Complete',
|
|
231
|
-
field: 'percentComplete',
|
|
232
|
-
minWidth: 100,
|
|
233
|
-
filterable: true,
|
|
234
|
-
formatter: Formatters.multiple,
|
|
235
|
-
type: FieldType.number,
|
|
236
|
-
editor: {
|
|
237
|
-
model: Editors.singleSelect,
|
|
238
|
-
|
|
239
|
-
// We can also add HTML text to be rendered (any bad script will be sanitized) but we have to opt-in, else it will be sanitized
|
|
240
|
-
enableRenderHtml: true,
|
|
241
|
-
collection: Array.from(Array(101).keys()).map(k => ({ value: k, label: k, symbol: '<i class="fa fa-percent" style="color:cadetblue"></i>' })),
|
|
242
|
-
customStructure: {
|
|
243
|
-
value: 'value',
|
|
244
|
-
label: 'label',
|
|
245
|
-
labelSuffix: 'symbol'
|
|
246
|
-
},
|
|
247
|
-
|
|
248
|
-
// collection: Array.from(Array(101).keys()).map(k => ({ value: k, label: k, labelSuffix: '%' })),
|
|
249
|
-
collectionSortBy: {
|
|
250
|
-
property: 'label',
|
|
251
|
-
sortDesc: true
|
|
252
|
-
},
|
|
253
|
-
collectionFilterBy: {
|
|
254
|
-
property: 'value',
|
|
255
|
-
value: 0,
|
|
256
|
-
operator: OperatorType.notEqual
|
|
257
|
-
},
|
|
258
|
-
// you could also provide a collection override to filter/sort based on the item dataContext or whatever else
|
|
259
|
-
// collectionOverride: (updatedCollection, args) => {
|
|
260
|
-
// console.log(args);
|
|
261
|
-
// return updatedCollection.filter((col) => args.dataContext.id % 2 ? col.value < 50 : col.value >= 50);
|
|
262
|
-
// },
|
|
263
|
-
editorOptions: {
|
|
264
|
-
maxHeight: 400
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
params: {
|
|
268
|
-
formatters: [Formatters.collectionEditor, Formatters.percentCompleteBar],
|
|
269
|
-
},
|
|
270
|
-
// validator: (value, args) => {
|
|
271
|
-
// if (value < 50) {
|
|
272
|
-
// return { valid: false, msg: 'Please use at least 50%' };
|
|
273
|
-
// }
|
|
274
|
-
// return { valid: true, msg: '' };
|
|
275
|
-
// }
|
|
276
|
-
}, {
|
|
277
|
-
id: 'start',
|
|
278
|
-
name: 'Start',
|
|
279
|
-
field: 'start',
|
|
280
|
-
minWidth: 100,
|
|
281
|
-
filterable: true,
|
|
282
|
-
filter: { model: Filters.compoundDate },
|
|
283
|
-
formatter: Formatters.multiple,
|
|
284
|
-
params: {
|
|
285
|
-
formatters: [Formatters.complexObject, Formatters.dateIso]
|
|
286
|
-
},
|
|
287
|
-
exportWithFormatter: true,
|
|
288
|
-
sortable: true,
|
|
289
|
-
type: FieldType.date,
|
|
290
|
-
editor: {
|
|
291
|
-
model: Editors.date,
|
|
292
|
-
},
|
|
293
|
-
}, {
|
|
294
|
-
id: 'finish',
|
|
295
|
-
name: 'Finish',
|
|
296
|
-
field: 'finish',
|
|
297
|
-
minWidth: 100,
|
|
298
|
-
filterable: true,
|
|
299
|
-
sortable: true,
|
|
300
|
-
filter: { model: Filters.compoundDate },
|
|
301
|
-
formatter: Formatters.dateIso,
|
|
302
|
-
exportWithFormatter: true,
|
|
303
|
-
type: FieldType.date, // dataset cell input format
|
|
304
|
-
// outputType: FieldType.dateUs, // date picker format
|
|
305
|
-
saveOutputType: FieldType.dateUtc, // save output date formattype: FieldType.date,
|
|
306
|
-
editor: {
|
|
307
|
-
model: Editors.date,
|
|
308
|
-
// override any of the Flatpickr options through "editorOptions"
|
|
309
|
-
// please note that there's no TSlint on this property since it's generic for any filter, so make sure you entered the correct filter option(s)
|
|
310
|
-
editorOptions: {
|
|
311
|
-
minDate: 'today',
|
|
312
|
-
|
|
313
|
-
// if we want to preload the date picker with a different date,
|
|
314
|
-
// we could toggle the `closeOnSelect: false`, set the date in the picker and re-toggle `closeOnSelect: true`
|
|
315
|
-
// closeOnSelect: false,
|
|
316
|
-
// onOpen: (selectedDates: Date[] | Date, dateStr: string, instance: FlatpickrInstance) => {
|
|
317
|
-
// instance.setDate('2021-12-31', true);
|
|
318
|
-
// instance.set('closeOnSelect', true);
|
|
319
|
-
// },
|
|
320
|
-
} as FlatpickrOption
|
|
321
|
-
},
|
|
322
|
-
}, {
|
|
323
|
-
id: 'cityOfOrigin', name: 'City of Origin', field: 'cityOfOrigin',
|
|
324
|
-
filterable: true,
|
|
325
|
-
minWidth: 100,
|
|
326
|
-
editor: {
|
|
327
|
-
model: Editors.autoComplete,
|
|
328
|
-
placeholder: '🔎︎ search city',
|
|
329
|
-
|
|
330
|
-
// We can use the autocomplete through 3 ways "collection", "collectionAsync" or with your own autocomplete options
|
|
331
|
-
// use your own autocomplete options, instead of $.ajax, use http
|
|
332
|
-
// here we use $.ajax just because I'm not sure how to configure http with JSONP and CORS
|
|
333
|
-
editorOptions: {
|
|
334
|
-
forceUserInput: true,
|
|
335
|
-
minLength: 3,
|
|
336
|
-
source: (request, response) => {
|
|
337
|
-
/** with Angular Http, note this demo won't work because of CORS */
|
|
338
|
-
// this.http.get(`http://gd.geobytes.com/AutoCompleteCity?q=${request.term}`).subscribe(data => response(data));
|
|
339
|
-
|
|
340
|
-
/** with jQuery AJAX will work locally but not on the GitHub demo because of CORS */
|
|
341
|
-
$.ajax({
|
|
342
|
-
url: 'http://gd.geobytes.com/AutoCompleteCity',
|
|
343
|
-
dataType: 'jsonp',
|
|
344
|
-
data: {
|
|
345
|
-
q: request.term
|
|
346
|
-
},
|
|
347
|
-
success: (data: any) => response(data)
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
} as AutocompleteOption,
|
|
351
|
-
},
|
|
352
|
-
filter: {
|
|
353
|
-
model: Filters.autoComplete,
|
|
354
|
-
// placeholder: '🔎︎ search city',
|
|
355
|
-
|
|
356
|
-
// We can use the autocomplete through 3 ways "collection", "collectionAsync" or with your own autocomplete options
|
|
357
|
-
// collectionAsync: this.http.get(URL_COUNTRIES_COLLECTION),
|
|
358
|
-
|
|
359
|
-
// OR use your own autocomplete options, instead of $.ajax, use http
|
|
360
|
-
// here we use $.ajax just because I'm not sure how to configure http with JSONP and CORS
|
|
361
|
-
filterOptions: {
|
|
362
|
-
minLength: 3,
|
|
363
|
-
source: (request, response) => {
|
|
364
|
-
$.ajax({
|
|
365
|
-
url: 'http://gd.geobytes.com/AutoCompleteCity',
|
|
366
|
-
dataType: 'jsonp',
|
|
367
|
-
data: {
|
|
368
|
-
q: request.term
|
|
369
|
-
},
|
|
370
|
-
success: (data: any) => response(data)
|
|
371
|
-
});
|
|
372
|
-
}
|
|
373
|
-
} as AutocompleteOption,
|
|
374
|
-
}
|
|
375
|
-
}, {
|
|
376
|
-
id: 'countryOfOrigin', name: 'Country of Origin', field: 'countryOfOrigin',
|
|
377
|
-
formatter: Formatters.complexObject,
|
|
378
|
-
exportWithFormatter: true,
|
|
379
|
-
dataKey: 'code',
|
|
380
|
-
labelKey: 'name',
|
|
381
|
-
type: FieldType.object,
|
|
382
|
-
sortComparer: SortComparers.objectString, // this sorter requires the dataKey and assume that obj1[dataKey] will be a string so it can sort it that way
|
|
383
|
-
filterable: true,
|
|
384
|
-
sortable: true,
|
|
385
|
-
minWidth: 100,
|
|
386
|
-
editor: {
|
|
387
|
-
model: Editors.autoComplete,
|
|
388
|
-
customStructure: { label: 'name', value: 'code' },
|
|
389
|
-
collectionAsync: this.http.get(URL_COUNTRIES_COLLECTION),
|
|
390
|
-
},
|
|
391
|
-
filter: {
|
|
392
|
-
model: Filters.autoComplete,
|
|
393
|
-
customStructure: { label: 'name', value: 'code' },
|
|
394
|
-
collectionAsync: this.http.get(URL_COUNTRIES_COLLECTION),
|
|
395
|
-
}
|
|
396
|
-
}, {
|
|
397
|
-
id: 'countryOfOriginName', name: 'Country of Origin Name', field: 'countryOfOriginName',
|
|
398
|
-
filterable: true,
|
|
399
|
-
sortable: true,
|
|
400
|
-
minWidth: 100,
|
|
401
|
-
editor: {
|
|
402
|
-
model: Editors.autoComplete,
|
|
403
|
-
collectionAsync: this.http.get(URL_COUNTRY_NAMES),
|
|
404
|
-
},
|
|
405
|
-
filter: {
|
|
406
|
-
model: Filters.autoComplete,
|
|
407
|
-
collectionAsync: this.http.get(URL_COUNTRY_NAMES),
|
|
408
|
-
}
|
|
409
|
-
}, {
|
|
410
|
-
id: 'effort-driven',
|
|
411
|
-
name: 'Effort Driven',
|
|
412
|
-
field: 'effortDriven',
|
|
413
|
-
minWidth: 70,
|
|
414
|
-
filterable: true,
|
|
415
|
-
type: FieldType.boolean,
|
|
416
|
-
filter: {
|
|
417
|
-
model: Filters.singleSelect,
|
|
418
|
-
collection: [{ value: '', label: '' }, { value: true, label: 'True' }, { value: false, label: 'False' }],
|
|
419
|
-
},
|
|
420
|
-
formatter: Formatters.checkmark,
|
|
421
|
-
editor: {
|
|
422
|
-
model: Editors.checkbox,
|
|
423
|
-
},
|
|
424
|
-
}, {
|
|
425
|
-
id: 'prerequisites',
|
|
426
|
-
name: 'Prerequisites',
|
|
427
|
-
field: 'prerequisites',
|
|
428
|
-
minWidth: 100,
|
|
429
|
-
filterable: true,
|
|
430
|
-
formatter: taskFormatter,
|
|
431
|
-
exportWithFormatter: true,
|
|
432
|
-
sanitizeDataExport: true,
|
|
433
|
-
sortable: true,
|
|
434
|
-
type: FieldType.string,
|
|
435
|
-
editor: {
|
|
436
|
-
placeholder: 'choose option',
|
|
437
|
-
collectionAsync: this.http.get<{ value: string; label: string; }[]>(URL_SAMPLE_COLLECTION_DATA),
|
|
438
|
-
// OR a regular collection load
|
|
439
|
-
// collection: Array.from(Array(100).keys()).map(k => ({ value: k, prefix: 'Task', label: k })),
|
|
440
|
-
collectionSortBy: {
|
|
441
|
-
property: 'label',
|
|
442
|
-
sortDesc: true
|
|
443
|
-
},
|
|
444
|
-
customStructure: {
|
|
445
|
-
label: 'label',
|
|
446
|
-
value: 'value',
|
|
447
|
-
labelPrefix: 'prefix',
|
|
448
|
-
},
|
|
449
|
-
collectionOptions: {
|
|
450
|
-
separatorBetweenTextLabels: ' '
|
|
451
|
-
},
|
|
452
|
-
model: Editors.multipleSelect,
|
|
453
|
-
required: true
|
|
454
|
-
},
|
|
455
|
-
filter: {
|
|
456
|
-
collectionAsync: this.http.get<{ value: string; label: string; }[]>(URL_SAMPLE_COLLECTION_DATA),
|
|
457
|
-
// OR a regular collection load
|
|
458
|
-
// collection: Array.from(Array(100).keys()).map(k => ({ value: k, prefix: 'Task', label: k })),
|
|
459
|
-
collectionSortBy: {
|
|
460
|
-
property: 'label',
|
|
461
|
-
sortDesc: true
|
|
462
|
-
},
|
|
463
|
-
customStructure: {
|
|
464
|
-
label: 'label',
|
|
465
|
-
value: 'value',
|
|
466
|
-
labelPrefix: 'prefix',
|
|
467
|
-
},
|
|
468
|
-
collectionOptions: {
|
|
469
|
-
separatorBetweenTextLabels: ' '
|
|
470
|
-
},
|
|
471
|
-
model: Filters.multipleSelect,
|
|
472
|
-
operator: OperatorType.inContains,
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
];
|
|
476
|
-
|
|
477
|
-
this.gridOptions = {
|
|
478
|
-
asyncEditorLoading: false,
|
|
479
|
-
autoEdit: this.isAutoEdit,
|
|
480
|
-
autoCommitEdit: false,
|
|
481
|
-
autoResize: {
|
|
482
|
-
container: '#demo-container',
|
|
483
|
-
rightPadding: 10
|
|
484
|
-
},
|
|
485
|
-
editable: true,
|
|
486
|
-
enableCellNavigation: true,
|
|
487
|
-
enableColumnPicker: true,
|
|
488
|
-
enableExcelCopyBuffer: true,
|
|
489
|
-
enableFiltering: true,
|
|
490
|
-
editCommandHandler: (item, column, editCommand) => {
|
|
491
|
-
this._commandQueue.push(editCommand);
|
|
492
|
-
editCommand.execute();
|
|
493
|
-
},
|
|
494
|
-
i18n: this.translate
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
this.dataset = this.mockData(NB_ITEMS);
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
/** Add a new row to the grid and refresh the Filter collection.
|
|
501
|
-
* Note that because Filter elements are always displayed on the screen, we need to tell the Filter,
|
|
502
|
-
* we do this via a Subject .next(), that it's collection got changed
|
|
503
|
-
* as for the Editor, there's nothing to do since the element is not shown and it will have latest collection next time it shows up
|
|
504
|
-
*/
|
|
505
|
-
addItem() {
|
|
506
|
-
const lastRowIndex = this.dataset.length;
|
|
507
|
-
const newRows = this.mockData(1, lastRowIndex);
|
|
508
|
-
|
|
509
|
-
// wrap into a timer to simulate a backend async call
|
|
510
|
-
setTimeout(() => {
|
|
511
|
-
const requisiteColumnDef = this.columnDefinitions.find((column: Column) => column.id === 'prerequisites');
|
|
512
|
-
if (requisiteColumnDef) {
|
|
513
|
-
const filterCollectionAsync = requisiteColumnDef.filter!.collectionAsync;
|
|
514
|
-
const editorCollection = requisiteColumnDef.editor!.collection;
|
|
515
|
-
|
|
516
|
-
if (Array.isArray(editorCollection)) {
|
|
517
|
-
// add the new row to the grid
|
|
518
|
-
this.angularGrid.gridService.addItem(newRows[0]);
|
|
519
|
-
|
|
520
|
-
// then refresh the Editor "collection", we have 2 ways of doing it
|
|
521
|
-
|
|
522
|
-
// Push to the Editor "collection"
|
|
523
|
-
editorCollection.push({ value: lastRowIndex, label: lastRowIndex, prefix: 'Task' });
|
|
524
|
-
|
|
525
|
-
// or replace entire "collection"
|
|
526
|
-
// durationColumnDef.editor.collection = [...collection, ...[{ value: lastRowIndex, label: lastRowIndex }]];
|
|
527
|
-
|
|
528
|
-
// for the Filter only, we have a trigger an RxJS/Subject change with the new collection
|
|
529
|
-
// we do this because Filter(s) are shown at all time, while on Editor it's unnecessary since they are only shown when opening them
|
|
530
|
-
if (filterCollectionAsync instanceof Subject) {
|
|
531
|
-
filterCollectionAsync.next(editorCollection);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
}, 250);
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* Delete last inserted row.
|
|
540
|
-
* Note that because Filter elements are always displayed on the screen, we need to tell the Filter,
|
|
541
|
-
* we do this via a Subject .next(), that it's collection got changed
|
|
542
|
-
* as for the Editor, there's nothing to do since the element is not shown and it will have latest collection next time it shows up
|
|
543
|
-
*/
|
|
544
|
-
deleteItem() {
|
|
545
|
-
const requisiteColumnDef = this.columnDefinitions.find((column: Column) => column.id === 'prerequisites');
|
|
546
|
-
if (requisiteColumnDef) {
|
|
547
|
-
const filterCollectionAsync = requisiteColumnDef.filter!.collectionAsync;
|
|
548
|
-
const filterCollection = requisiteColumnDef.filter!.collection;
|
|
549
|
-
|
|
550
|
-
if (Array.isArray(filterCollection)) {
|
|
551
|
-
// sort collection in descending order and take out last collection option
|
|
552
|
-
const selectCollectionObj = this.sortCollectionDescending(filterCollection).pop();
|
|
553
|
-
|
|
554
|
-
// then we will delete that item from the grid
|
|
555
|
-
this.angularGrid.gridService.deleteItemById(selectCollectionObj.value);
|
|
556
|
-
|
|
557
|
-
// for the Filter only, we have a trigger an RxJS/Subject change with the new collection
|
|
558
|
-
// we do this because Filter(s) are shown at all time, while on Editor it's unnecessary since they are only shown when opening them
|
|
559
|
-
if (filterCollectionAsync instanceof Subject) {
|
|
560
|
-
filterCollectionAsync.next(filterCollection);
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
sortCollectionDescending(collection: any[]) {
|
|
567
|
-
return collection.sort((item1, item2) => item1.value - item2.value);
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
mockData(itemCount: number, startingIndex = 0) {
|
|
571
|
-
// mock a dataset
|
|
572
|
-
const tempDataset = [];
|
|
573
|
-
for (let i = startingIndex; i < (startingIndex + itemCount); i++) {
|
|
574
|
-
const randomYear = 2000 + Math.floor(Math.random() * 10);
|
|
575
|
-
const randomFinishYear = (new Date().getFullYear() - 3) + Math.floor(Math.random() * 10); // use only years not lower than 3 years ago
|
|
576
|
-
const randomMonth = Math.floor(Math.random() * 11);
|
|
577
|
-
const randomDay = Math.floor((Math.random() * 29));
|
|
578
|
-
const randomPercent = Math.round(Math.random() * 100);
|
|
579
|
-
const randomFinish = new Date(randomFinishYear, (randomMonth + 1), randomDay);
|
|
580
|
-
|
|
581
|
-
tempDataset.push({
|
|
582
|
-
id: i,
|
|
583
|
-
title: 'Task ' + i,
|
|
584
|
-
duration: (i % 33 === 0) ? null : Math.round(Math.random() * 100) + '',
|
|
585
|
-
start: new Date(randomYear, randomMonth, randomDay),
|
|
586
|
-
percentComplete: randomPercent,
|
|
587
|
-
percentCompleteNumber: randomPercent,
|
|
588
|
-
finish: randomFinish < new Date() ? '' : randomFinish, // make sure the random date is earlier than today
|
|
589
|
-
effortDriven: (i % 5 === 0),
|
|
590
|
-
prerequisites: (i % 2 === 0) && i !== 0 && i < 12 ? [i, i - 1] : [],
|
|
591
|
-
countryOfOrigin: (i % 2) ? { code: 'CA', name: 'Canada' } : { code: 'US', name: 'United States' },
|
|
592
|
-
countryOfOriginName: (i % 2) ? 'Canada' : 'United States',
|
|
593
|
-
cityOfOrigin: (i % 2) ? 'Vancouver, BC, Canada' : 'Boston, MA, United States',
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
return tempDataset;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
onCellChanged(e: Event, args: any) {
|
|
600
|
-
this.updatedObject = args.item;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
onCellClicked(e: Event, args: any) {
|
|
604
|
-
const metadata = this.angularGrid.gridService.getColumnFromEventArguments(args);
|
|
605
|
-
console.log(metadata);
|
|
606
|
-
|
|
607
|
-
if (metadata.columnDef.id === 'edit') {
|
|
608
|
-
this.alertWarning = `open a modal window to edit: ${metadata.dataContext.title}`;
|
|
609
|
-
|
|
610
|
-
// highlight the row, to customize the color, you can change the SASS variable $row-highlight-background-color
|
|
611
|
-
this.angularGrid.gridService.highlightRow(args.row, 1500);
|
|
612
|
-
|
|
613
|
-
// you could also select the row, when using "enableCellNavigation: true", it automatically selects the row
|
|
614
|
-
// this.angularGrid.gridService.setSelectedRow(args.row);
|
|
615
|
-
} else if (metadata.columnDef.id === 'delete') {
|
|
616
|
-
if (confirm('Are you sure?')) {
|
|
617
|
-
this.angularGrid.gridService.deleteItemById(metadata.dataContext.id);
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
onValidationError(e: Event, args: any) {
|
|
623
|
-
if (args.validationResults) {
|
|
624
|
-
alert(args.validationResults.msg);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
changeAutoCommit() {
|
|
629
|
-
this.gridOptions.autoCommitEdit = !this.gridOptions.autoCommitEdit;
|
|
630
|
-
this.gridObj.setOptions({
|
|
631
|
-
autoCommitEdit: this.gridOptions.autoCommitEdit
|
|
632
|
-
});
|
|
633
|
-
return true;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
dynamicallyAddTitleHeader() {
|
|
637
|
-
const newCol = {
|
|
638
|
-
id: `title${this.duplicateTitleHeaderCount++}`,
|
|
639
|
-
name: 'Title',
|
|
640
|
-
field: 'title',
|
|
641
|
-
editor: {
|
|
642
|
-
model: Editors.text,
|
|
643
|
-
required: true,
|
|
644
|
-
validator: myCustomTitleValidator, // use a custom validator
|
|
645
|
-
},
|
|
646
|
-
sortable: true, minWidth: 100, filterable: true,
|
|
647
|
-
};
|
|
648
|
-
|
|
649
|
-
// you can dynamically add your column to your column definitions
|
|
650
|
-
// and then use the spread operator [...cols] OR slice to force Angular to review the changes
|
|
651
|
-
this.columnDefinitions.push(newCol);
|
|
652
|
-
this.columnDefinitions = this.columnDefinitions.slice(); // or use spread operator [...cols]
|
|
653
|
-
|
|
654
|
-
// NOTE if you use an Extensions (Checkbox Selector, Row Detail, ...) that modifies the column definitions in any way
|
|
655
|
-
// you MUST use "getAllColumnDefinitions()" from the GridService, using this will be ALL columns including the 1st column that is created internally
|
|
656
|
-
// for example if you use the Checkbox Selector (row selection), you MUST use the code below
|
|
657
|
-
/*
|
|
658
|
-
const allColumns = this.angularGrid.gridService.getAllColumnDefinitions();
|
|
659
|
-
allColumns.push(newCol);
|
|
660
|
-
this.columnDefinitions = [...allColumns]; // (or use slice) reassign to column definitions for Angular to do dirty checking
|
|
661
|
-
*/
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
dynamicallyRemoveLastColumn() {
|
|
665
|
-
this.columnDefinitions.pop();
|
|
666
|
-
this.columnDefinitions = this.columnDefinitions.slice();
|
|
667
|
-
|
|
668
|
-
// NOTE if you use an Extensions (Checkbox Selector, Row Detail, ...) that modifies the column definitions in any way
|
|
669
|
-
// you MUST use the code below, first you must reassign the Editor facade (from the internalColumnEditor back to the editor)
|
|
670
|
-
// in other words, SlickGrid is not using the same as Angular-Slickgrid uses (editor with a "model" and other properties are a facade, SlickGrid only uses what is inside the model)
|
|
671
|
-
/*
|
|
672
|
-
const allColumns = this.angularGrid.gridService.getAllColumnDefinitions();
|
|
673
|
-
const allOriginalColumns = allColumns.map((column) => {
|
|
674
|
-
column.editor = column.internalColumnEditor;
|
|
675
|
-
return column;
|
|
676
|
-
});
|
|
677
|
-
|
|
678
|
-
// remove your column the full set of columns
|
|
679
|
-
// and use slice or spread [...] to trigger an Angular dirty change
|
|
680
|
-
allOriginalColumns.pop();
|
|
681
|
-
this.columnDefinitions = allOriginalColumns.slice();
|
|
682
|
-
*/
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
setAutoEdit(isAutoEdit: boolean) {
|
|
686
|
-
this.isAutoEdit = isAutoEdit;
|
|
687
|
-
this.gridObj.setOptions({ autoEdit: isAutoEdit }); // change the grid option dynamically
|
|
688
|
-
return true;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
undo() {
|
|
692
|
-
const command = this._commandQueue.pop();
|
|
693
|
-
const item = this.angularGrid.dataView.getItem(command.row);
|
|
694
|
-
if (command && Slick.GlobalEditorLock.cancelCurrentEdit()) {
|
|
695
|
-
command.undo();
|
|
696
|
-
this.gridObj.gotoCell(command.row, command.cell, false);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
}
|