@bravobit/bb-foundation 0.22.2 → 0.22.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/controls/lib/checkbox/checkbox-group/checkbox-group.component.d.ts +3 -2
- package/controls/lib/checkbox/checkbox.module.d.ts +2 -1
- package/controls/lib/form-control/form-control/form-control.component.d.ts +5 -5
- package/controls/lib/form-control/form-control.module.d.ts +2 -1
- package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +4 -2
- package/dialog/lib/dialog.interfaces.d.ts +7 -0
- package/dialog/lib/dialog.service.d.ts +5 -9
- package/elements/lib/elements.module.d.ts +25 -28
- package/elements/public_api.d.ts +0 -4
- package/esm2020/auth/lib/auth.interceptor.mjs +3 -3
- package/esm2020/auth/lib/auth.module.mjs +4 -4
- package/esm2020/auth/lib/auth.service.mjs +3 -3
- package/esm2020/auth/lib/directives/authenticated.directive.mjs +3 -3
- package/esm2020/auth/lib/directives/permission.directive.mjs +3 -3
- package/esm2020/auth/lib/guards/anonymous.guard.mjs +3 -3
- package/esm2020/auth/lib/guards/authenticated.guard.mjs +3 -3
- package/esm2020/auth/lib/guards/permission.guard.mjs +3 -3
- package/esm2020/auth/lib/permissions/permissions.service.mjs +3 -3
- package/esm2020/collections/lib/collections.module.mjs +4 -4
- package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +3 -3
- package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +3 -3
- package/esm2020/collections/lib/components/collections.directive.mjs +12 -12
- package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +7 -6
- package/esm2020/controls/lib/checkbox/checkbox.module.mjs +7 -6
- package/esm2020/controls/lib/control-error/control-error/control-error.component.mjs +3 -3
- package/esm2020/controls/lib/control-error/control-error-submit.directive.mjs +3 -3
- package/esm2020/controls/lib/control-error/control-error.module.mjs +4 -4
- package/esm2020/controls/lib/controls.module.mjs +4 -4
- package/esm2020/controls/lib/form-control/form-control/form-control.component.mjs +6 -5
- package/esm2020/controls/lib/form-control/form-control-addon/form-control-addon.component.mjs +3 -3
- package/esm2020/controls/lib/form-control/form-control-input.directive.mjs +3 -3
- package/esm2020/controls/lib/form-control/form-control.module.mjs +8 -7
- package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-header/dashboard-header.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard.module.mjs +4 -4
- package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +15 -12
- package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +5 -5
- package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog.insertion.mjs +3 -3
- package/esm2020/dialog/lib/dialog.interfaces.mjs +1 -1
- package/esm2020/dialog/lib/dialog.module.mjs +4 -4
- package/esm2020/dialog/lib/dialog.service.mjs +15 -27
- package/esm2020/elements/lib/avatar/avatar.component.mjs +7 -7
- package/esm2020/elements/lib/button/button.component.mjs +6 -6
- package/esm2020/elements/lib/checkbox/checkbox.component.mjs +3 -3
- package/esm2020/elements/lib/date-picker/date-picker.component.mjs +4 -4
- package/esm2020/elements/lib/directives/addon.directive.mjs +6 -6
- package/esm2020/elements/lib/directives/form-submit.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/form-submitter.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/input.directive.mjs +6 -6
- package/esm2020/elements/lib/dropdown/dropdown.component.mjs +6 -6
- package/esm2020/elements/lib/elements.module.mjs +21 -25
- package/esm2020/elements/lib/file-picker/file-picker.component.mjs +4 -4
- package/esm2020/elements/lib/form-control/form-control.component.mjs +4 -4
- package/esm2020/elements/lib/form-error/form-error.component.mjs +3 -3
- package/esm2020/elements/lib/form-group/form-group.component.mjs +3 -3
- package/esm2020/elements/lib/icon/icon.component.mjs +3 -3
- package/esm2020/elements/lib/image-picker/image-picker.component.mjs +3 -3
- package/esm2020/elements/lib/pipes/file-image.pipe.mjs +3 -3
- package/esm2020/elements/lib/pipes/file-size.pipe.mjs +3 -3
- package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +3 -3
- package/esm2020/elements/lib/spinner/spinner.component.mjs +3 -3
- package/esm2020/elements/lib/tag/tag.component.mjs +3 -3
- package/esm2020/elements/public_api.mjs +1 -5
- package/esm2020/http/lib/classes/http.config.mjs +2 -3
- package/esm2020/http/lib/http.module.mjs +4 -4
- package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +6 -6
- package/esm2020/http/lib/interceptors/error.interceptor.mjs +3 -3
- package/esm2020/lib/core/services/clipboard.service.mjs +3 -3
- package/esm2020/lib/core/services/exif.service.mjs +3 -3
- package/esm2020/lib/core/services/file-loader.service.mjs +3 -3
- package/esm2020/lib/core/services/image-converter.service.mjs +3 -3
- package/esm2020/lib/core/services/languages.service.mjs +3 -3
- package/esm2020/lib/core/services/network.service.mjs +3 -3
- package/esm2020/lib/core/services/patch.service.mjs +3 -3
- package/esm2020/localize/lib/localize.dictionary.mjs +2 -4
- package/esm2020/localize/lib/localize.module.mjs +9 -11
- package/esm2020/localize/lib/localize.pipe.mjs +3 -3
- package/esm2020/localize/lib/localize.service.mjs +3 -3
- package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +6 -6
- package/esm2020/localize/lib/views/localize-template.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/currency-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/date-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/directives/input-mask.directive.mjs +3 -3
- package/esm2020/masking/lib/masking.module.mjs +4 -4
- package/esm2020/masking/lib/masking.service.mjs +3 -3
- package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +3 -3
- package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +3 -3
- package/esm2020/notifications/lib/notifications.module.mjs +4 -4
- package/esm2020/notifications/lib/notifications.service.mjs +22 -26
- package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha.module.mjs +4 -4
- package/esm2020/storage/lib/storage.service.mjs +7 -7
- package/esm2020/table/lib/components/table/table.component.mjs +9 -9
- package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +3 -3
- package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +3 -3
- package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +3 -3
- package/esm2020/table/lib/table.module.mjs +4 -4
- package/esm2020/theming/lib/theming.directive.mjs +3 -3
- package/esm2020/theming/lib/theming.module.mjs +4 -4
- package/esm2020/utils/bravobit-bb-foundation-utils.mjs +5 -0
- package/esm2020/utils/lib/directives/autosize.directive.mjs +72 -0
- package/esm2020/utils/lib/directives/focus-trap.directive.mjs +77 -0
- package/esm2020/utils/lib/directives/focus.directive.mjs +37 -0
- package/esm2020/utils/lib/directives/template.directive.mjs +28 -0
- package/esm2020/utils/lib/utils.module.mjs +35 -0
- package/esm2020/utils/public_api.mjs +6 -0
- package/fesm2015/bravobit-bb-foundation-auth.mjs +28 -28
- package/fesm2015/bravobit-bb-foundation-collections.mjs +22 -22
- package/fesm2015/bravobit-bb-foundation-controls.mjs +47 -45
- package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs +25 -25
- package/fesm2015/bravobit-bb-foundation-dialog.mjs +54 -81
- package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-elements.mjs +100 -306
- package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-http.mjs +14 -14
- package/fesm2015/bravobit-bb-foundation-http.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-localize.mjs +26 -53
- package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2015/bravobit-bb-foundation-notifications.mjs +31 -52
- package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +10 -10
- package/fesm2015/bravobit-bb-foundation-storage.mjs +6 -6
- package/fesm2015/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2015/bravobit-bb-foundation-theming.mjs +7 -7
- package/fesm2015/bravobit-bb-foundation-utils.mjs +246 -0
- package/fesm2015/bravobit-bb-foundation-utils.mjs.map +1 -0
- package/fesm2015/bravobit-bb-foundation.mjs +21 -21
- package/fesm2020/bravobit-bb-foundation-auth.mjs +28 -28
- package/fesm2020/bravobit-bb-foundation-collections.mjs +22 -22
- package/fesm2020/bravobit-bb-foundation-controls.mjs +47 -45
- package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs +25 -25
- package/fesm2020/bravobit-bb-foundation-dialog.mjs +53 -79
- package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-elements.mjs +100 -304
- package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-http.mjs +14 -14
- package/fesm2020/bravobit-bb-foundation-http.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-localize.mjs +26 -53
- package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2020/bravobit-bb-foundation-notifications.mjs +31 -52
- package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +10 -10
- package/fesm2020/bravobit-bb-foundation-storage.mjs +6 -6
- package/fesm2020/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2020/bravobit-bb-foundation-theming.mjs +7 -7
- package/fesm2020/bravobit-bb-foundation-utils.mjs +244 -0
- package/fesm2020/bravobit-bb-foundation-utils.mjs.map +1 -0
- package/fesm2020/bravobit-bb-foundation.mjs +21 -21
- package/localize/lib/localize.module.d.ts +3 -3
- package/notifications/lib/notifications.service.d.ts +6 -7
- package/package.json +9 -1
- package/utils/index.d.ts +5 -0
- package/{elements → utils}/lib/directives/autosize.directive.d.ts +0 -0
- package/{elements → utils}/lib/directives/focus-trap.directive.d.ts +0 -0
- package/{elements → utils}/lib/directives/focus.directive.d.ts +0 -0
- package/{elements → utils}/lib/directives/template.directive.d.ts +1 -0
- package/utils/lib/utils.module.d.ts +10 -0
- package/utils/public_api.d.ts +5 -0
- package/dialog/lib/dialog.injector.d.ts +0 -8
- package/esm2020/dialog/lib/dialog.injector.mjs +0 -18
- package/esm2020/elements/lib/directives/autosize.directive.mjs +0 -72
- package/esm2020/elements/lib/directives/focus-trap.directive.mjs +0 -77
- package/esm2020/elements/lib/directives/focus.directive.mjs +0 -37
- package/esm2020/elements/lib/directives/template.directive.mjs +0 -28
- package/esm2020/localize/lib/views/localize-template-or-string.directive.mjs +0 -28
- package/esm2020/notifications/lib/notifications.injector.mjs +0 -18
- package/localize/lib/views/localize-template-or-string.directive.d.ts +0 -10
- package/notifications/lib/notifications.injector.d.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravobit-bb-foundation-storage.mjs","sources":["../../../projects/bb-foundation/storage/src/lib/strategies/polyfill-storage.strategy.ts","../../../projects/bb-foundation/storage/src/lib/strategies/cookie-storage.strategy.ts","../../../projects/bb-foundation/storage/src/lib/strategies/memory-storage.strategy.ts","../../../projects/bb-foundation/storage/src/lib/storage.service.ts","../../../projects/bb-foundation/storage/src/bravobit-bb-foundation-storage.ts"],"sourcesContent":["import {PolyfillStorageAttributes} from '../interfaces/attributes.interface';\nimport {StorageStrategy} from '../interfaces/strategy.interface';\n\nexport class PolyfillStorage implements StorageStrategy {\n\n // State.\n private readonly _isSupported: boolean = false;\n\n constructor(private _storage?: Storage) {\n // Check if the storage is supported.\n this._isSupported = this.testIfSupported();\n }\n\n get<T = any>(token: string) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return undefined;\n }\n\n return this.decode<T>(token);\n }\n\n set<T = any>(token: string, value: T, attributes?: PolyfillStorageAttributes) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n // Stringify the data.\n const rawData = this.encode<T>(value, {...attributes});\n\n // Set the raw data in the storage.\n this._storage.setItem(token, rawData);\n }\n\n remove(token: string) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n // Remove the item in the storage.\n this._storage.removeItem(token);\n }\n\n clear() {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n // Clear the storage.\n this._storage.clear();\n }\n\n isSupported() {\n return this._isSupported;\n }\n\n private decode<T>(token: string) {\n // Retrieve the raw data from the storage.\n const rawData = this._storage.getItem(token);\n\n // Try to parse the data.\n let parsedData: T | undefined = undefined;\n\n // Only parse the data when it is not null.\n if (rawData !== null) {\n try {\n const {value, expires} = JSON.parse(rawData);\n\n if (expires !== undefined) {\n const now = Date.now();\n const expireDate = new Date(expires).getTime();\n\n if (expireDate <= now) {\n this.remove(token);\n return undefined;\n }\n }\n\n parsedData = value;\n } catch {\n // We dont do anything with failed parsing.\n }\n }\n\n // Return the parsed data.\n return parsedData;\n }\n\n private encode = <T>(value: T, attributes: PolyfillStorageAttributes) => {\n // Make sure the expires attribute is a date and not a number.\n const data = {value};\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(attributes.expires);\n }\n\n if (attributes.expires) {\n data['expires'] = attributes.expires;\n }\n\n return JSON.stringify(data);\n };\n\n private testIfSupported = () => {\n if (typeof this._storage === 'undefined') {\n return false;\n }\n\n try {\n const x = '__storage_test__';\n this._storage.setItem(x, x);\n this._storage.removeItem(x);\n return true;\n } catch (error) {\n return error instanceof DOMException\n && (\n error.code === 22 ||\n error.code === 1014 ||\n error.name === 'QuotaExceededError' ||\n error.name === 'NS_ERROR_DOM_QUOTA_REACHED'\n )\n && (this._storage && this._storage.length !== 0);\n }\n };\n\n}\n","import {CookieStorageAttributes} from '../interfaces/attributes.interface';\nimport {StorageStrategy} from '../interfaces/strategy.interface';\n\nexport class CookieStorage implements StorageStrategy {\n\n // State.\n private readonly _isSupported: boolean = false;\n\n constructor(private _isBrowser: boolean,\n private _cookieString?: string) {\n // Check if the storage is supported.\n this._isSupported = this.testIfSupported();\n }\n\n get<T = any>(token: string) {\n // Get all values and pick one out.\n const values = this.all();\n return values?.[token] as T;\n }\n\n set<T = any>(token: string, value: T, attributes?: CookieStorageAttributes) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n // Write a new cookie.\n document.cookie = this.encode(token, value, {path: '/', sameSite: 'Lax', ...attributes});\n }\n\n remove(token: string, attributes?: CookieStorageAttributes) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n this.set(token, '', {...attributes, expires: -1});\n }\n\n clear(attributes?: CookieStorageAttributes) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n const items = this.all();\n\n for (const token in items) {\n this.remove(token, attributes);\n }\n }\n\n isSupported() {\n return this._isSupported;\n }\n\n private all() {\n const cookieString = this._isBrowser\n ? document?.cookie\n : this._cookieString;\n\n return this.decode(cookieString);\n }\n\n private encode(token: string, value: any, attributes: CookieStorageAttributes) {\n // Encode the token.\n const encodedToken = encodeURIComponent(token)\n .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n .replace(/\\(/g, '%28').replace(/\\)/g, '%29');\n\n const rawValue = JSON.stringify(value);\n\n // Encode the value.\n const encodedValue = encodeURIComponent(rawValue)\n .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n // Return the completed encoded string.\n return [encodedToken, '=', encodedValue, this.stringifyCookie(attributes)].join('');\n }\n\n private decode = (cookieString: string) => {\n const result: { [token: string]: any } = {};\n const cookies = cookieString ? cookieString.split('; ') : [];\n const rdecode = /(%[0-9A-Z]{2})+/g;\n\n for (let index = 0; index < cookies.length; index++) {\n const parts = cookies[index].split('=');\n let cookie = parts.slice(1).join('=');\n\n if (cookie.charAt(0) === '\"') {\n cookie = cookie.slice(1, -1);\n }\n\n try {\n const name = parts[0].replace(rdecode, decodeURIComponent);\n const value = cookie.replace(rdecode, decodeURIComponent);\n result[name] = this.jsonParse(value);\n } catch {\n // Ignore cookies with an invalid name/value encoding.\n }\n }\n\n return result;\n };\n\n private jsonParse = <T = any>(rawValue: string) => {\n // Try to parse the data.\n let parsedValue: T | undefined = undefined;\n\n // Only parse the value when it is not null.\n if (rawValue !== undefined) {\n try {\n parsedValue = JSON.parse(rawValue);\n } catch {\n // The string could not be parsed to JSON.\n }\n }\n\n // Return the parsed value.\n return parsedValue;\n };\n\n private stringifyCookie(attributes: CookieStorageAttributes) {\n // Make sure the expires attribute is a date and not a number.\n if (typeof attributes.expires === 'number') {\n const expires = new Date();\n expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n attributes.expires = expires;\n }\n\n // Force secure when sameSite=None.\n if (attributes.sameSite === 'None') {\n attributes.secure = true;\n console?.warn?.('Cooke was forced with secure flag because sameSite=None');\n }\n\n // Stringify all attributes.\n return this.stringifyAttribute('Expires', attributes.expires ? attributes.expires.toUTCString() : '')\n + this.stringifyAttribute('Domain', attributes.domain)\n + this.stringifyAttribute('Path', attributes.path)\n + this.stringifyAttribute('Secure', attributes.secure)\n + this.stringifyAttribute('SameSite', attributes.sameSite);\n }\n\n private stringifyAttribute = (token: string, value: string | boolean | undefined) => {\n if (!value) {\n return '';\n }\n\n const stringified = `; ${token}`;\n\n // Boolean attributes should not have a value.\n if (value === true) {\n return stringified;\n }\n\n return stringified + `= ${value}`;\n };\n\n private testIfSupported = () => {\n // We are using an aggressive test here, because we cannot rely on navigator.cookieEnabled\n // it does not return the correct value at all times.\n const testCookieString = `bbcookietest`;\n try {\n document.cookie = `${testCookieString}=1`;\n const result = document.cookie.indexOf(`${testCookieString}=`) !== -1;\n document.cookie = `${testCookieString}=1; expires=Thu, 01-Jan-1970 00:00:01 GMT`;\n return result;\n } catch {\n return false;\n }\n };\n\n}\n","import {MemoryStorageAttributes} from '../interfaces/attributes.interface';\nimport {MemoryStorageData} from '../interfaces/memory.interface';\nimport {StorageStrategy} from '../interfaces/strategy.interface';\n\nexport class MemoryStorage implements StorageStrategy {\n\n // State.\n private _storage: MemoryStorageData = {};\n\n get<T = any>(token: string): T {\n // Grab the data from the memory storage.\n const result = this._storage[token];\n\n // Validate the data exists.\n if (result === undefined) {\n return undefined;\n }\n\n // Extract the value and expire date.\n const {value, expires} = result;\n\n // Validate the value is still valid.\n if (expires !== undefined) {\n const now = Date.now();\n const expireDate = new Date(expires).getTime();\n\n // Remove the value if it is expired.\n if (expireDate <= now) {\n this.remove(token);\n return undefined;\n }\n }\n\n // Return the value.\n return value;\n }\n\n set<T = any>(token: string, value: T, attributes?: MemoryStorageAttributes) {\n // Save the encoded value with the attributes.\n this._storage[token] = this.encode<T>(value, {...attributes});\n }\n\n remove(token: string) {\n delete this._storage[token];\n }\n\n clear() {\n this._storage = {};\n }\n\n isSupported() {\n // The memory storage is always supported.\n return true;\n }\n\n private encode = <T>(value: T, attributes: MemoryStorageAttributes) => {\n const data = {value};\n\n // Make sure the expires is a date object.\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(attributes.expires);\n }\n\n // Add the expire date if it was set.\n if (attributes.expires) {\n data['expires'] = attributes.expires;\n }\n\n // Return the encoded data.\n return data;\n };\n\n}\n","import {StorageOption, StorageStrategy} from './interfaces/strategy.interface';\nimport {PolyfillStorage} from './strategies/polyfill-storage.strategy';\nimport {Inject, Injectable, isDevMode, Optional} from '@angular/core';\nimport {StorageAttributes} from './interfaces/attributes.interface';\nimport {CookieStorage} from './strategies/cookie-storage.strategy';\nimport {MemoryStorage} from './strategies/memory-storage.strategy';\nimport {Platform} from '@angular/cdk/platform';\nimport {COOKIE} from '@bravobit/bb-foundation';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Storage implements StorageStrategy {\n\n // All available strategies (sorted best to last).\n private readonly _strategies: { [key in `${StorageOption}`]: StorageStrategy };\n\n // Current selected storage strategy.\n private readonly _current: StorageStrategy | null = null;\n\n constructor(private _platform: Platform,\n @Optional() @Inject(COOKIE) private _cookieString?: string) {\n this._strategies = {\n [StorageOption.Local]: new PolyfillStorage(this.getLocalStorage()),\n [StorageOption.Cookie]: new CookieStorage(this._platform.isBrowser, this._cookieString),\n [StorageOption.Session]: new PolyfillStorage(this.getSessionStorage()),\n [StorageOption.Memory]: new MemoryStorage()\n };\n\n this._current = this.findBestStorageStrategy();\n }\n\n select(option: StorageOption | StorageOption[]) {\n const items = Array.isArray(option) ? option : [option];\n for (const item of items) {\n const strategy = this._strategies?.[item] ?? null;\n if (strategy && strategy.isSupported()) {\n return strategy;\n }\n }\n\n if (this._platform.isBrowser && isDevMode()) {\n console?.warn?.('[Storage]: Could not select proper storage option, using memory fallback.');\n }\n\n // Always return as a fallback the memory storage since it should be always available.\n return this._strategies.memory;\n }\n\n get local() {\n return this._strategies.local;\n }\n\n get cookie() {\n return this._strategies.cookie;\n }\n\n get session() {\n return this._strategies.session;\n }\n\n get memory() {\n return this._strategies.memory;\n }\n\n get<T = any>(token: string): T {\n return this._current.get(token);\n }\n\n set<T = any>(token: string, value: T, attributes?: StorageAttributes) {\n this._current.set<T>(token, value, attributes);\n }\n\n remove(token: string, attributes?: StorageAttributes) {\n this._current.remove(token, attributes);\n }\n\n clear(attributes?: StorageAttributes) {\n this._current.clear(attributes);\n }\n\n isSupported() {\n return !!this._current;\n }\n\n private findBestStorageStrategy() {\n // Loop through all available strategies to find the best.\n for (const type in this._strategies) {\n const strategy = this._strategies?.[type];\n\n // The first supported strategy is the best.\n if (strategy?.isSupported()) {\n return strategy;\n }\n }\n\n // If no strategy was returned we fallback to memory\n // storage since it should be available always.\n if (this._platform.isBrowser && isDevMode()) {\n console?.warn?.('[Storage]: Could not select proper storage option, using memory fallback.');\n }\n\n return this._strategies.memory;\n }\n\n private getLocalStorage = () => {\n try {\n return (typeof window !== 'undefined') ? window?.localStorage : null;\n } catch {\n return null;\n }\n };\n\n private getSessionStorage = () => {\n try {\n return (typeof window !== 'undefined') ? window?.sessionStorage : null;\n } catch {\n return null;\n }\n };\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAGa,eAAe,CAAA;AAKxB,IAAA,WAAA,CAAoB,QAAkB,EAAA;QAAlB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;;QAFrB,IAAY,CAAA,YAAA,GAAY,KAAK,CAAC;AAqFvC,QAAA,IAAA,CAAA,MAAM,GAAG,CAAI,KAAQ,EAAE,UAAqC,KAAI;;AAEpE,YAAA,MAAM,IAAI,GAAG,EAAC,KAAK,EAAC,CAAC;AAErB,YAAA,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,QA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,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE;YACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;;AAG1C,YAAA,IAAI,QAAQ,EAAE,WAAW,EAAE,EAAE;AACzB,gBAAA,OAAO,QAAQ,CAAC;AACnB,aAAA;AACJ,SAAA;;;QAID,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,IAAI,SAAS,EAAE,EAAE;AACzC,YAAA,OAAO,EAAE,IAAI,GAAG,2EAA2E,CAAC,CAAC;AAChG,SAAA;AAED,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;KAClC;;AA3FQ,OAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,OAAO,0CASgB,MAAM,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAT7B,OAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,OAAO,cAFJ,MAAM,EAAA,CAAA,CAAA;2FAET,OAAO,EAAA,UAAA,EAAA,CAAA;kBAHnB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA,CAAA;;0BAUgB,QAAQ;;0BAAI,MAAM;2BAAC,MAAM,CAAA;;;ACrB1C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bravobit-bb-foundation-storage.mjs","sources":["../../../projects/bb-foundation/storage/src/lib/strategies/polyfill-storage.strategy.ts","../../../projects/bb-foundation/storage/src/lib/strategies/cookie-storage.strategy.ts","../../../projects/bb-foundation/storage/src/lib/strategies/memory-storage.strategy.ts","../../../projects/bb-foundation/storage/src/lib/storage.service.ts","../../../projects/bb-foundation/storage/src/bravobit-bb-foundation-storage.ts"],"sourcesContent":["import {PolyfillStorageAttributes} from '../interfaces/attributes.interface';\nimport {StorageStrategy} from '../interfaces/strategy.interface';\n\nexport class PolyfillStorage implements StorageStrategy {\n\n // State.\n private readonly _isSupported: boolean = false;\n\n constructor(private _storage?: Storage) {\n // Check if the storage is supported.\n this._isSupported = this.testIfSupported();\n }\n\n get<T = any>(token: string) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return undefined;\n }\n\n return this.decode<T>(token);\n }\n\n set<T = any>(token: string, value: T, attributes?: PolyfillStorageAttributes) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n // Stringify the data.\n const rawData = this.encode<T>(value, {...attributes});\n\n // Set the raw data in the storage.\n this._storage.setItem(token, rawData);\n }\n\n remove(token: string) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n // Remove the item in the storage.\n this._storage.removeItem(token);\n }\n\n clear() {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n // Clear the storage.\n this._storage.clear();\n }\n\n isSupported() {\n return this._isSupported;\n }\n\n private decode<T>(token: string) {\n // Retrieve the raw data from the storage.\n const rawData = this._storage.getItem(token);\n\n // Try to parse the data.\n let parsedData: T | undefined = undefined;\n\n // Only parse the data when it is not null.\n if (rawData !== null) {\n try {\n const {value, expires} = JSON.parse(rawData);\n\n if (expires !== undefined) {\n const now = Date.now();\n const expireDate = new Date(expires).getTime();\n\n if (expireDate <= now) {\n this.remove(token);\n return undefined;\n }\n }\n\n parsedData = value;\n } catch {\n // We dont do anything with failed parsing.\n }\n }\n\n // Return the parsed data.\n return parsedData;\n }\n\n private encode = <T>(value: T, attributes: PolyfillStorageAttributes) => {\n // Make sure the expires attribute is a date and not a number.\n const data = {value};\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(attributes.expires);\n }\n\n if (attributes.expires) {\n data['expires'] = attributes.expires;\n }\n\n return JSON.stringify(data);\n };\n\n private testIfSupported = () => {\n if (typeof this._storage === 'undefined') {\n return false;\n }\n\n try {\n const x = '__storage_test__';\n this._storage.setItem(x, x);\n this._storage.removeItem(x);\n return true;\n } catch (error) {\n return error instanceof DOMException\n && (\n error.code === 22 ||\n error.code === 1014 ||\n error.name === 'QuotaExceededError' ||\n error.name === 'NS_ERROR_DOM_QUOTA_REACHED'\n )\n && (this._storage && this._storage.length !== 0);\n }\n };\n\n}\n","import {CookieStorageAttributes} from '../interfaces/attributes.interface';\nimport {StorageStrategy} from '../interfaces/strategy.interface';\n\nexport class CookieStorage implements StorageStrategy {\n\n // State.\n private readonly _isSupported: boolean = false;\n\n constructor(private _isBrowser: boolean,\n private _cookieString?: string) {\n // Check if the storage is supported.\n this._isSupported = this.testIfSupported();\n }\n\n get<T = any>(token: string) {\n // Get all values and pick one out.\n const values = this.all();\n return values?.[token] as T;\n }\n\n set<T = any>(token: string, value: T, attributes?: CookieStorageAttributes) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n // Write a new cookie.\n document.cookie = this.encode(token, value, {path: '/', sameSite: 'Lax', ...attributes});\n }\n\n remove(token: string, attributes?: CookieStorageAttributes) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n this.set(token, '', {...attributes, expires: -1});\n }\n\n clear(attributes?: CookieStorageAttributes) {\n // Validate that the storage is supported.\n if (!this._isSupported) {\n return;\n }\n\n const items = this.all();\n\n for (const token in items) {\n this.remove(token, attributes);\n }\n }\n\n isSupported() {\n return this._isSupported;\n }\n\n private all() {\n const cookieString = this._isBrowser\n ? document?.cookie\n : this._cookieString;\n\n return this.decode(cookieString);\n }\n\n private encode(token: string, value: any, attributes: CookieStorageAttributes) {\n // Encode the token.\n const encodedToken = encodeURIComponent(token)\n .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n .replace(/\\(/g, '%28').replace(/\\)/g, '%29');\n\n const rawValue = JSON.stringify(value);\n\n // Encode the value.\n const encodedValue = encodeURIComponent(rawValue)\n .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n // Return the completed encoded string.\n return [encodedToken, '=', encodedValue, this.stringifyCookie(attributes)].join('');\n }\n\n private decode = (cookieString: string) => {\n const result: { [token: string]: any } = {};\n const cookies = cookieString ? cookieString.split('; ') : [];\n const rdecode = /(%[0-9A-Z]{2})+/g;\n\n for (let index = 0; index < cookies.length; index++) {\n const parts = cookies[index].split('=');\n let cookie = parts.slice(1).join('=');\n\n if (cookie.charAt(0) === '\"') {\n cookie = cookie.slice(1, -1);\n }\n\n try {\n const name = parts[0].replace(rdecode, decodeURIComponent);\n const value = cookie.replace(rdecode, decodeURIComponent);\n result[name] = this.jsonParse(value);\n } catch {\n // Ignore cookies with an invalid name/value encoding.\n }\n }\n\n return result;\n };\n\n private jsonParse = <T = any>(rawValue: string) => {\n // Try to parse the data.\n let parsedValue: T | undefined = undefined;\n\n // Only parse the value when it is not null.\n if (rawValue !== undefined) {\n try {\n parsedValue = JSON.parse(rawValue);\n } catch {\n // The string could not be parsed to JSON.\n }\n }\n\n // Return the parsed value.\n return parsedValue;\n };\n\n private stringifyCookie(attributes: CookieStorageAttributes) {\n // Make sure the expires attribute is a date and not a number.\n if (typeof attributes.expires === 'number') {\n const expires = new Date();\n expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n attributes.expires = expires;\n }\n\n // Force secure when sameSite=None.\n if (attributes.sameSite === 'None') {\n attributes.secure = true;\n console?.warn?.('Cooke was forced with secure flag because sameSite=None');\n }\n\n // Stringify all attributes.\n return this.stringifyAttribute('Expires', attributes.expires ? attributes.expires.toUTCString() : '')\n + this.stringifyAttribute('Domain', attributes.domain)\n + this.stringifyAttribute('Path', attributes.path)\n + this.stringifyAttribute('Secure', attributes.secure)\n + this.stringifyAttribute('SameSite', attributes.sameSite);\n }\n\n private stringifyAttribute = (token: string, value: string | boolean | undefined) => {\n if (!value) {\n return '';\n }\n\n const stringified = `; ${token}`;\n\n // Boolean attributes should not have a value.\n if (value === true) {\n return stringified;\n }\n\n return stringified + `= ${value}`;\n };\n\n private testIfSupported = () => {\n // We are using an aggressive test here, because we cannot rely on navigator.cookieEnabled\n // it does not return the correct value at all times.\n const testCookieString = `bbcookietest`;\n try {\n document.cookie = `${testCookieString}=1`;\n const result = document.cookie.indexOf(`${testCookieString}=`) !== -1;\n document.cookie = `${testCookieString}=1; expires=Thu, 01-Jan-1970 00:00:01 GMT`;\n return result;\n } catch {\n return false;\n }\n };\n\n}\n","import {MemoryStorageAttributes} from '../interfaces/attributes.interface';\nimport {MemoryStorageData} from '../interfaces/memory.interface';\nimport {StorageStrategy} from '../interfaces/strategy.interface';\n\nexport class MemoryStorage implements StorageStrategy {\n\n // State.\n private _storage: MemoryStorageData = {};\n\n get<T = any>(token: string): T {\n // Grab the data from the memory storage.\n const result = this._storage[token];\n\n // Validate the data exists.\n if (result === undefined) {\n return undefined;\n }\n\n // Extract the value and expire date.\n const {value, expires} = result;\n\n // Validate the value is still valid.\n if (expires !== undefined) {\n const now = Date.now();\n const expireDate = new Date(expires).getTime();\n\n // Remove the value if it is expired.\n if (expireDate <= now) {\n this.remove(token);\n return undefined;\n }\n }\n\n // Return the value.\n return value;\n }\n\n set<T = any>(token: string, value: T, attributes?: MemoryStorageAttributes) {\n // Save the encoded value with the attributes.\n this._storage[token] = this.encode<T>(value, {...attributes});\n }\n\n remove(token: string) {\n delete this._storage[token];\n }\n\n clear() {\n this._storage = {};\n }\n\n isSupported() {\n // The memory storage is always supported.\n return true;\n }\n\n private encode = <T>(value: T, attributes: MemoryStorageAttributes) => {\n const data = {value};\n\n // Make sure the expires is a date object.\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(attributes.expires);\n }\n\n // Add the expire date if it was set.\n if (attributes.expires) {\n data['expires'] = attributes.expires;\n }\n\n // Return the encoded data.\n return data;\n };\n\n}\n","import {StorageOption, StorageStrategy} from './interfaces/strategy.interface';\nimport {PolyfillStorage} from './strategies/polyfill-storage.strategy';\nimport {StorageAttributes} from './interfaces/attributes.interface';\nimport {CookieStorage} from './strategies/cookie-storage.strategy';\nimport {MemoryStorage} from './strategies/memory-storage.strategy';\nimport {Inject, Injectable, Optional} from '@angular/core';\nimport {Platform} from '@angular/cdk/platform';\nimport {COOKIE} from '@bravobit/bb-foundation';\n\ndeclare let ngDevMode;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Storage implements StorageStrategy {\n\n // All available strategies (sorted best to last).\n private readonly _strategies: { [key in `${StorageOption}`]: StorageStrategy };\n\n // Current selected storage strategy.\n private readonly _current: StorageStrategy | null = null;\n\n constructor(private _platform: Platform,\n @Optional() @Inject(COOKIE) private _cookieString?: string) {\n this._strategies = {\n [StorageOption.Local]: new PolyfillStorage(this.getLocalStorage()),\n [StorageOption.Cookie]: new CookieStorage(this._platform.isBrowser, this._cookieString),\n [StorageOption.Session]: new PolyfillStorage(this.getSessionStorage()),\n [StorageOption.Memory]: new MemoryStorage()\n };\n\n this._current = this.findBestStorageStrategy();\n }\n\n select(option: StorageOption | StorageOption[]) {\n const items = Array.isArray(option) ? option : [option];\n for (const item of items) {\n const strategy = this._strategies?.[item] ?? null;\n if (strategy && strategy.isSupported()) {\n return strategy;\n }\n }\n\n if (this._platform.isBrowser && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n console?.warn?.('[Storage]: Could not select proper storage option, using memory fallback.');\n }\n\n // Always return as a fallback the memory storage since it should be always available.\n return this._strategies.memory;\n }\n\n get local() {\n return this._strategies.local;\n }\n\n get cookie() {\n return this._strategies.cookie;\n }\n\n get session() {\n return this._strategies.session;\n }\n\n get memory() {\n return this._strategies.memory;\n }\n\n get<T = any>(token: string): T {\n return this._current.get(token);\n }\n\n set<T = any>(token: string, value: T, attributes?: StorageAttributes) {\n this._current.set<T>(token, value, attributes);\n }\n\n remove(token: string, attributes?: StorageAttributes) {\n this._current.remove(token, attributes);\n }\n\n clear(attributes?: StorageAttributes) {\n this._current.clear(attributes);\n }\n\n isSupported() {\n return !!this._current;\n }\n\n private findBestStorageStrategy() {\n // Loop through all available strategies to find the best.\n for (const type in this._strategies) {\n const strategy = this._strategies?.[type];\n\n // The first supported strategy is the best.\n if (strategy?.isSupported()) {\n return strategy;\n }\n }\n\n // If no strategy was returned we fallback to memory\n // storage since it should be available always.\n if (this._platform.isBrowser && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n console?.warn?.('[Storage]: Could not select proper storage option, using memory fallback.');\n }\n\n return this._strategies.memory;\n }\n\n private getLocalStorage = () => {\n try {\n return (typeof window !== 'undefined') ? window?.localStorage : null;\n } catch {\n return null;\n }\n };\n\n private getSessionStorage = () => {\n try {\n return (typeof window !== 'undefined') ? window?.sessionStorage : null;\n } catch {\n return null;\n }\n };\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;MAGa,eAAe,CAAA;AAKxB,IAAA,WAAA,CAAoB,QAAkB,EAAA;QAAlB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;;QAFrB,IAAY,CAAA,YAAA,GAAY,KAAK,CAAC;AAqFvC,QAAA,IAAA,CAAA,MAAM,GAAG,CAAI,KAAQ,EAAE,UAAqC,KAAI;;AAEpE,YAAA,MAAM,IAAI,GAAG,EAAC,KAAK,EAAC,CAAC;AAErB,YAAA,IAAI,OAAO,UAAU,CAAC,OAAO,KAAK,QAAQ,EAAE;gBACxC,UAAU,CAAC,OAAO,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACrD,aAAA;YAED,IAAI,UAAU,CAAC,OAAO,EAAE;AACpB,gBAAA,IAAI,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC;AACxC,aAAA;AAED,YAAA,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAA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I,IAAI,CAAC,SAAS,CAAC,SAAS,KAAK,OAAO,SAAS,KAAK,WAAW,IAAI,SAAS,CAAC,EAAE;AAC7E,YAAA,OAAO,EAAE,IAAI,GAAG,2EAA2E,CAAC,CAAC;AAChG,SAAA;AAED,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;KAClC;;AA3FQ,OAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,OAAO,0CASgB,MAAM,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAT7B,OAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,OAAO,cAFJ,MAAM,EAAA,CAAA,CAAA;2FAET,OAAO,EAAA,UAAA,EAAA,CAAA;kBAHnB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA,CAAA;;0BAUgB,QAAQ;;0BAAI,MAAM;2BAAC,MAAM,CAAA;;;ACvB1C;;AAEG;;;;"}
|
|
@@ -217,11 +217,11 @@ class BbTablePager extends BbTablePagerMixinBase {
|
|
|
217
217
|
.map(page => ({ page, active: pageNumber === page }));
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
BbTablePager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.
|
|
221
|
-
BbTablePager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.
|
|
220
|
+
BbTablePager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTablePager, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
221
|
+
BbTablePager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: BbTablePager, selector: "bb-table-pager", inputs: { disabled: "disabled", amountOfButtons: "amountOfButtons", showArrowButtons: "showArrowButtons", pageNumber: "pageNumber", totalPages: "totalPages" }, host: { properties: { "class.disabled": "disabled" }, classAttribute: "bb-table-pager" }, providers: [
|
|
222
222
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BbTablePager), multi: true }
|
|
223
223
|
], usesInheritance: true, ngImport: i0, template: "<ul class=\"bb-pager-list\">\n <!-- The previous page arrow button. -->\n <li *ngIf=\"showArrowButtons\"\n class=\"bb-pager-list-item\"\n title=\"Previous page\">\n <button [disabled]=\"isPreviousDisabled$ | async\"\n (click)=\"goToPrevious()\"\n class=\"bb-pager-list-button\"\n type=\"button\">\n <bb-icon src=\"material:keyboard_arrow_left\"></bb-icon>\n </button>\n </li>\n\n <!-- The list of number buttons to navigate through the list. -->\n <ng-container *ngIf=\"list$ | async as list\">\n <li *ngFor=\"let item of list; trackBy: trackByIndex\"\n [title]=\"'Page ' + item?.page\"\n class=\"bb-pager-list-item\">\n <button (click)=\"goToIndex(item?.page)\"\n [class.active]=\"item?.active\"\n class=\"bb-pager-list-button\"\n type=\"button\">\n {{ item?.page }}\n </button>\n </li>\n </ng-container>\n\n <!-- The next page arrow button. -->\n <li *ngIf=\"showArrowButtons\"\n class=\"bb-pager-list-item\"\n title=\"Next page\">\n <button [disabled]=\"isNextDisabled$ | async\"\n (click)=\"goToNext()\"\n class=\"bb-pager-list-button\"\n type=\"button\">\n <bb-icon src=\"material:keyboard_arrow_right\"></bb-icon>\n </button>\n </li>\n</ul>\n", styles: [".bb-table-pager{flex:1;display:flex;align-items:center;justify-content:flex-end}.bb-table-pager.disabled{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none}.bb-pager-list{display:flex}.bb-pager-list-item{margin-left:8px}.bb-pager-list-button{padding:0;color:#3d464d;line-height:1;min-width:32px;font-size:16px;-webkit-appearance:none;appearance:none;font-weight:500;min-height:32px;-webkit-user-select:none;user-select:none;border-radius:4px;align-items:center;display:inline-flex;justify-content:center;border:1px solid #b6bbc1;transition-duration:.2s;background-color:transparent;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:color,border-color,opacity,background-color;box-shadow:inset 0 3px #b7bcc233,0 6px 6px -6px #0000001a}.bb-pager-list-button:hover,.bb-pager-list-button:focus{background-color:#0000000a}.bb-pager-list-button.active,.bb-pager-list-button.active:hover{color:#2196f3;cursor:default;border-color:#2196f3;background-color:transparent}.bb-pager-list-button:disabled{opacity:.35;cursor:default;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.BbIcon, selector: "bb-icon", inputs: ["alt", "size", "src", "ariaHidden"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.
|
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTablePager, decorators: [{
|
|
225
225
|
type: Component,
|
|
226
226
|
args: [{ selector: 'bb-table-pager', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
227
227
|
'class': 'bb-table-pager',
|
|
@@ -241,9 +241,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
|
|
|
241
241
|
|
|
242
242
|
class BbTableColumnDef {
|
|
243
243
|
}
|
|
244
|
-
BbTableColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.
|
|
245
|
-
BbTableColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.
|
|
246
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.
|
|
244
|
+
BbTableColumnDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTableColumnDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
245
|
+
BbTableColumnDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: BbTableColumnDef, selector: "[bbTableColumnDef]", ngImport: i0 });
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTableColumnDef, decorators: [{
|
|
247
247
|
type: Directive,
|
|
248
248
|
args: [{
|
|
249
249
|
selector: '[bbTableColumnDef]'
|
|
@@ -251,9 +251,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
|
|
|
251
251
|
}] });
|
|
252
252
|
class BbTableRowDef {
|
|
253
253
|
}
|
|
254
|
-
BbTableRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.
|
|
255
|
-
BbTableRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.
|
|
256
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.
|
|
254
|
+
BbTableRowDef.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTableRowDef, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
255
|
+
BbTableRowDef.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: BbTableRowDef, selector: "[bbTableRowDef]", ngImport: i0 });
|
|
256
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTableRowDef, decorators: [{
|
|
257
257
|
type: Directive,
|
|
258
258
|
args: [{
|
|
259
259
|
selector: '[bbTableRowDef]'
|
|
@@ -392,9 +392,9 @@ class BbTable {
|
|
|
392
392
|
return this.form.valueChanges.pipe(startWith(this.form.value));
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
BbTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.
|
|
396
|
-
BbTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: BbTable, selector: "bb-table", inputs: { identifier: "identifier", dataSource: "dataSource", queryFields: "queryFields", sortingStrategy: "sortingStrategy", header: "header", footer: "footer", sizes: "sizes" }, host: { classAttribute: "bb-table" }, queries: [{ propertyName: "tableRowTemplate", first: true, predicate: BbTableRowDef, descendants: true, read: TemplateRef }, { propertyName: "tableColumnTemplates", predicate: BbTableColumnDef, read: TemplateRef }], ngImport: i0, template: "<!--\n This is the header of the table. It can be a user\n defined custom header or just the default header.\n-->\n\n<header *ngIf=\"(header === true ? headerTemplate : header) as template\"\n class=\"bb-table-top-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n</header>\n\n<!--\n This is the table that contains the\n rows and columns.\n-->\n\n<div class=\"bb-table-wrapper\">\n <div *ngIf=\"isLoading$ | async\"\n class=\"bb-table-progress\">\n <div class=\"bb-table-indeterminate\"></div>\n </div>\n <table class=\"bb-table-container\">\n <thead>\n <tr>\n <ng-content select=\"bb-table-header-cell\"></ng-content>\n </tr>\n </thead>\n <tbody *ngIf=\"data$ | async as data; else isLoadingTemplate\"\n [ngSwitch]=\"data?.state\">\n <ng-container *ngSwitchCase=\"'success'\">\n <ng-container *ngIf=\"!!tableRowTemplate; else tableCellsTemplates\">\n <ng-container\n *ngTemplateOutlet=\"tableRowTemplate; context: {data: data?.result?.data || []}\"></ng-container>\n </ng-container>\n\n <ng-template #tableCellsTemplates>\n <tr *ngFor=\"let item of data?.result?.data; trackBy: trackByFn\">\n <ng-container *ngFor=\"let template of tableColumnTemplates\">\n <ng-container *ngTemplateOutlet=\"template; context: {item: item}\"></ng-container>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'empty'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_datasource'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_not_found'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_server'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_down'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n </tbody>\n </table>\n</div>\n\n<footer *ngIf=\"(footer === true ? footerTemplate : footer) as template\"\n class=\"bb-table-bottom-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n</footer>\n\n<ng-template #isLoadingTemplate>\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n {{ 'tables.loading' | bbLocalize }}\n </div>\n </td>\n </tr>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom header template.\n-->\n\n<ng-template #headerTemplate>\n <ng-content></ng-content>\n <bb-form-control>\n <input [formControl]=\"queryControl\"\n [placeholder]=\"'tables.search' | bbLocalize\"\n bbInput\n autocomplete=\"off\">\n <bb-icon *ngIf=\"queryControl?.value?.length <= 0; else closeButtonTemplate\"\n bbSuffix\n src=\"material:search\">\n </bb-icon>\n </bb-form-control>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom footer template.\n-->\n\n<ng-template #footerTemplate>\n <bb-form-control *ngIf=\"sizes?.length > 1\">\n <select [formControl]=\"pageSizeControl\"\n bbInput\n title=\"Sizes\">\n <option *ngFor=\"let item of sizes; trackBy: trackByValue\"\n [ngValue]=\"item\">\n {{ item }} / {{ 'tables.page' | bbLocalize }}\n </option>\n </select>\n </bb-form-control>\n\n <bb-table-pager [totalPages]=\"(data$ | async)?.result?.totalPages\"\n [formControl]=\"pageNumberControl\">\n </bb-table-pager>\n</ng-template>\n\n<!--\n This the template that will be used when the user\n has filled in some data in the query control.\n-->\n\n<ng-template #closeButtonTemplate>\n <button bbSuffix\n (click)=\"queryControl?.patchValue('')\"\n type=\"button\"\n class=\"bb-table-progress-close-query\">\n <bb-icon src=\"material:close\"></bb-icon>\n </button>\n</ng-template>\n\n<ng-template #errorTemplate let-state=\"state\" let-status=\"statusCode\">\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"64\" height=\"41\">\n <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 1)\">\n <ellipse cx=\"32\" cy=\"33\" fill=\"#F5F5F5\" rx=\"32\" ry=\"7\"></ellipse>\n <g fill-rule=\"nonzero\" stroke=\"#D9D9D9\">\n <path\n d=\"M55 12.7605604L44.8543047 1.25739633C44.3674414.47382661 43.6558789 0 42.9067617 0H21.0932383c-.7491172 0-1.4606797.47395025-1.947543 1.25739633L9 12.7605604V22h46v-9.2394396z\"></path>\n <path fill=\"#FAFAFA\"\n d=\"M41.6132813 15.9315c0-1.6056489.9936718-2.931266 2.2264179-2.9315H55v18.1371277C55 33.2589574 53.6793867 35 52.0504297 35H11.94957031C10.32052344 35 9 33.2588404 9 31.1371277V13h11.1603008c1.2327461 0 2.226418 1.3228085 2.226418 2.9284574v.0211809c0 1.6056489 1.0049921 2.9015426 2.2377382 2.9015426h14.751086c1.2327461 0 2.2377383-1.3078298 2.2377383-2.9134788V15.9315z\"></path>\n </g>\n </g>\n </svg>\n <span *ngIf=\"state as stateLabel\">{{ ('tables.' + stateLabel) | bbLocalize }}</span>\n <span *ngIf=\"status as statusCode\"\n class=\"bb-table-template-content-code\">(HTTP {{ statusCode }})</span>\n </div>\n </td>\n </tr>\n</ng-template>\n", styles: [".bb-table{width:100%;display:block;box-shadow:0 6px 6px -6px #0000001a}.bb-table.plain{box-shadow:none}.bb-table.plain>.bb-table-wrapper{border-top-left-radius:0;border-top-right-radius:0}.bb-table-wrapper{overflow-x:auto;position:relative;background-color:#fff;border-top-left-radius:4px;border-top-right-radius:4px}.bb-table-container{width:100%}.bb-table-container td{border-bottom:1px solid #d8d8d8}.bb-table-top-actions{display:flex;flex-wrap:wrap;flex-direction:column;padding:20px 20px 10px;background-color:#fff;justify-content:flex-end;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:1px solid #d8d8d8}.bb-table-top-actions>*{margin-left:0;margin-bottom:10px}.bb-table-top-actions+.bb-table-wrapper{border-radius:0}.bb-table-bottom-actions{height:60px;display:flex;padding:0 20px;overflow-x:auto;align-items:center;background-color:#fff;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.bb-table-template{border:none;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-template-content{padding:20px;display:flex;color:#3d464d;font-size:14px;line-height:1.2;font-weight:400;min-height:140px;text-align:center;align-items:center;flex-direction:column;justify-content:center}.bb-table-template-content>svg{margin-bottom:12px}.bb-table-template-content-code{opacity:.5;margin-top:5px;display:inline-block}.bb-table-progress{top:0;left:0;right:0;opacity:0;width:100%;height:4px;display:block;overflow:hidden;position:absolute;background-color:#2f408b4d;animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards}.bb-table-progress .bb-table-indeterminate{background-color:#2f408b}.bb-table-progress .bb-table-indeterminate:before{top:0;left:0;bottom:0;content:\"\";position:absolute;will-change:left,right;background-color:inherit;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.bb-table-progress .bb-table-indeterminate:after{top:0;left:0;bottom:0;content:\"\";position:absolute;animation-delay:1.15s;will-change:left,right;background-color:inherit;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite}.bb-table-progress-close-query{padding:0;border:none;border-radius:4px;background-color:transparent;transition:background-color .25s cubic-bezier(0,0,.2,1)}.bb-table-progress-close-query:hover{background-color:#00000014}.bb-table-progress-close-query:focus{background-color:#0000001f}.bb-table-progress-close-query:active{background-color:#00000029}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@media only screen and (min-width: 768px){.bb-table-top-actions{flex-direction:row}.bb-table-top-actions>*:not(:first-child){margin-left:10px;margin-bottom:10px}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.BbInput, selector: "input[bbInput], textarea[bbInput]", inputs: ["readonly"] }, { kind: "directive", type: i3.BbSelect, selector: "select[bbInput]", inputs: ["disabled", "required"] }, { kind: "directive", type: i3.BbSuffix, selector: "[bbSuffix]" }, { kind: "component", type: i3.BbIcon, selector: "bb-icon", inputs: ["alt", "size", "src", "ariaHidden"] }, { kind: "component", type: i3.BbFormControl, selector: "bb-form-control", inputs: ["grouped", "hideErrors", "label", "hint"] }, { kind: "component", type: BbTablePager, selector: "bb-table-pager", inputs: ["disabled", "amountOfButtons", "showArrowButtons", "pageNumber", "totalPages"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.BbLocalize, name: "bbLocalize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.
|
|
395
|
+
BbTable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
396
|
+
BbTable.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: BbTable, selector: "bb-table", inputs: { identifier: "identifier", dataSource: "dataSource", queryFields: "queryFields", sortingStrategy: "sortingStrategy", header: "header", footer: "footer", sizes: "sizes" }, host: { classAttribute: "bb-table" }, queries: [{ propertyName: "tableRowTemplate", first: true, predicate: BbTableRowDef, descendants: true, read: TemplateRef }, { propertyName: "tableColumnTemplates", predicate: BbTableColumnDef, read: TemplateRef }], ngImport: i0, template: "<!--\n This is the header of the table. It can be a user\n defined custom header or just the default header.\n-->\n\n<header *ngIf=\"(header === true ? headerTemplate : header) as template\"\n class=\"bb-table-top-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n</header>\n\n<!--\n This is the table that contains the\n rows and columns.\n-->\n\n<div class=\"bb-table-wrapper\">\n <div *ngIf=\"isLoading$ | async\"\n class=\"bb-table-progress\">\n <div class=\"bb-table-indeterminate\"></div>\n </div>\n <table class=\"bb-table-container\">\n <thead>\n <tr>\n <ng-content select=\"bb-table-header-cell\"></ng-content>\n </tr>\n </thead>\n <tbody *ngIf=\"data$ | async as data; else isLoadingTemplate\"\n [ngSwitch]=\"data?.state\">\n <ng-container *ngSwitchCase=\"'success'\">\n <ng-container *ngIf=\"!!tableRowTemplate; else tableCellsTemplates\">\n <ng-container\n *ngTemplateOutlet=\"tableRowTemplate; context: {data: data?.result?.data || []}\"></ng-container>\n </ng-container>\n\n <ng-template #tableCellsTemplates>\n <tr *ngFor=\"let item of data?.result?.data; trackBy: trackByFn\">\n <ng-container *ngFor=\"let template of tableColumnTemplates\">\n <ng-container *ngTemplateOutlet=\"template; context: {item: item}\"></ng-container>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'empty'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_datasource'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_not_found'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_server'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_down'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n </tbody>\n </table>\n</div>\n\n<footer *ngIf=\"(footer === true ? footerTemplate : footer) as template\"\n class=\"bb-table-bottom-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n</footer>\n\n<ng-template #isLoadingTemplate>\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n {{ 'tables.loading' | bbLocalize }}\n </div>\n </td>\n </tr>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom header template.\n-->\n\n<ng-template #headerTemplate>\n <ng-content></ng-content>\n <bb-form-control>\n <input [formControl]=\"queryControl\"\n [placeholder]=\"'tables.search' | bbLocalize\"\n bbInput\n autocomplete=\"off\">\n <bb-icon *ngIf=\"queryControl?.value?.length <= 0; else closeButtonTemplate\"\n bbSuffix\n src=\"material:search\">\n </bb-icon>\n </bb-form-control>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom footer template.\n-->\n\n<ng-template #footerTemplate>\n <bb-form-control *ngIf=\"sizes?.length > 1\">\n <select [formControl]=\"pageSizeControl\"\n bbInput\n title=\"Sizes\">\n <option *ngFor=\"let item of sizes; trackBy: trackByValue\"\n [ngValue]=\"item\">\n {{ item }} / {{ 'tables.page' | bbLocalize }}\n </option>\n </select>\n </bb-form-control>\n\n <bb-table-pager [totalPages]=\"(data$ | async)?.result?.totalPages\"\n [formControl]=\"pageNumberControl\">\n </bb-table-pager>\n</ng-template>\n\n<!--\n This the template that will be used when the user\n has filled in some data in the query control.\n-->\n\n<ng-template #closeButtonTemplate>\n <button bbSuffix\n (click)=\"queryControl?.patchValue('')\"\n type=\"button\"\n class=\"bb-table-progress-close-query\">\n <bb-icon src=\"material:close\"></bb-icon>\n </button>\n</ng-template>\n\n<ng-template #errorTemplate let-state=\"state\" let-status=\"statusCode\">\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"64\" height=\"41\">\n <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 1)\">\n <ellipse cx=\"32\" cy=\"33\" fill=\"#F5F5F5\" rx=\"32\" ry=\"7\"></ellipse>\n <g fill-rule=\"nonzero\" stroke=\"#D9D9D9\">\n <path\n d=\"M55 12.7605604L44.8543047 1.25739633C44.3674414.47382661 43.6558789 0 42.9067617 0H21.0932383c-.7491172 0-1.4606797.47395025-1.947543 1.25739633L9 12.7605604V22h46v-9.2394396z\"></path>\n <path fill=\"#FAFAFA\"\n d=\"M41.6132813 15.9315c0-1.6056489.9936718-2.931266 2.2264179-2.9315H55v18.1371277C55 33.2589574 53.6793867 35 52.0504297 35H11.94957031C10.32052344 35 9 33.2588404 9 31.1371277V13h11.1603008c1.2327461 0 2.226418 1.3228085 2.226418 2.9284574v.0211809c0 1.6056489 1.0049921 2.9015426 2.2377382 2.9015426h14.751086c1.2327461 0 2.2377383-1.3078298 2.2377383-2.9134788V15.9315z\"></path>\n </g>\n </g>\n </svg>\n <span *ngIf=\"state as stateLabel\">{{ ('tables.' + stateLabel) | bbLocalize }}</span>\n <span *ngIf=\"status as statusCode\"\n class=\"bb-table-template-content-code\">(HTTP {{ statusCode }})</span>\n </div>\n </td>\n </tr>\n</ng-template>\n", styles: [".bb-table{width:100%;display:block;box-shadow:0 6px 6px -6px #0000001a}.bb-table.plain{box-shadow:none}.bb-table.plain>.bb-table-wrapper{border-top-left-radius:0;border-top-right-radius:0}.bb-table-wrapper{overflow-x:auto;position:relative;background-color:#fff;border-top-left-radius:4px;border-top-right-radius:4px}.bb-table-container{width:100%}.bb-table-container td{border-bottom:1px solid #d8d8d8}.bb-table-top-actions{display:flex;flex-wrap:wrap;flex-direction:column;padding:20px 20px 10px;background-color:#fff;justify-content:flex-end;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:1px solid #d8d8d8}.bb-table-top-actions>*{margin-left:0;margin-bottom:10px}.bb-table-top-actions+.bb-table-wrapper{border-radius:0}.bb-table-bottom-actions{height:60px;display:flex;padding:0 20px;overflow-x:auto;align-items:center;background-color:#fff;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.bb-table-template{border:none;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-template-content{padding:20px;display:flex;color:#3d464d;font-size:14px;line-height:1.2;font-weight:400;min-height:140px;text-align:center;align-items:center;flex-direction:column;justify-content:center}.bb-table-template-content>svg{margin-bottom:12px}.bb-table-template-content-code{opacity:.5;margin-top:5px;display:inline-block}.bb-table-progress{top:0;left:0;right:0;opacity:0;width:100%;height:4px;display:block;overflow:hidden;position:absolute;background-color:#2f408b4d;animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards}.bb-table-progress .bb-table-indeterminate{background-color:#2f408b}.bb-table-progress .bb-table-indeterminate:before{top:0;left:0;bottom:0;content:\"\";position:absolute;will-change:left,right;background-color:inherit;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.bb-table-progress .bb-table-indeterminate:after{top:0;left:0;bottom:0;content:\"\";position:absolute;animation-delay:1.15s;will-change:left,right;background-color:inherit;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite}.bb-table-progress-close-query{padding:0;border:none;border-radius:4px;background-color:transparent;transition:background-color .25s cubic-bezier(0,0,.2,1)}.bb-table-progress-close-query:hover{background-color:#00000014}.bb-table-progress-close-query:focus{background-color:#0000001f}.bb-table-progress-close-query:active{background-color:#00000029}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@media only screen and (min-width: 768px){.bb-table-top-actions{flex-direction:row}.bb-table-top-actions>*:not(:first-child){margin-left:10px;margin-bottom:10px}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.BbInput, selector: "input[bbInput], textarea[bbInput]", inputs: ["readonly"] }, { kind: "directive", type: i3.BbSelect, selector: "select[bbInput]", inputs: ["disabled", "required"] }, { kind: "directive", type: i3.BbSuffix, selector: "[bbSuffix]" }, { kind: "component", type: i3.BbIcon, selector: "bb-icon", inputs: ["alt", "size", "src", "ariaHidden"] }, { kind: "component", type: i3.BbFormControl, selector: "bb-form-control", inputs: ["grouped", "hideErrors", "label", "hint"] }, { kind: "component", type: BbTablePager, selector: "bb-table-pager", inputs: ["disabled", "amountOfButtons", "showArrowButtons", "pageNumber", "totalPages"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.BbLocalize, name: "bbLocalize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTable, decorators: [{
|
|
398
398
|
type: Component,
|
|
399
399
|
args: [{ selector: 'bb-table', host: { 'class': 'bb-table' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, template: "<!--\n This is the header of the table. It can be a user\n defined custom header or just the default header.\n-->\n\n<header *ngIf=\"(header === true ? headerTemplate : header) as template\"\n class=\"bb-table-top-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n</header>\n\n<!--\n This is the table that contains the\n rows and columns.\n-->\n\n<div class=\"bb-table-wrapper\">\n <div *ngIf=\"isLoading$ | async\"\n class=\"bb-table-progress\">\n <div class=\"bb-table-indeterminate\"></div>\n </div>\n <table class=\"bb-table-container\">\n <thead>\n <tr>\n <ng-content select=\"bb-table-header-cell\"></ng-content>\n </tr>\n </thead>\n <tbody *ngIf=\"data$ | async as data; else isLoadingTemplate\"\n [ngSwitch]=\"data?.state\">\n <ng-container *ngSwitchCase=\"'success'\">\n <ng-container *ngIf=\"!!tableRowTemplate; else tableCellsTemplates\">\n <ng-container\n *ngTemplateOutlet=\"tableRowTemplate; context: {data: data?.result?.data || []}\"></ng-container>\n </ng-container>\n\n <ng-template #tableCellsTemplates>\n <tr *ngFor=\"let item of data?.result?.data; trackBy: trackByFn\">\n <ng-container *ngFor=\"let template of tableColumnTemplates\">\n <ng-container *ngTemplateOutlet=\"template; context: {item: item}\"></ng-container>\n </ng-container>\n </tr>\n </ng-template>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'empty'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_datasource'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_not_found'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_server'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'error_down'\">\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container\n *ngTemplateOutlet=\"errorTemplate; context: data\"></ng-container>\n </ng-container>\n </tbody>\n </table>\n</div>\n\n<footer *ngIf=\"(footer === true ? footerTemplate : footer) as template\"\n class=\"bb-table-bottom-actions\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n</footer>\n\n<ng-template #isLoadingTemplate>\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n {{ 'tables.loading' | bbLocalize }}\n </div>\n </td>\n </tr>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom header template.\n-->\n\n<ng-template #headerTemplate>\n <ng-content></ng-content>\n <bb-form-control>\n <input [formControl]=\"queryControl\"\n [placeholder]=\"'tables.search' | bbLocalize\"\n bbInput\n autocomplete=\"off\">\n <bb-icon *ngIf=\"queryControl?.value?.length <= 0; else closeButtonTemplate\"\n bbSuffix\n src=\"material:search\">\n </bb-icon>\n </bb-form-control>\n</ng-template>\n\n<!--\n This is the template that will be used when the user has not\n supplied a custom footer template.\n-->\n\n<ng-template #footerTemplate>\n <bb-form-control *ngIf=\"sizes?.length > 1\">\n <select [formControl]=\"pageSizeControl\"\n bbInput\n title=\"Sizes\">\n <option *ngFor=\"let item of sizes; trackBy: trackByValue\"\n [ngValue]=\"item\">\n {{ item }} / {{ 'tables.page' | bbLocalize }}\n </option>\n </select>\n </bb-form-control>\n\n <bb-table-pager [totalPages]=\"(data$ | async)?.result?.totalPages\"\n [formControl]=\"pageNumberControl\">\n </bb-table-pager>\n</ng-template>\n\n<!--\n This the template that will be used when the user\n has filled in some data in the query control.\n-->\n\n<ng-template #closeButtonTemplate>\n <button bbSuffix\n (click)=\"queryControl?.patchValue('')\"\n type=\"button\"\n class=\"bb-table-progress-close-query\">\n <bb-icon src=\"material:close\"></bb-icon>\n </button>\n</ng-template>\n\n<ng-template #errorTemplate let-state=\"state\" let-status=\"statusCode\">\n <tr>\n <td [attr.colspan]=\"headerCount\"\n class=\"bb-table-template\">\n <div class=\"bb-table-template-content\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"64\" height=\"41\">\n <g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(0 1)\">\n <ellipse cx=\"32\" cy=\"33\" fill=\"#F5F5F5\" rx=\"32\" ry=\"7\"></ellipse>\n <g fill-rule=\"nonzero\" stroke=\"#D9D9D9\">\n <path\n d=\"M55 12.7605604L44.8543047 1.25739633C44.3674414.47382661 43.6558789 0 42.9067617 0H21.0932383c-.7491172 0-1.4606797.47395025-1.947543 1.25739633L9 12.7605604V22h46v-9.2394396z\"></path>\n <path fill=\"#FAFAFA\"\n d=\"M41.6132813 15.9315c0-1.6056489.9936718-2.931266 2.2264179-2.9315H55v18.1371277C55 33.2589574 53.6793867 35 52.0504297 35H11.94957031C10.32052344 35 9 33.2588404 9 31.1371277V13h11.1603008c1.2327461 0 2.226418 1.3228085 2.226418 2.9284574v.0211809c0 1.6056489 1.0049921 2.9015426 2.2377382 2.9015426h14.751086c1.2327461 0 2.2377383-1.3078298 2.2377383-2.9134788V15.9315z\"></path>\n </g>\n </g>\n </svg>\n <span *ngIf=\"state as stateLabel\">{{ ('tables.' + stateLabel) | bbLocalize }}</span>\n <span *ngIf=\"status as statusCode\"\n class=\"bb-table-template-content-code\">(HTTP {{ statusCode }})</span>\n </div>\n </td>\n </tr>\n</ng-template>\n", styles: [".bb-table{width:100%;display:block;box-shadow:0 6px 6px -6px #0000001a}.bb-table.plain{box-shadow:none}.bb-table.plain>.bb-table-wrapper{border-top-left-radius:0;border-top-right-radius:0}.bb-table-wrapper{overflow-x:auto;position:relative;background-color:#fff;border-top-left-radius:4px;border-top-right-radius:4px}.bb-table-container{width:100%}.bb-table-container td{border-bottom:1px solid #d8d8d8}.bb-table-top-actions{display:flex;flex-wrap:wrap;flex-direction:column;padding:20px 20px 10px;background-color:#fff;justify-content:flex-end;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:1px solid #d8d8d8}.bb-table-top-actions>*{margin-left:0;margin-bottom:10px}.bb-table-top-actions+.bb-table-wrapper{border-radius:0}.bb-table-bottom-actions{height:60px;display:flex;padding:0 20px;overflow-x:auto;align-items:center;background-color:#fff;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.bb-table-template{border:none;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-template-content{padding:20px;display:flex;color:#3d464d;font-size:14px;line-height:1.2;font-weight:400;min-height:140px;text-align:center;align-items:center;flex-direction:column;justify-content:center}.bb-table-template-content>svg{margin-bottom:12px}.bb-table-template-content-code{opacity:.5;margin-top:5px;display:inline-block}.bb-table-progress{top:0;left:0;right:0;opacity:0;width:100%;height:4px;display:block;overflow:hidden;position:absolute;background-color:#2f408b4d;animation:fadeIn .25s cubic-bezier(0,0,.2,1) .1s forwards}.bb-table-progress .bb-table-indeterminate{background-color:#2f408b}.bb-table-progress .bb-table-indeterminate:before{top:0;left:0;bottom:0;content:\"\";position:absolute;will-change:left,right;background-color:inherit;animation:indeterminate 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.bb-table-progress .bb-table-indeterminate:after{top:0;left:0;bottom:0;content:\"\";position:absolute;animation-delay:1.15s;will-change:left,right;background-color:inherit;animation:indeterminate-short 2.1s cubic-bezier(.165,.84,.44,1) infinite}.bb-table-progress-close-query{padding:0;border:none;border-radius:4px;background-color:transparent;transition:background-color .25s cubic-bezier(0,0,.2,1)}.bb-table-progress-close-query:hover{background-color:#00000014}.bb-table-progress-close-query:focus{background-color:#0000001f}.bb-table-progress-close-query:active{background-color:#00000029}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes indeterminate{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes indeterminate-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@media only screen and (min-width: 768px){.bb-table-top-actions{flex-direction:row}.bb-table-top-actions>*:not(:first-child){margin-left:10px;margin-bottom:10px}}\n"] }]
|
|
400
400
|
}], propDecorators: { tableColumnTemplates: [{
|
|
@@ -421,9 +421,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImpor
|
|
|
421
421
|
|
|
422
422
|
class BbTableCell {
|
|
423
423
|
}
|
|
424
|
-
BbTableCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.
|
|
425
|
-
BbTableCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.
|
|
426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.
|
|
424
|
+
BbTableCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTableCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
425
|
+
BbTableCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: BbTableCell, selector: "bb-table-cell", host: { classAttribute: "bb-table-cell" }, ngImport: i0, template: "<div>\n <ng-content></ng-content>\n</div>", styles: [".bb-table-cell{color:#848f99;font-size:14px;text-align:left;line-height:1.2;font-weight:400;padding:12px 20px;display:table-cell;word-wrap:break-word;vertical-align:middle;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-cell:not(:last-child){border-right:1px solid #d8d8d8}.bb-table-cell.fit{width:1%;white-space:nowrap}.bb-table-cell.left{text-align:left}.bb-table-cell.center{text-align:center}.bb-table-cell.right{text-align:right}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTableCell, decorators: [{
|
|
427
427
|
type: Component,
|
|
428
428
|
args: [{ selector: 'bb-table-cell', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'class': 'bb-table-cell' }, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, template: "<div>\n <ng-content></ng-content>\n</div>", styles: [".bb-table-cell{color:#848f99;font-size:14px;text-align:left;line-height:1.2;font-weight:400;padding:12px 20px;display:table-cell;word-wrap:break-word;vertical-align:middle;background-color:#f5f5f5;border-bottom:1px solid #d8d8d8}.bb-table-cell:not(:last-child){border-right:1px solid #d8d8d8}.bb-table-cell.fit{width:1%;white-space:nowrap}.bb-table-cell.left{text-align:left}.bb-table-cell.center{text-align:center}.bb-table-cell.right{text-align:right}\n"] }]
|
|
429
429
|
}] });
|
|
@@ -528,9 +528,9 @@ class BbTableHeaderCell extends BbTableHeaderCellMixinBase {
|
|
|
528
528
|
this._table?.sortControl?.patchValue(newValue);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
BbTableHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.
|
|
532
|
-
BbTableHeaderCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.
|
|
533
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.
|
|
531
|
+
BbTableHeaderCell.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTableHeaderCell, deps: [{ token: BbTable, host: true, optional: true }, { token: 'name', attribute: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
532
|
+
BbTableHeaderCell.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: BbTableHeaderCell, selector: "bb-table-header-cell", inputs: { disabled: "disabled", sort: "sort" }, host: { listeners: { "click": "onClick()" }, properties: { "class.disabled": "isDisabled" }, classAttribute: "bb-table-header-cell" }, usesInheritance: true, ngImport: i0, template: "<!-- The content. -->\n<ng-content></ng-content>\n\n<!-- The indicator for the sort direction. -->\n<ng-container *ngIf=\"valueChanges$ | async as value\">\n <button *ngIf=\"!isDisabled\"\n [class.asc]=\"value === 'asc'\"\n [class.desc]=\"value === 'desc'\"\n class=\"bb-table-header-cell-toggle\"\n type=\"button\"></button>\n</ng-container>\n", styles: [".bb-table-header-cell{height:50px;color:#212529;cursor:pointer;font-size:16px;font-weight:500;-webkit-user-select:none;user-select:none;padding:10px 20px;position:relative;display:table-cell;vertical-align:middle;border-bottom:1px solid #d8d8d8}.bb-table-header-cell:active>.bb-table-header-cell-toggle{background-color:#00000014}.bb-table-header-cell:not(.disabled){padding-right:52px}.bb-table-header-cell.fit{width:1%;white-space:nowrap}.bb-table-header-cell.left{text-align:left}.bb-table-header-cell.center{text-align:center}.bb-table-header-cell.right{text-align:right}.bb-table-header-cell.disabled{cursor:default;pointer-events:none}.bb-table-header-cell-toggle{top:50%;right:14px;width:22px;border:none;height:22px;margin-left:auto;position:absolute;border-radius:4px;transform:translateY(-50%);background-position:center;background-repeat:no-repeat;background-color:transparent;transition:background-color .2s cubic-bezier(0,0,.2,1);background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}.bb-table-header-cell-toggle.desc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"black\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}.bb-table-header-cell-toggle.asc{background-image:url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 15\" width=\"9\" height=\"15\"%3E%3Cpath fill=\"black\" d=\"M4.5 0L0 7h9z\"%3E%3C/path%3E%3Cpath fill=\"%23dcdcdc\" d=\"M4.5 15L9 8H0z\"%3E%3C/path%3E%3C/svg%3E')}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbTableHeaderCell, decorators: [{
|
|
534
534
|
type: Component,
|
|
535
535
|
args: [{ selector: 'bb-table-header-cell', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
536
536
|
'class': 'bb-table-header-cell',
|
|
@@ -562,8 +562,8 @@ const DECLARATIONS_EXPORTS = [
|
|
|
562
562
|
];
|
|
563
563
|
class TableModule {
|
|
564
564
|
}
|
|
565
|
-
TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.
|
|
566
|
-
TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.
|
|
565
|
+
TableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
566
|
+
TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: TableModule, declarations: [BbTable,
|
|
567
567
|
BbTableColumnDef,
|
|
568
568
|
BbTableRowDef,
|
|
569
569
|
BbTableHeaderCell,
|
|
@@ -574,8 +574,8 @@ TableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "1
|
|
|
574
574
|
BbTableHeaderCell,
|
|
575
575
|
BbTableCell,
|
|
576
576
|
BbTablePager] });
|
|
577
|
-
TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.
|
|
578
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.
|
|
577
|
+
TableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TableModule, imports: [CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule] });
|
|
578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: TableModule, decorators: [{
|
|
579
579
|
type: NgModule,
|
|
580
580
|
args: [{
|
|
581
581
|
imports: [CommonModule, ReactiveFormsModule, ElementsModule, LocalizeModule],
|
|
@@ -25,9 +25,9 @@ class BbiTheming {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
BbiTheming.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.
|
|
29
|
-
BbiTheming.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.
|
|
28
|
+
BbiTheming.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbiTheming, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
29
|
+
BbiTheming.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: BbiTheming, selector: "[bbiTheming]", inputs: { theme: ["bbiTheming", "theme"] }, ngImport: i0 });
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: BbiTheming, decorators: [{
|
|
31
31
|
type: Directive,
|
|
32
32
|
args: [{
|
|
33
33
|
selector: '[bbiTheming]'
|
|
@@ -267,10 +267,10 @@ class Theme {
|
|
|
267
267
|
|
|
268
268
|
class ThemingModule {
|
|
269
269
|
}
|
|
270
|
-
ThemingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.
|
|
271
|
-
ThemingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.
|
|
272
|
-
ThemingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.
|
|
270
|
+
ThemingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ThemingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
271
|
+
ThemingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ThemingModule, declarations: [BbiTheming], exports: [BbiTheming] });
|
|
272
|
+
ThemingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ThemingModule });
|
|
273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ThemingModule, decorators: [{
|
|
274
274
|
type: NgModule,
|
|
275
275
|
args: [{
|
|
276
276
|
declarations: [BbiTheming],
|