@theseam/ui-common 1.0.0-beta.5 → 1.0.0-beta.7
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/breadcrumbs/index.d.ts +1 -2
- package/buttons/index.d.ts +20 -13
- package/datatable/index.d.ts +8 -8
- package/dynamic/index.d.ts +5 -5
- package/fesm2022/theseam-ui-common-asset-reader.mjs +28 -29
- package/fesm2022/theseam-ui-common-asset-reader.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-breadcrumbs.mjs +25 -31
- package/fesm2022/theseam-ui-common-breadcrumbs.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-buttons.mjs +108 -66
- package/fesm2022/theseam-ui-common-buttons.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-card.mjs +21 -21
- package/fesm2022/theseam-ui-common-card.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-carousel.mjs +28 -30
- package/fesm2022/theseam-ui-common-carousel.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-checkbox.mjs +27 -27
- package/fesm2022/theseam-ui-common-checkbox.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-confirm-dialog.mjs +23 -27
- package/fesm2022/theseam-ui-common-confirm-dialog.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-core.mjs +31 -11
- package/fesm2022/theseam-ui-common-core.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-data-exporter.mjs +18 -19
- package/fesm2022/theseam-ui-common-data-exporter.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-data-filters.mjs +80 -64
- package/fesm2022/theseam-ui-common-data-filters.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs +51 -49
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable-dynamic.mjs +145 -112
- package/fesm2022/theseam-ui-common-datatable-dynamic.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable.mjs +581 -385
- package/fesm2022/theseam-ui-common-datatable.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs +12 -14
- package/fesm2022/theseam-ui-common-dynamic-component-loader.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-dynamic.mjs +60 -48
- package/fesm2022/theseam-ui-common-dynamic.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-footer-bar.mjs +9 -15
- package/fesm2022/theseam-ui-common-footer-bar.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-form-field-error.mjs +60 -43
- package/fesm2022/theseam-ui-common-form-field-error.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-form-field.mjs +120 -74
- package/fesm2022/theseam-ui-common-form-field.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-framework.mjs +669 -543
- package/fesm2022/theseam-ui-common-framework.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-google-maps.mjs +206 -149
- package/fesm2022/theseam-ui-common-google-maps.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-graphql.mjs +252 -195
- package/fesm2022/theseam-ui-common-graphql.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-icon.mjs +125 -89
- package/fesm2022/theseam-ui-common-icon.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-layout.mjs +18 -26
- package/fesm2022/theseam-ui-common-layout.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-loading.mjs +19 -28
- package/fesm2022/theseam-ui-common-loading.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-menu.mjs +124 -95
- package/fesm2022/theseam-ui-common-menu.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-modal.mjs +177 -129
- package/fesm2022/theseam-ui-common-modal.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-models.mjs +3 -3
- package/fesm2022/theseam-ui-common-models.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-navigation-reload.mjs +13 -11
- package/fesm2022/theseam-ui-common-navigation-reload.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-popover.mjs +81 -88
- package/fesm2022/theseam-ui-common-popover.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-progress.mjs +15 -19
- package/fesm2022/theseam-ui-common-progress.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-rich-text.mjs +65 -52
- package/fesm2022/theseam-ui-common-rich-text.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-scrollbar.mjs +12 -9
- package/fesm2022/theseam-ui-common-scrollbar.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-services.mjs +41 -26
- package/fesm2022/theseam-ui-common-services.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-shared.mjs +123 -68
- package/fesm2022/theseam-ui-common-shared.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-storage.mjs +9 -6
- package/fesm2022/theseam-ui-common-storage.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-story-helpers.mjs +148 -86
- package/fesm2022/theseam-ui-common-story-helpers.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tabbed.mjs +43 -39
- package/fesm2022/theseam-ui-common-tabbed.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table-cell-type.mjs +34 -38
- package/fesm2022/theseam-ui-common-table-cell-type.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table-cell-types.mjs +182 -144
- package/fesm2022/theseam-ui-common-table-cell-types.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-table.mjs +50 -39
- package/fesm2022/theseam-ui-common-table.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tel-input.mjs +98 -63
- package/fesm2022/theseam-ui-common-tel-input.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-testing.mjs +13 -10
- package/fesm2022/theseam-ui-common-testing.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tiled-select.mjs +54 -50
- package/fesm2022/theseam-ui-common-tiled-select.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-toggle-edit.mjs +41 -37
- package/fesm2022/theseam-ui-common-toggle-edit.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-toggle-group.mjs +30 -31
- package/fesm2022/theseam-ui-common-toggle-group.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tooltip.mjs +225 -66
- package/fesm2022/theseam-ui-common-tooltip.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs +14 -12
- package/fesm2022/theseam-ui-common-unsaved-changes-dialog.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-utils.mjs +113 -77
- package/fesm2022/theseam-ui-common-utils.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-validators.mjs +10 -9
- package/fesm2022/theseam-ui-common-validators.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-vertical-list-filter.mjs +39 -17
- package/fesm2022/theseam-ui-common-vertical-list-filter.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-viewers.mjs +80 -53
- package/fesm2022/theseam-ui-common-viewers.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-widget.mjs +288 -314
- package/fesm2022/theseam-ui-common-widget.mjs.map +1 -1
- package/framework/base-layout/base-layout.component.scss +9 -4
- package/framework/base-layout/styles/_variables.scss +4 -9
- package/framework/dashboard/dashboard-widgets/dashboard-widgets.component.scss +6 -4
- package/framework/index.d.ts +6 -6
- package/framework/nav/nav-item/nav-item.component.scss +7 -6
- package/framework/nav/styles/_themes/light/_variables.scss +21 -5
- package/framework/nav/styles/_themes/primary/_variables.scss +21 -5
- package/framework/side-nav/side-nav-item/side-nav-item.component.scss +5 -2
- package/framework/side-nav/styles/_themes/light/_variables.scss +5 -1
- package/framework/side-nav/styles/_themes/primary/_variables.scss +25 -5
- package/graphql/index.d.ts +5 -5
- package/modal/README.md +5 -5
- package/modal/index.d.ts +1 -1
- package/models/index.d.ts +1 -1
- package/package.json +65 -65
- package/popover/index.d.ts +0 -2
- package/progress/progress-circle/styles/_variables.scss +15 -3
- package/story-helpers/index.d.ts +11 -1
- package/styles/bootstrap/_bootstrap.scss +34 -34
- package/styles/bootstrap/_bs-styles.scss +4 -8
- package/styles/bootstrap/_bs-utilities.scss +4 -4
- package/styles/bootstrap/_bs-variables.scss +65 -70
- package/styles/common/_forms.scss +9 -10
- package/styles/common/_global.scss +0 -1
- package/styles/common/_hacks.scss +1 -1
- package/styles/common/_table.scss +0 -1
- package/styles/common/_text.scss +3 -1
- package/styles/theme.scss +1 -1
- package/styles/vendor/ng-select/_ng-select-bs4.scss +292 -294
- package/styles/vendor/ngx-datatable/_ngx-datatable.scss +63 -32
- package/styles/vendor/ngx-datatable/_themes/bootstrap/_variables.scss +37 -10
- package/styles/vendor/ngx-datatable/_themes/material/_variables.scss +3 -1
- package/styles/vendor/quill/_quill.scss +15 -9
- package/tel-input/README.md +27 -27
- package/utils/index.d.ts +3 -3
- package/viewers/index.d.ts +9 -2
- package/widget/_widget-theme.scss +1 -1
- package/widget/styles/_variables.scss +2 -2
- package/widget/widget/widget.component.scss +0 -2
- package/widget/widget-content-components/widget-tile/widget-tile.component.scss +1 -3
- package/widget/widget-footer/widget-footer.component.scss +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theseam-ui-common-services.mjs","sources":["../../../projects/ui-common/services/preferences/preferences-record.ts","../../../projects/ui-common/services/preferences/preferences-manager.service.ts","../../../projects/ui-common/services/asset-loader.service.ts","../../../projects/ui-common/services/router-helpers.service.ts","../../../projects/ui-common/services/font-loader.service.ts","../../../projects/ui-common/services/theseam-ui-common-services.ts"],"sourcesContent":["import { isDevMode } from '@angular/core'\nimport { map, Observable, of, shareReplay, startWith, Subject, switchMap, take, tap } from 'rxjs'\n\nimport { notNullOrUndefined } from '@theseam/ui-common/utils'\n\nimport { TheSeamPreferencesAccessor } from './preferences-accessor'\nimport { TheSeamPreferencesBase } from './preferences.models'\n\nexport type TheSeamPreferencesRecordStatus = 'pending' | 'loaded'\n\nexport interface TheSeamPreferencesRecordStatusChange {\n previous: TheSeamPreferencesRecordStatus\n current: TheSeamPreferencesRecordStatus\n}\n\nexport class TheSeamPreferencesMapRecord {\n\n private readonly _refreshSubject = new Subject<void>()\n private readonly _statusChangeSubject = new Subject<TheSeamPreferencesRecordStatusChange>()\n\n private _status: TheSeamPreferencesRecordStatus = 'pending'\n\n public readonly observable: Observable<TheSeamPreferencesBase>\n public readonly statusChange: Observable<TheSeamPreferencesRecordStatusChange>\n\n constructor(\n private readonly _key: string,\n private readonly _accessor: TheSeamPreferencesAccessor,\n private readonly _emptyPrefs: TheSeamPreferencesBase,\n ) {\n this.observable = this._createObservable()\n this.statusChange = this._statusChangeSubject.asObservable()\n }\n\n private _createObservable(): Observable<TheSeamPreferencesBase> {\n if (!this._accessor) {\n return of(this._emptyPrefs)\n }\n\n const accessor = (key: string): Observable<string> =>\n this._accessor ? this._accessor.get(key) : of(JSON.stringify(this._emptyPrefs))\n\n return this._refreshSubject.pipe(\n startWith(undefined),\n switchMap(() => accessor(this._key).pipe(\n map(v => {\n if (!v) {\n return null\n }\n\n // TODO: Add a schema validator and migration tool to avoid parsing issues.\n try {\n return this._descerializePreferences(v)\n } catch (error) {\n if (isDevMode()) {\n // eslint-disable-next-line no-console\n console.error(error)\n }\n return null\n }\n }),\n map(v => notNullOrUndefined(v) ? v : this._emptyPrefs),\n tap(() => {\n this._setStatus('loaded')\n })\n )),\n shareReplay({ bufferSize: 1, refCount: true }),\n )\n }\n\n public update(value: TheSeamPreferencesBase): void {\n this._accessor.update(this._key, JSON.stringify(value)).pipe(take(1)).subscribe()\n }\n\n public delete(): void {\n this._accessor.delete(this._key).pipe(take(1)).subscribe()\n }\n\n public refresh(): void {\n this._setStatus('pending')\n this._refreshSubject.next()\n }\n\n public isSameAccessor(accessor: TheSeamPreferencesAccessor): boolean {\n return this._accessor === accessor\n }\n\n public isSameEmptyPrefs(emptyPrefs: TheSeamPreferencesBase): boolean {\n return JSON.stringify(this._emptyPrefs) === JSON.stringify(emptyPrefs)\n }\n\n get status(): TheSeamPreferencesRecordStatus {\n return this._status\n }\n\n private _setStatus(status: TheSeamPreferencesRecordStatus): void {\n if (this._status === status) {\n return\n }\n const prev = this._status\n this._status = status\n this._statusChangeSubject.next({ previous: prev, current: status })\n }\n\n private _descerializePreferences(serialized: string): TheSeamPreferencesBase {\n const prefs = JSON.parse(serialized)\n\n // TODO: Implement migration\n\n return prefs\n }\n}\n","import { Injectable } from '@angular/core'\nimport { map, Observable } from 'rxjs'\n\nimport { TheSeamPreferencesBase } from './preferences.models'\nimport { TheSeamPreferencesAccessor } from './preferences-accessor'\nimport { TheSeamPreferencesMapRecord } from './preferences-record'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TheSeamPreferencesManagerService {\n\n private readonly _tablePrefsMap = new Map<string, TheSeamPreferencesMapRecord>()\n\n public preferences(\n preferenceKey: string,\n accessor: TheSeamPreferencesAccessor,\n emptyPrefs: TheSeamPreferencesBase,\n ): Observable<TheSeamPreferencesBase> {\n let prefs = this._tablePrefsMap.get(preferenceKey)\n\n if (prefs && !prefs.isSameAccessor(accessor)) {\n throw Error(`Preferences accessor mismatch for key '${preferenceKey}'. Changing the accessor is not supported.`)\n }\n\n if (prefs && !prefs.isSameEmptyPrefs(emptyPrefs)) {\n throw Error(`Preferences emptyPrefs mismatch for key '${preferenceKey}'. Changing the emptyPrefs is not supported.`)\n }\n\n if (!prefs) {\n prefs = new TheSeamPreferencesMapRecord(preferenceKey, accessor, emptyPrefs)\n this._tablePrefsMap.set(preferenceKey, prefs)\n }\n return prefs.observable.pipe(\n map(v => {\n // This is for assuming the accessor returned an empty object, as a\n // default for a missing preference. Instead of throwing an error, we\n // return a valid empty preferences.\n //\n // NOTE: May remove this, when a more generic preferences implementation\n // is finished.\n if (Object.keys(v).length === 0) {\n return emptyPrefs\n }\n\n return v\n }),\n )\n }\n\n public update(preferenceKey: string, value: TheSeamPreferencesBase): void {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n if (prefs) {\n prefs.update(value)\n }\n }\n\n public delete(preferenceKey: string): void {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n if (prefs) {\n prefs.delete()\n }\n }\n\n public refresh(preferenceKey: string): void {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n if (prefs) {\n prefs.refresh()\n }\n }\n\n public isPending(preferenceKey: string): boolean {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n return prefs ? prefs.status === 'pending' : false\n }\n\n public isLoaded(preferenceKey: string): boolean {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n return prefs ? prefs.status === 'loaded' : false\n }\n\n}\n","import { Injectable } from '@angular/core'\nimport { defer, Observable } from 'rxjs'\nimport { map } from 'rxjs/operators'\n\nimport { loadStyle, loadStyleSheet } from '@theseam/ui-common/utils'\n\nexport class LoadedAssetRef<T extends HTMLLinkElement | HTMLScriptElement | HTMLStyleElement> {\n\n constructor(\n public readonly nativeElement: T,\n public readonly path?: string,\n public readonly content?: string\n ) {\n\n }\n\n public destroy(): void {\n this.nativeElement.parentElement?.removeChild(this.nativeElement)\n }\n\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AssetLoaderService {\n\n public loadStyleSheet(path: string): Observable<LoadedAssetRef<HTMLLinkElement>> {\n return defer(() => loadStyleSheet(path)).pipe(map(v => new LoadedAssetRef(v, path)))\n }\n\n public loadStyle(content: string): Observable<LoadedAssetRef<HTMLStyleElement>> {\n return defer(() => loadStyle(content)).pipe(map(v => new LoadedAssetRef(v, undefined, content)))\n }\n\n}\n","import { Injectable } from '@angular/core'\nimport { IsActiveMatchOptions, NavigationEnd, Router, UrlTree } from '@angular/router'\nimport { Observable } from 'rxjs'\nimport { filter, map, startWith } from 'rxjs/operators'\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RouterHelpersService {\n\n constructor(\n private _router: Router\n ) { }\n\n public isActive(url: string | UrlTree, exact: boolean): Observable<boolean> {\n const opts: IsActiveMatchOptions = exact\n ? { paths: 'exact', queryParams: 'exact', fragment: 'ignored', matrixParams: 'ignored' }\n : { paths: 'subset', queryParams: 'subset', fragment: 'ignored', matrixParams: 'ignored' }\n\n return this._router.events.pipe(\n filter(event => event instanceof NavigationEnd),\n map(event => this._router.isActive(url, opts)),\n startWith(this._router.isActive(url, opts))\n )\n }\n}\n","import { Injectable } from '@angular/core'\n\nimport { Observable, Subscriber } from 'rxjs'\nimport WebFont from 'webfontloader'\n\nimport { hasProperty } from '@theseam/ui-common/utils'\n\nexport type TheSeamFontEvents =\n { type: 'loading' } |\n { type: 'active' } |\n { type: 'inactive' } |\n { type: 'fontloading', familyName: string, fvd: string } |\n { type: 'fontactive', familyName: string, fvd: string } |\n { type: 'fontinactive', familyName: string, fvd: string }\n\n/**\n * Service to help loading fonts.\n *\n * Currently this is just a wrapper for the parts of webfontloader that we need.\n * Eventually this should be generic enough that we can switch loaders without\n * config differences being confusing.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class TheSeamFontLoaderService {\n\n /**\n * Since this method is just a wrapper for webfontloader right now it accepts\n * anything webfontloader's config accepts, so the event callbacks can still\n * be used, but you should us the emitted objects instead. If we decide to\n * support other font loaders then the event callbacks will most likely be\n * removed.\n *\n * NOTE: If you need to use the events callbacks for some reason, this\n * method's returned observable will still need to be subscribed to, because\n * it doesn't start till subscribed to.\n */\n public load(config: WebFont.Config): Observable<TheSeamFontEvents> {\n return new Observable((subscriber: Subscriber<TheSeamFontEvents>) => {\n WebFont.load({\n ...config,\n /** This event is triggered when all fonts have been requested. */\n loading: () => {\n if (hasProperty(config, 'loading')) {\n config.loading()\n }\n subscriber.next({ type: 'loading' })\n },\n /** This event is triggered when the fonts have rendered. */\n active: () => {\n if (hasProperty(config, 'active')) {\n config.active()\n }\n subscriber.next({ type: 'active' })\n },\n /** This event is triggered when the browser does not support linked fonts or if none of the fonts could be loaded. */\n inactive: () => {\n if (hasProperty(config, 'inactive')) {\n config.inactive()\n }\n subscriber.next({ type: 'inactive' })\n },\n /** This event is triggered once for each font that's loaded. */\n fontloading: (familyName: string, fvd: string) => {\n if (hasProperty(config, 'fontloading')) {\n config.fontloading(familyName, fvd)\n }\n subscriber.next({ type: 'fontloading', familyName, fvd })\n },\n /** This event is triggered once for each font that renders. */\n fontactive: (familyName: string, fvd: string) => {\n if (hasProperty(config, 'fontactive')) {\n config.fontactive(familyName, fvd)\n }\n subscriber.next({ type: 'fontactive', familyName, fvd })\n },\n /** This event is triggered if the font can't be loaded. */\n fontinactive: (familyName: string, fvd: string) => {\n if (hasProperty(config, 'fontinactive')) {\n config.fontinactive(familyName, fvd)\n }\n subscriber.next({ type: 'fontinactive', familyName, fvd })\n },\n })\n })\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["map","startWith"],"mappings":";;;;;;;;;MAea,2BAA2B,CAAA;AAWnB,IAAA,IAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AAXF,IAAA,eAAe,GAAG,IAAI,OAAO,EAAQ;AACrC,IAAA,oBAAoB,GAAG,IAAI,OAAO,EAAwC;IAEnF,OAAO,GAAmC,SAAS;AAE3C,IAAA,UAAU;AACV,IAAA,YAAY;AAE5B,IAAA,WAAA,CACmB,IAAY,EACZ,SAAqC,EACrC,WAAmC,EAAA;QAFnC,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,WAAW,GAAX,WAAW;AAE5B,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,EAAE;QAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,oBAAoB,CAAC,YAAY,EAAE;IAC9D;IAEQ,iBAAiB,GAAA;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AACnB,YAAA,OAAO,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;QAC7B;AAEA,QAAA,MAAM,QAAQ,GAAG,CAAC,GAAW,KAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IA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A,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA;;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"theseam-ui-common-services.mjs","sources":["../../../projects/ui-common/services/preferences/preferences-record.ts","../../../projects/ui-common/services/preferences/preferences-manager.service.ts","../../../projects/ui-common/services/asset-loader.service.ts","../../../projects/ui-common/services/router-helpers.service.ts","../../../projects/ui-common/services/font-loader.service.ts","../../../projects/ui-common/services/theseam-ui-common-services.ts"],"sourcesContent":["import { isDevMode } from '@angular/core'\nimport {\n map,\n Observable,\n of,\n shareReplay,\n startWith,\n Subject,\n switchMap,\n take,\n tap,\n} from 'rxjs'\n\nimport { notNullOrUndefined } from '@theseam/ui-common/utils'\n\nimport { TheSeamPreferencesAccessor } from './preferences-accessor'\nimport { TheSeamPreferencesBase } from './preferences.models'\n\nexport type TheSeamPreferencesRecordStatus = 'pending' | 'loaded'\n\nexport interface TheSeamPreferencesRecordStatusChange {\n previous: TheSeamPreferencesRecordStatus\n current: TheSeamPreferencesRecordStatus\n}\n\nexport class TheSeamPreferencesMapRecord {\n private readonly _refreshSubject = new Subject<void>()\n private readonly _statusChangeSubject =\n new Subject<TheSeamPreferencesRecordStatusChange>()\n\n private _status: TheSeamPreferencesRecordStatus = 'pending'\n\n public readonly observable: Observable<TheSeamPreferencesBase>\n public readonly statusChange: Observable<TheSeamPreferencesRecordStatusChange>\n\n constructor(\n private readonly _key: string,\n private readonly _accessor: TheSeamPreferencesAccessor,\n private readonly _emptyPrefs: TheSeamPreferencesBase,\n ) {\n this.observable = this._createObservable()\n this.statusChange = this._statusChangeSubject.asObservable()\n }\n\n private _createObservable(): Observable<TheSeamPreferencesBase> {\n if (!this._accessor) {\n return of(this._emptyPrefs)\n }\n\n const accessor = (key: string): Observable<string> =>\n this._accessor\n ? this._accessor.get(key)\n : of(JSON.stringify(this._emptyPrefs))\n\n return this._refreshSubject.pipe(\n startWith(undefined),\n switchMap(() =>\n accessor(this._key).pipe(\n map((v) => {\n if (!v) {\n return null\n }\n\n // TODO: Add a schema validator and migration tool to avoid parsing issues.\n try {\n return this._descerializePreferences(v)\n } catch (error) {\n if (isDevMode()) {\n // eslint-disable-next-line no-console\n console.error(error)\n }\n return null\n }\n }),\n map((v) => (notNullOrUndefined(v) ? v : this._emptyPrefs)),\n tap(() => {\n this._setStatus('loaded')\n }),\n ),\n ),\n shareReplay({ bufferSize: 1, refCount: true }),\n )\n }\n\n public update(value: TheSeamPreferencesBase): void {\n this._accessor\n .update(this._key, JSON.stringify(value))\n .pipe(take(1))\n .subscribe()\n }\n\n public delete(): void {\n this._accessor.delete(this._key).pipe(take(1)).subscribe()\n }\n\n public refresh(): void {\n this._setStatus('pending')\n this._refreshSubject.next()\n }\n\n public isSameAccessor(accessor: TheSeamPreferencesAccessor): boolean {\n return this._accessor === accessor\n }\n\n public isSameEmptyPrefs(emptyPrefs: TheSeamPreferencesBase): boolean {\n return JSON.stringify(this._emptyPrefs) === JSON.stringify(emptyPrefs)\n }\n\n get status(): TheSeamPreferencesRecordStatus {\n return this._status\n }\n\n private _setStatus(status: TheSeamPreferencesRecordStatus): void {\n if (this._status === status) {\n return\n }\n const prev = this._status\n this._status = status\n this._statusChangeSubject.next({ previous: prev, current: status })\n }\n\n private _descerializePreferences(serialized: string): TheSeamPreferencesBase {\n const prefs = JSON.parse(serialized)\n\n // TODO: Implement migration\n\n return prefs\n }\n}\n","import { Injectable } from '@angular/core'\nimport { map, Observable } from 'rxjs'\n\nimport { TheSeamPreferencesBase } from './preferences.models'\nimport { TheSeamPreferencesAccessor } from './preferences-accessor'\nimport { TheSeamPreferencesMapRecord } from './preferences-record'\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TheSeamPreferencesManagerService {\n private readonly _tablePrefsMap = new Map<\n string,\n TheSeamPreferencesMapRecord\n >()\n\n public preferences(\n preferenceKey: string,\n accessor: TheSeamPreferencesAccessor,\n emptyPrefs: TheSeamPreferencesBase,\n ): Observable<TheSeamPreferencesBase> {\n let prefs = this._tablePrefsMap.get(preferenceKey)\n\n if (prefs && !prefs.isSameAccessor(accessor)) {\n throw Error(\n `Preferences accessor mismatch for key '${preferenceKey}'. Changing the accessor is not supported.`,\n )\n }\n\n if (prefs && !prefs.isSameEmptyPrefs(emptyPrefs)) {\n throw Error(\n `Preferences emptyPrefs mismatch for key '${preferenceKey}'. Changing the emptyPrefs is not supported.`,\n )\n }\n\n if (!prefs) {\n prefs = new TheSeamPreferencesMapRecord(\n preferenceKey,\n accessor,\n emptyPrefs,\n )\n this._tablePrefsMap.set(preferenceKey, prefs)\n }\n return prefs.observable.pipe(\n map((v) => {\n // This is for assuming the accessor returned an empty object, as a\n // default for a missing preference. Instead of throwing an error, we\n // return a valid empty preferences.\n //\n // NOTE: May remove this, when a more generic preferences implementation\n // is finished.\n if (Object.keys(v).length === 0) {\n return emptyPrefs\n }\n\n return v\n }),\n )\n }\n\n public update(preferenceKey: string, value: TheSeamPreferencesBase): void {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n if (prefs) {\n prefs.update(value)\n }\n }\n\n public delete(preferenceKey: string): void {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n if (prefs) {\n prefs.delete()\n }\n }\n\n public refresh(preferenceKey: string): void {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n if (prefs) {\n prefs.refresh()\n }\n }\n\n public isPending(preferenceKey: string): boolean {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n return prefs ? prefs.status === 'pending' : false\n }\n\n public isLoaded(preferenceKey: string): boolean {\n const prefs = this._tablePrefsMap.get(preferenceKey)\n return prefs ? prefs.status === 'loaded' : false\n }\n}\n","import { Injectable } from '@angular/core'\nimport { defer, Observable } from 'rxjs'\nimport { map } from 'rxjs/operators'\n\nimport { loadStyle, loadStyleSheet } from '@theseam/ui-common/utils'\n\nexport class LoadedAssetRef<\n T extends HTMLLinkElement | HTMLScriptElement | HTMLStyleElement,\n> {\n constructor(\n public readonly nativeElement: T,\n public readonly path?: string,\n public readonly content?: string,\n ) {}\n\n public destroy(): void {\n this.nativeElement.parentElement?.removeChild(this.nativeElement)\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AssetLoaderService {\n public loadStyleSheet(\n path: string,\n ): Observable<LoadedAssetRef<HTMLLinkElement>> {\n return defer(() => loadStyleSheet(path)).pipe(\n map((v) => new LoadedAssetRef(v, path)),\n )\n }\n\n public loadStyle(\n content: string,\n ): Observable<LoadedAssetRef<HTMLStyleElement>> {\n return defer(() => loadStyle(content)).pipe(\n map((v) => new LoadedAssetRef(v, undefined, content)),\n )\n }\n}\n","import { Injectable } from '@angular/core'\nimport {\n IsActiveMatchOptions,\n NavigationEnd,\n Router,\n UrlTree,\n} from '@angular/router'\nimport { Observable } from 'rxjs'\nimport { filter, map, startWith } from 'rxjs/operators'\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RouterHelpersService {\n constructor(private _router: Router) {}\n\n public isActive(url: string | UrlTree, exact: boolean): Observable<boolean> {\n const opts: IsActiveMatchOptions = exact\n ? {\n paths: 'exact',\n queryParams: 'exact',\n fragment: 'ignored',\n matrixParams: 'ignored',\n }\n : {\n paths: 'subset',\n queryParams: 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored',\n }\n\n return this._router.events.pipe(\n filter((event) => event instanceof NavigationEnd),\n map((event) => this._router.isActive(url, opts)),\n startWith(this._router.isActive(url, opts)),\n )\n }\n}\n","import { Injectable } from '@angular/core'\n\nimport { Observable, Subscriber } from 'rxjs'\nimport WebFont from 'webfontloader'\n\nimport { hasProperty } from '@theseam/ui-common/utils'\n\nexport type TheSeamFontEvents =\n | { type: 'loading' }\n | { type: 'active' }\n | { type: 'inactive' }\n | { type: 'fontloading'; familyName: string; fvd: string }\n | { type: 'fontactive'; familyName: string; fvd: string }\n | { type: 'fontinactive'; familyName: string; fvd: string }\n\n/**\n * Service to help loading fonts.\n *\n * Currently this is just a wrapper for the parts of webfontloader that we need.\n * Eventually this should be generic enough that we can switch loaders without\n * config differences being confusing.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TheSeamFontLoaderService {\n /**\n * Since this method is just a wrapper for webfontloader right now it accepts\n * anything webfontloader's config accepts, so the event callbacks can still\n * be used, but you should us the emitted objects instead. If we decide to\n * support other font loaders then the event callbacks will most likely be\n * removed.\n *\n * NOTE: If you need to use the events callbacks for some reason, this\n * method's returned observable will still need to be subscribed to, because\n * it doesn't start till subscribed to.\n */\n public load(config: WebFont.Config): Observable<TheSeamFontEvents> {\n return new Observable((subscriber: Subscriber<TheSeamFontEvents>) => {\n WebFont.load({\n ...config,\n /** This event is triggered when all fonts have been requested. */\n loading: () => {\n if (hasProperty(config, 'loading')) {\n config.loading()\n }\n subscriber.next({ type: 'loading' })\n },\n /** This event is triggered when the fonts have rendered. */\n active: () => {\n if (hasProperty(config, 'active')) {\n config.active()\n }\n subscriber.next({ type: 'active' })\n },\n /** This event is triggered when the browser does not support linked fonts or if none of the fonts could be loaded. */\n inactive: () => {\n if (hasProperty(config, 'inactive')) {\n config.inactive()\n }\n subscriber.next({ type: 'inactive' })\n },\n /** This event is triggered once for each font that's loaded. */\n fontloading: (familyName: string, fvd: string) => {\n if (hasProperty(config, 'fontloading')) {\n config.fontloading(familyName, fvd)\n }\n subscriber.next({ type: 'fontloading', familyName, fvd })\n },\n /** This event is triggered once for each font that renders. */\n fontactive: (familyName: string, fvd: string) => {\n if (hasProperty(config, 'fontactive')) {\n config.fontactive(familyName, fvd)\n }\n subscriber.next({ type: 'fontactive', familyName, fvd })\n },\n /** This event is triggered if the font can't be loaded. */\n fontinactive: (familyName: string, fvd: string) => {\n if (hasProperty(config, 'fontinactive')) {\n config.fontinactive(familyName, fvd)\n }\n subscriber.next({ type: 'fontinactive', familyName, fvd })\n },\n })\n })\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["map","startWith"],"mappings":";;;;;;;;;MAyBa,2BAA2B,CAAA;AAWnB,IAAA,IAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AAZF,IAAA,eAAe,GAAG,IAAI,OAAO,EAAQ;AACrC,IAAA,oBAAoB,GACnC,IAAI,OAAO,EAAwC;IAE7C,OAAO,GAAmC,SAAS;AAE3C,IAAA,UAAU;AACV,IAAA,YAAY;AAE5B,IAAA,WAAA,CACmB,IAAY,EACZ,SAAqC,EACrC,WAAmC,EAAA;QAFnC,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,WAAW,GAAX,WAAW;AAE5B,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,EAAE;QAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,oBAAoB,CAAC,YAAY,EAAE;IAC9D;IAEQ,iBAAiB,GAAA;AACvB,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;AACnB,YAAA,OAAO,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC;QAC7B;QAEA,MAAM,QAAQ,GAAG,CAAC,GAAW,KAC3B,IAAI,CAAC;cACD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG;AACxB,cAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAE1C,QAAA,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAC9B,SAAS,CAAC,SAAS,CAAC,EACpB,SAAS,CAAC,MACR,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CACtB,GAAG,CAAC,CAAC,CAAC,KAAI;YACR,IAAI,CAAC,CAAC,EAAE;AACN,gBAAA,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;;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -17,7 +17,9 @@ class TheSeamPasswordInputRevealComponent {
|
|
|
17
17
|
static ngAcceptInputType_passwordVisible;
|
|
18
18
|
faEye = faEye;
|
|
19
19
|
faEyeSlash = faEyeSlash;
|
|
20
|
-
get inputRef() {
|
|
20
|
+
get inputRef() {
|
|
21
|
+
return this._passwordInput;
|
|
22
|
+
}
|
|
21
23
|
set inputRef(value) {
|
|
22
24
|
this._passwordInput = value;
|
|
23
25
|
this.updateRevealState();
|
|
@@ -27,7 +29,9 @@ class TheSeamPasswordInputRevealComponent {
|
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
_passwordInput;
|
|
30
|
-
get passwordVisible() {
|
|
32
|
+
get passwordVisible() {
|
|
33
|
+
return this._passwordVisible;
|
|
34
|
+
}
|
|
31
35
|
set passwordVisible(value) {
|
|
32
36
|
this._passwordVisible = coerceBooleanProperty(value);
|
|
33
37
|
this.updateRevealState();
|
|
@@ -41,18 +45,24 @@ class TheSeamPasswordInputRevealComponent {
|
|
|
41
45
|
revealPassword() {
|
|
42
46
|
this.passwordVisible = !this.passwordVisible;
|
|
43
47
|
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
45
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
46
|
-
<fa-icon
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamPasswordInputRevealComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamPasswordInputRevealComponent, isStandalone: true, selector: "seam-password-input-reveal", inputs: { inputRef: "inputRef", passwordVisible: "passwordVisible" }, ngImport: i0, template: `
|
|
50
|
+
<fa-icon
|
|
51
|
+
[icon]="passwordVisible ? faEyeSlash : faEye"
|
|
52
|
+
class="password-reveal-icon"
|
|
53
|
+
(click)="revealPassword()"
|
|
54
|
+
></fa-icon>
|
|
47
55
|
`, isInline: true, styles: [":host{display:flex;align-items:center;position:absolute;top:0;right:0;bottom:0;width:30px;transform:translateZ(0);z-index:50}:host fa-icon{opacity:1;color:#bababa;cursor:pointer}:host fa-icon ::ng-deep .svg-inline--fa{vertical-align:middle}\n"], dependencies: [{ kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] });
|
|
48
56
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamPasswordInputRevealComponent, decorators: [{
|
|
50
58
|
type: Component,
|
|
51
59
|
args: [{ selector: 'seam-password-input-reveal', template: `
|
|
52
|
-
<fa-icon
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
<fa-icon
|
|
61
|
+
[icon]="passwordVisible ? faEyeSlash : faEye"
|
|
62
|
+
class="password-reveal-icon"
|
|
63
|
+
(click)="revealPassword()"
|
|
64
|
+
></fa-icon>
|
|
65
|
+
`, imports: [FontAwesomeModule], styles: [":host{display:flex;align-items:center;position:absolute;top:0;right:0;bottom:0;width:30px;transform:translateZ(0);z-index:50}:host fa-icon{opacity:1;color:#bababa;cursor:pointer}:host fa-icon ::ng-deep .svg-inline--fa{vertical-align:middle}\n"] }]
|
|
56
66
|
}], propDecorators: { inputRef: [{
|
|
57
67
|
type: Input
|
|
58
68
|
}], passwordVisible: [{
|
|
@@ -93,22 +103,26 @@ class TheSeamAutoFocusDirective {
|
|
|
93
103
|
}
|
|
94
104
|
if (!this.modalRef) {
|
|
95
105
|
if (this._focus) {
|
|
96
|
-
setTimeout(() => {
|
|
106
|
+
setTimeout(() => {
|
|
107
|
+
this.focus();
|
|
108
|
+
});
|
|
97
109
|
}
|
|
98
110
|
}
|
|
99
111
|
else {
|
|
100
112
|
this.modalRef.afterOpened().subscribe(() => {
|
|
101
|
-
setTimeout(() => {
|
|
113
|
+
setTimeout(() => {
|
|
114
|
+
this.focus();
|
|
115
|
+
});
|
|
102
116
|
});
|
|
103
117
|
}
|
|
104
118
|
}
|
|
105
119
|
focus() {
|
|
106
120
|
this._elementRef.nativeElement.focus();
|
|
107
121
|
}
|
|
108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
109
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
122
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamAutoFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
123
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamAutoFocusDirective, isStandalone: true, selector: "[seamAutoFocus]", inputs: { seamAutoFocus: "seamAutoFocus" }, exportAs: ["seamAutoFocus"], ngImport: i0 });
|
|
110
124
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamAutoFocusDirective, decorators: [{
|
|
112
126
|
type: Directive,
|
|
113
127
|
args: [{
|
|
114
128
|
selector: '[seamAutoFocus]',
|
|
@@ -130,7 +144,9 @@ class TheSeamClickOutsideDirective {
|
|
|
130
144
|
if (value) {
|
|
131
145
|
// `setTimeout` is used to avoid the click event triggering when the value
|
|
132
146
|
// changes if the value was changed with a click.
|
|
133
|
-
setTimeout(() => {
|
|
147
|
+
setTimeout(() => {
|
|
148
|
+
this._active = value;
|
|
149
|
+
});
|
|
134
150
|
}
|
|
135
151
|
else {
|
|
136
152
|
this._active = value;
|
|
@@ -144,15 +160,16 @@ class TheSeamClickOutsideDirective {
|
|
|
144
160
|
if (this._active) {
|
|
145
161
|
const targetElement = event.target;
|
|
146
162
|
// Check if the click was outside the element
|
|
147
|
-
if (targetElement &&
|
|
163
|
+
if (targetElement &&
|
|
164
|
+
!this._elementRef.nativeElement.contains(targetElement)) {
|
|
148
165
|
this.seamClickOutside.emit(event);
|
|
149
166
|
}
|
|
150
167
|
}
|
|
151
168
|
}
|
|
152
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
153
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
169
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
170
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamClickOutsideDirective, isStandalone: true, selector: "[seamClickOutside]", inputs: { seamClickOutsideActive: "seamClickOutsideActive" }, outputs: { seamClickOutside: "seamClickOutside" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, exportAs: ["seamClickOutside"], ngImport: i0 });
|
|
154
171
|
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamClickOutsideDirective, decorators: [{
|
|
156
173
|
type: Directive,
|
|
157
174
|
args: [{
|
|
158
175
|
selector: '[seamClickOutside]',
|
|
@@ -177,10 +194,10 @@ class TheSeamDisableControlDirective {
|
|
|
177
194
|
control[action]();
|
|
178
195
|
}
|
|
179
196
|
}
|
|
180
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
181
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
197
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamDisableControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
198
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamDisableControlDirective, isStandalone: true, selector: "[seamDisableControl]", inputs: { seamDisableControl: "seamDisableControl" }, exportAs: ["seamDisableControl"], ngImport: i0 });
|
|
182
199
|
}
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamDisableControlDirective, decorators: [{
|
|
184
201
|
type: Directive,
|
|
185
202
|
args: [{
|
|
186
203
|
selector: '[seamDisableControl]',
|
|
@@ -195,17 +212,20 @@ class TheSeamElemResizedDirective {
|
|
|
195
212
|
seamElemResized = new EventEmitter();
|
|
196
213
|
sensor;
|
|
197
214
|
ngAfterViewInit() {
|
|
198
|
-
this.sensor = new ResizeSensor(this._elementRef.nativeElement, event => {
|
|
199
|
-
this.seamElemResized.emit({
|
|
215
|
+
this.sensor = new ResizeSensor(this._elementRef.nativeElement, (event) => {
|
|
216
|
+
this.seamElemResized.emit({
|
|
217
|
+
element: this._elementRef.nativeElement,
|
|
218
|
+
size: event,
|
|
219
|
+
});
|
|
200
220
|
});
|
|
201
221
|
}
|
|
202
222
|
ngOnDestroy() {
|
|
203
223
|
this.sensor?.detach();
|
|
204
224
|
}
|
|
205
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
206
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
225
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamElemResizedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
226
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamElemResizedDirective, isStandalone: true, selector: "[seamElemResized]", outputs: { seamElemResized: "seamElemResized" }, exportAs: ["seamElemResized"], ngImport: i0 });
|
|
207
227
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamElemResizedDirective, decorators: [{
|
|
209
229
|
type: Directive,
|
|
210
230
|
args: [{
|
|
211
231
|
selector: '[seamElemResized]',
|
|
@@ -245,21 +265,33 @@ class TheSeamHoverClassToggleDirective {
|
|
|
245
265
|
set seamHoverClassToggle(value) {
|
|
246
266
|
if (value) {
|
|
247
267
|
if (value.default) {
|
|
248
|
-
this._defaultClasses = value.default
|
|
268
|
+
this._defaultClasses = value.default
|
|
269
|
+
.split(' ')
|
|
270
|
+
.filter((c) => c.length > 0);
|
|
249
271
|
}
|
|
250
272
|
if (value.hover) {
|
|
251
|
-
this._hoverClasses = value.hover.split(' ').filter(c => c.length > 0);
|
|
273
|
+
this._hoverClasses = value.hover.split(' ').filter((c) => c.length > 0);
|
|
252
274
|
}
|
|
253
275
|
}
|
|
254
|
-
this._hoverClasses = this._hoverClasses.filter(v => !this._defaultClasses.find(_v => _v === v));
|
|
276
|
+
this._hoverClasses = this._hoverClasses.filter((v) => !this._defaultClasses.find((_v) => _v === v));
|
|
255
277
|
this._update();
|
|
256
278
|
}
|
|
257
279
|
_update() {
|
|
258
280
|
for (const c of this._defaultClasses) {
|
|
259
|
-
this._hovered
|
|
281
|
+
if (this._hovered) {
|
|
282
|
+
this._removeClass(c);
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
this._addClass(c);
|
|
286
|
+
}
|
|
260
287
|
}
|
|
261
288
|
for (const c of this._hoverClasses) {
|
|
262
|
-
this._hovered
|
|
289
|
+
if (this._hovered) {
|
|
290
|
+
this._addClass(c);
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
this._removeClass(c);
|
|
294
|
+
}
|
|
263
295
|
}
|
|
264
296
|
}
|
|
265
297
|
_setHovered(hovered) {
|
|
@@ -275,10 +307,10 @@ class TheSeamHoverClassToggleDirective {
|
|
|
275
307
|
_removeClass(c) {
|
|
276
308
|
this._elementRef.nativeElement.classList.remove(c);
|
|
277
309
|
}
|
|
278
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
279
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
310
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamHoverClassToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
311
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamHoverClassToggleDirective, isStandalone: true, selector: "[seamHoverClassToggle]", inputs: { seamHoverClassToggle: "seamHoverClassToggle" }, host: { listeners: { "mouseover": "onMouseOver($event)", "mouseout": "onMouseOut($event)", "pointerover": "onPointerOver($event)", "pointerout": "onPointerOut($event)" } }, exportAs: ["seamHoverClassToggle"], ngImport: i0 });
|
|
280
312
|
}
|
|
281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamHoverClassToggleDirective, decorators: [{
|
|
282
314
|
type: Directive,
|
|
283
315
|
args: [{
|
|
284
316
|
selector: '[seamHoverClassToggle]',
|
|
@@ -332,7 +364,7 @@ class TheSeamHoverClassDirective {
|
|
|
332
364
|
this._setHovered(false);
|
|
333
365
|
}
|
|
334
366
|
set seamHoverClass(classList) {
|
|
335
|
-
const newClasses = classList.split(' ').filter(c => c.length > 0);
|
|
367
|
+
const newClasses = classList.split(' ').filter((c) => c.length > 0);
|
|
336
368
|
for (const c of this._classes) {
|
|
337
369
|
if (newClasses.indexOf(c) !== 0) {
|
|
338
370
|
this._removeClass(c);
|
|
@@ -343,7 +375,12 @@ class TheSeamHoverClassDirective {
|
|
|
343
375
|
}
|
|
344
376
|
_update() {
|
|
345
377
|
for (const c of this._classes) {
|
|
346
|
-
this._hovered
|
|
378
|
+
if (this._hovered) {
|
|
379
|
+
this._addClass(c);
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
this._removeClass(c);
|
|
383
|
+
}
|
|
347
384
|
}
|
|
348
385
|
}
|
|
349
386
|
_setHovered(hovered) {
|
|
@@ -359,10 +396,10 @@ class TheSeamHoverClassDirective {
|
|
|
359
396
|
_removeClass(c) {
|
|
360
397
|
this._elementRef.nativeElement.classList.remove(c);
|
|
361
398
|
}
|
|
362
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
363
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
399
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamHoverClassDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
400
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamHoverClassDirective, isStandalone: true, selector: "[seamHoverClass]", inputs: { seamHoverClass: "seamHoverClass" }, host: { listeners: { "mouseover": "onMouseOver($event)", "mouseout": "onMouseOut($event)", "pointerover": "onPointerOver($event)", "pointerout": "onPointerOut($event)" } }, exportAs: ["seamHoverClass"], ngImport: i0 });
|
|
364
401
|
}
|
|
365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
402
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamHoverClassDirective, decorators: [{
|
|
366
403
|
type: Directive,
|
|
367
404
|
args: [{
|
|
368
405
|
selector: '[seamHoverClass]',
|
|
@@ -389,26 +426,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
389
426
|
class TheSeamNgSelectExtraDirective {
|
|
390
427
|
_elementRef = inject((ElementRef));
|
|
391
428
|
_ngSelect = inject(NgSelectComponent);
|
|
392
|
-
_ngControl = inject(NgControl, {
|
|
429
|
+
_ngControl = inject(NgControl, {
|
|
430
|
+
optional: true,
|
|
431
|
+
self: true,
|
|
432
|
+
});
|
|
393
433
|
/**
|
|
394
434
|
* Set the tab index to `-1` to allow the root element of the ng-select
|
|
395
435
|
* component to receive `focus` event from javascript, but not get focused by
|
|
396
436
|
* keyboard navigation.
|
|
397
437
|
*/
|
|
398
|
-
get _tabIndex() {
|
|
438
|
+
get _tabIndex() {
|
|
439
|
+
return this._ngSelect.disabled() ? undefined : -1;
|
|
440
|
+
}
|
|
399
441
|
/**
|
|
400
442
|
* Listening for focus event on root of component to allow javascript
|
|
401
443
|
* `focus()` function to trigger the components focus.
|
|
402
444
|
*/
|
|
403
445
|
onFocus($event) {
|
|
404
|
-
console.log('TheSeamNgSelectExtraDirective onFocus', $event);
|
|
405
446
|
const target = $event.target;
|
|
406
|
-
if (target === this._elementRef.nativeElement &&
|
|
447
|
+
if (target === this._elementRef.nativeElement &&
|
|
448
|
+
!this._ngSelect.disabled()) {
|
|
407
449
|
this._ngSelect.focus();
|
|
408
450
|
}
|
|
409
451
|
}
|
|
410
452
|
get _isInvalid() {
|
|
411
|
-
return this._ngControl
|
|
453
|
+
return this._ngControl
|
|
454
|
+
? this._ngControl.invalid &&
|
|
455
|
+
(this._ngControl.dirty || this._ngControl.touched)
|
|
456
|
+
: false;
|
|
412
457
|
}
|
|
413
458
|
get _isEmptyStringValue() {
|
|
414
459
|
return this._ngControl ? this._ngControl.value === '' : false;
|
|
@@ -460,7 +505,8 @@ class TheSeamNgSelectExtraDirective {
|
|
|
460
505
|
_onScroll = (event) => {
|
|
461
506
|
if (this._ngSelect && this._ngSelect.isOpen()) {
|
|
462
507
|
const isScrollingInScrollHost = event.target.className.indexOf('ng-dropdown-panel-items') !== -1;
|
|
463
|
-
const isInSensor = event.target.className.indexOf('resize-sensor-shrink') !==
|
|
508
|
+
const isInSensor = event.target.className.indexOf('resize-sensor-shrink') !==
|
|
509
|
+
-1 ||
|
|
464
510
|
event.target.className.indexOf('os-resize-observer-host') !== -1;
|
|
465
511
|
if (isScrollingInScrollHost || isInSensor) {
|
|
466
512
|
return;
|
|
@@ -468,10 +514,10 @@ class TheSeamNgSelectExtraDirective {
|
|
|
468
514
|
this._ngSelect.close();
|
|
469
515
|
}
|
|
470
516
|
};
|
|
471
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
472
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
517
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamNgSelectExtraDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
518
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamNgSelectExtraDirective, isStandalone: true, selector: "ng-select", host: { listeners: { "focus": "onFocus($event)" }, properties: { "attr.tabIndex": "this._tabIndex", "class.is-invalid": "this._isInvalid", "class.ng-empty-string-value": "this._isEmptyStringValue" } }, exportAs: ["seamNgSelectExtra"], ngImport: i0 });
|
|
473
519
|
}
|
|
474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamNgSelectExtraDirective, decorators: [{
|
|
475
521
|
type: Directive,
|
|
476
522
|
args: [{
|
|
477
523
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -502,9 +548,15 @@ class TheSeamNgxQuillExtraDirective {
|
|
|
502
548
|
* component to receive `focus` event from javascript, but not get focused by
|
|
503
549
|
* keyboard navigation.
|
|
504
550
|
*/
|
|
505
|
-
set tabIndex(value) {
|
|
506
|
-
|
|
507
|
-
|
|
551
|
+
set tabIndex(value) {
|
|
552
|
+
this._tabIndex = coerceNumberProperty(value);
|
|
553
|
+
}
|
|
554
|
+
get tabIndex() {
|
|
555
|
+
return this._tabIndex;
|
|
556
|
+
}
|
|
557
|
+
get _attrTabIndex() {
|
|
558
|
+
return this._quillEditor.disabled ? -1 : this.tabIndex || 0;
|
|
559
|
+
}
|
|
508
560
|
ngOnDestroy() {
|
|
509
561
|
this._ngUnsubscribe.next(undefined);
|
|
510
562
|
this._ngUnsubscribe.complete();
|
|
@@ -514,7 +566,10 @@ class TheSeamNgxQuillExtraDirective {
|
|
|
514
566
|
if (parent) {
|
|
515
567
|
// NOTE: This is a hack to avoid an issue letting a label with "for"
|
|
516
568
|
// attribute focus the control.
|
|
517
|
-
fromEvent(parent, 'click')
|
|
569
|
+
fromEvent(parent, 'click')
|
|
570
|
+
.pipe(takeUntil(this._ngUnsubscribe), filter((e) => e.target?.getAttribute('for') ===
|
|
571
|
+
this._elementRef.nativeElement.id), tap(() => this._quillEditor.quillEditor.focus()))
|
|
572
|
+
.subscribe();
|
|
518
573
|
}
|
|
519
574
|
}
|
|
520
575
|
_getParentElementForLabelFocusIssue() {
|
|
@@ -529,10 +584,10 @@ class TheSeamNgxQuillExtraDirective {
|
|
|
529
584
|
};
|
|
530
585
|
return findElem(this._elementRef.nativeElement);
|
|
531
586
|
}
|
|
532
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
533
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
587
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamNgxQuillExtraDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
588
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.6", type: TheSeamNgxQuillExtraDirective, isStandalone: true, selector: "quill-editor", inputs: { tabIndex: "tabIndex" }, host: { properties: { "attr.tabindex": "this._attrTabIndex" } }, exportAs: ["seamNgxQuillExtra"], ngImport: i0 });
|
|
534
589
|
}
|
|
535
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamNgxQuillExtraDirective, decorators: [{
|
|
536
591
|
type: Directive,
|
|
537
592
|
args: [{
|
|
538
593
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -558,10 +613,10 @@ class TheSeamMaskCharsPipe {
|
|
|
558
613
|
}
|
|
559
614
|
return value;
|
|
560
615
|
}
|
|
561
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
562
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
616
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamMaskCharsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
617
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: TheSeamMaskCharsPipe, isStandalone: true, name: "maskChars" });
|
|
563
618
|
}
|
|
564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
619
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamMaskCharsPipe, decorators: [{
|
|
565
620
|
type: Pipe,
|
|
566
621
|
args: [{
|
|
567
622
|
name: 'maskChars',
|
|
@@ -579,10 +634,10 @@ class TheSeamTruncatePipe {
|
|
|
579
634
|
}
|
|
580
635
|
return val;
|
|
581
636
|
}
|
|
582
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
583
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.
|
|
637
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamTruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
638
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: TheSeamTruncatePipe, isStandalone: true, name: "truncate" });
|
|
584
639
|
}
|
|
585
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
640
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamTruncatePipe, decorators: [{
|
|
586
641
|
type: Pipe,
|
|
587
642
|
args: [{
|
|
588
643
|
name: 'truncate',
|
|
@@ -590,8 +645,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
590
645
|
}] });
|
|
591
646
|
|
|
592
647
|
class TheSeamSharedModule {
|
|
593
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
594
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
648
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamSharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
649
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: TheSeamSharedModule, imports: [TheSeamAutoFocusDirective,
|
|
595
650
|
TheSeamElemResizedDirective,
|
|
596
651
|
TheSeamHoverClassToggleDirective,
|
|
597
652
|
TheSeamNgSelectExtraDirective,
|
|
@@ -612,9 +667,9 @@ class TheSeamSharedModule {
|
|
|
612
667
|
TheSeamMaskCharsPipe,
|
|
613
668
|
TheSeamTruncatePipe,
|
|
614
669
|
TheSeamNgxQuillExtraDirective] });
|
|
615
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
670
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamSharedModule, imports: [TheSeamPasswordInputRevealComponent] });
|
|
616
671
|
}
|
|
617
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: TheSeamSharedModule, decorators: [{
|
|
618
673
|
type: NgModule,
|
|
619
674
|
args: [{
|
|
620
675
|
imports: [
|
|
@@ -642,7 +697,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
642
697
|
TheSeamMaskCharsPipe,
|
|
643
698
|
TheSeamTruncatePipe,
|
|
644
699
|
TheSeamNgxQuillExtraDirective,
|
|
645
|
-
]
|
|
700
|
+
],
|
|
646
701
|
}]
|
|
647
702
|
}] });
|
|
648
703
|
|